]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/autoconf/configure.in
Add COMPRESS_MANPAGES substituted variable to autoconf
[bacula/bacula] / bacula / autoconf / configure.in
index af0a07cb592499f07a191295cc1f075345b6610a..f7387bbd9170e46159db035d8b71075d8130a070 100644 (file)
@@ -4,7 +4,9 @@ dnl Process this file with autoconf to produce a configure script.
 dnl
 dnl require a recent autoconf
 AC_PREREQ(2.61)
-AC_INIT(src/version.h)
+AC_INIT([bacula], m4_esyscmd([sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ../src/version.h src/version.h 2> /dev/null | tr -d '\n']))
+AC_CONFIG_SRCDIR(src/version.h)
+
 BUILD_DIR=`pwd`
 cd ..
 TOP_DIR=`pwd`
@@ -808,11 +810,12 @@ if test x$support_ipv6 = xyes; then
 fi
 
 TERM_LIB=""
-AC_CHECK_HEADER(curses.h, 
-  [ AC_CHECK_LIB(ncurses, tgetent, 
-    [ TERM_LIB="-lncurses" ],
-    [ AC_CHECK_LIB(termcap, tgetent, [ TERM_LIB="-ltermcap" ])
+AC_CHECK_HEADER(curses.h, 
+    AC_CHECK_LIB(tinfo, tgetent, [ TERM_LIB="-ltinfo" ], [
+      AC_CHECK_LIB(ncurses, tgetent, [ TERM_LIB="-lncurses" ], [
+       AC_CHECK_LIB(termcap, tgetent, [ TERM_LIB="-ltermcap" ])
     ])
+  ])
   ],
   [  AC_CHECK_HEADERS(curses.h)
      AC_CHECK_HEADER(term.h,
@@ -1183,7 +1186,7 @@ if test "x$with_openssl_directory" != "xno"; then
    fi
 
    if test "$support_crypto" = "yes"; then
-      AC_CHECK_LIB(ssl, EVP_PKEY_encrypt_old, AC_DEFINE(HAVE_OPENSSLv1, 1, [Set if have OpenSSL version 1.x]))
+      AC_CHECK_LIB(crypto, EVP_PKEY_encrypt_old, AC_DEFINE(HAVE_OPENSSLv1, 1, [Set if have OpenSSL version 1.x]))
    fi
 
    LIBS="${saved_LIBS}"
@@ -1712,11 +1715,11 @@ BA_CHECK_MYSQL_DB
 
 BA_CHECK_SQLITE3_DB
 
-BA_CHECK_INGRES_DB
+#BA_CHECK_INGRES_DB
 
-BA_CHECK_DBI_DB
+#BA_CHECK_DBI_DB
 
-BA_CHECK_DBI_DRIVER
+#BA_CHECK_DBI_DRIVER
 
 dnl -------------------------------------------
 dnl Make sure at least one database backend is found
@@ -1725,7 +1728,7 @@ if test "x${db_backends}" = "x" ; then
    echo " "
    echo " "
    echo "You have not specified either --enable-client-only or one of the"
-   echo "supported databases: MySQL, PostgreSQL, Ingres, SQLite3 or DBI."
+   echo "supported databases: MySQL, PostgreSQL, or SQLite3."
    echo "This is not permitted. Please reconfigure."
    echo " "
    echo "Aborting the configuration ..."
@@ -1741,9 +1744,9 @@ case `echo $DB_BACKENDS | wc -w | sed -e 's/^ *//'` in
    1)
       DEFAULT_DB_TYPE="${DB_BACKENDS}"
       if test x$use_libtool = xno; then
-         SHARED_CATALOG_TARGETS=""
+        SHARED_CATALOG_TARGETS=""
       else
-         SHARED_CATALOG_TARGETS="libbaccats-${DEFAULT_DB_TYPE}.la"
+        SHARED_CATALOG_TARGETS="libbaccats-${DEFAULT_DB_TYPE}.la"
       fi
       ;;
    *)
@@ -1756,26 +1759,26 @@ case `echo $DB_BACKENDS | wc -w | sed -e 's/^ *//'` in
       dnl For multiple backend we need libtool support.
       dnl ------------------------------------------------
       if test x$use_libtool = xno; then
-         echo " "
-         echo " "
-         echo "You have specified two or more of the"
-         echo "supported databases: MySQL, PostgreSQL, Ingres, SQLite3 or DBI."
-         echo "This is not permitted when not using libtool Please reconfigure."
-         echo " "
-         echo "Aborting the configuration ..."
-         echo " "
-         echo " "
-         exit 1
+        echo " "
+        echo " "
+        echo "You have specified two or more of the"
+        echo "supported databases: MySQL, PostgreSQL, or SQLite3."
+        echo "This is not permitted when not using libtool Please reconfigure."
+        echo " "
+        echo "Aborting the configuration ..."
+        echo " "
+        echo " "
+        exit 1
       fi
 
       SHARED_CATALOG_TARGETS=""
       for db_type in ${DB_BACKENDS}
       do
-         if test -z "${SHARED_CATALOG_TARGETS}"; then
-            SHARED_CATALOG_TARGETS="libbaccats-${db_type}.la"
-         else
-            SHARED_CATALOG_TARGETS="${SHARED_CATALOG_TARGETS} libbaccats-${db_type}.la"
-         fi
+        if test -z "${SHARED_CATALOG_TARGETS}"; then
+           SHARED_CATALOG_TARGETS="libbaccats-${db_type}.la"
+        else
+           SHARED_CATALOG_TARGETS="${SHARED_CATALOG_TARGETS} libbaccats-${db_type}.la"
+        fi
       done
       ;;
 esac
@@ -1803,7 +1806,7 @@ AC_ARG_ENABLE(batch-insert,
    AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=yes@:>@]),
    [
        if test x$enableval = xno; then
-          support_batch_insert=no
+         support_batch_insert=no
        fi
    ]
 )
@@ -1813,7 +1816,7 @@ if test x$support_batch_insert = xyes; then
 fi
 
 dnl -------------------------------------------
-dnl Check if mysql supports batch mode   
+dnl Check if mysql supports batch mode  
 dnl -------------------------------------------
 if test ! -z "$MYSQL_LIB"; then
    AC_CHECK_LIB(mysql_r, mysql_thread_safe, AC_DEFINE(HAVE_MYSQL_THREAD_SAFE, 1, [Set if have mysql_thread_safe]))
@@ -1838,7 +1841,7 @@ if test ! -z "$POSTGRESQL_LIB"; then
    AC_CHECK_LIB(pq, PQputCopyData, AC_DEFINE(HAVE_PQ_COPY, 1, [Set if have PQputCopyData]))
    if test "x$ac_cv_lib_pq_PQputCopyData" = "xyes"; then
       if test $support_batch_insert = yes ; then
-         AC_DEFINE(HAVE_POSTGRESQL_BATCH_FILE_INSERT, 1, [Set if PostgreSQL DB batch insert code enabled])
+        AC_DEFINE(HAVE_POSTGRESQL_BATCH_FILE_INSERT, 1, [Set if PostgreSQL DB batch insert code enabled])
       fi
    fi
 
@@ -1872,9 +1875,9 @@ if test ! -z "$DBI_LIBS"; then
       test "x$ac_cv_lib_pq_PQputCopyData" = "xyes"
       pkg=$?
       if test $pkg = 0; then
-         if test $support_batch_insert = yes ; then
-            AC_DEFINE(HAVE_DBI_BATCH_FILE_INSERT, 1, [Set if DBI DB batch insert code enabled])
-         fi
+        if test $support_batch_insert = yes ; then
+           AC_DEFINE(HAVE_DBI_BATCH_FILE_INSERT, 1, [Set if DBI DB batch insert code enabled])
+        fi
       fi
    fi
 else 
@@ -2103,6 +2106,10 @@ AC_MSG_RESULT($fstype)
 
 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_LANG_PUSH(C++)
+AC_CHECK_HEADERS([cxxabi.h execinfo.h], [ AC_DEFINE(HAVE_BACKTRACE,1,[Defines if your system have the cxxabi.h and execinfo.h header files for backtrace()])] , )
+AC_LANG_POP(C++)
+
 dnl --------------------------------------------------------------------------
 dnl CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
 dnl --------------------------------------------------------------------------
@@ -2398,6 +2405,9 @@ AC_CHECK_FUNCS( \
    [echo 'configure: cannot find needed function.'; exit 1]
 )
 
+AC_CHECK_FUNCS(getpagesize, [AC_DEFINE(HAVE_GETPAGESIZE, 1, [Set if have getpagesize])])
+AC_CHECK_FUNCS(malloc_trim, [AC_DEFINE(HAVE_MALLOC_TRIM, 1, [Set if have malloc_trim])])
+
 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
 AC_CHECK_FUNCS(posix_fadvise)
@@ -2485,82 +2495,6 @@ if test x$ZLIBS = x-lz; then
 fi
 AC_SUBST(ZLIBS)
 
-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
-      done
-   fi
-
-   AFS_CFLAGS="-I${with_afsdir}/include"
-
-   saved_CFLAGS="${CFLAGS}"
-   CFLAGS="${AFS_CFLAGS} ${saved_CFLAGS}"
-
-   AC_CHECK_HEADERS(afs/stds.h)
-
-   CFLAGS="${saved_CFLAGS}"
-
-   dnl
-   dnl See if we can find a libsys with the pioctl symbol in there
-   dnl
-   for dir in ${with_afsdir}/lib ${with_afsdir}/lib/afs
-   do
-      for arch_type in .a .so
-      do
-        A=`test -f ${dir}/libsys${arch_type} && nm ${dir}/libsys${arch_type} | grep pioctl`
-        pkg=$?
-        if test $pkg = 0; then
-           have_afs=yes
-           AFS_LIBS="-L${dir} -lsys -lrx -llwp ${dir}/util.a"
-           break
-        fi
-      done
-   done
-
-   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,[Defines 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
@@ -2595,52 +2529,93 @@ if test x$support_acl = xyes -o x$support_acl = xauto; then
    dnl
    if test $have_acl = no; then
       AC_CHECK_LIB(acl, acl_get_file,
-         [
+        [
             have_acl=yes
-             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
-         ]
+            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
 
    dnl
    dnl Check for acl_get_file in libpacl (OSF1)
+   dnl and if ACL_TYPE_DEFAULT_DIR is defined.
    dnl
-   if test $have_acl = no; then
+   if test $have_acl = no -a \
+          x${HAVE_OSF1_OS_TRUE} = x; then
       AC_CHECK_LIB(pacl, acl_get_file,
-         [
+        [
             have_acl=yes
-             FDLIBS="-lpacl $FDLIBS"
-         ]
+            FDLIBS="-lpacl $FDLIBS"
+        ]
       )
+
+      AC_MSG_CHECKING(for ACL_TYPE_DEFAULT_DIR in acl.h include file)
+      grep ACL_TYPE_DEFAULT_DIR /usr/include/sys/acl.h > /dev/null 2>&1
+      if test $? = 0; then
+        AC_DEFINE(HAVE_ACL_TYPE_DEFAULT_DIR,1,[Defines if your system have the ACL_TYPE_DEFAULT_DIR acl type])
+        AC_MSG_RESULT(yes)
+      else
+        AC_MSG_RESULT(no)
+      fi
+   fi
+
+   dnl
+   dnl On OSX check for availability of ACL_TYPE_EXTENDED
+   dnl
+   if test $have_acl = yes -a \
+          x${HAVE_DARWIN_OS_TRUE} = x; then
+      AC_MSG_CHECKING(for ACL_TYPE_EXTENDED in acl.h include file)
+      grep ACL_TYPE_EXTENDED /usr/include/sys/acl.h > /dev/null 2>&1
+      if test $? = 0; then
+        AC_DEFINE(HAVE_ACL_TYPE_EXTENDED,1,[Defines if your system have the ACL_TYPE_EXTENDED acl type])
+        AC_MSG_RESULT(yes)
+      else
+        AC_MSG_RESULT(no)
+      fi
+   fi
+
+   dnl
+   dnl On FreeBSD check for availability of ACL_TYPE_NFS4
+   dnl
+   if test $have_acl = yes -a \
+          x${HAVE_FREEBSD_OS_TRUE} = x; then
+      AC_MSG_CHECKING(for ACL_TYPE_NFS4 in acl.h include file)
+      grep ACL_TYPE_NFS4 /usr/include/sys/acl.h > /dev/null 2>&1
+      if test $? = 0; then
+        AC_DEFINE(HAVE_ACL_TYPE_NFS4,1,[Defines if your system have the ACL_TYPE_NFS4 acl type])
+        AC_MSG_RESULT(yes)
+      else
+        AC_MSG_RESULT(no)
+      fi
    fi
 
    dnl
    dnl Check for acltotext and acl_totext (Solaris)
    dnl
    if test $have_acl = no -a \
-           x${HAVE_SUN_OS_TRUE} = x; then
+          x${HAVE_SUN_OS_TRUE} = x; then
       AC_CHECK_LIB(sec, acltotext,
-         [
+        [
             have_acl=yes
-             FDLIBS="-lsec $FDLIBS"
-
-             AC_CHECK_LIB(sec, acl_totext,
-                [
-                    have_extended_acl=yes
-                ]
-             )
-         ]
+            FDLIBS="-lsec $FDLIBS"
+
+            AC_CHECK_LIB(sec, acl_totext,
+               [
+                   have_extended_acl=yes
+               ]
+            )
+        ]
       )
    fi
 
@@ -2648,17 +2623,17 @@ if test x$support_acl = xyes -o x$support_acl = xauto; then
    dnl Check for acl_get and aclx_get (AIX)
    dnl
    if test $have_acl = no -a \
-           x${HAVE_AIX_OS_TRUE} = x; then
+          x${HAVE_AIX_OS_TRUE} = x; then
       AC_CHECK_FUNC(acl_get,
-         [
+        [
             have_acl=yes
 
-             AC_CHECK_FUNC(aclx_get,
-                [
-                    have_extended_acl=yes
-                ]
-             )
-         ]
+            AC_CHECK_FUNC(aclx_get,
+               [
+                   have_extended_acl=yes
+               ]
+            )
+        ]
       )
    fi
 
@@ -2698,44 +2673,44 @@ if test x$support_xattr = xyes -o x$support_xattr = xauto; then
    dnl When running on a BSD variant
    dnl
    if test x${HAVE_FREEBSD_OS_TRUE} = x -o \
-           x${HAVE_NETBSD_OS_TRUE} = x -o \
-           x${HAVE_OPENBSD_OS_TRUE} = x; then
+          x${HAVE_NETBSD_OS_TRUE} = x -o \
+          x${HAVE_OPENBSD_OS_TRUE} = x; then
       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_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,
+        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.])
+               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=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.])
+               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.])
            ]
