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_PATH_PROG(WXCONFIG, wx-config, /opt/gnome/bin/wx-config)
70 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
71 AC_PATH_PROG(PIDOF, pidof, pidof)
73 # Some AWK programs fail, so test it and warn the user
74 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
75 { if ((prog == $2) || (("(" prog ")") == $2) ||
76 (("[" prog "]") == $2) ||
77 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
79 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
80 The regex engine of $AWK is too broken to be used you
81 might want to install GNU AWK.
82 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
85 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
87 test -n "$ARFLAG" || ARFLAGS="cr"
94 AC_SUBST(LOCAL_CFLAGS)
95 AC_SUBST(LOCAL_LDFLAGS)
100 dnl --------------------------------------------------
101 dnl Bacula OP Sys determination (see aclocal.m4)
102 dnl --------------------------------------------------
105 # -----------------------------------------------------------
106 dnl Bacula OPSys Distribution determination (see aclocal.m4)
107 # ----------------------------------------------------------
108 BA_CHECK_OPSYS_DISTNAME
110 # -----------------------------------------------------------
111 dnl Check for gnome stuff for gnome-console
112 # ----------------------------------------------------------
113 AM_ACLOCAL_INCLUDE(gnome-macros)
115 # ------------------------------------------------------------------
116 # If the user has not set --prefix, we set our default to nothing.
117 # In this case, if the user has not set --sysconfdir, we set it
118 # to the package default of /etc/bacula. If either --prefix or
119 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
120 # ------------------------------------------------------------------
121 if test x${prefix} = xNONE ; then
122 if test `eval echo ${sysconfdir}` = NONE/etc ; then
123 sysconfdir=/etc/bacula
127 sysconfdir=`eval echo ${sysconfdir}`
129 # -------------------------------------------------------------------------
130 # If the user has not set --exec-prefix, we default to ${prefix}
131 # -------------------------------------------------------------------------
132 if test x${exec_prefix} = xNONE ; then
133 exec_prefix=${prefix}
136 # ------------------------------------------------------------------
137 # If the user has not set --sbindir, we set our default as /sbin
138 # ------------------------------------------------------------------
139 if test x$sbindir = x'${exec_prefix}/sbin' ; then
140 sbindir=${exec_prefix}/sbin
142 sbindir=`eval echo ${sbindir}`
144 # ------------------------------------------------------------------
145 # All list of languages for which a translation exist. Each
146 # language is separated by a space.
147 # ------------------------------------------------------------------
150 AC_PATH_PROGS(MSGFMT, msgfmt, no)
151 if test "$MSGFMT" = "no"
153 echo 'msgfmt program not found, disabling NLS !'
155 USE_INCLUDED_LIBINTL=no
164 support_postgresql=no
165 support_smartalloc=yes
169 support_wx_console=no
172 support_static_tools=no
175 support_static_dir=no
176 support_static_cons=no
183 dnl# --------------------------------------------------------------------------
184 dnl# CHECKING COMMAND LINE OPTIONS
185 dnl# --------------------------------------------------------------------------
187 # -------------------------------------------
188 # gnome (default off)
189 # -------------------------------------------
191 [ --enable-gnome enable build of gnome-console GUI [disabled]],
192 [if test x$enableval = xyes; then
197 if test x$support_gnome = xyes; then
198 abc=`$PKGCONFIG --exists libgnomeui-2.0`
200 if test $pkg = 0; then
201 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
202 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
203 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
204 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
205 AC_SUBST(GNOME_INCLUDEDIR)
206 AC_SUBST(GNOMEUI_LIBS)
207 AC_SUBST(GNOME_LIBDIR)
209 GNOME_DIR=src/gnome2-console
210 gnome_version="Version 2.x"
214 GNOME_DIR=src/gnome-console
215 gnome_version="Version 1.4"
221 # -------------------------------------------
222 # wx-console (default off)
223 # -------------------------------------------
224 AC_ARG_ENABLE(wx-console,
225 [ --enable-wx-console enable build of wxWidgets console [disabled]],
226 [if test x$enableval = xyes; then
227 support_wx_console=yes
231 if test x$support_wx_console = xyes; then
232 abc=`$WXCONFIG --cppflags`
234 if test $pkg = 0; then
235 WXCONS_CPPFLAGS=`$WXCONFIG --unicode=no --cppflags`
236 WXCONS_LDFLAGS=`$WXCONFIG --unicode=no --libs`
237 AC_SUBST(WXCONS_CPPFLAGS)
238 AC_SUBST(WXCONS_LDFLAGS)
239 WX_DIR=src/wx-console
242 echo "wx-config program not found. wx-console disabled."
244 support_wx_console=no
250 # -------------------------------------------
251 # tray-monitor (default off)
252 # -------------------------------------------
253 AC_ARG_ENABLE(tray-monitor,
254 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
255 [if test x$enableval = xyes; then
256 support_tray_monitor=yes
260 if test x$support_tray_monitor = xyes; then
261 abc=`$PKGCONFIG --exists gtk+-2.0`
263 if test $pkg = 0; then
264 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
265 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
266 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
267 AC_SUBST(TRAY_MONITOR_LDFLAGS)
268 TRAY_MONITOR_DIR=src/tray-monitor
269 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
271 if test $pkg = 0; then
272 AC_DEFINE(HAVE_GTK_2_4)
276 AC_SUBST(TRAY_MONITOR_DIR)
278 # -------------------------------------------
279 # smartalloc (default off)
280 # -------------------------------------------
281 AC_ARG_ENABLE(smartalloc,
282 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
283 [if test x$enableval = xno; then
284 support_smartalloc=no
287 if test x$support_smartalloc = xyes; then
288 AC_DEFINE(SMARTALLOC)
291 # -------------------------------------------
292 # static-tools (default off)
293 # -------------------------------------------
294 AC_ARG_ENABLE(static-tools,
295 [ --enable-static-tools enable static tape tools [disabled]],
296 [if test x$enableval = xyes; then
297 support_static_tools=yes
301 if test x$support_static_tools = xyes; then
302 TTOOL_LDFLAGS="-static"
304 AC_SUBST(TTOOL_LDFLAGS)
306 # -------------------------------------------
307 # static-fd (default off)
308 # -------------------------------------------
309 AC_ARG_ENABLE(static-fd,
310 [ --enable-static-fd enable static File daemon [disabled]],
311 [if test x$enableval = xyes; then
312 support_static_fd=yes
316 if test x$support_static_fd = xyes; then
317 STATIC_FD="static-bacula-fd"
321 # -------------------------------------------
322 # static-sd (default off)
323 # -------------------------------------------
324 AC_ARG_ENABLE(static-sd,
325 [ --enable-static-sd enable static Storage daemon [disabled]],
326 [if test x$enableval = xyes; then
327 support_static_sd=yes
331 if test x$support_static_sd = xyes; then
332 STATIC_SD="static-bacula-sd"
336 # -------------------------------------------
337 # static-dir (default off)
338 # -------------------------------------------
339 AC_ARG_ENABLE(static-dir,
340 [ --enable-static-dir enable static Director [disabled]],
341 [if test x$enableval = xyes; then
342 support_static_dir=yes
346 if test x$support_static_dir = xyes; then
347 STATIC_DIR="static-bacula-dir"
351 # -------------------------------------------
352 # static-cons (default off)
353 # -------------------------------------------
354 AC_ARG_ENABLE(static-cons,
355 [ --enable-static-cons enable static Console [disabled]],
356 [if test x$enableval = xyes; then
357 support_static_cons=yes
363 if test x$support_static_cons = xyes; then
364 STATIC_CONS="static-bconsole"
365 STATIC_GNOME_CONS="static-gnome-console"
366 STATIC_WX_CONS="static-wx-console"
368 AC_SUBST(STATIC_CONS)
369 AC_SUBST(STATIC_GNOME_CONS)
370 AC_SUBST(STATIC_WX_CONS)
372 # -------------------------------------------
373 # client_only (default off)
374 # -------------------------------------------
375 AC_ARG_ENABLE(client-only,
376 [ --enable-client-only build client (File daemon) only [disabled]],
377 [if test x$enableval = xyes; then
378 build_client_only=yes
382 if test x$build_client_only = xno; then
389 # ---------------------------------------------------
390 # Check for conio (Bacula readline substitute)(
391 # ---------------------------------------------------
392 # this allows you to turn it completely off
394 [ --disable-conio disable conio support [enabled]
396 [if test x$enableval = xno; then
401 if test x$support_conio = xyes; then
402 AC_CHECK_HEADER(termcap.h,
403 [ AC_CHECK_LIB(termcap, tgetent,
404 [ CONS_LIBS="-ltermcap"
409 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
411 [ AC_CHECK_LIB(ncurses, tgetent,
412 [ CONS_LIBS="-lncurses"
417 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
422 AC_CHECK_HEADERS(curses.h)
423 AC_CHECK_HEADER(term.h,
424 [ AC_CHECK_LIB(curses, tgetent,
425 [ CONS_LIBS="-lcurses"
430 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
433 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
442 # ---------------------------------------------------
443 # Check for readline support/directory (default off)
444 # ---------------------------------------------------
445 # this allows you to turn it completely off
446 AC_ARG_ENABLE(readline,
447 [ --disable-readline disable readline support [disable]
449 [if test x$enableval = xno; then
455 if test x$support_readline = xyes; then
456 AC_ARG_WITH(readline,
457 [ --with-readline=DIR specify readline library directory],
459 case "$with_readline" in
462 if test "$with_readline" != "yes"; then
463 CONS_INC="-I${with_readline}"
464 CONS_LDFLAGS="-L$with_readline"
466 with_readline="/usr/include/readline"
468 AC_CHECK_HEADER(${with_readline}/readline.h,
469 [ AC_DEFINE(HAVE_READLINE)
470 CONS_LIBS="-lreadline -ltermcap"
474 echo "readline.h not found. readline turned off ..."
481 # check for standard readline library
482 AC_CHECK_HEADER(/usr/include/readline/readline.h,
483 [ AC_DEFINE(HAVE_READLINE)
485 CONS_INC="-I/usr/include/readline"
486 CONS_LIBS="-lreadline -ltermcap"
488 # Did not find standard library, so try Bacula's default
489 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
490 [ AC_DEFINE(HAVE_READLINE)
492 CONS_INC="-I${TOP_DIR}/depkgs/readline"
493 CONS_LIBS="-lreadline -lhistory -ltermcap"
494 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
495 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
498 echo "readline.h not found. readline turned off ..."
514 AC_SUBST(CONS_LDFLAGS)
515 AC_SUBST(READLINE_SRC)
517 # Minimal stuff for readline Makefile configuration
522 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
523 AC_CHECK_FUNCS(nanosleep nl_langinfo)
524 AC_CHECK_HEADERS(varargs.h)
526 # End of readline/conio stuff
527 # -----------------------------------------------------------------------
529 # -----------------------------------------------------------------------
530 # Check for Python support
532 AC_MSG_CHECKING(for Python support)
535 --with-python[=DIR] Include Python support. DIR is the Python base
536 install directory, default is to search through
537 a number of common places for the Python files.],
541 if test "$withval" != "no"; then
542 if test "$withval" = "yes"; then
543 if test -f /usr/include/python2.2/Python.h; then
544 PYTHON_INCDIR=-I/usr/include/python2.2
545 PYTHON_LIBS="-L/usr/lib/python2.2/config -lpython2.2 -lutil -ldl"
546 elif test -f /usr/include/python2.3/Python.h; then
547 PYTHON_INCDIR=-I/usr/include/python2.3
548 PYTHON_LIBS="-L/usr/lib/python2.3/config -lpython2.3 -lutil -ldl"
549 elif test -f /usr/include/python2.4/Python.h; then
550 PYTHON_INCDIR=-I/usr/include/python2.4
551 PYTHON_LIBS="-L/usr/lib/python2.4/config -lpython2.4 -lutil -ldl"
552 elif test -f $prefix/include/Python.h; then
553 PYTHON_INCDIR=-I$prefix/include
554 PYTHON_LIBS="-L$prefix/lib/config -lpython -lutil -ldl"
557 AC_MSG_ERROR(Unable to find Python.h in standard locations)
560 if test -f $withval/Python.h; then
561 PYTHON_INCDIR=-I$withval
562 PYTHON_LIBS="-L$withval/config -lpython -lutil -ldl"
563 elif test -f $withval/include/Python.h; then
564 PYTHON_INCDIR=-I$withval/include
565 PYTHON_LIBS="-L$withval/lib/config -lpython -lutil -ldl"
568 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
571 AC_DEFINE([HAVE_PYTHON], 1)
581 AC_SUBST(PYTHON_LIBS)
582 AC_SUBST(PYTHON_INCDIR)
586 # Find where sockets are (especially for Solaris)
587 # Do this before the TCP Wrappers test since tcp wrappers
588 # uses the socket library and some linkers are stupid.
590 AC_CHECK_FUNC(socket,
591 AC_MSG_RESULT(using libc's socket),
592 AC_CHECK_LIB(xnet,socket)
593 AC_CHECK_LIB(socket,socket)
594 AC_CHECK_LIB(inet,socket))
597 # -----------------------------------------------------------
598 # Check whether user wants TCP wrappers support (default off)
599 # -----------------------------------------------------------
601 AC_ARG_WITH(tcp-wrappers,
602 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
604 if test "x$withval" != "xno" ; then
606 LIBS="$saved_LIBS -lwrap"
607 AC_MSG_CHECKING(for libwrap)
610 int deny_severity = 0;
611 int allow_severity = 0;
612 struct request_info *req; ],
613 [ hosts_access(req); ],
616 AC_DEFINE(HAVE_LIBWRAP)
619 LIBS="$saved_LIBS -lwrap -lnsl"
622 int deny_severity = 0;
623 int allow_severity = 0;
624 struct request_info *req; ],
625 [ hosts_access(req); ],
628 AC_DEFINE(HAVE_LIBWRAP)
631 [AC_MSG_ERROR([*** libwrap missing]) ] ]
638 # -----------------------------------------------------------
639 # Check whether OpenSSL is available
640 # -----------------------------------------------------------
641 AC_MSG_CHECKING([for OpenSSL])
642 dnl The following uses quadrigraphs:
646 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
647 [with_openssl_directory=${withval}])
649 if test "x$with_openssl_directory" != "xno"; then
650 OPENSSL_LIBS="-lssl -lcrypto"
653 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
654 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
655 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
659 saved_CFLAGS="$CFLAGS"
660 LIBS="$saved_LIBS $OPENSSL_LIBS"
661 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
663 AC_TRY_LINK([ #include <openssl/ssl.h> ],
664 [ CRYPTO_set_id_callback(NULL); ],
665 [ support_tls="yes" ],
670 CFLAGS="$saved_CFLAGS"
672 if test "$support_tls" = "yes"; then
673 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
674 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
682 AC_MSG_RESULT([$support_tls])
683 AC_SUBST(OPENSSL_LIBS)
684 AC_SUBST(OPENSSL_INC)
688 # ------------------------------------------
689 # Where to place working dir
690 # ------------------------------------------
691 working_dir=`eval echo ${prefix}/var/bacula/working`
692 AC_ARG_WITH(working-dir,
693 [ --with-working-dir=PATH specify path of Bacula working directory],
695 if test "x$withval" != "xno" ; then
701 AC_SUBST(working_dir)
704 # ------------------------------------------
705 # Where to place scriptdir (script files)
706 # ------------------------------------------
707 scriptdir=`eval echo ${sysconfdir}`
708 AC_ARG_WITH(scriptdir,
709 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
711 if test "x$withval" != "xno" ; then
720 # ------------------------------------------
721 # Where to send dump email
722 # ------------------------------------------
723 dump_email=root@localhost
724 AC_ARG_WITH(dump-email,
725 [ --with-dump-email=EMAIL dump email address],
727 if test "x$withval" != "xno" ; then
735 # ------------------------------------------
736 # Where to send job email
737 # ------------------------------------------
738 job_email=root@localhost
739 AC_ARG_WITH(job-email,
740 [ --with-job-email=EMAIL job output email address],
742 if test "x$withval" != "xno" ; then
750 # ------------------------------------------
751 # Where to find smtp host
752 # ------------------------------------------
754 AC_ARG_WITH(smtp_host,
755 [ --with-smtp-host=HOST SMTP mail host address],
757 if test "x$withval" != "xno" ; then
766 # ------------------------------------
767 # Where to place pid files
768 # ------------------------------------
771 [ --with-pid-dir=PATH specify location of Bacula pid files],
773 if test "x$withval" != "xno" ; then
779 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
783 # ------------------------------------
784 # Where to place subsys "lock file"
785 # ------------------------------------
786 subsysdir=/var/run/subsys
787 AC_ARG_WITH(subsys-dir,
788 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
790 if test "x$withval" != "xno" ; then
800 # ------------------------------------
801 # Where to start assigning ports
802 # ------------------------------------
804 AC_ARG_WITH(baseport,
805 [ --with-baseport=PORT specify base port address for daemons],
807 if test "x$withval" != "xno" ; then
814 dir_port=`expr $baseport`
815 fd_port=`expr $baseport + 1`
816 sd_port=`expr $fd_port + 1`
823 # ------------------------------------------
825 # ------------------------------------------
827 AC_ARG_WITH(dir-password,
828 [ --with-dir-password=PASSWORD specify Director's password],
830 if test "x$withval" != "xno" ; then
831 dir_password=$withval
836 if test "x$dir_password" = "x" ; then
837 if test "x$OPENSSL" = "xnone" ; then
838 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
839 key=`autoconf/randpass 33`
841 key=`openssl rand -base64 33`
847 AC_ARG_WITH(fd-password,
848 [ --with-fd-password=PASSWORD specify Client's password],
850 if test "x$withval" != "xno" ; then
856 if test "x$fd_password" = "x" ; then
857 if test "x$OPENSSL" = "xnone" ; then
858 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
859 key=`autoconf/randpass 37`
861 key=`openssl rand -base64 33`
867 AC_ARG_WITH(sd-password,
868 [ --with-sd-password=PASSWORD specify Storage daemon's password],
870 if test "x$withval" != "xno" ; then
876 if test "x$sd_password" = "x" ; then
877 if test "x$OPENSSL" = "xnone" ; then
878 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
879 key=`autoconf/randpass 41`
881 key=`openssl rand -base64 33`
887 AC_ARG_WITH(mon-dir-password,
888 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
890 if test "x$withval" != "xno" ; then
891 mon_dir_password=$withval
896 if test "x$mon_dir_password" = "x" ; then
897 if test "x$OPENSSL" = "xnone" ; then
898 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
899 key=`autoconf/randpass 33`
901 key=`openssl rand -base64 33`
903 mon_dir_password=$key
907 AC_ARG_WITH(mon-fd-password,
908 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
910 if test "x$withval" != "xno" ; then
911 mon_fd_password=$withval
916 if test "x$mon_fd_password" = "x" ; then
917 if test "x$OPENSSL" = "xnone" ; then
918 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
919 key=`autoconf/randpass 37`
921 key=`openssl rand -base64 33`
927 AC_ARG_WITH(mon-sd-password,
928 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
930 if test "x$withval" != "xno" ; then
931 mon_sd_password=$withval
936 if test "x$mon_sd_password" = "x" ; then
937 if test "x$OPENSSL" = "xnone" ; then
938 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
939 key=`autoconf/randpass 41`
941 key=`openssl rand -base64 33`
946 AC_SUBST(dir_password)
947 AC_SUBST(fd_password)
948 AC_SUBST(sd_password)
949 AC_SUBST(mon_dir_password)
950 AC_SUBST(mon_fd_password)
951 AC_SUBST(mon_sd_password)
953 # -------------------------------------------------------------------------
954 # Set variables for bimagemgr installation
955 # -------------------------------------------------------------------------
956 bimagemgr_cgidir=/var/www/cgi-bin
957 AC_ARG_WITH(bimagemgr-cgidir,
958 [ --with-bimagemgr-cgidir=DIR specify bimagemgr cgi-bin dir],
960 if test "x$withval" != "xno" ; then
961 bimagemgr_cgidir=$withval
966 bimagemgr_docdir=/var/www/html
967 AC_ARG_WITH(bimagemgr-docdir,
968 [ --with-bimagemgr-docdir=DIR specify bimagemgr doc root dir],
970 if test "x$withval" != "xno" ; then
971 bimagemgr_docdir=$withval
976 bimagemgr_binowner=root
977 AC_ARG_WITH(bimagemgr-binowner,
978 [ --with-bimagemgr-binowner=USER specify bimagemgr binary file owner],
980 if test "x$withval" != "xno" ; then
981 bimagemgr_binowner=$withval
986 bimagemgr_bingroup=root
987 AC_ARG_WITH(bimagemgr-bingroup,
988 [ --with-bimagemgr-bingroup=USER specify bimagemgr binary file group],
990 if test "x$withval" != "xno" ; then
991 bimagemgr_bingroup=$withval
996 bimagemgr_dataowner=apache
997 AC_ARG_WITH(bimagemgr-dataowner,
998 [ --with-bimagemgr-dataowner=USER specify bimagemgr data file owner],
1000 if test "x$withval" != "xno" ; then
1001 bimagemgr_dataowner=$withval
1006 bimagemgr_datagroup=apache
1007 AC_ARG_WITH(bimagemgr-datagroup,
1008 [ --with-bimagemgr-datagroup=USER specify bimagemgr data file group],
1010 if test "x$withval" != "xno" ; then
1011 bimagemgr_datagroup=$withval
1016 AC_SUBST(bimagemgr_cgidir)
1017 AC_SUBST(bimagemgr_docdir)
1018 AC_SUBST(bimagemgr_binowner)
1019 AC_SUBST(bimagemgr_bingroup)
1020 AC_SUBST(bimagemgr_dataowner)
1021 AC_SUBST(bimagemgr_datagroup)
1024 # Handle users and groups for each daemon
1027 AC_ARG_WITH(dir_user,
1028 [ --with-dir-user=USER specify user for Director daemon],
1030 if test "x$withval" != "x" ; then
1037 AC_ARG_WITH(dir_group,
1038 [ --with-dir-group=GROUP specify group for Director daemon],
1040 if test "x$withval" != "x" ; then
1047 AC_ARG_WITH(sd_user,
1048 [ --with-sd-user=USER specify user for Storage daemon],
1050 if test "x$withval" != "x" ; then
1057 AC_ARG_WITH(sd_group,
1058 [ --with-sd-group=GROUP specify group for Storage daemon],
1060 if test "x$withval" != "x" ; then
1067 AC_ARG_WITH(fd_user,
1068 [ --with-fd-user=USER specify user for File daemon],
1070 if test "x$withval" != "x" ; then
1077 AC_ARG_WITH(fd_group,
1078 [ --with-fd-group=GROUP specify group for File daemon],
1080 if test "x$withval" != "x" ; then
1097 # allow setting default executable permissions
1100 AC_ARG_WITH(sbin-perm,
1101 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1103 if test "x$withval" != "x" ; then
1111 # ------------------------------------------------
1112 # Bacula check for various SQL database engines
1113 # ------------------------------------------------
1114 BA_CHECK_POSTGRESQL_DB
1125 AC_DEFINE(PROTOTYPES)
1127 dnl# --------------------------------------------------------------------------
1128 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1130 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1131 if test -z "$CCOPTS"; then
1132 CCOPTS='-g -O2 -Wall'
1141 dnl See if we can use 64 bit file addresses
1142 largefile_support="no"
1148 dnl# --------------------------------------------------------------------------
1149 dnl# CHECKING FOR HEADER FILES
1150 dnl# --------------------------------------------------------------------------
1186 AC_STRUCT_ST_BLKSIZE
1190 dnl# --------------------------------------------------------------------------
1191 dnl# Check for utime.h structure
1192 dnl# --------------------------------------------------------------------------
1193 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1195 #include <sys/types.h>
1196 #include <utime.h>], [struct utimbuf foo],
1197 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1198 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1200 dnl# --------------------------------------------------------------------------
1201 dnl# Check for socklen_t
1202 dnl# --------------------------------------------------------------------------
1203 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1205 #include <sys/types.h>
1206 #include <sys/socket.h>],
1208 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1209 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1211 dnl# --------------------------------------------------------------------------
1212 dnl# Check for bigendian
1213 dnl# --------------------------------------------------------------------------
1214 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1216 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1217 [ba_cv_bigendian=yes],
1218 [ba_cv_bigendian=no],
1219 [ba_cv_bigendian=no])])
1220 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1226 dnl# --------------------------------------------------------------------------
1227 dnl# CHECKING FOR FILESYSTEM TYPE
1228 dnl# --------------------------------------------------------------------------
1229 AC_MSG_CHECKING(how to get filesystem type)
1231 # The order of these tests is important.
1232 AC_TRY_CPP([#include <sys/statvfs.h>
1233 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1234 if test $fstype = no; then
1235 AC_TRY_CPP([#include <sys/statfs.h>
1236 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1238 if test $fstype = no; then
1239 AC_TRY_CPP([#include <sys/statfs.h>
1240 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1242 if test $fstype = no; then
1243 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1245 if test $fstype = no; then
1246 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1248 if test $fstype = no; then
1249 AC_TRY_CPP([#include <sys/mount.h>
1250 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1252 AC_MSG_RESULT($fstype)
1254 dnl# --------------------------------------------------------------------------
1255 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1256 dnl# --------------------------------------------------------------------------
1264 AC_CHECK_TYPE(ino_t, unsigned long)
1265 AC_CHECK_TYPE(dev_t, unsigned long)
1266 AC_CHECK_TYPE(daddr_t, long)
1267 AC_CHECK_TYPE(major_t, int)
1268 AC_CHECK_TYPE(minor_t, int)
1269 AC_CHECK_TYPE(ssize_t, int)
1276 AC_CHECK_SIZEOF(char, 1)
1277 AC_CHECK_SIZEOF(short int, 2)
1278 AC_CHECK_SIZEOF(int, 4)
1279 AC_CHECK_SIZEOF(long int, 4)
1280 AC_CHECK_SIZEOF(long long int, 8)
1281 AC_CHECK_SIZEOF(int *, 4)
1283 # Check for sys/types.h types
1284 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1286 [ #include <sys/types.h> ],
1288 [ ac_cv_have_u_int="yes" ],
1289 [ ac_cv_have_u_int="no" ]
1292 if test "x$ac_cv_have_u_int" = "xyes" ; then
1293 AC_DEFINE(HAVE_U_INT)
1297 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1299 [ #include <sys/types.h> ],
1300 [ intmax_t a; a = 1;],
1301 [ ac_cv_have_intmax_t="yes" ],
1304 [ #include <stdint.h> ],
1305 [ intmax_t a; a = 1;],
1306 [ ac_cv_have_intmax_t="yes" ],
1307 [ ac_cv_have_intmax_t="no" ]
1313 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1314 AC_DEFINE(HAVE_INTMAX_T)
1319 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1321 [ #include <sys/types.h> ],
1322 [ u_intmax_t a; a = 1;],
1323 [ ac_cv_have_u_intmax_t="yes" ],
1326 [ #include <stdint.h> ],
1327 [ u_intmax_t a; a = 1;],
1328 [ ac_cv_have_u_intmax_t="yes" ],
1329 [ ac_cv_have_u_intmax_t="no" ]
1334 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1335 AC_DEFINE(HAVE_U_INTMAX_T)
1340 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1342 [ #include <sys/types.h> ],
1343 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1344 [ ac_cv_have_intxx_t="yes" ],
1345 [ ac_cv_have_intxx_t="no" ]
1348 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1349 AC_DEFINE(HAVE_INTXX_T)
1353 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1355 [ #include <sys/types.h> ],
1356 [ int64_t a; a = 1;],
1357 [ ac_cv_have_int64_t="yes" ],
1358 [ ac_cv_have_int64_t="no" ]
1361 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1362 AC_DEFINE(HAVE_INT64_T)
1366 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1368 [ #include <sys/types.h> ],
1369 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1370 [ ac_cv_have_u_intxx_t="yes" ],
1371 [ ac_cv_have_u_intxx_t="no" ]
1374 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1375 AC_DEFINE(HAVE_U_INTXX_T)
1379 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1381 [ #include <sys/types.h> ],
1382 [ u_int64_t a; a = 1;],
1383 [ ac_cv_have_u_int64_t="yes" ],
1384 [ ac_cv_have_u_int64_t="no" ]
1387 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1388 AC_DEFINE(HAVE_U_INT64_T)
1392 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1393 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1395 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1397 [ #include <sys/bitypes.h> ],
1398 [ int8_t a; int16_t b; int32_t c;
1399 u_int8_t e; u_int16_t f; u_int32_t g;
1400 a = b = c = e = f = g = 1; ],
1401 [ AC_DEFINE(HAVE_U_INTXX_T)
1402 AC_DEFINE(HAVE_INTXX_T)
1403 AC_DEFINE(HAVE_SYS_BITYPES_H)
1404 AC_MSG_RESULT(yes) ],
1405 [ AC_MSG_RESULT(no)]
1409 if test -z "$have_u_intxx_t" ; then
1410 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1412 [ #include <sys/types.h> ],
1413 [ uint8_t a; uint16_t b;
1414 uint32_t c; a = b = c = 1; ],
1415 [ ac_cv_have_uintxx_t="yes" ],
1416 [ ac_cv_have_uintxx_t="no" ]
1419 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1420 AC_DEFINE(HAVE_UINTXX_T)
1424 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1425 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1427 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1429 [ #include <sys/bitypes.h> ],
1430 [ int64_t a; u_int64_t b;
1432 [ AC_DEFINE(HAVE_U_INT64_T)
1433 AC_DEFINE(HAVE_INT64_T)
1434 AC_MSG_RESULT(yes) ],
1435 [ AC_MSG_RESULT(no)]
1439 if (test -z "$have_uintxx_t" && \
1440 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1442 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1444 [ #include <sys/bitypes.h> ],
1445 [ uint8_t a; uint16_t b;
1446 uint32_t c; a = b = c = 1; ],
1447 [ AC_DEFINE(HAVE_UINTXX_T)
1448 AC_MSG_RESULT(yes) ],
1449 [ AC_MSG_RESULT(no)]
1457 dnl# --------------------------------------------------------------------------
1458 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1459 dnl# --------------------------------------------------------------------------
1475 [echo 'configure: cannot find needed function.'; exit 1]
1478 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1479 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1481 AC_CHECK_FUNCS(chflags)
1483 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1485 dnl# --------------------------------------------------------------------------
1486 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1487 dnl# --------------------------------------------------------------------------
1488 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1490 # If resolver functions are not in libc check for -lnsl or -lresolv.
1491 AC_CHECK_FUNC(gethostbyname_r,
1492 AC_MSG_RESULT(using libc's resolver),
1493 AC_CHECK_LIB(nsl,gethostbyname_r)
1494 AC_CHECK_LIB(resolv,gethostbyname_r))
1498 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1499 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1500 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1502 dnl ----------------------------
1503 dnl check sa_len of sockaddr
1504 dnl ----------------------------
1505 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1506 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1507 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1509 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1510 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1514 dnl Check for IPv6 support
1515 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1516 [AC_TRY_LINK([ #include <sys/types.h>
1517 #include <sys/socket.h>
1518 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1520 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1522 if test "$ac_cv_ipv6_support" = yes; then
1523 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1532 AC_FUNC_CLOSEDIR_VOID
1533 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1534 # AC_FUNC_FNMATCH dnl use local version
1537 dnl# FreeBSD needs to link libxpg4
1538 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1541 AC_CHECK_LIB(sun, getpwnam)
1543 AC_CHECK_HEADERS(zlib.h)
1544 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1546 if test x$FDLIBS = x-lz; then
1547 AC_DEFINE(HAVE_LIBZ)
1551 AC_CHECK_HEADER(sys/acl.h)
1552 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1554 if test $ac_cv_lib_acl_acl_get_file = yes; then
1559 dnl Check for pthread libraries
1561 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1562 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1563 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1564 [AC_CHECK_FUNC(pthread_create)]
1574 LDFLAGS=${LDFLAGS--O}
1575 DB_LIBS="${SQL_LFLAGS}"
1577 CPPFLAGS="$CPPFLAGS"
1588 AC_SUBST(X_EXTRA_LIBS)
1592 dnl# extra configurable objects
1603 # Finally we set appropriate distribution specific
1604 # variables and defaults
1606 # PFILES are platform specific files
1607 PFILES="platforms/Makefile"
1611 hostname=`uname -n | cut -d '.' -f 1`
1615 PSCMD="ps -e -o pid,comm"
1617 platforms/aix/Makefile"
1618 TAPEDRIVE="/dev/rmt0.1"
1622 PTHREAD_LIB="-lpthread -lexc"
1623 if test "${CC}" = "gcc" ; then
1630 TAPEDRIVE="/dev/nrmt0"
1633 DISTVER=`uname -a |awk '{print $3}'`
1634 TAPEDRIVE="/dev/nrmt0"
1635 PTHREAD_LIB="-pthread"
1636 CFLAGS="${CFLAGS} -pthread"
1637 PSCMD="ps -x -o pid,command"
1641 platforms/bsdi/Makefile \
1642 platforms/bsdi/bacula-fd \
1643 platforms/bsdi/bacula-sd \
1644 platforms/bsdi/bacula-dir"
1645 largefile_support="yes"
1648 DISTVER=`uname -a |awk '{print $3}'`
1649 TAPEDRIVE="/dev/nrst0"
1652 WLDFLAGS="-mwindows"
1656 TAPEDRIVE="/dev/nst0"
1657 PSCMD="ps -e -o pid,command"
1660 platforms/darwin/Makefile"
1663 DISTVER=`cat /etc/debian_version`
1664 TAPEDRIVE="/dev/nrst0"
1665 PSCMD="ps -e -o pid,command"
1668 DISTVER=`uname -a |awk '{print $3}'`
1669 VER=`echo $DISTVER | cut -c 1`
1670 if test x$VER = x4 ; then
1671 PTHREAD_LIB="-pthread"
1672 CFLAGS="${CFLAGS} -pthread"
1676 TAPEDRIVE="/dev/nrsa0"
1677 PSCMD="ps -x -o pid,command"
1679 platforms/freebsd/Makefile \
1680 platforms/freebsd/bacula-fd \
1681 platforms/freebsd/bacula-sd \
1682 platforms/freebsd/bacula-dir"
1683 largefile_support="yes"
1686 PSCMD="UNIX95=1 ps -e -o pid,comm"
1687 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1689 TAPEDRIVE="/dev/rmt/0hnb"
1690 PTHREAD_LIB="-lpthread"
1691 AC_DEFINE([_INCLUDE_LONGLONG])
1695 TAPEDRIVE="/dev/rmt/0cbn"
1696 PSCMD="ps -e -o pid,comm"
1698 platforms/irix/Makefile \
1699 platforms/irix/bacula-fd \
1700 platforms/irix/bacula-sd \
1701 platforms/irix/bacula-dir"
1704 DISTVER=`uname -a |awk '{print $3}'`
1707 TAPEDRIVE="/dev/nrst0"
1708 PSCMD="ps -a -o pid,command"
1709 PTHREAD_LIB="-pthread"
1710 CFLAGS="${CFLAGS} -pthread"
1713 DISTVER=`uname -a |awk '{print $3}'`
1716 TAPEDRIVE="/dev/nrst0"
1717 PSCMD="ps -ax -o pid,command"
1718 PTHREAD_LIB="-pthread"
1719 CFLAGS="${CFLAGS} -pthread"
1721 platforms/openbsd/Makefile \
1722 platforms/openbsd/bacula-fd \
1723 platforms/openbsd/bacula-sd \
1724 platforms/openbsd/bacula-dir"
1727 if test -f /etc/whitebox-release ; then
1728 f=/etc/whitebox-release
1730 f=/etc/redhat-release
1732 if test `cat $f | grep release |\
1733 cut -f 3 -d ' '`x = "Enterprise"x ; then
1734 DISTVER="Enterprise "`cat $f | grep release |\
1737 DISTVER=`cat /etc/redhat-release | grep release |\
1740 TAPEDRIVE="/dev/nst0"
1741 PSCMD="ps -e -o pid,command"
1743 platforms/redhat/Makefile \
1744 platforms/redhat/bacula-fd \
1745 platforms/redhat/bacula-sd \
1746 platforms/redhat/bacula-dir \
1747 platforms/redhat/bacula.spec \
1749 hostname=`hostname -s`
1752 DISTVER=`cat /etc/mandrake-release | grep release |\
1754 TAPEDRIVE="/dev/nst0"
1755 PSCMD="ps -e -o pid,command"
1757 platforms/mandrake/Makefile \
1758 platforms/mandrake/bacula-fd \
1759 platforms/mandrake/bacula-sd \
1760 platforms/mandrake/bacula-dir \
1761 platforms/mandrake/bacula.spec \
1765 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1766 TAPEDRIVE="/dev/nst0"
1767 PSCMD="ps -e -o pid,command"
1769 platforms/gentoo/Makefile \
1770 platforms/gentoo/bacula-init \
1771 platforms/gentoo/bacula-fd \
1772 platforms/gentoo/bacula-sd \
1773 platforms/gentoo/bacula-dir"
1776 DISTVER=`cat /etc/slackware-version`
1777 TAPEDRIVE="/dev/nst0"
1778 PSCMD="ps -e -o pid,command"
1780 platforms/slackware/Makefile \
1781 platforms/slackware/rc.bacula-fd \
1782 platforms/slackware/rc.bacula-sd \
1783 platforms/slackware/rc.bacula-dir\
1784 platforms/slackware/functions.bacula"
1788 TAPEDRIVE="/dev/rmt/0cbn"
1789 PSCMD="ps -e -o pid,comm"
1791 platforms/solaris/Makefile \
1792 platforms/solaris/bacula-fd \
1793 platforms/solaris/bacula-sd \
1794 platforms/solaris/bacula-dir"
1795 if test x$DISTVER = x5.6 ; then
1796 AC_DEFINE(HAVE_OLD_SOCKOPT)
1798 LIBS="$LIBS -lresolv"
1801 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1803 TAPEDRIVE="/dev/nst0"
1804 PSCMD="ps -e -o pid,command"
1806 platforms/suse/Makefile \
1807 platforms/suse/bacula-fd \
1808 platforms/suse/bacula-sd \
1809 platforms/suse/bacula-dir \
1810 platforms/suse/bacula \
1811 platforms/suse/bacula.spec"
1816 TAPEDRIVE="/dev/nst0"
1817 PSCMD="ps -e -o pid,command"
1819 platforms/suse/Makefile \
1820 platforms/suse/bacula-fd \
1821 platforms/suse/bacula-sd \
1822 platforms/suse/bacula-dir"
1826 TAPEDRIVE="/dev/nst0"
1829 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1835 LIBS="$PTHREAD_LIB $LIBS"
1837 AC_DEFINE_UNQUOTED(lld, "$lld")
1838 AC_DEFINE_UNQUOTED(llu, "$llu")
1846 dnl# common parts of the Makefile
1847 MCOMMON=./autoconf/Make.common
1848 AC_SUBST_FILE(MCOMMON)
1851 if test "x${subsysdir}" = "x${sbindir}" ; then
1854 echo "You have set both --sbindir and --with-subsys-dir"
1855 echo " equal to: ${subsysdir} "
1856 echo "This is not permitted. Please reconfigure."
1858 echo "Aborting configuration ..."
1864 AC_OUTPUT([autoconf/Make.common \
1866 scripts/startmysql \
1868 scripts/btraceback \
1874 scripts/devel_bacula \
1877 scripts/bacula.desktop.gnome1 \
1878 scripts/bacula.desktop.gnome2 \
1879 scripts/bacula.desktop.gnome1.consolehelper \
1880 scripts/bacula.desktop.gnome2.consolehelper \
1881 scripts/bacula.desktop.gnome1.xsu \
1882 scripts/bacula.desktop.gnome2.xsu \
1883 scripts/gnome-console.console_apps \
1884 scripts/mtx-changer \
1885 scripts/dvd-writepart \
1886 scripts/dvd-freespace \
1887 scripts/bacula-tray-monitor.desktop \
1888 scripts/logwatch/Makefile \
1889 scripts/logwatch/logfile.bacula.conf \
1893 src/console/Makefile \
1894 src/console/bconsole.conf \
1895 src/gnome-console/Makefile \
1896 src/gnome-console/gnome-console.conf \
1897 src/gnome2-console/Makefile \
1898 src/gnome2-console/gnome-console.conf \
1899 src/wx-console/Makefile \
1900 src/wx-console/wx-console.conf \
1901 src/tray-monitor/Makefile \
1902 src/tray-monitor/tray-monitor.conf \
1904 src/dird/bacula-dir.conf \
1906 src/stored/Makefile \
1907 src/stored/bacula-sd.conf \
1908 src/filed/Makefile \
1909 src/filed/bacula-fd.conf \
1910 src/filed/win32/Makefile \
1912 src/cats/make_catalog_backup \
1913 src/cats/delete_catalog_backup \
1914 src/cats/create_postgresql_database \
1915 src/cats/update_postgresql_tables \
1916 src/cats/make_postgresql_tables \
1917 src/cats/grant_postgresql_privileges \
1918 src/cats/drop_postgresql_tables \
1919 src/cats/drop_postgresql_database \
1920 src/cats/create_mysql_database \
1921 src/cats/update_mysql_tables \
1922 src/cats/make_mysql_tables \
1923 src/cats/grant_mysql_privileges \
1924 src/cats/drop_mysql_tables \
1925 src/cats/drop_mysql_database \
1926 src/cats/create_sqlite_database \
1927 src/cats/update_sqlite_tables \
1928 src/cats/make_sqlite_tables \
1929 src/cats/grant_sqlite_privileges \
1930 src/cats/drop_sqlite_tables \
1931 src/cats/drop_sqlite_database \
1932 src/cats/create_sqlite3_database \
1933 src/cats/update_sqlite3_tables \
1934 src/cats/make_sqlite3_tables \
1935 src/cats/grant_sqlite3_privileges \
1936 src/cats/drop_sqlite3_tables \
1937 src/cats/drop_sqlite3_database \
1940 src/cats/create_bdb_database \
1941 src/cats/update_bdb_tables \
1942 src/cats/make_bdb_tables \
1943 src/cats/grant_bdb_privileges \
1944 src/cats/drop_bdb_tables \
1945 src/cats/drop_bdb_database \
1946 src/cats/create_bacula_database \
1947 src/cats/update_bacula_tables \
1948 src/cats/grant_bacula_privileges \
1949 src/cats/make_bacula_tables \
1950 src/cats/drop_bacula_tables \
1951 src/cats/drop_bacula_database \
1952 src/findlib/Makefile \
1953 src/tools/Makefile \
1954 src/win32/winbacula.nsi \
1955 src/win32/baculafd/bacula-fd.conf \
1956 src/win32/Makefile \
1957 src/win32/console/bconsole.conf \
1958 src/win32/wx-console/wx-console.conf \
1959 src/win32/pebuilder/Makefile \
1960 src/bimagemgr/Makefile \
1961 src/bimagemgr/bacula-bimagemgr.spec \
1963 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
1967 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1968 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
1973 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
1974 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
1976 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
1977 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
1979 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
1980 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
1982 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
1983 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
1985 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
1986 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
1988 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
1992 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
1993 largefile_support="yes"
1997 # A whole lot of hand springs to get the compiler version.
1998 # This is because gcc changed the output in version 3.0
2000 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2001 if test "x${CCVERSION}" = "x" ; then
2002 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2004 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2005 if test x"${CXXVERSION}" = x ; then
2006 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2009 if test "x${subsysdir}" = "x${sbindir}" ; then
2012 echo "You have set --sbindir and --with-subsys-dir"
2013 echo " both equal to: ${subsysdir} "
2014 echo " This is not permitted. Please reconfigure."
2016 echo "Aborting configuration ..."
2022 if test "x${db_name}" = "xInternal" ; then
2025 echo "You have not specified either --enable-client-only or one of the"
2026 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
2027 echo " This is not permitted. Please reconfigure."
2029 echo "Aborting the configuration ..."
2036 Configuration on `date`:
2038 Host: $host -- ${DISTNAME} ${DISTVER}
2039 Bacula version: ${VERSION} (${DATE})
2040 Source code location: ${srcdir}
2041 Install binaries: ${sbindir}
2042 Install config files: ${sysconfdir}
2043 Scripts directory: ${scriptdir}
2044 Working directory: ${working_dir}
2045 PID directory: ${piddir}
2046 Subsys directory: ${subsysdir}
2047 C Compiler: ${CC} ${CCVERSION}
2048 C++ Compiler: ${CXX} ${CXXVERSION}
2049 Compiler flags: ${WCFLAGS} ${CFLAGS}
2050 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2052 Statically Linked Tools: ${support_static_tools}
2053 Statically Linked FD: ${support_static_fd}
2054 Statically Linked SD: ${support_static_sd}
2055 Statically Linked DIR: ${support_static_dir}
2056 Statically Linked CONS: ${support_static_cons}
2057 Database type: ${db_name}
2058 Database lib: ${DB_LIBS}
2060 Job Output Email: ${job_email}
2061 Traceback Email: ${dump_email}
2062 SMTP Host Address: ${smtp_host}
2064 Director Port: ${dir_port}
2065 File daemon Port: ${fd_port}
2066 Storage daemon Port: ${sd_port}
2068 Director User: ${dir_user}
2069 Director Group: ${dir_group}
2070 Storage Daemon User: ${sd_user}
2071 Storage DaemonGroup: ${sd_group}
2072 File Daemon User: ${fd_user}
2073 File Daemon Group: ${fd_group}
2075 SQL binaries Directory ${SQL_BINDIR}
2077 Large file support: $largefile_support
2078 Bacula conio support: ${got_conio} ${CONS_LIBS}
2079 readline support: ${got_readline} ${PRTREADLINE_SRC}
2080 TCP Wrappers support: ${TCPW_MSG}
2081 TLS support: ${support_tls}
2082 ZLIB support: ${have_zlib}
2083 enable-smartalloc: ${support_smartalloc}
2084 enable-gnome: ${support_gnome} ${gnome_version}
2085 enable-wx-console: ${support_wx_console}
2086 enable-tray-monitor: ${support_tray_monitor}
2087 client-only: ${build_client_only}
2088 ACL support: ${have_acl}
2089 Python support: ${support_python} ${PYTHON_LIBS}