3 dnl# Process this file with autoconf to produce a configure script.
12 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
13 AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
15 dnl require a recent autoconf
19 dnl search for true and false programs.
20 AC_PATH_PROGS(TRUEPRG, true, :)
21 AC_PATH_PROGS(FALSEPRG, false, :)
26 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
27 DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
28 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
32 echo "configuring for bacula $VERSION ($DATE)"
35 dnl -------------------------------------------------------
36 dnl# Check for compiler.
37 dnl ------------------------------------------------------
41 AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
42 AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
44 if test "x$CC" = xgcc; then
47 AC_PATH_PROG(CXX, $CXX, $CXX)
48 if test ! -e $CXX; then
49 AC_MSG_ERROR(Unable to find C++ compiler)
52 dnl -------------------------------------------------------
53 dnl# Check for programs.
54 dnl ------------------------------------------------------
57 AC_PATH_PROG(MV, mv, mv)
58 AC_PATH_PROG(RM, rm, rm)
59 AC_PATH_PROG(CP, cp, cp)
60 AC_PATH_PROG(SED, sed, sed)
61 AC_PATH_PROG(ECHO, echo, echo)
62 AC_PATH_PROG(CMP, cmp, cmp)
63 AC_PATH_PROG(TBL, tbl, tbl)
64 AC_PATH_PROG(AR, ar, ar)
65 dnl AC_PATH_PROG(RANLIB, ranlib, ranlib)
66 AC_PATH_PROG(OPENSSL, openssl, none)
67 AC_PATH_PROG(MTX, mtx, mtx)
68 AC_PATH_PROG(DD, dd, dd)
69 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
70 AC_PATH_PROG(PYTHON, python, python)
71 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
72 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
73 AC_PATH_PROG(DVDRWFORMAT, dvd+rw-format, dvd+rw-format)
74 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
75 AC_ARG_VAR(WXCONFIG, [wx-config command. On some systems, you must set it to wx-config-2.6 to use wxWidgets 2.6.])
76 if test "x$WXCONFIG" = x; then
79 AC_PATH_PROG(WXCONFIG, ${WXCONFIG}, ${WXCONFIG})
80 AC_ARG_VAR(WXFLAGS, [Parameters to pass to wx-config (e.g. --unicode=no).])
81 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
82 AC_PATH_PROG(PIDOF, pidof, pidof)
84 # Some AWK programs fail, so test it and warn the user
85 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
86 { if ((prog == $2) || (("(" prog ")") == $2) ||
87 (("[" prog "]") == $2) ||
88 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
90 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
91 The regex engine of $AWK is too broken to be used you
92 might want to install GNU AWK.
93 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
96 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
98 test -n "$ARFLAG" || ARFLAGS="cr"
105 AC_SUBST(LOCAL_CFLAGS)
106 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 # Suppport for gettext (translations)
121 # By default, $datadir is ${prefix}/share
122 # --------------------------------------------------
123 AM_GNU_GETTEXT([external])
124 if test x${prefix} = xNONE ; then
125 if test `eval echo ${datadir}` = NONE/share ; then
130 # ------------------------------------------------------------------
131 # If the user has not set --prefix, we set our default to nothing.
132 # In this case, if the user has not set --sysconfdir, we set it
133 # to the package default of /etc/bacula. If either --prefix or
134 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
135 # ------------------------------------------------------------------
136 if test x${prefix} = xNONE ; then
137 if test `eval echo ${sysconfdir}` = NONE/etc ; then
138 sysconfdir=/etc/bacula
142 sysconfdir=`eval echo ${sysconfdir}`
143 datadir=`eval echo ${datadir}`
144 localedir=`eval echo ${datadir}/locale`
145 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
147 # -------------------------------------------------------------------------
148 # If the user has not set --exec-prefix, we default to ${prefix}
149 # -------------------------------------------------------------------------
150 if test x${exec_prefix} = xNONE ; then
151 exec_prefix=${prefix}
154 # ------------------------------------------------------------------
155 # If the user has not set --sbindir, we set our default as /sbin
156 # ------------------------------------------------------------------
157 if test x$sbindir = x'${exec_prefix}/sbin' ; then
158 sbindir=${exec_prefix}/sbin
160 sbindir=`eval echo ${sbindir}`
162 # -------------------------------------------------------------------------
163 # If the user has not set --mandir, we default to /usr/share/man
164 # -------------------------------------------------------------------------
165 if test x$mandir = x'${prefix}/man' ; then
166 mandir=/usr/share/man
170 # ------------------------------------------------------------------
171 # All list of languages for which a translation exist. Each
172 # language is separated by a space.
173 # ------------------------------------------------------------------
176 AC_PATH_PROGS(MSGFMT, msgfmt, no)
177 if test "$MSGFMT" = "no"
179 echo 'msgfmt program not found, disabling NLS !'
181 USE_INCLUDED_LIBINTL=no
190 support_postgresql=no
191 support_smartalloc=yes
195 support_wx_console=no
200 support_static_tools=no
203 support_static_dir=no
204 support_static_cons=no
213 dnl# --------------------------------------------------------------------------
214 dnl# CHECKING COMMAND LINE OPTIONS
215 dnl# --------------------------------------------------------------------------
217 # -------------------------------------------
218 # gnome (default off)
219 # -------------------------------------------
221 [ --enable-gnome enable build of gnome-console GUI [disabled]],
222 [if test x$enableval = xyes; then
227 if test x$support_gnome = xyes; then
228 abc=`$PKGCONFIG --exists libgnomeui-2.0`
230 if test $pkg = 0; then
231 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
232 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
233 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
234 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
235 AC_SUBST(GNOME_INCLUDEDIR)
236 AC_SUBST(GNOMEUI_LIBS)
237 AC_SUBST(GNOME_LIBDIR)
239 GNOME_DIR=src/gnome2-console
240 gnome_version="Version 2.x"
242 AC_MSG_ERROR(Unable to find Gnome 2 installation)
248 # -------------------------------------------
249 # wx-console (default off)
250 # -------------------------------------------
251 AC_ARG_ENABLE(wx-console,
252 [ --enable-wx-console enable build of wxWidgets console [disabled]],
253 [if test x$enableval = xyes; then
254 support_wx_console=yes
258 if test x$support_wx_console = xyes; then
259 abc=`$WXCONFIG $WXFLAGS --cppflags`
261 if test $pkg = 0; then
262 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
263 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
264 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
266 AC_SUBST(WXCONS_CPPFLAGS)
267 AC_SUBST(WXCONS_LDFLAGS)
268 WX_DIR=src/wx-console
271 echo "wx-config program not found. wx-console disabled."
273 support_wx_console=no
279 # -------------------------------------------
280 # tray-monitor (default off)
281 # -------------------------------------------
282 AC_ARG_ENABLE(tray-monitor,
283 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
284 [if test x$enableval = xyes; then
285 support_tray_monitor=yes
289 if test x$support_tray_monitor = xyes; then
290 abc=`$PKGCONFIG --exists gtk+-2.0`
292 if test $pkg = 0; then
293 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
294 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
295 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
296 AC_SUBST(TRAY_MONITOR_LDFLAGS)
297 TRAY_MONITOR_DIR=src/tray-monitor
298 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
300 if test $pkg = 0; then
301 AC_DEFINE(HAVE_GTK_2_4)
305 AC_SUBST(TRAY_MONITOR_DIR)
307 # -------------------------------------------
308 # smartalloc (default off)
309 # -------------------------------------------
310 AC_ARG_ENABLE(smartalloc,
311 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
312 [if test x$enableval = xno; then
313 support_smartalloc=no
316 if test x$support_smartalloc = xyes; then
317 AC_DEFINE(SMARTALLOC)
320 # -------------------------------------------
321 # static-tools (default off)
322 # -------------------------------------------
323 AC_ARG_ENABLE(static-tools,
324 [ --enable-static-tools enable static tape tools [disabled]],
325 [if test x$enableval = xyes; then
326 support_static_tools=yes
330 if test x$support_static_tools = xyes; then
331 TTOOL_LDFLAGS="-static"
333 AC_SUBST(TTOOL_LDFLAGS)
335 # -------------------------------------------
336 # static-fd (default off)
337 # -------------------------------------------
338 AC_ARG_ENABLE(static-fd,
339 [ --enable-static-fd enable static File daemon [disabled]],
340 [if test x$enableval = xyes; then
341 support_static_fd=yes
345 if test x$support_static_fd = xyes; then
346 STATIC_FD="static-bacula-fd"
350 # -------------------------------------------
351 # static-sd (default off)
352 # -------------------------------------------
353 AC_ARG_ENABLE(static-sd,
354 [ --enable-static-sd enable static Storage daemon [disabled]],
355 [if test x$enableval = xyes; then
356 support_static_sd=yes
360 if test x$support_static_sd = xyes; then
361 STATIC_SD="static-bacula-sd"
365 # -------------------------------------------
366 # static-dir (default off)
367 # -------------------------------------------
368 AC_ARG_ENABLE(static-dir,
369 [ --enable-static-dir enable static Director [disabled]],
370 [if test x$enableval = xyes; then
371 support_static_dir=yes
375 if test x$support_static_dir = xyes; then
376 STATIC_DIR="static-bacula-dir"
380 # -------------------------------------------
381 # static-cons (default off)
382 # -------------------------------------------
383 AC_ARG_ENABLE(static-cons,
384 [ --enable-static-cons enable static Console [disabled]],
385 [if test x$enableval = xyes; then
386 support_static_cons=yes
392 if test x$support_static_cons = xyes; then
393 STATIC_CONS="static-bconsole"
394 STATIC_GNOME_CONS="static-gnome-console"
395 STATIC_WX_CONS="static-wx-console"
397 AC_SUBST(STATIC_CONS)
398 AC_SUBST(STATIC_GNOME_CONS)
399 AC_SUBST(STATIC_WX_CONS)
401 # -------------------------------------------
402 # client_only (default off)
403 # -------------------------------------------
404 AC_ARG_ENABLE(client-only,
405 [ --enable-client-only build client (File daemon) only [disabled]],
406 [if test x$enableval = xyes; then
407 build_client_only=yes
411 if test x$build_client_only = xno; then
418 # -------------------------------------------
419 # director (default on)
420 # -------------------------------------------
421 AC_ARG_ENABLE(build-dird,
422 [ --enable-build-dird enable building of dird (Director) [enabled]],
423 [if test x$enableval = xno; then
426 if test x$build_dird = xyes; then
431 DIR_TOOLS="NODIRTOOLS"
436 # -------------------------------------------
437 # stored (default on)
438 # -------------------------------------------
439 AC_ARG_ENABLE(build-stored,
440 [ --enable-build-stored enable building of stored (Storage daemon) [enabled]],
441 [if test x$enableval = xno; then
444 if test x$build_stored = xyes; then
445 STORED_DIR="src/stored"
451 # ---------------------------------------------------
452 # Check for conio (Bacula readline substitute)(
453 # ---------------------------------------------------
454 # this allows you to turn it completely off
456 [ --disable-conio disable conio support [enabled]
458 [if test x$enableval = xno; then
463 if test x$support_conio = xyes; then
464 AC_CHECK_HEADER(termcap.h,
465 [ AC_CHECK_LIB(termcap, tgetent,
466 [ CONS_LIBS="-ltermcap"
471 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
473 [ AC_CHECK_LIB(ncurses, tgetent,
474 [ CONS_LIBS="-lncurses"
479 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
484 AC_CHECK_HEADERS(curses.h)
485 AC_CHECK_HEADER(term.h,
486 [ AC_CHECK_LIB(curses, tgetent,
487 [ CONS_LIBS="-lcurses"
492 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
495 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
504 # ---------------------------------------------------
505 # Check for readline support/directory (default off)
506 # ---------------------------------------------------
507 # this allows you to turn it completely off
508 AC_ARG_ENABLE(readline,
509 [ --disable-readline disable readline support [disable]
511 [if test x$enableval = xno; then
517 if test x$support_readline = xyes; then
518 AC_ARG_WITH(readline,
519 [ --with-readline=DIR specify readline library directory],
521 case "$with_readline" in
524 if test -f ${with_readline}/readline.h; then
525 CONS_INC="-I${with_readline}"
526 CONS_LDFLAGS="-L$with_readline"
527 elif test -f ${with_readline}/include/readline/readline.h; then
528 CONS_INC="-I${with_readline}/include/readline"
529 CONS_LDFLAGS="-L${with_readline}/lib"
530 with_readline="${with_readline}/include/readline"
532 with_readline="/usr/include/readline"
534 AC_CHECK_HEADER(${with_readline}/readline.h,
535 [ AC_DEFINE(HAVE_READLINE)
536 CONS_LIBS="-lreadline -lhistory -ltermcap"
540 echo "readline.h not found. readline turned off ..."
547 # check for standard readline library
548 AC_CHECK_HEADER(/usr/include/readline/readline.h,
549 [ AC_DEFINE(HAVE_READLINE)
551 CONS_INC="-I/usr/include/readline"
552 CONS_LIBS="-lreadline -ltermcap"
554 # Did not find standard library, so try Bacula's default
555 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
556 [ AC_DEFINE(HAVE_READLINE)
558 CONS_INC="-I${TOP_DIR}/depkgs/readline"
559 CONS_LIBS="-lreadline -lhistory -ltermcap"
560 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
561 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
564 echo "readline.h not found. readline turned off ..."
580 AC_SUBST(CONS_LDFLAGS)
581 AC_SUBST(READLINE_SRC)
583 # Minimal stuff for readline Makefile configuration
588 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr lstat lchown)
589 AC_CHECK_FUNCS(nanosleep nl_langinfo)
590 AC_CHECK_HEADERS(varargs.h)
592 # End of readline/conio stuff
593 # -----------------------------------------------------------------------
595 # -----------------------------------------------------------------------
596 # Check for Python support
598 AC_MSG_CHECKING(for Python support)
601 --with-python[=DIR] Include Python support. DIR is the Python base
602 install directory, default is to search through
603 a number of common places for the Python files.],
607 if test "$withval" != "no"; then
608 if test "$withval" = "yes"; then
609 for python_root in /usr /usr/local /usr/sfw; do
610 if test -f $python_root/include/python2.2/Python.h; then
611 PYTHON_INCDIR=-I$python_root/include/python2.2
612 PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
614 elif test -f $python_root/include/python2.3/Python.h; then
615 PYTHON_INCDIR=-I$python_root/include/python2.3
616 PYTHON_LIBS="-L$python_root/lib/python2.3/config -lpython2.3"
618 elif test -f $python_root/include/python2.4/Python.h; then
619 PYTHON_INCDIR=-I$python_root/include/python2.4
620 PYTHON_LIBS="-L$python_root/lib/python2.4/config -lpython2.4"
624 if test x$PYTHON_INCDIR = x; then
625 if test -f $prefix/include/Python.h; then
626 PYTHON_INCDIR=-I$prefix/include
627 PYTHON_LIBS="-L$prefix/lib/config -lpython"
630 AC_MSG_ERROR(Unable to find Python.h in standard locations)
634 if test -f $withval/Python.h; then
635 PYTHON_INCDIR=-I$withval
636 PYTHON_LIBS="-L$withval/config -lpython"
637 elif test -f $withval/include/Python.h; then
638 PYTHON_INCDIR=-I$withval/include
639 PYTHON_LIBS="-L$withval/lib/config -lpython"
640 elif test -f $withval/include/python/Python.h; then
641 PYTHON_INCDIR=-I$withval/include/python
642 PYTHON_LIBS="-L$withval/lib/python/config -lpython"
645 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
648 AC_DEFINE([HAVE_PYTHON], 1)
651 AC_MSG_NOTICE(checking for more Python libs)
652 saved_LIBS="$LIBS"; LIBS=
653 AC_SEARCH_LIBS(shm_open, [rt])
654 AC_CHECK_LIB(util, openpty)
655 PYTHON_LIBS="$PYTHON_LIBS $LIBS"
663 AC_SUBST(PYTHON_LIBS)
664 AC_SUBST(PYTHON_INCDIR)
668 # Find where sockets are (especially for Solaris)
669 # Do this before the TCP Wrappers test since tcp wrappers
670 # uses the socket library and some linkers are stupid.
672 AC_CHECK_FUNC(socket,
673 AC_MSG_RESULT(using libc's socket),
674 AC_CHECK_LIB(xnet,socket)
675 AC_CHECK_LIB(socket,socket)
676 AC_CHECK_LIB(inet,socket))
679 # -----------------------------------------------------------
680 # Check whether user wants TCP wrappers support (default off)
681 # -----------------------------------------------------------
684 AC_ARG_WITH(tcp-wrappers,
685 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
687 if test "x$withval" != "xno" ; then
689 LIBS="$saved_LIBS -lwrap"
690 AC_MSG_CHECKING(for libwrap)
691 AC_SEARCH_LIBS(nanosleep, [rt])
693 [ #include <sys/types.h>
695 int deny_severity = 0;
696 int allow_severity = 0;
697 struct request_info *req; ],
698 [ hosts_access(req); ],
701 AC_DEFINE(HAVE_LIBWRAP)
706 LIBS="$saved_LIBS -lwrap -lnsl"
707 WRAPLIBS="$saved_LIBS -lwrap -lnsl"
709 [ #include <sys/types.h>
711 int deny_severity = 0;
712 int allow_severity = 0;
713 struct request_info *req; ],
714 [ hosts_access(req); ],
717 AC_DEFINE(HAVE_LIBWRAP)
722 [AC_MSG_ERROR([*** libwrap missing]) ] ]
729 # -----------------------------------------------------------
730 # Check whether OpenSSL is available
731 # -----------------------------------------------------------
732 AC_MSG_CHECKING([for OpenSSL])
733 dnl The following uses quadrigraphs:
737 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
738 [with_openssl_directory=${withval}])
740 if test "x$with_openssl_directory" != "x"; then
741 OPENSSL_LIBS="-lssl -lcrypto"
744 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
745 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
746 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
750 saved_CFLAGS="$CFLAGS"
751 LIBS="$saved_LIBS $OPENSSL_LIBS"
752 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
754 AC_TRY_LINK([ #include <openssl/ssl.h> ],
755 [ CRYPTO_set_id_callback(NULL); ],
763 AC_TRY_LINK([ #include <openssl/evp.h> ],
765 [ ac_cv_openssl_sha2="yes" ],
766 [ ac_cv_openssl_sha2="no" ]
770 CFLAGS="$saved_CFLAGS"
772 if test "$support_tls" = "yes"; then
773 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
774 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
775 AC_DEFINE(HAVE_CRYPTO, 1, [Define if encryption support should be enabled])
778 if test "$ac_cv_openssl_sha2" = "yes"; then
779 AC_DEFINE(HAVE_SHA2, 1, [Define if the SHA-2 family of digest algorithms is available])
788 AC_MSG_RESULT([$support_tls])
789 AC_SUBST(OPENSSL_LIBS)
790 AC_SUBST(OPENSSL_INC)
793 # -----------------------------------------------------------
794 # Python and OpenSSL are using dlopen
795 # -----------------------------------------------------------
797 if test "$support_python" = "yes" -o "$support_tls" = "yes"; then
798 AC_SEARCH_LIBS(dlopen, [dl])
801 # ------------------------------------------
802 # Where to place working dir
803 # ------------------------------------------
804 working_dir=`eval echo ${prefix}/var/bacula/working`
805 AC_ARG_WITH(working-dir,
806 [ --with-working-dir=PATH specify path of Bacula working directory],
808 if test "x$withval" != "xno" ; then
814 AC_SUBST(working_dir)
817 # ------------------------------------------
818 # Where to place scriptdir (script files)
819 # ------------------------------------------
820 scriptdir=`eval echo ${sysconfdir}`
821 AC_ARG_WITH(scriptdir,
822 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
824 if test "x$withval" != "xno" ; then
833 # ------------------------------------------
834 # Where to send dump email
835 # ------------------------------------------
836 dump_email=root@localhost
837 AC_ARG_WITH(dump-email,
838 [ --with-dump-email=EMAIL dump email address],
840 if test "x$withval" != "xno" ; then
848 # ------------------------------------------
849 # Where to send job email
850 # ------------------------------------------
851 job_email=root@localhost
852 AC_ARG_WITH(job-email,
853 [ --with-job-email=EMAIL job output email address],
855 if test "x$withval" != "xno" ; then
863 # ------------------------------------------
864 # Where to find smtp host
865 # ------------------------------------------
867 AC_ARG_WITH(smtp_host,
868 [ --with-smtp-host=HOST SMTP mail host address],
870 if test "x$withval" != "xno" ; then
879 # ------------------------------------
880 # Where to place pid files
881 # ------------------------------------
884 [ --with-pid-dir=PATH specify location of Bacula pid files],
886 if test "x$withval" != "xno" ; then
892 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
896 # ------------------------------------
897 # Where to place subsys "lock file"
898 # ------------------------------------
899 subsysdir=/var/run/subsys
900 AC_ARG_WITH(subsys-dir,
901 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
903 if test "x$withval" != "xno" ; then
913 # ------------------------------------
914 # Where to start assigning ports
915 # ------------------------------------
917 AC_ARG_WITH(baseport,
918 [ --with-baseport=PORT specify base port address for daemons],
920 if test "x$withval" != "xno" ; then
927 dir_port=`expr $baseport`
928 fd_port=`expr $baseport + 1`
929 sd_port=`expr $fd_port + 1`
936 # ------------------------------------------
938 # ------------------------------------------
940 AC_ARG_WITH(dir-password,
941 [ --with-dir-password=PASSWORD specify Director's password],
943 if test "x$withval" != "xno" ; then
944 dir_password=$withval
949 if test "x$dir_password" = "x" ; then
950 if test "x$OPENSSL" = "xnone" ; then
951 key=`autoconf/randpass 33`
953 key=`openssl rand -base64 33`
959 AC_ARG_WITH(fd-password,
960 [ --with-fd-password=PASSWORD specify Client's password],
962 if test "x$withval" != "xno" ; then
968 if test "x$fd_password" = "x" ; then
969 if test "x$OPENSSL" = "xnone" ; then
970 key=`autoconf/randpass 37`
972 key=`openssl rand -base64 33`
978 AC_ARG_WITH(sd-password,
979 [ --with-sd-password=PASSWORD specify Storage daemon's password],
981 if test "x$withval" != "xno" ; then
987 if test "x$sd_password" = "x" ; then
988 if test "x$OPENSSL" = "xnone" ; then
989 key=`autoconf/randpass 41`
991 key=`openssl rand -base64 33`
997 AC_ARG_WITH(mon-dir-password,
998 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
1000 if test "x$withval" != "xno" ; then
1001 mon_dir_password=$withval
1006 if test "x$mon_dir_password" = "x" ; then
1007 if test "x$OPENSSL" = "xnone" ; then
1008 key=`autoconf/randpass 33`
1010 key=`openssl rand -base64 33`
1012 mon_dir_password=$key
1016 AC_ARG_WITH(mon-fd-password,
1017 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
1019 if test "x$withval" != "xno" ; then
1020 mon_fd_password=$withval
1025 if test "x$mon_fd_password" = "x" ; then
1026 if test "x$OPENSSL" = "xnone" ; then
1027 key=`autoconf/randpass 37`
1029 key=`openssl rand -base64 33`
1031 mon_fd_password=$key
1035 AC_ARG_WITH(mon-sd-password,
1036 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
1038 if test "x$withval" != "xno" ; then
1039 mon_sd_password=$withval
1044 if test "x$mon_sd_password" = "x" ; then
1045 if test "x$OPENSSL" = "xnone" ; then
1046 key=`autoconf/randpass 41`
1048 key=`openssl rand -base64 33`
1050 mon_sd_password=$key
1053 AC_SUBST(dir_password)
1054 AC_SUBST(fd_password)
1055 AC_SUBST(sd_password)
1056 AC_SUBST(mon_dir_password)
1057 AC_SUBST(mon_fd_password)
1058 AC_SUBST(mon_sd_password)
1062 # Handle users and groups for each daemon
1065 AC_ARG_WITH(dir_user,
1066 [ --with-dir-user=USER specify user for Director daemon],
1068 if test "x$withval" != "x" ; then
1075 AC_ARG_WITH(dir_group,
1076 [ --with-dir-group=GROUP specify group for Director daemon],
1078 if test "x$withval" != "x" ; then
1085 AC_ARG_WITH(sd_user,
1086 [ --with-sd-user=USER specify user for Storage daemon],
1088 if test "x$withval" != "x" ; then
1095 AC_ARG_WITH(sd_group,
1096 [ --with-sd-group=GROUP specify group for Storage daemon],
1098 if test "x$withval" != "x" ; then
1105 AC_ARG_WITH(fd_user,
1106 [ --with-fd-user=USER specify user for File daemon],
1108 if test "x$withval" != "x" ; then
1115 AC_ARG_WITH(fd_group,
1116 [ --with-fd-group=GROUP specify group for File daemon],
1118 if test "x$withval" != "x" ; then
1135 # allow setting default executable permissions
1138 AC_ARG_WITH(sbin-perm,
1139 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1141 if test "x$withval" != "x" ; then
1149 # ------------------------------------------------
1150 # Bacula check for various SQL database engines
1151 # ------------------------------------------------
1152 BA_CHECK_POSTGRESQL_DB
1163 AC_DEFINE(PROTOTYPES)
1165 dnl# --------------------------------------------------------------------------
1166 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1168 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1169 if test -z "$CCOPTS"; then
1170 CCOPTS='-g -O2 -Wall'
1179 dnl See if we can use 64 bit file addresses
1180 largefile_support="no"
1186 dnl# --------------------------------------------------------------------------
1187 dnl# CHECKING FOR HEADER FILES
1188 dnl# --------------------------------------------------------------------------
1224 AC_STRUCT_ST_BLKSIZE
1228 dnl# --------------------------------------------------------------------------
1229 dnl# Check for utime.h structure
1230 dnl# --------------------------------------------------------------------------
1231 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1233 #include <sys/types.h>
1234 #include <utime.h>], [struct utimbuf foo],
1235 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1236 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1238 dnl# --------------------------------------------------------------------------
1239 dnl# Check for socklen_t
1240 dnl# --------------------------------------------------------------------------
1241 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1243 #include <sys/types.h>
1244 #include <sys/socket.h>],
1246 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1247 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1249 dnl# --------------------------------------------------------------------------
1250 dnl# Check for bigendian
1251 dnl# --------------------------------------------------------------------------
1252 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1254 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1255 [ba_cv_bigendian=yes],
1256 [ba_cv_bigendian=no],
1257 [ba_cv_bigendian=no])])
1258 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1260 dnl# --------------------------------------------------------------------------
1261 dnl# Check for typeof()
1262 dnl# --------------------------------------------------------------------------
1264 AC_CACHE_CHECK(for typeof, ba_cv_have_typeof,
1266 [main(){char *a = 0; a = (typeof a)a;}],
1267 [ba_cv_have_typeof=yes],
1268 [ba_cv_have_typeof=no],
1269 [ba_cv_have_typeof=no])])
1270 test $ba_cv_have_typeof = yes && AC_DEFINE([HAVE_TYPEOF], 1, [Defind to 1 if compiler has typeof])
1276 dnl# --------------------------------------------------------------------------
1277 dnl# CHECKING FOR FILESYSTEM TYPE
1278 dnl# --------------------------------------------------------------------------
1279 AC_MSG_CHECKING(how to get filesystem type)
1281 # The order of these tests is important.
1282 AC_TRY_CPP([#include <sys/statvfs.h>
1283 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1284 if test $fstype = no; then
1285 AC_TRY_CPP([#include <sys/statfs.h>
1286 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1288 if test $fstype = no; then
1289 AC_TRY_CPP([#include <sys/statfs.h>
1290 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1292 if test $fstype = no; then
1293 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1295 if test $fstype = no; then
1296 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1298 if test $fstype = no; then
1299 AC_TRY_CPP([#include <sys/mount.h>
1300 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1302 AC_MSG_RESULT($fstype)
1304 AC_CHECK_HEADER(sys/statvfs.h, [ AC_DEFINE(HAVE_SYS_STATVFS_H,1,[Defines if your system have the sys/statvfs.h header file])] , )
1306 dnl# --------------------------------------------------------------------------
1307 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1308 dnl# --------------------------------------------------------------------------
1316 AC_CHECK_TYPE(ino_t, unsigned long)
1317 AC_CHECK_TYPE(dev_t, unsigned long)
1318 AC_CHECK_TYPE(daddr_t, long)
1319 AC_CHECK_TYPE(major_t, int)
1320 AC_CHECK_TYPE(minor_t, int)
1321 AC_CHECK_TYPE(ssize_t, int)
1328 AC_CHECK_SIZEOF(char, 1)
1329 AC_CHECK_SIZEOF(short int, 2)
1330 AC_CHECK_SIZEOF(int, 4)
1331 AC_CHECK_SIZEOF(long int, 4)
1332 AC_CHECK_SIZEOF(long long int, 8)
1333 AC_CHECK_SIZEOF(int *, 4)
1335 # Check for sys/types.h types
1336 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1338 [ #include <sys/types.h> ],
1340 [ ac_cv_have_u_int="yes" ],
1341 [ ac_cv_have_u_int="no" ]
1344 if test "x$ac_cv_have_u_int" = "xyes" ; then
1345 AC_DEFINE(HAVE_U_INT)
1349 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1351 [ #include <sys/types.h> ],
1352 [ intmax_t a; a = 1;],
1353 [ ac_cv_have_intmax_t="yes" ],
1356 [ #include <stdint.h> ],
1357 [ intmax_t a; a = 1;],
1358 [ ac_cv_have_intmax_t="yes" ],
1359 [ ac_cv_have_intmax_t="no" ]
1365 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1366 AC_DEFINE(HAVE_INTMAX_T)
1371 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1373 [ #include <sys/types.h> ],
1374 [ u_intmax_t a; a = 1;],
1375 [ ac_cv_have_u_intmax_t="yes" ],
1378 [ #include <stdint.h> ],
1379 [ u_intmax_t a; a = 1;],
1380 [ ac_cv_have_u_intmax_t="yes" ],
1381 [ ac_cv_have_u_intmax_t="no" ]
1386 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1387 AC_DEFINE(HAVE_U_INTMAX_T)
1392 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1394 [ #include <sys/types.h> ],
1395 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1396 [ ac_cv_have_intxx_t="yes" ],
1397 [ ac_cv_have_intxx_t="no" ]
1400 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1401 AC_DEFINE(HAVE_INTXX_T)
1405 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1407 [ #include <sys/types.h> ],
1408 [ int64_t a; a = 1;],
1409 [ ac_cv_have_int64_t="yes" ],
1410 [ ac_cv_have_int64_t="no" ]
1413 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1414 AC_DEFINE(HAVE_INT64_T)
1418 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1420 [ #include <sys/types.h> ],
1421 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1422 [ ac_cv_have_u_intxx_t="yes" ],
1423 [ ac_cv_have_u_intxx_t="no" ]
1426 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1427 AC_DEFINE(HAVE_U_INTXX_T)
1431 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1433 [ #include <sys/types.h> ],
1434 [ u_int64_t a; a = 1;],
1435 [ ac_cv_have_u_int64_t="yes" ],
1436 [ ac_cv_have_u_int64_t="no" ]
1439 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1440 AC_DEFINE(HAVE_U_INT64_T)
1444 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1445 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1447 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1449 [ #include <sys/bitypes.h> ],
1450 [ int8_t a; int16_t b; int32_t c;
1451 u_int8_t e; u_int16_t f; u_int32_t g;
1452 a = b = c = e = f = g = 1; ],
1453 [ AC_DEFINE(HAVE_U_INTXX_T)
1454 AC_DEFINE(HAVE_INTXX_T)
1455 AC_DEFINE(HAVE_SYS_BITYPES_H)
1456 AC_MSG_RESULT(yes) ],
1457 [ AC_MSG_RESULT(no)]
1461 if test -z "$have_u_intxx_t" ; then
1462 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1464 [ #include <sys/types.h> ],
1465 [ uint8_t a; uint16_t b;
1466 uint32_t c; a = b = c = 1; ],
1467 [ ac_cv_have_uintxx_t="yes" ],
1468 [ ac_cv_have_uintxx_t="no" ]
1471 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1472 AC_DEFINE(HAVE_UINTXX_T)
1476 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1477 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1479 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1481 [ #include <sys/bitypes.h> ],
1482 [ int64_t a; u_int64_t b;
1484 [ AC_DEFINE(HAVE_U_INT64_T)
1485 AC_DEFINE(HAVE_INT64_T)
1486 AC_MSG_RESULT(yes) ],
1487 [ AC_MSG_RESULT(no)]
1491 if (test -z "$have_uintxx_t" && \
1492 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1494 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1496 [ #include <sys/bitypes.h> ],
1497 [ uint8_t a; uint16_t b;
1498 uint32_t c; a = b = c = 1; ],
1499 [ AC_DEFINE(HAVE_UINTXX_T)
1500 AC_MSG_RESULT(yes) ],
1501 [ AC_MSG_RESULT(no)]
1509 dnl# --------------------------------------------------------------------------
1510 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1511 dnl# --------------------------------------------------------------------------
1527 [echo 'configure: cannot find needed function.'; exit 1]
1530 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1531 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1533 AC_CHECK_FUNCS(chflags)
1535 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1537 dnl# --------------------------------------------------------------------------
1538 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1539 dnl# --------------------------------------------------------------------------
1540 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1542 # If resolver functions are not in libc check for -lnsl or -lresolv.
1543 AC_CHECK_FUNC(gethostbyname_r,
1544 AC_MSG_RESULT(using libc's resolver),
1545 AC_CHECK_LIB(nsl,gethostbyname_r)
1546 AC_CHECK_LIB(resolv,gethostbyname_r))
1550 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1551 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1552 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1554 dnl ----------------------------
1555 dnl check sa_len of sockaddr
1556 dnl ----------------------------
1557 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1558 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1559 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1561 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1562 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1566 dnl Check for IPv6 support
1567 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1568 [AC_TRY_LINK([ #include <sys/types.h>
1569 #include <sys/socket.h>
1570 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1572 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1574 if test "$ac_cv_ipv6_support" = yes; then
1575 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1584 AC_FUNC_CLOSEDIR_VOID
1585 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1586 # AC_FUNC_FNMATCH dnl use local version
1589 AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
1592 AC_CHECK_LIB(sun, getpwnam)
1594 AC_CHECK_HEADERS(zlib.h)
1595 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1597 if test x$FDLIBS = x-lz; then
1598 AC_DEFINE(HAVE_LIBZ)
1603 # Check for ACL libraries
1606 AC_CHECK_HEADER(sys/acl.h)
1607 AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
1608 [AC_CHECK_LIB(acl, acl_get_file, [have_acl=yes; FDLIBS="-lacl $FDLIBS"],
1609 [AC_CHECK_LIB(sec, acltotext, [have_acl=yes; FDLIBS="-lsec $FDLIBS"])]
1612 if test $have_acl = yes; then
1616 dnl Check for pthread libraries
1618 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1619 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1620 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1621 [AC_CHECK_FUNC(pthread_create)]
1631 LDFLAGS=${LDFLAGS--O}
1632 DB_LIBS="${SQL_LFLAGS}"
1634 CPPFLAGS="$CPPFLAGS"
1646 AC_SUBST(X_EXTRA_LIBS)
1651 dnl# extra configurable objects
1662 # Finally we set appropriate distribution specific
1663 # variables and defaults
1665 # PFILES are platform specific files
1666 PFILES="platforms/Makefile"
1670 hostname=`uname -n | cut -d '.' -f 1`
1671 if test x${hostname} = x ; then
1672 hostname="localhost"
1677 PSCMD="ps -e -o pid,comm"
1679 platforms/aix/Makefile"
1680 TAPEDRIVE="/dev/rmt0.1"
1684 PTHREAD_LIB="-lpthread -lexc"
1685 if test "${CC}" = "gcc" ; then
1692 TAPEDRIVE="/dev/nrmt0"
1695 DISTVER=`uname -a |awk '{print $3}'`
1696 TAPEDRIVE="/dev/nrmt0"
1697 PTHREAD_LIB="-pthread"
1698 CFLAGS="${CFLAGS} -pthread"
1699 PSCMD="ps -ax -o pid,command"
1703 platforms/bsdi/Makefile \
1704 platforms/bsdi/bacula-fd \
1705 platforms/bsdi/bacula-sd \
1706 platforms/bsdi/bacula-dir"
1707 largefile_support="yes"
1710 DISTVER=`uname -a |awk '{print $3}'`
1711 TAPEDRIVE="/dev/nrst0"
1714 WLDFLAGS="-mwindows"
1718 TAPEDRIVE="/dev/nst0"
1719 PSCMD="ps -e -o pid,command"
1722 platforms/darwin/Makefile"
1725 DISTVER=`cat /etc/debian_version`
1726 TAPEDRIVE="/dev/nrst0"
1727 PSCMD="ps -e -o pid,command"
1730 DISTVER=`uname -a |awk '{print $3}'`
1731 VER=`echo $DISTVER | cut -c 1`
1732 if test x$VER = x4 ; then
1733 PTHREAD_LIB=""${PTHREAD_LIBS}"
1734 CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
1738 TAPEDRIVE="/dev/nrsa0"
1739 PSCMD="ps -ax -o pid,command"
1741 platforms/freebsd/Makefile \
1742 platforms/freebsd/bacula-fd \
1743 platforms/freebsd/bacula-sd \
1744 platforms/freebsd/bacula-dir"
1745 largefile_support="yes"
1748 PSCMD="UNIX95=1 ps -e -o pid,comm"
1749 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1751 TAPEDRIVE="/dev/rmt/0hnb"
1752 PTHREAD_LIB="-lpthread"
1753 AC_DEFINE([_INCLUDE_LONGLONG])
1757 TAPEDRIVE="/dev/rmt/0cbn"
1758 PSCMD="ps -e -o pid,comm"
1760 platforms/irix/Makefile \
1761 platforms/irix/bacula-fd \
1762 platforms/irix/bacula-sd \
1763 platforms/irix/bacula-dir"
1766 DISTVER=`uname -a |awk '{print $3}'`
1769 TAPEDRIVE="/dev/nrst0"
1770 PSCMD="ps -ax -o pid,command"
1771 PTHREAD_LIB="-pthread"
1772 CFLAGS="${CFLAGS} -pthread"
1775 DISTVER=`uname -a |awk '{print $3}'`
1778 TAPEDRIVE="/dev/nrst0"
1779 PSCMD="ps -ax -o pid,command"
1780 PTHREAD_LIB="-pthread"
1781 CFLAGS="${CFLAGS} -pthread"
1783 platforms/openbsd/Makefile \
1784 platforms/openbsd/bacula-fd \
1785 platforms/openbsd/bacula-sd \
1786 platforms/openbsd/bacula-dir"
1789 if test -f /etc/whitebox-release ; then
1790 f=/etc/whitebox-release
1792 f=/etc/redhat-release
1794 if test `cat $f | grep release |\
1795 cut -f 3 -d ' '`x = "Enterprise"x ; then
1796 DISTVER="Enterprise "`cat $f | grep release |\
1799 DISTVER=`cat /etc/redhat-release | grep release |\
1802 TAPEDRIVE="/dev/nst0"
1803 PSCMD="ps -e -o pid,command"
1805 platforms/redhat/Makefile \
1806 platforms/redhat/bacula-fd \
1807 platforms/redhat/bacula-sd \
1808 platforms/redhat/bacula-dir \
1809 platforms/redhat/bacula.spec \
1813 DISTVER=`cat /etc/mandrake-release | grep release |\
1815 TAPEDRIVE="/dev/nst0"
1816 PSCMD="ps -e -o pid,command"
1818 platforms/mandrake/Makefile \
1819 platforms/mandrake/bacula-fd \
1820 platforms/mandrake/bacula-sd \
1821 platforms/mandrake/bacula-dir \
1822 platforms/mandrake/bacula.spec \
1826 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1827 TAPEDRIVE="/dev/nst0"
1828 PSCMD="ps -e -o pid,command"
1830 platforms/gentoo/Makefile \
1831 platforms/gentoo/bacula-init \
1832 platforms/gentoo/bacula-fd \
1833 platforms/gentoo/bacula-sd \
1834 platforms/gentoo/bacula-dir"
1837 DISTVER=`cat /etc/slackware-version`
1838 TAPEDRIVE="/dev/nst0"
1839 PSCMD="ps -e -o pid,command"
1841 platforms/slackware/Makefile \
1842 platforms/slackware/rc.bacula-fd \
1843 platforms/slackware/rc.bacula-sd \
1844 platforms/slackware/rc.bacula-dir\
1845 platforms/slackware/functions.bacula"
1849 TAPEDRIVE="/dev/rmt/0cbn"
1850 PSCMD="ps -e -o pid,comm"
1852 platforms/solaris/Makefile \
1853 platforms/solaris/bacula-fd \
1854 platforms/solaris/bacula-sd \
1855 platforms/solaris/bacula-dir"
1856 if test x$DISTVER = x5.6 ; then
1857 AC_DEFINE(HAVE_OLD_SOCKOPT)
1859 LIBS="$LIBS -lresolv"
1862 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1864 TAPEDRIVE="/dev/nst0"
1865 PSCMD="ps -e -o pid,command"
1867 platforms/suse/Makefile \
1868 platforms/suse/bacula-fd \
1869 platforms/suse/bacula-sd \
1870 platforms/suse/bacula-dir \
1871 platforms/suse/bacula \
1872 platforms/suse/bacula.spec"
1877 TAPEDRIVE="/dev/nst0"
1878 PSCMD="ps -e -o pid,command"
1880 platforms/suse/Makefile \
1881 platforms/suse/bacula-fd \
1882 platforms/suse/bacula-sd \
1883 platforms/suse/bacula-dir"
1887 TAPEDRIVE="/dev/nst0"
1890 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1896 LIBS="$PTHREAD_LIB $LIBS"
1898 AC_DEFINE_UNQUOTED(lld, "$lld")
1899 AC_DEFINE_UNQUOTED(llu, "$llu")
1907 dnl# common parts of the Makefile
1908 MCOMMON=./autoconf/Make.common
1909 AC_SUBST_FILE(MCOMMON)
1912 if test "x${subsysdir}" = "x${sbindir}" ; then
1915 echo "You have set both --sbindir and --with-subsys-dir"
1916 echo " equal to: ${subsysdir} "
1917 echo "This is not permitted. Please reconfigure."
1919 echo "Aborting configuration ..."
1925 AC_OUTPUT([autoconf/Make.common \
1928 scripts/startmysql \
1930 scripts/btraceback \
1936 scripts/bacula-ctl-dir \
1937 scripts/bacula-ctl-fd \
1938 scripts/bacula-ctl-sd \
1939 scripts/devel_bacula \
1942 scripts/bacula.desktop.gnome1 \
1943 scripts/bacula.desktop.gnome2 \
1944 scripts/bacula.desktop.gnome1.consolehelper \
1945 scripts/bacula.desktop.gnome2.consolehelper \
1946 scripts/bacula.desktop.gnome1.xsu \
1947 scripts/bacula.desktop.gnome2.xsu \
1948 scripts/gnome-console.console_apps \
1949 scripts/mtx-changer \
1950 scripts/disk-changer \
1951 scripts/dvd-handler \
1952 scripts/bacula-tray-monitor.desktop \
1953 scripts/logwatch/Makefile \
1954 scripts/logwatch/logfile.bacula.conf \
1955 scripts/wxconsole.console_apps \
1956 scripts/wxconsole.desktop.consolehelper \
1957 scripts/wxconsole.desktop.xsu \
1960 src/console/Makefile \
1961 src/console/bconsole.conf \
1962 src/gnome2-console/Makefile \
1963 src/gnome2-console/gnome-console.conf \
1964 src/wx-console/Makefile \
1965 src/wx-console/wx-console.conf \
1966 src/tray-monitor/Makefile \
1967 src/tray-monitor/tray-monitor.conf \
1969 src/dird/bacula-dir.conf \
1971 src/stored/Makefile \
1972 src/stored/bacula-sd.conf \
1973 src/filed/Makefile \
1974 src/filed/bacula-fd.conf \
1975 src/filed/win32/Makefile \
1977 src/cats/make_catalog_backup \
1978 src/cats/delete_catalog_backup \
1979 src/cats/create_postgresql_database \
1980 src/cats/update_postgresql_tables \
1981 src/cats/make_postgresql_tables \
1982 src/cats/grant_postgresql_privileges \
1983 src/cats/drop_postgresql_tables \
1984 src/cats/drop_postgresql_database \
1985 src/cats/create_mysql_database \
1986 src/cats/update_mysql_tables \
1987 src/cats/make_mysql_tables \
1988 src/cats/grant_mysql_privileges \
1989 src/cats/drop_mysql_tables \
1990 src/cats/drop_mysql_database \
1991 src/cats/create_sqlite_database \
1992 src/cats/update_sqlite_tables \
1993 src/cats/make_sqlite_tables \
1994 src/cats/grant_sqlite_privileges \
1995 src/cats/drop_sqlite_tables \
1996 src/cats/drop_sqlite_database \
1997 src/cats/create_sqlite3_database \
1998 src/cats/update_sqlite3_tables \
1999 src/cats/make_sqlite3_tables \
2000 src/cats/grant_sqlite3_privileges \
2001 src/cats/drop_sqlite3_tables \
2002 src/cats/drop_sqlite3_database \
2005 src/cats/create_bdb_database \
2006 src/cats/update_bdb_tables \
2007 src/cats/make_bdb_tables \
2008 src/cats/grant_bdb_privileges \
2009 src/cats/drop_bdb_tables \
2010 src/cats/drop_bdb_database \
2011 src/cats/create_bacula_database \
2012 src/cats/update_bacula_tables \
2013 src/cats/grant_bacula_privileges \
2014 src/cats/make_bacula_tables \
2015 src/cats/drop_bacula_tables \
2016 src/cats/drop_bacula_database \
2017 src/findlib/Makefile \
2018 src/pygtk-console/Makefile \
2019 src/tools/Makefile \
2020 src/win32/winbacula.nsi \
2021 src/win32/baculafd/bacula-fd.conf \
2022 src/win32/Makefile \
2023 src/win32/Makefile.vcpp \
2024 src/win32/console/bconsole.conf \
2025 src/win32/wx-console/wx-console.conf \
2026 src/win32/pebuilder/Makefile \
2029 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
2033 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2034 chmod 755 dvd-handler
2035 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2040 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2041 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2043 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2044 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2046 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2047 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2049 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2050 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2052 chmod 755 $c/create_sqlite3_database $c/update_sqlite3_tables $c/make_sqlite3_tables
2053 chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
2055 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2056 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2058 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2062 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2063 largefile_support="yes"
2067 # A whole lot of hand springs to get the compiler version.
2068 # This is because gcc changed the output in version 3.0
2070 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2071 if test "x${CCVERSION}" = "x" ; then
2072 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2074 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2075 if test x"${CXXVERSION}" = x ; then
2076 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2079 if test "x${subsysdir}" = "x${sbindir}" ; then
2082 echo "You have set --sbindir and --with-subsys-dir"
2083 echo " both equal to: ${subsysdir} "
2084 echo " This is not permitted. Please reconfigure."
2086 echo "Aborting configuration ..."
2092 if test "x${db_name}" = "xInternal" ; then
2095 echo "You have not specified either --enable-client-only or one of the"
2096 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
2097 echo " This is not permitted. Please reconfigure."
2099 echo "Aborting the configuration ..."
2106 Configuration on `date`:
2108 Host: $host -- ${DISTNAME} ${DISTVER}
2109 Bacula version: ${VERSION} (${DATE})
2110 Source code location: ${srcdir}
2111 Install binaries: ${sbindir}
2112 Install config files: ${sysconfdir}
2113 Scripts directory: ${scriptdir}
2114 Working directory: ${working_dir}
2115 PID directory: ${piddir}
2116 Subsys directory: ${subsysdir}
2117 Man directory: ${mandir}
2118 Data directory: ${datadir}
2119 C Compiler: ${CC} ${CCVERSION}
2120 C++ Compiler: ${CXX} ${CXXVERSION}
2121 Compiler flags: ${WCFLAGS} ${CFLAGS}
2122 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2124 Statically Linked Tools: ${support_static_tools}
2125 Statically Linked FD: ${support_static_fd}
2126 Statically Linked SD: ${support_static_sd}
2127 Statically Linked DIR: ${support_static_dir}
2128 Statically Linked CONS: ${support_static_cons}
2129 Database type: ${db_name}
2130 Database lib: ${DB_LIBS}
2132 Job Output Email: ${job_email}
2133 Traceback Email: ${dump_email}
2134 SMTP Host Address: ${smtp_host}
2136 Director Port: ${dir_port}
2137 File daemon Port: ${fd_port}
2138 Storage daemon Port: ${sd_port}
2140 Director User: ${dir_user}
2141 Director Group: ${dir_group}
2142 Storage Daemon User: ${sd_user}
2143 Storage DaemonGroup: ${sd_group}
2144 File Daemon User: ${fd_user}
2145 File Daemon Group: ${fd_group}
2147 SQL binaries Directory ${SQL_BINDIR}
2149 Large file support: $largefile_support
2150 Bacula conio support: ${got_conio} ${CONS_LIBS}
2151 readline support: ${got_readline} ${PRTREADLINE_SRC}
2152 TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
2153 TLS support: ${support_tls}
2154 Encryption support: ${support_crypto}
2155 ZLIB support: ${have_zlib}
2156 enable-smartalloc: ${support_smartalloc}
2157 enable-gnome: ${support_gnome} ${gnome_version}
2158 enable-wx-console: ${support_wx_console} ${wx_version}
2159 enable-tray-monitor: ${support_tray_monitor}
2160 client-only: ${build_client_only}
2161 build-dird: ${build_dird}
2162 build-stored: ${build_stored}
2163 ACL support: ${have_acl}
2164 Python support: ${support_python} ${PYTHON_LIBS}