]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/autoconf/configure.in
remove a ref to sqlite
[bacula/bacula] / bacula / autoconf / configure.in
index fb074230d8e93fc12b07f0464c4bc1cbff7522f1..8ae54982edc7a96ad225ee935c80d06fd2b72e2c 100644 (file)
@@ -132,6 +132,7 @@ AC_SUBST(LOCAL_DEFS)
 dnl --------------------------------------------------
 dnl Libtool config
 dnl --------------------------------------------------
+use_libtool=yes
 AC_ARG_ENABLE(libtool,
    AC_HELP_STRING([--enable-libtool], [enable building using GNU libtool @<:@default=yes@:>@]),
    [
@@ -225,13 +226,29 @@ dnl --includedir, we set it to the package default of /usr/include.
 dnl If either --prefix or --includedir is set, we leave includedir
 dnl alone except to eval it
 dnl ------------------------------------------------------------------
+os_name=`uname -s 2>/dev/null`
 if test x${prefix} = xNONE ; then
    if test `eval echo ${sysconfdir}` = NONE/etc ; then
       sysconfdir=/etc/bacula
    fi
 
    if test `eval echo ${libdir}` = NONE/lib ; then
-      libdir=/usr/lib
+      case ${os_name} in
+      Linux)
+        os_processor=`uname -p 2>/dev/null`
+        case ${os_processor} in
+        x86_64)
+           libdir=/usr/lib64
+           ;;
+        *)
+           libdir=/usr/lib
+           ;;
+        esac
+        ;;
+      *)
+        libdir=/usr/lib
+        ;;
+      esac
    fi
 
    if test `eval echo ${includedir}` = NONE/include ; then
@@ -349,24 +366,10 @@ AC_ARG_ENABLE(gnome,
 
 GNOME_DIR=
 if test x$support_gnome = xyes; then
-   abc=`$PKGCONFIG --exists libgnomeui-2.0`
-   pkg=$?
-   if test $pkg = 0; then
-      GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
-      GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
-      GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
-      GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
-      AC_SUBST(GNOME_INCLUDEDIR)
-      AC_SUBST(GNOMEUI_LIBS)
-      AC_SUBST(GNOME_LIBDIR)
-      AC_SUBST(GNOME_LIBS)
-      GNOME_DIR=src/gnome2-console
-      gnome_version="Version 2.x"
-   else
-      AC_MSG_ERROR(Unable to find Gnome 2 installation)
-   fi
+   AC_MSG_ERROR(bgnome-console no longer supported)
+   AC_MSG_ERROR(--enable-gnome option no longer supported)
 fi
-AC_SUBST(GNOME_DIR)
+AC_SUBST(GNOME_DIR)
 
 dnl -------------------------------------------
 dnl bat (default off)
@@ -1022,8 +1025,8 @@ AC_ARG_WITH(tcp-wrappers,
        if test "x$withval" != "xno" ; then
          saved_LIBS="$LIBS"
          LIBS="$saved_LIBS -lwrap"
-         AC_MSG_CHECKING(for libwrap)
          AC_SEARCH_LIBS(nanosleep, [rt])
+         AC_MSG_CHECKING(for libwrap)
          AC_TRY_LINK(
             [ 
               #include <sys/types.h>
@@ -1678,7 +1681,7 @@ BA_CHECK_MYSQL_DB
 
 BA_CHECK_SQLITE3_DB
 
-BA_CHECK_SQLITE_DB
+BA_CHECK_SQLITE_DB
 
 BA_CHECK_DBI_DB
 
@@ -1866,26 +1869,6 @@ AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
 )
 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
 
-dnl --------------------------------------------------------------------------
-dnl Check for bigendian
-dnl --------------------------------------------------------------------------
-AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
-   [
-       AC_TRY_RUN(
-         [
-             main(){long a=1L; char *p=(char *)&a; exit(*p);}
-         ], [
-            ba_cv_bigendian=yes
-         ], [
-            ba_cv_bigendian=no
-         ], [
-            ba_cv_bigendian=no
-         ]
-       )
-   ]
-)
-test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
-
 dnl --------------------------------------------------------------------------
 dnl Check for typeof()
 dnl --------------------------------------------------------------------------
@@ -2402,11 +2385,11 @@ if test x$support_acl = xyes -o x$support_acl = xauto; then
   please either load the acl libraries or rerun configure without --enable-acl])
    else
       if test $have_acl = yes; then
