dnl
dnl Process this file with autoconf to produce a configure script.
dnl
-dnl Copyright (C) 2000-2015 Kern Sibbald
+dnl Copyright (C) 2000-2017 Kern Sibbald
dnl License: BSD 2-Clause; see file LICENSE-FOSS
dnl
dnl require a recent autoconf
DEPKGS_VERSION=`sed -n -e 's/^#define DEPKGS_VERSION \(.*\)$/\1/p' ${srcdir}/src/cats/cats.h`
DEPKGS_QT_VERSION=`sed -n -e 's/^#define DEPKGS_QT_VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
BQT_VERSION=`sed -n -e 's/^#define BQT_VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
+VIX_VERSION=`sed -n -e 's/^#define VIX_VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
+JAVA_VERSION=`sed -n -e 's/^#define JAVA_VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
+NDMP_VERSION=`sed -n -e 's/^#define NDMP_VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
+LIBRSYNC_VERSION=`sed -n -e 's/^#define LIBRSYNC_VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
AC_SUBST(VERSION)dnl
AC_SUBST(DATE)dnl
AC_SUBST(LSMDATE)dnl
AC_SUBST(DEPKGS_QT_VERSION)dnl
AC_SUBST(DEPKGS_VERSION)dnl
AC_SUBST(BQT4_VERSION)dnl
+AC_SUBST(VIX_VERSION)dnl
+AC_SUBST(JAVA_VERSION)dnl
+AC_SUBST(NDMP_VERSION)dnl
+AC_SUBST(LIBRSYNC_VERSION)dnl
+
dnl src/lib
dnl can be overwritten by specific values from version.h
AC_SUBST(LIBBACFIND_LT_RELEASE)dnl
-
dnl PFILES are platform or plugin specific files
PFILES="platforms/Makefile"
dnl Check for compiler.
dnl ------------------------------------------------------
-AC_PROG_CC
+AC_PROG_CC dnl this sets $GCC if using GNU C compiler
AC_PROG_CXX
-AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
-AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
+AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
+AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
BASECC=`basename $CC`
have_gcc=no
-if test "x$BASECC" = xgcc; then
+if test x"$GCC" = "xyes"; then
AC_DEFINE(HAVE_GCC)
have_gcc=yes
fi
AC_HEADER_STAT
AC_HEADER_DIRENT
AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr)
-AC_CHECK_FUNCS(lstat lchown lchmod futimes fchmod fchown)
+AC_CHECK_FUNCS(lstat lchown lchmod futimes fchmod fchown lutimes)
AC_CHECK_FUNCS(nanosleep nl_langinfo)
AC_CHECK_FUNCS(be64toh htobe64)
AC_CHECK_HEADERS(varargs.h)
)
AC_SUBST(db_port)
+dnl
+dnl Pickup MySQL SSL options for database user connection
+dnl
+db_ssl_options=
+AC_ARG_WITH(db_ssl_options,
+ AC_HELP_STRING([--with-db-ssl-options=DBSSLOPTIONS], [specify SSL options for database user connection @<:@default=null@:>@]),
+ [
+ if test "x$withval" != "x" ; then
+ db_ssl_options=$withval
+ fi
+ ]
+)
+AC_SUBST(db_ssl_options)
+
#
# Handle users and groups for each daemon
#
AC_CHECK_HEADER(sys/statvfs.h, [ AC_DEFINE(HAVE_SYS_STATVFS_H,1,[Defines if your system have the sys/statvfs.h header file])] , )
+AC_CHECK_DECLS([O_CLOEXEC],,[AC_DEFINE([O_CLOEXEC],[0], [Defined to 0 if not provided])],
+[[
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+]])
+
+AC_CHECK_DECLS([FD_CLOEXEC],,[AC_DEFINE([FD_CLOEXEC],[0], [Defined to 0 if not provided])],
+[[
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+]])
+
+AC_CHECK_DECLS([SOCK_CLOEXEC],,[AC_DEFINE([SOCK_CLOEXEC],[0],[Defined to 0 if not provided])],
+[[
+#ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+]])
+
+AC_CACHE_CHECK(for close on exec modifier for fopen(), ac_cv_feature_stream_cloexec_flag,
+ [if test $ac_cv_have_decl_O_CLOEXEC = yes ; then
+ if test $ac_cv_have_decl_SOCK_CLOEXEC = yes ; then
+ ac_cv_feature_stream_cloexec_flag="e"
+ fi
+ fi])
+
+if test "x$ac_cv_feature_stream_cloexec_flag" = "xe" ; then
+ AC_DEFINE(HAVE_STREAM_CLOEXEC,[0],[Defined to 0 if not provided])
+fi
+
+AC_DEFINE_UNQUOTED([STREAM_CLOEXEC], "$ac_cv_feature_stream_cloexec_flag", [fopen() modifier for setting close on exec flag])
+
+AC_CHECK_FUNC(accept4, [AC_DEFINE(HAVE_ACCEPT4, 1, [Define to 1 if you have the 'accept4' function.])])
+
+S3_INC=
+S3_LIBS=
+S3_LDFLAGS=
+have_libs3=no
+
+if test x$support_s3 = xyes; then
+ AC_ARG_WITH(s3,
+ AC_HELP_STRING([--with-s3@<:@=DIR@:>@], [specify s3 library directory]),
+ [
+ case "$with_s3" in
+ no)
+ :
+ ;;
+ yes|*)
+ if test -f ${with_s3}/include/libs3.h; then
+ S3_INC="-I${with_s3}/include"
+ S3_LDFLAGS="-L${with_s3}/lib"
+ with_s3="${with_s3}/include"
+ else
+ with_s3="/usr/include"
+ fi
+
+ AC_CHECK_HEADER(${with_s3}/libs3.h,
+ [
+ AC_DEFINE(HAVE_LIBS3, 1, [Define to 1 if you have libs3])
+ S3_LIBS="${S3_LDFLAGS} -ls3"
+ have_libs3="yes"
+ ], [
+ echo " "
+ echo "libs3.h not found. s3 turned off ..."
+ echo " "
+ ]
+ )
+ ;;
+ esac
+ ],[
+ AC_CHECK_HEADER(libs3.h,
+ [
+ AC_CHECK_LIB(s3, S3_initialize,
+ [
+ S3_LIBS="-ls3"
+ AC_DEFINE(HAVE_LIBS3,1,[Define to 1 if you have libs3])
+ have_libs3=yes
+ ])
+ ])
+ ])
+fi
+
+AC_SUBST(S3_INC)
+AC_SUBST(S3_LIBS)
+
AC_LANG_PUSH(C++)
AC_CHECK_FUNCS(backtrace)
AC_LANG_POP(C++)
CFLAGS=${CFLAGS--O}
if test x$have_gcc = xyes ; then
- CPPFLAGS="$CPPFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
- CFLAGS="$CFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
+ CPPFLAGS="$CPPFLAGS -x c++ -fno-strict-aliasing -fno-exceptions -fno-rtti"
+ CFLAGS="$CFLAGS -x c++ -fno-strict-aliasing -fno-exceptions -fno-rtti"
fi
LDFLAGS=${LDFLAGS--O}
CPPFLAGS="$CPPFLAGS"
5.7|5.8)
AC_DEFINE(USE_THR_SETCONCURRENCY)
;;
+ 5.10)
+ AC_DEFINE(HAVE_SOLARIS10, 1, [Set if building on Solaris 10])
+ ;;
*)
;;
esac
updatedb/update_mysql_tables_11_to_12 \
updatedb/update_sqlite3_tables_11_to_12 \
updatedb/update_postgresql_tables_11_to_12 \
- updatedb/update_mysql_tables_12_to_13 \
- updatedb/update_postgresql_tables_12_to_13 \
- updatedb/update_mysql_tables_13_to_14 \
- updatedb/update_postgresql_tables_13_to_14 \
examples/nagios/check_bacula/Makefile \
platforms/rpms/redhat/bacula.spec \
platforms/rpms/redhat/bacula-bat.spec \
Database port: ${db_port}
Database name: ${db_name}
Database user: ${db_user}
+ Database SSL options: ${db_ssl_options}
Job Output Email: ${job_email}
Traceback Email: ${dump_email}