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 AC_ARG_ENABLE(libtool,
127 AC_HELP_STRING([--enable-libtool], [enable building using GNU libtool @<:@default=yes@:>@]),
129 if test x$enableval = xno; then
134 LT_INIT([shared disable-static])
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 Include file handling
168 dnl --------------------------------------------------
169 AC_ARG_ENABLE(includes,
170 AC_HELP_STRING([--enable-includes], [enable installing of include files @<:@default=no@:>@]),
172 if test x$enableval = xyes; then
178 dnl It only makes sense to install include files when you install libraries which only happens when
179 dnl libtool is enabled
181 if test x$use_libtool != xno -a x$install_includes = xyes; then
182 INCLUDE_INSTALL_TARGET="install-includes"
183 INCLUDE_UNINSTALL_TARGET="uninstall-includes"
185 INCLUDE_INSTALL_TARGET=""
186 INCLUDE_UNINSTALL_TARGET=""
188 AC_SUBST(INCLUDE_INSTALL_TARGET)
189 AC_SUBST(INCLUDE_UNINSTALL_TARGET)
191 dnl --------------------------------------------------
192 dnl Bacula OP Sys determination (see aclocal.m4)
193 dnl --------------------------------------------------
196 dnl -----------------------------------------------------------
197 dnl Bacula OPSys Distribution determination (see aclocal.m4)
198 dnl ----------------------------------------------------------
199 BA_CHECK_OPSYS_DISTNAME
201 dnl --------------------------------------------------
202 dnl Suppport for gettext (translations)
203 dnl By default, $datarootdir is ${prefix}/share
204 dnl --------------------------------------------------
205 AM_GNU_GETTEXT([external])
206 if test x${prefix} = xNONE ; then
207 if test `eval echo ${datarootdir}` = NONE/share ; then
208 datarootdir=/usr/share
212 dnl ------------------------------------------------------------------
213 dnl If the user has not set --prefix, we set our default to nothing.
214 dnl In this case, if the user has not set --sysconfdir, we set it
215 dnl to the package default of /etc/bacula. If either --prefix or
216 dnl --sysconfdir is set, we leave sysconfdir alone except to eval it.
217 dnl If the user has not set --libdir, we set it to the package
218 dnl default of /usr/lib. If either --prefix or --libdir is set,
219 dnl we leave libdir alone except to eval it. If the user has not set
220 dnl --includedir, we set it to the package default of /usr/include.
221 dnl If either --prefix or --includedir is set, we leave includedir
222 dnl alone except to eval it
223 dnl ------------------------------------------------------------------
224 if test x${prefix} = xNONE ; then
225 if test `eval echo ${sysconfdir}` = NONE/etc ; then
226 sysconfdir=/etc/bacula
229 if test `eval echo ${libdir}` = NONE/lib ; then
233 if test `eval echo ${includedir}` = NONE/include ; then
234 includedir=/usr/include
240 dnl -------------------------------------------------------------------------
241 dnl If the user has not set --exec-prefix, we default to ${prefix}
242 dnl -------------------------------------------------------------------------
243 if test x${exec_prefix} = xNONE ; then
244 exec_prefix=${prefix}
247 sysconfdir=`eval echo ${sysconfdir}`
248 datarootdir=`eval echo ${datarootdir}`
249 libdir=`eval echo ${libdir}`
250 includedir=`eval echo ${includedir}`
251 localedir=`eval echo ${datarootdir}/locale`
252 AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir")
253 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
255 dnl ------------------------------------------------------------------
256 dnl If the user has not set --sbindir, we set our default as /sbin
257 dnl ------------------------------------------------------------------
258 if test x$sbindir = x'${exec_prefix}/sbin' ; then
259 sbindir=${exec_prefix}/sbin
261 sbindir=`eval echo ${sbindir}`
263 dnl -------------------------------------------------------------------------
264 dnl If the user has not set --mandir, we default to /usr/share/man
265 dnl -------------------------------------------------------------------------
266 if test x$mandir = x'${prefix}/man' ; then
267 mandir=/usr/share/man
270 AC_PATH_PROGS(MSGFMT, msgfmt, no)
271 if test "$MSGFMT" = "no"
273 echo 'msgfmt program not found, disabling NLS !'
275 USE_INCLUDED_LIBINTL=no
283 support_postgresql=no
285 support_smartalloc=yes
290 support_wx_console=no
291 support_tray_monitor=no
296 support_static_tools=no
299 support_static_dir=no
300 support_static_cons=no
309 dnl --------------------------------------------------------------------------
310 dnl CHECKING COMMAND LINE OPTIONS
311 dnl --------------------------------------------------------------------------
313 dnl -------------------------------------------
314 dnl gnome (default off)
315 dnl -------------------------------------------
317 AC_HELP_STRING([--enable-gnome], [enable build of bgnome-console GUI @<:@default=no@:>@]),
319 if test x$enableval = xyes; then
326 if test x$support_gnome = xyes; then
327 abc=`$PKGCONFIG --exists libgnomeui-2.0`
329 if test $pkg = 0; then
330 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
331 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
332 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
333 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
334 AC_SUBST(GNOME_INCLUDEDIR)
335 AC_SUBST(GNOMEUI_LIBS)
336 AC_SUBST(GNOME_LIBDIR)
338 GNOME_DIR=src/gnome2-console
339 gnome_version="Version 2.x"
341 AC_MSG_ERROR(Unable to find Gnome 2 installation)
346 dnl -------------------------------------------
347 dnl bat (default off)
348 dnl -------------------------------------------
350 AC_HELP_STRING([--enable-bat], [enable build of bat Qt4 GUI @<:@default=no@:>@]),
352 if test x$enableval = xyes; then
353 AC_DEFINE(HAVE_BAT, 1, [Set if Bacula bat Qt4 GUI support enabled])
360 if test x$support_bat = xyes; then
361 abc=`$PKGCONFIG --atleast-version=4.2 QtGui`
363 if test $pkg = 0; then
364 BAT_DIR=src/qt-console
366 AC_MSG_ERROR(Unable to find Qt4 installation needed by bat)
371 dnl If bat is enabled, we need the qwt library
379 if test x$support_bat = xyes; then
380 AC_MSG_CHECKING(for qwt support)
382 AC_HELP_STRING([--with-qwt@<:@=DIR@:>@], [specify qwt library directory]),
389 if test -f ${with_qwt}/include/qwt.h; then
390 QWT_INC="${with_qwt}/include"
391 QWT_LDFLAGS="-L${with_qwt}/lib"
401 dnl Search in standard places, or --with-qwt not specified
403 if test $no_qwt = no; then
404 if test x$QWT_INC = x; then
405 for root in /usr /usr/local; do
406 for ver in qwt qwt5 qwt-qt4; do
407 if test -f ${root}/include/${ver}/qwt.h; then
408 QWT_INC="${root}/include/${ver}"
409 if test -d ${root}/lib64/; then
410 QWT_LDFLAGS="-L${root}/lib64"
411 elif test -d ${root}/lib/64/; then
412 QWT_LDFLAGS="-L${root}/64"
414 QWT_LDFLAGS="-L${root}/lib"
425 if test x$QWT_INC = x; then
428 AC_DEFINE(HAVE_QWT, 1, [Set if bat QWT library found])
435 AC_SUBST(QWT_LDFLAGS)
439 dnl -------------------------------------------
440 dnl bwx-console (default off)
441 dnl -------------------------------------------
442 AC_ARG_ENABLE(bwx-console,
443 AC_HELP_STRING([--enable-bwx-console], [enable build of wxWidgets console @<:@default=no@:>@]),
445 if test x$enableval = xyes; then
446 support_wx_console=yes
452 if test x$support_wx_console = xyes; then
453 abc=`$WXCONFIG $WXFLAGS --cppflags`
455 if test $pkg = 0; then
456 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
457 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
458 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
460 AC_SUBST(WXCONS_CPPFLAGS)
461 AC_SUBST(WXCONS_LDFLAGS)
462 WX_DIR=src/wx-console
465 echo "wx-config program not found. bwx-console disabled."
467 support_wx_console=no
472 dnl -------------------------------------------
473 dnl tray-monitor (default off)
474 dnl -------------------------------------------
475 AC_ARG_ENABLE(tray-monitor,
476 AC_HELP_STRING([--enable-tray-monitor], [enable build of Gnome tray monitor (compatible with KDE @<:@default=no@:>@]),
478 if test x$enableval = xyes; then
479 support_tray_monitor=yes
485 if test x$support_tray_monitor = xyes; then
486 abc=`$PKGCONFIG --exists gtk+-2.0`
488 if test $pkg = 0; then
489 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
490 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
491 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
492 AC_SUBST(TRAY_MONITOR_LDFLAGS)
493 TRAY_MONITOR_DIR=src/tray-monitor
494 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
496 if test $pkg = 0; then
497 AC_DEFINE(HAVE_GTK_2_4, 1, [Set if you have GTK 4.2 or greater loaded])
501 AC_SUBST(TRAY_MONITOR_DIR)
503 dnl -------------------------------------------
504 dnl smartalloc (default off)
505 dnl -------------------------------------------
506 AC_ARG_ENABLE(smartalloc,
507 AC_HELP_STRING([--enable-smartalloc], [enable smartalloc debugging support @<:@default=no@:>@]),
509 if test x$enableval = xno; then
510 support_smartalloc=no
515 if test x$support_smartalloc = xyes; then
516 AC_DEFINE(SMARTALLOC, 1, [Set if you want Smartalloc enabled])
519 dnl -------------------------------------------
520 dnl static-tools (default off)
521 dnl -------------------------------------------
522 AC_ARG_ENABLE(static-tools,
523 AC_HELP_STRING([--enable-static-tools], [enable static tape tools @<:@default=no@:>@]),
525 if test x$enableval = xyes; then
526 support_static_tools=yes
532 if test x$support_static_tools = xyes; then
533 TTOOL_LDFLAGS="-static"
535 AC_SUBST(TTOOL_LDFLAGS)
537 dnl -------------------------------------------
538 dnl static-fd (default off)
539 dnl -------------------------------------------
540 AC_ARG_ENABLE(static-fd,
541 AC_HELP_STRING([--enable-static-fd], [enable static File daemon @<:@default=no@:>@]),
543 if test x$enableval = xyes; then
544 support_static_fd=yes
550 if test x$support_static_fd = xyes; then
551 STATIC_FD="static-bacula-fd"
555 dnl -------------------------------------------
556 dnl static-sd (default off)
557 dnl -------------------------------------------
558 AC_ARG_ENABLE(static-sd,
559 AC_HELP_STRING([--enable-static-sd], [enable static Storage daemon @<:@default=no@:>@]),
561 if test x$enableval = xyes; then
562 support_static_sd=yes
568 if test x$support_static_sd = xyes; then
569 STATIC_SD="static-bacula-sd"
573 dnl -------------------------------------------
574 dnl static-dir (default off)
575 dnl -------------------------------------------
576 AC_ARG_ENABLE(static-dir,
577 AC_HELP_STRING([--enable-static-dir], [enable static Director @<:@default=no@:>@]),
579 if test x$enableval = xyes; then
580 support_static_dir=yes
586 if test x$support_static_dir = xyes; then
587 STATIC_DIR="static-bacula-dir"
591 dnl -------------------------------------------
592 dnl static-cons (default off)
593 dnl -------------------------------------------
594 AC_ARG_ENABLE(static-cons,
595 AC_HELP_STRING([--enable-static-cons], [enable static Console @<:@default=no@:>@]),
597 if test x$enableval = xyes; then
598 support_static_cons=yes
606 if test x$support_static_cons = xyes; then
607 STATIC_CONS="static-bconsole"
608 STATIC_GNOME_CONS="static-bgnome-console"
609 STATIC_WX_CONS="static-bwx-console"
611 AC_SUBST(STATIC_CONS)
612 AC_SUBST(STATIC_GNOME_CONS)
613 AC_SUBST(STATIC_WX_CONS)
615 dnl -------------------------------------------
616 dnl client_only (default off)
617 dnl -------------------------------------------
618 AC_ARG_ENABLE(client-only,
619 AC_HELP_STRING([--enable-client-only], [build client (File daemon) only @<:@default=no@:>@]),
621 if test x$enableval = xyes; then
622 build_client_only=yes
628 if test x$build_client_only = xno; then
635 dnl -------------------------------------------
636 dnl director (default on)
637 dnl -------------------------------------------
638 AC_ARG_ENABLE(build-dird,
639 AC_HELP_STRING([--enable-build-dird], [enable building of dird (Director) @<:@default=yes@:>@]),
641 if test x$enableval = xno; then
646 if test x$build_dird = xyes; then
651 DIR_TOOLS="NODIRTOOLS"
656 dnl -------------------------------------------
657 dnl stored (default on)
658 dnl -------------------------------------------
659 AC_ARG_ENABLE(build-stored,
660 AC_HELP_STRING([--enable-build-stored], [enable building of stored (Storage daemon) @<:@default=yes@:>@]),
662 if test x$enableval = xno; then
667 if test x$build_stored = xyes; then
668 STORED_DIR="src/stored"
674 dnl ---------------------------------------------------
675 dnl Check for conio (Bacula readline substitute)(
676 dnl ---------------------------------------------------
677 dnl this allows you to turn it completely off
679 AC_HELP_STRING([--disable-conio], [disable conio support @<:@default=no@:>@]),
681 if test x$enableval = xno; then
688 dnl ---------------------------------------------------
689 dnl Check for IPv6 support
690 dnl ---------------------------------------------------
691 dnl this allows you to turn it completely off
694 AC_HELP_STRING([--enable-ipv6], [enable ipv6 support @<:@default=yes@:>@]),
696 if test x$enableval = xno; then
702 if test x$support_ipv6 = xyes; then
703 AC_TRY_LINK([ #include <sys/types.h>
704 #include <sys/socket.h>
705 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;],
706 [support_ipv6=yes], [support_ipv6=no])
709 if test x$support_ipv6 = xyes; then
710 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
714 if test x$support_conio = xyes; then
715 AC_CHECK_HEADER(termcap.h,
716 [ AC_CHECK_LIB(termcap, tgetent,
717 [ CONS_LIBS="-ltermcap"
722 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
724 [ AC_CHECK_LIB(ncurses, tgetent,
725 [ CONS_LIBS="-lncurses"
730 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
735 AC_CHECK_HEADERS(curses.h)
736 AC_CHECK_HEADER(term.h,
737 [ AC_CHECK_LIB(curses, tgetent,
738 [ CONS_LIBS="-lcurses"
743 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
746 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
755 dnl ---------------------------------------------------
756 dnl Check for readline support/directory (default off)
757 dnl ---------------------------------------------------
758 dnl this allows you to turn it completely off
759 AC_ARG_ENABLE(readline,
760 AC_HELP_STRING([--disable-readline], [disable readline support @<:@default=yes@:>@]),
762 if test x$enableval = xno; then
770 if test x$support_readline = xyes; then
771 AC_ARG_WITH(readline,
772 AC_HELP_STRING([--with-readline@<:@=DIR@:>@], [specify readline library directory]),
774 case "$with_readline" in
779 if test -f ${with_readline}/readline.h; then
780 CONS_INC="-I${with_readline}"
781 CONS_LDFLAGS="-L$with_readline"
782 elif test -f ${with_readline}/include/readline/readline.h; then
783 CONS_INC="-I${with_readline}/include/readline"
784 CONS_LDFLAGS="-L${with_readline}/lib"
785 with_readline="${with_readline}/include/readline"
787 with_readline="/usr/include/readline"
790 AC_CHECK_HEADER(${with_readline}/readline.h,
792 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
793 CONS_LIBS="-lreadline -lhistory -ltermcap"
797 echo "readline.h not found. readline turned off ..."
804 dnl check for standard readline library
805 AC_CHECK_HEADER(/usr/include/readline/readline.h,
807 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
809 CONS_INC="-I/usr/include/readline"
810 CONS_LIBS="-lreadline -ltermcap"
812 dnl Did not find standard library, so try Bacula's default
813 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
815 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
817 CONS_INC="-I${TOP_DIR}/depkgs/readline"
818 CONS_LIBS="-lreadline -lhistory -ltermcap"
819 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
820 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
823 echo "readline.h not found. readline turned off ..."
837 AC_SUBST(CONS_LDFLAGS)
838 AC_SUBST(READLINE_SRC)
840 dnl Minimal stuff for readline Makefile configuration
845 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr lstat lchown)
846 AC_CHECK_FUNCS(nanosleep nl_langinfo)
847 AC_CHECK_HEADERS(varargs.h)
849 dnl End of readline/conio stuff
850 dnl -----------------------------------------------------------------------
852 dnl -----------------------------------------------------------------------
853 dnl Check for Python support
855 AC_MSG_CHECKING(for Python support)
857 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.]),
861 if test "$withval" != "no"; then
862 if test "$withval" = "yes"; then
863 for python_root in /usr /usr/local /usr/sfw; do
864 for ver in python2.2 python2.3 python2.4 python2.5; do
865 if test -f $python_root/include/${ver}/Python.h; then
866 PYTHON_INCDIR=-I$python_root/include/${ver}
867 if test -d $python_root/lib64/${ver}/config; then
868 PYTHON_LIBS="-L$python_root/lib64/${ver}/config -l${ver}"
870 PYTHON_LIBS="-L$python_root/lib/${ver}/config -l${ver}"
877 if test x$PYTHON_INCDIR = x; then
878 if test -f $prefix/include/Python.h; then
879 PYTHON_INCDIR=-I$prefix/include
880 if test -d $prefix/lib64/config; then
881 PYTHON_LIBS="-L$prefix/lib64/config -lpython"
883 PYTHON_LIBS="-L$prefix/lib/config -lpython"
887 AC_MSG_ERROR(Unable to find Python.h in standard locations)
891 if test -f $withval/Python.h; then
892 PYTHON_INCDIR=-I$withval
893 PYTHON_LIBS="-L$withval/config -lpython"
894 elif test -f $withval/include/Python.h; then
895 PYTHON_INCDIR=-I$withval/include
896 if test -d $withval/lib64/config; then
897 PYTHON_LIBS="-L$withval/lib64/config -lpython"
899 PYTHON_LIBS="-L$withval/lib/config -lpython"
901 elif test -f $withval/include/python/Python.h; then
902 PYTHON_INCDIR=-I$withval/include/python
903 if test -d $withval/lib64/python/config; then
904 PYTHON_LIBS="-L$withval/lib64/python/config -lpython"
906 PYTHON_LIBS="-L$withval/lib/python/config -lpython"
910 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
914 AC_DEFINE([HAVE_PYTHON], 1)
917 AC_MSG_NOTICE(checking for more Python libs)
918 saved_LIBS="$LIBS"; LIBS=
919 AC_SEARCH_LIBS(shm_open, [rt])
920 AC_CHECK_LIB(util, openpty)
921 PYTHON_LIBS="$PYTHON_LIBS $LIBS"
930 AC_SUBST(PYTHON_LIBS)
931 AC_SUBST(PYTHON_INCDIR)
934 dnl Find where sockets are (especially for Solaris)
935 dnl Do this before the TCP Wrappers test since tcp wrappers
936 dnl uses the socket library and some linkers are stupid.
938 AC_CHECK_FUNC(socket,
939 AC_MSG_RESULT(using libc's socket),
940 AC_CHECK_LIB(xnet,socket)
941 AC_CHECK_LIB(socket,socket)
942 AC_CHECK_LIB(inet,socket))
944 dnl -----------------------------------------------------------
945 dnl Check whether user wants TCP wrappers support (default off)
946 dnl -----------------------------------------------------------
949 AC_ARG_WITH(tcp-wrappers,
950 AC_HELP_STRING([--with-tcp-wrappers@<:@=DIR@:>@], [enable tcpwrappers support]),
952 if test "x$withval" != "xno" ; then
954 LIBS="$saved_LIBS -lwrap"
955 AC_MSG_CHECKING(for libwrap)
956 AC_SEARCH_LIBS(nanosleep, [rt])
959 #include <sys/types.h>
961 int deny_severity = 0;
962 int allow_severity = 0;
963 struct request_info *req;
968 AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
973 LIBS="$saved_LIBS -lwrap -lnsl"
974 WRAPLIBS="$saved_LIBS -lwrap -lnsl"
977 #include <sys/types.h>
979 int deny_severity = 0;
980 int allow_severity = 0;
981 struct request_info *req;
986 AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
991 AC_MSG_ERROR([*** libwrap missing])
1000 dnl -----------------------------------------------------------
1001 dnl Check whether OpenSSL is available
1002 dnl -----------------------------------------------------------
1003 AC_MSG_CHECKING([for OpenSSL])
1004 dnl The following uses quadrigraphs:
1007 AC_ARG_WITH(openssl,
1008 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
1010 with_openssl_directory=${withval}
1014 if test "x$with_openssl_directory" != "xno"; then
1015 OPENSSL_LIBS="-lssl -lcrypto"
1018 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
1020 # Make sure the $with_openssl_directory also makes sense
1022 if test -d "$with_openssl_directory/lib" -a -d "$with_openssl_directory/include"; then
1023 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
1024 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
1028 saved_LIBS="${LIBS}"
1029 saved_CFLAGS="${CFLAGS}"
1030 LIBS="${saved_LIBS} ${OPENSSL_LIBS}"
1031 CFLAGS="${saved_CFLAGS} ${OPENSSL_INC}"
1035 #include <openssl/ssl.h>
1037 CRYPTO_set_id_callback(NULL);
1040 support_crypto="yes"
1048 #include <openssl/evp.h>
1052 ac_cv_openssl_sha2="yes"
1054 ac_cv_openssl_sha2="no"
1058 dnl Solaris disables greater than 128+ bit encryption in their OpenSSL
1059 dnl implementation, presumably for export reasons. If 192bit AES
1060 dnl is available, we assume that we're running with a 'non-export'
1061 dnl openssl library.
1064 #include <openssl/evp.h>
1068 ac_cv_openssl_export="no"
1070 ac_cv_openssl_export="yes"
1074 LIBS="${saved_LIBS}"
1075 CFLAGS="${saved_CFLAGS}"
1077 if test "$support_tls" = "yes"; then
1078 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
1079 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
1080 AC_DEFINE(HAVE_CRYPTO, 1, [Define if encryption support should be enabled])
1083 if test "$ac_cv_openssl_sha2" = "yes"; then
1084 AC_DEFINE(HAVE_SHA2, 1, [Define if the SHA-2 family of digest algorithms is available])
1087 if test "$ac_cv_openssl_export" = "yes"; then
1088 AC_DEFINE(HAVE_OPENSSL_EXPORT_LIBRARY, 1, [Define if the OpenSSL library is export-contrained to 128bit ciphers])
1097 AC_MSG_RESULT([$support_tls])
1098 AC_SUBST(OPENSSL_LIBS)
1099 AC_SUBST(OPENSSL_INC)
1101 dnl -----------------------------------------------------------
1102 dnl dlopen is needed for plugins
1103 dnl -----------------------------------------------------------
1104 AC_SEARCH_LIBS(dlopen, [dl])
1106 dnl ------------------------------------------
1107 dnl Where to place working dir
1108 dnl ------------------------------------------
1109 working_dir=`eval echo ${prefix}/var/bacula/working`
1110 AC_ARG_WITH(working-dir,
1111 AC_HELP_STRING([--with-working-dir=PATH], [specify path of Bacula working directory]),
1113 if test "x$withval" != "xno" ; then
1114 working_dir=$withval
1119 AC_SUBST(working_dir)
1121 dnl ------------------------------------------------------------------
1122 dnl If the user has not set archivedir, we set our default as /tmp
1123 dnl ------------------------------------------------------------------
1125 AC_ARG_WITH(archivedir,
1126 AC_HELP_STRING([--with-archivedir=PATH], [specify path of SD archive directory]),
1128 if test "x$withval" != "xno" ; then
1134 AC_SUBST(archivedir)
1136 dnl ------------------------------------------
1137 dnl Where to place scriptdir (script files)
1138 dnl ------------------------------------------
1139 scriptdir=`eval echo ${sysconfdir}`
1140 AC_ARG_WITH(scriptdir,
1141 AC_HELP_STRING([--with-scriptdir=PATH], [specify path of Bacula scripts directory]),
1143 if test "x$withval" != "xno" ; then
1151 # ------------------------------------------
1152 # Where to place plugindir (plugin files)
1153 # ------------------------------------------
1154 plugindir=`eval echo ${sysconfdir}`
1155 AC_ARG_WITH(plugindir,
1156 AC_HELP_STRING([--with-plugindir=PATH], [specify path of Bacula plugins directory]),
1158 if test "x$withval" != "xno" ; then
1166 dnl ------------------------------------------
1167 dnl Where to send dump email
1168 dnl ------------------------------------------
1169 dump_email=root@localhost
1170 AC_ARG_WITH(dump-email,
1171 AC_HELP_STRING([--with-dump-email=EMAIL], [dump email address]),
1173 if test "x$withval" != "xno" ; then
1179 AC_SUBST(dump_email)
1181 dnl ------------------------------------------
1182 dnl Where to send job email
1183 dnl ------------------------------------------
1184 job_email=root@localhost
1185 AC_ARG_WITH(job-email,
1186 AC_HELP_STRING([--with-job-email=EMAIL], [job output email address]),
1188 if test "x$withval" != "xno" ; then
1196 dnl ------------------------------------------
1197 dnl Where to find smtp host
1198 dnl ------------------------------------------
1200 AC_ARG_WITH(smtp_host,
1201 AC_HELP_STRING([--with-smtp-host=HOST], [SMTP mail host address]),
1203 if test "x$withval" != "xno" ; then
1211 dnl ------------------------------------
1212 dnl Where to place pid files
1213 dnl ------------------------------------
1215 AC_ARG_WITH(pid-dir,
1216 AC_HELP_STRING([--with-pid-dir=PATH], [specify location of Bacula pid files]),
1218 if test "x$withval" != "xno" ; then
1224 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
1227 dnl ------------------------------------
1228 dnl Where to place subsys "lock file"
1229 dnl ------------------------------------
1230 subsysdir=/var/run/subsys
1231 if test -d /var/run/subsys; then
1232 subsysdir=/var/run/subsys
1233 elif test -d /var/lock/subsys; then
1234 subsysdir=/var/lock/subsys
1236 subsysdir=/var/run/subsys
1238 AC_ARG_WITH(subsys-dir,
1239 AC_HELP_STRING([--with-subsys-dir=PATH], [specify location of Bacula subsys file]),
1241 if test "x$withval" != "xno" ; then
1249 dnl ------------------------------------
1250 dnl Where to start assigning ports
1251 dnl ------------------------------------
1253 AC_ARG_WITH(baseport,
1254 AC_HELP_STRING([--with-baseport=PORT], [specify base port address for daemons]),
1256 if test "x$withval" != "xno" ; then
1263 dir_port=`expr $baseport`
1264 fd_port=`expr $baseport + 1`
1265 sd_port=`expr $fd_port + 1`
1271 dnl ------------------------------------------
1272 dnl Generate passwords
1273 dnl ------------------------------------------
1275 AC_ARG_WITH(dir-password,
1276 AC_HELP_STRING([--with-dir-password=PASSWORD], [specify Director's password]),
1278 if test "x$withval" != "xno" ; then
1279 dir_password=$withval
1284 if test "x$dir_password" = "x" ; then
1285 if test "x$OPENSSL" = "xnone" ; then
1286 key=`autoconf/randpass 33`
1288 key=`openssl rand -base64 33`
1294 AC_ARG_WITH(fd-password,
1295 AC_HELP_STRING([--with-fd-password=PASSWORD], [specify Client's password]),
1297 if test "x$withval" != "xno" ; then
1298 fd_password=$withval
1303 if test "x$fd_password" = "x" ; then
1304 if test "x$OPENSSL" = "xnone" ; then
1305 key=`autoconf/randpass 37`
1307 key=`openssl rand -base64 33`
1313 AC_ARG_WITH(sd-password,
1314 AC_HELP_STRING([--with-sd-password=PASSWORD], [specify Storage daemon's password]),
1316 if test "x$withval" != "xno" ; then
1317 sd_password=$withval
1322 if test "x$sd_password" = "x" ; then
1323 if test "x$OPENSSL" = "xnone" ; then
1324 key=`autoconf/randpass 41`
1326 key=`openssl rand -base64 33`
1332 AC_ARG_WITH(mon-dir-password,
1333 AC_HELP_STRING([--with-mon-dir-password=PASSWORD], [specify Director's password used by the monitor]),
1335 if test "x$withval" != "xno" ; then
1336 mon_dir_password=$withval
1341 if test "x$mon_dir_password" = "x" ; then
1342 if test "x$OPENSSL" = "xnone" ; then
1343 key=`autoconf/randpass 33`
1345 key=`openssl rand -base64 33`
1347 mon_dir_password=$key
1351 AC_ARG_WITH(mon-fd-password,
1352 AC_HELP_STRING([--with-mon-fd-password=PASSWORD], [specify Client's password used by the monitor]),
1354 if test "x$withval" != "xno" ; then
1355 mon_fd_password=$withval
1360 if test "x$mon_fd_password" = "x" ; then
1361 if test "x$OPENSSL" = "xnone" ; then
1362 key=`autoconf/randpass 37`
1364 key=`openssl rand -base64 33`
1366 mon_fd_password=$key
1370 AC_ARG_WITH(mon-sd-password,
1371 AC_HELP_STRING([--with-mon-sd-password=PASSWORD], [specify Storage daemon's password used by the monitor]),
1373 if test "x$withval" != "xno" ; then
1374 mon_sd_password=$withval
1379 if test "x$mon_sd_password" = "x" ; then
1380 if test "x$OPENSSL" = "xnone" ; then
1381 key=`autoconf/randpass 41`
1383 key=`openssl rand -base64 33`
1385 mon_sd_password=$key
1388 AC_SUBST(dir_password)
1389 AC_SUBST(fd_password)
1390 AC_SUBST(sd_password)
1391 AC_SUBST(mon_dir_password)
1392 AC_SUBST(mon_fd_password)
1393 AC_SUBST(mon_sd_password)
1396 dnl Pickup any database name
1399 AC_ARG_WITH(db_name,
1400 AC_HELP_STRING([--with-db-name=DBNAME], [specify database name @<:@default=bacula@:>@]),
1402 if test "x$withval" != "x" ; then
1410 AC_ARG_WITH(db_user,
1411 AC_HELP_STRING([--with-db-user=UNAME], [specify database user @<:@default=bacula@:>@]),
1413 if test "x$withval" != "x" ; then
1421 AC_ARG_WITH(db_password,
1422 AC_HELP_STRING([--with-db-password=PWD], [specify database password @<:@default=*none*@:>@]),
1424 if test "x$withval" != "x" ; then
1425 db_password=$withval
1429 AC_SUBST(db_password)
1432 dnl Pickup a database port
1435 AC_ARG_WITH(db_port,
1436 AC_HELP_STRING([--with-db-port=DBPORT], [specify a database port @<:@default=null@:>@]),
1438 if test "x$withval" != "x" ; then
1446 # Handle users and groups for each daemon
1449 AC_ARG_WITH(dir_user,
1450 AC_HELP_STRING([--with-dir-user=USER], [specify user for Director daemon]),
1452 if test "x$withval" != "x" ; then
1459 AC_ARG_WITH(dir_group,
1460 AC_HELP_STRING([--with-dir-group=GROUP], [specify group for Director daemon]),
1462 if test "x$withval" != "x" ; then
1469 AC_ARG_WITH(sd_user,
1470 AC_HELP_STRING([--with-sd-user=USER], [specify user for Storage daemon]),
1472 if test "x$withval" != "x" ; then
1479 AC_ARG_WITH(sd_group,
1480 AC_HELP_STRING([--with-sd-group=GROUP], [specify group for Storage daemon]),
1482 if test "x$withval" != "x" ; then
1489 AC_ARG_WITH(fd_user,
1490 AC_HELP_STRING([--with-fd-user=USER], [specify user for File daemon]),
1492 if test "x$withval" != "x" ; then
1499 AC_ARG_WITH(fd_group,
1500 AC_HELP_STRING([--with-fd-group=GROUP], [specify group for File daemon]),
1502 if test "x$withval" != "x" ; then
1516 dnl allow setting default executable permissions
1519 AC_ARG_WITH(sbin-perm,
1520 AC_HELP_STRING([--with-sbin-perm=MODE], [specify permissions for sbin binaries @<:@default=0754@:>@]),
1522 if test "x$withval" != "x" ; then
1530 dnl ------------------------------------------------
1531 dnl Bacula check for various SQL database engines
1532 dnl ------------------------------------------------
1534 BA_CHECK_POSTGRESQL_DB
1549 dnl -------------------------------------------
1550 dnl enable batch attribute DB insert (default on)
1551 dnl -------------------------------------------
1552 support_batch_insert=no
1553 A=`test -f $SQL_LIB && nm $SQL_LIB | grep pthread_mutex_lock`
1555 if test $pkg = 0; then
1556 support_batch_insert=yes
1557 AC_ARG_ENABLE(batch-insert,
1558 AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]),
1560 if test x$enableval = xno; then
1561 support_batch_insert=no
1563 support_batch_insert=yes
1569 dnl Check if postgresql support batch mode
1570 if test x$DB_TYPE = xpostgresql; then
1571 A=`test -f $SQL_LIB && nm $SQL_LIB | grep PQputCopyData`
1573 if test $pkg != 0; then
1574 support_batch_insert=no
1578 if test x$DB_TYPE = xdbi; then
1582 dnl Check for batch insert
1583 if test $DB_PROG = postgresql; then
1584 A=`test -f $SQL_LIB && nm $SQL_LIB | grep PQputCopyData`
1588 if test $DB_PROG = mysql; then
1589 A=`test -f $SQL_LIB && nm $DB_PROG_LIB | grep pthread_mutex_lock`
1593 if test $DB_PROG = sqlite3; then
1594 A=`test -f $SQL_LIB && nm $DB_PROG_LIB | grep pthread_mutex_lock`
1598 if test $pkg = 0; then
1599 AC_ARG_ENABLE(batch-insert,
1600 AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]),
1602 if test x$enableval = xno; then
1603 support_batch_insert=no
1605 support_batch_insert=yes
1611 dnl If dbi was not chosen, let the comment in file
1615 AC_SUBST(uncomment_dbi)
1617 if test $support_batch_insert = yes ; then
1618 AC_DEFINE(HAVE_BATCH_FILE_INSERT, 1, [Set if DB batch insert code enabled])
1621 AC_DEFINE(PROTOTYPES)
1623 dnl --------------------------------------------------------------------------
1624 dnl Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1626 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1627 if test -z "$CCOPTS"; then
1628 CCOPTS='-g -O2 -Wall'
1636 dnl See if we can use 64 bit file addresses
1637 largefile_support="no"
1642 dnl --------------------------------------------------------------------------
1643 dnl CHECKING FOR HEADER FILES
1644 dnl --------------------------------------------------------------------------
1683 AC_STRUCT_ST_BLKSIZE
1687 dnl --------------------------------------------------------------------------
1688 dnl Check for utime.h structure
1689 dnl --------------------------------------------------------------------------
1690 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1694 #include <sys/types.h>
1699 ba_cv_header_utime_h=yes
1701 ba_cv_header_utime_h=no
1706 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H, 1, [Set if utime.h exists])
1708 dnl --------------------------------------------------------------------------
1709 dnl Check for socklen_t
1710 dnl --------------------------------------------------------------------------
1711 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1715 #include <sys/types.h>
1716 #include <sys/socket.h>
1720 ba_cv_header_socklen_t=yes
1722 ba_cv_header_socklen_t=no
1727 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1729 dnl --------------------------------------------------------------------------
1730 dnl Check for bigendian
1731 dnl --------------------------------------------------------------------------
1732 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1736 main(){long a=1L; char *p=(char *)&a; exit(*p);}
1747 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1749 dnl --------------------------------------------------------------------------
1750 dnl Check for typeof()
1751 dnl --------------------------------------------------------------------------
1753 AC_CACHE_CHECK(for typeof, ba_cv_have_typeof,
1757 main(){char *a = 0; a = (typeof a)a;}
1759 ba_cv_have_typeof=yes
1761 ba_cv_have_typeof=no
1763 ba_cv_have_typeof=no
1768 test $ba_cv_have_typeof = yes && AC_DEFINE([HAVE_TYPEOF], 1, [Defind to 1 if compiler has typeof])
1773 dnl --------------------------------------------------------------------------
1774 dnl CHECKING FOR FILESYSTEM TYPE
1775 dnl --------------------------------------------------------------------------
1776 AC_MSG_CHECKING(how to get filesystem type)
1778 # The order of these tests is important.
1781 #include <sys/statvfs.h>
1782 #include <sys/fstyp.h>
1784 AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4
1786 if test $fstype = no; then
1789 #include <sys/statfs.h>
1790 #include <sys/fstyp.h>
1792 AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3
1795 if test $fstype = no; then
1798 #include <sys/statfs.h>
1799 #include <sys/vmount.h>
1801 AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX
1804 if test $fstype = no; then
1809 AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD
1812 if test $fstype = no; then
1813 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1815 if test $fstype = no; then
1818 #include <sys/mount.h>
1819 #include <sys/fs_types.h>
1821 AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix
1824 AC_MSG_RESULT($fstype)
1826 AC_CHECK_HEADER(sys/statvfs.h, [ AC_DEFINE(HAVE_SYS_STATVFS_H,1,[Defines if your system have the sys/statvfs.h header file])] , )
1828 dnl --------------------------------------------------------------------------
1829 dnl CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1830 dnl --------------------------------------------------------------------------
1838 AC_CHECK_TYPE(ino_t, unsigned long)
1839 AC_CHECK_TYPE(dev_t, unsigned long)
1840 AC_CHECK_TYPE(daddr_t, long)
1841 AC_CHECK_TYPE(major_t, int)
1842 AC_CHECK_TYPE(minor_t, int)
1843 AC_CHECK_TYPE(ssize_t, int)
1849 AC_CHECK_SIZEOF(char, 1)
1850 AC_CHECK_SIZEOF(short int, 2)
1851 AC_CHECK_SIZEOF(int, 4)
1852 AC_CHECK_SIZEOF(long int, 4)
1853 AC_CHECK_SIZEOF(long long int, 8)
1854 AC_CHECK_SIZEOF(int *, 4)
1856 dnl Check for sys/types.h types
1857 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int,
1861 #include <sys/types.h>
1865 ac_cv_have_u_int="yes"
1867 ac_cv_have_u_int="no"
1872 if test "x$ac_cv_have_u_int" = "xyes" ; then
1873 AC_DEFINE(HAVE_U_INT)
1877 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t,
1881 #include <sys/types.h>
1885 ac_cv_have_intmax_t="yes"
1893 ac_cv_have_intmax_t="yes"
1895 ac_cv_have_intmax_t="no"
1902 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1903 AC_DEFINE(HAVE_INTMAX_T)
1907 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t,
1911 #include <sys/types.h>
1913 u_intmax_t a; a = 1;
1915 ac_cv_have_u_intmax_t="yes"
1921 u_intmax_t a; a = 1;
1923 ac_cv_have_u_intmax_t="yes"
1925 ac_cv_have_u_intmax_t="no"
1932 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1933 AC_DEFINE(HAVE_U_INTMAX_T)
1937 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t,
1941 #include <sys/types.h>
1943 int8_t a; int16_t b; int32_t c; a = b = c = 1;
1945 ac_cv_have_intxx_t="yes"
1947 ac_cv_have_intxx_t="no"
1952 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1953 AC_DEFINE(HAVE_INTXX_T)
1957 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t,
1961 #include <sys/types.h>
1965 ac_cv_have_int64_t="yes"
1967 ac_cv_have_int64_t="no"
1972 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1973 AC_DEFINE(HAVE_INT64_T)
1977 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t,
1981 #include <sys/types.h>
1983 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
1985 ac_cv_have_u_intxx_t="yes"
1987 ac_cv_have_u_intxx_t="no"
1992 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1993 AC_DEFINE(HAVE_U_INTXX_T)
1997 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t,
2001 #include <sys/types.h>
2005 ac_cv_have_u_int64_t="yes"
2007 ac_cv_have_u_int64_t="no"
2012 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
2013 AC_DEFINE(HAVE_U_INT64_T)
2017 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
2018 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2020 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
2023 #include <sys/bitypes.h>
2025 int8_t a; int16_t b; int32_t c;
2026 u_int8_t e; u_int16_t f; u_int32_t g;
2027 a = b = c = e = f = g = 1;
2029 AC_DEFINE(HAVE_U_INTXX_T)
2030 AC_DEFINE(HAVE_INTXX_T)
2031 AC_DEFINE(HAVE_SYS_BITYPES_H)
2039 if test -z "$have_u_intxx_t" ; then
2040 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t,
2044 #include <sys/types.h>
2046 uint8_t a; uint16_t b;
2047 uint32_t c; a = b = c = 1;
2049 ac_cv_have_uintxx_t="yes"
2051 ac_cv_have_uintxx_t="no"
2056 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
2057 AC_DEFINE(HAVE_UINTXX_T)
2061 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
2062 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2064 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
2067 #include <sys/bitypes.h>
2069 int64_t a; u_int64_t b;
2072 AC_DEFINE(HAVE_U_INT64_T)
2073 AC_DEFINE(HAVE_INT64_T)
2081 if (test -z "$have_uintxx_t" && \
2082 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2084 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
2087 #include <sys/bitypes.h>
2089 uint8_t a; uint16_t b;
2090 uint32_t c; a = b = c = 1;
2092 AC_DEFINE(HAVE_UINTXX_T)
2100 dnl --------------------------------------------------------------------------
2101 dnl CHECKING FOR REQUIRED LIBRARY FUNCTIONS
2102 dnl --------------------------------------------------------------------------
2118 [echo 'configure: cannot find needed function.'; exit 1]
2121 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
2122 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
2123 AC_CHECK_FUNCS(posix_fadvise)
2124 AC_CHECK_FUNCS(fdatasync)
2126 AC_CHECK_FUNCS(chflags)
2128 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
2130 AC_CACHE_CHECK(for va_copy, ba_cv_va_copy,
2135 void use_va_copy(va_list args){va_list args2; va_copy(args2,args); va_end(args2);}
2136 void call_use_va_copy(int junk,...){va_list args; va_start(args,junk); use_va_copy(args); va_end(args);}
2138 call_use_va_copy(1,2,3)
2147 test $ba_cv_va_copy = yes && AC_DEFINE(HAVE_VA_COPY, 1, [Set if va_copy exists])
2149 dnl --------------------------------------------------------------------------
2150 dnl CHECKING FOR THREAD SAFE FUNCTIONS
2151 dnl --------------------------------------------------------------------------
2152 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
2154 # If resolver functions are not in libc check for -lnsl or -lresolv.
2155 AC_CHECK_FUNC(gethostbyname_r,
2156 AC_MSG_RESULT(using libc's resolver),
2157 AC_CHECK_LIB(nsl,gethostbyname_r)
2158 AC_CHECK_LIB(resolv,gethostbyname_r))
2160 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
2161 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
2162 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
2164 dnl ----------------------------
2165 dnl check sa_len of sockaddr
2166 dnl ----------------------------
2167 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
2171 #include <sys/socket.h>
2173 struct sockaddr s; s.sa_len;
2175 ac_cv_struct_sockaddr_sa_len=yes
2176 ], [ac_cv_struct_sockaddr_sa_len=no
2182 if test $ac_cv_struct_sockaddr_sa_len = yes; then
2183 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
2190 AC_FUNC_CLOSEDIR_VOID
2191 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
2192 # AC_FUNC_FNMATCH dnl use local version
2194 AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
2196 AC_CHECK_LIB(sun, getpwnam)
2198 AC_CHECK_HEADERS(zlib.h)
2199 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
2201 if test x$FDLIBS = x-lz; then
2202 AC_DEFINE(HAVE_LIBZ)
2207 dnl Check for ACL support and libraries
2211 AC_HELP_STRING([--disable-acl], [disable acl support @<:@default=auto@:>@]),
2213 if test x$enableval = xno; then
2220 have_extended_acl=no
2221 if test x$support_acl = xyes; then
2222 AC_CHECK_HEADER(sys/acl.h, [ AC_DEFINE(HAVE_SYS_ACL_H,1,[Defines if your system have the sys/acl.h header file])] , )
2223 AC_CHECK_FUNC(acl_get_file,
2227 AC_CHECK_LIB(acl, acl_get_file,
2230 FDLIBS="-lacl $FDLIBS"
2232 AC_CHECK_LIB(pacl, acl_get_file,
2235 FDLIBS="-lpacl $FDLIBS"
2237 AC_CHECK_LIB(sec, acltotext,
2240 FDLIBS="-lsec $FDLIBS"
2242 AC_CHECK_LIB(sec, acl_totext,
2244 have_extended_acl=yes
2255 if test $have_acl = yes; then
2259 if test $have_extended_acl = yes; then
2260 AC_DEFINE(HAVE_EXTENDED_ACL)
2265 dnl Check for XATTR support
2268 AC_ARG_ENABLE(xattr,
2269 AC_HELP_STRING([--disable-xattr], [disable xattr support @<:@default=auto@:>@]),
2271 if test x$enableval = xno; then
2278 if test x$support_xattr = xyes; then
2279 AC_CHECK_HEADER(sys/xattr.h, [ AC_DEFINE(HAVE_SYS_XATTR_H,1,[Defines if your system have the sys/xattr.h header file])] , )
2280 AC_CHECK_FUNCS(llistxattr lgetxattr lsetxattr,
2283 AC_DEFINE(HAVE_LLISTXATTR)
2284 AC_DEFINE(HAVE_LGETXATTR)
2285 AC_DEFINE(HAVE_LSETXATTR)
2287 AC_CHECK_FUNCS(listxattr getxattr setxattr,
2290 AC_DEFINE(HAVE_LISTXATTR)
2291 AC_DEFINE(HAVE_GETXATTR)
2292 AC_DEFINE(HAVE_SETXATTR)
2298 if test $have_xattr = yes; then
2299 AC_DEFINE(HAVE_XATTR)
2304 dnl Check for pthread libraries
2307 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
2309 AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
2311 AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
2313 AC_CHECK_FUNC(pthread_create)
2326 if test x$have_gcc = xyes ; then
2327 CPPFLAGS="$CPPFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
2328 CFLAGS="$CFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
2330 LDFLAGS=${LDFLAGS--O}
2331 DB_LIBS="${SQL_LFLAGS}"
2332 CPPFLAGS="$CPPFLAGS"
2345 AC_SUBST(X_EXTRA_LIBS)
2350 dnl extra configurable objects
2361 dnl Finally we set appropriate distribution specific
2362 dnl variables and defaults
2364 dnl PFILES are platform specific files
2365 PFILES="platforms/Makefile"
2369 hostname=`uname -n | cut -d '.' -f 1`
2370 if test x${hostname} = x ; then
2371 hostname="localhost"
2376 PSCMD="ps -e -o pid,comm"
2378 platforms/aix/Makefile"
2379 TAPEDRIVE="/dev/rmt0.1"
2383 PTHREAD_LIB="-lpthread -lexc"
2384 if test "${CC}" = "gcc" ; then
2391 TAPEDRIVE="/dev/nrmt0"
2394 DISTVER=`uname -a |awk '{print $3}'`
2395 TAPEDRIVE="/dev/nrmt0"
2396 PTHREAD_LIB="-pthread"
2397 CFLAGS="${CFLAGS} -pthread"
2398 PSCMD="ps -ax -o pid,command"
2402 platforms/bsdi/Makefile \
2403 platforms/bsdi/bacula-fd \
2404 platforms/bsdi/bacula-sd \
2405 platforms/bsdi/bacula-dir"
2406 largefile_support="yes"
2409 DISTVER=`uname -a |awk '{print $3}'`
2410 TAPEDRIVE="/dev/nrst0"
2413 WLDFLAGS="-mwindows"
2417 TAPEDRIVE="/dev/nst0"
2418 PSCMD="ps -e -o pid,command"
2421 platforms/darwin/Makefile"
2424 dnl Make sure hostname is resolved
2425 ping -c 1 $hostname 2>&1 1>/dev/null
2426 if test ! $? = 0; then
2427 hostname="localhost"
2429 if `test -f /etc/apt/sources.list && grep -q ubuntu /etc/apt/sources.list`; then
2432 DISTVER=`cat /etc/debian_version`
2433 if test -f /etc/lsb-release ; then
2435 if test "x$DISTRIB_ID" != "x" ; then
2436 DISTNAME=$DISTRIB_ID
2438 if test "x$DISTRIB_RELEASE" != "x" ; then
2439 DISTVER=$DISTRIB_RELEASE
2442 if test "$DISTNAME" = "Ubuntu" ; then
2445 TAPEDRIVE="/dev/nst0"
2446 PSCMD="ps -e -o pid,command"
2447 if test "$DISTNAME" = "ubuntu" ; then
2449 platforms/ubuntu/Makefile \
2450 platforms/ubuntu/bacula-fd \
2451 platforms/ubuntu/bacula-sd \
2452 platforms/ubuntu/bacula-dir"
2455 platforms/debian/Makefile \
2456 platforms/debian/bacula-fd \
2457 platforms/debian/bacula-sd \
2458 platforms/debian/bacula-dir"
2462 dnl Make sure hostname is resolved
2463 ping -c 1 $hostname 2>&1 1>/dev/null
2464 if test ! $? = 0; then
2465 hostname="localhost"
2467 DISTVER=`uname -a |awk '{print $3}'`
2468 VER=`echo $DISTVER | cut -c 1`
2469 if test x$VER = x4 ; then
2470 PTHREAD_LIB="${PTHREAD_LIBS:--pthread}"
2471 CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS:--pthread}"
2475 TAPEDRIVE="/dev/nrsa0"
2476 PSCMD="ps -ax -o pid,command"
2478 platforms/freebsd/Makefile \
2479 platforms/freebsd/bacula-fd \
2480 platforms/freebsd/bacula-sd \
2481 platforms/freebsd/bacula-dir"
2482 largefile_support="yes"
2485 PSCMD="UNIX95=1; ps -e -o pid,comm"
2486 CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
2488 TAPEDRIVE="/dev/rmt/0hnb"
2489 PTHREAD_LIB="-lpthread"
2490 AC_DEFINE([_INCLUDE_LONGLONG])
2494 TAPEDRIVE="/dev/rmt/0cbn"
2495 PSCMD="ps -e -o pid,comm"
2497 platforms/irix/Makefile \
2498 platforms/irix/bacula-fd \
2499 platforms/irix/bacula-sd \
2500 platforms/irix/bacula-dir"
2503 DISTVER=`uname -a |awk '{print $3}'`
2506 TAPEDRIVE="/dev/nrst0"
2507 PSCMD="ps -ax -o pid,command"
2508 PTHREAD_LIB="-pthread"
2509 CFLAGS="${CFLAGS} -pthread"
2512 DISTVER=`uname -a |awk '{print $3}'`
2515 TAPEDRIVE="/dev/nrst0"
2516 PSCMD="ps -ax -o pid,command"
2517 PTHREAD_LIB="-pthread"
2518 CFLAGS="${CFLAGS} -pthread"
2520 platforms/openbsd/Makefile \
2521 platforms/openbsd/bacula-fd \
2522 platforms/openbsd/bacula-sd \
2523 platforms/openbsd/bacula-dir"
2526 dnl Make sure hostname is resolved
2527 ping -c 1 $hostname 2>&1 1>/dev/null
2528 if test ! $? = 0; then
2529 hostname="localhost"
2531 if test -f /etc/whitebox-release ; then
2532 f=/etc/whitebox-release
2534 f=/etc/redhat-release
2536 if test `cat $f | grep release |\
2537 cut -f 3 -d ' '`x = "Enterprise"x ; then
2538 DISTVER="Enterprise "`cat $f | grep release |\
2541 DISTVER=`cat /etc/redhat-release | grep release |\
2544 TAPEDRIVE="/dev/nst0"
2545 PSCMD="ps -e -o pid,command"
2547 platforms/redhat/Makefile \
2548 platforms/redhat/bacula-fd \
2549 platforms/redhat/bacula-sd \
2550 platforms/redhat/bacula-dir \
2551 platforms/redhat/bacula.spec \
2555 dnl Make sure hostname is resolved
2556 ping -c 1 $hostname 2>&1 1>/dev/null
2557 if test ! $? = 0; then
2558 hostname="localhost"
2560 DISTVER=`cat /etc/mandrake-release | grep release |\
2562 TAPEDRIVE="/dev/nst0"
2563 PSCMD="ps -e -o pid,command"
2565 platforms/mandrake/Makefile \
2566 platforms/mandrake/bacula-fd \
2567 platforms/mandrake/bacula-sd \
2568 platforms/mandrake/bacula-dir \
2569 platforms/mandrake/bacula.spec \
2573 dnl Make sure hostname is resolved
2574 ping -c 1 $hostname 2>&1 1>/dev/null
2575 if test ! $? = 0; then
2576 hostname="localhost"
2578 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
2579 TAPEDRIVE="/dev/nst0"
2580 PSCMD="ps -e -o pid,command"
2582 platforms/gentoo/Makefile \
2583 platforms/gentoo/bacula-init \
2584 platforms/gentoo/bacula-fd \
2585 platforms/gentoo/bacula-sd \
2586 platforms/gentoo/bacula-dir"
2589 dnl Make sure hostname is resolved
2590 ping -c 1 $hostname 2>&1 1>/dev/null
2591 if test ! $? = 0; then
2592 hostname="localhost"
2594 DISTVER=`cat /etc/slackware-version`
2595 TAPEDRIVE="/dev/nst0"
2596 PSCMD="ps -e -o pid,command"
2598 platforms/slackware/Makefile \
2599 platforms/slackware/rc.bacula-fd \
2600 platforms/slackware/rc.bacula-sd \
2601 platforms/slackware/rc.bacula-dir\
2602 platforms/slackware/functions.bacula"
2606 TAPEDRIVE="/dev/rmt/0cbn"
2607 PSCMD="ps -e -o pid,comm"
2609 platforms/solaris/Makefile \
2610 platforms/solaris/bacula-fd \
2611 platforms/solaris/bacula-sd \
2612 platforms/solaris/bacula-dir"
2613 if test x$DISTVER = x5.6 ; then
2614 AC_DEFINE(HAVE_OLD_SOCKOPT)
2616 LIBS="$LIBS -lresolv"
2619 dnl Make sure hostname is resolved
2620 ping -c 1 $hostname 2>&1 1>/dev/null
2621 if test ! $? = 0; then
2622 hostname="localhost"
2624 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
2626 TAPEDRIVE="/dev/nst0"
2627 PSCMD="ps -e -o pid,command"
2629 platforms/suse/Makefile \
2630 platforms/suse/bacula-fd \
2631 platforms/suse/bacula-sd \
2632 platforms/suse/bacula-dir \
2633 platforms/suse/bacula \
2634 platforms/suse/bacula.spec"
2637 dnl Make sure hostname is resolved
2638 ping -c 1 $hostname 2>&1 1>/dev/null
2639 if test ! $? = 0; then
2640 hostname="localhost"
2644 TAPEDRIVE="/dev/nst0"
2645 PSCMD="ps -e -o pid,command"
2647 platforms/suse/Makefile \
2648 platforms/suse/bacula-fd \
2649 platforms/suse/bacula-sd \
2650 platforms/suse/bacula-dir"
2654 TAPEDRIVE="/dev/nst0"
2657 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
2663 LIBS="$PTHREAD_LIB $LIBS"
2665 AC_DEFINE_UNQUOTED(lld, "$lld")
2666 AC_DEFINE_UNQUOTED(llu, "$llu")
2674 dnl common parts of the Makefile
2675 MCOMMON=./autoconf/Make.common
2676 AC_SUBST_FILE(MCOMMON)
2679 if test "x${subsysdir}" = "x${sbindir}" ; then
2682 echo "You have set both --sbindir and --with-subsys-dir"
2683 echo " equal to: ${subsysdir} "
2684 echo "This is not permitted. Please reconfigure."
2686 echo "Aborting configuration ..."
2692 AC_OUTPUT([autoconf/Make.common \
2695 scripts/startmysql \
2697 scripts/btraceback \
2703 scripts/bacula-ctl-dir \
2704 scripts/bacula-ctl-fd \
2705 scripts/bacula-ctl-sd \
2706 scripts/devel_bacula \
2709 scripts/bacula.desktop.gnome1 \
2710 scripts/bacula.desktop.gnome2 \
2711 scripts/bacula.desktop.gnome1.consolehelper \
2712 scripts/bacula.desktop.gnome2.consolehelper \
2713 scripts/bacula.desktop.gnome1.xsu \
2714 scripts/bacula.desktop.gnome2.xsu \
2715 scripts/bgnome-console.console_apps \
2716 scripts/mtx-changer \
2717 scripts/disk-changer \
2718 scripts/dvd-handler \
2719 scripts/dvd-simulator \
2720 scripts/bacula-tray-monitor.desktop \
2721 scripts/logwatch/Makefile \
2722 scripts/logwatch/logfile.bacula.conf \
2723 scripts/wxconsole.console_apps \
2724 scripts/wxconsole.desktop.consolehelper \
2725 scripts/wxconsole.desktop.xsu \
2726 scripts/bat.desktop \
2727 scripts/bat.desktop.xsu \
2728 scripts/bat.desktop.consolehelper \
2729 scripts/bat.console_apps \
2732 src/console/Makefile \
2733 src/console/bconsole.conf \
2734 src/gnome2-console/Makefile \
2735 src/gnome2-console/bgnome-console.conf \
2736 src/qt-console/bat.conf \
2737 src/qt-console/bat.pro \
2738 src/qt-console/bat.pro.mingw32 \
2739 src/qt-console/install_conf_file \
2740 src/wx-console/Makefile \
2741 src/wx-console/bwx-console.conf \
2742 src/tray-monitor/Makefile \
2743 src/tray-monitor/tray-monitor.conf \
2745 src/dird/bacula-dir.conf \
2747 src/stored/Makefile \
2748 src/stored/bacula-sd.conf \
2749 src/filed/Makefile \
2750 src/filed/bacula-fd.conf \
2752 src/cats/make_catalog_backup \
2753 src/cats/delete_catalog_backup \
2754 src/cats/create_postgresql_database \
2755 src/cats/update_postgresql_tables \
2756 src/cats/make_postgresql_tables \
2757 src/cats/grant_postgresql_privileges \
2758 src/cats/drop_postgresql_tables \
2759 src/cats/drop_postgresql_database \
2760 src/cats/create_mysql_database \
2761 src/cats/update_mysql_tables \
2762 src/cats/make_mysql_tables \
2763 src/cats/grant_mysql_privileges \
2764 src/cats/drop_mysql_tables \
2765 src/cats/drop_mysql_database \
2766 src/cats/create_sqlite_database \
2767 src/cats/update_sqlite_tables \
2768 src/cats/make_sqlite_tables \
2769 src/cats/grant_sqlite_privileges \
2770 src/cats/drop_sqlite_tables \
2771 src/cats/drop_sqlite_database \
2772 src/cats/create_sqlite3_database \
2773 src/cats/update_sqlite3_tables \
2774 src/cats/make_sqlite3_tables \
2775 src/cats/grant_sqlite3_privileges \
2776 src/cats/drop_sqlite3_tables \
2777 src/cats/drop_sqlite3_database \
2780 src/cats/create_bdb_database \
2781 src/cats/update_bdb_tables \
2782 src/cats/make_bdb_tables \
2783 src/cats/grant_bdb_privileges \
2784 src/cats/drop_bdb_tables \
2785 src/cats/drop_bdb_database \
2786 src/cats/create_bacula_database \
2787 src/cats/update_bacula_tables \
2788 src/cats/grant_bacula_privileges \
2789 src/cats/make_bacula_tables \
2790 src/cats/drop_bacula_tables \
2791 src/cats/drop_bacula_database \
2792 src/findlib/Makefile \
2793 src/tools/Makefile \
2794 src/plugins/fd/Makefile \
2795 src/plugins/sd/Makefile \
2796 src/plugins/dir/Makefile \
2798 updatedb/update_mysql_tables_10_to_11 \
2799 updatedb/update_sqlite3_tables_10_to_11 \
2800 updatedb/update_postgresql_tables_10_to_11 \
2801 updatedb/update_sqlite_tables_10_to_11 \
2806 if test "${support_bat}" = "yes" ; then
2807 if test "x$QMAKE" = "xnone" && test "x$QMAKEQT4" = "xnone"; then
2808 echo "Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation"
2814 if test "x$QMAKEQT4" != "xnone"; then
2819 chmod 755 install_conf_file build-depkgs-qt-console
2820 echo "Creating bat Makefile"
2827 dnl if CC is gcc, we can rebuild the dependencies (since the depend rule
2828 dnl requires gcc). If it's not, don't rebuild dependencies
2830 if test X"$GCC" = "Xyes" ; then
2831 echo "Doing make of dependencies"
2832 ${MAKE:-make} depend
2836 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2837 chmod 755 dvd-handler dvd-simulator
2838 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2842 chmod 755 $c/update_mysql_tables_10_to_11 $c/update_sqlite3_tables_10_to_11
2843 chmod 755 $c/update_postgresql_tables_10_to_11 $c/update_sqlite_tables_10_to_11
2847 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2848 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2850 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2851 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2853 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2854 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2856 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2857 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2859 chmod 755 $c/create_sqlite3_database $c/update_sqlite3_tables $c/make_sqlite3_tables
2860 chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
2862 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2863 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2865 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2869 chmod 755 src/win32/build-depkgs-mingw32
2871 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2872 largefile_support="yes"
2875 dnl Only try to find out the version number of the compiler when we know its some kind of GCC compiler
2876 if test X"$GCC" = "Xyes" ; then
2878 dnl A whole lot of hand springs to get the compiler version.
2879 dnl This is because gcc changed the output in version 3.0
2881 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2882 if test "x${CCVERSION}" = "x" ; then
2883 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2885 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2886 if test x"${CXXVERSION}" = x ; then
2887 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2891 # clean up any old junk
2897 if test "x${db_type}" = "xInternal" ; then
2900 echo "You have not specified either --enable-client-only or one of the"
2901 echo " supported databases: MySQL, PostgreSQL, SQLite3, SQLite or DBI."
2902 echo " This is not permitted. Please reconfigure."
2904 echo "Aborting the configuration ..."
2911 Configuration on `date`:
2913 Host: ${host}${post_host} -- ${DISTNAME} ${DISTVER}
2914 Bacula version: ${BACULA} ${VERSION} (${DATE})
2915 Source code location: ${srcdir}
2916 Install binaries: ${sbindir}
2917 Install libraries: ${libdir}
2918 Install config files: ${sysconfdir}
2919 Scripts directory: ${scriptdir}
2920 Archive directory: ${archivedir}
2921 Working directory: ${working_dir}
2922 PID directory: ${piddir}
2923 Subsys directory: ${subsysdir}
2924 Man directory: ${mandir}
2925 Data directory: ${datarootdir}
2926 Plugin directory: ${plugindir}
2927 C Compiler: ${CC} ${CCVERSION}
2928 C++ Compiler: ${CXX} ${CXXVERSION}
2929 Compiler flags: ${WCFLAGS} ${CFLAGS}
2930 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2932 Statically Linked Tools: ${support_static_tools}
2933 Statically Linked FD: ${support_static_fd}
2934 Statically Linked SD: ${support_static_sd}
2935 Statically Linked DIR: ${support_static_dir}
2936 Statically Linked CONS: ${support_static_cons}
2937 Database type: ${db_type}
2938 Database port: ${db_port}
2939 Database lib: ${DB_LIBS}
2940 Database name: ${db_name}
2941 Database user: ${db_user}
2943 Job Output Email: ${job_email}
2944 Traceback Email: ${dump_email}
2945 SMTP Host Address: ${smtp_host}
2947 Director Port: ${dir_port}
2948 File daemon Port: ${fd_port}
2949 Storage daemon Port: ${sd_port}
2951 Director User: ${dir_user}
2952 Director Group: ${dir_group}
2953 Storage Daemon User: ${sd_user}
2954 Storage DaemonGroup: ${sd_group}
2955 File Daemon User: ${fd_user}
2956 File Daemon Group: ${fd_group}
2958 SQL binaries Directory ${SQL_BINDIR}
2960 Large file support: $largefile_support
2961 Bacula conio support: ${got_conio} ${CONS_LIBS}
2962 readline support: ${got_readline} ${PRTREADLINE_SRC}
2963 TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
2964 TLS support: ${support_tls}
2965 Encryption support: ${support_crypto}
2966 ZLIB support: ${have_zlib}
2967 enable-smartalloc: ${support_smartalloc}
2968 bat support: ${support_bat} ${QWT_LDFLAGS}
2969 enable-gnome: ${support_gnome} ${gnome_version}
2970 enable-bwx-console: ${support_wx_console} ${wx_version}
2971 enable-tray-monitor: ${support_tray_monitor}
2972 client-only: ${build_client_only}
2973 build-dird: ${build_dird}
2974 build-stored: ${build_stored}
2975 ACL support: ${have_acl}
2976 XATTR support: ${have_xattr}
2977 Python support: ${support_python} ${PYTHON_LIBS}
2978 Batch insert enabled: ${support_batch_insert}