-        AC_DEFINE([HAVE_ACL], [], [Normal attribute support])
+        AC_DEFINE([HAVE_ACL],1,[Normal acl support])
       fi
 
       if test $have_extended_acl = yes; then
-        AC_DEFINE([HAVE_EXTENDED_ACL], [], [Extended attribute support])
+        AC_DEFINE([HAVE_EXTENDED_ACL],1,[Extended acl support])
       fi
    fi
 fi
@@ -2428,33 +2411,84 @@ AC_ARG_ENABLE(xattr,
 
 have_xattr=no
 if test x$support_xattr = xyes -o x$support_xattr = xauto; then
-   AC_CHECK_HEADER(sys/xattr.h, [ AC_DEFINE(HAVE_SYS_XATTR_H,1,[Defines if your system have the sys/xattr.h header file])] , )
-   AC_CHECK_FUNCS(llistxattr lgetxattr lsetxattr,
+   dnl
+   dnl First check for *BSD support
+   dnl
+   AC_CHECK_HEADER(sys/extattr.h, [ AC_DEFINE(HAVE_SYS_EXTATTR_H,1,[Defines if your system have the sys/extattr.h header file])] , )
+   AC_CHECK_HEADER(libutil.h, [ AC_DEFINE(HAVE_LIBUTIL_H,1,[Defines if your system have the libutil.h header file])] , )
+   AC_CHECK_FUNCS(extattr_get_link extattr_set_link extattr_list_link,
       [
          have_xattr=yes
-         AC_DEFINE([HAVE_LLISTXATTR], [], [LLISTXATTR support])
-         AC_DEFINE([HAVE_LGETXATTR], [], [LGETXATTR support])
-         AC_DEFINE([HAVE_LSETXATTR], [], [LSETXATTR support])
+         AC_DEFINE([HAVE_EXTATTR_GET_LINK],1,[Define to 1 if you have the 'extattr_get_link' function.])
+         AC_DEFINE([HAVE_EXTATTR_SET_LINK],1,[Define to 1 if you have the 'extattr_set_link' function.])
+         AC_DEFINE([HAVE_EXTATTR_LIST_LINK],1,[Define to 1 if you have the 'extattr_list_link' function.])
       ]
    )
+   
+   if test $have_xattr = no; then
+      AC_CHECK_FUNCS(extattr_get_file extattr_set_file extattr_list_file,
+        [
+            have_xattr=yes
+            AC_DEFINE([HAVE_EXTATTR_GET_FILE],1,[Define to 1 if you have the 'extattr_get_file' function.])
+            AC_DEFINE([HAVE_EXTATTR_SET_FILE],1,[Define to 1 if you have the 'extattr_set_file' function.])
+            AC_DEFINE([HAVE_EXTATTR_LIST_FILE],1,[Define to 1 if you have the 'extattr_list_file' function.])
+        ]
+      )
+   fi
+   
+   if test $have_xattr = yes; then
+      have_extattr_string_in_libc=no
+      AC_CHECK_FUNCS(extattr_namespace_to_string extattr_string_to_namespace,
+        [
+            have_extattr_string_in_libc=yes
+            AC_DEFINE([HAVE_EXTATTR_NAMESPACE_TO_STRING],1,[Define to 1 if you have the 'extattr_namespace_to_string' function.])
+            AC_DEFINE([HAVE_EXTATTR_STRING_TO_NAMESPACE],1,[Define to 1 if you have the 'extattr_string_to_namespace' function.])
+        ]
+      )
 
-   #
-   # OSX specific
-   #
+      dnl
+      dnl If extattr_namespace_to_string and extattr_string_to_namespace are not in libc see if they are in libutil
+      dnl
+      if test $have_extattr_string_in_libc = no; then
+        AC_CHECK_LIB(util, extattr_namespace_to_string extattr_string_to_namespace,
+           [
+               AC_DEFINE([HAVE_EXTATTR_NAMESPACE_TO_STRING],1,[Define to 1 if you have the 'extattr_namespace_to_string' function.])
+               AC_DEFINE([HAVE_EXTATTR_STRING_TO_NAMESPACE],1,[Define to 1 if you have the 'extattr_string_to_namespace' function.])
+               FDLIBS="-lutil $FDLIBS"
+           ]
+        )
+      fi
+   fi
+
+   dnl
+   dnl If we failed to find *BSD support try the Linux or OSX implementation of xattr
+   dnl
    if test $have_xattr = no; then
-      AC_CHECK_FUNCS(listxattr getxattr setxattr,
+      AC_CHECK_HEADER(sys/xattr.h, [ AC_DEFINE(HAVE_SYS_XATTR_H,1,[Defines if your system have the sys/xattr.h header file])] , )
+      AC_CHECK_FUNCS(llistxattr lgetxattr lsetxattr,
         [
             have_xattr=yes
-            AC_DEFINE([HAVE_LLISTXATTR], [], [LLISTXATTR support])
-            AC_DEFINE([HAVE_LGETXATTR], [], [LGETXATTR support])
-            AC_DEFINE([HAVE_LSETXATTR], [], [LSETXATTR support])
+            AC_DEFINE([HAVE_LLISTXATTR],1,[Define to 1 if you have the 'llistxattr' function.])
+            AC_DEFINE([HAVE_LGETXATTR],1,[Define to 1 if you have the 'lgetxattr' function.])
+            AC_DEFINE([HAVE_LSETXATTR],1,[Define to 1 if you have the 'lsetxattr' function.])
         ]
       )
+
+      if test $have_xattr = no; then
+        AC_CHECK_FUNCS(listxattr getxattr setxattr,
+           [
+               have_xattr=yes
+               AC_DEFINE([HAVE_LISTXATTR],1,[Define to 1 if you have the 'listxattr' function.])
+               AC_DEFINE([HAVE_GETXATTR],1,[Define to 1 if you have the 'getxattr' function.])
+               AC_DEFINE([HAVE_SETXATTR],1,[Define to 1 if you have the 'setxattr' function.])
+           ]
+        )
+      fi
    fi
 
-   #
-   # Solaris specific
-   #
+   dnl
+   dnl If we failed to find *BSD support and the Linux or OSX implementation of xattr try the Solaris xattr implementation
+   dnl
    if test $have_xattr = no; then
       AC_CHECK_HEADER(sys/attr.h, [ AC_DEFINE(HAVE_SYS_ATTR_H,1,[Defines if your system have the sys/attr.h header file])] , )
       AC_CHECK_HEADER(sys/nvpair.h, [ AC_DEFINE(HAVE_SYS_NVPAIR_H,1,[Defines if your system have the sys/nvpair.h header file])] , )
@@ -2463,17 +2497,18 @@ if test x$support_xattr = xyes -o x$support_xattr = xauto; then
       AC_CHECK_FUNCS(openat fstatat unlinkat fchownat futimesat,
         [
             have_xattr=yes
-            AC_DEFINE([HAVE_OPENAT], [], [OPENAT support])
-            AC_DEFINE([HAVE_FSTATAT], [], [FSTATAT support])
-            AC_DEFINE([HAVE_UNLINKAT], [], [UNLINKAT support])
-            AC_DEFINE([HAVE_FCHOWNAT], [], [FCHOWNAT support])
-            AC_DEFINE([HAVE_FUTIMESAT], [], [FUTIMESAT support])
+            AC_DEFINE([HAVE_OPENAT],1,[Define to 1 if you have the 'openat' function.])
+            AC_DEFINE([HAVE_FSTATAT],1,[Define to 1 if you have the 'fstatat' function.])
+            AC_DEFINE([HAVE_UNLINKAT],1,[Define to 1 if you have the 'unlinkat' function.])
+            AC_DEFINE([HAVE_FCHOWNAT],1,[Define to 1 if you have the 'fchownat' function.])
+            AC_DEFINE([HAVE_FUTIMESAT],1,[Define to 1 if you have the 'futimesat' function.])
         ]
       )
 
       if test $have_xattr = yes; then
         AC_CHECK_LIB(nvpair, nvlist_next_nvpair,
            [
+               AC_DEFINE([HAVE_NVLIST_NEXT_NVPAIR],1,[Define to 1 if you have the 'nvlist_next_nvpair' function.])
                FDLIBS="-lnvpair $FDLIBS"
            ]
         )
@@ -2482,10 +2517,10 @@ if test x$support_xattr = xyes -o x$support_xattr = xauto; then
 
    if test x$support_xattr = xyes -a $have_xattr != yes; then
       AC_MSG_ERROR([xattr support explicitly enabled but no supported xattr implementation found, 
-  please either load the xattr libraries or rerun configure without --enable-xatt])
+  please either load the xattr libraries or rerun configure without --enable-xattr])
    else
       if test $have_xattr = yes; then
-        AC_DEFINE([HAVE_XATTR], [], [XATTR support])
+        AC_DEFINE([HAVE_XATTR],1,[Extended Attributes support])
       fi
    fi
 fi
@@ -2508,6 +2543,18 @@ AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
    ]
 )
 
