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(DF, df, df)
68 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
69 AC_PATH_PROG(PYTHON, python, python)
70 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
71 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
72 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
73 AC_ARG_VAR(WXCONFIG, [wx-config command. On some systems, you must set it to wx-config-2.6 to use wxWidgets 2.6.])
74 if test "x$WXCONFIG" = x; then
77 AC_PATH_PROG(WXCONFIG, ${WXCONFIG}, ${WXCONFIG})
78 AC_ARG_VAR(WXFLAGS, [Parameters to pass to wx-config (e.g. --unicode=no).])
79 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
80 AC_PATH_PROG(PIDOF, pidof, pidof)
82 # Some AWK programs fail, so test it and warn the user
83 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
84 { if ((prog == $2) || (("(" prog ")") == $2) ||
85 (("[" prog "]") == $2) ||
86 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
88 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
89 The regex engine of $AWK is too broken to be used you
90 might want to install GNU AWK.
91 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
94 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
96 test -n "$ARFLAG" || ARFLAGS="cr"
103 AC_SUBST(LOCAL_CFLAGS)
104 AC_SUBST(LOCAL_LDFLAGS)
109 dnl --------------------------------------------------
110 dnl Bacula OP Sys determination (see aclocal.m4)
111 dnl --------------------------------------------------
114 # -----------------------------------------------------------
115 dnl Bacula OPSys Distribution determination (see aclocal.m4)
116 # ----------------------------------------------------------
117 BA_CHECK_OPSYS_DISTNAME
119 # -----------------------------------------------------------
120 dnl Check for gnome stuff for gnome-console
121 # ----------------------------------------------------------
122 AM_ACLOCAL_INCLUDE(gnome-macros)
124 # ------------------------------------------------------------------
125 # If the user has not set --prefix, we set our default to nothing.
126 # In this case, if the user has not set --sysconfdir, we set it
127 # to the package default of /etc/bacula. If either --prefix or
128 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
129 # ------------------------------------------------------------------
130 if test x${prefix} = xNONE ; then
131 if test `eval echo ${sysconfdir}` = NONE/etc ; then
132 sysconfdir=/etc/bacula
136 sysconfdir=`eval echo ${sysconfdir}`
138 # -------------------------------------------------------------------------
139 # If the user has not set --exec-prefix, we default to ${prefix}
140 # -------------------------------------------------------------------------
141 if test x${exec_prefix} = xNONE ; then
142 exec_prefix=${prefix}
145 # ------------------------------------------------------------------
146 # If the user has not set --sbindir, we set our default as /sbin
147 # ------------------------------------------------------------------
148 if test x$sbindir = x'${exec_prefix}/sbin' ; then
149 sbindir=${exec_prefix}/sbin
151 sbindir=`eval echo ${sbindir}`
153 # -------------------------------------------------------------------------
154 # If the user has not set --mandir, we default to /usr/share/man
155 # -------------------------------------------------------------------------
156 if test x$mandir = x'${prefix}/man' ; then
157 mandir=/usr/share/man
161 # ------------------------------------------------------------------
162 # All list of languages for which a translation exist. Each
163 # language is separated by a space.
164 # ------------------------------------------------------------------
167 AC_PATH_PROGS(MSGFMT, msgfmt, no)
168 if test "$MSGFMT" = "no"
170 echo 'msgfmt program not found, disabling NLS !'
172 USE_INCLUDED_LIBINTL=no
181 support_postgresql=no
182 support_smartalloc=yes
186 support_wx_console=no
190 support_static_tools=no
193 support_static_dir=no
194 support_static_cons=no
201 dnl# --------------------------------------------------------------------------
202 dnl# CHECKING COMMAND LINE OPTIONS
203 dnl# --------------------------------------------------------------------------
205 # -------------------------------------------
206 # gnome (default off)
207 # -------------------------------------------
209 [ --enable-gnome enable build of gnome-console GUI [disabled]],
210 [if test x$enableval = xyes; then
215 if test x$support_gnome = xyes; then
216 abc=`$PKGCONFIG --exists libgnomeui-2.0`
218 if test $pkg = 0; then
219 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
220 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
221 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
222 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
223 AC_SUBST(GNOME_INCLUDEDIR)
224 AC_SUBST(GNOMEUI_LIBS)
225 AC_SUBST(GNOME_LIBDIR)
227 GNOME_DIR=src/gnome2-console
228 gnome_version="Version 2.x"
230 AC_MSG_ERROR(Unable to find Gnome 2 installation)
236 # -------------------------------------------
237 # wx-console (default off)
238 # -------------------------------------------
239 AC_ARG_ENABLE(wx-console,
240 [ --enable-wx-console enable build of wxWidgets console [disabled]],
241 [if test x$enableval = xyes; then
242 support_wx_console=yes
246 if test x$support_wx_console = xyes; then
247 abc=`$WXCONFIG $WXFLAGS --cppflags`
249 if test $pkg = 0; then
250 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
251 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
252 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
254 AC_SUBST(WXCONS_CPPFLAGS)
255 AC_SUBST(WXCONS_LDFLAGS)
256 WX_DIR=src/wx-console
259 echo "wx-config program not found. wx-console disabled."
261 support_wx_console=no
267 # -------------------------------------------
268 # tray-monitor (default off)
269 # -------------------------------------------
270 AC_ARG_ENABLE(tray-monitor,
271 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
272 [if test x$enableval = xyes; then
273 support_tray_monitor=yes
277 if test x$support_tray_monitor = xyes; then
278 abc=`$PKGCONFIG --exists gtk+-2.0`
280 if test $pkg = 0; then
281 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
282 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
283 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
284 AC_SUBST(TRAY_MONITOR_LDFLAGS)
285 TRAY_MONITOR_DIR=src/tray-monitor
286 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
288 if test $pkg = 0; then
289 AC_DEFINE(HAVE_GTK_2_4)
293 AC_SUBST(TRAY_MONITOR_DIR)
295 # -------------------------------------------
296 # smartalloc (default off)
297 # -------------------------------------------
298 AC_ARG_ENABLE(smartalloc,
299 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
300 [if test x$enableval = xno; then
301 support_smartalloc=no
304 if test x$support_smartalloc = xyes; then
305 AC_DEFINE(SMARTALLOC)
308 # -------------------------------------------
309 # static-tools (default off)
310 # -------------------------------------------
311 AC_ARG_ENABLE(static-tools,
312 [ --enable-static-tools enable static tape tools [disabled]],
313 [if test x$enableval = xyes; then
314 support_static_tools=yes
318 if test x$support_static_tools = xyes; then
319 TTOOL_LDFLAGS="-static"
321 AC_SUBST(TTOOL_LDFLAGS)
323 # -------------------------------------------
324 # static-fd (default off)
325 # -------------------------------------------
326 AC_ARG_ENABLE(static-fd,
327 [ --enable-static-fd enable static File daemon [disabled]],
328 [if test x$enableval = xyes; then
329 support_static_fd=yes
333 if test x$support_static_fd = xyes; then
334 STATIC_FD="static-bacula-fd"
338 # -------------------------------------------
339 # static-sd (default off)
340 # -------------------------------------------
341 AC_ARG_ENABLE(static-sd,
342 [ --enable-static-sd enable static Storage daemon [disabled]],
343 [if test x$enableval = xyes; then
344 support_static_sd=yes
348 if test x$support_static_sd = xyes; then
349 STATIC_SD="static-bacula-sd"
353 # -------------------------------------------
354 # static-dir (default off)
355 # -------------------------------------------
356 AC_ARG_ENABLE(static-dir,
357 [ --enable-static-dir enable static Director [disabled]],
358 [if test x$enableval = xyes; then
359 support_static_dir=yes
363 if test x$support_static_dir = xyes; then
364 STATIC_DIR="static-bacula-dir"
368 # -------------------------------------------
369 # static-cons (default off)
370 # -------------------------------------------
371 AC_ARG_ENABLE(static-cons,
372 [ --enable-static-cons enable static Console [disabled]],
373 [if test x$enableval = xyes; then
374 support_static_cons=yes
380 if test x$support_static_cons = xyes; then
381 STATIC_CONS="static-bconsole"
382 STATIC_GNOME_CONS="static-gnome-console"
383 STATIC_WX_CONS="static-wx-console"
385 AC_SUBST(STATIC_CONS)
386 AC_SUBST(STATIC_GNOME_CONS)
387 AC_SUBST(STATIC_WX_CONS)
389 # -------------------------------------------
390 # client_only (default off)
391 # -------------------------------------------
392 AC_ARG_ENABLE(client-only,
393 [ --enable-client-only build client (File daemon) only [disabled]],
394 [if test x$enableval = xyes; then
395 build_client_only=yes
399 if test x$build_client_only = xno; then
406 # ---------------------------------------------------
407 # Check for conio (Bacula readline substitute)(
408 # ---------------------------------------------------
409 # this allows you to turn it completely off
411 [ --disable-conio disable conio support [enabled]
413 [if test x$enableval = xno; then
418 if test x$support_conio = xyes; then
419 AC_CHECK_HEADER(termcap.h,
420 [ AC_CHECK_LIB(termcap, tgetent,
421 [ CONS_LIBS="-ltermcap"
426 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
428 [ AC_CHECK_LIB(ncurses, tgetent,
429 [ CONS_LIBS="-lncurses"
434 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
439 AC_CHECK_HEADERS(curses.h)
440 AC_CHECK_HEADER(term.h,
441 [ AC_CHECK_LIB(curses, tgetent,
442 [ CONS_LIBS="-lcurses"
447 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
450 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
459 # ---------------------------------------------------
460 # Check for readline support/directory (default off)
461 # ---------------------------------------------------
462 # this allows you to turn it completely off
463 AC_ARG_ENABLE(readline,
464 [ --disable-readline disable readline support [disable]
466 [if test x$enableval = xno; then
472 if test x$support_readline = xyes; then
473 AC_ARG_WITH(readline,
474 [ --with-readline=DIR specify readline library directory],
476 case "$with_readline" in
479 if test "$with_readline" != "yes"; then
480 CONS_INC="-I${with_readline}"
481 CONS_LDFLAGS="-L$with_readline"
483 with_readline="/usr/include/readline"
485 AC_CHECK_HEADER(${with_readline}/readline.h,
486 [ AC_DEFINE(HAVE_READLINE)
487 CONS_LIBS="-lreadline -ltermcap"
491 echo "readline.h not found. readline turned off ..."
498 # check for standard readline library
499 AC_CHECK_HEADER(/usr/include/readline/readline.h,
500 [ AC_DEFINE(HAVE_READLINE)
502 CONS_INC="-I/usr/include/readline"
503 CONS_LIBS="-lreadline -ltermcap"
505 # Did not find standard library, so try Bacula's default
506 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
507 [ AC_DEFINE(HAVE_READLINE)
509 CONS_INC="-I${TOP_DIR}/depkgs/readline"
510 CONS_LIBS="-lreadline -lhistory -ltermcap"
511 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
512 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
515 echo "readline.h not found. readline turned off ..."
531 AC_SUBST(CONS_LDFLAGS)
532 AC_SUBST(READLINE_SRC)
534 # Minimal stuff for readline Makefile configuration
539 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
540 AC_CHECK_FUNCS(nanosleep nl_langinfo)
541 AC_CHECK_HEADERS(varargs.h)
543 # End of readline/conio stuff
544 # -----------------------------------------------------------------------
546 # -----------------------------------------------------------------------
547 # Check for Python support
549 AC_MSG_CHECKING(for Python support)
552 --with-python[=DIR] Include Python support. DIR is the Python base
553 install directory, default is to search through
554 a number of common places for the Python files.],
558 if test "$withval" != "no"; then
559 if test "$withval" = "yes"; then
560 if test -f /usr/include/python2.2/Python.h; then
561 PYTHON_INCDIR=-I/usr/include/python2.2
562 PYTHON_LIBS="-L/usr/lib/python2.2/config -lpython2.2 -lutil -ldl"
563 elif test -f /usr/include/python2.3/Python.h; then
564 PYTHON_INCDIR=-I/usr/include/python2.3
565 PYTHON_LIBS="-L/usr/lib/python2.3/config -lpython2.3 -lutil -ldl"
566 elif test -f /usr/include/python2.4/Python.h; then
567 PYTHON_INCDIR=-I/usr/include/python2.4
568 PYTHON_LIBS="-L/usr/lib/python2.4/config -lpython2.4 -lutil -ldl"
569 elif test -f $prefix/include/Python.h; then
570 PYTHON_INCDIR=-I$prefix/include
571 PYTHON_LIBS="-L$prefix/lib/config -lpython -lutil -ldl"
574 AC_MSG_ERROR(Unable to find Python.h in standard locations)
577 if test -f $withval/Python.h; then
578 PYTHON_INCDIR=-I$withval
579 PYTHON_LIBS="-L$withval/config -lpython -lutil -ldl"
580 elif test -f $withval/include/Python.h; then
581 PYTHON_INCDIR=-I$withval/include
582 PYTHON_LIBS="-L$withval/lib/config -lpython -lutil -ldl"
585 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
588 AC_DEFINE([HAVE_PYTHON], 1)
598 AC_SUBST(PYTHON_LIBS)
599 AC_SUBST(PYTHON_INCDIR)
603 # Find where sockets are (especially for Solaris)
604 # Do this before the TCP Wrappers test since tcp wrappers
605 # uses the socket library and some linkers are stupid.
607 AC_CHECK_FUNC(socket,
608 AC_MSG_RESULT(using libc's socket),
609 AC_CHECK_LIB(xnet,socket)
610 AC_CHECK_LIB(socket,socket)
611 AC_CHECK_LIB(inet,socket))
614 # -----------------------------------------------------------
615 # Check whether user wants TCP wrappers support (default off)
616 # -----------------------------------------------------------
618 AC_ARG_WITH(tcp-wrappers,
619 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
621 if test "x$withval" != "xno" ; then
623 LIBS="$saved_LIBS -lwrap"
624 AC_MSG_CHECKING(for libwrap)
627 int deny_severity = 0;
628 int allow_severity = 0;
629 struct request_info *req; ],
630 [ hosts_access(req); ],
633 AC_DEFINE(HAVE_LIBWRAP)
636 LIBS="$saved_LIBS -lwrap -lnsl"
639 int deny_severity = 0;
640 int allow_severity = 0;
641 struct request_info *req; ],
642 [ hosts_access(req); ],
645 AC_DEFINE(HAVE_LIBWRAP)
648 [AC_MSG_ERROR([*** libwrap missing]) ] ]
655 # -----------------------------------------------------------
656 # Check whether OpenSSL is available
657 # -----------------------------------------------------------
658 AC_MSG_CHECKING([for OpenSSL])
659 dnl The following uses quadrigraphs:
663 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
664 [with_openssl_directory=${withval}])
666 if test "x$with_openssl_directory" != "x"; then
667 OPENSSL_LIBS="-lssl -lcrypto"
670 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
671 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
672 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
676 saved_CFLAGS="$CFLAGS"
677 LIBS="$saved_LIBS $OPENSSL_LIBS"
678 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
680 AC_TRY_LINK([ #include <openssl/ssl.h> ],
681 [ CRYPTO_set_id_callback(NULL); ],
682 [ support_tls="yes" ],
687 CFLAGS="$saved_CFLAGS"
689 if test "$support_tls" = "yes"; then
690 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
691 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
699 AC_MSG_RESULT([$support_tls])
700 AC_SUBST(OPENSSL_LIBS)
701 AC_SUBST(OPENSSL_INC)
705 # ------------------------------------------
706 # Where to place working dir
707 # ------------------------------------------
708 working_dir=`eval echo ${prefix}/var/bacula/working`
709 AC_ARG_WITH(working-dir,
710 [ --with-working-dir=PATH specify path of Bacula working directory],
712 if test "x$withval" != "xno" ; then
718 AC_SUBST(working_dir)
721 # ------------------------------------------
722 # Where to place scriptdir (script files)
723 # ------------------------------------------
724 scriptdir=`eval echo ${sysconfdir}`
725 AC_ARG_WITH(scriptdir,
726 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
728 if test "x$withval" != "xno" ; then
737 # ------------------------------------------
738 # Where to send dump email
739 # ------------------------------------------
740 dump_email=root@localhost
741 AC_ARG_WITH(dump-email,
742 [ --with-dump-email=EMAIL dump email address],
744 if test "x$withval" != "xno" ; then
752 # ------------------------------------------
753 # Where to send job email
754 # ------------------------------------------
755 job_email=root@localhost
756 AC_ARG_WITH(job-email,
757 [ --with-job-email=EMAIL job output email address],
759 if test "x$withval" != "xno" ; then
767 # ------------------------------------------
768 # Where to find smtp host
769 # ------------------------------------------
771 AC_ARG_WITH(smtp_host,
772 [ --with-smtp-host=HOST SMTP mail host address],
774 if test "x$withval" != "xno" ; then
783 # ------------------------------------
784 # Where to place pid files
785 # ------------------------------------
788 [ --with-pid-dir=PATH specify location of Bacula pid files],
790 if test "x$withval" != "xno" ; then
796 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
800 # ------------------------------------
801 # Where to place subsys "lock file"
802 # ------------------------------------
803 subsysdir=/var/run/subsys
804 AC_ARG_WITH(subsys-dir,
805 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
807 if test "x$withval" != "xno" ; then
817 # ------------------------------------
818 # Where to start assigning ports
819 # ------------------------------------
821 AC_ARG_WITH(baseport,
822 [ --with-baseport=PORT specify base port address for daemons],
824 if test "x$withval" != "xno" ; then
831 dir_port=`expr $baseport`
832 fd_port=`expr $baseport + 1`
833 sd_port=`expr $fd_port + 1`
840 # ------------------------------------------
842 # ------------------------------------------
844 AC_ARG_WITH(dir-password,
845 [ --with-dir-password=PASSWORD specify Director's password],
847 if test "x$withval" != "xno" ; then
848 dir_password=$withval
853 if test "x$dir_password" = "x" ; then
854 if test "x$OPENSSL" = "xnone" ; then
855 key=`autoconf/randpass 33`
857 key=`openssl rand -base64 33`
863 AC_ARG_WITH(fd-password,
864 [ --with-fd-password=PASSWORD specify Client's password],
866 if test "x$withval" != "xno" ; then
872 if test "x$fd_password" = "x" ; then
873 if test "x$OPENSSL" = "xnone" ; then
874 key=`autoconf/randpass 37`
876 key=`openssl rand -base64 33`
882 AC_ARG_WITH(sd-password,
883 [ --with-sd-password=PASSWORD specify Storage daemon's password],
885 if test "x$withval" != "xno" ; then
891 if test "x$sd_password" = "x" ; then
892 if test "x$OPENSSL" = "xnone" ; then
893 key=`autoconf/randpass 41`
895 key=`openssl rand -base64 33`
901 AC_ARG_WITH(mon-dir-password,
902 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
904 if test "x$withval" != "xno" ; then
905 mon_dir_password=$withval
910 if test "x$mon_dir_password" = "x" ; then
911 if test "x$OPENSSL" = "xnone" ; then
912 key=`autoconf/randpass 33`
914 key=`openssl rand -base64 33`
916 mon_dir_password=$key
920 AC_ARG_WITH(mon-fd-password,
921 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
923 if test "x$withval" != "xno" ; then
924 mon_fd_password=$withval
929 if test "x$mon_fd_password" = "x" ; then
930 if test "x$OPENSSL" = "xnone" ; then
931 key=`autoconf/randpass 37`
933 key=`openssl rand -base64 33`
939 AC_ARG_WITH(mon-sd-password,
940 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
942 if test "x$withval" != "xno" ; then
943 mon_sd_password=$withval
948 if test "x$mon_sd_password" = "x" ; then
949 if test "x$OPENSSL" = "xnone" ; then
950 key=`autoconf/randpass 41`
952 key=`openssl rand -base64 33`
957 AC_SUBST(dir_password)
958 AC_SUBST(fd_password)
959 AC_SUBST(sd_password)
960 AC_SUBST(mon_dir_password)
961 AC_SUBST(mon_fd_password)
962 AC_SUBST(mon_sd_password)
966 # Handle users and groups for each daemon
969 AC_ARG_WITH(dir_user,
970 [ --with-dir-user=USER specify user for Director daemon],
972 if test "x$withval" != "x" ; then
979 AC_ARG_WITH(dir_group,
980 [ --with-dir-group=GROUP specify group for Director daemon],
982 if test "x$withval" != "x" ; then
990 [ --with-sd-user=USER specify user for Storage daemon],
992 if test "x$withval" != "x" ; then
999 AC_ARG_WITH(sd_group,
1000 [ --with-sd-group=GROUP specify group for Storage daemon],
1002 if test "x$withval" != "x" ; then
1009 AC_ARG_WITH(fd_user,
1010 [ --with-fd-user=USER specify user for File daemon],
1012 if test "x$withval" != "x" ; then
1019 AC_ARG_WITH(fd_group,
1020 [ --with-fd-group=GROUP specify group for File daemon],
1022 if test "x$withval" != "x" ; then
1039 # allow setting default executable permissions
1042 AC_ARG_WITH(sbin-perm,
1043 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1045 if test "x$withval" != "x" ; then
1053 # ------------------------------------------------
1054 # Bacula check for various SQL database engines
1055 # ------------------------------------------------
1056 BA_CHECK_POSTGRESQL_DB
1067 AC_DEFINE(PROTOTYPES)
1069 dnl# --------------------------------------------------------------------------
1070 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1072 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1073 if test -z "$CCOPTS"; then
1074 CCOPTS='-g -O2 -Wall'
1083 dnl See if we can use 64 bit file addresses
1084 largefile_support="no"
1090 dnl# --------------------------------------------------------------------------
1091 dnl# CHECKING FOR HEADER FILES
1092 dnl# --------------------------------------------------------------------------
1128 AC_STRUCT_ST_BLKSIZE
1132 dnl# --------------------------------------------------------------------------
1133 dnl# Check for utime.h structure
1134 dnl# --------------------------------------------------------------------------
1135 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1137 #include <sys/types.h>
1138 #include <utime.h>], [struct utimbuf foo],
1139 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1140 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1142 dnl# --------------------------------------------------------------------------
1143 dnl# Check for socklen_t
1144 dnl# --------------------------------------------------------------------------
1145 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1147 #include <sys/types.h>
1148 #include <sys/socket.h>],
1150 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1151 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1153 dnl# --------------------------------------------------------------------------
1154 dnl# Check for bigendian
1155 dnl# --------------------------------------------------------------------------
1156 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1158 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1159 [ba_cv_bigendian=yes],
1160 [ba_cv_bigendian=no],
1161 [ba_cv_bigendian=no])])
1162 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1168 dnl# --------------------------------------------------------------------------
1169 dnl# CHECKING FOR FILESYSTEM TYPE
1170 dnl# --------------------------------------------------------------------------
1171 AC_MSG_CHECKING(how to get filesystem type)
1173 # The order of these tests is important.
1174 AC_TRY_CPP([#include <sys/statvfs.h>
1175 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1176 if test $fstype = no; then
1177 AC_TRY_CPP([#include <sys/statfs.h>
1178 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1180 if test $fstype = no; then
1181 AC_TRY_CPP([#include <sys/statfs.h>
1182 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1184 if test $fstype = no; then
1185 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1187 if test $fstype = no; then
1188 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1190 if test $fstype = no; then
1191 AC_TRY_CPP([#include <sys/mount.h>
1192 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1194 AC_MSG_RESULT($fstype)
1196 dnl# --------------------------------------------------------------------------
1197 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1198 dnl# --------------------------------------------------------------------------
1206 AC_CHECK_TYPE(ino_t, unsigned long)
1207 AC_CHECK_TYPE(dev_t, unsigned long)
1208 AC_CHECK_TYPE(daddr_t, long)
1209 AC_CHECK_TYPE(major_t, int)
1210 AC_CHECK_TYPE(minor_t, int)
1211 AC_CHECK_TYPE(ssize_t, int)
1218 AC_CHECK_SIZEOF(char, 1)
1219 AC_CHECK_SIZEOF(short int, 2)
1220 AC_CHECK_SIZEOF(int, 4)
1221 AC_CHECK_SIZEOF(long int, 4)
1222 AC_CHECK_SIZEOF(long long int, 8)
1223 AC_CHECK_SIZEOF(int *, 4)
1225 # Check for sys/types.h types
1226 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1228 [ #include <sys/types.h> ],
1230 [ ac_cv_have_u_int="yes" ],
1231 [ ac_cv_have_u_int="no" ]
1234 if test "x$ac_cv_have_u_int" = "xyes" ; then
1235 AC_DEFINE(HAVE_U_INT)
1239 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1241 [ #include <sys/types.h> ],
1242 [ intmax_t a; a = 1;],
1243 [ ac_cv_have_intmax_t="yes" ],
1246 [ #include <stdint.h> ],
1247 [ intmax_t a; a = 1;],
1248 [ ac_cv_have_intmax_t="yes" ],
1249 [ ac_cv_have_intmax_t="no" ]
1255 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1256 AC_DEFINE(HAVE_INTMAX_T)
1261 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1263 [ #include <sys/types.h> ],
1264 [ u_intmax_t a; a = 1;],
1265 [ ac_cv_have_u_intmax_t="yes" ],
1268 [ #include <stdint.h> ],
1269 [ u_intmax_t a; a = 1;],
1270 [ ac_cv_have_u_intmax_t="yes" ],
1271 [ ac_cv_have_u_intmax_t="no" ]
1276 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1277 AC_DEFINE(HAVE_U_INTMAX_T)
1282 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1284 [ #include <sys/types.h> ],
1285 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1286 [ ac_cv_have_intxx_t="yes" ],
1287 [ ac_cv_have_intxx_t="no" ]
1290 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1291 AC_DEFINE(HAVE_INTXX_T)
1295 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1297 [ #include <sys/types.h> ],
1298 [ int64_t a; a = 1;],
1299 [ ac_cv_have_int64_t="yes" ],
1300 [ ac_cv_have_int64_t="no" ]
1303 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1304 AC_DEFINE(HAVE_INT64_T)
1308 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1310 [ #include <sys/types.h> ],
1311 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1312 [ ac_cv_have_u_intxx_t="yes" ],
1313 [ ac_cv_have_u_intxx_t="no" ]
1316 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1317 AC_DEFINE(HAVE_U_INTXX_T)
1321 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1323 [ #include <sys/types.h> ],
1324 [ u_int64_t a; a = 1;],
1325 [ ac_cv_have_u_int64_t="yes" ],
1326 [ ac_cv_have_u_int64_t="no" ]
1329 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1330 AC_DEFINE(HAVE_U_INT64_T)
1334 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1335 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1337 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1339 [ #include <sys/bitypes.h> ],
1340 [ int8_t a; int16_t b; int32_t c;
1341 u_int8_t e; u_int16_t f; u_int32_t g;
1342 a = b = c = e = f = g = 1; ],
1343 [ AC_DEFINE(HAVE_U_INTXX_T)
1344 AC_DEFINE(HAVE_INTXX_T)
1345 AC_DEFINE(HAVE_SYS_BITYPES_H)
1346 AC_MSG_RESULT(yes) ],
1347 [ AC_MSG_RESULT(no)]
1351 if test -z "$have_u_intxx_t" ; then
1352 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1354 [ #include <sys/types.h> ],
1355 [ uint8_t a; uint16_t b;
1356 uint32_t c; a = b = c = 1; ],
1357 [ ac_cv_have_uintxx_t="yes" ],
1358 [ ac_cv_have_uintxx_t="no" ]
1361 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1362 AC_DEFINE(HAVE_UINTXX_T)
1366 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1367 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1369 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1371 [ #include <sys/bitypes.h> ],
1372 [ int64_t a; u_int64_t b;
1374 [ AC_DEFINE(HAVE_U_INT64_T)
1375 AC_DEFINE(HAVE_INT64_T)
1376 AC_MSG_RESULT(yes) ],
1377 [ AC_MSG_RESULT(no)]
1381 if (test -z "$have_uintxx_t" && \
1382 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1384 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1386 [ #include <sys/bitypes.h> ],
1387 [ uint8_t a; uint16_t b;
1388 uint32_t c; a = b = c = 1; ],
1389 [ AC_DEFINE(HAVE_UINTXX_T)
1390 AC_MSG_RESULT(yes) ],
1391 [ AC_MSG_RESULT(no)]
1399 dnl# --------------------------------------------------------------------------
1400 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1401 dnl# --------------------------------------------------------------------------
1417 [echo 'configure: cannot find needed function.'; exit 1]
1420 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1421 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1423 AC_CHECK_FUNCS(chflags)
1425 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1427 dnl# --------------------------------------------------------------------------
1428 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1429 dnl# --------------------------------------------------------------------------
1430 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1432 # If resolver functions are not in libc check for -lnsl or -lresolv.
1433 AC_CHECK_FUNC(gethostbyname_r,
1434 AC_MSG_RESULT(using libc's resolver),
1435 AC_CHECK_LIB(nsl,gethostbyname_r)
1436 AC_CHECK_LIB(resolv,gethostbyname_r))
1440 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1441 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1442 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1444 dnl ----------------------------
1445 dnl check sa_len of sockaddr
1446 dnl ----------------------------
1447 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1448 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1449 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1451 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1452 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1456 dnl Check for IPv6 support
1457 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1458 [AC_TRY_LINK([ #include <sys/types.h>
1459 #include <sys/socket.h>
1460 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1462 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1464 if test "$ac_cv_ipv6_support" = yes; then
1465 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1474 AC_FUNC_CLOSEDIR_VOID
1475 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1476 # AC_FUNC_FNMATCH dnl use local version
1479 dnl# FreeBSD needs to link libxpg4
1480 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1483 AC_CHECK_LIB(sun, getpwnam)
1485 AC_CHECK_HEADERS(zlib.h)
1486 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1488 if test x$FDLIBS = x-lz; then
1489 AC_DEFINE(HAVE_LIBZ)
1493 AC_CHECK_HEADER(sys/acl.h)
1494 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1496 if test $ac_cv_lib_acl_acl_get_file = yes; then
1501 dnl Check for pthread libraries
1503 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1504 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1505 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1506 [AC_CHECK_FUNC(pthread_create)]
1516 LDFLAGS=${LDFLAGS--O}
1517 DB_LIBS="${SQL_LFLAGS}"
1519 CPPFLAGS="$CPPFLAGS"
1530 AC_SUBST(X_EXTRA_LIBS)
1534 dnl# extra configurable objects
1545 # Finally we set appropriate distribution specific
1546 # variables and defaults
1548 # PFILES are platform specific files
1549 PFILES="platforms/Makefile"
1553 hostname=`uname -n | cut -d '.' -f 1`
1557 PSCMD="ps -e -o pid,comm"
1559 platforms/aix/Makefile"
1560 TAPEDRIVE="/dev/rmt0.1"
1564 PTHREAD_LIB="-lpthread -lexc"
1565 if test "${CC}" = "gcc" ; then
1572 TAPEDRIVE="/dev/nrmt0"
1575 DISTVER=`uname -a |awk '{print $3}'`
1576 TAPEDRIVE="/dev/nrmt0"
1577 PTHREAD_LIB="-pthread"
1578 CFLAGS="${CFLAGS} -pthread"
1579 PSCMD="ps -ax -o pid,command"
1583 platforms/bsdi/Makefile \
1584 platforms/bsdi/bacula-fd \
1585 platforms/bsdi/bacula-sd \
1586 platforms/bsdi/bacula-dir"
1587 largefile_support="yes"
1590 DISTVER=`uname -a |awk '{print $3}'`
1591 TAPEDRIVE="/dev/nrst0"
1594 WLDFLAGS="-mwindows"
1598 TAPEDRIVE="/dev/nst0"
1599 PSCMD="ps -e -o pid,command"
1602 platforms/darwin/Makefile"
1605 DISTVER=`cat /etc/debian_version`
1606 TAPEDRIVE="/dev/nrst0"
1607 PSCMD="ps -e -o pid,command"
1610 DISTVER=`uname -a |awk '{print $3}'`
1611 VER=`echo $DISTVER | cut -c 1`
1612 if test x$VER = x4 ; then
1613 PTHREAD_LIB="-pthread"
1614 CFLAGS="${CFLAGS} -pthread"
1618 TAPEDRIVE="/dev/nrsa0"
1619 PSCMD="ps -ax -o pid,command"
1621 platforms/freebsd/Makefile \
1622 platforms/freebsd/bacula-fd \
1623 platforms/freebsd/bacula-sd \
1624 platforms/freebsd/bacula-dir"
1625 largefile_support="yes"
1628 PSCMD="UNIX95=1 ps -e -o pid,comm"
1629 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1631 TAPEDRIVE="/dev/rmt/0hnb"
1632 PTHREAD_LIB="-lpthread"
1633 AC_DEFINE([_INCLUDE_LONGLONG])
1637 TAPEDRIVE="/dev/rmt/0cbn"
1638 PSCMD="ps -e -o pid,comm"
1640 platforms/irix/Makefile \
1641 platforms/irix/bacula-fd \
1642 platforms/irix/bacula-sd \
1643 platforms/irix/bacula-dir"
1646 DISTVER=`uname -a |awk '{print $3}'`
1649 TAPEDRIVE="/dev/nrst0"
1650 PSCMD="ps -ax -o pid,command"
1651 PTHREAD_LIB="-pthread"
1652 CFLAGS="${CFLAGS} -pthread"
1655 DISTVER=`uname -a |awk '{print $3}'`
1658 TAPEDRIVE="/dev/nrst0"
1659 PSCMD="ps -ax -o pid,command"
1660 PTHREAD_LIB="-pthread"
1661 CFLAGS="${CFLAGS} -pthread"
1663 platforms/openbsd/Makefile \
1664 platforms/openbsd/bacula-fd \
1665 platforms/openbsd/bacula-sd \
1666 platforms/openbsd/bacula-dir"
1669 if test -f /etc/whitebox-release ; then
1670 f=/etc/whitebox-release
1672 f=/etc/redhat-release
1674 if test `cat $f | grep release |\
1675 cut -f 3 -d ' '`x = "Enterprise"x ; then
1676 DISTVER="Enterprise "`cat $f | grep release |\
1679 DISTVER=`cat /etc/redhat-release | grep release |\
1682 TAPEDRIVE="/dev/nst0"
1683 PSCMD="ps -e -o pid,command"
1685 platforms/redhat/Makefile \
1686 platforms/redhat/bacula-fd \
1687 platforms/redhat/bacula-sd \
1688 platforms/redhat/bacula-dir \
1689 platforms/redhat/bacula.spec \
1691 hostname=`hostname -s`
1694 DISTVER=`cat /etc/mandrake-release | grep release |\
1696 TAPEDRIVE="/dev/nst0"
1697 PSCMD="ps -e -o pid,command"
1699 platforms/mandrake/Makefile \
1700 platforms/mandrake/bacula-fd \
1701 platforms/mandrake/bacula-sd \
1702 platforms/mandrake/bacula-dir \
1703 platforms/mandrake/bacula.spec \
1707 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1708 TAPEDRIVE="/dev/nst0"
1709 PSCMD="ps -e -o pid,command"
1711 platforms/gentoo/Makefile \
1712 platforms/gentoo/bacula-init \
1713 platforms/gentoo/bacula-fd \
1714 platforms/gentoo/bacula-sd \
1715 platforms/gentoo/bacula-dir"
1718 DISTVER=`cat /etc/slackware-version`
1719 TAPEDRIVE="/dev/nst0"
1720 PSCMD="ps -e -o pid,command"
1722 platforms/slackware/Makefile \
1723 platforms/slackware/rc.bacula-fd \
1724 platforms/slackware/rc.bacula-sd \
1725 platforms/slackware/rc.bacula-dir\
1726 platforms/slackware/functions.bacula"
1730 TAPEDRIVE="/dev/rmt/0cbn"
1731 PSCMD="ps -e -o pid,comm"
1733 platforms/solaris/Makefile \
1734 platforms/solaris/bacula-fd \
1735 platforms/solaris/bacula-sd \
1736 platforms/solaris/bacula-dir"
1737 if test x$DISTVER = x5.6 ; then
1738 AC_DEFINE(HAVE_OLD_SOCKOPT)
1740 LIBS="$LIBS -lresolv"
1743 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1745 TAPEDRIVE="/dev/nst0"
1746 PSCMD="ps -e -o pid,command"
1748 platforms/suse/Makefile \
1749 platforms/suse/bacula-fd \
1750 platforms/suse/bacula-sd \
1751 platforms/suse/bacula-dir \
1752 platforms/suse/bacula \
1753 platforms/suse/bacula.spec"
1758 TAPEDRIVE="/dev/nst0"
1759 PSCMD="ps -e -o pid,command"
1761 platforms/suse/Makefile \
1762 platforms/suse/bacula-fd \
1763 platforms/suse/bacula-sd \
1764 platforms/suse/bacula-dir"
1768 TAPEDRIVE="/dev/nst0"
1771 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1777 LIBS="$PTHREAD_LIB $LIBS"
1779 AC_DEFINE_UNQUOTED(lld, "$lld")
1780 AC_DEFINE_UNQUOTED(llu, "$llu")
1788 dnl# common parts of the Makefile
1789 MCOMMON=./autoconf/Make.common
1790 AC_SUBST_FILE(MCOMMON)
1793 if test "x${subsysdir}" = "x${sbindir}" ; then
1796 echo "You have set both --sbindir and --with-subsys-dir"
1797 echo " equal to: ${subsysdir} "
1798 echo "This is not permitted. Please reconfigure."
1800 echo "Aborting configuration ..."
1806 AC_OUTPUT([autoconf/Make.common \
1808 scripts/startmysql \
1810 scripts/btraceback \
1816 scripts/devel_bacula \
1819 scripts/bacula.desktop.gnome1 \
1820 scripts/bacula.desktop.gnome2 \
1821 scripts/bacula.desktop.gnome1.consolehelper \
1822 scripts/bacula.desktop.gnome2.consolehelper \
1823 scripts/bacula.desktop.gnome1.xsu \
1824 scripts/bacula.desktop.gnome2.xsu \
1825 scripts/gnome-console.console_apps \
1826 scripts/mtx-changer \
1827 scripts/dvd-writepart \
1828 scripts/dvd-freespace \
1829 scripts/bacula-tray-monitor.desktop \
1830 scripts/logwatch/Makefile \
1831 scripts/logwatch/logfile.bacula.conf \
1834 src/console/Makefile \
1835 src/console/bconsole.conf \
1836 src/gnome2-console/Makefile \
1837 src/gnome2-console/gnome-console.conf \
1838 src/wx-console/Makefile \
1839 src/wx-console/wx-console.conf \
1840 src/tray-monitor/Makefile \
1841 src/tray-monitor/tray-monitor.conf \
1843 src/dird/bacula-dir.conf \
1845 src/stored/Makefile \
1846 src/stored/bacula-sd.conf \
1847 src/filed/Makefile \
1848 src/filed/bacula-fd.conf \
1849 src/filed/win32/Makefile \
1851 src/cats/make_catalog_backup \
1852 src/cats/delete_catalog_backup \
1853 src/cats/create_postgresql_database \
1854 src/cats/update_postgresql_tables \
1855 src/cats/make_postgresql_tables \
1856 src/cats/grant_postgresql_privileges \
1857 src/cats/drop_postgresql_tables \
1858 src/cats/drop_postgresql_database \
1859 src/cats/create_mysql_database \
1860 src/cats/update_mysql_tables \
1861 src/cats/make_mysql_tables \
1862 src/cats/grant_mysql_privileges \
1863 src/cats/drop_mysql_tables \
1864 src/cats/drop_mysql_database \
1865 src/cats/create_sqlite_database \
1866 src/cats/update_sqlite_tables \
1867 src/cats/make_sqlite_tables \
1868 src/cats/grant_sqlite_privileges \
1869 src/cats/drop_sqlite_tables \
1870 src/cats/drop_sqlite_database \
1871 src/cats/create_sqlite3_database \
1872 src/cats/update_sqlite3_tables \
1873 src/cats/make_sqlite3_tables \
1874 src/cats/grant_sqlite3_privileges \
1875 src/cats/drop_sqlite3_tables \
1876 src/cats/drop_sqlite3_database \
1879 src/cats/create_bdb_database \
1880 src/cats/update_bdb_tables \
1881 src/cats/make_bdb_tables \
1882 src/cats/grant_bdb_privileges \
1883 src/cats/drop_bdb_tables \
1884 src/cats/drop_bdb_database \
1885 src/cats/create_bacula_database \
1886 src/cats/update_bacula_tables \
1887 src/cats/grant_bacula_privileges \
1888 src/cats/make_bacula_tables \
1889 src/cats/drop_bacula_tables \
1890 src/cats/drop_bacula_database \
1891 src/findlib/Makefile \
1892 src/tools/Makefile \
1893 src/win32/winbacula.nsi \
1894 src/win32/baculafd/bacula-fd.conf \
1895 src/win32/Makefile \
1896 src/win32/console/bconsole.conf \
1897 src/win32/wx-console/wx-console.conf \
1898 src/win32/pebuilder/Makefile \
1900 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
1904 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1905 chmod 755 dvd-writepart dvd-freespace
1906 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
1911 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
1912 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
1914 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
1915 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
1917 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
1918 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
1920 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
1921 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
1923 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
1924 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
1926 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
1930 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
1931 largefile_support="yes"
1935 # A whole lot of hand springs to get the compiler version.
1936 # This is because gcc changed the output in version 3.0
1938 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1939 if test "x${CCVERSION}" = "x" ; then
1940 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1942 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1943 if test x"${CXXVERSION}" = x ; then
1944 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1947 if test "x${subsysdir}" = "x${sbindir}" ; then
1950 echo "You have set --sbindir and --with-subsys-dir"
1951 echo " both equal to: ${subsysdir} "
1952 echo " This is not permitted. Please reconfigure."
1954 echo "Aborting configuration ..."
1960 if test "x${db_name}" = "xInternal" ; then
1963 echo "You have not specified either --enable-client-only or one of the"
1964 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
1965 echo " This is not permitted. Please reconfigure."
1967 echo "Aborting the configuration ..."
1974 Configuration on `date`:
1976 Host: $host -- ${DISTNAME} ${DISTVER}
1977 Bacula version: ${VERSION} (${DATE})
1978 Source code location: ${srcdir}
1979 Install binaries: ${sbindir}
1980 Install config files: ${sysconfdir}
1981 Scripts directory: ${scriptdir}
1982 Working directory: ${working_dir}
1983 PID directory: ${piddir}
1984 Subsys directory: ${subsysdir}
1985 Man directory: ${mandir}
1986 C Compiler: ${CC} ${CCVERSION}
1987 C++ Compiler: ${CXX} ${CXXVERSION}
1988 Compiler flags: ${WCFLAGS} ${CFLAGS}
1989 Linker flags: ${WLDFLAGS} ${LDFLAGS}
1991 Statically Linked Tools: ${support_static_tools}
1992 Statically Linked FD: ${support_static_fd}
1993 Statically Linked SD: ${support_static_sd}
1994 Statically Linked DIR: ${support_static_dir}
1995 Statically Linked CONS: ${support_static_cons}
1996 Database type: ${db_name}
1997 Database lib: ${DB_LIBS}
1999 Job Output Email: ${job_email}
2000 Traceback Email: ${dump_email}
2001 SMTP Host Address: ${smtp_host}
2003 Director Port: ${dir_port}
2004 File daemon Port: ${fd_port}
2005 Storage daemon Port: ${sd_port}
2007 Director User: ${dir_user}
2008 Director Group: ${dir_group}
2009 Storage Daemon User: ${sd_user}
2010 Storage DaemonGroup: ${sd_group}
2011 File Daemon User: ${fd_user}
2012 File Daemon Group: ${fd_group}
2014 SQL binaries Directory ${SQL_BINDIR}
2016 Large file support: $largefile_support
2017 Bacula conio support: ${got_conio} ${CONS_LIBS}
2018 readline support: ${got_readline} ${PRTREADLINE_SRC}
2019 TCP Wrappers support: ${TCPW_MSG}
2020 TLS support: ${support_tls}
2021 ZLIB support: ${have_zlib}
2022 enable-smartalloc: ${support_smartalloc}
2023 enable-gnome: ${support_gnome} ${gnome_version}
2024 enable-wx-console: ${support_wx_console} ${wx_version}
2025 enable-tray-monitor: ${support_tray_monitor}
2026 client-only: ${build_client_only}
2027 ACL support: ${have_acl}
2028 Python support: ${support_python} ${PYTHON_LIBS}