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.
48 dnl -------------------------------------------------------
49 dnl# Check for programs.
50 dnl ------------------------------------------------------
53 AC_PATH_PROG(MV, mv, mv)
54 AC_PATH_PROG(RM, rm, rm)
55 AC_PATH_PROG(CP, cp, cp)
56 AC_PATH_PROG(SED, sed, sed)
57 AC_PATH_PROG(ECHO, echo, echo)
58 AC_PATH_PROG(CMP, cmp, cmp)
59 AC_PATH_PROG(TBL, tbl, tbl)
60 AC_PATH_PROG(AR, ar, ar)
61 dnl AC_PATH_PROG(RANLIB, ranlib, ranlib)
62 AC_PATH_PROG(OPENSSL, openssl, none)
63 AC_PATH_PROG(MTX, mtx, mtx)
64 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
65 AC_PATH_PROG(PYTHON, python, python)
66 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
67 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
68 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
69 AC_ARG_VAR(WXCONFIG, [wx-config command. On some systems, you must set it to wx-config-2.6 to use wxWidgets 2.6.])
70 if test "x$WXCONFIG" = x; then
73 AC_PATH_PROG(WXCONFIG, ${WXCONFIG}, ${WXCONFIG})
74 AC_ARG_VAR(WXFLAGS, [Parameters to pass to wx-config (e.g. --unicode=no).])
75 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
76 AC_PATH_PROG(PIDOF, pidof, pidof)
78 # Some AWK programs fail, so test it and warn the user
79 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
80 { if ((prog == $2) || (("(" prog ")") == $2) ||
81 (("[" prog "]") == $2) ||
82 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
84 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
85 The regex engine of $AWK is too broken to be used you
86 might want to install GNU AWK.
87 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
90 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
92 test -n "$ARFLAG" || ARFLAGS="cr"
99 AC_SUBST(LOCAL_CFLAGS)
100 AC_SUBST(LOCAL_LDFLAGS)
105 dnl --------------------------------------------------
106 dnl Bacula OP Sys determination (see aclocal.m4)
107 dnl --------------------------------------------------
110 # -----------------------------------------------------------
111 dnl Bacula OPSys Distribution determination (see aclocal.m4)
112 # ----------------------------------------------------------
113 BA_CHECK_OPSYS_DISTNAME
115 # -----------------------------------------------------------
116 dnl Check for gnome stuff for gnome-console
117 # ----------------------------------------------------------
118 AM_ACLOCAL_INCLUDE(gnome-macros)
120 # ------------------------------------------------------------------
121 # If the user has not set --prefix, we set our default to nothing.
122 # In this case, if the user has not set --sysconfdir, we set it
123 # to the package default of /etc/bacula. If either --prefix or
124 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
125 # ------------------------------------------------------------------
126 if test x${prefix} = xNONE ; then
127 if test `eval echo ${sysconfdir}` = NONE/etc ; then
128 sysconfdir=/etc/bacula
132 sysconfdir=`eval echo ${sysconfdir}`
134 # -------------------------------------------------------------------------
135 # If the user has not set --exec-prefix, we default to ${prefix}
136 # -------------------------------------------------------------------------
137 if test x${exec_prefix} = xNONE ; then
138 exec_prefix=${prefix}
141 # ------------------------------------------------------------------
142 # If the user has not set --sbindir, we set our default as /sbin
143 # ------------------------------------------------------------------
144 if test x$sbindir = x'${exec_prefix}/sbin' ; then
145 sbindir=${exec_prefix}/sbin
147 sbindir=`eval echo ${sbindir}`
149 # ------------------------------------------------------------------
150 # All list of languages for which a translation exist. Each
151 # language is separated by a space.
152 # ------------------------------------------------------------------
155 AC_PATH_PROGS(MSGFMT, msgfmt, no)
156 if test "$MSGFMT" = "no"
158 echo 'msgfmt program not found, disabling NLS !'
160 USE_INCLUDED_LIBINTL=no
169 support_postgresql=no
170 support_smartalloc=yes
174 support_wx_console=no
178 support_static_tools=no
181 support_static_dir=no
182 support_static_cons=no
189 dnl# --------------------------------------------------------------------------
190 dnl# CHECKING COMMAND LINE OPTIONS
191 dnl# --------------------------------------------------------------------------
193 # -------------------------------------------
194 # gnome (default off)
195 # -------------------------------------------
197 [ --enable-gnome enable build of gnome-console GUI [disabled]],
198 [if test x$enableval = xyes; then
203 if test x$support_gnome = xyes; then
204 abc=`$PKGCONFIG --exists libgnomeui-2.0`
206 if test $pkg = 0; then
207 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
208 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
209 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
210 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
211 AC_SUBST(GNOME_INCLUDEDIR)
212 AC_SUBST(GNOMEUI_LIBS)
213 AC_SUBST(GNOME_LIBDIR)
215 GNOME_DIR=src/gnome2-console
216 gnome_version="Version 2.x"
220 GNOME_DIR=src/gnome-console
221 gnome_version="Version 1.4"
227 # -------------------------------------------
228 # wx-console (default off)
229 # -------------------------------------------
230 AC_ARG_ENABLE(wx-console,
231 [ --enable-wx-console enable build of wxWidgets console [disabled]],
232 [if test x$enableval = xyes; then
233 support_wx_console=yes
237 if test x$support_wx_console = xyes; then
238 abc=`$WXCONFIG $WXFLAGS --cppflags`
240 if test $pkg = 0; then
241 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
242 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
243 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
245 AC_SUBST(WXCONS_CPPFLAGS)
246 AC_SUBST(WXCONS_LDFLAGS)
247 WX_DIR=src/wx-console
250 echo "wx-config program not found. wx-console disabled."
252 support_wx_console=no
258 # -------------------------------------------
259 # tray-monitor (default off)
260 # -------------------------------------------
261 AC_ARG_ENABLE(tray-monitor,
262 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
263 [if test x$enableval = xyes; then
264 support_tray_monitor=yes
268 if test x$support_tray_monitor = xyes; then
269 abc=`$PKGCONFIG --exists gtk+-2.0`
271 if test $pkg = 0; then
272 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
273 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
274 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
275 AC_SUBST(TRAY_MONITOR_LDFLAGS)
276 TRAY_MONITOR_DIR=src/tray-monitor
277 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
279 if test $pkg = 0; then
280 AC_DEFINE(HAVE_GTK_2_4)
284 AC_SUBST(TRAY_MONITOR_DIR)
286 # -------------------------------------------
287 # smartalloc (default off)
288 # -------------------------------------------
289 AC_ARG_ENABLE(smartalloc,
290 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
291 [if test x$enableval = xno; then
292 support_smartalloc=no
295 if test x$support_smartalloc = xyes; then
296 AC_DEFINE(SMARTALLOC)
299 # -------------------------------------------
300 # static-tools (default off)
301 # -------------------------------------------
302 AC_ARG_ENABLE(static-tools,
303 [ --enable-static-tools enable static tape tools [disabled]],
304 [if test x$enableval = xyes; then
305 support_static_tools=yes
309 if test x$support_static_tools = xyes; then
310 TTOOL_LDFLAGS="-static"
312 AC_SUBST(TTOOL_LDFLAGS)
314 # -------------------------------------------
315 # static-fd (default off)
316 # -------------------------------------------
317 AC_ARG_ENABLE(static-fd,
318 [ --enable-static-fd enable static File daemon [disabled]],
319 [if test x$enableval = xyes; then
320 support_static_fd=yes
324 if test x$support_static_fd = xyes; then
325 STATIC_FD="static-bacula-fd"
329 # -------------------------------------------
330 # static-sd (default off)
331 # -------------------------------------------
332 AC_ARG_ENABLE(static-sd,
333 [ --enable-static-sd enable static Storage daemon [disabled]],
334 [if test x$enableval = xyes; then
335 support_static_sd=yes
339 if test x$support_static_sd = xyes; then
340 STATIC_SD="static-bacula-sd"
344 # -------------------------------------------
345 # static-dir (default off)
346 # -------------------------------------------
347 AC_ARG_ENABLE(static-dir,
348 [ --enable-static-dir enable static Director [disabled]],
349 [if test x$enableval = xyes; then
350 support_static_dir=yes
354 if test x$support_static_dir = xyes; then
355 STATIC_DIR="static-bacula-dir"
359 # -------------------------------------------
360 # static-cons (default off)
361 # -------------------------------------------
362 AC_ARG_ENABLE(static-cons,
363 [ --enable-static-cons enable static Console [disabled]],
364 [if test x$enableval = xyes; then
365 support_static_cons=yes
371 if test x$support_static_cons = xyes; then
372 STATIC_CONS="static-bconsole"
373 STATIC_GNOME_CONS="static-gnome-console"
374 STATIC_WX_CONS="static-wx-console"
376 AC_SUBST(STATIC_CONS)
377 AC_SUBST(STATIC_GNOME_CONS)
378 AC_SUBST(STATIC_WX_CONS)
380 # -------------------------------------------
381 # client_only (default off)
382 # -------------------------------------------
383 AC_ARG_ENABLE(client-only,
384 [ --enable-client-only build client (File daemon) only [disabled]],
385 [if test x$enableval = xyes; then
386 build_client_only=yes
390 if test x$build_client_only = xno; then
397 # ---------------------------------------------------
398 # Check for conio (Bacula readline substitute)(
399 # ---------------------------------------------------
400 # this allows you to turn it completely off
402 [ --disable-conio disable conio support [enabled]
404 [if test x$enableval = xno; then
409 if test x$support_conio = xyes; then
410 AC_CHECK_HEADER(termcap.h,
411 [ AC_CHECK_LIB(termcap, tgetent,
412 [ CONS_LIBS="-ltermcap"
417 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
419 [ AC_CHECK_LIB(ncurses, tgetent,
420 [ CONS_LIBS="-lncurses"
425 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
430 AC_CHECK_HEADERS(curses.h)
431 AC_CHECK_HEADER(term.h,
432 [ AC_CHECK_LIB(curses, tgetent,
433 [ CONS_LIBS="-lcurses"
438 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
441 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
450 # ---------------------------------------------------
451 # Check for readline support/directory (default off)
452 # ---------------------------------------------------
453 # this allows you to turn it completely off
454 AC_ARG_ENABLE(readline,
455 [ --disable-readline disable readline support [disable]
457 [if test x$enableval = xno; then
463 if test x$support_readline = xyes; then
464 AC_ARG_WITH(readline,
465 [ --with-readline=DIR specify readline library directory],
467 case "$with_readline" in
470 if test "$with_readline" != "yes"; then
471 CONS_INC="-I${with_readline}"
472 CONS_LDFLAGS="-L$with_readline"
474 with_readline="/usr/include/readline"
476 AC_CHECK_HEADER(${with_readline}/readline.h,
477 [ AC_DEFINE(HAVE_READLINE)
478 CONS_LIBS="-lreadline -ltermcap"
482 echo "readline.h not found. readline turned off ..."
489 # check for standard readline library
490 AC_CHECK_HEADER(/usr/include/readline/readline.h,
491 [ AC_DEFINE(HAVE_READLINE)
493 CONS_INC="-I/usr/include/readline"
494 CONS_LIBS="-lreadline -ltermcap"
496 # Did not find standard library, so try Bacula's default
497 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
498 [ AC_DEFINE(HAVE_READLINE)
500 CONS_INC="-I${TOP_DIR}/depkgs/readline"
501 CONS_LIBS="-lreadline -lhistory -ltermcap"
502 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
503 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
506 echo "readline.h not found. readline turned off ..."
522 AC_SUBST(CONS_LDFLAGS)
523 AC_SUBST(READLINE_SRC)
525 # Minimal stuff for readline Makefile configuration
530 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
531 AC_CHECK_FUNCS(nanosleep nl_langinfo)
532 AC_CHECK_HEADERS(varargs.h)
534 # End of readline/conio stuff
535 # -----------------------------------------------------------------------
537 # -----------------------------------------------------------------------
538 # Check for Python support
540 AC_MSG_CHECKING(for Python support)
543 --with-python[=DIR] Include Python support. DIR is the Python base
544 install directory, default is to search through
545 a number of common places for the Python files.],
549 if test "$withval" != "no"; then
550 if test "$withval" = "yes"; then
551 if test -f /usr/include/python2.2/Python.h; then
552 PYTHON_INCDIR=-I/usr/include/python2.2
553 PYTHON_LIBS="-L/usr/lib/python2.2/config -lpython2.2 -lutil -ldl"
554 elif test -f /usr/include/python2.3/Python.h; then
555 PYTHON_INCDIR=-I/usr/include/python2.3
556 PYTHON_LIBS="-L/usr/lib/python2.3/config -lpython2.3 -lutil -ldl"
557 elif test -f /usr/include/python2.4/Python.h; then
558 PYTHON_INCDIR=-I/usr/include/python2.4
559 PYTHON_LIBS="-L/usr/lib/python2.4/config -lpython2.4 -lutil -ldl"
560 elif test -f $prefix/include/Python.h; then
561 PYTHON_INCDIR=-I$prefix/include
562 PYTHON_LIBS="-L$prefix/lib/config -lpython -lutil -ldl"
565 AC_MSG_ERROR(Unable to find Python.h in standard locations)
568 if test -f $withval/Python.h; then
569 PYTHON_INCDIR=-I$withval
570 PYTHON_LIBS="-L$withval/config -lpython -lutil -ldl"
571 elif test -f $withval/include/Python.h; then
572 PYTHON_INCDIR=-I$withval/include
573 PYTHON_LIBS="-L$withval/lib/config -lpython -lutil -ldl"
576 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
579 AC_DEFINE([HAVE_PYTHON], 1)
589 AC_SUBST(PYTHON_LIBS)
590 AC_SUBST(PYTHON_INCDIR)
594 # Find where sockets are (especially for Solaris)
595 # Do this before the TCP Wrappers test since tcp wrappers
596 # uses the socket library and some linkers are stupid.
598 AC_CHECK_FUNC(socket,
599 AC_MSG_RESULT(using libc's socket),
600 AC_CHECK_LIB(xnet,socket)
601 AC_CHECK_LIB(socket,socket)
602 AC_CHECK_LIB(inet,socket))
605 # -----------------------------------------------------------
606 # Check whether user wants TCP wrappers support (default off)
607 # -----------------------------------------------------------
609 AC_ARG_WITH(tcp-wrappers,
610 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
612 if test "x$withval" != "xno" ; then
614 LIBS="$saved_LIBS -lwrap"
615 AC_MSG_CHECKING(for libwrap)
618 int deny_severity = 0;
619 int allow_severity = 0;
620 struct request_info *req; ],
621 [ hosts_access(req); ],
624 AC_DEFINE(HAVE_LIBWRAP)
627 LIBS="$saved_LIBS -lwrap -lnsl"
630 int deny_severity = 0;
631 int allow_severity = 0;
632 struct request_info *req; ],
633 [ hosts_access(req); ],
636 AC_DEFINE(HAVE_LIBWRAP)
639 [AC_MSG_ERROR([*** libwrap missing]) ] ]
646 # -----------------------------------------------------------
647 # Check whether OpenSSL is available
648 # -----------------------------------------------------------
649 AC_MSG_CHECKING([for OpenSSL])
650 dnl The following uses quadrigraphs:
654 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
655 [with_openssl_directory=${withval}])
657 if test "x$with_openssl_directory" != "x"; then
658 OPENSSL_LIBS="-lssl -lcrypto"
661 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
662 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
663 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
667 saved_CFLAGS="$CFLAGS"
668 LIBS="$saved_LIBS $OPENSSL_LIBS"
669 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
671 AC_TRY_LINK([ #include <openssl/ssl.h> ],
672 [ CRYPTO_set_id_callback(NULL); ],
673 [ support_tls="yes" ],
678 CFLAGS="$saved_CFLAGS"
680 if test "$support_tls" = "yes"; then
681 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
682 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
690 AC_MSG_RESULT([$support_tls])
691 AC_SUBST(OPENSSL_LIBS)
692 AC_SUBST(OPENSSL_INC)
696 # ------------------------------------------
697 # Where to place working dir
698 # ------------------------------------------
699 working_dir=`eval echo ${prefix}/var/bacula/working`
700 AC_ARG_WITH(working-dir,
701 [ --with-working-dir=PATH specify path of Bacula working directory],
703 if test "x$withval" != "xno" ; then
709 AC_SUBST(working_dir)
712 # ------------------------------------------
713 # Where to place scriptdir (script files)
714 # ------------------------------------------
715 scriptdir=`eval echo ${sysconfdir}`
716 AC_ARG_WITH(scriptdir,
717 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
719 if test "x$withval" != "xno" ; then
728 # ------------------------------------------
729 # Where to send dump email
730 # ------------------------------------------
731 dump_email=root@localhost
732 AC_ARG_WITH(dump-email,
733 [ --with-dump-email=EMAIL dump email address],
735 if test "x$withval" != "xno" ; then
743 # ------------------------------------------
744 # Where to send job email
745 # ------------------------------------------
746 job_email=root@localhost
747 AC_ARG_WITH(job-email,
748 [ --with-job-email=EMAIL job output email address],
750 if test "x$withval" != "xno" ; then
758 # ------------------------------------------
759 # Where to find smtp host
760 # ------------------------------------------
762 AC_ARG_WITH(smtp_host,
763 [ --with-smtp-host=HOST SMTP mail host address],
765 if test "x$withval" != "xno" ; then
774 # ------------------------------------
775 # Where to place pid files
776 # ------------------------------------
779 [ --with-pid-dir=PATH specify location of Bacula pid files],
781 if test "x$withval" != "xno" ; then
787 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
791 # ------------------------------------
792 # Where to place subsys "lock file"
793 # ------------------------------------
794 subsysdir=/var/run/subsys
795 AC_ARG_WITH(subsys-dir,
796 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
798 if test "x$withval" != "xno" ; then
808 # ------------------------------------
809 # Where to start assigning ports
810 # ------------------------------------
812 AC_ARG_WITH(baseport,
813 [ --with-baseport=PORT specify base port address for daemons],
815 if test "x$withval" != "xno" ; then
822 dir_port=`expr $baseport`
823 fd_port=`expr $baseport + 1`
824 sd_port=`expr $fd_port + 1`
831 # ------------------------------------------
833 # ------------------------------------------
835 AC_ARG_WITH(dir-password,
836 [ --with-dir-password=PASSWORD specify Director's password],
838 if test "x$withval" != "xno" ; then
839 dir_password=$withval
844 if test "x$dir_password" = "x" ; then
845 if test "x$OPENSSL" = "xnone" ; then
846 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
847 key=`autoconf/randpass 33`
849 key=`openssl rand -base64 33`
855 AC_ARG_WITH(fd-password,
856 [ --with-fd-password=PASSWORD specify Client's password],
858 if test "x$withval" != "xno" ; then
864 if test "x$fd_password" = "x" ; then
865 if test "x$OPENSSL" = "xnone" ; then
866 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
867 key=`autoconf/randpass 37`
869 key=`openssl rand -base64 33`
875 AC_ARG_WITH(sd-password,
876 [ --with-sd-password=PASSWORD specify Storage daemon's password],
878 if test "x$withval" != "xno" ; then
884 if test "x$sd_password" = "x" ; then
885 if test "x$OPENSSL" = "xnone" ; then
886 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
887 key=`autoconf/randpass 41`
889 key=`openssl rand -base64 33`
895 AC_ARG_WITH(mon-dir-password,
896 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
898 if test "x$withval" != "xno" ; then
899 mon_dir_password=$withval
904 if test "x$mon_dir_password" = "x" ; then
905 if test "x$OPENSSL" = "xnone" ; then
906 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
907 key=`autoconf/randpass 33`
909 key=`openssl rand -base64 33`
911 mon_dir_password=$key
915 AC_ARG_WITH(mon-fd-password,
916 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
918 if test "x$withval" != "xno" ; then
919 mon_fd_password=$withval
924 if test "x$mon_fd_password" = "x" ; then
925 if test "x$OPENSSL" = "xnone" ; then
926 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
927 key=`autoconf/randpass 37`
929 key=`openssl rand -base64 33`
935 AC_ARG_WITH(mon-sd-password,
936 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
938 if test "x$withval" != "xno" ; then
939 mon_sd_password=$withval
944 if test "x$mon_sd_password" = "x" ; then
945 if test "x$OPENSSL" = "xnone" ; then
946 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
947 key=`autoconf/randpass 41`
949 key=`openssl rand -base64 33`
954 AC_SUBST(dir_password)
955 AC_SUBST(fd_password)
956 AC_SUBST(sd_password)
957 AC_SUBST(mon_dir_password)
958 AC_SUBST(mon_fd_password)
959 AC_SUBST(mon_sd_password)
961 # -------------------------------------------------------------------------
962 # Set variables for bimagemgr installation
963 # -------------------------------------------------------------------------
964 bimagemgr_cgidir=/var/www/cgi-bin
965 AC_ARG_WITH(bimagemgr-cgidir,
966 [ --with-bimagemgr-cgidir=DIR specify bimagemgr cgi-bin dir],
968 if test "x$withval" != "xno" ; then
969 bimagemgr_cgidir=$withval
974 bimagemgr_docdir=/var/www/html
975 AC_ARG_WITH(bimagemgr-docdir,
976 [ --with-bimagemgr-docdir=DIR specify bimagemgr doc root dir],
978 if test "x$withval" != "xno" ; then
979 bimagemgr_docdir=$withval
984 bimagemgr_binowner=root
985 AC_ARG_WITH(bimagemgr-binowner,
986 [ --with-bimagemgr-binowner=USER specify bimagemgr binary file owner],
988 if test "x$withval" != "xno" ; then
989 bimagemgr_binowner=$withval
994 bimagemgr_bingroup=root
995 AC_ARG_WITH(bimagemgr-bingroup,
996 [ --with-bimagemgr-bingroup=USER specify bimagemgr binary file group],
998 if test "x$withval" != "xno" ; then
999 bimagemgr_bingroup=$withval
1004 bimagemgr_dataowner=apache
1005 AC_ARG_WITH(bimagemgr-dataowner,
1006 [ --with-bimagemgr-dataowner=USER specify bimagemgr data file owner],
1008 if test "x$withval" != "xno" ; then
1009 bimagemgr_dataowner=$withval
1014 bimagemgr_datagroup=apache
1015 AC_ARG_WITH(bimagemgr-datagroup,
1016 [ --with-bimagemgr-datagroup=USER specify bimagemgr data file group],
1018 if test "x$withval" != "xno" ; then
1019 bimagemgr_datagroup=$withval
1024 AC_SUBST(bimagemgr_cgidir)
1025 AC_SUBST(bimagemgr_docdir)
1026 AC_SUBST(bimagemgr_binowner)
1027 AC_SUBST(bimagemgr_bingroup)
1028 AC_SUBST(bimagemgr_dataowner)
1029 AC_SUBST(bimagemgr_datagroup)
1032 # Handle users and groups for each daemon
1035 AC_ARG_WITH(dir_user,
1036 [ --with-dir-user=USER specify user for Director daemon],
1038 if test "x$withval" != "x" ; then
1045 AC_ARG_WITH(dir_group,
1046 [ --with-dir-group=GROUP specify group for Director daemon],
1048 if test "x$withval" != "x" ; then
1055 AC_ARG_WITH(sd_user,
1056 [ --with-sd-user=USER specify user for Storage daemon],
1058 if test "x$withval" != "x" ; then
1065 AC_ARG_WITH(sd_group,
1066 [ --with-sd-group=GROUP specify group for Storage daemon],
1068 if test "x$withval" != "x" ; then
1075 AC_ARG_WITH(fd_user,
1076 [ --with-fd-user=USER specify user for File daemon],
1078 if test "x$withval" != "x" ; then
1085 AC_ARG_WITH(fd_group,
1086 [ --with-fd-group=GROUP specify group for File daemon],
1088 if test "x$withval" != "x" ; then
1105 # allow setting default executable permissions
1108 AC_ARG_WITH(sbin-perm,
1109 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1111 if test "x$withval" != "x" ; then
1119 # ------------------------------------------------
1120 # Bacula check for various SQL database engines
1121 # ------------------------------------------------
1122 BA_CHECK_POSTGRESQL_DB
1133 AC_DEFINE(PROTOTYPES)
1135 dnl# --------------------------------------------------------------------------
1136 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1138 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1139 if test -z "$CCOPTS"; then
1140 CCOPTS='-g -O2 -Wall'
1149 dnl See if we can use 64 bit file addresses
1150 largefile_support="no"
1156 dnl# --------------------------------------------------------------------------
1157 dnl# CHECKING FOR HEADER FILES
1158 dnl# --------------------------------------------------------------------------
1194 AC_STRUCT_ST_BLKSIZE
1198 dnl# --------------------------------------------------------------------------
1199 dnl# Check for utime.h structure
1200 dnl# --------------------------------------------------------------------------
1201 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1203 #include <sys/types.h>
1204 #include <utime.h>], [struct utimbuf foo],
1205 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1206 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1208 dnl# --------------------------------------------------------------------------
1209 dnl# Check for socklen_t
1210 dnl# --------------------------------------------------------------------------
1211 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1213 #include <sys/types.h>
1214 #include <sys/socket.h>],
1216 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1217 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1219 dnl# --------------------------------------------------------------------------
1220 dnl# Check for bigendian
1221 dnl# --------------------------------------------------------------------------
1222 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1224 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1225 [ba_cv_bigendian=yes],
1226 [ba_cv_bigendian=no],
1227 [ba_cv_bigendian=no])])
1228 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1234 dnl# --------------------------------------------------------------------------
1235 dnl# CHECKING FOR FILESYSTEM TYPE
1236 dnl# --------------------------------------------------------------------------
1237 AC_MSG_CHECKING(how to get filesystem type)
1239 # The order of these tests is important.
1240 AC_TRY_CPP([#include <sys/statvfs.h>
1241 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1242 if test $fstype = no; then
1243 AC_TRY_CPP([#include <sys/statfs.h>
1244 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1246 if test $fstype = no; then
1247 AC_TRY_CPP([#include <sys/statfs.h>
1248 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1250 if test $fstype = no; then
1251 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1253 if test $fstype = no; then
1254 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1256 if test $fstype = no; then
1257 AC_TRY_CPP([#include <sys/mount.h>
1258 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1260 AC_MSG_RESULT($fstype)
1262 dnl# --------------------------------------------------------------------------
1263 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1264 dnl# --------------------------------------------------------------------------
1272 AC_CHECK_TYPE(ino_t, unsigned long)
1273 AC_CHECK_TYPE(dev_t, unsigned long)
1274 AC_CHECK_TYPE(daddr_t, long)
1275 AC_CHECK_TYPE(major_t, int)
1276 AC_CHECK_TYPE(minor_t, int)
1277 AC_CHECK_TYPE(ssize_t, int)
1284 AC_CHECK_SIZEOF(char, 1)
1285 AC_CHECK_SIZEOF(short int, 2)
1286 AC_CHECK_SIZEOF(int, 4)
1287 AC_CHECK_SIZEOF(long int, 4)
1288 AC_CHECK_SIZEOF(long long int, 8)
1289 AC_CHECK_SIZEOF(int *, 4)
1291 # Check for sys/types.h types
1292 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1294 [ #include <sys/types.h> ],
1296 [ ac_cv_have_u_int="yes" ],
1297 [ ac_cv_have_u_int="no" ]
1300 if test "x$ac_cv_have_u_int" = "xyes" ; then
1301 AC_DEFINE(HAVE_U_INT)
1305 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1307 [ #include <sys/types.h> ],
1308 [ intmax_t a; a = 1;],
1309 [ ac_cv_have_intmax_t="yes" ],
1312 [ #include <stdint.h> ],
1313 [ intmax_t a; a = 1;],
1314 [ ac_cv_have_intmax_t="yes" ],
1315 [ ac_cv_have_intmax_t="no" ]
1321 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1322 AC_DEFINE(HAVE_INTMAX_T)
1327 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1329 [ #include <sys/types.h> ],
1330 [ u_intmax_t a; a = 1;],
1331 [ ac_cv_have_u_intmax_t="yes" ],
1334 [ #include <stdint.h> ],
1335 [ u_intmax_t a; a = 1;],
1336 [ ac_cv_have_u_intmax_t="yes" ],
1337 [ ac_cv_have_u_intmax_t="no" ]
1342 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1343 AC_DEFINE(HAVE_U_INTMAX_T)
1348 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1350 [ #include <sys/types.h> ],
1351 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1352 [ ac_cv_have_intxx_t="yes" ],
1353 [ ac_cv_have_intxx_t="no" ]
1356 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1357 AC_DEFINE(HAVE_INTXX_T)
1361 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1363 [ #include <sys/types.h> ],
1364 [ int64_t a; a = 1;],
1365 [ ac_cv_have_int64_t="yes" ],
1366 [ ac_cv_have_int64_t="no" ]
1369 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1370 AC_DEFINE(HAVE_INT64_T)
1374 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1376 [ #include <sys/types.h> ],
1377 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1378 [ ac_cv_have_u_intxx_t="yes" ],
1379 [ ac_cv_have_u_intxx_t="no" ]
1382 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1383 AC_DEFINE(HAVE_U_INTXX_T)
1387 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1389 [ #include <sys/types.h> ],
1390 [ u_int64_t a; a = 1;],
1391 [ ac_cv_have_u_int64_t="yes" ],
1392 [ ac_cv_have_u_int64_t="no" ]
1395 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1396 AC_DEFINE(HAVE_U_INT64_T)
1400 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1401 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1403 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1405 [ #include <sys/bitypes.h> ],
1406 [ int8_t a; int16_t b; int32_t c;
1407 u_int8_t e; u_int16_t f; u_int32_t g;
1408 a = b = c = e = f = g = 1; ],
1409 [ AC_DEFINE(HAVE_U_INTXX_T)
1410 AC_DEFINE(HAVE_INTXX_T)
1411 AC_DEFINE(HAVE_SYS_BITYPES_H)
1412 AC_MSG_RESULT(yes) ],
1413 [ AC_MSG_RESULT(no)]
1417 if test -z "$have_u_intxx_t" ; then
1418 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1420 [ #include <sys/types.h> ],
1421 [ uint8_t a; uint16_t b;
1422 uint32_t c; a = b = c = 1; ],
1423 [ ac_cv_have_uintxx_t="yes" ],
1424 [ ac_cv_have_uintxx_t="no" ]
1427 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1428 AC_DEFINE(HAVE_UINTXX_T)
1432 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1433 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1435 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1437 [ #include <sys/bitypes.h> ],
1438 [ int64_t a; u_int64_t b;
1440 [ AC_DEFINE(HAVE_U_INT64_T)
1441 AC_DEFINE(HAVE_INT64_T)
1442 AC_MSG_RESULT(yes) ],
1443 [ AC_MSG_RESULT(no)]
1447 if (test -z "$have_uintxx_t" && \
1448 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1450 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1452 [ #include <sys/bitypes.h> ],
1453 [ uint8_t a; uint16_t b;
1454 uint32_t c; a = b = c = 1; ],
1455 [ AC_DEFINE(HAVE_UINTXX_T)
1456 AC_MSG_RESULT(yes) ],
1457 [ AC_MSG_RESULT(no)]
1465 dnl# --------------------------------------------------------------------------
1466 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1467 dnl# --------------------------------------------------------------------------
1483 [echo 'configure: cannot find needed function.'; exit 1]
1486 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1487 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1489 AC_CHECK_FUNCS(chflags)
1491 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1493 dnl# --------------------------------------------------------------------------
1494 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1495 dnl# --------------------------------------------------------------------------
1496 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1498 # If resolver functions are not in libc check for -lnsl or -lresolv.
1499 AC_CHECK_FUNC(gethostbyname_r,
1500 AC_MSG_RESULT(using libc's resolver),
1501 AC_CHECK_LIB(nsl,gethostbyname_r)
1502 AC_CHECK_LIB(resolv,gethostbyname_r))
1506 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1507 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1508 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1510 dnl ----------------------------
1511 dnl check sa_len of sockaddr
1512 dnl ----------------------------
1513 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1514 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1515 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1517 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1518 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1522 dnl Check for IPv6 support
1523 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1524 [AC_TRY_LINK([ #include <sys/types.h>
1525 #include <sys/socket.h>
1526 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1528 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1530 if test "$ac_cv_ipv6_support" = yes; then
1531 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1540 AC_FUNC_CLOSEDIR_VOID
1541 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1542 # AC_FUNC_FNMATCH dnl use local version
1545 dnl# FreeBSD needs to link libxpg4
1546 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1549 AC_CHECK_LIB(sun, getpwnam)
1551 AC_CHECK_HEADERS(zlib.h)
1552 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1554 if test x$FDLIBS = x-lz; then
1555 AC_DEFINE(HAVE_LIBZ)
1559 AC_CHECK_HEADER(sys/acl.h)
1560 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1562 if test $ac_cv_lib_acl_acl_get_file = yes; then
1567 dnl Check for pthread libraries
1569 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1570 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1571 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1572 [AC_CHECK_FUNC(pthread_create)]
1582 LDFLAGS=${LDFLAGS--O}
1583 DB_LIBS="${SQL_LFLAGS}"
1585 CPPFLAGS="$CPPFLAGS"
1596 AC_SUBST(X_EXTRA_LIBS)
1600 dnl# extra configurable objects
1611 # Finally we set appropriate distribution specific
1612 # variables and defaults
1614 # PFILES are platform specific files
1615 PFILES="platforms/Makefile"
1619 hostname=`uname -n | cut -d '.' -f 1`
1623 PSCMD="ps -e -o pid,comm"
1625 platforms/aix/Makefile"
1626 TAPEDRIVE="/dev/rmt0.1"
1630 PTHREAD_LIB="-lpthread -lexc"
1631 if test "${CC}" = "gcc" ; then
1638 TAPEDRIVE="/dev/nrmt0"
1641 DISTVER=`uname -a |awk '{print $3}'`
1642 TAPEDRIVE="/dev/nrmt0"
1643 PTHREAD_LIB="-pthread"
1644 CFLAGS="${CFLAGS} -pthread"
1645 PSCMD="ps -ax -o pid,command"
1649 platforms/bsdi/Makefile \
1650 platforms/bsdi/bacula-fd \
1651 platforms/bsdi/bacula-sd \
1652 platforms/bsdi/bacula-dir"
1653 largefile_support="yes"
1656 DISTVER=`uname -a |awk '{print $3}'`
1657 TAPEDRIVE="/dev/nrst0"
1660 WLDFLAGS="-mwindows"
1664 TAPEDRIVE="/dev/nst0"
1665 PSCMD="ps -e -o pid,command"
1668 platforms/darwin/Makefile"
1671 DISTVER=`cat /etc/debian_version`
1672 TAPEDRIVE="/dev/nrst0"
1673 PSCMD="ps -e -o pid,command"
1676 DISTVER=`uname -a |awk '{print $3}'`
1677 VER=`echo $DISTVER | cut -c 1`
1678 if test x$VER = x4 ; then
1679 PTHREAD_LIB="-pthread"
1680 CFLAGS="${CFLAGS} -pthread"
1684 TAPEDRIVE="/dev/nrsa0"
1685 PSCMD="ps -ax -o pid,command"
1687 platforms/freebsd/Makefile \
1688 platforms/freebsd/bacula-fd \
1689 platforms/freebsd/bacula-sd \
1690 platforms/freebsd/bacula-dir"
1691 largefile_support="yes"
1694 PSCMD="UNIX95=1 ps -e -o pid,comm"
1695 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1697 TAPEDRIVE="/dev/rmt/0hnb"
1698 PTHREAD_LIB="-lpthread"
1699 AC_DEFINE([_INCLUDE_LONGLONG])
1703 TAPEDRIVE="/dev/rmt/0cbn"
1704 PSCMD="ps -e -o pid,comm"
1706 platforms/irix/Makefile \
1707 platforms/irix/bacula-fd \
1708 platforms/irix/bacula-sd \
1709 platforms/irix/bacula-dir"
1712 DISTVER=`uname -a |awk '{print $3}'`
1715 TAPEDRIVE="/dev/nrst0"
1716 PSCMD="ps -ax -o pid,command"
1717 PTHREAD_LIB="-pthread"
1718 CFLAGS="${CFLAGS} -pthread"
1721 DISTVER=`uname -a |awk '{print $3}'`
1724 TAPEDRIVE="/dev/nrst0"
1725 PSCMD="ps -ax -o pid,command"
1726 PTHREAD_LIB="-pthread"
1727 CFLAGS="${CFLAGS} -pthread"
1729 platforms/openbsd/Makefile \
1730 platforms/openbsd/bacula-fd \
1731 platforms/openbsd/bacula-sd \
1732 platforms/openbsd/bacula-dir"
1735 if test -f /etc/whitebox-release ; then
1736 f=/etc/whitebox-release
1738 f=/etc/redhat-release
1740 if test `cat $f | grep release |\
1741 cut -f 3 -d ' '`x = "Enterprise"x ; then
1742 DISTVER="Enterprise "`cat $f | grep release |\
1745 DISTVER=`cat /etc/redhat-release | grep release |\
1748 TAPEDRIVE="/dev/nst0"
1749 PSCMD="ps -e -o pid,command"
1751 platforms/redhat/Makefile \
1752 platforms/redhat/bacula-fd \
1753 platforms/redhat/bacula-sd \
1754 platforms/redhat/bacula-dir \
1755 platforms/redhat/bacula.spec \
1757 hostname=`hostname -s`
1760 DISTVER=`cat /etc/mandrake-release | grep release |\
1762 TAPEDRIVE="/dev/nst0"
1763 PSCMD="ps -e -o pid,command"
1765 platforms/mandrake/Makefile \
1766 platforms/mandrake/bacula-fd \
1767 platforms/mandrake/bacula-sd \
1768 platforms/mandrake/bacula-dir \
1769 platforms/mandrake/bacula.spec \
1773 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1774 TAPEDRIVE="/dev/nst0"
1775 PSCMD="ps -e -o pid,command"
1777 platforms/gentoo/Makefile \
1778 platforms/gentoo/bacula-init \
1779 platforms/gentoo/bacula-fd \
1780 platforms/gentoo/bacula-sd \
1781 platforms/gentoo/bacula-dir"
1784 DISTVER=`cat /etc/slackware-version`
1785 TAPEDRIVE="/dev/nst0"
1786 PSCMD="ps -e -o pid,command"
1788 platforms/slackware/Makefile \
1789 platforms/slackware/rc.bacula-fd \
1790 platforms/slackware/rc.bacula-sd \
1791 platforms/slackware/rc.bacula-dir\
1792 platforms/slackware/functions.bacula"
1796 TAPEDRIVE="/dev/rmt/0cbn"
1797 PSCMD="ps -e -o pid,comm"
1799 platforms/solaris/Makefile \
1800 platforms/solaris/bacula-fd \
1801 platforms/solaris/bacula-sd \
1802 platforms/solaris/bacula-dir"
1803 if test x$DISTVER = x5.6 ; then
1804 AC_DEFINE(HAVE_OLD_SOCKOPT)
1806 LIBS="$LIBS -lresolv"
1809 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1811 TAPEDRIVE="/dev/nst0"
1812 PSCMD="ps -e -o pid,command"
1814 platforms/suse/Makefile \
1815 platforms/suse/bacula-fd \
1816 platforms/suse/bacula-sd \
1817 platforms/suse/bacula-dir \
1818 platforms/suse/bacula \
1819 platforms/suse/bacula.spec"
1824 TAPEDRIVE="/dev/nst0"
1825 PSCMD="ps -e -o pid,command"
1827 platforms/suse/Makefile \
1828 platforms/suse/bacula-fd \
1829 platforms/suse/bacula-sd \
1830 platforms/suse/bacula-dir"
1834 TAPEDRIVE="/dev/nst0"
1837 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1843 LIBS="$PTHREAD_LIB $LIBS"
1845 AC_DEFINE_UNQUOTED(lld, "$lld")
1846 AC_DEFINE_UNQUOTED(llu, "$llu")
1854 dnl# common parts of the Makefile
1855 MCOMMON=./autoconf/Make.common
1856 AC_SUBST_FILE(MCOMMON)
1859 if test "x${subsysdir}" = "x${sbindir}" ; then
1862 echo "You have set both --sbindir and --with-subsys-dir"
1863 echo " equal to: ${subsysdir} "
1864 echo "This is not permitted. Please reconfigure."
1866 echo "Aborting configuration ..."
1872 AC_OUTPUT([autoconf/Make.common \
1874 scripts/startmysql \
1876 scripts/btraceback \
1882 scripts/devel_bacula \
1885 scripts/bacula.desktop.gnome1 \
1886 scripts/bacula.desktop.gnome2 \
1887 scripts/bacula.desktop.gnome1.consolehelper \
1888 scripts/bacula.desktop.gnome2.consolehelper \
1889 scripts/bacula.desktop.gnome1.xsu \
1890 scripts/bacula.desktop.gnome2.xsu \
1891 scripts/gnome-console.console_apps \
1892 scripts/mtx-changer \
1893 scripts/dvd-writepart \
1894 scripts/dvd-freespace \
1895 scripts/bacula-tray-monitor.desktop \
1896 scripts/logwatch/Makefile \
1897 scripts/logwatch/logfile.bacula.conf \
1900 src/console/Makefile \
1901 src/console/bconsole.conf \
1902 src/gnome-console/Makefile \
1903 src/gnome-console/gnome-console.conf \
1904 src/gnome2-console/Makefile \
1905 src/gnome2-console/gnome-console.conf \
1906 src/wx-console/Makefile \
1907 src/wx-console/wx-console.conf \
1908 src/tray-monitor/Makefile \
1909 src/tray-monitor/tray-monitor.conf \
1911 src/dird/bacula-dir.conf \
1913 src/stored/Makefile \
1914 src/stored/bacula-sd.conf \
1915 src/filed/Makefile \
1916 src/filed/bacula-fd.conf \
1917 src/filed/win32/Makefile \
1919 src/cats/make_catalog_backup \
1920 src/cats/delete_catalog_backup \
1921 src/cats/create_postgresql_database \
1922 src/cats/update_postgresql_tables \
1923 src/cats/make_postgresql_tables \
1924 src/cats/grant_postgresql_privileges \
1925 src/cats/drop_postgresql_tables \
1926 src/cats/drop_postgresql_database \
1927 src/cats/create_mysql_database \
1928 src/cats/update_mysql_tables \
1929 src/cats/make_mysql_tables \
1930 src/cats/grant_mysql_privileges \
1931 src/cats/drop_mysql_tables \
1932 src/cats/drop_mysql_database \
1933 src/cats/create_sqlite_database \
1934 src/cats/update_sqlite_tables \
1935 src/cats/make_sqlite_tables \
1936 src/cats/grant_sqlite_privileges \
1937 src/cats/drop_sqlite_tables \
1938 src/cats/drop_sqlite_database \
1939 src/cats/create_sqlite3_database \
1940 src/cats/update_sqlite3_tables \
1941 src/cats/make_sqlite3_tables \
1942 src/cats/grant_sqlite3_privileges \
1943 src/cats/drop_sqlite3_tables \
1944 src/cats/drop_sqlite3_database \
1947 src/cats/create_bdb_database \
1948 src/cats/update_bdb_tables \
1949 src/cats/make_bdb_tables \
1950 src/cats/grant_bdb_privileges \
1951 src/cats/drop_bdb_tables \
1952 src/cats/drop_bdb_database \
1953 src/cats/create_bacula_database \
1954 src/cats/update_bacula_tables \
1955 src/cats/grant_bacula_privileges \
1956 src/cats/make_bacula_tables \
1957 src/cats/drop_bacula_tables \
1958 src/cats/drop_bacula_database \
1959 src/findlib/Makefile \
1960 src/tools/Makefile \
1961 src/win32/winbacula.nsi \
1962 src/win32/baculafd/bacula-fd.conf \
1963 src/win32/Makefile \
1964 src/win32/console/bconsole.conf \
1965 src/win32/wx-console/wx-console.conf \
1966 src/win32/pebuilder/Makefile \
1967 src/bimagemgr/Makefile \
1968 src/bimagemgr/bacula-bimagemgr.spec \
1970 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
1974 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1975 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
1980 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
1981 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
1983 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
1984 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
1986 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
1987 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
1989 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
1990 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
1992 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
1993 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
1995 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
1999 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2000 largefile_support="yes"
2004 # A whole lot of hand springs to get the compiler version.
2005 # This is because gcc changed the output in version 3.0
2007 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2008 if test "x${CCVERSION}" = "x" ; then
2009 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2011 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2012 if test x"${CXXVERSION}" = x ; then
2013 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2016 if test "x${subsysdir}" = "x${sbindir}" ; then
2019 echo "You have set --sbindir and --with-subsys-dir"
2020 echo " both equal to: ${subsysdir} "
2021 echo " This is not permitted. Please reconfigure."
2023 echo "Aborting configuration ..."
2029 if test "x${db_name}" = "xInternal" ; then
2032 echo "You have not specified either --enable-client-only or one of the"
2033 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
2034 echo " This is not permitted. Please reconfigure."
2036 echo "Aborting the configuration ..."
2043 Configuration on `date`:
2045 Host: $host -- ${DISTNAME} ${DISTVER}
2046 Bacula version: ${VERSION} (${DATE})
2047 Source code location: ${srcdir}
2048 Install binaries: ${sbindir}
2049 Install config files: ${sysconfdir}
2050 Scripts directory: ${scriptdir}
2051 Working directory: ${working_dir}
2052 PID directory: ${piddir}
2053 Subsys directory: ${subsysdir}
2054 C Compiler: ${CC} ${CCVERSION}
2055 C++ Compiler: ${CXX} ${CXXVERSION}
2056 Compiler flags: ${WCFLAGS} ${CFLAGS}
2057 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2059 Statically Linked Tools: ${support_static_tools}
2060 Statically Linked FD: ${support_static_fd}
2061 Statically Linked SD: ${support_static_sd}
2062 Statically Linked DIR: ${support_static_dir}
2063 Statically Linked CONS: ${support_static_cons}
2064 Database type: ${db_name}
2065 Database lib: ${DB_LIBS}
2067 Job Output Email: ${job_email}
2068 Traceback Email: ${dump_email}
2069 SMTP Host Address: ${smtp_host}
2071 Director Port: ${dir_port}
2072 File daemon Port: ${fd_port}
2073 Storage daemon Port: ${sd_port}
2075 Director User: ${dir_user}
2076 Director Group: ${dir_group}
2077 Storage Daemon User: ${sd_user}
2078 Storage DaemonGroup: ${sd_group}
2079 File Daemon User: ${fd_user}
2080 File Daemon Group: ${fd_group}
2082 SQL binaries Directory ${SQL_BINDIR}
2084 Large file support: $largefile_support
2085 Bacula conio support: ${got_conio} ${CONS_LIBS}
2086 readline support: ${got_readline} ${PRTREADLINE_SRC}
2087 TCP Wrappers support: ${TCPW_MSG}
2088 TLS support: ${support_tls}
2089 ZLIB support: ${have_zlib}
2090 enable-smartalloc: ${support_smartalloc}
2091 enable-gnome: ${support_gnome} ${gnome_version}
2092 enable-wx-console: ${support_wx_console} ${wx_version}
2093 enable-tray-monitor: ${support_tray_monitor}
2094 client-only: ${build_client_only}
2095 ACL support: ${have_acl}
2096 Python support: ${support_python} ${PYTHON_LIBS}