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.
46 if test "x$BASECC" = xgcc; then
50 AC_PATH_PROG(CXX, $CXX, $CXX)
51 if test ! -e $CXX; then
52 AC_MSG_ERROR(Unable to find C++ compiler)
55 dnl -------------------------------------------------------
56 dnl# Check for programs.
57 dnl ------------------------------------------------------
60 AC_PATH_PROG(MV, mv, mv)
61 AC_PATH_PROG(RM, rm, rm)
62 AC_PATH_PROG(CP, cp, cp)
63 AC_PATH_PROG(SED, sed, sed)
64 AC_PATH_PROG(ECHO, echo, echo)
65 AC_PATH_PROG(CMP, cmp, cmp)
66 AC_PATH_PROG(TBL, tbl, tbl)
67 AC_PATH_PROG(AR, ar, ar)
68 dnl AC_PATH_PROG(RANLIB, ranlib, ranlib)
69 AC_PATH_PROG(OPENSSL, openssl, none)
70 AC_PATH_PROG(MTX, mtx, mtx)
71 AC_PATH_PROG(DD, dd, dd)
72 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
73 AC_PATH_PROG(PYTHON, python, python)
74 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
75 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
76 AC_PATH_PROG(DVDRWFORMAT, dvd+rw-format, dvd+rw-format)
77 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
78 AC_ARG_VAR(WXCONFIG, [wx-config command. On some systems, you must set it to wx-config-2.6 to use wxWidgets 2.6.])
79 if test "x$WXCONFIG" = x; then
82 AC_PATH_PROG(WXCONFIG, ${WXCONFIG}, ${WXCONFIG})
83 AC_ARG_VAR(WXFLAGS, [Parameters to pass to wx-config (e.g. --unicode=no).])
84 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
85 AC_PATH_PROG(PIDOF, pidof, pidof)
87 # Some AWK programs fail, so test it and warn the user
88 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
89 { if ((prog == $2) || (("(" prog ")") == $2) ||
90 (("[" prog "]") == $2) ||
91 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
93 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
94 The regex engine of $AWK is too broken to be used you
95 might want to install GNU AWK.
96 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
99 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
101 test -n "$ARFLAG" || ARFLAGS="cr"
108 AC_SUBST(LOCAL_CFLAGS)
109 AC_SUBST(LOCAL_LDFLAGS)
112 dnl --------------------------------------------------
113 dnl Bacula OP Sys determination (see aclocal.m4)
114 dnl --------------------------------------------------
117 # -----------------------------------------------------------
118 dnl Bacula OPSys Distribution determination (see aclocal.m4)
119 # ----------------------------------------------------------
120 BA_CHECK_OPSYS_DISTNAME
122 # --------------------------------------------------
123 # Suppport for gettext (translations)
124 # By default, $datadir is ${prefix}/share
125 # --------------------------------------------------
126 AM_GNU_GETTEXT([external])
127 if test x${prefix} = xNONE ; then
128 if test `eval echo ${datadir}` = NONE/share ; then
133 # ------------------------------------------------------------------
134 # If the user has not set --prefix, we set our default to nothing.
135 # In this case, if the user has not set --sysconfdir, we set it
136 # to the package default of /etc/bacula. If either --prefix or
137 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
138 # ------------------------------------------------------------------
139 if test x${prefix} = xNONE ; then
140 if test `eval echo ${sysconfdir}` = NONE/etc ; then
141 sysconfdir=/etc/bacula
145 sysconfdir=`eval echo ${sysconfdir}`
146 datadir=`eval echo ${datadir}`
147 localedir=`eval echo ${datadir}/locale`
148 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
150 # -------------------------------------------------------------------------
151 # If the user has not set --exec-prefix, we default to ${prefix}
152 # -------------------------------------------------------------------------
153 if test x${exec_prefix} = xNONE ; then
154 exec_prefix=${prefix}
157 # ------------------------------------------------------------------
158 # If the user has not set --sbindir, we set our default as /sbin
159 # ------------------------------------------------------------------
160 if test x$sbindir = x'${exec_prefix}/sbin' ; then
161 sbindir=${exec_prefix}/sbin
163 sbindir=`eval echo ${sbindir}`
165 # -------------------------------------------------------------------------
166 # If the user has not set --mandir, we default to /usr/share/man
167 # -------------------------------------------------------------------------
168 if test x$mandir = x'${prefix}/man' ; then
169 mandir=/usr/share/man
173 # ------------------------------------------------------------------
174 # All list of languages for which a translation exist. Each
175 # language is separated by a space.
176 # ------------------------------------------------------------------
179 AC_PATH_PROGS(MSGFMT, msgfmt, no)
180 if test "$MSGFMT" = "no"
182 echo 'msgfmt program not found, disabling NLS !'
184 USE_INCLUDED_LIBINTL=no
193 support_postgresql=no
194 support_smartalloc=yes
198 support_wx_console=no
203 support_static_tools=no
206 support_static_dir=no
207 support_static_cons=no
216 dnl# --------------------------------------------------------------------------
217 dnl# CHECKING COMMAND LINE OPTIONS
218 dnl# --------------------------------------------------------------------------
220 # -------------------------------------------
221 # gnome (default off)
222 # -------------------------------------------
224 [ --enable-gnome enable build of gnome-console GUI [disabled]],
225 [if test x$enableval = xyes; then
230 if test x$support_gnome = xyes; then
231 abc=`$PKGCONFIG --exists libgnomeui-2.0`
233 if test $pkg = 0; then
234 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
235 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
236 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
237 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
238 AC_SUBST(GNOME_INCLUDEDIR)
239 AC_SUBST(GNOMEUI_LIBS)
240 AC_SUBST(GNOME_LIBDIR)
242 GNOME_DIR=src/gnome2-console
243 gnome_version="Version 2.x"
245 AC_MSG_ERROR(Unable to find Gnome 2 installation)
251 # -------------------------------------------
252 # wx-console (default off)
253 # -------------------------------------------
254 AC_ARG_ENABLE(wx-console,
255 [ --enable-wx-console enable build of wxWidgets console [disabled]],
256 [if test x$enableval = xyes; then
257 support_wx_console=yes
261 if test x$support_wx_console = xyes; then
262 abc=`$WXCONFIG $WXFLAGS --cppflags`
264 if test $pkg = 0; then
265 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
266 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
267 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
269 AC_SUBST(WXCONS_CPPFLAGS)
270 AC_SUBST(WXCONS_LDFLAGS)
271 WX_DIR=src/wx-console
274 echo "wx-config program not found. wx-console disabled."
276 support_wx_console=no
282 # -------------------------------------------
283 # tray-monitor (default off)
284 # -------------------------------------------
285 AC_ARG_ENABLE(tray-monitor,
286 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
287 [if test x$enableval = xyes; then
288 support_tray_monitor=yes
292 if test x$support_tray_monitor = xyes; then
293 abc=`$PKGCONFIG --exists gtk+-2.0`
295 if test $pkg = 0; then
296 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
297 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
298 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
299 AC_SUBST(TRAY_MONITOR_LDFLAGS)
300 TRAY_MONITOR_DIR=src/tray-monitor
301 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
303 if test $pkg = 0; then
304 AC_DEFINE(HAVE_GTK_2_4)
308 AC_SUBST(TRAY_MONITOR_DIR)
310 # -------------------------------------------
311 # smartalloc (default off)
312 # -------------------------------------------
313 AC_ARG_ENABLE(smartalloc,
314 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
315 [if test x$enableval = xno; then
316 support_smartalloc=no
319 if test x$support_smartalloc = xyes; then
320 AC_DEFINE(SMARTALLOC)
323 # -------------------------------------------
324 # static-tools (default off)
325 # -------------------------------------------
326 AC_ARG_ENABLE(static-tools,
327 [ --enable-static-tools enable static tape tools [disabled]],
328 [if test x$enableval = xyes; then
329 support_static_tools=yes
333 if test x$support_static_tools = xyes; then
334 TTOOL_LDFLAGS="-static"
336 AC_SUBST(TTOOL_LDFLAGS)
338 # -------------------------------------------
339 # static-fd (default off)
340 # -------------------------------------------
341 AC_ARG_ENABLE(static-fd,
342 [ --enable-static-fd enable static File daemon [disabled]],
343 [if test x$enableval = xyes; then
344 support_static_fd=yes
348 if test x$support_static_fd = xyes; then
349 STATIC_FD="static-bacula-fd"
353 # -------------------------------------------
354 # static-sd (default off)
355 # -------------------------------------------
356 AC_ARG_ENABLE(static-sd,
357 [ --enable-static-sd enable static Storage daemon [disabled]],
358 [if test x$enableval = xyes; then
359 support_static_sd=yes
363 if test x$support_static_sd = xyes; then
364 STATIC_SD="static-bacula-sd"
368 # -------------------------------------------
369 # static-dir (default off)
370 # -------------------------------------------
371 AC_ARG_ENABLE(static-dir,
372 [ --enable-static-dir enable static Director [disabled]],
373 [if test x$enableval = xyes; then
374 support_static_dir=yes
378 if test x$support_static_dir = xyes; then
379 STATIC_DIR="static-bacula-dir"
383 # -------------------------------------------
384 # static-cons (default off)
385 # -------------------------------------------
386 AC_ARG_ENABLE(static-cons,
387 [ --enable-static-cons enable static Console [disabled]],
388 [if test x$enableval = xyes; then
389 support_static_cons=yes
395 if test x$support_static_cons = xyes; then
396 STATIC_CONS="static-bconsole"
397 STATIC_GNOME_CONS="static-gnome-console"
398 STATIC_WX_CONS="static-wx-console"
400 AC_SUBST(STATIC_CONS)
401 AC_SUBST(STATIC_GNOME_CONS)
402 AC_SUBST(STATIC_WX_CONS)
404 # -------------------------------------------
405 # client_only (default off)
406 # -------------------------------------------
407 AC_ARG_ENABLE(client-only,
408 [ --enable-client-only build client (File daemon) only [disabled]],
409 [if test x$enableval = xyes; then
410 build_client_only=yes
414 if test x$build_client_only = xno; then
421 # -------------------------------------------
422 # director (default on)
423 # -------------------------------------------
424 AC_ARG_ENABLE(build-dird,
425 [ --enable-build-dird enable building of dird (Director) [enabled]],
426 [if test x$enableval = xno; then
429 if test x$build_dird = xyes; then
434 DIR_TOOLS="NODIRTOOLS"
439 # -------------------------------------------
440 # stored (default on)
441 # -------------------------------------------
442 AC_ARG_ENABLE(build-stored,
443 [ --enable-build-stored enable building of stored (Storage daemon) [enabled]],
444 [if test x$enableval = xno; then
447 if test x$build_stored = xyes; then
448 STORED_DIR="src/stored"
454 # ---------------------------------------------------
455 # Check for conio (Bacula readline substitute)(
456 # ---------------------------------------------------
457 # this allows you to turn it completely off
459 [ --disable-conio disable conio support [enabled]
461 [if test x$enableval = xno; then
466 if test x$support_conio = xyes; then
467 AC_CHECK_HEADER(termcap.h,
468 [ AC_CHECK_LIB(termcap, tgetent,
469 [ CONS_LIBS="-ltermcap"
474 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
476 [ AC_CHECK_LIB(ncurses, tgetent,
477 [ CONS_LIBS="-lncurses"
482 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
487 AC_CHECK_HEADERS(curses.h)
488 AC_CHECK_HEADER(term.h,
489 [ AC_CHECK_LIB(curses, tgetent,
490 [ CONS_LIBS="-lcurses"
495 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
498 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
507 # ---------------------------------------------------
508 # Check for readline support/directory (default off)
509 # ---------------------------------------------------
510 # this allows you to turn it completely off
511 AC_ARG_ENABLE(readline,
512 [ --disable-readline disable readline support [disable]
514 [if test x$enableval = xno; then
520 if test x$support_readline = xyes; then
521 AC_ARG_WITH(readline,
522 [ --with-readline=DIR specify readline library directory],
524 case "$with_readline" in
527 if test -f ${with_readline}/readline.h; then
528 CONS_INC="-I${with_readline}"
529 CONS_LDFLAGS="-L$with_readline"
530 elif test -f ${with_readline}/include/readline/readline.h; then
531 CONS_INC="-I${with_readline}/include/readline"
532 CONS_LDFLAGS="-L${with_readline}/lib"
533 with_readline="${with_readline}/include/readline"
535 with_readline="/usr/include/readline"
537 AC_CHECK_HEADER(${with_readline}/readline.h,
538 [ AC_DEFINE(HAVE_READLINE)
539 CONS_LIBS="-lreadline -lhistory -ltermcap"
543 echo "readline.h not found. readline turned off ..."
550 # check for standard readline library
551 AC_CHECK_HEADER(/usr/include/readline/readline.h,
552 [ AC_DEFINE(HAVE_READLINE)
554 CONS_INC="-I/usr/include/readline"
555 CONS_LIBS="-lreadline -ltermcap"
557 # Did not find standard library, so try Bacula's default
558 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
559 [ AC_DEFINE(HAVE_READLINE)
561 CONS_INC="-I${TOP_DIR}/depkgs/readline"
562 CONS_LIBS="-lreadline -lhistory -ltermcap"
563 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
564 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
567 echo "readline.h not found. readline turned off ..."
583 AC_SUBST(CONS_LDFLAGS)
584 AC_SUBST(READLINE_SRC)
586 # Minimal stuff for readline Makefile configuration
591 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr lstat lchown)
592 AC_CHECK_FUNCS(nanosleep nl_langinfo)
593 AC_CHECK_HEADERS(varargs.h)
595 # End of readline/conio stuff
596 # -----------------------------------------------------------------------
598 # -----------------------------------------------------------------------
599 # Check for Python support
601 AC_MSG_CHECKING(for Python support)
604 --with-python[=DIR] Include Python support. DIR is the Python base
605 install directory, default is to search through
606 a number of common places for the Python files.],
610 if test "$withval" != "no"; then
611 if test "$withval" = "yes"; then
612 for python_root in /usr /usr/local /usr/sfw; do
613 if test -f $python_root/include/python2.2/Python.h; then
614 PYTHON_INCDIR=-I$python_root/include/python2.2
615 if test -d $python_root/lib64/python2.2/config; then
616 PYTHON_LIBS="-L$python_root/lib64/python2.2/config -lpython2.2"
618 PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
621 elif test -f $python_root/include/python2.3/Python.h; then
622 PYTHON_INCDIR=-I$python_root/include/python2.3
623 if test -d $python_root/lib64/python2.3/config; then
624 PYTHON_LIBS="-L$python_root/lib64/python2.3/config -lpython2.3"
626 PYTHON_LIBS="-L$python_root/lib/python2.3/config -lpython2.3"
629 elif test -f $python_root/include/python2.4/Python.h; then
630 PYTHON_INCDIR=-I$python_root/include/python2.4
631 if test -d $python_root/lib64/python2.4/config; then
632 PYTHON_LIBS="-L$python_root/lib64/python2.4/config -lpython2.4"
634 PYTHON_LIBS="-L$python_root/lib/python2.4/config -lpython2.4"
639 if test x$PYTHON_INCDIR = x; then
640 if test -f $prefix/include/Python.h; then
641 PYTHON_INCDIR=-I$prefix/include
642 if test -d $prefix/lib64/config; then
643 PYTHON_LIBS="-L$prefix/lib64/config -lpython"
645 PYTHON_LIBS="-L$prefix/lib/config -lpython"
649 AC_MSG_ERROR(Unable to find Python.h in standard locations)
653 if test -f $withval/Python.h; then
654 PYTHON_INCDIR=-I$withval
655 PYTHON_LIBS="-L$withval/config -lpython"
656 elif test -f $withval/include/Python.h; then
657 PYTHON_INCDIR=-I$withval/include
658 if test -d $withval/lib64/config; then
659 PYTHON_LIBS="-L$withval/lib64/config -lpython"
661 PYTHON_LIBS="-L$withval/lib/config -lpython"
663 elif test -f $withval/include/python/Python.h; then
664 PYTHON_INCDIR=-I$withval/include/python
665 if test -d $withval/lib64/python/config; then
666 PYTHON_LIBS="-L$withval/lib64/python/config -lpython"
668 PYTHON_LIBS="-L$withval/lib/python/config -lpython"
672 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
675 AC_DEFINE([HAVE_PYTHON], 1)
678 AC_MSG_NOTICE(checking for more Python libs)
679 saved_LIBS="$LIBS"; LIBS=
680 AC_SEARCH_LIBS(shm_open, [rt])
681 AC_CHECK_LIB(util, openpty)
682 PYTHON_LIBS="$PYTHON_LIBS $LIBS"
690 AC_SUBST(PYTHON_LIBS)
691 AC_SUBST(PYTHON_INCDIR)
695 # Find where sockets are (especially for Solaris)
696 # Do this before the TCP Wrappers test since tcp wrappers
697 # uses the socket library and some linkers are stupid.
699 AC_CHECK_FUNC(socket,
700 AC_MSG_RESULT(using libc's socket),
701 AC_CHECK_LIB(xnet,socket)
702 AC_CHECK_LIB(socket,socket)
703 AC_CHECK_LIB(inet,socket))
706 # -----------------------------------------------------------
707 # Check whether user wants TCP wrappers support (default off)
708 # -----------------------------------------------------------
711 AC_ARG_WITH(tcp-wrappers,
712 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
714 if test "x$withval" != "xno" ; then
716 LIBS="$saved_LIBS -lwrap"
717 AC_MSG_CHECKING(for libwrap)
718 AC_SEARCH_LIBS(nanosleep, [rt])
720 [ #include <sys/types.h>
722 int deny_severity = 0;
723 int allow_severity = 0;
724 struct request_info *req; ],
725 [ hosts_access(req); ],
728 AC_DEFINE(HAVE_LIBWRAP)
733 LIBS="$saved_LIBS -lwrap -lnsl"
734 WRAPLIBS="$saved_LIBS -lwrap -lnsl"
736 [ #include <sys/types.h>
738 int deny_severity = 0;
739 int allow_severity = 0;
740 struct request_info *req; ],
741 [ hosts_access(req); ],
744 AC_DEFINE(HAVE_LIBWRAP)
749 [AC_MSG_ERROR([*** libwrap missing]) ] ]
756 # -----------------------------------------------------------
757 # Check whether OpenSSL is available
758 # -----------------------------------------------------------
759 AC_MSG_CHECKING([for OpenSSL])
760 dnl The following uses quadrigraphs:
764 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
765 [with_openssl_directory=${withval}])
767 if test "x$with_openssl_directory" != "x"; then
768 OPENSSL_LIBS="-lssl -lcrypto"
771 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
772 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
773 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
777 saved_CFLAGS="$CFLAGS"
778 LIBS="$saved_LIBS $OPENSSL_LIBS"
779 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
781 AC_TRY_LINK([ #include <openssl/ssl.h> ],
782 [ CRYPTO_set_id_callback(NULL); ],
790 AC_TRY_LINK([ #include <openssl/evp.h> ],
792 [ ac_cv_openssl_sha2="yes" ],
793 [ ac_cv_openssl_sha2="no" ]
797 CFLAGS="$saved_CFLAGS"
799 if test "$support_tls" = "yes"; then
800 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
801 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
802 AC_DEFINE(HAVE_CRYPTO, 1, [Define if encryption support should be enabled])
805 if test "$ac_cv_openssl_sha2" = "yes"; then
806 AC_DEFINE(HAVE_SHA2, 1, [Define if the SHA-2 family of digest algorithms is available])
815 AC_MSG_RESULT([$support_tls])
816 AC_SUBST(OPENSSL_LIBS)
817 AC_SUBST(OPENSSL_INC)
820 # -----------------------------------------------------------
821 # Python and OpenSSL are using dlopen
822 # -----------------------------------------------------------
824 if test "$support_python" = "yes" -o "$support_tls" = "yes"; then
825 AC_SEARCH_LIBS(dlopen, [dl])
828 # ------------------------------------------
829 # Where to place working dir
830 # ------------------------------------------
831 working_dir=`eval echo ${prefix}/var/bacula/working`
832 AC_ARG_WITH(working-dir,
833 [ --with-working-dir=PATH specify path of Bacula working directory],
835 if test "x$withval" != "xno" ; then
841 AC_SUBST(working_dir)
844 # ------------------------------------------
845 # Where to place scriptdir (script files)
846 # ------------------------------------------
847 scriptdir=`eval echo ${sysconfdir}`
848 AC_ARG_WITH(scriptdir,
849 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
851 if test "x$withval" != "xno" ; then
860 # ------------------------------------------
861 # Where to send dump email
862 # ------------------------------------------
863 dump_email=root@localhost
864 AC_ARG_WITH(dump-email,
865 [ --with-dump-email=EMAIL dump email address],
867 if test "x$withval" != "xno" ; then
875 # ------------------------------------------
876 # Where to send job email
877 # ------------------------------------------
878 job_email=root@localhost
879 AC_ARG_WITH(job-email,
880 [ --with-job-email=EMAIL job output email address],
882 if test "x$withval" != "xno" ; then
890 # ------------------------------------------
891 # Where to find smtp host
892 # ------------------------------------------
894 AC_ARG_WITH(smtp_host,
895 [ --with-smtp-host=HOST SMTP mail host address],
897 if test "x$withval" != "xno" ; then
906 # ------------------------------------
907 # Where to place pid files
908 # ------------------------------------
911 [ --with-pid-dir=PATH specify location of Bacula pid files],
913 if test "x$withval" != "xno" ; then
919 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
923 # ------------------------------------
924 # Where to place subsys "lock file"
925 # ------------------------------------
926 subsysdir=/var/run/subsys
927 AC_ARG_WITH(subsys-dir,
928 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
930 if test "x$withval" != "xno" ; then
940 # ------------------------------------
941 # Where to start assigning ports
942 # ------------------------------------
944 AC_ARG_WITH(baseport,
945 [ --with-baseport=PORT specify base port address for daemons],
947 if test "x$withval" != "xno" ; then
954 dir_port=`expr $baseport`
955 fd_port=`expr $baseport + 1`
956 sd_port=`expr $fd_port + 1`
963 # ------------------------------------------
965 # ------------------------------------------
967 AC_ARG_WITH(dir-password,
968 [ --with-dir-password=PASSWORD specify Director's password],
970 if test "x$withval" != "xno" ; then
971 dir_password=$withval
976 if test "x$dir_password" = "x" ; then
977 if test "x$OPENSSL" = "xnone" ; then
978 key=`autoconf/randpass 33`
980 key=`openssl rand -base64 33`
986 AC_ARG_WITH(fd-password,
987 [ --with-fd-password=PASSWORD specify Client's password],
989 if test "x$withval" != "xno" ; then
995 if test "x$fd_password" = "x" ; then
996 if test "x$OPENSSL" = "xnone" ; then
997 key=`autoconf/randpass 37`
999 key=`openssl rand -base64 33`
1005 AC_ARG_WITH(sd-password,
1006 [ --with-sd-password=PASSWORD specify Storage daemon's password],
1008 if test "x$withval" != "xno" ; then
1009 sd_password=$withval
1014 if test "x$sd_password" = "x" ; then
1015 if test "x$OPENSSL" = "xnone" ; then
1016 key=`autoconf/randpass 41`
1018 key=`openssl rand -base64 33`
1024 AC_ARG_WITH(mon-dir-password,
1025 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
1027 if test "x$withval" != "xno" ; then
1028 mon_dir_password=$withval
1033 if test "x$mon_dir_password" = "x" ; then
1034 if test "x$OPENSSL" = "xnone" ; then
1035 key=`autoconf/randpass 33`
1037 key=`openssl rand -base64 33`
1039 mon_dir_password=$key
1043 AC_ARG_WITH(mon-fd-password,
1044 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
1046 if test "x$withval" != "xno" ; then
1047 mon_fd_password=$withval
1052 if test "x$mon_fd_password" = "x" ; then
1053 if test "x$OPENSSL" = "xnone" ; then
1054 key=`autoconf/randpass 37`
1056 key=`openssl rand -base64 33`
1058 mon_fd_password=$key
1062 AC_ARG_WITH(mon-sd-password,
1063 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
1065 if test "x$withval" != "xno" ; then
1066 mon_sd_password=$withval
1071 if test "x$mon_sd_password" = "x" ; then
1072 if test "x$OPENSSL" = "xnone" ; then
1073 key=`autoconf/randpass 41`
1075 key=`openssl rand -base64 33`
1077 mon_sd_password=$key
1080 AC_SUBST(dir_password)
1081 AC_SUBST(fd_password)
1082 AC_SUBST(sd_password)
1083 AC_SUBST(mon_dir_password)
1084 AC_SUBST(mon_fd_password)
1085 AC_SUBST(mon_sd_password)
1089 # Handle users and groups for each daemon
1092 AC_ARG_WITH(dir_user,
1093 [ --with-dir-user=USER specify user for Director daemon],
1095 if test "x$withval" != "x" ; then
1102 AC_ARG_WITH(dir_group,
1103 [ --with-dir-group=GROUP specify group for Director daemon],
1105 if test "x$withval" != "x" ; then
1112 AC_ARG_WITH(sd_user,
1113 [ --with-sd-user=USER specify user for Storage daemon],
1115 if test "x$withval" != "x" ; then
1122 AC_ARG_WITH(sd_group,
1123 [ --with-sd-group=GROUP specify group for Storage daemon],
1125 if test "x$withval" != "x" ; then
1132 AC_ARG_WITH(fd_user,
1133 [ --with-fd-user=USER specify user for File daemon],
1135 if test "x$withval" != "x" ; then
1142 AC_ARG_WITH(fd_group,
1143 [ --with-fd-group=GROUP specify group for File daemon],
1145 if test "x$withval" != "x" ; then
1162 # allow setting default executable permissions
1165 AC_ARG_WITH(sbin-perm,
1166 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1168 if test "x$withval" != "x" ; then
1176 # ------------------------------------------------
1177 # Bacula check for various SQL database engines
1178 # ------------------------------------------------
1179 BA_CHECK_POSTGRESQL_DB
1190 AC_DEFINE(PROTOTYPES)
1192 dnl# --------------------------------------------------------------------------
1193 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1195 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1196 if test -z "$CCOPTS"; then
1197 CCOPTS='-g -O2 -Wall'
1206 dnl See if we can use 64 bit file addresses
1207 largefile_support="no"
1213 dnl# --------------------------------------------------------------------------
1214 dnl# CHECKING FOR HEADER FILES
1215 dnl# --------------------------------------------------------------------------
1251 AC_STRUCT_ST_BLKSIZE
1255 dnl# --------------------------------------------------------------------------
1256 dnl# Check for utime.h structure
1257 dnl# --------------------------------------------------------------------------
1258 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1260 #include <sys/types.h>
1261 #include <utime.h>], [struct utimbuf foo],
1262 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1263 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1265 dnl# --------------------------------------------------------------------------
1266 dnl# Check for socklen_t
1267 dnl# --------------------------------------------------------------------------
1268 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1270 #include <sys/types.h>
1271 #include <sys/socket.h>],
1273 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1274 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1276 dnl# --------------------------------------------------------------------------
1277 dnl# Check for bigendian
1278 dnl# --------------------------------------------------------------------------
1279 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1281 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1282 [ba_cv_bigendian=yes],
1283 [ba_cv_bigendian=no],
1284 [ba_cv_bigendian=no])])
1285 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1287 dnl# --------------------------------------------------------------------------
1288 dnl# Check for typeof()
1289 dnl# --------------------------------------------------------------------------
1291 AC_CACHE_CHECK(for typeof, ba_cv_have_typeof,
1293 [main(){char *a = 0; a = (typeof a)a;}],
1294 [ba_cv_have_typeof=yes],
1295 [ba_cv_have_typeof=no],
1296 [ba_cv_have_typeof=no])])
1297 test $ba_cv_have_typeof = yes && AC_DEFINE([HAVE_TYPEOF], 1, [Defind to 1 if compiler has typeof])
1303 dnl# --------------------------------------------------------------------------
1304 dnl# CHECKING FOR FILESYSTEM TYPE
1305 dnl# --------------------------------------------------------------------------
1306 AC_MSG_CHECKING(how to get filesystem type)
1308 # The order of these tests is important.
1309 AC_TRY_CPP([#include <sys/statvfs.h>
1310 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1311 if test $fstype = no; then
1312 AC_TRY_CPP([#include <sys/statfs.h>
1313 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1315 if test $fstype = no; then
1316 AC_TRY_CPP([#include <sys/statfs.h>
1317 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1319 if test $fstype = no; then
1320 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1322 if test $fstype = no; then
1323 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1325 if test $fstype = no; then
1326 AC_TRY_CPP([#include <sys/mount.h>
1327 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1329 AC_MSG_RESULT($fstype)
1331 AC_CHECK_HEADER(sys/statvfs.h, [ AC_DEFINE(HAVE_SYS_STATVFS_H,1,[Defines if your system have the sys/statvfs.h header file])] , )
1333 dnl# --------------------------------------------------------------------------
1334 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1335 dnl# --------------------------------------------------------------------------
1343 AC_CHECK_TYPE(ino_t, unsigned long)
1344 AC_CHECK_TYPE(dev_t, unsigned long)
1345 AC_CHECK_TYPE(daddr_t, long)
1346 AC_CHECK_TYPE(major_t, int)
1347 AC_CHECK_TYPE(minor_t, int)
1348 AC_CHECK_TYPE(ssize_t, int)
1355 AC_CHECK_SIZEOF(char, 1)
1356 AC_CHECK_SIZEOF(short int, 2)
1357 AC_CHECK_SIZEOF(int, 4)
1358 AC_CHECK_SIZEOF(long int, 4)
1359 AC_CHECK_SIZEOF(long long int, 8)
1360 AC_CHECK_SIZEOF(int *, 4)
1362 # Check for sys/types.h types
1363 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1365 [ #include <sys/types.h> ],
1367 [ ac_cv_have_u_int="yes" ],
1368 [ ac_cv_have_u_int="no" ]
1371 if test "x$ac_cv_have_u_int" = "xyes" ; then
1372 AC_DEFINE(HAVE_U_INT)
1376 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1378 [ #include <sys/types.h> ],
1379 [ intmax_t a; a = 1;],
1380 [ ac_cv_have_intmax_t="yes" ],
1383 [ #include <stdint.h> ],
1384 [ intmax_t a; a = 1;],
1385 [ ac_cv_have_intmax_t="yes" ],
1386 [ ac_cv_have_intmax_t="no" ]
1392 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1393 AC_DEFINE(HAVE_INTMAX_T)
1398 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1400 [ #include <sys/types.h> ],
1401 [ u_intmax_t a; a = 1;],
1402 [ ac_cv_have_u_intmax_t="yes" ],
1405 [ #include <stdint.h> ],
1406 [ u_intmax_t a; a = 1;],
1407 [ ac_cv_have_u_intmax_t="yes" ],
1408 [ ac_cv_have_u_intmax_t="no" ]
1413 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1414 AC_DEFINE(HAVE_U_INTMAX_T)
1419 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1421 [ #include <sys/types.h> ],
1422 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1423 [ ac_cv_have_intxx_t="yes" ],
1424 [ ac_cv_have_intxx_t="no" ]
1427 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1428 AC_DEFINE(HAVE_INTXX_T)
1432 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1434 [ #include <sys/types.h> ],
1435 [ int64_t a; a = 1;],
1436 [ ac_cv_have_int64_t="yes" ],
1437 [ ac_cv_have_int64_t="no" ]
1440 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1441 AC_DEFINE(HAVE_INT64_T)
1445 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1447 [ #include <sys/types.h> ],
1448 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1449 [ ac_cv_have_u_intxx_t="yes" ],
1450 [ ac_cv_have_u_intxx_t="no" ]
1453 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1454 AC_DEFINE(HAVE_U_INTXX_T)
1458 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1460 [ #include <sys/types.h> ],
1461 [ u_int64_t a; a = 1;],
1462 [ ac_cv_have_u_int64_t="yes" ],
1463 [ ac_cv_have_u_int64_t="no" ]
1466 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1467 AC_DEFINE(HAVE_U_INT64_T)
1471 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1472 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1474 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1476 [ #include <sys/bitypes.h> ],
1477 [ int8_t a; int16_t b; int32_t c;
1478 u_int8_t e; u_int16_t f; u_int32_t g;
1479 a = b = c = e = f = g = 1; ],
1480 [ AC_DEFINE(HAVE_U_INTXX_T)
1481 AC_DEFINE(HAVE_INTXX_T)
1482 AC_DEFINE(HAVE_SYS_BITYPES_H)
1483 AC_MSG_RESULT(yes) ],
1484 [ AC_MSG_RESULT(no)]
1488 if test -z "$have_u_intxx_t" ; then
1489 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1491 [ #include <sys/types.h> ],
1492 [ uint8_t a; uint16_t b;
1493 uint32_t c; a = b = c = 1; ],
1494 [ ac_cv_have_uintxx_t="yes" ],
1495 [ ac_cv_have_uintxx_t="no" ]
1498 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1499 AC_DEFINE(HAVE_UINTXX_T)
1503 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1504 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1506 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1508 [ #include <sys/bitypes.h> ],
1509 [ int64_t a; u_int64_t b;
1511 [ AC_DEFINE(HAVE_U_INT64_T)
1512 AC_DEFINE(HAVE_INT64_T)
1513 AC_MSG_RESULT(yes) ],
1514 [ AC_MSG_RESULT(no)]
1518 if (test -z "$have_uintxx_t" && \
1519 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1521 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1523 [ #include <sys/bitypes.h> ],
1524 [ uint8_t a; uint16_t b;
1525 uint32_t c; a = b = c = 1; ],
1526 [ AC_DEFINE(HAVE_UINTXX_T)
1527 AC_MSG_RESULT(yes) ],
1528 [ AC_MSG_RESULT(no)]
1536 dnl# --------------------------------------------------------------------------
1537 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1538 dnl# --------------------------------------------------------------------------
1554 [echo 'configure: cannot find needed function.'; exit 1]
1557 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1558 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1560 AC_CHECK_FUNCS(chflags)
1562 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1564 dnl# --------------------------------------------------------------------------
1565 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1566 dnl# --------------------------------------------------------------------------
1567 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1569 # If resolver functions are not in libc check for -lnsl or -lresolv.
1570 AC_CHECK_FUNC(gethostbyname_r,
1571 AC_MSG_RESULT(using libc's resolver),
1572 AC_CHECK_LIB(nsl,gethostbyname_r)
1573 AC_CHECK_LIB(resolv,gethostbyname_r))
1577 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1578 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1579 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1581 dnl ----------------------------
1582 dnl check sa_len of sockaddr
1583 dnl ----------------------------
1584 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1585 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1586 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1588 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1589 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1593 dnl Check for IPv6 support
1594 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1595 [AC_TRY_LINK([ #include <sys/types.h>
1596 #include <sys/socket.h>
1597 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1599 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1601 if test "$ac_cv_ipv6_support" = yes; then
1602 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1611 AC_FUNC_CLOSEDIR_VOID
1612 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1613 # AC_FUNC_FNMATCH dnl use local version
1616 AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
1619 AC_CHECK_LIB(sun, getpwnam)
1621 AC_CHECK_HEADERS(zlib.h)
1622 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1624 if test x$FDLIBS = x-lz; then
1625 AC_DEFINE(HAVE_LIBZ)
1630 # Check for ACL libraries
1633 AC_CHECK_HEADER(sys/acl.h)
1634 AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
1635 [AC_CHECK_LIB(acl, acl_get_file, [have_acl=yes; FDLIBS="-lacl $FDLIBS"],
1636 [AC_CHECK_LIB(sec, acltotext, [have_acl=yes; FDLIBS="-lsec $FDLIBS"])]
1639 if test $have_acl = yes; then
1643 dnl Check for pthread libraries
1645 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1646 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1647 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1648 [AC_CHECK_FUNC(pthread_create)]
1659 if test x$have_gcc = xyes ; then
1660 CPPFLAGS="$CPPFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
1661 CFLAGS="$CFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
1663 LDFLAGS=${LDFLAGS--O}
1664 DB_LIBS="${SQL_LFLAGS}"
1665 CPPFLAGS="$CPPFLAGS"
1678 AC_SUBST(X_EXTRA_LIBS)
1683 dnl# extra configurable objects
1694 # Finally we set appropriate distribution specific
1695 # variables and defaults
1697 # PFILES are platform specific files
1698 PFILES="platforms/Makefile"
1702 hostname=`uname -n | cut -d '.' -f 1`
1703 if test x${hostname} = x ; then
1704 hostname="localhost"
1709 PSCMD="ps -e -o pid,comm"
1711 platforms/aix/Makefile"
1712 TAPEDRIVE="/dev/rmt0.1"
1716 PTHREAD_LIB="-lpthread -lexc"
1717 if test "${CC}" = "gcc" ; then
1724 TAPEDRIVE="/dev/nrmt0"
1727 DISTVER=`uname -a |awk '{print $3}'`
1728 TAPEDRIVE="/dev/nrmt0"
1729 PTHREAD_LIB="-pthread"
1730 CFLAGS="${CFLAGS} -pthread"
1731 PSCMD="ps -ax -o pid,command"
1735 platforms/bsdi/Makefile \
1736 platforms/bsdi/bacula-fd \
1737 platforms/bsdi/bacula-sd \
1738 platforms/bsdi/bacula-dir"
1739 largefile_support="yes"
1742 DISTVER=`uname -a |awk '{print $3}'`
1743 TAPEDRIVE="/dev/nrst0"
1746 WLDFLAGS="-mwindows"
1750 TAPEDRIVE="/dev/nst0"
1751 PSCMD="ps -e -o pid,command"
1754 platforms/darwin/Makefile"
1757 DISTVER=`cat /etc/debian_version`
1758 TAPEDRIVE="/dev/nrst0"
1759 PSCMD="ps -e -o pid,command"
1762 DISTVER=`uname -a |awk '{print $3}'`
1763 VER=`echo $DISTVER | cut -c 1`
1764 if test x$VER = x4 ; then
1765 PTHREAD_LIB="${PTHREAD_LIBS:--pthread}"
1766 CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS:--pthread}"
1770 TAPEDRIVE="/dev/nrsa0"
1771 PSCMD="ps -ax -o pid,command"
1773 platforms/freebsd/Makefile \
1774 platforms/freebsd/bacula-fd \
1775 platforms/freebsd/bacula-sd \
1776 platforms/freebsd/bacula-dir"
1777 largefile_support="yes"
1780 PSCMD="UNIX95=1 ps -e -o pid,comm"
1781 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1783 TAPEDRIVE="/dev/rmt/0hnb"
1784 PTHREAD_LIB="-lpthread"
1785 AC_DEFINE([_INCLUDE_LONGLONG])
1789 TAPEDRIVE="/dev/rmt/0cbn"
1790 PSCMD="ps -e -o pid,comm"
1792 platforms/irix/Makefile \
1793 platforms/irix/bacula-fd \
1794 platforms/irix/bacula-sd \
1795 platforms/irix/bacula-dir"
1798 DISTVER=`uname -a |awk '{print $3}'`
1801 TAPEDRIVE="/dev/nrst0"
1802 PSCMD="ps -ax -o pid,command"
1803 PTHREAD_LIB="-pthread"
1804 CFLAGS="${CFLAGS} -pthread"
1807 DISTVER=`uname -a |awk '{print $3}'`
1810 TAPEDRIVE="/dev/nrst0"
1811 PSCMD="ps -ax -o pid,command"
1812 PTHREAD_LIB="-pthread"
1813 CFLAGS="${CFLAGS} -pthread"
1815 platforms/openbsd/Makefile \
1816 platforms/openbsd/bacula-fd \
1817 platforms/openbsd/bacula-sd \
1818 platforms/openbsd/bacula-dir"
1821 if test -f /etc/whitebox-release ; then
1822 f=/etc/whitebox-release
1824 f=/etc/redhat-release
1826 if test `cat $f | grep release |\
1827 cut -f 3 -d ' '`x = "Enterprise"x ; then
1828 DISTVER="Enterprise "`cat $f | grep release |\
1831 DISTVER=`cat /etc/redhat-release | grep release |\
1834 TAPEDRIVE="/dev/nst0"
1835 PSCMD="ps -e -o pid,command"
1837 platforms/redhat/Makefile \
1838 platforms/redhat/bacula-fd \
1839 platforms/redhat/bacula-sd \
1840 platforms/redhat/bacula-dir \
1841 platforms/redhat/bacula.spec \
1845 DISTVER=`cat /etc/mandrake-release | grep release |\
1847 TAPEDRIVE="/dev/nst0"
1848 PSCMD="ps -e -o pid,command"
1850 platforms/mandrake/Makefile \
1851 platforms/mandrake/bacula-fd \
1852 platforms/mandrake/bacula-sd \
1853 platforms/mandrake/bacula-dir \
1854 platforms/mandrake/bacula.spec \
1858 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1859 TAPEDRIVE="/dev/nst0"
1860 PSCMD="ps -e -o pid,command"
1862 platforms/gentoo/Makefile \
1863 platforms/gentoo/bacula-init \
1864 platforms/gentoo/bacula-fd \
1865 platforms/gentoo/bacula-sd \
1866 platforms/gentoo/bacula-dir"
1869 DISTVER=`cat /etc/slackware-version`
1870 TAPEDRIVE="/dev/nst0"
1871 PSCMD="ps -e -o pid,command"
1873 platforms/slackware/Makefile \
1874 platforms/slackware/rc.bacula-fd \
1875 platforms/slackware/rc.bacula-sd \
1876 platforms/slackware/rc.bacula-dir\
1877 platforms/slackware/functions.bacula"
1881 TAPEDRIVE="/dev/rmt/0cbn"
1882 PSCMD="ps -e -o pid,comm"
1884 platforms/solaris/Makefile \
1885 platforms/solaris/bacula-fd \
1886 platforms/solaris/bacula-sd \
1887 platforms/solaris/bacula-dir"
1888 if test x$DISTVER = x5.6 ; then
1889 AC_DEFINE(HAVE_OLD_SOCKOPT)
1891 LIBS="$LIBS -lresolv"
1894 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1896 TAPEDRIVE="/dev/nst0"
1897 PSCMD="ps -e -o pid,command"
1899 platforms/suse/Makefile \
1900 platforms/suse/bacula-fd \
1901 platforms/suse/bacula-sd \
1902 platforms/suse/bacula-dir \
1903 platforms/suse/bacula \
1904 platforms/suse/bacula.spec"
1909 TAPEDRIVE="/dev/nst0"
1910 PSCMD="ps -e -o pid,command"
1912 platforms/suse/Makefile \
1913 platforms/suse/bacula-fd \
1914 platforms/suse/bacula-sd \
1915 platforms/suse/bacula-dir"
1919 TAPEDRIVE="/dev/nst0"
1922 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1928 LIBS="$PTHREAD_LIB $LIBS"
1930 AC_DEFINE_UNQUOTED(lld, "$lld")
1931 AC_DEFINE_UNQUOTED(llu, "$llu")
1939 dnl# common parts of the Makefile
1940 MCOMMON=./autoconf/Make.common
1941 AC_SUBST_FILE(MCOMMON)
1944 if test "x${subsysdir}" = "x${sbindir}" ; then
1947 echo "You have set both --sbindir and --with-subsys-dir"
1948 echo " equal to: ${subsysdir} "
1949 echo "This is not permitted. Please reconfigure."
1951 echo "Aborting configuration ..."
1957 AC_OUTPUT([autoconf/Make.common \
1960 scripts/startmysql \
1962 scripts/btraceback \
1968 scripts/bacula-ctl-dir \
1969 scripts/bacula-ctl-fd \
1970 scripts/bacula-ctl-sd \
1971 scripts/devel_bacula \
1974 scripts/bacula.desktop.gnome1 \
1975 scripts/bacula.desktop.gnome2 \
1976 scripts/bacula.desktop.gnome1.consolehelper \
1977 scripts/bacula.desktop.gnome2.consolehelper \
1978 scripts/bacula.desktop.gnome1.xsu \
1979 scripts/bacula.desktop.gnome2.xsu \
1980 scripts/gnome-console.console_apps \
1981 scripts/mtx-changer \
1982 scripts/disk-changer \
1983 scripts/dvd-handler \
1984 scripts/bacula-tray-monitor.desktop \
1985 scripts/logwatch/Makefile \
1986 scripts/logwatch/logfile.bacula.conf \
1987 scripts/wxconsole.console_apps \
1988 scripts/wxconsole.desktop.consolehelper \
1989 scripts/wxconsole.desktop.xsu \
1992 src/console/Makefile \
1993 src/console/bconsole.conf \
1994 src/gnome2-console/Makefile \
1995 src/gnome2-console/gnome-console.conf \
1996 src/wx-console/Makefile \
1997 src/wx-console/wx-console.conf \
1998 src/tray-monitor/Makefile \
1999 src/tray-monitor/tray-monitor.conf \
2001 src/dird/bacula-dir.conf \
2003 src/stored/Makefile \
2004 src/stored/bacula-sd.conf \
2005 src/filed/Makefile \
2006 src/filed/bacula-fd.conf \
2008 src/cats/make_catalog_backup \
2009 src/cats/delete_catalog_backup \
2010 src/cats/create_postgresql_database \
2011 src/cats/update_postgresql_tables \
2012 src/cats/make_postgresql_tables \
2013 src/cats/grant_postgresql_privileges \
2014 src/cats/drop_postgresql_tables \
2015 src/cats/drop_postgresql_database \
2016 src/cats/create_mysql_database \
2017 src/cats/update_mysql_tables \
2018 src/cats/make_mysql_tables \
2019 src/cats/grant_mysql_privileges \
2020 src/cats/drop_mysql_tables \
2021 src/cats/drop_mysql_database \
2022 src/cats/create_sqlite_database \
2023 src/cats/update_sqlite_tables \
2024 src/cats/make_sqlite_tables \
2025 src/cats/grant_sqlite_privileges \
2026 src/cats/drop_sqlite_tables \
2027 src/cats/drop_sqlite_database \
2028 src/cats/create_sqlite3_database \
2029 src/cats/update_sqlite3_tables \
2030 src/cats/make_sqlite3_tables \
2031 src/cats/grant_sqlite3_privileges \
2032 src/cats/drop_sqlite3_tables \
2033 src/cats/drop_sqlite3_database \
2036 src/cats/create_bdb_database \
2037 src/cats/update_bdb_tables \
2038 src/cats/make_bdb_tables \
2039 src/cats/grant_bdb_privileges \
2040 src/cats/drop_bdb_tables \
2041 src/cats/drop_bdb_database \
2042 src/cats/create_bacula_database \
2043 src/cats/update_bacula_tables \
2044 src/cats/grant_bacula_privileges \
2045 src/cats/make_bacula_tables \
2046 src/cats/drop_bacula_tables \
2047 src/cats/drop_bacula_database \
2048 src/findlib/Makefile \
2049 src/pygtk-console/Makefile \
2050 src/tools/Makefile \
2053 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
2057 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2058 chmod 755 dvd-handler
2059 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2064 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2065 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2067 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2068 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2070 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2071 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2073 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2074 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2076 chmod 755 $c/create_sqlite3_database $c/update_sqlite3_tables $c/make_sqlite3_tables
2077 chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
2079 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2080 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2082 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2086 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2087 largefile_support="yes"
2091 # A whole lot of hand springs to get the compiler version.
2092 # This is because gcc changed the output in version 3.0
2094 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2095 if test "x${CCVERSION}" = "x" ; then
2096 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2098 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2099 if test x"${CXXVERSION}" = x ; then
2100 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2103 if test "x${subsysdir}" = "x${sbindir}" ; then
2106 echo "You have set --sbindir and --with-subsys-dir"
2107 echo " both equal to: ${subsysdir} "
2108 echo " This is not permitted. Please reconfigure."
2110 echo "Aborting configuration ..."
2116 if test "x${db_name}" = "xInternal" ; then
2119 echo "You have not specified either --enable-client-only or one of the"
2120 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
2121 echo " This is not permitted. Please reconfigure."
2123 echo "Aborting the configuration ..."
2130 Configuration on `date`:
2132 Host: $host -- ${DISTNAME} ${DISTVER}
2133 Bacula version: ${VERSION} (${DATE})
2134 Source code location: ${srcdir}
2135 Install binaries: ${sbindir}
2136 Install config files: ${sysconfdir}
2137 Scripts directory: ${scriptdir}
2138 Working directory: ${working_dir}
2139 PID directory: ${piddir}
2140 Subsys directory: ${subsysdir}
2141 Man directory: ${mandir}
2142 Data directory: ${datadir}
2143 C Compiler: ${CC} ${CCVERSION}
2144 C++ Compiler: ${CXX} ${CXXVERSION}
2145 Compiler flags: ${WCFLAGS} ${CFLAGS}
2146 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2148 Statically Linked Tools: ${support_static_tools}
2149 Statically Linked FD: ${support_static_fd}
2150 Statically Linked SD: ${support_static_sd}
2151 Statically Linked DIR: ${support_static_dir}
2152 Statically Linked CONS: ${support_static_cons}
2153 Database type: ${db_name}
2154 Database lib: ${DB_LIBS}
2156 Job Output Email: ${job_email}
2157 Traceback Email: ${dump_email}
2158 SMTP Host Address: ${smtp_host}
2160 Director Port: ${dir_port}
2161 File daemon Port: ${fd_port}
2162 Storage daemon Port: ${sd_port}
2164 Director User: ${dir_user}
2165 Director Group: ${dir_group}
2166 Storage Daemon User: ${sd_user}
2167 Storage DaemonGroup: ${sd_group}
2168 File Daemon User: ${fd_user}
2169 File Daemon Group: ${fd_group}
2171 SQL binaries Directory ${SQL_BINDIR}
2173 Large file support: $largefile_support
2174 Bacula conio support: ${got_conio} ${CONS_LIBS}
2175 readline support: ${got_readline} ${PRTREADLINE_SRC}
2176 TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
2177 TLS support: ${support_tls}
2178 Encryption support: ${support_crypto}
2179 ZLIB support: ${have_zlib}
2180 enable-smartalloc: ${support_smartalloc}
2181 enable-gnome: ${support_gnome} ${gnome_version}
2182 enable-wx-console: ${support_wx_console} ${wx_version}
2183 enable-tray-monitor: ${support_tray_monitor}
2184 client-only: ${build_client_only}
2185 build-dird: ${build_dird}
2186 build-stored: ${build_stored}
2187 ACL support: ${have_acl}
2188 Python support: ${support_python} ${PYTHON_LIBS}