3 dnl# Process this file with autoconf to produce a configure script.
11 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
12 AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
14 dnl require a recent autoconf
18 dnl search for true and false programs.
19 AC_PATH_PROGS(TRUEPRG, true, :)
20 AC_PATH_PROGS(FALSEPRG, false, :)
25 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
26 DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
27 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
31 echo "configuring for bacula $VERSION ($DATE)"
34 dnl -------------------------------------------------------
35 dnl# Check for compiler.
36 dnl ------------------------------------------------------
40 AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
41 AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
43 if test "x$CC" = xgcc; then
46 AC_PATH_PROG(CXX, $CXX, $CXX)
47 if test ! -e $CXX; then
48 AC_MSG_ERROR(Unable to find C++ compiler)
51 dnl -------------------------------------------------------
52 dnl# Check for programs.
53 dnl ------------------------------------------------------
56 AC_PATH_PROG(MV, mv, mv)
57 AC_PATH_PROG(RM, rm, rm)
58 AC_PATH_PROG(CP, cp, cp)
59 AC_PATH_PROG(SED, sed, sed)
60 AC_PATH_PROG(ECHO, echo, echo)
61 AC_PATH_PROG(CMP, cmp, cmp)
62 AC_PATH_PROG(TBL, tbl, tbl)
63 AC_PATH_PROG(AR, ar, ar)
64 dnl AC_PATH_PROG(RANLIB, ranlib, ranlib)
65 AC_PATH_PROG(OPENSSL, openssl, none)
66 AC_PATH_PROG(MTX, mtx, mtx)
67 AC_PATH_PROG(DD, dd, dd)
68 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
69 AC_PATH_PROG(PYTHON, python, python)
70 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
71 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
72 AC_PATH_PROG(DVDRWFORMAT, dvd+rw-format, dvd+rw-format)
73 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
74 AC_ARG_VAR(WXCONFIG, [wx-config command. On some systems, you must set it to wx-config-2.6 to use wxWidgets 2.6.])
75 if test "x$WXCONFIG" = x; then
78 AC_PATH_PROG(WXCONFIG, ${WXCONFIG}, ${WXCONFIG})
79 AC_ARG_VAR(WXFLAGS, [Parameters to pass to wx-config (e.g. --unicode=no).])
80 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
81 AC_PATH_PROG(PIDOF, pidof, pidof)
83 # Some AWK programs fail, so test it and warn the user
84 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
85 { if ((prog == $2) || (("(" prog ")") == $2) ||
86 (("[" prog "]") == $2) ||
87 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
89 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
90 The regex engine of $AWK is too broken to be used you
91 might want to install GNU AWK.
92 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
95 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
97 test -n "$ARFLAG" || ARFLAGS="cr"
104 AC_SUBST(LOCAL_CFLAGS)
105 AC_SUBST(LOCAL_LDFLAGS)
108 dnl --------------------------------------------------
109 dnl Bacula OP Sys determination (see aclocal.m4)
110 dnl --------------------------------------------------
113 # -----------------------------------------------------------
114 dnl Bacula OPSys Distribution determination (see aclocal.m4)
115 # ----------------------------------------------------------
116 BA_CHECK_OPSYS_DISTNAME
118 # --------------------------------------------------
119 # Suppport for gettext (translations)
120 # By default, $datadir is ${prefix}/share
121 # --------------------------------------------------
122 AM_GNU_GETTEXT([external])
123 if test x${prefix} = xNONE ; then
124 if test `eval echo ${datadir}` = NONE/share ; then
129 # ------------------------------------------------------------------
130 # If the user has not set --prefix, we set our default to nothing.
131 # In this case, if the user has not set --sysconfdir, we set it
132 # to the package default of /etc/bacula. If either --prefix or
133 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
134 # ------------------------------------------------------------------
135 if test x${prefix} = xNONE ; then
136 if test `eval echo ${sysconfdir}` = NONE/etc ; then
137 sysconfdir=/etc/bacula
141 sysconfdir=`eval echo ${sysconfdir}`
142 datadir=`eval echo ${datadir}`
143 localedir=`eval echo ${datadir}/locale`
144 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
146 # -------------------------------------------------------------------------
147 # If the user has not set --exec-prefix, we default to ${prefix}
148 # -------------------------------------------------------------------------
149 if test x${exec_prefix} = xNONE ; then
150 exec_prefix=${prefix}
153 # ------------------------------------------------------------------
154 # If the user has not set --sbindir, we set our default as /sbin
155 # ------------------------------------------------------------------
156 if test x$sbindir = x'${exec_prefix}/sbin' ; then
157 sbindir=${exec_prefix}/sbin
159 sbindir=`eval echo ${sbindir}`
161 # -------------------------------------------------------------------------
162 # If the user has not set --mandir, we default to /usr/share/man
163 # -------------------------------------------------------------------------
164 if test x$mandir = x'${prefix}/man' ; then
165 mandir=/usr/share/man
169 # ------------------------------------------------------------------
170 # All list of languages for which a translation exist. Each
171 # language is separated by a space.
172 # ------------------------------------------------------------------
175 AC_PATH_PROGS(MSGFMT, msgfmt, no)
176 if test "$MSGFMT" = "no"
178 echo 'msgfmt program not found, disabling NLS !'
180 USE_INCLUDED_LIBINTL=no
189 support_postgresql=no
190 support_smartalloc=yes
194 support_wx_console=no
199 support_static_tools=no
202 support_static_dir=no
203 support_static_cons=no
212 dnl# --------------------------------------------------------------------------
213 dnl# CHECKING COMMAND LINE OPTIONS
214 dnl# --------------------------------------------------------------------------
216 # -------------------------------------------
217 # gnome (default off)
218 # -------------------------------------------
220 [ --enable-gnome enable build of gnome-console GUI [disabled]],
221 [if test x$enableval = xyes; then
226 if test x$support_gnome = xyes; then
227 abc=`$PKGCONFIG --exists libgnomeui-2.0`
229 if test $pkg = 0; then
230 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
231 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
232 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
233 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
234 AC_SUBST(GNOME_INCLUDEDIR)
235 AC_SUBST(GNOMEUI_LIBS)
236 AC_SUBST(GNOME_LIBDIR)
238 GNOME_DIR=src/gnome2-console
239 gnome_version="Version 2.x"
241 AC_MSG_ERROR(Unable to find Gnome 2 installation)
247 # -------------------------------------------
248 # wx-console (default off)
249 # -------------------------------------------
250 AC_ARG_ENABLE(wx-console,
251 [ --enable-wx-console enable build of wxWidgets console [disabled]],
252 [if test x$enableval = xyes; then
253 support_wx_console=yes
257 if test x$support_wx_console = xyes; then
258 abc=`$WXCONFIG $WXFLAGS --cppflags`
260 if test $pkg = 0; then
261 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
262 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
263 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
265 AC_SUBST(WXCONS_CPPFLAGS)
266 AC_SUBST(WXCONS_LDFLAGS)
267 WX_DIR=src/wx-console
270 echo "wx-config program not found. wx-console disabled."
272 support_wx_console=no
278 # -------------------------------------------
279 # tray-monitor (default off)
280 # -------------------------------------------
281 AC_ARG_ENABLE(tray-monitor,
282 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
283 [if test x$enableval = xyes; then
284 support_tray_monitor=yes
288 if test x$support_tray_monitor = xyes; then
289 abc=`$PKGCONFIG --exists gtk+-2.0`
291 if test $pkg = 0; then
292 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
293 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
294 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
295 AC_SUBST(TRAY_MONITOR_LDFLAGS)
296 TRAY_MONITOR_DIR=src/tray-monitor
297 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
299 if test $pkg = 0; then
300 AC_DEFINE(HAVE_GTK_2_4)
304 AC_SUBST(TRAY_MONITOR_DIR)
306 # -------------------------------------------
307 # smartalloc (default off)
308 # -------------------------------------------
309 AC_ARG_ENABLE(smartalloc,
310 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
311 [if test x$enableval = xno; then
312 support_smartalloc=no
315 if test x$support_smartalloc = xyes; then
316 AC_DEFINE(SMARTALLOC)
319 # -------------------------------------------
320 # static-tools (default off)
321 # -------------------------------------------
322 AC_ARG_ENABLE(static-tools,
323 [ --enable-static-tools enable static tape tools [disabled]],
324 [if test x$enableval = xyes; then
325 support_static_tools=yes
329 if test x$support_static_tools = xyes; then
330 TTOOL_LDFLAGS="-static"
332 AC_SUBST(TTOOL_LDFLAGS)
334 # -------------------------------------------
335 # static-fd (default off)
336 # -------------------------------------------
337 AC_ARG_ENABLE(static-fd,
338 [ --enable-static-fd enable static File daemon [disabled]],
339 [if test x$enableval = xyes; then
340 support_static_fd=yes
344 if test x$support_static_fd = xyes; then
345 STATIC_FD="static-bacula-fd"
349 # -------------------------------------------
350 # static-sd (default off)
351 # -------------------------------------------
352 AC_ARG_ENABLE(static-sd,
353 [ --enable-static-sd enable static Storage daemon [disabled]],
354 [if test x$enableval = xyes; then
355 support_static_sd=yes
359 if test x$support_static_sd = xyes; then
360 STATIC_SD="static-bacula-sd"
364 # -------------------------------------------
365 # static-dir (default off)
366 # -------------------------------------------
367 AC_ARG_ENABLE(static-dir,
368 [ --enable-static-dir enable static Director [disabled]],
369 [if test x$enableval = xyes; then
370 support_static_dir=yes
374 if test x$support_static_dir = xyes; then
375 STATIC_DIR="static-bacula-dir"
379 # -------------------------------------------
380 # static-cons (default off)
381 # -------------------------------------------
382 AC_ARG_ENABLE(static-cons,
383 [ --enable-static-cons enable static Console [disabled]],
384 [if test x$enableval = xyes; then
385 support_static_cons=yes
391 if test x$support_static_cons = xyes; then
392 STATIC_CONS="static-bconsole"
393 STATIC_GNOME_CONS="static-gnome-console"
394 STATIC_WX_CONS="static-wx-console"
396 AC_SUBST(STATIC_CONS)
397 AC_SUBST(STATIC_GNOME_CONS)
398 AC_SUBST(STATIC_WX_CONS)
400 # -------------------------------------------
401 # client_only (default off)
402 # -------------------------------------------
403 AC_ARG_ENABLE(client-only,
404 [ --enable-client-only build client (File daemon) only [disabled]],
405 [if test x$enableval = xyes; then
406 build_client_only=yes
410 if test x$build_client_only = xno; then
417 # -------------------------------------------
418 # director (default on)
419 # -------------------------------------------
420 AC_ARG_ENABLE(build-dird,
421 [ --enable-build-dird enable building of dird (Director) [enabled]],
422 [if test x$enableval = xno; then
425 if test x$build_dird = xyes; then
430 DIR_TOOLS="NODIRTOOLS"
435 # -------------------------------------------
436 # stored (default on)
437 # -------------------------------------------
438 AC_ARG_ENABLE(build-stored,
439 [ --enable-build-stored enable building of stored (Storage daemon) [enabled]],
440 [if test x$enableval = xno; then
443 if test x$build_stored = xyes; then
444 STORED_DIR="src/stored"
450 # ---------------------------------------------------
451 # Check for conio (Bacula readline substitute)(
452 # ---------------------------------------------------
453 # this allows you to turn it completely off
455 [ --disable-conio disable conio support [enabled]
457 [if test x$enableval = xno; then
462 if test x$support_conio = xyes; then
463 AC_CHECK_HEADER(termcap.h,
464 [ AC_CHECK_LIB(termcap, tgetent,
465 [ CONS_LIBS="-ltermcap"
470 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
472 [ AC_CHECK_LIB(ncurses, tgetent,
473 [ CONS_LIBS="-lncurses"
478 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
483 AC_CHECK_HEADERS(curses.h)
484 AC_CHECK_HEADER(term.h,
485 [ AC_CHECK_LIB(curses, tgetent,
486 [ CONS_LIBS="-lcurses"
491 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
494 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
503 # ---------------------------------------------------
504 # Check for readline support/directory (default off)
505 # ---------------------------------------------------
506 # this allows you to turn it completely off
507 AC_ARG_ENABLE(readline,
508 [ --disable-readline disable readline support [disable]
510 [if test x$enableval = xno; then
516 if test x$support_readline = xyes; then
517 AC_ARG_WITH(readline,
518 [ --with-readline=DIR specify readline library directory],
520 case "$with_readline" in
523 if test -f ${with_readline}/readline.h; then
524 CONS_INC="-I${with_readline}"
525 CONS_LDFLAGS="-L$with_readline"
526 elif test -f ${with_readline}/include/readline/readline.h; then
527 CONS_INC="-I${with_readline}/include/readline"
528 CONS_LDFLAGS="-L${with_readline}/lib"
529 with_readline="${with_readline}/include/readline"
531 with_readline="/usr/include/readline"
533 AC_CHECK_HEADER(${with_readline}/readline.h,
534 [ AC_DEFINE(HAVE_READLINE)
535 CONS_LIBS="-lreadline -lhistory -ltermcap"
539 echo "readline.h not found. readline turned off ..."
546 # check for standard readline library
547 AC_CHECK_HEADER(/usr/include/readline/readline.h,
548 [ AC_DEFINE(HAVE_READLINE)
550 CONS_INC="-I/usr/include/readline"
551 CONS_LIBS="-lreadline -ltermcap"
553 # Did not find standard library, so try Bacula's default
554 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
555 [ AC_DEFINE(HAVE_READLINE)
557 CONS_INC="-I${TOP_DIR}/depkgs/readline"
558 CONS_LIBS="-lreadline -lhistory -ltermcap"
559 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
560 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
563 echo "readline.h not found. readline turned off ..."
579 AC_SUBST(CONS_LDFLAGS)
580 AC_SUBST(READLINE_SRC)
582 # Minimal stuff for readline Makefile configuration
587 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr lstat lchown)
588 AC_CHECK_FUNCS(nanosleep nl_langinfo)
589 AC_CHECK_HEADERS(varargs.h)
591 # End of readline/conio stuff
592 # -----------------------------------------------------------------------
594 # -----------------------------------------------------------------------
595 # Check for Python support
597 AC_MSG_CHECKING(for Python support)
600 --with-python[=DIR] Include Python support. DIR is the Python base
601 install directory, default is to search through
602 a number of common places for the Python files.],
606 if test "$withval" != "no"; then
607 if test "$withval" = "yes"; then
608 for python_root in /usr /usr/local /usr/sfw; do
609 if test -f $python_root/include/python2.2/Python.h; then
610 PYTHON_INCDIR=-I$python_root/include/python2.2
611 PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
613 elif test -f $python_root/include/python2.3/Python.h; then
614 PYTHON_INCDIR=-I$python_root/include/python2.3
615 PYTHON_LIBS="-L$python_root/lib/python2.3/config -lpython2.3"
617 elif test -f $python_root/include/python2.4/Python.h; then
618 PYTHON_INCDIR=-I$python_root/include/python2.4
619 PYTHON_LIBS="-L$python_root/lib/python2.4/config -lpython2.4"
623 if test x$PYTHON_INCDIR = x; then
624 if test -f $prefix/include/Python.h; then
625 PYTHON_INCDIR=-I$prefix/include
626 PYTHON_LIBS="-L$prefix/lib/config -lpython"
629 AC_MSG_ERROR(Unable to find Python.h in standard locations)
633 if test -f $withval/Python.h; then
634 PYTHON_INCDIR=-I$withval
635 PYTHON_LIBS="-L$withval/config -lpython"
636 elif test -f $withval/include/Python.h; then
637 PYTHON_INCDIR=-I$withval/include
638 PYTHON_LIBS="-L$withval/lib/config -lpython"
639 elif test -f $withval/include/python/Python.h; then
640 PYTHON_INCDIR=-I$withval/include/python
641 PYTHON_LIBS="-L$withval/lib/python/config -lpython"
644 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
647 AC_DEFINE([HAVE_PYTHON], 1)
650 AC_MSG_NOTICE(checking for more Python libs)
651 saved_LIBS="$LIBS"; LIBS=
652 AC_SEARCH_LIBS(shm_open, [rt])
653 AC_CHECK_LIB(util, openpty)
654 PYTHON_LIBS="$PYTHON_LIBS $LIBS"
662 AC_SUBST(PYTHON_LIBS)
663 AC_SUBST(PYTHON_INCDIR)
667 # Find where sockets are (especially for Solaris)
668 # Do this before the TCP Wrappers test since tcp wrappers
669 # uses the socket library and some linkers are stupid.
671 AC_CHECK_FUNC(socket,
672 AC_MSG_RESULT(using libc's socket),
673 AC_CHECK_LIB(xnet,socket)
674 AC_CHECK_LIB(socket,socket)
675 AC_CHECK_LIB(inet,socket))
678 # -----------------------------------------------------------
679 # Check whether user wants TCP wrappers support (default off)
680 # -----------------------------------------------------------
683 AC_ARG_WITH(tcp-wrappers,
684 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
686 if test "x$withval" != "xno" ; then
688 LIBS="$saved_LIBS -lwrap"
689 AC_MSG_CHECKING(for libwrap)
690 AC_SEARCH_LIBS(nanosleep, [rt])
692 [ #include <sys/types.h>
694 int deny_severity = 0;
695 int allow_severity = 0;
696 struct request_info *req; ],
697 [ hosts_access(req); ],
700 AC_DEFINE(HAVE_LIBWRAP)
705 LIBS="$saved_LIBS -lwrap -lnsl"
706 WRAPLIBS="$saved_LIBS -lwrap -lnsl"
708 [ #include <sys/types.h>
710 int deny_severity = 0;
711 int allow_severity = 0;
712 struct request_info *req; ],
713 [ hosts_access(req); ],
716 AC_DEFINE(HAVE_LIBWRAP)
721 [AC_MSG_ERROR([*** libwrap missing]) ] ]
728 # -----------------------------------------------------------
729 # Check whether OpenSSL is available
730 # -----------------------------------------------------------
731 AC_MSG_CHECKING([for OpenSSL])
732 dnl The following uses quadrigraphs:
736 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
737 [with_openssl_directory=${withval}])
739 if test "x$with_openssl_directory" != "x"; then
740 OPENSSL_LIBS="-lssl -lcrypto"
743 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
744 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
745 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
749 saved_CFLAGS="$CFLAGS"
750 LIBS="$saved_LIBS $OPENSSL_LIBS"
751 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
753 AC_TRY_LINK([ #include <openssl/ssl.h> ],
754 [ CRYPTO_set_id_callback(NULL); ],
762 AC_TRY_LINK([ #include <openssl/evp.h> ],
764 [ ac_cv_openssl_sha2="yes" ],
765 [ ac_cv_openssl_sha2="no" ]
769 CFLAGS="$saved_CFLAGS"
771 if test "$support_tls" = "yes"; then
772 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
773 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
774 AC_DEFINE(HAVE_CRYPTO, 1, [Define if encryption support should be enabled])
777 if test "$ac_cv_openssl_sha2" = "yes"; then
778 AC_DEFINE(HAVE_SHA2, 1, [Define if the SHA-2 family of digest algorithms is available])
787 AC_MSG_RESULT([$support_tls])
788 AC_SUBST(OPENSSL_LIBS)
789 AC_SUBST(OPENSSL_INC)
792 # -----------------------------------------------------------
793 # Python and OpenSSL are using dlopen
794 # -----------------------------------------------------------
796 if test "$support_python" = "yes" -o "$support_tls" = "yes"; then
797 AC_SEARCH_LIBS(dlopen, [dl])
800 # ------------------------------------------
801 # Where to place working dir
802 # ------------------------------------------
803 working_dir=`eval echo ${prefix}/var/bacula/working`
804 AC_ARG_WITH(working-dir,
805 [ --with-working-dir=PATH specify path of Bacula working directory],
807 if test "x$withval" != "xno" ; then
813 AC_SUBST(working_dir)
816 # ------------------------------------------
817 # Where to place scriptdir (script files)
818 # ------------------------------------------
819 scriptdir=`eval echo ${sysconfdir}`
820 AC_ARG_WITH(scriptdir,
821 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
823 if test "x$withval" != "xno" ; then
832 # ------------------------------------------
833 # Where to send dump email
834 # ------------------------------------------
835 dump_email=root@localhost
836 AC_ARG_WITH(dump-email,
837 [ --with-dump-email=EMAIL dump email address],
839 if test "x$withval" != "xno" ; then
847 # ------------------------------------------
848 # Where to send job email
849 # ------------------------------------------
850 job_email=root@localhost
851 AC_ARG_WITH(job-email,
852 [ --with-job-email=EMAIL job output email address],
854 if test "x$withval" != "xno" ; then
862 # ------------------------------------------
863 # Where to find smtp host
864 # ------------------------------------------
866 AC_ARG_WITH(smtp_host,
867 [ --with-smtp-host=HOST SMTP mail host address],
869 if test "x$withval" != "xno" ; then
878 # ------------------------------------
879 # Where to place pid files
880 # ------------------------------------
883 [ --with-pid-dir=PATH specify location of Bacula pid files],
885 if test "x$withval" != "xno" ; then
891 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
895 # ------------------------------------
896 # Where to place subsys "lock file"
897 # ------------------------------------
898 subsysdir=/var/run/subsys
899 AC_ARG_WITH(subsys-dir,
900 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
902 if test "x$withval" != "xno" ; then
912 # ------------------------------------
913 # Where to start assigning ports
914 # ------------------------------------
916 AC_ARG_WITH(baseport,
917 [ --with-baseport=PORT specify base port address for daemons],
919 if test "x$withval" != "xno" ; then
926 dir_port=`expr $baseport`
927 fd_port=`expr $baseport + 1`
928 sd_port=`expr $fd_port + 1`
935 # ------------------------------------------
937 # ------------------------------------------
939 AC_ARG_WITH(dir-password,
940 [ --with-dir-password=PASSWORD specify Director's password],
942 if test "x$withval" != "xno" ; then
943 dir_password=$withval
948 if test "x$dir_password" = "x" ; then
949 if test "x$OPENSSL" = "xnone" ; then
950 key=`autoconf/randpass 33`
952 key=`openssl rand -base64 33`
958 AC_ARG_WITH(fd-password,
959 [ --with-fd-password=PASSWORD specify Client's password],
961 if test "x$withval" != "xno" ; then
967 if test "x$fd_password" = "x" ; then
968 if test "x$OPENSSL" = "xnone" ; then
969 key=`autoconf/randpass 37`
971 key=`openssl rand -base64 33`
977 AC_ARG_WITH(sd-password,
978 [ --with-sd-password=PASSWORD specify Storage daemon's password],
980 if test "x$withval" != "xno" ; then
986 if test "x$sd_password" = "x" ; then
987 if test "x$OPENSSL" = "xnone" ; then
988 key=`autoconf/randpass 41`
990 key=`openssl rand -base64 33`
996 AC_ARG_WITH(mon-dir-password,
997 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
999 if test "x$withval" != "xno" ; then
1000 mon_dir_password=$withval
1005 if test "x$mon_dir_password" = "x" ; then
1006 if test "x$OPENSSL" = "xnone" ; then
1007 key=`autoconf/randpass 33`
1009 key=`openssl rand -base64 33`
1011 mon_dir_password=$key
1015 AC_ARG_WITH(mon-fd-password,
1016 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
1018 if test "x$withval" != "xno" ; then
1019 mon_fd_password=$withval
1024 if test "x$mon_fd_password" = "x" ; then
1025 if test "x$OPENSSL" = "xnone" ; then
1026 key=`autoconf/randpass 37`
1028 key=`openssl rand -base64 33`
1030 mon_fd_password=$key
1034 AC_ARG_WITH(mon-sd-password,
1035 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
1037 if test "x$withval" != "xno" ; then
1038 mon_sd_password=$withval
1043 if test "x$mon_sd_password" = "x" ; then
1044 if test "x$OPENSSL" = "xnone" ; then
1045 key=`autoconf/randpass 41`
1047 key=`openssl rand -base64 33`
1049 mon_sd_password=$key
1052 AC_SUBST(dir_password)
1053 AC_SUBST(fd_password)
1054 AC_SUBST(sd_password)
1055 AC_SUBST(mon_dir_password)
1056 AC_SUBST(mon_fd_password)
1057 AC_SUBST(mon_sd_password)
1061 # Handle users and groups for each daemon
1064 AC_ARG_WITH(dir_user,
1065 [ --with-dir-user=USER specify user for Director daemon],
1067 if test "x$withval" != "x" ; then
1074 AC_ARG_WITH(dir_group,
1075 [ --with-dir-group=GROUP specify group for Director daemon],
1077 if test "x$withval" != "x" ; then
1084 AC_ARG_WITH(sd_user,
1085 [ --with-sd-user=USER specify user for Storage daemon],
1087 if test "x$withval" != "x" ; then
1094 AC_ARG_WITH(sd_group,
1095 [ --with-sd-group=GROUP specify group for Storage daemon],
1097 if test "x$withval" != "x" ; then
1104 AC_ARG_WITH(fd_user,
1105 [ --with-fd-user=USER specify user for File daemon],
1107 if test "x$withval" != "x" ; then
1114 AC_ARG_WITH(fd_group,
1115 [ --with-fd-group=GROUP specify group for File daemon],
1117 if test "x$withval" != "x" ; then
1134 # allow setting default executable permissions
1137 AC_ARG_WITH(sbin-perm,
1138 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1140 if test "x$withval" != "x" ; then
1148 # ------------------------------------------------
1149 # Bacula check for various SQL database engines
1150 # ------------------------------------------------
1151 BA_CHECK_POSTGRESQL_DB
1162 AC_DEFINE(PROTOTYPES)
1164 dnl# --------------------------------------------------------------------------
1165 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1167 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1168 if test -z "$CCOPTS"; then
1169 CCOPTS='-g -O2 -Wall'
1178 dnl See if we can use 64 bit file addresses
1179 largefile_support="no"
1185 dnl# --------------------------------------------------------------------------
1186 dnl# CHECKING FOR HEADER FILES
1187 dnl# --------------------------------------------------------------------------
1223 AC_STRUCT_ST_BLKSIZE
1227 dnl# --------------------------------------------------------------------------
1228 dnl# Check for utime.h structure
1229 dnl# --------------------------------------------------------------------------
1230 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1232 #include <sys/types.h>
1233 #include <utime.h>], [struct utimbuf foo],
1234 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1235 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1237 dnl# --------------------------------------------------------------------------
1238 dnl# Check for socklen_t
1239 dnl# --------------------------------------------------------------------------
1240 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1242 #include <sys/types.h>
1243 #include <sys/socket.h>],
1245 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1246 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1248 dnl# --------------------------------------------------------------------------
1249 dnl# Check for bigendian
1250 dnl# --------------------------------------------------------------------------
1251 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1253 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1254 [ba_cv_bigendian=yes],
1255 [ba_cv_bigendian=no],
1256 [ba_cv_bigendian=no])])
1257 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1263 dnl# --------------------------------------------------------------------------
1264 dnl# CHECKING FOR FILESYSTEM TYPE
1265 dnl# --------------------------------------------------------------------------
1266 AC_MSG_CHECKING(how to get filesystem type)
1268 # The order of these tests is important.
1269 AC_TRY_CPP([#include <sys/statvfs.h>
1270 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1271 if test $fstype = no; then
1272 AC_TRY_CPP([#include <sys/statfs.h>
1273 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1275 if test $fstype = no; then
1276 AC_TRY_CPP([#include <sys/statfs.h>
1277 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1279 if test $fstype = no; then
1280 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1282 if test $fstype = no; then
1283 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1285 if test $fstype = no; then
1286 AC_TRY_CPP([#include <sys/mount.h>
1287 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1289 AC_MSG_RESULT($fstype)
1291 AC_CHECK_HEADER(sys/statvfs.h, [ AC_DEFINE(HAVE_SYS_STATVFS_H,1,[Defines if your system have the sys/statvfs.h header file])] , )
1293 dnl# --------------------------------------------------------------------------
1294 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1295 dnl# --------------------------------------------------------------------------
1303 AC_CHECK_TYPE(ino_t, unsigned long)
1304 AC_CHECK_TYPE(dev_t, unsigned long)
1305 AC_CHECK_TYPE(daddr_t, long)
1306 AC_CHECK_TYPE(major_t, int)
1307 AC_CHECK_TYPE(minor_t, int)
1308 AC_CHECK_TYPE(ssize_t, int)
1315 AC_CHECK_SIZEOF(char, 1)
1316 AC_CHECK_SIZEOF(short int, 2)
1317 AC_CHECK_SIZEOF(int, 4)
1318 AC_CHECK_SIZEOF(long int, 4)
1319 AC_CHECK_SIZEOF(long long int, 8)
1320 AC_CHECK_SIZEOF(int *, 4)
1322 # Check for sys/types.h types
1323 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1325 [ #include <sys/types.h> ],
1327 [ ac_cv_have_u_int="yes" ],
1328 [ ac_cv_have_u_int="no" ]
1331 if test "x$ac_cv_have_u_int" = "xyes" ; then
1332 AC_DEFINE(HAVE_U_INT)
1336 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1338 [ #include <sys/types.h> ],
1339 [ intmax_t a; a = 1;],
1340 [ ac_cv_have_intmax_t="yes" ],
1343 [ #include <stdint.h> ],
1344 [ intmax_t a; a = 1;],
1345 [ ac_cv_have_intmax_t="yes" ],
1346 [ ac_cv_have_intmax_t="no" ]
1352 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1353 AC_DEFINE(HAVE_INTMAX_T)
1358 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1360 [ #include <sys/types.h> ],
1361 [ u_intmax_t a; a = 1;],
1362 [ ac_cv_have_u_intmax_t="yes" ],
1365 [ #include <stdint.h> ],
1366 [ u_intmax_t a; a = 1;],
1367 [ ac_cv_have_u_intmax_t="yes" ],
1368 [ ac_cv_have_u_intmax_t="no" ]
1373 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1374 AC_DEFINE(HAVE_U_INTMAX_T)
1379 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1381 [ #include <sys/types.h> ],
1382 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1383 [ ac_cv_have_intxx_t="yes" ],
1384 [ ac_cv_have_intxx_t="no" ]
1387 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1388 AC_DEFINE(HAVE_INTXX_T)
1392 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1394 [ #include <sys/types.h> ],
1395 [ int64_t a; a = 1;],
1396 [ ac_cv_have_int64_t="yes" ],
1397 [ ac_cv_have_int64_t="no" ]
1400 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1401 AC_DEFINE(HAVE_INT64_T)
1405 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1407 [ #include <sys/types.h> ],
1408 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1409 [ ac_cv_have_u_intxx_t="yes" ],
1410 [ ac_cv_have_u_intxx_t="no" ]
1413 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1414 AC_DEFINE(HAVE_U_INTXX_T)
1418 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1420 [ #include <sys/types.h> ],
1421 [ u_int64_t a; a = 1;],
1422 [ ac_cv_have_u_int64_t="yes" ],
1423 [ ac_cv_have_u_int64_t="no" ]
1426 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1427 AC_DEFINE(HAVE_U_INT64_T)
1431 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1432 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1434 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1436 [ #include <sys/bitypes.h> ],
1437 [ int8_t a; int16_t b; int32_t c;
1438 u_int8_t e; u_int16_t f; u_int32_t g;
1439 a = b = c = e = f = g = 1; ],
1440 [ AC_DEFINE(HAVE_U_INTXX_T)
1441 AC_DEFINE(HAVE_INTXX_T)
1442 AC_DEFINE(HAVE_SYS_BITYPES_H)
1443 AC_MSG_RESULT(yes) ],
1444 [ AC_MSG_RESULT(no)]
1448 if test -z "$have_u_intxx_t" ; then
1449 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1451 [ #include <sys/types.h> ],
1452 [ uint8_t a; uint16_t b;
1453 uint32_t c; a = b = c = 1; ],
1454 [ ac_cv_have_uintxx_t="yes" ],
1455 [ ac_cv_have_uintxx_t="no" ]
1458 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1459 AC_DEFINE(HAVE_UINTXX_T)
1463 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1464 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1466 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1468 [ #include <sys/bitypes.h> ],
1469 [ int64_t a; u_int64_t b;
1471 [ AC_DEFINE(HAVE_U_INT64_T)
1472 AC_DEFINE(HAVE_INT64_T)
1473 AC_MSG_RESULT(yes) ],
1474 [ AC_MSG_RESULT(no)]
1478 if (test -z "$have_uintxx_t" && \
1479 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1481 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1483 [ #include <sys/bitypes.h> ],
1484 [ uint8_t a; uint16_t b;
1485 uint32_t c; a = b = c = 1; ],
1486 [ AC_DEFINE(HAVE_UINTXX_T)
1487 AC_MSG_RESULT(yes) ],
1488 [ AC_MSG_RESULT(no)]
1496 dnl# --------------------------------------------------------------------------
1497 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1498 dnl# --------------------------------------------------------------------------
1514 [echo 'configure: cannot find needed function.'; exit 1]
1517 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1518 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1520 AC_CHECK_FUNCS(chflags)
1522 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1524 dnl# --------------------------------------------------------------------------
1525 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1526 dnl# --------------------------------------------------------------------------
1527 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1529 # If resolver functions are not in libc check for -lnsl or -lresolv.
1530 AC_CHECK_FUNC(gethostbyname_r,
1531 AC_MSG_RESULT(using libc's resolver),
1532 AC_CHECK_LIB(nsl,gethostbyname_r)
1533 AC_CHECK_LIB(resolv,gethostbyname_r))
1537 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1538 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1539 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1541 dnl ----------------------------
1542 dnl check sa_len of sockaddr
1543 dnl ----------------------------
1544 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1545 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1546 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1548 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1549 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1553 dnl Check for IPv6 support
1554 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1555 [AC_TRY_LINK([ #include <sys/types.h>
1556 #include <sys/socket.h>
1557 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1559 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1561 if test "$ac_cv_ipv6_support" = yes; then
1562 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1571 AC_FUNC_CLOSEDIR_VOID
1572 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1573 # AC_FUNC_FNMATCH dnl use local version
1576 dnl# FreeBSD needs to link libxpg4
1577 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1578 AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
1581 AC_CHECK_LIB(sun, getpwnam)
1583 AC_CHECK_HEADERS(zlib.h)
1584 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1586 if test x$FDLIBS = x-lz; then
1587 AC_DEFINE(HAVE_LIBZ)
1592 # Check for ACL libraries
1595 AC_CHECK_HEADER(sys/acl.h)
1596 AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
1597 [AC_CHECK_LIB(acl, acl_get_file, [have_acl=yes; FDLIBS="-lacl $FDLIBS"],
1598 [AC_CHECK_LIB(sec, acltotext, [have_acl=yes; FDLIBS="-lsec $FDLIBS"])]
1601 if test $have_acl = yes; then
1605 dnl Check for pthread libraries
1607 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1608 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1609 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1610 [AC_CHECK_FUNC(pthread_create)]
1620 LDFLAGS=${LDFLAGS--O}
1621 DB_LIBS="${SQL_LFLAGS}"
1623 CPPFLAGS="$CPPFLAGS"
1635 AC_SUBST(X_EXTRA_LIBS)
1640 dnl# extra configurable objects
1651 # Finally we set appropriate distribution specific
1652 # variables and defaults
1654 # PFILES are platform specific files
1655 PFILES="platforms/Makefile"
1659 hostname=`uname -n | cut -d '.' -f 1`
1660 if test x${hostname} = x ; then
1661 hostname="localhost"
1666 PSCMD="ps -e -o pid,comm"
1668 platforms/aix/Makefile"
1669 TAPEDRIVE="/dev/rmt0.1"
1673 PTHREAD_LIB="-lpthread -lexc"
1674 if test "${CC}" = "gcc" ; then
1681 TAPEDRIVE="/dev/nrmt0"
1684 DISTVER=`uname -a |awk '{print $3}'`
1685 TAPEDRIVE="/dev/nrmt0"
1686 PTHREAD_LIB="-pthread"
1687 CFLAGS="${CFLAGS} -pthread"
1688 PSCMD="ps -ax -o pid,command"
1692 platforms/bsdi/Makefile \
1693 platforms/bsdi/bacula-fd \
1694 platforms/bsdi/bacula-sd \
1695 platforms/bsdi/bacula-dir"
1696 largefile_support="yes"
1699 DISTVER=`uname -a |awk '{print $3}'`
1700 TAPEDRIVE="/dev/nrst0"
1703 WLDFLAGS="-mwindows"
1707 TAPEDRIVE="/dev/nst0"
1708 PSCMD="ps -e -o pid,command"
1711 platforms/darwin/Makefile"
1714 DISTVER=`cat /etc/debian_version`
1715 TAPEDRIVE="/dev/nrst0"
1716 PSCMD="ps -e -o pid,command"
1719 DISTVER=`uname -a |awk '{print $3}'`
1720 VER=`echo $DISTVER | cut -c 1`
1721 if test x$VER = x4 ; then
1722 PTHREAD_LIB="-pthread"
1723 CFLAGS="${CFLAGS} -pthread"
1727 TAPEDRIVE="/dev/nrsa0"
1728 PSCMD="ps -ax -o pid,command"
1730 platforms/freebsd/Makefile \
1731 platforms/freebsd/bacula-fd \
1732 platforms/freebsd/bacula-sd \
1733 platforms/freebsd/bacula-dir"
1734 largefile_support="yes"
1737 PSCMD="UNIX95=1 ps -e -o pid,comm"
1738 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1740 TAPEDRIVE="/dev/rmt/0hnb"
1741 PTHREAD_LIB="-lpthread"
1742 AC_DEFINE([_INCLUDE_LONGLONG])
1746 TAPEDRIVE="/dev/rmt/0cbn"
1747 PSCMD="ps -e -o pid,comm"
1749 platforms/irix/Makefile \
1750 platforms/irix/bacula-fd \
1751 platforms/irix/bacula-sd \
1752 platforms/irix/bacula-dir"
1755 DISTVER=`uname -a |awk '{print $3}'`
1758 TAPEDRIVE="/dev/nrst0"
1759 PSCMD="ps -ax -o pid,command"
1760 PTHREAD_LIB="-pthread"
1761 CFLAGS="${CFLAGS} -pthread"
1764 DISTVER=`uname -a |awk '{print $3}'`
1767 TAPEDRIVE="/dev/nrst0"
1768 PSCMD="ps -ax -o pid,command"
1769 PTHREAD_LIB="-pthread"
1770 CFLAGS="${CFLAGS} -pthread"
1772 platforms/openbsd/Makefile \
1773 platforms/openbsd/bacula-fd \
1774 platforms/openbsd/bacula-sd \
1775 platforms/openbsd/bacula-dir"
1778 if test -f /etc/whitebox-release ; then
1779 f=/etc/whitebox-release
1781 f=/etc/redhat-release
1783 if test `cat $f | grep release |\
1784 cut -f 3 -d ' '`x = "Enterprise"x ; then
1785 DISTVER="Enterprise "`cat $f | grep release |\
1788 DISTVER=`cat /etc/redhat-release | grep release |\
1791 TAPEDRIVE="/dev/nst0"
1792 PSCMD="ps -e -o pid,command"
1794 platforms/redhat/Makefile \
1795 platforms/redhat/bacula-fd \
1796 platforms/redhat/bacula-sd \
1797 platforms/redhat/bacula-dir \
1798 platforms/redhat/bacula.spec \
1802 DISTVER=`cat /etc/mandrake-release | grep release |\
1804 TAPEDRIVE="/dev/nst0"
1805 PSCMD="ps -e -o pid,command"
1807 platforms/mandrake/Makefile \
1808 platforms/mandrake/bacula-fd \
1809 platforms/mandrake/bacula-sd \
1810 platforms/mandrake/bacula-dir \
1811 platforms/mandrake/bacula.spec \
1815 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1816 TAPEDRIVE="/dev/nst0"
1817 PSCMD="ps -e -o pid,command"
1819 platforms/gentoo/Makefile \
1820 platforms/gentoo/bacula-init \
1821 platforms/gentoo/bacula-fd \
1822 platforms/gentoo/bacula-sd \
1823 platforms/gentoo/bacula-dir"
1826 DISTVER=`cat /etc/slackware-version`
1827 TAPEDRIVE="/dev/nst0"
1828 PSCMD="ps -e -o pid,command"
1830 platforms/slackware/Makefile \
1831 platforms/slackware/rc.bacula-fd \
1832 platforms/slackware/rc.bacula-sd \
1833 platforms/slackware/rc.bacula-dir\
1834 platforms/slackware/functions.bacula"
1838 TAPEDRIVE="/dev/rmt/0cbn"
1839 PSCMD="ps -e -o pid,comm"
1841 platforms/solaris/Makefile \
1842 platforms/solaris/bacula-fd \
1843 platforms/solaris/bacula-sd \
1844 platforms/solaris/bacula-dir"
1845 if test x$DISTVER = x5.6 ; then
1846 AC_DEFINE(HAVE_OLD_SOCKOPT)
1848 LIBS="$LIBS -lresolv"
1851 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1853 TAPEDRIVE="/dev/nst0"
1854 PSCMD="ps -e -o pid,command"
1856 platforms/suse/Makefile \
1857 platforms/suse/bacula-fd \
1858 platforms/suse/bacula-sd \
1859 platforms/suse/bacula-dir \
1860 platforms/suse/bacula \
1861 platforms/suse/bacula.spec"
1866 TAPEDRIVE="/dev/nst0"
1867 PSCMD="ps -e -o pid,command"
1869 platforms/suse/Makefile \
1870 platforms/suse/bacula-fd \
1871 platforms/suse/bacula-sd \
1872 platforms/suse/bacula-dir"
1876 TAPEDRIVE="/dev/nst0"
1879 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1885 LIBS="$PTHREAD_LIB $LIBS"
1887 AC_DEFINE_UNQUOTED(lld, "$lld")
1888 AC_DEFINE_UNQUOTED(llu, "$llu")
1896 dnl# common parts of the Makefile
1897 MCOMMON=./autoconf/Make.common
1898 AC_SUBST_FILE(MCOMMON)
1901 if test "x${subsysdir}" = "x${sbindir}" ; then
1904 echo "You have set both --sbindir and --with-subsys-dir"
1905 echo " equal to: ${subsysdir} "
1906 echo "This is not permitted. Please reconfigure."
1908 echo "Aborting configuration ..."
1914 AC_OUTPUT([autoconf/Make.common \
1916 scripts/startmysql \
1918 scripts/btraceback \
1924 scripts/devel_bacula \
1927 scripts/bacula.desktop.gnome1 \
1928 scripts/bacula.desktop.gnome2 \
1929 scripts/bacula.desktop.gnome1.consolehelper \
1930 scripts/bacula.desktop.gnome2.consolehelper \
1931 scripts/bacula.desktop.gnome1.xsu \
1932 scripts/bacula.desktop.gnome2.xsu \
1933 scripts/gnome-console.console_apps \
1934 scripts/mtx-changer \
1935 scripts/disk-changer \
1936 scripts/dvd-handler \
1937 scripts/bacula-tray-monitor.desktop \
1938 scripts/logwatch/Makefile \
1939 scripts/logwatch/logfile.bacula.conf \
1942 src/console/Makefile \
1943 src/console/bconsole.conf \
1944 src/gnome2-console/Makefile \
1945 src/gnome2-console/gnome-console.conf \
1946 src/wx-console/Makefile \
1947 src/wx-console/wx-console.conf \
1948 src/tray-monitor/Makefile \
1949 src/tray-monitor/tray-monitor.conf \
1951 src/dird/bacula-dir.conf \
1953 src/stored/Makefile \
1954 src/stored/bacula-sd.conf \
1955 src/filed/Makefile \
1956 src/filed/bacula-fd.conf \
1957 src/filed/win32/Makefile \
1959 src/cats/make_catalog_backup \
1960 src/cats/delete_catalog_backup \
1961 src/cats/create_postgresql_database \
1962 src/cats/update_postgresql_tables \
1963 src/cats/make_postgresql_tables \
1964 src/cats/grant_postgresql_privileges \
1965 src/cats/drop_postgresql_tables \
1966 src/cats/drop_postgresql_database \
1967 src/cats/create_mysql_database \
1968 src/cats/update_mysql_tables \
1969 src/cats/make_mysql_tables \
1970 src/cats/grant_mysql_privileges \
1971 src/cats/drop_mysql_tables \
1972 src/cats/drop_mysql_database \
1973 src/cats/create_sqlite_database \
1974 src/cats/update_sqlite_tables \
1975 src/cats/make_sqlite_tables \
1976 src/cats/grant_sqlite_privileges \
1977 src/cats/drop_sqlite_tables \
1978 src/cats/drop_sqlite_database \
1979 src/cats/create_sqlite3_database \
1980 src/cats/update_sqlite3_tables \
1981 src/cats/make_sqlite3_tables \
1982 src/cats/grant_sqlite3_privileges \
1983 src/cats/drop_sqlite3_tables \
1984 src/cats/drop_sqlite3_database \
1987 src/cats/create_bdb_database \
1988 src/cats/update_bdb_tables \
1989 src/cats/make_bdb_tables \
1990 src/cats/grant_bdb_privileges \
1991 src/cats/drop_bdb_tables \
1992 src/cats/drop_bdb_database \
1993 src/cats/create_bacula_database \
1994 src/cats/update_bacula_tables \
1995 src/cats/grant_bacula_privileges \
1996 src/cats/make_bacula_tables \
1997 src/cats/drop_bacula_tables \
1998 src/cats/drop_bacula_database \
1999 src/findlib/Makefile \
2000 src/pygtk-console/Makefile \
2001 src/tools/Makefile \
2002 src/win32/winbacula.nsi \
2003 src/win32/baculafd/bacula-fd.conf \
2004 src/win32/Makefile \
2005 src/win32/console/bconsole.conf \
2006 src/win32/wx-console/wx-console.conf \
2007 src/win32/pebuilder/Makefile \
2010 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
2014 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2015 chmod 755 dvd-handler
2016 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2021 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2022 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2024 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2025 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2027 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2028 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2030 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2031 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2033 chmod 755 $c/create_sqlite3_database $c/update_sqlite3_tables $c/make_sqlite3_tables
2034 chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
2036 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2037 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2039 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2043 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2044 largefile_support="yes"
2048 # A whole lot of hand springs to get the compiler version.
2049 # This is because gcc changed the output in version 3.0
2051 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2052 if test "x${CCVERSION}" = "x" ; then
2053 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2055 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2056 if test x"${CXXVERSION}" = x ; then
2057 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2060 if test "x${subsysdir}" = "x${sbindir}" ; then
2063 echo "You have set --sbindir and --with-subsys-dir"
2064 echo " both equal to: ${subsysdir} "
2065 echo " This is not permitted. Please reconfigure."
2067 echo "Aborting configuration ..."
2073 if test "x${db_name}" = "xInternal" ; then
2076 echo "You have not specified either --enable-client-only or one of the"
2077 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
2078 echo " This is not permitted. Please reconfigure."
2080 echo "Aborting the configuration ..."
2087 Configuration on `date`:
2089 Host: $host -- ${DISTNAME} ${DISTVER}
2090 Bacula version: ${VERSION} (${DATE})
2091 Source code location: ${srcdir}
2092 Install binaries: ${sbindir}
2093 Install config files: ${sysconfdir}
2094 Scripts directory: ${scriptdir}
2095 Working directory: ${working_dir}
2096 PID directory: ${piddir}
2097 Subsys directory: ${subsysdir}
2098 Man directory: ${mandir}
2099 Data directory: ${datadir}
2100 C Compiler: ${CC} ${CCVERSION}
2101 C++ Compiler: ${CXX} ${CXXVERSION}
2102 Compiler flags: ${WCFLAGS} ${CFLAGS}
2103 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2105 Statically Linked Tools: ${support_static_tools}
2106 Statically Linked FD: ${support_static_fd}
2107 Statically Linked SD: ${support_static_sd}
2108 Statically Linked DIR: ${support_static_dir}
2109 Statically Linked CONS: ${support_static_cons}
2110 Database type: ${db_name}
2111 Database lib: ${DB_LIBS}
2113 Job Output Email: ${job_email}
2114 Traceback Email: ${dump_email}
2115 SMTP Host Address: ${smtp_host}
2117 Director Port: ${dir_port}
2118 File daemon Port: ${fd_port}
2119 Storage daemon Port: ${sd_port}
2121 Director User: ${dir_user}
2122 Director Group: ${dir_group}
2123 Storage Daemon User: ${sd_user}
2124 Storage DaemonGroup: ${sd_group}
2125 File Daemon User: ${fd_user}
2126 File Daemon Group: ${fd_group}
2128 SQL binaries Directory ${SQL_BINDIR}
2130 Large file support: $largefile_support
2131 Bacula conio support: ${got_conio} ${CONS_LIBS}
2132 readline support: ${got_readline} ${PRTREADLINE_SRC}
2133 TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
2134 TLS support: ${support_tls}
2135 Encryption support: ${support_crypto}
2136 ZLIB support: ${have_zlib}
2137 enable-smartalloc: ${support_smartalloc}
2138 enable-gnome: ${support_gnome} ${gnome_version}
2139 enable-wx-console: ${support_wx_console} ${wx_version}
2140 enable-tray-monitor: ${support_tray_monitor}
2141 client-only: ${build_client_only}
2142 build-dird: ${build_dird}
2143 build-stored: ${build_stored}
2144 ACL support: ${have_acl}
2145 Python support: ${support_python} ${PYTHON_LIBS}