3 dnl# Process this file with autoconf to produce a configure script.
11 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
12 AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
14 dnl require a recent autoconf
18 dnl search for true and false programs.
19 AC_PATH_PROGS(TRUEPRG, true, :)
20 AC_PATH_PROGS(FALSEPRG, false, :)
25 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
26 DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
27 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
31 echo "configuring for bacula $VERSION ($DATE)"
34 dnl -------------------------------------------------------
35 dnl# Check for compiler.
36 dnl ------------------------------------------------------
40 AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
41 AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
48 dnl -------------------------------------------------------
49 dnl# Check for programs.
50 dnl ------------------------------------------------------
53 AC_PATH_PROG(MV, mv, mv)
54 AC_PATH_PROG(RM, rm, rm)
55 AC_PATH_PROG(CP, cp, cp)
56 AC_PATH_PROG(SED, sed, sed)
57 AC_PATH_PROG(ECHO, echo, echo)
58 AC_PATH_PROG(CMP, cmp, cmp)
59 AC_PATH_PROG(TBL, tbl, tbl)
60 AC_PATH_PROG(AR, ar, ar)
61 dnl AC_PATH_PROG(RANLIB, ranlib, ranlib)
62 AC_PATH_PROG(OPENSSL, openssl, none)
63 AC_PATH_PROG(MTX, mtx, mtx)
64 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
65 AC_PATH_PROG(PYTHON, python, python)
66 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
67 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
68 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
69 AC_PATH_PROG(WXCONFIG, wx-config, wx-config)
70 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
71 AC_PATH_PROG(PIDOF, pidof, pidof)
73 # Some AWK programs fail, so test it and warn the user
74 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
75 { if ((prog == $2) || (("(" prog ")") == $2) ||
76 (("[" prog "]") == $2) ||
77 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
79 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
80 The regex engine of $AWK is too broken to be used you
81 might want to install GNU AWK.
82 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
85 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
87 test -n "$ARFLAG" || ARFLAGS="cr"
94 AC_SUBST(LOCAL_CFLAGS)
95 AC_SUBST(LOCAL_LDFLAGS)
100 dnl --------------------------------------------------
101 dnl Bacula OP Sys determination (see aclocal.m4)
102 dnl --------------------------------------------------
105 # -----------------------------------------------------------
106 dnl Bacula OPSys Distribution determination (see aclocal.m4)
107 # ----------------------------------------------------------
108 BA_CHECK_OPSYS_DISTNAME
110 # -----------------------------------------------------------
111 dnl Check for gnome stuff for gnome-console
112 # ----------------------------------------------------------
113 AM_ACLOCAL_INCLUDE(gnome-macros)
115 # ------------------------------------------------------------------
116 # If the user has not set --prefix, we set our default to nothing.
117 # In this case, if the user has not set --sysconfdir, we set it
118 # to the package default of /etc/bacula. If either --prefix or
119 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
120 # ------------------------------------------------------------------
121 if test x${prefix} = xNONE ; then
122 if test `eval echo ${sysconfdir}` = NONE/etc ; then
123 sysconfdir=/etc/bacula
127 sysconfdir=`eval echo ${sysconfdir}`
129 # -------------------------------------------------------------------------
130 # If the user has not set --exec-prefix, we default to ${prefix}
131 # -------------------------------------------------------------------------
132 if test x${exec_prefix} = xNONE ; then
133 exec_prefix=${prefix}
136 # ------------------------------------------------------------------
137 # If the user has not set --sbindir, we set our default as /sbin
138 # ------------------------------------------------------------------
139 if test x$sbindir = x'${exec_prefix}/sbin' ; then
140 sbindir=${exec_prefix}/sbin
142 sbindir=`eval echo ${sbindir}`
144 # ------------------------------------------------------------------
145 # All list of languages for which a translation exist. Each
146 # language is separated by a space.
147 # ------------------------------------------------------------------
150 AC_PATH_PROGS(MSGFMT, msgfmt, no)
151 if test "$MSGFMT" = "no"
153 echo 'msgfmt program not found, disabling NLS !'
155 USE_INCLUDED_LIBINTL=no
164 support_postgresql=no
165 support_smartalloc=yes
169 support_wx_console=no
172 support_static_tools=no
175 support_static_dir=no
176 support_static_cons=no
183 dnl# --------------------------------------------------------------------------
184 dnl# CHECKING COMMAND LINE OPTIONS
185 dnl# --------------------------------------------------------------------------
187 # -------------------------------------------
188 # gnome (default off)
189 # -------------------------------------------
191 [ --enable-gnome enable build of gnome-console GUI [disabled]],
192 [if test x$enableval = xyes; then
197 if test x$support_gnome = xyes; then
198 abc=`$PKGCONFIG --exists libgnomeui-2.0`
200 if test $pkg = 0; then
201 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
202 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
203 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
204 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
205 AC_SUBST(GNOME_INCLUDEDIR)
206 AC_SUBST(GNOMEUI_LIBS)
207 AC_SUBST(GNOME_LIBDIR)
209 GNOME_DIR=src/gnome2-console
210 gnome_version="Version 2.x"
214 GNOME_DIR=src/gnome-console
215 gnome_version="Version 1.4"
221 # -------------------------------------------
222 # wx-console (default off)
223 # -------------------------------------------
224 AC_ARG_ENABLE(wx-console,
225 [ --enable-wx-console enable build of wxWidgets console [disabled]],
226 [if test x$enableval = xyes; then
227 support_wx_console=yes
231 if test x$support_wx_console = xyes; then
232 abc=`$WXCONFIG --cppflags`
234 if test $pkg = 0; then
235 WXRELEASE=`$WXCONFIG --release`
236 if test $WXRELEASE = 2.6; then
237 WXCONS_CPPFLAGS=`$WXCONFIG --cppflags --unicode=no`
238 WXCONS_LDFLAGS=`$WXCONFIG --libs --unicode=no`
240 WXCONS_CPPFLAGS=`$WXCONFIG --cppflags`
241 WXCONS_LDFLAGS=`$WXCONFIG --libs`
244 AC_SUBST(WXCONS_CPPFLAGS)
245 AC_SUBST(WXCONS_LDFLAGS)
246 WX_DIR=src/wx-console
249 echo "wx-config program not found. wx-console disabled."
251 support_wx_console=no
257 # -------------------------------------------
258 # tray-monitor (default off)
259 # -------------------------------------------
260 AC_ARG_ENABLE(tray-monitor,
261 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
262 [if test x$enableval = xyes; then
263 support_tray_monitor=yes
267 if test x$support_tray_monitor = xyes; then
268 abc=`$PKGCONFIG --exists gtk+-2.0`
270 if test $pkg = 0; then
271 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
272 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
273 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
274 AC_SUBST(TRAY_MONITOR_LDFLAGS)
275 TRAY_MONITOR_DIR=src/tray-monitor
276 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
278 if test $pkg = 0; then
279 AC_DEFINE(HAVE_GTK_2_4)
283 AC_SUBST(TRAY_MONITOR_DIR)
285 # -------------------------------------------
286 # smartalloc (default off)
287 # -------------------------------------------
288 AC_ARG_ENABLE(smartalloc,
289 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
290 [if test x$enableval = xno; then
291 support_smartalloc=no
294 if test x$support_smartalloc = xyes; then
295 AC_DEFINE(SMARTALLOC)
298 # -------------------------------------------
299 # static-tools (default off)
300 # -------------------------------------------
301 AC_ARG_ENABLE(static-tools,
302 [ --enable-static-tools enable static tape tools [disabled]],
303 [if test x$enableval = xyes; then
304 support_static_tools=yes
308 if test x$support_static_tools = xyes; then
309 TTOOL_LDFLAGS="-static"
311 AC_SUBST(TTOOL_LDFLAGS)
313 # -------------------------------------------
314 # static-fd (default off)
315 # -------------------------------------------
316 AC_ARG_ENABLE(static-fd,
317 [ --enable-static-fd enable static File daemon [disabled]],
318 [if test x$enableval = xyes; then
319 support_static_fd=yes
323 if test x$support_static_fd = xyes; then
324 STATIC_FD="static-bacula-fd"
328 # -------------------------------------------
329 # static-sd (default off)
330 # -------------------------------------------
331 AC_ARG_ENABLE(static-sd,
332 [ --enable-static-sd enable static Storage daemon [disabled]],
333 [if test x$enableval = xyes; then
334 support_static_sd=yes
338 if test x$support_static_sd = xyes; then
339 STATIC_SD="static-bacula-sd"
343 # -------------------------------------------
344 # static-dir (default off)
345 # -------------------------------------------
346 AC_ARG_ENABLE(static-dir,
347 [ --enable-static-dir enable static Director [disabled]],
348 [if test x$enableval = xyes; then
349 support_static_dir=yes
353 if test x$support_static_dir = xyes; then
354 STATIC_DIR="static-bacula-dir"
358 # -------------------------------------------
359 # static-cons (default off)
360 # -------------------------------------------
361 AC_ARG_ENABLE(static-cons,
362 [ --enable-static-cons enable static Console [disabled]],
363 [if test x$enableval = xyes; then
364 support_static_cons=yes
370 if test x$support_static_cons = xyes; then
371 STATIC_CONS="static-bconsole"
372 STATIC_GNOME_CONS="static-gnome-console"
373 STATIC_WX_CONS="static-wx-console"
375 AC_SUBST(STATIC_CONS)
376 AC_SUBST(STATIC_GNOME_CONS)
377 AC_SUBST(STATIC_WX_CONS)
379 # -------------------------------------------
380 # client_only (default off)
381 # -------------------------------------------
382 AC_ARG_ENABLE(client-only,
383 [ --enable-client-only build client (File daemon) only [disabled]],
384 [if test x$enableval = xyes; then
385 build_client_only=yes
389 if test x$build_client_only = xno; then
396 # ---------------------------------------------------
397 # Check for conio (Bacula readline substitute)(
398 # ---------------------------------------------------
399 # this allows you to turn it completely off
401 [ --disable-conio disable conio support [enabled]
403 [if test x$enableval = xno; then
408 if test x$support_conio = xyes; then
409 AC_CHECK_HEADER(termcap.h,
410 [ AC_CHECK_LIB(termcap, tgetent,
411 [ CONS_LIBS="-ltermcap"
416 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
418 [ AC_CHECK_LIB(ncurses, tgetent,
419 [ CONS_LIBS="-lncurses"
424 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
429 AC_CHECK_HEADERS(curses.h)
430 AC_CHECK_HEADER(term.h,
431 [ AC_CHECK_LIB(curses, tgetent,
432 [ CONS_LIBS="-lcurses"
437 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
440 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
449 # ---------------------------------------------------
450 # Check for readline support/directory (default off)
451 # ---------------------------------------------------
452 # this allows you to turn it completely off
453 AC_ARG_ENABLE(readline,
454 [ --disable-readline disable readline support [disable]
456 [if test x$enableval = xno; then
462 if test x$support_readline = xyes; then
463 AC_ARG_WITH(readline,
464 [ --with-readline=DIR specify readline library directory],
466 case "$with_readline" in
469 if test "$with_readline" != "yes"; then
470 CONS_INC="-I${with_readline}"
471 CONS_LDFLAGS="-L$with_readline"
473 with_readline="/usr/include/readline"
475 AC_CHECK_HEADER(${with_readline}/readline.h,
476 [ AC_DEFINE(HAVE_READLINE)
477 CONS_LIBS="-lreadline -ltermcap"
481 echo "readline.h not found. readline turned off ..."
488 # check for standard readline library
489 AC_CHECK_HEADER(/usr/include/readline/readline.h,
490 [ AC_DEFINE(HAVE_READLINE)
492 CONS_INC="-I/usr/include/readline"
493 CONS_LIBS="-lreadline -ltermcap"
495 # Did not find standard library, so try Bacula's default
496 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
497 [ AC_DEFINE(HAVE_READLINE)
499 CONS_INC="-I${TOP_DIR}/depkgs/readline"
500 CONS_LIBS="-lreadline -lhistory -ltermcap"
501 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
502 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
505 echo "readline.h not found. readline turned off ..."
521 AC_SUBST(CONS_LDFLAGS)
522 AC_SUBST(READLINE_SRC)
524 # Minimal stuff for readline Makefile configuration
529 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
530 AC_CHECK_FUNCS(nanosleep nl_langinfo)
531 AC_CHECK_HEADERS(varargs.h)
533 # End of readline/conio stuff
534 # -----------------------------------------------------------------------
536 # -----------------------------------------------------------------------
537 # Check for Python support
539 AC_MSG_CHECKING(for Python support)
542 --with-python[=DIR] Include Python support. DIR is the Python base
543 install directory, default is to search through
544 a number of common places for the Python files.],
548 if test "$withval" != "no"; then
549 if test "$withval" = "yes"; then
550 if test -f /usr/include/python2.2/Python.h; then
551 PYTHON_INCDIR=-I/usr/include/python2.2
552 PYTHON_LIBS="-L/usr/lib/python2.2/config -lpython2.2 -lutil -ldl"
553 elif test -f /usr/include/python2.3/Python.h; then
554 PYTHON_INCDIR=-I/usr/include/python2.3
555 PYTHON_LIBS="-L/usr/lib/python2.3/config -lpython2.3 -lutil -ldl"
556 elif test -f /usr/include/python2.4/Python.h; then
557 PYTHON_INCDIR=-I/usr/include/python2.4
558 PYTHON_LIBS="-L/usr/lib/python2.4/config -lpython2.4 -lutil -ldl"
559 elif test -f $prefix/include/Python.h; then
560 PYTHON_INCDIR=-I$prefix/include
561 PYTHON_LIBS="-L$prefix/lib/config -lpython -lutil -ldl"
564 AC_MSG_ERROR(Unable to find Python.h in standard locations)
567 if test -f $withval/Python.h; then
568 PYTHON_INCDIR=-I$withval
569 PYTHON_LIBS="-L$withval/config -lpython -lutil -ldl"
570 elif test -f $withval/include/Python.h; then
571 PYTHON_INCDIR=-I$withval/include
572 PYTHON_LIBS="-L$withval/lib/config -lpython -lutil -ldl"
575 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
578 AC_DEFINE([HAVE_PYTHON], 1)
588 AC_SUBST(PYTHON_LIBS)
589 AC_SUBST(PYTHON_INCDIR)
593 # Find where sockets are (especially for Solaris)
594 # Do this before the TCP Wrappers test since tcp wrappers
595 # uses the socket library and some linkers are stupid.
597 AC_CHECK_FUNC(socket,
598 AC_MSG_RESULT(using libc's socket),
599 AC_CHECK_LIB(xnet,socket)
600 AC_CHECK_LIB(socket,socket)
601 AC_CHECK_LIB(inet,socket))
604 # -----------------------------------------------------------
605 # Check whether user wants TCP wrappers support (default off)
606 # -----------------------------------------------------------
608 AC_ARG_WITH(tcp-wrappers,
609 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
611 if test "x$withval" != "xno" ; then
613 LIBS="$saved_LIBS -lwrap"
614 AC_MSG_CHECKING(for libwrap)
617 int deny_severity = 0;
618 int allow_severity = 0;
619 struct request_info *req; ],
620 [ hosts_access(req); ],
623 AC_DEFINE(HAVE_LIBWRAP)
626 LIBS="$saved_LIBS -lwrap -lnsl"
629 int deny_severity = 0;
630 int allow_severity = 0;
631 struct request_info *req; ],
632 [ hosts_access(req); ],
635 AC_DEFINE(HAVE_LIBWRAP)
638 [AC_MSG_ERROR([*** libwrap missing]) ] ]
645 # -----------------------------------------------------------
646 # Check whether OpenSSL is available
647 # -----------------------------------------------------------
648 AC_MSG_CHECKING([for OpenSSL])
649 dnl The following uses quadrigraphs:
653 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
654 [with_openssl_directory=${withval}])
656 if test "x$with_openssl_directory" != "x"; then
657 OPENSSL_LIBS="-lssl -lcrypto"
660 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
661 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
662 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
666 saved_CFLAGS="$CFLAGS"
667 LIBS="$saved_LIBS $OPENSSL_LIBS"
668 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
670 AC_TRY_LINK([ #include <openssl/ssl.h> ],
671 [ CRYPTO_set_id_callback(NULL); ],
672 [ support_tls="yes" ],
677 CFLAGS="$saved_CFLAGS"
679 if test "$support_tls" = "yes"; then
680 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
681 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
689 AC_MSG_RESULT([$support_tls])
690 AC_SUBST(OPENSSL_LIBS)
691 AC_SUBST(OPENSSL_INC)
695 # ------------------------------------------
696 # Where to place working dir
697 # ------------------------------------------
698 working_dir=`eval echo ${prefix}/var/bacula/working`
699 AC_ARG_WITH(working-dir,
700 [ --with-working-dir=PATH specify path of Bacula working directory],
702 if test "x$withval" != "xno" ; then
708 AC_SUBST(working_dir)
711 # ------------------------------------------
712 # Where to place scriptdir (script files)
713 # ------------------------------------------
714 scriptdir=`eval echo ${sysconfdir}`
715 AC_ARG_WITH(scriptdir,
716 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
718 if test "x$withval" != "xno" ; then
727 # ------------------------------------------
728 # Where to send dump email
729 # ------------------------------------------
730 dump_email=root@localhost
731 AC_ARG_WITH(dump-email,
732 [ --with-dump-email=EMAIL dump email address],
734 if test "x$withval" != "xno" ; then
742 # ------------------------------------------
743 # Where to send job email
744 # ------------------------------------------
745 job_email=root@localhost
746 AC_ARG_WITH(job-email,
747 [ --with-job-email=EMAIL job output email address],
749 if test "x$withval" != "xno" ; then
757 # ------------------------------------------
758 # Where to find smtp host
759 # ------------------------------------------
761 AC_ARG_WITH(smtp_host,
762 [ --with-smtp-host=HOST SMTP mail host address],
764 if test "x$withval" != "xno" ; then
773 # ------------------------------------
774 # Where to place pid files
775 # ------------------------------------
778 [ --with-pid-dir=PATH specify location of Bacula pid files],
780 if test "x$withval" != "xno" ; then
786 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
790 # ------------------------------------
791 # Where to place subsys "lock file"
792 # ------------------------------------
793 subsysdir=/var/run/subsys
794 AC_ARG_WITH(subsys-dir,
795 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
797 if test "x$withval" != "xno" ; then
807 # ------------------------------------
808 # Where to start assigning ports
809 # ------------------------------------
811 AC_ARG_WITH(baseport,
812 [ --with-baseport=PORT specify base port address for daemons],
814 if test "x$withval" != "xno" ; then
821 dir_port=`expr $baseport`
822 fd_port=`expr $baseport + 1`
823 sd_port=`expr $fd_port + 1`
830 # ------------------------------------------
832 # ------------------------------------------
834 AC_ARG_WITH(dir-password,
835 [ --with-dir-password=PASSWORD specify Director's password],
837 if test "x$withval" != "xno" ; then
838 dir_password=$withval
843 if test "x$dir_password" = "x" ; then
844 if test "x$OPENSSL" = "xnone" ; then
845 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
846 key=`autoconf/randpass 33`
848 key=`openssl rand -base64 33`
854 AC_ARG_WITH(fd-password,
855 [ --with-fd-password=PASSWORD specify Client's password],
857 if test "x$withval" != "xno" ; then
863 if test "x$fd_password" = "x" ; then
864 if test "x$OPENSSL" = "xnone" ; then
865 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
866 key=`autoconf/randpass 37`
868 key=`openssl rand -base64 33`
874 AC_ARG_WITH(sd-password,
875 [ --with-sd-password=PASSWORD specify Storage daemon's password],
877 if test "x$withval" != "xno" ; then
883 if test "x$sd_password" = "x" ; then
884 if test "x$OPENSSL" = "xnone" ; then
885 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
886 key=`autoconf/randpass 41`
888 key=`openssl rand -base64 33`
894 AC_ARG_WITH(mon-dir-password,
895 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
897 if test "x$withval" != "xno" ; then
898 mon_dir_password=$withval
903 if test "x$mon_dir_password" = "x" ; then
904 if test "x$OPENSSL" = "xnone" ; then
905 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
906 key=`autoconf/randpass 33`
908 key=`openssl rand -base64 33`
910 mon_dir_password=$key
914 AC_ARG_WITH(mon-fd-password,
915 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
917 if test "x$withval" != "xno" ; then
918 mon_fd_password=$withval
923 if test "x$mon_fd_password" = "x" ; then
924 if test "x$OPENSSL" = "xnone" ; then
925 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
926 key=`autoconf/randpass 37`
928 key=`openssl rand -base64 33`
934 AC_ARG_WITH(mon-sd-password,
935 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
937 if test "x$withval" != "xno" ; then
938 mon_sd_password=$withval
943 if test "x$mon_sd_password" = "x" ; then
944 if test "x$OPENSSL" = "xnone" ; then
945 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
946 key=`autoconf/randpass 41`
948 key=`openssl rand -base64 33`
953 AC_SUBST(dir_password)
954 AC_SUBST(fd_password)
955 AC_SUBST(sd_password)
956 AC_SUBST(mon_dir_password)
957 AC_SUBST(mon_fd_password)
958 AC_SUBST(mon_sd_password)
960 # -------------------------------------------------------------------------
961 # Set variables for bimagemgr installation
962 # -------------------------------------------------------------------------
963 bimagemgr_cgidir=/var/www/cgi-bin
964 AC_ARG_WITH(bimagemgr-cgidir,
965 [ --with-bimagemgr-cgidir=DIR specify bimagemgr cgi-bin dir],
967 if test "x$withval" != "xno" ; then
968 bimagemgr_cgidir=$withval
973 bimagemgr_docdir=/var/www/html
974 AC_ARG_WITH(bimagemgr-docdir,
975 [ --with-bimagemgr-docdir=DIR specify bimagemgr doc root dir],
977 if test "x$withval" != "xno" ; then
978 bimagemgr_docdir=$withval
983 bimagemgr_binowner=root
984 AC_ARG_WITH(bimagemgr-binowner,
985 [ --with-bimagemgr-binowner=USER specify bimagemgr binary file owner],
987 if test "x$withval" != "xno" ; then
988 bimagemgr_binowner=$withval
993 bimagemgr_bingroup=root
994 AC_ARG_WITH(bimagemgr-bingroup,
995 [ --with-bimagemgr-bingroup=USER specify bimagemgr binary file group],
997 if test "x$withval" != "xno" ; then
998 bimagemgr_bingroup=$withval
1003 bimagemgr_dataowner=apache
1004 AC_ARG_WITH(bimagemgr-dataowner,
1005 [ --with-bimagemgr-dataowner=USER specify bimagemgr data file owner],
1007 if test "x$withval" != "xno" ; then
1008 bimagemgr_dataowner=$withval
1013 bimagemgr_datagroup=apache
1014 AC_ARG_WITH(bimagemgr-datagroup,
1015 [ --with-bimagemgr-datagroup=USER specify bimagemgr data file group],
1017 if test "x$withval" != "xno" ; then
1018 bimagemgr_datagroup=$withval
1023 AC_SUBST(bimagemgr_cgidir)
1024 AC_SUBST(bimagemgr_docdir)
1025 AC_SUBST(bimagemgr_binowner)
1026 AC_SUBST(bimagemgr_bingroup)
1027 AC_SUBST(bimagemgr_dataowner)
1028 AC_SUBST(bimagemgr_datagroup)
1031 # Handle users and groups for each daemon
1034 AC_ARG_WITH(dir_user,
1035 [ --with-dir-user=USER specify user for Director daemon],
1037 if test "x$withval" != "x" ; then
1044 AC_ARG_WITH(dir_group,
1045 [ --with-dir-group=GROUP specify group for Director daemon],
1047 if test "x$withval" != "x" ; then
1054 AC_ARG_WITH(sd_user,
1055 [ --with-sd-user=USER specify user for Storage daemon],
1057 if test "x$withval" != "x" ; then
1064 AC_ARG_WITH(sd_group,
1065 [ --with-sd-group=GROUP specify group for Storage daemon],
1067 if test "x$withval" != "x" ; then
1074 AC_ARG_WITH(fd_user,
1075 [ --with-fd-user=USER specify user for File daemon],
1077 if test "x$withval" != "x" ; then
1084 AC_ARG_WITH(fd_group,
1085 [ --with-fd-group=GROUP specify group for File daemon],
1087 if test "x$withval" != "x" ; then
1104 # allow setting default executable permissions
1107 AC_ARG_WITH(sbin-perm,
1108 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1110 if test "x$withval" != "x" ; then
1118 # ------------------------------------------------
1119 # Bacula check for various SQL database engines
1120 # ------------------------------------------------
1121 BA_CHECK_POSTGRESQL_DB
1132 AC_DEFINE(PROTOTYPES)
1134 dnl# --------------------------------------------------------------------------
1135 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1137 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1138 if test -z "$CCOPTS"; then
1139 CCOPTS='-g -O2 -Wall'
1148 dnl See if we can use 64 bit file addresses
1149 largefile_support="no"
1155 dnl# --------------------------------------------------------------------------
1156 dnl# CHECKING FOR HEADER FILES
1157 dnl# --------------------------------------------------------------------------
1193 AC_STRUCT_ST_BLKSIZE
1197 dnl# --------------------------------------------------------------------------
1198 dnl# Check for utime.h structure
1199 dnl# --------------------------------------------------------------------------
1200 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1202 #include <sys/types.h>
1203 #include <utime.h>], [struct utimbuf foo],
1204 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1205 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1207 dnl# --------------------------------------------------------------------------
1208 dnl# Check for socklen_t
1209 dnl# --------------------------------------------------------------------------
1210 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1212 #include <sys/types.h>
1213 #include <sys/socket.h>],
1215 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1216 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1218 dnl# --------------------------------------------------------------------------
1219 dnl# Check for bigendian
1220 dnl# --------------------------------------------------------------------------
1221 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1223 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1224 [ba_cv_bigendian=yes],
1225 [ba_cv_bigendian=no],
1226 [ba_cv_bigendian=no])])
1227 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1233 dnl# --------------------------------------------------------------------------
1234 dnl# CHECKING FOR FILESYSTEM TYPE
1235 dnl# --------------------------------------------------------------------------
1236 AC_MSG_CHECKING(how to get filesystem type)
1238 # The order of these tests is important.
1239 AC_TRY_CPP([#include <sys/statvfs.h>
1240 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1241 if test $fstype = no; then
1242 AC_TRY_CPP([#include <sys/statfs.h>
1243 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1245 if test $fstype = no; then
1246 AC_TRY_CPP([#include <sys/statfs.h>
1247 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1249 if test $fstype = no; then
1250 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1252 if test $fstype = no; then
1253 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1255 if test $fstype = no; then
1256 AC_TRY_CPP([#include <sys/mount.h>
1257 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1259 AC_MSG_RESULT($fstype)
1261 dnl# --------------------------------------------------------------------------
1262 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1263 dnl# --------------------------------------------------------------------------
1271 AC_CHECK_TYPE(ino_t, unsigned long)
1272 AC_CHECK_TYPE(dev_t, unsigned long)
1273 AC_CHECK_TYPE(daddr_t, long)
1274 AC_CHECK_TYPE(major_t, int)
1275 AC_CHECK_TYPE(minor_t, int)
1276 AC_CHECK_TYPE(ssize_t, int)
1283 AC_CHECK_SIZEOF(char, 1)
1284 AC_CHECK_SIZEOF(short int, 2)
1285 AC_CHECK_SIZEOF(int, 4)
1286 AC_CHECK_SIZEOF(long int, 4)
1287 AC_CHECK_SIZEOF(long long int, 8)
1288 AC_CHECK_SIZEOF(int *, 4)
1290 # Check for sys/types.h types
1291 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1293 [ #include <sys/types.h> ],
1295 [ ac_cv_have_u_int="yes" ],
1296 [ ac_cv_have_u_int="no" ]
1299 if test "x$ac_cv_have_u_int" = "xyes" ; then
1300 AC_DEFINE(HAVE_U_INT)
1304 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1306 [ #include <sys/types.h> ],
1307 [ intmax_t a; a = 1;],
1308 [ ac_cv_have_intmax_t="yes" ],
1311 [ #include <stdint.h> ],
1312 [ intmax_t a; a = 1;],
1313 [ ac_cv_have_intmax_t="yes" ],
1314 [ ac_cv_have_intmax_t="no" ]
1320 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1321 AC_DEFINE(HAVE_INTMAX_T)
1326 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1328 [ #include <sys/types.h> ],
1329 [ u_intmax_t a; a = 1;],
1330 [ ac_cv_have_u_intmax_t="yes" ],
1333 [ #include <stdint.h> ],
1334 [ u_intmax_t a; a = 1;],
1335 [ ac_cv_have_u_intmax_t="yes" ],
1336 [ ac_cv_have_u_intmax_t="no" ]
1341 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1342 AC_DEFINE(HAVE_U_INTMAX_T)
1347 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1349 [ #include <sys/types.h> ],
1350 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1351 [ ac_cv_have_intxx_t="yes" ],
1352 [ ac_cv_have_intxx_t="no" ]
1355 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1356 AC_DEFINE(HAVE_INTXX_T)
1360 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1362 [ #include <sys/types.h> ],
1363 [ int64_t a; a = 1;],
1364 [ ac_cv_have_int64_t="yes" ],
1365 [ ac_cv_have_int64_t="no" ]
1368 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1369 AC_DEFINE(HAVE_INT64_T)
1373 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1375 [ #include <sys/types.h> ],
1376 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1377 [ ac_cv_have_u_intxx_t="yes" ],
1378 [ ac_cv_have_u_intxx_t="no" ]
1381 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1382 AC_DEFINE(HAVE_U_INTXX_T)
1386 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1388 [ #include <sys/types.h> ],
1389 [ u_int64_t a; a = 1;],
1390 [ ac_cv_have_u_int64_t="yes" ],
1391 [ ac_cv_have_u_int64_t="no" ]
1394 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1395 AC_DEFINE(HAVE_U_INT64_T)
1399 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1400 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1402 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1404 [ #include <sys/bitypes.h> ],
1405 [ int8_t a; int16_t b; int32_t c;
1406 u_int8_t e; u_int16_t f; u_int32_t g;
1407 a = b = c = e = f = g = 1; ],
1408 [ AC_DEFINE(HAVE_U_INTXX_T)
1409 AC_DEFINE(HAVE_INTXX_T)
1410 AC_DEFINE(HAVE_SYS_BITYPES_H)
1411 AC_MSG_RESULT(yes) ],
1412 [ AC_MSG_RESULT(no)]
1416 if test -z "$have_u_intxx_t" ; then
1417 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1419 [ #include <sys/types.h> ],
1420 [ uint8_t a; uint16_t b;
1421 uint32_t c; a = b = c = 1; ],
1422 [ ac_cv_have_uintxx_t="yes" ],
1423 [ ac_cv_have_uintxx_t="no" ]
1426 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1427 AC_DEFINE(HAVE_UINTXX_T)
1431 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1432 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1434 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1436 [ #include <sys/bitypes.h> ],
1437 [ int64_t a; u_int64_t b;
1439 [ AC_DEFINE(HAVE_U_INT64_T)
1440 AC_DEFINE(HAVE_INT64_T)
1441 AC_MSG_RESULT(yes) ],
1442 [ AC_MSG_RESULT(no)]
1446 if (test -z "$have_uintxx_t" && \
1447 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1449 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1451 [ #include <sys/bitypes.h> ],
1452 [ uint8_t a; uint16_t b;
1453 uint32_t c; a = b = c = 1; ],
1454 [ AC_DEFINE(HAVE_UINTXX_T)
1455 AC_MSG_RESULT(yes) ],
1456 [ AC_MSG_RESULT(no)]
1464 dnl# --------------------------------------------------------------------------
1465 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1466 dnl# --------------------------------------------------------------------------
1482 [echo 'configure: cannot find needed function.'; exit 1]
1485 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1486 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1488 AC_CHECK_FUNCS(chflags)
1490 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1492 dnl# --------------------------------------------------------------------------
1493 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1494 dnl# --------------------------------------------------------------------------
1495 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1497 # If resolver functions are not in libc check for -lnsl or -lresolv.
1498 AC_CHECK_FUNC(gethostbyname_r,
1499 AC_MSG_RESULT(using libc's resolver),
1500 AC_CHECK_LIB(nsl,gethostbyname_r)
1501 AC_CHECK_LIB(resolv,gethostbyname_r))
1505 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1506 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1507 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1509 dnl ----------------------------
1510 dnl check sa_len of sockaddr
1511 dnl ----------------------------
1512 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1513 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1514 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1516 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1517 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1521 dnl Check for IPv6 support
1522 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1523 [AC_TRY_LINK([ #include <sys/types.h>
1524 #include <sys/socket.h>
1525 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1527 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1529 if test "$ac_cv_ipv6_support" = yes; then
1530 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1539 AC_FUNC_CLOSEDIR_VOID
1540 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1541 # AC_FUNC_FNMATCH dnl use local version
1544 dnl# FreeBSD needs to link libxpg4
1545 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1548 AC_CHECK_LIB(sun, getpwnam)
1550 AC_CHECK_HEADERS(zlib.h)
1551 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1553 if test x$FDLIBS = x-lz; then
1554 AC_DEFINE(HAVE_LIBZ)
1558 AC_CHECK_HEADER(sys/acl.h)
1559 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1561 if test $ac_cv_lib_acl_acl_get_file = yes; then
1566 dnl Check for pthread libraries
1568 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1569 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1570 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1571 [AC_CHECK_FUNC(pthread_create)]
1581 LDFLAGS=${LDFLAGS--O}
1582 DB_LIBS="${SQL_LFLAGS}"
1584 CPPFLAGS="$CPPFLAGS"
1595 AC_SUBST(X_EXTRA_LIBS)
1599 dnl# extra configurable objects
1610 # Finally we set appropriate distribution specific
1611 # variables and defaults
1613 # PFILES are platform specific files
1614 PFILES="platforms/Makefile"
1618 hostname=`uname -n | cut -d '.' -f 1`
1622 PSCMD="ps -e -o pid,comm"
1624 platforms/aix/Makefile"
1625 TAPEDRIVE="/dev/rmt0.1"
1629 PTHREAD_LIB="-lpthread -lexc"
1630 if test "${CC}" = "gcc" ; then
1637 TAPEDRIVE="/dev/nrmt0"
1640 DISTVER=`uname -a |awk '{print $3}'`
1641 TAPEDRIVE="/dev/nrmt0"
1642 PTHREAD_LIB="-pthread"
1643 CFLAGS="${CFLAGS} -pthread"
1644 PSCMD="ps -x -o pid,command"
1648 platforms/bsdi/Makefile \
1649 platforms/bsdi/bacula-fd \
1650 platforms/bsdi/bacula-sd \
1651 platforms/bsdi/bacula-dir"
1652 largefile_support="yes"
1655 DISTVER=`uname -a |awk '{print $3}'`
1656 TAPEDRIVE="/dev/nrst0"
1659 WLDFLAGS="-mwindows"
1663 TAPEDRIVE="/dev/nst0"
1664 PSCMD="ps -e -o pid,command"
1667 platforms/darwin/Makefile"
1670 DISTVER=`cat /etc/debian_version`
1671 TAPEDRIVE="/dev/nrst0"
1672 PSCMD="ps -e -o pid,command"
1675 DISTVER=`uname -a |awk '{print $3}'`
1676 VER=`echo $DISTVER | cut -c 1`
1677 if test x$VER = x4 ; then
1678 PTHREAD_LIB="-pthread"
1679 CFLAGS="${CFLAGS} -pthread"
1683 TAPEDRIVE="/dev/nrsa0"
1684 PSCMD="ps -x -o pid,command"
1686 platforms/freebsd/Makefile \
1687 platforms/freebsd/bacula-fd \
1688 platforms/freebsd/bacula-sd \
1689 platforms/freebsd/bacula-dir"
1690 largefile_support="yes"
1693 PSCMD="UNIX95=1 ps -e -o pid,comm"
1694 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1696 TAPEDRIVE="/dev/rmt/0hnb"
1697 PTHREAD_LIB="-lpthread"
1698 AC_DEFINE([_INCLUDE_LONGLONG])
1702 TAPEDRIVE="/dev/rmt/0cbn"
1703 PSCMD="ps -e -o pid,comm"
1705 platforms/irix/Makefile \
1706 platforms/irix/bacula-fd \
1707 platforms/irix/bacula-sd \
1708 platforms/irix/bacula-dir"
1711 DISTVER=`uname -a |awk '{print $3}'`
1714 TAPEDRIVE="/dev/nrst0"
1715 PSCMD="ps -a -o pid,command"
1716 PTHREAD_LIB="-pthread"
1717 CFLAGS="${CFLAGS} -pthread"
1720 DISTVER=`uname -a |awk '{print $3}'`
1723 TAPEDRIVE="/dev/nrst0"
1724 PSCMD="ps -ax -o pid,command"
1725 PTHREAD_LIB="-pthread"
1726 CFLAGS="${CFLAGS} -pthread"
1728 platforms/openbsd/Makefile \
1729 platforms/openbsd/bacula-fd \
1730 platforms/openbsd/bacula-sd \
1731 platforms/openbsd/bacula-dir"
1734 if test -f /etc/whitebox-release ; then
1735 f=/etc/whitebox-release
1737 f=/etc/redhat-release
1739 if test `cat $f | grep release |\
1740 cut -f 3 -d ' '`x = "Enterprise"x ; then
1741 DISTVER="Enterprise "`cat $f | grep release |\
1744 DISTVER=`cat /etc/redhat-release | grep release |\
1747 TAPEDRIVE="/dev/nst0"
1748 PSCMD="ps -e -o pid,command"
1750 platforms/redhat/Makefile \
1751 platforms/redhat/bacula-fd \
1752 platforms/redhat/bacula-sd \
1753 platforms/redhat/bacula-dir \
1754 platforms/redhat/bacula.spec \
1756 hostname=`hostname -s`
1759 DISTVER=`cat /etc/mandrake-release | grep release |\
1761 TAPEDRIVE="/dev/nst0"
1762 PSCMD="ps -e -o pid,command"
1764 platforms/mandrake/Makefile \
1765 platforms/mandrake/bacula-fd \
1766 platforms/mandrake/bacula-sd \
1767 platforms/mandrake/bacula-dir \
1768 platforms/mandrake/bacula.spec \
1772 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1773 TAPEDRIVE="/dev/nst0"
1774 PSCMD="ps -e -o pid,command"
1776 platforms/gentoo/Makefile \
1777 platforms/gentoo/bacula-init \
1778 platforms/gentoo/bacula-fd \
1779 platforms/gentoo/bacula-sd \
1780 platforms/gentoo/bacula-dir"
1783 DISTVER=`cat /etc/slackware-version`
1784 TAPEDRIVE="/dev/nst0"
1785 PSCMD="ps -e -o pid,command"
1787 platforms/slackware/Makefile \
1788 platforms/slackware/rc.bacula-fd \
1789 platforms/slackware/rc.bacula-sd \
1790 platforms/slackware/rc.bacula-dir\
1791 platforms/slackware/functions.bacula"
1795 TAPEDRIVE="/dev/rmt/0cbn"
1796 PSCMD="ps -e -o pid,comm"
1798 platforms/solaris/Makefile \
1799 platforms/solaris/bacula-fd \
1800 platforms/solaris/bacula-sd \
1801 platforms/solaris/bacula-dir"
1802 if test x$DISTVER = x5.6 ; then
1803 AC_DEFINE(HAVE_OLD_SOCKOPT)
1805 LIBS="$LIBS -lresolv"
1808 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1810 TAPEDRIVE="/dev/nst0"
1811 PSCMD="ps -e -o pid,command"
1813 platforms/suse/Makefile \
1814 platforms/suse/bacula-fd \
1815 platforms/suse/bacula-sd \
1816 platforms/suse/bacula-dir \
1817 platforms/suse/bacula \
1818 platforms/suse/bacula.spec"
1823 TAPEDRIVE="/dev/nst0"
1824 PSCMD="ps -e -o pid,command"
1826 platforms/suse/Makefile \
1827 platforms/suse/bacula-fd \
1828 platforms/suse/bacula-sd \
1829 platforms/suse/bacula-dir"
1833 TAPEDRIVE="/dev/nst0"
1836 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1842 LIBS="$PTHREAD_LIB $LIBS"
1844 AC_DEFINE_UNQUOTED(lld, "$lld")
1845 AC_DEFINE_UNQUOTED(llu, "$llu")
1853 dnl# common parts of the Makefile
1854 MCOMMON=./autoconf/Make.common
1855 AC_SUBST_FILE(MCOMMON)
1858 if test "x${subsysdir}" = "x${sbindir}" ; then
1861 echo "You have set both --sbindir and --with-subsys-dir"
1862 echo " equal to: ${subsysdir} "
1863 echo "This is not permitted. Please reconfigure."
1865 echo "Aborting configuration ..."
1871 AC_OUTPUT([autoconf/Make.common \
1873 scripts/startmysql \
1875 scripts/btraceback \
1881 scripts/devel_bacula \
1884 scripts/bacula.desktop.gnome1 \
1885 scripts/bacula.desktop.gnome2 \
1886 scripts/bacula.desktop.gnome1.consolehelper \
1887 scripts/bacula.desktop.gnome2.consolehelper \
1888 scripts/bacula.desktop.gnome1.xsu \
1889 scripts/bacula.desktop.gnome2.xsu \
1890 scripts/gnome-console.console_apps \
1891 scripts/mtx-changer \
1892 scripts/dvd-writepart \
1893 scripts/dvd-freespace \
1894 scripts/bacula-tray-monitor.desktop \
1895 scripts/logwatch/Makefile \
1896 scripts/logwatch/logfile.bacula.conf \
1898 doc/latex/version.tex \
1901 src/console/Makefile \
1902 src/console/bconsole.conf \
1903 src/gnome-console/Makefile \
1904 src/gnome-console/gnome-console.conf \
1905 src/gnome2-console/Makefile \
1906 src/gnome2-console/gnome-console.conf \
1907 src/wx-console/Makefile \
1908 src/wx-console/wx-console.conf \
1909 src/tray-monitor/Makefile \
1910 src/tray-monitor/tray-monitor.conf \
1912 src/dird/bacula-dir.conf \
1914 src/stored/Makefile \
1915 src/stored/bacula-sd.conf \
1916 src/filed/Makefile \
1917 src/filed/bacula-fd.conf \
1918 src/filed/win32/Makefile \
1920 src/cats/make_catalog_backup \
1921 src/cats/delete_catalog_backup \
1922 src/cats/create_postgresql_database \
1923 src/cats/update_postgresql_tables \
1924 src/cats/make_postgresql_tables \
1925 src/cats/grant_postgresql_privileges \
1926 src/cats/drop_postgresql_tables \
1927 src/cats/drop_postgresql_database \
1928 src/cats/create_mysql_database \
1929 src/cats/update_mysql_tables \
1930 src/cats/make_mysql_tables \
1931 src/cats/grant_mysql_privileges \
1932 src/cats/drop_mysql_tables \
1933 src/cats/drop_mysql_database \
1934 src/cats/create_sqlite_database \
1935 src/cats/update_sqlite_tables \
1936 src/cats/make_sqlite_tables \
1937 src/cats/grant_sqlite_privileges \
1938 src/cats/drop_sqlite_tables \
1939 src/cats/drop_sqlite_database \
1940 src/cats/create_sqlite3_database \
1941 src/cats/update_sqlite3_tables \
1942 src/cats/make_sqlite3_tables \
1943 src/cats/grant_sqlite3_privileges \
1944 src/cats/drop_sqlite3_tables \
1945 src/cats/drop_sqlite3_database \
1948 src/cats/create_bdb_database \
1949 src/cats/update_bdb_tables \
1950 src/cats/make_bdb_tables \
1951 src/cats/grant_bdb_privileges \
1952 src/cats/drop_bdb_tables \
1953 src/cats/drop_bdb_database \
1954 src/cats/create_bacula_database \
1955 src/cats/update_bacula_tables \
1956 src/cats/grant_bacula_privileges \
1957 src/cats/make_bacula_tables \
1958 src/cats/drop_bacula_tables \
1959 src/cats/drop_bacula_database \
1960 src/findlib/Makefile \
1961 src/tools/Makefile \
1962 src/win32/winbacula.nsi \
1963 src/win32/baculafd/bacula-fd.conf \
1964 src/win32/Makefile \
1965 src/win32/console/bconsole.conf \
1966 src/win32/wx-console/wx-console.conf \
1967 src/win32/pebuilder/Makefile \
1968 src/bimagemgr/Makefile \
1969 src/bimagemgr/bacula-bimagemgr.spec \
1971 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
1975 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1976 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
1981 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
1982 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
1984 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
1985 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
1987 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
1988 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
1990 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
1991 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
1993 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
1994 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
1996 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2000 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2001 largefile_support="yes"
2005 # A whole lot of hand springs to get the compiler version.
2006 # This is because gcc changed the output in version 3.0
2008 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2009 if test "x${CCVERSION}" = "x" ; then
2010 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2012 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2013 if test x"${CXXVERSION}" = x ; then
2014 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2017 if test "x${subsysdir}" = "x${sbindir}" ; then
2020 echo "You have set --sbindir and --with-subsys-dir"
2021 echo " both equal to: ${subsysdir} "
2022 echo " This is not permitted. Please reconfigure."
2024 echo "Aborting configuration ..."
2030 if test "x${db_name}" = "xInternal" ; then
2033 echo "You have not specified either --enable-client-only or one of the"
2034 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
2035 echo " This is not permitted. Please reconfigure."
2037 echo "Aborting the configuration ..."
2044 Configuration on `date`:
2046 Host: $host -- ${DISTNAME} ${DISTVER}
2047 Bacula version: ${VERSION} (${DATE})
2048 Source code location: ${srcdir}
2049 Install binaries: ${sbindir}
2050 Install config files: ${sysconfdir}
2051 Scripts directory: ${scriptdir}
2052 Working directory: ${working_dir}
2053 PID directory: ${piddir}
2054 Subsys directory: ${subsysdir}
2055 C Compiler: ${CC} ${CCVERSION}
2056 C++ Compiler: ${CXX} ${CXXVERSION}
2057 Compiler flags: ${WCFLAGS} ${CFLAGS}
2058 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2060 Statically Linked Tools: ${support_static_tools}
2061 Statically Linked FD: ${support_static_fd}
2062 Statically Linked SD: ${support_static_sd}
2063 Statically Linked DIR: ${support_static_dir}
2064 Statically Linked CONS: ${support_static_cons}
2065 Database type: ${db_name}
2066 Database lib: ${DB_LIBS}
2068 Job Output Email: ${job_email}
2069 Traceback Email: ${dump_email}
2070 SMTP Host Address: ${smtp_host}
2072 Director Port: ${dir_port}
2073 File daemon Port: ${fd_port}
2074 Storage daemon Port: ${sd_port}
2076 Director User: ${dir_user}
2077 Director Group: ${dir_group}
2078 Storage Daemon User: ${sd_user}
2079 Storage DaemonGroup: ${sd_group}
2080 File Daemon User: ${fd_user}
2081 File Daemon Group: ${fd_group}
2083 SQL binaries Directory ${SQL_BINDIR}
2085 Large file support: $largefile_support
2086 Bacula conio support: ${got_conio} ${CONS_LIBS}
2087 readline support: ${got_readline} ${PRTREADLINE_SRC}
2088 TCP Wrappers support: ${TCPW_MSG}
2089 TLS support: ${support_tls}
2090 ZLIB support: ${have_zlib}
2091 enable-smartalloc: ${support_smartalloc}
2092 enable-gnome: ${support_gnome} ${gnome_version}
2093 enable-wx-console: ${support_wx_console}
2094 enable-tray-monitor: ${support_tray_monitor}
2095 client-only: ${build_client_only}
2096 ACL support: ${have_acl}
2097 Python support: ${support_python} ${PYTHON_LIBS}