-         )
+        )
 
-         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
+        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.])
@@ -2743,7 +2718,7 @@ if test x$support_xattr = xyes -o x$support_xattr = xauto; then
                   FDLIBS="-lutil $FDLIBS"
               ]
            )
-         fi
+        fi
       fi
    fi
 
@@ -2752,7 +2727,7 @@ if test x$support_xattr = xyes -o x$support_xattr = xauto; then
    dnl When running on AIX
    dnl
    if test $have_xattr = no -a \
-           x${HAVE_AIX_OS_TRUE} = x; then
+          x${HAVE_AIX_OS_TRUE} = x; then
       AC_CHECK_HEADER(sys/ea.h, [ AC_DEFINE(HAVE_SYS_EA_H,1,[Defines if your system have the sys/ea.h header file])] , )
       AC_CHECK_FUNCS(llistea lgetea lsetea,
         [
@@ -2780,7 +2755,7 @@ if test x$support_xattr = xyes -o x$support_xattr = xauto; then
    dnl when running on a TRU64 OS.
    dnl
    if test $have_xattr = no -a \
-           x${HAVE_OSF1_OS_TRUE} = x; then
+          x${HAVE_OSF1_OS_TRUE} = x; then
       AC_CHECK_HEADER(sys/proplist.h, [ AC_DEFINE(HAVE_SYS_PROPLIST_H,1,[Defines if your system have the sys/proplist.h header file])] , )
       AC_CHECK_FUNCS(getproplist get_proplist_entry sizeof_proplist_entry add_proplist_entry setproplist,
         [
@@ -2799,7 +2774,7 @@ if test x$support_xattr = xyes -o x$support_xattr = xauto; then
    dnl when running on a Solaris.
    dnl
    if test $have_xattr = no -a \
-           x${HAVE_SUN_OS_TRUE} = x; then
+          x${HAVE_SUN_OS_TRUE} = x; 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])] , )
       AC_CHECK_HEADER(attr.h, [ AC_DEFINE(HAVE_ATTR_H,1,[Defines if your system have the attr.h header file])] , )
