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 INCLUDE_INSTALL_TARGET=""
158 INCLUDE_UNINSTALL_TARGET=""
160 AC_SUBST(DEFAULT_OBJECT_TYPE)
161 AC_SUBST(DEFAULT_ARCHIVE_TYPE)
162 AC_SUBST(DEFAULT_SHARED_OBJECT_TYPE)
164 AC_SUBST(LIBTOOL_INSTALL_TARGET)
165 AC_SUBST(LIBTOOL_UNINSTALL_TARGET)
166 AC_SUBST(LIBTOOL_CLEAN_TARGET)
167 AC_SUBST(INCLUDE_INSTALL_TARGET)
168 AC_SUBST(INCLUDE_UNINSTALL_TARGET)
169 AC_SUBST(QMAKE_LIBTOOL)
171 dnl --------------------------------------------------
172 dnl Bacula OP Sys determination (see aclocal.m4)
173 dnl --------------------------------------------------
176 dnl -----------------------------------------------------------
177 dnl Bacula OPSys Distribution determination (see aclocal.m4)
178 dnl ----------------------------------------------------------
179 BA_CHECK_OPSYS_DISTNAME
181 dnl --------------------------------------------------
182 dnl Suppport for gettext (translations)
183 dnl By default, $datarootdir is ${prefix}/share
184 dnl --------------------------------------------------
185 AM_GNU_GETTEXT([external])
186 if test x${prefix} = xNONE ; then
187 if test `eval echo ${datarootdir}` = NONE/share ; then
188 datarootdir=/usr/share
192 dnl ------------------------------------------------------------------
193 dnl If the user has not set --prefix, we set our default to nothing.
194 dnl In this case, if the user has not set --sysconfdir, we set it
195 dnl to the package default of /etc/bacula. If either --prefix or
196 dnl --sysconfdir is set, we leave sysconfdir alone except to eval it.
197 dnl ------------------------------------------------------------------
198 if test x${prefix} = xNONE ; then
199 if test `eval echo ${sysconfdir}` = NONE/etc ; then
200 sysconfdir=/etc/bacula
204 sysconfdir=`eval echo ${sysconfdir}`
205 datarootdir=`eval echo ${datarootdir}`
206 localedir=`eval echo ${datarootdir}/locale`
207 AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir")
208 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
210 dnl -------------------------------------------------------------------------
211 dnl If the user has not set --exec-prefix, we default to ${prefix}
212 dnl -------------------------------------------------------------------------
213 if test x${exec_prefix} = xNONE ; then
214 exec_prefix=${prefix}
217 dnl ------------------------------------------------------------------
218 dnl If the user has not set --sbindir, we set our default as /sbin
219 dnl ------------------------------------------------------------------
220 if test x$sbindir = x'${exec_prefix}/sbin' ; then
221 sbindir=${exec_prefix}/sbin
223 sbindir=`eval echo ${sbindir}`
225 dnl ------------------------------------------------------------------
226 dnl If the user has not set --libdir, we set our default as /lib
227 dnl ------------------------------------------------------------------
228 if test x$libdir = x'${exec_prefix}/lib' ; then
229 libdir=${exec_prefix}/lib
231 libdir=`eval echo ${libdir}`
233 dnl ------------------------------------------------------------------
234 dnl If the user has not set --includedir, we set our default as /include
235 dnl ------------------------------------------------------------------
236 if test x$includedir = x'${exec_prefix}/include' ; then
237 includedir=${exec_prefix}/include
239 includedir=`eval echo ${includedir}`
241 dnl -------------------------------------------------------------------------
242 dnl If the user has not set --mandir, we default to /usr/share/man
243 dnl -------------------------------------------------------------------------
244 if test x$mandir = x'${prefix}/man' ; then
245 mandir=/usr/share/man
248 AC_PATH_PROGS(MSGFMT, msgfmt, no)
249 if test "$MSGFMT" = "no"
251 echo 'msgfmt program not found, disabling NLS !'
253 USE_INCLUDED_LIBINTL=no
261 support_postgresql=no
263 support_smartalloc=yes
268 support_wx_console=no
273 support_static_tools=no
276 support_static_dir=no
277 support_static_cons=no
286 dnl --------------------------------------------------------------------------
287 dnl CHECKING COMMAND LINE OPTIONS
288 dnl --------------------------------------------------------------------------
290 dnl -------------------------------------------
291 dnl gnome (default off)
292 dnl -------------------------------------------
294 AC_HELP_STRING([--enable-gnome], [enable build of bgnome-console GUI @<:@default=no@:>@]),
296 if test x$enableval = xyes; then
303 if test x$support_gnome = xyes; then
304 abc=`$PKGCONFIG --exists libgnomeui-2.0`
306 if test $pkg = 0; then
307 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
308 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
309 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
310 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
311 AC_SUBST(GNOME_INCLUDEDIR)
312 AC_SUBST(GNOMEUI_LIBS)
313 AC_SUBST(GNOME_LIBDIR)
315 GNOME_DIR=src/gnome2-console
316 gnome_version="Version 2.x"
318 AC_MSG_ERROR(Unable to find Gnome 2 installation)
323 dnl -------------------------------------------
324 dnl bat (default off)
325 dnl -------------------------------------------
327 AC_HELP_STRING([--enable-bat], [enable build of bat Qt4 GUI @<:@default=no@:>@]),
329 if test x$enableval = xyes; then
330 AC_DEFINE(HAVE_BAT, 1, [Set if Bacula bat Qt4 GUI support enabled])
337 if test x$support_bat = xyes; then
338 abc=`$PKGCONFIG --atleast-version=4.2 QtGui`
340 if test $pkg = 0; then
341 BAT_DIR=src/qt-console
343 AC_MSG_ERROR(Unable to find Qt4 installation needed by bat)
348 dnl If bat is enabled, we need the qwt library
356 if test x$support_bat = xyes; then
357 AC_MSG_CHECKING(for qwt support)
359 AC_HELP_STRING([--with-qwt@<:@=DIR@:>@], [specify qwt library directory]),
366 if test -f ${with_qwt}/include/qwt.h; then
367 QWT_INC="${with_qwt}/include"
368 QWT_LDFLAGS="-L${with_qwt}/lib"
378 dnl Search in standard places, or --with-qwt not specified
380 if test $no_qwt = no; then
381 if test x$QWT_INC = x; then
382 for root in /usr /usr/local; do
383 for ver in qwt qwt5 qwt-qt4; do
384 if test -f ${root}/include/${ver}/qwt.h; then
385 QWT_INC="${root}/include/${ver}"
386 if test -d ${root}/lib64/; then
387 QWT_LDFLAGS="-L${root}/lib64"
388 elif test -d ${root}/lib/64/; then
389 QWT_LDFLAGS="-L${root}/64"
391 QWT_LDFLAGS="-L${root}/lib"
402 if test x$QWT_INC = x; then
405 AC_DEFINE(HAVE_QWT, 1, [Set if bat QWT library found])
412 AC_SUBST(QWT_LDFLAGS)
416 dnl -------------------------------------------
417 dnl bwx-console (default off)
418 dnl -------------------------------------------
419 AC_ARG_ENABLE(bwx-console,
420 AC_HELP_STRING([--enable-bwx-console], [enable build of wxWidgets console @<:@default=no@:>@]),
422 if test x$enableval = xyes; then
423 support_wx_console=yes
429 if test x$support_wx_console = xyes; then
430 abc=`$WXCONFIG $WXFLAGS --cppflags`
432 if test $pkg = 0; then
433 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
434 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
435 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
437 AC_SUBST(WXCONS_CPPFLAGS)
438 AC_SUBST(WXCONS_LDFLAGS)
439 WX_DIR=src/wx-console
442 echo "wx-config program not found. bwx-console disabled."
444 support_wx_console=no
449 dnl -------------------------------------------
450 dnl tray-monitor (default off)
451 dnl -------------------------------------------
452 AC_ARG_ENABLE(tray-monitor,
453 AC_HELP_STRING([--enable-tray-monitor], [enable build of Gnome tray monitor (compatible with KDE @<:@default=no@:>@]),
455 if test x$enableval = xyes; then
456 support_tray_monitor=yes
462 if test x$support_tray_monitor = xyes; then
463 abc=`$PKGCONFIG --exists gtk+-2.0`
465 if test $pkg = 0; then
466 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
467 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
468 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
469 AC_SUBST(TRAY_MONITOR_LDFLAGS)
470 TRAY_MONITOR_DIR=src/tray-monitor
471 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
473 if test $pkg = 0; then
474 AC_DEFINE(HAVE_GTK_2_4, 1, [Set if you have GTK 4.2 or greater loaded])
478 AC_SUBST(TRAY_MONITOR_DIR)
480 dnl -------------------------------------------
481 dnl smartalloc (default off)
482 dnl -------------------------------------------
483 AC_ARG_ENABLE(smartalloc,
484 AC_HELP_STRING([--enable-smartalloc], [enable smartalloc debugging support @<:@default=no@:>@]),
486 if test x$enableval = xno; then
487 support_smartalloc=no
492 if test x$support_smartalloc = xyes; then
493 AC_DEFINE(SMARTALLOC, 1, [Set if you want Smartalloc enabled])
496 dnl -------------------------------------------
497 dnl static-tools (default off)
498 dnl -------------------------------------------
499 AC_ARG_ENABLE(static-tools,
500 AC_HELP_STRING([--enable-static-tools], [enable static tape tools @<:@default=no@:>@]),
502 if test x$enableval = xyes; then
503 support_static_tools=yes
509 if test x$support_static_tools = xyes; then
510 TTOOL_LDFLAGS="-static"
512 AC_SUBST(TTOOL_LDFLAGS)
514 dnl -------------------------------------------
515 dnl static-fd (default off)
516 dnl -------------------------------------------
517 AC_ARG_ENABLE(static-fd,
518 AC_HELP_STRING([--enable-static-fd], [enable static File daemon @<:@default=no@:>@]),
520 if test x$enableval = xyes; then
521 support_static_fd=yes
527 if test x$support_static_fd = xyes; then
528 STATIC_FD="static-bacula-fd"
532 dnl -------------------------------------------
533 dnl static-sd (default off)
534 dnl -------------------------------------------
535 AC_ARG_ENABLE(static-sd,
536 AC_HELP_STRING([--enable-static-sd], [enable static Storage daemon @<:@default=no@:>@]),
538 if test x$enableval = xyes; then
539 support_static_sd=yes
545 if test x$support_static_sd = xyes; then
546 STATIC_SD="static-bacula-sd"
550 dnl -------------------------------------------
551 dnl static-dir (default off)
552 dnl -------------------------------------------
553 AC_ARG_ENABLE(static-dir,
554 AC_HELP_STRING([--enable-static-dir], [enable static Director @<:@default=no@:>@]),
556 if test x$enableval = xyes; then
557 support_static_dir=yes
563 if test x$support_static_dir = xyes; then
564 STATIC_DIR="static-bacula-dir"
568 dnl -------------------------------------------
569 dnl static-cons (default off)
570 dnl -------------------------------------------
571 AC_ARG_ENABLE(static-cons,
572 AC_HELP_STRING([--enable-static-cons], [enable static Console @<:@default=no@:>@]),
574 if test x$enableval = xyes; then
575 support_static_cons=yes
583 if test x$support_static_cons = xyes; then
584 STATIC_CONS="static-bconsole"
585 STATIC_GNOME_CONS="static-bgnome-console"
586 STATIC_WX_CONS="static-bwx-console"
588 AC_SUBST(STATIC_CONS)
589 AC_SUBST(STATIC_GNOME_CONS)
590 AC_SUBST(STATIC_WX_CONS)
592 dnl -------------------------------------------
593 dnl client_only (default off)
594 dnl -------------------------------------------
595 AC_ARG_ENABLE(client-only,
596 AC_HELP_STRING([--enable-client-only], [build client (File daemon) only @<:@default=no@:>@]),
598 if test x$enableval = xyes; then
599 build_client_only=yes
605 if test x$build_client_only = xno; then
612 dnl -------------------------------------------
613 dnl director (default on)
614 dnl -------------------------------------------
615 AC_ARG_ENABLE(build-dird,
616 AC_HELP_STRING([--enable-build-dird], [enable building of dird (Director) @<:@default=yes@:>@]),
618 if test x$enableval = xno; then
623 if test x$build_dird = xyes; then
628 DIR_TOOLS="NODIRTOOLS"
633 dnl -------------------------------------------
634 dnl stored (default on)
635 dnl -------------------------------------------
636 AC_ARG_ENABLE(build-stored,
637 AC_HELP_STRING([--enable-build-stored], [enable building of stored (Storage daemon) @<:@default=yes@:>@]),
639 if test x$enableval = xno; then
644 if test x$build_stored = xyes; then
645 STORED_DIR="src/stored"
651 dnl ---------------------------------------------------
652 dnl Check for conio (Bacula readline substitute)(
653 dnl ---------------------------------------------------
654 dnl this allows you to turn it completely off
656 AC_HELP_STRING([--disable-conio], [disable conio support @<:@default=no@:>@]),
658 if test x$enableval = xno; then
665 dnl ---------------------------------------------------
666 dnl Check for IPv6 support
667 dnl ---------------------------------------------------
668 dnl this allows you to turn it completely off
671 AC_HELP_STRING([--enable-ipv6], [enable ipv6 support @<:@default=yes@:>@]),
673 if test x$enableval = xno; then
679 if test x$support_ipv6 = xyes; then
680 AC_TRY_LINK([ #include <sys/types.h>
681 #include <sys/socket.h>
682 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;],
683 [support_ipv6=yes], [support_ipv6=no])
686 if test x$support_ipv6 = xyes; then
687 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
691 if test x$support_conio = xyes; then
692 AC_CHECK_HEADER(termcap.h,
693 [ AC_CHECK_LIB(termcap, tgetent,
694 [ CONS_LIBS="-ltermcap"
699 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
701 [ AC_CHECK_LIB(ncurses, tgetent,
702 [ CONS_LIBS="-lncurses"
707 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
712 AC_CHECK_HEADERS(curses.h)
713 AC_CHECK_HEADER(term.h,
714 [ AC_CHECK_LIB(curses, tgetent,
715 [ CONS_LIBS="-lcurses"
720 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
723 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
732 dnl ---------------------------------------------------
733 dnl Check for readline support/directory (default off)
734 dnl ---------------------------------------------------
735 dnl this allows you to turn it completely off
736 AC_ARG_ENABLE(readline,
737 AC_HELP_STRING([--disable-readline], [disable readline support @<:@default=yes@:>@]),
739 if test x$enableval = xno; then
747 if test x$support_readline = xyes; then
748 AC_ARG_WITH(readline,
749 AC_HELP_STRING([--with-readline@<:@=DIR@:>@], [specify readline library directory]),
751 case "$with_readline" in
756 if test -f ${with_readline}/readline.h; then
757 CONS_INC="-I${with_readline}"
758 CONS_LDFLAGS="-L$with_readline"
759 elif test -f ${with_readline}/include/readline/readline.h; then
760 CONS_INC="-I${with_readline}/include/readline"
761 CONS_LDFLAGS="-L${with_readline}/lib"
762 with_readline="${with_readline}/include/readline"
764 with_readline="/usr/include/readline"
767 AC_CHECK_HEADER(${with_readline}/readline.h,
769 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
770 CONS_LIBS="-lreadline -lhistory -ltermcap"
774 echo "readline.h not found. readline turned off ..."
781 dnl check for standard readline library
782 AC_CHECK_HEADER(/usr/include/readline/readline.h,
784 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
786 CONS_INC="-I/usr/include/readline"
787 CONS_LIBS="-lreadline -ltermcap"
789 dnl Did not find standard library, so try Bacula's default
790 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
792 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
794 CONS_INC="-I${TOP_DIR}/depkgs/readline"
795 CONS_LIBS="-lreadline -lhistory -ltermcap"
796 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
797 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
800 echo "readline.h not found. readline turned off ..."
814 AC_SUBST(CONS_LDFLAGS)
815 AC_SUBST(READLINE_SRC)
817 dnl Minimal stuff for readline Makefile configuration
822 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr lstat lchown)
823 AC_CHECK_FUNCS(nanosleep nl_langinfo)
824 AC_CHECK_HEADERS(varargs.h)
826 dnl End of readline/conio stuff
827 dnl -----------------------------------------------------------------------
829 dnl -----------------------------------------------------------------------
830 dnl Check for Python support
832 AC_MSG_CHECKING(for Python support)
834 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.]),
838 if test "$withval" != "no"; then
839 if test "$withval" = "yes"; then
840 for python_root in /usr /usr/local /usr/sfw; do
841 for ver in python2.2 python2.3 python2.4 python2.5; do
842 if test -f $python_root/include/${ver}/Python.h; then
843 PYTHON_INCDIR=-I$python_root/include/${ver}
844 if test -d $python_root/lib64/${ver}/config; then
845 PYTHON_LIBS="-L$python_root/lib64/${ver}/config -l${ver}"
847 PYTHON_LIBS="-L$python_root/lib/${ver}/config -l${ver}"
854 if test x$PYTHON_INCDIR = x; then
855 if test -f $prefix/include/Python.h; then
856 PYTHON_INCDIR=-I$prefix/include
857 if test -d $prefix/lib64/config; then
858 PYTHON_LIBS="-L$prefix/lib64/config -lpython"
860 PYTHON_LIBS="-L$prefix/lib/config -lpython"
864 AC_MSG_ERROR(Unable to find Python.h in standard locations)
868 if test -f $withval/Python.h; then
869 PYTHON_INCDIR=-I$withval
870 PYTHON_LIBS="-L$withval/config -lpython"
871 elif test -f $withval/include/Python.h; then
872 PYTHON_INCDIR=-I$withval/include
873 if test -d $withval/lib64/config; then
874 PYTHON_LIBS="-L$withval/lib64/config -lpython"
876 PYTHON_LIBS="-L$withval/lib/config -lpython"
878 elif test -f $withval/include/python/Python.h; then
879 PYTHON_INCDIR=-I$withval/include/python
880 if test -d $withval/lib64/python/config; then
881 PYTHON_LIBS="-L$withval/lib64/python/config -lpython"
883 PYTHON_LIBS="-L$withval/lib/python/config -lpython"
887 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
891 AC_DEFINE([HAVE_PYTHON], 1)
894 AC_MSG_NOTICE(checking for more Python libs)
895 saved_LIBS="$LIBS"; LIBS=
896 AC_SEARCH_LIBS(shm_open, [rt])
897 AC_CHECK_LIB(util, openpty)
898 PYTHON_LIBS="$PYTHON_LIBS $LIBS"
907 AC_SUBST(PYTHON_LIBS)
908 AC_SUBST(PYTHON_INCDIR)
911 dnl Find where sockets are (especially for Solaris)
912 dnl Do this before the TCP Wrappers test since tcp wrappers
913 dnl uses the socket library and some linkers are stupid.
915 AC_CHECK_FUNC(socket,
916 AC_MSG_RESULT(using libc's socket),
917 AC_CHECK_LIB(xnet,socket)
918 AC_CHECK_LIB(socket,socket)
919 AC_CHECK_LIB(inet,socket))
921 dnl -----------------------------------------------------------
922 dnl Check whether user wants TCP wrappers support (default off)
923 dnl -----------------------------------------------------------
926 AC_ARG_WITH(tcp-wrappers,
927 AC_HELP_STRING([--with-tcp-wrappers@<:@=DIR@:>@], [enable tcpwrappers support]),
929 if test "x$withval" != "xno" ; then
931 LIBS="$saved_LIBS -lwrap"
932 AC_MSG_CHECKING(for libwrap)
933 AC_SEARCH_LIBS(nanosleep, [rt])
936 #include <sys/types.h>
938 int deny_severity = 0;
939 int allow_severity = 0;
940 struct request_info *req;
945 AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
950 LIBS="$saved_LIBS -lwrap -lnsl"
951 WRAPLIBS="$saved_LIBS -lwrap -lnsl"
954 #include <sys/types.h>
956 int deny_severity = 0;
957 int allow_severity = 0;
958 struct request_info *req;
963 AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
968 AC_MSG_ERROR([*** libwrap missing])
977 dnl -----------------------------------------------------------
978 dnl Check whether OpenSSL is available
979 dnl -----------------------------------------------------------
980 AC_MSG_CHECKING([for OpenSSL])
981 dnl The following uses quadrigraphs:
985 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
987 with_openssl_directory=${withval}
991 if test "x$with_openssl_directory" != "xno"; then
992 OPENSSL_LIBS="-lssl -lcrypto"
995 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
997 # Make sure the $with_openssl_directory also makes sense
999 if test -d "$with_openssl_directory/lib" -a -d "$with_openssl_directory/include"; then
1000 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
1001 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
1005 saved_LIBS="${LIBS}"
1006 saved_CFLAGS="${CFLAGS}"
1007 LIBS="${saved_LIBS} ${OPENSSL_LIBS}"
1008 CFLAGS="${saved_CFLAGS} ${OPENSSL_INC}"
1012 #include <openssl/ssl.h>
1014 CRYPTO_set_id_callback(NULL);
1017 support_crypto="yes"
1025 #include <openssl/evp.h>
1029 ac_cv_openssl_sha2="yes"
1031 ac_cv_openssl_sha2="no"
1035 dnl Solaris disables greater than 128+ bit encryption in their OpenSSL
1036 dnl implementation, presumably for export reasons. If 192bit AES
1037 dnl is available, we assume that we're running with a 'non-export'
1038 dnl openssl library.
1041 #include <openssl/evp.h>
1045 ac_cv_openssl_export="no"
1047 ac_cv_openssl_export="yes"
1051 LIBS="${saved_LIBS}"
1052 CFLAGS="${saved_CFLAGS}"
1054 if test "$support_tls" = "yes"; then
1055 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
1056 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
1057 AC_DEFINE(HAVE_CRYPTO, 1, [Define if encryption support should be enabled])
1060 if test "$ac_cv_openssl_sha2" = "yes"; then
1061 AC_DEFINE(HAVE_SHA2, 1, [Define if the SHA-2 family of digest algorithms is available])
1064 if test "$ac_cv_openssl_export" = "yes"; then
1065 AC_DEFINE(HAVE_OPENSSL_EXPORT_LIBRARY, 1, [Define if the OpenSSL library is export-contrained to 128bit ciphers])
1074 AC_MSG_RESULT([$support_tls])
1075 AC_SUBST(OPENSSL_LIBS)
1076 AC_SUBST(OPENSSL_INC)
1078 dnl -----------------------------------------------------------
1079 dnl dlopen is needed for plugins
1080 dnl -----------------------------------------------------------
1081 AC_SEARCH_LIBS(dlopen, [dl])
1083 dnl ------------------------------------------
1084 dnl Where to place working dir
1085 dnl ------------------------------------------
1086 working_dir=`eval echo ${prefix}/var/bacula/working`
1087 AC_ARG_WITH(working-dir,
1088 AC_HELP_STRING([--with-working-dir=PATH], [specify path of Bacula working directory]),
1090 if test "x$withval" != "xno" ; then
1091 working_dir=$withval
1096 AC_SUBST(working_dir)
1098 dnl ------------------------------------------------------------------
1099 dnl If the user has not set archivedir, we set our default as /tmp
1100 dnl ------------------------------------------------------------------
1102 AC_ARG_WITH(archivedir,
1103 AC_HELP_STRING([--with-archivedir=PATH], [specify path of SD archive directory]),
1105 if test "x$withval" != "xno" ; then
1111 AC_SUBST(archivedir)
1113 dnl ------------------------------------------
1114 dnl Where to place scriptdir (script files)
1115 dnl ------------------------------------------
1116 scriptdir=`eval echo ${sysconfdir}`
1117 AC_ARG_WITH(scriptdir,
1118 AC_HELP_STRING([--with-scriptdir=PATH], [specify path of Bacula scripts directory]),
1120 if test "x$withval" != "xno" ; then
1128 # ------------------------------------------
1129 # Where to place plugindir (script files)
1130 # ------------------------------------------
1131 plugindir=`eval echo ${sysconfdir}`
1132 AC_ARG_WITH(plugindir,
1133 AC_HELP_STRING([--with-plugindir=PATH], [specify path of Bacula plugins directory]),
1135 if test "x$withval" != "xno" ; then
1143 dnl ------------------------------------------
1144 dnl Where to send dump email
1145 dnl ------------------------------------------
1146 dump_email=root@localhost
1147 AC_ARG_WITH(dump-email,
1148 AC_HELP_STRING([--with-dump-email=EMAIL], [dump email address]),
1150 if test "x$withval" != "xno" ; then
1156 AC_SUBST(dump_email)
1158 dnl ------------------------------------------
1159 dnl Where to send job email
1160 dnl ------------------------------------------
1161 job_email=root@localhost
1162 AC_ARG_WITH(job-email,
1163 AC_HELP_STRING([--with-job-email=EMAIL], [job output email address]),
1165 if test "x$withval" != "xno" ; then
1173 dnl ------------------------------------------
1174 dnl Where to find smtp host
1175 dnl ------------------------------------------
1177 AC_ARG_WITH(smtp_host,
1178 AC_HELP_STRING([--with-smtp-host=HOST], [SMTP mail host address]),
1180 if test "x$withval" != "xno" ; then
1188 dnl ------------------------------------
1189 dnl Where to place pid files
1190 dnl ------------------------------------
1192 AC_ARG_WITH(pid-dir,
1193 AC_HELP_STRING([--with-pid-dir=PATH], [specify location of Bacula pid files]),
1195 if test "x$withval" != "xno" ; then
1201 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
1204 dnl ------------------------------------
1205 dnl Where to place subsys "lock file"
1206 dnl ------------------------------------
1207 subsysdir=/var/run/subsys
1208 if test -d /var/run/subsys; then
1209 subsysdir=/var/run/subsys
1210 elif test -d /var/lock/subsys; then
1211 subsysdir=/var/lock/subsys
1213 subsysdir=/var/run/subsys
1215 AC_ARG_WITH(subsys-dir,
1216 AC_HELP_STRING([--with-subsys-dir=PATH], [specify location of Bacula subsys file]),
1218 if test "x$withval" != "xno" ; then
1226 dnl ------------------------------------
1227 dnl Where to start assigning ports
1228 dnl ------------------------------------
1230 AC_ARG_WITH(baseport,
1231 AC_HELP_STRING([--with-baseport=PORT], [specify base port address for daemons]),
1233 if test "x$withval" != "xno" ; then
1240 dir_port=`expr $baseport`
1241 fd_port=`expr $baseport + 1`
1242 sd_port=`expr $fd_port + 1`
1248 dnl ------------------------------------------
1249 dnl Generate passwords
1250 dnl ------------------------------------------
1252 AC_ARG_WITH(dir-password,
1253 AC_HELP_STRING([--with-dir-password=PASSWORD], [specify Director's password]),
1255 if test "x$withval" != "xno" ; then
1256 dir_password=$withval
1261 if test "x$dir_password" = "x" ; then
1262 if test "x$OPENSSL" = "xnone" ; then
1263 key=`autoconf/randpass 33`
1265 key=`openssl rand -base64 33`
1271 AC_ARG_WITH(fd-password,
1272 AC_HELP_STRING([--with-fd-password=PASSWORD], [specify Client's password]),
1274 if test "x$withval" != "xno" ; then
1275 fd_password=$withval
1280 if test "x$fd_password" = "x" ; then
1281 if test "x$OPENSSL" = "xnone" ; then
1282 key=`autoconf/randpass 37`
1284 key=`openssl rand -base64 33`
1290 AC_ARG_WITH(sd-password,
1291 AC_HELP_STRING([--with-sd-password=PASSWORD], [specify Storage daemon's password]),
1293 if test "x$withval" != "xno" ; then
1294 sd_password=$withval
1299 if test "x$sd_password" = "x" ; then
1300 if test "x$OPENSSL" = "xnone" ; then
1301 key=`autoconf/randpass 41`
1303 key=`openssl rand -base64 33`
1309 AC_ARG_WITH(mon-dir-password,
1310 AC_HELP_STRING([--with-mon-dir-password=PASSWORD], [specify Director's password used by the monitor]),
1312 if test "x$withval" != "xno" ; then
1313 mon_dir_password=$withval
1318 if test "x$mon_dir_password" = "x" ; then
1319 if test "x$OPENSSL" = "xnone" ; then
1320 key=`autoconf/randpass 33`
1322 key=`openssl rand -base64 33`
1324 mon_dir_password=$key
1328 AC_ARG_WITH(mon-fd-password,
1329 AC_HELP_STRING([--with-mon-fd-password=PASSWORD], [specify Client's password used by the monitor]),
1331 if test "x$withval" != "xno" ; then
1332 mon_fd_password=$withval
1337 if test "x$mon_fd_password" = "x" ; then
1338 if test "x$OPENSSL" = "xnone" ; then
1339 key=`autoconf/randpass 37`
1341 key=`openssl rand -base64 33`
1343 mon_fd_password=$key
1347 AC_ARG_WITH(mon-sd-password,
1348 AC_HELP_STRING([--with-mon-sd-password=PASSWORD], [specify Storage daemon's password used by the monitor]),
1350 if test "x$withval" != "xno" ; then
1351 mon_sd_password=$withval
1356 if test "x$mon_sd_password" = "x" ; then
1357 if test "x$OPENSSL" = "xnone" ; then
1358 key=`autoconf/randpass 41`
1360 key=`openssl rand -base64 33`
1362 mon_sd_password=$key
1365 AC_SUBST(dir_password)
1366 AC_SUBST(fd_password)
1367 AC_SUBST(sd_password)
1368 AC_SUBST(mon_dir_password)
1369 AC_SUBST(mon_fd_password)
1370 AC_SUBST(mon_sd_password)
1373 dnl Pickup any database name
1376 AC_ARG_WITH(db_name,
1377 AC_HELP_STRING([--with-db-name=DBNAME], [specify database name @<:@default=bacula@:>@]),
1379 if test "x$withval" != "x" ; then
1387 AC_ARG_WITH(db_user,
1388 AC_HELP_STRING([--with-db-user=UNAME], [specify database user @<:@default=bacula@:>@]),
1390 if test "x$withval" != "x" ; then
1398 AC_ARG_WITH(db_password,
1399 AC_HELP_STRING([--with-db-password=PWD], [specify database password @<:@default=*none*@:>@]),
1401 if test "x$withval" != "x" ; then
1402 db_password=$withval
1406 AC_SUBST(db_password)
1409 dnl Pickup a database port
1412 AC_ARG_WITH(db_port,
1413 AC_HELP_STRING([--with-db-port=DBPORT], [specify a database port @<:@default=null@:>@]),
1415 if test "x$withval" != "x" ; then
1423 # Handle users and groups for each daemon
1426 AC_ARG_WITH(dir_user,
1427 AC_HELP_STRING([--with-dir-user=USER], [specify user for Director daemon]),
1429 if test "x$withval" != "x" ; then
1436 AC_ARG_WITH(dir_group,
1437 AC_HELP_STRING([--with-dir-group=GROUP], [specify group for Director daemon]),
1439 if test "x$withval" != "x" ; then
1446 AC_ARG_WITH(sd_user,
1447 AC_HELP_STRING([--with-sd-user=USER], [specify user for Storage daemon]),
1449 if test "x$withval" != "x" ; then
1456 AC_ARG_WITH(sd_group,
1457 AC_HELP_STRING([--with-sd-group=GROUP], [specify group for Storage daemon]),
1459 if test "x$withval" != "x" ; then
1466 AC_ARG_WITH(fd_user,
1467 AC_HELP_STRING([--with-fd-user=USER], [specify user for File daemon]),
1469 if test "x$withval" != "x" ; then
1476 AC_ARG_WITH(fd_group,
1477 AC_HELP_STRING([--with-fd-group=GROUP], [specify group for File daemon]),
1479 if test "x$withval" != "x" ; then
1493 dnl allow setting default executable permissions
1496 AC_ARG_WITH(sbin-perm,
1497 AC_HELP_STRING([--with-sbin-perm=MODE], [specify permissions for sbin binaries @<:@default=0754@:>@]),
1499 if test "x$withval" != "x" ; then
1507 dnl ------------------------------------------------
1508 dnl Bacula check for various SQL database engines
1509 dnl ------------------------------------------------
1511 BA_CHECK_POSTGRESQL_DB
1526 dnl -------------------------------------------
1527 dnl enable batch attribute DB insert (default on)
1528 dnl -------------------------------------------
1529 support_batch_insert=no
1530 A=`test -f $SQL_LIB && nm $SQL_LIB | grep pthread_mutex_lock`
1532 if test $pkg = 0; then
1533 support_batch_insert=yes
1534 AC_ARG_ENABLE(batch-insert,
1535 AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]),
1537 if test x$enableval = xno; then
1538 support_batch_insert=no
1540 support_batch_insert=yes
1546 dnl Check if postgresql support batch mode
1547 if test x$DB_TYPE = xpostgresql; then
1548 A=`test -f $SQL_LIB && nm $SQL_LIB | grep PQputCopyData`
1550 if test $pkg != 0; then
1551 support_batch_insert=no
1555 if test x$DB_TYPE = xdbi; then
1559 dnl Check for batch insert
1560 if test $DB_PROG = postgresql; then
1561 A=`test -f $SQL_LIB && nm $SQL_LIB | grep PQputCopyData`
1565 if test $DB_PROG = mysql; then
1566 A=`test -f $SQL_LIB && nm $DB_PROG_LIB | grep pthread_mutex_lock`
1570 if test $DB_PROG = sqlite3; then
1571 A=`test -f $SQL_LIB && nm $DB_PROG_LIB | grep pthread_mutex_lock`
1575 if test $pkg = 0; then
1576 AC_ARG_ENABLE(batch-insert,
1577 AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]),
1579 if test x$enableval = xno; then
1580 support_batch_insert=no
1582 support_batch_insert=yes
1588 dnl If dbi was not chosen, let the comment in file
1592 AC_SUBST(uncomment_dbi)
1594 if test $support_batch_insert = yes ; then
1595 AC_DEFINE(HAVE_BATCH_FILE_INSERT, 1, [Set if DB batch insert code enabled])
1598 AC_DEFINE(PROTOTYPES)
1600 dnl --------------------------------------------------------------------------
1601 dnl Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1603 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1604 if test -z "$CCOPTS"; then
1605 CCOPTS='-g -O2 -Wall'
1613 dnl See if we can use 64 bit file addresses
1614 largefile_support="no"
1619 dnl --------------------------------------------------------------------------
1620 dnl CHECKING FOR HEADER FILES
1621 dnl --------------------------------------------------------------------------
1660 AC_STRUCT_ST_BLKSIZE
1664 dnl --------------------------------------------------------------------------
1665 dnl Check for utime.h structure
1666 dnl --------------------------------------------------------------------------
1667 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1671 #include <sys/types.h>
1676 ba_cv_header_utime_h=yes
1678 ba_cv_header_utime_h=no
1683 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H, 1, [Set if utime.h exists])
1685 dnl --------------------------------------------------------------------------
1686 dnl Check for socklen_t
1687 dnl --------------------------------------------------------------------------
1688 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1692 #include <sys/types.h>
1693 #include <sys/socket.h>
1697 ba_cv_header_socklen_t=yes
1699 ba_cv_header_socklen_t=no
1704 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1706 dnl --------------------------------------------------------------------------
1707 dnl Check for bigendian
1708 dnl --------------------------------------------------------------------------
1709 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1713 main(){long a=1L; char *p=(char *)&a; exit(*p);}
1724 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1726 dnl --------------------------------------------------------------------------
1727 dnl Check for typeof()
1728 dnl --------------------------------------------------------------------------
1730 AC_CACHE_CHECK(for typeof, ba_cv_have_typeof,
1734 main(){char *a = 0; a = (typeof a)a;}
1736 ba_cv_have_typeof=yes
1738 ba_cv_have_typeof=no
1740 ba_cv_have_typeof=no
1745 test $ba_cv_have_typeof = yes && AC_DEFINE([HAVE_TYPEOF], 1, [Defind to 1 if compiler has typeof])
1750 dnl --------------------------------------------------------------------------
1751 dnl CHECKING FOR FILESYSTEM TYPE
1752 dnl --------------------------------------------------------------------------
1753 AC_MSG_CHECKING(how to get filesystem type)
1755 # The order of these tests is important.
1758 #include <sys/statvfs.h>
1759 #include <sys/fstyp.h>
1761 AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4
1763 if test $fstype = no; then
1766 #include <sys/statfs.h>
1767 #include <sys/fstyp.h>
1769 AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3
1772 if test $fstype = no; then
1775 #include <sys/statfs.h>
1776 #include <sys/vmount.h>
1778 AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX
1781 if test $fstype = no; then
1786 AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD
1789 if test $fstype = no; then
1790 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1792 if test $fstype = no; then
1795 #include <sys/mount.h>
1796 #include <sys/fs_types.h>
1798 AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix
1801 AC_MSG_RESULT($fstype)
1803 AC_CHECK_HEADER(sys/statvfs.h, [ AC_DEFINE(HAVE_SYS_STATVFS_H,1,[Defines if your system have the sys/statvfs.h header file])] , )
1805 dnl --------------------------------------------------------------------------
1806 dnl CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1807 dnl --------------------------------------------------------------------------
1815 AC_CHECK_TYPE(ino_t, unsigned long)
1816 AC_CHECK_TYPE(dev_t, unsigned long)
1817 AC_CHECK_TYPE(daddr_t, long)
1818 AC_CHECK_TYPE(major_t, int)
1819 AC_CHECK_TYPE(minor_t, int)
1820 AC_CHECK_TYPE(ssize_t, int)
1826 AC_CHECK_SIZEOF(char, 1)
1827 AC_CHECK_SIZEOF(short int, 2)
1828 AC_CHECK_SIZEOF(int, 4)
1829 AC_CHECK_SIZEOF(long int, 4)
1830 AC_CHECK_SIZEOF(long long int, 8)
1831 AC_CHECK_SIZEOF(int *, 4)
1833 dnl Check for sys/types.h types
1834 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int,
1838 #include <sys/types.h>
1842 ac_cv_have_u_int="yes"
1844 ac_cv_have_u_int="no"
1849 if test "x$ac_cv_have_u_int" = "xyes" ; then
1850 AC_DEFINE(HAVE_U_INT)
1854 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t,
1858 #include <sys/types.h>
1862 ac_cv_have_intmax_t="yes"
1870 ac_cv_have_intmax_t="yes"
1872 ac_cv_have_intmax_t="no"
1879 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1880 AC_DEFINE(HAVE_INTMAX_T)
1884 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t,
1888 #include <sys/types.h>
1890 u_intmax_t a; a = 1;
1892 ac_cv_have_u_intmax_t="yes"
1898 u_intmax_t a; a = 1;
1900 ac_cv_have_u_intmax_t="yes"
1902 ac_cv_have_u_intmax_t="no"
1909 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1910 AC_DEFINE(HAVE_U_INTMAX_T)
1914 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t,
1918 #include <sys/types.h>
1920 int8_t a; int16_t b; int32_t c; a = b = c = 1;
1922 ac_cv_have_intxx_t="yes"
1924 ac_cv_have_intxx_t="no"
1929 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1930 AC_DEFINE(HAVE_INTXX_T)
1934 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t,
1938 #include <sys/types.h>
1942 ac_cv_have_int64_t="yes"
1944 ac_cv_have_int64_t="no"
1949 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1950 AC_DEFINE(HAVE_INT64_T)
1954 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t,
1958 #include <sys/types.h>
1960 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
1962 ac_cv_have_u_intxx_t="yes"
1964 ac_cv_have_u_intxx_t="no"
1969 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1970 AC_DEFINE(HAVE_U_INTXX_T)
1974 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t,
1978 #include <sys/types.h>
1982 ac_cv_have_u_int64_t="yes"
1984 ac_cv_have_u_int64_t="no"
1989 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1990 AC_DEFINE(HAVE_U_INT64_T)
1994 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1995 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1997 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
2000 #include <sys/bitypes.h>
2002 int8_t a; int16_t b; int32_t c;
2003 u_int8_t e; u_int16_t f; u_int32_t g;
2004 a = b = c = e = f = g = 1;
2006 AC_DEFINE(HAVE_U_INTXX_T)
2007 AC_DEFINE(HAVE_INTXX_T)
2008 AC_DEFINE(HAVE_SYS_BITYPES_H)
2016 if test -z "$have_u_intxx_t" ; then
2017 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t,
2021 #include <sys/types.h>
2023 uint8_t a; uint16_t b;
2024 uint32_t c; a = b = c = 1;
2026 ac_cv_have_uintxx_t="yes"
2028 ac_cv_have_uintxx_t="no"
2033 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
2034 AC_DEFINE(HAVE_UINTXX_T)
2038 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
2039 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2041 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
2044 #include <sys/bitypes.h>
2046 int64_t a; u_int64_t b;
2049 AC_DEFINE(HAVE_U_INT64_T)
2050 AC_DEFINE(HAVE_INT64_T)
2058 if (test -z "$have_uintxx_t" && \
2059 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2061 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
2064 #include <sys/bitypes.h>
2066 uint8_t a; uint16_t b;
2067 uint32_t c; a = b = c = 1;
2069 AC_DEFINE(HAVE_UINTXX_T)
2077 dnl --------------------------------------------------------------------------
2078 dnl CHECKING FOR REQUIRED LIBRARY FUNCTIONS
2079 dnl --------------------------------------------------------------------------
2095 [echo 'configure: cannot find needed function.'; exit 1]
2098 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
2099 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
2100 AC_CHECK_FUNCS(posix_fadvise)
2101 AC_CHECK_FUNCS(fdatasync)
2103 AC_CHECK_FUNCS(chflags)
2105 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
2107 AC_CACHE_CHECK(for va_copy, ba_cv_va_copy,
2112 void use_va_copy(va_list args){va_list args2; va_copy(args2,args); va_end(args2);}
2113 void call_use_va_copy(int junk,...){va_list args; va_start(args,junk); use_va_copy(args); va_end(args);}
2115 call_use_va_copy(1,2,3)
2124 test $ba_cv_va_copy = yes && AC_DEFINE(HAVE_VA_COPY, 1, [Set if va_copy exists])
2126 dnl --------------------------------------------------------------------------
2127 dnl CHECKING FOR THREAD SAFE FUNCTIONS
2128 dnl --------------------------------------------------------------------------
2129 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
2131 # If resolver functions are not in libc check for -lnsl or -lresolv.
2132 AC_CHECK_FUNC(gethostbyname_r,
2133 AC_MSG_RESULT(using libc's resolver),
2134 AC_CHECK_LIB(nsl,gethostbyname_r)
2135 AC_CHECK_LIB(resolv,gethostbyname_r))
2137 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
2138 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
2139 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
2141 dnl ----------------------------
2142 dnl check sa_len of sockaddr
2143 dnl ----------------------------
2144 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
2148 #include <sys/socket.h>
2150 struct sockaddr s; s.sa_len;
2152 ac_cv_struct_sockaddr_sa_len=yes
2153 ], [ac_cv_struct_sockaddr_sa_len=no
2159 if test $ac_cv_struct_sockaddr_sa_len = yes; then
2160 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
2167 AC_FUNC_CLOSEDIR_VOID
2168 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
2169 # AC_FUNC_FNMATCH dnl use local version
2171 AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
2173 AC_CHECK_LIB(sun, getpwnam)
2175 AC_CHECK_HEADERS(zlib.h)
2176 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
2178 if test x$FDLIBS = x-lz; then
2179 AC_DEFINE(HAVE_LIBZ)
2184 dnl Check for ACL libraries
2187 AC_CHECK_HEADER(sys/acl.h)
2188 AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
2190 AC_CHECK_LIB(acl, acl_get_file,
2193 FDLIBS="-lacl $FDLIBS"
2195 AC_CHECK_LIB(sec, acltotext,
2198 FDLIBS="-lsec $FDLIBS"
2205 if test $have_acl = yes; then
2209 dnl Check for pthread libraries
2211 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
2213 AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
2215 AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
2217 AC_CHECK_FUNC(pthread_create)
2230 if test x$have_gcc = xyes ; then
2231 CPPFLAGS="$CPPFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
2232 CFLAGS="$CFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
2234 LDFLAGS=${LDFLAGS--O}
2235 DB_LIBS="${SQL_LFLAGS}"
2236 CPPFLAGS="$CPPFLAGS"
2249 AC_SUBST(X_EXTRA_LIBS)
2254 dnl extra configurable objects
2265 dnl Finally we set appropriate distribution specific
2266 dnl variables and defaults
2268 dnl PFILES are platform specific files
2269 PFILES="platforms/Makefile"
2273 hostname=`uname -n | cut -d '.' -f 1`
2274 if test x${hostname} = x ; then
2275 hostname="localhost"
2280 PSCMD="ps -e -o pid,comm"
2282 platforms/aix/Makefile"
2283 TAPEDRIVE="/dev/rmt0.1"
2287 PTHREAD_LIB="-lpthread -lexc"
2288 if test "${CC}" = "gcc" ; then
2295 TAPEDRIVE="/dev/nrmt0"
2298 DISTVER=`uname -a |awk '{print $3}'`
2299 TAPEDRIVE="/dev/nrmt0"
2300 PTHREAD_LIB="-pthread"
2301 CFLAGS="${CFLAGS} -pthread"
2302 PSCMD="ps -ax -o pid,command"
2306 platforms/bsdi/Makefile \
2307 platforms/bsdi/bacula-fd \
2308 platforms/bsdi/bacula-sd \
2309 platforms/bsdi/bacula-dir"
2310 largefile_support="yes"
2313 DISTVER=`uname -a |awk '{print $3}'`
2314 TAPEDRIVE="/dev/nrst0"
2317 WLDFLAGS="-mwindows"
2321 TAPEDRIVE="/dev/nst0"
2322 PSCMD="ps -e -o pid,command"
2325 platforms/darwin/Makefile"
2328 dnl Make sure hostname is resolved
2329 ping -c 1 $hostname 2>&1 1>/dev/null
2330 if test ! $? = 0; then
2331 hostname="localhost"
2333 if `test -f /etc/apt/sources.list && grep -q ubuntu /etc/apt/sources.list`; then
2336 DISTVER=`cat /etc/debian_version`
2337 if test -f /etc/lsb-release ; then
2339 if test "x$DISTRIB_ID" != "x" ; then
2340 DISTNAME=$DISTRIB_ID
2342 if test "x$DISTRIB_RELEASE" != "x" ; then
2343 DISTVER=$DISTRIB_RELEASE
2346 if test "$DISTNAME" = "Ubuntu" ; then
2349 TAPEDRIVE="/dev/nst0"
2350 PSCMD="ps -e -o pid,command"
2351 if test "$DISTNAME" = "ubuntu" ; then
2353 platforms/ubuntu/Makefile \
2354 platforms/ubuntu/bacula-fd \
2355 platforms/ubuntu/bacula-sd \
2356 platforms/ubuntu/bacula-dir"
2359 platforms/debian/Makefile \
2360 platforms/debian/bacula-fd \
2361 platforms/debian/bacula-sd \
2362 platforms/debian/bacula-dir"
2366 dnl Make sure hostname is resolved
2367 ping -c 1 $hostname 2>&1 1>/dev/null
2368 if test ! $? = 0; then
2369 hostname="localhost"
2371 DISTVER=`uname -a |awk '{print $3}'`
2372 VER=`echo $DISTVER | cut -c 1`
2373 if test x$VER = x4 ; then
2374 PTHREAD_LIB="${PTHREAD_LIBS:--pthread}"
2375 CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS:--pthread}"
2379 TAPEDRIVE="/dev/nrsa0"
2380 PSCMD="ps -ax -o pid,command"
2382 platforms/freebsd/Makefile \
2383 platforms/freebsd/bacula-fd \
2384 platforms/freebsd/bacula-sd \
2385 platforms/freebsd/bacula-dir"
2386 largefile_support="yes"
2389 PSCMD="UNIX95=1; ps -e -o pid,comm"
2390 CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
2392 TAPEDRIVE="/dev/rmt/0hnb"
2393 PTHREAD_LIB="-lpthread"
2394 AC_DEFINE([_INCLUDE_LONGLONG])
2398 TAPEDRIVE="/dev/rmt/0cbn"
2399 PSCMD="ps -e -o pid,comm"
2401 platforms/irix/Makefile \
2402 platforms/irix/bacula-fd \
2403 platforms/irix/bacula-sd \
2404 platforms/irix/bacula-dir"
2407 DISTVER=`uname -a |awk '{print $3}'`
2410 TAPEDRIVE="/dev/nrst0"
2411 PSCMD="ps -ax -o pid,command"
2412 PTHREAD_LIB="-pthread"
2413 CFLAGS="${CFLAGS} -pthread"
2416 DISTVER=`uname -a |awk '{print $3}'`
2419 TAPEDRIVE="/dev/nrst0"
2420 PSCMD="ps -ax -o pid,command"
2421 PTHREAD_LIB="-pthread"
2422 CFLAGS="${CFLAGS} -pthread"
2424 platforms/openbsd/Makefile \
2425 platforms/openbsd/bacula-fd \
2426 platforms/openbsd/bacula-sd \
2427 platforms/openbsd/bacula-dir"
2430 dnl Make sure hostname is resolved
2431 ping -c 1 $hostname 2>&1 1>/dev/null
2432 if test ! $? = 0; then
2433 hostname="localhost"
2435 if test -f /etc/whitebox-release ; then
2436 f=/etc/whitebox-release
2438 f=/etc/redhat-release
2440 if test `cat $f | grep release |\
2441 cut -f 3 -d ' '`x = "Enterprise"x ; then
2442 DISTVER="Enterprise "`cat $f | grep release |\
2445 DISTVER=`cat /etc/redhat-release | grep release |\
2448 TAPEDRIVE="/dev/nst0"
2449 PSCMD="ps -e -o pid,command"
2451 platforms/redhat/Makefile \
2452 platforms/redhat/bacula-fd \
2453 platforms/redhat/bacula-sd \
2454 platforms/redhat/bacula-dir \
2455 platforms/redhat/bacula.spec \
2459 dnl Make sure hostname is resolved
2460 ping -c 1 $hostname 2>&1 1>/dev/null
2461 if test ! $? = 0; then
2462 hostname="localhost"
2464 DISTVER=`cat /etc/mandrake-release | grep release |\
2466 TAPEDRIVE="/dev/nst0"
2467 PSCMD="ps -e -o pid,command"
2469 platforms/mandrake/Makefile \
2470 platforms/mandrake/bacula-fd \
2471 platforms/mandrake/bacula-sd \
2472 platforms/mandrake/bacula-dir \
2473 platforms/mandrake/bacula.spec \
2477 dnl Make sure hostname is resolved
2478 ping -c 1 $hostname 2>&1 1>/dev/null
2479 if test ! $? = 0; then
2480 hostname="localhost"
2482 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
2483 TAPEDRIVE="/dev/nst0"
2484 PSCMD="ps -e -o pid,command"
2486 platforms/gentoo/Makefile \
2487 platforms/gentoo/bacula-init \
2488 platforms/gentoo/bacula-fd \
2489 platforms/gentoo/bacula-sd \
2490 platforms/gentoo/bacula-dir"
2493 dnl Make sure hostname is resolved
2494 ping -c 1 $hostname 2>&1 1>/dev/null
2495 if test ! $? = 0; then
2496 hostname="localhost"
2498 DISTVER=`cat /etc/slackware-version`
2499 TAPEDRIVE="/dev/nst0"
2500 PSCMD="ps -e -o pid,command"
2502 platforms/slackware/Makefile \
2503 platforms/slackware/rc.bacula-fd \
2504 platforms/slackware/rc.bacula-sd \
2505 platforms/slackware/rc.bacula-dir\
2506 platforms/slackware/functions.bacula"
2510 TAPEDRIVE="/dev/rmt/0cbn"
2511 PSCMD="ps -e -o pid,comm"
2513 platforms/solaris/Makefile \
2514 platforms/solaris/bacula-fd \
2515 platforms/solaris/bacula-sd \
2516 platforms/solaris/bacula-dir"
2517 if test x$DISTVER = x5.6 ; then
2518 AC_DEFINE(HAVE_OLD_SOCKOPT)
2520 LIBS="$LIBS -lresolv"
2523 dnl Make sure hostname is resolved
2524 ping -c 1 $hostname 2>&1 1>/dev/null
2525 if test ! $? = 0; then
2526 hostname="localhost"
2528 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
2530 TAPEDRIVE="/dev/nst0"
2531 PSCMD="ps -e -o pid,command"
2533 platforms/suse/Makefile \
2534 platforms/suse/bacula-fd \
2535 platforms/suse/bacula-sd \
2536 platforms/suse/bacula-dir \
2537 platforms/suse/bacula \
2538 platforms/suse/bacula.spec"
2541 dnl Make sure hostname is resolved
2542 ping -c 1 $hostname 2>&1 1>/dev/null
2543 if test ! $? = 0; then
2544 hostname="localhost"
2548 TAPEDRIVE="/dev/nst0"
2549 PSCMD="ps -e -o pid,command"
2551 platforms/suse/Makefile \
2552 platforms/suse/bacula-fd \
2553 platforms/suse/bacula-sd \
2554 platforms/suse/bacula-dir"
2558 TAPEDRIVE="/dev/nst0"
2561 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
2567 LIBS="$PTHREAD_LIB $LIBS"
2569 AC_DEFINE_UNQUOTED(lld, "$lld")
2570 AC_DEFINE_UNQUOTED(llu, "$llu")
2578 dnl common parts of the Makefile
2579 MCOMMON=./autoconf/Make.common
2580 AC_SUBST_FILE(MCOMMON)
2583 if test "x${subsysdir}" = "x${sbindir}" ; then
2586 echo "You have set both --sbindir and --with-subsys-dir"
2587 echo " equal to: ${subsysdir} "
2588 echo "This is not permitted. Please reconfigure."
2590 echo "Aborting configuration ..."
2596 AC_OUTPUT([autoconf/Make.common \
2599 scripts/startmysql \
2601 scripts/btraceback \
2607 scripts/bacula-ctl-dir \
2608 scripts/bacula-ctl-fd \
2609 scripts/bacula-ctl-sd \
2610 scripts/devel_bacula \
2613 scripts/bacula.desktop.gnome1 \
2614 scripts/bacula.desktop.gnome2 \
2615 scripts/bacula.desktop.gnome1.consolehelper \
2616 scripts/bacula.desktop.gnome2.consolehelper \
2617 scripts/bacula.desktop.gnome1.xsu \
2618 scripts/bacula.desktop.gnome2.xsu \
2619 scripts/bgnome-console.console_apps \
2620 scripts/mtx-changer \
2621 scripts/disk-changer \
2622 scripts/dvd-handler \
2623 scripts/dvd-simulator \
2624 scripts/bacula-tray-monitor.desktop \
2625 scripts/logwatch/Makefile \
2626 scripts/logwatch/logfile.bacula.conf \
2627 scripts/wxconsole.console_apps \
2628 scripts/wxconsole.desktop.consolehelper \
2629 scripts/wxconsole.desktop.xsu \
2630 scripts/bat.desktop \
2631 scripts/bat.desktop.xsu \
2632 scripts/bat.desktop.consolehelper \
2633 scripts/bat.console_apps \
2636 src/console/Makefile \
2637 src/console/bconsole.conf \
2638 src/gnome2-console/Makefile \
2639 src/gnome2-console/bgnome-console.conf \
2640 src/qt-console/bat.conf \
2641 src/qt-console/bat.pro \
2642 src/qt-console/bat.pro.mingw32 \
2643 src/qt-console/install_conf_file \
2644 src/wx-console/Makefile \
2645 src/wx-console/bwx-console.conf \
2646 src/tray-monitor/Makefile \
2647 src/tray-monitor/tray-monitor.conf \
2649 src/dird/bacula-dir.conf \
2651 src/stored/Makefile \
2652 src/stored/bacula-sd.conf \
2653 src/filed/Makefile \
2654 src/filed/bacula-fd.conf \
2656 src/cats/make_catalog_backup \
2657 src/cats/delete_catalog_backup \
2658 src/cats/create_postgresql_database \
2659 src/cats/update_postgresql_tables \
2660 src/cats/make_postgresql_tables \
2661 src/cats/grant_postgresql_privileges \
2662 src/cats/drop_postgresql_tables \
2663 src/cats/drop_postgresql_database \
2664 src/cats/create_mysql_database \
2665 src/cats/update_mysql_tables \
2666 src/cats/make_mysql_tables \
2667 src/cats/grant_mysql_privileges \
2668 src/cats/drop_mysql_tables \
2669 src/cats/drop_mysql_database \
2670 src/cats/create_sqlite_database \
2671 src/cats/update_sqlite_tables \
2672 src/cats/make_sqlite_tables \
2673 src/cats/grant_sqlite_privileges \
2674 src/cats/drop_sqlite_tables \
2675 src/cats/drop_sqlite_database \
2676 src/cats/create_sqlite3_database \
2677 src/cats/update_sqlite3_tables \
2678 src/cats/make_sqlite3_tables \
2679 src/cats/grant_sqlite3_privileges \
2680 src/cats/drop_sqlite3_tables \
2681 src/cats/drop_sqlite3_database \
2684 src/cats/create_bdb_database \
2685 src/cats/update_bdb_tables \
2686 src/cats/make_bdb_tables \
2687 src/cats/grant_bdb_privileges \
2688 src/cats/drop_bdb_tables \
2689 src/cats/drop_bdb_database \
2690 src/cats/create_bacula_database \
2691 src/cats/update_bacula_tables \
2692 src/cats/grant_bacula_privileges \
2693 src/cats/make_bacula_tables \
2694 src/cats/drop_bacula_tables \
2695 src/cats/drop_bacula_database \
2696 src/findlib/Makefile \
2697 src/tools/Makefile \
2698 src/plugins/fd/Makefile \
2700 updatedb/update_mysql_tables_10_to_11 \
2701 updatedb/update_sqlite3_tables_10_to_11 \
2702 updatedb/update_postgresql_tables_10_to_11 \
2703 updatedb/update_sqlite_tables_10_to_11 \
2708 if test "${support_bat}" = "yes" ; then
2709 if test "x$QMAKE" = "xnone" && test "x$QMAKEQT4" = "xnone"; then
2710 echo "Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation"
2716 if test "x$QMAKEQT4" != "xnone"; then
2721 chmod 755 install_conf_file build-depkgs-qt-console
2722 echo "Creating bat Makefile"
2729 dnl if CC is gcc, we can rebuild the dependencies (since the depend rule
2730 dnl requires gcc). If it's not, don't rebuild dependencies
2732 if test X"$GCC" = "Xyes" ; then
2733 echo "Doing make of dependencies"
2734 ${MAKE:-make} depend
2738 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2739 chmod 755 dvd-handler dvd-simulator
2740 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2744 chmod 755 $c/update_mysql_tables_10_to_11 $c/update_sqlite3_tables_10_to_11
2745 chmod 755 $c/update_postgresql_tables_10_to_11 $c/update_sqlite_tables_10_to_11
2749 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2750 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2752 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2753 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2755 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2756 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2758 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2759 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2761 chmod 755 $c/create_sqlite3_database $c/update_sqlite3_tables $c/make_sqlite3_tables
2762 chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
2764 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2765 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2767 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2771 chmod 755 src/win32/build-depkgs-mingw32
2773 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2774 largefile_support="yes"
2777 dnl Only try to find out the version number of the compiler when we know its some kind of GCC compiler
2778 if test X"$GCC" = "Xyes" ; then
2780 dnl A whole lot of hand springs to get the compiler version.
2781 dnl This is because gcc changed the output in version 3.0
2783 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2784 if test "x${CCVERSION}" = "x" ; then
2785 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2787 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2788 if test x"${CXXVERSION}" = x ; then
2789 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2793 if test "x${db_type}" = "xInternal" ; then
2796 echo "You have not specified either --enable-client-only or one of the"
2797 echo " supported databases: MySQL, PostgreSQL, SQLite3, SQLite or DBI."
2798 echo " This is not permitted. Please reconfigure."
2800 echo "Aborting the configuration ..."
2807 Configuration on `date`:
2809 Host: ${host}${post_host} -- ${DISTNAME} ${DISTVER}
2810 Bacula version: ${BACULA} ${VERSION} (${DATE})
2811 Source code location: ${srcdir}
2812 Install binaries: ${sbindir}
2813 Install libraries: ${libdir}
2814 Install config files: ${sysconfdir}
2815 Scripts directory: ${scriptdir}
2816 Archive directory: ${archivedir}
2817 Working directory: ${working_dir}
2818 PID directory: ${piddir}
2819 Subsys directory: ${subsysdir}
2820 Man directory: ${mandir}
2821 Data directory: ${datarootdir}
2822 C Compiler: ${CC} ${CCVERSION}
2823 C++ Compiler: ${CXX} ${CXXVERSION}
2824 Compiler flags: ${WCFLAGS} ${CFLAGS}
2825 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2827 Statically Linked Tools: ${support_static_tools}
2828 Statically Linked FD: ${support_static_fd}
2829 Statically Linked SD: ${support_static_sd}
2830 Statically Linked DIR: ${support_static_dir}
2831 Statically Linked CONS: ${support_static_cons}
2832 Database type: ${db_type}
2833 Database port: ${db_port}
2834 Database lib: ${DB_LIBS}
2835 Database name: ${db_name}
2836 Database user: ${db_user}
2838 Job Output Email: ${job_email}
2839 Traceback Email: ${dump_email}
2840 SMTP Host Address: ${smtp_host}
2842 Director Port: ${dir_port}
2843 File daemon Port: ${fd_port}
2844 Storage daemon Port: ${sd_port}
2846 Director User: ${dir_user}
2847 Director Group: ${dir_group}
2848 Storage Daemon User: ${sd_user}
2849 Storage DaemonGroup: ${sd_group}
2850 File Daemon User: ${fd_user}
2851 File Daemon Group: ${fd_group}
2853 SQL binaries Directory ${SQL_BINDIR}
2855 Large file support: $largefile_support
2856 Bacula conio support: ${got_conio} ${CONS_LIBS}
2857 readline support: ${got_readline} ${PRTREADLINE_SRC}
2858 TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
2859 TLS support: ${support_tls}
2860 Encryption support: ${support_crypto}
2861 ZLIB support: ${have_zlib}
2862 enable-smartalloc: ${support_smartalloc}
2863 bat support: ${support_bat} ${QWT_LDFLAGS}
2864 enable-gnome: ${support_gnome} ${gnome_version}
2865 enable-bwx-console: ${support_wx_console} ${wx_version}
2866 enable-tray-monitor: ${support_tray_monitor}
2867 client-only: ${build_client_only}
2868 build-dird: ${build_dird}
2869 build-stored: ${build_stored}
2870 ACL support: ${have_acl}
2871 Python support: ${support_python} ${PYTHON_LIBS}
2872 Batch insert enabled: ${support_batch_insert}