]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/autoconf/configure.in
kes Apply patch from Marco van Wieringen that implements the new
[bacula/bacula] / bacula / autoconf / configure.in
index b907fad05cdf9df5c457317ce1b926c95751f321..02ce81690a78567243219dda3fea66dfbc3d3c79 100644 (file)
@@ -123,8 +123,6 @@ AC_SUBST(LOCAL_DEFS)
 dnl --------------------------------------------------
 dnl Libtool config
 dnl --------------------------------------------------
-LT_INIT([shared disable-static])
-LT_LANG([C++])
 AC_ARG_ENABLE(libtool,
    AC_HELP_STRING([--enable-libtool], [enable building using GNU libtool @<:@default=yes@:>@]),
    [
@@ -133,6 +131,8 @@ AC_ARG_ENABLE(libtool,
        fi
    ]
 )
+LT_INIT([shared disable-static])
+LT_LANG([C++])
 
 if test x$use_libtool != xno; then
    DEFAULT_OBJECT_TYPE=".lo"
@@ -154,9 +154,6 @@ else
    QMAKE_LIBTOOL="# ${BUILD_DIR}/libtool"
 fi
 
-INCLUDE_INSTALL_TARGET=""
-INCLUDE_UNINSTALL_TARGET=""
-
 AC_SUBST(DEFAULT_OBJECT_TYPE)
 AC_SUBST(DEFAULT_ARCHIVE_TYPE)
 AC_SUBST(DEFAULT_SHARED_OBJECT_TYPE)
@@ -164,9 +161,32 @@ AC_SUBST(LIBTOOL)
 AC_SUBST(LIBTOOL_INSTALL_TARGET)
 AC_SUBST(LIBTOOL_UNINSTALL_TARGET)
 AC_SUBST(LIBTOOL_CLEAN_TARGET)
+AC_SUBST(QMAKE_LIBTOOL)
+
+dnl --------------------------------------------------
+dnl Include file handling
+dnl --------------------------------------------------
+AC_ARG_ENABLE(includes,
+   AC_HELP_STRING([--enable-includes], [enable installing of include files @<:@default=no@:>@]),
+   [
+       if test x$enableval = xyes; then
+         install_includes=yes
+       fi
+   ]
+)
+
+dnl It only makes sense to install include files when you install libraries which only happens when
+dnl libtool is enabled
+
+if test x$use_libtool != xno -a x$install_includes = xyes; then
+   INCLUDE_INSTALL_TARGET="install-includes"
+   INCLUDE_UNINSTALL_TARGET="uninstall-includes"
+else
+   INCLUDE_INSTALL_TARGET=""
+   INCLUDE_UNINSTALL_TARGET=""
+fi
 AC_SUBST(INCLUDE_INSTALL_TARGET)
 AC_SUBST(INCLUDE_UNINSTALL_TARGET)
-AC_SUBST(QMAKE_LIBTOOL)
 
 dnl --------------------------------------------------
 dnl Bacula OP Sys determination (see aclocal.m4)
@@ -194,18 +214,28 @@ dnl If the user has not set --prefix, we set our default to nothing.
 dnl In this case, if the user has not set --sysconfdir, we set it
 dnl to the package default of /etc/bacula.  If either --prefix or
 dnl --sysconfdir is set, we leave sysconfdir alone except to eval it.
+dnl If the user has not set --libdir, we set it to the package
+dnl default of /usr/lib. If either --prefix or --libdir is set,
+dnl we leave libdir alone except to eval it. If the user has not set
+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 ------------------------------------------------------------------
 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
+   fi
+
+   if test `eval echo ${includedir}` = NONE/include ; then
+      includedir=/usr/include
+   fi
+
    prefix=
 fi
-sysconfdir=`eval echo ${sysconfdir}`
-datarootdir=`eval echo ${datarootdir}`
-localedir=`eval echo ${datarootdir}/locale`
-AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir")
-AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir") 
 
 dnl -------------------------------------------------------------------------
 dnl  If the user has not set --exec-prefix, we default to ${prefix}
@@ -214,6 +244,14 @@ if test x${exec_prefix} = xNONE ; then
    exec_prefix=${prefix}
 fi
 
+sysconfdir=`eval echo ${sysconfdir}`
+datarootdir=`eval echo ${datarootdir}`
+libdir=`eval echo ${libdir}`
+includedir=`eval echo ${includedir}`
+localedir=`eval echo ${datarootdir}/locale`
+AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir")
+AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir") 
+
 dnl ------------------------------------------------------------------
 dnl If the user has not set --sbindir, we set our default as /sbin
 dnl ------------------------------------------------------------------
@@ -222,22 +260,6 @@ if test x$sbindir = x'${exec_prefix}/sbin' ; then
 fi
 sbindir=`eval echo ${sbindir}`
 
-dnl ------------------------------------------------------------------
-dnl If the user has not set --libdir, we set our default as /lib
-dnl ------------------------------------------------------------------
-if test x$libdir = x'${exec_prefix}/lib' ; then
-   libdir=${exec_prefix}/lib
-fi
-libdir=`eval echo ${libdir}`
-
-dnl ------------------------------------------------------------------
-dnl If the user has not set --includedir, we set our default as /include
-dnl ------------------------------------------------------------------
-if test x$includedir = x'${exec_prefix}/include' ; then
-   includedir=${exec_prefix}/include
-fi
-includedir=`eval echo ${includedir}`
-
 dnl -------------------------------------------------------------------------
 dnl  If the user has not set --mandir, we default to /usr/share/man
 dnl -------------------------------------------------------------------------
@@ -266,6 +288,7 @@ support_conio=yes
 support_gnome=no
 support_bat=no
 support_wx_console=no
+support_tray_monitor=no
 support_tls=no
 support_crypto=no
 gnome_version=
@@ -2184,6 +2207,7 @@ dnl
 dnl Check for ACL libraries
 dnl
 have_acl=no
+have_extended_acl=no
 AC_CHECK_HEADER(sys/acl.h)
 AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
    [
@@ -2196,6 +2220,12 @@ AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
                 [
                     have_acl=yes;
                     FDLIBS="-lsec $FDLIBS"
+
+                    AC_CHECK_LIB(sec, acl_totext,
+                       [
+                           have_extended_acl=yes
+                       ]
+                    )
                 ]
              )
          ]
@@ -2206,6 +2236,10 @@ if test $have_acl = yes; then
    AC_DEFINE(HAVE_ACL)
 fi
 
+if test $have_extended_acl = yes; then
+   AC_DEFINE(HAVE_EXTENDED_ACL)
+fi
+
 dnl Check for pthread libraries
 PTHREAD_LIB=""
 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
@@ -2790,6 +2824,12 @@ if test X"$GCC" = "Xyes" ; then
    fi
 fi
 
+# clean up any old junk
+echo " "
+echo "Cleaning up"
+echo " "
+make clean
+
 if test "x${db_type}" = "xInternal" ; then
    echo " "
    echo " "