diff options
author | Reinhard Tartler <siretart@tauware.de> | 2008-01-19 15:08:54 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2008-01-19 15:08:54 +0100 |
commit | 2733267954e91e394fbb512ea3abb4c497c0752f (patch) | |
tree | d6cdebd8776bceba06a2fb5e4ed06a4744bc1b57 /configure.ac | |
parent | 1d56581c644c53f1b9a182c6574bc2fc5243d4d1 (diff) |
import version 0.11rc1
This commit has been made by 'bzr import'. I used the upstream tarball
of Version 0.11rc1 for creating it. It has the md5sum:
75608d8bb72dff9a556850ccd0ae8cb9
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 140 |
1 files changed, 119 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac index 714603b2..3aa96832 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([Box Backup], 0.09, [box@fluffy.co.uk]) +AC_INIT([Box Backup], 0.10, [box@fluffy.co.uk]) AC_CONFIG_SRCDIR([lib/common/Box.h]) AC_CONFIG_HEADERS([lib/common/BoxConfig.h]) @@ -27,18 +27,42 @@ if test "x$GXX" = "xyes"; then AC_SUBST([LDADD_RDYNAMIC], ['-rdynamic']) fi +AC_PATH_PROG([PERL], [perl], [AC_MSG_ERROR([[perl executable was not found]])]) + +case $target_os in +mingw*) + TARGET_PERL=perl + ;; +*) + TARGET_PERL=$PERL + ;; +esac + +AC_SUBST([TARGET_PERL]) +AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$TARGET_PERL"], + [Location of the perl executable]) + +AC_CHECK_PROGS([AR], [ar], + [AC_MSG_ERROR([[cannot find ar executable]])]) +AC_CHECK_PROGS([RANLIB], [ranlib], + [AC_MSG_ERROR([[cannot find ranlib executable]])]) ### Checks for libraries. -if test "$target_os" != "mingw32" -a "$target_os" != "winnt"; then +case $target_os in +mingw32*) ;; +winnt) ;; +*) AC_SEARCH_LIBS([nanosleep], [rt], [ac_have_nanosleep=yes], [AC_MSG_ERROR([[cannot find a short sleep function (nanosleep)]])]) -fi + ;; +esac + AC_CHECK_LIB([z], [zlibVersion],, [AC_MSG_ERROR([[cannot find zlib]])]) VL_LIB_READLINE([have_libreadline=yes], [have_libreadline=no]) ## Check for Berkely DB. Restrict to certain versions -AX_PATH_BDB(, [ +AX_PATH_BDB([1.x or 4.1], [ LIBS="$BDB_LIBS $LIBS" LDFLAGS="$BDB_LDFLAGS $LDFLAGS" CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS" @@ -73,26 +97,52 @@ Upgrade or read the documentation for alternatives]]) ### Checks for header files. -if test "$target_os" != "mingw32"; then +case $target_os in +mingw32*) ;; +winnt*) ;; +*) AC_HEADER_DIRENT -fi + ;; +esac AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([execinfo.h process.h pwd.h regex.h signal.h]) +AC_CHECK_HEADERS([dlfcn.h execinfo.h getopt.h process.h pwd.h signal.h]) AC_CHECK_HEADERS([syslog.h time.h]) AC_CHECK_HEADERS([netinet/in.h]) AC_CHECK_HEADERS([sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h]) -AC_CHECK_HEADERS([sys/xattr.h]) +AC_CHECK_HEADERS([sys/uio.h sys/xattr.h]) + +AC_CHECK_HEADER([regex.h], [have_regex_h=yes]) + +if test "$have_regex_h" = "yes"; then + AC_DEFINE([HAVE_REGEX_H], [1], [Define to 1 if regex.h is available]) +else + AC_CHECK_HEADER([pcreposix.h], [have_pcreposix_h=yes]) +fi + +if test "$have_pcreposix_h" = "yes"; then + AC_SEARCH_LIBS([regcomp], ["pcreposix -lpcre"],,[have_pcreposix_h=no_regcomp]) +fi + +if test "$have_pcreposix_h" = "yes"; then + AC_DEFINE([HAVE_PCREPOSIX_H], [1], [Define to 1 if pcreposix.h is available]) +fi -if test "$ac_cv_header_regex_h" = "yes"; then - AC_SEARCH_LIBS([regcomp], [pcreposix]) +if test "$have_regex_h" = "yes" -o "$have_pcreposix_h" = "yes"; then + have_regex_support=yes + AC_DEFINE([HAVE_REGEX_SUPPORT], [1], [Define to 1 if regular expressions are supported]) +else + have_regex_support=no fi +AC_SEARCH_LIBS([dlsym], ["dl"]) + ### Checks for typedefs, structures, and compiler characteristics. AC_CHECK_TYPES([u_int8_t, u_int16_t, u_int32_t, u_int64_t]) AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t, uint64_t]) + AC_HEADER_STDBOOL AC_C_CONST AC_C_BIGENDIAN @@ -102,31 +152,46 @@ AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T + AC_CHECK_MEMBERS([struct stat.st_flags]) AC_CHECK_MEMBERS([struct stat.st_mtimespec]) AC_CHECK_MEMBERS([struct sockaddr_in.sin_len],,, [[ #include <sys/types.h> #include <netinet/in.h> ]]) + AC_CHECK_DECLS([INFTIM],,, [[#include <poll.h>]]) AC_CHECK_DECLS([SO_PEERCRED],,, [[#include <sys/socket.h>]]) +AC_CHECK_DECLS([O_BINARY],,,) + +AC_CHECK_DECLS([optreset],,, [[#include <getopt.h>]]) +AC_CHECK_DECLS([dirfd],,, + [[ + #include <getopt.h> + #include <dirent.h> + ]]) + AC_HEADER_TIME AC_STRUCT_TM AX_CHECK_DIRENT_D_TYPE AC_SYS_LARGEFILE -AX_CHECK_LLONG_MINMAX AX_CHECK_DEFINE_PRAGMA if test "x$ac_cv_c_bigendian" != "xyes"; then AX_BSWAP64 fi -if test "$target_os" != "mingw32"; then + +case $target_os in +mingw32*) ;; +winnt*) ;; +*) AX_RANDOM_DEVICE -fi -AX_CHECK_MOUNT_POINT(,[ - if test "$target_os" != "mingw32" -a "$target_os" != "winnt"; then + AX_CHECK_MOUNT_POINT(,[ AC_MSG_ERROR([[cannot work out how to discover mount points on your platform]]) - fi ]) + AC_CHECK_MEMBERS([struct dirent.d_ino],,, [[#include <dirent.h>]]) +;; +esac + AX_CHECK_MALLOC_WORKAROUND @@ -136,7 +201,7 @@ AC_FUNC_CLOSEDIR_VOID AC_FUNC_ERROR_AT_LINE AC_TYPE_SIGNAL AC_FUNC_STAT -AC_CHECK_FUNCS([getpeereid lchown setproctitle getpid]) +AC_CHECK_FUNCS([getpeereid lchown setproctitle getpid gettimeofday]) # NetBSD implements kqueue too differently for us to get it fixed by 0.10 # TODO: Remove this when NetBSD kqueue implementation is working netbsd_hack=`echo $target_os | sed 's/netbsd.*/netbsd/'` @@ -160,17 +225,28 @@ AC_CACHE_CHECK([if we have large file support enabled], [have_large_file_support [have_large_file_support=yes], [have_large_file_support=no] )]) +if test "x$have_large_file_support" = "xyes"; then + AC_DEFINE([HAVE_LARGE_FILE_SUPPORT], [1], + [Define to 1 if large files are supported]) +fi + ## Find out how to do file locking AC_CHECK_FUNCS([flock]) AC_CHECK_DECLS([O_EXLOCK],,, [[#include <fcntl.h>]]) AC_CHECK_DECLS([F_SETLK],,, [[#include <fcntl.h>]]) + +case $target_os in +mingw32*) ;; +winnt*) ;; +*) if test "x$ac_cv_func_flock" != "xyes" && \ test "x$ac_cv_have_decl_O_EXLOCK" != "xyes" && \ - test "x$ac_cv_have_decl_F_SETLK" != "xyes" && \ - test "$target_os" != "mingw32" -a "$target_os" != "winnt" + test "x$ac_cv_have_decl_F_SETLK" != "xyes" then AC_MSG_ERROR([[cannot work out how to do file locking on your platform]]) fi +;; +esac ## Get tmpdir temp_directory_name="/tmp" @@ -204,12 +280,33 @@ AC_SUBST([bindir_expanded]) ### Output files AC_CONFIG_FILES([infrastructure/BoxPlatform.pm]) +AX_CONFIG_SCRIPTS([bin/bbackupd/bbackupd-config + bin/bbackupquery/makedocumentation.pl + bin/bbstored/bbstored-certs + bin/bbstored/bbstored-config + infrastructure/makebuildenv.pl + infrastructure/makeparcels.pl + infrastructure/makedistribution.pl + lib/common/makeexception.pl + lib/raidfile/raidfile-config + lib/server/makeprotocol.pl + runtest.pl + test/backupstorefix/testfiles/testbackupstorefix.pl + test/bbackupd/testfiles/bbackupd.conf + test/bbackupd/testfiles/extcheck1.pl + test/bbackupd/testfiles/extcheck2.pl + test/bbackupd/testfiles/notifyscript.pl + test/bbackupd/testfiles/syncallowscript.pl]) +# TODO: Need to do contrib/cygwin/install-cygwin-service.pl but location varies AC_OUTPUT # Configure the Box build system echo -perl ./infrastructure/makebuildenv.pl && - perl ./infrastructure/makeparcels.pl +if ! $PERL ./infrastructure/makebuildenv.pl \ +|| ! $PERL ./infrastructure/makeparcels.pl; then + echo "Making infrastructure failed!" + exit 1 +fi # Write summary of important info cat <<EOC @@ -217,6 +314,7 @@ A summary of the build configuration is below. Box Backup will function without these features, but will work better where they are present. Refer to the documentation for more information on each feature. +Regular expressions: $have_regex_support Large files: $have_large_file_support Berkeley DB: $ax_path_bdb_ok Readline: $have_libreadline |