@@ -2937,6 +2912,7 @@ PFILES="platforms/Makefile"
 PSCMD="ps -e"
 WIN32=
 MACOSX=
+COMPRESS_MANPAGES=yes
 
 hostname=`uname -n | cut -d '.' -f 1`
 if test x${hostname} = x ; then
@@ -3164,9 +3140,18 @@ solaris)
        platforms/solaris/bacula-fd \
        platforms/solaris/bacula-sd \
        platforms/solaris/bacula-dir"
-   if test x$DISTVER = x5.6 ; then
-       AC_DEFINE(HAVE_OLD_SOCKOPT)
-   fi
+   COMPRESS_MANPAGES=
+   case ${DISTVER} in
+   5.5|5.6)
+      AC_DEFINE(HAVE_OLD_SOCKOPT)
+      AC_DEFINE(USE_THR_SETCONCURRENCY)
+      ;;
+   5.7|5.8)
+      AC_DEFINE(USE_THR_SETCONCURRENCY)
+      ;;
+   *)
+      ;;
+   esac
    LIBS="$LIBS -lresolv -lrt"
   ;;
 suse)
@@ -3213,6 +3198,7 @@ AC_SUBST(WIN32)
 AC_SUBST(MACOSX)
 AC_SUBST(DISTNAME)
 AC_SUBST(DISTVER)