+dnl
+dnl Check for headers, functions and libraries required to support
+dnl keeping readall capabilities
+dnl
+AC_CHECK_HEADERS(sys/prctl.h sys/capability.h)
+AC_CHECK_FUNCS(prctl setreuid)
+AC_CHECK_LIB([cap], [cap_set_proc], [CAP_LIBS="-lcap"], [CAP_LIBS=])
+if test x$CAP_LIBS = x-lcap; then
+   AC_DEFINE(HAVE_LIBCAP, 1, [Define if you have libcap])
+fi
+AC_SUBST(CAP_LIBS)
+
 AC_SUBST(FDLIBS)
 AC_DEFINE(FDLIBS)
 
@@ -2895,8 +2942,6 @@ AC_OUTPUT([autoconf/Make.common \
           src/host.h \
           src/console/Makefile \
           src/console/bconsole.conf \
-          src/gnome2-console/Makefile \
-          src/gnome2-console/bgnome-console.conf \
           src/qt-console/bat.conf \
           src/qt-console/bat.pro \
           src/qt-console/bat.pro.mingw32 \
@@ -2927,12 +2972,6 @@ AC_OUTPUT([autoconf/Make.common \
           src/cats/grant_mysql_privileges \
           src/cats/drop_mysql_tables \
           src/cats/drop_mysql_database \
-          src/cats/create_sqlite_database \
-          src/cats/update_sqlite_tables \
-          src/cats/make_sqlite_tables \
-          src/cats/grant_sqlite_privileges \
-          src/cats/drop_sqlite_tables \
-          src/cats/drop_sqlite_database \
           src/cats/create_sqlite3_database \
           src/cats/update_sqlite3_tables \
           src/cats/make_sqlite3_tables \
@@ -2963,11 +3002,10 @@ AC_OUTPUT([autoconf/Make.common \
           updatedb/update_mysql_tables_9_to_10 \
           updatedb/update_sqlite3_tables_9_to_10 \
           updatedb/update_postgresql_tables_9_to_10 \
-          updatedb/update_sqlite_tables_9_to_10 \
           updatedb/update_mysql_tables_10_to_11 \
           updatedb/update_sqlite3_tables_10_to_11 \
           updatedb/update_postgresql_tables_10_to_11 \
-          updatedb/update_sqlite_tables_10_to_11 \
+          examples/nagios/check_bacula/Makefile \
           $PFILES ],  
      [ ]
 )
@@ -2988,7 +3026,7 @@ if test "${support_bat}" = "yes" ; then
    touch bat
    chmod 755 bat
    $QMAKEBIN
-   make clean
+   ${MAKE:-make} clean
    cd ${BUILD_DIR}
 fi
 
@@ -3013,7 +3051,7 @@ cd ..
 
 c=updatedb
 chmod 755 $c/update_mysql_tables_10_to_11   $c/update_sqlite3_tables_10_to_11
-chmod 755 $c/update_postgresql_tables_10_to_11  $c/update_sqlite_tables_10_to_11
+chmod 755 $c/update_postgresql_tables_10_to_11
 
 c=src/cats
 
@@ -3026,9 +3064,6 @@ chmod 755 $c/grant_bdb_privileges     $c/drop_bdb_tables       $c/drop_bdb_datab
 chmod 755 $c/create_mysql_database    $c/update_mysql_tables   $c/make_mysql_tables
 chmod 755 $c/grant_mysql_privileges   $c/drop_mysql_tables     $c/drop_mysql_database
 
-chmod 755 $c/create_sqlite_database   $c/update_sqlite_tables  $c/make_sqlite_tables
-chmod 755 $c/grant_sqlite_privileges  $c/drop_sqlite_tables    $c/drop_sqlite_database
-
 chmod 755 $c/create_sqlite3_database   $c/update_sqlite3_tables  $c/make_sqlite3_tables
 chmod 755 $c/grant_sqlite3_privileges  $c/drop_sqlite3_tables   $c/drop_sqlite3_database
 
@@ -3065,7 +3100,7 @@ fi
 echo " "
 echo "Cleaning up"
 echo " "
-make clean
+${MAKE:-make} clean
 
 if test "x${db_type}" = "xInternal" ; then
    echo " "