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 for python_root in /usr /usr/local; do
561 if test -f $python_root/include/python2.2/Python.h; then
562 PYTHON_INCDIR=-I$python_root/include/python2.2
563 PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2 -lutil"
565 elif test -f $python_root/include/python2.3/Python.h; then
566 PYTHON_INCDIR=-I$python_root/include/python2.3
567 PYTHON_LIBS="-L$python_root/lib/python2.3/config -lpython2.3 -lutil"
569 elif test -f $python_root/include/python2.4/Python.h; then
570 PYTHON_INCDIR=-I$python_root/include/python2.4
571 PYTHON_LIBS="-L$python_root/lib/python2.4/config -lpython2.4 -lutil"
575 if test x$PYTHON_INCDIR = x; then
576 if test -f $prefix/include/Python.h; then
577 PYTHON_INCDIR=-I$prefix/include
578 PYTHON_LIBS="-L$prefix/lib/config -lpython -lutil"
581 AC_MSG_ERROR(Unable to find Python.h in standard locations)
585 if test -f $withval/Python.h; then
586 PYTHON_INCDIR=-I$withval
587 PYTHON_LIBS="-L$withval/config -lpython -lutil"
588 elif test -f $withval/include/Python.h; then
589 PYTHON_INCDIR=-I$withval/include
590 PYTHON_LIBS="-L$withval/lib/config -lpython -lutil"
593 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
596 AC_DEFINE([HAVE_PYTHON], 1)
606 AC_SUBST(PYTHON_LIBS)
607 AC_SUBST(PYTHON_INCDIR)
611 # Find where sockets are (especially for Solaris)
612 # Do this before the TCP Wrappers test since tcp wrappers
613 # uses the socket library and some linkers are stupid.
615 AC_CHECK_FUNC(socket,
616 AC_MSG_RESULT(using libc's socket),
617 AC_CHECK_LIB(xnet,socket)
618 AC_CHECK_LIB(socket,socket)
619 AC_CHECK_LIB(inet,socket))
622 # -----------------------------------------------------------
623 # Check whether user wants TCP wrappers support (default off)
624 # -----------------------------------------------------------
626 AC_ARG_WITH(tcp-wrappers,
627 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
629 if test "x$withval" != "xno" ; then
631 LIBS="$saved_LIBS -lwrap"
632 AC_MSG_CHECKING(for libwrap)
635 int deny_severity = 0;
636 int allow_severity = 0;
637 struct request_info *req; ],
638 [ hosts_access(req); ],
641 AC_DEFINE(HAVE_LIBWRAP)
644 LIBS="$saved_LIBS -lwrap -lnsl"
647 int deny_severity = 0;
648 int allow_severity = 0;
649 struct request_info *req; ],
650 [ hosts_access(req); ],
653 AC_DEFINE(HAVE_LIBWRAP)
656 [AC_MSG_ERROR([*** libwrap missing]) ] ]
663 # -----------------------------------------------------------
664 # Check whether OpenSSL is available
665 # -----------------------------------------------------------
666 AC_MSG_CHECKING([for OpenSSL])
667 dnl The following uses quadrigraphs:
671 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
672 [with_openssl_directory=${withval}])
674 if test "x$with_openssl_directory" != "x"; then
675 OPENSSL_LIBS="-lssl -lcrypto"
678 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
679 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
680 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
684 saved_CFLAGS="$CFLAGS"
685 LIBS="$saved_LIBS $OPENSSL_LIBS"
686 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
688 AC_TRY_LINK([ #include <openssl/ssl.h> ],
689 [ CRYPTO_set_id_callback(NULL); ],
690 [ support_tls="yes" ],
695 CFLAGS="$saved_CFLAGS"
697 if test "$support_tls" = "yes"; then
698 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
699 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
707 AC_MSG_RESULT([$support_tls])
708 AC_SUBST(OPENSSL_LIBS)
709 AC_SUBST(OPENSSL_INC)
713 # ------------------------------------------
714 # Where to place working dir
715 # ------------------------------------------
716 working_dir=`eval echo ${prefix}/var/bacula/working`
717 AC_ARG_WITH(working-dir,
718 [ --with-working-dir=PATH specify path of Bacula working directory],
720 if test "x$withval" != "xno" ; then
726 AC_SUBST(working_dir)
729 # ------------------------------------------
730 # Where to place scriptdir (script files)
731 # ------------------------------------------
732 scriptdir=`eval echo ${sysconfdir}`
733 AC_ARG_WITH(scriptdir,
734 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
736 if test "x$withval" != "xno" ; then
745 # ------------------------------------------
746 # Where to send dump email
747 # ------------------------------------------
748 dump_email=root@localhost
749 AC_ARG_WITH(dump-email,
750 [ --with-dump-email=EMAIL dump email address],
752 if test "x$withval" != "xno" ; then
760 # ------------------------------------------
761 # Where to send job email
762 # ------------------------------------------
763 job_email=root@localhost
764 AC_ARG_WITH(job-email,
765 [ --with-job-email=EMAIL job output email address],
767 if test "x$withval" != "xno" ; then
775 # ------------------------------------------
776 # Where to find smtp host
777 # ------------------------------------------
779 AC_ARG_WITH(smtp_host,
780 [ --with-smtp-host=HOST SMTP mail host address],
782 if test "x$withval" != "xno" ; then
791 # ------------------------------------
792 # Where to place pid files
793 # ------------------------------------
796 [ --with-pid-dir=PATH specify location of Bacula pid files],
798 if test "x$withval" != "xno" ; then
804 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
808 # ------------------------------------
809 # Where to place subsys "lock file"
810 # ------------------------------------
811 subsysdir=/var/run/subsys
812 AC_ARG_WITH(subsys-dir,
813 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
815 if test "x$withval" != "xno" ; then
825 # ------------------------------------
826 # Where to start assigning ports
827 # ------------------------------------
829 AC_ARG_WITH(baseport,
830 [ --with-baseport=PORT specify base port address for daemons],
832 if test "x$withval" != "xno" ; then
839 dir_port=`expr $baseport`
840 fd_port=`expr $baseport + 1`
841 sd_port=`expr $fd_port + 1`
848 # ------------------------------------------
850 # ------------------------------------------
852 AC_ARG_WITH(dir-password,
853 [ --with-dir-password=PASSWORD specify Director's password],
855 if test "x$withval" != "xno" ; then
856 dir_password=$withval
861 if test "x$dir_password" = "x" ; then
862 if test "x$OPENSSL" = "xnone" ; then
863 key=`autoconf/randpass 33`
865 key=`openssl rand -base64 33`
871 AC_ARG_WITH(fd-password,
872 [ --with-fd-password=PASSWORD specify Client's password],
874 if test "x$withval" != "xno" ; then
880 if test "x$fd_password" = "x" ; then
881 if test "x$OPENSSL" = "xnone" ; then
882 key=`autoconf/randpass 37`
884 key=`openssl rand -base64 33`
890 AC_ARG_WITH(sd-password,
891 [ --with-sd-password=PASSWORD specify Storage daemon's password],
893 if test "x$withval" != "xno" ; then
899 if test "x$sd_password" = "x" ; then
900 if test "x$OPENSSL" = "xnone" ; then
901 key=`autoconf/randpass 41`
903 key=`openssl rand -base64 33`
909 AC_ARG_WITH(mon-dir-password,
910 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
912 if test "x$withval" != "xno" ; then
913 mon_dir_password=$withval
918 if test "x$mon_dir_password" = "x" ; then
919 if test "x$OPENSSL" = "xnone" ; then
920 key=`autoconf/randpass 33`
922 key=`openssl rand -base64 33`
924 mon_dir_password=$key
928 AC_ARG_WITH(mon-fd-password,
929 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
931 if test "x$withval" != "xno" ; then
932 mon_fd_password=$withval
937 if test "x$mon_fd_password" = "x" ; then
938 if test "x$OPENSSL" = "xnone" ; then
939 key=`autoconf/randpass 37`
941 key=`openssl rand -base64 33`
947 AC_ARG_WITH(mon-sd-password,
948 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
950 if test "x$withval" != "xno" ; then
951 mon_sd_password=$withval
956 if test "x$mon_sd_password" = "x" ; then
957 if test "x$OPENSSL" = "xnone" ; then
958 key=`autoconf/randpass 41`
960 key=`openssl rand -base64 33`
965 AC_SUBST(dir_password)
966 AC_SUBST(fd_password)
967 AC_SUBST(sd_password)
968 AC_SUBST(mon_dir_password)
969 AC_SUBST(mon_fd_password)
970 AC_SUBST(mon_sd_password)
974 # Handle users and groups for each daemon
977 AC_ARG_WITH(dir_user,
978 [ --with-dir-user=USER specify user for Director daemon],
980 if test "x$withval" != "x" ; then
987 AC_ARG_WITH(dir_group,
988 [ --with-dir-group=GROUP specify group for Director daemon],
990 if test "x$withval" != "x" ; then
998 [ --with-sd-user=USER specify user for Storage daemon],
1000 if test "x$withval" != "x" ; then
1007 AC_ARG_WITH(sd_group,
1008 [ --with-sd-group=GROUP specify group for Storage daemon],
1010 if test "x$withval" != "x" ; then
1017 AC_ARG_WITH(fd_user,
1018 [ --with-fd-user=USER specify user for File daemon],
1020 if test "x$withval" != "x" ; then
1027 AC_ARG_WITH(fd_group,
1028 [ --with-fd-group=GROUP specify group for File daemon],
1030 if test "x$withval" != "x" ; then
1047 # allow setting default executable permissions
1050 AC_ARG_WITH(sbin-perm,
1051 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1053 if test "x$withval" != "x" ; then
1061 # ------------------------------------------------
1062 # Bacula check for various SQL database engines
1063 # ------------------------------------------------
1064 BA_CHECK_POSTGRESQL_DB
1075 AC_DEFINE(PROTOTYPES)
1077 dnl# --------------------------------------------------------------------------
1078 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1080 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1081 if test -z "$CCOPTS"; then
1082 CCOPTS='-g -O2 -Wall'
1091 dnl See if we can use 64 bit file addresses
1092 largefile_support="no"
1098 dnl# --------------------------------------------------------------------------
1099 dnl# CHECKING FOR HEADER FILES
1100 dnl# --------------------------------------------------------------------------
1136 AC_STRUCT_ST_BLKSIZE
1140 dnl# --------------------------------------------------------------------------
1141 dnl# Check for utime.h structure
1142 dnl# --------------------------------------------------------------------------
1143 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1145 #include <sys/types.h>
1146 #include <utime.h>], [struct utimbuf foo],
1147 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1148 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1150 dnl# --------------------------------------------------------------------------
1151 dnl# Check for socklen_t
1152 dnl# --------------------------------------------------------------------------
1153 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1155 #include <sys/types.h>
1156 #include <sys/socket.h>],
1158 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1159 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1161 dnl# --------------------------------------------------------------------------
1162 dnl# Check for bigendian
1163 dnl# --------------------------------------------------------------------------
1164 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1166 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1167 [ba_cv_bigendian=yes],
1168 [ba_cv_bigendian=no],
1169 [ba_cv_bigendian=no])])
1170 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1176 dnl# --------------------------------------------------------------------------
1177 dnl# CHECKING FOR FILESYSTEM TYPE
1178 dnl# --------------------------------------------------------------------------
1179 AC_MSG_CHECKING(how to get filesystem type)
1181 # The order of these tests is important.
1182 AC_TRY_CPP([#include <sys/statvfs.h>
1183 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1184 if test $fstype = no; then
1185 AC_TRY_CPP([#include <sys/statfs.h>
1186 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1188 if test $fstype = no; then
1189 AC_TRY_CPP([#include <sys/statfs.h>
1190 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1192 if test $fstype = no; then
1193 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1195 if test $fstype = no; then
1196 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1198 if test $fstype = no; then
1199 AC_TRY_CPP([#include <sys/mount.h>
1200 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1202 AC_MSG_RESULT($fstype)
1204 dnl# --------------------------------------------------------------------------
1205 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1206 dnl# --------------------------------------------------------------------------
1214 AC_CHECK_TYPE(ino_t, unsigned long)
1215 AC_CHECK_TYPE(dev_t, unsigned long)
1216 AC_CHECK_TYPE(daddr_t, long)
1217 AC_CHECK_TYPE(major_t, int)
1218 AC_CHECK_TYPE(minor_t, int)
1219 AC_CHECK_TYPE(ssize_t, int)
1226 AC_CHECK_SIZEOF(char, 1)
1227 AC_CHECK_SIZEOF(short int, 2)
1228 AC_CHECK_SIZEOF(int, 4)
1229 AC_CHECK_SIZEOF(long int, 4)
1230 AC_CHECK_SIZEOF(long long int, 8)
1231 AC_CHECK_SIZEOF(int *, 4)
1233 # Check for sys/types.h types
1234 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1236 [ #include <sys/types.h> ],
1238 [ ac_cv_have_u_int="yes" ],
1239 [ ac_cv_have_u_int="no" ]
1242 if test "x$ac_cv_have_u_int" = "xyes" ; then
1243 AC_DEFINE(HAVE_U_INT)
1247 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1249 [ #include <sys/types.h> ],
1250 [ intmax_t a; a = 1;],
1251 [ ac_cv_have_intmax_t="yes" ],
1254 [ #include <stdint.h> ],
1255 [ intmax_t a; a = 1;],
1256 [ ac_cv_have_intmax_t="yes" ],
1257 [ ac_cv_have_intmax_t="no" ]
1263 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1264 AC_DEFINE(HAVE_INTMAX_T)
1269 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1271 [ #include <sys/types.h> ],
1272 [ u_intmax_t a; a = 1;],
1273 [ ac_cv_have_u_intmax_t="yes" ],
1276 [ #include <stdint.h> ],
1277 [ u_intmax_t a; a = 1;],
1278 [ ac_cv_have_u_intmax_t="yes" ],
1279 [ ac_cv_have_u_intmax_t="no" ]
1284 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1285 AC_DEFINE(HAVE_U_INTMAX_T)
1290 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1292 [ #include <sys/types.h> ],
1293 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1294 [ ac_cv_have_intxx_t="yes" ],
1295 [ ac_cv_have_intxx_t="no" ]
1298 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1299 AC_DEFINE(HAVE_INTXX_T)
1303 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1305 [ #include <sys/types.h> ],
1306 [ int64_t a; a = 1;],
1307 [ ac_cv_have_int64_t="yes" ],
1308 [ ac_cv_have_int64_t="no" ]
1311 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1312 AC_DEFINE(HAVE_INT64_T)
1316 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1318 [ #include <sys/types.h> ],
1319 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1320 [ ac_cv_have_u_intxx_t="yes" ],
1321 [ ac_cv_have_u_intxx_t="no" ]
1324 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1325 AC_DEFINE(HAVE_U_INTXX_T)
1329 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1331 [ #include <sys/types.h> ],
1332 [ u_int64_t a; a = 1;],
1333 [ ac_cv_have_u_int64_t="yes" ],
1334 [ ac_cv_have_u_int64_t="no" ]
1337 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1338 AC_DEFINE(HAVE_U_INT64_T)
1342 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1343 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1345 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1347 [ #include <sys/bitypes.h> ],
1348 [ int8_t a; int16_t b; int32_t c;
1349 u_int8_t e; u_int16_t f; u_int32_t g;
1350 a = b = c = e = f = g = 1; ],
1351 [ AC_DEFINE(HAVE_U_INTXX_T)
1352 AC_DEFINE(HAVE_INTXX_T)
1353 AC_DEFINE(HAVE_SYS_BITYPES_H)
1354 AC_MSG_RESULT(yes) ],
1355 [ AC_MSG_RESULT(no)]
1359 if test -z "$have_u_intxx_t" ; then
1360 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1362 [ #include <sys/types.h> ],
1363 [ uint8_t a; uint16_t b;
1364 uint32_t c; a = b = c = 1; ],
1365 [ ac_cv_have_uintxx_t="yes" ],
1366 [ ac_cv_have_uintxx_t="no" ]
1369 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1370 AC_DEFINE(HAVE_UINTXX_T)
1374 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1375 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1377 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1379 [ #include <sys/bitypes.h> ],
1380 [ int64_t a; u_int64_t b;
1382 [ AC_DEFINE(HAVE_U_INT64_T)
1383 AC_DEFINE(HAVE_INT64_T)
1384 AC_MSG_RESULT(yes) ],
1385 [ AC_MSG_RESULT(no)]
1389 if (test -z "$have_uintxx_t" && \
1390 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1392 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1394 [ #include <sys/bitypes.h> ],
1395 [ uint8_t a; uint16_t b;
1396 uint32_t c; a = b = c = 1; ],
1397 [ AC_DEFINE(HAVE_UINTXX_T)
1398 AC_MSG_RESULT(yes) ],
1399 [ AC_MSG_RESULT(no)]
1407 dnl# --------------------------------------------------------------------------
1408 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1409 dnl# --------------------------------------------------------------------------
1425 [echo 'configure: cannot find needed function.'; exit 1]
1428 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1429 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1431 AC_CHECK_FUNCS(chflags)
1433 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1435 dnl# --------------------------------------------------------------------------
1436 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1437 dnl# --------------------------------------------------------------------------
1438 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1440 # If resolver functions are not in libc check for -lnsl or -lresolv.
1441 AC_CHECK_FUNC(gethostbyname_r,
1442 AC_MSG_RESULT(using libc's resolver),
1443 AC_CHECK_LIB(nsl,gethostbyname_r)
1444 AC_CHECK_LIB(resolv,gethostbyname_r))
1448 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1449 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1450 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1452 dnl ----------------------------
1453 dnl check sa_len of sockaddr
1454 dnl ----------------------------
1455 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1456 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1457 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1459 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1460 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1464 dnl Check for IPv6 support
1465 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1466 [AC_TRY_LINK([ #include <sys/types.h>
1467 #include <sys/socket.h>
1468 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1470 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1472 if test "$ac_cv_ipv6_support" = yes; then
1473 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1482 AC_FUNC_CLOSEDIR_VOID
1483 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1484 # AC_FUNC_FNMATCH dnl use local version
1487 dnl# FreeBSD needs to link libxpg4
1488 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1491 AC_CHECK_LIB(sun, getpwnam)
1493 AC_CHECK_HEADERS(zlib.h)
1494 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1496 if test x$FDLIBS = x-lz; then
1497 AC_DEFINE(HAVE_LIBZ)
1501 AC_CHECK_HEADER(sys/acl.h)
1502 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1504 if test $ac_cv_lib_acl_acl_get_file = yes; then
1509 dnl Check for pthread libraries
1511 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1512 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1513 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1514 [AC_CHECK_FUNC(pthread_create)]
1524 LDFLAGS=${LDFLAGS--O}
1525 DB_LIBS="${SQL_LFLAGS}"
1527 CPPFLAGS="$CPPFLAGS"
1538 AC_SUBST(X_EXTRA_LIBS)
1542 dnl# extra configurable objects
1553 # Finally we set appropriate distribution specific
1554 # variables and defaults
1556 # PFILES are platform specific files
1557 PFILES="platforms/Makefile"
1561 PYTHON_LIBS_EXTRAS="-ldl"
1562 hostname=`uname -n | cut -d '.' -f 1`
1566 PSCMD="ps -e -o pid,comm"
1568 platforms/aix/Makefile"
1569 TAPEDRIVE="/dev/rmt0.1"
1573 PTHREAD_LIB="-lpthread -lexc"
1574 if test "${CC}" = "gcc" ; then
1581 TAPEDRIVE="/dev/nrmt0"
1584 DISTVER=`uname -a |awk '{print $3}'`
1585 TAPEDRIVE="/dev/nrmt0"
1586 PTHREAD_LIB="-pthread"
1587 CFLAGS="${CFLAGS} -pthread"
1588 PSCMD="ps -ax -o pid,command"
1592 platforms/bsdi/Makefile \
1593 platforms/bsdi/bacula-fd \
1594 platforms/bsdi/bacula-sd \
1595 platforms/bsdi/bacula-dir"
1596 largefile_support="yes"
1599 DISTVER=`uname -a |awk '{print $3}'`
1600 TAPEDRIVE="/dev/nrst0"
1603 WLDFLAGS="-mwindows"
1607 TAPEDRIVE="/dev/nst0"
1608 PSCMD="ps -e -o pid,command"
1611 platforms/darwin/Makefile"
1614 DISTVER=`cat /etc/debian_version`
1615 TAPEDRIVE="/dev/nrst0"
1616 PSCMD="ps -e -o pid,command"
1619 DISTVER=`uname -a |awk '{print $3}'`
1620 VER=`echo $DISTVER | cut -c 1`
1621 if test x$VER = x4 ; then
1622 PTHREAD_LIB="-pthread"
1623 CFLAGS="${CFLAGS} -pthread"
1627 TAPEDRIVE="/dev/nrsa0"
1628 PSCMD="ps -ax -o pid,command"
1630 platforms/freebsd/Makefile \
1631 platforms/freebsd/bacula-fd \
1632 platforms/freebsd/bacula-sd \
1633 platforms/freebsd/bacula-dir"
1634 largefile_support="yes"
1638 PSCMD="UNIX95=1 ps -e -o pid,comm"
1639 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1641 TAPEDRIVE="/dev/rmt/0hnb"
1642 PTHREAD_LIB="-lpthread"
1643 AC_DEFINE([_INCLUDE_LONGLONG])
1647 TAPEDRIVE="/dev/rmt/0cbn"
1648 PSCMD="ps -e -o pid,comm"
1650 platforms/irix/Makefile \
1651 platforms/irix/bacula-fd \
1652 platforms/irix/bacula-sd \
1653 platforms/irix/bacula-dir"
1656 DISTVER=`uname -a |awk '{print $3}'`
1659 TAPEDRIVE="/dev/nrst0"
1660 PSCMD="ps -ax -o pid,command"
1661 PTHREAD_LIB="-pthread"
1662 CFLAGS="${CFLAGS} -pthread"
1665 DISTVER=`uname -a |awk '{print $3}'`
1668 TAPEDRIVE="/dev/nrst0"
1669 PSCMD="ps -ax -o pid,command"
1670 PTHREAD_LIB="-pthread"
1671 CFLAGS="${CFLAGS} -pthread"
1673 platforms/openbsd/Makefile \
1674 platforms/openbsd/bacula-fd \
1675 platforms/openbsd/bacula-sd \
1676 platforms/openbsd/bacula-dir"
1679 if test -f /etc/whitebox-release ; then
1680 f=/etc/whitebox-release
1682 f=/etc/redhat-release
1684 if test `cat $f | grep release |\
1685 cut -f 3 -d ' '`x = "Enterprise"x ; then
1686 DISTVER="Enterprise "`cat $f | grep release |\
1689 DISTVER=`cat /etc/redhat-release | grep release |\
1692 TAPEDRIVE="/dev/nst0"
1693 PSCMD="ps -e -o pid,command"
1695 platforms/redhat/Makefile \
1696 platforms/redhat/bacula-fd \
1697 platforms/redhat/bacula-sd \
1698 platforms/redhat/bacula-dir \
1699 platforms/redhat/bacula.spec \
1701 hostname=`hostname -s`
1704 DISTVER=`cat /etc/mandrake-release | grep release |\
1706 TAPEDRIVE="/dev/nst0"
1707 PSCMD="ps -e -o pid,command"
1709 platforms/mandrake/Makefile \
1710 platforms/mandrake/bacula-fd \
1711 platforms/mandrake/bacula-sd \
1712 platforms/mandrake/bacula-dir \
1713 platforms/mandrake/bacula.spec \
1717 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1718 TAPEDRIVE="/dev/nst0"
1719 PSCMD="ps -e -o pid,command"
1721 platforms/gentoo/Makefile \
1722 platforms/gentoo/bacula-init \
1723 platforms/gentoo/bacula-fd \
1724 platforms/gentoo/bacula-sd \
1725 platforms/gentoo/bacula-dir"
1728 DISTVER=`cat /etc/slackware-version`
1729 TAPEDRIVE="/dev/nst0"
1730 PSCMD="ps -e -o pid,command"
1732 platforms/slackware/Makefile \
1733 platforms/slackware/rc.bacula-fd \
1734 platforms/slackware/rc.bacula-sd \
1735 platforms/slackware/rc.bacula-dir\
1736 platforms/slackware/functions.bacula"
1740 TAPEDRIVE="/dev/rmt/0cbn"
1741 PSCMD="ps -e -o pid,comm"
1743 platforms/solaris/Makefile \
1744 platforms/solaris/bacula-fd \
1745 platforms/solaris/bacula-sd \
1746 platforms/solaris/bacula-dir"
1747 if test x$DISTVER = x5.6 ; then
1748 AC_DEFINE(HAVE_OLD_SOCKOPT)
1750 LIBS="$LIBS -lresolv"
1753 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1755 TAPEDRIVE="/dev/nst0"
1756 PSCMD="ps -e -o pid,command"
1758 platforms/suse/Makefile \
1759 platforms/suse/bacula-fd \
1760 platforms/suse/bacula-sd \
1761 platforms/suse/bacula-dir \
1762 platforms/suse/bacula \
1763 platforms/suse/bacula.spec"
1768 TAPEDRIVE="/dev/nst0"
1769 PSCMD="ps -e -o pid,command"
1771 platforms/suse/Makefile \
1772 platforms/suse/bacula-fd \
1773 platforms/suse/bacula-sd \
1774 platforms/suse/bacula-dir"
1778 TAPEDRIVE="/dev/nst0"
1781 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1787 LIBS="$PTHREAD_LIB $LIBS"
1788 if test "x$PYTHON_LIBS" != x -a "x$PYTHON_LIBS_EXTRAS" != x; then
1789 PYTHON_LIBS="$PYTHON_LIBS $PYTHON_LIBS_EXTRAS"
1792 AC_DEFINE_UNQUOTED(lld, "$lld")
1793 AC_DEFINE_UNQUOTED(llu, "$llu")
1801 dnl# common parts of the Makefile
1802 MCOMMON=./autoconf/Make.common
1803 AC_SUBST_FILE(MCOMMON)
1806 if test "x${subsysdir}" = "x${sbindir}" ; then
1809 echo "You have set both --sbindir and --with-subsys-dir"
1810 echo " equal to: ${subsysdir} "
1811 echo "This is not permitted. Please reconfigure."
1813 echo "Aborting configuration ..."
1819 AC_OUTPUT([autoconf/Make.common \
1821 scripts/startmysql \
1823 scripts/btraceback \
1829 scripts/devel_bacula \
1832 scripts/bacula.desktop.gnome1 \
1833 scripts/bacula.desktop.gnome2 \
1834 scripts/bacula.desktop.gnome1.consolehelper \
1835 scripts/bacula.desktop.gnome2.consolehelper \
1836 scripts/bacula.desktop.gnome1.xsu \
1837 scripts/bacula.desktop.gnome2.xsu \
1838 scripts/gnome-console.console_apps \
1839 scripts/mtx-changer \
1840 scripts/dvd-writepart \
1841 scripts/dvd-freespace \
1842 scripts/bacula-tray-monitor.desktop \
1843 scripts/logwatch/Makefile \
1844 scripts/logwatch/logfile.bacula.conf \
1847 src/console/Makefile \
1848 src/console/bconsole.conf \
1849 src/gnome2-console/Makefile \
1850 src/gnome2-console/gnome-console.conf \
1851 src/wx-console/Makefile \
1852 src/wx-console/wx-console.conf \
1853 src/tray-monitor/Makefile \
1854 src/tray-monitor/tray-monitor.conf \
1856 src/dird/bacula-dir.conf \
1858 src/stored/Makefile \
1859 src/stored/bacula-sd.conf \
1860 src/filed/Makefile \
1861 src/filed/bacula-fd.conf \
1862 src/filed/win32/Makefile \
1864 src/cats/make_catalog_backup \
1865 src/cats/delete_catalog_backup \
1866 src/cats/create_postgresql_database \
1867 src/cats/update_postgresql_tables \
1868 src/cats/make_postgresql_tables \
1869 src/cats/grant_postgresql_privileges \
1870 src/cats/drop_postgresql_tables \
1871 src/cats/drop_postgresql_database \
1872 src/cats/create_mysql_database \
1873 src/cats/update_mysql_tables \
1874 src/cats/make_mysql_tables \
1875 src/cats/grant_mysql_privileges \
1876 src/cats/drop_mysql_tables \
1877 src/cats/drop_mysql_database \
1878 src/cats/create_sqlite_database \
1879 src/cats/update_sqlite_tables \
1880 src/cats/make_sqlite_tables \
1881 src/cats/grant_sqlite_privileges \
1882 src/cats/drop_sqlite_tables \
1883 src/cats/drop_sqlite_database \
1884 src/cats/create_sqlite3_database \
1885 src/cats/update_sqlite3_tables \
1886 src/cats/make_sqlite3_tables \
1887 src/cats/grant_sqlite3_privileges \
1888 src/cats/drop_sqlite3_tables \
1889 src/cats/drop_sqlite3_database \
1892 src/cats/create_bdb_database \
1893 src/cats/update_bdb_tables \
1894 src/cats/make_bdb_tables \
1895 src/cats/grant_bdb_privileges \
1896 src/cats/drop_bdb_tables \
1897 src/cats/drop_bdb_database \
1898 src/cats/create_bacula_database \
1899 src/cats/update_bacula_tables \
1900 src/cats/grant_bacula_privileges \
1901 src/cats/make_bacula_tables \
1902 src/cats/drop_bacula_tables \
1903 src/cats/drop_bacula_database \
1904 src/findlib/Makefile \
1905 src/tools/Makefile \
1906 src/win32/winbacula.nsi \
1907 src/win32/baculafd/bacula-fd.conf \
1908 src/win32/Makefile \
1909 src/win32/console/bconsole.conf \
1910 src/win32/wx-console/wx-console.conf \
1911 src/win32/pebuilder/Makefile \
1913 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
1917 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1918 chmod 755 dvd-writepart dvd-freespace
1919 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
1924 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
1925 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
1927 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
1928 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
1930 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
1931 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
1933 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
1934 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
1936 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
1937 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
1939 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
1943 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
1944 largefile_support="yes"
1948 # A whole lot of hand springs to get the compiler version.
1949 # This is because gcc changed the output in version 3.0
1951 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1952 if test "x${CCVERSION}" = "x" ; then
1953 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1955 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1956 if test x"${CXXVERSION}" = x ; then
1957 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1960 if test "x${subsysdir}" = "x${sbindir}" ; then
1963 echo "You have set --sbindir and --with-subsys-dir"
1964 echo " both equal to: ${subsysdir} "
1965 echo " This is not permitted. Please reconfigure."
1967 echo "Aborting configuration ..."
1973 if test "x${db_name}" = "xInternal" ; then
1976 echo "You have not specified either --enable-client-only or one of the"
1977 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
1978 echo " This is not permitted. Please reconfigure."
1980 echo "Aborting the configuration ..."
1987 Configuration on `date`:
1989 Host: $host -- ${DISTNAME} ${DISTVER}
1990 Bacula version: ${VERSION} (${DATE})
1991 Source code location: ${srcdir}
1992 Install binaries: ${sbindir}
1993 Install config files: ${sysconfdir}
1994 Scripts directory: ${scriptdir}
1995 Working directory: ${working_dir}
1996 PID directory: ${piddir}
1997 Subsys directory: ${subsysdir}
1998 Man directory: ${mandir}
1999 C Compiler: ${CC} ${CCVERSION}
2000 C++ Compiler: ${CXX} ${CXXVERSION}
2001 Compiler flags: ${WCFLAGS} ${CFLAGS}
2002 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2004 Statically Linked Tools: ${support_static_tools}
2005 Statically Linked FD: ${support_static_fd}
2006 Statically Linked SD: ${support_static_sd}
2007 Statically Linked DIR: ${support_static_dir}
2008 Statically Linked CONS: ${support_static_cons}
2009 Database type: ${db_name}
2010 Database lib: ${DB_LIBS}
2012 Job Output Email: ${job_email}
2013 Traceback Email: ${dump_email}
2014 SMTP Host Address: ${smtp_host}
2016 Director Port: ${dir_port}
2017 File daemon Port: ${fd_port}
2018 Storage daemon Port: ${sd_port}
2020 Director User: ${dir_user}
2021 Director Group: ${dir_group}
2022 Storage Daemon User: ${sd_user}
2023 Storage DaemonGroup: ${sd_group}
2024 File Daemon User: ${fd_user}
2025 File Daemon Group: ${fd_group}
2027 SQL binaries Directory ${SQL_BINDIR}
2029 Large file support: $largefile_support
2030 Bacula conio support: ${got_conio} ${CONS_LIBS}
2031 readline support: ${got_readline} ${PRTREADLINE_SRC}
2032 TCP Wrappers support: ${TCPW_MSG}
2033 TLS support: ${support_tls}
2034 ZLIB support: ${have_zlib}
2035 enable-smartalloc: ${support_smartalloc}
2036 enable-gnome: ${support_gnome} ${gnome_version}
2037 enable-wx-console: ${support_wx_console} ${wx_version}
2038 enable-tray-monitor: ${support_tray_monitor}
2039 client-only: ${build_client_only}
2040 ACL support: ${have_acl}
2041 Python support: ${support_python} ${PYTHON_LIBS}