3 dnl Process this file with autoconf to produce a configure script.
5 dnl Copyright (C) 2000-2015 Kern Sibbald
6 dnl License: BSD 2-Clause; see file LICENSE-FOSS
8 dnl require a recent autoconf
10 AC_INIT([bacula], m4_esyscmd([sed -n -e 's/^#define VERSION.*"\(.*\)"$/\1/p' ../src/version.h src/version.h 2> /dev/null | tr -d '\n']))
11 AC_CONFIG_SRCDIR(src/version.h)
19 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
20 AC_CONFIG_HEADERS(src/config.h:autoconf/config.h.in)
22 dnl search for true and false programs.
23 AC_PATH_PROGS(TRUEPRG, true, :)
24 AC_PATH_PROGS(FALSEPRG, false, :)
29 if test "x$BACULA" != x; then
30 post_host=`echo -${BACULA} | tr 'A-Z ' 'a-z-'`
32 BACULA=${BACULA:-Bacula}
33 VERSION=`sed -n -e 's/^#define VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
34 RELEASE=`sed -n -e 's/^#define RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
35 DATE=`sed -n -e 's/^#define BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
36 LSMDATE=`sed -n -e 's/^#define LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
37 BDB_VERSION=`sed -n -e 's/^#define BDB_VERSION \(.*\)$/\1/p' ${srcdir}/src/cats/cats.h`
38 DEPKGS_VERSION=`sed -n -e 's/^#define DEPKGS_VERSION \(.*\)$/\1/p' ${srcdir}/src/cats/cats.h`
39 DEPKGS_QT_VERSION=`sed -n -e 's/^#define DEPKGS_QT_VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
40 BQT_VERSION=`sed -n -e 's/^#define BQT_VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
45 AC_SUBST(post_host)dnl
46 AC_SUBST(BDB_VERSION)dnl
47 AC_SUBST(DEPKGS_QT_VERSION)dnl
48 AC_SUBST(DEPKGS_VERSION)dnl
49 AC_SUBST(BQT4_VERSION)dnl
52 dnl can be overwritten by specific values from version.h
53 LIBBAC_LT_RELEASE=`sed -n -e 's/^#.*LIBBAC_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
54 LIBBACCFG_LT_RELEASE=`sed -n -e 's/^#.*LIBBACCFG_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
55 LIBBACPY_LT_RELEASE=`sed -n -e 's/^#.*LIBBACPY_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
57 LIBBAC_LT_RELEASE=${LIBBAC_LT_RELEASE:-$VERSION}
58 LIBBACCFG_LT_RELEASE=${LIBBACCFG_LT_RELEASE:-$VERSION}
60 AC_SUBST(LIBBAC_LT_RELEASE)dnl
61 AC_SUBST(LIBBACCFG_LT_RELEASE)dnl
64 dnl can be overwritten by specific values from version.h
65 LIBBACSQL_LT_RELEASE=`sed -n -e 's/^#.*LIBBACSQL_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
66 LIBBACCATS_LT_RELEASE=`sed -n -e 's/^#.*LIBBACCATS_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
68 LIBBACSQL_LT_RELEASE=${LIBBACSQL_LT_RELEASE:-$VERSION}
69 LIBBACCATS_LT_RELEASE=${LIBBACCATS_LT_RELEASE:-$VERSION}
71 AC_SUBST(LIBBACSQL_LT_RELEASE)dnl
72 AC_SUBST(LIBBACCATS_LT_RELEASE)dnl
75 dnl can be overwritten by specific values from version.h
76 LIBBACFIND_LT_RELEASE=`sed -n -e 's/^#.*LIBBACFIND_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
78 LIBBACFIND_LT_RELEASE=${LIBBACFIND_LT_RELEASE:-$VERSION}
80 AC_SUBST(LIBBACFIND_LT_RELEASE)dnl
83 dnl PFILES are platform or plugin specific files
84 PFILES="platforms/Makefile"
86 echo "configuring for ${BACULA} $VERSION ($DATE)"
89 dnl -------------------------------------------------------
90 dnl Check for compiler.
91 dnl ------------------------------------------------------
95 AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
96 AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
100 if test "x$BASECC" = xgcc; then
104 AC_PATH_PROG(CXX, $CXX, $CXX)
105 if test ! -e $CXX; then
106 AC_MSG_ERROR(Unable to find C++ compiler)
109 dnl -------------------------------------------------------
110 dnl Check for programs.
111 dnl ------------------------------------------------------
113 AC_PATH_PROG(MV, mv, mv)
115 dnl If we name the variable RM it will shadow the RM variable in the configure script and we overwrite the
116 dnl value with the name of the rm command and not rm -f which is its normal content. This gives all kind
117 dnl of strange output of the configure script (like things don't exist etc.).
118 dnl So we name it REMOVE (more software has run into this problem)
119 AC_PATH_PROG(REMOVE, rm, rm)
120 AC_PATH_PROG(CP, cp, cp)
121 AC_PATH_PROG(SED, sed, sed)
122 AC_PATH_PROG(ECHO, echo, echo)
123 AC_PATH_PROG(CMP, cmp, cmp)
124 AC_PATH_PROG(TBL, tbl, tbl)
125 AC_PATH_PROG(AR, ar, ar)
126 AC_PATH_PROG(OPENSSL, openssl, none)
127 AC_PATH_PROG(MTX, mtx, mtx)
128 AC_PATH_PROG(DD, dd, dd)
129 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
130 AC_PATH_PROG(PYTHON, python, python)
131 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
132 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
133 AC_PATH_PROG(DVDRWFORMAT, dvd+rw-format, dvd+rw-format)
134 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
135 AC_PATH_PROG(QMAKE, qmake, none)
136 AC_PATH_PROG(GMAKE, gmake, none)
137 AC_PATH_PROG(PIDOF, pidof, pidof)
139 # Some AWK programs fail, so test it and warn the user
140 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
141 { if ((prog == $2) || (("(" prog ")") == $2) ||
142 (("[" prog "]") == $2) ||
143 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
145 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
146 The regex engine of $AWK is too broken to be used you
147 might want to install GNU AWK.
148 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
151 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
154 test -n "$ARFLAG" || ARFLAGS="cr"
161 AC_SUBST(LOCAL_CFLAGS)
162 AC_SUBST(LOCAL_LDFLAGS)
165 dnl --------------------------------------------------
167 dnl --------------------------------------------------
169 AC_ARG_ENABLE(libtool,
170 AC_HELP_STRING([--enable-libtool], [enable building using GNU libtool @<:@default=yes@:>@]),
172 if test x$enableval = xno; then
177 LT_INIT([shared disable-static])
181 if test x$use_libtool != xno; then
182 DEFAULT_OBJECT_TYPE=".lo"
183 DEFAULT_ARCHIVE_TYPE=".la"
184 DEFAULT_SHARED_OBJECT_TYPE=".la"
185 LIBTOOL="\$(LIBTOOL)"
186 LIBTOOL_INSTALL_TARGET="libtool-install"
187 LIBTOOL_UNINSTALL_TARGET="libtool-uninstall"
188 LIBTOOL_CLEAN_TARGET="libtool-clean"
189 QMAKE_LIBTOOL="${BUILD_DIR}/libtool"
190 FD_PLUGIN_DIR="src/plugins/fd"
193 DEFAULT_OBJECT_TYPE=".o"
194 DEFAULT_ARCHIVE_TYPE=".a"
195 DEFAULT_SHARED_OBJECT_TYPE=".so"
196 LIBTOOL="# \$(LIBTOOL)"
197 LIBTOOL_INSTALL_TARGET=""
198 LIBTOOL_UNINSTALL_TARGET=""
199 LIBTOOL_CLEAN_TARGET=""
200 QMAKE_LIBTOOL="# ${BUILD_DIR}/libtool"
205 AC_SUBST(DEFAULT_OBJECT_TYPE)
206 AC_SUBST(DEFAULT_ARCHIVE_TYPE)
207 AC_SUBST(DEFAULT_SHARED_OBJECT_TYPE)
209 AC_SUBST(LIBTOOL_INSTALL_TARGET)
210 AC_SUBST(LIBTOOL_UNINSTALL_TARGET)
211 AC_SUBST(LIBTOOL_CLEAN_TARGET)
212 AC_SUBST(QMAKE_LIBTOOL)
213 AC_SUBST(FD_PLUGIN_DIR)
215 dnl --------------------------------------------------
216 dnl Include file handling
217 dnl --------------------------------------------------
218 AC_ARG_ENABLE(includes,
219 AC_HELP_STRING([--enable-includes], [enable installing of include files @<:@default=no@:>@]),
221 if test x$enableval = xyes; then
227 dnl It only makes sense to install include files when you install libraries which only happens when
228 dnl libtool is enabled
230 if test x$use_libtool != xno -a x$install_includes = xyes; then
231 INCLUDE_INSTALL_TARGET="install-includes"
232 INCLUDE_UNINSTALL_TARGET="uninstall-includes"
234 INCLUDE_INSTALL_TARGET=""
235 INCLUDE_UNINSTALL_TARGET=""
237 AC_SUBST(INCLUDE_INSTALL_TARGET)
238 AC_SUBST(INCLUDE_UNINSTALL_TARGET)
240 dnl --------------------------------------------------
241 dnl Bacula OP Sys determination (see aclocal.m4)
242 dnl --------------------------------------------------
245 dnl -----------------------------------------------------------
246 dnl Bacula OPSys Distribution determination (see aclocal.m4)
247 dnl ----------------------------------------------------------
248 BA_CHECK_OPSYS_DISTNAME
250 dnl --------------------------------------------------
251 dnl Suppport for gettext (translations)
252 dnl By default, $datarootdir is ${prefix}/share
253 dnl --------------------------------------------------
254 AM_GNU_GETTEXT([external])
256 dnl ------------------------------------------------------------------
257 dnl If the user has not set --prefix, we set our default to nothing.
258 dnl In this case, if the user has not set --sysconfdir, we set it
259 dnl to the package default of /etc/bacula. If either --prefix or
260 dnl --sysconfdir is set, we leave sysconfdir alone except to eval it.
261 dnl If the user has not set --libdir, we set it to the package
262 dnl default of /usr/lib. If either --prefix or --libdir is set,
263 dnl we leave libdir alone except to eval it. If the user has not set
264 dnl --includedir, we set it to the package default of /usr/include.
265 dnl If either --prefix or --includedir is set, we leave includedir
266 dnl alone except to eval it
267 dnl ------------------------------------------------------------------
268 os_name=`uname -s 2>/dev/null`
269 if test x${prefix} = xNONE ; then
270 if test `eval echo ${sysconfdir}` = NONE/etc ; then
271 sysconfdir=/etc/bacula
274 if test `eval echo ${libdir}` = NONE/lib ; then
277 os_processor=`uname -p 2>/dev/null`
278 case ${os_processor} in
293 if test `eval echo ${includedir}` = NONE/include ; then
294 includedir=/usr/include
297 if test `eval echo ${datarootdir}` = NONE/share ; then
298 datarootdir=/usr/share
303 dnl -------------------------------------------------------------------------
304 dnl If the user has not set --exec-prefix, we default to ${prefix}
305 dnl -------------------------------------------------------------------------
306 if test x${exec_prefix} = xNONE ; then
307 exec_prefix=${prefix}
310 sysconfdir=`eval echo ${sysconfdir}`
311 datarootdir=`eval echo ${datarootdir}`
312 docdir=`eval echo ${docdir}`
313 htmldir=`eval echo ${htmldir}`
314 libdir=`eval echo ${libdir}`
315 includedir=`eval echo ${includedir}`
316 localedir=`eval echo ${datarootdir}/locale`
317 AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir")
318 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
320 dnl ------------------------------------------------------------------
321 dnl If the user has not set --sbindir, we set our default as /sbin
322 dnl ------------------------------------------------------------------
323 if test x$sbindir = x'${exec_prefix}/sbin' ; then
324 sbindir=${exec_prefix}/sbin
326 sbindir=`eval echo ${sbindir}`
328 dnl -------------------------------------------------------------------------
329 dnl If the user has not set --mandir, we default to /usr/share/man
330 dnl -------------------------------------------------------------------------
331 if test x$mandir = x'${prefix}/man' ; then
332 mandir=/usr/share/man
335 dnl -------------------------------------------------------------------------
336 dnl If the user has not set --htmldir, we default to /usr/share/doc/bacula/html
337 dnl -------------------------------------------------------------------------
338 if test x$htmldir = x'/usr/share/doc/bacula/' ; then
339 htmldir=`eval echo ${docdir}html`
342 dnl -------------------------------------------------------------------------
343 dnl If the user has not set --docdir, we default to /usr/share/doc/bacula
344 dnl -------------------------------------------------------------------------
345 if test x$docdir = x'/usr/share/doc/' ; then
346 docdir=`eval echo ${docdir}bacula`
350 AC_PATH_PROGS(MSGFMT, msgfmt, no)
351 if test "$MSGFMT" = "no"
353 echo 'msgfmt program not found, disabling NLS !'
355 USE_INCLUDED_LIBINTL=no
360 support_smartalloc=yes
367 support_static_tools=no
370 support_static_dir=no
371 support_static_cons=no
376 batch_insert_db_backends=""
379 dnl --------------------------------------------------------------------------
380 dnl CHECKING COMMAND LINE OPTIONS
381 dnl --------------------------------------------------------------------------
383 dnl -------------------------------------------
384 dnl bat (default off)
385 dnl -------------------------------------------
387 AC_HELP_STRING([--enable-bat], [enable build of bat Qt4 GUI @<:@default=no@:>@]),
389 if test x$enableval = xyes; then
390 AC_DEFINE(HAVE_BAT, 1, [Set if Bacula bat Qt4 GUI support enabled])
397 if test x$support_bat = xyes; then
398 abc=`$PKGCONFIG --atleast-version=4.2 QtGui`
400 if test $pkg = 0; then
401 BAT_DIR=src/qt-console
403 AC_MSG_ERROR(Unable to find Qt4 installation needed by bat)
408 dnl The qwt library was used with bat, but that is no longer the case
416 dnl if test x$support_bat = xyes; then
417 dnl AC_MSG_CHECKING(for qwt support)
419 dnl AC_HELP_STRING([--with-qwt@<:@=DIR@:>@], [specify qwt library directory]),
421 dnl case "$with_qwt" in
426 dnl if test -f ${with_qwt}/include/qwt.h; then
427 dnl QWT_INC="${with_qwt}/include"
428 dnl QWT_LDFLAGS="-L${with_qwt}/lib"
438 dnl dnl Search in standard places, or --with-qwt not specified
440 dnl if test $no_qwt = no; then
441 dnl if test x$QWT_INC = x; then
442 dnl for root in /usr /usr/local; do
443 dnl for ver in qwt qwt5 qwt-qt4; do
444 dnl if test -f ${root}/include/${ver}/qwt.h; then
445 dnl QWT_INC="${root}/include/${ver}"
446 dnl if test -d ${root}/lib64/; then
447 dnl QWT_LDFLAGS="-L${root}/lib64"
448 dnl elif test -d ${root}/lib/64/; then
449 dnl QWT_LDFLAGS="-L${root}/64"
451 dnl QWT_LDFLAGS="-L${root}/lib"
462 dnl if test x$QWT_INC = x; then
463 dnl AC_MSG_RESULT(no)
465 dnl AC_DEFINE(HAVE_QWT, 1, [Set if bat QWT library found])
466 dnl AC_MSG_RESULT(yes)
472 AC_SUBST(QWT_LDFLAGS)
476 dnl -------------------------------------------
477 dnl smartalloc (default off)
478 dnl -------------------------------------------
479 AC_ARG_ENABLE(smartalloc,
480 AC_HELP_STRING([--enable-smartalloc], [enable smartalloc debugging support @<:@default=no@:>@]),
482 if test x$enableval = xno; then
483 support_smartalloc=no
488 if test x$support_smartalloc = xyes; then
489 AC_DEFINE(SMARTALLOC, 1, [Set if you want Smartalloc enabled])
492 dnl -------------------------------------------
493 dnl Lock Manager (default off)
494 dnl -------------------------------------------
495 AC_ARG_ENABLE(lockmgr,
496 AC_HELP_STRING([--enable-lockmgr], [enable lock manager support @<:@default=no@:>@]),
498 if test x$enableval = xyes; then
504 if test x$support_lockmgr = xyes; then
505 AC_DEFINE(USE_LOCKMGR, 1, [Set if you want Lock Manager enabled])
509 dnl -------------------------------------------
510 dnl static-tools (default off)
511 dnl -------------------------------------------
512 AC_ARG_ENABLE(static-tools,
513 AC_HELP_STRING([--enable-static-tools], [enable static tape tools @<:@default=no@:>@]),
515 if test x$enableval = xyes; then
516 if test x$use_libtool = xyes; then
517 AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
518 please rerun configure with --disable-libtool])
520 support_static_tools=yes
526 if test x$support_static_tools = xyes; then
527 TTOOL_LDFLAGS="-static"
529 AC_SUBST(TTOOL_LDFLAGS)
531 dnl -------------------------------------------
532 dnl static-fd (default off)
533 dnl -------------------------------------------
534 AC_ARG_ENABLE(static-fd,
535 AC_HELP_STRING([--enable-static-fd], [enable static File daemon @<:@default=no@:>@]),
537 if test x$enableval = xyes; then
538 if test x$use_libtool = xyes; then
539 AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
540 please rerun configure with --disable-libtool])
542 support_static_fd=yes
548 if test x$support_static_fd = xyes; then
549 STATIC_FD="static-bacula-fd"
553 dnl -------------------------------------------
554 dnl static-sd (default off)
555 dnl -------------------------------------------
556 AC_ARG_ENABLE(static-sd,
557 AC_HELP_STRING([--enable-static-sd], [enable static Storage daemon @<:@default=no@:>@]),
559 if test x$enableval = xyes; then
560 if test x$use_libtool = xyes; then
561 AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
562 please rerun configure with --disable-libtool])
564 support_static_sd=yes
570 if test x$support_static_sd = xyes; then
571 STATIC_SD="static-bacula-sd"
575 dnl -------------------------------------------
576 dnl static-dir (default off)
577 dnl -------------------------------------------
578 AC_ARG_ENABLE(static-dir,
579 AC_HELP_STRING([--enable-static-dir], [enable static Director @<:@default=no@:>@]),
581 if test x$enableval = xyes; then
582 if test x$use_libtool = xyes; then
583 AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
584 please rerun configure with --disable-libtool])
586 support_static_dir=yes
592 if test x$support_static_dir = xyes; then
593 STATIC_DIR="static-bacula-dir"
597 dnl -------------------------------------------
598 dnl static-cons (default off)
599 dnl -------------------------------------------
600 AC_ARG_ENABLE(static-cons,
601 AC_HELP_STRING([--enable-static-cons], [enable static Console @<:@default=no@:>@]),
603 if test x$enableval = xyes; then
604 if test x$use_libtool = xyes; then
605 AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
606 please rerun configure with --disable-libtool])
608 support_static_cons=yes
614 if test x$support_static_cons = xyes; then
615 STATIC_CONS="static-bconsole"
617 AC_SUBST(STATIC_CONS)
619 dnl -------------------------------------------
620 dnl client_only (default off)
621 dnl -------------------------------------------
622 AC_ARG_ENABLE(client-only,
623 AC_HELP_STRING([--enable-client-only], [build client (File daemon) only @<:@default=no@:>@]),
625 if test x$enableval = xyes; then
626 build_client_only=yes
632 if test x$build_client_only = xno; then
639 dnl -------------------------------------------
640 dnl director (default on)
641 dnl -------------------------------------------
642 AC_ARG_ENABLE(build-dird,
643 AC_HELP_STRING([--enable-build-dird], [enable building of dird (Director) @<:@default=yes@:>@]),
645 if test x$enableval = xno; then
657 dnl -------------------------------------------
658 dnl stored (default on)
659 dnl -------------------------------------------
660 AC_ARG_ENABLE(build-stored,
661 AC_HELP_STRING([--enable-build-stored], [enable building of stored (Storage daemon) @<:@default=yes@:>@]),
663 if test x$enableval = xno; then
668 if test x$build_stored = xyes; then
669 STORED_DIR="src/stored"
675 dnl ---------------------------------------------------
676 dnl Check for conio (Bacula readline substitute)(
677 dnl ---------------------------------------------------
678 dnl this allows you to turn it completely off
680 AC_HELP_STRING([--disable-conio], [disable conio support @<:@default=no@:>@]),
682 if test x$enableval = xno; then
689 dnl ---------------------------------------------------
690 dnl Check for IPv6 support
691 dnl ---------------------------------------------------
692 dnl this allows you to turn it completely off
695 AC_HELP_STRING([--enable-ipv6], [enable ipv6 support @<:@default=yes@:>@]),
697 if test x$enableval = xno; then
703 if test x$support_ipv6 = xyes; then
704 AC_TRY_LINK([ #include <sys/types.h>
705 #include <sys/socket.h>
706 #include <netinet/in.h>], [struct in6_addr t=in6addr_any; t.s6_addr[0] = 0;],
707 [support_in6addr_any=yes], [support_in6addr_any=no])
709 if test x$support_in6addr_any = xno ; then
710 in6addr_any="const struct in6_addr in6addr_any"
715 AC_TRY_LINK([ #include <sys/types.h>
716 #include <sys/socket.h>
717 #include <netinet/in.h>], [$in6addr_any; struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;],
718 [support_ipv6=yes], [support_ipv6=no])
721 if test x$support_ipv6 = xyes; then
722 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
724 if test x$support_in6addr_any = xno ; then
725 AC_DEFINE(NEED_IN6ADDR_ANY,1,[Whether to have in6addr_any support])
730 AC_CHECK_HEADER(curses.h, [
731 AC_CHECK_LIB(tinfo, tgetent, [ TERM_LIB="-ltinfo" ], [
732 AC_CHECK_LIB(ncurses, tgetent, [ TERM_LIB="-lncurses" ], [
733 AC_CHECK_LIB(termcap, tgetent, [ TERM_LIB="-ltermcap" ])
737 [ AC_CHECK_HEADERS(curses.h)
738 AC_CHECK_HEADER(term.h,
739 [ AC_CHECK_LIB(curses, tgetent,
740 [ TERM_LIB="-lcurses" ] )
746 if test x$support_conio = xyes; then
747 if test x$TERM_LIB != x; then
753 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
755 echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "
760 dnl ---------------------------------------------------
761 dnl Check for readline support/directory (default off)
762 dnl ---------------------------------------------------
763 dnl this allows you to turn it completely off
764 AC_ARG_ENABLE(readline,
765 AC_HELP_STRING([--disable-readline], [disable readline support @<:@default=yes@:>@]),
767 if test x$enableval = xno; then
775 if test x$support_readline = xyes; then
776 AC_ARG_WITH(readline,
777 AC_HELP_STRING([--with-readline@<:@=DIR@:>@], [specify readline library directory]),
779 case "$with_readline" in
784 if test -f ${with_readline}/readline.h; then
785 CONS_INC="-I${with_readline}"
786 CONS_LDFLAGS="-L$with_readline"
787 elif test -f ${with_readline}/include/readline/readline.h; then
788 CONS_INC="-I${with_readline}/include/readline"
789 CONS_LDFLAGS="-L${with_readline}/lib"
790 with_readline="${with_readline}/include/readline"
792 with_readline="/usr/include/readline"
795 AC_CHECK_HEADER(${with_readline}/readline.h,
797 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
798 CONS_LIBS="-lreadline -lhistory ${TERM_LIB}"
802 echo "readline.h not found. readline turned off ..."
809 dnl check for standard readline library
810 AC_CHECK_HEADER(/usr/include/readline/readline.h,
812 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
814 CONS_INC="-I/usr/include/readline"
815 CONS_LIBS="-lreadline ${TERM_LIB}"
817 dnl Did not find standard library, so try Bacula's default
818 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
820 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
822 CONS_INC="-I${TOP_DIR}/depkgs/readline"
823 CONS_LIBS="-lreadline -lhistory ${TERM_LIB}"
824 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
825 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
828 echo "readline.h not found. readline turned off ..."
842 AC_SUBST(CONS_LDFLAGS)
843 AC_SUBST(READLINE_SRC)
845 dnl Minimal stuff for readline Makefile configuration
850 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr)
851 AC_CHECK_FUNCS(lstat lchown lchmod futimes fchmod fchown)
852 AC_CHECK_FUNCS(nanosleep nl_langinfo)
853 AC_CHECK_FUNCS(be64toh htobe64)
854 AC_CHECK_HEADERS(varargs.h)
856 dnl End of readline/conio stuff
857 dnl -----------------------------------------------------------------------
860 dnl Find where sockets are (especially for Solaris)
861 dnl Do this before the TCP Wrappers test since tcp wrappers
862 dnl uses the socket library and some linkers are stupid.
864 AC_CHECK_FUNC(socket,
865 AC_MSG_RESULT(using libc's socket),
866 AC_CHECK_LIB(xnet,socket)
867 AC_CHECK_LIB(socket,socket)
868 AC_CHECK_LIB(inet,socket))
870 dnl -----------------------------------------------------------
871 dnl Check whether user wants TCP wrappers support (default off)
872 dnl -----------------------------------------------------------
875 AC_ARG_WITH(tcp-wrappers,
876 AC_HELP_STRING([--with-tcp-wrappers@<:@=DIR@:>@], [enable tcpwrappers support]),
878 if test "x$withval" != "xno" ; then
880 LIBS="$saved_LIBS -lwrap"
881 AC_SEARCH_LIBS(nanosleep, [rt])
882 AC_MSG_CHECKING(for libwrap)
885 #include <sys/types.h>
887 int deny_severity = 0;
888 int allow_severity = 0;
889 struct request_info *req;
894 AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
899 LIBS="$saved_LIBS -lwrap -lnsl"
900 WRAPLIBS="$saved_LIBS -lwrap -lnsl"
903 #include <sys/types.h>
905 int deny_severity = 0;
906 int allow_severity = 0;
907 struct request_info *req;
912 AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
917 AC_MSG_ERROR([*** libwrap missing])
926 dnl -----------------------------------------------------------
927 dnl Check whether OpenSSL is available
928 dnl -----------------------------------------------------------
929 AC_MSG_CHECKING([for OpenSSL])
930 dnl The following uses quadrigraphs:
934 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
936 with_openssl_directory=${withval}
940 if test "x$with_openssl_directory" != "xno"; then
941 OPENSSL_LIBS="-lssl -lcrypto"
944 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
946 # Make sure the $with_openssl_directory also makes sense
948 if test -d "$with_openssl_directory/lib" -a -d "$with_openssl_directory/include"; then
949 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
950 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
955 saved_CFLAGS="${CFLAGS}"
956 LIBS="${saved_LIBS} ${OPENSSL_LIBS}"
957 CFLAGS="${saved_CFLAGS} ${OPENSSL_INC}"
961 #include <openssl/ssl.h>
963 CRYPTO_set_id_callback(NULL);
975 #include <openssl/evp.h>
979 ac_cv_openssl_sha2="yes"
981 ac_cv_openssl_sha2="no"
985 dnl Solaris disables greater than 128+ bit encryption in their OpenSSL
986 dnl implementation, presumably for export reasons. If 192bit AES
987 dnl is available, we assume that we're running with a 'non-export'
991 #include <openssl/evp.h>
995 ac_cv_openssl_export="no"
997 ac_cv_openssl_export="yes"
1001 AC_MSG_RESULT([$support_tls])
1002 if test "$support_tls" = "yes"; then
1003 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
1004 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
1005 AC_DEFINE(HAVE_CRYPTO, 1, [Define if encryption support should be enabled])
1008 if test "$ac_cv_openssl_sha2" = "yes"; then
1009 AC_DEFINE(HAVE_SHA2, 1, [Define if the SHA-2 family of digest algorithms is available])
1012 if test "$ac_cv_openssl_export" = "yes"; then
1013 AC_DEFINE(HAVE_OPENSSL_EXPORT_LIBRARY, 1, [Define if the OpenSSL library is export-contrained to 128bit ciphers])
1016 if test "$support_crypto" = "yes"; then
1017 AC_CHECK_LIB(crypto, EVP_PKEY_encrypt_old, AC_DEFINE(HAVE_OPENSSLv1, 1, [Set if have OpenSSL version 1.x]))
1020 LIBS="${saved_LIBS}"
1021 CFLAGS="${saved_CFLAGS}"
1025 AC_MSG_RESULT([$support_tls])
1028 if test "$support_tls" = "no" -o "$support_crypto" = "no"; then
1033 AC_SUBST(OPENSSL_LIBS)
1034 AC_SUBST(OPENSSL_INC)
1036 dnl -----------------------------------------------------------
1037 dnl dlopen is needed for plugins
1038 dnl -----------------------------------------------------------
1039 AC_SEARCH_LIBS(dlopen, [dl])
1041 dnl ------------------------------------------
1042 dnl Where to place working dir
1043 dnl ------------------------------------------
1044 working_dir=`eval echo /opt/bacula/working`
1045 AC_ARG_WITH(working-dir,
1046 AC_HELP_STRING([--with-working-dir=PATH], [specify path of Bacula working directory]),
1048 if test "x$withval" != "xno" ; then
1049 working_dir=$withval
1054 AC_SUBST(working_dir)
1056 dnl ------------------------------------------------------------------
1057 dnl If the user has not set archivedir, we set our default as /tmp
1058 dnl ------------------------------------------------------------------
1060 AC_ARG_WITH(archivedir,
1061 AC_HELP_STRING([--with-archivedir=PATH], [specify path of SD archive directory]),
1063 if test "x$withval" != "xno" ; then
1069 AC_SUBST(archivedir)
1071 dnl ------------------------------------------------------------------
1072 dnl Allow the user to specify the daemon resource name default hostname
1073 dnl ------------------------------------------------------------------
1075 AC_ARG_WITH(basename,
1076 AC_HELP_STRING([--with-basename=RESNAME], [specify base resource name for daemons]),
1078 if test "x$withval" != "xno" ; then
1086 dnl ------------------------------------------------------------------
1087 dnl Allow the user to override the hostname (default = machine hostname)
1088 dnl ------------------------------------------------------------------
1089 hostname=`uname -n | cut -d '.' -f 1`
1090 if test x${hostname} = x ; then
1091 hostname="localhost"
1093 dnl Make sure hostname is resolved
1094 ping -c 1 $hostname 2>/dev/null 1>/dev/null
1095 if test ! $? = 0; then
1096 hostname="localhost"
1098 AC_ARG_WITH(hostname,
1099 AC_HELP_STRING([--with-hostname=RESNAME], [specify host name for daemons]),
1101 if test "x$withval" != "xno" ; then
1110 dnl ------------------------------------------
1111 dnl Where to place scriptdir (script files)
1112 dnl ------------------------------------------
1113 scriptdir=`eval echo ${sysconfdir}`
1114 AC_ARG_WITH(scriptdir,
1115 AC_HELP_STRING([--with-scriptdir=PATH], [specify path of Bacula scripts directory]),
1117 if test "x$withval" != "xno" ; then
1126 dnl ------------------------------------------
1127 dnl Where to place bsrdir (bsr files)
1128 dnl ------------------------------------------
1129 bsrdir=`eval echo /opt/bacula/bsr`
1131 AC_HELP_STRING([--with-bsrdir=PATH], [specify path of Bacula bsrs directory]),
1133 if test "x$withval" != "xno" ; then
1141 dnl ------------------------------------------
1142 dnl Where to place logdir
1143 dnl ------------------------------------------
1144 logdir=`eval echo /opt/bacula/log`
1146 AC_HELP_STRING([--with-logdir=PATH], [specify path of Bacula logs directory]),
1148 if test "x$withval" != "xno" ; then
1157 # ------------------------------------------
1158 # Where to place plugindir (plugin files)
1159 # ------------------------------------------
1160 plugindir=`eval echo ${libdir}`
1161 AC_ARG_WITH(plugindir,
1162 AC_HELP_STRING([--with-plugindir=PATH], [specify path of Bacula plugins directory]),
1164 if test "x$withval" != "xno" ; then
1172 dnl ------------------------------------------
1173 dnl Where to send dump email
1174 dnl ------------------------------------------
1176 dnl ------------------------------------------
1177 dnl Where to send dump email
1178 dnl ------------------------------------------
1179 dump_email=root@localhost
1180 AC_ARG_WITH(dump-email,
1181 AC_HELP_STRING([--with-dump-email=EMAIL], [dump email address]),
1183 if test "x$withval" != "xno" ; then
1189 AC_SUBST(dump_email)
1191 dnl ------------------------------------------
1192 dnl Where to send job email
1193 dnl ------------------------------------------
1194 job_email=root@localhost
1195 AC_ARG_WITH(job-email,
1196 AC_HELP_STRING([--with-job-email=EMAIL], [job output email address]),
1198 if test "x$withval" != "xno" ; then
1206 dnl ------------------------------------------
1207 dnl Where to find smtp host
1208 dnl ------------------------------------------
1210 AC_ARG_WITH(smtp_host,
1211 AC_HELP_STRING([--with-smtp-host=HOST], [SMTP mail host address]),
1213 if test "x$withval" != "xno" ; then
1221 dnl ------------------------------------
1222 dnl Where to place pid files
1223 dnl ------------------------------------
1225 AC_ARG_WITH(pid-dir,
1226 AC_HELP_STRING([--with-pid-dir=PATH], [specify location of Bacula pid files]),
1228 if test "x$withval" != "xno" ; then
1234 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
1237 dnl ------------------------------------
1238 dnl Where to place subsys "lock file"
1239 dnl ------------------------------------
1240 subsysdir=/var/run/subsys
1241 if test -d /var/run/subsys; then
1242 subsysdir=/var/run/subsys
1243 elif test -d /var/lock/subsys; then
1244 subsysdir=/var/lock/subsys
1246 subsysdir=/var/run/subsys
1248 AC_ARG_WITH(subsys-dir,
1249 AC_HELP_STRING([--with-subsys-dir=PATH], [specify location of Bacula subsys file]),
1251 if test "x$withval" != "xno" ; then
1259 dnl ------------------------------------
1260 dnl Where to start assigning ports
1261 dnl ------------------------------------
1263 AC_ARG_WITH(baseport,
1264 AC_HELP_STRING([--with-baseport=PORT], [specify base port address for daemons]),
1266 if test "x$withval" != "xno" ; then
1273 dir_port=`expr $baseport`
1274 fd_port=`expr $baseport + 1`
1275 sd_port=`expr $fd_port + 1`
1281 dnl ------------------------------------------
1282 dnl Generate passwords
1283 dnl ------------------------------------------
1285 AC_ARG_WITH(dir-password,
1286 AC_HELP_STRING([--with-dir-password=PASSWORD], [specify Director's password]),
1288 if test "x$withval" != "xno" ; then
1289 dir_password=$withval
1294 if test "x$dir_password" = "x" ; then
1295 if test "x$OPENSSL" = "xnone" ; then
1296 key=`autoconf/randpass 33`
1298 key=`openssl rand -base64 33`
1304 AC_ARG_WITH(fd-password,
1305 AC_HELP_STRING([--with-fd-password=PASSWORD], [specify Client's password]),
1307 if test "x$withval" != "xno" ; then
1308 fd_password=$withval
1313 if test "x$fd_password" = "x" ; then
1314 if test "x$OPENSSL" = "xnone" ; then
1315 key=`autoconf/randpass 37`
1317 key=`openssl rand -base64 33`
1323 AC_ARG_WITH(sd-password,
1324 AC_HELP_STRING([--with-sd-password=PASSWORD], [specify Storage daemon's password]),
1326 if test "x$withval" != "xno" ; then
1327 sd_password=$withval
1332 if test "x$sd_password" = "x" ; then
1333 if test "x$OPENSSL" = "xnone" ; then
1334 key=`autoconf/randpass 41`
1336 key=`openssl rand -base64 33`
1342 AC_ARG_WITH(mon-dir-password,
1343 AC_HELP_STRING([--with-mon-dir-password=PASSWORD], [specify Director's password used by the monitor]),
1345 if test "x$withval" != "xno" ; then
1346 mon_dir_password=$withval
1351 if test "x$mon_dir_password" = "x" ; then
1352 if test "x$OPENSSL" = "xnone" ; then
1353 key=`autoconf/randpass 33`
1355 key=`openssl rand -base64 33`
1357 mon_dir_password=$key
1361 AC_ARG_WITH(mon-fd-password,
1362 AC_HELP_STRING([--with-mon-fd-password=PASSWORD], [specify Client's password used by the monitor]),
1364 if test "x$withval" != "xno" ; then
1365 mon_fd_password=$withval
1370 if test "x$mon_fd_password" = "x" ; then
1371 if test "x$OPENSSL" = "xnone" ; then
1372 key=`autoconf/randpass 37`
1374 key=`openssl rand -base64 33`
1376 mon_fd_password=$key
1380 AC_ARG_WITH(mon-sd-password,
1381 AC_HELP_STRING([--with-mon-sd-password=PASSWORD], [specify Storage daemon's password used by the monitor]),
1383 if test "x$withval" != "xno" ; then
1384 mon_sd_password=$withval
1389 if test "x$mon_sd_password" = "x" ; then
1390 if test "x$OPENSSL" = "xnone" ; then
1391 key=`autoconf/randpass 41`
1393 key=`openssl rand -base64 33`
1395 mon_sd_password=$key
1398 AC_SUBST(dir_password)
1399 AC_SUBST(fd_password)
1400 AC_SUBST(sd_password)
1401 AC_SUBST(mon_dir_password)
1402 AC_SUBST(mon_fd_password)
1403 AC_SUBST(mon_sd_password)
1406 dnl Pickup any database name
1409 AC_ARG_WITH(db_name,
1410 AC_HELP_STRING([--with-db-name=DBNAME], [specify database name @<:@default=bacula@:>@]),
1412 if test "x$withval" != "x" ; then
1420 AC_ARG_WITH(db_user,
1421 AC_HELP_STRING([--with-db-user=UNAME], [specify database user @<:@default=bacula@:>@]),
1423 if test "x$withval" != "x" ; then
1431 AC_ARG_WITH(db_password,
1432 AC_HELP_STRING([--with-db-password=PWD], [specify database password @<:@default=*none*@:>@]),
1434 if test "x$withval" != "x" ; then
1435 db_password=$withval
1439 AC_SUBST(db_password)
1442 dnl Pickup a database port
1445 AC_ARG_WITH(db_port,
1446 AC_HELP_STRING([--with-db-port=DBPORT], [specify a database port @<:@default=null@:>@]),
1448 if test "x$withval" != "x" ; then
1456 # Handle users and groups for each daemon
1459 AC_ARG_WITH(dir_user,
1460 AC_HELP_STRING([--with-dir-user=USER], [specify user for Director daemon]),
1462 if test "x$withval" != "x" ; then
1469 AC_ARG_WITH(dir_group,
1470 AC_HELP_STRING([--with-dir-group=GROUP], [specify group for Director daemon]),
1472 if test "x$withval" != "x" ; then
1479 AC_ARG_WITH(sd_user,
1480 AC_HELP_STRING([--with-sd-user=USER], [specify user for Storage daemon]),
1482 if test "x$withval" != "x" ; then
1489 AC_ARG_WITH(sd_group,
1490 AC_HELP_STRING([--with-sd-group=GROUP], [specify group for Storage daemon]),
1492 if test "x$withval" != "x" ; then
1499 AC_ARG_WITH(fd_user,
1500 AC_HELP_STRING([--with-fd-user=USER], [specify user for File daemon]),
1502 if test "x$withval" != "x" ; then
1509 AC_ARG_WITH(fd_group,
1510 AC_HELP_STRING([--with-fd-group=GROUP], [specify group for File daemon]),
1512 if test "x$withval" != "x" ; then
1526 dnl allow setting default executable permissions
1529 AC_ARG_WITH(sbin-perm,
1530 AC_HELP_STRING([--with-sbin-perm=MODE], [specify permissions for sbin binaries @<:@default=0750@:>@]),
1532 if test "x$withval" != "x" ; then
1540 dnl -------------------------------------------
1541 dnl enable batch attribute DB insert (default on)
1542 dnl -------------------------------------------
1543 support_batch_insert=yes
1544 AC_ARG_ENABLE(batch-insert,
1545 AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=yes@:>@]),
1547 if test x$enableval = xno; then
1548 support_batch_insert=no
1553 if test x$support_batch_insert = xyes; then
1554 AC_DEFINE(USE_BATCH_FILE_INSERT, 1, [Set if DB batch insert code enabled])
1557 dnl ------------------------------------------------
1558 dnl Bacula check for various SQL database engines
1559 dnl ------------------------------------------------
1562 dnl Set uncomment_dbi by default to '#' if DBI is enabled this will get reset
1566 BA_CHECK_POSTGRESQL_DB
1572 dnl -------------------------------------------
1573 dnl If no batch insert backend are enable set
1574 dnl variable to None
1575 dnl -------------------------------------------
1576 if test -z "${batch_insert_db_backends}"; then
1577 batch_insert_db_backends="None"
1580 dnl -------------------------------------------
1581 dnl Make sure at least one database backend is found
1582 dnl -------------------------------------------
1583 if test "x${db_backends}" = "x" ; then
1586 echo "You have not specified either --enable-client-only or one of the"
1587 echo "supported databases: MySQL, PostgreSQL, or SQLite3."
1588 echo "This is not permitted. Please reconfigure."
1590 echo "Aborting the configuration ..."
1596 dnl -------------------------------------------
1597 dnl See how many catalog backends are configured.
1598 dnl -------------------------------------------
1599 case `echo $DB_BACKENDS | wc -w | sed -e 's/^ *//'` in
1601 DEFAULT_DB_TYPE="${DB_BACKENDS}"
1602 if test x$use_libtool = xno; then
1603 SHARED_CATALOG_TARGETS=""
1605 SHARED_CATALOG_TARGETS="libbaccats-${DEFAULT_DB_TYPE}.la"
1609 dnl ------------------------------------------------
1610 dnl Set the default backend to the first backend found
1611 dnl ------------------------------------------------
1612 DEFAULT_DB_TYPE=`echo ${DB_BACKENDS} | cut -d' ' -f1`
1614 dnl ------------------------------------------------
1615 dnl For multiple backend we need libtool support.
1616 dnl ------------------------------------------------
1617 if test x$use_libtool = xno; then
1620 echo "You have specified two or more of the"
1621 echo "supported databases: MySQL, PostgreSQL, or SQLite3."
1622 echo "This is not permitted when not using libtool Please reconfigure."
1624 echo "Aborting the configuration ..."
1630 SHARED_CATALOG_TARGETS=""
1631 for db_type in ${DB_BACKENDS}
1633 if test -z "${SHARED_CATALOG_TARGETS}"; then
1634 SHARED_CATALOG_TARGETS="libbaccats-${db_type}.la"
1636 SHARED_CATALOG_TARGETS="${SHARED_CATALOG_TARGETS} libbaccats-${db_type}.la"
1642 dnl -------------------------------------------
1643 dnl Unset DB_LIBS when using libtool as we link the
1644 dnl shared library using the right database lib no need to
1645 dnl set DB_LIBS which is only used for non shared versions
1646 dnl of the backends.
1647 dnl -------------------------------------------
1648 if test x$use_libtool = xyes; then
1652 AC_SUBST(uncomment_dbi)
1653 AC_SUBST(DB_BACKENDS)
1655 AC_SUBST(DEFAULT_DB_TYPE)
1656 AC_SUBST(SHARED_CATALOG_TARGETS)
1658 AC_DEFINE(PROTOTYPES)
1660 dnl --------------------------------------------------------------------------
1661 dnl Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1663 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1664 if test -z "$CCOPTS"; then
1665 CCOPTS='-g -O2 -Wall'
1673 dnl See if we can use 64 bit file addresses
1674 largefile_support="no"
1679 dnl --------------------------------------------------------------------------
1680 dnl CHECKING FOR HEADER FILES
1681 dnl --------------------------------------------------------------------------
1720 AC_STRUCT_ST_BLKSIZE
1724 dnl --------------------------------------------------------------------------
1725 dnl Check for utime.h structure
1726 dnl --------------------------------------------------------------------------
1727 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1731 #include <sys/types.h>
1736 ba_cv_header_utime_h=yes
1738 ba_cv_header_utime_h=no
1743 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H, 1, [Set if utime.h exists])
1745 dnl --------------------------------------------------------------------------
1746 dnl Check for socklen_t
1747 dnl --------------------------------------------------------------------------
1748 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1752 #include <sys/types.h>
1753 #include <sys/socket.h>
1757 ba_cv_header_socklen_t=yes
1759 ba_cv_header_socklen_t=no
1764 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T, 1, [Set if socklen_t exists])
1766 dnl --------------------------------------------------------------------------
1767 dnl Check for ioctl request type
1768 dnl --------------------------------------------------------------------------
1770 AC_CACHE_CHECK(for ioctl_req_t, ba_cv_header_ioctl_req_t,
1775 #include <sys/types.h>
1776 #include <sys/ioctl.h>
1778 int (*d_ioctl)(int fd, unsigned long int request, ...);
1781 ba_cv_header_ioctl_req_t=yes
1783 ba_cv_header_ioctl_req_t=no
1788 test $ba_cv_header_ioctl_req_t = yes && AC_DEFINE(HAVE_IOCTL_ULINT_REQUEST, 1, [Set if ioctl request is unsigned long int])
1790 dnl Note: it is more correct to use AC_LANG(C++) but some of the older
1791 dnl *BSD systems still use old style C prototypes, which are wrong with
1792 dnl compiled with a C++ compiler.
1795 dnl --------------------------------------------------------------------------
1796 dnl Check for typeof()
1797 dnl --------------------------------------------------------------------------
1799 AC_CACHE_CHECK(for typeof, ba_cv_have_typeof,
1803 main(){char *a = 0; a = (typeof a)a;}
1805 ba_cv_have_typeof=yes
1807 ba_cv_have_typeof=no
1809 ba_cv_have_typeof=no
1814 test $ba_cv_have_typeof = yes && AC_DEFINE([HAVE_TYPEOF], 1, [Defind to 1 if compiler has typeof])
1819 AC_C_BIGENDIAN([AC_DEFINE([HAVE_BIG_ENDIAN], [1], [Big Endian])], [AC_DEFINE([HAVE_LITTLE_ENDIAN], [1], [Little Endian])])
1821 dnl --------------------------------------------------------------------------
1822 dnl CHECKING FOR FILESYSTEM TYPE
1823 dnl --------------------------------------------------------------------------
1824 AC_MSG_CHECKING(how to get filesystem type)
1826 # The order of these tests is important.
1829 #include <sys/statvfs.h>
1830 #include <sys/fstyp.h>
1832 AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4
1834 if test $fstype = no; then
1837 #include <sys/statfs.h>
1838 #include <sys/fstyp.h>
1840 AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3
1843 if test $fstype = no; then
1846 #include <sys/statfs.h>
1847 #include <sys/vmount.h>
1849 AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX
1852 if test $fstype = no; then
1857 AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD
1860 if test $fstype = no; then
1861 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1863 if test $fstype = no; then
1866 #include <sys/mount.h>
1867 #include <sys/fs_types.h>
1869 AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix
1872 AC_MSG_RESULT($fstype)
1874 AC_CHECK_HEADER(sys/statvfs.h, [ AC_DEFINE(HAVE_SYS_STATVFS_H,1,[Defines if your system have the sys/statvfs.h header file])] , )
1877 AC_CHECK_FUNCS(backtrace)
1880 dnl --------------------------------------------------------------------------
1881 dnl CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1882 dnl --------------------------------------------------------------------------
1892 AC_CHECK_TYPE(ino_t, unsigned long)
1893 AC_CHECK_TYPE(dev_t, unsigned long)
1894 AC_CHECK_TYPE(daddr_t, long)
1895 AC_CHECK_TYPE(major_t, int)
1896 AC_CHECK_TYPE(minor_t, int)
1897 AC_CHECK_TYPE(ssize_t, int)
1904 AC_CHECK_SIZEOF(char, 1)
1905 AC_CHECK_SIZEOF(short int, 2)
1906 AC_CHECK_SIZEOF(int, 4)
1907 AC_CHECK_SIZEOF(long int, 4)
1908 AC_CHECK_SIZEOF(long long int, 8)
1909 AC_CHECK_SIZEOF(int *, 4)
1911 dnl Check for sys/types.h types
1912 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int,
1916 #include <sys/types.h>
1920 ac_cv_have_u_int="yes"
1922 ac_cv_have_u_int="no"
1927 if test "x$ac_cv_have_u_int" = "xyes" ; then
1928 AC_DEFINE(HAVE_U_INT)
1932 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t,
1936 #include <sys/types.h>
1940 ac_cv_have_intmax_t="yes"
1948 ac_cv_have_intmax_t="yes"
1950 ac_cv_have_intmax_t="no"
1957 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1958 AC_DEFINE(HAVE_INTMAX_T)
1962 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t,
1966 #include <sys/types.h>
1968 u_intmax_t a; a = 1;
1970 ac_cv_have_u_intmax_t="yes"
1976 u_intmax_t a; a = 1;
1978 ac_cv_have_u_intmax_t="yes"
1980 ac_cv_have_u_intmax_t="no"
1987 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1988 AC_DEFINE(HAVE_U_INTMAX_T)
1992 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t,
1996 #include <sys/types.h>
1998 int8_t a; int16_t b; int32_t c; a = b = c = 1;
2000 ac_cv_have_intxx_t="yes"
2002 ac_cv_have_intxx_t="no"
2007 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
2008 AC_DEFINE(HAVE_INTXX_T)
2012 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t,
2016 #include <sys/types.h>
2020 ac_cv_have_int64_t="yes"
2022 ac_cv_have_int64_t="no"
2027 if test "x$ac_cv_have_int64_t" = "xyes" ; then
2028 AC_DEFINE(HAVE_INT64_T)
2032 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t,
2036 #include <sys/types.h>
2038 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
2040 ac_cv_have_u_intxx_t="yes"
2042 ac_cv_have_u_intxx_t="no"
2047 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
2048 AC_DEFINE(HAVE_U_INTXX_T)
2052 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t,
2056 #include <sys/types.h>
2060 ac_cv_have_u_int64_t="yes"
2062 ac_cv_have_u_int64_t="no"
2067 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
2068 AC_DEFINE(HAVE_U_INT64_T)
2072 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
2073 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2075 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
2078 #include <sys/bitypes.h>
2080 int8_t a; int16_t b; int32_t c;
2081 u_int8_t e; u_int16_t f; u_int32_t g;
2082 a = b = c = e = f = g = 1;
2084 AC_DEFINE(HAVE_U_INTXX_T)
2085 AC_DEFINE(HAVE_INTXX_T)
2086 AC_DEFINE(HAVE_SYS_BITYPES_H)
2094 if test -z "$have_u_intxx_t" ; then
2095 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t,
2099 #include <sys/types.h>
2101 uint8_t a; uint16_t b;
2102 uint32_t c; a = b = c = 1;
2104 ac_cv_have_uintxx_t="yes"
2106 ac_cv_have_uintxx_t="no"
2111 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
2112 AC_DEFINE(HAVE_UINTXX_T)
2116 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
2117 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2119 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
2122 #include <sys/bitypes.h>
2124 int64_t a; u_int64_t b;
2127 AC_DEFINE(HAVE_U_INT64_T)
2128 AC_DEFINE(HAVE_INT64_T)
2136 if (test -z "$have_uintxx_t" && \
2137 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2139 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
2142 #include <sys/bitypes.h>
2144 uint8_t a; uint16_t b;
2145 uint32_t c; a = b = c = 1;
2147 AC_DEFINE(HAVE_UINTXX_T)
2155 dnl --------------------------------------------------------------------------
2156 dnl CHECKING FOR REQUIRED LIBRARY FUNCTIONS
2157 dnl --------------------------------------------------------------------------
2173 [echo 'configure: cannot find needed function.'; exit 1]
2178 AC_DEFINE(HAVE_FCNTL_F_CLOSEM, 1, [Set if you have 'F_CLOSEM' fcntl flag]),
2180 [#include <fcntl.h>]
2185 AC_DEFINE(HAVE_FCNTL_LOCK, 1, [Set if fcntl supports file locking]),
2187 [#include <fcntl.h>]
2190 AC_CHECK_FUNC(closefrom, [AC_DEFINE(HAVE_CLOSEFROM, 1, [Define to 1 if you have the 'closefrom' function.])])
2191 AC_CHECK_FUNCS(getpagesize, [AC_DEFINE(HAVE_GETPAGESIZE, 1, [Set if have getpagesize])])
2192 AC_CHECK_FUNCS(malloc_trim, [AC_DEFINE(HAVE_MALLOC_TRIM, 1, [Set if have malloc_trim])])
2194 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
2195 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
2196 AC_CHECK_FUNCS(posix_fadvise)
2197 AC_CHECK_FUNCS(posix_fallocate)
2198 AC_CHECK_FUNCS(fdatasync)
2200 AC_CHECK_FUNCS(chflags)
2202 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
2204 AC_CACHE_CHECK(for va_copy, ba_cv_va_copy,
2209 void use_va_copy(va_list args){va_list args2; va_copy(args2,args); va_end(args2);}
2210 void call_use_va_copy(int junk,...){va_list args; va_start(args,junk); use_va_copy(args); va_end(args);}
2212 call_use_va_copy(1,2,3)
2221 test $ba_cv_va_copy = yes && AC_DEFINE(HAVE_VA_COPY, 1, [Set if va_copy exists])
2223 dnl --------------------------------------------------------------------------
2224 dnl CHECKING FOR THREAD SAFE FUNCTIONS
2225 dnl --------------------------------------------------------------------------
2226 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
2228 # If resolver functions are not in libc check for -lnsl or -lresolv.
2229 AC_CHECK_FUNC(gethostbyname_r,
2230 AC_MSG_RESULT(using libc's resolver),
2231 AC_CHECK_LIB(nsl,gethostbyname_r)
2232 AC_CHECK_LIB(resolv,gethostbyname_r))
2234 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
2235 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
2236 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
2237 AC_CHECK_FUNCS(getnameinfo, [AC_DEFINE(HAVE_GETNAMEINFO)])
2240 dnl ----------------------------
2241 dnl check sa_len of sockaddr
2242 dnl ----------------------------
2243 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
2247 #include <sys/socket.h>
2249 struct sockaddr s; s.sa_len;
2251 ac_cv_struct_sockaddr_sa_len=yes
2252 ], [ac_cv_struct_sockaddr_sa_len=no
2258 if test $ac_cv_struct_sockaddr_sa_len = yes; then
2259 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
2263 dnl check for working getaddrinfo()
2265 dnl Note that if the system doesn't have gai_strerror(), we
2266 dnl can't use getaddrinfo() because we can't get strings
2267 dnl describing the error codes.
2269 AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,
2275 #include <sys/types.h>
2276 #include <sys/socket.h>
2279 struct addrinfo hints, *ai;
2282 memset(&hints, 0, sizeof(hints));
2283 hints.ai_family = AF_UNSPEC;
2284 hints.ai_socktype = SOCK_STREAM;
2285 error = getaddrinfo("127.0.0.1", NULL, &hints, &ai);
2289 if (ai->ai_addr->sa_family != AF_INET) {
2295 ac_cv_working_getaddrinfo="yes"
2297 ac_cv_working_getaddrinfo="no"
2299 ac_cv_working_getaddrinfo="yes"
2304 AC_CHECK_FUNC(gai_strerror, [AC_DEFINE(HAVE_GAI_STRERROR, 1, [Define to 1 if you have the 'gai_strerror' function.])])
2306 if test "$ac_cv_working_getaddrinfo" = "yes"; then
2307 if test "$ac_cv_func_gai_strerror" != "yes"; then
2308 ac_cv_working_getaddrinfo="no"
2310 AC_DEFINE(HAVE_GETADDRINFO, 1, [Define to 1 if getaddrinfo exists and works])
2318 AC_CHECK_FUNCS(getmntinfo, [AC_DEFINE(HAVE_GETMNTINFO)])
2319 AC_FUNC_CLOSEDIR_VOID
2320 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
2321 # AC_FUNC_FNMATCH dnl use local version
2323 AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
2325 AC_CHECK_LIB(sun, getpwnam)
2327 AC_CHECK_HEADERS(zlib.h)
2328 AC_CHECK_LIB(z, deflate, [ZLIBS="-lz"])
2330 if test x$ZLIBS = x-lz; then
2331 AC_DEFINE(HAVE_LIBZ)
2337 dnl Check if we have AFS on this system
2343 AC_HELP_STRING([--disable-afs], [disable afs support @<:@default=auto@:>@]),
2345 if test x$enableval = xyes; then
2347 elif test x$enableval = xno; then
2354 if test x$support_afs = xyes -o x$support_afs = xauto; then
2356 AC_HELP_STRING([--with-afsdir@<:@=DIR@:>@], [Directory holding AFS includes/libs]),
2357 with_afsdir=$withval
2361 dnl Search in standard places, or --with-afsdir not specified
2363 if test x$with_afsdir = x; then
2364 for root in /usr /usr/local; do
2365 if test -d ${root}/include/afs/ ; then
2369 if test -d ${root}/include/openafs/afs/ ; then
2376 if test -d ${with_afsdir}/include/afs/ ; then
2377 AFS_CFLAGS="-I${with_afsdir}/include"
2379 if test -d ${with_afsdir}/include/openafs/afs/ ; then
2380 AFS_CFLAGS="-I${with_afsdir}/include/openafs"
2384 saved_CFLAGS="${CFLAGS}"
2385 saved_CPPFLAGS="${CPPFLAGS}"
2386 CFLAGS="${AFS_CFLAGS} ${saved_CFLAGS}"
2387 CPPFLAGS="${AFS_CFLAGS} ${saved_CPPFLAGS}"
2389 AC_CHECK_HEADERS(afs/afsint.h)
2392 #include <afs/afsint.h>
2393 #include <afs/venus.h>
2395 AC_DEFINE(HAVE_AFS_VENUS_H,1,[Define to 1 if you have the <afs/venus.h> header file.])
2398 CFLAGS="${saved_CFLAGS}"
2399 CPPFLAGS="${saved_CPPFLAGS}"
2402 dnl See if we can find a libsys with the pioctl symbol in there
2404 AC_MSG_CHECKING(for pioctl in AFS libsys)
2405 for dir in ${with_afsdir}/lib \
2406 ${with_afsdir}/lib/afs \
2407 ${with_afsdir}/lib/openafs \
2408 ${with_afsdir}/lib64 \
2409 ${with_afsdir}/lib64/afs \
2410 ${with_afsdir}/lib64/openafs
2412 for arch_type in .a .so
2414 A=`test -f ${dir}/libsys${arch_type} && nm ${dir}/libsys${arch_type} 2>/dev/null | grep pioctl`
2416 if test $pkg = 0; then
2418 AFS_LIBS="-L${dir} -lsys -lrx -llwp ${dir}/util${arch_type}"
2424 if test $have_afs = yes; then
2430 if test x$support_afs = xyes -a $have_afs != yes; then
2431 AC_MSG_ERROR([afs support explicitly enabled but no supported afs implementation found,
2432 please either load the afs libraries or rerun configure without --enable-afs])
2434 if test $have_afs = yes; then
2435 AC_DEFINE(HAVE_AFS,1,[Define to 1 if your system has AFS support])
2436 AC_DEFINE(HAVE_AFS_ACL,1,[Andrew FileSystem ACL support])
2440 AC_SUBST(AFS_CFLAGS)
2443 dnl ---------------------------------------------------
2444 dnl Check for lzo support/directory (default on)
2445 dnl ---------------------------------------------------
2446 dnl this allows you to turn it completely off
2449 AC_HELP_STRING([--disable-lzo], [disable lzo support @<:@default=yes@:>@]),
2451 if test x$enableval = xno; then
2462 if test x$support_lzo = xyes; then
2464 AC_HELP_STRING([--with-lzo@<:@=DIR@:>@], [specify lzo library directory]),
2471 if test -f ${with_lzo}/include/lzo/lzoconf.h; then
2472 LZO_INC="-I${with_lzo}/include"
2473 LZO_LDFLAGS="-L${with_lzo}/lib"
2474 with_lzo="${with_lzo}/include"
2476 with_lzo="/usr/include"
2479 AC_CHECK_HEADER(${with_lzo}/lzo/lzoconf.h,
2481 AC_DEFINE(HAVE_LZO, 1, [Define to 1 if you have LZO compression])
2482 LZO_LIBS="${LZO_LDFLAGS} -llzo2"
2486 echo "lzoconf.h not found. lzo turned off ..."
2493 AC_CHECK_HEADER(lzo/lzoconf.h,
2495 AC_CHECK_HEADER(lzo/lzo1x.h,
2497 AC_CHECK_LIB(lzo2, lzo1x_1_compress,
2500 AC_DEFINE(HAVE_LZO,1,[Define to 1 if you have LZO compression])
2513 dnl Check for ACL support and libraries
2517 AC_HELP_STRING([--disable-acl], [disable acl support @<:@default=auto@:>@]),
2519 if test x$enableval = xyes; then
2521 elif test x$enableval = xno; then
2528 have_extended_acl=no
2529 if test x$support_acl = xyes -o x$support_acl = xauto; then
2530 AC_CHECK_HEADER(sys/acl.h, [ AC_DEFINE(HAVE_SYS_ACL_H,1,[Defines if your system have the sys/acl.h header file])] , )
2533 dnl First check for acl_get_file in libc
2535 AC_CHECK_FUNC(acl_get_file,
2542 dnl Check for acl_get_file in libacl (Linux)
2544 if test $have_acl = no; then
2545 AC_CHECK_LIB(acl, acl_get_file,
2548 if test $have_afs = yes; then
2550 dnl Because of possible naming conflict with AFS libacl make sure we use the one in /usr/lib64 or /usr/lib !!!
2552 if test -d /usr/lib64/; then
2553 FDLIBS="-L/usr/lib64 -lacl $FDLIBS"
2555 FDLIBS="-L/usr/lib -lacl $FDLIBS"
2558 FDLIBS="-lacl $FDLIBS"
2565 dnl Check for acl_get_file in libpacl (OSF1)
2566 dnl and if ACL_TYPE_DEFAULT_DIR is defined.
2568 if test $have_acl = no -a \
2569 x${HAVE_OSF1_OS_TRUE} = x; then
2570 AC_CHECK_LIB(pacl, acl_get_file,
2573 FDLIBS="-lpacl $FDLIBS"
2577 AC_MSG_CHECKING(for ACL_TYPE_DEFAULT_DIR in acl.h include file)
2578 grep ACL_TYPE_DEFAULT_DIR /usr/include/sys/acl.h > /dev/null 2>&1
2579 if test $? = 0; then
2580 AC_DEFINE(HAVE_ACL_TYPE_DEFAULT_DIR,1,[Defines if your system have the ACL_TYPE_DEFAULT_DIR acl type])
2588 dnl On OSX check for availability of ACL_TYPE_EXTENDED
2590 if test $have_acl = yes -a \
2591 x${HAVE_DARWIN_OS_TRUE} = x; then
2592 AC_MSG_CHECKING(for ACL_TYPE_EXTENDED in acl.h include file)
2593 grep ACL_TYPE_EXTENDED /usr/include/sys/acl.h > /dev/null 2>&1
2594 if test $? = 0; then
2595 AC_DEFINE(HAVE_ACL_TYPE_EXTENDED,1,[Defines if your system have the ACL_TYPE_EXTENDED acl type])
2603 dnl On FreeBSD check for availability of ACL_TYPE_NFS4
2605 if test $have_acl = yes -a \
2606 x${HAVE_FREEBSD_OS_TRUE} = x; then
2607 AC_MSG_CHECKING(for ACL_TYPE_NFS4 in acl.h include file)
2608 grep ACL_TYPE_NFS4 /usr/include/sys/acl.h > /dev/null 2>&1
2609 if test $? = 0; then
2610 AC_DEFINE(HAVE_ACL_TYPE_NFS4,1,[Defines if your system have the ACL_TYPE_NFS4 acl type])
2618 dnl Check for acltotext and acl_totext (Solaris)
2620 if test $have_acl = no -a \
2621 x${HAVE_SUN_OS_TRUE} = x; then
2622 AC_CHECK_LIB(sec, acltotext,
2625 FDLIBS="-lsec $FDLIBS"
2627 AC_CHECK_LIB(sec, acl_totext,
2629 have_extended_acl=yes
2637 dnl Check for acl_get and aclx_get (AIX)
2639 if test $have_acl = no -a \
2640 x${HAVE_AIX_OS_TRUE} = x; then
2641 AC_CHECK_FUNC(acl_get,
2645 AC_CHECK_FUNC(aclx_get,
2647 have_extended_acl=yes
2654 if test x$support_acl = xyes -a $have_acl != yes; then
2655 AC_MSG_ERROR([acl support explicitly enabled but no supported acl implementation found,
2656 please either load the acl libraries or rerun configure without --enable-acl])
2658 if test $have_acl = yes; then
2659 AC_DEFINE([HAVE_ACL],1,[Normal acl support])
2662 if test $have_extended_acl = yes; then
2663 AC_DEFINE([HAVE_EXTENDED_ACL],1,[Extended acl support])
2669 dnl Check for XATTR support
2672 AC_ARG_ENABLE(xattr,
2673 AC_HELP_STRING([--disable-xattr], [disable xattr support @<:@default=auto@:>@]),
2675 if test x$enableval = xyes; then
2677 elif test x$enableval = xno; then
2684 if test x$support_xattr = xyes -o x$support_xattr = xauto; then
2686 dnl First check for *BSD support
2687 dnl When running on a BSD variant
2689 if test x${HAVE_FREEBSD_OS_TRUE} = x -o \
2690 x${HAVE_NETBSD_OS_TRUE} = x -o \
2691 x${HAVE_OPENBSD_OS_TRUE} = x; then
2692 AC_CHECK_HEADER(sys/extattr.h, [ AC_DEFINE(HAVE_SYS_EXTATTR_H,1,[Defines if your system have the sys/extattr.h header file])] , )
2693 AC_CHECK_HEADER(libutil.h, [ AC_DEFINE(HAVE_LIBUTIL_H,1,[Defines if your system have the libutil.h header file])] , )
2694 AC_CHECK_FUNCS(extattr_get_link extattr_set_link extattr_list_link,
2697 AC_DEFINE([HAVE_EXTATTR_GET_LINK],1,[Define to 1 if you have the 'extattr_get_link' function.])
2698 AC_DEFINE([HAVE_EXTATTR_SET_LINK],1,[Define to 1 if you have the 'extattr_set_link' function.])
2699 AC_DEFINE([HAVE_EXTATTR_LIST_LINK],1,[Define to 1 if you have the 'extattr_list_link' function.])
2703 if test $have_xattr = no; then
2704 AC_CHECK_FUNCS(extattr_get_file extattr_set_file extattr_list_file,
2707 AC_DEFINE([HAVE_EXTATTR_GET_FILE],1,[Define to 1 if you have the 'extattr_get_file' function.])
2708 AC_DEFINE([HAVE_EXTATTR_SET_FILE],1,[Define to 1 if you have the 'extattr_set_file' function.])
2709 AC_DEFINE([HAVE_EXTATTR_LIST_FILE],1,[Define to 1 if you have the 'extattr_list_file' function.])
2714 if test $have_xattr = yes; then
2715 have_extattr_string_in_libc=no
2716 AC_CHECK_FUNCS(extattr_namespace_to_string extattr_string_to_namespace,
2718 have_extattr_string_in_libc=yes
2719 AC_DEFINE([HAVE_EXTATTR_NAMESPACE_TO_STRING],1,[Define to 1 if you have the 'extattr_namespace_to_string' function.])
2720 AC_DEFINE([HAVE_EXTATTR_STRING_TO_NAMESPACE],1,[Define to 1 if you have the 'extattr_string_to_namespace' function.])
2725 dnl If extattr_namespace_to_string and extattr_string_to_namespace are not in libc see if they are in libutil
2727 if test $have_extattr_string_in_libc = no; then
2728 AC_CHECK_LIB(util, extattr_namespace_to_string extattr_string_to_namespace,
2730 AC_DEFINE([HAVE_EXTATTR_NAMESPACE_TO_STRING],1,[Define to 1 if you have the 'extattr_namespace_to_string' function.])
2731 AC_DEFINE([HAVE_EXTATTR_STRING_TO_NAMESPACE],1,[Define to 1 if you have the 'extattr_string_to_namespace' function.])
2732 FDLIBS="-lutil $FDLIBS"
2740 dnl If we failed to find *BSD support try the AIX implementation of extented attributes (EA)
2741 dnl When running on AIX
2743 if test $have_xattr = no -a \
2744 x${HAVE_AIX_OS_TRUE} = x; then
2745 AC_CHECK_HEADER(sys/ea.h, [ AC_DEFINE(HAVE_SYS_EA_H,1,[Defines if your system have the sys/ea.h header file])] , )
2746 AC_CHECK_FUNCS(llistea lgetea lsetea,
2749 AC_DEFINE([HAVE_LLISTEA],1,[Define to 1 if you have the 'llistea' function.])
2750 AC_DEFINE([HAVE_LGETEA],1,[Define to 1 if you have the 'lgetea' function.])
2751 AC_DEFINE([HAVE_LSETEA],1,[Define to 1 if you have the 'lsetea' function.])
2755 if test $have_xattr = no; then
2756 AC_CHECK_FUNCS(listea getea setea,
2759 AC_DEFINE([HAVE_LISTEA],1,[Define to 1 if you have the 'listea' function.])
2760 AC_DEFINE([HAVE_GETEA],1,[Define to 1 if you have the 'getea' function.])
2761 AC_DEFINE([HAVE_SETEA],1,[Define to 1 if you have the 'setea' function.])
2768 dnl If we failed to find AIX support try the TRU64 implementation of extented attributes
2769 dnl when running on a TRU64 OS.
2771 if test $have_xattr = no -a \
2772 x${HAVE_OSF1_OS_TRUE} = x; then
2773 AC_CHECK_HEADER(sys/proplist.h, [ AC_DEFINE(HAVE_SYS_PROPLIST_H,1,[Defines if your system have the sys/proplist.h header file])] , )
2774 AC_CHECK_FUNCS(getproplist get_proplist_entry sizeof_proplist_entry add_proplist_entry setproplist,
2777 AC_DEFINE([HAVE_GETPROPLIST],1,[Define to 1 if you have the 'getproplist' function.])
2778 AC_DEFINE([HAVE_GET_PROPLIST_ENTRY],1,[Define to 1 if you have the 'get_proplist_entry' function.])
2779 AC_DEFINE([HAVE_SIZEOF_PROPLIST_ENTRY],1,[Define to 1 if you have the 'sizeof_proplist_entry' function.])
2780 AC_DEFINE([HAVE_ADD_PROPLIST_ENTRY],1,[Define to 1 if you have the 'add_proplist_entry' function.])
2781 AC_DEFINE([HAVE_SETPROPLIST],1,[Define to 1 if you have the 'setproplist' function.])
2787 dnl If we failed to find TRU64 support try the SOLARIS implementation of extented and extensible attributes
2788 dnl when running on a Solaris.
2790 if test $have_xattr = no -a \
2791 x${HAVE_SUN_OS_TRUE} = x; then
2792 AC_CHECK_HEADER(sys/attr.h, [ AC_DEFINE(HAVE_SYS_ATTR_H,1,[Defines if your system have the sys/attr.h header file])] , )
2793 AC_CHECK_HEADER(sys/nvpair.h, [ AC_DEFINE(HAVE_SYS_NVPAIR_H,1,[Defines if your system have the sys/nvpair.h header file])] , )
2794 AC_CHECK_HEADER(attr.h, [ AC_DEFINE(HAVE_ATTR_H,1,[Defines if your system have the attr.h header file])] , )
2796 AC_CHECK_FUNCS(openat fstatat unlinkat fchownat futimesat,
2799 AC_DEFINE([HAVE_OPENAT],1,[Define to 1 if you have the 'openat' function.])
2800 AC_DEFINE([HAVE_FSTATAT],1,[Define to 1 if you have the 'fstatat' function.])
2801 AC_DEFINE([HAVE_UNLINKAT],1,[Define to 1 if you have the 'unlinkat' function.])
2802 AC_DEFINE([HAVE_FCHOWNAT],1,[Define to 1 if you have the 'fchownat' function.])
2803 AC_DEFINE([HAVE_FUTIMESAT],1,[Define to 1 if you have the 'futimesat' function.])
2807 if test $have_xattr = yes; then
2808 AC_CHECK_LIB(nvpair, nvlist_next_nvpair,
2810 AC_DEFINE([HAVE_NVLIST_NEXT_NVPAIR],1,[Define to 1 if you have the 'nvlist_next_nvpair' function.])
2811 FDLIBS="-lnvpair $FDLIBS"
2818 dnl If we failed to find Solaris support try the generic xattr support code
2820 if test $have_xattr = no; then
2821 AC_CHECK_HEADER(sys/xattr.h, [ AC_DEFINE(HAVE_SYS_XATTR_H,1,[Defines if your system have the sys/xattr.h header file])] , )
2822 AC_CHECK_FUNCS(llistxattr lgetxattr lsetxattr,
2825 AC_DEFINE([HAVE_LLISTXATTR],1,[Define to 1 if you have the 'llistxattr' function.])
2826 AC_DEFINE([HAVE_LGETXATTR],1,[Define to 1 if you have the 'lgetxattr' function.])
2827 AC_DEFINE([HAVE_LSETXATTR],1,[Define to 1 if you have the 'lsetxattr' function.])
2831 if test $have_xattr = no; then
2832 AC_CHECK_FUNCS(listxattr getxattr setxattr,
2835 AC_DEFINE([HAVE_LISTXATTR],1,[Define to 1 if you have the 'listxattr' function.])
2836 AC_DEFINE([HAVE_GETXATTR],1,[Define to 1 if you have the 'getxattr' function.])
2837 AC_DEFINE([HAVE_SETXATTR],1,[Define to 1 if you have the 'setxattr' function.])
2843 if test x$support_xattr = xyes -a $have_xattr != yes; then
2844 AC_MSG_ERROR([xattr support explicitly enabled but no supported xattr implementation found,
2845 please either load the xattr libraries or rerun configure without --enable-xattr])
2847 if test $have_xattr = yes; then
2848 AC_DEFINE([HAVE_XATTR],1,[Extended Attributes support])
2854 dnl Check for pthread libraries
2857 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
2859 AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
2861 AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
2863 AC_CHECK_FUNC(pthread_create)
2872 dnl Check for headers, functions and libraries required to support
2873 dnl keeping readall capabilities
2875 AC_CHECK_HEADERS(sys/prctl.h sys/capability.h)
2876 AC_CHECK_FUNCS(prctl setreuid)
2877 AC_CHECK_LIB([cap], [cap_set_proc], [CAP_LIBS="-lcap"], [CAP_LIBS=])
2878 if test x$CAP_LIBS = x-lcap; then
2879 AC_DEFINE(HAVE_LIBCAP, 1, [Define if you have libcap])
2888 if test x$have_gcc = xyes ; then
2889 CPPFLAGS="$CPPFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
2890 CFLAGS="$CFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
2892 LDFLAGS=${LDFLAGS--O}
2893 CPPFLAGS="$CPPFLAGS"
2905 AC_SUBST(X_EXTRA_LIBS)
2910 dnl extra configurable objects
2921 dnl Finally we set appropriate distribution specific
2922 dnl variables and defaults
2927 COMPRESS_MANPAGES=yes
2932 PSCMD="ps -e -o pid,comm"
2933 PFILES="${PFILES} platforms/aix/Makefile"
2934 TAPEDRIVE="/dev/rmt0.1"
2938 PTHREAD_LIB="-lpthread -lexc"
2939 if test "${CC}" = "gcc" ; then
2946 TAPEDRIVE="/dev/nrmt0"
2949 DISTVER=`uname -a |awk '{print $3}'`
2950 TAPEDRIVE="/dev/nrmt0"
2951 PTHREAD_LIB="-pthread"
2952 CFLAGS="${CFLAGS} -pthread"
2953 PSCMD="ps -ax -o pid,command"
2957 platforms/bsdi/Makefile \
2958 platforms/bsdi/bacula-fd \
2959 platforms/bsdi/bacula-sd \
2960 platforms/bsdi/bacula-dir"
2961 largefile_support="yes"
2964 DISTVER=`uname -a |awk '{print $3}'`
2965 TAPEDRIVE="/dev/nrst0"
2968 WLDFLAGS="-mwindows"
2972 TAPEDRIVE="/dev/nst0"
2973 PSCMD="ps -e -o pid,command"
2976 platforms/darwin/Makefile"
2980 TAPEDRIVE="/dev/nst0"
2981 PSCMD="ps -e -o pid,command"
2984 platforms/osx/Makefile"
2987 if `test -f /etc/apt/sources.list && grep -q ubuntu /etc/apt/sources.list`; then
2990 DISTVER=`cat /etc/debian_version`
2991 if test -f /etc/lsb-release ; then
2993 if test "x$DISTRIB_ID" != "x" ; then
2994 DISTNAME=$DISTRIB_ID
2996 if test "x$DISTRIB_RELEASE" != "x" ; then
2997 DISTVER=$DISTRIB_RELEASE
3000 if test "$DISTNAME" = "Ubuntu" ; then
3003 TAPEDRIVE="/dev/nst0"
3004 PSCMD="ps -e -o pid,command"
3005 if test "$DISTNAME" = "ubuntu" ; then
3007 platforms/ubuntu/Makefile \
3008 platforms/ubuntu/bacula-fd \
3009 platforms/ubuntu/bacula-sd \
3010 platforms/ubuntu/bacula-dir"
3013 platforms/debian/Makefile \
3014 platforms/debian/bacula-fd \
3015 platforms/debian/bacula-sd \
3016 platforms/debian/bacula-dir"
3020 DISTVER=`uname -a |awk '{print $3}'`
3021 VER=`echo $DISTVER | cut -c 1`
3022 if test x$VER = x4 ; then
3023 PTHREAD_LIB="${PTHREAD_LIBS:--pthread}"
3024 CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS:--pthread}"
3028 TAPEDRIVE="/dev/nrsa0"
3029 PSCMD="ps -ax -o pid,command"
3031 platforms/freebsd/Makefile \
3032 platforms/freebsd/bacula-fd \
3033 platforms/freebsd/bacula-sd \
3034 platforms/freebsd/bacula-dir"
3035 largefile_support="yes"
3039 TAPEDRIVE="/dev/nst0"
3040 PSCMD="ps -e -o pid,command"
3042 platforms/hurd/Makefile \
3043 platforms/hurd/bacula-fd \
3044 platforms/hurd/bacula-sd \
3045 platforms/hurd/bacula-dir"
3048 PSCMD="UNIX95=1; ps -e -o pid,comm"
3049 CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
3051 TAPEDRIVE="/dev/rmt/0hnb"
3052 PTHREAD_LIB="-lpthread"
3053 AC_DEFINE([_INCLUDE_LONGLONG])
3057 TAPEDRIVE="/dev/rmt/0cbn"
3058 PSCMD="ps -e -o pid,comm"
3060 platforms/irix/Makefile \
3061 platforms/irix/bacula-fd \
3062 platforms/irix/bacula-sd \
3063 platforms/irix/bacula-dir"
3066 DISTVER=`uname -a |awk '{print $3}'`
3069 TAPEDRIVE="/dev/nrst0"
3070 PSCMD="ps -ax -o pid,command"
3071 PTHREAD_LIB="-pthread"
3072 CFLAGS="${CFLAGS} -pthread"
3075 DISTVER=`uname -a |awk '{print $3}'`
3078 TAPEDRIVE="/dev/nrst0"
3079 PSCMD="ps -ax -o pid,command"
3080 PTHREAD_LIB="-pthread"
3081 CFLAGS="${CFLAGS} -pthread"
3083 platforms/openbsd/Makefile \
3084 platforms/openbsd/bacula-fd \
3085 platforms/openbsd/bacula-sd \
3086 platforms/openbsd/bacula-dir"
3089 if test -f /etc/whitebox-release ; then
3090 f=/etc/whitebox-release
3092 f=/etc/redhat-release
3094 if test `cat $f | grep release |\
3095 cut -f 3 -d ' '`x = "Enterprise"x ; then
3096 DISTVER="Enterprise "`cat $f | grep release |\
3099 DISTVER=`cat /etc/redhat-release | grep release |\
3102 TAPEDRIVE="/dev/nst0"
3103 PSCMD="ps -e -o pid,command"
3105 platforms/redhat/Makefile \
3106 platforms/redhat/bacula-fd \
3107 platforms/redhat/bacula-sd \
3108 platforms/redhat/bacula-dir
3112 DISTVER=`cat /etc/mandrake-release | grep release |\
3114 TAPEDRIVE="/dev/nst0"
3115 PSCMD="ps -e -o pid,command"
3117 platforms/mandrake/Makefile \
3118 platforms/mandrake/bacula-fd \
3119 platforms/mandrake/bacula-sd \
3120 platforms/mandrake/bacula-dir \
3124 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
3125 TAPEDRIVE="/dev/nst0"
3126 PSCMD="ps -e -o pid,command"
3128 platforms/gentoo/Makefile \
3129 platforms/gentoo/bacula-init \
3130 platforms/gentoo/bacula-fd \
3131 platforms/gentoo/bacula-sd \
3132 platforms/gentoo/bacula-dir"
3135 DISTVER=`cat /etc/slackware-version`
3136 TAPEDRIVE="/dev/nst0"
3137 PSCMD="ps -e -o pid,command"
3139 platforms/slackware/Makefile \
3140 platforms/slackware/rc.bacula-fd \
3141 platforms/slackware/rc.bacula-sd \
3142 platforms/slackware/rc.bacula-dir\
3143 platforms/slackware/functions.bacula"
3147 TAPEDRIVE="/dev/rmt/0cbn"
3148 PSCMD="ps -e -o pid,comm"
3150 platforms/solaris/Makefile \
3151 platforms/solaris/bacula-fd \
3152 platforms/solaris/bacula-sd \
3153 platforms/solaris/bacula-dir"
3157 AC_DEFINE(HAVE_OLD_SOCKOPT)
3158 AC_DEFINE(USE_THR_SETCONCURRENCY)
3161 AC_DEFINE(USE_THR_SETCONCURRENCY)
3166 LIBS="$LIBS -lresolv -lrt"
3169 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
3171 TAPEDRIVE="/dev/nst0"
3172 PSCMD="ps -e -o pid,command"
3174 platforms/suse/Makefile \
3175 platforms/suse/bacula-fd \
3176 platforms/suse/bacula-sd \
3177 platforms/suse/bacula-dir \
3178 platforms/suse/bacula"
3183 TAPEDRIVE="/dev/nst0"
3184 PSCMD="ps -e -o pid,command"
3186 platforms/suse/Makefile \
3187 platforms/suse/bacula-fd \
3188 platforms/suse/bacula-sd \
3189 platforms/suse/bacula-dir"
3193 TAPEDRIVE="/dev/nst0"
3196 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
3200 dnl -------------------------------------------
3201 dnl systemd (default off)
3202 dnl -------------------------------------------
3203 AC_MSG_CHECKING(for systemd support)
3204 AC_ARG_WITH(systemd,
3205 AC_HELP_STRING([--with-systemd@<:@=UNITDIR@:>@], [Include systemd support. UNITDIR is where systemd system .service files are located, default is to ask systemctl.]),
3207 if test "$withval" != "no"; then
3208 if test "$withval" = "yes"; then
3209 SYSTEMD_UNITDIR="`systemctl show | grep UnitPath | cut -d " " -f2`"
3211 SYSTEMD_UNITDIR="${withval}"
3215 platforms/systemd/Makefile \
3216 platforms/systemd/bacula-dir.service \
3217 platforms/systemd/bacula-fd.service \
3218 platforms/systemd/bacula-sd.service"
3219 AC_DEFINE(HAVE_SYSTEMD, 1, [Define to 1 if systemd support should be enabled])
3221 support_systemd="yes"
3224 support_systemd="no"
3227 support_systemd="no"
3231 AC_SUBST(SYSTEMD_UNITDIR)
3235 LIBS="$PTHREAD_LIB $LIBS"
3237 AC_DEFINE_UNQUOTED(lld, "$lld")
3238 AC_DEFINE_UNQUOTED(llu, "$llu")
3245 AC_SUBST(COMPRESS_MANPAGES)
3247 dnl common parts of the Makefile
3248 MCOMMON=./autoconf/Make.common
3249 AC_SUBST_FILE(MCOMMON)
3252 if test "x${subsysdir}" = "x${sbindir}" ; then
3255 echo "You have set both --sbindir and --with-subsys-dir"
3256 echo " equal to: ${subsysdir} "
3257 echo "This is not permitted. Please reconfigure."
3259 echo "Aborting configuration ..."
3266 AC_OUTPUT([autoconf/Make.common \
3269 scripts/btraceback \
3272 scripts/bacula-ctl-dir \
3273 scripts/bacula-ctl-fd \
3274 scripts/bacula-ctl-sd \
3275 scripts/devel_bacula \
3278 scripts/mtx-changer \
3279 scripts/disk-changer \
3280 scripts/dvd-handler \
3281 scripts/dvd-simulator \
3282 scripts/logwatch/Makefile \
3283 scripts/logwatch/logfile.bacula.conf \
3284 scripts/bat.desktop \
3285 scripts/bat.desktop.xsu \
3286 scripts/bat.desktop.consolehelper \
3287 scripts/bat.console_apps \
3290 src/console/Makefile \
3291 src/console/bconsole.conf \
3292 src/qt-console/bat.conf \
3293 src/qt-console/bat.pro \
3294 src/qt-console/bat.pro.mingw32 \
3295 src/qt-console/bat.pro.mingw64 \
3296 src/qt-console/install_conf_file \
3297 src/qt-console/tray-monitor/tray-monitor.pro.mingw32 \
3298 src/qt-console/tray-monitor/tray-monitor.pro.mingw64 \
3300 src/dird/bacula-dir.conf \
3302 src/stored/Makefile \
3303 src/stored/bacula-sd.conf \
3304 src/filed/Makefile \
3305 src/filed/bacula-fd.conf \
3307 src/cats/make_catalog_backup.pl \
3308 src/cats/make_catalog_backup \
3309 src/cats/delete_catalog_backup \
3310 src/cats/create_postgresql_database \
3311 src/cats/update_postgresql_tables \
3312 src/cats/make_postgresql_tables \
3313 src/cats/grant_postgresql_privileges \
3314 src/cats/drop_postgresql_tables \
3315 src/cats/drop_postgresql_database \
3316 src/cats/create_mysql_database \
3317 src/cats/update_mysql_tables \
3318 src/cats/make_mysql_tables \
3319 src/cats/grant_mysql_privileges \
3320 src/cats/drop_mysql_tables \
3321 src/cats/drop_mysql_database \
3322 src/cats/create_sqlite3_database \
3323 src/cats/update_sqlite3_tables \
3324 src/cats/make_sqlite3_tables \
3325 src/cats/grant_sqlite3_privileges \
3326 src/cats/drop_sqlite3_tables \
3327 src/cats/drop_sqlite3_database \
3330 src/cats/create_bacula_database \
3331 src/cats/update_bacula_tables \
3332 src/cats/grant_bacula_privileges \
3333 src/cats/make_bacula_tables \
3334 src/cats/drop_bacula_tables \
3335 src/cats/drop_bacula_database \
3336 src/cats/install-default-backend \
3337 src/findlib/Makefile \
3338 src/tools/Makefile \
3339 src/plugins/fd/Makefile \
3340 src/plugins/sd/Makefile \
3341 src/plugins/dir/Makefile \
3343 updatedb/update_mysql_tables \
3344 updatedb/update_sqlite3_tables \
3345 updatedb/update_postgresql_tables \
3346 updatedb/update_mysql_tables_9_to_10 \
3347 updatedb/update_sqlite3_tables_9_to_10 \
3348 updatedb/update_postgresql_tables_9_to_10 \
3349 updatedb/update_mysql_tables_10_to_11 \
3350 updatedb/update_sqlite3_tables_10_to_11 \
3351 updatedb/update_postgresql_tables_10_to_11 \
3352 updatedb/update_mysql_tables_11_to_12 \
3353 updatedb/update_sqlite3_tables_11_to_12 \
3354 updatedb/update_postgresql_tables_11_to_12 \
3355 updatedb/update_mysql_tables_12_to_13 \
3356 updatedb/update_postgresql_tables_12_to_13 \
3357 updatedb/update_mysql_tables_13_to_14 \
3358 updatedb/update_postgresql_tables_13_to_14 \
3359 examples/nagios/check_bacula/Makefile \
3360 platforms/rpms/redhat/bacula.spec \
3361 platforms/rpms/redhat/bacula-bat.spec \
3362 platforms/rpms/redhat/bacula-docs.spec \
3363 platforms/rpms/redhat/bacula-mtx.spec \
3364 platforms/rpms/suse/bacula.spec \
3365 platforms/rpms/suse/bacula-bat.spec \
3366 platforms/rpms/suse/bacula-docs.spec \
3367 platforms/rpms/suse/bacula-mtx.spec \
3372 if test "${support_bat}" = "yes" ; then
3373 if test "x$QMAKE" = "xnone"; then
3374 AC_MSG_ERROR([Could not find qmake $PATH. Check your Qt installation])
3378 echo "Creating bat Makefile"
3389 dnl if CC is gcc, we can rebuild the dependencies (since the depend rule
3390 dnl requires gcc). If it's not, don't rebuild dependencies
3392 if test X"$GCC" = "Xyes" ; then
3393 echo "Doing make of dependencies"
3394 ${MAKE:-make} depend
3398 chmod 755 install_conf_file build-depkgs-qt-console
3402 chmod 755 bacula btraceback mtx-changer
3403 chmod 755 dvd-handler dvd-simulator
3404 chmod 755 bconsole disk-changer devel_bacula logrotate
3408 chmod 755 $c/update_mysql_tables_10_to_11 $c/update_sqlite3_tables_10_to_11
3409 chmod 755 $c/update_postgresql_tables_10_to_11
3410 chmod 755 $c/update_mysql_tables_11_to_12 $c/update_sqlite3_tables_11_to_12
3411 chmod 755 $c/update_postgresql_tables_11_to_12
3416 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
3417 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
3419 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
3420 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
3422 chmod 755 $c/create_sqlite3_database $c/update_sqlite3_tables $c/make_sqlite3_tables
3423 chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
3425 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
3426 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
3428 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup $c/make_catalog_backup.pl
3432 chmod 755 $c/install-default-backend
3434 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
3435 largefile_support="yes"
3438 dnl Only try to find out the version number of the compiler when we know its some kind of GCC compiler
3439 if test X"$GCC" = "Xyes" ; then
3441 dnl A whole lot of hand springs to get the compiler version.
3442 dnl This is because gcc changed the output in version 3.0
3444 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
3445 if test "x${CCVERSION}" = "x" ; then
3446 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
3448 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
3449 if test x"${CXXVERSION}" = x ; then
3450 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
3454 # clean up any old junk
3461 Configuration on `date`:
3463 Host: ${host}${post_host} -- ${DISTNAME} ${DISTVER}
3464 Bacula version: ${BACULA} ${VERSION} (${DATE})
3465 Source code location: ${srcdir}
3466 Install binaries: ${sbindir}
3467 Install libraries: ${libdir}
3468 Install config files: ${sysconfdir}
3469 Scripts directory: ${scriptdir}
3470 Archive directory: ${archivedir}
3471 Working directory: ${working_dir}
3472 PID directory: ${piddir}
3473 Subsys directory: ${subsysdir}
3474 Man directory: ${mandir}
3475 Data directory: ${datarootdir}
3476 Plugin directory: ${plugindir}
3477 C Compiler: ${CC} ${CCVERSION}
3478 C++ Compiler: ${CXX} ${CXXVERSION}
3479 Compiler flags: ${WCFLAGS} ${CFLAGS}
3480 Linker flags: ${WLDFLAGS} ${LDFLAGS}
3482 Statically Linked Tools: ${support_static_tools}
3483 Statically Linked FD: ${support_static_fd}
3484 Statically Linked SD: ${support_static_sd}
3485 Statically Linked DIR: ${support_static_dir}
3486 Statically Linked CONS: ${support_static_cons}
3487 Database backends: ${db_backends}
3488 Database port: ${db_port}
3489 Database name: ${db_name}
3490 Database user: ${db_user}
3492 Job Output Email: ${job_email}
3493 Traceback Email: ${dump_email}
3494 SMTP Host Address: ${smtp_host}
3496 Director Port: ${dir_port}
3497 File daemon Port: ${fd_port}
3498 Storage daemon Port: ${sd_port}
3500 Director User: ${dir_user}
3501 Director Group: ${dir_group}
3502 Storage Daemon User: ${sd_user}
3503 Storage DaemonGroup: ${sd_group}
3504 File Daemon User: ${fd_user}
3505 File Daemon Group: ${fd_group}
3507 Large file support: $largefile_support
3508 Bacula conio support: ${got_conio} ${CONS_LIBS}
3509 readline support: ${got_readline} ${PRTREADLINE_SRC}
3510 TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
3511 TLS support: ${support_tls}
3512 Encryption support: ${support_crypto}
3513 ZLIB support: ${have_zlib}
3514 LZO support: ${have_lzo}
3515 enable-smartalloc: ${support_smartalloc}
3516 enable-lockmgr: ${support_lockmgr}
3517 bat support: ${support_bat}
3518 client-only: ${build_client_only}
3519 build-dird: ${build_dird}
3520 build-stored: ${build_stored}
3521 Plugin support: ${have_plugins}
3522 AFS support: ${have_afs}
3523 ACL support: ${have_acl}
3524 XATTR support: ${have_xattr}
3525 systemd support: ${support_systemd} ${SYSTEMD_UNITDIR}
3526 Batch insert enabled: ${batch_insert_db_backends}
3530 # create a small shell script useful for support with
3531 # configure options and config.out info
3532 cat > scripts/bacula_config << EOF
3535 $ $0 $ac_configure_args
3537 cat config.out >> scripts/bacula_config
3538 echo __EOC__ >> scripts/bacula_config
3539 chmod 755 scripts/bacula_config