3 dnl Process this file with autoconf to produce a configure script.
12 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
13 AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
15 dnl require a recent autoconf
19 dnl search for true and false programs.
20 AC_PATH_PROGS(TRUEPRG, true, :)
21 AC_PATH_PROGS(FALSEPRG, false, :)
26 if test "x$BACULA" != x; then
27 post_host=`echo -${BACULA} | tr 'A-Z ' 'a-z-'`
29 BACULA=${BACULA-Bacula}
30 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
31 DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
32 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
37 AC_SUBST(post_host)dnl
38 echo "configuring for ${BACULA} $VERSION ($DATE)"
40 dnl -------------------------------------------------------
41 dnl Check for compiler.
42 dnl ------------------------------------------------------
46 AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
47 AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
51 if test "x$BASECC" = xgcc; then
55 AC_PATH_PROG(CXX, $CXX, $CXX)
56 if test ! -e $CXX; then
57 AC_MSG_ERROR(Unable to find C++ compiler)
60 dnl -------------------------------------------------------
61 dnl Check for programs.
62 dnl ------------------------------------------------------
64 AC_PATH_PROG(MV, mv, mv)
66 dnl If we name the variable RM it will shadow the RM variable in the configure script and we overwrite the
67 dnl value with the name of the rm command and not rm -f which is its normal content. This gives all kind
68 dnl of strange output of the configure script (like things don't exist etc.).
69 dnl So we name it REMOVE (more software has run into this problem)
70 AC_PATH_PROG(REMOVE, rm, rm)
71 AC_PATH_PROG(CP, cp, cp)
72 AC_PATH_PROG(SED, sed, sed)
73 AC_PATH_PROG(ECHO, echo, echo)
74 AC_PATH_PROG(CMP, cmp, cmp)
75 AC_PATH_PROG(TBL, tbl, tbl)
76 AC_PATH_PROG(AR, ar, ar)
77 AC_PATH_PROG(OPENSSL, openssl, none)
78 AC_PATH_PROG(MTX, mtx, mtx)
79 AC_PATH_PROG(DD, dd, dd)
80 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
81 AC_PATH_PROG(PYTHON, python, python)
82 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
83 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
84 AC_PATH_PROG(DVDRWFORMAT, dvd+rw-format, dvd+rw-format)
85 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
86 AC_PATH_PROG(QMAKE, qmake, none)
87 AC_PATH_PROG(QMAKEQT4, qmake-qt4, none)
88 AC_ARG_VAR(WXCONFIG, [wx-config command. On some systems, you must set it to wx-config-2.6 to use wxWidgets 2.6.])
89 if test "x$WXCONFIG" = x; then
92 AC_PATH_PROG(WXCONFIG, ${WXCONFIG}, ${WXCONFIG})
93 AC_ARG_VAR(WXFLAGS, [Parameters to pass to wx-config (e.g. --unicode=no).])
94 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
95 AC_PATH_PROG(PIDOF, pidof, pidof)
97 # Some AWK programs fail, so test it and warn the user
98 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
99 { if ((prog == $2) || (("(" prog ")") == $2) ||
100 (("[" prog "]") == $2) ||
101 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
103 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
104 The regex engine of $AWK is too broken to be used you
105 might want to install GNU AWK.
106 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
109 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
112 test -n "$ARFLAG" || ARFLAGS="cr"
119 AC_SUBST(LOCAL_CFLAGS)
120 AC_SUBST(LOCAL_LDFLAGS)
123 dnl --------------------------------------------------
125 dnl --------------------------------------------------
126 LT_INIT([shared disable-static])
128 AC_ARG_ENABLE(libtool,
129 AC_HELP_STRING([--enable-libtool], [enable building using GNU libtool @<:@default=yes@:>@]),
131 if test x$enableval = xno; then
137 if test x$use_libtool != xno; then
138 DEFAULT_OBJECT_TYPE=".lo"
139 DEFAULT_ARCHIVE_TYPE=".la"
140 DEFAULT_SHARED_OBJECT_TYPE=".la"
141 LIBTOOL="\$(LIBTOOL)"
142 LIBTOOL_INSTALL_TARGET="libtool-install"
143 LIBTOOL_UNINSTALL_TARGET="libtool-uninstall"
144 LIBTOOL_CLEAN_TARGET="libtool-clean"
145 QMAKE_LIBTOOL="${BUILD_DIR}/libtool"
147 DEFAULT_OBJECT_TYPE=".o"
148 DEFAULT_ARCHIVE_TYPE=".a"
149 DEFAULT_SHARED_OBJECT_TYPE=".so"
150 LIBTOOL="# \$(LIBTOOL)"
151 LIBTOOL_INSTALL_TARGET=""
152 LIBTOOL_UNINSTALL_TARGET=""
153 LIBTOOL_CLEAN_TARGET=""
154 QMAKE_LIBTOOL="# ${BUILD_DIR}/libtool"
157 AC_SUBST(DEFAULT_OBJECT_TYPE)
158 AC_SUBST(DEFAULT_ARCHIVE_TYPE)
159 AC_SUBST(DEFAULT_SHARED_OBJECT_TYPE)
161 AC_SUBST(LIBTOOL_INSTALL_TARGET)
162 AC_SUBST(LIBTOOL_UNINSTALL_TARGET)
163 AC_SUBST(LIBTOOL_CLEAN_TARGET)
164 AC_SUBST(QMAKE_LIBTOOL)
166 dnl --------------------------------------------------
167 dnl Bacula OP Sys determination (see aclocal.m4)
168 dnl --------------------------------------------------
171 dnl -----------------------------------------------------------
172 dnl Bacula OPSys Distribution determination (see aclocal.m4)
173 dnl ----------------------------------------------------------
174 BA_CHECK_OPSYS_DISTNAME
176 dnl --------------------------------------------------
177 dnl Suppport for gettext (translations)
178 dnl By default, $datarootdir is ${prefix}/share
179 dnl --------------------------------------------------
180 AM_GNU_GETTEXT([external])
181 if test x${prefix} = xNONE ; then
182 if test `eval echo ${datarootdir}` = NONE/share ; then
183 datarootdir=/usr/share
187 dnl ------------------------------------------------------------------
188 dnl If the user has not set --prefix, we set our default to nothing.
189 dnl In this case, if the user has not set --sysconfdir, we set it
190 dnl to the package default of /etc/bacula. If either --prefix or
191 dnl --sysconfdir is set, we leave sysconfdir alone except to eval it.
192 dnl ------------------------------------------------------------------
193 if test x${prefix} = xNONE ; then
194 if test `eval echo ${sysconfdir}` = NONE/etc ; then
195 sysconfdir=/etc/bacula
199 sysconfdir=`eval echo ${sysconfdir}`
200 datarootdir=`eval echo ${datarootdir}`
201 localedir=`eval echo ${datarootdir}/locale`
202 AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir")
203 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
205 dnl -------------------------------------------------------------------------
206 dnl If the user has not set --exec-prefix, we default to ${prefix}
207 dnl -------------------------------------------------------------------------
208 if test x${exec_prefix} = xNONE ; then
209 exec_prefix=${prefix}
212 dnl ------------------------------------------------------------------
213 dnl If the user has not set --sbindir, we set our default as /sbin
214 dnl ------------------------------------------------------------------
215 if test x$sbindir = x'${exec_prefix}/sbin' ; then
216 sbindir=${exec_prefix}/sbin
218 sbindir=`eval echo ${sbindir}`
220 dnl ------------------------------------------------------------------
221 dnl If the user has not set --libdir, we set our default as /lib
222 dnl ------------------------------------------------------------------
223 if test x$libdir = x'${exec_prefix}/lib' ; then
224 libdir=${exec_prefix}/lib
226 libdir=`eval echo ${libdir}`
228 dnl ------------------------------------------------------------------
229 dnl If the user has not set --includedir, we set our default as /include
230 dnl ------------------------------------------------------------------
231 if test x$includedir = x'${exec_prefix}/include' ; then
232 includedir=${exec_prefix}/include
234 includedir=`eval echo ${includedir}`
236 dnl -------------------------------------------------------------------------
237 dnl If the user has not set --mandir, we default to /usr/share/man
238 dnl -------------------------------------------------------------------------
239 if test x$mandir = x'${prefix}/man' ; then
240 mandir=/usr/share/man
243 AC_PATH_PROGS(MSGFMT, msgfmt, no)
244 if test "$MSGFMT" = "no"
246 echo 'msgfmt program not found, disabling NLS !'
248 USE_INCLUDED_LIBINTL=no
256 support_postgresql=no
258 support_smartalloc=yes
263 support_wx_console=no
268 support_static_tools=no
271 support_static_dir=no
272 support_static_cons=no
281 dnl --------------------------------------------------------------------------
282 dnl CHECKING COMMAND LINE OPTIONS
283 dnl --------------------------------------------------------------------------
285 dnl -------------------------------------------
286 dnl gnome (default off)
287 dnl -------------------------------------------
289 AC_HELP_STRING([--enable-gnome], [enable build of bgnome-console GUI @<:@default=no@:>@]),
291 if test x$enableval = xyes; then
298 if test x$support_gnome = xyes; then
299 abc=`$PKGCONFIG --exists libgnomeui-2.0`
301 if test $pkg = 0; then
302 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
303 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
304 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
305 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
306 AC_SUBST(GNOME_INCLUDEDIR)
307 AC_SUBST(GNOMEUI_LIBS)
308 AC_SUBST(GNOME_LIBDIR)
310 GNOME_DIR=src/gnome2-console
311 gnome_version="Version 2.x"
313 AC_MSG_ERROR(Unable to find Gnome 2 installation)
318 dnl -------------------------------------------
319 dnl bat (default off)
320 dnl -------------------------------------------
322 AC_HELP_STRING([--enable-bat], [enable build of bat Qt4 GUI @<:@default=no@:>@]),
324 if test x$enableval = xyes; then
325 AC_DEFINE(HAVE_BAT, 1, [Set if Bacula bat Qt4 GUI support enabled])
332 if test x$support_bat = xyes; then
333 abc=`$PKGCONFIG --atleast-version=4.2 QtGui`
335 if test $pkg = 0; then
336 BAT_DIR=src/qt-console
338 AC_MSG_ERROR(Unable to find Qt4 installation needed by bat)
343 dnl If bat is enabled, we need the qwt library
351 if test x$support_bat = xyes; then
352 AC_MSG_CHECKING(for qwt support)
354 AC_HELP_STRING([--with-qwt@<:@=DIR@:>@], [specify qwt library directory]),
361 if test -f ${with_qwt}/include/qwt.h; then
362 QWT_INC="${with_qwt}/include"
363 QWT_LDFLAGS="-L${with_qwt}/lib"
373 dnl Search in standard places, or --with-qwt not specified
375 if test $no_qwt = no; then
376 if test x$QWT_INC = x; then
377 for root in /usr /usr/local; do
378 for ver in qwt qwt5 qwt-qt4; do
379 if test -f ${root}/include/${ver}/qwt.h; then
380 QWT_INC="${root}/include/${ver}"
381 if test -d ${root}/lib64/; then
382 QWT_LDFLAGS="-L${root}/lib64"
383 elif test -d ${root}/lib/64/; then
384 QWT_LDFLAGS="-L${root}/64"
386 QWT_LDFLAGS="-L${root}/lib"
397 if test x$QWT_INC = x; then
400 AC_DEFINE(HAVE_QWT, 1, [Set if bat QWT library found])
407 AC_SUBST(QWT_LDFLAGS)
411 dnl -------------------------------------------
412 dnl bwx-console (default off)
413 dnl -------------------------------------------
414 AC_ARG_ENABLE(bwx-console,
415 AC_HELP_STRING([--enable-bwx-console], [enable build of wxWidgets console @<:@default=no@:>@]),
417 if test x$enableval = xyes; then
418 support_wx_console=yes
424 if test x$support_wx_console = xyes; then
425 abc=`$WXCONFIG $WXFLAGS --cppflags`
427 if test $pkg = 0; then
428 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
429 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
430 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
432 AC_SUBST(WXCONS_CPPFLAGS)
433 AC_SUBST(WXCONS_LDFLAGS)
434 WX_DIR=src/wx-console
437 echo "wx-config program not found. bwx-console disabled."
439 support_wx_console=no
444 dnl -------------------------------------------
445 dnl tray-monitor (default off)
446 dnl -------------------------------------------
447 AC_ARG_ENABLE(tray-monitor,
448 AC_HELP_STRING([--enable-tray-monitor], [enable build of Gnome tray monitor (compatible with KDE @<:@default=no@:>@]),
450 if test x$enableval = xyes; then
451 support_tray_monitor=yes
457 if test x$support_tray_monitor = xyes; then
458 abc=`$PKGCONFIG --exists gtk+-2.0`
460 if test $pkg = 0; then
461 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
462 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
463 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
464 AC_SUBST(TRAY_MONITOR_LDFLAGS)
465 TRAY_MONITOR_DIR=src/tray-monitor
466 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
468 if test $pkg = 0; then
469 AC_DEFINE(HAVE_GTK_2_4, 1, [Set if you have GTK 4.2 or greater loaded])
473 AC_SUBST(TRAY_MONITOR_DIR)
475 dnl -------------------------------------------
476 dnl smartalloc (default off)
477 dnl -------------------------------------------
478 AC_ARG_ENABLE(smartalloc,
479 AC_HELP_STRING([--enable-smartalloc], [enable smartalloc debugging support @<:@default=no@:>@]),
481 if test x$enableval = xno; then
482 support_smartalloc=no
487 if test x$support_smartalloc = xyes; then
488 AC_DEFINE(SMARTALLOC, 1, [Set if you want Smartalloc enabled])
491 dnl -------------------------------------------
492 dnl static-tools (default off)
493 dnl -------------------------------------------
494 AC_ARG_ENABLE(static-tools,
495 AC_HELP_STRING([--enable-static-tools], [enable static tape tools @<:@default=no@:>@]),
497 if test x$enableval = xyes; then
498 support_static_tools=yes
504 if test x$support_static_tools = xyes; then
505 TTOOL_LDFLAGS="-static"
507 AC_SUBST(TTOOL_LDFLAGS)
509 dnl -------------------------------------------
510 dnl static-fd (default off)
511 dnl -------------------------------------------
512 AC_ARG_ENABLE(static-fd,
513 AC_HELP_STRING([--enable-static-fd], [enable static File daemon @<:@default=no@:>@]),
515 if test x$enableval = xyes; then
516 support_static_fd=yes
522 if test x$support_static_fd = xyes; then
523 STATIC_FD="static-bacula-fd"
527 dnl -------------------------------------------
528 dnl static-sd (default off)
529 dnl -------------------------------------------
530 AC_ARG_ENABLE(static-sd,
531 AC_HELP_STRING([--enable-static-sd], [enable static Storage daemon @<:@default=no@:>@]),
533 if test x$enableval = xyes; then
534 support_static_sd=yes
540 if test x$support_static_sd = xyes; then
541 STATIC_SD="static-bacula-sd"
545 dnl -------------------------------------------
546 dnl static-dir (default off)
547 dnl -------------------------------------------
548 AC_ARG_ENABLE(static-dir,
549 AC_HELP_STRING([--enable-static-dir], [enable static Director @<:@default=no@:>@]),
551 if test x$enableval = xyes; then
552 support_static_dir=yes
558 if test x$support_static_dir = xyes; then
559 STATIC_DIR="static-bacula-dir"
563 dnl -------------------------------------------
564 dnl static-cons (default off)
565 dnl -------------------------------------------
566 AC_ARG_ENABLE(static-cons,
567 AC_HELP_STRING([--enable-static-cons], [enable static Console @<:@default=no@:>@]),
569 if test x$enableval = xyes; then
570 support_static_cons=yes
578 if test x$support_static_cons = xyes; then
579 STATIC_CONS="static-bconsole"
580 STATIC_GNOME_CONS="static-bgnome-console"
581 STATIC_WX_CONS="static-bwx-console"
583 AC_SUBST(STATIC_CONS)
584 AC_SUBST(STATIC_GNOME_CONS)
585 AC_SUBST(STATIC_WX_CONS)
587 dnl -------------------------------------------
588 dnl client_only (default off)
589 dnl -------------------------------------------
590 AC_ARG_ENABLE(client-only,
591 AC_HELP_STRING([--enable-client-only], [build client (File daemon) only @<:@default=no@:>@]),
593 if test x$enableval = xyes; then
594 build_client_only=yes
600 if test x$build_client_only = xno; then
607 dnl -------------------------------------------
608 dnl director (default on)
609 dnl -------------------------------------------
610 AC_ARG_ENABLE(build-dird,
611 AC_HELP_STRING([--enable-build-dird], [enable building of dird (Director) @<:@default=yes@:>@]),
613 if test x$enableval = xno; then
618 if test x$build_dird = xyes; then
623 DIR_TOOLS="NODIRTOOLS"
628 dnl -------------------------------------------
629 dnl stored (default on)
630 dnl -------------------------------------------
631 AC_ARG_ENABLE(build-stored,
632 AC_HELP_STRING([--enable-build-stored], [enable building of stored (Storage daemon) @<:@default=yes@:>@]),
634 if test x$enableval = xno; then
639 if test x$build_stored = xyes; then
640 STORED_DIR="src/stored"
646 dnl ---------------------------------------------------
647 dnl Check for conio (Bacula readline substitute)(
648 dnl ---------------------------------------------------
649 dnl this allows you to turn it completely off
651 AC_HELP_STRING([--disable-conio], [disable conio support @<:@default=no@:>@]),
653 if test x$enableval = xno; then
660 dnl ---------------------------------------------------
661 dnl Check for IPv6 support
662 dnl ---------------------------------------------------
663 dnl this allows you to turn it completely off
666 AC_HELP_STRING([--enable-ipv6], [enable ipv6 support @<:@default=yes@:>@]),
668 if test x$enableval = xno; then
674 if test x$support_ipv6 = xyes; then
675 AC_TRY_LINK([ #include <sys/types.h>
676 #include <sys/socket.h>
677 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;],
678 [support_ipv6=yes], [support_ipv6=no])
681 if test x$support_ipv6 = xyes; then
682 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
686 if test x$support_conio = xyes; then
687 AC_CHECK_HEADER(termcap.h,
688 [ AC_CHECK_LIB(termcap, tgetent,
689 [ CONS_LIBS="-ltermcap"
694 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
696 [ AC_CHECK_LIB(ncurses, tgetent,
697 [ CONS_LIBS="-lncurses"
702 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
707 AC_CHECK_HEADERS(curses.h)
708 AC_CHECK_HEADER(term.h,
709 [ AC_CHECK_LIB(curses, tgetent,
710 [ CONS_LIBS="-lcurses"
715 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
718 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
727 dnl ---------------------------------------------------
728 dnl Check for readline support/directory (default off)
729 dnl ---------------------------------------------------
730 dnl this allows you to turn it completely off
731 AC_ARG_ENABLE(readline,
732 AC_HELP_STRING([--disable-readline], [disable readline support @<:@default=yes@:>@]),
734 if test x$enableval = xno; then
742 if test x$support_readline = xyes; then
743 AC_ARG_WITH(readline,
744 AC_HELP_STRING([--with-readline@<:@=DIR@:>@], [specify readline library directory]),
746 case "$with_readline" in
751 if test -f ${with_readline}/readline.h; then
752 CONS_INC="-I${with_readline}"
753 CONS_LDFLAGS="-L$with_readline"
754 elif test -f ${with_readline}/include/readline/readline.h; then
755 CONS_INC="-I${with_readline}/include/readline"
756 CONS_LDFLAGS="-L${with_readline}/lib"
757 with_readline="${with_readline}/include/readline"
759 with_readline="/usr/include/readline"
762 AC_CHECK_HEADER(${with_readline}/readline.h,
764 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
765 CONS_LIBS="-lreadline -lhistory -ltermcap"
769 echo "readline.h not found. readline turned off ..."
776 dnl check for standard readline library
777 AC_CHECK_HEADER(/usr/include/readline/readline.h,
779 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
781 CONS_INC="-I/usr/include/readline"
782 CONS_LIBS="-lreadline -ltermcap"
784 dnl Did not find standard library, so try Bacula's default
785 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
787 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
789 CONS_INC="-I${TOP_DIR}/depkgs/readline"
790 CONS_LIBS="-lreadline -lhistory -ltermcap"
791 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
792 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
795 echo "readline.h not found. readline turned off ..."
809 AC_SUBST(CONS_LDFLAGS)
810 AC_SUBST(READLINE_SRC)
812 dnl Minimal stuff for readline Makefile configuration
817 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr lstat lchown)
818 AC_CHECK_FUNCS(nanosleep nl_langinfo)
819 AC_CHECK_HEADERS(varargs.h)
821 dnl End of readline/conio stuff
822 dnl -----------------------------------------------------------------------
824 dnl -----------------------------------------------------------------------
825 dnl Check for Python support
827 AC_MSG_CHECKING(for Python support)
829 AC_HELP_STRING([--with-python@<:@=DIR@:>@], [Include Python support. DIR is the Python base install directory, default is to search through a number of common places for the Python files.]),
833 if test "$withval" != "no"; then
834 if test "$withval" = "yes"; then
835 for python_root in /usr /usr/local /usr/sfw; do
836 for ver in python2.2 python2.3 python2.4 python2.5; do
837 if test -f $python_root/include/${ver}/Python.h; then
838 PYTHON_INCDIR=-I$python_root/include/${ver}
839 if test -d $python_root/lib64/${ver}/config; then
840 PYTHON_LIBS="-L$python_root/lib64/${ver}/config -l${ver}"
842 PYTHON_LIBS="-L$python_root/lib/${ver}/config -l${ver}"
849 if test x$PYTHON_INCDIR = x; then
850 if test -f $prefix/include/Python.h; then
851 PYTHON_INCDIR=-I$prefix/include
852 if test -d $prefix/lib64/config; then
853 PYTHON_LIBS="-L$prefix/lib64/config -lpython"
855 PYTHON_LIBS="-L$prefix/lib/config -lpython"
859 AC_MSG_ERROR(Unable to find Python.h in standard locations)
863 if test -f $withval/Python.h; then
864 PYTHON_INCDIR=-I$withval
865 PYTHON_LIBS="-L$withval/config -lpython"
866 elif test -f $withval/include/Python.h; then
867 PYTHON_INCDIR=-I$withval/include
868 if test -d $withval/lib64/config; then
869 PYTHON_LIBS="-L$withval/lib64/config -lpython"
871 PYTHON_LIBS="-L$withval/lib/config -lpython"
873 elif test -f $withval/include/python/Python.h; then
874 PYTHON_INCDIR=-I$withval/include/python
875 if test -d $withval/lib64/python/config; then
876 PYTHON_LIBS="-L$withval/lib64/python/config -lpython"
878 PYTHON_LIBS="-L$withval/lib/python/config -lpython"
882 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
886 AC_DEFINE([HAVE_PYTHON], 1)
889 AC_MSG_NOTICE(checking for more Python libs)
890 saved_LIBS="$LIBS"; LIBS=
891 AC_SEARCH_LIBS(shm_open, [rt])
892 AC_CHECK_LIB(util, openpty)
893 PYTHON_LIBS="$PYTHON_LIBS $LIBS"
902 AC_SUBST(PYTHON_LIBS)
903 AC_SUBST(PYTHON_INCDIR)
906 dnl Find where sockets are (especially for Solaris)
907 dnl Do this before the TCP Wrappers test since tcp wrappers
908 dnl uses the socket library and some linkers are stupid.
910 AC_CHECK_FUNC(socket,
911 AC_MSG_RESULT(using libc's socket),
912 AC_CHECK_LIB(xnet,socket)
913 AC_CHECK_LIB(socket,socket)
914 AC_CHECK_LIB(inet,socket))
916 dnl -----------------------------------------------------------
917 dnl Check whether user wants TCP wrappers support (default off)
918 dnl -----------------------------------------------------------
921 AC_ARG_WITH(tcp-wrappers,
922 AC_HELP_STRING([--with-tcp-wrappers@<:@=DIR@:>@], [enable tcpwrappers support]),
924 if test "x$withval" != "xno" ; then
926 LIBS="$saved_LIBS -lwrap"
927 AC_MSG_CHECKING(for libwrap)
928 AC_SEARCH_LIBS(nanosleep, [rt])
931 #include <sys/types.h>
933 int deny_severity = 0;
934 int allow_severity = 0;
935 struct request_info *req;
940 AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
945 LIBS="$saved_LIBS -lwrap -lnsl"
946 WRAPLIBS="$saved_LIBS -lwrap -lnsl"
949 #include <sys/types.h>
951 int deny_severity = 0;
952 int allow_severity = 0;
953 struct request_info *req;
958 AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
963 AC_MSG_ERROR([*** libwrap missing])
972 dnl -----------------------------------------------------------
973 dnl Check whether OpenSSL is available
974 dnl -----------------------------------------------------------
975 AC_MSG_CHECKING([for OpenSSL])
976 dnl The following uses quadrigraphs:
980 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
982 with_openssl_directory=${withval}
986 if test "x$with_openssl_directory" != "xno"; then
987 OPENSSL_LIBS="-lssl -lcrypto"
990 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
992 # Make sure the $with_openssl_directory also makes sense
994 if test -d "$with_openssl_directory/lib" -a -d "$with_openssl_directory/include"; then
995 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
996 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
1000 saved_LIBS="${LIBS}"
1001 saved_CFLAGS="${CFLAGS}"
1002 LIBS="${saved_LIBS} ${OPENSSL_LIBS}"
1003 CFLAGS="${saved_CFLAGS} ${OPENSSL_INC}"
1007 #include <openssl/ssl.h>
1009 CRYPTO_set_id_callback(NULL);
1012 support_crypto="yes"
1020 #include <openssl/evp.h>
1024 ac_cv_openssl_sha2="yes"
1026 ac_cv_openssl_sha2="no"
1030 dnl Solaris disables greater than 128+ bit encryption in their OpenSSL
1031 dnl implementation, presumably for export reasons. If 192bit AES
1032 dnl is available, we assume that we're running with a 'non-export'
1033 dnl openssl library.
1036 #include <openssl/evp.h>
1040 ac_cv_openssl_export="no"
1042 ac_cv_openssl_export="yes"
1046 LIBS="${saved_LIBS}"
1047 CFLAGS="${saved_CFLAGS}"
1049 if test "$support_tls" = "yes"; then
1050 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
1051 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
1052 AC_DEFINE(HAVE_CRYPTO, 1, [Define if encryption support should be enabled])
1055 if test "$ac_cv_openssl_sha2" = "yes"; then
1056 AC_DEFINE(HAVE_SHA2, 1, [Define if the SHA-2 family of digest algorithms is available])
1059 if test "$ac_cv_openssl_export" = "yes"; then
1060 AC_DEFINE(HAVE_OPENSSL_EXPORT_LIBRARY, 1, [Define if the OpenSSL library is export-contrained to 128bit ciphers])
1069 AC_MSG_RESULT([$support_tls])
1070 AC_SUBST(OPENSSL_LIBS)
1071 AC_SUBST(OPENSSL_INC)
1073 dnl -----------------------------------------------------------
1074 dnl dlopen is needed for plugins
1075 dnl -----------------------------------------------------------
1076 AC_SEARCH_LIBS(dlopen, [dl])
1078 dnl ------------------------------------------
1079 dnl Where to place working dir
1080 dnl ------------------------------------------
1081 working_dir=`eval echo ${prefix}/var/bacula/working`
1082 AC_ARG_WITH(working-dir,
1083 AC_HELP_STRING([--with-working-dir=PATH], [specify path of Bacula working directory]),
1085 if test "x$withval" != "xno" ; then
1086 working_dir=$withval
1091 AC_SUBST(working_dir)
1093 dnl ------------------------------------------------------------------
1094 dnl If the user has not set archivedir, we set our default as /tmp
1095 dnl ------------------------------------------------------------------
1097 AC_ARG_WITH(archivedir,
1098 AC_HELP_STRING([--with-archivedir=PATH], [specify path of SD archive directory]),
1100 if test "x$withval" != "xno" ; then
1106 AC_SUBST(archivedir)
1108 dnl ------------------------------------------
1109 dnl Where to place scriptdir (script files)
1110 dnl ------------------------------------------
1111 scriptdir=`eval echo ${sysconfdir}`
1112 AC_ARG_WITH(scriptdir,
1113 AC_HELP_STRING([--with-scriptdir=PATH], [specify path of Bacula scripts directory]),
1115 if test "x$withval" != "xno" ; then
1123 # ------------------------------------------
1124 # Where to place plugindir (script files)
1125 # ------------------------------------------
1126 plugindir=`eval echo ${sysconfdir}`
1127 AC_ARG_WITH(plugindir,
1128 AC_HELP_STRING([--with-plugindir=PATH], [specify path of Bacula plugins directory]),
1130 if test "x$withval" != "xno" ; then
1138 dnl ------------------------------------------
1139 dnl Where to send dump email
1140 dnl ------------------------------------------
1141 dump_email=root@localhost
1142 AC_ARG_WITH(dump-email,
1143 AC_HELP_STRING([--with-dump-email=EMAIL], [dump email address]),
1145 if test "x$withval" != "xno" ; then
1151 AC_SUBST(dump_email)
1153 dnl ------------------------------------------
1154 dnl Where to send job email
1155 dnl ------------------------------------------
1156 job_email=root@localhost
1157 AC_ARG_WITH(job-email,
1158 AC_HELP_STRING([--with-job-email=EMAIL], [job output email address]),
1160 if test "x$withval" != "xno" ; then
1168 dnl ------------------------------------------
1169 dnl Where to find smtp host
1170 dnl ------------------------------------------
1172 AC_ARG_WITH(smtp_host,
1173 AC_HELP_STRING([--with-smtp-host=HOST], [SMTP mail host address]),
1175 if test "x$withval" != "xno" ; then
1183 dnl ------------------------------------
1184 dnl Where to place pid files
1185 dnl ------------------------------------
1187 AC_ARG_WITH(pid-dir,
1188 AC_HELP_STRING([--with-pid-dir=PATH], [specify location of Bacula pid files]),
1190 if test "x$withval" != "xno" ; then
1196 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
1199 dnl ------------------------------------
1200 dnl Where to place subsys "lock file"
1201 dnl ------------------------------------
1202 subsysdir=/var/run/subsys
1203 if test -d /var/run/subsys; then
1204 subsysdir=/var/run/subsys
1205 elif test -d /var/lock/subsys; then
1206 subsysdir=/var/lock/subsys
1208 subsysdir=/var/run/subsys
1210 AC_ARG_WITH(subsys-dir,
1211 AC_HELP_STRING([--with-subsys-dir=PATH], [specify location of Bacula subsys file]),
1213 if test "x$withval" != "xno" ; then
1221 dnl ------------------------------------
1222 dnl Where to start assigning ports
1223 dnl ------------------------------------
1225 AC_ARG_WITH(baseport,
1226 AC_HELP_STRING([--with-baseport=PORT], [specify base port address for daemons]),
1228 if test "x$withval" != "xno" ; then
1235 dir_port=`expr $baseport`
1236 fd_port=`expr $baseport + 1`
1237 sd_port=`expr $fd_port + 1`
1243 dnl ------------------------------------------
1244 dnl Generate passwords
1245 dnl ------------------------------------------
1247 AC_ARG_WITH(dir-password,
1248 AC_HELP_STRING([--with-dir-password=PASSWORD], [specify Director's password]),
1250 if test "x$withval" != "xno" ; then
1251 dir_password=$withval
1256 if test "x$dir_password" = "x" ; then
1257 if test "x$OPENSSL" = "xnone" ; then
1258 key=`autoconf/randpass 33`
1260 key=`openssl rand -base64 33`
1266 AC_ARG_WITH(fd-password,
1267 AC_HELP_STRING([--with-fd-password=PASSWORD], [specify Client's password]),
1269 if test "x$withval" != "xno" ; then
1270 fd_password=$withval
1275 if test "x$fd_password" = "x" ; then
1276 if test "x$OPENSSL" = "xnone" ; then
1277 key=`autoconf/randpass 37`
1279 key=`openssl rand -base64 33`
1285 AC_ARG_WITH(sd-password,
1286 AC_HELP_STRING([--with-sd-password=PASSWORD], [specify Storage daemon's password]),
1288 if test "x$withval" != "xno" ; then
1289 sd_password=$withval
1294 if test "x$sd_password" = "x" ; then
1295 if test "x$OPENSSL" = "xnone" ; then
1296 key=`autoconf/randpass 41`
1298 key=`openssl rand -base64 33`
1304 AC_ARG_WITH(mon-dir-password,
1305 AC_HELP_STRING([--with-mon-dir-password=PASSWORD], [specify Director's password used by the monitor]),
1307 if test "x$withval" != "xno" ; then
1308 mon_dir_password=$withval
1313 if test "x$mon_dir_password" = "x" ; then
1314 if test "x$OPENSSL" = "xnone" ; then
1315 key=`autoconf/randpass 33`
1317 key=`openssl rand -base64 33`
1319 mon_dir_password=$key
1323 AC_ARG_WITH(mon-fd-password,
1324 AC_HELP_STRING([--with-mon-fd-password=PASSWORD], [specify Client's password used by the monitor]),
1326 if test "x$withval" != "xno" ; then
1327 mon_fd_password=$withval
1332 if test "x$mon_fd_password" = "x" ; then
1333 if test "x$OPENSSL" = "xnone" ; then
1334 key=`autoconf/randpass 37`
1336 key=`openssl rand -base64 33`
1338 mon_fd_password=$key
1342 AC_ARG_WITH(mon-sd-password,
1343 AC_HELP_STRING([--with-mon-sd-password=PASSWORD], [specify Storage daemon's password used by the monitor]),
1345 if test "x$withval" != "xno" ; then
1346 mon_sd_password=$withval
1351 if test "x$mon_sd_password" = "x" ; then
1352 if test "x$OPENSSL" = "xnone" ; then
1353 key=`autoconf/randpass 41`
1355 key=`openssl rand -base64 33`
1357 mon_sd_password=$key
1360 AC_SUBST(dir_password)
1361 AC_SUBST(fd_password)
1362 AC_SUBST(sd_password)
1363 AC_SUBST(mon_dir_password)
1364 AC_SUBST(mon_fd_password)
1365 AC_SUBST(mon_sd_password)
1368 dnl Pickup any database name
1371 AC_ARG_WITH(db_name,
1372 AC_HELP_STRING([--with-db-name=DBNAME], [specify database name @<:@default=bacula@:>@]),
1374 if test "x$withval" != "x" ; then
1382 AC_ARG_WITH(db_user,
1383 AC_HELP_STRING([--with-db-user=UNAME], [specify database user @<:@default=bacula@:>@]),
1385 if test "x$withval" != "x" ; then
1393 AC_ARG_WITH(db_password,
1394 AC_HELP_STRING([--with-db-password=PWD], [specify database password @<:@default=*none*@:>@]),
1396 if test "x$withval" != "x" ; then
1397 db_password=$withval
1401 AC_SUBST(db_password)
1404 dnl Pickup a database port
1407 AC_ARG_WITH(db_port,
1408 AC_HELP_STRING([--with-db-port=DBPORT], [specify a database port @<:@default=null@:>@]),
1410 if test "x$withval" != "x" ; then
1418 # Handle users and groups for each daemon
1421 AC_ARG_WITH(dir_user,
1422 AC_HELP_STRING([--with-dir-user=USER], [specify user for Director daemon]),
1424 if test "x$withval" != "x" ; then
1431 AC_ARG_WITH(dir_group,
1432 AC_HELP_STRING([--with-dir-group=GROUP], [specify group for Director daemon]),
1434 if test "x$withval" != "x" ; then
1441 AC_ARG_WITH(sd_user,
1442 AC_HELP_STRING([--with-sd-user=USER], [specify user for Storage daemon]),
1444 if test "x$withval" != "x" ; then
1451 AC_ARG_WITH(sd_group,
1452 AC_HELP_STRING([--with-sd-group=GROUP], [specify group for Storage daemon]),
1454 if test "x$withval" != "x" ; then
1461 AC_ARG_WITH(fd_user,
1462 AC_HELP_STRING([--with-fd-user=USER], [specify user for File daemon]),
1464 if test "x$withval" != "x" ; then
1471 AC_ARG_WITH(fd_group,
1472 AC_HELP_STRING([--with-fd-group=GROUP], [specify group for File daemon]),
1474 if test "x$withval" != "x" ; then
1488 dnl allow setting default executable permissions
1491 AC_ARG_WITH(sbin-perm,
1492 AC_HELP_STRING([--with-sbin-perm=MODE], [specify permissions for sbin binaries @<:@default=0754@:>@]),
1494 if test "x$withval" != "x" ; then
1502 dnl ------------------------------------------------
1503 dnl Bacula check for various SQL database engines
1504 dnl ------------------------------------------------
1506 BA_CHECK_POSTGRESQL_DB
1521 dnl -------------------------------------------
1522 dnl enable batch attribute DB insert (default on)
1523 dnl -------------------------------------------
1524 support_batch_insert=no
1525 A=`test -f $SQL_LIB && nm $SQL_LIB | grep pthread_mutex_lock`
1527 if test $pkg = 0; then
1528 support_batch_insert=yes
1529 AC_ARG_ENABLE(batch-insert,
1530 AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]),
1532 if test x$enableval = xno; then
1533 support_batch_insert=no
1535 support_batch_insert=yes
1541 dnl Check if postgresql support batch mode
1542 if test x$DB_TYPE = xpostgresql; then
1543 A=`test -f $SQL_LIB && nm $SQL_LIB | grep PQputCopyData`
1545 if test $pkg != 0; then
1546 support_batch_insert=no
1550 if test x$DB_TYPE = xdbi; then
1554 dnl Check for batch insert
1555 if test $DB_PROG = postgresql; then
1556 A=`test -f $SQL_LIB && nm $SQL_LIB | grep PQputCopyData`
1560 if test $DB_PROG = mysql; then
1561 A=`test -f $SQL_LIB && nm $DB_PROG_LIB | grep pthread_mutex_lock`
1565 if test $DB_PROG = sqlite3; then
1566 A=`test -f $SQL_LIB && nm $DB_PROG_LIB | grep pthread_mutex_lock`
1570 if test $pkg = 0; then
1571 AC_ARG_ENABLE(batch-insert,
1572 AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]),
1574 if test x$enableval = xno; then
1575 support_batch_insert=no
1577 support_batch_insert=yes
1583 dnl If dbi was not chosen, let the comment in file
1587 AC_SUBST(uncomment_dbi)
1589 if test $support_batch_insert = yes ; then
1590 AC_DEFINE(HAVE_BATCH_FILE_INSERT, 1, [Set if DB batch insert code enabled])
1593 AC_DEFINE(PROTOTYPES)
1595 dnl --------------------------------------------------------------------------
1596 dnl Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1598 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1599 if test -z "$CCOPTS"; then
1600 CCOPTS='-g -O2 -Wall'
1608 dnl See if we can use 64 bit file addresses
1609 largefile_support="no"
1614 dnl --------------------------------------------------------------------------
1615 dnl CHECKING FOR HEADER FILES
1616 dnl --------------------------------------------------------------------------
1655 AC_STRUCT_ST_BLKSIZE
1659 dnl --------------------------------------------------------------------------
1660 dnl Check for utime.h structure
1661 dnl --------------------------------------------------------------------------
1662 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1666 #include <sys/types.h>
1671 ba_cv_header_utime_h=yes
1673 ba_cv_header_utime_h=no
1678 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H, 1, [Set if utime.h exists])
1680 dnl --------------------------------------------------------------------------
1681 dnl Check for socklen_t
1682 dnl --------------------------------------------------------------------------
1683 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1687 #include <sys/types.h>
1688 #include <sys/socket.h>
1692 ba_cv_header_socklen_t=yes
1694 ba_cv_header_socklen_t=no
1699 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1701 dnl --------------------------------------------------------------------------
1702 dnl Check for bigendian
1703 dnl --------------------------------------------------------------------------
1704 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1708 main(){long a=1L; char *p=(char *)&a; exit(*p);}
1719 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1721 dnl --------------------------------------------------------------------------
1722 dnl Check for typeof()
1723 dnl --------------------------------------------------------------------------
1725 AC_CACHE_CHECK(for typeof, ba_cv_have_typeof,
1729 main(){char *a = 0; a = (typeof a)a;}
1731 ba_cv_have_typeof=yes
1733 ba_cv_have_typeof=no
1735 ba_cv_have_typeof=no
1740 test $ba_cv_have_typeof = yes && AC_DEFINE([HAVE_TYPEOF], 1, [Defind to 1 if compiler has typeof])
1745 dnl --------------------------------------------------------------------------
1746 dnl CHECKING FOR FILESYSTEM TYPE
1747 dnl --------------------------------------------------------------------------
1748 AC_MSG_CHECKING(how to get filesystem type)
1750 # The order of these tests is important.
1753 #include <sys/statvfs.h>
1754 #include <sys/fstyp.h>
1756 AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4
1758 if test $fstype = no; then
1761 #include <sys/statfs.h>
1762 #include <sys/fstyp.h>
1764 AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3
1767 if test $fstype = no; then
1770 #include <sys/statfs.h>
1771 #include <sys/vmount.h>
1773 AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX
1776 if test $fstype = no; then
1781 AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD
1784 if test $fstype = no; then
1785 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1787 if test $fstype = no; then
1790 #include <sys/mount.h>
1791 #include <sys/fs_types.h>
1793 AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix
1796 AC_MSG_RESULT($fstype)
1798 AC_CHECK_HEADER(sys/statvfs.h, [ AC_DEFINE(HAVE_SYS_STATVFS_H,1,[Defines if your system have the sys/statvfs.h header file])] , )
1800 dnl --------------------------------------------------------------------------
1801 dnl CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1802 dnl --------------------------------------------------------------------------
1810 AC_CHECK_TYPE(ino_t, unsigned long)
1811 AC_CHECK_TYPE(dev_t, unsigned long)
1812 AC_CHECK_TYPE(daddr_t, long)
1813 AC_CHECK_TYPE(major_t, int)
1814 AC_CHECK_TYPE(minor_t, int)
1815 AC_CHECK_TYPE(ssize_t, int)
1821 AC_CHECK_SIZEOF(char, 1)
1822 AC_CHECK_SIZEOF(short int, 2)
1823 AC_CHECK_SIZEOF(int, 4)
1824 AC_CHECK_SIZEOF(long int, 4)
1825 AC_CHECK_SIZEOF(long long int, 8)
1826 AC_CHECK_SIZEOF(int *, 4)
1828 dnl Check for sys/types.h types
1829 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int,
1833 #include <sys/types.h>
1837 ac_cv_have_u_int="yes"
1839 ac_cv_have_u_int="no"
1844 if test "x$ac_cv_have_u_int" = "xyes" ; then
1845 AC_DEFINE(HAVE_U_INT)
1849 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t,
1853 #include <sys/types.h>
1857 ac_cv_have_intmax_t="yes"
1865 ac_cv_have_intmax_t="yes"
1867 ac_cv_have_intmax_t="no"
1874 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1875 AC_DEFINE(HAVE_INTMAX_T)
1879 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t,
1883 #include <sys/types.h>
1885 u_intmax_t a; a = 1;
1887 ac_cv_have_u_intmax_t="yes"
1893 u_intmax_t a; a = 1;
1895 ac_cv_have_u_intmax_t="yes"
1897 ac_cv_have_u_intmax_t="no"
1904 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1905 AC_DEFINE(HAVE_U_INTMAX_T)
1909 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t,
1913 #include <sys/types.h>
1915 int8_t a; int16_t b; int32_t c; a = b = c = 1;
1917 ac_cv_have_intxx_t="yes"
1919 ac_cv_have_intxx_t="no"
1924 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1925 AC_DEFINE(HAVE_INTXX_T)
1929 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t,
1933 #include <sys/types.h>
1937 ac_cv_have_int64_t="yes"
1939 ac_cv_have_int64_t="no"
1944 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1945 AC_DEFINE(HAVE_INT64_T)
1949 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t,
1953 #include <sys/types.h>
1955 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
1957 ac_cv_have_u_intxx_t="yes"
1959 ac_cv_have_u_intxx_t="no"
1964 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1965 AC_DEFINE(HAVE_U_INTXX_T)
1969 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t,
1973 #include <sys/types.h>
1977 ac_cv_have_u_int64_t="yes"
1979 ac_cv_have_u_int64_t="no"
1984 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1985 AC_DEFINE(HAVE_U_INT64_T)
1989 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1990 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1992 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1995 #include <sys/bitypes.h>
1997 int8_t a; int16_t b; int32_t c;
1998 u_int8_t e; u_int16_t f; u_int32_t g;
1999 a = b = c = e = f = g = 1;
2001 AC_DEFINE(HAVE_U_INTXX_T)
2002 AC_DEFINE(HAVE_INTXX_T)
2003 AC_DEFINE(HAVE_SYS_BITYPES_H)
2011 if test -z "$have_u_intxx_t" ; then
2012 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t,
2016 #include <sys/types.h>
2018 uint8_t a; uint16_t b;
2019 uint32_t c; a = b = c = 1;
2021 ac_cv_have_uintxx_t="yes"
2023 ac_cv_have_uintxx_t="no"
2028 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
2029 AC_DEFINE(HAVE_UINTXX_T)
2033 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
2034 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2036 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
2039 #include <sys/bitypes.h>
2041 int64_t a; u_int64_t b;
2044 AC_DEFINE(HAVE_U_INT64_T)
2045 AC_DEFINE(HAVE_INT64_T)
2053 if (test -z "$have_uintxx_t" && \
2054 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2056 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
2059 #include <sys/bitypes.h>
2061 uint8_t a; uint16_t b;
2062 uint32_t c; a = b = c = 1;
2064 AC_DEFINE(HAVE_UINTXX_T)
2072 dnl --------------------------------------------------------------------------
2073 dnl CHECKING FOR REQUIRED LIBRARY FUNCTIONS
2074 dnl --------------------------------------------------------------------------
2090 [echo 'configure: cannot find needed function.'; exit 1]
2093 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
2094 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
2095 AC_CHECK_FUNCS(posix_fadvise)
2096 AC_CHECK_FUNCS(fdatasync)
2098 AC_CHECK_FUNCS(chflags)
2100 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
2102 AC_CACHE_CHECK(for va_copy, ba_cv_va_copy,
2107 void use_va_copy(va_list args){va_list args2; va_copy(args2,args); va_end(args2);}
2108 void call_use_va_copy(int junk,...){va_list args; va_start(args,junk); use_va_copy(args); va_end(args);}
2110 call_use_va_copy(1,2,3)
2119 test $ba_cv_va_copy = yes && AC_DEFINE(HAVE_VA_COPY, 1, [Set if va_copy exists])
2121 dnl --------------------------------------------------------------------------
2122 dnl CHECKING FOR THREAD SAFE FUNCTIONS
2123 dnl --------------------------------------------------------------------------
2124 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
2126 # If resolver functions are not in libc check for -lnsl or -lresolv.
2127 AC_CHECK_FUNC(gethostbyname_r,
2128 AC_MSG_RESULT(using libc's resolver),
2129 AC_CHECK_LIB(nsl,gethostbyname_r)
2130 AC_CHECK_LIB(resolv,gethostbyname_r))
2132 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
2133 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
2134 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
2136 dnl ----------------------------
2137 dnl check sa_len of sockaddr
2138 dnl ----------------------------
2139 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
2143 #include <sys/socket.h>
2145 struct sockaddr s; s.sa_len;
2147 ac_cv_struct_sockaddr_sa_len=yes
2148 ], [ac_cv_struct_sockaddr_sa_len=no
2154 if test $ac_cv_struct_sockaddr_sa_len = yes; then
2155 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
2162 AC_FUNC_CLOSEDIR_VOID
2163 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
2164 # AC_FUNC_FNMATCH dnl use local version
2166 AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
2168 AC_CHECK_LIB(sun, getpwnam)
2170 AC_CHECK_HEADERS(zlib.h)
2171 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
2173 if test x$FDLIBS = x-lz; then
2174 AC_DEFINE(HAVE_LIBZ)
2179 dnl Check for ACL libraries
2182 AC_CHECK_HEADER(sys/acl.h)
2183 AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
2185 AC_CHECK_LIB(acl, acl_get_file,
2188 FDLIBS="-lacl $FDLIBS"
2190 AC_CHECK_LIB(sec, acltotext,
2193 FDLIBS="-lsec $FDLIBS"
2200 if test $have_acl = yes; then
2204 dnl Check for pthread libraries
2206 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
2208 AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
2210 AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
2212 AC_CHECK_FUNC(pthread_create)
2225 if test x$have_gcc = xyes ; then
2226 CPPFLAGS="$CPPFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
2227 CFLAGS="$CFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
2229 LDFLAGS=${LDFLAGS--O}
2230 DB_LIBS="${SQL_LFLAGS}"
2231 CPPFLAGS="$CPPFLAGS"
2244 AC_SUBST(X_EXTRA_LIBS)
2249 dnl extra configurable objects
2260 dnl Finally we set appropriate distribution specific
2261 dnl variables and defaults
2263 dnl PFILES are platform specific files
2264 PFILES="platforms/Makefile"
2268 hostname=`uname -n | cut -d '.' -f 1`
2269 if test x${hostname} = x ; then
2270 hostname="localhost"
2275 PSCMD="ps -e -o pid,comm"
2277 platforms/aix/Makefile"
2278 TAPEDRIVE="/dev/rmt0.1"
2282 PTHREAD_LIB="-lpthread -lexc"
2283 if test "${CC}" = "gcc" ; then
2290 TAPEDRIVE="/dev/nrmt0"
2293 DISTVER=`uname -a |awk '{print $3}'`
2294 TAPEDRIVE="/dev/nrmt0"
2295 PTHREAD_LIB="-pthread"
2296 CFLAGS="${CFLAGS} -pthread"
2297 PSCMD="ps -ax -o pid,command"
2301 platforms/bsdi/Makefile \
2302 platforms/bsdi/bacula-fd \
2303 platforms/bsdi/bacula-sd \
2304 platforms/bsdi/bacula-dir"
2305 largefile_support="yes"
2308 DISTVER=`uname -a |awk '{print $3}'`
2309 TAPEDRIVE="/dev/nrst0"
2312 WLDFLAGS="-mwindows"
2316 TAPEDRIVE="/dev/nst0"
2317 PSCMD="ps -e -o pid,command"
2320 platforms/darwin/Makefile"
2323 dnl Make sure hostname is resolved
2324 ping -c 1 $hostname 2>&1 1>/dev/null
2325 if test ! $? = 0; then
2326 hostname="localhost"
2328 if `test -f /etc/apt/sources.list && grep -q ubuntu /etc/apt/sources.list`; then
2331 DISTVER=`cat /etc/debian_version`
2332 if test -f /etc/lsb-release ; then
2334 if test "x$DISTRIB_ID" != "x" ; then
2335 DISTNAME=$DISTRIB_ID
2337 if test "x$DISTRIB_RELEASE" != "x" ; then
2338 DISTVER=$DISTRIB_RELEASE
2341 if test "$DISTNAME" = "Ubuntu" ; then
2344 TAPEDRIVE="/dev/nst0"
2345 PSCMD="ps -e -o pid,command"
2346 if test "$DISTNAME" = "ubuntu" ; then
2348 platforms/ubuntu/Makefile \
2349 platforms/ubuntu/bacula-fd \
2350 platforms/ubuntu/bacula-sd \
2351 platforms/ubuntu/bacula-dir"
2354 platforms/debian/Makefile \
2355 platforms/debian/bacula-fd \
2356 platforms/debian/bacula-sd \
2357 platforms/debian/bacula-dir"
2361 dnl Make sure hostname is resolved
2362 ping -c 1 $hostname 2>&1 1>/dev/null
2363 if test ! $? = 0; then
2364 hostname="localhost"
2366 DISTVER=`uname -a |awk '{print $3}'`
2367 VER=`echo $DISTVER | cut -c 1`
2368 if test x$VER = x4 ; then
2369 PTHREAD_LIB="${PTHREAD_LIBS:--pthread}"
2370 CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS:--pthread}"
2374 TAPEDRIVE="/dev/nrsa0"
2375 PSCMD="ps -ax -o pid,command"
2377 platforms/freebsd/Makefile \
2378 platforms/freebsd/bacula-fd \
2379 platforms/freebsd/bacula-sd \
2380 platforms/freebsd/bacula-dir"
2381 largefile_support="yes"
2384 PSCMD="UNIX95=1; ps -e -o pid,comm"
2385 CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
2387 TAPEDRIVE="/dev/rmt/0hnb"
2388 PTHREAD_LIB="-lpthread"
2389 AC_DEFINE([_INCLUDE_LONGLONG])
2393 TAPEDRIVE="/dev/rmt/0cbn"
2394 PSCMD="ps -e -o pid,comm"
2396 platforms/irix/Makefile \
2397 platforms/irix/bacula-fd \
2398 platforms/irix/bacula-sd \
2399 platforms/irix/bacula-dir"
2402 DISTVER=`uname -a |awk '{print $3}'`
2405 TAPEDRIVE="/dev/nrst0"
2406 PSCMD="ps -ax -o pid,command"
2407 PTHREAD_LIB="-pthread"
2408 CFLAGS="${CFLAGS} -pthread"
2411 DISTVER=`uname -a |awk '{print $3}'`
2414 TAPEDRIVE="/dev/nrst0"
2415 PSCMD="ps -ax -o pid,command"
2416 PTHREAD_LIB="-pthread"
2417 CFLAGS="${CFLAGS} -pthread"
2419 platforms/openbsd/Makefile \
2420 platforms/openbsd/bacula-fd \
2421 platforms/openbsd/bacula-sd \
2422 platforms/openbsd/bacula-dir"
2425 dnl Make sure hostname is resolved
2426 ping -c 1 $hostname 2>&1 1>/dev/null
2427 if test ! $? = 0; then
2428 hostname="localhost"
2430 if test -f /etc/whitebox-release ; then
2431 f=/etc/whitebox-release
2433 f=/etc/redhat-release
2435 if test `cat $f | grep release |\
2436 cut -f 3 -d ' '`x = "Enterprise"x ; then
2437 DISTVER="Enterprise "`cat $f | grep release |\
2440 DISTVER=`cat /etc/redhat-release | grep release |\
2443 TAPEDRIVE="/dev/nst0"
2444 PSCMD="ps -e -o pid,command"
2446 platforms/redhat/Makefile \
2447 platforms/redhat/bacula-fd \
2448 platforms/redhat/bacula-sd \
2449 platforms/redhat/bacula-dir \
2450 platforms/redhat/bacula.spec \
2454 dnl Make sure hostname is resolved
2455 ping -c 1 $hostname 2>&1 1>/dev/null
2456 if test ! $? = 0; then
2457 hostname="localhost"
2459 DISTVER=`cat /etc/mandrake-release | grep release |\
2461 TAPEDRIVE="/dev/nst0"
2462 PSCMD="ps -e -o pid,command"
2464 platforms/mandrake/Makefile \
2465 platforms/mandrake/bacula-fd \
2466 platforms/mandrake/bacula-sd \
2467 platforms/mandrake/bacula-dir \
2468 platforms/mandrake/bacula.spec \
2472 dnl Make sure hostname is resolved
2473 ping -c 1 $hostname 2>&1 1>/dev/null
2474 if test ! $? = 0; then
2475 hostname="localhost"
2477 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
2478 TAPEDRIVE="/dev/nst0"
2479 PSCMD="ps -e -o pid,command"
2481 platforms/gentoo/Makefile \
2482 platforms/gentoo/bacula-init \
2483 platforms/gentoo/bacula-fd \
2484 platforms/gentoo/bacula-sd \
2485 platforms/gentoo/bacula-dir"
2488 dnl Make sure hostname is resolved
2489 ping -c 1 $hostname 2>&1 1>/dev/null
2490 if test ! $? = 0; then
2491 hostname="localhost"
2493 DISTVER=`cat /etc/slackware-version`
2494 TAPEDRIVE="/dev/nst0"
2495 PSCMD="ps -e -o pid,command"
2497 platforms/slackware/Makefile \
2498 platforms/slackware/rc.bacula-fd \
2499 platforms/slackware/rc.bacula-sd \
2500 platforms/slackware/rc.bacula-dir\
2501 platforms/slackware/functions.bacula"
2505 TAPEDRIVE="/dev/rmt/0cbn"
2506 PSCMD="ps -e -o pid,comm"
2508 platforms/solaris/Makefile \
2509 platforms/solaris/bacula-fd \
2510 platforms/solaris/bacula-sd \
2511 platforms/solaris/bacula-dir"
2512 if test x$DISTVER = x5.6 ; then
2513 AC_DEFINE(HAVE_OLD_SOCKOPT)
2515 LIBS="$LIBS -lresolv"
2518 dnl Make sure hostname is resolved
2519 ping -c 1 $hostname 2>&1 1>/dev/null
2520 if test ! $? = 0; then
2521 hostname="localhost"
2523 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
2525 TAPEDRIVE="/dev/nst0"
2526 PSCMD="ps -e -o pid,command"
2528 platforms/suse/Makefile \
2529 platforms/suse/bacula-fd \
2530 platforms/suse/bacula-sd \
2531 platforms/suse/bacula-dir \
2532 platforms/suse/bacula \
2533 platforms/suse/bacula.spec"
2536 dnl Make sure hostname is resolved
2537 ping -c 1 $hostname 2>&1 1>/dev/null
2538 if test ! $? = 0; then
2539 hostname="localhost"
2543 TAPEDRIVE="/dev/nst0"
2544 PSCMD="ps -e -o pid,command"
2546 platforms/suse/Makefile \
2547 platforms/suse/bacula-fd \
2548 platforms/suse/bacula-sd \
2549 platforms/suse/bacula-dir"
2553 TAPEDRIVE="/dev/nst0"
2556 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
2562 LIBS="$PTHREAD_LIB $LIBS"
2564 AC_DEFINE_UNQUOTED(lld, "$lld")
2565 AC_DEFINE_UNQUOTED(llu, "$llu")
2573 dnl common parts of the Makefile
2574 MCOMMON=./autoconf/Make.common
2575 AC_SUBST_FILE(MCOMMON)
2578 if test "x${subsysdir}" = "x${sbindir}" ; then
2581 echo "You have set both --sbindir and --with-subsys-dir"
2582 echo " equal to: ${subsysdir} "
2583 echo "This is not permitted. Please reconfigure."
2585 echo "Aborting configuration ..."
2591 AC_OUTPUT([autoconf/Make.common \
2594 scripts/startmysql \
2596 scripts/btraceback \
2602 scripts/bacula-ctl-dir \
2603 scripts/bacula-ctl-fd \
2604 scripts/bacula-ctl-sd \
2605 scripts/devel_bacula \
2608 scripts/bacula.desktop.gnome1 \
2609 scripts/bacula.desktop.gnome2 \
2610 scripts/bacula.desktop.gnome1.consolehelper \
2611 scripts/bacula.desktop.gnome2.consolehelper \
2612 scripts/bacula.desktop.gnome1.xsu \
2613 scripts/bacula.desktop.gnome2.xsu \
2614 scripts/bgnome-console.console_apps \
2615 scripts/mtx-changer \
2616 scripts/disk-changer \
2617 scripts/dvd-handler \
2618 scripts/dvd-simulator \
2619 scripts/bacula-tray-monitor.desktop \
2620 scripts/logwatch/Makefile \
2621 scripts/logwatch/logfile.bacula.conf \
2622 scripts/wxconsole.console_apps \
2623 scripts/wxconsole.desktop.consolehelper \
2624 scripts/wxconsole.desktop.xsu \
2625 scripts/bat.desktop \
2626 scripts/bat.desktop.xsu \
2627 scripts/bat.desktop.consolehelper \
2628 scripts/bat.console_apps \
2631 src/console/Makefile \
2632 src/console/bconsole.conf \
2633 src/gnome2-console/Makefile \
2634 src/gnome2-console/bgnome-console.conf \
2635 src/qt-console/bat.conf \
2636 src/qt-console/bat.pro \
2637 src/qt-console/bat.pro.mingw32 \
2638 src/qt-console/install_conf_file \
2639 src/wx-console/Makefile \
2640 src/wx-console/bwx-console.conf \
2641 src/tray-monitor/Makefile \
2642 src/tray-monitor/tray-monitor.conf \
2644 src/dird/bacula-dir.conf \
2646 src/stored/Makefile \
2647 src/stored/bacula-sd.conf \
2648 src/filed/Makefile \
2649 src/filed/bacula-fd.conf \
2651 src/cats/make_catalog_backup \
2652 src/cats/delete_catalog_backup \
2653 src/cats/create_postgresql_database \
2654 src/cats/update_postgresql_tables \
2655 src/cats/make_postgresql_tables \
2656 src/cats/grant_postgresql_privileges \
2657 src/cats/drop_postgresql_tables \
2658 src/cats/drop_postgresql_database \
2659 src/cats/create_mysql_database \
2660 src/cats/update_mysql_tables \
2661 src/cats/make_mysql_tables \
2662 src/cats/grant_mysql_privileges \
2663 src/cats/drop_mysql_tables \
2664 src/cats/drop_mysql_database \
2665 src/cats/create_sqlite_database \
2666 src/cats/update_sqlite_tables \
2667 src/cats/make_sqlite_tables \
2668 src/cats/grant_sqlite_privileges \
2669 src/cats/drop_sqlite_tables \
2670 src/cats/drop_sqlite_database \
2671 src/cats/create_sqlite3_database \
2672 src/cats/update_sqlite3_tables \
2673 src/cats/make_sqlite3_tables \
2674 src/cats/grant_sqlite3_privileges \
2675 src/cats/drop_sqlite3_tables \
2676 src/cats/drop_sqlite3_database \
2679 src/cats/create_bdb_database \
2680 src/cats/update_bdb_tables \
2681 src/cats/make_bdb_tables \
2682 src/cats/grant_bdb_privileges \
2683 src/cats/drop_bdb_tables \
2684 src/cats/drop_bdb_database \
2685 src/cats/create_bacula_database \
2686 src/cats/update_bacula_tables \
2687 src/cats/grant_bacula_privileges \
2688 src/cats/make_bacula_tables \
2689 src/cats/drop_bacula_tables \
2690 src/cats/drop_bacula_database \
2691 src/findlib/Makefile \
2692 src/tools/Makefile \
2693 src/plugins/fd/Makefile \
2695 updatedb/update_mysql_tables_10_to_11 \
2696 updatedb/update_sqlite3_tables_10_to_11 \
2697 updatedb/update_postgresql_tables_10_to_11 \
2698 updatedb/update_sqlite_tables_10_to_11 \
2703 if test "${support_bat}" = "yes" ; then
2704 if test "x$QMAKE" = "xnone" && test "x$QMAKEQT4" = "xnone"; then
2705 echo "Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation"
2711 if test "x$QMAKEQT4" != "xnone"; then
2716 chmod 755 install_conf_file build-depkgs-qt-console
2717 echo "Creating bat Makefile"
2724 dnl if CC is gcc, we can rebuild the dependencies (since the depend rule
2725 dnl requires gcc). If it's not, don't rebuild dependencies
2727 if test X"$GCC" = "Xyes" ; then
2728 echo "Doing make of dependencies"
2729 ${MAKE:-make} depend
2733 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2734 chmod 755 dvd-handler dvd-simulator
2735 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2739 chmod 755 $c/update_mysql_tables_10_to_11 $c/update_sqlite3_tables_10_to_11
2740 chmod 755 $c/update_postgresql_tables_10_to_11 $c/update_sqlite_tables_10_to_11
2744 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2745 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2747 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2748 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2750 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2751 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2753 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2754 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2756 chmod 755 $c/create_sqlite3_database $c/update_sqlite3_tables $c/make_sqlite3_tables
2757 chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
2759 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2760 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2762 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2766 chmod 755 src/win32/build-depkgs-mingw32
2768 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2769 largefile_support="yes"
2772 dnl Only try to find out the version number of the compiler when we know its some kind of GCC compiler
2773 if test X"$GCC" = "Xyes" ; then
2775 dnl A whole lot of hand springs to get the compiler version.
2776 dnl This is because gcc changed the output in version 3.0
2778 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2779 if test "x${CCVERSION}" = "x" ; then
2780 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2782 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2783 if test x"${CXXVERSION}" = x ; then
2784 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2788 if test "x${db_type}" = "xInternal" ; then
2791 echo "You have not specified either --enable-client-only or one of the"
2792 echo " supported databases: MySQL, PostgreSQL, SQLite3, SQLite or DBI."
2793 echo " This is not permitted. Please reconfigure."
2795 echo "Aborting the configuration ..."
2802 Configuration on `date`:
2804 Host: ${host}${post_host} -- ${DISTNAME} ${DISTVER}
2805 Bacula version: ${BACULA} ${VERSION} (${DATE})
2806 Source code location: ${srcdir}
2807 Install binaries: ${sbindir}
2808 Install libraries: ${libdir}
2809 Install config files: ${sysconfdir}
2810 Scripts directory: ${scriptdir}
2811 Archive directory: ${archivedir}
2812 Working directory: ${working_dir}
2813 PID directory: ${piddir}
2814 Subsys directory: ${subsysdir}
2815 Man directory: ${mandir}
2816 Data directory: ${datarootdir}
2817 C Compiler: ${CC} ${CCVERSION}
2818 C++ Compiler: ${CXX} ${CXXVERSION}
2819 Compiler flags: ${WCFLAGS} ${CFLAGS}
2820 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2822 Statically Linked Tools: ${support_static_tools}
2823 Statically Linked FD: ${support_static_fd}
2824 Statically Linked SD: ${support_static_sd}
2825 Statically Linked DIR: ${support_static_dir}
2826 Statically Linked CONS: ${support_static_cons}
2827 Database type: ${db_type}
2828 Database port: ${db_port}
2829 Database lib: ${DB_LIBS}
2830 Database name: ${db_name}
2831 Database user: ${db_user}
2833 Job Output Email: ${job_email}
2834 Traceback Email: ${dump_email}
2835 SMTP Host Address: ${smtp_host}
2837 Director Port: ${dir_port}
2838 File daemon Port: ${fd_port}
2839 Storage daemon Port: ${sd_port}
2841 Director User: ${dir_user}
2842 Director Group: ${dir_group}
2843 Storage Daemon User: ${sd_user}
2844 Storage DaemonGroup: ${sd_group}
2845 File Daemon User: ${fd_user}
2846 File Daemon Group: ${fd_group}
2848 SQL binaries Directory ${SQL_BINDIR}
2850 Large file support: $largefile_support
2851 Bacula conio support: ${got_conio} ${CONS_LIBS}
2852 readline support: ${got_readline} ${PRTREADLINE_SRC}
2853 TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
2854 TLS support: ${support_tls}
2855 Encryption support: ${support_crypto}
2856 ZLIB support: ${have_zlib}
2857 enable-smartalloc: ${support_smartalloc}
2858 bat support: ${support_bat} ${QWT_LDFLAGS}
2859 enable-gnome: ${support_gnome} ${gnome_version}
2860 enable-bwx-console: ${support_wx_console} ${wx_version}
2861 enable-tray-monitor: ${support_tray_monitor}
2862 client-only: ${build_client_only}
2863 build-dird: ${build_dird}
2864 build-stored: ${build_stored}
2865 ACL support: ${have_acl}
2866 Python support: ${support_python} ${PYTHON_LIBS}
2867 Batch insert enabled: ${support_batch_insert}