]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/autoconf/configure.in
Fix typo.
[bacula/bacula] / bacula / autoconf / configure.in
index b6a9fde2e21a5fd028b3dba946dd47fe93cd9a5c..123732806112a76cafe11b42ca21b13d00ddd723 100644 (file)
@@ -178,6 +178,7 @@ AC_ARG_ENABLE(libtool,
    ]
 )
 LT_INIT([shared disable-static])
+LT_LIB_DLLOAD
 LT_LANG([C++])
 
 if test x$use_libtool != xno; then
@@ -957,7 +958,7 @@ AC_ARG_WITH(python,
                PYTHON_LIBS=`/usr/bin/python-config --libs`
             else
                for python_root in /usr /usr/local /usr/sfw; do
-                  for ver in python2.2 python2.3 python2.4 python2.5 python2.6 python3; do
+                  for ver in python2.2 python2.3 python2.4 python2.5 python2.6 python2.7 python3; do
                      if test -f $python_root/include/${ver}/Python.h; then
                         PYTHON_INCDIR=-I$python_root/include/${ver}
                         if test -d $python_root/lib64/${ver}/config; then
@@ -1215,7 +1216,7 @@ AC_SEARCH_LIBS(dlopen, [dl])
 dnl ------------------------------------------
 dnl Where to place working dir
 dnl ------------------------------------------
-working_dir=`eval echo ${prefix}/var/bacula/working`
+working_dir=`eval echo ${prefix}/opt/bacula/working`
 AC_ARG_WITH(working-dir,
    AC_HELP_STRING([--with-working-dir=PATH], [specify path of Bacula working directory]),
    [
@@ -1300,7 +1301,7 @@ AC_SUBST(scriptdir)
 dnl ------------------------------------------
 dnl Where to place bsrdir (bsr files)
 dnl ------------------------------------------
-bsrdir=/tmp
+bsrdir=`eval echo ${prefix}/opt/bacula/bsr`
 AC_ARG_WITH(bsrdir,
    AC_HELP_STRING([--with-bsrdir=PATH], [specify path of Bacula bsrs directory]),
    [
@@ -1315,7 +1316,7 @@ AC_SUBST(bsrdir)
 dnl ------------------------------------------
 dnl Where to place logdir (bsr files)
 dnl ------------------------------------------
-logdir=/tmp
+logdir=`eval echo ${prefix}/opt/bacula/log`
 AC_ARG_WITH(logdir,
    AC_HELP_STRING([--with-logdir=PATH], [specify path of Bacula logs directory]),
    [
@@ -1865,6 +1866,7 @@ AC_CHECK_HEADERS( \
    stdarg.h \
    stdlib.h \
    stdint.h \
+   inttypes.h \
    string.h \
    strings.h \
    termios.h \
@@ -2349,7 +2351,7 @@ AC_CHECK_FUNCS( \
 
 AC_CHECK_DECL(
     F_CLOSEM,
-    AC_DEFINE(HAVE_FCNTL_F_CLOSEM),
+    AC_DEFINE(HAVE_FCNTL_F_CLOSEM, 1, [Set if you have 'F_CLOSEM' fcntl flag]),
     ,
     [#include <fcntl.h>]
 )
@@ -2377,7 +2379,7 @@ AC_CACHE_CHECK(for va_copy, ba_cv_va_copy,
          ], [
              call_use_va_copy(1,2,3)
          ], [
-             ba_cv_va_copy=yes,
+             ba_cv_va_copy=yes
          ], [
              ba_cv_va_copy=no
          ]
@@ -2433,35 +2435,35 @@ dnl
 AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,
    [
        AC_TRY_RUN(
-          [
-              #include <netdb.h>
-              #include <string.h>
-              #include <sys/types.h>
-              #include <sys/socket.h>
-
-              void main(void) {
-                  struct addrinfo hints, *ai;
-                  int error;
-
-                  memset(&hints, 0, sizeof(hints));
-                  hints.ai_family = AF_UNSPEC;
-                  hints.ai_socktype = SOCK_STREAM;
-                  error = getaddrinfo("127.0.0.1", NULL, &hints, &ai);
-                  if (error) {
-                      exit(1);
-                  }
-                  if (ai->ai_addr->sa_family != AF_INET) {
-                      exit(1);
-                  }
-                  exit(0);
-              }
-          ],[
-              ac_cv_working_getaddrinfo="yes"
-          ],[
-              ac_cv_working_getaddrinfo="no"
-          ],[
-              ac_cv_working_getaddrinfo="yes"
-          ]
+         [
+             #include <netdb.h>
+             #include <string.h>
+             #include <sys/types.h>
+             #include <sys/socket.h>
+
+             void main(void) {
+                 struct addrinfo hints, *ai;
+                 int error;
+
+                 memset(&hints, 0, sizeof(hints));
+                 hints.ai_family = AF_UNSPEC;
+                 hints.ai_socktype = SOCK_STREAM;
+                 error = getaddrinfo("127.0.0.1", NULL, &hints, &ai);
+                 if (error) {
+                     exit(1);
+                 }
+                 if (ai->ai_addr->sa_family != AF_INET) {
+                     exit(1);
+                 }
+                 exit(0);
+             }
+         ],[
+             ac_cv_working_getaddrinfo="yes"
+         ],[
+             ac_cv_working_getaddrinfo="no"
+         ],[
+             ac_cv_working_getaddrinfo="yes"
+         ]
        )
    ]
 )
@@ -2515,6 +2517,113 @@ AC_CHECK_HEADER(lzo/lzoconf.h,
 ])
 AC_SUBST(LZOLIBS)
 
+dnl
+dnl Check if we have AFS on this system
+dnl
+AFS_CFLAGS=""
+AFS_LIBS=""
+support_afs=auto
+AC_ARG_ENABLE(afs,
+   AC_HELP_STRING([--disable-afs], [disable afs support @<:@default=auto@:>@]),
+   [
+       if test x$enableval = xyes; then
+         support_afs=yes
+       elif test x$enableval = xno; then
+         support_afs=no
+       fi
+   ]
+)
+
+have_afs=no
+if test x$support_afs = xyes -o x$support_afs = xauto; then
+   AC_ARG_WITH(afsdir,
+      AC_HELP_STRING([--with-afsdir@<:@=DIR@:>@], [Directory holding AFS includes/libs]),
+      with_afsdir=$withval
+   )
+
+   dnl
+   dnl Search in standard places, or --with-afsdir not specified
+   dnl
+   if test x$with_afsdir = x; then
+      for root in /usr /usr/local; do
+        if test -d ${root}/include/afs/ ; then
+           with_afsdir=${root}
+           break
+        fi
+        if test -d ${root}/include/openafs/afs/ ; then
+           with_afsdir=${root}
+           break
+        fi
+      done
+   fi
+
+   if test -d ${with_afsdir}/include/afs/ ; then
+      AFS_CFLAGS="-I${with_afsdir}/include"
+   else
+      if test -d ${with_afsdir}/include/openafs/afs/ ; then
+        AFS_CFLAGS="-I${with_afsdir}/include/openafs"
+      fi
+   fi
+
+   saved_CFLAGS="${CFLAGS}"
+   saved_CPPFLAGS="${CPPFLAGS}"
+   CFLAGS="${AFS_CFLAGS} ${saved_CFLAGS}"
+   CPPFLAGS="${AFS_CFLAGS} ${saved_CPPFLAGS}"
+
+   AC_CHECK_HEADERS(afs/afsint.h)
+   AC_TRY_CPP(
+       [
+         #include <afs/afsint.h>
+         #include <afs/venus.h>
+       ],
+       AC_DEFINE(HAVE_AFS_VENUS_H,1,[Define to 1 if you have the <afs/venus.h> header file.])
+   )
+
+   CFLAGS="${saved_CFLAGS}"
+   CPPFLAGS="${saved_CPPFLAGS}"
+
+   dnl
+   dnl See if we can find a libsys with the pioctl symbol in there
+   dnl
+   AC_MSG_CHECKING(for pioctl in AFS libsys)
+   for dir in ${with_afsdir}/lib \
+             ${with_afsdir}/lib/afs \
+             ${with_afsdir}/lib/openafs \
+             ${with_afsdir}/lib64 \
+             ${with_afsdir}/lib64/afs \
+             ${with_afsdir}/lib64/openafs
+   do
+      for arch_type in .a .so
+      do
+        A=`test -f ${dir}/libsys${arch_type} && nm ${dir}/libsys${arch_type} 2>/dev/null | grep pioctl`
+        pkg=$?
+        if test $pkg = 0; then
+           have_afs=yes
+           AFS_LIBS="-L${dir} -lsys -lrx -llwp ${dir}/util${arch_type}"
+           break
+        fi
+      done
+   done
+
+   if test $have_afs = yes; then
+      AC_MSG_RESULT(yes)
+   else
+      AC_MSG_RESULT(no)
+   fi
+
+   if test x$support_afs = xyes -a $have_afs != yes; then
+      AC_MSG_ERROR([afs support explicitly enabled but no supported afs implementation found,
+  please either load the afs libraries or rerun configure without --enable-afs])
+   else
+      if test $have_afs = yes; then
+        AC_DEFINE(HAVE_AFS,1,[Define to 1 if your system has AFS support])
+        AC_DEFINE(HAVE_AFS_ACL,1,[Andrew FileSystem ACL support])
+      fi
+   fi
+fi
+AC_SUBST(AFS_CFLAGS)
+AC_SUBST(AFS_LIBS)
+
 dnl
 dnl Check for ACL support and libraries
 dnl
@@ -2551,7 +2660,18 @@ if test x$support_acl = xyes -o x$support_acl = xauto; then
       AC_CHECK_LIB(acl, acl_get_file,
         [
             have_acl=yes
-            FDLIBS="-lacl $FDLIBS"
+            if test $have_afs = yes; then
+               dnl
+               dnl Because of possible naming conflict with AFS libacl make sure we use the one in /usr/lib64 or /usr/lib !!!
+               dnl
+               if test -d /usr/lib64/; then
+                  FDLIBS="-L/usr/lib64 -lacl $FDLIBS"
+               else
+                  FDLIBS="-L/usr/lib -lacl $FDLIBS"
+               fi
+            else
+               FDLIBS="-lacl $FDLIBS"
+            fi
         ]
       )
    fi
@@ -3032,6 +3152,16 @@ freebsd)
        platforms/freebsd/bacula-dir"
    largefile_support="yes"
   ;;
+hurd)
+   DISTVER=`uname -r`
+   TAPEDRIVE="/dev/nst0"
+   PSCMD="ps -e -o pid,command"
+   PFILES="${PFILES} \
+       platforms/hurd/Makefile \
+       platforms/hurd/bacula-fd \
+       platforms/hurd/bacula-sd \
+       platforms/hurd/bacula-dir"
+  ;;
 hpux)
    PSCMD="UNIX95=1; ps -e -o pid,comm"
    CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
@@ -3201,6 +3331,7 @@ AC_ARG_WITH(systemd,
 
           PFILES="${PFILES} \
                   platforms/systemd/Makefile \
+                  platforms/systemd/bacula.conf \
                   platforms/systemd/bacula-dir.service \
                   platforms/systemd/bacula-fd.service \
                   platforms/systemd/bacula-sd.service"
@@ -3520,6 +3651,7 @@ Configuration on `date`:
    build-dird:              ${build_dird}
    build-stored:            ${build_stored}
    Plugin support:          ${have_plugins}
+   AFS support:             ${have_afs}
    ACL support:             ${have_acl}
    XATTR support:           ${have_xattr}
    Python support:          ${support_python} ${PYTHON_LIBS}