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)
107 dnl --------------------------------------------------
108 dnl Bacula OP Sys determination (see aclocal.m4)
109 dnl --------------------------------------------------
112 # -----------------------------------------------------------
113 dnl Bacula OPSys Distribution determination (see aclocal.m4)
114 # ----------------------------------------------------------
115 BA_CHECK_OPSYS_DISTNAME
117 dnl --------------------------------------------------
118 dnl Suppport for gettext (translations)
119 dnl --------------------------------------------------
120 # AM_GNU_GETTEXT([external])
121 if test x${datadir} = xNONE ; then
124 localedir=${datadir}/locale
125 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localdir")
126 # LOCAL_DEFS="$LOCAL_DEFS -DLOCALEDIR=\"\\\"${localedir}\\\"\""
128 # ------------------------------------------------------------------
129 # If the user has not set --prefix, we set our default to nothing.
130 # In this case, if the user has not set --sysconfdir, we set it
131 # to the package default of /etc/bacula. If either --prefix or
132 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
133 # ------------------------------------------------------------------
134 if test x${prefix} = xNONE ; then
135 if test `eval echo ${sysconfdir}` = NONE/etc ; then
136 sysconfdir=/etc/bacula
140 sysconfdir=`eval echo ${sysconfdir}`
142 # -------------------------------------------------------------------------
143 # If the user has not set --exec-prefix, we default to ${prefix}
144 # -------------------------------------------------------------------------
145 if test x${exec_prefix} = xNONE ; then
146 exec_prefix=${prefix}
149 # ------------------------------------------------------------------
150 # If the user has not set --sbindir, we set our default as /sbin
151 # ------------------------------------------------------------------
152 if test x$sbindir = x'${exec_prefix}/sbin' ; then
153 sbindir=${exec_prefix}/sbin
155 sbindir=`eval echo ${sbindir}`
157 # -------------------------------------------------------------------------
158 # If the user has not set --mandir, we default to /usr/share/man
159 # -------------------------------------------------------------------------
160 if test x$mandir = x'${prefix}/man' ; then
161 mandir=/usr/share/man
165 # ------------------------------------------------------------------
166 # All list of languages for which a translation exist. Each
167 # language is separated by a space.
168 # ------------------------------------------------------------------
171 AC_PATH_PROGS(MSGFMT, msgfmt, no)
172 if test "$MSGFMT" = "no"
174 echo 'msgfmt program not found, disabling NLS !'
176 USE_INCLUDED_LIBINTL=no
185 support_postgresql=no
186 support_smartalloc=yes
190 support_wx_console=no
194 support_static_tools=no
197 support_static_dir=no
198 support_static_cons=no
205 dnl# --------------------------------------------------------------------------
206 dnl# CHECKING COMMAND LINE OPTIONS
207 dnl# --------------------------------------------------------------------------
209 # -------------------------------------------
210 # gnome (default off)
211 # -------------------------------------------
213 [ --enable-gnome enable build of gnome-console GUI [disabled]],
214 [if test x$enableval = xyes; then
219 if test x$support_gnome = xyes; then
220 abc=`$PKGCONFIG --exists libgnomeui-2.0`
222 if test $pkg = 0; then
223 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
224 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
225 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
226 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
227 AC_SUBST(GNOME_INCLUDEDIR)
228 AC_SUBST(GNOMEUI_LIBS)
229 AC_SUBST(GNOME_LIBDIR)
231 GNOME_DIR=src/gnome2-console
232 gnome_version="Version 2.x"
234 AC_MSG_ERROR(Unable to find Gnome 2 installation)
240 # -------------------------------------------
241 # wx-console (default off)
242 # -------------------------------------------
243 AC_ARG_ENABLE(wx-console,
244 [ --enable-wx-console enable build of wxWidgets console [disabled]],
245 [if test x$enableval = xyes; then
246 support_wx_console=yes
250 if test x$support_wx_console = xyes; then
251 abc=`$WXCONFIG $WXFLAGS --cppflags`
253 if test $pkg = 0; then
254 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
255 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
256 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
258 AC_SUBST(WXCONS_CPPFLAGS)
259 AC_SUBST(WXCONS_LDFLAGS)
260 WX_DIR=src/wx-console
263 echo "wx-config program not found. wx-console disabled."
265 support_wx_console=no
271 # -------------------------------------------
272 # tray-monitor (default off)
273 # -------------------------------------------
274 AC_ARG_ENABLE(tray-monitor,
275 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
276 [if test x$enableval = xyes; then
277 support_tray_monitor=yes
281 if test x$support_tray_monitor = xyes; then
282 abc=`$PKGCONFIG --exists gtk+-2.0`
284 if test $pkg = 0; then
285 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
286 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
287 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
288 AC_SUBST(TRAY_MONITOR_LDFLAGS)
289 TRAY_MONITOR_DIR=src/tray-monitor
290 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
292 if test $pkg = 0; then
293 AC_DEFINE(HAVE_GTK_2_4)
297 AC_SUBST(TRAY_MONITOR_DIR)
299 # -------------------------------------------
300 # smartalloc (default off)
301 # -------------------------------------------
302 AC_ARG_ENABLE(smartalloc,
303 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
304 [if test x$enableval = xno; then
305 support_smartalloc=no
308 if test x$support_smartalloc = xyes; then
309 AC_DEFINE(SMARTALLOC)
312 # -------------------------------------------
313 # static-tools (default off)
314 # -------------------------------------------
315 AC_ARG_ENABLE(static-tools,
316 [ --enable-static-tools enable static tape tools [disabled]],
317 [if test x$enableval = xyes; then
318 support_static_tools=yes
322 if test x$support_static_tools = xyes; then
323 TTOOL_LDFLAGS="-static"
325 AC_SUBST(TTOOL_LDFLAGS)
327 # -------------------------------------------
328 # static-fd (default off)
329 # -------------------------------------------
330 AC_ARG_ENABLE(static-fd,
331 [ --enable-static-fd enable static File daemon [disabled]],
332 [if test x$enableval = xyes; then
333 support_static_fd=yes
337 if test x$support_static_fd = xyes; then
338 STATIC_FD="static-bacula-fd"
342 # -------------------------------------------
343 # static-sd (default off)
344 # -------------------------------------------
345 AC_ARG_ENABLE(static-sd,
346 [ --enable-static-sd enable static Storage daemon [disabled]],
347 [if test x$enableval = xyes; then
348 support_static_sd=yes
352 if test x$support_static_sd = xyes; then
353 STATIC_SD="static-bacula-sd"
357 # -------------------------------------------
358 # static-dir (default off)
359 # -------------------------------------------
360 AC_ARG_ENABLE(static-dir,
361 [ --enable-static-dir enable static Director [disabled]],
362 [if test x$enableval = xyes; then
363 support_static_dir=yes
367 if test x$support_static_dir = xyes; then
368 STATIC_DIR="static-bacula-dir"
372 # -------------------------------------------
373 # static-cons (default off)
374 # -------------------------------------------
375 AC_ARG_ENABLE(static-cons,
376 [ --enable-static-cons enable static Console [disabled]],
377 [if test x$enableval = xyes; then
378 support_static_cons=yes
384 if test x$support_static_cons = xyes; then
385 STATIC_CONS="static-bconsole"
386 STATIC_GNOME_CONS="static-gnome-console"
387 STATIC_WX_CONS="static-wx-console"
389 AC_SUBST(STATIC_CONS)
390 AC_SUBST(STATIC_GNOME_CONS)
391 AC_SUBST(STATIC_WX_CONS)
393 # -------------------------------------------
394 # client_only (default off)
395 # -------------------------------------------
396 AC_ARG_ENABLE(client-only,
397 [ --enable-client-only build client (File daemon) only [disabled]],
398 [if test x$enableval = xyes; then
399 build_client_only=yes
403 if test x$build_client_only = xno; then
410 # ---------------------------------------------------
411 # Check for conio (Bacula readline substitute)(
412 # ---------------------------------------------------
413 # this allows you to turn it completely off
415 [ --disable-conio disable conio support [enabled]
417 [if test x$enableval = xno; then
422 if test x$support_conio = xyes; then
423 AC_CHECK_HEADER(termcap.h,
424 [ AC_CHECK_LIB(termcap, tgetent,
425 [ CONS_LIBS="-ltermcap"
430 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
432 [ AC_CHECK_LIB(ncurses, tgetent,
433 [ CONS_LIBS="-lncurses"
438 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
443 AC_CHECK_HEADERS(curses.h)
444 AC_CHECK_HEADER(term.h,
445 [ AC_CHECK_LIB(curses, tgetent,
446 [ CONS_LIBS="-lcurses"
451 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
454 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
463 # ---------------------------------------------------
464 # Check for readline support/directory (default off)
465 # ---------------------------------------------------
466 # this allows you to turn it completely off
467 AC_ARG_ENABLE(readline,
468 [ --disable-readline disable readline support [disable]
470 [if test x$enableval = xno; then
476 if test x$support_readline = xyes; then
477 AC_ARG_WITH(readline,
478 [ --with-readline=DIR specify readline library directory],
480 case "$with_readline" in
483 if test -f ${with_readline}/readline.h; then
484 CONS_INC="-I${with_readline}"
485 CONS_LDFLAGS="-L$with_readline"
486 elif test -f ${with_readline}/include/readline/readline.h; then
487 CONS_INC="-I${with_readline}/include/readline"
488 CONS_LDFLAGS="-L${with_readline}/lib"
489 with_readline="${with_readline}/include/readline"
491 with_readline="/usr/include/readline"
493 AC_CHECK_HEADER(${with_readline}/readline.h,
494 [ AC_DEFINE(HAVE_READLINE)
495 CONS_LIBS="-lreadline -lhistory -ltermcap"
499 echo "readline.h not found. readline turned off ..."
506 # check for standard readline library
507 AC_CHECK_HEADER(/usr/include/readline/readline.h,
508 [ AC_DEFINE(HAVE_READLINE)
510 CONS_INC="-I/usr/include/readline"
511 CONS_LIBS="-lreadline -ltermcap"
513 # Did not find standard library, so try Bacula's default
514 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
515 [ AC_DEFINE(HAVE_READLINE)
517 CONS_INC="-I${TOP_DIR}/depkgs/readline"
518 CONS_LIBS="-lreadline -lhistory -ltermcap"
519 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
520 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
523 echo "readline.h not found. readline turned off ..."
539 AC_SUBST(CONS_LDFLAGS)
540 AC_SUBST(READLINE_SRC)
542 # Minimal stuff for readline Makefile configuration
547 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
548 AC_CHECK_FUNCS(nanosleep nl_langinfo)
549 AC_CHECK_HEADERS(varargs.h)
551 # End of readline/conio stuff
552 # -----------------------------------------------------------------------
554 # -----------------------------------------------------------------------
555 # Check for Python support
557 AC_MSG_CHECKING(for Python support)
560 --with-python[=DIR] Include Python support. DIR is the Python base
561 install directory, default is to search through
562 a number of common places for the Python files.],
566 if test "$withval" != "no"; then
567 if test "$withval" = "yes"; then
568 for python_root in /usr /usr/local; do
569 if test -f $python_root/include/python2.2/Python.h; then
570 PYTHON_INCDIR=-I$python_root/include/python2.2
571 PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
573 elif test -f $python_root/include/python2.3/Python.h; then
574 PYTHON_INCDIR=-I$python_root/include/python2.3
575 PYTHON_LIBS="-L$python_root/lib/python2.3/config -lpython2.3"
577 elif test -f $python_root/include/python2.4/Python.h; then
578 PYTHON_INCDIR=-I$python_root/include/python2.4
579 PYTHON_LIBS="-L$python_root/lib/python2.4/config -lpython2.4"
583 if test x$PYTHON_INCDIR = x; then
584 if test -f $prefix/include/Python.h; then
585 PYTHON_INCDIR=-I$prefix/include
586 PYTHON_LIBS="-L$prefix/lib/config -lpython"
589 AC_MSG_ERROR(Unable to find Python.h in standard locations)
593 if test -f $withval/Python.h; then
594 PYTHON_INCDIR=-I$withval
595 PYTHON_LIBS="-L$withval/config -lpython"
596 elif test -f $withval/include/Python.h; then
597 PYTHON_INCDIR=-I$withval/include
598 PYTHON_LIBS="-L$withval/lib/config -lpython"
599 elif test -f $withval/include/python/Python.h; then
600 PYTHON_INCDIR=-I$withval/include/python
601 PYTHON_LIBS="-L$withval/lib/python/config -lpython"
604 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
607 AC_DEFINE([HAVE_PYTHON], 1)
610 AC_MSG_NOTICE(checking for more Python libs)
611 saved_LIBS="$LIBS"; LIBS=
612 AC_SEARCH_LIBS(shm_open, [rt])
613 AC_CHECK_LIB(util, openpty)
614 PYTHON_LIBS="$PYTHON_LIBS $LIBS"
622 AC_SUBST(PYTHON_LIBS)
623 AC_SUBST(PYTHON_INCDIR)
627 # Find where sockets are (especially for Solaris)
628 # Do this before the TCP Wrappers test since tcp wrappers
629 # uses the socket library and some linkers are stupid.
631 AC_CHECK_FUNC(socket,
632 AC_MSG_RESULT(using libc's socket),
633 AC_CHECK_LIB(xnet,socket)
634 AC_CHECK_LIB(socket,socket)
635 AC_CHECK_LIB(inet,socket))
638 # -----------------------------------------------------------
639 # Check whether user wants TCP wrappers support (default off)
640 # -----------------------------------------------------------
642 AC_ARG_WITH(tcp-wrappers,
643 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
645 if test "x$withval" != "xno" ; then
647 LIBS="$saved_LIBS -lwrap"
648 AC_MSG_CHECKING(for libwrap)
651 int deny_severity = 0;
652 int allow_severity = 0;
653 struct request_info *req; ],
654 [ hosts_access(req); ],
657 AC_DEFINE(HAVE_LIBWRAP)
660 LIBS="$saved_LIBS -lwrap -lnsl"
663 int deny_severity = 0;
664 int allow_severity = 0;
665 struct request_info *req; ],
666 [ hosts_access(req); ],
669 AC_DEFINE(HAVE_LIBWRAP)
672 [AC_MSG_ERROR([*** libwrap missing]) ] ]
679 # -----------------------------------------------------------
680 # Check whether OpenSSL is available
681 # -----------------------------------------------------------
682 AC_MSG_CHECKING([for OpenSSL])
683 dnl The following uses quadrigraphs:
687 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
688 [with_openssl_directory=${withval}])
690 if test "x$with_openssl_directory" != "x"; then
691 OPENSSL_LIBS="-lssl -lcrypto"
694 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
695 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
696 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
700 saved_CFLAGS="$CFLAGS"
701 LIBS="$saved_LIBS $OPENSSL_LIBS"
702 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
704 AC_TRY_LINK([ #include <openssl/ssl.h> ],
705 [ CRYPTO_set_id_callback(NULL); ],
706 [ support_tls="yes" ],
711 CFLAGS="$saved_CFLAGS"
713 if test "$support_tls" = "yes"; then
714 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
715 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
723 AC_MSG_RESULT([$support_tls])
724 AC_SUBST(OPENSSL_LIBS)
725 AC_SUBST(OPENSSL_INC)
728 # -----------------------------------------------------------
729 # Python and OpenSSL are using dlopen
730 # -----------------------------------------------------------
732 if test "$support_python" = "yes" -o "$support_tls" = "yes"; then
733 AC_SEARCH_LIBS(dlopen, [dl])
736 # ------------------------------------------
737 # Where to place working dir
738 # ------------------------------------------
739 working_dir=`eval echo ${prefix}/var/bacula/working`
740 AC_ARG_WITH(working-dir,
741 [ --with-working-dir=PATH specify path of Bacula working directory],
743 if test "x$withval" != "xno" ; then
749 AC_SUBST(working_dir)
752 # ------------------------------------------
753 # Where to place scriptdir (script files)
754 # ------------------------------------------
755 scriptdir=`eval echo ${sysconfdir}`
756 AC_ARG_WITH(scriptdir,
757 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
759 if test "x$withval" != "xno" ; then
768 # ------------------------------------------
769 # Where to send dump email
770 # ------------------------------------------
771 dump_email=root@localhost
772 AC_ARG_WITH(dump-email,
773 [ --with-dump-email=EMAIL dump email address],
775 if test "x$withval" != "xno" ; then
783 # ------------------------------------------
784 # Where to send job email
785 # ------------------------------------------
786 job_email=root@localhost
787 AC_ARG_WITH(job-email,
788 [ --with-job-email=EMAIL job output email address],
790 if test "x$withval" != "xno" ; then
798 # ------------------------------------------
799 # Where to find smtp host
800 # ------------------------------------------
802 AC_ARG_WITH(smtp_host,
803 [ --with-smtp-host=HOST SMTP mail host address],
805 if test "x$withval" != "xno" ; then
814 # ------------------------------------
815 # Where to place pid files
816 # ------------------------------------
819 [ --with-pid-dir=PATH specify location of Bacula pid files],
821 if test "x$withval" != "xno" ; then
827 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
831 # ------------------------------------
832 # Where to place subsys "lock file"
833 # ------------------------------------
834 subsysdir=/var/run/subsys
835 AC_ARG_WITH(subsys-dir,
836 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
838 if test "x$withval" != "xno" ; then
848 # ------------------------------------
849 # Where to start assigning ports
850 # ------------------------------------
852 AC_ARG_WITH(baseport,
853 [ --with-baseport=PORT specify base port address for daemons],
855 if test "x$withval" != "xno" ; then
862 dir_port=`expr $baseport`
863 fd_port=`expr $baseport + 1`
864 sd_port=`expr $fd_port + 1`
871 # ------------------------------------------
873 # ------------------------------------------
875 AC_ARG_WITH(dir-password,
876 [ --with-dir-password=PASSWORD specify Director's password],
878 if test "x$withval" != "xno" ; then
879 dir_password=$withval
884 if test "x$dir_password" = "x" ; then
885 if test "x$OPENSSL" = "xnone" ; then
886 key=`autoconf/randpass 33`
888 key=`openssl rand -base64 33`
894 AC_ARG_WITH(fd-password,
895 [ --with-fd-password=PASSWORD specify Client's password],
897 if test "x$withval" != "xno" ; then
903 if test "x$fd_password" = "x" ; then
904 if test "x$OPENSSL" = "xnone" ; then
905 key=`autoconf/randpass 37`
907 key=`openssl rand -base64 33`
913 AC_ARG_WITH(sd-password,
914 [ --with-sd-password=PASSWORD specify Storage daemon's password],
916 if test "x$withval" != "xno" ; then
922 if test "x$sd_password" = "x" ; then
923 if test "x$OPENSSL" = "xnone" ; then
924 key=`autoconf/randpass 41`
926 key=`openssl rand -base64 33`
932 AC_ARG_WITH(mon-dir-password,
933 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
935 if test "x$withval" != "xno" ; then
936 mon_dir_password=$withval
941 if test "x$mon_dir_password" = "x" ; then
942 if test "x$OPENSSL" = "xnone" ; then
943 key=`autoconf/randpass 33`
945 key=`openssl rand -base64 33`
947 mon_dir_password=$key
951 AC_ARG_WITH(mon-fd-password,
952 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
954 if test "x$withval" != "xno" ; then
955 mon_fd_password=$withval
960 if test "x$mon_fd_password" = "x" ; then
961 if test "x$OPENSSL" = "xnone" ; then
962 key=`autoconf/randpass 37`
964 key=`openssl rand -base64 33`
970 AC_ARG_WITH(mon-sd-password,
971 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
973 if test "x$withval" != "xno" ; then
974 mon_sd_password=$withval
979 if test "x$mon_sd_password" = "x" ; then
980 if test "x$OPENSSL" = "xnone" ; then
981 key=`autoconf/randpass 41`
983 key=`openssl rand -base64 33`
988 AC_SUBST(dir_password)
989 AC_SUBST(fd_password)
990 AC_SUBST(sd_password)
991 AC_SUBST(mon_dir_password)
992 AC_SUBST(mon_fd_password)
993 AC_SUBST(mon_sd_password)
997 # Handle users and groups for each daemon
1000 AC_ARG_WITH(dir_user,
1001 [ --with-dir-user=USER specify user for Director daemon],
1003 if test "x$withval" != "x" ; then
1010 AC_ARG_WITH(dir_group,
1011 [ --with-dir-group=GROUP specify group for Director daemon],
1013 if test "x$withval" != "x" ; then
1020 AC_ARG_WITH(sd_user,
1021 [ --with-sd-user=USER specify user for Storage daemon],
1023 if test "x$withval" != "x" ; then
1030 AC_ARG_WITH(sd_group,
1031 [ --with-sd-group=GROUP specify group for Storage daemon],
1033 if test "x$withval" != "x" ; then
1040 AC_ARG_WITH(fd_user,
1041 [ --with-fd-user=USER specify user for File daemon],
1043 if test "x$withval" != "x" ; then
1050 AC_ARG_WITH(fd_group,
1051 [ --with-fd-group=GROUP specify group for File daemon],
1053 if test "x$withval" != "x" ; then
1070 # allow setting default executable permissions
1073 AC_ARG_WITH(sbin-perm,
1074 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1076 if test "x$withval" != "x" ; then
1084 # ------------------------------------------------
1085 # Bacula check for various SQL database engines
1086 # ------------------------------------------------
1087 BA_CHECK_POSTGRESQL_DB
1098 AC_DEFINE(PROTOTYPES)
1100 dnl# --------------------------------------------------------------------------
1101 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1103 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1104 if test -z "$CCOPTS"; then
1105 CCOPTS='-g -O2 -Wall'
1114 dnl See if we can use 64 bit file addresses
1115 largefile_support="no"
1121 dnl# --------------------------------------------------------------------------
1122 dnl# CHECKING FOR HEADER FILES
1123 dnl# --------------------------------------------------------------------------
1159 AC_STRUCT_ST_BLKSIZE
1163 dnl# --------------------------------------------------------------------------
1164 dnl# Check for utime.h structure
1165 dnl# --------------------------------------------------------------------------
1166 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1168 #include <sys/types.h>
1169 #include <utime.h>], [struct utimbuf foo],
1170 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1171 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1173 dnl# --------------------------------------------------------------------------
1174 dnl# Check for socklen_t
1175 dnl# --------------------------------------------------------------------------
1176 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1178 #include <sys/types.h>
1179 #include <sys/socket.h>],
1181 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1182 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1184 dnl# --------------------------------------------------------------------------
1185 dnl# Check for bigendian
1186 dnl# --------------------------------------------------------------------------
1187 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1189 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1190 [ba_cv_bigendian=yes],
1191 [ba_cv_bigendian=no],
1192 [ba_cv_bigendian=no])])
1193 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1199 dnl# --------------------------------------------------------------------------
1200 dnl# CHECKING FOR FILESYSTEM TYPE
1201 dnl# --------------------------------------------------------------------------
1202 AC_MSG_CHECKING(how to get filesystem type)
1204 # The order of these tests is important.
1205 AC_TRY_CPP([#include <sys/statvfs.h>
1206 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1207 if test $fstype = no; then
1208 AC_TRY_CPP([#include <sys/statfs.h>
1209 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1211 if test $fstype = no; then
1212 AC_TRY_CPP([#include <sys/statfs.h>
1213 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1215 if test $fstype = no; then
1216 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1218 if test $fstype = no; then
1219 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1221 if test $fstype = no; then
1222 AC_TRY_CPP([#include <sys/mount.h>
1223 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1225 AC_MSG_RESULT($fstype)
1227 dnl# --------------------------------------------------------------------------
1228 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1229 dnl# --------------------------------------------------------------------------
1237 AC_CHECK_TYPE(ino_t, unsigned long)
1238 AC_CHECK_TYPE(dev_t, unsigned long)
1239 AC_CHECK_TYPE(daddr_t, long)
1240 AC_CHECK_TYPE(major_t, int)
1241 AC_CHECK_TYPE(minor_t, int)
1242 AC_CHECK_TYPE(ssize_t, int)
1249 AC_CHECK_SIZEOF(char, 1)
1250 AC_CHECK_SIZEOF(short int, 2)
1251 AC_CHECK_SIZEOF(int, 4)
1252 AC_CHECK_SIZEOF(long int, 4)
1253 AC_CHECK_SIZEOF(long long int, 8)
1254 AC_CHECK_SIZEOF(int *, 4)
1256 # Check for sys/types.h types
1257 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1259 [ #include <sys/types.h> ],
1261 [ ac_cv_have_u_int="yes" ],
1262 [ ac_cv_have_u_int="no" ]
1265 if test "x$ac_cv_have_u_int" = "xyes" ; then
1266 AC_DEFINE(HAVE_U_INT)
1270 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1272 [ #include <sys/types.h> ],
1273 [ intmax_t a; a = 1;],
1274 [ ac_cv_have_intmax_t="yes" ],
1277 [ #include <stdint.h> ],
1278 [ intmax_t a; a = 1;],
1279 [ ac_cv_have_intmax_t="yes" ],
1280 [ ac_cv_have_intmax_t="no" ]
1286 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1287 AC_DEFINE(HAVE_INTMAX_T)
1292 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1294 [ #include <sys/types.h> ],
1295 [ u_intmax_t a; a = 1;],
1296 [ ac_cv_have_u_intmax_t="yes" ],
1299 [ #include <stdint.h> ],
1300 [ u_intmax_t a; a = 1;],
1301 [ ac_cv_have_u_intmax_t="yes" ],
1302 [ ac_cv_have_u_intmax_t="no" ]
1307 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1308 AC_DEFINE(HAVE_U_INTMAX_T)
1313 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1315 [ #include <sys/types.h> ],
1316 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1317 [ ac_cv_have_intxx_t="yes" ],
1318 [ ac_cv_have_intxx_t="no" ]
1321 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1322 AC_DEFINE(HAVE_INTXX_T)
1326 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1328 [ #include <sys/types.h> ],
1329 [ int64_t a; a = 1;],
1330 [ ac_cv_have_int64_t="yes" ],
1331 [ ac_cv_have_int64_t="no" ]
1334 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1335 AC_DEFINE(HAVE_INT64_T)
1339 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1341 [ #include <sys/types.h> ],
1342 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1343 [ ac_cv_have_u_intxx_t="yes" ],
1344 [ ac_cv_have_u_intxx_t="no" ]
1347 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1348 AC_DEFINE(HAVE_U_INTXX_T)
1352 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1354 [ #include <sys/types.h> ],
1355 [ u_int64_t a; a = 1;],
1356 [ ac_cv_have_u_int64_t="yes" ],
1357 [ ac_cv_have_u_int64_t="no" ]
1360 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1361 AC_DEFINE(HAVE_U_INT64_T)
1365 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1366 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1368 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1370 [ #include <sys/bitypes.h> ],
1371 [ int8_t a; int16_t b; int32_t c;
1372 u_int8_t e; u_int16_t f; u_int32_t g;
1373 a = b = c = e = f = g = 1; ],
1374 [ AC_DEFINE(HAVE_U_INTXX_T)
1375 AC_DEFINE(HAVE_INTXX_T)
1376 AC_DEFINE(HAVE_SYS_BITYPES_H)
1377 AC_MSG_RESULT(yes) ],
1378 [ AC_MSG_RESULT(no)]
1382 if test -z "$have_u_intxx_t" ; then
1383 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1385 [ #include <sys/types.h> ],
1386 [ uint8_t a; uint16_t b;
1387 uint32_t c; a = b = c = 1; ],
1388 [ ac_cv_have_uintxx_t="yes" ],
1389 [ ac_cv_have_uintxx_t="no" ]
1392 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1393 AC_DEFINE(HAVE_UINTXX_T)
1397 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1398 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1400 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1402 [ #include <sys/bitypes.h> ],
1403 [ int64_t a; u_int64_t b;
1405 [ AC_DEFINE(HAVE_U_INT64_T)
1406 AC_DEFINE(HAVE_INT64_T)
1407 AC_MSG_RESULT(yes) ],
1408 [ AC_MSG_RESULT(no)]
1412 if (test -z "$have_uintxx_t" && \
1413 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1415 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1417 [ #include <sys/bitypes.h> ],
1418 [ uint8_t a; uint16_t b;
1419 uint32_t c; a = b = c = 1; ],
1420 [ AC_DEFINE(HAVE_UINTXX_T)
1421 AC_MSG_RESULT(yes) ],
1422 [ AC_MSG_RESULT(no)]
1430 dnl# --------------------------------------------------------------------------
1431 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1432 dnl# --------------------------------------------------------------------------
1448 [echo 'configure: cannot find needed function.'; exit 1]
1451 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1452 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1454 AC_CHECK_FUNCS(chflags)
1456 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1458 dnl# --------------------------------------------------------------------------
1459 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1460 dnl# --------------------------------------------------------------------------
1461 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1463 # If resolver functions are not in libc check for -lnsl or -lresolv.
1464 AC_CHECK_FUNC(gethostbyname_r,
1465 AC_MSG_RESULT(using libc's resolver),
1466 AC_CHECK_LIB(nsl,gethostbyname_r)
1467 AC_CHECK_LIB(resolv,gethostbyname_r))
1471 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1472 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1473 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1475 dnl ----------------------------
1476 dnl check sa_len of sockaddr
1477 dnl ----------------------------
1478 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1479 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1480 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1482 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1483 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1487 dnl Check for IPv6 support
1488 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1489 [AC_TRY_LINK([ #include <sys/types.h>
1490 #include <sys/socket.h>
1491 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1493 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1495 if test "$ac_cv_ipv6_support" = yes; then
1496 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1505 AC_FUNC_CLOSEDIR_VOID
1506 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1507 # AC_FUNC_FNMATCH dnl use local version
1510 dnl# FreeBSD needs to link libxpg4
1511 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1514 AC_CHECK_LIB(sun, getpwnam)
1516 AC_CHECK_HEADERS(zlib.h)
1517 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1519 if test x$FDLIBS = x-lz; then
1520 AC_DEFINE(HAVE_LIBZ)
1525 AC_CHECK_HEADER(sys/acl.h)
1526 AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
1527 [AC_CHECK_LIB(acl, acl_get_file, [have_acl=yes; FDLIBS="-lacl $FDLIBS"])]
1529 if test $have_acl = yes; then
1533 dnl Check for pthread libraries
1535 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1536 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1537 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1538 [AC_CHECK_FUNC(pthread_create)]
1548 LDFLAGS=${LDFLAGS--O}
1549 DB_LIBS="${SQL_LFLAGS}"
1551 CPPFLAGS="$CPPFLAGS"
1563 AC_SUBST(X_EXTRA_LIBS)
1567 dnl# extra configurable objects
1578 # Finally we set appropriate distribution specific
1579 # variables and defaults
1581 # PFILES are platform specific files
1582 PFILES="platforms/Makefile"
1586 hostname=`uname -n | cut -d '.' -f 1`
1590 PSCMD="ps -e -o pid,comm"
1592 platforms/aix/Makefile"
1593 TAPEDRIVE="/dev/rmt0.1"
1597 PTHREAD_LIB="-lpthread -lexc"
1598 if test "${CC}" = "gcc" ; then
1605 TAPEDRIVE="/dev/nrmt0"
1608 DISTVER=`uname -a |awk '{print $3}'`
1609 TAPEDRIVE="/dev/nrmt0"
1610 PTHREAD_LIB="-pthread"
1611 CFLAGS="${CFLAGS} -pthread"
1612 PSCMD="ps -ax -o pid,command"
1616 platforms/bsdi/Makefile \
1617 platforms/bsdi/bacula-fd \
1618 platforms/bsdi/bacula-sd \
1619 platforms/bsdi/bacula-dir"
1620 largefile_support="yes"
1623 DISTVER=`uname -a |awk '{print $3}'`
1624 TAPEDRIVE="/dev/nrst0"
1627 WLDFLAGS="-mwindows"
1631 TAPEDRIVE="/dev/nst0"
1632 PSCMD="ps -e -o pid,command"
1635 platforms/darwin/Makefile"
1638 DISTVER=`cat /etc/debian_version`
1639 TAPEDRIVE="/dev/nrst0"
1640 PSCMD="ps -e -o pid,command"
1643 DISTVER=`uname -a |awk '{print $3}'`
1644 VER=`echo $DISTVER | cut -c 1`
1645 if test x$VER = x4 ; then
1646 PTHREAD_LIB="-pthread"
1647 CFLAGS="${CFLAGS} -pthread"
1651 TAPEDRIVE="/dev/nrsa0"
1652 PSCMD="ps -ax -o pid,command"
1654 platforms/freebsd/Makefile \
1655 platforms/freebsd/bacula-fd \
1656 platforms/freebsd/bacula-sd \
1657 platforms/freebsd/bacula-dir"
1658 largefile_support="yes"
1661 PSCMD="UNIX95=1 ps -e -o pid,comm"
1662 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1664 TAPEDRIVE="/dev/rmt/0hnb"
1665 PTHREAD_LIB="-lpthread"
1666 AC_DEFINE([_INCLUDE_LONGLONG])
1670 TAPEDRIVE="/dev/rmt/0cbn"
1671 PSCMD="ps -e -o pid,comm"
1673 platforms/irix/Makefile \
1674 platforms/irix/bacula-fd \
1675 platforms/irix/bacula-sd \
1676 platforms/irix/bacula-dir"
1679 DISTVER=`uname -a |awk '{print $3}'`
1682 TAPEDRIVE="/dev/nrst0"
1683 PSCMD="ps -ax -o pid,command"
1684 PTHREAD_LIB="-pthread"
1685 CFLAGS="${CFLAGS} -pthread"
1688 DISTVER=`uname -a |awk '{print $3}'`
1691 TAPEDRIVE="/dev/nrst0"
1692 PSCMD="ps -ax -o pid,command"
1693 PTHREAD_LIB="-pthread"
1694 CFLAGS="${CFLAGS} -pthread"
1696 platforms/openbsd/Makefile \
1697 platforms/openbsd/bacula-fd \
1698 platforms/openbsd/bacula-sd \
1699 platforms/openbsd/bacula-dir"
1702 if test -f /etc/whitebox-release ; then
1703 f=/etc/whitebox-release
1705 f=/etc/redhat-release
1707 if test `cat $f | grep release |\
1708 cut -f 3 -d ' '`x = "Enterprise"x ; then
1709 DISTVER="Enterprise "`cat $f | grep release |\
1712 DISTVER=`cat /etc/redhat-release | grep release |\
1715 TAPEDRIVE="/dev/nst0"
1716 PSCMD="ps -e -o pid,command"
1718 platforms/redhat/Makefile \
1719 platforms/redhat/bacula-fd \
1720 platforms/redhat/bacula-sd \
1721 platforms/redhat/bacula-dir \
1722 platforms/redhat/bacula.spec \
1724 hostname=`hostname -s`
1727 DISTVER=`cat /etc/mandrake-release | grep release |\
1729 TAPEDRIVE="/dev/nst0"
1730 PSCMD="ps -e -o pid,command"
1732 platforms/mandrake/Makefile \
1733 platforms/mandrake/bacula-fd \
1734 platforms/mandrake/bacula-sd \
1735 platforms/mandrake/bacula-dir \
1736 platforms/mandrake/bacula.spec \
1740 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1741 TAPEDRIVE="/dev/nst0"
1742 PSCMD="ps -e -o pid,command"
1744 platforms/gentoo/Makefile \
1745 platforms/gentoo/bacula-init \
1746 platforms/gentoo/bacula-fd \
1747 platforms/gentoo/bacula-sd \
1748 platforms/gentoo/bacula-dir"
1751 DISTVER=`cat /etc/slackware-version`
1752 TAPEDRIVE="/dev/nst0"
1753 PSCMD="ps -e -o pid,command"
1755 platforms/slackware/Makefile \
1756 platforms/slackware/rc.bacula-fd \
1757 platforms/slackware/rc.bacula-sd \
1758 platforms/slackware/rc.bacula-dir\
1759 platforms/slackware/functions.bacula"
1763 TAPEDRIVE="/dev/rmt/0cbn"
1764 PSCMD="ps -e -o pid,comm"
1766 platforms/solaris/Makefile \
1767 platforms/solaris/bacula-fd \
1768 platforms/solaris/bacula-sd \
1769 platforms/solaris/bacula-dir"
1770 if test x$DISTVER = x5.6 ; then
1771 AC_DEFINE(HAVE_OLD_SOCKOPT)
1773 LIBS="$LIBS -lresolv"
1776 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1778 TAPEDRIVE="/dev/nst0"
1779 PSCMD="ps -e -o pid,command"
1781 platforms/suse/Makefile \
1782 platforms/suse/bacula-fd \
1783 platforms/suse/bacula-sd \
1784 platforms/suse/bacula-dir \
1785 platforms/suse/bacula \
1786 platforms/suse/bacula.spec"
1791 TAPEDRIVE="/dev/nst0"
1792 PSCMD="ps -e -o pid,command"
1794 platforms/suse/Makefile \
1795 platforms/suse/bacula-fd \
1796 platforms/suse/bacula-sd \
1797 platforms/suse/bacula-dir"
1801 TAPEDRIVE="/dev/nst0"
1804 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1810 LIBS="$PTHREAD_LIB $LIBS"
1812 AC_DEFINE_UNQUOTED(lld, "$lld")
1813 AC_DEFINE_UNQUOTED(llu, "$llu")
1821 dnl# common parts of the Makefile
1822 MCOMMON=./autoconf/Make.common
1823 AC_SUBST_FILE(MCOMMON)
1826 if test "x${subsysdir}" = "x${sbindir}" ; then
1829 echo "You have set both --sbindir and --with-subsys-dir"
1830 echo " equal to: ${subsysdir} "
1831 echo "This is not permitted. Please reconfigure."
1833 echo "Aborting configuration ..."
1839 AC_OUTPUT([autoconf/Make.common \
1841 scripts/startmysql \
1843 scripts/btraceback \
1849 scripts/devel_bacula \
1852 scripts/bacula.desktop.gnome1 \
1853 scripts/bacula.desktop.gnome2 \
1854 scripts/bacula.desktop.gnome1.consolehelper \
1855 scripts/bacula.desktop.gnome2.consolehelper \
1856 scripts/bacula.desktop.gnome1.xsu \
1857 scripts/bacula.desktop.gnome2.xsu \
1858 scripts/gnome-console.console_apps \
1859 scripts/mtx-changer \
1860 scripts/dvd-writepart \
1861 scripts/dvd-freespace \
1862 scripts/bacula-tray-monitor.desktop \
1863 scripts/logwatch/Makefile \
1864 scripts/logwatch/logfile.bacula.conf \
1867 src/console/Makefile \
1868 src/console/bconsole.conf \
1869 src/gnome2-console/Makefile \
1870 src/gnome2-console/gnome-console.conf \
1871 src/wx-console/Makefile \
1872 src/wx-console/wx-console.conf \
1873 src/tray-monitor/Makefile \
1874 src/tray-monitor/tray-monitor.conf \
1876 src/dird/bacula-dir.conf \
1878 src/stored/Makefile \
1879 src/stored/bacula-sd.conf \
1880 src/filed/Makefile \
1881 src/filed/bacula-fd.conf \
1882 src/filed/win32/Makefile \
1884 src/cats/make_catalog_backup \
1885 src/cats/delete_catalog_backup \
1886 src/cats/create_postgresql_database \
1887 src/cats/update_postgresql_tables \
1888 src/cats/make_postgresql_tables \
1889 src/cats/grant_postgresql_privileges \
1890 src/cats/drop_postgresql_tables \
1891 src/cats/drop_postgresql_database \
1892 src/cats/create_mysql_database \
1893 src/cats/update_mysql_tables \
1894 src/cats/make_mysql_tables \
1895 src/cats/grant_mysql_privileges \
1896 src/cats/drop_mysql_tables \
1897 src/cats/drop_mysql_database \
1898 src/cats/create_sqlite_database \
1899 src/cats/update_sqlite_tables \
1900 src/cats/make_sqlite_tables \
1901 src/cats/grant_sqlite_privileges \
1902 src/cats/drop_sqlite_tables \
1903 src/cats/drop_sqlite_database \
1904 src/cats/create_sqlite3_database \
1905 src/cats/update_sqlite3_tables \
1906 src/cats/make_sqlite3_tables \
1907 src/cats/grant_sqlite3_privileges \
1908 src/cats/drop_sqlite3_tables \
1909 src/cats/drop_sqlite3_database \
1912 src/cats/create_bdb_database \
1913 src/cats/update_bdb_tables \
1914 src/cats/make_bdb_tables \
1915 src/cats/grant_bdb_privileges \
1916 src/cats/drop_bdb_tables \
1917 src/cats/drop_bdb_database \
1918 src/cats/create_bacula_database \
1919 src/cats/update_bacula_tables \
1920 src/cats/grant_bacula_privileges \
1921 src/cats/make_bacula_tables \
1922 src/cats/drop_bacula_tables \
1923 src/cats/drop_bacula_database \
1924 src/findlib/Makefile \
1925 src/tools/Makefile \
1926 src/win32/winbacula.nsi \
1927 src/win32/baculafd/bacula-fd.conf \
1928 src/win32/Makefile \
1929 src/win32/console/bconsole.conf \
1930 src/win32/wx-console/wx-console.conf \
1931 src/win32/pebuilder/Makefile \
1934 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
1938 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1939 chmod 755 dvd-writepart dvd-freespace
1940 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
1945 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
1946 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
1948 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
1949 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
1951 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
1952 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
1954 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
1955 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
1957 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
1958 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
1960 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
1964 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
1965 largefile_support="yes"
1969 # A whole lot of hand springs to get the compiler version.
1970 # This is because gcc changed the output in version 3.0
1972 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1973 if test "x${CCVERSION}" = "x" ; then
1974 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1976 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1977 if test x"${CXXVERSION}" = x ; then
1978 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1981 if test "x${subsysdir}" = "x${sbindir}" ; then
1984 echo "You have set --sbindir and --with-subsys-dir"
1985 echo " both equal to: ${subsysdir} "
1986 echo " This is not permitted. Please reconfigure."
1988 echo "Aborting configuration ..."
1994 if test "x${db_name}" = "xInternal" ; then
1997 echo "You have not specified either --enable-client-only or one of the"
1998 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
1999 echo " This is not permitted. Please reconfigure."
2001 echo "Aborting the configuration ..."
2008 Configuration on `date`:
2010 Host: $host -- ${DISTNAME} ${DISTVER}
2011 Bacula version: ${VERSION} (${DATE})
2012 Source code location: ${srcdir}
2013 Install binaries: ${sbindir}
2014 Install config files: ${sysconfdir}
2015 Scripts directory: ${scriptdir}
2016 Working directory: ${working_dir}
2017 PID directory: ${piddir}
2018 Subsys directory: ${subsysdir}
2019 Man directory: ${mandir}
2020 C Compiler: ${CC} ${CCVERSION}
2021 C++ Compiler: ${CXX} ${CXXVERSION}
2022 Compiler flags: ${WCFLAGS} ${CFLAGS}
2023 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2025 Statically Linked Tools: ${support_static_tools}
2026 Statically Linked FD: ${support_static_fd}
2027 Statically Linked SD: ${support_static_sd}
2028 Statically Linked DIR: ${support_static_dir}
2029 Statically Linked CONS: ${support_static_cons}
2030 Database type: ${db_name}
2031 Database lib: ${DB_LIBS}
2033 Job Output Email: ${job_email}
2034 Traceback Email: ${dump_email}
2035 SMTP Host Address: ${smtp_host}
2037 Director Port: ${dir_port}
2038 File daemon Port: ${fd_port}
2039 Storage daemon Port: ${sd_port}
2041 Director User: ${dir_user}
2042 Director Group: ${dir_group}
2043 Storage Daemon User: ${sd_user}
2044 Storage DaemonGroup: ${sd_group}
2045 File Daemon User: ${fd_user}
2046 File Daemon Group: ${fd_group}
2048 SQL binaries Directory ${SQL_BINDIR}
2050 Large file support: $largefile_support
2051 Bacula conio support: ${got_conio} ${CONS_LIBS}
2052 readline support: ${got_readline} ${PRTREADLINE_SRC}
2053 TCP Wrappers support: ${TCPW_MSG}
2054 TLS support: ${support_tls}
2055 ZLIB support: ${have_zlib}
2056 enable-smartalloc: ${support_smartalloc}
2057 enable-gnome: ${support_gnome} ${gnome_version}
2058 enable-wx-console: ${support_wx_console} ${wx_version}
2059 enable-tray-monitor: ${support_tray_monitor}
2060 client-only: ${build_client_only}
2061 ACL support: ${have_acl}
2062 Python support: ${support_python} ${PYTHON_LIBS}