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([--disable-libtool], [disable building using GNU libtool @<:@default=no@:>@]),
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
231 # Some platforms have other defaults (for 64 bits libs)
250 if test `eval echo ${includedir}` = NONE/include ; then
251 includedir=/usr/include
257 dnl -------------------------------------------------------------------------
258 dnl If the user has not set --exec-prefix, we default to ${prefix}
259 dnl -------------------------------------------------------------------------
260 if test x${exec_prefix} = xNONE ; then
261 exec_prefix=${prefix}
264 sysconfdir=`eval echo ${sysconfdir}`
265 datarootdir=`eval echo ${datarootdir}`
266 libdir=`eval echo ${libdir}`
267 includedir=`eval echo ${includedir}`
268 localedir=`eval echo ${datarootdir}/locale`
269 AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir")
270 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
272 dnl ------------------------------------------------------------------
273 dnl If the user has not set --sbindir, we set our default as /sbin
274 dnl ------------------------------------------------------------------
275 if test x$sbindir = x'${exec_prefix}/sbin' ; then
276 sbindir=${exec_prefix}/sbin
278 sbindir=`eval echo ${sbindir}`
280 dnl -------------------------------------------------------------------------
281 dnl If the user has not set --mandir, we default to /usr/share/man
282 dnl -------------------------------------------------------------------------
283 if test x$mandir = x'${prefix}/man' ; then
284 mandir=/usr/share/man
287 AC_PATH_PROGS(MSGFMT, msgfmt, no)
288 if test "$MSGFMT" = "no"
290 echo 'msgfmt program not found, disabling NLS !'
292 USE_INCLUDED_LIBINTL=no
300 support_postgresql=no
302 support_smartalloc=yes
307 support_wx_console=no
308 support_tray_monitor=no
313 support_static_tools=no
316 support_static_dir=no
317 support_static_cons=no
326 dnl --------------------------------------------------------------------------
327 dnl CHECKING COMMAND LINE OPTIONS
328 dnl --------------------------------------------------------------------------
330 dnl -------------------------------------------
331 dnl gnome (default off)
332 dnl -------------------------------------------
334 AC_HELP_STRING([--enable-gnome], [enable build of bgnome-console GUI @<:@default=no@:>@]),
336 if test x$enableval = xyes; then
343 if test x$support_gnome = xyes; then
344 abc=`$PKGCONFIG --exists libgnomeui-2.0`
346 if test $pkg = 0; then
347 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
348 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
349 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
350 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
351 AC_SUBST(GNOME_INCLUDEDIR)
352 AC_SUBST(GNOMEUI_LIBS)
353 AC_SUBST(GNOME_LIBDIR)
355 GNOME_DIR=src/gnome2-console
356 gnome_version="Version 2.x"
358 AC_MSG_ERROR(Unable to find Gnome 2 installation)
363 dnl -------------------------------------------
364 dnl bat (default off)
365 dnl -------------------------------------------
367 AC_HELP_STRING([--enable-bat], [enable build of bat Qt4 GUI @<:@default=no@:>@]),
369 if test x$enableval = xyes; then
370 AC_DEFINE(HAVE_BAT, 1, [Set if Bacula bat Qt4 GUI support enabled])
377 if test x$support_bat = xyes; then
378 abc=`$PKGCONFIG --atleast-version=4.2 QtGui`
380 if test $pkg = 0; then
381 BAT_DIR=src/qt-console
383 AC_MSG_ERROR(Unable to find Qt4 installation needed by bat)
388 dnl If bat is enabled, we need the qwt library
396 if test x$support_bat = xyes; then
397 AC_MSG_CHECKING(for qwt support)
399 AC_HELP_STRING([--with-qwt@<:@=DIR@:>@], [specify qwt library directory]),
406 if test -f ${with_qwt}/include/qwt.h; then
407 QWT_INC="${with_qwt}/include"
408 QWT_LDFLAGS="-L${with_qwt}/lib"
418 dnl Search in standard places, or --with-qwt not specified
420 if test $no_qwt = no; then
421 if test x$QWT_INC = x; then
422 for root in /usr /usr/local; do
423 for ver in qwt qwt5 qwt-qt4; do
424 if test -f ${root}/include/${ver}/qwt.h; then
425 QWT_INC="${root}/include/${ver}"
426 if test -d ${root}/lib64/; then
427 QWT_LDFLAGS="-L${root}/lib64"
428 elif test -d ${root}/lib/64/; then
429 QWT_LDFLAGS="-L${root}/64"
431 QWT_LDFLAGS="-L${root}/lib"
442 if test x$QWT_INC = x; then
445 AC_DEFINE(HAVE_QWT, 1, [Set if bat QWT library found])
452 AC_SUBST(QWT_LDFLAGS)
456 dnl -------------------------------------------
457 dnl bwx-console (default off)
458 dnl -------------------------------------------
459 AC_ARG_ENABLE(bwx-console,
460 AC_HELP_STRING([--enable-bwx-console], [enable build of wxWidgets console @<:@default=no@:>@]),
462 if test x$enableval = xyes; then
463 support_wx_console=yes
469 if test x$support_wx_console = xyes; then
470 abc=`$WXCONFIG $WXFLAGS --cppflags`
472 if test $pkg = 0; then
473 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
474 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
475 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
477 AC_SUBST(WXCONS_CPPFLAGS)
478 AC_SUBST(WXCONS_LDFLAGS)
479 WX_DIR=src/wx-console
482 echo "wx-config program not found. bwx-console disabled."
484 support_wx_console=no
489 dnl -------------------------------------------
490 dnl tray-monitor (default off)
491 dnl -------------------------------------------
492 AC_ARG_ENABLE(tray-monitor,
493 AC_HELP_STRING([--enable-tray-monitor], [enable build of Gnome tray monitor (compatible with KDE @<:@default=no@:>@]),
495 if test x$enableval = xyes; then
496 support_tray_monitor=yes
502 if test x$support_tray_monitor = xyes; then
503 abc=`$PKGCONFIG --exists gtk+-2.0`
505 if test $pkg = 0; then
506 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
507 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
508 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
509 AC_SUBST(TRAY_MONITOR_LDFLAGS)
510 TRAY_MONITOR_DIR=src/tray-monitor
511 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
513 if test $pkg = 0; then
514 AC_DEFINE(HAVE_GTK_2_4, 1, [Set if you have GTK 4.2 or greater loaded])
518 AC_SUBST(TRAY_MONITOR_DIR)
520 dnl -------------------------------------------
521 dnl smartalloc (default off)
522 dnl -------------------------------------------
523 AC_ARG_ENABLE(smartalloc,
524 AC_HELP_STRING([--enable-smartalloc], [enable smartalloc debugging support @<:@default=no@:>@]),
526 if test x$enableval = xno; then
527 support_smartalloc=no
532 if test x$support_smartalloc = xyes; then
533 AC_DEFINE(SMARTALLOC, 1, [Set if you want Smartalloc enabled])
536 dnl -------------------------------------------
537 dnl static-tools (default off)
538 dnl -------------------------------------------
539 AC_ARG_ENABLE(static-tools,
540 AC_HELP_STRING([--enable-static-tools], [enable static tape tools @<:@default=no@:>@]),
542 if test x$enableval = xyes; then
543 support_static_tools=yes
549 if test x$support_static_tools = xyes; then
550 TTOOL_LDFLAGS="-static"
552 AC_SUBST(TTOOL_LDFLAGS)
554 dnl -------------------------------------------
555 dnl static-fd (default off)
556 dnl -------------------------------------------
557 AC_ARG_ENABLE(static-fd,
558 AC_HELP_STRING([--enable-static-fd], [enable static File daemon @<:@default=no@:>@]),
560 if test x$enableval = xyes; then
561 support_static_fd=yes
567 if test x$support_static_fd = xyes; then
568 STATIC_FD="static-bacula-fd"
572 dnl -------------------------------------------
573 dnl static-sd (default off)
574 dnl -------------------------------------------
575 AC_ARG_ENABLE(static-sd,
576 AC_HELP_STRING([--enable-static-sd], [enable static Storage daemon @<:@default=no@:>@]),
578 if test x$enableval = xyes; then
579 support_static_sd=yes
585 if test x$support_static_sd = xyes; then
586 STATIC_SD="static-bacula-sd"
590 dnl -------------------------------------------
591 dnl static-dir (default off)
592 dnl -------------------------------------------
593 AC_ARG_ENABLE(static-dir,
594 AC_HELP_STRING([--enable-static-dir], [enable static Director @<:@default=no@:>@]),
596 if test x$enableval = xyes; then
597 support_static_dir=yes
603 if test x$support_static_dir = xyes; then
604 STATIC_DIR="static-bacula-dir"
608 dnl -------------------------------------------
609 dnl static-cons (default off)
610 dnl -------------------------------------------
611 AC_ARG_ENABLE(static-cons,
612 AC_HELP_STRING([--enable-static-cons], [enable static Console @<:@default=no@:>@]),
614 if test x$enableval = xyes; then
615 support_static_cons=yes
623 if test x$support_static_cons = xyes; then
624 STATIC_CONS="static-bconsole"
625 STATIC_GNOME_CONS="static-bgnome-console"
626 STATIC_WX_CONS="static-bwx-console"
628 AC_SUBST(STATIC_CONS)
629 AC_SUBST(STATIC_GNOME_CONS)
630 AC_SUBST(STATIC_WX_CONS)
632 dnl -------------------------------------------
633 dnl client_only (default off)
634 dnl -------------------------------------------
635 AC_ARG_ENABLE(client-only,
636 AC_HELP_STRING([--enable-client-only], [build client (File daemon) only @<:@default=no@:>@]),
638 if test x$enableval = xyes; then
639 build_client_only=yes
645 if test x$build_client_only = xno; then
652 dnl -------------------------------------------
653 dnl director (default on)
654 dnl -------------------------------------------
655 AC_ARG_ENABLE(build-dird,
656 AC_HELP_STRING([--enable-build-dird], [enable building of dird (Director) @<:@default=yes@:>@]),
658 if test x$enableval = xno; then
663 if test x$build_dird = xyes; then
668 DIR_TOOLS="NODIRTOOLS"
673 dnl -------------------------------------------
674 dnl stored (default on)
675 dnl -------------------------------------------
676 AC_ARG_ENABLE(build-stored,
677 AC_HELP_STRING([--enable-build-stored], [enable building of stored (Storage daemon) @<:@default=yes@:>@]),
679 if test x$enableval = xno; then
684 if test x$build_stored = xyes; then
685 STORED_DIR="src/stored"
691 dnl ---------------------------------------------------
692 dnl Check for conio (Bacula readline substitute)(
693 dnl ---------------------------------------------------
694 dnl this allows you to turn it completely off
696 AC_HELP_STRING([--disable-conio], [disable conio support @<:@default=no@:>@]),
698 if test x$enableval = xno; then
705 dnl ---------------------------------------------------
706 dnl Check for IPv6 support
707 dnl ---------------------------------------------------
708 dnl this allows you to turn it completely off
711 AC_HELP_STRING([--enable-ipv6], [enable ipv6 support @<:@default=yes@:>@]),
713 if test x$enableval = xno; then
719 if test x$support_ipv6 = xyes; then
720 AC_TRY_LINK([ #include <sys/types.h>
721 #include <sys/socket.h>
722 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;],
723 [support_ipv6=yes], [support_ipv6=no])
726 if test x$support_ipv6 = xyes; then
727 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
731 if test x$support_conio = xyes; then
732 AC_CHECK_HEADER(termcap.h,
733 [ AC_CHECK_LIB(termcap, tgetent,
734 [ CONS_LIBS="-ltermcap"
739 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
741 [ AC_CHECK_LIB(ncurses, tgetent,
742 [ CONS_LIBS="-lncurses"
747 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
752 AC_CHECK_HEADERS(curses.h)
753 AC_CHECK_HEADER(term.h,
754 [ AC_CHECK_LIB(curses, tgetent,
755 [ CONS_LIBS="-lcurses"
760 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
763 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
772 dnl ---------------------------------------------------
773 dnl Check for readline support/directory (default off)
774 dnl ---------------------------------------------------
775 dnl this allows you to turn it completely off
776 AC_ARG_ENABLE(readline,
777 AC_HELP_STRING([--disable-readline], [disable readline support @<:@default=yes@:>@]),
779 if test x$enableval = xno; then
787 if test x$support_readline = xyes; then
788 AC_ARG_WITH(readline,
789 AC_HELP_STRING([--with-readline@<:@=DIR@:>@], [specify readline library directory]),
791 case "$with_readline" in
796 if test -f ${with_readline}/readline.h; then
797 CONS_INC="-I${with_readline}"
798 CONS_LDFLAGS="-L$with_readline"
799 elif test -f ${with_readline}/include/readline/readline.h; then
800 CONS_INC="-I${with_readline}/include/readline"
801 CONS_LDFLAGS="-L${with_readline}/lib"
802 with_readline="${with_readline}/include/readline"
804 with_readline="/usr/include/readline"
807 AC_CHECK_HEADER(${with_readline}/readline.h,
809 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
810 CONS_LIBS="-lreadline -lhistory -ltermcap"
814 echo "readline.h not found. readline turned off ..."
821 dnl check for standard readline library
822 AC_CHECK_HEADER(/usr/include/readline/readline.h,
824 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
826 CONS_INC="-I/usr/include/readline"
827 CONS_LIBS="-lreadline -ltermcap"
829 dnl Did not find standard library, so try Bacula's default
830 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
832 AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
834 CONS_INC="-I${TOP_DIR}/depkgs/readline"
835 CONS_LIBS="-lreadline -lhistory -ltermcap"
836 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
837 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
840 echo "readline.h not found. readline turned off ..."
854 AC_SUBST(CONS_LDFLAGS)
855 AC_SUBST(READLINE_SRC)
857 dnl Minimal stuff for readline Makefile configuration
862 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr lstat lchown)
863 AC_CHECK_FUNCS(nanosleep nl_langinfo)
864 AC_CHECK_HEADERS(varargs.h)
866 dnl End of readline/conio stuff
867 dnl -----------------------------------------------------------------------
869 dnl -----------------------------------------------------------------------
870 dnl Check for Python support
872 AC_MSG_CHECKING(for Python support)
874 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.]),
878 if test "$withval" != "no"; then
879 if test "$withval" = "yes"; then
880 for python_root in /usr /usr/local /usr/sfw; do
881 for ver in python2.2 python2.3 python2.4 python2.5; do
882 if test -f $python_root/include/${ver}/Python.h; then
883 PYTHON_INCDIR=-I$python_root/include/${ver}
884 if test -d $python_root/lib64/${ver}/config; then
885 PYTHON_LIBS="-L$python_root/lib64/${ver}/config -l${ver}"
887 PYTHON_LIBS="-L$python_root/lib/${ver}/config -l${ver}"
894 if test x$PYTHON_INCDIR = x; then
895 if test -f $prefix/include/Python.h; then
896 PYTHON_INCDIR=-I$prefix/include
897 if test -d $prefix/lib64/config; then
898 PYTHON_LIBS="-L$prefix/lib64/config -lpython"
900 PYTHON_LIBS="-L$prefix/lib/config -lpython"
904 AC_MSG_ERROR(Unable to find Python.h in standard locations)
908 if test -f $withval/Python.h; then
909 PYTHON_INCDIR=-I$withval
910 PYTHON_LIBS="-L$withval/config -lpython"
911 elif test -f $withval/include/Python.h; then
912 PYTHON_INCDIR=-I$withval/include
913 if test -d $withval/lib64/config; then
914 PYTHON_LIBS="-L$withval/lib64/config -lpython"
916 PYTHON_LIBS="-L$withval/lib/config -lpython"
918 elif test -f $withval/include/python/Python.h; then
919 PYTHON_INCDIR=-I$withval/include/python
920 if test -d $withval/lib64/python/config; then
921 PYTHON_LIBS="-L$withval/lib64/python/config -lpython"
923 PYTHON_LIBS="-L$withval/lib/python/config -lpython"
927 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
931 AC_DEFINE([HAVE_PYTHON], 1)
934 AC_MSG_NOTICE(checking for more Python libs)
935 saved_LIBS="$LIBS"; LIBS=
936 AC_SEARCH_LIBS(shm_open, [rt])
937 AC_CHECK_LIB(util, openpty)
938 PYTHON_LIBS="$PYTHON_LIBS $LIBS"
947 AC_SUBST(PYTHON_LIBS)
948 AC_SUBST(PYTHON_INCDIR)
951 dnl Find where sockets are (especially for Solaris)
952 dnl Do this before the TCP Wrappers test since tcp wrappers
953 dnl uses the socket library and some linkers are stupid.
955 AC_CHECK_FUNC(socket,
956 AC_MSG_RESULT(using libc's socket),
957 AC_CHECK_LIB(xnet,socket)
958 AC_CHECK_LIB(socket,socket)
959 AC_CHECK_LIB(inet,socket))
961 dnl -----------------------------------------------------------
962 dnl Check whether user wants TCP wrappers support (default off)
963 dnl -----------------------------------------------------------
966 AC_ARG_WITH(tcp-wrappers,
967 AC_HELP_STRING([--with-tcp-wrappers@<:@=DIR@:>@], [enable tcpwrappers support]),
969 if test "x$withval" != "xno" ; then
971 LIBS="$saved_LIBS -lwrap"
972 AC_MSG_CHECKING(for libwrap)
973 AC_SEARCH_LIBS(nanosleep, [rt])
976 #include <sys/types.h>
978 int deny_severity = 0;
979 int allow_severity = 0;
980 struct request_info *req;
985 AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
990 LIBS="$saved_LIBS -lwrap -lnsl"
991 WRAPLIBS="$saved_LIBS -lwrap -lnsl"
994 #include <sys/types.h>
996 int deny_severity = 0;
997 int allow_severity = 0;
998 struct request_info *req;
1003 AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
1008 AC_MSG_ERROR([*** libwrap missing])
1017 dnl -----------------------------------------------------------
1018 dnl Check whether OpenSSL is available
1019 dnl -----------------------------------------------------------
1020 AC_MSG_CHECKING([for OpenSSL])
1021 dnl The following uses quadrigraphs:
1024 AC_ARG_WITH(openssl,
1025 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
1027 with_openssl_directory=${withval}
1031 if test "x$with_openssl_directory" != "xno"; then
1032 OPENSSL_LIBS="-lssl -lcrypto"
1035 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
1037 # Make sure the $with_openssl_directory also makes sense
1039 if test -d "$with_openssl_directory/lib" -a -d "$with_openssl_directory/include"; then
1040 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
1041 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
1045 saved_LIBS="${LIBS}"
1046 saved_CFLAGS="${CFLAGS}"
1047 LIBS="${saved_LIBS} ${OPENSSL_LIBS}"
1048 CFLAGS="${saved_CFLAGS} ${OPENSSL_INC}"
1052 #include <openssl/ssl.h>
1054 CRYPTO_set_id_callback(NULL);
1057 support_crypto="yes"
1065 #include <openssl/evp.h>
1069 ac_cv_openssl_sha2="yes"
1071 ac_cv_openssl_sha2="no"
1075 dnl Solaris disables greater than 128+ bit encryption in their OpenSSL
1076 dnl implementation, presumably for export reasons. If 192bit AES
1077 dnl is available, we assume that we're running with a 'non-export'
1078 dnl openssl library.
1081 #include <openssl/evp.h>
1085 ac_cv_openssl_export="no"
1087 ac_cv_openssl_export="yes"
1091 LIBS="${saved_LIBS}"
1092 CFLAGS="${saved_CFLAGS}"
1094 if test "$support_tls" = "yes"; then
1095 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
1096 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
1097 AC_DEFINE(HAVE_CRYPTO, 1, [Define if encryption support should be enabled])
1100 if test "$ac_cv_openssl_sha2" = "yes"; then
1101 AC_DEFINE(HAVE_SHA2, 1, [Define if the SHA-2 family of digest algorithms is available])
1104 if test "$ac_cv_openssl_export" = "yes"; then
1105 AC_DEFINE(HAVE_OPENSSL_EXPORT_LIBRARY, 1, [Define if the OpenSSL library is export-contrained to 128bit ciphers])
1114 AC_MSG_RESULT([$support_tls])
1115 AC_SUBST(OPENSSL_LIBS)
1116 AC_SUBST(OPENSSL_INC)
1118 dnl -----------------------------------------------------------
1119 dnl dlopen is needed for plugins
1120 dnl -----------------------------------------------------------
1121 AC_SEARCH_LIBS(dlopen, [dl])
1123 dnl ------------------------------------------
1124 dnl Where to place working dir
1125 dnl ------------------------------------------
1126 working_dir=`eval echo ${prefix}/var/bacula/working`
1127 AC_ARG_WITH(working-dir,
1128 AC_HELP_STRING([--with-working-dir=PATH], [specify path of Bacula working directory]),
1130 if test "x$withval" != "xno" ; then
1131 working_dir=$withval
1136 AC_SUBST(working_dir)
1138 dnl ------------------------------------------------------------------
1139 dnl If the user has not set archivedir, we set our default as /tmp
1140 dnl ------------------------------------------------------------------
1142 AC_ARG_WITH(archivedir,
1143 AC_HELP_STRING([--with-archivedir=PATH], [specify path of SD archive directory]),
1145 if test "x$withval" != "xno" ; then
1151 AC_SUBST(archivedir)
1153 dnl ------------------------------------------
1154 dnl Where to place scriptdir (script files)
1155 dnl ------------------------------------------
1156 scriptdir=`eval echo ${sysconfdir}`
1157 AC_ARG_WITH(scriptdir,
1158 AC_HELP_STRING([--with-scriptdir=PATH], [specify path of Bacula scripts directory]),
1160 if test "x$withval" != "xno" ; then
1168 # ------------------------------------------
1169 # Where to place plugindir (plugin files)
1170 # ------------------------------------------
1171 plugindir=`eval echo ${sysconfdir}`
1172 AC_ARG_WITH(plugindir,
1173 AC_HELP_STRING([--with-plugindir=PATH], [specify path of Bacula plugins directory]),
1175 if test "x$withval" != "xno" ; then
1183 dnl ------------------------------------------
1184 dnl Where to send dump email
1185 dnl ------------------------------------------
1186 dump_email=root@localhost
1187 AC_ARG_WITH(dump-email,
1188 AC_HELP_STRING([--with-dump-email=EMAIL], [dump email address]),
1190 if test "x$withval" != "xno" ; then
1196 AC_SUBST(dump_email)
1198 dnl ------------------------------------------
1199 dnl Where to send job email
1200 dnl ------------------------------------------
1201 job_email=root@localhost
1202 AC_ARG_WITH(job-email,
1203 AC_HELP_STRING([--with-job-email=EMAIL], [job output email address]),
1205 if test "x$withval" != "xno" ; then
1213 dnl ------------------------------------------
1214 dnl Where to find smtp host
1215 dnl ------------------------------------------
1217 AC_ARG_WITH(smtp_host,
1218 AC_HELP_STRING([--with-smtp-host=HOST], [SMTP mail host address]),
1220 if test "x$withval" != "xno" ; then
1228 dnl ------------------------------------
1229 dnl Where to place pid files
1230 dnl ------------------------------------
1232 AC_ARG_WITH(pid-dir,
1233 AC_HELP_STRING([--with-pid-dir=PATH], [specify location of Bacula pid files]),
1235 if test "x$withval" != "xno" ; then
1241 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
1244 dnl ------------------------------------
1245 dnl Where to place subsys "lock file"
1246 dnl ------------------------------------
1247 subsysdir=/var/run/subsys
1248 if test -d /var/run/subsys; then
1249 subsysdir=/var/run/subsys
1250 elif test -d /var/lock/subsys; then
1251 subsysdir=/var/lock/subsys
1253 subsysdir=/var/run/subsys
1255 AC_ARG_WITH(subsys-dir,
1256 AC_HELP_STRING([--with-subsys-dir=PATH], [specify location of Bacula subsys file]),
1258 if test "x$withval" != "xno" ; then
1266 dnl ------------------------------------
1267 dnl Where to start assigning ports
1268 dnl ------------------------------------
1270 AC_ARG_WITH(baseport,
1271 AC_HELP_STRING([--with-baseport=PORT], [specify base port address for daemons]),
1273 if test "x$withval" != "xno" ; then
1280 dir_port=`expr $baseport`
1281 fd_port=`expr $baseport + 1`
1282 sd_port=`expr $fd_port + 1`
1288 dnl ------------------------------------------
1289 dnl Generate passwords
1290 dnl ------------------------------------------
1292 AC_ARG_WITH(dir-password,
1293 AC_HELP_STRING([--with-dir-password=PASSWORD], [specify Director's password]),
1295 if test "x$withval" != "xno" ; then
1296 dir_password=$withval
1301 if test "x$dir_password" = "x" ; then
1302 if test "x$OPENSSL" = "xnone" ; then
1303 key=`autoconf/randpass 33`
1305 key=`openssl rand -base64 33`
1311 AC_ARG_WITH(fd-password,
1312 AC_HELP_STRING([--with-fd-password=PASSWORD], [specify Client's password]),
1314 if test "x$withval" != "xno" ; then
1315 fd_password=$withval
1320 if test "x$fd_password" = "x" ; then
1321 if test "x$OPENSSL" = "xnone" ; then
1322 key=`autoconf/randpass 37`
1324 key=`openssl rand -base64 33`
1330 AC_ARG_WITH(sd-password,
1331 AC_HELP_STRING([--with-sd-password=PASSWORD], [specify Storage daemon's password]),
1333 if test "x$withval" != "xno" ; then
1334 sd_password=$withval
1339 if test "x$sd_password" = "x" ; then
1340 if test "x$OPENSSL" = "xnone" ; then
1341 key=`autoconf/randpass 41`
1343 key=`openssl rand -base64 33`
1349 AC_ARG_WITH(mon-dir-password,
1350 AC_HELP_STRING([--with-mon-dir-password=PASSWORD], [specify Director's password used by the monitor]),
1352 if test "x$withval" != "xno" ; then
1353 mon_dir_password=$withval
1358 if test "x$mon_dir_password" = "x" ; then
1359 if test "x$OPENSSL" = "xnone" ; then
1360 key=`autoconf/randpass 33`
1362 key=`openssl rand -base64 33`
1364 mon_dir_password=$key
1368 AC_ARG_WITH(mon-fd-password,
1369 AC_HELP_STRING([--with-mon-fd-password=PASSWORD], [specify Client's password used by the monitor]),
1371 if test "x$withval" != "xno" ; then
1372 mon_fd_password=$withval
1377 if test "x$mon_fd_password" = "x" ; then
1378 if test "x$OPENSSL" = "xnone" ; then
1379 key=`autoconf/randpass 37`
1381 key=`openssl rand -base64 33`
1383 mon_fd_password=$key
1387 AC_ARG_WITH(mon-sd-password,
1388 AC_HELP_STRING([--with-mon-sd-password=PASSWORD], [specify Storage daemon's password used by the monitor]),
1390 if test "x$withval" != "xno" ; then
1391 mon_sd_password=$withval
1396 if test "x$mon_sd_password" = "x" ; then
1397 if test "x$OPENSSL" = "xnone" ; then
1398 key=`autoconf/randpass 41`
1400 key=`openssl rand -base64 33`
1402 mon_sd_password=$key
1405 AC_SUBST(dir_password)
1406 AC_SUBST(fd_password)
1407 AC_SUBST(sd_password)
1408 AC_SUBST(mon_dir_password)
1409 AC_SUBST(mon_fd_password)
1410 AC_SUBST(mon_sd_password)
1413 dnl Pickup any database name
1416 AC_ARG_WITH(db_name,
1417 AC_HELP_STRING([--with-db-name=DBNAME], [specify database name @<:@default=bacula@:>@]),
1419 if test "x$withval" != "x" ; then
1427 AC_ARG_WITH(db_user,
1428 AC_HELP_STRING([--with-db-user=UNAME], [specify database user @<:@default=bacula@:>@]),
1430 if test "x$withval" != "x" ; then
1438 AC_ARG_WITH(db_password,
1439 AC_HELP_STRING([--with-db-password=PWD], [specify database password @<:@default=*none*@:>@]),
1441 if test "x$withval" != "x" ; then
1442 db_password=$withval
1446 AC_SUBST(db_password)
1449 dnl Pickup a database port
1452 AC_ARG_WITH(db_port,
1453 AC_HELP_STRING([--with-db-port=DBPORT], [specify a database port @<:@default=null@:>@]),
1455 if test "x$withval" != "x" ; then
1463 # Handle users and groups for each daemon
1466 AC_ARG_WITH(dir_user,
1467 AC_HELP_STRING([--with-dir-user=USER], [specify user for Director daemon]),
1469 if test "x$withval" != "x" ; then
1476 AC_ARG_WITH(dir_group,
1477 AC_HELP_STRING([--with-dir-group=GROUP], [specify group for Director daemon]),
1479 if test "x$withval" != "x" ; then
1486 AC_ARG_WITH(sd_user,
1487 AC_HELP_STRING([--with-sd-user=USER], [specify user for Storage daemon]),
1489 if test "x$withval" != "x" ; then
1496 AC_ARG_WITH(sd_group,
1497 AC_HELP_STRING([--with-sd-group=GROUP], [specify group for Storage daemon]),
1499 if test "x$withval" != "x" ; then
1506 AC_ARG_WITH(fd_user,
1507 AC_HELP_STRING([--with-fd-user=USER], [specify user for File daemon]),
1509 if test "x$withval" != "x" ; then
1516 AC_ARG_WITH(fd_group,
1517 AC_HELP_STRING([--with-fd-group=GROUP], [specify group for File daemon]),
1519 if test "x$withval" != "x" ; then
1533 dnl allow setting default executable permissions
1536 AC_ARG_WITH(sbin-perm,
1537 AC_HELP_STRING([--with-sbin-perm=MODE], [specify permissions for sbin binaries @<:@default=0754@:>@]),
1539 if test "x$withval" != "x" ; then
1547 dnl ------------------------------------------------
1548 dnl Bacula check for various SQL database engines
1549 dnl ------------------------------------------------
1551 BA_CHECK_POSTGRESQL_DB
1566 dnl -------------------------------------------
1567 dnl enable batch attribute DB insert (default on)
1568 dnl -------------------------------------------
1569 support_batch_insert=no
1570 A=`test -f $SQL_LIB && nm $SQL_LIB | grep pthread_mutex_lock`
1572 if test $pkg = 0; then
1573 support_batch_insert=yes
1574 AC_ARG_ENABLE(batch-insert,
1575 AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]),
1577 if test x$enableval = xno; then
1578 support_batch_insert=no
1580 support_batch_insert=yes
1586 dnl Check if postgresql support batch mode
1587 if test x$DB_TYPE = xpostgresql; then
1588 A=`test -f $SQL_LIB && nm $SQL_LIB | grep PQputCopyData`
1590 if test $pkg != 0; then
1591 support_batch_insert=no
1595 if test x$DB_TYPE = xdbi; then
1599 dnl Check for batch insert
1600 if test $DB_PROG = postgresql; then
1601 A=`test -f $SQL_LIB && nm $SQL_LIB | grep PQputCopyData`
1605 if test $DB_PROG = mysql; then
1606 A=`test -f $SQL_LIB && nm $DB_PROG_LIB | grep pthread_mutex_lock`
1610 if test $DB_PROG = sqlite3; then
1611 A=`test -f $SQL_LIB && nm $DB_PROG_LIB | grep pthread_mutex_lock`
1615 if test $pkg = 0; then
1616 AC_ARG_ENABLE(batch-insert,
1617 AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]),
1619 if test x$enableval = xno; then
1620 support_batch_insert=no
1622 support_batch_insert=yes
1628 dnl If dbi was not chosen, let the comment in file
1632 AC_SUBST(uncomment_dbi)
1634 if test $support_batch_insert = yes ; then
1635 AC_DEFINE(HAVE_BATCH_FILE_INSERT, 1, [Set if DB batch insert code enabled])
1638 AC_DEFINE(PROTOTYPES)
1640 dnl --------------------------------------------------------------------------
1641 dnl Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1643 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1644 if test -z "$CCOPTS"; then
1645 CCOPTS='-g -O2 -Wall'
1653 dnl See if we can use 64 bit file addresses
1654 largefile_support="no"
1659 dnl --------------------------------------------------------------------------
1660 dnl CHECKING FOR HEADER FILES
1661 dnl --------------------------------------------------------------------------
1700 AC_STRUCT_ST_BLKSIZE
1704 dnl --------------------------------------------------------------------------
1705 dnl Check for utime.h structure
1706 dnl --------------------------------------------------------------------------
1707 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1711 #include <sys/types.h>
1716 ba_cv_header_utime_h=yes
1718 ba_cv_header_utime_h=no
1723 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H, 1, [Set if utime.h exists])
1725 dnl --------------------------------------------------------------------------
1726 dnl Check for socklen_t
1727 dnl --------------------------------------------------------------------------
1728 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1732 #include <sys/types.h>
1733 #include <sys/socket.h>
1737 ba_cv_header_socklen_t=yes
1739 ba_cv_header_socklen_t=no
1744 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1746 dnl --------------------------------------------------------------------------
1747 dnl Check for bigendian
1748 dnl --------------------------------------------------------------------------
1749 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1753 main(){long a=1L; char *p=(char *)&a; exit(*p);}
1764 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1766 dnl --------------------------------------------------------------------------
1767 dnl Check for typeof()
1768 dnl --------------------------------------------------------------------------
1770 AC_CACHE_CHECK(for typeof, ba_cv_have_typeof,
1774 main(){char *a = 0; a = (typeof a)a;}
1776 ba_cv_have_typeof=yes
1778 ba_cv_have_typeof=no
1780 ba_cv_have_typeof=no
1785 test $ba_cv_have_typeof = yes && AC_DEFINE([HAVE_TYPEOF], 1, [Defind to 1 if compiler has typeof])
1790 dnl --------------------------------------------------------------------------
1791 dnl CHECKING FOR FILESYSTEM TYPE
1792 dnl --------------------------------------------------------------------------
1793 AC_MSG_CHECKING(how to get filesystem type)
1795 # The order of these tests is important.
1798 #include <sys/statvfs.h>
1799 #include <sys/fstyp.h>
1801 AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4
1803 if test $fstype = no; then
1806 #include <sys/statfs.h>
1807 #include <sys/fstyp.h>
1809 AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3
1812 if test $fstype = no; then
1815 #include <sys/statfs.h>
1816 #include <sys/vmount.h>
1818 AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX
1821 if test $fstype = no; then
1826 AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD
1829 if test $fstype = no; then
1830 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1832 if test $fstype = no; then
1835 #include <sys/mount.h>
1836 #include <sys/fs_types.h>
1838 AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix
1841 AC_MSG_RESULT($fstype)
1843 AC_CHECK_HEADER(sys/statvfs.h, [ AC_DEFINE(HAVE_SYS_STATVFS_H,1,[Defines if your system have the sys/statvfs.h header file])] , )
1845 dnl --------------------------------------------------------------------------
1846 dnl CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1847 dnl --------------------------------------------------------------------------
1855 AC_CHECK_TYPE(ino_t, unsigned long)
1856 AC_CHECK_TYPE(dev_t, unsigned long)
1857 AC_CHECK_TYPE(daddr_t, long)
1858 AC_CHECK_TYPE(major_t, int)
1859 AC_CHECK_TYPE(minor_t, int)
1860 AC_CHECK_TYPE(ssize_t, int)
1866 AC_CHECK_SIZEOF(char, 1)
1867 AC_CHECK_SIZEOF(short int, 2)
1868 AC_CHECK_SIZEOF(int, 4)
1869 AC_CHECK_SIZEOF(long int, 4)
1870 AC_CHECK_SIZEOF(long long int, 8)
1871 AC_CHECK_SIZEOF(int *, 4)
1873 dnl Check for sys/types.h types
1874 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int,
1878 #include <sys/types.h>
1882 ac_cv_have_u_int="yes"
1884 ac_cv_have_u_int="no"
1889 if test "x$ac_cv_have_u_int" = "xyes" ; then
1890 AC_DEFINE(HAVE_U_INT)
1894 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t,
1898 #include <sys/types.h>
1902 ac_cv_have_intmax_t="yes"
1910 ac_cv_have_intmax_t="yes"
1912 ac_cv_have_intmax_t="no"
1919 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1920 AC_DEFINE(HAVE_INTMAX_T)
1924 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t,
1928 #include <sys/types.h>
1930 u_intmax_t a; a = 1;
1932 ac_cv_have_u_intmax_t="yes"
1938 u_intmax_t a; a = 1;
1940 ac_cv_have_u_intmax_t="yes"
1942 ac_cv_have_u_intmax_t="no"
1949 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1950 AC_DEFINE(HAVE_U_INTMAX_T)
1954 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t,
1958 #include <sys/types.h>
1960 int8_t a; int16_t b; int32_t c; a = b = c = 1;
1962 ac_cv_have_intxx_t="yes"
1964 ac_cv_have_intxx_t="no"
1969 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1970 AC_DEFINE(HAVE_INTXX_T)
1974 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t,
1978 #include <sys/types.h>
1982 ac_cv_have_int64_t="yes"
1984 ac_cv_have_int64_t="no"
1989 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1990 AC_DEFINE(HAVE_INT64_T)
1994 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t,
1998 #include <sys/types.h>
2000 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
2002 ac_cv_have_u_intxx_t="yes"
2004 ac_cv_have_u_intxx_t="no"
2009 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
2010 AC_DEFINE(HAVE_U_INTXX_T)
2014 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t,
2018 #include <sys/types.h>
2022 ac_cv_have_u_int64_t="yes"
2024 ac_cv_have_u_int64_t="no"
2029 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
2030 AC_DEFINE(HAVE_U_INT64_T)
2034 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
2035 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2037 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
2040 #include <sys/bitypes.h>
2042 int8_t a; int16_t b; int32_t c;
2043 u_int8_t e; u_int16_t f; u_int32_t g;
2044 a = b = c = e = f = g = 1;
2046 AC_DEFINE(HAVE_U_INTXX_T)
2047 AC_DEFINE(HAVE_INTXX_T)
2048 AC_DEFINE(HAVE_SYS_BITYPES_H)
2056 if test -z "$have_u_intxx_t" ; then
2057 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t,
2061 #include <sys/types.h>
2063 uint8_t a; uint16_t b;
2064 uint32_t c; a = b = c = 1;
2066 ac_cv_have_uintxx_t="yes"
2068 ac_cv_have_uintxx_t="no"
2073 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
2074 AC_DEFINE(HAVE_UINTXX_T)
2078 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
2079 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2081 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
2084 #include <sys/bitypes.h>
2086 int64_t a; u_int64_t b;
2089 AC_DEFINE(HAVE_U_INT64_T)
2090 AC_DEFINE(HAVE_INT64_T)
2098 if (test -z "$have_uintxx_t" && \
2099 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2101 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
2104 #include <sys/bitypes.h>
2106 uint8_t a; uint16_t b;
2107 uint32_t c; a = b = c = 1;
2109 AC_DEFINE(HAVE_UINTXX_T)
2117 dnl --------------------------------------------------------------------------
2118 dnl CHECKING FOR REQUIRED LIBRARY FUNCTIONS
2119 dnl --------------------------------------------------------------------------
2135 [echo 'configure: cannot find needed function.'; exit 1]
2138 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
2139 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
2140 AC_CHECK_FUNCS(posix_fadvise)
2141 AC_CHECK_FUNCS(fdatasync)
2143 AC_CHECK_FUNCS(chflags)
2145 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
2147 AC_CACHE_CHECK(for va_copy, ba_cv_va_copy,
2152 void use_va_copy(va_list args){va_list args2; va_copy(args2,args); va_end(args2);}
2153 void call_use_va_copy(int junk,...){va_list args; va_start(args,junk); use_va_copy(args); va_end(args);}
2155 call_use_va_copy(1,2,3)
2164 test $ba_cv_va_copy = yes && AC_DEFINE(HAVE_VA_COPY, 1, [Set if va_copy exists])
2166 dnl --------------------------------------------------------------------------
2167 dnl CHECKING FOR THREAD SAFE FUNCTIONS
2168 dnl --------------------------------------------------------------------------
2169 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
2171 # If resolver functions are not in libc check for -lnsl or -lresolv.
2172 AC_CHECK_FUNC(gethostbyname_r,
2173 AC_MSG_RESULT(using libc's resolver),
2174 AC_CHECK_LIB(nsl,gethostbyname_r)
2175 AC_CHECK_LIB(resolv,gethostbyname_r))
2177 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
2178 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
2179 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
2181 dnl ----------------------------
2182 dnl check sa_len of sockaddr
2183 dnl ----------------------------
2184 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
2188 #include <sys/socket.h>
2190 struct sockaddr s; s.sa_len;
2192 ac_cv_struct_sockaddr_sa_len=yes
2193 ], [ac_cv_struct_sockaddr_sa_len=no
2199 if test $ac_cv_struct_sockaddr_sa_len = yes; then
2200 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
2207 AC_FUNC_CLOSEDIR_VOID
2208 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
2209 # AC_FUNC_FNMATCH dnl use local version
2211 AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
2213 AC_CHECK_LIB(sun, getpwnam)
2215 AC_CHECK_HEADERS(zlib.h)
2216 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
2218 if test x$FDLIBS = x-lz; then
2219 AC_DEFINE(HAVE_LIBZ)
2224 dnl Check for ACL support and libraries
2228 AC_HELP_STRING([--disable-acl], [disable acl support @<:@default=auto@:>@]),
2230 if test x$enableval = xno; then
2237 have_extended_acl=no
2238 if test x$support_acl = xyes; then
2239 AC_CHECK_HEADER(sys/acl.h, [ AC_DEFINE(HAVE_SYS_ACL_H,1,[Defines if your system have the sys/acl.h header file])] , )
2240 AC_CHECK_FUNC(acl_get_file,
2244 AC_CHECK_LIB(acl, acl_get_file,
2247 FDLIBS="-lacl $FDLIBS"
2249 AC_CHECK_LIB(pacl, acl_get_file,
2252 FDLIBS="-lpacl $FDLIBS"
2254 AC_CHECK_LIB(sec, acltotext,
2257 FDLIBS="-lsec $FDLIBS"
2259 AC_CHECK_LIB(sec, acl_totext,
2261 have_extended_acl=yes
2272 if test $have_acl = yes; then
2276 if test $have_extended_acl = yes; then
2277 AC_DEFINE(HAVE_EXTENDED_ACL)
2282 dnl Check for XATTR support
2285 AC_ARG_ENABLE(xattr,
2286 AC_HELP_STRING([--disable-xattr], [disable xattr support @<:@default=auto@:>@]),
2288 if test x$enableval = xno; then
2295 if test x$support_xattr = xyes; then
2296 AC_CHECK_HEADER(sys/xattr.h, [ AC_DEFINE(HAVE_SYS_XATTR_H,1,[Defines if your system have the sys/xattr.h header file])] , )
2297 AC_CHECK_FUNCS(llistxattr lgetxattr lsetxattr,
2300 AC_DEFINE(HAVE_LLISTXATTR)
2301 AC_DEFINE(HAVE_LGETXATTR)
2302 AC_DEFINE(HAVE_LSETXATTR)
2304 AC_CHECK_FUNCS(listxattr getxattr setxattr,
2307 AC_DEFINE(HAVE_LISTXATTR)
2308 AC_DEFINE(HAVE_GETXATTR)
2309 AC_DEFINE(HAVE_SETXATTR)
2315 if test $have_xattr = yes; then
2316 AC_DEFINE(HAVE_XATTR)
2321 dnl Check for pthread libraries
2324 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
2326 AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
2328 AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
2330 AC_CHECK_FUNC(pthread_create)
2343 if test x$have_gcc = xyes ; then
2344 CPPFLAGS="$CPPFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
2345 CFLAGS="$CFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
2347 LDFLAGS=${LDFLAGS--O}
2348 DB_LIBS="${SQL_LFLAGS}"
2349 CPPFLAGS="$CPPFLAGS"
2362 AC_SUBST(X_EXTRA_LIBS)
2367 dnl extra configurable objects
2378 dnl Finally we set appropriate distribution specific
2379 dnl variables and defaults
2381 dnl PFILES are platform specific files
2382 PFILES="platforms/Makefile"
2386 hostname=`uname -n | cut -d '.' -f 1`
2387 if test x${hostname} = x ; then
2388 hostname="localhost"
2393 PSCMD="ps -e -o pid,comm"
2395 platforms/aix/Makefile"
2396 TAPEDRIVE="/dev/rmt0.1"
2400 PTHREAD_LIB="-lpthread -lexc"
2401 if test "${CC}" = "gcc" ; then
2408 TAPEDRIVE="/dev/nrmt0"
2411 DISTVER=`uname -a |awk '{print $3}'`
2412 TAPEDRIVE="/dev/nrmt0"
2413 PTHREAD_LIB="-pthread"
2414 CFLAGS="${CFLAGS} -pthread"
2415 PSCMD="ps -ax -o pid,command"
2419 platforms/bsdi/Makefile \
2420 platforms/bsdi/bacula-fd \
2421 platforms/bsdi/bacula-sd \
2422 platforms/bsdi/bacula-dir"
2423 largefile_support="yes"
2426 DISTVER=`uname -a |awk '{print $3}'`
2427 TAPEDRIVE="/dev/nrst0"
2430 WLDFLAGS="-mwindows"
2434 TAPEDRIVE="/dev/nst0"
2435 PSCMD="ps -e -o pid,command"
2438 platforms/darwin/Makefile"
2441 dnl Make sure hostname is resolved
2442 ping -c 1 $hostname 2>&1 1>/dev/null
2443 if test ! $? = 0; then
2444 hostname="localhost"
2446 if `test -f /etc/apt/sources.list && grep -q ubuntu /etc/apt/sources.list`; then
2449 DISTVER=`cat /etc/debian_version`
2450 if test -f /etc/lsb-release ; then
2452 if test "x$DISTRIB_ID" != "x" ; then
2453 DISTNAME=$DISTRIB_ID
2455 if test "x$DISTRIB_RELEASE" != "x" ; then
2456 DISTVER=$DISTRIB_RELEASE
2459 if test "$DISTNAME" = "Ubuntu" ; then
2462 TAPEDRIVE="/dev/nst0"
2463 PSCMD="ps -e -o pid,command"
2464 if test "$DISTNAME" = "ubuntu" ; then
2466 platforms/ubuntu/Makefile \
2467 platforms/ubuntu/bacula-fd \
2468 platforms/ubuntu/bacula-sd \
2469 platforms/ubuntu/bacula-dir"
2472 platforms/debian/Makefile \
2473 platforms/debian/bacula-fd \
2474 platforms/debian/bacula-sd \
2475 platforms/debian/bacula-dir"
2479 dnl Make sure hostname is resolved
2480 ping -c 1 $hostname 2>&1 1>/dev/null
2481 if test ! $? = 0; then
2482 hostname="localhost"
2484 DISTVER=`uname -a |awk '{print $3}'`
2485 VER=`echo $DISTVER | cut -c 1`
2486 if test x$VER = x4 ; then
2487 PTHREAD_LIB="${PTHREAD_LIBS:--pthread}"
2488 CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS:--pthread}"
2492 TAPEDRIVE="/dev/nrsa0"
2493 PSCMD="ps -ax -o pid,command"
2495 platforms/freebsd/Makefile \
2496 platforms/freebsd/bacula-fd \
2497 platforms/freebsd/bacula-sd \
2498 platforms/freebsd/bacula-dir"
2499 largefile_support="yes"
2502 PSCMD="UNIX95=1; ps -e -o pid,comm"
2503 CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
2505 TAPEDRIVE="/dev/rmt/0hnb"
2506 PTHREAD_LIB="-lpthread"
2507 AC_DEFINE([_INCLUDE_LONGLONG])
2511 TAPEDRIVE="/dev/rmt/0cbn"
2512 PSCMD="ps -e -o pid,comm"
2514 platforms/irix/Makefile \
2515 platforms/irix/bacula-fd \
2516 platforms/irix/bacula-sd \
2517 platforms/irix/bacula-dir"
2520 DISTVER=`uname -a |awk '{print $3}'`
2523 TAPEDRIVE="/dev/nrst0"
2524 PSCMD="ps -ax -o pid,command"
2525 PTHREAD_LIB="-pthread"
2526 CFLAGS="${CFLAGS} -pthread"
2529 DISTVER=`uname -a |awk '{print $3}'`
2532 TAPEDRIVE="/dev/nrst0"
2533 PSCMD="ps -ax -o pid,command"
2534 PTHREAD_LIB="-pthread"
2535 CFLAGS="${CFLAGS} -pthread"
2537 platforms/openbsd/Makefile \
2538 platforms/openbsd/bacula-fd \
2539 platforms/openbsd/bacula-sd \
2540 platforms/openbsd/bacula-dir"
2543 dnl Make sure hostname is resolved
2544 ping -c 1 $hostname 2>&1 1>/dev/null
2545 if test ! $? = 0; then
2546 hostname="localhost"
2548 if test -f /etc/whitebox-release ; then
2549 f=/etc/whitebox-release
2551 f=/etc/redhat-release
2553 if test `cat $f | grep release |\
2554 cut -f 3 -d ' '`x = "Enterprise"x ; then
2555 DISTVER="Enterprise "`cat $f | grep release |\
2558 DISTVER=`cat /etc/redhat-release | grep release |\
2561 TAPEDRIVE="/dev/nst0"
2562 PSCMD="ps -e -o pid,command"
2564 platforms/redhat/Makefile \
2565 platforms/redhat/bacula-fd \
2566 platforms/redhat/bacula-sd \
2567 platforms/redhat/bacula-dir \
2568 platforms/redhat/bacula.spec \
2572 dnl Make sure hostname is resolved
2573 ping -c 1 $hostname 2>&1 1>/dev/null
2574 if test ! $? = 0; then
2575 hostname="localhost"
2577 DISTVER=`cat /etc/mandrake-release | grep release |\
2579 TAPEDRIVE="/dev/nst0"
2580 PSCMD="ps -e -o pid,command"
2582 platforms/mandrake/Makefile \
2583 platforms/mandrake/bacula-fd \
2584 platforms/mandrake/bacula-sd \
2585 platforms/mandrake/bacula-dir \
2586 platforms/mandrake/bacula.spec \
2590 dnl Make sure hostname is resolved
2591 ping -c 1 $hostname 2>&1 1>/dev/null
2592 if test ! $? = 0; then
2593 hostname="localhost"
2595 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
2596 TAPEDRIVE="/dev/nst0"
2597 PSCMD="ps -e -o pid,command"
2599 platforms/gentoo/Makefile \
2600 platforms/gentoo/bacula-init \
2601 platforms/gentoo/bacula-fd \
2602 platforms/gentoo/bacula-sd \
2603 platforms/gentoo/bacula-dir"
2606 dnl Make sure hostname is resolved
2607 ping -c 1 $hostname 2>&1 1>/dev/null
2608 if test ! $? = 0; then
2609 hostname="localhost"
2611 DISTVER=`cat /etc/slackware-version`
2612 TAPEDRIVE="/dev/nst0"
2613 PSCMD="ps -e -o pid,command"
2615 platforms/slackware/Makefile \
2616 platforms/slackware/rc.bacula-fd \
2617 platforms/slackware/rc.bacula-sd \
2618 platforms/slackware/rc.bacula-dir\
2619 platforms/slackware/functions.bacula"
2623 TAPEDRIVE="/dev/rmt/0cbn"
2624 PSCMD="ps -e -o pid,comm"
2626 platforms/solaris/Makefile \
2627 platforms/solaris/bacula-fd \
2628 platforms/solaris/bacula-sd \
2629 platforms/solaris/bacula-dir"
2630 if test x$DISTVER = x5.6 ; then
2631 AC_DEFINE(HAVE_OLD_SOCKOPT)
2633 LIBS="$LIBS -lresolv"
2636 dnl Make sure hostname is resolved
2637 ping -c 1 $hostname 2>&1 1>/dev/null
2638 if test ! $? = 0; then
2639 hostname="localhost"
2641 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
2643 TAPEDRIVE="/dev/nst0"
2644 PSCMD="ps -e -o pid,command"
2646 platforms/suse/Makefile \
2647 platforms/suse/bacula-fd \
2648 platforms/suse/bacula-sd \
2649 platforms/suse/bacula-dir \
2650 platforms/suse/bacula \
2651 platforms/suse/bacula.spec"
2654 dnl Make sure hostname is resolved
2655 ping -c 1 $hostname 2>&1 1>/dev/null
2656 if test ! $? = 0; then
2657 hostname="localhost"
2661 TAPEDRIVE="/dev/nst0"
2662 PSCMD="ps -e -o pid,command"
2664 platforms/suse/Makefile \
2665 platforms/suse/bacula-fd \
2666 platforms/suse/bacula-sd \
2667 platforms/suse/bacula-dir"
2671 TAPEDRIVE="/dev/nst0"
2674 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
2680 LIBS="$PTHREAD_LIB $LIBS"
2682 AC_DEFINE_UNQUOTED(lld, "$lld")
2683 AC_DEFINE_UNQUOTED(llu, "$llu")
2691 dnl common parts of the Makefile
2692 MCOMMON=./autoconf/Make.common
2693 AC_SUBST_FILE(MCOMMON)
2696 if test "x${subsysdir}" = "x${sbindir}" ; then
2699 echo "You have set both --sbindir and --with-subsys-dir"
2700 echo " equal to: ${subsysdir} "
2701 echo "This is not permitted. Please reconfigure."
2703 echo "Aborting configuration ..."
2709 AC_OUTPUT([autoconf/Make.common \
2712 scripts/startmysql \
2714 scripts/btraceback \
2720 scripts/bacula-ctl-dir \
2721 scripts/bacula-ctl-fd \
2722 scripts/bacula-ctl-sd \
2723 scripts/devel_bacula \
2726 scripts/bacula.desktop.gnome1 \
2727 scripts/bacula.desktop.gnome2 \
2728 scripts/bacula.desktop.gnome1.consolehelper \
2729 scripts/bacula.desktop.gnome2.consolehelper \
2730 scripts/bacula.desktop.gnome1.xsu \
2731 scripts/bacula.desktop.gnome2.xsu \
2732 scripts/bgnome-console.console_apps \
2733 scripts/mtx-changer \
2734 scripts/disk-changer \
2735 scripts/dvd-handler \
2736 scripts/dvd-simulator \
2737 scripts/bacula-tray-monitor.desktop \
2738 scripts/logwatch/Makefile \
2739 scripts/logwatch/logfile.bacula.conf \
2740 scripts/wxconsole.console_apps \
2741 scripts/wxconsole.desktop.consolehelper \
2742 scripts/wxconsole.desktop.xsu \
2743 scripts/bat.desktop \
2744 scripts/bat.desktop.xsu \
2745 scripts/bat.desktop.consolehelper \
2746 scripts/bat.console_apps \
2749 src/console/Makefile \
2750 src/console/bconsole.conf \
2751 src/gnome2-console/Makefile \
2752 src/gnome2-console/bgnome-console.conf \
2753 src/qt-console/bat.conf \
2754 src/qt-console/bat.pro \
2755 src/qt-console/bat.pro.mingw32 \
2756 src/qt-console/install_conf_file \
2757 src/wx-console/Makefile \
2758 src/wx-console/bwx-console.conf \
2759 src/tray-monitor/Makefile \
2760 src/tray-monitor/tray-monitor.conf \
2762 src/dird/bacula-dir.conf \
2764 src/stored/Makefile \
2765 src/stored/bacula-sd.conf \
2766 src/filed/Makefile \
2767 src/filed/bacula-fd.conf \
2769 src/cats/make_catalog_backup \
2770 src/cats/delete_catalog_backup \
2771 src/cats/create_postgresql_database \
2772 src/cats/update_postgresql_tables \
2773 src/cats/make_postgresql_tables \
2774 src/cats/grant_postgresql_privileges \
2775 src/cats/drop_postgresql_tables \
2776 src/cats/drop_postgresql_database \
2777 src/cats/create_mysql_database \
2778 src/cats/update_mysql_tables \
2779 src/cats/make_mysql_tables \
2780 src/cats/grant_mysql_privileges \
2781 src/cats/drop_mysql_tables \
2782 src/cats/drop_mysql_database \
2783 src/cats/create_sqlite_database \
2784 src/cats/update_sqlite_tables \
2785 src/cats/make_sqlite_tables \
2786 src/cats/grant_sqlite_privileges \
2787 src/cats/drop_sqlite_tables \
2788 src/cats/drop_sqlite_database \
2789 src/cats/create_sqlite3_database \
2790 src/cats/update_sqlite3_tables \
2791 src/cats/make_sqlite3_tables \
2792 src/cats/grant_sqlite3_privileges \
2793 src/cats/drop_sqlite3_tables \
2794 src/cats/drop_sqlite3_database \
2797 src/cats/create_bdb_database \
2798 src/cats/update_bdb_tables \
2799 src/cats/make_bdb_tables \
2800 src/cats/grant_bdb_privileges \
2801 src/cats/drop_bdb_tables \
2802 src/cats/drop_bdb_database \
2803 src/cats/create_bacula_database \
2804 src/cats/update_bacula_tables \
2805 src/cats/grant_bacula_privileges \
2806 src/cats/make_bacula_tables \
2807 src/cats/drop_bacula_tables \
2808 src/cats/drop_bacula_database \
2809 src/findlib/Makefile \
2810 src/tools/Makefile \
2811 src/plugins/fd/Makefile \
2812 src/plugins/sd/Makefile \
2813 src/plugins/dir/Makefile \
2815 updatedb/update_mysql_tables_10_to_11 \
2816 updatedb/update_sqlite3_tables_10_to_11 \
2817 updatedb/update_postgresql_tables_10_to_11 \
2818 updatedb/update_sqlite_tables_10_to_11 \
2823 if test "${support_bat}" = "yes" ; then
2824 if test "x$QMAKE" = "xnone" && test "x$QMAKEQT4" = "xnone"; then
2825 echo "Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation"
2831 if test "x$QMAKEQT4" != "xnone"; then
2836 chmod 755 install_conf_file build-depkgs-qt-console
2837 echo "Creating bat Makefile"
2844 dnl if CC is gcc, we can rebuild the dependencies (since the depend rule
2845 dnl requires gcc). If it's not, don't rebuild dependencies
2847 if test X"$GCC" = "Xyes" ; then
2848 echo "Doing make of dependencies"
2849 ${MAKE:-make} depend
2853 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2854 chmod 755 dvd-handler dvd-simulator
2855 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2859 chmod 755 $c/update_mysql_tables_10_to_11 $c/update_sqlite3_tables_10_to_11
2860 chmod 755 $c/update_postgresql_tables_10_to_11 $c/update_sqlite_tables_10_to_11
2864 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2865 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2867 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2868 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2870 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2871 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2873 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2874 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2876 chmod 755 $c/create_sqlite3_database $c/update_sqlite3_tables $c/make_sqlite3_tables
2877 chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
2879 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2880 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2882 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2886 chmod 755 src/win32/build-depkgs-mingw32
2888 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2889 largefile_support="yes"
2892 dnl Only try to find out the version number of the compiler when we know its some kind of GCC compiler
2893 if test X"$GCC" = "Xyes" ; then
2895 dnl A whole lot of hand springs to get the compiler version.
2896 dnl This is because gcc changed the output in version 3.0
2898 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2899 if test "x${CCVERSION}" = "x" ; then
2900 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2902 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2903 if test x"${CXXVERSION}" = x ; then
2904 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2908 # clean up any old junk
2914 if test "x${db_type}" = "xInternal" ; then
2917 echo "You have not specified either --enable-client-only or one of the"
2918 echo " supported databases: MySQL, PostgreSQL, SQLite3, SQLite or DBI."
2919 echo " This is not permitted. Please reconfigure."
2921 echo "Aborting the configuration ..."
2928 Configuration on `date`:
2930 Host: ${host}${post_host} -- ${DISTNAME} ${DISTVER}
2931 Bacula version: ${BACULA} ${VERSION} (${DATE})
2932 Source code location: ${srcdir}
2933 Install binaries: ${sbindir}
2934 Install libraries: ${libdir}
2935 Install config files: ${sysconfdir}
2936 Scripts directory: ${scriptdir}
2937 Archive directory: ${archivedir}
2938 Working directory: ${working_dir}
2939 PID directory: ${piddir}
2940 Subsys directory: ${subsysdir}
2941 Man directory: ${mandir}
2942 Data directory: ${datarootdir}
2943 Plugin directory: ${plugindir}
2944 C Compiler: ${CC} ${CCVERSION}
2945 C++ Compiler: ${CXX} ${CXXVERSION}
2946 Compiler flags: ${WCFLAGS} ${CFLAGS}
2947 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2949 Statically Linked Tools: ${support_static_tools}
2950 Statically Linked FD: ${support_static_fd}
2951 Statically Linked SD: ${support_static_sd}
2952 Statically Linked DIR: ${support_static_dir}
2953 Statically Linked CONS: ${support_static_cons}
2954 Database type: ${db_type}
2955 Database port: ${db_port}
2956 Database lib: ${DB_LIBS}
2957 Database name: ${db_name}
2958 Database user: ${db_user}
2960 Job Output Email: ${job_email}
2961 Traceback Email: ${dump_email}
2962 SMTP Host Address: ${smtp_host}
2964 Director Port: ${dir_port}
2965 File daemon Port: ${fd_port}
2966 Storage daemon Port: ${sd_port}
2968 Director User: ${dir_user}
2969 Director Group: ${dir_group}
2970 Storage Daemon User: ${sd_user}
2971 Storage DaemonGroup: ${sd_group}
2972 File Daemon User: ${fd_user}
2973 File Daemon Group: ${fd_group}
2975 SQL binaries Directory ${SQL_BINDIR}
2977 Large file support: $largefile_support
2978 Bacula conio support: ${got_conio} ${CONS_LIBS}
2979 readline support: ${got_readline} ${PRTREADLINE_SRC}
2980 TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
2981 TLS support: ${support_tls}
2982 Encryption support: ${support_crypto}
2983 ZLIB support: ${have_zlib}
2984 enable-smartalloc: ${support_smartalloc}
2985 bat support: ${support_bat} ${QWT_LDFLAGS}
2986 enable-gnome: ${support_gnome} ${gnome_version}
2987 enable-bwx-console: ${support_wx_console} ${wx_version}
2988 enable-tray-monitor: ${support_tray_monitor}
2989 client-only: ${build_client_only}
2990 build-dird: ${build_dird}
2991 build-stored: ${build_stored}
2992 ACL support: ${have_acl}
2993 XATTR support: ${have_xattr}
2994 Python support: ${support_python} ${PYTHON_LIBS}
2995 Batch insert enabled: ${support_batch_insert}