+AC_SUBST(COMPRESS_MANPAGES)
 
 dnl common parts of the Makefile
 MCOMMON=./autoconf/Make.common
@@ -3235,13 +3221,8 @@ fi
 AC_OUTPUT([autoconf/Make.common \
           Makefile \
           manpages/Makefile \
-          scripts/startmysql \
-          scripts/stopmysql \
           scripts/btraceback \
-          scripts/startit \
-          scripts/stopit \
           scripts/bconsole \
-          scripts/gconsole \
           scripts/bacula \
           scripts/bacula-ctl-dir \
           scripts/bacula-ctl-fd \
@@ -3313,12 +3294,6 @@ AC_OUTPUT([autoconf/Make.common \
           src/cats/grant_sqlite3_privileges \
           src/cats/drop_sqlite3_tables \
           src/cats/drop_sqlite3_database \
-          src/cats/create_ingres_database \
-          src/cats/update_ingres_tables \
-          src/cats/make_ingres_tables \
-          src/cats/grant_ingres_privileges \
-          src/cats/drop_ingres_tables \
-          src/cats/drop_ingres_database \
           src/cats/sqlite \
           src/cats/mysql \
           src/cats/create_bacula_database \
@@ -3353,13 +3328,12 @@ if test "${support_bat}" = "yes" ; then
       AC_MSG_ERROR([Could not find qmake $PATH. Check your Qt installation])
    fi
 
-   QMAKEBIN="qmake"
    cd src/qt-console
    echo "Creating bat Makefile"
    touch bat
    chmod 755 bat
    rm -f Makefile
-   $QMAKEBIN
+   $QMAKE
    ${MAKE:-make} clean
    cd ${BUILD_DIR}
 fi
@@ -3378,9 +3352,9 @@ chmod 755 install_conf_file build-depkgs-qt-console
 cd ${BUILD_DIR}
 
 cd scripts
-chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
+chmod 755 bacula btraceback mtx-changer
 chmod 755 dvd-handler dvd-simulator
-chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
+chmod 755 bconsole mtx-changer devel_bacula logrotate
 cd ..
 
 c=updatedb
@@ -3404,8 +3378,8 @@ chmod 755 $c/grant_sqlite3_privileges  $c/drop_sqlite3_tables      $c/drop_sqlite3_d
 chmod 755 $c/create_postgresql_database  $c/update_postgresql_tables $c/make_postgresql_tables
 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables   $c/drop_postgresql_database
 
-chmod 755 $c/create_ingres_database  $c/update_ingres_tables $c/make_ingres_tables
-chmod 755 $c/grant_ingres_privileges $c/drop_ingres_tables   $c/drop_ingres_database
+#chmod 755 $c/create_ingres_database  $c/update_ingres_tables $c/make_ingres_tables
+#chmod 755 $c/grant_ingres_privileges $c/drop_ingres_tables   $c/drop_ingres_database
 
 
 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup  $c/make_catalog_backup.pl