3 dnl# Process this file with autoconf to produce a configure script.
11 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
12 AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
14 dnl require a recent autoconf
18 dnl search for true and false programs.
19 AC_PATH_PROGS(TRUEPRG, true, :)
20 AC_PATH_PROGS(FALSEPRG, false, :)
25 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
26 DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
27 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
31 echo "configuring for bacula $VERSION ($DATE)"
34 dnl -------------------------------------------------------
35 dnl# Check for compiler.
36 dnl ------------------------------------------------------
40 AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
41 AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
43 if test "x$CC" = xgcc; then
46 AC_PATH_PROG(CXX, $CXX, $CXX)
47 if test ! -e $CXX; then
48 AC_MSG_ERROR(Unable to find C++ compiler)
51 dnl -------------------------------------------------------
52 dnl# Check for programs.
53 dnl ------------------------------------------------------
56 AC_PATH_PROG(MV, mv, mv)
57 AC_PATH_PROG(RM, rm, rm)
58 AC_PATH_PROG(CP, cp, cp)
59 AC_PATH_PROG(SED, sed, sed)
60 AC_PATH_PROG(ECHO, echo, echo)
61 AC_PATH_PROG(CMP, cmp, cmp)
62 AC_PATH_PROG(TBL, tbl, tbl)
63 AC_PATH_PROG(AR, ar, ar)
64 dnl AC_PATH_PROG(RANLIB, ranlib, ranlib)
65 AC_PATH_PROG(OPENSSL, openssl, none)
66 AC_PATH_PROG(MTX, mtx, mtx)
67 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
68 AC_PATH_PROG(PYTHON, python, python)
69 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
70 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
71 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
72 AC_ARG_VAR(WXCONFIG, [wx-config command. On some systems, you must set it to wx-config-2.6 to use wxWidgets 2.6.])
73 if test "x$WXCONFIG" = x; then
76 AC_PATH_PROG(WXCONFIG, ${WXCONFIG}, ${WXCONFIG})
77 AC_ARG_VAR(WXFLAGS, [Parameters to pass to wx-config (e.g. --unicode=no).])
78 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
79 AC_PATH_PROG(PIDOF, pidof, pidof)
81 # Some AWK programs fail, so test it and warn the user
82 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
83 { if ((prog == $2) || (("(" prog ")") == $2) ||
84 (("[" prog "]") == $2) ||
85 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
87 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
88 The regex engine of $AWK is too broken to be used you
89 might want to install GNU AWK.
90 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
93 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
95 test -n "$ARFLAG" || ARFLAGS="cr"
102 AC_SUBST(LOCAL_CFLAGS)
103 AC_SUBST(LOCAL_LDFLAGS)
108 dnl --------------------------------------------------
109 dnl Bacula OP Sys determination (see aclocal.m4)
110 dnl --------------------------------------------------
113 # -----------------------------------------------------------
114 dnl Bacula OPSys Distribution determination (see aclocal.m4)
115 # ----------------------------------------------------------
116 BA_CHECK_OPSYS_DISTNAME
118 # -----------------------------------------------------------
119 dnl Check for gnome stuff for gnome-console
120 # ----------------------------------------------------------
121 AM_ACLOCAL_INCLUDE(gnome-macros)
123 # ------------------------------------------------------------------
124 # If the user has not set --prefix, we set our default to nothing.
125 # In this case, if the user has not set --sysconfdir, we set it
126 # to the package default of /etc/bacula. If either --prefix or
127 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
128 # ------------------------------------------------------------------
129 if test x${prefix} = xNONE ; then
130 if test `eval echo ${sysconfdir}` = NONE/etc ; then
131 sysconfdir=/etc/bacula
135 sysconfdir=`eval echo ${sysconfdir}`
137 # -------------------------------------------------------------------------
138 # If the user has not set --exec-prefix, we default to ${prefix}
139 # -------------------------------------------------------------------------
140 if test x${exec_prefix} = xNONE ; then
141 exec_prefix=${prefix}
144 # ------------------------------------------------------------------
145 # If the user has not set --sbindir, we set our default as /sbin
146 # ------------------------------------------------------------------
147 if test x$sbindir = x'${exec_prefix}/sbin' ; then
148 sbindir=${exec_prefix}/sbin
150 sbindir=`eval echo ${sbindir}`
152 # -------------------------------------------------------------------------
153 # If the user has not set --mandir, we default to /usr/share/man
154 # -------------------------------------------------------------------------
155 if test x$mandir = x'${prefix}/man' ; then
156 mandir=/usr/share/man
160 # ------------------------------------------------------------------
161 # All list of languages for which a translation exist. Each
162 # language is separated by a space.
163 # ------------------------------------------------------------------
166 AC_PATH_PROGS(MSGFMT, msgfmt, no)
167 if test "$MSGFMT" = "no"
169 echo 'msgfmt program not found, disabling NLS !'
171 USE_INCLUDED_LIBINTL=no
180 support_postgresql=no
181 support_smartalloc=yes
185 support_wx_console=no
189 support_static_tools=no
192 support_static_dir=no
193 support_static_cons=no
200 dnl# --------------------------------------------------------------------------
201 dnl# CHECKING COMMAND LINE OPTIONS
202 dnl# --------------------------------------------------------------------------
204 # -------------------------------------------
205 # gnome (default off)
206 # -------------------------------------------
208 [ --enable-gnome enable build of gnome-console GUI [disabled]],
209 [if test x$enableval = xyes; then
214 if test x$support_gnome = xyes; then
215 abc=`$PKGCONFIG --exists libgnomeui-2.0`
217 if test $pkg = 0; then
218 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
219 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
220 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
221 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
222 AC_SUBST(GNOME_INCLUDEDIR)
223 AC_SUBST(GNOMEUI_LIBS)
224 AC_SUBST(GNOME_LIBDIR)
226 GNOME_DIR=src/gnome2-console
227 gnome_version="Version 2.x"
229 AC_MSG_ERROR(Unable to find Gnome 2 installation)
235 # -------------------------------------------
236 # wx-console (default off)
237 # -------------------------------------------
238 AC_ARG_ENABLE(wx-console,
239 [ --enable-wx-console enable build of wxWidgets console [disabled]],
240 [if test x$enableval = xyes; then
241 support_wx_console=yes
245 if test x$support_wx_console = xyes; then
246 abc=`$WXCONFIG $WXFLAGS --cppflags`
248 if test $pkg = 0; then
249 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
250 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
251 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
253 AC_SUBST(WXCONS_CPPFLAGS)
254 AC_SUBST(WXCONS_LDFLAGS)
255 WX_DIR=src/wx-console
258 echo "wx-config program not found. wx-console disabled."
260 support_wx_console=no
266 # -------------------------------------------
267 # tray-monitor (default off)
268 # -------------------------------------------
269 AC_ARG_ENABLE(tray-monitor,
270 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
271 [if test x$enableval = xyes; then
272 support_tray_monitor=yes
276 if test x$support_tray_monitor = xyes; then
277 abc=`$PKGCONFIG --exists gtk+-2.0`
279 if test $pkg = 0; then
280 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
281 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
282 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
283 AC_SUBST(TRAY_MONITOR_LDFLAGS)
284 TRAY_MONITOR_DIR=src/tray-monitor
285 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
287 if test $pkg = 0; then
288 AC_DEFINE(HAVE_GTK_2_4)
292 AC_SUBST(TRAY_MONITOR_DIR)
294 # -------------------------------------------
295 # smartalloc (default off)
296 # -------------------------------------------
297 AC_ARG_ENABLE(smartalloc,
298 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
299 [if test x$enableval = xno; then
300 support_smartalloc=no
303 if test x$support_smartalloc = xyes; then
304 AC_DEFINE(SMARTALLOC)
307 # -------------------------------------------
308 # static-tools (default off)
309 # -------------------------------------------
310 AC_ARG_ENABLE(static-tools,
311 [ --enable-static-tools enable static tape tools [disabled]],
312 [if test x$enableval = xyes; then
313 support_static_tools=yes
317 if test x$support_static_tools = xyes; then
318 TTOOL_LDFLAGS="-static"
320 AC_SUBST(TTOOL_LDFLAGS)
322 # -------------------------------------------
323 # static-fd (default off)
324 # -------------------------------------------
325 AC_ARG_ENABLE(static-fd,
326 [ --enable-static-fd enable static File daemon [disabled]],
327 [if test x$enableval = xyes; then
328 support_static_fd=yes
332 if test x$support_static_fd = xyes; then
333 STATIC_FD="static-bacula-fd"
337 # -------------------------------------------
338 # static-sd (default off)
339 # -------------------------------------------
340 AC_ARG_ENABLE(static-sd,
341 [ --enable-static-sd enable static Storage daemon [disabled]],
342 [if test x$enableval = xyes; then
343 support_static_sd=yes
347 if test x$support_static_sd = xyes; then
348 STATIC_SD="static-bacula-sd"
352 # -------------------------------------------
353 # static-dir (default off)
354 # -------------------------------------------
355 AC_ARG_ENABLE(static-dir,
356 [ --enable-static-dir enable static Director [disabled]],
357 [if test x$enableval = xyes; then
358 support_static_dir=yes
362 if test x$support_static_dir = xyes; then
363 STATIC_DIR="static-bacula-dir"
367 # -------------------------------------------
368 # static-cons (default off)
369 # -------------------------------------------
370 AC_ARG_ENABLE(static-cons,
371 [ --enable-static-cons enable static Console [disabled]],
372 [if test x$enableval = xyes; then
373 support_static_cons=yes
379 if test x$support_static_cons = xyes; then
380 STATIC_CONS="static-bconsole"
381 STATIC_GNOME_CONS="static-gnome-console"
382 STATIC_WX_CONS="static-wx-console"
384 AC_SUBST(STATIC_CONS)
385 AC_SUBST(STATIC_GNOME_CONS)
386 AC_SUBST(STATIC_WX_CONS)
388 # -------------------------------------------
389 # client_only (default off)
390 # -------------------------------------------
391 AC_ARG_ENABLE(client-only,
392 [ --enable-client-only build client (File daemon) only [disabled]],
393 [if test x$enableval = xyes; then
394 build_client_only=yes
398 if test x$build_client_only = xno; then
405 # ---------------------------------------------------
406 # Check for conio (Bacula readline substitute)(
407 # ---------------------------------------------------
408 # this allows you to turn it completely off
410 [ --disable-conio disable conio support [enabled]
412 [if test x$enableval = xno; then
417 if test x$support_conio = xyes; then
418 AC_CHECK_HEADER(termcap.h,
419 [ AC_CHECK_LIB(termcap, tgetent,
420 [ CONS_LIBS="-ltermcap"
425 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
427 [ AC_CHECK_LIB(ncurses, tgetent,
428 [ CONS_LIBS="-lncurses"
433 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
438 AC_CHECK_HEADERS(curses.h)
439 AC_CHECK_HEADER(term.h,
440 [ AC_CHECK_LIB(curses, tgetent,
441 [ CONS_LIBS="-lcurses"
446 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
449 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
458 # ---------------------------------------------------
459 # Check for readline support/directory (default off)
460 # ---------------------------------------------------
461 # this allows you to turn it completely off
462 AC_ARG_ENABLE(readline,
463 [ --disable-readline disable readline support [disable]
465 [if test x$enableval = xno; then
471 if test x$support_readline = xyes; then
472 AC_ARG_WITH(readline,
473 [ --with-readline=DIR specify readline library directory],
475 case "$with_readline" in
478 if test "$with_readline" != "yes"; then
479 CONS_INC="-I${with_readline}"
480 CONS_LDFLAGS="-L$with_readline"
482 with_readline="/usr/include/readline"
484 AC_CHECK_HEADER(${with_readline}/readline.h,
485 [ AC_DEFINE(HAVE_READLINE)
486 CONS_LIBS="-lreadline -ltermcap"
490 echo "readline.h not found. readline turned off ..."
497 # check for standard readline library
498 AC_CHECK_HEADER(/usr/include/readline/readline.h,
499 [ AC_DEFINE(HAVE_READLINE)
501 CONS_INC="-I/usr/include/readline"
502 CONS_LIBS="-lreadline -ltermcap"
504 # Did not find standard library, so try Bacula's default
505 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
506 [ AC_DEFINE(HAVE_READLINE)
508 CONS_INC="-I${TOP_DIR}/depkgs/readline"
509 CONS_LIBS="-lreadline -lhistory -ltermcap"
510 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
511 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
514 echo "readline.h not found. readline turned off ..."
530 AC_SUBST(CONS_LDFLAGS)
531 AC_SUBST(READLINE_SRC)
533 # Minimal stuff for readline Makefile configuration
538 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
539 AC_CHECK_FUNCS(nanosleep nl_langinfo)
540 AC_CHECK_HEADERS(varargs.h)
542 # End of readline/conio stuff
543 # -----------------------------------------------------------------------
545 # -----------------------------------------------------------------------
546 # Check for Python support
548 AC_MSG_CHECKING(for Python support)
551 --with-python[=DIR] Include Python support. DIR is the Python base
552 install directory, default is to search through
553 a number of common places for the Python files.],
557 if test "$withval" != "no"; then
558 if test "$withval" = "yes"; then
559 if test -f /usr/include/python2.2/Python.h; then
560 PYTHON_INCDIR=-I/usr/include/python2.2
561 PYTHON_LIBS="-L/usr/lib/python2.2/config -lpython2.2 -lutil -ldl"
562 elif test -f /usr/include/python2.3/Python.h; then
563 PYTHON_INCDIR=-I/usr/include/python2.3
564 PYTHON_LIBS="-L/usr/lib/python2.3/config -lpython2.3 -lutil -ldl"
565 elif test -f /usr/include/python2.4/Python.h; then
566 PYTHON_INCDIR=-I/usr/include/python2.4
567 PYTHON_LIBS="-L/usr/lib/python2.4/config -lpython2.4 -lutil -ldl"
568 elif test -f $prefix/include/Python.h; then
569 PYTHON_INCDIR=-I$prefix/include
570 PYTHON_LIBS="-L$prefix/lib/config -lpython -lutil -ldl"
573 AC_MSG_ERROR(Unable to find Python.h in standard locations)
576 if test -f $withval/Python.h; then
577 PYTHON_INCDIR=-I$withval
578 PYTHON_LIBS="-L$withval/config -lpython -lutil -ldl"
579 elif test -f $withval/include/Python.h; then
580 PYTHON_INCDIR=-I$withval/include
581 PYTHON_LIBS="-L$withval/lib/config -lpython -lutil -ldl"
584 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
587 AC_DEFINE([HAVE_PYTHON], 1)
597 AC_SUBST(PYTHON_LIBS)
598 AC_SUBST(PYTHON_INCDIR)
602 # Find where sockets are (especially for Solaris)
603 # Do this before the TCP Wrappers test since tcp wrappers
604 # uses the socket library and some linkers are stupid.
606 AC_CHECK_FUNC(socket,
607 AC_MSG_RESULT(using libc's socket),
608 AC_CHECK_LIB(xnet,socket)
609 AC_CHECK_LIB(socket,socket)
610 AC_CHECK_LIB(inet,socket))
613 # -----------------------------------------------------------
614 # Check whether user wants TCP wrappers support (default off)
615 # -----------------------------------------------------------
617 AC_ARG_WITH(tcp-wrappers,
618 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
620 if test "x$withval" != "xno" ; then
622 LIBS="$saved_LIBS -lwrap"
623 AC_MSG_CHECKING(for libwrap)
626 int deny_severity = 0;
627 int allow_severity = 0;
628 struct request_info *req; ],
629 [ hosts_access(req); ],
632 AC_DEFINE(HAVE_LIBWRAP)
635 LIBS="$saved_LIBS -lwrap -lnsl"
638 int deny_severity = 0;
639 int allow_severity = 0;
640 struct request_info *req; ],
641 [ hosts_access(req); ],
644 AC_DEFINE(HAVE_LIBWRAP)
647 [AC_MSG_ERROR([*** libwrap missing]) ] ]
654 # -----------------------------------------------------------
655 # Check whether OpenSSL is available
656 # -----------------------------------------------------------
657 AC_MSG_CHECKING([for OpenSSL])
658 dnl The following uses quadrigraphs:
662 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
663 [with_openssl_directory=${withval}])
665 if test "x$with_openssl_directory" != "x"; then
666 OPENSSL_LIBS="-lssl -lcrypto"
669 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
670 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
671 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
675 saved_CFLAGS="$CFLAGS"
676 LIBS="$saved_LIBS $OPENSSL_LIBS"
677 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
679 AC_TRY_LINK([ #include <openssl/ssl.h> ],
680 [ CRYPTO_set_id_callback(NULL); ],
681 [ support_tls="yes" ],
686 CFLAGS="$saved_CFLAGS"
688 if test "$support_tls" = "yes"; then
689 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
690 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
698 AC_MSG_RESULT([$support_tls])
699 AC_SUBST(OPENSSL_LIBS)
700 AC_SUBST(OPENSSL_INC)
704 # ------------------------------------------
705 # Where to place working dir
706 # ------------------------------------------
707 working_dir=`eval echo ${prefix}/var/bacula/working`
708 AC_ARG_WITH(working-dir,
709 [ --with-working-dir=PATH specify path of Bacula working directory],
711 if test "x$withval" != "xno" ; then
717 AC_SUBST(working_dir)
720 # ------------------------------------------
721 # Where to place scriptdir (script files)
722 # ------------------------------------------
723 scriptdir=`eval echo ${sysconfdir}`
724 AC_ARG_WITH(scriptdir,
725 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
727 if test "x$withval" != "xno" ; then
736 # ------------------------------------------
737 # Where to send dump email
738 # ------------------------------------------
739 dump_email=root@localhost
740 AC_ARG_WITH(dump-email,
741 [ --with-dump-email=EMAIL dump email address],
743 if test "x$withval" != "xno" ; then
751 # ------------------------------------------
752 # Where to send job email
753 # ------------------------------------------
754 job_email=root@localhost
755 AC_ARG_WITH(job-email,
756 [ --with-job-email=EMAIL job output email address],
758 if test "x$withval" != "xno" ; then
766 # ------------------------------------------
767 # Where to find smtp host
768 # ------------------------------------------
770 AC_ARG_WITH(smtp_host,
771 [ --with-smtp-host=HOST SMTP mail host address],
773 if test "x$withval" != "xno" ; then
782 # ------------------------------------
783 # Where to place pid files
784 # ------------------------------------
787 [ --with-pid-dir=PATH specify location of Bacula pid files],
789 if test "x$withval" != "xno" ; then
795 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
799 # ------------------------------------
800 # Where to place subsys "lock file"
801 # ------------------------------------
802 subsysdir=/var/run/subsys
803 AC_ARG_WITH(subsys-dir,
804 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
806 if test "x$withval" != "xno" ; then
816 # ------------------------------------
817 # Where to start assigning ports
818 # ------------------------------------
820 AC_ARG_WITH(baseport,
821 [ --with-baseport=PORT specify base port address for daemons],
823 if test "x$withval" != "xno" ; then
830 dir_port=`expr $baseport`
831 fd_port=`expr $baseport + 1`
832 sd_port=`expr $fd_port + 1`
839 # ------------------------------------------
841 # ------------------------------------------
843 AC_ARG_WITH(dir-password,
844 [ --with-dir-password=PASSWORD specify Director's password],
846 if test "x$withval" != "xno" ; then
847 dir_password=$withval
852 if test "x$dir_password" = "x" ; then
853 if test "x$OPENSSL" = "xnone" ; then
854 key=`autoconf/randpass 33`
856 key=`openssl rand -base64 33`
862 AC_ARG_WITH(fd-password,
863 [ --with-fd-password=PASSWORD specify Client's password],
865 if test "x$withval" != "xno" ; then
871 if test "x$fd_password" = "x" ; then
872 if test "x$OPENSSL" = "xnone" ; then
873 key=`autoconf/randpass 37`
875 key=`openssl rand -base64 33`
881 AC_ARG_WITH(sd-password,
882 [ --with-sd-password=PASSWORD specify Storage daemon's password],
884 if test "x$withval" != "xno" ; then
890 if test "x$sd_password" = "x" ; then
891 if test "x$OPENSSL" = "xnone" ; then
892 key=`autoconf/randpass 41`
894 key=`openssl rand -base64 33`
900 AC_ARG_WITH(mon-dir-password,
901 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
903 if test "x$withval" != "xno" ; then
904 mon_dir_password=$withval
909 if test "x$mon_dir_password" = "x" ; then
910 if test "x$OPENSSL" = "xnone" ; then
911 key=`autoconf/randpass 33`
913 key=`openssl rand -base64 33`
915 mon_dir_password=$key
919 AC_ARG_WITH(mon-fd-password,
920 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
922 if test "x$withval" != "xno" ; then
923 mon_fd_password=$withval
928 if test "x$mon_fd_password" = "x" ; then
929 if test "x$OPENSSL" = "xnone" ; then
930 key=`autoconf/randpass 37`
932 key=`openssl rand -base64 33`
938 AC_ARG_WITH(mon-sd-password,
939 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
941 if test "x$withval" != "xno" ; then
942 mon_sd_password=$withval
947 if test "x$mon_sd_password" = "x" ; then
948 if test "x$OPENSSL" = "xnone" ; then
949 key=`autoconf/randpass 41`
951 key=`openssl rand -base64 33`
956 AC_SUBST(dir_password)
957 AC_SUBST(fd_password)
958 AC_SUBST(sd_password)
959 AC_SUBST(mon_dir_password)
960 AC_SUBST(mon_fd_password)
961 AC_SUBST(mon_sd_password)
965 # Handle users and groups for each daemon
968 AC_ARG_WITH(dir_user,
969 [ --with-dir-user=USER specify user for Director daemon],
971 if test "x$withval" != "x" ; then
978 AC_ARG_WITH(dir_group,
979 [ --with-dir-group=GROUP specify group for Director daemon],
981 if test "x$withval" != "x" ; then
989 [ --with-sd-user=USER specify user for Storage daemon],
991 if test "x$withval" != "x" ; then
998 AC_ARG_WITH(sd_group,
999 [ --with-sd-group=GROUP specify group for Storage daemon],
1001 if test "x$withval" != "x" ; then
1008 AC_ARG_WITH(fd_user,
1009 [ --with-fd-user=USER specify user for File daemon],
1011 if test "x$withval" != "x" ; then
1018 AC_ARG_WITH(fd_group,
1019 [ --with-fd-group=GROUP specify group for File daemon],
1021 if test "x$withval" != "x" ; then
1038 # allow setting default executable permissions
1041 AC_ARG_WITH(sbin-perm,
1042 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1044 if test "x$withval" != "x" ; then
1052 # ------------------------------------------------
1053 # Bacula check for various SQL database engines
1054 # ------------------------------------------------
1055 BA_CHECK_POSTGRESQL_DB
1066 AC_DEFINE(PROTOTYPES)
1068 dnl# --------------------------------------------------------------------------
1069 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1071 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1072 if test -z "$CCOPTS"; then
1073 CCOPTS='-g -O2 -Wall'
1082 dnl See if we can use 64 bit file addresses
1083 largefile_support="no"
1089 dnl# --------------------------------------------------------------------------
1090 dnl# CHECKING FOR HEADER FILES
1091 dnl# --------------------------------------------------------------------------
1127 AC_STRUCT_ST_BLKSIZE
1131 dnl# --------------------------------------------------------------------------
1132 dnl# Check for utime.h structure
1133 dnl# --------------------------------------------------------------------------
1134 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1136 #include <sys/types.h>
1137 #include <utime.h>], [struct utimbuf foo],
1138 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1139 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1141 dnl# --------------------------------------------------------------------------
1142 dnl# Check for socklen_t
1143 dnl# --------------------------------------------------------------------------
1144 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1146 #include <sys/types.h>
1147 #include <sys/socket.h>],
1149 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1150 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1152 dnl# --------------------------------------------------------------------------
1153 dnl# Check for bigendian
1154 dnl# --------------------------------------------------------------------------
1155 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1157 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1158 [ba_cv_bigendian=yes],
1159 [ba_cv_bigendian=no],
1160 [ba_cv_bigendian=no])])
1161 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1167 dnl# --------------------------------------------------------------------------
1168 dnl# CHECKING FOR FILESYSTEM TYPE
1169 dnl# --------------------------------------------------------------------------
1170 AC_MSG_CHECKING(how to get filesystem type)
1172 # The order of these tests is important.
1173 AC_TRY_CPP([#include <sys/statvfs.h>
1174 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1175 if test $fstype = no; then
1176 AC_TRY_CPP([#include <sys/statfs.h>
1177 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1179 if test $fstype = no; then
1180 AC_TRY_CPP([#include <sys/statfs.h>
1181 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1183 if test $fstype = no; then
1184 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1186 if test $fstype = no; then
1187 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1189 if test $fstype = no; then
1190 AC_TRY_CPP([#include <sys/mount.h>
1191 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1193 AC_MSG_RESULT($fstype)
1195 dnl# --------------------------------------------------------------------------
1196 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1197 dnl# --------------------------------------------------------------------------
1205 AC_CHECK_TYPE(ino_t, unsigned long)
1206 AC_CHECK_TYPE(dev_t, unsigned long)
1207 AC_CHECK_TYPE(daddr_t, long)
1208 AC_CHECK_TYPE(major_t, int)
1209 AC_CHECK_TYPE(minor_t, int)
1210 AC_CHECK_TYPE(ssize_t, int)
1217 AC_CHECK_SIZEOF(char, 1)
1218 AC_CHECK_SIZEOF(short int, 2)
1219 AC_CHECK_SIZEOF(int, 4)
1220 AC_CHECK_SIZEOF(long int, 4)
1221 AC_CHECK_SIZEOF(long long int, 8)
1222 AC_CHECK_SIZEOF(int *, 4)
1224 # Check for sys/types.h types
1225 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1227 [ #include <sys/types.h> ],
1229 [ ac_cv_have_u_int="yes" ],
1230 [ ac_cv_have_u_int="no" ]
1233 if test "x$ac_cv_have_u_int" = "xyes" ; then
1234 AC_DEFINE(HAVE_U_INT)
1238 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1240 [ #include <sys/types.h> ],
1241 [ intmax_t a; a = 1;],
1242 [ ac_cv_have_intmax_t="yes" ],
1245 [ #include <stdint.h> ],
1246 [ intmax_t a; a = 1;],
1247 [ ac_cv_have_intmax_t="yes" ],
1248 [ ac_cv_have_intmax_t="no" ]
1254 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1255 AC_DEFINE(HAVE_INTMAX_T)
1260 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1262 [ #include <sys/types.h> ],
1263 [ u_intmax_t a; a = 1;],
1264 [ ac_cv_have_u_intmax_t="yes" ],
1267 [ #include <stdint.h> ],
1268 [ u_intmax_t a; a = 1;],
1269 [ ac_cv_have_u_intmax_t="yes" ],
1270 [ ac_cv_have_u_intmax_t="no" ]
1275 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1276 AC_DEFINE(HAVE_U_INTMAX_T)
1281 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1283 [ #include <sys/types.h> ],
1284 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1285 [ ac_cv_have_intxx_t="yes" ],
1286 [ ac_cv_have_intxx_t="no" ]
1289 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1290 AC_DEFINE(HAVE_INTXX_T)
1294 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1296 [ #include <sys/types.h> ],
1297 [ int64_t a; a = 1;],
1298 [ ac_cv_have_int64_t="yes" ],
1299 [ ac_cv_have_int64_t="no" ]
1302 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1303 AC_DEFINE(HAVE_INT64_T)
1307 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1309 [ #include <sys/types.h> ],
1310 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1311 [ ac_cv_have_u_intxx_t="yes" ],
1312 [ ac_cv_have_u_intxx_t="no" ]
1315 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1316 AC_DEFINE(HAVE_U_INTXX_T)
1320 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1322 [ #include <sys/types.h> ],
1323 [ u_int64_t a; a = 1;],
1324 [ ac_cv_have_u_int64_t="yes" ],
1325 [ ac_cv_have_u_int64_t="no" ]
1328 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1329 AC_DEFINE(HAVE_U_INT64_T)
1333 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1334 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1336 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1338 [ #include <sys/bitypes.h> ],
1339 [ int8_t a; int16_t b; int32_t c;
1340 u_int8_t e; u_int16_t f; u_int32_t g;
1341 a = b = c = e = f = g = 1; ],
1342 [ AC_DEFINE(HAVE_U_INTXX_T)
1343 AC_DEFINE(HAVE_INTXX_T)
1344 AC_DEFINE(HAVE_SYS_BITYPES_H)
1345 AC_MSG_RESULT(yes) ],
1346 [ AC_MSG_RESULT(no)]
1350 if test -z "$have_u_intxx_t" ; then
1351 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1353 [ #include <sys/types.h> ],
1354 [ uint8_t a; uint16_t b;
1355 uint32_t c; a = b = c = 1; ],
1356 [ ac_cv_have_uintxx_t="yes" ],
1357 [ ac_cv_have_uintxx_t="no" ]
1360 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1361 AC_DEFINE(HAVE_UINTXX_T)
1365 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1366 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1368 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1370 [ #include <sys/bitypes.h> ],
1371 [ int64_t a; u_int64_t b;
1373 [ AC_DEFINE(HAVE_U_INT64_T)
1374 AC_DEFINE(HAVE_INT64_T)
1375 AC_MSG_RESULT(yes) ],
1376 [ AC_MSG_RESULT(no)]
1380 if (test -z "$have_uintxx_t" && \
1381 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1383 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1385 [ #include <sys/bitypes.h> ],
1386 [ uint8_t a; uint16_t b;
1387 uint32_t c; a = b = c = 1; ],
1388 [ AC_DEFINE(HAVE_UINTXX_T)
1389 AC_MSG_RESULT(yes) ],
1390 [ AC_MSG_RESULT(no)]
1398 dnl# --------------------------------------------------------------------------
1399 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1400 dnl# --------------------------------------------------------------------------
1416 [echo 'configure: cannot find needed function.'; exit 1]
1419 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1420 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1422 AC_CHECK_FUNCS(chflags)
1424 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1426 dnl# --------------------------------------------------------------------------
1427 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1428 dnl# --------------------------------------------------------------------------
1429 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1431 # If resolver functions are not in libc check for -lnsl or -lresolv.
1432 AC_CHECK_FUNC(gethostbyname_r,
1433 AC_MSG_RESULT(using libc's resolver),
1434 AC_CHECK_LIB(nsl,gethostbyname_r)
1435 AC_CHECK_LIB(resolv,gethostbyname_r))
1439 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1440 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1441 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1443 dnl ----------------------------
1444 dnl check sa_len of sockaddr
1445 dnl ----------------------------
1446 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1447 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1448 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1450 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1451 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1455 dnl Check for IPv6 support
1456 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1457 [AC_TRY_LINK([ #include <sys/types.h>
1458 #include <sys/socket.h>
1459 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1461 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1463 if test "$ac_cv_ipv6_support" = yes; then
1464 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1473 AC_FUNC_CLOSEDIR_VOID
1474 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1475 # AC_FUNC_FNMATCH dnl use local version
1478 dnl# FreeBSD needs to link libxpg4
1479 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1482 AC_CHECK_LIB(sun, getpwnam)
1484 AC_CHECK_HEADERS(zlib.h)
1485 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1487 if test x$FDLIBS = x-lz; then
1488 AC_DEFINE(HAVE_LIBZ)
1492 AC_CHECK_HEADER(sys/acl.h)
1493 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1495 if test $ac_cv_lib_acl_acl_get_file = yes; then
1500 dnl Check for pthread libraries
1502 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1503 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1504 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1505 [AC_CHECK_FUNC(pthread_create)]
1515 LDFLAGS=${LDFLAGS--O}
1516 DB_LIBS="${SQL_LFLAGS}"
1518 CPPFLAGS="$CPPFLAGS"
1529 AC_SUBST(X_EXTRA_LIBS)
1533 dnl# extra configurable objects
1544 # Finally we set appropriate distribution specific
1545 # variables and defaults
1547 # PFILES are platform specific files
1548 PFILES="platforms/Makefile"
1552 hostname=`uname -n | cut -d '.' -f 1`
1556 PSCMD="ps -e -o pid,comm"
1558 platforms/aix/Makefile"
1559 TAPEDRIVE="/dev/rmt0.1"
1563 PTHREAD_LIB="-lpthread -lexc"
1564 if test "${CC}" = "gcc" ; then
1571 TAPEDRIVE="/dev/nrmt0"
1574 DISTVER=`uname -a |awk '{print $3}'`
1575 TAPEDRIVE="/dev/nrmt0"
1576 PTHREAD_LIB="-pthread"
1577 CFLAGS="${CFLAGS} -pthread"
1578 PSCMD="ps -ax -o pid,command"
1582 platforms/bsdi/Makefile \
1583 platforms/bsdi/bacula-fd \
1584 platforms/bsdi/bacula-sd \
1585 platforms/bsdi/bacula-dir"
1586 largefile_support="yes"
1589 DISTVER=`uname -a |awk '{print $3}'`
1590 TAPEDRIVE="/dev/nrst0"
1593 WLDFLAGS="-mwindows"
1597 TAPEDRIVE="/dev/nst0"
1598 PSCMD="ps -e -o pid,command"
1601 platforms/darwin/Makefile"
1604 DISTVER=`cat /etc/debian_version`
1605 TAPEDRIVE="/dev/nrst0"
1606 PSCMD="ps -e -o pid,command"
1609 DISTVER=`uname -a |awk '{print $3}'`
1610 VER=`echo $DISTVER | cut -c 1`
1611 if test x$VER = x4 ; then
1612 PTHREAD_LIB="-pthread"
1613 CFLAGS="${CFLAGS} -pthread"
1617 TAPEDRIVE="/dev/nrsa0"
1618 PSCMD="ps -ax -o pid,command"
1620 platforms/freebsd/Makefile \
1621 platforms/freebsd/bacula-fd \
1622 platforms/freebsd/bacula-sd \
1623 platforms/freebsd/bacula-dir"
1624 largefile_support="yes"
1627 PSCMD="UNIX95=1 ps -e -o pid,comm"
1628 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1630 TAPEDRIVE="/dev/rmt/0hnb"
1631 PTHREAD_LIB="-lpthread"
1632 AC_DEFINE([_INCLUDE_LONGLONG])
1636 TAPEDRIVE="/dev/rmt/0cbn"
1637 PSCMD="ps -e -o pid,comm"
1639 platforms/irix/Makefile \
1640 platforms/irix/bacula-fd \
1641 platforms/irix/bacula-sd \
1642 platforms/irix/bacula-dir"
1645 DISTVER=`uname -a |awk '{print $3}'`
1648 TAPEDRIVE="/dev/nrst0"
1649 PSCMD="ps -ax -o pid,command"
1650 PTHREAD_LIB="-pthread"
1651 CFLAGS="${CFLAGS} -pthread"
1654 DISTVER=`uname -a |awk '{print $3}'`
1657 TAPEDRIVE="/dev/nrst0"
1658 PSCMD="ps -ax -o pid,command"
1659 PTHREAD_LIB="-pthread"
1660 CFLAGS="${CFLAGS} -pthread"
1662 platforms/openbsd/Makefile \
1663 platforms/openbsd/bacula-fd \
1664 platforms/openbsd/bacula-sd \
1665 platforms/openbsd/bacula-dir"
1668 if test -f /etc/whitebox-release ; then
1669 f=/etc/whitebox-release
1671 f=/etc/redhat-release
1673 if test `cat $f | grep release |\
1674 cut -f 3 -d ' '`x = "Enterprise"x ; then
1675 DISTVER="Enterprise "`cat $f | grep release |\
1678 DISTVER=`cat /etc/redhat-release | grep release |\
1681 TAPEDRIVE="/dev/nst0"
1682 PSCMD="ps -e -o pid,command"
1684 platforms/redhat/Makefile \
1685 platforms/redhat/bacula-fd \
1686 platforms/redhat/bacula-sd \
1687 platforms/redhat/bacula-dir \
1688 platforms/redhat/bacula.spec \
1690 hostname=`hostname -s`
1693 DISTVER=`cat /etc/mandrake-release | grep release |\
1695 TAPEDRIVE="/dev/nst0"
1696 PSCMD="ps -e -o pid,command"
1698 platforms/mandrake/Makefile \
1699 platforms/mandrake/bacula-fd \
1700 platforms/mandrake/bacula-sd \
1701 platforms/mandrake/bacula-dir \
1702 platforms/mandrake/bacula.spec \
1706 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1707 TAPEDRIVE="/dev/nst0"
1708 PSCMD="ps -e -o pid,command"
1710 platforms/gentoo/Makefile \
1711 platforms/gentoo/bacula-init \
1712 platforms/gentoo/bacula-fd \
1713 platforms/gentoo/bacula-sd \
1714 platforms/gentoo/bacula-dir"
1717 DISTVER=`cat /etc/slackware-version`
1718 TAPEDRIVE="/dev/nst0"
1719 PSCMD="ps -e -o pid,command"
1721 platforms/slackware/Makefile \
1722 platforms/slackware/rc.bacula-fd \
1723 platforms/slackware/rc.bacula-sd \
1724 platforms/slackware/rc.bacula-dir\
1725 platforms/slackware/functions.bacula"
1729 TAPEDRIVE="/dev/rmt/0cbn"
1730 PSCMD="ps -e -o pid,comm"
1732 platforms/solaris/Makefile \
1733 platforms/solaris/bacula-fd \
1734 platforms/solaris/bacula-sd \
1735 platforms/solaris/bacula-dir"
1736 if test x$DISTVER = x5.6 ; then
1737 AC_DEFINE(HAVE_OLD_SOCKOPT)
1739 LIBS="$LIBS -lresolv"
1742 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1744 TAPEDRIVE="/dev/nst0"
1745 PSCMD="ps -e -o pid,command"
1747 platforms/suse/Makefile \
1748 platforms/suse/bacula-fd \
1749 platforms/suse/bacula-sd \
1750 platforms/suse/bacula-dir \
1751 platforms/suse/bacula \
1752 platforms/suse/bacula.spec"
1757 TAPEDRIVE="/dev/nst0"
1758 PSCMD="ps -e -o pid,command"
1760 platforms/suse/Makefile \
1761 platforms/suse/bacula-fd \
1762 platforms/suse/bacula-sd \
1763 platforms/suse/bacula-dir"
1767 TAPEDRIVE="/dev/nst0"
1770 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1776 LIBS="$PTHREAD_LIB $LIBS"
1778 AC_DEFINE_UNQUOTED(lld, "$lld")
1779 AC_DEFINE_UNQUOTED(llu, "$llu")
1787 dnl# common parts of the Makefile
1788 MCOMMON=./autoconf/Make.common
1789 AC_SUBST_FILE(MCOMMON)
1792 if test "x${subsysdir}" = "x${sbindir}" ; then
1795 echo "You have set both --sbindir and --with-subsys-dir"
1796 echo " equal to: ${subsysdir} "
1797 echo "This is not permitted. Please reconfigure."
1799 echo "Aborting configuration ..."
1805 AC_OUTPUT([autoconf/Make.common \
1807 scripts/startmysql \
1809 scripts/btraceback \
1815 scripts/devel_bacula \
1818 scripts/bacula.desktop.gnome1 \
1819 scripts/bacula.desktop.gnome2 \
1820 scripts/bacula.desktop.gnome1.consolehelper \
1821 scripts/bacula.desktop.gnome2.consolehelper \
1822 scripts/bacula.desktop.gnome1.xsu \
1823 scripts/bacula.desktop.gnome2.xsu \
1824 scripts/gnome-console.console_apps \
1825 scripts/mtx-changer \
1826 scripts/dvd-writepart \
1827 scripts/dvd-freespace \
1828 scripts/bacula-tray-monitor.desktop \
1829 scripts/logwatch/Makefile \
1830 scripts/logwatch/logfile.bacula.conf \
1833 src/console/Makefile \
1834 src/console/bconsole.conf \
1835 src/gnome2-console/Makefile \
1836 src/gnome2-console/gnome-console.conf \
1837 src/wx-console/Makefile \
1838 src/wx-console/wx-console.conf \
1839 src/tray-monitor/Makefile \
1840 src/tray-monitor/tray-monitor.conf \
1842 src/dird/bacula-dir.conf \
1844 src/stored/Makefile \
1845 src/stored/bacula-sd.conf \
1846 src/filed/Makefile \
1847 src/filed/bacula-fd.conf \
1848 src/filed/win32/Makefile \
1850 src/cats/make_catalog_backup \
1851 src/cats/delete_catalog_backup \
1852 src/cats/create_postgresql_database \
1853 src/cats/update_postgresql_tables \
1854 src/cats/make_postgresql_tables \
1855 src/cats/grant_postgresql_privileges \
1856 src/cats/drop_postgresql_tables \
1857 src/cats/drop_postgresql_database \
1858 src/cats/create_mysql_database \
1859 src/cats/update_mysql_tables \
1860 src/cats/make_mysql_tables \
1861 src/cats/grant_mysql_privileges \
1862 src/cats/drop_mysql_tables \
1863 src/cats/drop_mysql_database \
1864 src/cats/create_sqlite_database \
1865 src/cats/update_sqlite_tables \
1866 src/cats/make_sqlite_tables \
1867 src/cats/grant_sqlite_privileges \
1868 src/cats/drop_sqlite_tables \
1869 src/cats/drop_sqlite_database \
1870 src/cats/create_sqlite3_database \
1871 src/cats/update_sqlite3_tables \
1872 src/cats/make_sqlite3_tables \
1873 src/cats/grant_sqlite3_privileges \
1874 src/cats/drop_sqlite3_tables \
1875 src/cats/drop_sqlite3_database \
1878 src/cats/create_bdb_database \
1879 src/cats/update_bdb_tables \
1880 src/cats/make_bdb_tables \
1881 src/cats/grant_bdb_privileges \
1882 src/cats/drop_bdb_tables \
1883 src/cats/drop_bdb_database \
1884 src/cats/create_bacula_database \
1885 src/cats/update_bacula_tables \
1886 src/cats/grant_bacula_privileges \
1887 src/cats/make_bacula_tables \
1888 src/cats/drop_bacula_tables \
1889 src/cats/drop_bacula_database \
1890 src/findlib/Makefile \
1891 src/tools/Makefile \
1892 src/win32/winbacula.nsi \
1893 src/win32/baculafd/bacula-fd.conf \
1894 src/win32/Makefile \
1895 src/win32/console/bconsole.conf \
1896 src/win32/wx-console/wx-console.conf \
1897 src/win32/pebuilder/Makefile \
1899 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
1903 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1904 chmod 755 dvd-writepart dvd-freespace
1905 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
1910 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
1911 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
1913 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
1914 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
1916 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
1917 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
1919 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
1920 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
1922 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
1923 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
1925 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
1929 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
1930 largefile_support="yes"
1934 # A whole lot of hand springs to get the compiler version.
1935 # This is because gcc changed the output in version 3.0
1937 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1938 if test "x${CCVERSION}" = "x" ; then
1939 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1941 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1942 if test x"${CXXVERSION}" = x ; then
1943 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1946 if test "x${subsysdir}" = "x${sbindir}" ; then
1949 echo "You have set --sbindir and --with-subsys-dir"
1950 echo " both equal to: ${subsysdir} "
1951 echo " This is not permitted. Please reconfigure."
1953 echo "Aborting configuration ..."
1959 if test "x${db_name}" = "xInternal" ; then
1962 echo "You have not specified either --enable-client-only or one of the"
1963 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
1964 echo " This is not permitted. Please reconfigure."
1966 echo "Aborting the configuration ..."
1973 Configuration on `date`:
1975 Host: $host -- ${DISTNAME} ${DISTVER}
1976 Bacula version: ${VERSION} (${DATE})
1977 Source code location: ${srcdir}
1978 Install binaries: ${sbindir}
1979 Install config files: ${sysconfdir}
1980 Scripts directory: ${scriptdir}
1981 Working directory: ${working_dir}
1982 PID directory: ${piddir}
1983 Subsys directory: ${subsysdir}
1984 Man directory: ${mandir}
1985 C Compiler: ${CC} ${CCVERSION}
1986 C++ Compiler: ${CXX} ${CXXVERSION}
1987 Compiler flags: ${WCFLAGS} ${CFLAGS}
1988 Linker flags: ${WLDFLAGS} ${LDFLAGS}
1990 Statically Linked Tools: ${support_static_tools}
1991 Statically Linked FD: ${support_static_fd}
1992 Statically Linked SD: ${support_static_sd}
1993 Statically Linked DIR: ${support_static_dir}
1994 Statically Linked CONS: ${support_static_cons}
1995 Database type: ${db_name}
1996 Database lib: ${DB_LIBS}
1998 Job Output Email: ${job_email}
1999 Traceback Email: ${dump_email}
2000 SMTP Host Address: ${smtp_host}
2002 Director Port: ${dir_port}
2003 File daemon Port: ${fd_port}
2004 Storage daemon Port: ${sd_port}
2006 Director User: ${dir_user}
2007 Director Group: ${dir_group}
2008 Storage Daemon User: ${sd_user}
2009 Storage DaemonGroup: ${sd_group}
2010 File Daemon User: ${fd_user}
2011 File Daemon Group: ${fd_group}
2013 SQL binaries Directory ${SQL_BINDIR}
2015 Large file support: $largefile_support
2016 Bacula conio support: ${got_conio} ${CONS_LIBS}
2017 readline support: ${got_readline} ${PRTREADLINE_SRC}
2018 TCP Wrappers support: ${TCPW_MSG}
2019 TLS support: ${support_tls}
2020 ZLIB support: ${have_zlib}
2021 enable-smartalloc: ${support_smartalloc}
2022 enable-gnome: ${support_gnome} ${gnome_version}
2023 enable-wx-console: ${support_wx_console} ${wx_version}
2024 enable-tray-monitor: ${support_tray_monitor}
2025 client-only: ${build_client_only}
2026 ACL support: ${have_acl}
2027 Python support: ${support_python} ${PYTHON_LIBS}