]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/autoconf/configure.in
Use rentrant mysql lib, eliminate race in sql_list, Win32 streams, misc see kes-1.31
[bacula/bacula] / bacula / autoconf / configure.in
index e786f0b2158d71493fc7059c79bffd1f16724cbe..3ff33476c962e21b9d762ae1e09871ab074a6373 100644 (file)
@@ -346,6 +346,7 @@ AC_HEADER_STAT
 AC_HEADER_DIRENT
 
 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
+AC_CHECK_FUNCS(nanosleep)
 
 #AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG),
 #   [LIBEXTRAOBJ="$LIBEXTRAOBJ getopt.o getopt1.o"
@@ -604,14 +605,6 @@ AC_ARG_WITH(pid-dir,
     ]
 )
 
-# make sure the pid directory exists
-if test ! -d $piddir ; then    
-    piddir=`eval echo ${sysconfdir}`
-    case $piddir in
-         NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
-    esac
-fi
-
 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
 AC_SUBST(piddir)
 
@@ -629,14 +622,6 @@ AC_ARG_WITH(subsys-dir,
     ]
 )
 
-# make sure the pid directory exists
-if test ! -d $subsysdir ; then    
-    subsysdir=`eval echo ${sysconfdir}`
-    case $subsysdir in
-       NONE/*) subsysdir=`echo $subsysdir | sed "s~NONE~$ac_default_prefix~"` ;;
-    esac
-fi
-
 AC_SUBST(subsysdir)
 
 
@@ -772,7 +757,7 @@ AC_EXEEXT
 
 dnl See if we can use 64 bit file addresses
 largefile_support="no"
-AC_SYS_LARGEFILE
+AC_BAC_LARGEFILE
 
 
 AC_PATH_XTRA
@@ -1071,6 +1056,7 @@ AC_CHECK_FUNCS( \
 )
 
 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
+AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
 
 AC_CHECK_FUNCS(chflags) 
 
@@ -1193,13 +1179,19 @@ alpha)
   ;;
 bsdi)
        DISTVER=`uname -a |awk '{print $3}'`
-       TAPEDRIVE="/dev/nrst0"
-  ;;
-caldera)
-       DISTVER=`cat /etc/.issue | grep Version | cut -f 2 -d ' '`
-       TAPEDRIVE="/dev/nrst0"
-       PSCMD="ps -e -o pid,command"
+       TAPEDRIVE="/dev/nrmt0"
+       PTHREAD_LIB="-pthread"
+       CFLAGS="${CFLAGS} -pthread"
+       PSCMD="ps -x -o pid,command"
+       lld="qd"
+       llu="qu"
+       PFILES="${PFILES} \
+           platforms/bsdi/Makefile \
+           platforms/bsdi/bacula-fd \
+           platforms/bsdi/bacula-sd \
+           platforms/bsdi/bacula-dir"
        hostname=`hostname -s`
+       largefile_support="yes"
   ;;
 cygwin)
        DISTVER=`uname -a |awk '{print $3}'`
@@ -1228,7 +1220,7 @@ freebsd)
        CFLAGS="${CFLAGS} -pthread"
        lld="qd"
        llu="qu"
-       TAPEDRIVE="/dev/nrst0"
+       TAPEDRIVE="/dev/nrsa0"
        PSCMD="ps -x -o pid,command"
        PFILES="${PFILES} \
            platforms/freebsd/Makefile \
@@ -1277,7 +1269,7 @@ openbsd)
   ;;
 redhat)
        DISTVER=`cat /etc/redhat-release | grep release |\
-                               cut -f 5 -d ' '`
+          cut -f 5 -d ' '`
        TAPEDRIVE="/dev/nst0"
        PSCMD="ps -e -o pid,command"
        PFILES="${PFILES} \
@@ -1285,8 +1277,8 @@ redhat)
            platforms/redhat/bacula-fd \
            platforms/redhat/bacula-sd \
            platforms/redhat/bacula-dir \
-           platforms/redhat/bacula.mysql.rh8.spec \
-           platforms/redhat/bacula.sqlite.rh8.spec"
+           platforms/redhat/bacula.spec \
+           "
        hostname=`hostname -s`
   ;;
 gentoo)
@@ -1322,7 +1314,7 @@ solaris)
   ;;
 suse)
        DISTVER=`cat /etc/SuSE-release |grep VERSION|\
-                               cut -f 3 -d ' '`
+           cut -f 3 -d ' '`
        TAPEDRIVE="/dev/nst0"
        PSCMD="ps -e -o pid,command"
        hostname=`hostname -s`
@@ -1345,7 +1337,6 @@ esac
 
 AC_SUBST(hostname)
 
-
 LIBS="$PTHREAD_LIB $LIBS"
 
 AC_DEFINE_UNQUOTED(lld, "$lld")
@@ -1360,6 +1351,20 @@ dnl# common parts of the Makefile
 MCOMMON=./autoconf/Make.common
 AC_SUBST_FILE(MCOMMON)
 
+dnl# Insanity check
+if test "x${subsysdir}" = "x${sbindir}" ; then
+   echo " "
+   echo " "
+   echo "You have set both --sbindir and --with-subsys-dir"
+   echo "  equal to: ${subsysdir} "
+   echo "This is not permitted. Please reconfigure."
+   echo " "
+   echo "Aborting configuration ..."
+   echo " "
+   echo " "
+   exit 1
+fi 
+
 AC_OUTPUT([autoconf/Make.common \
           Makefile \
           rescue/Makefile \
@@ -1377,7 +1382,8 @@ AC_OUTPUT([autoconf/Make.common \
           scripts/fd \
           scripts/Makefile \
           scripts/logrotate \
-          scripts/bacula.desktop \
+          scripts/bacula.desktop.gnome1 \
+          scripts/bacula.desktop.gnome2 \
           doc/Makefile \
           src/Makefile \
           src/console/Makefile \
@@ -1441,8 +1447,30 @@ if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
    largefile_support="yes"
 fi
 
-CCVERSION=`${CC} --version`
-CXXVERSION=`${CXX} --version`
+#
+# A whole lot of hand springs to get the compiler version.
+#  This is because gcc changed the output in version 3.0
+#
+CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
+if test "x${CCVERSION}" = "x" ; then
+  CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
+fi
+CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
+if test x"${CXXVERSION}" = x ; then
+  CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
+fi
+
+if test "x${subsysdir}" = "x${sbindir}" ; then
+   echo " "
+   echo " "
+   echo "You have set --sbindir and --with-subsys-dir"
+   echo "  both equal to: ${subsysdir} "
+   echo "  This is not permitted. Please reconfigure."
+   echo "Aborting configuration ..."
+   echo " "
+   echo " "
+   exit 1
+fi 
 
 echo "
 Configuration on `date`:
@@ -1452,8 +1480,10 @@ Configuration on `date`:
   Source code location:       ${srcdir}
   Install binaries:          ${sbindir}
   Install config files:       ${sysconfdir}
-  Scripts directory          ${scriptdir}
-  Working directory          ${working_dir}
+  Scripts directory:         ${scriptdir}
+  Working directory:         ${working_dir}
+  PID directory:             ${piddir}
+  Subsys directory:          ${subsysdir}
   C Compiler:                ${CC} ${CCVERSION}
   C++ Compiler:              ${CXX} ${CXXVERSION}
   Compiler flags:            ${WCFLAGS} ${CFLAGS}