summaryrefslogtreecommitdiff
path: root/infrastructure
diff options
context:
space:
mode:
Diffstat (limited to 'infrastructure')
-rw-r--r--infrastructure/BoxPlatform.pm.in132
-rw-r--r--infrastructure/buildenv-testmain-template.cpp390
-rw-r--r--infrastructure/m4/ac_cxx_exceptions.m424
-rw-r--r--infrastructure/m4/ac_cxx_namespaces.m425
-rw-r--r--infrastructure/m4/ax_bswap64.m452
-rw-r--r--infrastructure/m4/ax_check_bdb_v1.m443
-rw-r--r--infrastructure/m4/ax_check_define_pragma.m425
-rw-r--r--infrastructure/m4/ax_check_dirent_d_type.m445
-rw-r--r--infrastructure/m4/ax_check_llong_minmax.m476
-rw-r--r--infrastructure/m4/ax_check_malloc_workaround.m438
-rw-r--r--infrastructure/m4/ax_check_mount_point.m460
-rw-r--r--infrastructure/m4/ax_check_nonaligned_access.m457
-rw-r--r--infrastructure/m4/ax_check_ssl.m437
-rw-r--r--infrastructure/m4/ax_check_syscall_lseek.m469
-rw-r--r--infrastructure/m4/ax_compare_version.m4162
-rw-r--r--infrastructure/m4/ax_config_scripts.m416
-rw-r--r--infrastructure/m4/ax_func_syscall.m450
-rw-r--r--infrastructure/m4/ax_path_bdb.m4615
-rw-r--r--infrastructure/m4/ax_random_device.m431
-rw-r--r--infrastructure/m4/ax_split_version.m419
-rw-r--r--infrastructure/m4/vl_lib_readline.m4135
-rwxr-xr-xinfrastructure/makebuildenv.pl.in973
-rwxr-xr-xinfrastructure/makedistribution.pl.in363
-rwxr-xr-xinfrastructure/makeparcels.pl.in396
-rwxr-xr-xinfrastructure/mingw/configure.sh38
-rw-r--r--infrastructure/msvc/2003/bbackupctl.vcproj159
-rw-r--r--infrastructure/msvc/2003/bbackupd.vcproj219
-rw-r--r--infrastructure/msvc/2003/boxbackup.sln57
-rw-r--r--infrastructure/msvc/2003/boxquery.vcproj174
-rw-r--r--infrastructure/msvc/2003/common.vcproj672
-rw-r--r--infrastructure/msvc/2003/win32test.vcproj148
-rw-r--r--infrastructure/msvc/2005/bbackupctl.vcproj222
-rw-r--r--infrastructure/msvc/2005/bbackupd.vcproj299
-rw-r--r--infrastructure/msvc/2005/boxbackup.sln55
-rw-r--r--infrastructure/msvc/2005/boxbackup.suobin0 -> 58880 bytes
-rw-r--r--infrastructure/msvc/2005/boxquery.vcproj246
-rw-r--r--infrastructure/msvc/2005/common.vcproj896
-rw-r--r--infrastructure/msvc/2005/win32test.vcproj218
-rw-r--r--infrastructure/msvc/getversion.pl19
-rw-r--r--infrastructure/parcelpath.pl17
-rw-r--r--infrastructure/printversion.pl12
-rwxr-xr-xinfrastructure/setupexternal.pl55
42 files changed, 7339 insertions, 0 deletions
diff --git a/infrastructure/BoxPlatform.pm.in b/infrastructure/BoxPlatform.pm.in
new file mode 100644
index 00000000..59ab5d85
--- /dev/null
+++ b/infrastructure/BoxPlatform.pm.in
@@ -0,0 +1,132 @@
+package BoxPlatform;
+use Exporter;
+@ISA = qw/Exporter/;
+@EXPORT = qw/$build_os $target_os $make_command $bsd_make $platform_define $platform_cpu $gcc_v3 $product_version $product_name $install_into_dir $sub_make_options $platform_compile_line_extra $platform_link_line_extra $platform_lib_files $platform_exe_ext $target_windows/;
+
+BEGIN
+{
+ # which OS are we building under?
+ $target_os = '@target_os@';
+ $target_windows = 0;
+ $target_windows = 1 if $target_os =~ m'^mingw32'
+ or $target_os eq "winnt";
+
+ if ($^O eq "MSWin32" and not -x "/usr/bin/uname")
+ {
+ $build_os = "winnt";
+ }
+ else
+ {
+ $build_os = `uname`;
+ chomp $build_os;
+ }
+
+ # Cygwin Builds usually something like CYGWIN_NT-5.0, CYGWIN_NT-5.1
+ # Box Backup tried on Win2000,XP only :)
+ $build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/;
+
+ $make_command = ($build_os eq 'Darwin') ? 'bsdmake' : ($build_os eq 'SunOS') ? 'gmake' : 'make';
+
+ $bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN' &&
+ $build_os ne "SunOS" && $build_os ne 'GNU/kFreeBSD');
+
+ # blank extra flags by default
+ $platform_compile_line_extra = '';
+ $platform_link_line_extra = '';
+ $platform_lib_files = '@LIBS@';
+ $platform_exe_ext = '@EXEEXT@';
+
+ # get version
+ my $version_file = "VERSION.txt";
+ if (not -r $version_file) { $version_file = "../../$version_file" }
+ die "missing version file: $version_file" unless $version_file;
+
+ open VERSION, $version_file or die "$version_file: $!";
+ $product_version = <VERSION>;
+ chomp $product_version;
+ $product_name = <VERSION>;
+ chomp $product_name;
+ close VERSION;
+
+ if($product_version =~ /USE_SVN_VERSION/)
+ {
+ # for developers, use SVN version
+ my $svnversion = `svnversion .`;
+ chomp $svnversion;
+ $svnversion =~ tr/0-9A-Za-z/_/c;
+ open INFO,'svn info . |';
+ my $svnurl;
+ while(<INFO>)
+ {
+ if(m/^URL: (.+?)[\n\r]+/)
+ {
+ $svnurl = $1
+ }
+ }
+ close INFO;
+
+ my $svndir;
+ if ($svnurl =~ m!/box/(.+)$!)
+ {
+ $svndir = $1;
+ }
+ elsif ($svnurl =~ m'/(boxi/.+)/boxi/boxbackup')
+ {
+ $svndir = $1;
+ }
+
+ $svndir =~ tr/0-9A-Za-z/_/c;
+ $product_version =~ s/USE_SVN_VERSION/$svndir.'_'.$svnversion/e;
+ }
+
+ # where to put the files
+ $install_into_dir = '@sbindir_expanded@';
+
+ # if it's Darwin,
+ if($build_os eq 'Darwin')
+ {
+ # see how many processors there are, and set make flags accordingly
+ my $cpus = `sysctl hw.ncpu`;
+ if($cpus =~ m/hw.ncpu:\s(\d+)/ && $1 > 1)
+ {
+ print STDERR "$1 processors detected, will set make to perform concurrent jobs\n";
+ $sub_make_options = ' -j '.($1 + 1);
+ }
+
+ # test for fink installation
+ if(-d '/sw/include' && -d '/sw/lib')
+ {
+ print STDERR "Fink installation detected, will use headers and libraries\n";
+ $platform_compile_line_extra = '-I/sw/include ';
+ $platform_link_line_extra = '-L/sw/lib ';
+ }
+ }
+}
+
+sub make_flag
+{
+ if($bsd_make)
+ {
+ return "-D $_[0]"
+ }
+ return $_[0].'=1';
+}
+
+sub parcel_root
+{
+ my $tos = $_[1] || $target_os;
+ return $product_name.'-'.$product_version.'-'.$_[0].'-'.$tos;
+}
+
+sub parcel_dir
+{
+ 'parcels/'.parcel_root($_[0], $_[1])
+}
+
+sub parcel_target
+{
+ parcel_dir($_[0]).'.tgz'
+}
+
+1;
+
diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp
new file mode 100644
index 00000000..b646a27b
--- /dev/null
+++ b/infrastructure/buildenv-testmain-template.cpp
@@ -0,0 +1,390 @@
+//
+// AUTOMATICALLY GENERATED FILE
+// do not edit
+//
+// Note that infrastructure/buildenv-testmain-template.cpp is NOT
+// auto-generated, but test/*/_main.cpp are generated from it.
+//
+
+
+// --------------------------------------------------------------------------
+//
+// File
+// Name: testmain.template.h
+// Purpose: Template file for running tests
+// Created: 2003/07/08
+//
+// --------------------------------------------------------------------------
+
+#include "Box.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#ifdef HAVE_GETOPT_H
+ #include <getopt.h>
+#endif
+
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <exception>
+#include <string>
+
+#include "Logging.h"
+#include "Test.h"
+#include "Timer.h"
+
+#include "MemLeakFindOn.h"
+
+int test(int argc, const char *argv[]);
+
+#ifdef BOX_RELEASE_BUILD
+ #define MODE_TEXT "release"
+#else
+ #define MODE_TEXT "debug"
+#endif
+
+int failures = 0;
+int first_fail_line;
+std::string first_fail_file;
+
+#ifdef WIN32
+ #define QUIET_PROCESS "-Q"
+#else
+ #define QUIET_PROCESS ""
+#endif
+
+std::string bbackupd_args = QUIET_PROCESS,
+ bbstored_args = QUIET_PROCESS,
+ bbackupquery_args,
+ test_args;
+
+int filedes_open_at_beginning = -1;
+
+#ifdef WIN32
+
+// any way to check for open file descriptors on Win32?
+inline bool check_filedes(bool x) { return 0; }
+inline bool checkfilesleftopen() { return false; }
+
+#else // !WIN32
+
+#define FILEDES_MAX 256
+
+bool filedes_open[FILEDES_MAX];
+
+bool check_filedes(bool report)
+{
+ bool allOk = true;
+
+ // See how many file descriptors there are with values < 256
+ for(int d = 0; d < FILEDES_MAX; ++d)
+ {
+ if(::fcntl(d, F_GETFD) != -1)
+ {
+ // File descriptor obviously exists
+ if (report && !filedes_open[d])
+ {
+ struct stat st;
+ if (fstat(d, &st) == 0)
+ {
+ int m = st.st_mode;
+ #define flag(x) ((m & x) ? #x " " : "")
+ BOX_FATAL("File descriptor " << d <<
+ " left open (type == " <<
+ flag(S_IFIFO) <<
+ flag(S_IFCHR) <<
+ flag(S_IFDIR) <<
+ flag(S_IFBLK) <<
+ flag(S_IFREG) <<
+ flag(S_IFLNK) <<
+ flag(S_IFSOCK) <<
+ " or " << m << ")");
+ }
+ else
+ {
+ BOX_FATAL("File descriptor " << d <<
+ " left open (and stat failed)");
+ }
+
+ allOk = false;
+
+ }
+ else if (!report)
+ {
+ filedes_open[d] = true;
+ }
+ }
+ else
+ {
+ if (report && filedes_open[d])
+ {
+ BOX_FATAL("File descriptor " << d <<
+ " was open, now closed");
+ allOk = false;
+ }
+ else
+ {
+ filedes_open[d] = false;
+ }
+ }
+ }
+
+ if (!report && allOk)
+ {
+ filedes_open_at_beginning = 0;
+ }
+
+ return !allOk;
+}
+
+bool checkfilesleftopen()
+{
+ if(filedes_open_at_beginning == -1)
+ {
+ // Not used correctly, pretend that there were things
+ // left open so this gets investigated
+ BOX_FATAL("File descriptor test was not initialised");
+ return true;
+ }
+
+ // Count the file descriptors open
+ return check_filedes(true);
+}
+
+#endif
+
+int main(int argc, char * const * argv)
+{
+ // Start memory leak testing
+ MEMLEAKFINDER_START
+
+ Logging::SetProgramName(BOX_MODULE);
+
+#ifdef HAVE_GETOPT_H
+ #ifdef BOX_RELEASE_BUILD
+ int logLevel = Log::NOTICE; // need an int to do math with
+ #else
+ int logLevel = Log::INFO; // need an int to do math with
+ #endif
+
+ struct option longopts[] =
+ {
+ { "bbackupd-args", required_argument, NULL, 'c' },
+ { "bbstored-args", required_argument, NULL, 's' },
+ { "test-daemon-args", required_argument, NULL, 'd' },
+ { NULL, 0, NULL, 0 }
+ };
+
+ int ch;
+
+ while ((ch = getopt_long(argc, argv, "c:d:qs:t:vPTUV", longopts, NULL))
+ != -1)
+ {
+ switch(ch)
+ {
+ case 'c':
+ {
+ if (bbackupd_args.length() > 0)
+ {
+ bbackupd_args += " ";
+ }
+ bbackupd_args += optarg;
+ }
+ break;
+
+ case 'd':
+ {
+ if (test_args.length() > 0)
+ {
+ test_args += " ";
+ }
+ test_args += optarg;
+ }
+ break;
+
+ case 's':
+ {
+ bbstored_args += " ";
+ bbstored_args += optarg;
+ }
+ break;
+
+ #ifndef WIN32
+ case 'P':
+ {
+ Console::SetShowPID(true);
+ }
+ break;
+ #endif
+
+ case 'q':
+ {
+ if(logLevel == Log::NOTHING)
+ {
+ BOX_FATAL("Too many '-q': "
+ "Cannot reduce logging "
+ "level any more");
+ return 2;
+ }
+ logLevel--;
+ }
+ break;
+
+ case 'v':
+ {
+ if(logLevel == Log::EVERYTHING)
+ {
+ BOX_FATAL("Too many '-v': "
+ "Cannot increase logging "
+ "level any more");
+ return 2;
+ }
+ logLevel++;
+ }
+ break;
+
+ case 'V':
+ {
+ logLevel = Log::EVERYTHING;
+ }
+ break;
+
+ case 't':
+ {
+ Logging::SetProgramName(optarg);
+ Console::SetShowTag(true);
+ }
+ break;
+
+ case 'T':
+ {
+ Console::SetShowTime(true);
+ }
+ break;
+
+ case 'U':
+ {
+ Console::SetShowTime(true);
+ Console::SetShowTimeMicros(true);
+ }
+ break;
+
+ case '?':
+ {
+ fprintf(stderr, "Unknown option: '%c'\n",
+ optopt);
+ exit(2);
+ }
+
+ default:
+ {
+ fprintf(stderr, "Unknown option code '%c'\n",
+ ch);
+ exit(2);
+ }
+ }
+ }
+
+ Logging::SetGlobalLevel((Log::Level)logLevel);
+
+ argc -= optind - 1;
+ argv += optind - 1;
+#endif // HAVE_GETOPT_H
+
+ // If there is more than one argument, then the test is doing something advanced, so leave it alone
+ bool fulltestmode = (argc == 1);
+
+ if(fulltestmode)
+ {
+ // banner
+ BOX_NOTICE("Running test TEST_NAME in " MODE_TEXT " mode...");
+
+ // Count open file descriptors for a very crude "files left open" test
+ check_filedes(false);
+
+ #ifdef WIN32
+ // Under win32 we must initialise the Winsock library
+ // before using sockets
+
+ WSADATA info;
+ TEST_THAT(WSAStartup(0x0101, &info) != SOCKET_ERROR)
+ #endif
+ }
+
+ try
+ {
+ #ifdef BOX_MEMORY_LEAK_TESTING
+ memleakfinder_init();
+ #endif
+
+ Timers::Init();
+ int returncode = test(argc, (const char **)argv);
+ Timers::Cleanup();
+
+ fflush(stdout);
+ fflush(stderr);
+
+ // check for memory leaks, if enabled
+ #ifdef BOX_MEMORY_LEAK_TESTING
+ if(memleakfinder_numleaks() != 0)
+ {
+ failures++;
+ printf("FAILURE: Memory leaks detected in test code\n");
+ printf("==== MEMORY LEAKS =================================\n");
+ memleakfinder_reportleaks();
+ printf("===================================================\n");
+ }
+ #endif
+
+ if(fulltestmode)
+ {
+ bool filesleftopen = checkfilesleftopen();
+
+ fflush(stdout);
+ fflush(stderr);
+
+ if(filesleftopen)
+ {
+ failures++;
+ printf("IMPLICIT TEST FAILED: Something left files open\n");
+ }
+ if(failures > 0)
+ {
+ printf("FAILED: %d tests failed (first at "
+ "%s:%d)\n", failures,
+ first_fail_file.c_str(),
+ first_fail_line);
+ }
+ else
+ {
+ printf("PASSED\n");
+ }
+ }
+
+ return returncode;
+ }
+ catch(std::exception &e)
+ {
+ printf("FAILED: Exception caught: %s\n", e.what());
+ return 1;
+ }
+ catch(...)
+ {
+ printf("FAILED: Unknown exception caught\n");
+ return 1;
+ }
+ if(fulltestmode)
+ {
+ if(checkfilesleftopen())
+ {
+ printf("WARNING: Files were left open\n");
+ }
+ }
+}
+
diff --git a/infrastructure/m4/ac_cxx_exceptions.m4 b/infrastructure/m4/ac_cxx_exceptions.m4
new file mode 100644
index 00000000..4c3013dc
--- /dev/null
+++ b/infrastructure/m4/ac_cxx_exceptions.m4
@@ -0,0 +1,24 @@
+dnl @synopsis AC_CXX_EXCEPTIONS
+dnl
+dnl If the C++ compiler supports exceptions handling (try, throw and
+dnl catch), define HAVE_EXCEPTIONS.
+dnl
+dnl @category Cxx
+dnl @author Todd Veldhuizen
+dnl @author Luc Maisonobe <luc@spaceroots.org>
+dnl @version 2004-02-04
+dnl @license AllPermissive
+
+AC_DEFUN([AC_CXX_EXCEPTIONS],
+[AC_CACHE_CHECK(whether the compiler supports exceptions,
+ac_cv_cxx_exceptions,
+[AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE(,[try { throw 1; } catch (int i) { return i; }],
+ ac_cv_cxx_exceptions=yes, ac_cv_cxx_exceptions=no)
+ AC_LANG_RESTORE
+])
+if test "$ac_cv_cxx_exceptions" = yes; then
+ AC_DEFINE(HAVE_EXCEPTIONS,,[define if the compiler supports exceptions])
+fi
+])
diff --git a/infrastructure/m4/ac_cxx_namespaces.m4 b/infrastructure/m4/ac_cxx_namespaces.m4
new file mode 100644
index 00000000..2f18477b
--- /dev/null
+++ b/infrastructure/m4/ac_cxx_namespaces.m4
@@ -0,0 +1,25 @@
+dnl @synopsis AC_CXX_NAMESPACES
+dnl
+dnl If the compiler can prevent names clashes using namespaces, define
+dnl HAVE_NAMESPACES.
+dnl
+dnl @category Cxx
+dnl @author Todd Veldhuizen
+dnl @author Luc Maisonobe <luc@spaceroots.org>
+dnl @version 2004-02-04
+dnl @license AllPermissive
+
+AC_DEFUN([AC_CXX_NAMESPACES],
+[AC_CACHE_CHECK(whether the compiler implements namespaces,
+ac_cv_cxx_namespaces,
+[AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
+ [using namespace Outer::Inner; return i;],
+ ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
+ AC_LANG_RESTORE
+])
+if test "$ac_cv_cxx_namespaces" = yes; then
+ AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
+fi
+])
diff --git a/infrastructure/m4/ax_bswap64.m4 b/infrastructure/m4/ax_bswap64.m4
new file mode 100644
index 00000000..8110743c
--- /dev/null
+++ b/infrastructure/m4/ax_bswap64.m4
@@ -0,0 +1,52 @@
+dnl @synopsis AX_BSWAP64
+dnl
+dnl This macro will check for a built in way of endian reversing an int64_t.
+dnl If one is found then HAVE_BSWAP64 is set to 1 and BSWAP64 will be defined
+dnl to the name of the endian swap function.
+dnl
+dnl @category C
+dnl @author Martin Ebourne
+dnl @version 2006/02/02
+dnl @license AllPermissive
+
+AC_DEFUN([AX_BSWAP64], [
+ bswap64_function=""
+ AC_CHECK_HEADERS([sys/endian.h asm/byteorder.h])
+ if test "x$ac_cv_header_sys_endian_h" = "xyes"; then
+ AC_CACHE_CHECK([for htobe64], [box_cv_have_htobe64],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ $ac_includes_default
+ #include <sys/endian.h>
+ ]], [[
+ htobe64(0);
+ return 1;
+ ]])],
+ [box_cv_have_htobe64=yes], [box_cv_have_htobe64=no]
+ )])
+ if test "x$box_cv_have_htobe64" = "xyes"; then
+ bswap64_function=htobe64
+ fi
+ fi
+ if test "x$bswap64_function" = "x" && \
+ test "x$ac_cv_header_asm_byteorder_h" = "xyes"; then
+ AC_CACHE_CHECK([for __cpu_to_be64], [box_cv_have___cpu_to_be64],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ $ac_includes_default
+ #include <asm/byteorder.h>
+ ]], [[
+ __cpu_to_be64(0);
+ return 1;
+ ]])],
+ [box_cv_have___cpu_to_be64=yes], [box_cv_have___cpu_to_be64=no]
+ )])
+ if test "x$box_cv_have___cpu_to_be64" = "xyes"; then
+ bswap64_function=__cpu_to_be64
+ fi
+ fi
+
+ if test "x$bswap64_function" != "x"; then
+ AC_DEFINE([HAVE_BSWAP64], 1,
+ [Define to 1 if BSWAP64 is defined to the name of a valid 64 bit endian swapping function])
+ AC_DEFINE_UNQUOTED([BSWAP64], [$bswap64_function], [Name of the 64 bit endian swapping function])
+ fi
+ ])dnl
diff --git a/infrastructure/m4/ax_check_bdb_v1.m4 b/infrastructure/m4/ax_check_bdb_v1.m4
new file mode 100644
index 00000000..fc5e0692
--- /dev/null
+++ b/infrastructure/m4/ax_check_bdb_v1.m4
@@ -0,0 +1,43 @@
+dnl @synopsis AX_CHECK_BDB_V1
+dnl
+dnl This macro find an installation of Berkeley DB version 1, or compatible.
+dnl It will define the following macros on success:
+dnl
+dnl HAVE_DB - If Berkeley DB version 1 or compatible is available
+dnl DB_HEADER - The relative path and filename of the header file
+dnl LIBS - Updated for correct library
+dnl
+dnl @category C
+dnl @author Martin Ebourne
+dnl @version 2005/07/12
+dnl @license AllPermissive
+
+AC_DEFUN([AX_CHECK_BDB_V1], [
+ ac_have_bdb=no
+ AC_CHECK_HEADERS([db_185.h db4/db_185.h db3/db_185.h db1/db.h db.h],
+ [ac_bdb_header=$ac_header; break], [ac_bdb_header=""])
+ if test "x$ac_bdb_header" != x; then
+ AC_SEARCH_LIBS([__db185_open],
+ [db db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db4 db-3 db3],
+ [ac_have_bdb=yes],
+ [AC_SEARCH_LIBS([dbopen], [db-1 db1 db], [ac_have_bdb=yes])])
+ fi
+ if test "x$ac_have_bdb" = "xyes"; then
+ AC_MSG_CHECKING([whether found db libraries work])
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+ $ac_includes_default
+ #include "$ac_bdb_header"]], [[
+ DB *dbp = dbopen(0, 0, 0, DB_HASH, 0);
+ if(dbp) dbp->close(dbp);
+ return 0;
+ ]])], [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE([HAVE_DB], 1, [Define to 1 if Berkeley DB is available])
+ AC_DEFINE_UNQUOTED([DB_HEADER], ["$ac_bdb_header"],
+ [Define to the location of the Berkeley DB 1.85 header])
+ ], [
+ AC_MSG_RESULT([no])
+ ac_have_bdb=no
+ ])
+ fi
+ ])dnl
diff --git a/infrastructure/m4/ax_check_define_pragma.m4 b/infrastructure/m4/ax_check_define_pragma.m4
new file mode 100644
index 00000000..e3f7fe89
--- /dev/null
+++ b/infrastructure/m4/ax_check_define_pragma.m4
@@ -0,0 +1,25 @@
+dnl @synopsis AX_CHECK_DEFINE_PRAGMA([ACTION-IF-TRUE], [ACTION-IF-FALSE])
+dnl
+dnl This macro will find out if the compiler will accept #pragma inside a
+dnl #define. HAVE_DEFINE_PRAGMA will be defined if this is the case, and
+dnl ACTION-IF-TRUE and ACTION-IF-FALSE are run as appropriate
+dnl
+dnl @category C
+dnl @author Martin Ebourne
+dnl @version 2005/07/03
+dnl @license AllPermissive
+
+AC_DEFUN([AX_CHECK_DEFINE_PRAGMA], [
+ AC_CACHE_CHECK([for pre-processor pragma defines], [box_cv_have_define_pragma],
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #define TEST_DEFINE #pragma pack(1)
+ TEST_DEFINE
+ ]])],
+ [box_cv_have_define_pragma=yes], [box_cv_have_define_pragma=no]
+ )])
+ if test "x$box_cv_have_define_pragma" = "xyes"; then
+ AC_DEFINE([HAVE_DEFINE_PRAGMA], 1, [Define to 1 if #define of pragmas works])
+ m4_ifvaln([$1],[$1],[:])dnl
+ m4_ifvaln([$2],[else $2])dnl
+ fi
+ ])dnl
diff --git a/infrastructure/m4/ax_check_dirent_d_type.m4 b/infrastructure/m4/ax_check_dirent_d_type.m4
new file mode 100644
index 00000000..078a39ee
--- /dev/null
+++ b/infrastructure/m4/ax_check_dirent_d_type.m4
@@ -0,0 +1,45 @@
+dnl @synopsis AX_CHECK_DIRENT_D_TYPE([ACTION-IF-TRUE], [ACTION-IF-FALSE])
+dnl
+dnl This macro will find out if struct dirent.d_type is present and supported.
+dnl
+dnl The following defines will be set as appropriate:
+dnl HAVE_STRUCT_DIRENT_D_TYPE
+dnl HAVE_VALID_DIRENT_D_TYPE
+dnl Also ACTION-IF-TRUE and ACTION-IF-FALSE are run as appropriate
+dnl
+dnl @category C
+dnl @author Martin Ebourne
+dnl @version 2005/07/03
+dnl @license AllPermissive
+
+AC_DEFUN([AX_CHECK_DIRENT_D_TYPE], [
+ AC_CHECK_MEMBERS([struct dirent.d_type],,, [[#include <dirent.h>]])
+ if test "x$ac_cv_member_struct_dirent_d_type" = "xyes"; then
+ AC_CACHE_CHECK([[whether struct dirent.d_type is valid]], [box_cv_have_valid_dirent_d_type],
+ [AC_TRY_RUN(
+ [
+ $ac_includes_default
+ #include <dirent.h>
+ int main()
+ {
+ DIR* dir = opendir(".");
+ struct dirent* res = NULL;
+ if(dir) res = readdir(dir);
+ return res ? (res->d_type != DT_FILE && res->d_type != DT_DIR) : 1;
+ }
+ ],
+ [box_cv_have_valid_dirent_d_type=yes],
+ [box_cv_have_valid_dirent_d_type=no],
+ [box_cv_have_valid_dirent_d_type=cross]
+ )])
+ if test "x$box_cv_have_valid_dirent_d_type" = "xyes"; then
+ AC_DEFINE([HAVE_VALID_DIRENT_D_TYPE], 1, [Define to 1 if struct dirent.d_type is valid])
+ fi
+ fi
+ if test "x$ac_cv_member_struct_dirent_d_type" = "xyes" || \
+ test "x$box_cv_have_valid_dirent_d_type" = "xyes"
+ then
+ m4_ifvaln([$1],[$1],[:])dnl
+ m4_ifvaln([$2],[else $2])dnl
+ fi
+ ])dnl
diff --git a/infrastructure/m4/ax_check_llong_minmax.m4 b/infrastructure/m4/ax_check_llong_minmax.m4
new file mode 100644
index 00000000..f3f99c53
--- /dev/null
+++ b/infrastructure/m4/ax_check_llong_minmax.m4
@@ -0,0 +1,76 @@
+dnl @synopsis AX_CHECK_LLONG_MINMAX
+dnl
+dnl This macro will fix up LLONG_MIN and LLONG_MAX as appropriate. I'm finding
+dnl it quite difficult to believe that so many hoops are necessary. The world
+dnl seems to have gone quite mad.
+dnl
+dnl This gem is adapted from the OpenSSH configure script so here's
+dnl the original copyright notice:
+dnl
+dnl Copyright (c) 1999-2004 Damien Miller
+dnl
+dnl Permission to use, copy, modify, and distribute this software for any
+dnl purpose with or without fee is hereby granted, provided that the above
+dnl copyright notice and this permission notice appear in all copies.
+dnl
+dnl @category C
+dnl @author Martin Ebourne and Damien Miller
+dnl @version 2005/07/07
+
+AC_DEFUN([AX_CHECK_LLONG_MINMAX], [
+ AC_CHECK_DECL([LLONG_MAX], [have_llong_max=1], , [[#include <limits.h>]])
+ if test -z "$have_llong_max"; then
+ AC_MSG_CHECKING([[for max value of long long]])
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <stdio.h>
+ /* Why is this so damn hard? */
+ #undef __GNUC__
+ #undef __USE_ISOC99
+ #define __USE_ISOC99
+ #include <limits.h>
+ #define DATA "conftest.llminmax"
+ int main(void) {
+ FILE *f;
+ long long i, llmin, llmax = 0;
+
+ if((f = fopen(DATA,"w")) == NULL)
+ exit(1);
+
+ #if defined(LLONG_MIN) && defined(LLONG_MAX)
+ fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
+ llmin = LLONG_MIN;
+ llmax = LLONG_MAX;
+ #else
+ fprintf(stderr, "Calculating LLONG_MIN and LLONG_MAX\n");
+ /* This will work on one's complement and two's complement */
+ for (i = 1; i > llmax; i <<= 1, i++)
+ llmax = i;
+ llmin = llmax + 1LL; /* wrap */
+ #endif
+
+ /* Sanity check */
+ if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax || llmax - 1 > llmax) {
+ fprintf(f, "unknown unknown\n");
+ exit(2);
+ }
+
+ if (fprintf(f ,"%lld %lld", llmin, llmax) < 0)
+ exit(3);
+
+ exit(0);
+ }
+ ]])], [
+ read llong_min llong_max < conftest.llminmax
+ AC_MSG_RESULT([$llong_max])
+ AC_DEFINE_UNQUOTED([LLONG_MAX], [${llong_max}LL],
+ [max value of long long calculated by configure])
+ AC_MSG_CHECKING([[for min value of long long]])
+ AC_MSG_RESULT([$llong_min])
+ AC_DEFINE_UNQUOTED([LLONG_MIN], [${llong_min}LL],
+ [min value of long long calculated by configure])
+ ],
+ [AC_MSG_RESULT(not found)],
+ [AC_MSG_WARN([[cross compiling: not checking]])]
+ )
+ fi
+ ])dnl
diff --git a/infrastructure/m4/ax_check_malloc_workaround.m4 b/infrastructure/m4/ax_check_malloc_workaround.m4
new file mode 100644
index 00000000..7655c0f7
--- /dev/null
+++ b/infrastructure/m4/ax_check_malloc_workaround.m4
@@ -0,0 +1,38 @@
+dnl @synopsis AX_CHECK_MALLOC_WORKAROUND
+dnl
+dnl This macro will see if there is a potential STL memory leak, and if we can
+dnl work around it will define __USE_MALLOC as the fix.
+dnl
+dnl @category C
+dnl @author Martin Ebourne
+dnl @version 2005/07/12
+dnl @license AllPermissive
+
+AC_DEFUN([AX_CHECK_MALLOC_WORKAROUND], [
+ if test "x$GXX" = "xyes"; then
+ AC_CACHE_CHECK([for gcc version 3 or later], [box_cv_gcc_3_plus],
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+ #if __GNUC__ < 3
+ #error "Old GNU C"
+ #endif
+ ]])],
+ [box_cv_gcc_3_plus=yes], [box_cv_gcc_3_plus=no]
+ )])
+ if test "x$box_cv_gcc_3_plus" = "xno"; then
+ AC_CACHE_CHECK([for malloc workaround], [box_cv_malloc_workaround],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #define __USE_MALLOC
+ #include <string>
+ ]], [[
+ std::string s;
+ s = "test";
+ ]])],
+ [box_cv_malloc_workaround=yes], [box_cv_malloc_workaround=no]
+ )])
+ if test "x$box_cv_malloc_workaround" = "xyes"; then
+ AC_DEFINE([__USE_MALLOC], 1,
+ [Define to 1 if __USE_MALLOC is required work around STL memory leaks])
+ fi
+ fi
+ fi
+ ])dnl
diff --git a/infrastructure/m4/ax_check_mount_point.m4 b/infrastructure/m4/ax_check_mount_point.m4
new file mode 100644
index 00000000..d26bf3e5
--- /dev/null
+++ b/infrastructure/m4/ax_check_mount_point.m4
@@ -0,0 +1,60 @@
+dnl @synopsis AX_CHECK_MOUNT_POINT([ACTION-IF-TRUE], [ACTION-IF-FALSE])
+dnl
+dnl This macro will find out how to get mount point information if possible.
+dnl
+dnl The following defines will be set as appropriate:
+dnl HAVE_MOUNTS
+dnl HAVE_MNTENT_H
+dnl HAVE_SYS_MNTTAB_H
+dnl HAVE_SYS_MOUNT_H
+dnl HAVE_STRUCT_MNTENT_MNT_DIR
+dnl HAVE_STRUCT_MNTTAB_MNT_MOUNTP
+dnl HAVE_STRUCT_STATFS_F_MNTONNAME
+dnl HAVE_STRUCT_STATVFS_F_MNTONNAME
+dnl Also ACTION-IF-TRUE and ACTION-IF-FALSE are run as appropriate
+dnl
+dnl @category C
+dnl @author Martin Ebourne
+dnl @version 2005/07/01
+dnl @license AllPermissive
+
+AC_DEFUN([AX_CHECK_MOUNT_POINT], [
+ AC_CHECK_FUNCS([getmntent statfs])
+ AC_CHECK_HEADERS([sys/param.h])
+ AC_CHECK_HEADERS([mntent.h sys/mnttab.h sys/mount.h],,, [[
+ #include <stdio.h>
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+ ]])
+ # BSD
+ AC_CHECK_MEMBERS([struct statfs.f_mntonname],,, [[
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+ #include <sys/mount.h>
+ ]])
+ # NetBSD
+ AC_CHECK_MEMBERS([struct statvfs.f_mntonname],,, [[
+ #ifdef HAVE_SYS_PARAM_H
+ #include <sys/param.h>
+ #endif
+ #include <sys/mount.h>
+ ]])
+ # Linux
+ AC_CHECK_MEMBERS([struct mntent.mnt_dir],,, [[#include <mntent.h>]])
+ # Solaris
+ AC_CHECK_MEMBERS([struct mnttab.mnt_mountp],,, [[
+ #include <stdio.h>
+ #include <sys/mnttab.h>
+ ]])
+ if test "x$ac_cv_member_struct_statfs_f_mntonname" = "xyes" || \
+ test "x$ac_cv_member_struct_statvfs_f_mntonname" = "xyes" || \
+ test "x$ac_cv_member_struct_mntent_mnt_dir" = "xyes" || \
+ test "x$ac_cv_member_struct_mnttab_mnt_mountp" = "xyes"
+ then
+ AC_DEFINE([HAVE_MOUNTS], [1], [Define to 1 if this platform supports mounts])
+ m4_ifvaln([$1],[$1],[:])dnl
+ m4_ifvaln([$2],[else $2])dnl
+ fi
+ ])dnl
diff --git a/infrastructure/m4/ax_check_nonaligned_access.m4 b/infrastructure/m4/ax_check_nonaligned_access.m4
new file mode 100644
index 00000000..ab2d0b7e
--- /dev/null
+++ b/infrastructure/m4/ax_check_nonaligned_access.m4
@@ -0,0 +1,57 @@
+dnl @synopsis AX_CHECK_NONALIGNED_ACCESS
+dnl
+dnl This macro will see if non-aligned memory accesses will fail. The following
+dnl defines will be made as appropriate:
+dnl HAVE_ALIGNED_ONLY_INT16
+dnl HAVE_ALIGNED_ONLY_INT32
+dnl HAVE_ALIGNED_ONLY_INT64
+dnl
+dnl @category C
+dnl @author Martin Ebourne
+dnl @version 2005/07/12
+dnl @license AllPermissive
+
+AC_DEFUN([AX_CHECK_NONALIGNED_ACCESS], [
+ AC_CACHE_CHECK([if non-aligned 16 bit word accesses fail], [box_cv_have_aligned_only_int16],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default]], [[
+ #ifndef HAVE_UINT16_T
+ #define uint16_t u_int16_t;
+ #endif
+ uint16_t scratch[2];
+ memset(scratch, 0, sizeof(scratch));
+ return *(uint16_t*)((char*)scratch+1);
+ ]])],
+ [box_cv_have_aligned_only_int16=no], [box_cv_have_aligned_only_int16=yes]
+ )])
+ if test "x$box_cv_have_aligned_only_int16" = "xyes"; then
+ AC_DEFINE([HAVE_ALIGNED_ONLY_INT16], 1, [Define to 1 if non-aligned int16 access will fail])
+ fi
+ AC_CACHE_CHECK([if non-aligned 32 bit word accesses fail], [box_cv_have_aligned_only_int32],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default]], [[
+ #ifndef HAVE_UINT32_T
+ #define uint32_t u_int32_t;
+ #endif
+ uint32_t scratch[2];
+ memset(scratch, 0, sizeof(scratch));
+ return *(uint32_t*)((char*)scratch+1);
+ ]])],
+ [box_cv_have_aligned_only_int32=no], [box_cv_have_aligned_only_int32=yes]
+ )])
+ if test "x$box_cv_have_aligned_only_int32" = "xyes"; then
+ AC_DEFINE([HAVE_ALIGNED_ONLY_INT32], 1, [Define to 1 if non-aligned int32 access will fail])
+ fi
+ AC_CACHE_CHECK([if non-aligned 64 bit word accesses fail], [box_cv_have_aligned_only_int64],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[$ac_includes_default]], [[
+ #ifndef HAVE_UINT64_T
+ #define uint64_t u_int64_t;
+ #endif
+ uint64_t scratch[2];
+ memset(scratch, 0, sizeof(scratch));
+ return *(uint64_t*)((char*)scratch+1);
+ ]])],
+ [box_cv_have_aligned_only_int64=no], [box_cv_have_aligned_only_int64=yes]
+ )])
+ if test "x$box_cv_have_aligned_only_int64" = "xyes"; then
+ AC_DEFINE([HAVE_ALIGNED_ONLY_INT64], 1, [Define to 1 if non-aligned int64 access will fail])
+ fi
+ ])dnl
diff --git a/infrastructure/m4/ax_check_ssl.m4 b/infrastructure/m4/ax_check_ssl.m4
new file mode 100644
index 00000000..03362bb6
--- /dev/null
+++ b/infrastructure/m4/ax_check_ssl.m4
@@ -0,0 +1,37 @@
+dnl @synopsis AX_CHECK_SSL([ACTION-IF-TRUE], [ACTION-IF-FALSE])
+dnl
+dnl This macro will check for OpenSSL in the standard path, allowing the user
+dnl to specify a directory if it is not found. The user uses
+dnl '--with-ssl-headers=/path/to/headers' or
+dnl '--with-ssl-lib=/path/to/lib' as arguments to configure.
+dnl
+dnl If OpenSSL is found the include directory gets added to CPPFLAGS,
+dnl '-lcrypto', '-lssl', and the libraries directory are added to LDFLAGS.
+dnl Also HAVE_SSL is defined to 1, and ACTION-IF-TRUE and ACTION-IF-FALSE are
+dnl run as appropriate
+dnl
+dnl @category InstalledPackages
+dnl @author Martin Ebourne
+dnl @version 2005/07/01
+dnl @license AllPermissive
+
+AC_DEFUN([AX_CHECK_SSL], [
+ AC_ARG_WITH(
+ [ssl-headers],
+ [AC_HELP_STRING([--with-ssl-headers=DIR], [SSL include files location])],
+ [CPPFLAGS="$CPPFLAGS -I$withval"])
+ AC_ARG_WITH(
+ [ssl-lib],
+ [AC_HELP_STRING([--with-ssl-lib=DIR], [SSL library location])],
+ [LDFLAGS="$LDFLAGS -L$withval"])
+
+ ax_check_ssl_found=yes
+ AC_CHECK_HEADERS([openssl/ssl.h],, [ax_check_ssl_found=no])
+ AC_CHECK_LIB([ssl], [SSL_read],, [ax_check_ssl_found=no], [-lcrypto])
+
+ if test "x$ax_check_ssl_found" = "xyes"; then
+ AC_DEFINE([HAVE_SSL], 1, [Define to 1 if SSL is available])
+ m4_ifvaln([$1],[$1],[:])dnl
+ m4_ifvaln([$2],[else $2])dnl
+ fi
+ ])dnl
diff --git a/infrastructure/m4/ax_check_syscall_lseek.m4 b/infrastructure/m4/ax_check_syscall_lseek.m4
new file mode 100644
index 00000000..9fd04c81
--- /dev/null
+++ b/infrastructure/m4/ax_check_syscall_lseek.m4
@@ -0,0 +1,69 @@
+dnl @synopsis AX_CHECK_SYSCALL_LSEEK([ACTION-IF-TRUE], [ACTION-IF-FALSE])
+dnl
+dnl This macro will find out if the lseek syscall requires a dummy middle
+dnl parameter
+dnl
+dnl The following defines will be set as appropriate:
+dnl HAVE_LSEEK_DUMMY_PARAM
+dnl Also ACTION-IF-TRUE and ACTION-IF-FALSE are run as appropriate
+dnl
+dnl @category C
+dnl @author Martin Ebourne
+dnl @version 2005/07/03
+dnl @license AllPermissive
+
+AC_DEFUN([AX_CHECK_SYSCALL_LSEEK], [
+ AC_REQUIRE([AX_FUNC_SYSCALL])dnl
+ if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
+ AC_CACHE_CHECK([[whether syscall lseek requires dummy parameter]], [box_cv_have_lseek_dummy_param],
+ [AC_TRY_RUN(
+ [
+ $ac_includes_default
+ #include <fcntl.h>
+ #include <sys/syscall.h>
+ #ifdef HAVE___SYSCALL_NEED_DEFN
+ extern "C" off_t __syscall(quad_t number, ...);
+ #endif
+ #ifdef HAVE___SYSCALL // always use it if we have it
+ #undef syscall
+ #define syscall __syscall
+ #endif
+ int main()
+ {
+ int fh = creat("lseektest", 0600);
+ int res = 0;
+ if(fh>=0)
+ {
+ // This test tries first to seek to position 0, with NO
+ // "dummy argument". If lseek does actually require a dummy
+ // argument, then it will eat SEEK_SET for the offset and
+ // try to use 99 as whence, which is invalid, so res will be
+ // -1, the program will return zero and
+ // have_lseek_dummy_param=yes
+ // (whew! that took 1 hour to figure out)
+ // The "dummy argument" probably means that it takes a 64-bit
+ // offset, so this was probably a bug anyway, and now that
+ // we cast the offset to off_t, it should never be needed
+ // (if my reasoning is correct).
+ res = syscall(SYS_lseek, fh, (off_t)0, SEEK_SET, 99);
+ close(fh);
+ }
+ unlink("lseektest");
+ return res!=-1;
+ }
+ ],
+ [box_cv_have_lseek_dummy_param=yes],
+ [box_cv_have_lseek_dummy_param=no],
+ [box_cv_have_lseek_dummy_param=no # assume not for cross-compiling]
+ )])
+ if test "x$box_cv_have_lseek_dummy_param" = "xyes"; then
+ AC_DEFINE([HAVE_LSEEK_DUMMY_PARAM], 1,
+ [Define to 1 if syscall lseek requires a dummy middle parameter])
+ fi
+ fi
+ if test "x$box_cv_have_lseek_dummy_param" = "xno"
+ then
+ m4_ifvaln([$1],[$1],[:])dnl
+ m4_ifvaln([$2],[else $2])dnl
+ fi
+ ])dnl
diff --git a/infrastructure/m4/ax_compare_version.m4 b/infrastructure/m4/ax_compare_version.m4
new file mode 100644
index 00000000..bd6c51b2
--- /dev/null
+++ b/infrastructure/m4/ax_compare_version.m4
@@ -0,0 +1,162 @@
+dnl @synopsis AX_COMPARE_VERSION(VERSION_A, OP, VERSION_B, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+dnl
+dnl This macro compares two version strings. It is used heavily in the
+dnl macro _AX_PATH_BDB for library checking. Due to the various number
+dnl of minor-version numbers that can exist, and the fact that string
+dnl comparisons are not compatible with numeric comparisons, this is
+dnl not necessarily trivial to do in a autoconf script. This macro
+dnl makes doing these comparisons easy.
+dnl
+dnl The six basic comparisons are available, as well as checking
+dnl equality limited to a certain number of minor-version levels.
+dnl
+dnl The operator OP determines what type of comparison to do, and can
+dnl be one of:
+dnl
+dnl eq - equal (test A == B)
+dnl ne - not equal (test A != B)
+dnl le - less than or equal (test A <= B)
+dnl ge - greater than or equal (test A >= B)
+dnl lt - less than (test A < B)
+dnl gt - greater than (test A > B)
+dnl
+dnl Additionally, the eq and ne operator can have a number after it to
+dnl limit the test to that number of minor versions.
+dnl
+dnl eq0 - equal up to the length of the shorter version
+dnl ne0 - not equal up to the length of the shorter version
+dnl eqN - equal up to N sub-version levels
+dnl neN - not equal up to N sub-version levels
+dnl
+dnl When the condition is true, shell commands ACTION-IF-TRUE are run,
+dnl otherwise shell commands ACTION-IF-FALSE are run. The environment
+dnl variable 'ax_compare_version' is always set to either 'true' or
+dnl 'false' as well.
+dnl
+dnl Examples:
+dnl
+dnl AX_COMPARE_VERSION([3.15.7],[lt],[3.15.8])
+dnl AX_COMPARE_VERSION([3.15],[lt],[3.15.8])
+dnl
+dnl would both be true.
+dnl
+dnl AX_COMPARE_VERSION([3.15.7],[eq],[3.15.8])
+dnl AX_COMPARE_VERSION([3.15],[gt],[3.15.8])
+dnl
+dnl would both be false.
+dnl
+dnl AX_COMPARE_VERSION([3.15.7],[eq2],[3.15.8])
+dnl
+dnl would be true because it is only comparing two minor versions.
+dnl
+dnl AX_COMPARE_VERSION([3.15.7],[eq0],[3.15])
+dnl
+dnl would be true because it is only comparing the lesser number of
+dnl minor versions of the two values.
+dnl
+dnl Note: The characters that separate the version numbers do not
+dnl matter. An empty string is the same as version 0. OP is evaluated
+dnl by autoconf, not configure, so must be a string, not a variable.
+dnl
+dnl The author would like to acknowledge Guido Draheim whose advice
+dnl about the m4_case and m4_ifvaln functions make this macro only
+dnl include the portions necessary to perform the specific comparison
+dnl specified by the OP argument in the final configure script.
+dnl
+dnl @category Misc
+dnl @author Tim Toolan <toolan@ele.uri.edu>
+dnl @version 2004-03-01
+dnl @license GPLWithACException
+
+dnl #########################################################################
+AC_DEFUN([AX_COMPARE_VERSION], [
+ # Used to indicate true or false condition
+ ax_compare_version=false
+
+ # Convert the two version strings to be compared into a format that
+ # allows a simple string comparison. The end result is that a version
+ # string of the form 1.12.5-r617 will be converted to the form
+ # 0001001200050617. In other words, each number is zero padded to four
+ # digits, and non digits are removed.
+ AS_VAR_PUSHDEF([A],[ax_compare_version_A])
+ A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ AS_VAR_PUSHDEF([B],[ax_compare_version_B])
+ B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
+ -e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
+ -e 's/[[^0-9]]//g'`
+
+ dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
+ dnl # then the first line is used to determine if the condition is true.
+ dnl # The sed right after the echo is to remove any indented white space.
+ m4_case(m4_tolower($2),
+ [lt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [gt],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
+ ],
+ [le],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],
+ [ge],[
+ ax_compare_version=`echo "x$A
+x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
+ ],[
+ dnl Split the operator from the subversion count if present.
+ m4_bmatch(m4_substr($2,2),
+ [0],[
+ # A count of zero means use the length of the shorter version.
+ # Determine the number of characters in A and B.
+ ax_compare_version_len_A=`echo "$A" | awk '{print(length)}'`
+ ax_compare_version_len_B=`echo "$B" | awk '{print(length)}'`
+
+ # Set A to no more than B's length and B to no more than A's length.
+ A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
+ ],
+ [[0-9]+],[
+ # A count greater than zero means use only that many subversions
+ A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
+ ],
+ [.+],[
+ AC_WARNING(
+ [illegal OP numeric parameter: $2])
+ ],[])
+
+ # Pad zeros at end of numbers to make same length.
+ ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
+ B="$B`echo $A | sed 's/./0/g'`"
+ A="$ax_compare_version_tmp_A"
+
+ # Check for equality or inequality as necessary.
+ m4_case(m4_tolower(m4_substr($2,0,2)),
+ [eq],[
+ test "x$A" = "x$B" && ax_compare_version=true
+ ],
+ [ne],[
+ test "x$A" != "x$B" && ax_compare_version=true
+ ],[
+ AC_WARNING([illegal OP parameter: $2])
+ ])
+ ])
+
+ AS_VAR_POPDEF([A])dnl
+ AS_VAR_POPDEF([B])dnl
+
+ dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
+ if test "$ax_compare_version" = "true" ; then
+ m4_ifvaln([$4],[$4],[:])dnl
+ m4_ifvaln([$5],[else $5])dnl
+ fi
+]) dnl AX_COMPARE_VERSION
diff --git a/infrastructure/m4/ax_config_scripts.m4 b/infrastructure/m4/ax_config_scripts.m4
new file mode 100644
index 00000000..8f5436ae
--- /dev/null
+++ b/infrastructure/m4/ax_config_scripts.m4
@@ -0,0 +1,16 @@
+dnl @synopsis AX_CONFIG_SCRIPTS(SCRIPT_FILE, ...)
+dnl
+dnl Run AC_CONFIG_FILES on a list of scripts while preserving execute
+dnl permission.
+dnl
+dnl @category Automake
+dnl @author Martin Ebourne <martin@zepler.org>
+dnl @script
+dnl @license AllPermissive
+
+AC_DEFUN([AX_CONFIG_SCRIPTS],[
+ AC_REQUIRE([AC_CONFIG_FILES])dnl
+ m4_foreach([SCRIPT_FILE],
+ m4_quote(m4_split(m4_normalize([$1]))),
+ [AC_CONFIG_FILES(SCRIPT_FILE, m4_quote(chmod +x SCRIPT_FILE))])dnl
+])
diff --git a/infrastructure/m4/ax_func_syscall.m4 b/infrastructure/m4/ax_func_syscall.m4
new file mode 100644
index 00000000..2429ca93
--- /dev/null
+++ b/infrastructure/m4/ax_func_syscall.m4
@@ -0,0 +1,50 @@
+dnl @synopsis AX_FUNC_SYSCALL
+dnl
+dnl This macro will find out how to call syscall. One or more of the following
+dnl defines will be made as appropriate:
+dnl HAVE_UNISTD_H - If unistd.h is available
+dnl HAVE_SYS_SYSCALL_H - If sys/syscall.h is available
+dnl HAVE_SYSCALL - If syscall() is available and is defined in unistd.h
+dnl HAVE___SYSCALL - If __syscall() is available and is defined in unistd.h
+dnl HAVE___SYSCALL_NEED_DEFN - If __syscall() is available but is not defined in unistd.h
+dnl
+dnl @category C
+dnl @author Martin Ebourne
+dnl @version 2005/07/01
+dnl @license AllPermissive
+dnl
+dnl Changed by Chris on 081026:
+dnl
+dnl Reversed the test for __syscall(), remove the test for syscall(),
+dnl remove the definition and reverse the sense in ax_func_syscall.m4
+dnl (which checks for __syscall() needing definition).
+dnl
+dnl Autoconf's AC_CHECK_FUNC defines it when testing for its presence,
+dnl so HAVE___SYSCALL will be true even if __syscall has no definition
+dnl in the system libraries, and this is precisely the case that we
+dnl want to test for, so now we test whether the test program compiles
+dnl with no explicit definition (only the system headers) and if that
+dnl fails, we set HAVE___SYSCALL_NEED_DEFN to 1.
+
+AC_DEFUN([AX_FUNC_SYSCALL], [
+ AC_CHECK_HEADERS([sys/syscall.h unistd.h])
+ AC_CHECK_FUNCS([syscall __syscall])
+ if test "x$ac_cv_func___syscall" = "xyes"; then
+ AC_CACHE_CHECK([for __syscall needing definition], [box_cv_have___syscall_need_defn],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+ $ac_includes_default
+ #ifdef HAVE_SYS_SYSCALL_H
+ #include <sys/syscall.h>
+ #endif
+ ]], [[
+ __syscall(SYS_exit, 0);
+ return 1;
+ ]])],
+ [box_cv_have___syscall_need_defn=no], [box_cv_have___syscall_need_defn=yes]
+ )])
+ if test "x$box_cv_have___syscall_need_defn" = "xyes"; then
+ AC_DEFINE([HAVE___SYSCALL_NEED_DEFN], 1,
+ [Define to 1 if __syscall is available but needs a definition])
+ fi
+ fi
+ ])dnl
diff --git a/infrastructure/m4/ax_path_bdb.m4 b/infrastructure/m4/ax_path_bdb.m4
new file mode 100644
index 00000000..1a771048
--- /dev/null
+++ b/infrastructure/m4/ax_path_bdb.m4
@@ -0,0 +1,615 @@
+dnl @synopsis AX_PATH_BDB([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl
+dnl This macro finds the latest version of Berkeley DB on the system,
+dnl and ensures that the header file and library versions match. If
+dnl MINIMUM-VERSION is specified, it will ensure that the library found
+dnl is at least that version.
+dnl
+dnl It determines the name of the library as well as the path to the
+dnl header file and library. It will check both the default environment
+dnl as well as the default Berkeley DB install location. When found, it
+dnl sets BDB_LIBS, BDB_CPPFLAGS, and BDB_LDFLAGS to the necessary
+dnl values to add to LIBS, CPPFLAGS, and LDFLAGS, as well as setting
+dnl BDB_VERSION to the version found. HAVE_DB_H is defined also.
+dnl
+dnl The options --with-bdb-headers=DIR and --with-bdb-lib=DIR can be
+dnl used to specify a specific Berkeley DB installation to use.
+dnl
+dnl An example of its use is:
+dnl
+dnl AX_PATH_BDB([3],[
+dnl LIBS="$BDB_LIBS $LIBS"
+dnl LDFLAGS="$BDB_LDFLAGS $LDFLAGS"
+dnl CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS"
+dnl ])
+dnl
+dnl which will locate the latest version of Berkeley DB on the system,
+dnl and ensure that it is version 3.0 or higher.
+dnl
+dnl Details: This macro does not use either AC_CHECK_HEADERS or
+dnl AC_CHECK_LIB because, first, the functions inside the library are
+dnl sometimes renamed to contain a version code that is only available
+dnl from the db.h on the system, and second, because it is common to
+dnl have multiple db.h and libdb files on a system it is important to
+dnl make sure the ones being used correspond to the same version.
+dnl Additionally, there are many different possible names for libdb
+dnl when installed by an OS distribution, and these need to be checked
+dnl if db.h does not correspond to libdb.
+dnl
+dnl When cross compiling, only header versions are verified since it
+dnl would be difficult to check the library version. Additionally the
+dnl default Berkeley DB installation locations /usr/local/BerkeleyDB*
+dnl are not searched for higher versions of the library.
+dnl
+dnl The format for the list of library names to search came from the
+dnl Cyrus IMAP distribution, although they are generated dynamically
+dnl here, and only for the version found in db.h.
+dnl
+dnl The macro AX_COMPARE_VERSION is required to use this macro, and
+dnl should be available from the Autoconf Macro Archive.
+dnl
+dnl The author would like to acknowledge the generous and valuable
+dnl feedback from Guido Draheim, without which this macro would be far
+dnl less robust, and have poor and inconsistent cross compilation
+dnl support.
+dnl
+dnl Changes:
+dnl
+dnl 1/5/05 applied patch from Rafa Rzepecki to eliminate compiler
+dnl warning about unused variable, argv
+dnl 1/7/07 Add --with-bdb-headers and --with-bdb-lib options
+dnl (James O'Gorman, james@netinertia.co.uk)
+dnl
+dnl @category InstalledPackages
+dnl @author Tim Toolan <toolan@ele.uri.edu>
+dnl @version 2005-01-17
+dnl @license GPLWithACException
+
+dnl #########################################################################
+AC_DEFUN([AX_PATH_BDB], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_ok=no
+
+ # Add --with-bdb-headers and --with-bdb-lib options
+ AC_ARG_WITH([bdb-headers],
+ [AC_HELP_STRING([--with-bdb-headers=DIR],
+ [Berkeley DB include files location])])
+
+ AC_ARG_WITH([bdb-lib],
+ [AC_HELP_STRING([--with-bdb-lib=DIR],
+ [Berkeley DB library location])])
+
+ # Check if --with-bdb-dir was specified.
+ if test "x$with_bdb_headers" = "x" -a "x$with_bdb_lib" = "x"; then
+ # No option specified, so just search the system.
+ AX_PATH_BDB_NO_OPTIONS([$1], [HIGHEST], [
+ ax_path_bdb_ok=yes
+ ])
+ else
+ ax_path_bdb_INC="$with_bdb_headers"
+ ax_path_bdb_LIB="$with_bdb_lib"
+
+ dnl # Save previous environment, and modify with new stuff.
+ ax_path_bdb_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$ax_path_bdb_INC $CPPFLAGS"
+
+ ax_path_bdb_save_LDFLAGS=$LDFLAGS
+ LDFLAGS="-L$ax_path_bdb_LIB $LDFLAGS"
+
+ # Check for specific header file db.h
+ AC_MSG_CHECKING([db.h presence in $ax_path_bdb_INC])
+ if test -f "$ax_path_bdb_INC/db.h" ; then
+ AC_MSG_RESULT([yes])
+ # Check for library
+ AX_PATH_BDB_NO_OPTIONS([$1], [ENVONLY], [
+ ax_path_bdb_ok=yes
+ BDB_CPPFLAGS="-I$ax_path_bdb_INC"
+ BDB_LDFLAGS="-L$ax_path_bdb_LIB"
+ ])
+ else
+ AC_MSG_RESULT([no])
+ AC_MSG_NOTICE([no usable Berkeley DB not found])
+ fi
+
+ dnl # Restore the environment.
+ CPPFLAGS="$ax_path_bdb_save_CPPFLAGS"
+ LDFLAGS="$ax_path_bdb_save_LDFLAGS"
+
+ fi
+
+ dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_ok" = "yes" ; then
+ m4_ifvaln([$2],[$2],[:])dnl
+ m4_ifvaln([$3],[else $3])dnl
+ fi
+
+]) dnl AX_PATH_BDB
+
+dnl #########################################################################
+dnl Check for berkeley DB of at least MINIMUM-VERSION on system.
+dnl
+dnl The OPTION argument determines how the checks occur, and can be one of:
+dnl
+dnl HIGHEST - Check both the environment and the default installation
+dnl directories for Berkeley DB and choose the version that
+dnl is highest. (default)
+dnl ENVFIRST - Check the environment first, and if no satisfactory
+dnl library is found there check the default installation
+dnl directories for Berkeley DB which is /usr/local/BerkeleyDB*
+dnl ENVONLY - Check the current environment only.
+dnl
+dnl Requires AX_PATH_BDB_PATH_GET_VERSION, AX_PATH_BDB_PATH_FIND_HIGHEST,
+dnl AX_PATH_BDB_ENV_CONFIRM_LIB, AX_PATH_BDB_ENV_GET_VERSION, and
+dnl AX_COMPARE_VERSION macros.
+dnl
+dnl Result: sets ax_path_bdb_no_options_ok to yes or no
+dnl sets BDB_LIBS, BDB_CPPFLAGS, BDB_LDFLAGS, BDB_VERSION
+dnl
+dnl AX_PATH_BDB_NO_OPTIONS([MINIMUM-VERSION], [OPTION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([AX_PATH_BDB_NO_OPTIONS], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_no_options_ok=no
+
+ # Values to add to environment to use Berkeley DB.
+ BDB_VERSION=''
+ BDB_LIBS=''
+ BDB_CPPFLAGS=''
+ BDB_LDFLAGS=''
+
+ # Check cross compilation here.
+ if test "x$cross_compiling" = "xyes" ; then
+ # If cross compiling, can't use AC_RUN_IFELSE so do these tests.
+ # The AC_PREPROC_IFELSE confirms that db.h is preprocessable,
+ # and extracts the version number from it.
+ AC_MSG_CHECKING([for db.h])
+
+ AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_no_options_HEADER_VERSION])dnl
+ HEADER_VERSION=''
+ AC_PREPROC_IFELSE([
+ AC_LANG_SOURCE([[
+#include <db.h>
+#ifdef DB_VERSION_MAJOR
+AX_PATH_BDB_STUFF DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH
+#else
+AX_PATH_BDB_STUFF 1,0,0
+#endif
+ ]])
+ ],[
+ # Extract version from preprocessor output.
+ HEADER_VERSION=`eval "$ac_cpp conftest.$ac_ext" 2> /dev/null \
+ | grep AX_PATH_BDB_STUFF | sed 's/[[^0-9,]]//g;s/,/./g;1q'`
+ ],[])
+
+ if test "x$HEADER_VERSION" = "x" ; then
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([$HEADER_VERSION])
+
+ # Check that version is high enough.
+ AX_COMPARE_VERSION([$HEADER_VERSION],[ge],[$1],[
+ # get major and minor version numbers
+ AS_VAR_PUSHDEF([MAJ],[ax_path_bdb_no_options_MAJOR])dnl
+ MAJ=`echo $HEADER_VERSION | sed 's,\..*,,'`
+ AS_VAR_PUSHDEF([MIN],[ax_path_bdb_no_options_MINOR])dnl
+ MIN=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'`
+
+ dnl # Save LIBS.
+ ax_path_bdb_no_options_save_LIBS="$LIBS"
+
+ # Check that we can link with the library.
+ AC_SEARCH_LIBS([db_version],
+ [db db-$MAJ.$MIN db$MAJ.$MIN db$MAJ$MIN db-$MAJ db$MAJ],[
+ # Sucessfully found library.
+ ax_path_bdb_no_options_ok=yes
+ BDB_VERSION=$HEADER_VERSION
+
+ # Extract library from LIBS
+ ax_path_bdb_no_options_LEN=` \
+ echo "x$ax_path_bdb_no_options_save_LIBS" \
+ | awk '{print(length)}'`
+ BDB_LIBS=`echo "x$LIBS " \
+ | sed "s/.\{$ax_path_bdb_no_options_LEN\}\$//;s/^x//;s/ //g"`
+ ],[])
+
+ dnl # Restore LIBS
+ LIBS="$ax_path_bdb_no_options_save_LIBS"
+
+ AS_VAR_POPDEF([MAJ])dnl
+ AS_VAR_POPDEF([MIN])dnl
+ ])
+ fi
+
+ AS_VAR_POPDEF([HEADER_VERSION])dnl
+ else
+ # Not cross compiling.
+ # Check version of Berkeley DB in the current environment.
+ AX_PATH_BDB_ENV_GET_VERSION([
+ AX_COMPARE_VERSION([$ax_path_bdb_env_get_version_VERSION],[ge],[$1],[
+ # Found acceptable version in current environment.
+ ax_path_bdb_no_options_ok=yes
+ BDB_VERSION="$ax_path_bdb_env_get_version_VERSION"
+ BDB_LIBS="$ax_path_bdb_env_get_version_LIBS"
+ ])
+ ])
+
+ # Determine if we need to search /usr/local/BerkeleyDB*
+ ax_path_bdb_no_options_DONE=no
+ if test "x$2" = "xENVONLY" ; then
+ ax_path_bdb_no_options_DONE=yes
+ elif test "x$2" = "xENVFIRST" ; then
+ ax_path_bdb_no_options_DONE=$ax_path_bdb_no_options_ok
+ fi
+
+ if test "$ax_path_bdb_no_options_DONE" = "no" ; then
+ ax_compare_version=false
+ # Check for highest in /usr/local/BerkeleyDB*
+ AX_PATH_BDB_PATH_FIND_HIGHEST([
+ if test "$ax_path_bdb_no_options_ok" = "yes" ; then
+ # If we already have an acceptable version use this if higher.
+ AX_COMPARE_VERSION(
+ [$ax_path_bdb_path_find_highest_VERSION],[gt],[$BDB_VERSION])
+ else
+ # Since we didn't have an acceptable version check if this one is.
+ AX_COMPARE_VERSION(
+ [$ax_path_bdb_path_find_highest_VERSION],[ge],[$1])
+ fi
+ ])
+
+ dnl # If result from _AX_COMPARE_VERSION is true we want this version.
+ if test "$ax_compare_version" = "true" ; then
+ ax_path_bdb_no_options_ok=yes
+ BDB_LIBS="-ldb"
+ if test "x$ax_path_bdb_path_find_highest_DIR" != x ; then
+ BDB_CPPFLAGS="-I$ax_path_bdb_path_find_highest_DIR/include"
+ BDB_LDFLAGS="-L$ax_path_bdb_path_find_highest_DIR/lib"
+ fi
+ BDB_VERSION="$ax_path_bdb_path_find_highest_VERSION"
+ fi
+ fi
+ fi
+
+ dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_no_options_ok" = "yes" ; then
+ AC_MSG_NOTICE([using Berkeley DB version $BDB_VERSION])
+ AC_DEFINE([HAVE_DB_H],[1],
+ [Define to 1 if you have the <db.h> header file.])
+ m4_ifvaln([$3],[$3])dnl
+ else
+ AC_MSG_NOTICE([no Berkeley DB version $1 or higher found])
+ m4_ifvaln([$4],[$4])dnl
+ fi
+]) dnl AX_PATH_BDB_NO_OPTIONS
+
+dnl #########################################################################
+dnl Check the default installation directory for Berkeley DB which is
+dnl of the form /usr/local/BerkeleyDB* for the highest version.
+dnl
+dnl Result: sets ax_path_bdb_path_find_highest_ok to yes or no,
+dnl sets ax_path_bdb_path_find_highest_VERSION to version,
+dnl sets ax_path_bdb_path_find_highest_DIR to directory.
+dnl
+dnl AX_PATH_BDB_PATH_FIND_HIGHEST([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([AX_PATH_BDB_PATH_FIND_HIGHEST], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_path_find_highest_ok=no
+
+ AS_VAR_PUSHDEF([VERSION],[ax_path_bdb_path_find_highest_VERSION])dnl
+ VERSION=''
+
+ ax_path_bdb_path_find_highest_DIR=''
+
+ # find highest verison in default install directory for Berkeley DB
+ AS_VAR_PUSHDEF([CURDIR],[ax_path_bdb_path_find_highest_CURDIR])dnl
+ AS_VAR_PUSHDEF([CUR_VERSION],[ax_path_bdb_path_get_version_VERSION])dnl
+
+ for CURDIR in `ls -d /usr/local/BerkeleyDB* 2> /dev/null`
+ do
+ AX_PATH_BDB_PATH_GET_VERSION([$CURDIR],[
+ AX_COMPARE_VERSION([$CUR_VERSION],[gt],[$VERSION],[
+ ax_path_bdb_path_find_highest_ok=yes
+ ax_path_bdb_path_find_highest_DIR="$CURDIR"
+ VERSION="$CUR_VERSION"
+ ])
+ ])
+ done
+
+ AS_VAR_POPDEF([VERSION])dnl
+ AS_VAR_POPDEF([CUR_VERSION])dnl
+ AS_VAR_POPDEF([CURDIR])dnl
+
+ dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_path_find_highest_ok" = "yes" ; then
+ m4_ifvaln([$1],[$1],[:])dnl
+ m4_ifvaln([$2],[else $2])dnl
+ fi
+
+]) dnl AX_PATH_BDB_PATH_FIND_HIGHEST
+
+dnl #########################################################################
+dnl Checks for Berkeley DB in specified directory's lib and include
+dnl subdirectories.
+dnl
+dnl Result: sets ax_path_bdb_path_get_version_ok to yes or no,
+dnl sets ax_path_bdb_path_get_version_VERSION to version.
+dnl
+dnl AX_PATH_BDB_PATH_GET_VERSION(BDB-DIR, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([AX_PATH_BDB_PATH_GET_VERSION], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_path_get_version_ok=no
+
+ # Indicate status of checking for Berkeley DB header.
+ AC_MSG_CHECKING([in $1/include for db.h])
+ ax_path_bdb_path_get_version_got_header=no
+ test -f "$1/include/db.h" && ax_path_bdb_path_get_version_got_header=yes
+ AC_MSG_RESULT([$ax_path_bdb_path_get_version_got_header])
+
+ # Indicate status of checking for Berkeley DB library.
+ AC_MSG_CHECKING([in $1/lib for library -ldb])
+
+ ax_path_bdb_path_get_version_VERSION=''
+
+ if test -d "$1/include" && test -d "$1/lib" &&
+ test "$ax_path_bdb_path_get_version_got_header" = "yes" ; then
+ dnl # save and modify environment
+ ax_path_bdb_path_get_version_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I$1/include $CPPFLAGS"
+
+ ax_path_bdb_path_get_version_save_LIBS="$LIBS"
+ LIBS="$LIBS -ldb"
+
+ ax_path_bdb_path_get_version_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L$1/lib $LDFLAGS"
+
+ # Compile and run a program that compares the version defined in
+ # the header file with a version defined in the library function
+ # db_version.
+ AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+ (void) argv;
+#ifdef DB_VERSION_MAJOR
+ int major,minor,patch;
+ db_version(&major,&minor,&patch);
+ if (argc > 1)
+ printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+ if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+ DB_VERSION_PATCH == patch)
+ return 0;
+ else
+ return 1;
+#else
+ DB *dbp = dbopen(0, 0, 0, DB_HASH, 0);
+ if(dbp) dbp->close(dbp);
+ if (argc > 1)
+ printf("1.0.0\n");
+ if (dbp)
+ return 0;
+ else
+ return 1;
+#endif
+}
+ ]])
+ ],[
+ # Program compiled and ran, so get version by adding argument.
+ ax_path_bdb_path_get_version_VERSION=`./conftest$ac_exeext x`
+ ax_path_bdb_path_get_version_ok=yes
+ ],[],[])
+
+ dnl # restore environment
+ CPPFLAGS="$ax_path_bdb_path_get_version_save_CPPFLAGS"
+ LIBS="$ax_path_bdb_path_get_version_save_LIBS"
+ LDFLAGS="$ax_path_bdb_path_get_version_save_LDFLAGS"
+ fi
+
+ dnl # Finally, execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_path_get_version_ok" = "yes" ; then
+ AC_MSG_RESULT([$ax_path_bdb_path_get_version_VERSION])
+ m4_ifvaln([$2],[$2])dnl
+ else
+ AC_MSG_RESULT([no])
+ m4_ifvaln([$3],[$3])dnl
+ fi
+]) dnl AX_PATH_BDB_PATH_GET_VERSION
+
+#############################################################################
+dnl Checks if version of library and header match specified version.
+dnl Only meant to be used by AX_PATH_BDB_ENV_GET_VERSION macro.
+dnl
+dnl Requires AX_COMPARE_VERSION macro.
+dnl
+dnl Result: sets ax_path_bdb_env_confirm_lib_ok to yes or no.
+dnl
+dnl AX_PATH_BDB_ENV_CONFIRM_LIB(VERSION, [LIBNAME])
+AC_DEFUN([AX_PATH_BDB_ENV_CONFIRM_LIB], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_env_confirm_lib_ok=no
+
+ dnl # save and modify environment to link with library LIBNAME
+ ax_path_bdb_env_confirm_lib_save_LIBS="$LIBS"
+ LIBS="$LIBS $2"
+
+ # Compile and run a program that compares the version defined in
+ # the header file with a version defined in the library function
+ # db_version.
+ AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+ (void) argv;
+#ifdef DB_VERSION_MAJOR
+ int major,minor,patch;
+ db_version(&major,&minor,&patch);
+ if (argc > 1)
+ printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+ if (DB_VERSION_MAJOR == major && DB_VERSION_MINOR == minor &&
+ DB_VERSION_PATCH == patch)
+ return 0;
+ else
+ return 1;
+#else
+ DB *dbp = dbopen(0, 0, 0, DB_HASH, 0);
+ if(dbp) dbp->close(dbp);
+ if (argc > 1)
+ printf("1.0.0\n");
+ if (dbp)
+ return 0;
+ else
+ return 1;
+#endif
+}
+ ]])
+ ],[
+ # Program compiled and ran, so get version by giving an argument,
+ # which will tell the program to print the output.
+ ax_path_bdb_env_confirm_lib_VERSION=`./conftest$ac_exeext x`
+
+ # If the versions all match up, indicate success.
+ AX_COMPARE_VERSION([$ax_path_bdb_env_confirm_lib_VERSION],[eq],[$1],[
+ ax_path_bdb_env_confirm_lib_ok=yes
+ ])
+ ],[],[])
+
+ dnl # restore environment
+ LIBS="$ax_path_bdb_env_confirm_lib_save_LIBS"
+
+]) dnl AX_PATH_BDB_ENV_CONFIRM_LIB
+
+#############################################################################
+dnl Finds the version and library name for Berkeley DB in the
+dnl current environment. Tries many different names for library.
+dnl
+dnl Requires AX_PATH_BDB_ENV_CONFIRM_LIB macro.
+dnl
+dnl Result: set ax_path_bdb_env_get_version_ok to yes or no,
+dnl set ax_path_bdb_env_get_version_VERSION to the version found,
+dnl and ax_path_bdb_env_get_version_LIBNAME to the library name.
+dnl
+dnl AX_PATH_BDB_ENV_GET_VERSION([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([AX_PATH_BDB_ENV_GET_VERSION], [
+ dnl # Used to indicate success or failure of this function.
+ ax_path_bdb_env_get_version_ok=no
+
+ ax_path_bdb_env_get_version_VERSION=''
+ ax_path_bdb_env_get_version_LIBS=''
+
+ AS_VAR_PUSHDEF([HEADER_VERSION],[ax_path_bdb_env_get_version_HEADER_VERSION])dnl
+ AS_VAR_PUSHDEF([TEST_LIBNAME],[ax_path_bdb_env_get_version_TEST_LIBNAME])dnl
+
+ # Indicate status of checking for Berkeley DB library.
+ AC_MSG_CHECKING([for db.h])
+
+ # Compile and run a program that determines the Berkeley DB version
+ # in the header file db.h.
+ HEADER_VERSION=''
+ AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <db.h>
+int main(int argc,char **argv)
+{
+ (void) argv;
+ if (argc > 1)
+#ifdef DB_VERSION_MAJOR
+ printf("%d.%d.%d\n",DB_VERSION_MAJOR,DB_VERSION_MINOR,DB_VERSION_PATCH);
+#else
+ printf("1.0.0\n");
+#endif
+ return 0;
+}
+ ]])
+ ],[
+ # Program compiled and ran, so get version by adding an argument.
+ HEADER_VERSION=`./conftest$ac_exeext x`
+ AC_MSG_RESULT([$HEADER_VERSION])
+ ],[AC_MSG_RESULT([no])],[AC_MSG_RESULT([no])])
+
+ # Have header version, so try to find corresponding library.
+ # Looks for library names in the order:
+ # nothing, db, db-X.Y, dbX.Y, dbXY, db-X, dbX
+ # and stops when it finds the first one that matches the version
+ # of the header file.
+ if test "x$HEADER_VERSION" != "x" ; then
+ AC_MSG_CHECKING([for library containing Berkeley DB $HEADER_VERSION])
+
+ AS_VAR_PUSHDEF([MAJOR],[ax_path_bdb_env_get_version_MAJOR])dnl
+ AS_VAR_PUSHDEF([MINOR],[ax_path_bdb_env_get_version_MINOR])dnl
+
+ # get major and minor version numbers
+ MAJOR=`echo $HEADER_VERSION | sed 's,\..*,,'`
+ MINOR=`echo $HEADER_VERSION | sed 's,^[[0-9]]*\.,,;s,\.[[0-9]]*$,,'`
+
+ # see if it is already specified in LIBS
+ TEST_LIBNAME=''
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "db"
+ TEST_LIBNAME='-ldb'
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "db-X.Y"
+ TEST_LIBNAME="-ldb-${MAJOR}.$MINOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "dbX.Y"
+ TEST_LIBNAME="-ldb${MAJOR}.$MINOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "dbXY"
+ TEST_LIBNAME="-ldb$MAJOR$MINOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "db-X"
+ TEST_LIBNAME="-ldb-$MAJOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "no" ; then
+ # try format "dbX"
+ TEST_LIBNAME="-ldb$MAJOR"
+ AX_PATH_BDB_ENV_CONFIRM_LIB([$HEADER_VERSION], [$TEST_LIBNAME])
+ fi
+
+ dnl # Found a valid library.
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
+ if test "x$TEST_LIBNAME" = "x" ; then
+ AC_MSG_RESULT([none required])
+ else
+ AC_MSG_RESULT([$TEST_LIBNAME])
+ fi
+ ax_path_bdb_env_get_version_VERSION="$HEADER_VERSION"
+ ax_path_bdb_env_get_version_LIBS="$TEST_LIBNAME"
+ ax_path_bdb_env_get_version_ok=yes
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+ AS_VAR_POPDEF([MAJOR])dnl
+ AS_VAR_POPDEF([MINOR])dnl
+ fi
+
+ AS_VAR_POPDEF([HEADER_VERSION])dnl
+ AS_VAR_POPDEF([TEST_LIBNAME])dnl
+
+ dnl # Execute ACTION-IF-FOUND / ACTION-IF-NOT-FOUND.
+ if test "$ax_path_bdb_env_confirm_lib_ok" = "yes" ; then
+ m4_ifvaln([$1],[$1],[:])dnl
+ m4_ifvaln([$2],[else $2])dnl
+ fi
+
+]) dnl BDB_ENV_GET_VERSION
+
+#############################################################################
diff --git a/infrastructure/m4/ax_random_device.m4 b/infrastructure/m4/ax_random_device.m4
new file mode 100644
index 00000000..ab9b56fd
--- /dev/null
+++ b/infrastructure/m4/ax_random_device.m4
@@ -0,0 +1,31 @@
+dnl @synopsis AX_RANDOM_DEVICE
+dnl
+dnl This macro will check for a random device, allowing the user to explicitly
+dnl set the path. The user uses '--with-random=FILE' as an argument to
+dnl configure.
+dnl
+dnl If A random device is found then HAVE_RANDOM_DEVICE is set to 1 and
+dnl RANDOM_DEVICE contains the path.
+dnl
+dnl @category Miscellaneous
+dnl @author Martin Ebourne
+dnl @version 2005/07/01
+dnl @license AllPermissive
+
+AC_DEFUN([AX_RANDOM_DEVICE], [
+ AC_ARG_WITH([random],
+ [AC_HELP_STRING([--with-random=FILE], [Use FILE as random number seed [auto-detected]])],
+ [RANDOM_DEVICE="$withval"],
+ [AC_CHECK_FILE("/dev/urandom", [RANDOM_DEVICE="/dev/urandom";],
+ [AC_CHECK_FILE("/dev/arandom", [RANDOM_DEVICE="/dev/arandom";],
+ [AC_CHECK_FILE("/dev/random", [RANDOM_DEVICE="/dev/random";])]
+ )])
+ ])
+ if test "x$RANDOM_DEVICE" != "x" ; then
+ AC_DEFINE([HAVE_RANDOM_DEVICE], 1,
+ [Define to 1 (and set RANDOM_DEVICE) if a random device is available])
+ AC_SUBST([RANDOM_DEVICE])
+ AC_DEFINE_UNQUOTED([RANDOM_DEVICE], ["$RANDOM_DEVICE"],
+ [Define to the filename of the random device (and set HAVE_RANDOM_DEVICE)])
+ fi
+ ])dnl
diff --git a/infrastructure/m4/ax_split_version.m4 b/infrastructure/m4/ax_split_version.m4
new file mode 100644
index 00000000..20b353df
--- /dev/null
+++ b/infrastructure/m4/ax_split_version.m4
@@ -0,0 +1,19 @@
+dnl @synopsis AX_SPLIT_VERSION(DEFINE, VERSION)
+dnl
+dnl Splits a version number in the format MAJOR.MINOR.POINT into it's
+dnl separate components and AC_DEFINES <DEFINE>_MAJOR etc with the values.
+dnl
+dnl @category Automake
+dnl @author Martin Ebourne <martin@zepler.org>
+dnl @version
+dnl @license AllPermissive
+
+AC_DEFUN([AX_SPLIT_VERSION],[
+ ax_major_version=`echo "$2" | sed 's/\([[^.]][[^.]]*\).*/\1/'`
+ ax_minor_version=`echo "$2" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
+ ax_point_version=`echo "$2" | sed 's/[[^.]][[^.]]*.[[^.]][[^.]]*.\(.*\)/\1/'`
+
+ AC_DEFINE_UNQUOTED([$1_MAJOR], [$ax_major_version], [Define to major version for $1])
+ AC_DEFINE_UNQUOTED([$1_MINOR], [$ax_minor_version], [Define to minor version for $1])
+ AC_DEFINE_UNQUOTED([$1_POINT], [$ax_point_version], [Define to point version for $1])
+])
diff --git a/infrastructure/m4/vl_lib_readline.m4 b/infrastructure/m4/vl_lib_readline.m4
new file mode 100644
index 00000000..a0571bfa
--- /dev/null
+++ b/infrastructure/m4/vl_lib_readline.m4
@@ -0,0 +1,135 @@
+dnl @synopsis VL_LIB_READLINE([ACTION-IF-TRUE], [ACTION-IF-FALSE])
+dnl
+dnl Searches for a readline compatible library. If found, defines
+dnl `HAVE_LIBREADLINE'. If the found library has the `add_history'
+dnl function, sets also `HAVE_READLINE_HISTORY'. Also checks for the
+dnl locations of the necessary include files and sets `HAVE_READLINE_H'
+dnl or `HAVE_READLINE_READLINE_H' and `HAVE_READLINE_HISTORY_H' or
+dnl 'HAVE_HISTORY_H' if the corresponding include files exists.
+dnl
+dnl The libraries that may be readline compatible are `libedit',
+dnl `libeditline' and `libreadline'. Sometimes we need to link a
+dnl termcap library for readline to work, this macro tests these cases
+dnl too by trying to link with `libtermcap', `libcurses' or
+dnl `libncurses' before giving up.
+dnl
+dnl Here is an example of how to use the information provided by this
+dnl macro to perform the necessary includes or declarations in a C
+dnl file:
+dnl
+dnl #ifdef HAVE_LIBREADLINE
+dnl # if defined(HAVE_READLINE_READLINE_H)
+dnl # include <readline/readline.h>
+dnl # elif defined(HAVE_READLINE_H)
+dnl # include <readline.h>
+dnl # else /* !defined(HAVE_READLINE_H) */
+dnl extern char *readline ();
+dnl # endif /* !defined(HAVE_READLINE_H) */
+dnl char *cmdline = NULL;
+dnl #else /* !defined(HAVE_READLINE_READLINE_H) */
+dnl /* no readline */
+dnl #endif /* HAVE_LIBREADLINE */
+dnl
+dnl #ifdef HAVE_READLINE_HISTORY
+dnl # if defined(HAVE_READLINE_HISTORY_H)
+dnl # include <readline/history.h>
+dnl # elif defined(HAVE_HISTORY_H)
+dnl # include <history.h>
+dnl # else /* !defined(HAVE_HISTORY_H) */
+dnl extern void add_history ();
+dnl extern int write_history ();
+dnl extern int read_history ();
+dnl # endif /* defined(HAVE_READLINE_HISTORY_H) */
+dnl /* no history */
+dnl #endif /* HAVE_READLINE_HISTORY */
+dnl
+dnl Modifications to add --enable-gnu-readline to work around licensing
+dnl problems between the traditional BSD licence and the GPL.
+dnl Martin Ebourne, 2005/7/11
+dnl Rewrite to match headers with libraries and be more selective.
+dnl Martin Ebourne, 2006/1/4
+dnl
+dnl @category InstalledPackages
+dnl @author Ville Laurikari <vl@iki.fi>
+dnl @version 2002-04-04
+dnl @license AllPermissive
+
+AC_DEFUN([VL_LIB_READLINE], [
+ AC_ARG_ENABLE(
+ [gnu-readline],
+ AC_HELP_STRING([--enable-gnu-readline],
+ [Use GNU readline if present (may violate GNU licence)])
+ )
+ vl_cv_lib_readline_compat_found=no
+ if test "x$enable_gnu_readline" = "xyes"; then
+ VL_LIB_READLINE_CHECK([readline],
+ [readline],
+ [readline/readline.h readline.h],
+ [readline/history.h history.h])
+ fi
+ if test "x$vl_cv_lib_readline_compat_found" = "xno"; then
+ VL_LIB_READLINE_CHECK([editline],
+ [edit editline],
+ [editline/readline.h],
+ [editline/readline.h])
+ fi
+ if test "x$vl_cv_lib_readline_compat_found" = "xyes"; then
+ m4_ifvaln([$1],[$1],[:])dnl
+ m4_ifvaln([$2],[else $2])dnl
+ fi
+])
+
+dnl VL_LIB_READLINE_CHECK(name, libraries, headers, history headers)
+AC_DEFUN([VL_LIB_READLINE_CHECK], [
+ AC_CACHE_CHECK([for $1 library],
+ [vl_cv_lib_$1], [
+ ORIG_LIBS="$LIBS"
+ vl_cv_lib_$1=""
+ for readline_lib in $2; do
+ for termcap_lib in "" termcap curses ncurses; do
+ if test -z "$termcap_lib"; then
+ TRY_LIB="-l$readline_lib"
+ else
+ TRY_LIB="-l$readline_lib -l$termcap_lib"
+ fi
+ LIBS="$ORIG_LIBS $TRY_LIB"
+ AC_TRY_LINK_FUNC([readline], [vl_cv_lib_$1="$TRY_LIB"])
+ if test -n "$vl_cv_lib_$1"; then
+ break
+ fi
+ done
+ if test -n "$vl_cv_lib_$1"; then
+ break
+ fi
+ done
+ if test -z "$vl_cv_lib_$1"; then
+ vl_cv_lib_$1=no
+ LIBS="$ORIG_LIBS"
+ fi
+ ])
+
+ vl_cv_lib_readline_compat_found=no
+ if test "x$vl_cv_lib_$1" != "xno"; then
+ AC_CHECK_HEADERS([$3], [vl_cv_lib_readline_compat_found=yes])
+ fi
+
+ if test "x$vl_cv_lib_readline_compat_found" = "xyes"; then
+ AC_DEFINE([HAVE_LIBREADLINE], 1,
+ [Define if you have a readline compatible library])
+
+ AC_CACHE_CHECK([whether $1 supports history],
+ [vl_cv_lib_$1_history], [
+ vl_cv_lib_$1_history=no
+ AC_TRY_LINK_FUNC([add_history], [vl_cv_lib_$1_history=yes])
+ ])
+ if test "x$vl_cv_lib_$1_history" = "xyes"; then
+ vl_cv_lib_$1_history=no
+ AC_CHECK_HEADERS(
+ [$4],
+ [AC_DEFINE([HAVE_READLINE_HISTORY], [1],
+ [Define if your readline library has add_history])])
+ fi
+ else
+ LIBS="$ORIG_LIBS"
+ fi
+])dnl
diff --git a/infrastructure/makebuildenv.pl.in b/infrastructure/makebuildenv.pl.in
new file mode 100755
index 00000000..33b0b635
--- /dev/null
+++ b/infrastructure/makebuildenv.pl.in
@@ -0,0 +1,973 @@
+#!@PERL@
+use strict;
+use Symbol;
+
+my @modules;
+my %module_dependency;
+my %module_library_link_opts;
+my %header_dependency;
+
+$|=1;
+
+
+# note: Mac OS X resource forks and .DS_Store files are explicity ignored
+
+print "Box build environment setup.\n";
+
+my @implicit_deps = ('lib/common');
+
+# work out platform variables
+use lib 'infrastructure';
+use BoxPlatform;
+
+print "Building on '$build_os'.\n\n";
+
+# keep copy of command line args
+my $makebuildenv_args = join(' ',@ARGV);
+
+# do command line arguments
+my $compile_line_extra = $platform_compile_line_extra;
+my $link_line_extra = $platform_link_line_extra;
+
+# make sure local files directory exists
+unless(-d 'local')
+{
+ mkdir 'local',0755;
+}
+
+
+# flags about the environment
+my %env_flags;
+
+$module_dependency{"lib/common"} = ["lib/win32"];
+push @implicit_deps, "lib/win32";
+
+# print "Flag: $_\n" for(keys %env_flags);
+
+# seed autogen code
+print "Seeding autogen code...\n";
+open FINDAUTOGEN,"find . -follow -name Makefile.extra |" or die "Can't use find for locating files";
+while(<FINDAUTOGEN>)
+{
+ chomp;
+ my $file = $_;
+ $file =~ m~\A(.+)/[^/]+\Z~;
+ my $dir = $1;
+ open FL,$file or die "Can't open $_ for reading";
+ my %vars;
+ $vars{_PERL} = "@PERL@";
+ my $do_cmds = 0;
+ while(<FL>)
+ {
+ chomp;
+ if(m/\A(.+)\s+=\s+(.+)\Z/)
+ {
+ # is a variable
+ $vars{$1} = $2;
+ next;
+ }
+ next unless m/\S/;
+ if(m/AUTOGEN SEEDING/)
+ {
+ $do_cmds = 1;
+ }
+ elsif(m/\A\S/)
+ {
+ $do_cmds = 0 if $do_cmds == 2;
+ }
+ else
+ {
+ # command, run it?
+ if($do_cmds)
+ {
+ $do_cmds = 2; # flag something has been done
+
+ # subsitute variables, repeatedly
+ my $c = $_;
+ $c =~ s/\A\s+//;
+ while(1)
+ {
+ my $did_subst = 0;
+
+ for my $k (keys %vars)
+ {
+ $did_subst = 1 if $c =~ s/\$\($k\)/$vars{$k}/g;
+ }
+
+ last unless $did_subst;
+ }
+
+ # run command
+ unless (0 == system("(cd $dir; $c)"))
+ {
+ die "Couldn't run command $c " .
+ "(in $dir) for $file";
+ }
+ }
+ }
+ }
+ close FL;
+}
+close FINDAUTOGEN;
+print "done\n\n";
+
+
+# open test mail program template file
+my $test_template_file = 'infrastructure/buildenv-testmain-template.cpp';
+open FL,$test_template_file or die "Can't open test template file\n";
+my $test_template;
+read FL,$test_template,-s $test_template_file;
+close FL;
+
+
+# extra platform defines
+my $extra_platform_defines = '';
+
+# read in module definitions file, and any files it includes
+my @modules_files;
+sub read_modules_file
+{
+ my ($mf) = @_;
+ my $f = gensym;
+ open $f,$mf or die "Can't open modules file '$mf'\n";
+ while(<$f>)
+ {
+ if(m/\AINCLUDE\s+(\S+)\Z/)
+ {
+ # include another file
+ read_modules_file($1)
+ }
+ else
+ {
+ push @modules_files,$_
+ }
+ }
+ close $f;
+}
+read_modules_file('modules.txt');
+
+# prepare directories...
+mkdir "release",0755;
+mkdir "debug",0755;
+
+# is the library code in another directory?
+my $external_lib = readlink('lib');
+if($external_lib ne '')
+{
+ # adjust to root of the library distribution
+ $external_lib =~ s!/lib\Z!!;
+ $external_lib = '../'.$external_lib;
+ # make symlinks
+ make_obj_symlink('debug');
+ make_obj_symlink('release');
+}
+sub make_obj_symlink
+{
+ my $m = $_[0];
+ my $target = $external_lib."/$m/lib/";
+ my $link = "$m/lib";
+ # check link
+ if(-e $link)
+ {
+ if(-l $link)
+ {
+ if(readlink($link) ne $target)
+ {
+ print "Warning: replacing $link with new link to $target\n";
+ unlink $link;
+ }
+ }
+ else
+ {
+ die "$link already exists, but it isn't a symbolic link"
+ }
+ }
+ if(!-e $link)
+ {
+ symlink $target,$link or die "Can't make $m/lib symlink";
+ }
+}
+
+print "Scanning code...\n";
+
+my $modules_omitted = 0;
+my $modules_omitting = 0;
+
+# process lines in flattened modules files
+for(@modules_files)
+{
+ # clean up line
+ chomp; s/\A\s+//; s/#.*\Z//; s/\s+\Z//; s/\s+/ /g;
+ next unless m/\S/;
+
+ # omit bits on some platforms?
+ if(m/\AEND-OMIT/)
+ {
+ $modules_omitting = 0;
+ next;
+ }
+
+ next if $modules_omitting;
+
+ if(m/\AOMIT:(.+)/)
+ {
+ if($1 eq $build_os or $1 eq $target_os)
+ {
+ $modules_omitted = 1;
+ $modules_omitting = 1;
+ }
+ next;
+ }
+
+ # split up...
+ my ($mod, @deps_i) = split / /;
+
+ # ignore this module?
+ next if ignore_module($mod);
+
+ # deps for this platform
+ my @deps;
+ for(@deps_i)
+ {
+ my ($dep,$exclude_from) = split /!/;
+ # generic library translation
+ $dep = $env_flags{'LIBTRANS_'.$dep} if exists($env_flags{'LIBTRANS_'.$dep});
+ next if $dep eq '';
+ if($exclude_from =~ m/\A\+(.+)\Z/)
+ {
+ $exclude_from = $1;
+ my $inc = 0;
+ for(split /,/,$exclude_from)
+ {
+ $inc = 1 if $_ eq $build_os
+ }
+ push @deps,$dep if $inc
+ }
+ else
+ {
+ my $inc = 1;
+ for(split /,/,$exclude_from)
+ {
+ $inc = 0 if $_ eq $build_os
+ }
+ push @deps,$dep if $inc
+ }
+ }
+
+ # check directory exists
+ die "Module $mod can't be found\n" unless -d $mod;
+
+ # and put in lists
+ push @modules,$mod;
+ my @md; # module dependencies
+ my @lo; # link line options
+ for(@deps)
+ {
+ if(/\A-l/)
+ {
+ push @lo,$_
+ }
+ else
+ {
+ push @md,$_ unless ignore_module($_)
+ }
+ }
+ $module_dependency{$mod} = [@implicit_deps,@md];
+ $module_library_link_opts{$mod} = [@lo];
+
+ # make directories, but not if we're using an external library and this a library module
+ my ($s,$d) = split /\//,$mod;
+ if($s ne 'lib' || $external_lib eq '')
+ {
+ mkdir "release/$s",0755;
+ mkdir "release/$s/$d",0755;
+ mkdir "debug/$s",0755;
+ mkdir "debug/$s/$d",0755;
+ }
+}
+
+# make dirs for implicit dep
+foreach my $dep (@implicit_deps)
+{
+ mkdir "release/$dep",0755;
+ mkdir "debug/$dep",0755;
+}
+
+# write a list of all the modules we've configured to use
+open CONFIGURED_MODS,'>local/modules.h' or die "Can't write configured modules list";
+print CONFIGURED_MODS <<__E;
+// automatically generated file, do not edit
+#ifndef _CONFIGURED_MODULES__H
+#define _CONFIGURED_MODULES__H
+__E
+for(@implicit_deps,@modules)
+{
+ my $m = $_;
+ $m =~ s~/~_~;
+ print CONFIGURED_MODS "#define MODULE_$m\n";
+}
+print CONFIGURED_MODS <<__E;
+#endif // _CONFIGURED_MODULES__H
+__E
+close CONFIGURED_MODS;
+
+
+# now make a list of all the .h files we can find, recording which module they're in
+my %hfiles;
+for my $mod (@modules, @implicit_deps)
+{
+ opendir DIR,$mod;
+ my @items = readdir DIR;
+ closedir DIR;
+
+ # add in items from autogen directories, and create output directories
+ {
+ my @autogen_items;
+
+ for my $di (@items)
+ {
+ if($di =~ m/\Aautogen/ && -d "$mod/$di")
+ {
+ # Read items
+ my $d = "$mod/$di";
+ opendir DIR,$d;
+ my @i = readdir DIR;
+ closedir DIR;
+ for(@i)
+ {
+ next if m/\A\./;
+ push @autogen_items,"$di/$_"
+ }
+ }
+ }
+ @items = (@items, @autogen_items);
+ }
+
+ for(grep /\.h\Z/i, @items)
+ {
+ next if /\A\._/; # Temp Mac OS Resource hack
+ die "Header file $_ already used in module ".$hfiles{$_}."\n" if exists $hfiles{$_};
+ $hfiles{$_} = $mod
+ }
+}
+
+for my $mod (@modules, @implicit_deps)
+{
+ opendir DIR,$mod;
+ for my $h (grep /\.h\Z/i, readdir DIR)
+ {
+ next if $h =~ /\A\./; # Ignore Mac resource forks, autosaves, etc
+
+ open FL,"$mod/$h" or die "can't open $mod/$h";
+ my $f;
+ read FL,$f,-s "$mod/$h";
+ close FL;
+
+ while($f =~ m/\#include\s+"([^"]+?)"/g)
+ {
+ my $i = $1;
+ # ignore autogen exceptions
+ next if $i =~ m/\Aautogen_.+?Exception.h\Z/;
+ # record dependency
+ ${$header_dependency{$h}}{$i} = 1 if exists $hfiles{$i};
+ }
+ }
+ closedir DIR;
+}
+
+print "done\n\nGenerating Makefiles...\n";
+
+my %module_resources_win32;
+
+# Then write a makefile for each module
+for my $mod (@implicit_deps, @modules)
+{
+ print $mod,"\n";
+
+ my ($type,$name) = split /\//,$mod;
+
+ # add additional files for tests
+ if($type eq 'test')
+ {
+ my $testmain = $test_template;
+ $testmain =~ s/TEST_NAME/$name/g;
+ open TESTMAIN,">$mod/_main.cpp" or die "Can't open test main file for $mod for writing\n";
+ print TESTMAIN $testmain;
+ close TESTMAIN;
+
+ # test file...
+ sub writetestfile
+ {
+ my ($filename,$runcmd,$module) = @_;
+
+ open TESTFILE,">$filename" or die "Can't open " .
+ "test script file for $module for writing\n";
+ print TESTFILE "#!/bin/sh\necho TEST: $module\n";
+
+ if ($target_windows)
+ {
+ print TESTFILE <<__E;
+kill_process()
+{
+ if test -r testfiles/\$1.pid; then
+ /bin/kill -0 -f `cat testfiles/\$1.pid` \\
+ && /bin/kill -f `cat testfiles/\$1.pid`
+ rm testfiles/\$1.pid
+ fi
+}
+__E
+ }
+ else
+ {
+ print TESTFILE <<__E;
+kill_process()
+{
+ test -r testfiles/\$1.pid \\
+ && kill -0 `cat testfiles/\$1.pid` \\
+ && kill `cat testfiles/\$1.pid`
+}
+__E
+ }
+
+ if (-d "$module/testfiles")
+ {
+ print TESTFILE <<__E;
+kill_daemons()
+{
+ kill_process bbackupd
+ kill_process bbstored
+ kill_process httpserver
+ kill_process s3simulator
+}
+
+echo Killing any running daemons...
+kill_daemons
+__E
+ }
+
+ print TESTFILE <<__E;
+echo Removing old test files...
+chmod -R a+rwx testfiles
+rm -rf testfiles
+
+echo Copying new test files...
+cp -p -R ../../../$module/testfiles .
+
+__E
+
+ if (-e "$module/testextra")
+ {
+ open FL,"$module/testextra" or die
+ "Can't open $module/testextra";
+ while(<FL>) {print TESTFILE}
+ close FL;
+ }
+
+ print TESTFILE "$runcmd\n";
+
+ if (-d "$module/testfiles")
+ {
+ print TESTFILE <<__E;
+kill_daemons
+__E
+ }
+
+ close TESTFILE;
+ }
+
+ writetestfile("$mod/_t", "GLIBCXX_FORCE_NEW=1 ".
+ './test' . $platform_exe_ext . ' "$@"', $mod);
+ writetestfile("$mod/_t-gdb", "GLIBCXX_FORCE_NEW=1 ".
+ 'gdb ./test' . $platform_exe_ext . ' "$@"', $mod);
+
+ }
+
+ my @all_deps_for_module;
+ {
+ # work out what dependencies need to be run
+ my @deps_raw;
+ sub add_mod_deps
+ {
+ my ($arr_r,$nm) = @_;
+ if($#{$module_dependency{$nm}} >= 0)
+ {
+ push @$arr_r,@{$module_dependency{$nm}};
+ for(@{$module_dependency{$nm}})
+ {
+ add_mod_deps($arr_r,$_)
+ }
+ }
+ }
+ add_mod_deps(\@deps_raw, $mod);
+ # and then dedup and reorder them
+ my %d_done;
+ foreach my $dep (reverse @deps_raw)
+ {
+ if(!exists $d_done{$dep})
+ {
+ # insert
+ push @all_deps_for_module, $dep;
+ # mark as done
+ $d_done{$dep} = 1;
+ }
+ }
+ }
+
+
+ # make include path
+ my $include_paths = join(' ',map {'-I../../'.$_} @all_deps_for_module);
+
+ # is target a library?
+ my $target_is_library = ($type ne 'bin' && $type ne 'test');
+
+ # make target name
+ my $end_target = $name;
+
+ if ($target_is_library)
+ {
+ $end_target .= '.a';
+ }
+ else
+ {
+ $end_target .= $platform_exe_ext;
+ }
+
+ $end_target = 'test'.$platform_exe_ext if $type eq 'test';
+
+ # adjust for outdir
+ $end_target = '$(OUTDIR)/' . $end_target;
+
+ # start the makefile
+ my $mk_name_extra = ($bsd_make)?'':'X';
+ open MAKE,">$mod/Makefile".$mk_name_extra or die "Can't open Makefile for $mod\n";
+ my $debug_link_extra = ($target_is_library)?'':'../../debug/lib/debug/debug.a';
+
+ my $default_cxxflags = '@CXXFLAGS@';
+ $default_cxxflags =~ s/ -O2//g;
+
+ my $release_flags = "-O2";
+ if ($target_windows)
+ {
+ $release_flags = "-O0 -g";
+ }
+
+ print MAKE <<__E;
+#
+# AUTOMATICALLY GENERATED FILE
+# do not edit!
+#
+#
+CXX = @CXX@
+AR = @AR@
+RANLIB = @RANLIB@
+PERL = @PERL@
+WINDRES = @WINDRES@
+
+DEFAULT_CXXFLAGS = @CPPFLAGS@ $default_cxxflags @CXXFLAGS_STRICT@ \\
+ $include_paths $extra_platform_defines \\
+ -DBOX_VERSION="\\"$product_version\\""
+LDFLAGS = @LDFLAGS@ @LDADD_RDYNAMIC@
+
+.ifdef RELEASE
+CXXFLAGS = -DBOX_RELEASE_BUILD $release_flags \$(DEFAULT_CXXFLAGS)
+OUTBASE = ../../release
+OUTDIR = ../../release/$mod
+DEPENDMAKEFLAGS = -D RELEASE
+VARIENT = RELEASE
+.else
+CXXFLAGS = -g \$(DEFAULT_CXXFLAGS)
+OUTBASE = ../../debug
+OUTDIR = ../../debug/$mod
+DEPENDMAKEFLAGS =
+VARIENT = DEBUG
+.endif
+
+__E
+
+ if ($bsd_make)
+ {
+ print MAKE <<__E;
+.ifdef V
+HIDE =
+_CXX = \$(CXX)
+_LINK = \$(CXX)
+_WINDRES = \$(WINDRES)
+_AR = \$(AR)
+_RANLIB = \$(RANLIB)
+_PERL = \$(PERL)
+.else
+HIDE = @
+_CXX = @ echo " [CXX] " \$(*F) && \$(CXX)
+_LINK = @ echo " [LINK] " \$(*F) && \$(CXX)
+_WINDRES = @ echo " [WINDRES]" \$(*F) && \$(WINDRES)
+_AR = @ echo " [AR] " \$(*F) && \$(AR)
+_RANLIB = @ echo " [RANLIB] " \$(*F) && \$(RANLIB)
+_PERL = @ echo " [PERL] " \$(*F) && \$(PERL) >/dev/null
+.endif
+
+__E
+ }
+ else
+ {
+ print MAKE <<__E;
+HIDE = \$(if \$(V),,@)
+_CXX = \$(if \$(V),\$(CXX), @ echo " [CXX] \$<" && \$(CXX))
+_LINK = \$(if \$(V),\$(CXX), @ echo " [LINK] \$@" && \$(CXX))
+_WINDRES = \$(if \$(V),\$(WINDRES), @ echo " [WINDRES] \$<" && \$(WINDRES))
+_AR = \$(if \$(V),\$(AR), @ echo " [AR] \$@" && \$(AR))
+_RANLIB = \$(if \$(V),\$(RANLIB), @ echo " [RANLIB] \$@" && \$(RANLIB))
+_PERL = \$(if \$(V),\$(PERL), @ echo " [PERL] \$@" && \$(PERL) >/dev/null)
+
+__E
+ }
+
+ # read directory
+ opendir DIR,$mod;
+ my @items = readdir DIR;
+ closedir DIR;
+
+ # add in items from autogen directories, and create output directories
+ {
+ my @autogen_items;
+ for my $di (@items)
+ {
+ if($di =~ m/\Aautogen/ && -d "$mod/$di")
+ {
+ # Read items
+ my $d = "$mod/$di";
+ opendir DIR,$d;
+ my @i = readdir DIR;
+ closedir DIR;
+ for(@i)
+ {
+ next if m/\A\./;
+ push @autogen_items,"$di/$_"
+ }
+
+ # output directories
+ mkdir "release/$mod/$di",0755;
+ mkdir "debug/$mod/$di",0755;
+ }
+ }
+ @items = (@items, @autogen_items);
+ }
+
+ # first, obtain a list of dependencies within the .h files
+ my %headers;
+ for my $h (grep /\.h\Z/i, @items)
+ {
+ open FL,"$mod/$h";
+ my $f;
+ read FL,$f,-s "$mod/$h";
+ close FL;
+
+ while($f =~ m/\#include\s+"([^"]+?)"/g)
+ {
+ ${$headers{$h}}{$1} = 1 if exists $hfiles{$1};
+ }
+ }
+
+ # ready for the rest of the details...
+ my $make;
+
+ # then... do the cpp files...
+ my @obj_base;
+ for my $file (@items)
+ {
+ my $is_cpp = $file =~ m/\A(.+)\.cpp\Z/i;
+ my $is_rc = $file =~ m/\A(.+)\.rc\Z/i;
+ my $base = $1;
+
+ if ($target_windows)
+ {
+ next if not $is_cpp and not $is_rc;
+ }
+ else
+ {
+ next if not $is_cpp;
+ }
+
+ next if $file =~ /\A\._/; # Temp Mac OS Resource hack
+
+ # store for later
+ push @obj_base,$base;
+
+ # get the file...
+ open FL,"$mod/$file";
+ my $f;
+ read FL,$f,-s "$mod/$file";
+ close FL;
+
+ my %dep;
+
+ while($f =~ m/\#include\s+"([^"]+?)"/g)
+ {
+ insert_dep($1, \%dep) if exists $hfiles{$1};
+ }
+
+ # output filename
+ my $out_name = '$(OUTDIR)/'.$base.'.o';
+
+ # write the line for this cpp file
+ my @dep_paths = map
+ {
+ ($hfiles{$_} eq $mod)
+ ? $_
+ : '../../'.$hfiles{$_}."/$_"
+ }
+ keys %dep;
+
+ $make .= $out_name.': '.join(' ',$file,@dep_paths)."\n";
+
+ if ($is_cpp)
+ {
+ $make .= "\t\$(_CXX) \$(CXXFLAGS) $compile_line_extra ".
+ "-DBOX_MODULE=\"\\\"$mod\\\"\" " .
+ "-c $file -o $out_name\n\n";
+ }
+ elsif ($is_rc)
+ {
+ $make .= "\t\$(_WINDRES) $file $out_name\n\n";
+ my $res_list = $module_resources_win32{$mod};
+ $res_list ||= [];
+ push @$res_list, $base.'.o';
+ $module_resources_win32{$mod} = $res_list;
+ }
+ }
+
+ my $has_deps = ($#{$module_dependency{$mod}} >= 0);
+# ----- # always has dependencies with debug library
+ $has_deps = 1;
+ $has_deps = 0 if $target_is_library;
+
+ # Depenency stuff
+ my $deps_makeinfo;
+ if($has_deps)
+ {
+ if($bsd_make)
+ {
+ $deps_makeinfo = <<'__E';
+.BEGIN::
+.ifndef NODEPS
+. if $(.TARGETS) == ""
+__E
+ }
+ else
+ {
+ # gnu make
+ $deps_makeinfo = <<'__E';
+.PHONY: dep_modules
+dep_modules:
+ifndef NODEPS
+ifeq ($(strip $(.TARGETS)),)
+__E
+ }
+
+ # run make for things we require
+ for my $dep (@all_deps_for_module)
+ {
+ $deps_makeinfo .= "\t\t\$(HIDE) (cd ../../$dep; \$(MAKE)$sub_make_options -q \$(DEPENDMAKEFLAGS) -D NODEPS || \$(MAKE)$sub_make_options \$(DEPENDMAKEFLAGS) -D NODEPS)\n";
+ }
+
+ $deps_makeinfo .= ".\tendif\n.endif\n\n";
+ }
+ print MAKE $deps_makeinfo if $bsd_make;
+
+ # get the list of library things to add -- in order of dependency so things link properly
+ my $lib_files = join(' ',map {($_ =~ m/lib\/(.+)\Z/)?('$(OUTBASE)/'.$_.'/'.$1.'.a'):undef} (reverse(@all_deps_for_module)));
+
+ # need to see if the extra makefile fragments require extra object files
+ # or include any more makefiles
+ my @objs = @obj_base;
+ my @makefile_includes;
+
+ additional_objects_from_make_fragment("$mod/Makefile.extra", \@objs, \@makefile_includes);
+ additional_objects_from_make_fragment("$mod/Makefile.extra.$build_os", \@objs, \@makefile_includes);
+
+ my $o_file_list = join(' ',map {'$(OUTDIR)/'.$_.'.o'} sort @objs);
+
+ if ($has_deps and not $bsd_make)
+ {
+ print MAKE ".PHONY: all\n" .
+ "all: dep_modules $end_target\n\n";
+ }
+
+ print MAKE $end_target,': ',$o_file_list;
+ print MAKE " ",$lib_files unless $target_is_library;
+ print MAKE "\n";
+
+ if ($target_windows)
+ {
+ foreach my $dep (@all_deps_for_module)
+ {
+ my $res_list = $module_resources_win32{$dep};
+ next unless $res_list;
+ $o_file_list .= ' '.join(' ',
+ map {'$(OUTBASE)/'.$dep."/$_"} @$res_list);
+ }
+ }
+
+ # stuff to make the final target...
+ if($target_is_library)
+ {
+ # make a library archive...
+ print MAKE "\t\$(HIDE) (echo -n > $end_target; rm $end_target)\n";
+ print MAKE "\t\$(_AR) cq $end_target $o_file_list\n";
+ print MAKE "\t\$(_RANLIB) $end_target\n";
+ }
+ else
+ {
+ # work out library options
+ # need to be... least used first, in absolute order they appear in the modules.txt file
+ my @libops;
+ sub libops_fill
+ {
+ my ($m,$r) = @_;
+ push @$r,$_ for(@{$module_library_link_opts{$m}});
+ libops_fill($_,$r) for(@{$module_dependency{$m}});
+ }
+ libops_fill($mod,\@libops);
+ my $lo = '';
+ my %ldone;
+ for(@libops)
+ {
+ next if exists $ldone{$_};
+ $lo .= ' '.$_;
+ $ldone{$_} = 1;
+ }
+
+ # link line...
+ print MAKE "\t\$(_LINK) \$(LDFLAGS) $link_line_extra " .
+ "-o $end_target $o_file_list " .
+ "$lib_files$lo $platform_lib_files\n";
+ }
+ # tests need to copy the test file over
+ if($type eq 'test')
+ {
+ print MAKE "\tcp _t \$(OUTDIR)/t\n\tchmod u+x \$(OUTDIR)/t\n";
+ print MAKE "\tcp _t-gdb \$(OUTDIR)/t-gdb\n\tchmod u+x \$(OUTDIR)/t-gdb\n";
+ }
+ # dependency line?
+ print MAKE "\n";
+
+ # module dependencies for GNU make?
+ print MAKE $deps_makeinfo if !$bsd_make;
+
+ # print the rest of the file
+ print MAKE $make,"\n";
+
+ # and a clean target
+ print MAKE <<EOF;
+clean:
+ -rm -rf \$(OUTDIR)/*
+. ifndef SUBCLEAN
+EOF
+ for my $dep (@all_deps_for_module)
+ {
+ print MAKE "\t\$(HIDE) (cd ../../$dep; \$(MAKE) \$(DEPENDMAKEFLAGS) -D SUBCLEAN clean)\n";
+ }
+ print MAKE ".\tendif\n";
+
+ # include any extra stuff
+ print MAKE "\n\n";
+ if(-e "$mod/Makefile.extra")
+ {
+ print MAKE ".include <Makefile.extra>\n\n";
+ }
+ if(-e "$mod/Makefile.extra.$build_os")
+ {
+ print MAKE ".include <Makefile.extra.$build_os>\n\n";
+ }
+ for(@makefile_includes)
+ {
+ print MAKE ".include <$_>\n\n";
+ }
+
+ # and finally a target for rebuilding the build system
+ print MAKE "\nbuildsystem:\n\t(cd ../..; perl ./infrastructure/makebuildenv.pl $makebuildenv_args)\n\n";
+
+ close MAKE;
+
+ if(!$bsd_make)
+ {
+ # need to post process this into a GNU makefile
+ open MAKE,">$mod/Makefile";
+ open MAKEB,"$mod/MakefileX";
+
+ while(<MAKEB>)
+ {
+ s/\A\.\s*(ifdef|else|endif|ifndef)/$1/;
+ s/\A\.\s*include\s+<(.+?)>/include $1/;
+ s/-D\s+(\w+)/$1=1/g;
+ print MAKE;
+ }
+
+ close MAKEB;
+ close MAKE;
+ unlink "$mod/MakefileX";
+ }
+}
+
+print "\nType 'cd <module_dir>; $make_command' to build a module\n\n";
+
+if($modules_omitted)
+{
+ print "\nNOTE: Some modules have been omitted on this platform\n\n"
+}
+
+sub insert_dep
+{
+ my ($h,$dep_r) = @_;
+
+ # stop random recusion
+ return if exists $$dep_r{$h};
+
+ # insert more depencies
+ insert_dep($_,$dep_r) for keys %{$header_dependency{$h}};
+
+ # mark this one as a dependency
+ $$dep_r{$h} = 1;
+}
+
+
+sub additional_objects_from_make_fragment
+{
+ my ($fn,$objs_r,$include_r) = @_;
+
+ if(-e $fn)
+ {
+ open FL,$fn or die "Can't open $fn";
+
+ while(<FL>)
+ {
+ chomp;
+ if(m/link-extra:\s*(.+)\Z/)
+ {
+ my $extra = $1;
+ do
+ {
+ my @o = split /\s+/, $extra;
+ for(@o)
+ {
+ push @$objs_r,$1 if m/\A(.+)\.o\Z/;
+ }
+ last unless $extra =~ m'\\$';
+ $extra = <FL>;
+ }
+ while(1);
+ }
+ elsif(m/include-makefile:\s*(\S+)/)
+ {
+ push @$include_r,$1
+ }
+ }
+
+ close FL;
+ }
+}
+
+
+sub ignore_module
+{
+ exists $env_flags{'IGNORE_'.$_[0]}
+}
diff --git a/infrastructure/makedistribution.pl.in b/infrastructure/makedistribution.pl.in
new file mode 100755
index 00000000..0ccd92be
--- /dev/null
+++ b/infrastructure/makedistribution.pl.in
@@ -0,0 +1,363 @@
+#!@PERL@
+
+use strict;
+use Symbol;
+
+# comment string for various endings
+my %comment_chars = ('cpp' => '// ', 'h' => '// ', 'pl' => '# ', 'pm' => '# ', '' => '# ');
+
+# other extensions which need text copying, just to remove the private stuff
+# .in is included here, as these could be any kind of source, but clearly
+# they have text substitutions run on them by autoconf, so we can too :)
+my %text_files = ('txt' => 1, 'spec' => 1, 'in' => 1);
+
+# files which don't get the license added
+# my %file_license = (); # 'filename' => 'GPL', 'DUAL' or 'none'
+
+# ----------------------------------------------
+
+# filled in from the manifest file
+# my %dir_license = (); # 'dir' => 'GPL', 'DUAL' or 'none'
+#
+# most recently specified LICENSE become default until overridden
+my $current_license; # 'GPL', 'DUAL' or 'none'
+
+# distribution name
+my $distribution = $ARGV[0];
+die "No distribution name specified on the command line" if $distribution eq '';
+my $dist_root = "distribution/$distribution";
+
+# check distribution exists
+die "Distribution '$distribution' does not exist" unless -d $dist_root;
+
+# get version
+open VERSION,"$dist_root/VERSION.txt" or die "Can't open $dist_root/VERSION.txt";
+my $version = <VERSION>;
+chomp $version;
+my $archive_name = <VERSION>;
+chomp $archive_name;
+close VERSION;
+
+# consistency check
+die "Archive name '$archive_name' is not equal to the distribution name '$distribution'"
+ unless $archive_name eq $distribution;
+
+my $svnversion = `svnversion .`;
+chomp $svnversion;
+$svnversion =~ tr/0-9A-Za-z/_/c;
+
+if($version =~ /USE_SVN_VERSION/)
+{
+ # for developers, use SVN version
+ open INFO,'svn info . |';
+ my $svnurl;
+ while(<INFO>)
+ {
+ if(m/^URL: (.+?)[\n\r]+/)
+ {
+ $svnurl = $1;
+ }
+ }
+ close INFO;
+ $svnurl =~ m'box/(.+)$';
+ my $svndir = $1;
+ $svndir =~ tr/0-9A-Za-z/_/c;
+ $version =~ s/USE_SVN_VERSION/$svndir.'_'.$svnversion/e;
+}
+
+# make initial directory
+my $base_name = "$archive_name-$version";
+system "rm -rf $base_name";
+system "rm $base_name.tgz";
+mkdir $base_name,0755;
+
+# get license files
+my %license_text; # name of license => array of lines of license text
+foreach my $license ("GPL", "DUAL")
+{
+ my $file = "./LICENSE-$license.txt";
+ open LICENSE, $file or die "Can't open $file: $!";
+ my @lines = <LICENSE>;
+ close LICENSE;
+ unshift @lines, "distribution $base_name (svn version: $svnversion)\n";
+ $license_text{$license} = \@lines;
+}
+
+# copy files, make a note of all the modules included
+my %modules_included;
+my $private_sections_removed = 0;
+my $non_distribution_sections_removed = 0;
+sub copy_from_list
+{
+ my $list = $_[0];
+ open LIST,$list or die "Can't open $list";
+
+ while(my $line = <LIST>)
+ {
+ next unless $line =~ m/\S/;
+ chomp $line;
+ my @words = split /\s+/, $line;
+ my ($src,$dst,$other) = @words;
+ $dst = $src if $dst eq '';
+ if($src eq 'MKDIR')
+ {
+ # actually we just need to make a directory here
+ mkdir "$base_name/$dst",0755;
+ }
+ elsif($src eq 'LICENSE')
+ {
+ $current_license = $dst;
+ }
+ elsif($src eq 'REPLACE-VERSION-IN')
+ {
+ replace_version_in($dst);
+ }
+ elsif($src eq 'RUN')
+ {
+ my ($junk,$cmd) = split /\s+/, $line, 2;
+ print "Running $cmd...\n";
+ if(system($cmd) != 0)
+ {
+ print "Error running $cmd. Aborting.\n";
+ exit(1);
+ }
+ }
+ elsif(-d $src)
+ {
+ $modules_included{$line} = 1;
+ copy_dir($src,$dst);
+ }
+ else
+ {
+ copy_file($src,$dst);
+ }
+ }
+
+ close LIST;
+}
+copy_from_list("distribution/COMMON-MANIFEST.txt");
+copy_from_list("$dist_root/DISTRIBUTION-MANIFEST.txt");
+
+# Copy in the root directory and delete the DISTRIBUTION-MANIFEST file
+(system("cp $dist_root/*.* $base_name/") == 0)
+ or die "Copy of root extra files failed";
+unlink "$base_name/DISTRIBUTION-MANIFEST.txt"
+ or die "Delete of DISTRIBUTION-MANIFEST.txt file failed";
+replace_version_in("VERSION.txt");
+
+# produce a new modules file
+my $modules = gensym;
+open $modules,"modules.txt" or die "Can't open modules.txt for reading";
+open MODULES_OUT,">$base_name/modules.txt";
+
+while(<$modules>)
+{
+ # skip lines for modules which aren't included
+ next if m/\A(\w+\/\w+)\s/ && !exists $modules_included{$1};
+
+ # skip private sections
+ unless(skip_non_applicable_section($_, $modules, 'modules.txt'))
+ {
+ # copy line to out files
+ print MODULES_OUT
+ }
+}
+
+close MODULES_OUT;
+close $modules;
+
+# report on how many private sections were removed
+print "Private sections removed: $private_sections_removed\nNon-distribution sections removed: $non_distribution_sections_removed\n";
+
+# tar it up
+system "tar cf - $base_name | gzip -9 - > $base_name.tgz";
+
+sub copy_file
+{
+ my ($fn,$dst_fn) = @_;
+
+ my $ext;
+ $ext = $1 if $fn =~ m/\.(\w+)\Z/;
+ $dst_fn =~ m~\A(.+)/[^/]+?\Z~;
+
+ # licensed or not?
+ if(exists $comment_chars{$ext} && $current_license ne "none")
+ {
+ # copy as text, inserting license
+ # print "source copy $fn to $base_name/$dst_fn\n";
+
+ my $in = gensym;
+ open $in,$fn or die "$fn: $!";
+ open OUT,">$base_name/$dst_fn" or die "$base_name/$dst_fn: $!";
+
+ my $first = <$in>;
+ if($first =~ m/\A#!/)
+ {
+ print OUT $first;
+ $first = '';
+ }
+
+ # write license
+ my $b = $comment_chars{$ext};
+ my $this_license = $license_text{$current_license};
+ for (@$this_license)
+ {
+ print OUT $b, $_;
+ }
+
+ if($first ne '')
+ {
+ print OUT $first;
+ }
+
+ while(<$in>)
+ {
+ unless(skip_non_applicable_section($_, $in, $fn))
+ {
+ print OUT
+ }
+ }
+
+ close OUT;
+ close $in;
+ }
+ elsif(exists $text_files{$ext})
+ {
+ # copy this as text, to remove private stuff
+ # print "text copy $fn to $base_name/$dst_fn\n";
+
+ my $in = gensym;
+ open $in,$fn or die "$fn: $!";
+ open OUT,">$base_name/$dst_fn" or die "$base_name/$dst_fn: $!";
+
+ while(<$in>)
+ {
+ unless(skip_non_applicable_section($_, $in, $fn))
+ {
+ print OUT
+ }
+ }
+
+ close OUT;
+ close $in;
+ }
+ else
+ {
+ # copy as binary
+ # print "binary copy $fn to $base_name/$dst_fn\n";
+ my $cmd = "cp -p $fn $base_name/$dst_fn";
+ system($cmd) == 0 or die "copy failed: $cmd";
+ }
+
+ # copy executable bit from src
+ if(-x $fn)
+ {
+ system 'chmod','a+x',"$base_name/$dst_fn"
+ }
+ else
+ {
+ system 'chmod','a-x',"$base_name/$dst_fn"
+ }
+}
+
+sub skip_non_applicable_section
+{
+ my ($l, $filehandle, $filename) = @_;
+ if($l =~ m/BOX_PRIVATE_BEGIN/)
+ {
+ # skip private section
+ print "Removing private section from $filename\n";
+ $private_sections_removed++;
+ while(<$filehandle>) {last if m/BOX_PRIVATE_END/}
+
+ # skipped something
+ return 1;
+ }
+ elsif($l =~ m/IF_DISTRIBUTION\((.+?)\)/)
+ {
+ # which distributions does this apply to?
+ my $applies = 0;
+ for(split /,/,$1)
+ {
+ $applies = 1 if $_ eq $distribution
+ }
+ unless($applies)
+ {
+ # skip section?
+ print "Removing distribution specific section from $filename\n";
+ $non_distribution_sections_removed++;
+ while(<$filehandle>) {last if m/END_IF_DISTRIBUTION/}
+ }
+ # hide this line
+ return 1;
+ }
+ elsif($l =~ m/END_IF_DISTRIBUTION/)
+ {
+ # hide these lines
+ return 1;
+ }
+ else
+ {
+ # no skipping, return this line
+ return 0;
+ }
+}
+
+sub copy_dir
+{
+ my ($dir,$dst_dir) = @_;
+
+ # copy an entire directory... first make sure it exists
+ my @n = split /\//,$dst_dir;
+ my $d = $base_name;
+ for(@n)
+ {
+ $d .= '/';
+ $d .= $_;
+ mkdir $d,0755;
+ }
+
+ # then do each of the files within in
+ opendir DIR,$dir;
+ my @items = readdir DIR;
+ closedir DIR;
+
+ for(@items)
+ {
+ next if m/\A\./;
+ next if m/\A_/;
+ next if m/\AMakefile\Z/;
+ next if m/\Aautogen/;
+ next if m/-smf-method\Z/; # copy only the .in versions
+ next if m/-manifest.xml\Z/; # copy only the .in versions
+ if($dir eq 'docs') {
+ next if m/.(x[sm]l|tmpl)\Z/; # don't include doc sources
+ next if m/generate_except_xml.pl/;
+ }
+ next if !-f "$dir/$_";
+
+ copy_file("$dir/$_","$dst_dir/$_");
+ }
+}
+
+sub replace_version_in
+{
+ my ($file) = @_;
+
+ my $fn = $base_name . '/' . $file;
+ open IN,$fn or die "Can't open $fn";
+ open OUT,'>'.$fn.'.new' or die "Can't open $fn.new for writing";
+
+ while(<IN>)
+ {
+ s/###DISTRIBUTION-VERSION-NUMBER###/$version/g;
+ s/.*USE_SVN_VERSION.*/$version/g;
+ print OUT
+ }
+
+ close OUT;
+ close IN;
+
+ rename($fn.'.new', $fn) or die "Can't rename in place $fn";
+}
+
diff --git a/infrastructure/makeparcels.pl.in b/infrastructure/makeparcels.pl.in
new file mode 100755
index 00000000..4dc94925
--- /dev/null
+++ b/infrastructure/makeparcels.pl.in
@@ -0,0 +1,396 @@
+#!@PERL@
+
+use strict;
+use lib 'infrastructure';
+use BoxPlatform;
+
+my @parcels;
+my %parcel_contents;
+
+sub starts_with ($$)
+{
+ my ($string,$expected) = @_;
+ return substr($string, 0, length $expected) eq $expected;
+}
+
+sub os_matches ($)
+{
+ my ($prefix_string) = @_;
+ my @prefixes = split m'\,', $prefix_string;
+ foreach my $prefix (@prefixes)
+ {
+ return 1 if starts_with($build_os, $prefix);
+ return 1 if starts_with($target_os, $prefix);
+ }
+ return 0;
+}
+
+my $copy_command = "cp -p";
+
+if ($build_os eq 'CYGWIN')
+{
+ $copy_command = "cp -pu"; # faster
+}
+
+open PARCELS,"parcels.txt" or die "Can't open parcels file";
+{
+ my $cur_parcel = '';
+ while(<PARCELS>)
+ {
+ chomp; s/#.+\Z//; s/\s+\Z//; s/\s+/ /g;
+ next unless m/\S/;
+
+ # omit bits on some platforms?
+ next if m/\AEND-OMIT/;
+ if(m/\AOMIT:(.+)/)
+ {
+ if (os_matches($1))
+ {
+ while(<PARCELS>)
+ {
+ last if m/\AEND-OMIT/;
+ }
+ }
+ next;
+ }
+
+ if (m'\AONLY:(.+)')
+ {
+ if (not os_matches($1))
+ {
+ while (<PARCELS>)
+ {
+ last if m'\AEND-ONLY';
+ }
+ }
+ next;
+ }
+ next if (m'\AEND-ONLY');
+
+ if (m'\AEXCEPT:(.+)')
+ {
+ if (os_matches($1))
+ {
+ while (<PARCELS>)
+ {
+ last if m'\AEND-EXCEPT';
+ }
+ }
+ next;
+ }
+ next if (m'\AEND-EXCEPT');
+
+ # new parcel, or a new parcel definition?
+ if(m/\A\s+(.+)\Z/)
+ {
+ push @{$parcel_contents{$cur_parcel}},$1
+ }
+ else
+ {
+ $cur_parcel = $_;
+ push @parcels,$_;
+ }
+ }
+}
+close PARCELS;
+
+# create parcels directory
+mkdir "parcels",0755;
+mkdir "parcels/scripts",0755;
+
+# write master makefile
+
+open MAKE,">Makefile" or die "Can't open master Makefile for writing";
+
+print MAKE <<__E;
+#
+# AUTOMATICALLY GENERATED FILE
+# do not edit!
+#
+#
+
+MAKE = $make_command
+
+__E
+
+print MAKE "all:\t",join(' ',map {"build-".$_} @parcels),"\n\n";
+
+print MAKE <<__END_OF_FRAGMENT;
+test: release/common/test
+
+release/common/test:
+ ./runtest.pl ALL release
+
+.PHONY: docs
+docs:
+ \$(MAKE) -C docs
+
+__END_OF_FRAGMENT
+
+my $release_flag = BoxPlatform::make_flag('RELEASE');
+my @clean_deps;
+
+for my $parcel (@parcels)
+{
+ my $version = BoxPlatform::parcel_root($parcel);
+ my $target = BoxPlatform::parcel_target($parcel);
+ my $dir = BoxPlatform::parcel_dir($parcel);
+ my @parcel_deps;
+
+ unless ($target_windows)
+ {
+ open SCRIPT,">parcels/scripts/install-$parcel" or die
+ "Can't open installer script for $parcel for writing";
+ print SCRIPT "#!/bin/sh\n\n";
+ }
+
+ for(@{$parcel_contents{$parcel}})
+ {
+ my @args = split /\s+/;
+
+ my ($type,$name,$dest) = @args;
+ my $optional = 0;
+ my $install = 1;
+
+ if ($type eq 'optional')
+ {
+ $optional = 1;
+ shift @args;
+ ($type,$name,$dest) = @args;
+ }
+
+ if ($type eq 'noinstall')
+ {
+ $install = 0;
+ shift @args;
+ ($type,$name,$dest) = @args;
+ }
+
+ if($type eq 'bin')
+ {
+ my $exeext = $platform_exe_ext;
+ print MAKE <<EOF;
+$dir/$name$exeext: release/bin/$name/$name$exeext
+ mkdir -p $dir
+ $copy_command release/bin/$name/$name$exeext $dir
+
+.PHONY: release/bin/$name/$name$exeext
+release/bin/$name/$name$exeext:
+ (cd bin/$name; \$(MAKE) $release_flag)
+
+EOF
+ push @parcel_deps, "$dir/$name$exeext";
+ }
+ elsif ($type eq 'script')
+ {
+ my $fullpath = $name;
+ my $filename = $name;
+ # remove path from script name
+ $filename =~ s{.*/}{};
+
+ print MAKE <<EOF;
+$dir/$filename: $fullpath
+ mkdir -p $dir
+EOF
+
+ if ($optional)
+ {
+ print MAKE "\ttest -r $fullpath " .
+ "&& $copy_command $fullpath $dir || true\n";
+ }
+ else
+ {
+ print MAKE "\t$copy_command $fullpath $dir\n";
+ }
+
+ print MAKE "\n";
+
+ push @parcel_deps, "$dir/$filename";
+ }
+ elsif($type eq 'man')
+ {
+ print MAKE <<EOF;
+$dir/${name}.gz: docs/man/${name}.gz
+ mkdir -p $dir
+ $copy_command docs/man/${name}.gz $dir
+
+EOF
+ # Releases have the docs pre-made, but users
+ # may want to rebuild them for some reason.
+ print MAKE <<EOF;
+.PHONY: docs/man/${name}.gz
+docs/man/${name}.gz:
+ \$(MAKE) -C docs man/${name}.gz
+
+EOF
+ push @parcel_deps, "$dir/${name}.gz";
+ }
+ elsif($type eq 'html')
+ {
+ print MAKE <<EOF;
+$dir/docs/${name}.html: docs/htmlguide/man-html/${name}.html
+ mkdir -p $dir/docs
+ $copy_command docs/htmlguide/man-html/${name}.html $dir/docs
+
+EOF
+ # Releases have the docs pre-made, but users
+ # may want to rebuild them for some reason.
+ print MAKE <<EOF;
+.PHONY: docs/htmlguide/man-html/${name}.html
+docs/htmlguide/man-html/${name}.html:
+ \$(MAKE) -C docs htmlguide/man-html/${name}.html
+
+EOF
+ push @parcel_deps, "$dir/docs/${name}.html";
+ }
+ elsif ($type eq 'subdir')
+ {
+ print MAKE <<EOF;
+.PHONY: $name-build $name-clean
+
+$name-build:
+ \$(MAKE) -C $name
+
+$name-clean:
+ \$(MAKE) -C $name clean
+EOF
+ push @parcel_deps, "$name-build";
+ push @clean_deps, "$name-clean";
+ }
+ }
+
+ print MAKE <<EOF;
+build-$parcel: $target
+
+$target: @parcel_deps
+ test -d $dir || mkdir $dir
+EOF
+
+ for(@{$parcel_contents{$parcel}})
+ {
+ my @args = split /\s+/;
+
+ my ($type,$name,$dest) = @args;
+
+ my $optional = 0;
+ my $install = 1;
+
+ if ($type eq 'optional')
+ {
+ $optional = 1;
+ shift @args;
+ ($type,$name,$dest) = @args;
+ }
+
+ if ($type eq 'noinstall')
+ {
+ $install = 0;
+ shift @args;
+ ($type,$name,$dest) = @args;
+ }
+
+ if ($type eq 'script')
+ {
+ # remove path from script name
+ $name =~ s{.*/}{};
+ }
+
+ if ($type eq 'html')
+ {
+ $dest = "share/doc/$version";
+ $name = "docs/$name.html";
+ }
+
+ if ($type eq 'man')
+ {
+ $name =~ /([0-9])$/;
+ $dest = "man/man$1";
+ $name =~ s/$/\.gz/;
+ }
+
+ if ($install and not $target_windows)
+ {
+ my $local_install_dir = $install_into_dir;
+ if (defined $dest)
+ {
+ if ($dest =~ m,^/,)
+ {
+ # Don't add $prefix if $dest is a literal path
+ $local_install_dir = $dest;
+ }
+ else
+ {
+ $local_install_dir = "@prefix@/$dest";
+ }
+ }
+ print SCRIPT "mkdir -p " .
+ "\${DESTDIR}$local_install_dir/\n";
+ print SCRIPT "install $name " .
+ "\${DESTDIR}$local_install_dir\n";
+ }
+ }
+
+ unless ($target_windows)
+ {
+ close SCRIPT;
+ chmod 0755,"parcels/scripts/install-$parcel";
+ }
+
+ my $root = BoxPlatform::parcel_root($parcel);
+
+ unless ($target_windows)
+ {
+ print MAKE "\tcp parcels/scripts/install-$parcel $dir\n";
+ }
+
+ print MAKE "\t(cd parcels; tar cf - $root | gzip -9 - > $root.tgz )\n";
+
+ print MAKE "\n";
+
+ unless ($target_windows)
+ {
+ print MAKE "install-$parcel:\n";
+ print MAKE "\t(cd $dir; ./install-$parcel)\n\n";
+ }
+}
+
+print MAKE <<EOF;
+install:
+ cat local/install.msg
+
+clean: @clean_deps
+ \$(MAKE) -C docs clean
+EOF
+
+if ($build_os eq 'CYGWIN')
+{
+ print MAKE "\tfind release debug -type f | xargs -r rm -f\n";
+}
+else
+{
+ print MAKE "\tfind release debug -type f -exec rm -f {} \\;\n";
+}
+
+for my $parcel (@parcels)
+{
+ print MAKE "\trm -rf ", BoxPlatform::parcel_dir($parcel), "\n";
+ print MAKE "\trm -f ", BoxPlatform::parcel_target($parcel), "\n";
+}
+
+close MAKE;
+
+open INSTALLMSG,">local/install.msg" or die "Can't open install message file for writing";
+print INSTALLMSG <<__E;
+
+Parcels need to be installed separately, and as root. Type one of the following:
+
+__E
+
+for(@parcels)
+{
+ print INSTALLMSG " $make_command install-".$_."\n";
+}
+print INSTALLMSG "\n";
+
+close INSTALLMSG;
+
diff --git a/infrastructure/mingw/configure.sh b/infrastructure/mingw/configure.sh
new file mode 100755
index 00000000..0486b20d
--- /dev/null
+++ b/infrastructure/mingw/configure.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+DEP_PATH=/usr/i686-pc-mingw32
+
+if [ ! -r "$DEP_PATH/lib/libssl.a" ]; then
+ echo "Error: install OpenSSL as instructed by" \
+ "docs/backup/win32_build_on_cygwin_using_mingw.txt" >&2
+ exit 2
+fi
+
+if [ ! -r "$DEP_PATH/lib/libpcreposix.a" \
+ -o ! -r "$DEP_PATH/lib/libpcre.a" \
+ -o ! -r "$DEP_PATH/include/pcreposix.h" ]; then
+ echo "Error: install PCRE as instructed by" \
+ "docs/backup/win32_build_on_cygwin_using_mingw.txt" >&2
+ exit 2
+fi
+
+export CXX="g++ -mno-cygwin"
+export LD="g++ -mno-cygwin"
+export CFLAGS="-mno-cygwin -mthreads"
+export CXXFLAGS="-mno-cygwin -mthreads"
+export LDFLAGS="-mno-cygwin -mthreads"
+export LIBS="-lcrypto -lws2_32 -lgdi32"
+
+if [ ! -x "configure" ]; then
+ if ! ./bootstrap; then
+ echo "Error: bootstrap failed, aborting." >&2
+ exit 1
+ fi
+fi
+
+if ! ./configure --target=i686-pc-mingw32; then
+ echo "Error: configure failed, aborting." >&2
+ exit 1
+fi
+
+exit 0
diff --git a/infrastructure/msvc/2003/bbackupctl.vcproj b/infrastructure/msvc/2003/bbackupctl.vcproj
new file mode 100644
index 00000000..02f7482e
--- /dev/null
+++ b/infrastructure/msvc/2003/bbackupctl.vcproj
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="bbackupctl"
+ ProjectGUID="{9FD51412-E945-4457-A17A-CA3C505CF431}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\..\Debug"
+ IntermediateDirectory="..\..\..\Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOX_RELEASE_BUILD "
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib"
+ OutputFile="$(OutDir)/bbackupctl.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/bbackupctl.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="..\..\..\Release"
+ IntermediateDirectory="..\..\..\Release"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableFiberSafeOptimizations="TRUE"
+ OptimizeForProcessor="1"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib"
+ OutputFile="$(OutDir)/bbackupctl.exe"
+ LinkIncremental="1"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <Filter
+ Name="bin"
+ Filter="">
+ <Filter
+ Name="bbackupctl"
+ Filter="">
+ <File
+ RelativePath="..\..\..\bin\bbackupctl\bbackupctl.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\win32\WinNamedPipeStream.cpp">
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath="..\..\..\lib\win32\WinNamedPipeStream.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ <File
+ RelativePath="..\..\..\lib\win32\messages.rc">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/infrastructure/msvc/2003/bbackupd.vcproj b/infrastructure/msvc/2003/bbackupd.vcproj
new file mode 100644
index 00000000..f34db0cc
--- /dev/null
+++ b/infrastructure/msvc/2003/bbackupd.vcproj
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="bbackupd"
+ ProjectGUID="{22D325FB-9131-4BD6-B390-968F0491D687}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\..\Debug"
+ IntermediateDirectory="..\..\..\Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\..\..\db-4.2.52.NC\build_win32&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;;&quot;$(SolutionDir)..\..\..\..\openssl\include&quot;;&quot;$(SolutionDir)..\..\..\..\zlib\include&quot;;&quot;$(SolutionDir)..\..\..\lib\backupclient&quot;;&quot;$(SolutionDir)..\..\..\lib\server&quot;;&quot;$(SolutionDir)..\..\..\lib\crypto&quot;;&quot;$(SolutionDir)..\..\..\lib\compress&quot;;&quot;$(SolutionDir)..\..\..\lib\win32&quot;;&quot;$(SolutionDir)..\..\..\lib\common\&quot;"
+ PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOX_RELEASE_BUILD "
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib"
+ OutputFile="$(OutDir)/bbackupd.exe"
+ LinkIncremental="2"
+ IgnoreAllDefaultLibraries="FALSE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/bbackupd.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="..\..\..\Release"
+ IntermediateDirectory="..\..\..\Release"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableFiberSafeOptimizations="TRUE"
+ OptimizeForProcessor="1"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib"
+ OutputFile="$(OutDir)/bbackupd.exe"
+ LinkIncremental="1"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <Filter
+ Name="bin"
+ Filter="">
+ <Filter
+ Name="bbackupd"
+ Filter="">
+ <File
+ RelativePath="..\..\..\bin\bbackupd\autogen_ClientException.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientContext.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientDeleteList.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientDirectoryRecord.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientInodeToIDMap.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupDaemon.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\bbackupd.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\Win32BackupService.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\Win32ServiceFunctions.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\win32\WinNamedPipeStream.cpp">
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <Filter
+ Name="bin"
+ Filter="">
+ <Filter
+ Name="bbackupd"
+ Filter="">
+ <File
+ RelativePath="..\..\..\bin\bbackupd\autogen_ClientException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientContext.h">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientDeleteList.h">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientDirectoryRecord.h">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientInodeToIDMap.h">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupDaemon.h">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\Win32BackupService.h">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\Win32ServiceFunctions.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\win32\WinNamedPipeStream.h">
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ <File
+ RelativePath="..\..\..\lib\win32\messages.rc">
+ </File>
+ </Filter>
+ <File
+ RelativePath="..\..\..\ReadMe.txt">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/infrastructure/msvc/2003/boxbackup.sln b/infrastructure/msvc/2003/boxbackup.sln
new file mode 100644
index 00000000..d9a28041
--- /dev/null
+++ b/infrastructure/msvc/2003/boxbackup.sln
@@ -0,0 +1,57 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boxquery", "boxquery.vcproj", "{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common.vcproj", "{A089CEE6-EBF0-4232-A0C0-74850A8127A6}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupd", "bbackupd.vcproj", "{22D325FB-9131-4BD6-B390-968F0491D687}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32test", "win32test.vcproj", "{28C29E72-76A2-4D0C-B35B-12D446733D2E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupctl", "bbackupctl.vcproj", "{9FD51412-E945-4457-A17A-CA3C505CF431}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Debug.ActiveCfg = Debug|Win32
+ {FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Debug.Build.0 = Debug|Win32
+ {FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Release.ActiveCfg = Release|Win32
+ {FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Release.Build.0 = Release|Win32
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Debug.ActiveCfg = Debug|Win32
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Debug.Build.0 = Debug|Win32
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Release.ActiveCfg = Release|Win32
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Release.Build.0 = Release|Win32
+ {22D325FB-9131-4BD6-B390-968F0491D687}.Debug.ActiveCfg = Debug|Win32
+ {22D325FB-9131-4BD6-B390-968F0491D687}.Debug.Build.0 = Debug|Win32
+ {22D325FB-9131-4BD6-B390-968F0491D687}.Release.ActiveCfg = Release|Win32
+ {22D325FB-9131-4BD6-B390-968F0491D687}.Release.Build.0 = Release|Win32
+ {28C29E72-76A2-4D0C-B35B-12D446733D2E}.Debug.ActiveCfg = Debug|Win32
+ {28C29E72-76A2-4D0C-B35B-12D446733D2E}.Debug.Build.0 = Debug|Win32
+ {28C29E72-76A2-4D0C-B35B-12D446733D2E}.Release.ActiveCfg = Release|Win32
+ {28C29E72-76A2-4D0C-B35B-12D446733D2E}.Release.Build.0 = Release|Win32
+ {9FD51412-E945-4457-A17A-CA3C505CF431}.Debug.ActiveCfg = Debug|Win32
+ {9FD51412-E945-4457-A17A-CA3C505CF431}.Debug.Build.0 = Debug|Win32
+ {9FD51412-E945-4457-A17A-CA3C505CF431}.Release.ActiveCfg = Release|Win32
+ {9FD51412-E945-4457-A17A-CA3C505CF431}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/infrastructure/msvc/2003/boxquery.vcproj b/infrastructure/msvc/2003/boxquery.vcproj
new file mode 100644
index 00000000..6ac09024
--- /dev/null
+++ b/infrastructure/msvc/2003/boxquery.vcproj
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="boxquery"
+ ProjectGUID="{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}"
+ RootNamespace="boxquery"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\..\Debug"
+ IntermediateDirectory="..\..\..\Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;"
+ PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOX_RELEASE_BUILD "
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib"
+ OutputFile="$(OutDir)/bbackupquery.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/boxquery.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="..\..\..\Release"
+ IntermediateDirectory="..\..\..\Release"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableFiberSafeOptimizations="TRUE"
+ OptimizeForProcessor="1"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0&quot;"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOOST_REGEX_NO_LIB"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\Release\common.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib"
+ OutputFile="$(OutDir)/bbackupquery.exe"
+ LinkIncremental="1"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="FALSE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <Filter
+ Name="bin"
+ Filter="">
+ <Filter
+ Name="backupquery"
+ Filter="">
+ <File
+ RelativePath="..\..\..\bin\bbackupquery\autogen_Documentation.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupquery\BackupQueries.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupquery\bbackupquery.cpp">
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <Filter
+ Name="bin"
+ Filter="">
+ <Filter
+ Name="backupquery"
+ Filter="">
+ <File
+ RelativePath="..\..\..\bin\bbackupquery\BackupQueries.h">
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ <File
+ RelativePath="..\..\..\lib\win32\messages.rc">
+ </File>
+ </Filter>
+ <File
+ RelativePath="..\..\..\ReadMe.txt">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/infrastructure/msvc/2003/common.vcproj b/infrastructure/msvc/2003/common.vcproj
new file mode 100644
index 00000000..fb18b76a
--- /dev/null
+++ b/infrastructure/msvc/2003/common.vcproj
@@ -0,0 +1,672 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="common"
+ ProjectGUID="{A089CEE6-EBF0-4232-A0C0-74850A8127A6}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\..\Debug"
+ IntermediateDirectory="..\..\..\Debug"
+ ConfigurationType="4"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0\&quot;"
+ PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;BOX_RELEASE_BUILD "
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/common.lib"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="..\..\..\Release"
+ IntermediateDirectory="..\..\..\Release"
+ ConfigurationType="4"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableFiberSafeOptimizations="TRUE"
+ OptimizeForProcessor="1"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(SolutionDir)..\..\..\..\boost_1_31_0\&quot;"
+ PreprocessorDefinitions="BOOST_REGEX_NO_LIB;WIN32;BOX_RELEASE_BUILD;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/common.lib"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <Filter
+ Name="lib"
+ Filter="">
+ <Filter
+ Name="compress"
+ Filter="">
+ <File
+ RelativePath="..\..\..\lib\compress\autogen_CompressException.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\compress\CompressStream.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="common"
+ Filter="">
+ <File
+ RelativePath="..\..\..\lib\common\autogen_CommonException.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\autogen_ConversionException.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxException.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxTime.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxTimeToText.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\CollectInBufferStream.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Configuration.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\ConversionString.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\DebugAssertFailed.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\DebugMemLeakFinder.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\DebugPrintf.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\EventWatchFilesystemObject.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\ExcludeList.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\FdGetLine.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\FileStream.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\IOStream.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\IOStreamGetLine.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Logging.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\MemBlockStream.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\PartialReadStream.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\PathUtils.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\ReadGatherStream.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\ReadLoggingStream.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\StreamableMemBlock.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\UnixUser.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Utils.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\WaitForEvent.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="backupclient"
+ Filter="">
+ <File
+ RelativePath="..\..\..\lib\backupclient\autogen_BackupProtocolClient.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\autogen_BackupStoreException.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientCryptoKeys.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientFileAttributes.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientMakeExcludeList.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientRestore.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupDaemonConfigVerify.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreDirectory.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFile.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileCmbDiff.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileCmbIdx.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileCombine.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileCryptVar.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileDiff.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileEncodeStream.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFilename.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFilenameClear.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileRevDiff.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreObjectDump.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="crypto"
+ Filter="">
+ <File
+ RelativePath="..\..\..\lib\crypto\autogen_CipherException.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherAES.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherBlowfish.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherContext.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherDescription.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\MD5Digest.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\Random.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\RollingChecksum.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="win32"
+ Filter="">
+ <File
+ RelativePath="..\..\..\lib\win32\emu.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\win32\getopt_long.cxx">
+ </File>
+ </Filter>
+ <Filter
+ Name="server"
+ Filter="">
+ <File
+ RelativePath="..\..\..\lib\server\autogen_ConnectionException.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\autogen_ServerException.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\Daemon.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\LocalProcessStream.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\Protocol.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ProtocolObject.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ProtocolUncertainStream.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\Socket.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SocketStream.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SocketStreamTLS.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SSLLib.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\TLSContext.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\WinNamedPipeStream.cpp">
+ </File>
+
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <Filter
+ Name="lib"
+ Filter="">
+ <Filter
+ Name="compress"
+ Filter="">
+ <File
+ RelativePath="..\..\..\lib\compress\autogen_CompressException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\compress\Compress.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\compress\CompressException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\compress\CompressStream.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="common"
+ Filter="">
+ <File
+ RelativePath="..\..\..\lib\common\autogen_CommonException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\autogen_ConversionException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BannerText.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BeginStructPackForWire.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Box.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxPlatform.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxPortsAndFiles.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxTime.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxTimeToText.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxTimeToUnix.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\CollectInBufferStream.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\CommonException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Configuration.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Conversion.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\EndStructPackForWire.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\EventWatchFilesystemObject.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\ExcludeList.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\FdGetLine.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\FileModificationTime.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\FileStream.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Guards.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\IOStream.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\IOStreamGetLine.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\LinuxWorkaround.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\LocalProcessStream.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Logging.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\MainHelper.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\MemBlockStream.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\MemLeakFinder.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\MemLeakFindOff.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\MemLeakFindOn.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\NamedLock.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\PartialReadStream.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\PathUtils.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\ReadGatherStream.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\StreamableMemBlock.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\TemporaryDirectory.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Test.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Timer.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\UnixUser.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Utils.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\WaitForEvent.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxVersion.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="backupclient"
+ Filter="">
+ <File
+ RelativePath="..\..\..\lib\backupclient\autogen_BackupProtocolClient.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\autogen_BackupStoreException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientCryptoKeys.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientFileAttributes.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientMakeExcludeList.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientRestore.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupDaemonConfigVerify.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreConstants.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreDirectory.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFile.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileCryptVar.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileEncodeStream.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFilename.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFilenameClear.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileWire.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreObjectMagic.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="crypto"
+ Filter="">
+ <File
+ RelativePath="..\..\..\lib\crypto\autogen_CipherException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherAES.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherBlowfish.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherContext.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherDescription.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\MD5Digest.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\Random.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\RollingChecksum.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="win32"
+ Filter="">
+ <File
+ RelativePath="..\..\..\lib\win32\emu.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\win32\getopt.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\win32\WinNamedPipeStream.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="server"
+ Filter="">
+ <File
+ RelativePath="..\..\..\lib\server\autogen_ConnectionException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\autogen_ServerException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\Daemon.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\Protocol.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ProtocolObject.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ProtocolUncertainStream.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ProtocolWire.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ServerException.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ServerStream.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ServerTLS.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\Socket.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SocketListen.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SocketStream.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SocketStreamTLS.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SSLLib.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\TLSContext.h">
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\WinNamedPipeStream.h">
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/infrastructure/msvc/2003/win32test.vcproj b/infrastructure/msvc/2003/win32test.vcproj
new file mode 100644
index 00000000..2ef7164e
--- /dev/null
+++ b/infrastructure/msvc/2003/win32test.vcproj
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="win32test"
+ ProjectGUID="{28C29E72-76A2-4D0C-B35B-12D446733D2E}"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\..\Debug"
+ IntermediateDirectory="..\..\..\Debug"
+ ConfigurationType="1"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\..\db-4.2.52.NC\build_win32&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib"
+ OutputFile="$(OutDir)/win32test.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)/win32test.pdb"
+ SubSystem="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="..\..\..\Release"
+ IntermediateDirectory="..\..\..\Release"
+ ConfigurationType="1"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableFiberSafeOptimizations="TRUE"
+ OptimizeForProcessor="1"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="FALSE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\lib\libeay32.lib $(ProjectDir)..\..\..\..\openssl\lib\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib"
+ OutputFile="$(OutDir)/win32test.exe"
+ LinkIncremental="1"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="TRUE"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath="..\..\..\lib\win32\emu.cpp">
+ </File>
+ <File
+ RelativePath="..\..\..\test\win32\testlibwin32.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ <File
+ RelativePath="..\..\..\ReadMe.txt">
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/infrastructure/msvc/2005/bbackupctl.vcproj b/infrastructure/msvc/2005/bbackupctl.vcproj
new file mode 100644
index 00000000..216a284b
--- /dev/null
+++ b/infrastructure/msvc/2005/bbackupctl.vcproj
@@ -0,0 +1,222 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="bbackupctl"
+ ProjectGUID="{9FD51412-E945-4457-A17A-CA3C505CF431}"
+ RootNamespace="bbackupctl"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\..\Debug"
+ IntermediateDirectory="..\..\..\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib Advapi32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcre.lib"
+ OutputFile="$(OutDir)/bbackupctl.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/bbackupctl.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="..\..\..\Release"
+ IntermediateDirectory="..\..\..\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableFiberSafeOptimizations="true"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib $(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcre.lib"
+ OutputFile="$(OutDir)/bbackupctl.exe"
+ LinkIncremental="1"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <Filter
+ Name="bin"
+ >
+ <Filter
+ Name="bbackupctl"
+ >
+ <File
+ RelativePath="..\..\..\bin\bbackupctl\bbackupctl.cpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath="..\..\..\lib\win32\messages.rc"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/infrastructure/msvc/2005/bbackupd.vcproj b/infrastructure/msvc/2005/bbackupd.vcproj
new file mode 100644
index 00000000..ac8eb86a
--- /dev/null
+++ b/infrastructure/msvc/2005/bbackupd.vcproj
@@ -0,0 +1,299 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="bbackupd"
+ ProjectGUID="{22D325FB-9131-4BD6-B390-968F0491D687}"
+ RootNamespace="bbackupd"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\..\Debug"
+ IntermediateDirectory="..\..\..\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(SolutionDir)..\..\..\lib\backupclient&quot;;&quot;$(SolutionDir)..\..\..\lib\common&quot;;&quot;$(SolutionDir)..\..\..\lib\compress&quot;;&quot;$(SolutionDir)..\..\..\lib\crypto&quot;;&quot;$(SolutionDir)..\..\..\lib\server&quot;;&quot;$(SolutionDir)..\..\..\lib\win32&quot;;&quot;$(SolutionDir)..\..\..\..\openssl\inc32&quot;;&quot;$(SolutionDir)..\..\..\..\zlib\include&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib Advapi32.lib User32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcre.lib"
+ OutputFile="$(OutDir)/bbackupd.exe"
+ LinkIncremental="2"
+ IgnoreAllDefaultLibraries="false"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/bbackupd.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="..\..\..\Release"
+ IntermediateDirectory="..\..\..\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableFiberSafeOptimizations="true"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(SolutionDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib $(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcre.lib"
+ OutputFile="$(OutDir)/bbackupd.exe"
+ LinkIncremental="1"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <Filter
+ Name="bin"
+ >
+ <Filter
+ Name="bbackupd"
+ >
+ <File
+ RelativePath="..\..\..\bin\bbackupd\autogen_ClientException.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientContext.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientDeleteList.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientDirectoryRecord.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientInodeToIDMap.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupDaemon.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\bbackupd.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\Win32BackupService.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\Win32ServiceFunctions.cpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <Filter
+ Name="bin"
+ >
+ <Filter
+ Name="bbackupd"
+ >
+ <File
+ RelativePath="..\..\..\bin\bbackupd\autogen_ClientException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientContext.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientDeleteList.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientDirectoryRecord.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupClientInodeToIDMap.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\BackupDaemon.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\Win32BackupService.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupd\Win32ServiceFunctions.h"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath="..\..\..\lib\win32\messages.rc"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="..\..\..\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/infrastructure/msvc/2005/boxbackup.sln b/infrastructure/msvc/2005/boxbackup.sln
new file mode 100644
index 00000000..833066e9
--- /dev/null
+++ b/infrastructure/msvc/2005/boxbackup.sln
@@ -0,0 +1,55 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boxquery", "boxquery.vcproj", "{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "common", "common.vcproj", "{A089CEE6-EBF0-4232-A0C0-74850A8127A6}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupd", "bbackupd.vcproj", "{22D325FB-9131-4BD6-B390-968F0491D687}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32test", "win32test.vcproj", "{28C29E72-76A2-4D0C-B35B-12D446733D2E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bbackupctl", "bbackupctl.vcproj", "{9FD51412-E945-4457-A17A-CA3C505CF431}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6} = {A089CEE6-EBF0-4232-A0C0-74850A8127A6}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Debug|Win32.Build.0 = Debug|Win32
+ {FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Release|Win32.ActiveCfg = Release|Win32
+ {FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}.Release|Win32.Build.0 = Release|Win32
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Debug|Win32.Build.0 = Debug|Win32
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Release|Win32.ActiveCfg = Release|Win32
+ {A089CEE6-EBF0-4232-A0C0-74850A8127A6}.Release|Win32.Build.0 = Release|Win32
+ {22D325FB-9131-4BD6-B390-968F0491D687}.Debug|Win32.ActiveCfg = Debug|Win32
+ {22D325FB-9131-4BD6-B390-968F0491D687}.Debug|Win32.Build.0 = Debug|Win32
+ {22D325FB-9131-4BD6-B390-968F0491D687}.Release|Win32.ActiveCfg = Release|Win32
+ {22D325FB-9131-4BD6-B390-968F0491D687}.Release|Win32.Build.0 = Release|Win32
+ {28C29E72-76A2-4D0C-B35B-12D446733D2E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {28C29E72-76A2-4D0C-B35B-12D446733D2E}.Debug|Win32.Build.0 = Debug|Win32
+ {28C29E72-76A2-4D0C-B35B-12D446733D2E}.Release|Win32.ActiveCfg = Release|Win32
+ {28C29E72-76A2-4D0C-B35B-12D446733D2E}.Release|Win32.Build.0 = Release|Win32
+ {9FD51412-E945-4457-A17A-CA3C505CF431}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9FD51412-E945-4457-A17A-CA3C505CF431}.Debug|Win32.Build.0 = Debug|Win32
+ {9FD51412-E945-4457-A17A-CA3C505CF431}.Release|Win32.ActiveCfg = Release|Win32
+ {9FD51412-E945-4457-A17A-CA3C505CF431}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/infrastructure/msvc/2005/boxbackup.suo b/infrastructure/msvc/2005/boxbackup.suo
new file mode 100644
index 00000000..534f337c
--- /dev/null
+++ b/infrastructure/msvc/2005/boxbackup.suo
Binary files differ
diff --git a/infrastructure/msvc/2005/boxquery.vcproj b/infrastructure/msvc/2005/boxquery.vcproj
new file mode 100644
index 00000000..776c0ac9
--- /dev/null
+++ b/infrastructure/msvc/2005/boxquery.vcproj
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="boxquery"
+ ProjectGUID="{FE9EC666-4B3A-4370-B3D4-DEBD4A21F36E}"
+ RootNamespace="boxquery"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\..\Debug"
+ IntermediateDirectory="..\..\..\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\pcre&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib Advapi32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcre.lib"
+ OutputFile="$(OutDir)/bbackupquery.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/boxquery.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="..\..\..\Release"
+ IntermediateDirectory="..\..\..\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableFiberSafeOptimizations="true"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\include&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;PCRE_STATIC"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\Release\common.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcre.lib"
+ OutputFile="$(OutDir)/bbackupquery.exe"
+ LinkIncremental="1"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="false"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <Filter
+ Name="bin"
+ >
+ <Filter
+ Name="backupquery"
+ >
+ <File
+ RelativePath="..\..\..\bin\bbackupquery\autogen_Documentation.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupquery\BackupQueries.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\bin\bbackupquery\bbackupquery.cpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <Filter
+ Name="bin"
+ >
+ <Filter
+ Name="backupquery"
+ >
+ <File
+ RelativePath="..\..\..\bin\bbackupquery\BackupQueries.h"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath="..\..\..\lib\win32\messages.rc"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="..\..\..\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/infrastructure/msvc/2005/common.vcproj b/infrastructure/msvc/2005/common.vcproj
new file mode 100644
index 00000000..256bce06
--- /dev/null
+++ b/infrastructure/msvc/2005/common.vcproj
@@ -0,0 +1,896 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="common"
+ ProjectGUID="{A089CEE6-EBF0-4232-A0C0-74850A8127A6}"
+ RootNamespace="common"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\..\Debug"
+ IntermediateDirectory="..\..\..\Debug"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ Description="Determining Version Number"
+ CommandLine="perl $(InputDir)..\getversion.pl"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\..\pcre&quot;;$(NOINHERIT)"
+ PreprocessorDefinitions="WIN32;_DEBUG;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ WarnAsError="false"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/common.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="..\..\..\Release"
+ IntermediateDirectory="..\..\..\Release"
+ ConfigurationType="4"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableFiberSafeOptimizations="true"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;;&quot;$(ProjectDir)..\..\..\..\pcre\pcre-6.7\&quot;"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_LIB;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)/common.lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <Filter
+ Name="lib"
+ >
+ <Filter
+ Name="compress"
+ >
+ <File
+ RelativePath="..\..\..\lib\compress\autogen_CompressException.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\compress\CompressStream.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="common"
+ >
+ <File
+ RelativePath="..\..\..\lib\common\autogen_CommonException.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\autogen_ConversionException.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxException.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxTime.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxTimeToText.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\CollectInBufferStream.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Configuration.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\ConversionString.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\DebugAssertFailed.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\DebugMemLeakFinder.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\DebugPrintf.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\EventWatchFilesystemObject.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\ExcludeList.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\FdGetLine.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\FileStream.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\IOStream.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\IOStreamGetLine.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Logging.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\MemBlockStream.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\PartialReadStream.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\PathUtils.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\ReadGatherStream.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\ReadLoggingStream.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\StreamableMemBlock.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Timer.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\UnixUser.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Utils.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\WaitForEvent.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="backupclient"
+ >
+ <File
+ RelativePath="..\..\..\lib\backupclient\autogen_BackupProtocolClient.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\autogen_BackupStoreException.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientCryptoKeys.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientFileAttributes.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientMakeExcludeList.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientRestore.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupDaemonConfigVerify.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreDirectory.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileCmbDiff.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileCmbIdx.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileCombine.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileCryptVar.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileDiff.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileEncodeStream.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFilename.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFilenameClear.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileRevDiff.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreObjectDump.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="crypto"
+ >
+ <File
+ RelativePath="..\..\..\lib\crypto\autogen_CipherException.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherAES.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherBlowfish.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherContext.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherDescription.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\MD5Digest.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\Random.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\RollingChecksum.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="win32"
+ >
+ <File
+ RelativePath="..\..\..\lib\win32\emu.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\win32\getopt_long.cxx"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="server"
+ >
+ <File
+ RelativePath="..\..\..\lib\server\autogen_ConnectionException.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\autogen_ServerException.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\Daemon.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\LocalProcessStream.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\Protocol.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ProtocolObject.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ProtocolUncertainStream.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\Socket.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SocketStream.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SocketStreamTLS.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SSLLib.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\TLSContext.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\WinNamedPipeStream.cpp"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <Filter
+ Name="lib"
+ >
+ <Filter
+ Name="compress"
+ >
+ <File
+ RelativePath="..\..\..\lib\compress\autogen_CompressException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\compress\Compress.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\compress\CompressException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\compress\CompressStream.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="common"
+ >
+ <File
+ RelativePath="..\..\..\lib\common\autogen_CommonException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\autogen_ConversionException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BannerText.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BeginStructPackForWire.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Box.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxConfig-MSVC.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxPlatform.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxPortsAndFiles.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxTime.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxTimeToText.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxTimeToUnix.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\BoxVersion.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\CollectInBufferStream.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\CommonException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Configuration.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Conversion.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\EndStructPackForWire.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\EventWatchFilesystemObject.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\ExcludeList.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\FdGetLine.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\FileModificationTime.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\FileStream.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Guards.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\IOStream.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\IOStreamGetLine.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\LocalProcessStream.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Logging.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\MainHelper.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\MemBlockStream.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\MemLeakFinder.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\MemLeakFindOff.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\MemLeakFindOn.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\NamedLock.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\PartialReadStream.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\PathUtils.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\ReadGatherStream.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\ReadLoggingStream.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\StreamableMemBlock.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\TemporaryDirectory.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Test.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Timer.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\UnixUser.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\Utils.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\common\WaitForEvent.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="backupclient"
+ >
+ <File
+ RelativePath="..\..\..\lib\backupclient\autogen_BackupProtocolClient.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\autogen_BackupStoreException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientCryptoKeys.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientFileAttributes.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientMakeExcludeList.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupClientRestore.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupDaemonConfigVerify.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreConstants.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreDirectory.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFile.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileCryptVar.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileEncodeStream.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFilename.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFilenameClear.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreFileWire.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\backupclient\BackupStoreObjectMagic.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="crypto"
+ >
+ <File
+ RelativePath="..\..\..\lib\crypto\autogen_CipherException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherAES.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherBlowfish.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherContext.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherDescription.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\CipherException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\MD5Digest.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\Random.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\crypto\RollingChecksum.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="win32"
+ >
+ <File
+ RelativePath="..\..\..\lib\win32\emu.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\win32\getopt.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="server"
+ >
+ <File
+ RelativePath="..\..\..\lib\server\autogen_ConnectionException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\autogen_ServerException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\Daemon.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\Protocol.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ProtocolObject.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ProtocolUncertainStream.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ProtocolWire.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ServerException.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ServerStream.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\ServerTLS.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\Socket.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SocketListen.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SocketStream.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SocketStreamTLS.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\SSLLib.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\TLSContext.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\lib\server\WinNamedPipeStream.h"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/infrastructure/msvc/2005/win32test.vcproj b/infrastructure/msvc/2005/win32test.vcproj
new file mode 100644
index 00000000..0f97c302
--- /dev/null
+++ b/infrastructure/msvc/2005/win32test.vcproj
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="win32test"
+ ProjectGUID="{28C29E72-76A2-4D0C-B35B-12D446733D2E}"
+ RootNamespace="win32test"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\..\Debug"
+ IntermediateDirectory="..\..\..\Debug"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib Advapi32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Debug\common.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\debug\pcre.lib"
+ OutputFile="$(OutDir)/win32test.exe"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/win32test.pdb"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="..\..\..\Release"
+ IntermediateDirectory="..\..\..\Release"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ EnableFiberSafeOptimizations="true"
+ AdditionalIncludeDirectories="&quot;$(ProjectDir)..\..\..\bin\bbackupd&quot;;&quot;$(ProjectDir)..\..\..\lib\backupclient&quot;;&quot;$(ProjectDir)..\..\..\lib\common\&quot;;&quot;$(ProjectDir)..\..\..\lib\compress&quot;;&quot;$(ProjectDir)..\..\..\lib\crypto&quot;;&quot;$(ProjectDir)..\..\..\lib\server&quot;;&quot;$(ProjectDir)..\..\..\lib\win32&quot;;&quot;$(ProjectDir)..\..\..\..\openssl\inc32&quot;;&quot;$(ProjectDir)..\..\..\..\zlib\include&quot;"
+ PreprocessorDefinitions="WIN32;BOX_RELEASE_BUILD;_CONSOLE;PLATFORM_DISABLE_MEM_LEAK_TESTING;_CRT_SECURE_NO_DEPRECATE;PCRE_STATIC"
+ RuntimeLibrary="0"
+ BufferSecurityCheck="false"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="Ws2_32.lib $(ProjectDir)..\..\..\..\zlib\lib\zdll.lib $(ProjectDir)..\..\..\..\openssl\out32dll\libeay32.lib $(ProjectDir)..\..\..\..\openssl\out32dll\ssleay32.lib $(ProjectDir)..\..\..\Release\common.lib $(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcreposix.lib $(ProjectDir)..\..\..\..\pcre\bin\release\lib_pcre.lib"
+ OutputFile="$(OutDir)/win32test.exe"
+ LinkIncremental="1"
+ IgnoreDefaultLibraryNames=""
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\..\lib\win32\emu.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\test\win32\testlibwin32.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath="..\..\..\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/infrastructure/msvc/getversion.pl b/infrastructure/msvc/getversion.pl
new file mode 100644
index 00000000..12554d01
--- /dev/null
+++ b/infrastructure/msvc/getversion.pl
@@ -0,0 +1,19 @@
+#!perl
+
+$basedir = $0;
+$basedir =~ s/\\[^\\]*$//;
+$basedir =~ s/\\[^\\]*$//;
+$basedir =~ s/\\[^\\]*$//;
+$basedir =~ s/\\[^\\]*$//;
+$basedir =~ s/\\[^\\]*$//;
+-d $basedir or die "$basedir: $!";
+chdir $basedir or die "$basedir: $!";
+
+require "$basedir\\infrastructure\\BoxPlatform.pm.in";
+
+open VERSIONFILE, "> $basedir/lib/common/BoxVersion.h"
+ or die "BoxVersion.h: $!";
+print VERSIONFILE "#define BOX_VERSION \"$BoxPlatform::product_version\"\n";
+close VERSIONFILE;
+
+exit 0;
diff --git a/infrastructure/parcelpath.pl b/infrastructure/parcelpath.pl
new file mode 100644
index 00000000..24f951a2
--- /dev/null
+++ b/infrastructure/parcelpath.pl
@@ -0,0 +1,17 @@
+#!perl
+
+unless (@ARGV == 2)
+{
+ die "Usage: $0 <parcel-name> <target-os>\n";
+}
+
+$basedir = $0;
+$basedir =~ s|/.*||;
+$basedir .= "/..";
+-d $basedir or die "$basedir: $!";
+chdir $basedir or die "$basedir: $!";
+require "infrastructure/BoxPlatform.pm.in";
+
+print BoxPlatform::parcel_dir(@ARGV) . "\n";
+
+exit 0;
diff --git a/infrastructure/printversion.pl b/infrastructure/printversion.pl
new file mode 100644
index 00000000..13815284
--- /dev/null
+++ b/infrastructure/printversion.pl
@@ -0,0 +1,12 @@
+#!perl
+
+$basedir = $0;
+$basedir =~ s|/.*||;
+$basedir .= "/..";
+-d $basedir or die "$basedir: $!";
+chdir $basedir or die "$basedir: $!";
+require "infrastructure/BoxPlatform.pm.in";
+
+print "$BoxPlatform::product_version\n";
+
+exit 0;
diff --git a/infrastructure/setupexternal.pl b/infrastructure/setupexternal.pl
new file mode 100755
index 00000000..87ec5560
--- /dev/null
+++ b/infrastructure/setupexternal.pl
@@ -0,0 +1,55 @@
+#!@PERL@
+use strict;
+
+# This script links in the essential directories and processes various
+# files to allow the Box libraries to be used in projects outside the main
+# box library tree.
+
+# directories to link through
+my @linkdirs = qw/lib infrastructure/;
+
+# ----------------------------------------------------
+
+my $libdir = $ARGV[0];
+die "Provided library dir $libdir does not exist" unless -d $libdir;
+
+# Check and remove links from the directory, then add new symlinks
+for my $d (@linkdirs)
+{
+ if(-e $d)
+ {
+ die "In project, $d is not a symbolic link"
+ unless -l $d;
+ print "Removing existing symlink $d\n";
+ unlink $d;
+ }
+ my $link_target = "$libdir/$d";
+ print "Add symlink $d -> $link_target\n";
+ die "Can't create symlink $d" unless
+ symlink $link_target, $d;
+}
+
+# Copy and create a base modules file which includes all the libraries
+print "Create new modules_base.txt file\n";
+open OUT,">modules_base.txt" or die "Can't open modules_base.txt file for writing";
+print OUT <<__E;
+#
+# Automatically generated file, do not edit
+#
+# Source: $libdir/modules.txt
+#
+
+__E
+
+open IN,"$libdir/modules.txt" or die "Can't open $libdir/modules.txt for reading";
+
+while(<IN>)
+{
+ if(m/\A(lib\/.+?)\s/)
+ {
+ print OUT
+ }
+}
+
+close IN;
+close OUT;