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 (script 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 libraries
2210 have_extended_acl=no
2211 AC_CHECK_HEADER(sys/acl.h)
2212 AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
2214 AC_CHECK_LIB(acl, acl_get_file,
2217 FDLIBS="-lacl $FDLIBS"
2219 AC_CHECK_LIB(sec, acltotext,
2222 FDLIBS="-lsec $FDLIBS"
2224 AC_CHECK_LIB(sec, acl_totext,
2226 have_extended_acl=yes
2235 if test $have_acl = yes; then
2239 if test $have_extended_acl = yes; then
2240 AC_DEFINE(HAVE_EXTENDED_ACL)
2243 dnl Check for pthread libraries
2245 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
2247 AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
2249 AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
2251 AC_CHECK_FUNC(pthread_create)
2264 if test x$have_gcc = xyes ; then
2265 CPPFLAGS="$CPPFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
2266 CFLAGS="$CFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
2268 LDFLAGS=${LDFLAGS--O}
2269 DB_LIBS="${SQL_LFLAGS}"
2270 CPPFLAGS="$CPPFLAGS"
2283 AC_SUBST(X_EXTRA_LIBS)
2288 dnl extra configurable objects
2299 dnl Finally we set appropriate distribution specific
2300 dnl variables and defaults
2302 dnl PFILES are platform specific files
2303 PFILES="platforms/Makefile"
2307 hostname=`uname -n | cut -d '.' -f 1`
2308 if test x${hostname} = x ; then
2309 hostname="localhost"
2314 PSCMD="ps -e -o pid,comm"
2316 platforms/aix/Makefile"
2317 TAPEDRIVE="/dev/rmt0.1"
2321 PTHREAD_LIB="-lpthread -lexc"
2322 if test "${CC}" = "gcc" ; then
2329 TAPEDRIVE="/dev/nrmt0"
2332 DISTVER=`uname -a |awk '{print $3}'`
2333 TAPEDRIVE="/dev/nrmt0"
2334 PTHREAD_LIB="-pthread"
2335 CFLAGS="${CFLAGS} -pthread"
2336 PSCMD="ps -ax -o pid,command"
2340 platforms/bsdi/Makefile \
2341 platforms/bsdi/bacula-fd \
2342 platforms/bsdi/bacula-sd \
2343 platforms/bsdi/bacula-dir"
2344 largefile_support="yes"
2347 DISTVER=`uname -a |awk '{print $3}'`
2348 TAPEDRIVE="/dev/nrst0"
2351 WLDFLAGS="-mwindows"
2355 TAPEDRIVE="/dev/nst0"
2356 PSCMD="ps -e -o pid,command"
2359 platforms/darwin/Makefile"
2362 dnl Make sure hostname is resolved
2363 ping -c 1 $hostname 2>&1 1>/dev/null
2364 if test ! $? = 0; then
2365 hostname="localhost"
2367 if `test -f /etc/apt/sources.list && grep -q ubuntu /etc/apt/sources.list`; then
2370 DISTVER=`cat /etc/debian_version`
2371 if test -f /etc/lsb-release ; then
2373 if test "x$DISTRIB_ID" != "x" ; then
2374 DISTNAME=$DISTRIB_ID
2376 if test "x$DISTRIB_RELEASE" != "x" ; then
2377 DISTVER=$DISTRIB_RELEASE
2380 if test "$DISTNAME" = "Ubuntu" ; then
2383 TAPEDRIVE="/dev/nst0"
2384 PSCMD="ps -e -o pid,command"
2385 if test "$DISTNAME" = "ubuntu" ; then
2387 platforms/ubuntu/Makefile \
2388 platforms/ubuntu/bacula-fd \
2389 platforms/ubuntu/bacula-sd \
2390 platforms/ubuntu/bacula-dir"
2393 platforms/debian/Makefile \
2394 platforms/debian/bacula-fd \
2395 platforms/debian/bacula-sd \
2396 platforms/debian/bacula-dir"
2400 dnl Make sure hostname is resolved
2401 ping -c 1 $hostname 2>&1 1>/dev/null
2402 if test ! $? = 0; then
2403 hostname="localhost"
2405 DISTVER=`uname -a |awk '{print $3}'`
2406 VER=`echo $DISTVER | cut -c 1`
2407 if test x$VER = x4 ; then
2408 PTHREAD_LIB="${PTHREAD_LIBS:--pthread}"
2409 CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS:--pthread}"
2413 TAPEDRIVE="/dev/nrsa0"
2414 PSCMD="ps -ax -o pid,command"
2416 platforms/freebsd/Makefile \
2417 platforms/freebsd/bacula-fd \
2418 platforms/freebsd/bacula-sd \
2419 platforms/freebsd/bacula-dir"
2420 largefile_support="yes"
2423 PSCMD="UNIX95=1; ps -e -o pid,comm"
2424 CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
2426 TAPEDRIVE="/dev/rmt/0hnb"
2427 PTHREAD_LIB="-lpthread"
2428 AC_DEFINE([_INCLUDE_LONGLONG])
2432 TAPEDRIVE="/dev/rmt/0cbn"
2433 PSCMD="ps -e -o pid,comm"
2435 platforms/irix/Makefile \
2436 platforms/irix/bacula-fd \
2437 platforms/irix/bacula-sd \
2438 platforms/irix/bacula-dir"
2441 DISTVER=`uname -a |awk '{print $3}'`
2444 TAPEDRIVE="/dev/nrst0"
2445 PSCMD="ps -ax -o pid,command"
2446 PTHREAD_LIB="-pthread"
2447 CFLAGS="${CFLAGS} -pthread"
2450 DISTVER=`uname -a |awk '{print $3}'`
2453 TAPEDRIVE="/dev/nrst0"
2454 PSCMD="ps -ax -o pid,command"
2455 PTHREAD_LIB="-pthread"
2456 CFLAGS="${CFLAGS} -pthread"
2458 platforms/openbsd/Makefile \
2459 platforms/openbsd/bacula-fd \
2460 platforms/openbsd/bacula-sd \
2461 platforms/openbsd/bacula-dir"
2464 dnl Make sure hostname is resolved
2465 ping -c 1 $hostname 2>&1 1>/dev/null
2466 if test ! $? = 0; then
2467 hostname="localhost"
2469 if test -f /etc/whitebox-release ; then
2470 f=/etc/whitebox-release
2472 f=/etc/redhat-release
2474 if test `cat $f | grep release |\
2475 cut -f 3 -d ' '`x = "Enterprise"x ; then
2476 DISTVER="Enterprise "`cat $f | grep release |\
2479 DISTVER=`cat /etc/redhat-release | grep release |\
2482 TAPEDRIVE="/dev/nst0"
2483 PSCMD="ps -e -o pid,command"
2485 platforms/redhat/Makefile \
2486 platforms/redhat/bacula-fd \
2487 platforms/redhat/bacula-sd \
2488 platforms/redhat/bacula-dir \
2489 platforms/redhat/bacula.spec \
2493 dnl Make sure hostname is resolved
2494 ping -c 1 $hostname 2>&1 1>/dev/null
2495 if test ! $? = 0; then
2496 hostname="localhost"
2498 DISTVER=`cat /etc/mandrake-release | grep release |\
2500 TAPEDRIVE="/dev/nst0"
2501 PSCMD="ps -e -o pid,command"
2503 platforms/mandrake/Makefile \
2504 platforms/mandrake/bacula-fd \
2505 platforms/mandrake/bacula-sd \
2506 platforms/mandrake/bacula-dir \
2507 platforms/mandrake/bacula.spec \
2511 dnl Make sure hostname is resolved
2512 ping -c 1 $hostname 2>&1 1>/dev/null
2513 if test ! $? = 0; then
2514 hostname="localhost"
2516 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
2517 TAPEDRIVE="/dev/nst0"
2518 PSCMD="ps -e -o pid,command"
2520 platforms/gentoo/Makefile \
2521 platforms/gentoo/bacula-init \
2522 platforms/gentoo/bacula-fd \
2523 platforms/gentoo/bacula-sd \
2524 platforms/gentoo/bacula-dir"
2527 dnl Make sure hostname is resolved
2528 ping -c 1 $hostname 2>&1 1>/dev/null
2529 if test ! $? = 0; then
2530 hostname="localhost"
2532 DISTVER=`cat /etc/slackware-version`
2533 TAPEDRIVE="/dev/nst0"
2534 PSCMD="ps -e -o pid,command"
2536 platforms/slackware/Makefile \
2537 platforms/slackware/rc.bacula-fd \
2538 platforms/slackware/rc.bacula-sd \
2539 platforms/slackware/rc.bacula-dir\
2540 platforms/slackware/functions.bacula"
2544 TAPEDRIVE="/dev/rmt/0cbn"
2545 PSCMD="ps -e -o pid,comm"
2547 platforms/solaris/Makefile \
2548 platforms/solaris/bacula-fd \
2549 platforms/solaris/bacula-sd \
2550 platforms/solaris/bacula-dir"
2551 if test x$DISTVER = x5.6 ; then
2552 AC_DEFINE(HAVE_OLD_SOCKOPT)
2554 LIBS="$LIBS -lresolv"
2557 dnl Make sure hostname is resolved
2558 ping -c 1 $hostname 2>&1 1>/dev/null
2559 if test ! $? = 0; then
2560 hostname="localhost"
2562 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
2564 TAPEDRIVE="/dev/nst0"
2565 PSCMD="ps -e -o pid,command"
2567 platforms/suse/Makefile \
2568 platforms/suse/bacula-fd \
2569 platforms/suse/bacula-sd \
2570 platforms/suse/bacula-dir \
2571 platforms/suse/bacula \
2572 platforms/suse/bacula.spec"
2575 dnl Make sure hostname is resolved
2576 ping -c 1 $hostname 2>&1 1>/dev/null
2577 if test ! $? = 0; then
2578 hostname="localhost"
2582 TAPEDRIVE="/dev/nst0"
2583 PSCMD="ps -e -o pid,command"
2585 platforms/suse/Makefile \
2586 platforms/suse/bacula-fd \
2587 platforms/suse/bacula-sd \
2588 platforms/suse/bacula-dir"
2592 TAPEDRIVE="/dev/nst0"
2595 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
2601 LIBS="$PTHREAD_LIB $LIBS"
2603 AC_DEFINE_UNQUOTED(lld, "$lld")
2604 AC_DEFINE_UNQUOTED(llu, "$llu")
2612 dnl common parts of the Makefile
2613 MCOMMON=./autoconf/Make.common
2614 AC_SUBST_FILE(MCOMMON)
2617 if test "x${subsysdir}" = "x${sbindir}" ; then
2620 echo "You have set both --sbindir and --with-subsys-dir"
2621 echo " equal to: ${subsysdir} "
2622 echo "This is not permitted. Please reconfigure."
2624 echo "Aborting configuration ..."
2630 AC_OUTPUT([autoconf/Make.common \
2633 scripts/startmysql \
2635 scripts/btraceback \
2641 scripts/bacula-ctl-dir \
2642 scripts/bacula-ctl-fd \
2643 scripts/bacula-ctl-sd \
2644 scripts/devel_bacula \
2647 scripts/bacula.desktop.gnome1 \
2648 scripts/bacula.desktop.gnome2 \
2649 scripts/bacula.desktop.gnome1.consolehelper \
2650 scripts/bacula.desktop.gnome2.consolehelper \
2651 scripts/bacula.desktop.gnome1.xsu \
2652 scripts/bacula.desktop.gnome2.xsu \
2653 scripts/bgnome-console.console_apps \
2654 scripts/mtx-changer \
2655 scripts/disk-changer \
2656 scripts/dvd-handler \
2657 scripts/dvd-simulator \
2658 scripts/bacula-tray-monitor.desktop \
2659 scripts/logwatch/Makefile \
2660 scripts/logwatch/logfile.bacula.conf \
2661 scripts/wxconsole.console_apps \
2662 scripts/wxconsole.desktop.consolehelper \
2663 scripts/wxconsole.desktop.xsu \
2664 scripts/bat.desktop \
2665 scripts/bat.desktop.xsu \
2666 scripts/bat.desktop.consolehelper \
2667 scripts/bat.console_apps \
2670 src/console/Makefile \
2671 src/console/bconsole.conf \
2672 src/gnome2-console/Makefile \
2673 src/gnome2-console/bgnome-console.conf \
2674 src/qt-console/bat.conf \
2675 src/qt-console/bat.pro \
2676 src/qt-console/bat.pro.mingw32 \
2677 src/qt-console/install_conf_file \
2678 src/wx-console/Makefile \
2679 src/wx-console/bwx-console.conf \
2680 src/tray-monitor/Makefile \
2681 src/tray-monitor/tray-monitor.conf \
2683 src/dird/bacula-dir.conf \
2685 src/stored/Makefile \
2686 src/stored/bacula-sd.conf \
2687 src/filed/Makefile \
2688 src/filed/bacula-fd.conf \
2690 src/cats/make_catalog_backup \
2691 src/cats/delete_catalog_backup \
2692 src/cats/create_postgresql_database \
2693 src/cats/update_postgresql_tables \
2694 src/cats/make_postgresql_tables \
2695 src/cats/grant_postgresql_privileges \
2696 src/cats/drop_postgresql_tables \
2697 src/cats/drop_postgresql_database \
2698 src/cats/create_mysql_database \
2699 src/cats/update_mysql_tables \
2700 src/cats/make_mysql_tables \
2701 src/cats/grant_mysql_privileges \
2702 src/cats/drop_mysql_tables \
2703 src/cats/drop_mysql_database \
2704 src/cats/create_sqlite_database \
2705 src/cats/update_sqlite_tables \
2706 src/cats/make_sqlite_tables \
2707 src/cats/grant_sqlite_privileges \
2708 src/cats/drop_sqlite_tables \
2709 src/cats/drop_sqlite_database \
2710 src/cats/create_sqlite3_database \
2711 src/cats/update_sqlite3_tables \
2712 src/cats/make_sqlite3_tables \
2713 src/cats/grant_sqlite3_privileges \
2714 src/cats/drop_sqlite3_tables \
2715 src/cats/drop_sqlite3_database \
2718 src/cats/create_bdb_database \
2719 src/cats/update_bdb_tables \
2720 src/cats/make_bdb_tables \
2721 src/cats/grant_bdb_privileges \
2722 src/cats/drop_bdb_tables \
2723 src/cats/drop_bdb_database \
2724 src/cats/create_bacula_database \
2725 src/cats/update_bacula_tables \
2726 src/cats/grant_bacula_privileges \
2727 src/cats/make_bacula_tables \
2728 src/cats/drop_bacula_tables \
2729 src/cats/drop_bacula_database \
2730 src/findlib/Makefile \
2731 src/tools/Makefile \
2732 src/plugins/fd/Makefile \
2733 src/plugins/dir/Makefile \
2735 updatedb/update_mysql_tables_10_to_11 \
2736 updatedb/update_sqlite3_tables_10_to_11 \
2737 updatedb/update_postgresql_tables_10_to_11 \
2738 updatedb/update_sqlite_tables_10_to_11 \
2743 if test "${support_bat}" = "yes" ; then
2744 if test "x$QMAKE" = "xnone" && test "x$QMAKEQT4" = "xnone"; then
2745 echo "Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation"
2751 if test "x$QMAKEQT4" != "xnone"; then
2756 chmod 755 install_conf_file build-depkgs-qt-console
2757 echo "Creating bat Makefile"
2764 dnl if CC is gcc, we can rebuild the dependencies (since the depend rule
2765 dnl requires gcc). If it's not, don't rebuild dependencies
2767 if test X"$GCC" = "Xyes" ; then
2768 echo "Doing make of dependencies"
2769 ${MAKE:-make} depend
2773 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2774 chmod 755 dvd-handler dvd-simulator
2775 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2779 chmod 755 $c/update_mysql_tables_10_to_11 $c/update_sqlite3_tables_10_to_11
2780 chmod 755 $c/update_postgresql_tables_10_to_11 $c/update_sqlite_tables_10_to_11
2784 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2785 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2787 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2788 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2790 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2791 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2793 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2794 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2796 chmod 755 $c/create_sqlite3_database $c/update_sqlite3_tables $c/make_sqlite3_tables
2797 chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
2799 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2800 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2802 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2806 chmod 755 src/win32/build-depkgs-mingw32
2808 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2809 largefile_support="yes"
2812 dnl Only try to find out the version number of the compiler when we know its some kind of GCC compiler
2813 if test X"$GCC" = "Xyes" ; then
2815 dnl A whole lot of hand springs to get the compiler version.
2816 dnl This is because gcc changed the output in version 3.0
2818 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2819 if test "x${CCVERSION}" = "x" ; then
2820 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2822 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2823 if test x"${CXXVERSION}" = x ; then
2824 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2828 # clean up any old junk
2834 if test "x${db_type}" = "xInternal" ; then
2837 echo "You have not specified either --enable-client-only or one of the"
2838 echo " supported databases: MySQL, PostgreSQL, SQLite3, SQLite or DBI."
2839 echo " This is not permitted. Please reconfigure."
2841 echo "Aborting the configuration ..."
2848 Configuration on `date`:
2850 Host: ${host}${post_host} -- ${DISTNAME} ${DISTVER}
2851 Bacula version: ${BACULA} ${VERSION} (${DATE})
2852 Source code location: ${srcdir}
2853 Install binaries: ${sbindir}
2854 Install libraries: ${libdir}
2855 Install config files: ${sysconfdir}
2856 Scripts directory: ${scriptdir}
2857 Archive directory: ${archivedir}
2858 Working directory: ${working_dir}
2859 PID directory: ${piddir}
2860 Subsys directory: ${subsysdir}
2861 Man directory: ${mandir}
2862 Data directory: ${datarootdir}
2863 C Compiler: ${CC} ${CCVERSION}
2864 C++ Compiler: ${CXX} ${CXXVERSION}
2865 Compiler flags: ${WCFLAGS} ${CFLAGS}
2866 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2868 Statically Linked Tools: ${support_static_tools}
2869 Statically Linked FD: ${support_static_fd}
2870 Statically Linked SD: ${support_static_sd}
2871 Statically Linked DIR: ${support_static_dir}
2872 Statically Linked CONS: ${support_static_cons}
2873 Database type: ${db_type}
2874 Database port: ${db_port}
2875 Database lib: ${DB_LIBS}
2876 Database name: ${db_name}
2877 Database user: ${db_user}
2879 Job Output Email: ${job_email}
2880 Traceback Email: ${dump_email}
2881 SMTP Host Address: ${smtp_host}
2883 Director Port: ${dir_port}
2884 File daemon Port: ${fd_port}
2885 Storage daemon Port: ${sd_port}
2887 Director User: ${dir_user}
2888 Director Group: ${dir_group}
2889 Storage Daemon User: ${sd_user}
2890 Storage DaemonGroup: ${sd_group}
2891 File Daemon User: ${fd_user}
2892 File Daemon Group: ${fd_group}
2894 SQL binaries Directory ${SQL_BINDIR}
2896 Large file support: $largefile_support
2897 Bacula conio support: ${got_conio} ${CONS_LIBS}
2898 readline support: ${got_readline} ${PRTREADLINE_SRC}
2899 TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
2900 TLS support: ${support_tls}
2901 Encryption support: ${support_crypto}
2902 ZLIB support: ${have_zlib}
2903 enable-smartalloc: ${support_smartalloc}
2904 bat support: ${support_bat} ${QWT_LDFLAGS}
2905 enable-gnome: ${support_gnome} ${gnome_version}
2906 enable-bwx-console: ${support_wx_console} ${wx_version}
2907 enable-tray-monitor: ${support_tray_monitor}
2908 client-only: ${build_client_only}
2909 build-dird: ${build_dird}
2910 build-stored: ${build_stored}
2911 ACL support: ${have_acl}
2912 Python support: ${support_python} ${PYTHON_LIBS}
2913 Batch insert enabled: ${support_batch_insert}