3 dnl# Process this file with autoconf to produce a configure script.
11 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
12 AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
14 dnl require a recent autoconf
18 dnl search for true and false programs.
19 AC_PATH_PROGS(TRUEPRG, true, :)
20 AC_PATH_PROGS(FALSEPRG, false, :)
25 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
26 DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
27 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
31 echo "configuring for bacula $VERSION ($DATE)"
34 dnl -------------------------------------------------------
35 dnl# Check for compiler.
36 dnl ------------------------------------------------------
40 AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
41 AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
43 if test "x$CC" = xgcc; then
46 AC_PATH_PROG(CXX, $CXX, $CXX)
47 if test ! -e $CXX; then
48 AC_MSG_ERROR(Unable to find C++ compiler)
51 dnl -------------------------------------------------------
52 dnl# Check for programs.
53 dnl ------------------------------------------------------
56 AC_PATH_PROG(MV, mv, mv)
57 AC_PATH_PROG(RM, rm, rm)
58 AC_PATH_PROG(CP, cp, cp)
59 AC_PATH_PROG(SED, sed, sed)
60 AC_PATH_PROG(ECHO, echo, echo)
61 AC_PATH_PROG(CMP, cmp, cmp)
62 AC_PATH_PROG(TBL, tbl, tbl)
63 AC_PATH_PROG(AR, ar, ar)
64 dnl AC_PATH_PROG(RANLIB, ranlib, ranlib)
65 AC_PATH_PROG(OPENSSL, openssl, none)
66 AC_PATH_PROG(MTX, mtx, mtx)
67 AC_PATH_PROG(DF, df, df)
68 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
69 AC_PATH_PROG(PYTHON, python, python)
70 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
71 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
72 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
73 AC_ARG_VAR(WXCONFIG, [wx-config command. On some systems, you must set it to wx-config-2.6 to use wxWidgets 2.6.])
74 if test "x$WXCONFIG" = x; then
77 AC_PATH_PROG(WXCONFIG, ${WXCONFIG}, ${WXCONFIG})
78 AC_ARG_VAR(WXFLAGS, [Parameters to pass to wx-config (e.g. --unicode=no).])
79 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
80 AC_PATH_PROG(PIDOF, pidof, pidof)
82 # Some AWK programs fail, so test it and warn the user
83 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
84 { if ((prog == $2) || (("(" prog ")") == $2) ||
85 (("[" prog "]") == $2) ||
86 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
88 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
89 The regex engine of $AWK is too broken to be used you
90 might want to install GNU AWK.
91 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
94 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
96 test -n "$ARFLAG" || ARFLAGS="cr"
103 AC_SUBST(LOCAL_CFLAGS)
104 AC_SUBST(LOCAL_LDFLAGS)
109 dnl --------------------------------------------------
110 dnl Bacula OP Sys determination (see aclocal.m4)
111 dnl --------------------------------------------------
114 # -----------------------------------------------------------
115 dnl Bacula OPSys Distribution determination (see aclocal.m4)
116 # ----------------------------------------------------------
117 BA_CHECK_OPSYS_DISTNAME
119 # -----------------------------------------------------------
120 dnl Check for gnome stuff for gnome-console
121 # ----------------------------------------------------------
122 AM_ACLOCAL_INCLUDE(gnome-macros)
124 # ------------------------------------------------------------------
125 # If the user has not set --prefix, we set our default to nothing.
126 # In this case, if the user has not set --sysconfdir, we set it
127 # to the package default of /etc/bacula. If either --prefix or
128 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
129 # ------------------------------------------------------------------
130 if test x${prefix} = xNONE ; then
131 if test `eval echo ${sysconfdir}` = NONE/etc ; then
132 sysconfdir=/etc/bacula
136 sysconfdir=`eval echo ${sysconfdir}`
138 # -------------------------------------------------------------------------
139 # If the user has not set --exec-prefix, we default to ${prefix}
140 # -------------------------------------------------------------------------
141 if test x${exec_prefix} = xNONE ; then
142 exec_prefix=${prefix}
145 # ------------------------------------------------------------------
146 # If the user has not set --sbindir, we set our default as /sbin
147 # ------------------------------------------------------------------
148 if test x$sbindir = x'${exec_prefix}/sbin' ; then
149 sbindir=${exec_prefix}/sbin
151 sbindir=`eval echo ${sbindir}`
153 # -------------------------------------------------------------------------
154 # If the user has not set --mandir, we default to /usr/share/man
155 # -------------------------------------------------------------------------
156 if test x$mandir = x'${prefix}/man' ; then
157 mandir=/usr/share/man
161 # ------------------------------------------------------------------
162 # All list of languages for which a translation exist. Each
163 # language is separated by a space.
164 # ------------------------------------------------------------------
167 AC_PATH_PROGS(MSGFMT, msgfmt, no)
168 if test "$MSGFMT" = "no"
170 echo 'msgfmt program not found, disabling NLS !'
172 USE_INCLUDED_LIBINTL=no
181 support_postgresql=no
182 support_smartalloc=yes
186 support_wx_console=no
190 support_static_tools=no
193 support_static_dir=no
194 support_static_cons=no
201 dnl# --------------------------------------------------------------------------
202 dnl# CHECKING COMMAND LINE OPTIONS
203 dnl# --------------------------------------------------------------------------
205 # -------------------------------------------
206 # gnome (default off)
207 # -------------------------------------------
209 [ --enable-gnome enable build of gnome-console GUI [disabled]],
210 [if test x$enableval = xyes; then
215 if test x$support_gnome = xyes; then
216 abc=`$PKGCONFIG --exists libgnomeui-2.0`
218 if test $pkg = 0; then
219 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
220 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
221 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
222 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
223 AC_SUBST(GNOME_INCLUDEDIR)
224 AC_SUBST(GNOMEUI_LIBS)
225 AC_SUBST(GNOME_LIBDIR)
227 GNOME_DIR=src/gnome2-console
228 gnome_version="Version 2.x"
230 AC_MSG_ERROR(Unable to find Gnome 2 installation)
236 # -------------------------------------------
237 # wx-console (default off)
238 # -------------------------------------------
239 AC_ARG_ENABLE(wx-console,
240 [ --enable-wx-console enable build of wxWidgets console [disabled]],
241 [if test x$enableval = xyes; then
242 support_wx_console=yes
246 if test x$support_wx_console = xyes; then
247 abc=`$WXCONFIG $WXFLAGS --cppflags`
249 if test $pkg = 0; then
250 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
251 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
252 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
254 AC_SUBST(WXCONS_CPPFLAGS)
255 AC_SUBST(WXCONS_LDFLAGS)
256 WX_DIR=src/wx-console
259 echo "wx-config program not found. wx-console disabled."
261 support_wx_console=no
267 # -------------------------------------------
268 # tray-monitor (default off)
269 # -------------------------------------------
270 AC_ARG_ENABLE(tray-monitor,
271 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
272 [if test x$enableval = xyes; then
273 support_tray_monitor=yes
277 if test x$support_tray_monitor = xyes; then
278 abc=`$PKGCONFIG --exists gtk+-2.0`
280 if test $pkg = 0; then
281 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
282 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
283 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
284 AC_SUBST(TRAY_MONITOR_LDFLAGS)
285 TRAY_MONITOR_DIR=src/tray-monitor
286 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
288 if test $pkg = 0; then
289 AC_DEFINE(HAVE_GTK_2_4)
293 AC_SUBST(TRAY_MONITOR_DIR)
295 # -------------------------------------------
296 # smartalloc (default off)
297 # -------------------------------------------
298 AC_ARG_ENABLE(smartalloc,
299 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
300 [if test x$enableval = xno; then
301 support_smartalloc=no
304 if test x$support_smartalloc = xyes; then
305 AC_DEFINE(SMARTALLOC)
308 # -------------------------------------------
309 # static-tools (default off)
310 # -------------------------------------------
311 AC_ARG_ENABLE(static-tools,
312 [ --enable-static-tools enable static tape tools [disabled]],
313 [if test x$enableval = xyes; then
314 support_static_tools=yes
318 if test x$support_static_tools = xyes; then
319 TTOOL_LDFLAGS="-static"
321 AC_SUBST(TTOOL_LDFLAGS)
323 # -------------------------------------------
324 # static-fd (default off)
325 # -------------------------------------------
326 AC_ARG_ENABLE(static-fd,
327 [ --enable-static-fd enable static File daemon [disabled]],
328 [if test x$enableval = xyes; then
329 support_static_fd=yes
333 if test x$support_static_fd = xyes; then
334 STATIC_FD="static-bacula-fd"
338 # -------------------------------------------
339 # static-sd (default off)
340 # -------------------------------------------
341 AC_ARG_ENABLE(static-sd,
342 [ --enable-static-sd enable static Storage daemon [disabled]],
343 [if test x$enableval = xyes; then
344 support_static_sd=yes
348 if test x$support_static_sd = xyes; then
349 STATIC_SD="static-bacula-sd"
353 # -------------------------------------------
354 # static-dir (default off)
355 # -------------------------------------------
356 AC_ARG_ENABLE(static-dir,
357 [ --enable-static-dir enable static Director [disabled]],
358 [if test x$enableval = xyes; then
359 support_static_dir=yes
363 if test x$support_static_dir = xyes; then
364 STATIC_DIR="static-bacula-dir"
368 # -------------------------------------------
369 # static-cons (default off)
370 # -------------------------------------------
371 AC_ARG_ENABLE(static-cons,
372 [ --enable-static-cons enable static Console [disabled]],
373 [if test x$enableval = xyes; then
374 support_static_cons=yes
380 if test x$support_static_cons = xyes; then
381 STATIC_CONS="static-bconsole"
382 STATIC_GNOME_CONS="static-gnome-console"
383 STATIC_WX_CONS="static-wx-console"
385 AC_SUBST(STATIC_CONS)
386 AC_SUBST(STATIC_GNOME_CONS)
387 AC_SUBST(STATIC_WX_CONS)
389 # -------------------------------------------
390 # client_only (default off)
391 # -------------------------------------------
392 AC_ARG_ENABLE(client-only,
393 [ --enable-client-only build client (File daemon) only [disabled]],
394 [if test x$enableval = xyes; then
395 build_client_only=yes
399 if test x$build_client_only = xno; then
406 # ---------------------------------------------------
407 # Check for conio (Bacula readline substitute)(
408 # ---------------------------------------------------
409 # this allows you to turn it completely off
411 [ --disable-conio disable conio support [enabled]
413 [if test x$enableval = xno; then
418 if test x$support_conio = xyes; then
419 AC_CHECK_HEADER(termcap.h,
420 [ AC_CHECK_LIB(termcap, tgetent,
421 [ CONS_LIBS="-ltermcap"
426 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
428 [ AC_CHECK_LIB(ncurses, tgetent,
429 [ CONS_LIBS="-lncurses"
434 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
439 AC_CHECK_HEADERS(curses.h)
440 AC_CHECK_HEADER(term.h,
441 [ AC_CHECK_LIB(curses, tgetent,
442 [ CONS_LIBS="-lcurses"
447 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
450 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
459 # ---------------------------------------------------
460 # Check for readline support/directory (default off)
461 # ---------------------------------------------------
462 # this allows you to turn it completely off
463 AC_ARG_ENABLE(readline,
464 [ --disable-readline disable readline support [disable]
466 [if test x$enableval = xno; then
472 if test x$support_readline = xyes; then
473 AC_ARG_WITH(readline,
474 [ --with-readline=DIR specify readline library directory],
476 case "$with_readline" in
479 if test -f ${with_readline}/readline.h; then
480 CONS_INC="-I${with_readline}"
481 CONS_LDFLAGS="-L$with_readline"
482 elif test -f ${with_readline}/include/readline/readline.h; then
483 CONS_INC="-I${with_readline}/include/readline"
484 CONS_LDFLAGS="-L${with_readline}/lib"
485 with_readline="${with_readline}/include/readline"
487 with_readline="/usr/include/readline"
489 AC_CHECK_HEADER(${with_readline}/readline.h,
490 [ AC_DEFINE(HAVE_READLINE)
491 CONS_LIBS="-lreadline -lhistory -ltermcap"
495 echo "readline.h not found. readline turned off ..."
502 # check for standard readline library
503 AC_CHECK_HEADER(/usr/include/readline/readline.h,
504 [ AC_DEFINE(HAVE_READLINE)
506 CONS_INC="-I/usr/include/readline"
507 CONS_LIBS="-lreadline -ltermcap"
509 # Did not find standard library, so try Bacula's default
510 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
511 [ AC_DEFINE(HAVE_READLINE)
513 CONS_INC="-I${TOP_DIR}/depkgs/readline"
514 CONS_LIBS="-lreadline -lhistory -ltermcap"
515 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
516 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
519 echo "readline.h not found. readline turned off ..."
535 AC_SUBST(CONS_LDFLAGS)
536 AC_SUBST(READLINE_SRC)
538 # Minimal stuff for readline Makefile configuration
543 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
544 AC_CHECK_FUNCS(nanosleep nl_langinfo)
545 AC_CHECK_HEADERS(varargs.h)
547 # End of readline/conio stuff
548 # -----------------------------------------------------------------------
550 # -----------------------------------------------------------------------
551 # Check for Python support
553 AC_MSG_CHECKING(for Python support)
556 --with-python[=DIR] Include Python support. DIR is the Python base
557 install directory, default is to search through
558 a number of common places for the Python files.],
562 if test "$withval" != "no"; then
563 if test "$withval" = "yes"; then
564 for python_root in /usr /usr/local; do
565 if test -f $python_root/include/python2.2/Python.h; then
566 PYTHON_INCDIR=-I$python_root/include/python2.2
567 PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
569 elif test -f $python_root/include/python2.3/Python.h; then
570 PYTHON_INCDIR=-I$python_root/include/python2.3
571 PYTHON_LIBS="-L$python_root/lib/python2.3/config -lpython2.3"
573 elif test -f $python_root/include/python2.4/Python.h; then
574 PYTHON_INCDIR=-I$python_root/include/python2.4
575 PYTHON_LIBS="-L$python_root/lib/python2.4/config -lpython2.4"
579 if test x$PYTHON_INCDIR = x; then
580 if test -f $prefix/include/Python.h; then
581 PYTHON_INCDIR=-I$prefix/include
582 PYTHON_LIBS="-L$prefix/lib/config -lpython"
585 AC_MSG_ERROR(Unable to find Python.h in standard locations)
589 if test -f $withval/Python.h; then
590 PYTHON_INCDIR=-I$withval
591 PYTHON_LIBS="-L$withval/config -lpython"
592 elif test -f $withval/include/Python.h; then
593 PYTHON_INCDIR=-I$withval/include
594 PYTHON_LIBS="-L$withval/lib/config -lpython"
595 elif test -f $withval/include/python/Python.h; then
596 PYTHON_INCDIR=-I$withval/include/python
597 PYTHON_LIBS="-L$withval/lib/python/config -lpython"
600 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
603 AC_DEFINE([HAVE_PYTHON], 1)
606 AC_MSG_NOTICE(checking for more Python libs)
607 saved_LIBS="$LIBS"; LIBS=
608 AC_SEARCH_LIBS(shm_open, [rt])
609 AC_CHECK_LIB(util, openpty)
610 PYTHON_LIBS="$PYTHON_LIBS $LIBS"
618 AC_SUBST(PYTHON_LIBS)
619 AC_SUBST(PYTHON_INCDIR)
623 # Find where sockets are (especially for Solaris)
624 # Do this before the TCP Wrappers test since tcp wrappers
625 # uses the socket library and some linkers are stupid.
627 AC_CHECK_FUNC(socket,
628 AC_MSG_RESULT(using libc's socket),
629 AC_CHECK_LIB(xnet,socket)
630 AC_CHECK_LIB(socket,socket)
631 AC_CHECK_LIB(inet,socket))
634 # -----------------------------------------------------------
635 # Check whether user wants TCP wrappers support (default off)
636 # -----------------------------------------------------------
638 AC_ARG_WITH(tcp-wrappers,
639 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
641 if test "x$withval" != "xno" ; then
643 LIBS="$saved_LIBS -lwrap"
644 AC_MSG_CHECKING(for libwrap)
647 int deny_severity = 0;
648 int allow_severity = 0;
649 struct request_info *req; ],
650 [ hosts_access(req); ],
653 AC_DEFINE(HAVE_LIBWRAP)
656 LIBS="$saved_LIBS -lwrap -lnsl"
659 int deny_severity = 0;
660 int allow_severity = 0;
661 struct request_info *req; ],
662 [ hosts_access(req); ],
665 AC_DEFINE(HAVE_LIBWRAP)
668 [AC_MSG_ERROR([*** libwrap missing]) ] ]
675 # -----------------------------------------------------------
676 # Check whether OpenSSL is available
677 # -----------------------------------------------------------
678 AC_MSG_CHECKING([for OpenSSL])
679 dnl The following uses quadrigraphs:
683 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
684 [with_openssl_directory=${withval}])
686 if test "x$with_openssl_directory" != "x"; then
687 OPENSSL_LIBS="-lssl -lcrypto"
690 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
691 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
692 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
696 saved_CFLAGS="$CFLAGS"
697 LIBS="$saved_LIBS $OPENSSL_LIBS"
698 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
700 AC_TRY_LINK([ #include <openssl/ssl.h> ],
701 [ CRYPTO_set_id_callback(NULL); ],
702 [ support_tls="yes" ],
707 CFLAGS="$saved_CFLAGS"
709 if test "$support_tls" = "yes"; then
710 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
711 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
719 AC_MSG_RESULT([$support_tls])
720 AC_SUBST(OPENSSL_LIBS)
721 AC_SUBST(OPENSSL_INC)
724 # -----------------------------------------------------------
725 # Python and OpenSSL are using dlopen
726 # -----------------------------------------------------------
728 if test "$support_python" = "yes" -o "$support_tls" = "yes"; then
729 AC_SEARCH_LIBS(dlopen, [dl])
732 # ------------------------------------------
733 # Where to place working dir
734 # ------------------------------------------
735 working_dir=`eval echo ${prefix}/var/bacula/working`
736 AC_ARG_WITH(working-dir,
737 [ --with-working-dir=PATH specify path of Bacula working directory],
739 if test "x$withval" != "xno" ; then
745 AC_SUBST(working_dir)
748 # ------------------------------------------
749 # Where to place scriptdir (script files)
750 # ------------------------------------------
751 scriptdir=`eval echo ${sysconfdir}`
752 AC_ARG_WITH(scriptdir,
753 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
755 if test "x$withval" != "xno" ; then
764 # ------------------------------------------
765 # Where to send dump email
766 # ------------------------------------------
767 dump_email=root@localhost
768 AC_ARG_WITH(dump-email,
769 [ --with-dump-email=EMAIL dump email address],
771 if test "x$withval" != "xno" ; then
779 # ------------------------------------------
780 # Where to send job email
781 # ------------------------------------------
782 job_email=root@localhost
783 AC_ARG_WITH(job-email,
784 [ --with-job-email=EMAIL job output email address],
786 if test "x$withval" != "xno" ; then
794 # ------------------------------------------
795 # Where to find smtp host
796 # ------------------------------------------
798 AC_ARG_WITH(smtp_host,
799 [ --with-smtp-host=HOST SMTP mail host address],
801 if test "x$withval" != "xno" ; then
810 # ------------------------------------
811 # Where to place pid files
812 # ------------------------------------
815 [ --with-pid-dir=PATH specify location of Bacula pid files],
817 if test "x$withval" != "xno" ; then
823 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
827 # ------------------------------------
828 # Where to place subsys "lock file"
829 # ------------------------------------
830 subsysdir=/var/run/subsys
831 AC_ARG_WITH(subsys-dir,
832 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
834 if test "x$withval" != "xno" ; then
844 # ------------------------------------
845 # Where to start assigning ports
846 # ------------------------------------
848 AC_ARG_WITH(baseport,
849 [ --with-baseport=PORT specify base port address for daemons],
851 if test "x$withval" != "xno" ; then
858 dir_port=`expr $baseport`
859 fd_port=`expr $baseport + 1`
860 sd_port=`expr $fd_port + 1`
867 # ------------------------------------------
869 # ------------------------------------------
871 AC_ARG_WITH(dir-password,
872 [ --with-dir-password=PASSWORD specify Director's password],
874 if test "x$withval" != "xno" ; then
875 dir_password=$withval
880 if test "x$dir_password" = "x" ; then
881 if test "x$OPENSSL" = "xnone" ; then
882 key=`autoconf/randpass 33`
884 key=`openssl rand -base64 33`
890 AC_ARG_WITH(fd-password,
891 [ --with-fd-password=PASSWORD specify Client's password],
893 if test "x$withval" != "xno" ; then
899 if test "x$fd_password" = "x" ; then
900 if test "x$OPENSSL" = "xnone" ; then
901 key=`autoconf/randpass 37`
903 key=`openssl rand -base64 33`
909 AC_ARG_WITH(sd-password,
910 [ --with-sd-password=PASSWORD specify Storage daemon's password],
912 if test "x$withval" != "xno" ; then
918 if test "x$sd_password" = "x" ; then
919 if test "x$OPENSSL" = "xnone" ; then
920 key=`autoconf/randpass 41`
922 key=`openssl rand -base64 33`
928 AC_ARG_WITH(mon-dir-password,
929 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
931 if test "x$withval" != "xno" ; then
932 mon_dir_password=$withval
937 if test "x$mon_dir_password" = "x" ; then
938 if test "x$OPENSSL" = "xnone" ; then
939 key=`autoconf/randpass 33`
941 key=`openssl rand -base64 33`
943 mon_dir_password=$key
947 AC_ARG_WITH(mon-fd-password,
948 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
950 if test "x$withval" != "xno" ; then
951 mon_fd_password=$withval
956 if test "x$mon_fd_password" = "x" ; then
957 if test "x$OPENSSL" = "xnone" ; then
958 key=`autoconf/randpass 37`
960 key=`openssl rand -base64 33`
966 AC_ARG_WITH(mon-sd-password,
967 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
969 if test "x$withval" != "xno" ; then
970 mon_sd_password=$withval
975 if test "x$mon_sd_password" = "x" ; then
976 if test "x$OPENSSL" = "xnone" ; then
977 key=`autoconf/randpass 41`
979 key=`openssl rand -base64 33`
984 AC_SUBST(dir_password)
985 AC_SUBST(fd_password)
986 AC_SUBST(sd_password)
987 AC_SUBST(mon_dir_password)
988 AC_SUBST(mon_fd_password)
989 AC_SUBST(mon_sd_password)
993 # Handle users and groups for each daemon
996 AC_ARG_WITH(dir_user,
997 [ --with-dir-user=USER specify user for Director daemon],
999 if test "x$withval" != "x" ; then
1006 AC_ARG_WITH(dir_group,
1007 [ --with-dir-group=GROUP specify group for Director daemon],
1009 if test "x$withval" != "x" ; then
1016 AC_ARG_WITH(sd_user,
1017 [ --with-sd-user=USER specify user for Storage daemon],
1019 if test "x$withval" != "x" ; then
1026 AC_ARG_WITH(sd_group,
1027 [ --with-sd-group=GROUP specify group for Storage daemon],
1029 if test "x$withval" != "x" ; then
1036 AC_ARG_WITH(fd_user,
1037 [ --with-fd-user=USER specify user for File daemon],
1039 if test "x$withval" != "x" ; then
1046 AC_ARG_WITH(fd_group,
1047 [ --with-fd-group=GROUP specify group for File daemon],
1049 if test "x$withval" != "x" ; then
1066 # allow setting default executable permissions
1069 AC_ARG_WITH(sbin-perm,
1070 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1072 if test "x$withval" != "x" ; then
1080 # ------------------------------------------------
1081 # Bacula check for various SQL database engines
1082 # ------------------------------------------------
1083 BA_CHECK_POSTGRESQL_DB
1094 AC_DEFINE(PROTOTYPES)
1096 dnl# --------------------------------------------------------------------------
1097 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1099 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1100 if test -z "$CCOPTS"; then
1101 CCOPTS='-g -O2 -Wall'
1110 dnl See if we can use 64 bit file addresses
1111 largefile_support="no"
1117 dnl# --------------------------------------------------------------------------
1118 dnl# CHECKING FOR HEADER FILES
1119 dnl# --------------------------------------------------------------------------
1155 AC_STRUCT_ST_BLKSIZE
1159 dnl# --------------------------------------------------------------------------
1160 dnl# Check for utime.h structure
1161 dnl# --------------------------------------------------------------------------
1162 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1164 #include <sys/types.h>
1165 #include <utime.h>], [struct utimbuf foo],
1166 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1167 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1169 dnl# --------------------------------------------------------------------------
1170 dnl# Check for socklen_t
1171 dnl# --------------------------------------------------------------------------
1172 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1174 #include <sys/types.h>
1175 #include <sys/socket.h>],
1177 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1178 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1180 dnl# --------------------------------------------------------------------------
1181 dnl# Check for bigendian
1182 dnl# --------------------------------------------------------------------------
1183 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1185 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1186 [ba_cv_bigendian=yes],
1187 [ba_cv_bigendian=no],
1188 [ba_cv_bigendian=no])])
1189 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1195 dnl# --------------------------------------------------------------------------
1196 dnl# CHECKING FOR FILESYSTEM TYPE
1197 dnl# --------------------------------------------------------------------------
1198 AC_MSG_CHECKING(how to get filesystem type)
1200 # The order of these tests is important.
1201 AC_TRY_CPP([#include <sys/statvfs.h>
1202 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1203 if test $fstype = no; then
1204 AC_TRY_CPP([#include <sys/statfs.h>
1205 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1207 if test $fstype = no; then
1208 AC_TRY_CPP([#include <sys/statfs.h>
1209 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1211 if test $fstype = no; then
1212 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1214 if test $fstype = no; then
1215 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1217 if test $fstype = no; then
1218 AC_TRY_CPP([#include <sys/mount.h>
1219 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1221 AC_MSG_RESULT($fstype)
1223 dnl# --------------------------------------------------------------------------
1224 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1225 dnl# --------------------------------------------------------------------------
1233 AC_CHECK_TYPE(ino_t, unsigned long)
1234 AC_CHECK_TYPE(dev_t, unsigned long)
1235 AC_CHECK_TYPE(daddr_t, long)
1236 AC_CHECK_TYPE(major_t, int)
1237 AC_CHECK_TYPE(minor_t, int)
1238 AC_CHECK_TYPE(ssize_t, int)
1245 AC_CHECK_SIZEOF(char, 1)
1246 AC_CHECK_SIZEOF(short int, 2)
1247 AC_CHECK_SIZEOF(int, 4)
1248 AC_CHECK_SIZEOF(long int, 4)
1249 AC_CHECK_SIZEOF(long long int, 8)
1250 AC_CHECK_SIZEOF(int *, 4)
1252 # Check for sys/types.h types
1253 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1255 [ #include <sys/types.h> ],
1257 [ ac_cv_have_u_int="yes" ],
1258 [ ac_cv_have_u_int="no" ]
1261 if test "x$ac_cv_have_u_int" = "xyes" ; then
1262 AC_DEFINE(HAVE_U_INT)
1266 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1268 [ #include <sys/types.h> ],
1269 [ intmax_t a; a = 1;],
1270 [ ac_cv_have_intmax_t="yes" ],
1273 [ #include <stdint.h> ],
1274 [ intmax_t a; a = 1;],
1275 [ ac_cv_have_intmax_t="yes" ],
1276 [ ac_cv_have_intmax_t="no" ]
1282 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1283 AC_DEFINE(HAVE_INTMAX_T)
1288 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1290 [ #include <sys/types.h> ],
1291 [ u_intmax_t a; a = 1;],
1292 [ ac_cv_have_u_intmax_t="yes" ],
1295 [ #include <stdint.h> ],
1296 [ u_intmax_t a; a = 1;],
1297 [ ac_cv_have_u_intmax_t="yes" ],
1298 [ ac_cv_have_u_intmax_t="no" ]
1303 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1304 AC_DEFINE(HAVE_U_INTMAX_T)
1309 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1311 [ #include <sys/types.h> ],
1312 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1313 [ ac_cv_have_intxx_t="yes" ],
1314 [ ac_cv_have_intxx_t="no" ]
1317 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1318 AC_DEFINE(HAVE_INTXX_T)
1322 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1324 [ #include <sys/types.h> ],
1325 [ int64_t a; a = 1;],
1326 [ ac_cv_have_int64_t="yes" ],
1327 [ ac_cv_have_int64_t="no" ]
1330 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1331 AC_DEFINE(HAVE_INT64_T)
1335 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1337 [ #include <sys/types.h> ],
1338 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1339 [ ac_cv_have_u_intxx_t="yes" ],
1340 [ ac_cv_have_u_intxx_t="no" ]
1343 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1344 AC_DEFINE(HAVE_U_INTXX_T)
1348 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1350 [ #include <sys/types.h> ],
1351 [ u_int64_t a; a = 1;],
1352 [ ac_cv_have_u_int64_t="yes" ],
1353 [ ac_cv_have_u_int64_t="no" ]
1356 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1357 AC_DEFINE(HAVE_U_INT64_T)
1361 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1362 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1364 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1366 [ #include <sys/bitypes.h> ],
1367 [ int8_t a; int16_t b; int32_t c;
1368 u_int8_t e; u_int16_t f; u_int32_t g;
1369 a = b = c = e = f = g = 1; ],
1370 [ AC_DEFINE(HAVE_U_INTXX_T)
1371 AC_DEFINE(HAVE_INTXX_T)
1372 AC_DEFINE(HAVE_SYS_BITYPES_H)
1373 AC_MSG_RESULT(yes) ],
1374 [ AC_MSG_RESULT(no)]
1378 if test -z "$have_u_intxx_t" ; then
1379 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1381 [ #include <sys/types.h> ],
1382 [ uint8_t a; uint16_t b;
1383 uint32_t c; a = b = c = 1; ],
1384 [ ac_cv_have_uintxx_t="yes" ],
1385 [ ac_cv_have_uintxx_t="no" ]
1388 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1389 AC_DEFINE(HAVE_UINTXX_T)
1393 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1394 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1396 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1398 [ #include <sys/bitypes.h> ],
1399 [ int64_t a; u_int64_t b;
1401 [ AC_DEFINE(HAVE_U_INT64_T)
1402 AC_DEFINE(HAVE_INT64_T)
1403 AC_MSG_RESULT(yes) ],
1404 [ AC_MSG_RESULT(no)]
1408 if (test -z "$have_uintxx_t" && \
1409 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1411 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1413 [ #include <sys/bitypes.h> ],
1414 [ uint8_t a; uint16_t b;
1415 uint32_t c; a = b = c = 1; ],
1416 [ AC_DEFINE(HAVE_UINTXX_T)
1417 AC_MSG_RESULT(yes) ],
1418 [ AC_MSG_RESULT(no)]
1426 dnl# --------------------------------------------------------------------------
1427 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1428 dnl# --------------------------------------------------------------------------
1444 [echo 'configure: cannot find needed function.'; exit 1]
1447 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1448 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1450 AC_CHECK_FUNCS(chflags)
1452 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1454 dnl# --------------------------------------------------------------------------
1455 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1456 dnl# --------------------------------------------------------------------------
1457 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1459 # If resolver functions are not in libc check for -lnsl or -lresolv.
1460 AC_CHECK_FUNC(gethostbyname_r,
1461 AC_MSG_RESULT(using libc's resolver),
1462 AC_CHECK_LIB(nsl,gethostbyname_r)
1463 AC_CHECK_LIB(resolv,gethostbyname_r))
1467 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1468 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1469 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1471 dnl ----------------------------
1472 dnl check sa_len of sockaddr
1473 dnl ----------------------------
1474 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1475 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1476 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1478 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1479 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1483 dnl Check for IPv6 support
1484 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1485 [AC_TRY_LINK([ #include <sys/types.h>
1486 #include <sys/socket.h>
1487 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1489 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1491 if test "$ac_cv_ipv6_support" = yes; then
1492 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1501 AC_FUNC_CLOSEDIR_VOID
1502 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1503 # AC_FUNC_FNMATCH dnl use local version
1506 dnl# FreeBSD needs to link libxpg4
1507 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1510 AC_CHECK_LIB(sun, getpwnam)
1512 AC_CHECK_HEADERS(zlib.h)
1513 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1515 if test x$FDLIBS = x-lz; then
1516 AC_DEFINE(HAVE_LIBZ)
1520 AC_CHECK_HEADER(sys/acl.h)
1521 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1523 if test $ac_cv_lib_acl_acl_get_file = yes; then
1528 dnl Check for pthread libraries
1530 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1531 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1532 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1533 [AC_CHECK_FUNC(pthread_create)]
1543 LDFLAGS=${LDFLAGS--O}
1544 DB_LIBS="${SQL_LFLAGS}"
1546 CPPFLAGS="$CPPFLAGS"
1557 AC_SUBST(X_EXTRA_LIBS)
1561 dnl# extra configurable objects
1572 # Finally we set appropriate distribution specific
1573 # variables and defaults
1575 # PFILES are platform specific files
1576 PFILES="platforms/Makefile"
1580 hostname=`uname -n | cut -d '.' -f 1`
1584 PSCMD="ps -e -o pid,comm"
1586 platforms/aix/Makefile"
1587 TAPEDRIVE="/dev/rmt0.1"
1591 PTHREAD_LIB="-lpthread -lexc"
1592 if test "${CC}" = "gcc" ; then
1599 TAPEDRIVE="/dev/nrmt0"
1602 DISTVER=`uname -a |awk '{print $3}'`
1603 TAPEDRIVE="/dev/nrmt0"
1604 PTHREAD_LIB="-pthread"
1605 CFLAGS="${CFLAGS} -pthread"
1606 PSCMD="ps -ax -o pid,command"
1610 platforms/bsdi/Makefile \
1611 platforms/bsdi/bacula-fd \
1612 platforms/bsdi/bacula-sd \
1613 platforms/bsdi/bacula-dir"
1614 largefile_support="yes"
1617 DISTVER=`uname -a |awk '{print $3}'`
1618 TAPEDRIVE="/dev/nrst0"
1621 WLDFLAGS="-mwindows"
1625 TAPEDRIVE="/dev/nst0"
1626 PSCMD="ps -e -o pid,command"
1629 platforms/darwin/Makefile"
1632 DISTVER=`cat /etc/debian_version`
1633 TAPEDRIVE="/dev/nrst0"
1634 PSCMD="ps -e -o pid,command"
1637 DISTVER=`uname -a |awk '{print $3}'`
1638 VER=`echo $DISTVER | cut -c 1`
1639 if test x$VER = x4 ; then
1640 PTHREAD_LIB="-pthread"
1641 CFLAGS="${CFLAGS} -pthread"
1645 TAPEDRIVE="/dev/nrsa0"
1646 PSCMD="ps -ax -o pid,command"
1648 platforms/freebsd/Makefile \
1649 platforms/freebsd/bacula-fd \
1650 platforms/freebsd/bacula-sd \
1651 platforms/freebsd/bacula-dir"
1652 largefile_support="yes"
1655 PSCMD="UNIX95=1 ps -e -o pid,comm"
1656 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1658 TAPEDRIVE="/dev/rmt/0hnb"
1659 PTHREAD_LIB="-lpthread"
1660 AC_DEFINE([_INCLUDE_LONGLONG])
1664 TAPEDRIVE="/dev/rmt/0cbn"
1665 PSCMD="ps -e -o pid,comm"
1667 platforms/irix/Makefile \
1668 platforms/irix/bacula-fd \
1669 platforms/irix/bacula-sd \
1670 platforms/irix/bacula-dir"
1673 DISTVER=`uname -a |awk '{print $3}'`
1676 TAPEDRIVE="/dev/nrst0"
1677 PSCMD="ps -ax -o pid,command"
1678 PTHREAD_LIB="-pthread"
1679 CFLAGS="${CFLAGS} -pthread"
1682 DISTVER=`uname -a |awk '{print $3}'`
1685 TAPEDRIVE="/dev/nrst0"
1686 PSCMD="ps -ax -o pid,command"
1687 PTHREAD_LIB="-pthread"
1688 CFLAGS="${CFLAGS} -pthread"
1690 platforms/openbsd/Makefile \
1691 platforms/openbsd/bacula-fd \
1692 platforms/openbsd/bacula-sd \
1693 platforms/openbsd/bacula-dir"
1696 if test -f /etc/whitebox-release ; then
1697 f=/etc/whitebox-release
1699 f=/etc/redhat-release
1701 if test `cat $f | grep release |\
1702 cut -f 3 -d ' '`x = "Enterprise"x ; then
1703 DISTVER="Enterprise "`cat $f | grep release |\
1706 DISTVER=`cat /etc/redhat-release | grep release |\
1709 TAPEDRIVE="/dev/nst0"
1710 PSCMD="ps -e -o pid,command"
1712 platforms/redhat/Makefile \
1713 platforms/redhat/bacula-fd \
1714 platforms/redhat/bacula-sd \
1715 platforms/redhat/bacula-dir \
1716 platforms/redhat/bacula.spec \
1718 hostname=`hostname -s`
1721 DISTVER=`cat /etc/mandrake-release | grep release |\
1723 TAPEDRIVE="/dev/nst0"
1724 PSCMD="ps -e -o pid,command"
1726 platforms/mandrake/Makefile \
1727 platforms/mandrake/bacula-fd \
1728 platforms/mandrake/bacula-sd \
1729 platforms/mandrake/bacula-dir \
1730 platforms/mandrake/bacula.spec \
1734 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1735 TAPEDRIVE="/dev/nst0"
1736 PSCMD="ps -e -o pid,command"
1738 platforms/gentoo/Makefile \
1739 platforms/gentoo/bacula-init \
1740 platforms/gentoo/bacula-fd \
1741 platforms/gentoo/bacula-sd \
1742 platforms/gentoo/bacula-dir"
1745 DISTVER=`cat /etc/slackware-version`
1746 TAPEDRIVE="/dev/nst0"
1747 PSCMD="ps -e -o pid,command"
1749 platforms/slackware/Makefile \
1750 platforms/slackware/rc.bacula-fd \
1751 platforms/slackware/rc.bacula-sd \
1752 platforms/slackware/rc.bacula-dir\
1753 platforms/slackware/functions.bacula"
1757 TAPEDRIVE="/dev/rmt/0cbn"
1758 PSCMD="ps -e -o pid,comm"
1760 platforms/solaris/Makefile \
1761 platforms/solaris/bacula-fd \
1762 platforms/solaris/bacula-sd \
1763 platforms/solaris/bacula-dir"
1764 if test x$DISTVER = x5.6 ; then
1765 AC_DEFINE(HAVE_OLD_SOCKOPT)
1767 LIBS="$LIBS -lresolv"
1770 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1772 TAPEDRIVE="/dev/nst0"
1773 PSCMD="ps -e -o pid,command"
1775 platforms/suse/Makefile \
1776 platforms/suse/bacula-fd \
1777 platforms/suse/bacula-sd \
1778 platforms/suse/bacula-dir \
1779 platforms/suse/bacula \
1780 platforms/suse/bacula.spec"
1785 TAPEDRIVE="/dev/nst0"
1786 PSCMD="ps -e -o pid,command"
1788 platforms/suse/Makefile \
1789 platforms/suse/bacula-fd \
1790 platforms/suse/bacula-sd \
1791 platforms/suse/bacula-dir"
1795 TAPEDRIVE="/dev/nst0"
1798 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1804 LIBS="$PTHREAD_LIB $LIBS"
1806 AC_DEFINE_UNQUOTED(lld, "$lld")
1807 AC_DEFINE_UNQUOTED(llu, "$llu")
1815 dnl# common parts of the Makefile
1816 MCOMMON=./autoconf/Make.common
1817 AC_SUBST_FILE(MCOMMON)
1820 if test "x${subsysdir}" = "x${sbindir}" ; then
1823 echo "You have set both --sbindir and --with-subsys-dir"
1824 echo " equal to: ${subsysdir} "
1825 echo "This is not permitted. Please reconfigure."
1827 echo "Aborting configuration ..."
1833 AC_OUTPUT([autoconf/Make.common \
1835 scripts/startmysql \
1837 scripts/btraceback \
1843 scripts/devel_bacula \
1846 scripts/bacula.desktop.gnome1 \
1847 scripts/bacula.desktop.gnome2 \
1848 scripts/bacula.desktop.gnome1.consolehelper \
1849 scripts/bacula.desktop.gnome2.consolehelper \
1850 scripts/bacula.desktop.gnome1.xsu \
1851 scripts/bacula.desktop.gnome2.xsu \
1852 scripts/gnome-console.console_apps \
1853 scripts/mtx-changer \
1854 scripts/dvd-writepart \
1855 scripts/dvd-freespace \
1856 scripts/bacula-tray-monitor.desktop \
1857 scripts/logwatch/Makefile \
1858 scripts/logwatch/logfile.bacula.conf \
1861 src/console/Makefile \
1862 src/console/bconsole.conf \
1863 src/gnome2-console/Makefile \
1864 src/gnome2-console/gnome-console.conf \
1865 src/wx-console/Makefile \
1866 src/wx-console/wx-console.conf \
1867 src/tray-monitor/Makefile \
1868 src/tray-monitor/tray-monitor.conf \
1870 src/dird/bacula-dir.conf \
1872 src/stored/Makefile \
1873 src/stored/bacula-sd.conf \
1874 src/filed/Makefile \
1875 src/filed/bacula-fd.conf \
1876 src/filed/win32/Makefile \
1878 src/cats/make_catalog_backup \
1879 src/cats/delete_catalog_backup \
1880 src/cats/create_postgresql_database \
1881 src/cats/update_postgresql_tables \
1882 src/cats/make_postgresql_tables \
1883 src/cats/grant_postgresql_privileges \
1884 src/cats/drop_postgresql_tables \
1885 src/cats/drop_postgresql_database \
1886 src/cats/create_mysql_database \
1887 src/cats/update_mysql_tables \
1888 src/cats/make_mysql_tables \
1889 src/cats/grant_mysql_privileges \
1890 src/cats/drop_mysql_tables \
1891 src/cats/drop_mysql_database \
1892 src/cats/create_sqlite_database \
1893 src/cats/update_sqlite_tables \
1894 src/cats/make_sqlite_tables \
1895 src/cats/grant_sqlite_privileges \
1896 src/cats/drop_sqlite_tables \
1897 src/cats/drop_sqlite_database \
1898 src/cats/create_sqlite3_database \
1899 src/cats/update_sqlite3_tables \
1900 src/cats/make_sqlite3_tables \
1901 src/cats/grant_sqlite3_privileges \
1902 src/cats/drop_sqlite3_tables \
1903 src/cats/drop_sqlite3_database \
1906 src/cats/create_bdb_database \
1907 src/cats/update_bdb_tables \
1908 src/cats/make_bdb_tables \
1909 src/cats/grant_bdb_privileges \
1910 src/cats/drop_bdb_tables \
1911 src/cats/drop_bdb_database \
1912 src/cats/create_bacula_database \
1913 src/cats/update_bacula_tables \
1914 src/cats/grant_bacula_privileges \
1915 src/cats/make_bacula_tables \
1916 src/cats/drop_bacula_tables \
1917 src/cats/drop_bacula_database \
1918 src/findlib/Makefile \
1919 src/tools/Makefile \
1920 src/win32/winbacula.nsi \
1921 src/win32/baculafd/bacula-fd.conf \
1922 src/win32/Makefile \
1923 src/win32/console/bconsole.conf \
1924 src/win32/wx-console/wx-console.conf \
1925 src/win32/pebuilder/Makefile \
1927 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
1931 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1932 chmod 755 dvd-writepart dvd-freespace
1933 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
1938 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
1939 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
1941 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
1942 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
1944 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
1945 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
1947 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
1948 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
1950 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
1951 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
1953 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
1957 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
1958 largefile_support="yes"
1962 # A whole lot of hand springs to get the compiler version.
1963 # This is because gcc changed the output in version 3.0
1965 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1966 if test "x${CCVERSION}" = "x" ; then
1967 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1969 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1970 if test x"${CXXVERSION}" = x ; then
1971 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1974 if test "x${subsysdir}" = "x${sbindir}" ; then
1977 echo "You have set --sbindir and --with-subsys-dir"
1978 echo " both equal to: ${subsysdir} "
1979 echo " This is not permitted. Please reconfigure."
1981 echo "Aborting configuration ..."
1987 if test "x${db_name}" = "xInternal" ; then
1990 echo "You have not specified either --enable-client-only or one of the"
1991 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
1992 echo " This is not permitted. Please reconfigure."
1994 echo "Aborting the configuration ..."
2001 Configuration on `date`:
2003 Host: $host -- ${DISTNAME} ${DISTVER}
2004 Bacula version: ${VERSION} (${DATE})
2005 Source code location: ${srcdir}
2006 Install binaries: ${sbindir}
2007 Install config files: ${sysconfdir}
2008 Scripts directory: ${scriptdir}
2009 Working directory: ${working_dir}
2010 PID directory: ${piddir}
2011 Subsys directory: ${subsysdir}
2012 Man directory: ${mandir}
2013 C Compiler: ${CC} ${CCVERSION}
2014 C++ Compiler: ${CXX} ${CXXVERSION}
2015 Compiler flags: ${WCFLAGS} ${CFLAGS}
2016 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2018 Statically Linked Tools: ${support_static_tools}
2019 Statically Linked FD: ${support_static_fd}
2020 Statically Linked SD: ${support_static_sd}
2021 Statically Linked DIR: ${support_static_dir}
2022 Statically Linked CONS: ${support_static_cons}
2023 Database type: ${db_name}
2024 Database lib: ${DB_LIBS}
2026 Job Output Email: ${job_email}
2027 Traceback Email: ${dump_email}
2028 SMTP Host Address: ${smtp_host}
2030 Director Port: ${dir_port}
2031 File daemon Port: ${fd_port}
2032 Storage daemon Port: ${sd_port}
2034 Director User: ${dir_user}
2035 Director Group: ${dir_group}
2036 Storage Daemon User: ${sd_user}
2037 Storage DaemonGroup: ${sd_group}
2038 File Daemon User: ${fd_user}
2039 File Daemon Group: ${fd_group}
2041 SQL binaries Directory ${SQL_BINDIR}
2043 Large file support: $largefile_support
2044 Bacula conio support: ${got_conio} ${CONS_LIBS}
2045 readline support: ${got_readline} ${PRTREADLINE_SRC}
2046 TCP Wrappers support: ${TCPW_MSG}
2047 TLS support: ${support_tls}
2048 ZLIB support: ${have_zlib}
2049 enable-smartalloc: ${support_smartalloc}
2050 enable-gnome: ${support_gnome} ${gnome_version}
2051 enable-wx-console: ${support_wx_console} ${wx_version}
2052 enable-tray-monitor: ${support_tray_monitor}
2053 client-only: ${build_client_only}
2054 ACL support: ${have_acl}
2055 Python support: ${support_python} ${PYTHON_LIBS}