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 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
27 DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
28 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
32 echo "configuring for bacula $VERSION ($DATE)"
35 dnl -------------------------------------------------------
36 dnl# Check for compiler.
37 dnl ------------------------------------------------------
41 AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
42 AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
46 if test "x$BASECC" = xgcc; then
50 AC_PATH_PROG(CXX, $CXX, $CXX)
51 if test ! -e $CXX; then
52 AC_MSG_ERROR(Unable to find C++ compiler)
55 dnl -------------------------------------------------------
56 dnl# Check for programs.
57 dnl ------------------------------------------------------
60 AC_PATH_PROG(MV, mv, mv)
61 AC_PATH_PROG(RM, rm, rm)
62 AC_PATH_PROG(CP, cp, cp)
63 AC_PATH_PROG(SED, sed, sed)
64 AC_PATH_PROG(ECHO, echo, echo)
65 AC_PATH_PROG(CMP, cmp, cmp)
66 AC_PATH_PROG(TBL, tbl, tbl)
67 AC_PATH_PROG(AR, ar, ar)
68 dnl AC_PATH_PROG(RANLIB, ranlib, ranlib)
69 AC_PATH_PROG(OPENSSL, openssl, none)
70 AC_PATH_PROG(MTX, mtx, mtx)
71 AC_PATH_PROG(DD, dd, dd)
72 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
73 AC_PATH_PROG(PYTHON, python, python)
74 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
75 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
76 AC_PATH_PROG(DVDRWFORMAT, dvd+rw-format, dvd+rw-format)
77 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
78 AC_ARG_VAR(WXCONFIG, [wx-config command. On some systems, you must set it to wx-config-2.6 to use wxWidgets 2.6.])
79 if test "x$WXCONFIG" = x; then
82 AC_PATH_PROG(WXCONFIG, ${WXCONFIG}, ${WXCONFIG})
83 AC_ARG_VAR(WXFLAGS, [Parameters to pass to wx-config (e.g. --unicode=no).])
84 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
85 AC_PATH_PROG(PIDOF, pidof, pidof)
87 # Some AWK programs fail, so test it and warn the user
88 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
89 { if ((prog == $2) || (("(" prog ")") == $2) ||
90 (("[" prog "]") == $2) ||
91 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
93 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
94 The regex engine of $AWK is too broken to be used you
95 might want to install GNU AWK.
96 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
99 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
101 test -n "$ARFLAG" || ARFLAGS="cr"
108 AC_SUBST(LOCAL_CFLAGS)
109 AC_SUBST(LOCAL_LDFLAGS)
112 dnl --------------------------------------------------
113 dnl Bacula OP Sys determination (see aclocal.m4)
114 dnl --------------------------------------------------
117 # -----------------------------------------------------------
118 dnl Bacula OPSys Distribution determination (see aclocal.m4)
119 # ----------------------------------------------------------
120 BA_CHECK_OPSYS_DISTNAME
122 # --------------------------------------------------
123 # Suppport for gettext (translations)
124 # By default, $datadir is ${prefix}/share
125 # --------------------------------------------------
126 AM_GNU_GETTEXT([external])
127 if test x${prefix} = xNONE ; then
128 if test `eval echo ${datadir}` = NONE/share ; then
133 # ------------------------------------------------------------------
134 # If the user has not set --prefix, we set our default to nothing.
135 # In this case, if the user has not set --sysconfdir, we set it
136 # to the package default of /etc/bacula. If either --prefix or
137 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
138 # ------------------------------------------------------------------
139 if test x${prefix} = xNONE ; then
140 if test `eval echo ${sysconfdir}` = NONE/etc ; then
141 sysconfdir=/etc/bacula
145 sysconfdir=`eval echo ${sysconfdir}`
146 datadir=`eval echo ${datadir}`
147 localedir=`eval echo ${datadir}/locale`
148 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
149 AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir")
151 # -------------------------------------------------------------------------
152 # If the user has not set --exec-prefix, we default to ${prefix}
153 # -------------------------------------------------------------------------
154 if test x${exec_prefix} = xNONE ; then
155 exec_prefix=${prefix}
158 # ------------------------------------------------------------------
159 # If the user has not set --sbindir, we set our default as /sbin
160 # ------------------------------------------------------------------
161 if test x$sbindir = x'${exec_prefix}/sbin' ; then
162 sbindir=${exec_prefix}/sbin
164 sbindir=`eval echo ${sbindir}`
166 # -------------------------------------------------------------------------
167 # If the user has not set --mandir, we default to /usr/share/man
168 # -------------------------------------------------------------------------
169 if test x$mandir = x'${prefix}/man' ; then
170 mandir=/usr/share/man
174 # ------------------------------------------------------------------
175 # All list of languages for which a translation exist. Each
176 # language is separated by a space.
177 # ------------------------------------------------------------------
180 AC_PATH_PROGS(MSGFMT, msgfmt, no)
181 if test "$MSGFMT" = "no"
183 echo 'msgfmt program not found, disabling NLS !'
185 USE_INCLUDED_LIBINTL=no
194 support_postgresql=no
195 support_smartalloc=yes
200 support_wx_console=no
205 support_static_tools=no
208 support_static_dir=no
209 support_static_cons=no
218 dnl# --------------------------------------------------------------------------
219 dnl# CHECKING COMMAND LINE OPTIONS
220 dnl# --------------------------------------------------------------------------
222 # -------------------------------------------
223 # gnome (default off)
224 # -------------------------------------------
226 [ --enable-gnome enable build of bgnome-console GUI [disabled]],
227 [if test x$enableval = xyes; then
232 if test x$support_gnome = xyes; then
233 abc=`$PKGCONFIG --exists libgnomeui-2.0`
235 if test $pkg = 0; then
236 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
237 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
238 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
239 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
240 AC_SUBST(GNOME_INCLUDEDIR)
241 AC_SUBST(GNOMEUI_LIBS)
242 AC_SUBST(GNOME_LIBDIR)
244 GNOME_DIR=src/gnome2-console
245 gnome_version="Version 2.x"
247 AC_MSG_ERROR(Unable to find Gnome 2 installation)
252 # -------------------------------------------
254 # -------------------------------------------
256 [ --enable-bat enable build of bat Qt4 GUI [disabled]],
257 [if test x$enableval = xyes; then
258 AC_DEFINE(HAVE_BAT, 1, [Set if Bacula bat Qt4 GUI support enabled])
263 if test x$support_bat = xyes; then
264 abc=`$PKGCONFIG --atleast-version=4.2 QtGui`
266 if test $pkg = 0; then
267 BAT_DIR=src/qt-console
269 AC_MSG_ERROR(Unable to find Qt4 installation needed by bat)
275 # -------------------------------------------
276 # bwx-console (default off)
277 # -------------------------------------------
278 AC_ARG_ENABLE(bwx-console,
279 [ --enable-bwx-console enable build of wxWidgets console [disabled]],
280 [if test x$enableval = xyes; then
281 support_wx_console=yes
285 if test x$support_wx_console = xyes; then
286 abc=`$WXCONFIG $WXFLAGS --cppflags`
288 if test $pkg = 0; then
289 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
290 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
291 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
293 AC_SUBST(WXCONS_CPPFLAGS)
294 AC_SUBST(WXCONS_LDFLAGS)
295 WX_DIR=src/wx-console
298 echo "wx-config program not found. bwx-console disabled."
300 support_wx_console=no
306 # -------------------------------------------
307 # tray-monitor (default off)
308 # -------------------------------------------
309 AC_ARG_ENABLE(tray-monitor,
310 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
311 [if test x$enableval = xyes; then
312 support_tray_monitor=yes
316 if test x$support_tray_monitor = xyes; then
317 abc=`$PKGCONFIG --exists gtk+-2.0`
319 if test $pkg = 0; then
320 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
321 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
322 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
323 AC_SUBST(TRAY_MONITOR_LDFLAGS)
324 TRAY_MONITOR_DIR=src/tray-monitor
325 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
327 if test $pkg = 0; then
328 AC_DEFINE(HAVE_GTK_2_4)
332 AC_SUBST(TRAY_MONITOR_DIR)
334 # -------------------------------------------
335 # smartalloc (default off)
336 # -------------------------------------------
337 AC_ARG_ENABLE(smartalloc,
338 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
339 [if test x$enableval = xno; then
340 support_smartalloc=no
343 if test x$support_smartalloc = xyes; then
344 AC_DEFINE(SMARTALLOC)
347 # -------------------------------------------
348 # static-tools (default off)
349 # -------------------------------------------
350 AC_ARG_ENABLE(static-tools,
351 [ --enable-static-tools enable static tape tools [disabled]],
352 [if test x$enableval = xyes; then
353 support_static_tools=yes
357 if test x$support_static_tools = xyes; then
358 TTOOL_LDFLAGS="-static"
360 AC_SUBST(TTOOL_LDFLAGS)
362 # -------------------------------------------
363 # static-fd (default off)
364 # -------------------------------------------
365 AC_ARG_ENABLE(static-fd,
366 [ --enable-static-fd enable static File daemon [disabled]],
367 [if test x$enableval = xyes; then
368 support_static_fd=yes
372 if test x$support_static_fd = xyes; then
373 STATIC_FD="static-bacula-fd"
377 # -------------------------------------------
378 # static-sd (default off)
379 # -------------------------------------------
380 AC_ARG_ENABLE(static-sd,
381 [ --enable-static-sd enable static Storage daemon [disabled]],
382 [if test x$enableval = xyes; then
383 support_static_sd=yes
387 if test x$support_static_sd = xyes; then
388 STATIC_SD="static-bacula-sd"
392 # -------------------------------------------
393 # static-dir (default off)
394 # -------------------------------------------
395 AC_ARG_ENABLE(static-dir,
396 [ --enable-static-dir enable static Director [disabled]],
397 [if test x$enableval = xyes; then
398 support_static_dir=yes
402 if test x$support_static_dir = xyes; then
403 STATIC_DIR="static-bacula-dir"
407 # -------------------------------------------
408 # static-cons (default off)
409 # -------------------------------------------
410 AC_ARG_ENABLE(static-cons,
411 [ --enable-static-cons enable static Console [disabled]],
412 [if test x$enableval = xyes; then
413 support_static_cons=yes
419 if test x$support_static_cons = xyes; then
420 STATIC_CONS="static-bconsole"
421 STATIC_GNOME_CONS="static-bgnome-console"
422 STATIC_WX_CONS="static-bwx-console"
424 AC_SUBST(STATIC_CONS)
425 AC_SUBST(STATIC_GNOME_CONS)
426 AC_SUBST(STATIC_WX_CONS)
428 # -------------------------------------------
429 # client_only (default off)
430 # -------------------------------------------
431 AC_ARG_ENABLE(client-only,
432 [ --enable-client-only build client (File daemon) only [disabled]],
433 [if test x$enableval = xyes; then
434 build_client_only=yes
438 if test x$build_client_only = xno; then
445 # -------------------------------------------
446 # director (default on)
447 # -------------------------------------------
448 AC_ARG_ENABLE(build-dird,
449 [ --enable-build-dird enable building of dird (Director) [enabled]],
450 [if test x$enableval = xno; then
453 if test x$build_dird = xyes; then
458 DIR_TOOLS="NODIRTOOLS"
463 # -------------------------------------------
464 # stored (default on)
465 # -------------------------------------------
466 AC_ARG_ENABLE(build-stored,
467 [ --enable-build-stored enable building of stored (Storage daemon) [enabled]],
468 [if test x$enableval = xno; then
471 if test x$build_stored = xyes; then
472 STORED_DIR="src/stored"
478 # ---------------------------------------------------
479 # Check for conio (Bacula readline substitute)(
480 # ---------------------------------------------------
481 # this allows you to turn it completely off
483 [ --disable-conio disable conio support [enabled]
485 [if test x$enableval = xno; then
491 # ---------------------------------------------------
492 # Check for IPv6 support
493 # ---------------------------------------------------
494 # this allows you to turn it completely off
497 [ --enable-ipv6 enable ipv6 support [enabled]
499 [if test x$enableval = xno; then
504 if test x$support_ipv6 = xyes; then
505 AC_TRY_LINK([ #include <sys/types.h>
506 #include <sys/socket.h>
507 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0;],
508 [support_ipv6=yes], [support_ipv6=no])
511 if test x$support_ipv6 = xyes; then
512 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
518 if test x$support_conio = xyes; then
519 AC_CHECK_HEADER(termcap.h,
520 [ AC_CHECK_LIB(termcap, tgetent,
521 [ CONS_LIBS="-ltermcap"
526 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
528 [ AC_CHECK_LIB(ncurses, tgetent,
529 [ CONS_LIBS="-lncurses"
534 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
539 AC_CHECK_HEADERS(curses.h)
540 AC_CHECK_HEADER(term.h,
541 [ AC_CHECK_LIB(curses, tgetent,
542 [ CONS_LIBS="-lcurses"
547 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
550 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
559 # ---------------------------------------------------
560 # Check for readline support/directory (default off)
561 # ---------------------------------------------------
562 # this allows you to turn it completely off
563 AC_ARG_ENABLE(readline,
564 [ --disable-readline disable readline support [disable]
566 [if test x$enableval = xno; then
572 if test x$support_readline = xyes; then
573 AC_ARG_WITH(readline,
574 [ --with-readline@<:@=DIR@:>@ specify readline library directory],
576 case "$with_readline" in
579 if test -f ${with_readline}/readline.h; then
580 CONS_INC="-I${with_readline}"
581 CONS_LDFLAGS="-L$with_readline"
582 elif test -f ${with_readline}/include/readline/readline.h; then
583 CONS_INC="-I${with_readline}/include/readline"
584 CONS_LDFLAGS="-L${with_readline}/lib"
585 with_readline="${with_readline}/include/readline"
587 with_readline="/usr/include/readline"
589 AC_CHECK_HEADER(${with_readline}/readline.h,
590 [ AC_DEFINE(HAVE_READLINE)
591 CONS_LIBS="-lreadline -lhistory -ltermcap"
595 echo "readline.h not found. readline turned off ..."
602 # check for standard readline library
603 AC_CHECK_HEADER(/usr/include/readline/readline.h,
604 [ AC_DEFINE(HAVE_READLINE)
606 CONS_INC="-I/usr/include/readline"
607 CONS_LIBS="-lreadline -ltermcap"
609 # Did not find standard library, so try Bacula's default
610 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
611 [ AC_DEFINE(HAVE_READLINE)
613 CONS_INC="-I${TOP_DIR}/depkgs/readline"
614 CONS_LIBS="-lreadline -lhistory -ltermcap"
615 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
616 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
619 echo "readline.h not found. readline turned off ..."
635 AC_SUBST(CONS_LDFLAGS)
636 AC_SUBST(READLINE_SRC)
638 # Minimal stuff for readline Makefile configuration
643 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr lstat lchown)
644 AC_CHECK_FUNCS(nanosleep nl_langinfo)
645 AC_CHECK_HEADERS(varargs.h)
647 # End of readline/conio stuff
648 # -----------------------------------------------------------------------
650 # -----------------------------------------------------------------------
651 # Check for Python support
653 AC_MSG_CHECKING(for Python support)
656 --with-python@<:@=DIR@:>@ Include Python support. DIR is the Python base
657 install directory, default is to search through
658 a number of common places for the Python files.],
662 if test "$withval" != "no"; then
663 if test "$withval" = "yes"; then
664 for python_root in /usr /usr/local /usr/sfw; do
665 for ver in python2.2 python2.3 python2.4 python2.5; do
666 if test -f $python_root/include/${ver}/Python.h; then
667 PYTHON_INCDIR=-I$python_root/include/${ver}
668 if test -d $python_root/lib64/${ver}/config; then
669 PYTHON_LIBS="-L$python_root/lib64/${ver}/config -l${ver}"
671 PYTHON_LIBS="-L$python_root/lib/${ver}/config -l${ver}"
677 if test x$PYTHON_INCDIR = x; then
678 if test -f $prefix/include/Python.h; then
679 PYTHON_INCDIR=-I$prefix/include
680 if test -d $prefix/lib64/config; then
681 PYTHON_LIBS="-L$prefix/lib64/config -lpython"
683 PYTHON_LIBS="-L$prefix/lib/config -lpython"
687 AC_MSG_ERROR(Unable to find Python.h in standard locations)
691 if test -f $withval/Python.h; then
692 PYTHON_INCDIR=-I$withval
693 PYTHON_LIBS="-L$withval/config -lpython"
694 elif test -f $withval/include/Python.h; then
695 PYTHON_INCDIR=-I$withval/include
696 if test -d $withval/lib64/config; then
697 PYTHON_LIBS="-L$withval/lib64/config -lpython"
699 PYTHON_LIBS="-L$withval/lib/config -lpython"
701 elif test -f $withval/include/python/Python.h; then
702 PYTHON_INCDIR=-I$withval/include/python
703 if test -d $withval/lib64/python/config; then
704 PYTHON_LIBS="-L$withval/lib64/python/config -lpython"
706 PYTHON_LIBS="-L$withval/lib/python/config -lpython"
710 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
713 AC_DEFINE([HAVE_PYTHON], 1)
716 AC_MSG_NOTICE(checking for more Python libs)
717 saved_LIBS="$LIBS"; LIBS=
718 AC_SEARCH_LIBS(shm_open, [rt])
719 AC_CHECK_LIB(util, openpty)
720 PYTHON_LIBS="$PYTHON_LIBS $LIBS"
728 AC_SUBST(PYTHON_LIBS)
729 AC_SUBST(PYTHON_INCDIR)
732 # Find where sockets are (especially for Solaris)
733 # Do this before the TCP Wrappers test since tcp wrappers
734 # uses the socket library and some linkers are stupid.
736 AC_CHECK_FUNC(socket,
737 AC_MSG_RESULT(using libc's socket),
738 AC_CHECK_LIB(xnet,socket)
739 AC_CHECK_LIB(socket,socket)
740 AC_CHECK_LIB(inet,socket))
743 # -----------------------------------------------------------
744 # Check whether user wants TCP wrappers support (default off)
745 # -----------------------------------------------------------
748 AC_ARG_WITH(tcp-wrappers,
749 [ --with-tcp-wrappers@<:@=DIR@:>@ enable tcpwrappers support],
751 if test "x$withval" != "xno" ; then
753 LIBS="$saved_LIBS -lwrap"
754 AC_MSG_CHECKING(for libwrap)
755 AC_SEARCH_LIBS(nanosleep, [rt])
757 [ #include <sys/types.h>
759 int deny_severity = 0;
760 int allow_severity = 0;
761 struct request_info *req; ],
762 [ hosts_access(req); ],
765 AC_DEFINE(HAVE_LIBWRAP)
770 LIBS="$saved_LIBS -lwrap -lnsl"
771 WRAPLIBS="$saved_LIBS -lwrap -lnsl"
773 [ #include <sys/types.h>
775 int deny_severity = 0;
776 int allow_severity = 0;
777 struct request_info *req; ],
778 [ hosts_access(req); ],
781 AC_DEFINE(HAVE_LIBWRAP)
786 [AC_MSG_ERROR([*** libwrap missing]) ] ]
793 # -----------------------------------------------------------
794 # Check whether OpenSSL is available
795 # -----------------------------------------------------------
796 AC_MSG_CHECKING([for OpenSSL])
797 dnl The following uses quadrigraphs:
801 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
802 [with_openssl_directory=${withval}])
804 if test "x$with_openssl_directory" != "x"; then
805 OPENSSL_LIBS="-lssl -lcrypto"
808 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
809 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
810 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
814 saved_CFLAGS="${CFLAGS}"
815 LIBS="${saved_LIBS} ${OPENSSL_LIBS}"
816 CFLAGS="${saved_CFLAGS} ${OPENSSL_INC}"
818 AC_TRY_LINK([ #include <openssl/ssl.h> ],
819 [ CRYPTO_set_id_callback(NULL); ],
827 AC_TRY_LINK([ #include <openssl/evp.h> ],
829 [ ac_cv_openssl_sha2="yes" ],
830 [ ac_cv_openssl_sha2="no" ]
834 CFLAGS="${saved_CFLAGS}"
836 if test "$support_tls" = "yes"; then
837 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
838 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
839 AC_DEFINE(HAVE_CRYPTO, 1, [Define if encryption support should be enabled])
842 if test "$ac_cv_openssl_sha2" = "yes"; then
843 AC_DEFINE(HAVE_SHA2, 1, [Define if the SHA-2 family of digest algorithms is available])
852 AC_MSG_RESULT([$support_tls])
853 AC_SUBST(OPENSSL_LIBS)
854 AC_SUBST(OPENSSL_INC)
857 # -----------------------------------------------------------
858 # Python and OpenSSL are using dlopen
859 # -----------------------------------------------------------
861 if test "$support_python" = "yes" -o "$support_tls" = "yes"; then
862 AC_SEARCH_LIBS(dlopen, [dl])
865 # ------------------------------------------
866 # Where to place working dir
867 # ------------------------------------------
868 working_dir=`eval echo ${prefix}/var/bacula/working`
869 AC_ARG_WITH(working-dir,
870 [ --with-working-dir=PATH specify path of Bacula working directory],
872 if test "x$withval" != "xno" ; then
878 AC_SUBST(working_dir)
881 # ------------------------------------------
882 # Where to place scriptdir (script files)
883 # ------------------------------------------
884 scriptdir=`eval echo ${sysconfdir}`
885 AC_ARG_WITH(scriptdir,
886 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
888 if test "x$withval" != "xno" ; then
897 # ------------------------------------------
898 # Where to send dump email
899 # ------------------------------------------
900 dump_email=root@localhost
901 AC_ARG_WITH(dump-email,
902 [ --with-dump-email=EMAIL dump email address],
904 if test "x$withval" != "xno" ; then
912 # ------------------------------------------
913 # Where to send job email
914 # ------------------------------------------
915 job_email=root@localhost
916 AC_ARG_WITH(job-email,
917 [ --with-job-email=EMAIL job output email address],
919 if test "x$withval" != "xno" ; then
927 # ------------------------------------------
928 # Where to find smtp host
929 # ------------------------------------------
931 AC_ARG_WITH(smtp_host,
932 [ --with-smtp-host=HOST SMTP mail host address],
934 if test "x$withval" != "xno" ; then
943 # ------------------------------------
944 # Where to place pid files
945 # ------------------------------------
948 [ --with-pid-dir=PATH specify location of Bacula pid files],
950 if test "x$withval" != "xno" ; then
956 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
960 # ------------------------------------
961 # Where to place subsys "lock file"
962 # ------------------------------------
963 ubsysdir=/var/run/subsys
964 if test -d /var/run/subsys; then
965 subsysdir=/var/run/subsys
966 elif test -d /var/lock/subsys; then
967 subsysdir=/var/lock/subsys
969 subsysdir=/var/run/subsys
971 AC_ARG_WITH(subsys-dir,
972 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
974 if test "x$withval" != "xno" ; then
984 # ------------------------------------
985 # Where to start assigning ports
986 # ------------------------------------
988 AC_ARG_WITH(baseport,
989 [ --with-baseport=PORT specify base port address for daemons],
991 if test "x$withval" != "xno" ; then
998 dir_port=`expr $baseport`
999 fd_port=`expr $baseport + 1`
1000 sd_port=`expr $fd_port + 1`
1007 # ------------------------------------------
1008 # Generate passwords
1009 # ------------------------------------------
1011 AC_ARG_WITH(dir-password,
1012 [ --with-dir-password=PASSWORD specify Director's password],
1014 if test "x$withval" != "xno" ; then
1015 dir_password=$withval
1020 if test "x$dir_password" = "x" ; then
1021 if test "x$OPENSSL" = "xnone" ; then
1022 key=`autoconf/randpass 33`
1024 key=`openssl rand -base64 33`
1030 AC_ARG_WITH(fd-password,
1031 [ --with-fd-password=PASSWORD specify Client's password],
1033 if test "x$withval" != "xno" ; then
1034 fd_password=$withval
1039 if test "x$fd_password" = "x" ; then
1040 if test "x$OPENSSL" = "xnone" ; then
1041 key=`autoconf/randpass 37`
1043 key=`openssl rand -base64 33`
1049 AC_ARG_WITH(sd-password,
1050 [ --with-sd-password=PASSWORD specify Storage daemon's password],
1052 if test "x$withval" != "xno" ; then
1053 sd_password=$withval
1058 if test "x$sd_password" = "x" ; then
1059 if test "x$OPENSSL" = "xnone" ; then
1060 key=`autoconf/randpass 41`
1062 key=`openssl rand -base64 33`
1068 AC_ARG_WITH(mon-dir-password,
1069 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
1071 if test "x$withval" != "xno" ; then
1072 mon_dir_password=$withval
1077 if test "x$mon_dir_password" = "x" ; then
1078 if test "x$OPENSSL" = "xnone" ; then
1079 key=`autoconf/randpass 33`
1081 key=`openssl rand -base64 33`
1083 mon_dir_password=$key
1087 AC_ARG_WITH(mon-fd-password,
1088 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
1090 if test "x$withval" != "xno" ; then
1091 mon_fd_password=$withval
1096 if test "x$mon_fd_password" = "x" ; then
1097 if test "x$OPENSSL" = "xnone" ; then
1098 key=`autoconf/randpass 37`
1100 key=`openssl rand -base64 33`
1102 mon_fd_password=$key
1106 AC_ARG_WITH(mon-sd-password,
1107 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
1109 if test "x$withval" != "xno" ; then
1110 mon_sd_password=$withval
1115 if test "x$mon_sd_password" = "x" ; then
1116 if test "x$OPENSSL" = "xnone" ; then
1117 key=`autoconf/randpass 41`
1119 key=`openssl rand -base64 33`
1121 mon_sd_password=$key
1124 AC_SUBST(dir_password)
1125 AC_SUBST(fd_password)
1126 AC_SUBST(sd_password)
1127 AC_SUBST(mon_dir_password)
1128 AC_SUBST(mon_fd_password)
1129 AC_SUBST(mon_sd_password)
1132 # Pickup any database name
1135 AC_ARG_WITH(db_name,
1136 [ --with-db-name=DBNAME specify database name (default bacula)],
1138 if test "x$withval" != "x" ; then
1146 AC_ARG_WITH(db_user,
1147 [ --with-db-user=UNAME specify database user (default bacula)],
1149 if test "x$withval" != "x" ; then
1158 # Handle users and groups for each daemon
1161 AC_ARG_WITH(dir_user,
1162 [ --with-dir-user=USER specify user for Director daemon],
1164 if test "x$withval" != "x" ; then
1171 AC_ARG_WITH(dir_group,
1172 [ --with-dir-group=GROUP specify group for Director daemon],
1174 if test "x$withval" != "x" ; then
1181 AC_ARG_WITH(sd_user,
1182 [ --with-sd-user=USER specify user for Storage daemon],
1184 if test "x$withval" != "x" ; then
1191 AC_ARG_WITH(sd_group,
1192 [ --with-sd-group=GROUP specify group for Storage daemon],
1194 if test "x$withval" != "x" ; then
1201 AC_ARG_WITH(fd_user,
1202 [ --with-fd-user=USER specify user for File daemon],
1204 if test "x$withval" != "x" ; then
1211 AC_ARG_WITH(fd_group,
1212 [ --with-fd-group=GROUP specify group for File daemon],
1214 if test "x$withval" != "x" ; then
1231 # allow setting default executable permissions
1234 AC_ARG_WITH(sbin-perm,
1235 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1237 if test "x$withval" != "x" ; then
1245 # ------------------------------------------------
1246 # Bacula check for various SQL database engines
1247 # ------------------------------------------------
1248 BA_CHECK_POSTGRESQL_DB
1259 AC_DEFINE(PROTOTYPES)
1261 dnl# --------------------------------------------------------------------------
1262 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1264 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1265 if test -z "$CCOPTS"; then
1266 CCOPTS='-g -O2 -Wall'
1275 dnl See if we can use 64 bit file addresses
1276 largefile_support="no"
1282 dnl# --------------------------------------------------------------------------
1283 dnl# CHECKING FOR HEADER FILES
1284 dnl# --------------------------------------------------------------------------
1320 AC_STRUCT_ST_BLKSIZE
1324 dnl# --------------------------------------------------------------------------
1325 dnl# Check for utime.h structure
1326 dnl# --------------------------------------------------------------------------
1327 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1329 #include <sys/types.h>
1330 #include <utime.h>], [struct utimbuf foo],
1331 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1332 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1334 dnl# --------------------------------------------------------------------------
1335 dnl# Check for socklen_t
1336 dnl# --------------------------------------------------------------------------
1337 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1339 #include <sys/types.h>
1340 #include <sys/socket.h>],
1342 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1343 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1345 dnl# --------------------------------------------------------------------------
1346 dnl# Check for bigendian
1347 dnl# --------------------------------------------------------------------------
1348 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1350 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1351 [ba_cv_bigendian=yes],
1352 [ba_cv_bigendian=no],
1353 [ba_cv_bigendian=no])])
1354 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1356 dnl# --------------------------------------------------------------------------
1357 dnl# Check for typeof()
1358 dnl# --------------------------------------------------------------------------
1360 AC_CACHE_CHECK(for typeof, ba_cv_have_typeof,
1362 [main(){char *a = 0; a = (typeof a)a;}],
1363 [ba_cv_have_typeof=yes],
1364 [ba_cv_have_typeof=no],
1365 [ba_cv_have_typeof=no])])
1366 test $ba_cv_have_typeof = yes && AC_DEFINE([HAVE_TYPEOF], 1, [Defind to 1 if compiler has typeof])
1372 dnl# --------------------------------------------------------------------------
1373 dnl# CHECKING FOR FILESYSTEM TYPE
1374 dnl# --------------------------------------------------------------------------
1375 AC_MSG_CHECKING(how to get filesystem type)
1377 # The order of these tests is important.
1378 AC_TRY_CPP([#include <sys/statvfs.h>
1379 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1380 if test $fstype = no; then
1381 AC_TRY_CPP([#include <sys/statfs.h>
1382 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1384 if test $fstype = no; then
1385 AC_TRY_CPP([#include <sys/statfs.h>
1386 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1388 if test $fstype = no; then
1389 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1391 if test $fstype = no; then
1392 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1394 if test $fstype = no; then
1395 AC_TRY_CPP([#include <sys/mount.h>
1396 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1398 AC_MSG_RESULT($fstype)
1400 AC_CHECK_HEADER(sys/statvfs.h, [ AC_DEFINE(HAVE_SYS_STATVFS_H,1,[Defines if your system have the sys/statvfs.h header file])] , )
1402 dnl# --------------------------------------------------------------------------
1403 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1404 dnl# --------------------------------------------------------------------------
1412 AC_CHECK_TYPE(ino_t, unsigned long)
1413 AC_CHECK_TYPE(dev_t, unsigned long)
1414 AC_CHECK_TYPE(daddr_t, long)
1415 AC_CHECK_TYPE(major_t, int)
1416 AC_CHECK_TYPE(minor_t, int)
1417 AC_CHECK_TYPE(ssize_t, int)
1424 AC_CHECK_SIZEOF(char, 1)
1425 AC_CHECK_SIZEOF(short int, 2)
1426 AC_CHECK_SIZEOF(int, 4)
1427 AC_CHECK_SIZEOF(long int, 4)
1428 AC_CHECK_SIZEOF(long long int, 8)
1429 AC_CHECK_SIZEOF(int *, 4)
1431 # Check for sys/types.h types
1432 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1434 [ #include <sys/types.h> ],
1436 [ ac_cv_have_u_int="yes" ],
1437 [ ac_cv_have_u_int="no" ]
1440 if test "x$ac_cv_have_u_int" = "xyes" ; then
1441 AC_DEFINE(HAVE_U_INT)
1445 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1447 [ #include <sys/types.h> ],
1448 [ intmax_t a; a = 1;],
1449 [ ac_cv_have_intmax_t="yes" ],
1452 [ #include <stdint.h> ],
1453 [ intmax_t a; a = 1;],
1454 [ ac_cv_have_intmax_t="yes" ],
1455 [ ac_cv_have_intmax_t="no" ]
1461 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1462 AC_DEFINE(HAVE_INTMAX_T)
1467 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1469 [ #include <sys/types.h> ],
1470 [ u_intmax_t a; a = 1;],
1471 [ ac_cv_have_u_intmax_t="yes" ],
1474 [ #include <stdint.h> ],
1475 [ u_intmax_t a; a = 1;],
1476 [ ac_cv_have_u_intmax_t="yes" ],
1477 [ ac_cv_have_u_intmax_t="no" ]
1482 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1483 AC_DEFINE(HAVE_U_INTMAX_T)
1488 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1490 [ #include <sys/types.h> ],
1491 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1492 [ ac_cv_have_intxx_t="yes" ],
1493 [ ac_cv_have_intxx_t="no" ]
1496 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1497 AC_DEFINE(HAVE_INTXX_T)
1501 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1503 [ #include <sys/types.h> ],
1504 [ int64_t a; a = 1;],
1505 [ ac_cv_have_int64_t="yes" ],
1506 [ ac_cv_have_int64_t="no" ]
1509 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1510 AC_DEFINE(HAVE_INT64_T)
1514 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1516 [ #include <sys/types.h> ],
1517 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1518 [ ac_cv_have_u_intxx_t="yes" ],
1519 [ ac_cv_have_u_intxx_t="no" ]
1522 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1523 AC_DEFINE(HAVE_U_INTXX_T)
1527 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1529 [ #include <sys/types.h> ],
1530 [ u_int64_t a; a = 1;],
1531 [ ac_cv_have_u_int64_t="yes" ],
1532 [ ac_cv_have_u_int64_t="no" ]
1535 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1536 AC_DEFINE(HAVE_U_INT64_T)
1540 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1541 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1543 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1545 [ #include <sys/bitypes.h> ],
1546 [ int8_t a; int16_t b; int32_t c;
1547 u_int8_t e; u_int16_t f; u_int32_t g;
1548 a = b = c = e = f = g = 1; ],
1549 [ AC_DEFINE(HAVE_U_INTXX_T)
1550 AC_DEFINE(HAVE_INTXX_T)
1551 AC_DEFINE(HAVE_SYS_BITYPES_H)
1552 AC_MSG_RESULT(yes) ],
1553 [ AC_MSG_RESULT(no)]
1557 if test -z "$have_u_intxx_t" ; then
1558 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1560 [ #include <sys/types.h> ],
1561 [ uint8_t a; uint16_t b;
1562 uint32_t c; a = b = c = 1; ],
1563 [ ac_cv_have_uintxx_t="yes" ],
1564 [ ac_cv_have_uintxx_t="no" ]
1567 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1568 AC_DEFINE(HAVE_UINTXX_T)
1572 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1573 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1575 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1577 [ #include <sys/bitypes.h> ],
1578 [ int64_t a; u_int64_t b;
1580 [ AC_DEFINE(HAVE_U_INT64_T)
1581 AC_DEFINE(HAVE_INT64_T)
1582 AC_MSG_RESULT(yes) ],
1583 [ AC_MSG_RESULT(no)]
1587 if (test -z "$have_uintxx_t" && \
1588 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1590 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1592 [ #include <sys/bitypes.h> ],
1593 [ uint8_t a; uint16_t b;
1594 uint32_t c; a = b = c = 1; ],
1595 [ AC_DEFINE(HAVE_UINTXX_T)
1596 AC_MSG_RESULT(yes) ],
1597 [ AC_MSG_RESULT(no)]
1605 dnl# --------------------------------------------------------------------------
1606 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1607 dnl# --------------------------------------------------------------------------
1623 [echo 'configure: cannot find needed function.'; exit 1]
1626 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1627 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1628 AC_CHECK_FUNCS(posix_fadvise)
1630 AC_CHECK_FUNCS(chflags)
1632 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1634 dnl# --------------------------------------------------------------------------
1635 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1636 dnl# --------------------------------------------------------------------------
1637 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1639 # If resolver functions are not in libc check for -lnsl or -lresolv.
1640 AC_CHECK_FUNC(gethostbyname_r,
1641 AC_MSG_RESULT(using libc's resolver),
1642 AC_CHECK_LIB(nsl,gethostbyname_r)
1643 AC_CHECK_LIB(resolv,gethostbyname_r))
1647 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1648 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1649 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1651 dnl ----------------------------
1652 dnl check sa_len of sockaddr
1653 dnl ----------------------------
1654 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1655 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1656 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1658 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1659 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1669 AC_FUNC_CLOSEDIR_VOID
1670 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1671 # AC_FUNC_FNMATCH dnl use local version
1674 AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
1677 AC_CHECK_LIB(sun, getpwnam)
1679 AC_CHECK_HEADERS(zlib.h)
1680 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1682 if test x$FDLIBS = x-lz; then
1683 AC_DEFINE(HAVE_LIBZ)
1688 # Check for ACL libraries
1691 AC_CHECK_HEADER(sys/acl.h)
1692 AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
1693 [AC_CHECK_LIB(acl, acl_get_file, [have_acl=yes; FDLIBS="-lacl $FDLIBS"],
1694 [AC_CHECK_LIB(sec, acltotext, [have_acl=yes; FDLIBS="-lsec $FDLIBS"])]
1697 if test $have_acl = yes; then
1701 dnl Check for pthread libraries
1703 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1704 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1705 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1706 [AC_CHECK_FUNC(pthread_create)]
1717 if test x$have_gcc = xyes ; then
1718 CPPFLAGS="$CPPFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
1719 CFLAGS="$CFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
1721 LDFLAGS=${LDFLAGS--O}
1722 DB_LIBS="${SQL_LFLAGS}"
1723 CPPFLAGS="$CPPFLAGS"
1736 AC_SUBST(X_EXTRA_LIBS)
1741 dnl# extra configurable objects
1752 # Finally we set appropriate distribution specific
1753 # variables and defaults
1755 # PFILES are platform specific files
1756 PFILES="platforms/Makefile"
1760 hostname=`uname -n | cut -d '.' -f 1`
1761 if test x${hostname} = x ; then
1762 hostname="localhost"
1767 PSCMD="ps -e -o pid,comm"
1769 platforms/aix/Makefile"
1770 TAPEDRIVE="/dev/rmt0.1"
1774 PTHREAD_LIB="-lpthread -lexc"
1775 if test "${CC}" = "gcc" ; then
1782 TAPEDRIVE="/dev/nrmt0"
1785 DISTVER=`uname -a |awk '{print $3}'`
1786 TAPEDRIVE="/dev/nrmt0"
1787 PTHREAD_LIB="-pthread"
1788 CFLAGS="${CFLAGS} -pthread"
1789 PSCMD="ps -ax -o pid,command"
1793 platforms/bsdi/Makefile \
1794 platforms/bsdi/bacula-fd \
1795 platforms/bsdi/bacula-sd \
1796 platforms/bsdi/bacula-dir"
1797 largefile_support="yes"
1800 DISTVER=`uname -a |awk '{print $3}'`
1801 TAPEDRIVE="/dev/nrst0"
1804 WLDFLAGS="-mwindows"
1808 TAPEDRIVE="/dev/nst0"
1809 PSCMD="ps -e -o pid,command"
1812 platforms/darwin/Makefile"
1815 DISTVER=`cat /etc/debian_version`
1816 TAPEDRIVE="/dev/nrst0"
1817 PSCMD="ps -e -o pid,command"
1820 DISTVER=`uname -a |awk '{print $3}'`
1821 VER=`echo $DISTVER | cut -c 1`
1822 if test x$VER = x4 ; then
1823 PTHREAD_LIB="${PTHREAD_LIBS:--pthread}"
1824 CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS:--pthread}"
1828 TAPEDRIVE="/dev/nrsa0"
1829 PSCMD="ps -ax -o pid,command"
1831 platforms/freebsd/Makefile \
1832 platforms/freebsd/bacula-fd \
1833 platforms/freebsd/bacula-sd \
1834 platforms/freebsd/bacula-dir"
1835 largefile_support="yes"
1838 PSCMD="UNIX95=1 ps -e -o pid,comm"
1839 CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
1841 TAPEDRIVE="/dev/rmt/0hnb"
1842 PTHREAD_LIB="-lpthread"
1843 AC_DEFINE([_INCLUDE_LONGLONG])
1847 TAPEDRIVE="/dev/rmt/0cbn"
1848 PSCMD="ps -e -o pid,comm"
1850 platforms/irix/Makefile \
1851 platforms/irix/bacula-fd \
1852 platforms/irix/bacula-sd \
1853 platforms/irix/bacula-dir"
1856 DISTVER=`uname -a |awk '{print $3}'`
1859 TAPEDRIVE="/dev/nrst0"
1860 PSCMD="ps -ax -o pid,command"
1861 PTHREAD_LIB="-pthread"
1862 CFLAGS="${CFLAGS} -pthread"
1865 DISTVER=`uname -a |awk '{print $3}'`
1868 TAPEDRIVE="/dev/nrst0"
1869 PSCMD="ps -ax -o pid,command"
1870 PTHREAD_LIB="-pthread"
1871 CFLAGS="${CFLAGS} -pthread"
1873 platforms/openbsd/Makefile \
1874 platforms/openbsd/bacula-fd \
1875 platforms/openbsd/bacula-sd \
1876 platforms/openbsd/bacula-dir"
1879 if test -f /etc/whitebox-release ; then
1880 f=/etc/whitebox-release
1882 f=/etc/redhat-release
1884 if test `cat $f | grep release |\
1885 cut -f 3 -d ' '`x = "Enterprise"x ; then
1886 DISTVER="Enterprise "`cat $f | grep release |\
1889 DISTVER=`cat /etc/redhat-release | grep release |\
1892 TAPEDRIVE="/dev/nst0"
1893 PSCMD="ps -e -o pid,command"
1895 platforms/redhat/Makefile \
1896 platforms/redhat/bacula-fd \
1897 platforms/redhat/bacula-sd \
1898 platforms/redhat/bacula-dir \
1899 platforms/redhat/bacula.spec \
1903 DISTVER=`cat /etc/mandrake-release | grep release |\
1905 TAPEDRIVE="/dev/nst0"
1906 PSCMD="ps -e -o pid,command"
1908 platforms/mandrake/Makefile \
1909 platforms/mandrake/bacula-fd \
1910 platforms/mandrake/bacula-sd \
1911 platforms/mandrake/bacula-dir \
1912 platforms/mandrake/bacula.spec \
1916 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1917 TAPEDRIVE="/dev/nst0"
1918 PSCMD="ps -e -o pid,command"
1920 platforms/gentoo/Makefile \
1921 platforms/gentoo/bacula-init \
1922 platforms/gentoo/bacula-fd \
1923 platforms/gentoo/bacula-sd \
1924 platforms/gentoo/bacula-dir"
1927 DISTVER=`cat /etc/slackware-version`
1928 TAPEDRIVE="/dev/nst0"
1929 PSCMD="ps -e -o pid,command"
1931 platforms/slackware/Makefile \
1932 platforms/slackware/rc.bacula-fd \
1933 platforms/slackware/rc.bacula-sd \
1934 platforms/slackware/rc.bacula-dir\
1935 platforms/slackware/functions.bacula"
1939 TAPEDRIVE="/dev/rmt/0cbn"
1940 PSCMD="ps -e -o pid,comm"
1942 platforms/solaris/Makefile \
1943 platforms/solaris/bacula-fd \
1944 platforms/solaris/bacula-sd \
1945 platforms/solaris/bacula-dir"
1946 if test x$DISTVER = x5.6 ; then
1947 AC_DEFINE(HAVE_OLD_SOCKOPT)
1949 LIBS="$LIBS -lresolv"
1952 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1954 TAPEDRIVE="/dev/nst0"
1955 PSCMD="ps -e -o pid,command"
1957 platforms/suse/Makefile \
1958 platforms/suse/bacula-fd \
1959 platforms/suse/bacula-sd \
1960 platforms/suse/bacula-dir \
1961 platforms/suse/bacula \
1962 platforms/suse/bacula.spec"
1967 TAPEDRIVE="/dev/nst0"
1968 PSCMD="ps -e -o pid,command"
1970 platforms/suse/Makefile \
1971 platforms/suse/bacula-fd \
1972 platforms/suse/bacula-sd \
1973 platforms/suse/bacula-dir"
1977 TAPEDRIVE="/dev/nst0"
1980 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1986 LIBS="$PTHREAD_LIB $LIBS"
1988 AC_DEFINE_UNQUOTED(lld, "$lld")
1989 AC_DEFINE_UNQUOTED(llu, "$llu")
1997 dnl# common parts of the Makefile
1998 MCOMMON=./autoconf/Make.common
1999 AC_SUBST_FILE(MCOMMON)
2002 if test "x${subsysdir}" = "x${sbindir}" ; then
2005 echo "You have set both --sbindir and --with-subsys-dir"
2006 echo " equal to: ${subsysdir} "
2007 echo "This is not permitted. Please reconfigure."
2009 echo "Aborting configuration ..."
2015 AC_OUTPUT([autoconf/Make.common \
2018 scripts/startmysql \
2020 scripts/btraceback \
2026 scripts/bacula-ctl-dir \
2027 scripts/bacula-ctl-fd \
2028 scripts/bacula-ctl-sd \
2029 scripts/devel_bacula \
2032 scripts/bacula.desktop.gnome1 \
2033 scripts/bacula.desktop.gnome2 \
2034 scripts/bacula.desktop.gnome1.consolehelper \
2035 scripts/bacula.desktop.gnome2.consolehelper \
2036 scripts/bacula.desktop.gnome1.xsu \
2037 scripts/bacula.desktop.gnome2.xsu \
2038 scripts/bgnome-console.console_apps \
2039 scripts/mtx-changer \
2040 scripts/disk-changer \
2041 scripts/dvd-handler \
2042 scripts/dvd-simulator \
2043 scripts/bacula-tray-monitor.desktop \
2044 scripts/logwatch/Makefile \
2045 scripts/logwatch/logfile.bacula.conf \
2046 scripts/wxconsole.console_apps \
2047 scripts/wxconsole.desktop.consolehelper \
2048 scripts/wxconsole.desktop.xsu \
2049 scripts/bat.desktop \
2050 scripts/bat.desktop.xsu \
2051 scripts/bat.desktop.consolehelper \
2052 scripts/bat.console_apps \
2055 src/console/Makefile \
2056 src/console/bconsole.conf \
2057 src/gnome2-console/Makefile \
2058 src/gnome2-console/bgnome-console.conf \
2059 src/qt-console/bat.conf \
2060 src/qt-console/bat.pro \
2061 src/qt-console/install_conf_file \
2062 src/wx-console/Makefile \
2063 src/wx-console/bwx-console.conf \
2064 src/tray-monitor/Makefile \
2065 src/tray-monitor/tray-monitor.conf \
2067 src/dird/bacula-dir.conf \
2069 src/stored/Makefile \
2070 src/stored/bacula-sd.conf \
2071 src/filed/Makefile \
2072 src/filed/bacula-fd.conf \
2074 src/cats/make_catalog_backup \
2075 src/cats/delete_catalog_backup \
2076 src/cats/create_postgresql_database \
2077 src/cats/update_postgresql_tables \
2078 src/cats/make_postgresql_tables \
2079 src/cats/grant_postgresql_privileges \
2080 src/cats/drop_postgresql_tables \
2081 src/cats/drop_postgresql_database \
2082 src/cats/create_mysql_database \
2083 src/cats/update_mysql_tables \
2084 src/cats/make_mysql_tables \
2085 src/cats/grant_mysql_privileges \
2086 src/cats/drop_mysql_tables \
2087 src/cats/drop_mysql_database \
2088 src/cats/create_sqlite_database \
2089 src/cats/update_sqlite_tables \
2090 src/cats/make_sqlite_tables \
2091 src/cats/grant_sqlite_privileges \
2092 src/cats/drop_sqlite_tables \
2093 src/cats/drop_sqlite_database \
2094 src/cats/create_sqlite3_database \
2095 src/cats/update_sqlite3_tables \
2096 src/cats/make_sqlite3_tables \
2097 src/cats/grant_sqlite3_privileges \
2098 src/cats/drop_sqlite3_tables \
2099 src/cats/drop_sqlite3_database \
2102 src/cats/create_bdb_database \
2103 src/cats/update_bdb_tables \
2104 src/cats/make_bdb_tables \
2105 src/cats/grant_bdb_privileges \
2106 src/cats/drop_bdb_tables \
2107 src/cats/drop_bdb_database \
2108 src/cats/create_bacula_database \
2109 src/cats/update_bacula_tables \
2110 src/cats/grant_bacula_privileges \
2111 src/cats/make_bacula_tables \
2112 src/cats/drop_bacula_tables \
2113 src/cats/drop_bacula_database \
2114 src/findlib/Makefile \
2115 src/tools/Makefile \
2118 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
2122 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2123 chmod 755 dvd-handler dvd-simulator
2124 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2129 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2130 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2132 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2133 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2135 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2136 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2138 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2139 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2141 chmod 755 $c/create_sqlite3_database $c/update_sqlite3_tables $c/make_sqlite3_tables
2142 chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
2144 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2145 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2147 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2151 chmod 755 src/win32/build-depkgs-mingw32
2153 if test "${support_bat}" = "yes" ; then
2155 chmod 755 install_conf_file
2160 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2161 largefile_support="yes"
2165 # A whole lot of hand springs to get the compiler version.
2166 # This is because gcc changed the output in version 3.0
2168 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2169 if test "x${CCVERSION}" = "x" ; then
2170 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2172 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2173 if test x"${CXXVERSION}" = x ; then
2174 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2177 if test "x${subsysdir}" = "x${sbindir}" ; then
2180 echo "You have set --sbindir and --with-subsys-dir"
2181 echo " both equal to: ${subsysdir} "
2182 echo " This is not permitted. Please reconfigure."
2184 echo "Aborting configuration ..."
2190 if test "x${db_type}" = "xInternal" ; then
2193 echo "You have not specified either --enable-client-only or one of the"
2194 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
2195 echo " This is not permitted. Please reconfigure."
2197 echo "Aborting the configuration ..."
2204 Configuration on `date`:
2206 Host: $host -- ${DISTNAME} ${DISTVER}
2207 Bacula version: ${VERSION} (${DATE})
2208 Source code location: ${srcdir}
2209 Install binaries: ${sbindir}
2210 Install config files: ${sysconfdir}
2211 Scripts directory: ${scriptdir}
2212 Working directory: ${working_dir}
2213 PID directory: ${piddir}
2214 Subsys directory: ${subsysdir}
2215 Man directory: ${mandir}
2216 Data directory: ${datadir}
2217 C Compiler: ${CC} ${CCVERSION}
2218 C++ Compiler: ${CXX} ${CXXVERSION}
2219 Compiler flags: ${WCFLAGS} ${CFLAGS}
2220 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2222 Statically Linked Tools: ${support_static_tools}
2223 Statically Linked FD: ${support_static_fd}
2224 Statically Linked SD: ${support_static_sd}
2225 Statically Linked DIR: ${support_static_dir}
2226 Statically Linked CONS: ${support_static_cons}
2227 Database type: ${db_type}
2228 Database lib: ${DB_LIBS}
2229 Database name: ${db_name}
2230 Database user: ${db_user}
2232 Job Output Email: ${job_email}
2233 Traceback Email: ${dump_email}
2234 SMTP Host Address: ${smtp_host}
2236 Director Port: ${dir_port}
2237 File daemon Port: ${fd_port}
2238 Storage daemon Port: ${sd_port}
2240 Director User: ${dir_user}
2241 Director Group: ${dir_group}
2242 Storage Daemon User: ${sd_user}
2243 Storage DaemonGroup: ${sd_group}
2244 File Daemon User: ${fd_user}
2245 File Daemon Group: ${fd_group}
2247 SQL binaries Directory ${SQL_BINDIR}
2249 Large file support: $largefile_support
2250 Bacula conio support: ${got_conio} ${CONS_LIBS}
2251 readline support: ${got_readline} ${PRTREADLINE_SRC}
2252 TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
2253 TLS support: ${support_tls}
2254 Encryption support: ${support_crypto}
2255 ZLIB support: ${have_zlib}
2256 enable-smartalloc: ${support_smartalloc}
2257 enable-bat: ${support_bat}
2258 enable-gnome: ${support_gnome} ${gnome_version}
2259 enable-bwx-console: ${support_wx_console} ${wx_version}
2260 enable-tray-monitor: ${support_tray_monitor}
2261 client-only: ${build_client_only}
2262 build-dird: ${build_dird}
2263 build-stored: ${build_stored}
2264 ACL support: ${have_acl}
2265 Python support: ${support_python} ${PYTHON_LIBS}