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 PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
617 elif test -f $python_root/include/python2.3/Python.h; then
618 PYTHON_INCDIR=-I$python_root/include/python2.3
619 PYTHON_LIBS="-L$python_root/lib/python2.3/config -lpython2.3"
621 elif test -f $python_root/include/python2.4/Python.h; then
622 PYTHON_INCDIR=-I$python_root/include/python2.4
623 PYTHON_LIBS="-L$python_root/lib/python2.4/config -lpython2.4"
627 if test x$PYTHON_INCDIR = x; then
628 if test -f $prefix/include/Python.h; then
629 PYTHON_INCDIR=-I$prefix/include
630 PYTHON_LIBS="-L$prefix/lib/config -lpython"
633 AC_MSG_ERROR(Unable to find Python.h in standard locations)
637 if test -f $withval/Python.h; then
638 PYTHON_INCDIR=-I$withval
639 PYTHON_LIBS="-L$withval/config -lpython"
640 elif test -f $withval/include/Python.h; then
641 PYTHON_INCDIR=-I$withval/include
642 PYTHON_LIBS="-L$withval/lib/config -lpython"
643 elif test -f $withval/include/python/Python.h; then
644 PYTHON_INCDIR=-I$withval/include/python
645 PYTHON_LIBS="-L$withval/lib/python/config -lpython"
648 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
651 AC_DEFINE([HAVE_PYTHON], 1)
654 AC_MSG_NOTICE(checking for more Python libs)
655 saved_LIBS="$LIBS"; LIBS=
656 AC_SEARCH_LIBS(shm_open, [rt])
657 AC_CHECK_LIB(util, openpty)
658 PYTHON_LIBS="$PYTHON_LIBS $LIBS"
666 AC_SUBST(PYTHON_LIBS)
667 AC_SUBST(PYTHON_INCDIR)
671 # Find where sockets are (especially for Solaris)
672 # Do this before the TCP Wrappers test since tcp wrappers
673 # uses the socket library and some linkers are stupid.
675 AC_CHECK_FUNC(socket,
676 AC_MSG_RESULT(using libc's socket),
677 AC_CHECK_LIB(xnet,socket)
678 AC_CHECK_LIB(socket,socket)
679 AC_CHECK_LIB(inet,socket))
682 # -----------------------------------------------------------
683 # Check whether user wants TCP wrappers support (default off)
684 # -----------------------------------------------------------
687 AC_ARG_WITH(tcp-wrappers,
688 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
690 if test "x$withval" != "xno" ; then
692 LIBS="$saved_LIBS -lwrap"
693 AC_MSG_CHECKING(for libwrap)
694 AC_SEARCH_LIBS(nanosleep, [rt])
696 [ #include <sys/types.h>
698 int deny_severity = 0;
699 int allow_severity = 0;
700 struct request_info *req; ],
701 [ hosts_access(req); ],
704 AC_DEFINE(HAVE_LIBWRAP)
709 LIBS="$saved_LIBS -lwrap -lnsl"
710 WRAPLIBS="$saved_LIBS -lwrap -lnsl"
712 [ #include <sys/types.h>
714 int deny_severity = 0;
715 int allow_severity = 0;
716 struct request_info *req; ],
717 [ hosts_access(req); ],
720 AC_DEFINE(HAVE_LIBWRAP)
725 [AC_MSG_ERROR([*** libwrap missing]) ] ]
732 # -----------------------------------------------------------
733 # Check whether OpenSSL is available
734 # -----------------------------------------------------------
735 AC_MSG_CHECKING([for OpenSSL])
736 dnl The following uses quadrigraphs:
740 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
741 [with_openssl_directory=${withval}])
743 if test "x$with_openssl_directory" != "x"; then
744 OPENSSL_LIBS="-lssl -lcrypto"
747 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
748 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
749 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
753 saved_CFLAGS="$CFLAGS"
754 LIBS="$saved_LIBS $OPENSSL_LIBS"
755 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
757 AC_TRY_LINK([ #include <openssl/ssl.h> ],
758 [ CRYPTO_set_id_callback(NULL); ],
766 AC_TRY_LINK([ #include <openssl/evp.h> ],
768 [ ac_cv_openssl_sha2="yes" ],
769 [ ac_cv_openssl_sha2="no" ]
773 CFLAGS="$saved_CFLAGS"
775 if test "$support_tls" = "yes"; then
776 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
777 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
778 AC_DEFINE(HAVE_CRYPTO, 1, [Define if encryption support should be enabled])
781 if test "$ac_cv_openssl_sha2" = "yes"; then
782 AC_DEFINE(HAVE_SHA2, 1, [Define if the SHA-2 family of digest algorithms is available])
791 AC_MSG_RESULT([$support_tls])
792 AC_SUBST(OPENSSL_LIBS)
793 AC_SUBST(OPENSSL_INC)
796 # -----------------------------------------------------------
797 # Python and OpenSSL are using dlopen
798 # -----------------------------------------------------------
800 if test "$support_python" = "yes" -o "$support_tls" = "yes"; then
801 AC_SEARCH_LIBS(dlopen, [dl])
804 # ------------------------------------------
805 # Where to place working dir
806 # ------------------------------------------
807 working_dir=`eval echo ${prefix}/var/bacula/working`
808 AC_ARG_WITH(working-dir,
809 [ --with-working-dir=PATH specify path of Bacula working directory],
811 if test "x$withval" != "xno" ; then
817 AC_SUBST(working_dir)
820 # ------------------------------------------
821 # Where to place scriptdir (script files)
822 # ------------------------------------------
823 scriptdir=`eval echo ${sysconfdir}`
824 AC_ARG_WITH(scriptdir,
825 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
827 if test "x$withval" != "xno" ; then
836 # ------------------------------------------
837 # Where to send dump email
838 # ------------------------------------------
839 dump_email=root@localhost
840 AC_ARG_WITH(dump-email,
841 [ --with-dump-email=EMAIL dump email address],
843 if test "x$withval" != "xno" ; then
851 # ------------------------------------------
852 # Where to send job email
853 # ------------------------------------------
854 job_email=root@localhost
855 AC_ARG_WITH(job-email,
856 [ --with-job-email=EMAIL job output email address],
858 if test "x$withval" != "xno" ; then
866 # ------------------------------------------
867 # Where to find smtp host
868 # ------------------------------------------
870 AC_ARG_WITH(smtp_host,
871 [ --with-smtp-host=HOST SMTP mail host address],
873 if test "x$withval" != "xno" ; then
882 # ------------------------------------
883 # Where to place pid files
884 # ------------------------------------
887 [ --with-pid-dir=PATH specify location of Bacula pid files],
889 if test "x$withval" != "xno" ; then
895 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
899 # ------------------------------------
900 # Where to place subsys "lock file"
901 # ------------------------------------
902 subsysdir=/var/run/subsys
903 AC_ARG_WITH(subsys-dir,
904 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
906 if test "x$withval" != "xno" ; then
916 # ------------------------------------
917 # Where to start assigning ports
918 # ------------------------------------
920 AC_ARG_WITH(baseport,
921 [ --with-baseport=PORT specify base port address for daemons],
923 if test "x$withval" != "xno" ; then
930 dir_port=`expr $baseport`
931 fd_port=`expr $baseport + 1`
932 sd_port=`expr $fd_port + 1`
939 # ------------------------------------------
941 # ------------------------------------------
943 AC_ARG_WITH(dir-password,
944 [ --with-dir-password=PASSWORD specify Director's password],
946 if test "x$withval" != "xno" ; then
947 dir_password=$withval
952 if test "x$dir_password" = "x" ; then
953 if test "x$OPENSSL" = "xnone" ; then
954 key=`autoconf/randpass 33`
956 key=`openssl rand -base64 33`
962 AC_ARG_WITH(fd-password,
963 [ --with-fd-password=PASSWORD specify Client's password],
965 if test "x$withval" != "xno" ; then
971 if test "x$fd_password" = "x" ; then
972 if test "x$OPENSSL" = "xnone" ; then
973 key=`autoconf/randpass 37`
975 key=`openssl rand -base64 33`
981 AC_ARG_WITH(sd-password,
982 [ --with-sd-password=PASSWORD specify Storage daemon's password],
984 if test "x$withval" != "xno" ; then
990 if test "x$sd_password" = "x" ; then
991 if test "x$OPENSSL" = "xnone" ; then
992 key=`autoconf/randpass 41`
994 key=`openssl rand -base64 33`
1000 AC_ARG_WITH(mon-dir-password,
1001 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
1003 if test "x$withval" != "xno" ; then
1004 mon_dir_password=$withval
1009 if test "x$mon_dir_password" = "x" ; then
1010 if test "x$OPENSSL" = "xnone" ; then
1011 key=`autoconf/randpass 33`
1013 key=`openssl rand -base64 33`
1015 mon_dir_password=$key
1019 AC_ARG_WITH(mon-fd-password,
1020 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
1022 if test "x$withval" != "xno" ; then
1023 mon_fd_password=$withval
1028 if test "x$mon_fd_password" = "x" ; then
1029 if test "x$OPENSSL" = "xnone" ; then
1030 key=`autoconf/randpass 37`
1032 key=`openssl rand -base64 33`
1034 mon_fd_password=$key
1038 AC_ARG_WITH(mon-sd-password,
1039 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
1041 if test "x$withval" != "xno" ; then
1042 mon_sd_password=$withval
1047 if test "x$mon_sd_password" = "x" ; then
1048 if test "x$OPENSSL" = "xnone" ; then
1049 key=`autoconf/randpass 41`
1051 key=`openssl rand -base64 33`
1053 mon_sd_password=$key
1056 AC_SUBST(dir_password)
1057 AC_SUBST(fd_password)
1058 AC_SUBST(sd_password)
1059 AC_SUBST(mon_dir_password)
1060 AC_SUBST(mon_fd_password)
1061 AC_SUBST(mon_sd_password)
1065 # Handle users and groups for each daemon
1068 AC_ARG_WITH(dir_user,
1069 [ --with-dir-user=USER specify user for Director daemon],
1071 if test "x$withval" != "x" ; then
1078 AC_ARG_WITH(dir_group,
1079 [ --with-dir-group=GROUP specify group for Director daemon],
1081 if test "x$withval" != "x" ; then
1088 AC_ARG_WITH(sd_user,
1089 [ --with-sd-user=USER specify user for Storage daemon],
1091 if test "x$withval" != "x" ; then
1098 AC_ARG_WITH(sd_group,
1099 [ --with-sd-group=GROUP specify group for Storage daemon],
1101 if test "x$withval" != "x" ; then
1108 AC_ARG_WITH(fd_user,
1109 [ --with-fd-user=USER specify user for File daemon],
1111 if test "x$withval" != "x" ; then
1118 AC_ARG_WITH(fd_group,
1119 [ --with-fd-group=GROUP specify group for File daemon],
1121 if test "x$withval" != "x" ; then
1138 # allow setting default executable permissions
1141 AC_ARG_WITH(sbin-perm,
1142 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1144 if test "x$withval" != "x" ; then
1152 # ------------------------------------------------
1153 # Bacula check for various SQL database engines
1154 # ------------------------------------------------
1155 BA_CHECK_POSTGRESQL_DB
1166 AC_DEFINE(PROTOTYPES)
1168 dnl# --------------------------------------------------------------------------
1169 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1171 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1172 if test -z "$CCOPTS"; then
1173 CCOPTS='-g -O2 -Wall'
1182 dnl See if we can use 64 bit file addresses
1183 largefile_support="no"
1189 dnl# --------------------------------------------------------------------------
1190 dnl# CHECKING FOR HEADER FILES
1191 dnl# --------------------------------------------------------------------------
1227 AC_STRUCT_ST_BLKSIZE
1231 dnl# --------------------------------------------------------------------------
1232 dnl# Check for utime.h structure
1233 dnl# --------------------------------------------------------------------------
1234 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1236 #include <sys/types.h>
1237 #include <utime.h>], [struct utimbuf foo],
1238 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1239 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1241 dnl# --------------------------------------------------------------------------
1242 dnl# Check for socklen_t
1243 dnl# --------------------------------------------------------------------------
1244 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1246 #include <sys/types.h>
1247 #include <sys/socket.h>],
1249 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1250 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1252 dnl# --------------------------------------------------------------------------
1253 dnl# Check for bigendian
1254 dnl# --------------------------------------------------------------------------
1255 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1257 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1258 [ba_cv_bigendian=yes],
1259 [ba_cv_bigendian=no],
1260 [ba_cv_bigendian=no])])
1261 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1263 dnl# --------------------------------------------------------------------------
1264 dnl# Check for typeof()
1265 dnl# --------------------------------------------------------------------------
1267 AC_CACHE_CHECK(for typeof, ba_cv_have_typeof,
1269 [main(){char *a = 0; a = (typeof a)a;}],
1270 [ba_cv_have_typeof=yes],
1271 [ba_cv_have_typeof=no],
1272 [ba_cv_have_typeof=no])])
1273 test $ba_cv_have_typeof = yes && AC_DEFINE([HAVE_TYPEOF], 1, [Defind to 1 if compiler has typeof])
1279 dnl# --------------------------------------------------------------------------
1280 dnl# CHECKING FOR FILESYSTEM TYPE
1281 dnl# --------------------------------------------------------------------------
1282 AC_MSG_CHECKING(how to get filesystem type)
1284 # The order of these tests is important.
1285 AC_TRY_CPP([#include <sys/statvfs.h>
1286 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1287 if test $fstype = no; then
1288 AC_TRY_CPP([#include <sys/statfs.h>
1289 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1291 if test $fstype = no; then
1292 AC_TRY_CPP([#include <sys/statfs.h>
1293 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1295 if test $fstype = no; then
1296 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1298 if test $fstype = no; then
1299 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1301 if test $fstype = no; then
1302 AC_TRY_CPP([#include <sys/mount.h>
1303 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1305 AC_MSG_RESULT($fstype)
1307 AC_CHECK_HEADER(sys/statvfs.h, [ AC_DEFINE(HAVE_SYS_STATVFS_H,1,[Defines if your system have the sys/statvfs.h header file])] , )
1309 dnl# --------------------------------------------------------------------------
1310 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1311 dnl# --------------------------------------------------------------------------
1319 AC_CHECK_TYPE(ino_t, unsigned long)
1320 AC_CHECK_TYPE(dev_t, unsigned long)
1321 AC_CHECK_TYPE(daddr_t, long)
1322 AC_CHECK_TYPE(major_t, int)
1323 AC_CHECK_TYPE(minor_t, int)
1324 AC_CHECK_TYPE(ssize_t, int)
1331 AC_CHECK_SIZEOF(char, 1)
1332 AC_CHECK_SIZEOF(short int, 2)
1333 AC_CHECK_SIZEOF(int, 4)
1334 AC_CHECK_SIZEOF(long int, 4)
1335 AC_CHECK_SIZEOF(long long int, 8)
1336 AC_CHECK_SIZEOF(int *, 4)
1338 # Check for sys/types.h types
1339 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1341 [ #include <sys/types.h> ],
1343 [ ac_cv_have_u_int="yes" ],
1344 [ ac_cv_have_u_int="no" ]
1347 if test "x$ac_cv_have_u_int" = "xyes" ; then
1348 AC_DEFINE(HAVE_U_INT)
1352 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1354 [ #include <sys/types.h> ],
1355 [ intmax_t a; a = 1;],
1356 [ ac_cv_have_intmax_t="yes" ],
1359 [ #include <stdint.h> ],
1360 [ intmax_t a; a = 1;],
1361 [ ac_cv_have_intmax_t="yes" ],
1362 [ ac_cv_have_intmax_t="no" ]
1368 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1369 AC_DEFINE(HAVE_INTMAX_T)
1374 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1376 [ #include <sys/types.h> ],
1377 [ u_intmax_t a; a = 1;],
1378 [ ac_cv_have_u_intmax_t="yes" ],
1381 [ #include <stdint.h> ],
1382 [ u_intmax_t a; a = 1;],
1383 [ ac_cv_have_u_intmax_t="yes" ],
1384 [ ac_cv_have_u_intmax_t="no" ]
1389 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1390 AC_DEFINE(HAVE_U_INTMAX_T)
1395 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1397 [ #include <sys/types.h> ],
1398 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1399 [ ac_cv_have_intxx_t="yes" ],
1400 [ ac_cv_have_intxx_t="no" ]
1403 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1404 AC_DEFINE(HAVE_INTXX_T)
1408 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1410 [ #include <sys/types.h> ],
1411 [ int64_t a; a = 1;],
1412 [ ac_cv_have_int64_t="yes" ],
1413 [ ac_cv_have_int64_t="no" ]
1416 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1417 AC_DEFINE(HAVE_INT64_T)
1421 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1423 [ #include <sys/types.h> ],
1424 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1425 [ ac_cv_have_u_intxx_t="yes" ],
1426 [ ac_cv_have_u_intxx_t="no" ]
1429 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1430 AC_DEFINE(HAVE_U_INTXX_T)
1434 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1436 [ #include <sys/types.h> ],
1437 [ u_int64_t a; a = 1;],
1438 [ ac_cv_have_u_int64_t="yes" ],
1439 [ ac_cv_have_u_int64_t="no" ]
1442 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1443 AC_DEFINE(HAVE_U_INT64_T)
1447 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1448 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1450 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1452 [ #include <sys/bitypes.h> ],
1453 [ int8_t a; int16_t b; int32_t c;
1454 u_int8_t e; u_int16_t f; u_int32_t g;
1455 a = b = c = e = f = g = 1; ],
1456 [ AC_DEFINE(HAVE_U_INTXX_T)
1457 AC_DEFINE(HAVE_INTXX_T)
1458 AC_DEFINE(HAVE_SYS_BITYPES_H)
1459 AC_MSG_RESULT(yes) ],
1460 [ AC_MSG_RESULT(no)]
1464 if test -z "$have_u_intxx_t" ; then
1465 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1467 [ #include <sys/types.h> ],
1468 [ uint8_t a; uint16_t b;
1469 uint32_t c; a = b = c = 1; ],
1470 [ ac_cv_have_uintxx_t="yes" ],
1471 [ ac_cv_have_uintxx_t="no" ]
1474 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1475 AC_DEFINE(HAVE_UINTXX_T)
1479 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1480 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1482 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1484 [ #include <sys/bitypes.h> ],
1485 [ int64_t a; u_int64_t b;
1487 [ AC_DEFINE(HAVE_U_INT64_T)
1488 AC_DEFINE(HAVE_INT64_T)
1489 AC_MSG_RESULT(yes) ],
1490 [ AC_MSG_RESULT(no)]
1494 if (test -z "$have_uintxx_t" && \
1495 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1497 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1499 [ #include <sys/bitypes.h> ],
1500 [ uint8_t a; uint16_t b;
1501 uint32_t c; a = b = c = 1; ],
1502 [ AC_DEFINE(HAVE_UINTXX_T)
1503 AC_MSG_RESULT(yes) ],
1504 [ AC_MSG_RESULT(no)]
1512 dnl# --------------------------------------------------------------------------
1513 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1514 dnl# --------------------------------------------------------------------------
1530 [echo 'configure: cannot find needed function.'; exit 1]
1533 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1534 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1536 AC_CHECK_FUNCS(chflags)
1538 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1540 dnl# --------------------------------------------------------------------------
1541 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1542 dnl# --------------------------------------------------------------------------
1543 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1545 # If resolver functions are not in libc check for -lnsl or -lresolv.
1546 AC_CHECK_FUNC(gethostbyname_r,
1547 AC_MSG_RESULT(using libc's resolver),
1548 AC_CHECK_LIB(nsl,gethostbyname_r)
1549 AC_CHECK_LIB(resolv,gethostbyname_r))
1553 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1554 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1555 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1557 dnl ----------------------------
1558 dnl check sa_len of sockaddr
1559 dnl ----------------------------
1560 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1561 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1562 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1564 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1565 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1569 dnl Check for IPv6 support
1570 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1571 [AC_TRY_LINK([ #include <sys/types.h>
1572 #include <sys/socket.h>
1573 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1575 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1577 if test "$ac_cv_ipv6_support" = yes; then
1578 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1587 AC_FUNC_CLOSEDIR_VOID
1588 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1589 # AC_FUNC_FNMATCH dnl use local version
1592 AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
1595 AC_CHECK_LIB(sun, getpwnam)
1597 AC_CHECK_HEADERS(zlib.h)
1598 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1600 if test x$FDLIBS = x-lz; then
1601 AC_DEFINE(HAVE_LIBZ)
1606 # Check for ACL libraries
1609 AC_CHECK_HEADER(sys/acl.h)
1610 AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
1611 [AC_CHECK_LIB(acl, acl_get_file, [have_acl=yes; FDLIBS="-lacl $FDLIBS"],
1612 [AC_CHECK_LIB(sec, acltotext, [have_acl=yes; FDLIBS="-lsec $FDLIBS"])]
1615 if test $have_acl = yes; then
1619 dnl Check for pthread libraries
1621 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1622 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1623 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1624 [AC_CHECK_FUNC(pthread_create)]
1635 if test x$have_gcc = xyes ; then
1636 CPPFLAGS="$CPPFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
1637 CFLAGS="$CFLAGS -fno-strict-aliasing -fno-exceptions -fno-rtti"
1639 LDFLAGS=${LDFLAGS--O}
1640 DB_LIBS="${SQL_LFLAGS}"
1641 CPPFLAGS="$CPPFLAGS"
1654 AC_SUBST(X_EXTRA_LIBS)
1659 dnl# extra configurable objects
1670 # Finally we set appropriate distribution specific
1671 # variables and defaults
1673 # PFILES are platform specific files
1674 PFILES="platforms/Makefile"
1678 hostname=`uname -n | cut -d '.' -f 1`
1679 if test x${hostname} = x ; then
1680 hostname="localhost"
1685 PSCMD="ps -e -o pid,comm"
1687 platforms/aix/Makefile"
1688 TAPEDRIVE="/dev/rmt0.1"
1692 PTHREAD_LIB="-lpthread -lexc"
1693 if test "${CC}" = "gcc" ; then
1700 TAPEDRIVE="/dev/nrmt0"
1703 DISTVER=`uname -a |awk '{print $3}'`
1704 TAPEDRIVE="/dev/nrmt0"
1705 PTHREAD_LIB="-pthread"
1706 CFLAGS="${CFLAGS} -pthread"
1707 PSCMD="ps -ax -o pid,command"
1711 platforms/bsdi/Makefile \
1712 platforms/bsdi/bacula-fd \
1713 platforms/bsdi/bacula-sd \
1714 platforms/bsdi/bacula-dir"
1715 largefile_support="yes"
1718 DISTVER=`uname -a |awk '{print $3}'`
1719 TAPEDRIVE="/dev/nrst0"
1722 WLDFLAGS="-mwindows"
1726 TAPEDRIVE="/dev/nst0"
1727 PSCMD="ps -e -o pid,command"
1730 platforms/darwin/Makefile"
1733 DISTVER=`cat /etc/debian_version`
1734 TAPEDRIVE="/dev/nrst0"
1735 PSCMD="ps -e -o pid,command"
1738 DISTVER=`uname -a |awk '{print $3}'`
1739 VER=`echo $DISTVER | cut -c 1`
1740 if test x$VER = x4 ; then
1741 PTHREAD_LIB="${PTHREAD_LIBS}"
1742 CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
1746 TAPEDRIVE="/dev/nrsa0"
1747 PSCMD="ps -ax -o pid,command"
1749 platforms/freebsd/Makefile \
1750 platforms/freebsd/bacula-fd \
1751 platforms/freebsd/bacula-sd \
1752 platforms/freebsd/bacula-dir"
1753 largefile_support="yes"
1756 PSCMD="UNIX95=1 ps -e -o pid,comm"
1757 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1759 TAPEDRIVE="/dev/rmt/0hnb"
1760 PTHREAD_LIB="-lpthread"
1761 AC_DEFINE([_INCLUDE_LONGLONG])
1765 TAPEDRIVE="/dev/rmt/0cbn"
1766 PSCMD="ps -e -o pid,comm"
1768 platforms/irix/Makefile \
1769 platforms/irix/bacula-fd \
1770 platforms/irix/bacula-sd \
1771 platforms/irix/bacula-dir"
1774 DISTVER=`uname -a |awk '{print $3}'`
1777 TAPEDRIVE="/dev/nrst0"
1778 PSCMD="ps -ax -o pid,command"
1779 PTHREAD_LIB="-pthread"
1780 CFLAGS="${CFLAGS} -pthread"
1783 DISTVER=`uname -a |awk '{print $3}'`
1786 TAPEDRIVE="/dev/nrst0"
1787 PSCMD="ps -ax -o pid,command"
1788 PTHREAD_LIB="-pthread"
1789 CFLAGS="${CFLAGS} -pthread"
1791 platforms/openbsd/Makefile \
1792 platforms/openbsd/bacula-fd \
1793 platforms/openbsd/bacula-sd \
1794 platforms/openbsd/bacula-dir"
1797 if test -f /etc/whitebox-release ; then
1798 f=/etc/whitebox-release
1800 f=/etc/redhat-release
1802 if test `cat $f | grep release |\
1803 cut -f 3 -d ' '`x = "Enterprise"x ; then
1804 DISTVER="Enterprise "`cat $f | grep release |\
1807 DISTVER=`cat /etc/redhat-release | grep release |\
1810 TAPEDRIVE="/dev/nst0"
1811 PSCMD="ps -e -o pid,command"
1813 platforms/redhat/Makefile \
1814 platforms/redhat/bacula-fd \
1815 platforms/redhat/bacula-sd \
1816 platforms/redhat/bacula-dir \
1817 platforms/redhat/bacula.spec \
1821 DISTVER=`cat /etc/mandrake-release | grep release |\
1823 TAPEDRIVE="/dev/nst0"
1824 PSCMD="ps -e -o pid,command"
1826 platforms/mandrake/Makefile \
1827 platforms/mandrake/bacula-fd \
1828 platforms/mandrake/bacula-sd \
1829 platforms/mandrake/bacula-dir \
1830 platforms/mandrake/bacula.spec \
1834 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1835 TAPEDRIVE="/dev/nst0"
1836 PSCMD="ps -e -o pid,command"
1838 platforms/gentoo/Makefile \
1839 platforms/gentoo/bacula-init \
1840 platforms/gentoo/bacula-fd \
1841 platforms/gentoo/bacula-sd \
1842 platforms/gentoo/bacula-dir"
1845 DISTVER=`cat /etc/slackware-version`
1846 TAPEDRIVE="/dev/nst0"
1847 PSCMD="ps -e -o pid,command"
1849 platforms/slackware/Makefile \
1850 platforms/slackware/rc.bacula-fd \
1851 platforms/slackware/rc.bacula-sd \
1852 platforms/slackware/rc.bacula-dir\
1853 platforms/slackware/functions.bacula"
1857 TAPEDRIVE="/dev/rmt/0cbn"
1858 PSCMD="ps -e -o pid,comm"
1860 platforms/solaris/Makefile \
1861 platforms/solaris/bacula-fd \
1862 platforms/solaris/bacula-sd \
1863 platforms/solaris/bacula-dir"
1864 if test x$DISTVER = x5.6 ; then
1865 AC_DEFINE(HAVE_OLD_SOCKOPT)
1867 LIBS="$LIBS -lresolv"
1870 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1872 TAPEDRIVE="/dev/nst0"
1873 PSCMD="ps -e -o pid,command"
1875 platforms/suse/Makefile \
1876 platforms/suse/bacula-fd \
1877 platforms/suse/bacula-sd \
1878 platforms/suse/bacula-dir \
1879 platforms/suse/bacula \
1880 platforms/suse/bacula.spec"
1885 TAPEDRIVE="/dev/nst0"
1886 PSCMD="ps -e -o pid,command"
1888 platforms/suse/Makefile \
1889 platforms/suse/bacula-fd \
1890 platforms/suse/bacula-sd \
1891 platforms/suse/bacula-dir"
1895 TAPEDRIVE="/dev/nst0"
1898 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1904 LIBS="$PTHREAD_LIB $LIBS"
1906 AC_DEFINE_UNQUOTED(lld, "$lld")
1907 AC_DEFINE_UNQUOTED(llu, "$llu")
1915 dnl# common parts of the Makefile
1916 MCOMMON=./autoconf/Make.common
1917 AC_SUBST_FILE(MCOMMON)
1920 if test "x${subsysdir}" = "x${sbindir}" ; then
1923 echo "You have set both --sbindir and --with-subsys-dir"
1924 echo " equal to: ${subsysdir} "
1925 echo "This is not permitted. Please reconfigure."
1927 echo "Aborting configuration ..."
1933 AC_OUTPUT([autoconf/Make.common \
1936 scripts/startmysql \
1938 scripts/btraceback \
1944 scripts/bacula-ctl-dir \
1945 scripts/bacula-ctl-fd \
1946 scripts/bacula-ctl-sd \
1947 scripts/devel_bacula \
1950 scripts/bacula.desktop.gnome1 \
1951 scripts/bacula.desktop.gnome2 \
1952 scripts/bacula.desktop.gnome1.consolehelper \
1953 scripts/bacula.desktop.gnome2.consolehelper \
1954 scripts/bacula.desktop.gnome1.xsu \
1955 scripts/bacula.desktop.gnome2.xsu \
1956 scripts/gnome-console.console_apps \
1957 scripts/mtx-changer \
1958 scripts/disk-changer \
1959 scripts/dvd-handler \
1960 scripts/bacula-tray-monitor.desktop \
1961 scripts/logwatch/Makefile \
1962 scripts/logwatch/logfile.bacula.conf \
1963 scripts/wxconsole.console_apps \
1964 scripts/wxconsole.desktop.consolehelper \
1965 scripts/wxconsole.desktop.xsu \
1968 src/console/Makefile \
1969 src/console/bconsole.conf \
1970 src/gnome2-console/Makefile \
1971 src/gnome2-console/gnome-console.conf \
1972 src/wx-console/Makefile \
1973 src/wx-console/wx-console.conf \
1974 src/tray-monitor/Makefile \
1975 src/tray-monitor/tray-monitor.conf \
1977 src/dird/bacula-dir.conf \
1979 src/stored/Makefile \
1980 src/stored/bacula-sd.conf \
1981 src/filed/Makefile \
1982 src/filed/bacula-fd.conf \
1983 src/filed/win32/Makefile \
1985 src/cats/make_catalog_backup \
1986 src/cats/delete_catalog_backup \
1987 src/cats/create_postgresql_database \
1988 src/cats/update_postgresql_tables \
1989 src/cats/make_postgresql_tables \
1990 src/cats/grant_postgresql_privileges \
1991 src/cats/drop_postgresql_tables \
1992 src/cats/drop_postgresql_database \
1993 src/cats/create_mysql_database \
1994 src/cats/update_mysql_tables \
1995 src/cats/make_mysql_tables \
1996 src/cats/grant_mysql_privileges \
1997 src/cats/drop_mysql_tables \
1998 src/cats/drop_mysql_database \
1999 src/cats/create_sqlite_database \
2000 src/cats/update_sqlite_tables \
2001 src/cats/make_sqlite_tables \
2002 src/cats/grant_sqlite_privileges \
2003 src/cats/drop_sqlite_tables \
2004 src/cats/drop_sqlite_database \
2005 src/cats/create_sqlite3_database \
2006 src/cats/update_sqlite3_tables \
2007 src/cats/make_sqlite3_tables \
2008 src/cats/grant_sqlite3_privileges \
2009 src/cats/drop_sqlite3_tables \
2010 src/cats/drop_sqlite3_database \
2013 src/cats/create_bdb_database \
2014 src/cats/update_bdb_tables \
2015 src/cats/make_bdb_tables \
2016 src/cats/grant_bdb_privileges \
2017 src/cats/drop_bdb_tables \
2018 src/cats/drop_bdb_database \
2019 src/cats/create_bacula_database \
2020 src/cats/update_bacula_tables \
2021 src/cats/grant_bacula_privileges \
2022 src/cats/make_bacula_tables \
2023 src/cats/drop_bacula_tables \
2024 src/cats/drop_bacula_database \
2025 src/findlib/Makefile \
2026 src/pygtk-console/Makefile \
2027 src/tools/Makefile \
2028 src/win32/winbacula.nsi \
2029 src/win32/baculafd/bacula-fd.conf \
2030 src/win32/Makefile \
2031 src/win32/Makefile.vcpp \
2032 src/win32/console/bconsole.conf \
2033 src/win32/wx-console/wx-console.conf \
2034 src/win32/pebuilder/Makefile \
2037 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
2041 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2042 chmod 755 dvd-handler
2043 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2048 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2049 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2051 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2052 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2054 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2055 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2057 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2058 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2060 chmod 755 $c/create_sqlite3_database $c/update_sqlite3_tables $c/make_sqlite3_tables
2061 chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
2063 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2064 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2066 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2070 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2071 largefile_support="yes"
2075 # A whole lot of hand springs to get the compiler version.
2076 # This is because gcc changed the output in version 3.0
2078 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2079 if test "x${CCVERSION}" = "x" ; then
2080 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2082 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2083 if test x"${CXXVERSION}" = x ; then
2084 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2087 if test "x${subsysdir}" = "x${sbindir}" ; then
2090 echo "You have set --sbindir and --with-subsys-dir"
2091 echo " both equal to: ${subsysdir} "
2092 echo " This is not permitted. Please reconfigure."
2094 echo "Aborting configuration ..."
2100 if test "x${db_name}" = "xInternal" ; then
2103 echo "You have not specified either --enable-client-only or one of the"
2104 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
2105 echo " This is not permitted. Please reconfigure."
2107 echo "Aborting the configuration ..."
2114 Configuration on `date`:
2116 Host: $host -- ${DISTNAME} ${DISTVER}
2117 Bacula version: ${VERSION} (${DATE})
2118 Source code location: ${srcdir}
2119 Install binaries: ${sbindir}
2120 Install config files: ${sysconfdir}
2121 Scripts directory: ${scriptdir}
2122 Working directory: ${working_dir}
2123 PID directory: ${piddir}
2124 Subsys directory: ${subsysdir}
2125 Man directory: ${mandir}
2126 Data directory: ${datadir}
2127 C Compiler: ${CC} ${CCVERSION}
2128 C++ Compiler: ${CXX} ${CXXVERSION}
2129 Compiler flags: ${WCFLAGS} ${CFLAGS}
2130 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2132 Statically Linked Tools: ${support_static_tools}
2133 Statically Linked FD: ${support_static_fd}
2134 Statically Linked SD: ${support_static_sd}
2135 Statically Linked DIR: ${support_static_dir}
2136 Statically Linked CONS: ${support_static_cons}
2137 Database type: ${db_name}
2138 Database lib: ${DB_LIBS}
2140 Job Output Email: ${job_email}
2141 Traceback Email: ${dump_email}
2142 SMTP Host Address: ${smtp_host}
2144 Director Port: ${dir_port}
2145 File daemon Port: ${fd_port}
2146 Storage daemon Port: ${sd_port}
2148 Director User: ${dir_user}
2149 Director Group: ${dir_group}
2150 Storage Daemon User: ${sd_user}
2151 Storage DaemonGroup: ${sd_group}
2152 File Daemon User: ${fd_user}
2153 File Daemon Group: ${fd_group}
2155 SQL binaries Directory ${SQL_BINDIR}
2157 Large file support: $largefile_support
2158 Bacula conio support: ${got_conio} ${CONS_LIBS}
2159 readline support: ${got_readline} ${PRTREADLINE_SRC}
2160 TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
2161 TLS support: ${support_tls}
2162 Encryption support: ${support_crypto}
2163 ZLIB support: ${have_zlib}
2164 enable-smartalloc: ${support_smartalloc}
2165 enable-gnome: ${support_gnome} ${gnome_version}
2166 enable-wx-console: ${support_wx_console} ${wx_version}
2167 enable-tray-monitor: ${support_tray_monitor}
2168 client-only: ${build_client_only}
2169 build-dird: ${build_dird}
2170 build-stored: ${build_stored}
2171 ACL support: ${have_acl}
2172 Python support: ${support_python} ${PYTHON_LIBS}