3 dnl Process this file with autoconf to produce a configure script.
5 dnl Copyright (C) 2000-2017 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`
41 VIX_VERSION=`sed -n -e 's/^#define VIX_VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
42 JAVA_VERSION=`sed -n -e 's/^#define JAVA_VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
43 NDMP_VERSION=`sed -n -e 's/^#define NDMP_VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
44 LIBRSYNC_VERSION=`sed -n -e 's/^#define LIBRSYNC_VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
49 AC_SUBST(post_host)dnl
50 AC_SUBST(BDB_VERSION)dnl
51 AC_SUBST(DEPKGS_QT_VERSION)dnl
52 AC_SUBST(DEPKGS_VERSION)dnl
53 AC_SUBST(BQT4_VERSION)dnl
54 AC_SUBST(VIX_VERSION)dnl
55 AC_SUBST(JAVA_VERSION)dnl
56 AC_SUBST(NDMP_VERSION)dnl
57 AC_SUBST(LIBRSYNC_VERSION)dnl
61 dnl can be overwritten by specific values from version.h
62 LIBBAC_LT_RELEASE=`sed -n -e 's/^#.*LIBBAC_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
63 LIBBACCFG_LT_RELEASE=`sed -n -e 's/^#.*LIBBACCFG_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
64 LIBBACPY_LT_RELEASE=`sed -n -e 's/^#.*LIBBACPY_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
66 LIBBAC_LT_RELEASE=${LIBBAC_LT_RELEASE:-$VERSION}
67 LIBBACCFG_LT_RELEASE=${LIBBACCFG_LT_RELEASE:-$VERSION}
69 AC_SUBST(LIBBAC_LT_RELEASE)dnl
70 AC_SUBST(LIBBACCFG_LT_RELEASE)dnl
73 dnl can be overwritten by specific values from version.h
74 LIBBACSQL_LT_RELEASE=`sed -n -e 's/^#.*LIBBACSQL_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
75 LIBBACCATS_LT_RELEASE=`sed -n -e 's/^#.*LIBBACCATS_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
77 LIBBACSQL_LT_RELEASE=${LIBBACSQL_LT_RELEASE:-$VERSION}
78 LIBBACCATS_LT_RELEASE=${LIBBACCATS_LT_RELEASE:-$VERSION}
80 AC_SUBST(LIBBACSQL_LT_RELEASE)dnl
81 AC_SUBST(LIBBACCATS_LT_RELEASE)dnl
84 dnl can be overwritten by specific values from version.h
85 LIBBACFIND_LT_RELEASE=`sed -n -e 's/^#.*LIBBACFIND_LT_RELEASE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
87 LIBBACFIND_LT_RELEASE=${LIBBACFIND_LT_RELEASE:-$VERSION}
89 AC_SUBST(LIBBACFIND_LT_RELEASE)dnl
91 dnl PFILES are platform or plugin specific files
92 PFILES="platforms/Makefile"
94 echo "configuring for ${BACULA} $VERSION ($DATE)"
97 dnl -------------------------------------------------------
98 dnl Check for compiler.
99 dnl ------------------------------------------------------
101 AC_PROG_CC dnl this sets $GCC if using GNU C compiler
103 AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
104 AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
106 BASECC=`basename $CC`
108 if test x"$GCC" = "xyes"; then
112 AC_PATH_PROG(CXX, $CXX, $CXX)
113 if test ! -e $CXX; then
114 AC_MSG_ERROR(Unable to find C++ compiler)
117 dnl -------------------------------------------------------
118 dnl Check for programs.
119 dnl ------------------------------------------------------
121 AC_PATH_PROG(MV, mv, mv)
123 dnl If we name the variable RM it will shadow the RM variable in the configure script and we overwrite the
124 dnl value with the name of the rm command and not rm -f which is its normal content. This gives all kind
125 dnl of strange output of the configure script (like things don't exist etc.).
126 dnl So we name it REMOVE (more software has run into this problem)
127 AC_PATH_PROG(REMOVE, rm, rm)
128 AC_PATH_PROG(CP, cp, cp)
129 AC_PATH_PROG(SED, sed, sed)
130 AC_PATH_PROG(ECHO, echo, echo)
131 AC_PATH_PROG(CMP, cmp, cmp)
132 AC_PATH_PROG(TBL, tbl, tbl)
133 AC_PATH_PROG(AR, ar, ar)
134 AC_PATH_PROG(OPENSSL, openssl, none)
135 AC_PATH_PROG(MTX, mtx, mtx)
136 AC_PATH_PROG(DD, dd, dd)
137 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
138 AC_PATH_PROG(PYTHON, python, python)
139 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
140 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
141 AC_PATH_PROG(DVDRWFORMAT, dvd+rw-format, dvd+rw-format)
142 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
143 AC_PATH_PROG(QMAKE, qmake, none)
144 AC_PATH_PROG(GMAKE, gmake, none)
145 AC_PATH_PROG(PIDOF, pidof, pidof)
147 # Some AWK programs fail, so test it and warn the user
148 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
149 { if ((prog == $2) || (("(" prog ")") == $2) ||
150 (("[" prog "]") == $2) ||
151 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
153 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
154 The regex engine of $AWK is too broken to be used you
155 might want to install GNU AWK.
156 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
159 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
162 test -n "$ARFLAG" || ARFLAGS="cr"
169 AC_SUBST(LOCAL_CFLAGS)
170 AC_SUBST(LOCAL_LDFLAGS)
173 dnl --------------------------------------------------
175 dnl --------------------------------------------------
177 AC_ARG_ENABLE(libtool,
178 AC_HELP_STRING([--enable-libtool], [enable building using GNU libtool @<:@default=yes@:>@]),
180 if test x$enableval = xno; then
185 LT_INIT([shared disable-static])
189 if test x$use_libtool != xno; then
190 DEFAULT_OBJECT_TYPE=".lo"
191 DEFAULT_ARCHIVE_TYPE=".la"
192 DEFAULT_SHARED_OBJECT_TYPE=".la"
193 LIBTOOL="\$(LIBTOOL)"
194 LIBTOOL_INSTALL_TARGET="libtool-install"
195 LIBTOOL_UNINSTALL_TARGET="libtool-uninstall"
196 LIBTOOL_CLEAN_TARGET="libtool-clean"
197 QMAKE_LIBTOOL="${BUILD_DIR}/libtool"
198 FD_PLUGIN_DIR="src/plugins/fd"
201 DEFAULT_OBJECT_TYPE=".o"
202 DEFAULT_ARCHIVE_TYPE=".a"
203 DEFAULT_SHARED_OBJECT_TYPE=".so"
204 LIBTOOL="# \$(LIBTOOL)"
205 LIBTOOL_INSTALL_TARGET=""
206 LIBTOOL_UNINSTALL_TARGET=""
207 LIBTOOL_CLEAN_TARGET=""
208 QMAKE_LIBTOOL="# ${BUILD_DIR}/libtool"
213 AC_SUBST(DEFAULT_OBJECT_TYPE)
214 AC_SUBST(DEFAULT_ARCHIVE_TYPE)
215 AC_SUBST(DEFAULT_SHARED_OBJECT_TYPE)
217 AC_SUBST(LIBTOOL_INSTALL_TARGET)
218 AC_SUBST(LIBTOOL_UNINSTALL_TARGET)
219 AC_SUBST(LIBTOOL_CLEAN_TARGET)
220 AC_SUBST(QMAKE_LIBTOOL)
221 AC_SUBST(FD_PLUGIN_DIR)
223 dnl --------------------------------------------------
224 dnl Include file handling
225 dnl --------------------------------------------------
226 AC_ARG_ENABLE(includes,
227 AC_HELP_STRING([--enable-includes], [enable installing of include files @<:@default=no@:>@]),
229 if test x$enableval = xyes; then
235 dnl It only makes sense to install include files when you install libraries which only happens when
236 dnl libtool is enabled
238 if test x$use_libtool != xno -a x$install_includes = xyes; then
239 INCLUDE_INSTALL_TARGET="install-includes"
240 INCLUDE_UNINSTALL_TARGET="uninstall-includes"
242 INCLUDE_INSTALL_TARGET=""
243 INCLUDE_UNINSTALL_TARGET=""
245 AC_SUBST(INCLUDE_INSTALL_TARGET)
246 AC_SUBST(INCLUDE_UNINSTALL_TARGET)
248 dnl --------------------------------------------------
249 dnl Bacula OP Sys determination (see aclocal.m4)
250 dnl --------------------------------------------------
253 dnl -----------------------------------------------------------
254 dnl Bacula OPSys Distribution determination (see aclocal.m4)
255 dnl ----------------------------------------------------------
256 BA_CHECK_OPSYS_DISTNAME
258 dnl --------------------------------------------------
259 dnl Suppport for gettext (translations)
260 dnl By default, $datarootdir is ${prefix}/share
261 dnl --------------------------------------------------
262 AM_GNU_GETTEXT([external])
264 dnl ------------------------------------------------------------------
265 dnl If the user has not set --prefix, we set our default to nothing.
266 dnl In this case, if the user has not set --sysconfdir, we set it
267 dnl to the package default of /etc/bacula. If either --prefix or
268 dnl --sysconfdir is set, we leave sysconfdir alone except to eval it.
269 dnl If the user has not set --libdir, we set it to the package
270 dnl default of /usr/lib. If either --prefix or --libdir is set,
271 dnl we leave libdir alone except to eval it. If the user has not set
272 dnl --includedir, we set it to the package default of /usr/include.
273 dnl If either --prefix or --includedir is set, we leave includedir
274 dnl alone except to eval it
275 dnl ------------------------------------------------------------------
276 os_name=`uname -s 2>/dev/null`
277 if test x${prefix} = xNONE ; then
278 if test `eval echo ${sysconfdir}` = NONE/etc ; then
279 sysconfdir=/etc/bacula
282 if test `eval echo ${libdir}` = NONE/lib ; then
285 os_processor=`uname -p 2>/dev/null`
286 case ${os_processor} in
301 if test `eval echo ${includedir}` = NONE/include ; then
302 includedir=/usr/include
305 if test `eval echo ${datarootdir}` = NONE/share ; then
306 datarootdir=/usr/share
311 dnl -------------------------------------------------------------------------
312 dnl If the user has not set --exec-prefix, we default to ${prefix}
313 dnl -------------------------------------------------------------------------
314 if test x${exec_prefix} = xNONE ; then
315 exec_prefix=${prefix}
318 sysconfdir=`eval echo ${sysconfdir}`
319 datarootdir=`eval echo ${datarootdir}`
320 docdir=`eval echo ${docdir}`
321 htmldir=`eval echo ${htmldir}`
322 libdir=`eval echo ${libdir}`
323 includedir=`eval echo ${includedir}`
324 localedir=`eval echo ${datarootdir}/locale`
325 AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir")
326 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
328 dnl ------------------------------------------------------------------
329 dnl If the user has not set --sbindir, we set our default as /sbin
330 dnl ------------------------------------------------------------------
331 if test x$sbindir = x'${exec_prefix}/sbin' ; then
332 sbindir=${exec_prefix}/sbin
334 sbindir=`eval echo ${sbindir}`
336 dnl -------------------------------------------------------------------------
337 dnl If the user has not set --mandir, we default to /usr/share/man
338 dnl -------------------------------------------------------------------------
339 if test x$mandir = x'${prefix}/man' ; then
340 mandir=/usr/share/man
343 dnl -------------------------------------------------------------------------
344 dnl If the user has not set --htmldir, we default to /usr/share/doc/bacula/html
345 dnl -------------------------------------------------------------------------
346 if test x$htmldir = x'/usr/share/doc/bacula/' ; then
347 htmldir=`eval echo ${docdir}html`
350 dnl -------------------------------------------------------------------------
351 dnl If the user has not set --docdir, we default to /usr/share/doc/bacula
352 dnl -------------------------------------------------------------------------
353 if test x$docdir = x'/usr/share/doc/' ; then
354 docdir=`eval echo ${docdir}bacula`
358 AC_PATH_PROGS(MSGFMT, msgfmt, no)
359 if test "$MSGFMT" = "no"
361 echo 'msgfmt program not found, disabling NLS !'
363 USE_INCLUDED_LIBINTL=no
368 support_smartalloc=yes
375 support_static_tools=no
378 support_static_dir=no
379 support_static_cons=no
384 batch_insert_db_backends=""
387 dnl --------------------------------------------------------------------------
388 dnl CHECKING COMMAND LINE OPTIONS
389 dnl --------------------------------------------------------------------------
391 dnl -------------------------------------------
392 dnl bat (default off)
393 dnl -------------------------------------------
395 AC_HELP_STRING([--enable-bat], [enable build of bat Qt GUI @<:@default=no@:>@]),
397 if test x$enableval = xyes; then
398 AC_DEFINE(HAVE_BAT, 1, [Set if Bacula bat Qt GUI support enabled])
405 if test x$support_bat = xyes; then
406 abc=`$PKGCONFIG QtGui`
408 if test $pkg = 0; then
409 BAT_DIR=src/qt-console
411 AC_MSG_ERROR(Unable to find Qt installation needed by bat)
417 AC_SUBST(QWT_LDFLAGS)
421 dnl -------------------------------------------
422 dnl smartalloc (default off)
423 dnl -------------------------------------------
424 AC_ARG_ENABLE(smartalloc,
425 AC_HELP_STRING([--enable-smartalloc], [enable smartalloc debugging support @<:@default=no@:>@]),
427 if test x$enableval = xno; then
428 support_smartalloc=no
433 if test x$support_smartalloc = xyes; then
434 AC_DEFINE(SMARTALLOC, 1, [Set if you want Smartalloc enabled])
437 dnl -------------------------------------------
438 dnl Lock Manager (default off)
439 dnl -------------------------------------------
440 AC_ARG_ENABLE(lockmgr,
441 AC_HELP_STRING([--enable-lockmgr], [enable lock manager support @<:@default=no@:>@]),
443 if test x$enableval = xyes; then
449 if test x$support_lockmgr = xyes; then
450 AC_DEFINE(USE_LOCKMGR, 1, [Set if you want Lock Manager enabled])
454 dnl -------------------------------------------
455 dnl static-tools (default off)
456 dnl -------------------------------------------
457 AC_ARG_ENABLE(static-tools,
458 AC_HELP_STRING([--enable-static-tools], [enable static tape tools @<:@default=no@:>@]),
460 if test x$enableval = xyes; then
461 if test x$use_libtool = xyes; then
462 AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
463 please rerun configure with --disable-libtool])
465 support_static_tools=yes
471 if test x$support_static_tools = xyes; then
472 TTOOL_LDFLAGS="-static"
474 AC_SUBST(TTOOL_LDFLAGS)
476 dnl -------------------------------------------
477 dnl static-fd (default off)
478 dnl -------------------------------------------
479 AC_ARG_ENABLE(static-fd,
480 AC_HELP_STRING([--enable-static-fd], [enable static File daemon @<:@default=no@:>@]),
482 if test x$enableval = xyes; then
483 if test x$use_libtool = xyes; then
484 AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
485 please rerun configure with --disable-libtool])
487 support_static_fd=yes
493 if test x$support_static_fd = xyes; then
494 STATIC_FD="static-bacula-fd"
498 dnl -------------------------------------------
499 dnl static-sd (default off)
500 dnl -------------------------------------------
501 AC_ARG_ENABLE(static-sd,
502 AC_HELP_STRING([--enable-static-sd], [enable static Storage daemon @<:@default=no@:>@]),
504 if test x$enableval = xyes; then
505 if test x$use_libtool = xyes; then
506 AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
507 please rerun configure with --disable-libtool])
509 support_static_sd=yes
515 if test x$support_static_sd = xyes; then
516 STATIC_SD="static-bacula-sd"
520 dnl -------------------------------------------
521 dnl static-dir (default off)
522 dnl -------------------------------------------
523 AC_ARG_ENABLE(static-dir,
524 AC_HELP_STRING([--enable-static-dir], [enable static Director @<:@default=no@:>@]),
526 if test x$enableval = xyes; then
527 if test x$use_libtool = xyes; then
528 AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
529 please rerun configure with --disable-libtool])
531 support_static_dir=yes
537 if test x$support_static_dir = xyes; then
538 STATIC_DIR="static-bacula-dir"
542 dnl -------------------------------------------
543 dnl static-cons (default off)
544 dnl -------------------------------------------
545 AC_ARG_ENABLE(static-cons,
546 AC_HELP_STRING([--enable-static-cons], [enable static Console @<:@default=no@:>@]),
548 if test x$enableval = xyes; then
549 if test x$use_libtool = xyes; then
550 AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
551 please rerun configure with --disable-libtool])
553 support_static_cons=yes
559 if test x$support_static_cons = xyes; then
560 STATIC_CONS="static-bconsole"
562 AC_SUBST(STATIC_CONS)
564 dnl -------------------------------------------
565 dnl client_only (default off)
566 dnl -------------------------------------------
567 AC_ARG_ENABLE(client-only,
568 AC_HELP_STRING([--enable-client-only], [build client (File daemon) only @<:@default=no@:>@]),
570 if test x$enableval = xyes; then
571 build_client_only=yes
577 if test x$build_client_only = xno; then
584 dnl -------------------------------------------
585 dnl director (default on)
586 dnl -------------------------------------------
587 AC_ARG_ENABLE(build-dird,
588 AC_HELP_STRING([--enable-build-dird], [enable building of dird (Director) @<:@default=yes@:>@]),
590 if test x$enableval = xno; then
602 dnl -------------------------------------------
603 dnl stored (default on)
604 dnl -------------------------------------------
605 AC_ARG_ENABLE(build-stored,
606 AC_HELP_STRING([--enable-build-stored], [enable building of stored (Storage daemon) @<:@default=yes@:>@]),
608 if test x$enableval = xno; then
613 if test x$build_stored = xyes; then
614 STORED_DIR="src/stored"
620 dnl ---------------------------------------------------
621 dnl Check for conio (Bacula readline substitute)(
622 dnl ---------------------------------------------------
623 dnl this allows you to turn it completely off
625 AC_HELP_STRING([--disable-conio], [disable conio support @<:@default=no@:>@]),
627 if test x$enableval = xno; then
634 dnl ---------------------------------------------------
635 dnl Check for IPv6 support
636 dnl ---------------------------------------------------
637 dnl this allows you to turn it completely off
640 AC_HELP_STRING([--enable-ipv6], [enable ipv6 support @<:@default=yes@:>@]),
642 if test x$enableval = xno; then
648 if test x$support_ipv6 = xyes; then
649 AC_TRY_LINK([ #include <sys/types.h>
650 #include <sys/socket.h>
651 #include <netinet/in.h>], [struct in6_addr t=in6addr_any; t.s6_addr[0] = 0;],
652 [support_in6addr_any=yes], [support_in6addr_any=no])
654 if test x$support_in6addr_any = xno ; then
655 in6addr_any="const struct in6_addr in6addr_any"
660 AC_TRY_LINK([ #include <sys/types.h>
661 #include <sys/socket.h>
662 #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;],
663 [support_ipv6=yes], [support_ipv6=no])
666 if test x$support_ipv6 = xyes; then
667 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
669 if test x$support_in6addr_any = xno ; then
670 AC_DEFINE(NEED_IN6ADDR_ANY,1,[Whether to have in6addr_any support])
675 AC_CHECK_HEADER(curses.h, [
676 AC_CHECK_LIB(tinfo, tgetent, [ TERM_LIB="-ltinfo" ], [
677 AC_CHECK_LIB(ncurses, tgetent, [ TERM_LIB="-lncurses" ], [
678 AC_CHECK_LIB(termcap, tgetent, [ TERM_LIB="-ltermcap" ])
682 [ AC_CHECK_HEADERS(curses.h)
683 AC_CHECK_HEADER(term.h,
684 [ AC_CHECK_LIB(curses, tgetent,
685 [ TERM_LIB="-lcurses" ] )
691 if test x$support_conio = xyes; then
692 if test x$TERM_LIB != x; then
698 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
700 echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "
705 dnl ---------------------------------------------------
706 dnl Check for readline support/directory (default off)
707 dnl ---------------------------------------------------
708 dnl this allows you to turn it completely off
709 AC_ARG_ENABLE(readline,
710 AC_HELP_STRING([--disable-readline], [disable readline support @<:@default=yes@:>@]),
712 if test x$enableval = xno; then
720 if test x$support_readline = xyes; then
721 AC_ARG_WITH(readline,
722 AC_HELP_STRING([--with-readline@<:@=DIR@:>@], [specify readline library directory]),
724 case "$with_readline" in
729 if test -f ${with_readline}/readline.h; then
730 CONS_INC="-I${with_readline}"
731 CONS_LDFLAGS="-L$with_readline"
732 elif test -f ${with_readline}/include/readline/readline.h; then
733 CONS_INC="-I${with_readline}/include/readline"
734 CONS_LDFLAGS="-L${with_readline}/lib"
735 with_readline="${with_readline}/include/readline"
737 with_readline="/usr/include/readline"
740 AC_CHECK_HEADER(${with_readline}/readline.h,
742 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
743 CONS_LIBS="-lreadline -lhistory ${TERM_LIB}"
747 echo "readline.h not found. readline turned off ..."
754 dnl check for standard readline library
755 AC_CHECK_HEADER(/usr/include/readline/readline.h,
757 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
759 CONS_INC="-I/usr/include/readline"
760 CONS_LIBS="-lreadline ${TERM_LIB}"
762 dnl Did not find standard library, so try Bacula's default
763 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
765 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
767 CONS_INC="-I${TOP_DIR}/depkgs/readline"
768 CONS_LIBS="-lreadline -lhistory ${TERM_LIB}"
769 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
770 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
773 echo "readline.h not found. readline turned off ..."
787 AC_SUBST(CONS_LDFLAGS)
788 AC_SUBST(READLINE_SRC)
790 dnl Minimal stuff for readline Makefile configuration
795 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr)
796 AC_CHECK_FUNCS(lstat lchown lchmod futimes fchmod fchown lutimes)
797 AC_CHECK_FUNCS(nanosleep nl_langinfo)
798 AC_CHECK_FUNCS(be64toh htobe64)
799 AC_CHECK_HEADERS(varargs.h)
801 dnl End of readline/conio stuff
802 dnl -----------------------------------------------------------------------
805 dnl Find where sockets are (especially for Solaris)
806 dnl Do this before the TCP Wrappers test since tcp wrappers
807 dnl uses the socket library and some linkers are stupid.
809 AC_CHECK_FUNC(socket,
810 AC_MSG_RESULT(using libc's socket),
811 AC_CHECK_LIB(xnet,socket)
812 AC_CHECK_LIB(socket,socket)
813 AC_CHECK_LIB(inet,socket))
815 dnl -----------------------------------------------------------
816 dnl Check whether user wants TCP wrappers support (default off)
817 dnl -----------------------------------------------------------
820 AC_ARG_WITH(tcp-wrappers,
821 AC_HELP_STRING([--with-tcp-wrappers@<:@=DIR@:>@], [enable tcpwrappers support]),
823 if test "x$withval" != "xno" ; then
825 LIBS="$saved_LIBS -lwrap"
826 AC_SEARCH_LIBS(nanosleep, [rt])
827 AC_MSG_CHECKING(for libwrap)
830 #include <sys/types.h>
832 int deny_severity = 0;
833 int allow_severity = 0;
834 struct request_info *req;
839 AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
844 LIBS="$saved_LIBS -lwrap -lnsl"
845 WRAPLIBS="$saved_LIBS -lwrap -lnsl"
848 #include <sys/types.h>
850 int deny_severity = 0;
851 int allow_severity = 0;
852 struct request_info *req;
857 AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
862 AC_MSG_ERROR([*** libwrap missing])
871 dnl -----------------------------------------------------------
872 dnl Check whether OpenSSL is available
873 dnl -----------------------------------------------------------
874 AC_MSG_CHECKING([for OpenSSL])
875 dnl The following uses quadrigraphs:
879 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
881 with_openssl_directory=${withval}
885 if test "x$with_openssl_directory" != "xno"; then
886 OPENSSL_LIBS="-lssl -lcrypto"
889 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
891 # Make sure the $with_openssl_directory also makes sense
893 if test -d "$with_openssl_directory/lib" -a -d "$with_openssl_directory/include"; then
894 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
895 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
900 saved_CFLAGS="${CFLAGS}"
901 LIBS="${saved_LIBS} ${OPENSSL_LIBS}"
902 CFLAGS="${saved_CFLAGS} ${OPENSSL_INC}"
906 #include <openssl/ssl.h>
908 CRYPTO_set_id_callback(NULL);
920 #include <openssl/evp.h>
924 ac_cv_openssl_sha2="yes"
926 ac_cv_openssl_sha2="no"
930 dnl Solaris disables greater than 128+ bit encryption in their OpenSSL
931 dnl implementation, presumably for export reasons. If 192bit AES
932 dnl is available, we assume that we're running with a 'non-export'
936 #include <openssl/evp.h>
940 ac_cv_openssl_export="no"
942 ac_cv_openssl_export="yes"
946 AC_MSG_RESULT([$support_tls])
947 if test "$support_tls" = "yes"; then
948 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
949 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
950 AC_DEFINE(HAVE_CRYPTO, 1, [Define if encryption support should be enabled])
953 if test "$ac_cv_openssl_sha2" = "yes"; then
954 AC_DEFINE(HAVE_SHA2, 1, [Define if the SHA-2 family of digest algorithms is available])
957 if test "$ac_cv_openssl_export" = "yes"; then
958 AC_DEFINE(HAVE_OPENSSL_EXPORT_LIBRARY, 1, [Define if the OpenSSL library is export-contrained to 128bit ciphers])
961 if test "$support_crypto" = "yes"; then
962 AC_CHECK_LIB(crypto, EVP_PKEY_encrypt_old, AC_DEFINE(HAVE_OPENSSLv1, 1, [Set if have OpenSSL version 1.x]))
966 CFLAGS="${saved_CFLAGS}"
970 AC_MSG_RESULT([$support_tls])
973 if test "$support_tls" = "no" -o "$support_crypto" = "no"; then
978 AC_SUBST(OPENSSL_LIBS)
979 AC_SUBST(OPENSSL_INC)
981 dnl -----------------------------------------------------------
982 dnl dlopen is needed for plugins
983 dnl -----------------------------------------------------------
984 AC_SEARCH_LIBS(dlopen, [dl])
986 dnl ------------------------------------------
987 dnl Where to place working dir
988 dnl ------------------------------------------
989 working_dir=`eval echo /opt/bacula/working`
990 AC_ARG_WITH(working-dir,
991 AC_HELP_STRING([--with-working-dir=PATH], [specify path of Bacula working directory]),
993 if test "x$withval" != "xno" ; then
999 AC_SUBST(working_dir)
1001 dnl ------------------------------------------------------------------
1002 dnl If the user has not set archivedir, we set our default as /tmp
1003 dnl ------------------------------------------------------------------
1005 AC_ARG_WITH(archivedir,
1006 AC_HELP_STRING([--with-archivedir=PATH], [specify path of SD archive directory]),
1008 if test "x$withval" != "xno" ; then
1014 AC_SUBST(archivedir)
1016 dnl ------------------------------------------------------------------
1017 dnl Allow the user to specify the daemon resource name default hostname
1018 dnl ------------------------------------------------------------------
1020 AC_ARG_WITH(basename,
1021 AC_HELP_STRING([--with-basename=RESNAME], [specify base resource name for daemons]),
1023 if test "x$withval" != "xno" ; then
1031 dnl ------------------------------------------------------------------
1032 dnl Allow the user to override the hostname (default = machine hostname)
1033 dnl ------------------------------------------------------------------
1034 hostname=`uname -n | cut -d '.' -f 1`
1035 if test x${hostname} = x ; then
1036 hostname="localhost"
1038 dnl Make sure hostname is resolved
1039 ping -c 1 $hostname 2>/dev/null 1>/dev/null
1040 if test ! $? = 0; then
1041 hostname="localhost"
1043 AC_ARG_WITH(hostname,
1044 AC_HELP_STRING([--with-hostname=RESNAME], [specify host name for daemons]),
1046 if test "x$withval" != "xno" ; then
1055 dnl ------------------------------------------
1056 dnl Where to place scriptdir (script files)
1057 dnl ------------------------------------------
1058 scriptdir=`eval echo ${sysconfdir}`
1059 AC_ARG_WITH(scriptdir,
1060 AC_HELP_STRING([--with-scriptdir=PATH], [specify path of Bacula scripts directory]),
1062 if test "x$withval" != "xno" ; then
1071 dnl ------------------------------------------
1072 dnl Where to place bsrdir (bsr files)
1073 dnl ------------------------------------------
1074 bsrdir=`eval echo /opt/bacula/bsr`
1076 AC_HELP_STRING([--with-bsrdir=PATH], [specify path of Bacula bsrs directory]),
1078 if test "x$withval" != "xno" ; then
1086 dnl ------------------------------------------
1087 dnl Where to place logdir
1088 dnl ------------------------------------------
1089 logdir=`eval echo /opt/bacula/log`
1091 AC_HELP_STRING([--with-logdir=PATH], [specify path of Bacula logs directory]),
1093 if test "x$withval" != "xno" ; then
1102 # ------------------------------------------
1103 # Where to place plugindir (plugin files)
1104 # ------------------------------------------
1105 plugindir=`eval echo ${libdir}`
1106 AC_ARG_WITH(plugindir,
1107 AC_HELP_STRING([--with-plugindir=PATH], [specify path of Bacula plugins directory]),
1109 if test "x$withval" != "xno" ; then
1117 dnl ------------------------------------------
1118 dnl Where to send dump email
1119 dnl ------------------------------------------
1121 dnl ------------------------------------------
1122 dnl Where to send dump email
1123 dnl ------------------------------------------
1124 dump_email=root@localhost
1125 AC_ARG_WITH(dump-email,
1126 AC_HELP_STRING([--with-dump-email=EMAIL], [dump email address]),
1128 if test "x$withval" != "xno" ; then
1134 AC_SUBST(dump_email)
1136 dnl ------------------------------------------
1137 dnl Where to send job email
1138 dnl ------------------------------------------
1139 job_email=root@localhost
1140 AC_ARG_WITH(job-email,
1141 AC_HELP_STRING([--with-job-email=EMAIL], [job output email address]),
1143 if test "x$withval" != "xno" ; then
1151 dnl ------------------------------------------
1152 dnl Where to find smtp host
1153 dnl ------------------------------------------
1155 AC_ARG_WITH(smtp_host,
1156 AC_HELP_STRING([--with-smtp-host=HOST], [SMTP mail host address]),
1158 if test "x$withval" != "xno" ; then
1166 dnl ------------------------------------
1167 dnl Where to place pid files
1168 dnl ------------------------------------
1170 AC_ARG_WITH(pid-dir,
1171 AC_HELP_STRING([--with-pid-dir=PATH], [specify location of Bacula pid files]),
1173 if test "x$withval" != "xno" ; then
1179 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
1182 dnl ------------------------------------
1183 dnl Where to place subsys "lock file"
1184 dnl ------------------------------------
1185 subsysdir=/var/run/subsys
1186 if test -d /var/run/subsys; then
1187 subsysdir=/var/run/subsys
1188 elif test -d /var/lock/subsys; then
1189 subsysdir=/var/lock/subsys
1191 subsysdir=/var/run/subsys
1193 AC_ARG_WITH(subsys-dir,
1194 AC_HELP_STRING([--with-subsys-dir=PATH], [specify location of Bacula subsys file]),
1196 if test "x$withval" != "xno" ; then
1204 dnl ------------------------------------
1205 dnl Where to start assigning ports
1206 dnl ------------------------------------
1208 AC_ARG_WITH(baseport,
1209 AC_HELP_STRING([--with-baseport=PORT], [specify base port address for daemons]),
1211 if test "x$withval" != "xno" ; then
1218 dir_port=`expr $baseport`
1219 fd_port=`expr $baseport + 1`
1220 sd_port=`expr $fd_port + 1`
1226 dnl ------------------------------------------
1227 dnl Generate passwords
1228 dnl ------------------------------------------
1230 AC_ARG_WITH(dir-password,
1231 AC_HELP_STRING([--with-dir-password=PASSWORD], [specify Director's password]),
1233 if test "x$withval" != "xno" ; then
1234 dir_password=$withval
1239 if test "x$dir_password" = "x" ; then
1240 if test "x$OPENSSL" = "xnone" ; then
1241 key=`autoconf/randpass 33`
1243 key=`openssl rand -base64 33`
1249 AC_ARG_WITH(fd-password,
1250 AC_HELP_STRING([--with-fd-password=PASSWORD], [specify Client's password]),
1252 if test "x$withval" != "xno" ; then
1253 fd_password=$withval
1258 if test "x$fd_password" = "x" ; then
1259 if test "x$OPENSSL" = "xnone" ; then
1260 key=`autoconf/randpass 37`
1262 key=`openssl rand -base64 33`
1268 AC_ARG_WITH(sd-password,
1269 AC_HELP_STRING([--with-sd-password=PASSWORD], [specify Storage daemon's password]),
1271 if test "x$withval" != "xno" ; then
1272 sd_password=$withval
1277 if test "x$sd_password" = "x" ; then
1278 if test "x$OPENSSL" = "xnone" ; then
1279 key=`autoconf/randpass 41`
1281 key=`openssl rand -base64 33`
1287 AC_ARG_WITH(mon-dir-password,
1288 AC_HELP_STRING([--with-mon-dir-password=PASSWORD], [specify Director's password used by the monitor]),
1290 if test "x$withval" != "xno" ; then
1291 mon_dir_password=$withval
1296 if test "x$mon_dir_password" = "x" ; then
1297 if test "x$OPENSSL" = "xnone" ; then
1298 key=`autoconf/randpass 33`
1300 key=`openssl rand -base64 33`
1302 mon_dir_password=$key
1306 AC_ARG_WITH(mon-fd-password,
1307 AC_HELP_STRING([--with-mon-fd-password=PASSWORD], [specify Client's password used by the monitor]),
1309 if test "x$withval" != "xno" ; then
1310 mon_fd_password=$withval
1315 if test "x$mon_fd_password" = "x" ; then
1316 if test "x$OPENSSL" = "xnone" ; then
1317 key=`autoconf/randpass 37`
1319 key=`openssl rand -base64 33`
1321 mon_fd_password=$key
1325 AC_ARG_WITH(mon-sd-password,
1326 AC_HELP_STRING([--with-mon-sd-password=PASSWORD], [specify Storage daemon's password used by the monitor]),
1328 if test "x$withval" != "xno" ; then
1329 mon_sd_password=$withval
1334 if test "x$mon_sd_password" = "x" ; then
1335 if test "x$OPENSSL" = "xnone" ; then
1336 key=`autoconf/randpass 41`
1338 key=`openssl rand -base64 33`
1340 mon_sd_password=$key
1343 AC_SUBST(dir_password)
1344 AC_SUBST(fd_password)
1345 AC_SUBST(sd_password)
1346 AC_SUBST(mon_dir_password)
1347 AC_SUBST(mon_fd_password)
1348 AC_SUBST(mon_sd_password)
1351 dnl Pickup any database name
1354 AC_ARG_WITH(db_name,
1355 AC_HELP_STRING([--with-db-name=DBNAME], [specify database name @<:@default=bacula@:>@]),
1357 if test "x$withval" != "x" ; then
1365 AC_ARG_WITH(db_user,
1366 AC_HELP_STRING([--with-db-user=UNAME], [specify database user @<:@default=bacula@:>@]),
1368 if test "x$withval" != "x" ; then
1376 AC_ARG_WITH(db_password,
1377 AC_HELP_STRING([--with-db-password=PWD], [specify database password @<:@default=*none*@:>@]),
1379 if test "x$withval" != "x" ; then
1380 db_password=$withval
1384 AC_SUBST(db_password)
1387 dnl Pickup a database port
1390 AC_ARG_WITH(db_port,
1391 AC_HELP_STRING([--with-db-port=DBPORT], [specify a database port @<:@default=null@:>@]),
1393 if test "x$withval" != "x" ; then
1401 dnl Pickup MySQL SSL options for database user connection
1404 AC_ARG_WITH(db_ssl_options,
1405 AC_HELP_STRING([--with-db-ssl-options=DBSSLOPTIONS], [specify SSL options for database user connection @<:@default=null@:>@]),
1407 if test "x$withval" != "x" ; then
1408 db_ssl_options=$withval
1412 AC_SUBST(db_ssl_options)
1415 # Handle users and groups for each daemon
1418 AC_ARG_WITH(dir_user,
1419 AC_HELP_STRING([--with-dir-user=USER], [specify user for Director daemon]),
1421 if test "x$withval" != "x" ; then
1428 AC_ARG_WITH(dir_group,
1429 AC_HELP_STRING([--with-dir-group=GROUP], [specify group for Director daemon]),
1431 if test "x$withval" != "x" ; then
1438 AC_ARG_WITH(sd_user,
1439 AC_HELP_STRING([--with-sd-user=USER], [specify user for Storage daemon]),
1441 if test "x$withval" != "x" ; then
1448 AC_ARG_WITH(sd_group,
1449 AC_HELP_STRING([--with-sd-group=GROUP], [specify group for Storage daemon]),
1451 if test "x$withval" != "x" ; then
1458 AC_ARG_WITH(fd_user,
1459 AC_HELP_STRING([--with-fd-user=USER], [specify user for File daemon]),
1461 if test "x$withval" != "x" ; then
1468 AC_ARG_WITH(fd_group,
1469 AC_HELP_STRING([--with-fd-group=GROUP], [specify group for File daemon]),
1471 if test "x$withval" != "x" ; then
1485 dnl allow setting default executable permissions
1488 AC_ARG_WITH(sbin-perm,
1489 AC_HELP_STRING([--with-sbin-perm=MODE], [specify permissions for sbin binaries @<:@default=0750@:>@]),
1491 if test "x$withval" != "x" ; then
1499 dnl -------------------------------------------
1500 dnl enable batch attribute DB insert (default on)
1501 dnl -------------------------------------------
1502 support_batch_insert=yes
1503 AC_ARG_ENABLE(batch-insert,
1504 AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=yes@:>@]),
1506 if test x$enableval = xno; then
1507 support_batch_insert=no
1512 if test x$support_batch_insert = xyes; then
1513 AC_DEFINE(USE_BATCH_FILE_INSERT, 1, [Set if DB batch insert code enabled])
1516 dnl ------------------------------------------------
1517 dnl Bacula check for various SQL database engines
1518 dnl ------------------------------------------------
1521 dnl Set uncomment_dbi by default to '#' if DBI is enabled this will get reset
1525 BA_CHECK_POSTGRESQL_DB
1531 dnl -------------------------------------------
1532 dnl If no batch insert backend are enable set
1533 dnl variable to None
1534 dnl -------------------------------------------
1535 if test -z "${batch_insert_db_backends}"; then
1536 batch_insert_db_backends="None"
1539 dnl -------------------------------------------
1540 dnl Make sure at least one database backend is found
1541 dnl -------------------------------------------
1542 if test "x${db_backends}" = "x" ; then
1545 echo "You have not specified either --enable-client-only or one of the"
1546 echo "supported databases: MySQL, PostgreSQL, or SQLite3."
1547 echo "This is not permitted. Please reconfigure."
1549 echo "Aborting the configuration ..."
1555 dnl -------------------------------------------
1556 dnl See how many catalog backends are configured.
1557 dnl -------------------------------------------
1558 case `echo $DB_BACKENDS | wc -w | sed -e 's/^ *//'` in
1560 DEFAULT_DB_TYPE="${DB_BACKENDS}"
1561 if test x$use_libtool = xno; then
1562 SHARED_CATALOG_TARGETS=""
1564 SHARED_CATALOG_TARGETS="libbaccats-${DEFAULT_DB_TYPE}.la"
1568 dnl ------------------------------------------------
1569 dnl Set the default backend to the first backend found
1570 dnl ------------------------------------------------
1571 DEFAULT_DB_TYPE=`echo ${DB_BACKENDS} | cut -d' ' -f1`
1573 dnl ------------------------------------------------
1574 dnl For multiple backend we need libtool support.
1575 dnl ------------------------------------------------
1576 if test x$use_libtool = xno; then
1579 echo "You have specified two or more of the"
1580 echo "supported databases: MySQL, PostgreSQL, or SQLite3."
1581 echo "This is not permitted when not using libtool Please reconfigure."
1583 echo "Aborting the configuration ..."
1589 SHARED_CATALOG_TARGETS=""
1590 for db_type in ${DB_BACKENDS}
1592 if test -z "${SHARED_CATALOG_TARGETS}"; then
1593 SHARED_CATALOG_TARGETS="libbaccats-${db_type}.la"
1595 SHARED_CATALOG_TARGETS="${SHARED_CATALOG_TARGETS} libbaccats-${db_type}.la"
1601 dnl -------------------------------------------
1602 dnl Unset DB_LIBS when using libtool as we link the
1603 dnl shared library using the right database lib no need to
1604 dnl set DB_LIBS which is only used for non shared versions
1605 dnl of the backends.
1606 dnl -------------------------------------------
1607 if test x$use_libtool = xyes; then
1611 AC_SUBST(uncomment_dbi)
1612 AC_SUBST(DB_BACKENDS)
1614 AC_SUBST(DEFAULT_DB_TYPE)
1615 AC_SUBST(SHARED_CATALOG_TARGETS)
1617 AC_DEFINE(PROTOTYPES)
1619 dnl --------------------------------------------------------------------------
1620 dnl Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1622 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1623 if test -z "$CCOPTS"; then
1624 CCOPTS='-g -O2 -Wall'
1632 dnl See if we can use 64 bit file addresses
1633 largefile_support="no"
1638 dnl --------------------------------------------------------------------------
1639 dnl CHECKING FOR HEADER FILES
1640 dnl --------------------------------------------------------------------------
1679 AC_STRUCT_ST_BLKSIZE
1683 dnl --------------------------------------------------------------------------
1684 dnl Check for utime.h structure
1685 dnl --------------------------------------------------------------------------
1686 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1690 #include <sys/types.h>
1695 ba_cv_header_utime_h=yes
1697 ba_cv_header_utime_h=no
1702 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H, 1, [Set if utime.h exists])
1704 dnl --------------------------------------------------------------------------
1705 dnl Check for socklen_t
1706 dnl --------------------------------------------------------------------------
1707 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1711 #include <sys/types.h>
1712 #include <sys/socket.h>
1716 ba_cv_header_socklen_t=yes
1718 ba_cv_header_socklen_t=no
1723 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T, 1, [Set if socklen_t exists])
1725 dnl --------------------------------------------------------------------------
1726 dnl Check for ioctl request type
1727 dnl --------------------------------------------------------------------------
1729 AC_CACHE_CHECK(for ioctl_req_t, ba_cv_header_ioctl_req_t,
1734 #include <sys/types.h>
1735 #include <sys/ioctl.h>
1737 int (*d_ioctl)(int fd, unsigned long int request, ...);
1740 ba_cv_header_ioctl_req_t=yes
1742 ba_cv_header_ioctl_req_t=no
1747 test $ba_cv_header_ioctl_req_t = yes && AC_DEFINE(HAVE_IOCTL_ULINT_REQUEST, 1, [Set if ioctl request is unsigned long int])
1749 dnl Note: it is more correct to use AC_LANG(C++) but some of the older
1750 dnl *BSD systems still use old style C prototypes, which are wrong with
1751 dnl compiled with a C++ compiler.
1754 dnl --------------------------------------------------------------------------
1755 dnl Check for typeof()
1756 dnl --------------------------------------------------------------------------
1758 AC_CACHE_CHECK(for typeof, ba_cv_have_typeof,
1762 main(){char *a = 0; a = (typeof a)a;}
1764 ba_cv_have_typeof=yes
1766 ba_cv_have_typeof=no
1768 ba_cv_have_typeof=no
1773 test $ba_cv_have_typeof = yes && AC_DEFINE([HAVE_TYPEOF], 1, [Defind to 1 if compiler has typeof])
1778 AC_C_BIGENDIAN([AC_DEFINE([HAVE_BIG_ENDIAN], [1], [Big Endian])], [AC_DEFINE([HAVE_LITTLE_ENDIAN], [1], [Little Endian])])
1780 dnl --------------------------------------------------------------------------
1781 dnl CHECKING FOR FILESYSTEM TYPE
1782 dnl --------------------------------------------------------------------------
1783 AC_MSG_CHECKING(how to get filesystem type)
1785 # The order of these tests is important.
1788 #include <sys/statvfs.h>
1789 #include <sys/fstyp.h>
1791 AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4
1793 if test $fstype = no; then
1796 #include <sys/statfs.h>
1797 #include <sys/fstyp.h>
1799 AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3
1802 if test $fstype = no; then
1805 #include <sys/statfs.h>
1806 #include <sys/vmount.h>
1808 AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX
1811 if test $fstype = no; then
1816 AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD
1819 if test $fstype = no; then
1820 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1822 if test $fstype = no; then
1825 #include <sys/mount.h>
1826 #include <sys/fs_types.h>
1828 AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix
1831 AC_MSG_RESULT($fstype)
1833 AC_CHECK_HEADER(sys/statvfs.h, [ AC_DEFINE(HAVE_SYS_STATVFS_H,1,[Defines if your system have the sys/statvfs.h header file])] , )
1835 AC_CHECK_DECLS([O_CLOEXEC],,[AC_DEFINE([O_CLOEXEC],[0], [Defined to 0 if not provided])],
1842 AC_CHECK_DECLS([FD_CLOEXEC],,[AC_DEFINE([FD_CLOEXEC],[0], [Defined to 0 if not provided])],
1849 AC_CHECK_DECLS([SOCK_CLOEXEC],,[AC_DEFINE([SOCK_CLOEXEC],[0],[Defined to 0 if not provided])],
1851 #ifdef HAVE_SYS_SOCKET_H
1852 # include <sys/socket.h>
1856 AC_CACHE_CHECK(for close on exec modifier for fopen(), ac_cv_feature_stream_cloexec_flag,
1857 [if test $ac_cv_have_decl_O_CLOEXEC = yes ; then
1858 if test $ac_cv_have_decl_SOCK_CLOEXEC = yes ; then
1859 ac_cv_feature_stream_cloexec_flag="e"
1863 if test "x$ac_cv_feature_stream_cloexec_flag" = "xe" ; then
1864 AC_DEFINE(HAVE_STREAM_CLOEXEC,[0],[Defined to 0 if not provided])
1867 AC_DEFINE_UNQUOTED([STREAM_CLOEXEC], "$ac_cv_feature_stream_cloexec_flag", [fopen() modifier for setting close on exec flag])
1869 AC_CHECK_FUNC(accept4, [AC_DEFINE(HAVE_ACCEPT4, 1, [Define to 1 if you have the 'accept4' function.])])
1876 if test x$support_s3 = xyes; then
1878 AC_HELP_STRING([--with-s3@<:@=DIR@:>@], [specify s3 library directory]),
1885 if test -f ${with_s3}/include/libs3.h; then
1886 S3_INC="-I${with_s3}/include"
1887 S3_LDFLAGS="-L${with_s3}/lib"
1888 with_s3="${with_s3}/include"
1890 with_s3="/usr/include"
1893 AC_CHECK_HEADER(${with_s3}/libs3.h,
1895 AC_DEFINE(HAVE_LIBS3, 1, [Define to 1 if you have libs3])
1896 S3_LIBS="${S3_LDFLAGS} -ls3"
1900 echo "libs3.h not found. s3 turned off ..."
1907 AC_CHECK_HEADER(libs3.h,
1909 AC_CHECK_LIB(s3, S3_initialize,
1912 AC_DEFINE(HAVE_LIBS3,1,[Define to 1 if you have libs3])
1923 AC_CHECK_FUNCS(backtrace)
1926 dnl --------------------------------------------------------------------------
1927 dnl CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1928 dnl --------------------------------------------------------------------------
1938 AC_CHECK_TYPE(ino_t, unsigned long)
1939 AC_CHECK_TYPE(dev_t, unsigned long)
1940 AC_CHECK_TYPE(daddr_t, long)
1941 AC_CHECK_TYPE(major_t, int)
1942 AC_CHECK_TYPE(minor_t, int)
1943 AC_CHECK_TYPE(ssize_t, int)
1950 AC_CHECK_SIZEOF(char, 1)
1951 AC_CHECK_SIZEOF(short int, 2)
1952 AC_CHECK_SIZEOF(int, 4)
1953 AC_CHECK_SIZEOF(long int, 4)
1954 AC_CHECK_SIZEOF(long long int, 8)
1955 AC_CHECK_SIZEOF(int *, 4)
1957 dnl Check for sys/types.h types
1958 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int,
1962 #include <sys/types.h>
1966 ac_cv_have_u_int="yes"
1968 ac_cv_have_u_int="no"
1973 if test "x$ac_cv_have_u_int" = "xyes" ; then
1974 AC_DEFINE(HAVE_U_INT)
1978 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t,
1982 #include <sys/types.h>
1986 ac_cv_have_intmax_t="yes"
1994 ac_cv_have_intmax_t="yes"
1996 ac_cv_have_intmax_t="no"
2003 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
2004 AC_DEFINE(HAVE_INTMAX_T)
2008 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t,
2012 #include <sys/types.h>
2014 u_intmax_t a; a = 1;
2016 ac_cv_have_u_intmax_t="yes"
2022 u_intmax_t a; a = 1;
2024 ac_cv_have_u_intmax_t="yes"
2026 ac_cv_have_u_intmax_t="no"
2033 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
2034 AC_DEFINE(HAVE_U_INTMAX_T)
2038 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t,
2042 #include <sys/types.h>
2044 int8_t a; int16_t b; int32_t c; a = b = c = 1;
2046 ac_cv_have_intxx_t="yes"
2048 ac_cv_have_intxx_t="no"
2053 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
2054 AC_DEFINE(HAVE_INTXX_T)
2058 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t,
2062 #include <sys/types.h>
2066 ac_cv_have_int64_t="yes"
2068 ac_cv_have_int64_t="no"
2073 if test "x$ac_cv_have_int64_t" = "xyes" ; then
2074 AC_DEFINE(HAVE_INT64_T)
2078 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t,
2082 #include <sys/types.h>
2084 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
2086 ac_cv_have_u_intxx_t="yes"
2088 ac_cv_have_u_intxx_t="no"
2093 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
2094 AC_DEFINE(HAVE_U_INTXX_T)
2098 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t,
2102 #include <sys/types.h>
2106 ac_cv_have_u_int64_t="yes"
2108 ac_cv_have_u_int64_t="no"
2113 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
2114 AC_DEFINE(HAVE_U_INT64_T)
2118 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
2119 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2121 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
2124 #include <sys/bitypes.h>
2126 int8_t a; int16_t b; int32_t c;
2127 u_int8_t e; u_int16_t f; u_int32_t g;
2128 a = b = c = e = f = g = 1;
2130 AC_DEFINE(HAVE_U_INTXX_T)
2131 AC_DEFINE(HAVE_INTXX_T)
2132 AC_DEFINE(HAVE_SYS_BITYPES_H)
2140 if test -z "$have_u_intxx_t" ; then
2141 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t,
2145 #include <sys/types.h>
2147 uint8_t a; uint16_t b;
2148 uint32_t c; a = b = c = 1;
2150 ac_cv_have_uintxx_t="yes"
2152 ac_cv_have_uintxx_t="no"
2157 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
2158 AC_DEFINE(HAVE_UINTXX_T)
2162 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
2163 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2165 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
2168 #include <sys/bitypes.h>
2170 int64_t a; u_int64_t b;
2173 AC_DEFINE(HAVE_U_INT64_T)
2174 AC_DEFINE(HAVE_INT64_T)
2182 if (test -z "$have_uintxx_t" && \
2183 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2185 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
2188 #include <sys/bitypes.h>
2190 uint8_t a; uint16_t b;
2191 uint32_t c; a = b = c = 1;
2193 AC_DEFINE(HAVE_UINTXX_T)
2201 dnl --------------------------------------------------------------------------
2202 dnl CHECKING FOR REQUIRED LIBRARY FUNCTIONS
2203 dnl --------------------------------------------------------------------------
2219 [echo 'configure: cannot find needed function.'; exit 1]
2224 AC_DEFINE(HAVE_FCNTL_F_CLOSEM, 1, [Set if you have 'F_CLOSEM' fcntl flag]),
2226 [#include <fcntl.h>]
2231 AC_DEFINE(HAVE_FCNTL_LOCK, 1, [Set if fcntl supports file locking]),
2233 [#include <fcntl.h>]
2236 AC_CHECK_FUNC(closefrom, [AC_DEFINE(HAVE_CLOSEFROM, 1, [Define to 1 if you have the 'closefrom' function.])])
2237 AC_CHECK_FUNCS(getpagesize, [AC_DEFINE(HAVE_GETPAGESIZE, 1, [Set if have getpagesize])])
2238 AC_CHECK_FUNCS(malloc_trim, [AC_DEFINE(HAVE_MALLOC_TRIM, 1, [Set if have malloc_trim])])
2240 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
2241 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
2242 AC_CHECK_FUNCS(posix_fadvise)
2243 AC_CHECK_FUNCS(posix_fallocate)
2244 AC_CHECK_FUNCS(fdatasync)
2246 AC_CHECK_FUNCS(chflags)
2248 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
2250 AC_CACHE_CHECK(for va_copy, ba_cv_va_copy,
2255 void use_va_copy(va_list args){va_list args2; va_copy(args2,args); va_end(args2);}
2256 void call_use_va_copy(int junk,...){va_list args; va_start(args,junk); use_va_copy(args); va_end(args);}
2258 call_use_va_copy(1,2,3)
2267 test $ba_cv_va_copy = yes && AC_DEFINE(HAVE_VA_COPY, 1, [Set if va_copy exists])
2269 dnl --------------------------------------------------------------------------
2270 dnl CHECKING FOR THREAD SAFE FUNCTIONS
2271 dnl --------------------------------------------------------------------------
2272 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
2274 # If resolver functions are not in libc check for -lnsl or -lresolv.
2275 AC_CHECK_FUNC(gethostbyname_r,
2276 AC_MSG_RESULT(using libc's resolver),
2277 AC_CHECK_LIB(nsl,gethostbyname_r)
2278 AC_CHECK_LIB(resolv,gethostbyname_r))
2280 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
2281 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
2282 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
2283 AC_CHECK_FUNCS(getnameinfo, [AC_DEFINE(HAVE_GETNAMEINFO)])
2286 dnl ----------------------------
2287 dnl check sa_len of sockaddr
2288 dnl ----------------------------
2289 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
2293 #include <sys/socket.h>
2295 struct sockaddr s; s.sa_len;
2297 ac_cv_struct_sockaddr_sa_len=yes
2298 ], [ac_cv_struct_sockaddr_sa_len=no
2304 if test $ac_cv_struct_sockaddr_sa_len = yes; then
2305 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
2309 dnl check for working getaddrinfo()
2311 dnl Note that if the system doesn't have gai_strerror(), we
2312 dnl can't use getaddrinfo() because we can't get strings
2313 dnl describing the error codes.
2315 AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,
2321 #include <sys/types.h>
2322 #include <sys/socket.h>
2325 struct addrinfo hints, *ai;
2328 memset(&hints, 0, sizeof(hints));
2329 hints.ai_family = AF_UNSPEC;
2330 hints.ai_socktype = SOCK_STREAM;
2331 error = getaddrinfo("127.0.0.1", NULL, &hints, &ai);
2335 if (ai->ai_addr->sa_family != AF_INET) {
2341 ac_cv_working_getaddrinfo="yes"
2343 ac_cv_working_getaddrinfo="no"
2345 ac_cv_working_getaddrinfo="yes"
2350 AC_CHECK_FUNC(gai_strerror, [AC_DEFINE(HAVE_GAI_STRERROR, 1, [Define to 1 if you have the 'gai_strerror' function.])])
2352 if test "$ac_cv_working_getaddrinfo" = "yes"; then
2353 if test "$ac_cv_func_gai_strerror" != "yes"; then
2354 ac_cv_working_getaddrinfo="no"
2356 AC_DEFINE(HAVE_GETADDRINFO, 1, [Define to 1 if getaddrinfo exists and works])
2364 AC_CHECK_FUNCS(getmntinfo, [AC_DEFINE(HAVE_GETMNTINFO)])
2365 AC_FUNC_CLOSEDIR_VOID
2366 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
2367 # AC_FUNC_FNMATCH dnl use local version
2369 AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
2371 AC_CHECK_LIB(sun, getpwnam)
2373 AC_CHECK_HEADERS(zlib.h)
2374 AC_CHECK_LIB(z, deflate, [ZLIBS="-lz"])
2376 if test x$ZLIBS = x-lz; then
2377 AC_DEFINE(HAVE_LIBZ)
2383 dnl Check if we have AFS on this system
2389 AC_HELP_STRING([--disable-afs], [disable afs support @<:@default=auto@:>@]),
2391 if test x$enableval = xyes; then
2393 elif test x$enableval = xno; then
2400 if test x$support_afs = xyes -o x$support_afs = xauto; then
2402 AC_HELP_STRING([--with-afsdir@<:@=DIR@:>@], [Directory holding AFS includes/libs]),
2403 with_afsdir=$withval
2407 dnl Search in standard places, or --with-afsdir not specified
2409 if test x$with_afsdir = x; then
2410 for root in /usr /usr/local; do
2411 if test -d ${root}/include/afs/ ; then
2415 if test -d ${root}/include/openafs/afs/ ; then
2422 if test -d ${with_afsdir}/include/afs/ ; then
2423 AFS_CFLAGS="-I${with_afsdir}/include"
2425 if test -d ${with_afsdir}/include/openafs/afs/ ; then
2426 AFS_CFLAGS="-I${with_afsdir}/include/openafs"
2430 saved_CFLAGS="${CFLAGS}"
2431 saved_CPPFLAGS="${CPPFLAGS}"
2432 CFLAGS="${AFS_CFLAGS} ${saved_CFLAGS}"
2433 CPPFLAGS="${AFS_CFLAGS} ${saved_CPPFLAGS}"
2435 AC_CHECK_HEADERS(afs/afsint.h)
2438 #include <afs/afsint.h>
2439 #include <afs/venus.h>
2441 AC_DEFINE(HAVE_AFS_VENUS_H,1,[Define to 1 if you have the <afs/venus.h> header file.])
2444 CFLAGS="${saved_CFLAGS}"
2445 CPPFLAGS="${saved_CPPFLAGS}"
2448 dnl See if we can find a libsys with the pioctl symbol in there
2450 AC_MSG_CHECKING(for pioctl in AFS libsys)
2451 for dir in ${with_afsdir}/lib \
2452 ${with_afsdir}/lib/afs \
2453 ${with_afsdir}/lib/openafs \
2454 ${with_afsdir}/lib64 \
2455 ${with_afsdir}/lib64/afs \
2456 ${with_afsdir}/lib64/openafs
2458 for arch_type in .a .so
2460 A=`test -f ${dir}/libsys${arch_type} && nm ${dir}/libsys${arch_type} 2>/dev/null | grep pioctl`
2462 if test $pkg = 0; then
2464 AFS_LIBS="-L${dir} -lsys -lrx -llwp ${dir}/util${arch_type}"
2470 if test $have_afs = yes; then
2476 if test x$support_afs = xyes -a $have_afs != yes; then
2477 AC_MSG_ERROR([afs support explicitly enabled but no supported afs implementation found,
2478 please either load the afs libraries or rerun configure without --enable-afs])
2480 if test $have_afs = yes; then
2481 AC_DEFINE(HAVE_AFS,1,[Define to 1 if your system has AFS support])
2482 AC_DEFINE(HAVE_AFS_ACL,1,[Andrew FileSystem ACL support])
2486 AC_SUBST(AFS_CFLAGS)
2489 dnl ---------------------------------------------------
2490 dnl Check for lzo support/directory (default on)
2491 dnl ---------------------------------------------------
2492 dnl this allows you to turn it completely off
2495 AC_HELP_STRING([--disable-lzo], [disable lzo support @<:@default=yes@:>@]),
2497 if test x$enableval = xno; then
2508 if test x$support_lzo = xyes; then
2510 AC_HELP_STRING([--with-lzo@<:@=DIR@:>@], [specify lzo library directory]),
2517 if test -f ${with_lzo}/include/lzo/lzoconf.h; then
2518 LZO_INC="-I${with_lzo}/include"
2519 LZO_LDFLAGS="-L${with_lzo}/lib"
2520 with_lzo="${with_lzo}/include"
2522 with_lzo="/usr/include"
2525 AC_CHECK_HEADER(${with_lzo}/lzo/lzoconf.h,
2527 AC_DEFINE(HAVE_LZO, 1, [Define to 1 if you have LZO compression])
2528 LZO_LIBS="${LZO_LDFLAGS} -llzo2"
2532 echo "lzoconf.h not found. lzo turned off ..."
2539 AC_CHECK_HEADER(lzo/lzoconf.h,
2541 AC_CHECK_HEADER(lzo/lzo1x.h,
2543 AC_CHECK_LIB(lzo2, lzo1x_1_compress,
2546 AC_DEFINE(HAVE_LZO,1,[Define to 1 if you have LZO compression])
2559 dnl Check for ACL support and libraries
2563 AC_HELP_STRING([--disable-acl], [disable acl support @<:@default=auto@:>@]),
2565 if test x$enableval = xyes; then
2567 elif test x$enableval = xno; then
2574 have_extended_acl=no
2575 if test x$support_acl = xyes -o x$support_acl = xauto; then
2576 AC_CHECK_HEADER(sys/acl.h, [ AC_DEFINE(HAVE_SYS_ACL_H,1,[Defines if your system have the sys/acl.h header file])] , )
2579 dnl First check for acl_get_file in libc
2581 AC_CHECK_FUNC(acl_get_file,
2588 dnl Check for acl_get_file in libacl (Linux)
2590 if test $have_acl = no; then
2591 AC_CHECK_LIB(acl, acl_get_file,
2594 if test $have_afs = yes; then
2596 dnl Because of possible naming conflict with AFS libacl make sure we use the one in /usr/lib64 or /usr/lib !!!
2598 if test -d /usr/lib64/; then
2599 FDLIBS="-L/usr/lib64 -lacl $FDLIBS"
2601 FDLIBS="-L/usr/lib -lacl $FDLIBS"
2604 FDLIBS="-lacl $FDLIBS"
2611 dnl Check for acl_get_file in libpacl (OSF1)
2612 dnl and if ACL_TYPE_DEFAULT_DIR is defined.
2614 if test $have_acl = no -a \
2615 x${HAVE_OSF1_OS_TRUE} = x; then
2616 AC_CHECK_LIB(pacl, acl_get_file,
2619 FDLIBS="-lpacl $FDLIBS"
2623 AC_MSG_CHECKING(for ACL_TYPE_DEFAULT_DIR in acl.h include file)
2624 grep ACL_TYPE_DEFAULT_DIR /usr/include/sys/acl.h > /dev/null 2>&1
2625 if test $? = 0; then
2626 AC_DEFINE(HAVE_ACL_TYPE_DEFAULT_DIR,1,[Defines if your system have the ACL_TYPE_DEFAULT_DIR acl type])
2634 dnl On OSX check for availability of ACL_TYPE_EXTENDED
2636 if test $have_acl = yes -a \
2637 x${HAVE_DARWIN_OS_TRUE} = x; then
2638 AC_MSG_CHECKING(for ACL_TYPE_EXTENDED in acl.h include file)
2639 grep ACL_TYPE_EXTENDED /usr/include/sys/acl.h > /dev/null 2>&1
2640 if test $? = 0; then
2641 AC_DEFINE(HAVE_ACL_TYPE_EXTENDED,1,[Defines if your system have the ACL_TYPE_EXTENDED acl type])
2649 dnl On FreeBSD check for availability of ACL_TYPE_NFS4
2651 if test $have_acl = yes -a \
2652 x${HAVE_FREEBSD_OS_TRUE} = x; then
2653 AC_MSG_CHECKING(for ACL_TYPE_NFS4 in acl.h include file)
2654 grep ACL_TYPE_NFS4 /usr/include/sys/acl.h > /dev/null 2>&1
2655 if test $? = 0; then
2656 AC_DEFINE(HAVE_ACL_TYPE_NFS4,1,[Defines if your system have the ACL_TYPE_NFS4 acl type])
2664 dnl Check for acltotext and acl_totext (Solaris)
2666 if test $have_acl = no -a \
2667 x${HAVE_SUN_OS_TRUE} = x; then
2668 AC_CHECK_LIB(sec, acltotext,
2671 FDLIBS="-lsec $FDLIBS"
2673 AC_CHECK_LIB(sec, acl_totext,
2675 have_extended_acl=yes
2683 dnl Check for acl_get and aclx_get (AIX)
2685 if test $have_acl = no -a \
2686 x${HAVE_AIX_OS_TRUE} = x; then
2687 AC_CHECK_FUNC(acl_get,
2691 AC_CHECK_FUNC(aclx_get,
2693 have_extended_acl=yes
2700 if test x$support_acl = xyes -a $have_acl != yes; then
2701 AC_MSG_ERROR([acl support explicitly enabled but no supported acl implementation found,
2702 please either load the acl libraries or rerun configure without --enable-acl])
2704 if test $have_acl = yes; then
2705 AC_DEFINE([HAVE_ACL],1,[Normal acl support])
2708 if test $have_extended_acl = yes; then
2709 AC_DEFINE([HAVE_EXTENDED_ACL],1,[Extended acl support])
2715 dnl Check for XATTR support
2718 AC_ARG_ENABLE(xattr,
2719 AC_HELP_STRING([--disable-xattr], [disable xattr support @<:@default=auto@:>@]),
2721 if test x$enableval = xyes; then
2723 elif test x$enableval = xno; then
2730 if test x$support_xattr = xyes -o x$support_xattr = xauto; then
2732 dnl First check for *BSD support
2733 dnl When running on a BSD variant
2735 if test x${HAVE_FREEBSD_OS_TRUE} = x -o \
2736 x${HAVE_NETBSD_OS_TRUE} = x -o \
2737 x${HAVE_OPENBSD_OS_TRUE} = x; then
2738 AC_CHECK_HEADER(sys/extattr.h, [ AC_DEFINE(HAVE_SYS_EXTATTR_H,1,[Defines if your system have the sys/extattr.h header file])] , )
2739 AC_CHECK_HEADER(libutil.h, [ AC_DEFINE(HAVE_LIBUTIL_H,1,[Defines if your system have the libutil.h header file])] , )
2740 AC_CHECK_FUNCS(extattr_get_link extattr_set_link extattr_list_link,
2743 AC_DEFINE([HAVE_EXTATTR_GET_LINK],1,[Define to 1 if you have the 'extattr_get_link' function.])
2744 AC_DEFINE([HAVE_EXTATTR_SET_LINK],1,[Define to 1 if you have the 'extattr_set_link' function.])
2745 AC_DEFINE([HAVE_EXTATTR_LIST_LINK],1,[Define to 1 if you have the 'extattr_list_link' function.])
2749 if test $have_xattr = no; then
2750 AC_CHECK_FUNCS(extattr_get_file extattr_set_file extattr_list_file,
2753 AC_DEFINE([HAVE_EXTATTR_GET_FILE],1,[Define to 1 if you have the 'extattr_get_file' function.])
2754 AC_DEFINE([HAVE_EXTATTR_SET_FILE],1,[Define to 1 if you have the 'extattr_set_file' function.])
2755 AC_DEFINE([HAVE_EXTATTR_LIST_FILE],1,[Define to 1 if you have the 'extattr_list_file' function.])
2760 if test $have_xattr = yes; then
2761 have_extattr_string_in_libc=no
2762 AC_CHECK_FUNCS(extattr_namespace_to_string extattr_string_to_namespace,
2764 have_extattr_string_in_libc=yes
2765 AC_DEFINE([HAVE_EXTATTR_NAMESPACE_TO_STRING],1,[Define to 1 if you have the 'extattr_namespace_to_string' function.])
2766 AC_DEFINE([HAVE_EXTATTR_STRING_TO_NAMESPACE],1,[Define to 1 if you have the 'extattr_string_to_namespace' function.])
2771 dnl If extattr_namespace_to_string and extattr_string_to_namespace are not in libc see if they are in libutil
2773 if test $have_extattr_string_in_libc = no; then
2774 AC_CHECK_LIB(util, extattr_namespace_to_string extattr_string_to_namespace,
2776 AC_DEFINE([HAVE_EXTATTR_NAMESPACE_TO_STRING],1,[Define to 1 if you have the 'extattr_namespace_to_string' function.])
2777 AC_DEFINE([HAVE_EXTATTR_STRING_TO_NAMESPACE],1,[Define to 1 if you have the 'extattr_string_to_namespace' function.])
2778 FDLIBS="-lutil $FDLIBS"
2786 dnl If we failed to find *BSD support try the AIX implementation of extented attributes (EA)
2787 dnl When running on AIX
2789 if test $have_xattr = no -a \
2790 x${HAVE_AIX_OS_TRUE} = x; then
2791 AC_CHECK_HEADER(sys/ea.h, [ AC_DEFINE(HAVE_SYS_EA_H,1,[Defines if your system have the sys/ea.h header file])] , )
2792 AC_CHECK_FUNCS(llistea lgetea lsetea,
2795 AC_DEFINE([HAVE_LLISTEA],1,[Define to 1 if you have the 'llistea' function.])
2796 AC_DEFINE([HAVE_LGETEA],1,[Define to 1 if you have the 'lgetea' function.])
2797 AC_DEFINE([HAVE_LSETEA],1,[Define to 1 if you have the 'lsetea' function.])
2801 if test $have_xattr = no; then
2802 AC_CHECK_FUNCS(listea getea setea,
2805 AC_DEFINE([HAVE_LISTEA],1,[Define to 1 if you have the 'listea' function.])
2806 AC_DEFINE([HAVE_GETEA],1,[Define to 1 if you have the 'getea' function.])
2807 AC_DEFINE([HAVE_SETEA],1,[Define to 1 if you have the 'setea' function.])
2814 dnl If we failed to find AIX support try the TRU64 implementation of extented attributes
2815 dnl when running on a TRU64 OS.
2817 if test $have_xattr = no -a \
2818 x${HAVE_OSF1_OS_TRUE} = x; then
2819 AC_CHECK_HEADER(sys/proplist.h, [ AC_DEFINE(HAVE_SYS_PROPLIST_H,1,[Defines if your system have the sys/proplist.h header file])] , )
2820 AC_CHECK_FUNCS(getproplist get_proplist_entry sizeof_proplist_entry add_proplist_entry setproplist,
2823 AC_DEFINE([HAVE_GETPROPLIST],1,[Define to 1 if you have the 'getproplist' function.])
2824 AC_DEFINE([HAVE_GET_PROPLIST_ENTRY],1,[Define to 1 if you have the 'get_proplist_entry' function.])
2825 AC_DEFINE([HAVE_SIZEOF_PROPLIST_ENTRY],1,[Define to 1 if you have the 'sizeof_proplist_entry' function.])
2826 AC_DEFINE([HAVE_ADD_PROPLIST_ENTRY],1,[Define to 1 if you have the 'add_proplist_entry' function.])
2827 AC_DEFINE([HAVE_SETPROPLIST],1,[Define to 1 if you have the 'setproplist' function.])
2833 dnl If we failed to find TRU64 support try the SOLARIS implementation of extented and extensible attributes
2834 dnl when running on a Solaris.
2836 if test $have_xattr = no -a \
2837 x${HAVE_SUN_OS_TRUE} = x; then
2838 AC_CHECK_HEADER(sys/attr.h, [ AC_DEFINE(HAVE_SYS_ATTR_H,1,[Defines if your system have the sys/attr.h header file])] , )
2839 AC_CHECK_HEADER(sys/nvpair.h, [ AC_DEFINE(HAVE_SYS_NVPAIR_H,1,[Defines if your system have the sys/nvpair.h header file])] , )
2840 AC_CHECK_HEADER(attr.h, [ AC_DEFINE(HAVE_ATTR_H,1,[Defines if your system have the attr.h header file])] , )
2842 AC_CHECK_FUNCS(openat fstatat unlinkat fchownat futimesat,
2845 AC_DEFINE([HAVE_OPENAT],1,[Define to 1 if you have the 'openat' function.])
2846 AC_DEFINE([HAVE_FSTATAT],1,[Define to 1 if you have the 'fstatat' function.])
2847 AC_DEFINE([HAVE_UNLINKAT],1,[Define to 1 if you have the 'unlinkat' function.])
2848 AC_DEFINE([HAVE_FCHOWNAT],1,[Define to 1 if you have the 'fchownat' function.])
2849 AC_DEFINE([HAVE_FUTIMESAT],1,[Define to 1 if you have the 'futimesat' function.])
2853 if test $have_xattr = yes; then
2854 AC_CHECK_LIB(nvpair, nvlist_next_nvpair,
2856 AC_DEFINE([HAVE_NVLIST_NEXT_NVPAIR],1,[Define to 1 if you have the 'nvlist_next_nvpair' function.])
2857 FDLIBS="-lnvpair $FDLIBS"
2864 dnl If we failed to find Solaris support try the generic xattr support code
2866 if test $have_xattr = no; then
2867 AC_CHECK_HEADER(sys/xattr.h, [ AC_DEFINE(HAVE_SYS_XATTR_H,1,[Defines if your system have the sys/xattr.h header file])] , )
2868 AC_CHECK_FUNCS(llistxattr lgetxattr lsetxattr,
2871 AC_DEFINE([HAVE_LLISTXATTR],1,[Define to 1 if you have the 'llistxattr' function.])
2872 AC_DEFINE([HAVE_LGETXATTR],1,[Define to 1 if you have the 'lgetxattr' function.])
2873 AC_DEFINE([HAVE_LSETXATTR],1,[Define to 1 if you have the 'lsetxattr' function.])
2877 if test $have_xattr = no; then
2878 AC_CHECK_FUNCS(listxattr getxattr setxattr,
2881 AC_DEFINE([HAVE_LISTXATTR],1,[Define to 1 if you have the 'listxattr' function.])
2882 AC_DEFINE([HAVE_GETXATTR],1,[Define to 1 if you have the 'getxattr' function.])
2883 AC_DEFINE([HAVE_SETXATTR],1,[Define to 1 if you have the 'setxattr' function.])
2889 if test x$support_xattr = xyes -a $have_xattr != yes; then
2890 AC_MSG_ERROR([xattr support explicitly enabled but no supported xattr implementation found,
2891 please either load the xattr libraries or rerun configure without --enable-xattr])
2893 if test $have_xattr = yes; then
2894 AC_DEFINE([HAVE_XATTR],1,[Extended Attributes support])
2900 dnl Check for pthread libraries
2903 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
2905 AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
2907 AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
2909 AC_CHECK_FUNC(pthread_create)
2918 dnl Check for headers, functions and libraries required to support
2919 dnl keeping readall capabilities
2921 AC_CHECK_HEADERS(sys/prctl.h sys/capability.h)
2922 AC_CHECK_FUNCS(prctl setreuid)
2923 AC_CHECK_LIB([cap], [cap_set_proc], [CAP_LIBS="-lcap"], [CAP_LIBS=])
2924 if test x$CAP_LIBS = x-lcap; then
2925 AC_DEFINE(HAVE_LIBCAP, 1, [Define if you have libcap])
2934 if test x$have_gcc = xyes ; then
2935 CPPFLAGS="$CPPFLAGS -x c++ -fno-strict-aliasing -fno-exceptions -fno-rtti"
2936 CFLAGS="$CFLAGS -x c++ -fno-strict-aliasing -fno-exceptions -fno-rtti"
2938 LDFLAGS=${LDFLAGS--O}
2939 CPPFLAGS="$CPPFLAGS"
2951 AC_SUBST(X_EXTRA_LIBS)
2956 dnl extra configurable objects
2967 dnl Finally we set appropriate distribution specific
2968 dnl variables and defaults
2973 COMPRESS_MANPAGES=yes
2978 PSCMD="ps -e -o pid,comm"
2979 PFILES="${PFILES} platforms/aix/Makefile"
2980 TAPEDRIVE="/dev/rmt0.1"
2984 PTHREAD_LIB="-lpthread -lexc"
2985 if test "${CC}" = "gcc" ; then
2992 TAPEDRIVE="/dev/nrmt0"
2995 DISTVER=`uname -a |awk '{print $3}'`
2996 TAPEDRIVE="/dev/nrmt0"
2997 PTHREAD_LIB="-pthread"
2998 CFLAGS="${CFLAGS} -pthread"
2999 PSCMD="ps -ax -o pid,command"
3003 platforms/bsdi/Makefile \
3004 platforms/bsdi/bacula-fd \
3005 platforms/bsdi/bacula-sd \
3006 platforms/bsdi/bacula-dir"
3007 largefile_support="yes"
3010 DISTVER=`uname -a |awk '{print $3}'`
3011 TAPEDRIVE="/dev/nrst0"
3014 WLDFLAGS="-mwindows"
3018 TAPEDRIVE="/dev/nst0"
3019 PSCMD="ps -e -o pid,command"
3022 platforms/darwin/Makefile"
3026 TAPEDRIVE="/dev/nst0"
3027 PSCMD="ps -e -o pid,command"
3030 platforms/osx/Makefile"
3033 if `test -f /etc/apt/sources.list && grep -q ubuntu /etc/apt/sources.list`; then
3036 DISTVER=`cat /etc/debian_version`
3037 if test -f /etc/lsb-release ; then
3039 if test "x$DISTRIB_ID" != "x" ; then
3040 DISTNAME=$DISTRIB_ID
3042 if test "x$DISTRIB_RELEASE" != "x" ; then
3043 DISTVER=$DISTRIB_RELEASE
3046 if test "$DISTNAME" = "Ubuntu" ; then
3049 TAPEDRIVE="/dev/nst0"
3050 PSCMD="ps -e -o pid,command"
3051 if test "$DISTNAME" = "ubuntu" ; then
3053 platforms/ubuntu/Makefile \
3054 platforms/ubuntu/bacula-fd \
3055 platforms/ubuntu/bacula-sd \
3056 platforms/ubuntu/bacula-dir"
3059 platforms/debian/Makefile \
3060 platforms/debian/bacula-fd \
3061 platforms/debian/bacula-sd \
3062 platforms/debian/bacula-dir"
3066 DISTVER=`uname -a |awk '{print $3}'`
3067 VER=`echo $DISTVER | cut -c 1`
3068 if test x$VER = x4 ; then
3069 PTHREAD_LIB="${PTHREAD_LIBS:--pthread}"
3070 CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS:--pthread}"
3074 TAPEDRIVE="/dev/nrsa0"
3075 PSCMD="ps -ax -o pid,command"
3077 platforms/freebsd/Makefile \
3078 platforms/freebsd/bacula-fd \
3079 platforms/freebsd/bacula-sd \
3080 platforms/freebsd/bacula-dir"
3081 largefile_support="yes"
3085 TAPEDRIVE="/dev/nst0"
3086 PSCMD="ps -e -o pid,command"
3088 platforms/hurd/Makefile \
3089 platforms/hurd/bacula-fd \
3090 platforms/hurd/bacula-sd \
3091 platforms/hurd/bacula-dir"
3094 PSCMD="UNIX95=1; ps -e -o pid,comm"
3095 CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
3097 TAPEDRIVE="/dev/rmt/0hnb"
3098 PTHREAD_LIB="-lpthread"
3099 AC_DEFINE([_INCLUDE_LONGLONG])
3103 TAPEDRIVE="/dev/rmt/0cbn"
3104 PSCMD="ps -e -o pid,comm"
3106 platforms/irix/Makefile \
3107 platforms/irix/bacula-fd \
3108 platforms/irix/bacula-sd \
3109 platforms/irix/bacula-dir"
3112 DISTVER=`uname -a |awk '{print $3}'`
3115 TAPEDRIVE="/dev/nrst0"
3116 PSCMD="ps -ax -o pid,command"
3117 PTHREAD_LIB="-pthread"
3118 CFLAGS="${CFLAGS} -pthread"
3121 DISTVER=`uname -a |awk '{print $3}'`
3124 TAPEDRIVE="/dev/nrst0"
3125 PSCMD="ps -ax -o pid,command"
3126 PTHREAD_LIB="-pthread"
3127 CFLAGS="${CFLAGS} -pthread"
3129 platforms/openbsd/Makefile \
3130 platforms/openbsd/bacula-fd \
3131 platforms/openbsd/bacula-sd \
3132 platforms/openbsd/bacula-dir"
3135 if test -f /etc/whitebox-release ; then
3136 f=/etc/whitebox-release
3138 f=/etc/redhat-release
3140 if test `cat $f | grep release |\
3141 cut -f 3 -d ' '`x = "Enterprise"x ; then
3142 DISTVER="Enterprise "`cat $f | grep release |\
3145 DISTVER=`cat /etc/redhat-release | grep release |\
3148 TAPEDRIVE="/dev/nst0"
3149 PSCMD="ps -e -o pid,command"
3151 platforms/redhat/Makefile \
3152 platforms/redhat/bacula-fd \
3153 platforms/redhat/bacula-sd \
3154 platforms/redhat/bacula-dir
3158 DISTVER=`cat /etc/mandrake-release | grep release |\
3160 TAPEDRIVE="/dev/nst0"
3161 PSCMD="ps -e -o pid,command"
3163 platforms/mandrake/Makefile \
3164 platforms/mandrake/bacula-fd \
3165 platforms/mandrake/bacula-sd \
3166 platforms/mandrake/bacula-dir \
3170 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
3171 TAPEDRIVE="/dev/nst0"
3172 PSCMD="ps -e -o pid,command"
3174 platforms/gentoo/Makefile \
3175 platforms/gentoo/bacula-init \
3176 platforms/gentoo/bacula-fd \
3177 platforms/gentoo/bacula-sd \
3178 platforms/gentoo/bacula-dir"
3181 DISTVER=`cat /etc/slackware-version`
3182 TAPEDRIVE="/dev/nst0"
3183 PSCMD="ps -e -o pid,command"
3185 platforms/slackware/Makefile \
3186 platforms/slackware/rc.bacula-fd \
3187 platforms/slackware/rc.bacula-sd \
3188 platforms/slackware/rc.bacula-dir\
3189 platforms/slackware/functions.bacula"
3193 TAPEDRIVE="/dev/rmt/0cbn"
3194 PSCMD="ps -e -o pid,comm"
3196 platforms/solaris/Makefile \
3197 platforms/solaris/bacula-fd \
3198 platforms/solaris/bacula-sd \
3199 platforms/solaris/bacula-dir"
3203 AC_DEFINE(HAVE_OLD_SOCKOPT)
3204 AC_DEFINE(USE_THR_SETCONCURRENCY)
3207 AC_DEFINE(USE_THR_SETCONCURRENCY)
3210 AC_DEFINE(HAVE_SOLARIS10, 1, [Set if building on Solaris 10])
3215 LIBS="$LIBS -lresolv -lrt"
3218 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
3220 TAPEDRIVE="/dev/nst0"
3221 PSCMD="ps -e -o pid,command"
3223 platforms/suse/Makefile \
3224 platforms/suse/bacula-fd \
3225 platforms/suse/bacula-sd \
3226 platforms/suse/bacula-dir \
3227 platforms/suse/bacula"
3232 TAPEDRIVE="/dev/nst0"
3233 PSCMD="ps -e -o pid,command"
3235 platforms/suse/Makefile \
3236 platforms/suse/bacula-fd \
3237 platforms/suse/bacula-sd \
3238 platforms/suse/bacula-dir"
3242 TAPEDRIVE="/dev/nst0"
3245 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
3249 dnl -------------------------------------------
3250 dnl systemd (default off)
3251 dnl -------------------------------------------
3252 AC_MSG_CHECKING(for systemd support)
3253 AC_ARG_WITH(systemd,
3254 AC_HELP_STRING([--with-systemd@<:@=UNITDIR@:>@], [Include systemd support. UNITDIR is where systemd system .service files are located, default is to ask systemctl.]),
3256 if test "$withval" != "no"; then
3257 if test "$withval" = "yes"; then
3258 SYSTEMD_UNITDIR="`systemctl show | grep UnitPath | cut -d " " -f2`"
3260 SYSTEMD_UNITDIR="${withval}"
3264 platforms/systemd/Makefile \
3265 platforms/systemd/bacula.conf \
3266 platforms/systemd/bacula-dir.service \
3267 platforms/systemd/bacula-fd.service \
3268 platforms/systemd/bacula-sd.service"
3269 AC_DEFINE(HAVE_SYSTEMD, 1, [Define to 1 if systemd support should be enabled])
3271 support_systemd="yes"
3274 support_systemd="no"
3277 support_systemd="no"
3281 AC_SUBST(SYSTEMD_UNITDIR)
3285 LIBS="$PTHREAD_LIB $LIBS"
3287 AC_DEFINE_UNQUOTED(lld, "$lld")
3288 AC_DEFINE_UNQUOTED(llu, "$llu")
3295 AC_SUBST(COMPRESS_MANPAGES)
3297 dnl common parts of the Makefile
3298 MCOMMON=./autoconf/Make.common
3299 AC_SUBST_FILE(MCOMMON)
3302 if test "x${subsysdir}" = "x${sbindir}" ; then
3305 echo "You have set both --sbindir and --with-subsys-dir"
3306 echo " equal to: ${subsysdir} "
3307 echo "This is not permitted. Please reconfigure."
3309 echo "Aborting configuration ..."
3316 AC_OUTPUT([autoconf/Make.common \
3319 scripts/btraceback \
3321 scripts/baculabackupreport \
3323 scripts/bacula-ctl-dir \
3324 scripts/bacula-ctl-fd \
3325 scripts/bacula-ctl-sd \
3326 scripts/devel_bacula \
3329 scripts/mtx-changer \
3330 scripts/disk-changer \
3331 scripts/dvd-handler \
3332 scripts/dvd-simulator \
3333 scripts/logwatch/Makefile \
3334 scripts/logwatch/logfile.bacula.conf \
3335 scripts/bat.desktop \
3336 scripts/bat.desktop.xsu \
3337 scripts/bat.desktop.consolehelper \
3338 scripts/bat.console_apps \
3339 scripts/bacula-tray-monitor.desktop \
3342 src/console/Makefile \
3343 src/console/bconsole.conf \
3344 src/qt-console/bat.conf \
3345 src/qt-console/bat.pro \
3346 src/qt-console/bat.pro.mingw32 \
3347 src/qt-console/bat.pro.mingw64 \
3348 src/qt-console/install_conf_file \
3349 src/qt-console/tray-monitor/tray-monitor.conf \
3350 src/qt-console/tray-monitor/tray-monitor.pro \
3351 src/qt-console/tray-monitor/tray-monitor.pro.mingw32 \
3352 src/qt-console/tray-monitor/tray-monitor.pro.mingw64 \
3354 src/dird/bacula-dir.conf \
3356 src/stored/Makefile \
3357 src/stored/bacula-sd.conf \
3358 src/filed/Makefile \
3359 src/filed/bacula-fd.conf \
3361 src/cats/make_catalog_backup.pl \
3362 src/cats/make_catalog_backup \
3363 src/cats/delete_catalog_backup \
3364 src/cats/create_postgresql_database \
3365 src/cats/update_postgresql_tables \
3366 src/cats/make_postgresql_tables \
3367 src/cats/grant_postgresql_privileges \
3368 src/cats/drop_postgresql_tables \
3369 src/cats/drop_postgresql_database \
3370 src/cats/create_mysql_database \
3371 src/cats/update_mysql_tables \
3372 src/cats/make_mysql_tables \
3373 src/cats/grant_mysql_privileges \
3374 src/cats/drop_mysql_tables \
3375 src/cats/drop_mysql_database \
3376 src/cats/create_sqlite3_database \
3377 src/cats/update_sqlite3_tables \
3378 src/cats/make_sqlite3_tables \
3379 src/cats/grant_sqlite3_privileges \
3380 src/cats/drop_sqlite3_tables \
3381 src/cats/drop_sqlite3_database \
3384 src/cats/create_bacula_database \
3385 src/cats/update_bacula_tables \
3386 src/cats/grant_bacula_privileges \
3387 src/cats/make_bacula_tables \
3388 src/cats/drop_bacula_tables \
3389 src/cats/drop_bacula_database \
3390 src/cats/install-default-backend \
3391 src/findlib/Makefile \
3392 src/tools/Makefile \
3393 src/plugins/fd/Makefile \
3394 src/plugins/sd/Makefile \
3395 src/plugins/dir/Makefile \
3397 updatedb/update_mysql_tables \
3398 updatedb/update_sqlite3_tables \
3399 updatedb/update_postgresql_tables \
3400 updatedb/update_mysql_tables_9_to_10 \
3401 updatedb/update_sqlite3_tables_9_to_10 \
3402 updatedb/update_postgresql_tables_9_to_10 \
3403 updatedb/update_mysql_tables_10_to_11 \
3404 updatedb/update_sqlite3_tables_10_to_11 \
3405 updatedb/update_postgresql_tables_10_to_11 \
3406 updatedb/update_mysql_tables_11_to_12 \
3407 updatedb/update_sqlite3_tables_11_to_12 \
3408 updatedb/update_postgresql_tables_11_to_12 \
3409 examples/nagios/check_bacula/Makefile \
3410 platforms/rpms/redhat/bacula.spec \
3411 platforms/rpms/redhat/bacula-bat.spec \
3412 platforms/rpms/redhat/bacula-docs.spec \
3413 platforms/rpms/redhat/bacula-mtx.spec \
3414 platforms/rpms/suse/bacula.spec \
3415 platforms/rpms/suse/bacula-bat.spec \
3416 platforms/rpms/suse/bacula-docs.spec \
3417 platforms/rpms/suse/bacula-mtx.spec \
3422 if test "${support_bat}" = "yes" ; then
3423 if test "x$QMAKE" = "xnone"; then
3424 AC_MSG_ERROR([Could not find qmake $PATH. Check your Qt installation])
3428 echo "Creating bat Makefile"
3439 dnl if CC is gcc, we can rebuild the dependencies (since the depend rule
3440 dnl requires gcc). If it's not, don't rebuild dependencies
3442 if test X"$GCC" = "Xyes" ; then
3443 echo "Doing make of dependencies"
3444 ${MAKE:-make} depend
3448 chmod 755 install_conf_file build-depkgs-qt-console
3452 chmod 755 bacula btraceback mtx-changer
3453 chmod 755 dvd-handler dvd-simulator
3454 chmod 755 bconsole disk-changer devel_bacula logrotate
3458 chmod 755 $c/update_mysql_tables_10_to_11 $c/update_sqlite3_tables_10_to_11
3459 chmod 755 $c/update_postgresql_tables_10_to_11
3460 chmod 755 $c/update_mysql_tables_11_to_12 $c/update_sqlite3_tables_11_to_12
3461 chmod 755 $c/update_postgresql_tables_11_to_12
3466 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
3467 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
3469 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
3470 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
3472 chmod 755 $c/create_sqlite3_database $c/update_sqlite3_tables $c/make_sqlite3_tables
3473 chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
3475 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
3476 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
3478 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup $c/make_catalog_backup.pl
3482 chmod 755 $c/install-default-backend
3484 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
3485 largefile_support="yes"
3488 dnl Only try to find out the version number of the compiler when we know its some kind of GCC compiler
3489 if test X"$GCC" = "Xyes" ; then
3491 dnl A whole lot of hand springs to get the compiler version.
3492 dnl This is because gcc changed the output in version 3.0
3494 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
3495 if test "x${CCVERSION}" = "x" ; then
3496 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
3498 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
3499 if test x"${CXXVERSION}" = x ; then
3500 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
3504 # clean up any old junk
3511 Configuration on `date`:
3513 Host: ${host}${post_host} -- ${DISTNAME} ${DISTVER}
3514 Bacula version: ${BACULA} ${VERSION} (${DATE})
3515 Source code location: ${srcdir}
3516 Install binaries: ${sbindir}
3517 Install libraries: ${libdir}
3518 Install config files: ${sysconfdir}
3519 Scripts directory: ${scriptdir}
3520 Archive directory: ${archivedir}
3521 Working directory: ${working_dir}
3522 PID directory: ${piddir}
3523 Subsys directory: ${subsysdir}
3524 Man directory: ${mandir}
3525 Data directory: ${datarootdir}
3526 Plugin directory: ${plugindir}
3527 C Compiler: ${CC} ${CCVERSION}
3528 C++ Compiler: ${CXX} ${CXXVERSION}
3529 Compiler flags: ${WCFLAGS} ${CFLAGS}
3530 Linker flags: ${WLDFLAGS} ${LDFLAGS}
3532 Statically Linked Tools: ${support_static_tools}
3533 Statically Linked FD: ${support_static_fd}
3534 Statically Linked SD: ${support_static_sd}
3535 Statically Linked DIR: ${support_static_dir}
3536 Statically Linked CONS: ${support_static_cons}
3537 Database backends: ${db_backends}
3538 Database port: ${db_port}
3539 Database name: ${db_name}
3540 Database user: ${db_user}
3541 Database SSL options: ${db_ssl_options}
3543 Job Output Email: ${job_email}
3544 Traceback Email: ${dump_email}
3545 SMTP Host Address: ${smtp_host}
3547 Director Port: ${dir_port}
3548 File daemon Port: ${fd_port}
3549 Storage daemon Port: ${sd_port}
3551 Director User: ${dir_user}
3552 Director Group: ${dir_group}
3553 Storage Daemon User: ${sd_user}
3554 Storage DaemonGroup: ${sd_group}
3555 File Daemon User: ${fd_user}
3556 File Daemon Group: ${fd_group}
3558 Large file support: $largefile_support
3559 Bacula conio support: ${got_conio} ${CONS_LIBS}
3560 readline support: ${got_readline} ${PRTREADLINE_SRC}
3561 TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
3562 TLS support: ${support_tls}
3563 Encryption support: ${support_crypto}
3564 ZLIB support: ${have_zlib}
3565 LZO support: ${have_lzo}
3566 enable-smartalloc: ${support_smartalloc}
3567 enable-lockmgr: ${support_lockmgr}
3568 bat support: ${support_bat}
3569 client-only: ${build_client_only}
3570 build-dird: ${build_dird}
3571 build-stored: ${build_stored}
3572 Plugin support: ${have_plugins}
3573 AFS support: ${have_afs}
3574 ACL support: ${have_acl}
3575 XATTR support: ${have_xattr}
3576 systemd support: ${support_systemd} ${SYSTEMD_UNITDIR}
3577 Batch insert enabled: ${batch_insert_db_backends}
3581 # create a small shell script useful for support with
3582 # configure options and config.out info
3583 cat > scripts/bacula_config << EOF
3586 $ $0 $ac_configure_args
3588 cat config.out >> scripts/bacula_config
3589 echo __EOC__ >> scripts/bacula_config
3590 chmod 755 scripts/bacula_config