| 1 | # -*- Autoconf -*- |
|---|
| 2 | # Process this file with autoconf to produce a configure script. |
|---|
| 3 | |
|---|
| 4 | AC_PREREQ(2.59) |
|---|
| 5 | AC_INIT([Box Backup], 0.11, [boxbackup@boxbackup.org]) |
|---|
| 6 | AC_CONFIG_SRCDIR([lib/common/Box.h]) |
|---|
| 7 | AC_CONFIG_HEADERS([lib/common/BoxConfig.h]) |
|---|
| 8 | |
|---|
| 9 | touch install-sh |
|---|
| 10 | AC_CANONICAL_SYSTEM |
|---|
| 11 | test -s install-sh || rm install-sh |
|---|
| 12 | |
|---|
| 13 | ### Checks for programs. |
|---|
| 14 | |
|---|
| 15 | AC_LANG([C++]) |
|---|
| 16 | AC_PROG_CC |
|---|
| 17 | AC_PROG_CXX |
|---|
| 18 | AC_CXX_EXCEPTIONS |
|---|
| 19 | AC_CXX_NAMESPACES |
|---|
| 20 | if test "x$ac_cv_cxx_exceptions" != "xyes" || \ |
|---|
| 21 | test "x$ac_cv_cxx_namespaces" != "xyes"; then |
|---|
| 22 | AC_MSG_ERROR([[basic compile checks failed, the C++ compiler is broken]]) |
|---|
| 23 | fi |
|---|
| 24 | |
|---|
| 25 | if test "x$GXX" = "xyes"; then |
|---|
| 26 | # Use -Wall if we have gcc. This gives better warnings |
|---|
| 27 | AC_SUBST([CXXFLAGS_STRICT], ['-Wall -Wundef']) |
|---|
| 28 | |
|---|
| 29 | # Use -rdynamic if we have gcc, but not mingw. This is needed for backtrace |
|---|
| 30 | case $target_os in |
|---|
| 31 | mingw*) ;; |
|---|
| 32 | *) AC_SUBST([LDADD_RDYNAMIC], ['-rdynamic']) ;; |
|---|
| 33 | esac |
|---|
| 34 | fi |
|---|
| 35 | |
|---|
| 36 | AC_PATH_PROG([PERL], [perl], [AC_MSG_ERROR([[perl executable was not found]])]) |
|---|
| 37 | |
|---|
| 38 | case $target_os in |
|---|
| 39 | mingw*) |
|---|
| 40 | TARGET_PERL=perl |
|---|
| 41 | ;; |
|---|
| 42 | *) |
|---|
| 43 | TARGET_PERL=$PERL |
|---|
| 44 | ;; |
|---|
| 45 | esac |
|---|
| 46 | |
|---|
| 47 | AC_SUBST([TARGET_PERL]) |
|---|
| 48 | AC_DEFINE_UNQUOTED([PERL_EXECUTABLE], ["$TARGET_PERL"], |
|---|
| 49 | [Location of the perl executable]) |
|---|
| 50 | |
|---|
| 51 | AC_CHECK_TOOL([AR], [ar], |
|---|
| 52 | [AC_MSG_ERROR([[cannot find ar executable]])]) |
|---|
| 53 | AC_CHECK_TOOL([RANLIB], [ranlib], |
|---|
| 54 | [AC_MSG_ERROR([[cannot find ranlib executable]])]) |
|---|
| 55 | |
|---|
| 56 | case $target_os in |
|---|
| 57 | mingw*) |
|---|
| 58 | AC_CHECK_TOOL([WINDRES], [windres], |
|---|
| 59 | [AC_MSG_ERROR([[cannot find windres executable]])]) |
|---|
| 60 | ;; |
|---|
| 61 | esac |
|---|
| 62 | |
|---|
| 63 | ### Checks for libraries. |
|---|
| 64 | |
|---|
| 65 | case $target_os in |
|---|
| 66 | mingw32*) ;; |
|---|
| 67 | winnt) ;; |
|---|
| 68 | *) |
|---|
| 69 | AC_SEARCH_LIBS([nanosleep], [rt], [ac_have_nanosleep=yes], |
|---|
| 70 | [AC_MSG_ERROR([[cannot find a short sleep function (nanosleep)]])]) |
|---|
| 71 | ;; |
|---|
| 72 | esac |
|---|
| 73 | |
|---|
| 74 | AC_CHECK_HEADER([zlib.h],, [AC_MSG_ERROR([[cannot find zlib.h]])]) |
|---|
| 75 | AC_CHECK_LIB([z], [zlibVersion],, [AC_MSG_ERROR([[cannot find zlib]])]) |
|---|
| 76 | VL_LIB_READLINE([have_libreadline=yes], [have_libreadline=no]) |
|---|
| 77 | |
|---|
| 78 | ## Check for Berkely DB. Restrict to certain versions |
|---|
| 79 | AX_PATH_BDB([1.x or 4.1], [ |
|---|
| 80 | LIBS="$BDB_LIBS $LIBS" |
|---|
| 81 | LDFLAGS="$BDB_LDFLAGS $LDFLAGS" |
|---|
| 82 | CPPFLAGS="$CPPFLAGS $BDB_CPPFLAGS" |
|---|
| 83 | |
|---|
| 84 | AX_COMPARE_VERSION([$BDB_VERSION],[ge],[4.1],, |
|---|
| 85 | [AX_COMPARE_VERSION([$BDB_VERSION],[lt],[2],, |
|---|
| 86 | [AC_MSG_ERROR([[only Berkely DB versions 1.x or at least 4.1 are currently supported]])] |
|---|
| 87 | )] |
|---|
| 88 | ) |
|---|
| 89 | AX_SPLIT_VERSION([BDB_VERSION], [$BDB_VERSION]) |
|---|
| 90 | ]) |
|---|
| 91 | |
|---|
| 92 | ## Check for Open SSL, use old versions only if explicitly requested |
|---|
| 93 | AC_SEARCH_LIBS([gethostbyname], [nsl socket resolv]) |
|---|
| 94 | AC_SEARCH_LIBS([shutdown], [nsl socket resolv]) |
|---|
| 95 | AX_CHECK_SSL(, [AC_MSG_ERROR([[OpenSSL is not installed but is required]])]) |
|---|
| 96 | AC_ARG_ENABLE( |
|---|
| 97 | [old-ssl], |
|---|
| 98 | [AC_HELP_STRING([--enable-old-ssl], |
|---|
| 99 | [Allow use of pre-0.9.7 Open SSL - NOT RECOMMENDED, read the documentation])]) |
|---|
| 100 | AC_CHECK_LIB( |
|---|
| 101 | [crypto], |
|---|
| 102 | [EVP_CipherInit_ex],, [ |
|---|
| 103 | if test "x$enable_old_ssl" = "xyes"; then |
|---|
| 104 | AC_DEFINE([HAVE_OLD_SSL], 1, [Define to 1 if SSL is pre-0.9.7]) |
|---|
| 105 | else |
|---|
| 106 | AC_MSG_ERROR([[found an old (pre 0.9.7) version of SSL. |
|---|
| 107 | Upgrade or read the documentation for alternatives]]) |
|---|
| 108 | fi |
|---|
| 109 | ]) |
|---|
| 110 | |
|---|
| 111 | |
|---|
| 112 | ### Checks for header files. |
|---|
| 113 | |
|---|
| 114 | case $target_os in |
|---|
| 115 | mingw32*) ;; |
|---|
| 116 | winnt*) ;; |
|---|
| 117 | *) |
|---|
| 118 | AC_HEADER_DIRENT |
|---|
| 119 | ;; |
|---|
| 120 | esac |
|---|
| 121 | |
|---|
| 122 | AC_HEADER_STDC |
|---|
| 123 | AC_HEADER_SYS_WAIT |
|---|
| 124 | AC_CHECK_HEADERS([dlfcn.h execinfo.h getopt.h process.h pwd.h signal.h]) |
|---|
| 125 | AC_CHECK_HEADERS([syslog.h time.h cxxabi.h]) |
|---|
| 126 | AC_CHECK_HEADERS([netinet/in.h]) |
|---|
| 127 | AC_CHECK_HEADERS([sys/param.h sys/socket.h sys/time.h sys/types.h sys/wait.h]) |
|---|
| 128 | AC_CHECK_HEADERS([sys/uio.h sys/xattr.h]) |
|---|
| 129 | |
|---|
| 130 | AC_CHECK_HEADER([regex.h], [have_regex_h=yes]) |
|---|
| 131 | |
|---|
| 132 | if test "$have_regex_h" = "yes"; then |
|---|
| 133 | AC_DEFINE([HAVE_REGEX_H], [1], [Define to 1 if regex.h is available]) |
|---|
| 134 | else |
|---|
| 135 | AC_CHECK_HEADER([pcreposix.h], [have_pcreposix_h=yes]) |
|---|
| 136 | fi |
|---|
| 137 | |
|---|
| 138 | if test "$have_pcreposix_h" = "yes"; then |
|---|
| 139 | AC_DEFINE([PCRE_STATIC], [1], [Box Backup always uses static PCRE]) |
|---|
| 140 | AC_SEARCH_LIBS([regcomp], ["pcreposix -lpcre"],,[have_pcreposix_h=no_regcomp]) |
|---|
| 141 | fi |
|---|
| 142 | |
|---|
| 143 | if test "$have_pcreposix_h" = "yes"; then |
|---|
| 144 | AC_DEFINE([HAVE_PCREPOSIX_H], [1], [Define to 1 if pcreposix.h is available]) |
|---|
| 145 | fi |
|---|
| 146 | |
|---|
| 147 | if test "$have_regex_h" = "yes" -o "$have_pcreposix_h" = "yes"; then |
|---|
| 148 | have_regex_support=yes |
|---|
| 149 | AC_DEFINE([HAVE_REGEX_SUPPORT], [1], [Define to 1 if regular expressions are supported]) |
|---|
| 150 | else |
|---|
| 151 | have_regex_support=no |
|---|
| 152 | fi |
|---|
| 153 | |
|---|
| 154 | AC_SEARCH_LIBS([dlsym], ["dl"]) |
|---|
| 155 | |
|---|
| 156 | ### Checks for typedefs, structures, and compiler characteristics. |
|---|
| 157 | |
|---|
| 158 | AC_CHECK_TYPES([u_int8_t, u_int16_t, u_int32_t, u_int64_t]) |
|---|
| 159 | AC_CHECK_TYPES([uint8_t, uint16_t, uint32_t, uint64_t]) |
|---|
| 160 | |
|---|
| 161 | AC_HEADER_STDBOOL |
|---|
| 162 | AC_C_CONST |
|---|
| 163 | AC_C_BIGENDIAN |
|---|
| 164 | AC_TYPE_UID_T |
|---|
| 165 | AC_TYPE_MODE_T |
|---|
| 166 | AC_TYPE_OFF_T |
|---|
| 167 | AC_TYPE_PID_T |
|---|
| 168 | AC_TYPE_SIZE_T |
|---|
| 169 | |
|---|
| 170 | AC_CHECK_MEMBERS([struct stat.st_flags]) |
|---|
| 171 | AC_CHECK_MEMBERS([struct stat.st_mtimespec]) |
|---|
| 172 | AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec]) |
|---|
| 173 | AC_CHECK_MEMBERS([struct stat.st_atimensec]) |
|---|
| 174 | AC_CHECK_MEMBERS([struct sockaddr_in.sin_len],,, [[ |
|---|
| 175 | #include <sys/types.h> |
|---|
| 176 | #include <netinet/in.h> |
|---|
| 177 | ]]) |
|---|
| 178 | AC_CHECK_MEMBERS([DIR.d_fd],,, [[#include <dirent.h>]]) |
|---|
| 179 | AC_CHECK_MEMBERS([DIR.dd_fd],,, [[#include <dirent.h>]]) |
|---|
| 180 | |
|---|
| 181 | AC_CHECK_DECLS([INFTIM],,, [[#include <poll.h>]]) |
|---|
| 182 | AC_CHECK_DECLS([SO_PEERCRED],,, [[#include <sys/socket.h>]]) |
|---|
| 183 | AC_CHECK_DECLS([O_BINARY],,,) |
|---|
| 184 | |
|---|
| 185 | # Solaris provides getpeerucred() instead of getpeereid() or SO_PEERCRED |
|---|
| 186 | AC_CHECK_HEADERS([ucred.h]) |
|---|
| 187 | AC_CHECK_FUNCS([getpeerucred]) |
|---|
| 188 | |
|---|
| 189 | AC_CHECK_DECLS([optreset],,, [[#include <getopt.h>]]) |
|---|
| 190 | AC_CHECK_DECLS([dirfd],,, |
|---|
| 191 | [[ |
|---|
| 192 | #include <getopt.h> |
|---|
| 193 | #include <dirent.h> |
|---|
| 194 | ]]) |
|---|
| 195 | |
|---|
| 196 | AC_HEADER_TIME |
|---|
| 197 | AC_STRUCT_TM |
|---|
| 198 | AX_CHECK_DIRENT_D_TYPE |
|---|
| 199 | AC_SYS_LARGEFILE |
|---|
| 200 | AX_CHECK_DEFINE_PRAGMA |
|---|
| 201 | if test "x$ac_cv_c_bigendian" != "xyes"; then |
|---|
| 202 | AX_BSWAP64 |
|---|
| 203 | fi |
|---|
| 204 | |
|---|
| 205 | case $target_os in |
|---|
| 206 | mingw32*) ;; |
|---|
| 207 | winnt*) ;; |
|---|
| 208 | *) |
|---|
| 209 | AX_RANDOM_DEVICE |
|---|
| 210 | AX_CHECK_MOUNT_POINT(,[ |
|---|
| 211 | AC_MSG_ERROR([[cannot work out how to discover mount points on your platform]]) |
|---|
| 212 | ]) |
|---|
| 213 | AC_CHECK_MEMBERS([struct dirent.d_ino],,, [[#include <dirent.h>]]) |
|---|
| 214 | ;; |
|---|
| 215 | esac |
|---|
| 216 | |
|---|
| 217 | AX_CHECK_MALLOC_WORKAROUND |
|---|
| 218 | |
|---|
| 219 | |
|---|
| 220 | ### Checks for library functions. |
|---|
| 221 | |
|---|
| 222 | AC_FUNC_CLOSEDIR_VOID |
|---|
| 223 | AC_FUNC_ERROR_AT_LINE |
|---|
| 224 | AC_TYPE_SIGNAL |
|---|
| 225 | AC_FUNC_STAT |
|---|
| 226 | AC_CHECK_FUNCS([getpeereid lchown setproctitle getpid gettimeofday waitpid]) |
|---|
| 227 | |
|---|
| 228 | # NetBSD implements kqueue too differently for us to get it fixed by 0.10 |
|---|
| 229 | # TODO: Remove this when NetBSD kqueue implementation is working |
|---|
| 230 | netbsd_hack=`echo $target_os | sed 's/netbsd.*/netbsd/'` |
|---|
| 231 | if test "$netbsd_hack" != "netbsd"; then |
|---|
| 232 | AC_CHECK_FUNCS([kqueue]) |
|---|
| 233 | fi |
|---|
| 234 | |
|---|
| 235 | AX_FUNC_SYSCALL |
|---|
| 236 | AX_CHECK_SYSCALL_LSEEK |
|---|
| 237 | AC_CHECK_FUNCS([listxattr llistxattr getxattr lgetxattr setxattr lsetxattr]) |
|---|
| 238 | AC_CHECK_DECLS([XATTR_NOFOLLOW],,, [[#include <sys/xattr.h>]]) |
|---|
| 239 | |
|---|
| 240 | |
|---|
| 241 | ### Miscellaneous complicated feature checks |
|---|
| 242 | |
|---|
| 243 | ## Check for large file support active. AC_SYS_LARGEFILE has already worked |
|---|
| 244 | ## out how to enable it if necessary, we just use this to report to the user |
|---|
| 245 | AC_CACHE_CHECK([if we have large file support enabled], |
|---|
| 246 | [box_cv_have_large_file_support], |
|---|
| 247 | [AC_TRY_RUN([ |
|---|
| 248 | $ac_includes_default |
|---|
| 249 | int main() |
|---|
| 250 | { |
|---|
| 251 | return sizeof(off_t)==4; |
|---|
| 252 | } |
|---|
| 253 | ], |
|---|
| 254 | [box_cv_have_large_file_support=yes], |
|---|
| 255 | [box_cv_have_large_file_support=no], |
|---|
| 256 | [box_cv_have_large_file_support=no # safe for cross-compile] |
|---|
| 257 | ) |
|---|
| 258 | ]) |
|---|
| 259 | |
|---|
| 260 | if test "x$box_cv_have_large_file_support" = "xyes"; then |
|---|
| 261 | AC_DEFINE([HAVE_LARGE_FILE_SUPPORT], [1], |
|---|
| 262 | [Define to 1 if large files are supported]) |
|---|
| 263 | fi |
|---|
| 264 | |
|---|
| 265 | ## Find out how to do file locking |
|---|
| 266 | AC_CHECK_FUNCS([flock]) |
|---|
| 267 | AC_CHECK_DECLS([O_EXLOCK],,, [[#include <fcntl.h>]]) |
|---|
| 268 | AC_CHECK_DECLS([F_SETLK],,, [[#include <fcntl.h>]]) |
|---|
| 269 | |
|---|
| 270 | case $target_os in |
|---|
| 271 | mingw32*) ;; |
|---|
| 272 | winnt*) ;; |
|---|
| 273 | *) |
|---|
| 274 | if test "x$ac_cv_func_flock" != "xyes" && \ |
|---|
| 275 | test "x$ac_cv_have_decl_O_EXLOCK" != "xyes" && \ |
|---|
| 276 | test "x$ac_cv_have_decl_F_SETLK" != "xyes" |
|---|
| 277 | then |
|---|
| 278 | AC_MSG_ERROR([[cannot work out how to do file locking on your platform]]) |
|---|
| 279 | fi |
|---|
| 280 | ;; |
|---|
| 281 | esac |
|---|
| 282 | |
|---|
| 283 | ## Get tmpdir |
|---|
| 284 | temp_directory_name="/tmp" |
|---|
| 285 | AC_ARG_WITH( |
|---|
| 286 | [tmp-dir], |
|---|
| 287 | [AC_HELP_STRING([--with-tmp-dir=DIR], [Directory for temporary files [/tmp]])], |
|---|
| 288 | [temp_directory_name="$withval"]) |
|---|
| 289 | AC_DEFINE_UNQUOTED([TEMP_DIRECTORY_NAME], ["$temp_directory_name"], [TMP directory name]) |
|---|
| 290 | |
|---|
| 291 | ## Allow linking binaries with static libraries |
|---|
| 292 | AC_ARG_ENABLE( |
|---|
| 293 | [static-bin], |
|---|
| 294 | [AC_HELP_STRING([--enable-static-bin], [Link binaries with static libraries])]) |
|---|
| 295 | if test "x$enable_static_bin" = "xyes"; then |
|---|
| 296 | AC_CHECK_LIB([ssl],[SSL_read],,, [crypto]) |
|---|
| 297 | LIBS="-Wl,-Bstatic $LIBS -Wl,-Bdynamic" |
|---|
| 298 | fi |
|---|
| 299 | |
|---|
| 300 | # override default sysconfdir, for backwards compatibility |
|---|
| 301 | test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc |
|---|
| 302 | test "$localstatedir" = '${prefix}/var' && localstatedir=/var |
|---|
| 303 | |
|---|
| 304 | ## Kludge to allow makeparcels.pl to use bindir. This is not a good long term |
|---|
| 305 | ## solution because it prevents use of "make exec_prefix=/some/dir" |
|---|
| 306 | saved_prefix=$prefix |
|---|
| 307 | saved_exec_prefix=$exec_prefix |
|---|
| 308 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
|---|
| 309 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
|---|
| 310 | eval bindir_expanded=` eval "echo $bindir"` |
|---|
| 311 | eval sbindir_expanded=` eval "echo $sbindir"` |
|---|
| 312 | eval sysconfdir_expanded=` eval "echo $sysconfdir"` |
|---|
| 313 | eval localstatedir_expanded=`eval "echo $localstatedir"` |
|---|
| 314 | prefix=$saved_prefix |
|---|
| 315 | exec_prefix=$saved_exec_prefix |
|---|
| 316 | AC_SUBST([bindir_expanded]) |
|---|
| 317 | AC_SUBST([sbindir_expanded]) |
|---|
| 318 | AC_SUBST([sysconfdir_expanded]) |
|---|
| 319 | AC_SUBST([localstatedir_expanded]) |
|---|
| 320 | |
|---|
| 321 | ## Figure out the client parcel directory and substitute it |
|---|
| 322 | build_dir=`dirname $0` |
|---|
| 323 | build_dir=`cd $build_dir && pwd` |
|---|
| 324 | client_parcel_dir=`$PERL infrastructure/parcelpath.pl backup-client $target_os` |
|---|
| 325 | |
|---|
| 326 | if test "$build_os" = "cygwin"; then |
|---|
| 327 | client_parcel_dir=`cygpath -wa $client_parcel_dir | sed -e 's|\\\|/|g'` |
|---|
| 328 | build_dir=` cygpath -wa $build_dir | sed -e 's|\\\|/|g'` |
|---|
| 329 | fi |
|---|
| 330 | |
|---|
| 331 | AC_SUBST([client_parcel_dir]) |
|---|
| 332 | AC_SUBST([build_dir]) |
|---|
| 333 | |
|---|
| 334 | ## Figure out version and substitute it in |
|---|
| 335 | box_version=`$PERL infrastructure/printversion.pl` |
|---|
| 336 | AC_SUBST([box_version]) |
|---|
| 337 | |
|---|
| 338 | ### Output files |
|---|
| 339 | AC_CONFIG_FILES([infrastructure/BoxPlatform.pm |
|---|
| 340 | contrib/mac_osx/org.boxbackup.bbackupd.plist |
|---|
| 341 | contrib/mac_osx/org.boxbackup.bbstored.plist |
|---|
| 342 | contrib/solaris/bbackupd-manifest.xml |
|---|
| 343 | contrib/solaris/bbstored-manifest.xml |
|---|
| 344 | lib/common/BoxPortsAndFiles.h |
|---|
| 345 | test/bbackupd/testfiles/bbackupd.conf |
|---|
| 346 | test/bbackupd/testfiles/bbackupd-exclude.conf |
|---|
| 347 | test/bbackupd/testfiles/bbackupd-snapshot.conf |
|---|
| 348 | test/bbackupd/testfiles/bbackupd-symlink.conf |
|---|
| 349 | ]) |
|---|
| 350 | AX_CONFIG_SCRIPTS([bin/bbackupd/bbackupd-config |
|---|
| 351 | bin/bbackupquery/makedocumentation.pl |
|---|
| 352 | bin/bbstored/bbstored-certs |
|---|
| 353 | bin/bbstored/bbstored-config |
|---|
| 354 | contrib/debian/bbackupd |
|---|
| 355 | contrib/debian/bbstored |
|---|
| 356 | contrib/redhat/bbackupd |
|---|
| 357 | contrib/redhat/bbstored |
|---|
| 358 | contrib/suse/bbackupd |
|---|
| 359 | contrib/suse/bbstored |
|---|
| 360 | contrib/solaris/bbackupd-smf-method |
|---|
| 361 | contrib/solaris/bbstored-smf-method |
|---|
| 362 | contrib/windows/installer/boxbackup.mpi |
|---|
| 363 | infrastructure/makebuildenv.pl |
|---|
| 364 | infrastructure/makeparcels.pl |
|---|
| 365 | infrastructure/makedistribution.pl |
|---|
| 366 | lib/common/makeexception.pl |
|---|
| 367 | lib/raidfile/raidfile-config |
|---|
| 368 | lib/server/makeprotocol.pl |
|---|
| 369 | runtest.pl |
|---|
| 370 | test/backupstorefix/testfiles/testbackupstorefix.pl |
|---|
| 371 | test/bbackupd/testfiles/extcheck1.pl |
|---|
| 372 | test/bbackupd/testfiles/extcheck2.pl |
|---|
| 373 | test/bbackupd/testfiles/notifyscript.pl |
|---|
| 374 | test/bbackupd/testfiles/syncallowscript.pl]) |
|---|
| 375 | # TODO: Need to do contrib/cygwin/install-cygwin-service.pl but location varies |
|---|
| 376 | AC_OUTPUT |
|---|
| 377 | |
|---|
| 378 | # Configure the Box build system |
|---|
| 379 | echo |
|---|
| 380 | if ! $PERL ./infrastructure/makebuildenv.pl \ |
|---|
| 381 | || ! $PERL ./infrastructure/makeparcels.pl; then |
|---|
| 382 | echo "Making infrastructure failed!" |
|---|
| 383 | exit 1 |
|---|
| 384 | fi |
|---|
| 385 | |
|---|
| 386 | cat parcels.txt | sed -e 's/#.*//' | while read cmd subdir configure_args; do |
|---|
| 387 | if test "$cmd" = "configure"; then |
|---|
| 388 | echo |
|---|
| 389 | export CC CXX CXXFLAGS LDFLAGS LIBS |
|---|
| 390 | args="$configure_args --target=$target_alias" |
|---|
| 391 | echo "Configuring $subdir with: $args" |
|---|
| 392 | |
|---|
| 393 | cd $subdir |
|---|
| 394 | if ! ./configure $args; then |
|---|
| 395 | echo "Configuring $subdir with $args failed!" >&2 |
|---|
| 396 | exit 1 |
|---|
| 397 | fi |
|---|
| 398 | fi |
|---|
| 399 | done || exit $? |
|---|
| 400 | |
|---|
| 401 | # Write summary of important info |
|---|
| 402 | cat <<EOC |
|---|
| 403 | A summary of the build configuration is below. Box Backup will function |
|---|
| 404 | without these features, but will work better where they are present. Refer |
|---|
| 405 | to the documentation for more information on each feature. |
|---|
| 406 | |
|---|
| 407 | Regular expressions: $have_regex_support |
|---|
| 408 | Large files: $box_cv_have_large_file_support |
|---|
| 409 | Berkeley DB: $ax_path_bdb_ok |
|---|
| 410 | Readline: $have_libreadline |
|---|
| 411 | Extended attributes: $ac_cv_header_sys_xattr_h |
|---|
| 412 | EOC | tee config.log.features |
|---|
| 413 | |
|---|
| 414 | |
|---|
| 415 | ### Warnings at end for visibility |
|---|
| 416 | |
|---|
| 417 | if test "x$box_cv_gcc_3_plus" != "xyes" && test "x$box_cv_malloc_workaround" != "xyes"; then |
|---|
| 418 | echo |
|---|
| 419 | AC_MSG_WARN([[the implementation of the C++ STL on this platform may |
|---|
| 420 | have a flaw which causes it to apparently leak memory, and this flaw cannot be |
|---|
| 421 | worked around. |
|---|
| 422 | |
|---|
| 423 | When running the daemons, check their memory usage does not constantly |
|---|
| 424 | increase. The STL flaw can cause excessive memory use.]]) |
|---|
| 425 | fi |
|---|
| 426 | |
|---|
| 427 | case "$vl_cv_lib_readline" in |
|---|
| 428 | *readline*) |
|---|
| 429 | echo |
|---|
| 430 | AC_MSG_WARN([[do not distribute binaries compiled against GNU readline, |
|---|
| 431 | as this could violate the GNU readline licence, which is GPL. You may use |
|---|
| 432 | libedit or libeditline instead.]]) |
|---|
| 433 | ;; |
|---|
| 434 | esac |
|---|