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 # --------------------------------------------------
118 # Suppport for gettext (translations)
119 # By default, $datadir is ${prefix}/share
120 # --------------------------------------------------
121 AM_GNU_GETTEXT([external])
122 if test x${prefix} = xNONE ; then
123 if test `eval echo ${datadir}` = NONE/share ; then
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}`
141 datadir=`eval echo ${datadir}`
142 localedir=`eval echo ${datadir}/locale`
143 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
145 # -------------------------------------------------------------------------
146 # If the user has not set --exec-prefix, we default to ${prefix}
147 # -------------------------------------------------------------------------
148 if test x${exec_prefix} = xNONE ; then
149 exec_prefix=${prefix}
152 # ------------------------------------------------------------------
153 # If the user has not set --sbindir, we set our default as /sbin
154 # ------------------------------------------------------------------
155 if test x$sbindir = x'${exec_prefix}/sbin' ; then
156 sbindir=${exec_prefix}/sbin
158 sbindir=`eval echo ${sbindir}`
160 # -------------------------------------------------------------------------
161 # If the user has not set --mandir, we default to /usr/share/man
162 # -------------------------------------------------------------------------
163 if test x$mandir = x'${prefix}/man' ; then
164 mandir=/usr/share/man
168 # ------------------------------------------------------------------
169 # All list of languages for which a translation exist. Each
170 # language is separated by a space.
171 # ------------------------------------------------------------------
174 AC_PATH_PROGS(MSGFMT, msgfmt, no)
175 if test "$MSGFMT" = "no"
177 echo 'msgfmt program not found, disabling NLS !'
179 USE_INCLUDED_LIBINTL=no
188 support_postgresql=no
189 support_smartalloc=yes
193 support_wx_console=no
197 support_static_tools=no
200 support_static_dir=no
201 support_static_cons=no
210 dnl# --------------------------------------------------------------------------
211 dnl# CHECKING COMMAND LINE OPTIONS
212 dnl# --------------------------------------------------------------------------
214 # -------------------------------------------
215 # gnome (default off)
216 # -------------------------------------------
218 [ --enable-gnome enable build of gnome-console GUI [disabled]],
219 [if test x$enableval = xyes; then
224 if test x$support_gnome = xyes; then
225 abc=`$PKGCONFIG --exists libgnomeui-2.0`
227 if test $pkg = 0; then
228 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
229 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
230 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
231 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
232 AC_SUBST(GNOME_INCLUDEDIR)
233 AC_SUBST(GNOMEUI_LIBS)
234 AC_SUBST(GNOME_LIBDIR)
236 GNOME_DIR=src/gnome2-console
237 gnome_version="Version 2.x"
239 AC_MSG_ERROR(Unable to find Gnome 2 installation)
245 # -------------------------------------------
246 # wx-console (default off)
247 # -------------------------------------------
248 AC_ARG_ENABLE(wx-console,
249 [ --enable-wx-console enable build of wxWidgets console [disabled]],
250 [if test x$enableval = xyes; then
251 support_wx_console=yes
255 if test x$support_wx_console = xyes; then
256 abc=`$WXCONFIG $WXFLAGS --cppflags`
258 if test $pkg = 0; then
259 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
260 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
261 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
263 AC_SUBST(WXCONS_CPPFLAGS)
264 AC_SUBST(WXCONS_LDFLAGS)
265 WX_DIR=src/wx-console
268 echo "wx-config program not found. wx-console disabled."
270 support_wx_console=no
276 # -------------------------------------------
277 # tray-monitor (default off)
278 # -------------------------------------------
279 AC_ARG_ENABLE(tray-monitor,
280 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
281 [if test x$enableval = xyes; then
282 support_tray_monitor=yes
286 if test x$support_tray_monitor = xyes; then
287 abc=`$PKGCONFIG --exists gtk+-2.0`
289 if test $pkg = 0; then
290 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
291 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
292 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
293 AC_SUBST(TRAY_MONITOR_LDFLAGS)
294 TRAY_MONITOR_DIR=src/tray-monitor
295 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
297 if test $pkg = 0; then
298 AC_DEFINE(HAVE_GTK_2_4)
302 AC_SUBST(TRAY_MONITOR_DIR)
304 # -------------------------------------------
305 # smartalloc (default off)
306 # -------------------------------------------
307 AC_ARG_ENABLE(smartalloc,
308 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
309 [if test x$enableval = xno; then
310 support_smartalloc=no
313 if test x$support_smartalloc = xyes; then
314 AC_DEFINE(SMARTALLOC)
317 # -------------------------------------------
318 # static-tools (default off)
319 # -------------------------------------------
320 AC_ARG_ENABLE(static-tools,
321 [ --enable-static-tools enable static tape tools [disabled]],
322 [if test x$enableval = xyes; then
323 support_static_tools=yes
327 if test x$support_static_tools = xyes; then
328 TTOOL_LDFLAGS="-static"
330 AC_SUBST(TTOOL_LDFLAGS)
332 # -------------------------------------------
333 # static-fd (default off)
334 # -------------------------------------------
335 AC_ARG_ENABLE(static-fd,
336 [ --enable-static-fd enable static File daemon [disabled]],
337 [if test x$enableval = xyes; then
338 support_static_fd=yes
342 if test x$support_static_fd = xyes; then
343 STATIC_FD="static-bacula-fd"
347 # -------------------------------------------
348 # static-sd (default off)
349 # -------------------------------------------
350 AC_ARG_ENABLE(static-sd,
351 [ --enable-static-sd enable static Storage daemon [disabled]],
352 [if test x$enableval = xyes; then
353 support_static_sd=yes
357 if test x$support_static_sd = xyes; then
358 STATIC_SD="static-bacula-sd"
362 # -------------------------------------------
363 # static-dir (default off)
364 # -------------------------------------------
365 AC_ARG_ENABLE(static-dir,
366 [ --enable-static-dir enable static Director [disabled]],
367 [if test x$enableval = xyes; then
368 support_static_dir=yes
372 if test x$support_static_dir = xyes; then
373 STATIC_DIR="static-bacula-dir"
377 # -------------------------------------------
378 # static-cons (default off)
379 # -------------------------------------------
380 AC_ARG_ENABLE(static-cons,
381 [ --enable-static-cons enable static Console [disabled]],
382 [if test x$enableval = xyes; then
383 support_static_cons=yes
389 if test x$support_static_cons = xyes; then
390 STATIC_CONS="static-bconsole"
391 STATIC_GNOME_CONS="static-gnome-console"
392 STATIC_WX_CONS="static-wx-console"
394 AC_SUBST(STATIC_CONS)
395 AC_SUBST(STATIC_GNOME_CONS)
396 AC_SUBST(STATIC_WX_CONS)
398 # -------------------------------------------
399 # client_only (default off)
400 # -------------------------------------------
401 AC_ARG_ENABLE(client-only,
402 [ --enable-client-only build client (File daemon) only [disabled]],
403 [if test x$enableval = xyes; then
404 build_client_only=yes
408 if test x$build_client_only = xno; then
415 # -------------------------------------------
416 # director (default on)
417 # -------------------------------------------
418 AC_ARG_ENABLE(build-dird,
419 [ --enable-build-dird enable building of dird (Director) [enabled]],
420 [if test x$enableval = xno; then
423 if test x$build_dird = xyes; then
428 DIR_TOOLS="NODIRTOOLS"
433 # -------------------------------------------
434 # stored (default on)
435 # -------------------------------------------
436 AC_ARG_ENABLE(build-stored,
437 [ --enable-build-stored enable building of stored (Storage daemon) [enabled]],
438 [if test x$enableval = xno; then
441 if test x$build_stored = xyes; then
442 STORED_DIR="src/stored"
448 # ---------------------------------------------------
449 # Check for conio (Bacula readline substitute)(
450 # ---------------------------------------------------
451 # this allows you to turn it completely off
453 [ --disable-conio disable conio support [enabled]
455 [if test x$enableval = xno; then
460 if test x$support_conio = xyes; then
461 AC_CHECK_HEADER(termcap.h,
462 [ AC_CHECK_LIB(termcap, tgetent,
463 [ CONS_LIBS="-ltermcap"
468 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
470 [ AC_CHECK_LIB(ncurses, tgetent,
471 [ CONS_LIBS="-lncurses"
476 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
481 AC_CHECK_HEADERS(curses.h)
482 AC_CHECK_HEADER(term.h,
483 [ AC_CHECK_LIB(curses, tgetent,
484 [ CONS_LIBS="-lcurses"
489 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
492 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
501 # ---------------------------------------------------
502 # Check for readline support/directory (default off)
503 # ---------------------------------------------------
504 # this allows you to turn it completely off
505 AC_ARG_ENABLE(readline,
506 [ --disable-readline disable readline support [disable]
508 [if test x$enableval = xno; then
514 if test x$support_readline = xyes; then
515 AC_ARG_WITH(readline,
516 [ --with-readline=DIR specify readline library directory],
518 case "$with_readline" in
521 if test -f ${with_readline}/readline.h; then
522 CONS_INC="-I${with_readline}"
523 CONS_LDFLAGS="-L$with_readline"
524 elif test -f ${with_readline}/include/readline/readline.h; then
525 CONS_INC="-I${with_readline}/include/readline"
526 CONS_LDFLAGS="-L${with_readline}/lib"
527 with_readline="${with_readline}/include/readline"
529 with_readline="/usr/include/readline"
531 AC_CHECK_HEADER(${with_readline}/readline.h,
532 [ AC_DEFINE(HAVE_READLINE)
533 CONS_LIBS="-lreadline -lhistory -ltermcap"
537 echo "readline.h not found. readline turned off ..."
544 # check for standard readline library
545 AC_CHECK_HEADER(/usr/include/readline/readline.h,
546 [ AC_DEFINE(HAVE_READLINE)
548 CONS_INC="-I/usr/include/readline"
549 CONS_LIBS="-lreadline -ltermcap"
551 # Did not find standard library, so try Bacula's default
552 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
553 [ AC_DEFINE(HAVE_READLINE)
555 CONS_INC="-I${TOP_DIR}/depkgs/readline"
556 CONS_LIBS="-lreadline -lhistory -ltermcap"
557 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
558 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
561 echo "readline.h not found. readline turned off ..."
577 AC_SUBST(CONS_LDFLAGS)
578 AC_SUBST(READLINE_SRC)
580 # Minimal stuff for readline Makefile configuration
585 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr lstat lchown)
586 AC_CHECK_FUNCS(nanosleep nl_langinfo)
587 AC_CHECK_HEADERS(varargs.h)
589 # End of readline/conio stuff
590 # -----------------------------------------------------------------------
592 # -----------------------------------------------------------------------
593 # Check for Python support
595 AC_MSG_CHECKING(for Python support)
598 --with-python[=DIR] Include Python support. DIR is the Python base
599 install directory, default is to search through
600 a number of common places for the Python files.],
604 if test "$withval" != "no"; then
605 if test "$withval" = "yes"; then
606 for python_root in /usr /usr/local; do
607 if test -f $python_root/include/python2.2/Python.h; then
608 PYTHON_INCDIR=-I$python_root/include/python2.2
609 PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
611 elif test -f $python_root/include/python2.3/Python.h; then
612 PYTHON_INCDIR=-I$python_root/include/python2.3
613 PYTHON_LIBS="-L$python_root/lib/python2.3/config -lpython2.3"
615 elif test -f $python_root/include/python2.4/Python.h; then
616 PYTHON_INCDIR=-I$python_root/include/python2.4
617 PYTHON_LIBS="-L$python_root/lib/python2.4/config -lpython2.4"
621 if test x$PYTHON_INCDIR = x; then
622 if test -f $prefix/include/Python.h; then
623 PYTHON_INCDIR=-I$prefix/include
624 PYTHON_LIBS="-L$prefix/lib/config -lpython"
627 AC_MSG_ERROR(Unable to find Python.h in standard locations)
631 if test -f $withval/Python.h; then
632 PYTHON_INCDIR=-I$withval
633 PYTHON_LIBS="-L$withval/config -lpython"
634 elif test -f $withval/include/Python.h; then
635 PYTHON_INCDIR=-I$withval/include
636 PYTHON_LIBS="-L$withval/lib/config -lpython"
637 elif test -f $withval/include/python/Python.h; then
638 PYTHON_INCDIR=-I$withval/include/python
639 PYTHON_LIBS="-L$withval/lib/python/config -lpython"
642 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
645 AC_DEFINE([HAVE_PYTHON], 1)
648 AC_MSG_NOTICE(checking for more Python libs)
649 saved_LIBS="$LIBS"; LIBS=
650 AC_SEARCH_LIBS(shm_open, [rt])
651 AC_CHECK_LIB(util, openpty)
652 PYTHON_LIBS="$PYTHON_LIBS $LIBS"
660 AC_SUBST(PYTHON_LIBS)
661 AC_SUBST(PYTHON_INCDIR)
665 # Find where sockets are (especially for Solaris)
666 # Do this before the TCP Wrappers test since tcp wrappers
667 # uses the socket library and some linkers are stupid.
669 AC_CHECK_FUNC(socket,
670 AC_MSG_RESULT(using libc's socket),
671 AC_CHECK_LIB(xnet,socket)
672 AC_CHECK_LIB(socket,socket)
673 AC_CHECK_LIB(inet,socket))
676 # -----------------------------------------------------------
677 # Check whether user wants TCP wrappers support (default off)
678 # -----------------------------------------------------------
681 AC_ARG_WITH(tcp-wrappers,
682 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
684 if test "x$withval" != "xno" ; then
686 LIBS="$saved_LIBS -lwrap"
687 AC_MSG_CHECKING(for libwrap)
688 AC_SEARCH_LIBS(nanosleep, [rt])
690 [ #include <sys/types.h>
692 int deny_severity = 0;
693 int allow_severity = 0;
694 struct request_info *req; ],
695 [ hosts_access(req); ],
698 AC_DEFINE(HAVE_LIBWRAP)
703 LIBS="$saved_LIBS -lwrap -lnsl"
704 WRAPLIBS="$saved_LIBS -lwrap -lnsl"
706 [ #include <sys/types.h>
708 int deny_severity = 0;
709 int allow_severity = 0;
710 struct request_info *req; ],
711 [ hosts_access(req); ],
714 AC_DEFINE(HAVE_LIBWRAP)
719 [AC_MSG_ERROR([*** libwrap missing]) ] ]
726 # -----------------------------------------------------------
727 # Check whether OpenSSL is available
728 # -----------------------------------------------------------
729 AC_MSG_CHECKING([for OpenSSL])
730 dnl The following uses quadrigraphs:
734 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
735 [with_openssl_directory=${withval}])
737 if test "x$with_openssl_directory" != "x"; then
738 OPENSSL_LIBS="-lssl -lcrypto"
741 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
742 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
743 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
747 saved_CFLAGS="$CFLAGS"
748 LIBS="$saved_LIBS $OPENSSL_LIBS"
749 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
751 AC_TRY_LINK([ #include <openssl/ssl.h> ],
752 [ CRYPTO_set_id_callback(NULL); ],
753 [ support_tls="yes" ],
758 CFLAGS="$saved_CFLAGS"
760 if test "$support_tls" = "yes"; then
761 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
762 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
770 AC_MSG_RESULT([$support_tls])
771 AC_SUBST(OPENSSL_LIBS)
772 AC_SUBST(OPENSSL_INC)
775 # -----------------------------------------------------------
776 # Python and OpenSSL are using dlopen
777 # -----------------------------------------------------------
779 if test "$support_python" = "yes" -o "$support_tls" = "yes"; then
780 AC_SEARCH_LIBS(dlopen, [dl])
783 # ------------------------------------------
784 # Where to place working dir
785 # ------------------------------------------
786 working_dir=`eval echo ${prefix}/var/bacula/working`
787 AC_ARG_WITH(working-dir,
788 [ --with-working-dir=PATH specify path of Bacula working directory],
790 if test "x$withval" != "xno" ; then
796 AC_SUBST(working_dir)
799 # ------------------------------------------
800 # Where to place scriptdir (script files)
801 # ------------------------------------------
802 scriptdir=`eval echo ${sysconfdir}`
803 AC_ARG_WITH(scriptdir,
804 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
806 if test "x$withval" != "xno" ; then
815 # ------------------------------------------
816 # Where to send dump email
817 # ------------------------------------------
818 dump_email=root@localhost
819 AC_ARG_WITH(dump-email,
820 [ --with-dump-email=EMAIL dump email address],
822 if test "x$withval" != "xno" ; then
830 # ------------------------------------------
831 # Where to send job email
832 # ------------------------------------------
833 job_email=root@localhost
834 AC_ARG_WITH(job-email,
835 [ --with-job-email=EMAIL job output email address],
837 if test "x$withval" != "xno" ; then
845 # ------------------------------------------
846 # Where to find smtp host
847 # ------------------------------------------
849 AC_ARG_WITH(smtp_host,
850 [ --with-smtp-host=HOST SMTP mail host address],
852 if test "x$withval" != "xno" ; then
861 # ------------------------------------
862 # Where to place pid files
863 # ------------------------------------
866 [ --with-pid-dir=PATH specify location of Bacula pid files],
868 if test "x$withval" != "xno" ; then
874 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
878 # ------------------------------------
879 # Where to place subsys "lock file"
880 # ------------------------------------
881 subsysdir=/var/run/subsys
882 AC_ARG_WITH(subsys-dir,
883 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
885 if test "x$withval" != "xno" ; then
895 # ------------------------------------
896 # Where to start assigning ports
897 # ------------------------------------
899 AC_ARG_WITH(baseport,
900 [ --with-baseport=PORT specify base port address for daemons],
902 if test "x$withval" != "xno" ; then
909 dir_port=`expr $baseport`
910 fd_port=`expr $baseport + 1`
911 sd_port=`expr $fd_port + 1`
918 # ------------------------------------------
920 # ------------------------------------------
922 AC_ARG_WITH(dir-password,
923 [ --with-dir-password=PASSWORD specify Director's password],
925 if test "x$withval" != "xno" ; then
926 dir_password=$withval
931 if test "x$dir_password" = "x" ; then
932 if test "x$OPENSSL" = "xnone" ; then
933 key=`autoconf/randpass 33`
935 key=`openssl rand -base64 33`
941 AC_ARG_WITH(fd-password,
942 [ --with-fd-password=PASSWORD specify Client's password],
944 if test "x$withval" != "xno" ; then
950 if test "x$fd_password" = "x" ; then
951 if test "x$OPENSSL" = "xnone" ; then
952 key=`autoconf/randpass 37`
954 key=`openssl rand -base64 33`
960 AC_ARG_WITH(sd-password,
961 [ --with-sd-password=PASSWORD specify Storage daemon's password],
963 if test "x$withval" != "xno" ; then
969 if test "x$sd_password" = "x" ; then
970 if test "x$OPENSSL" = "xnone" ; then
971 key=`autoconf/randpass 41`
973 key=`openssl rand -base64 33`
979 AC_ARG_WITH(mon-dir-password,
980 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
982 if test "x$withval" != "xno" ; then
983 mon_dir_password=$withval
988 if test "x$mon_dir_password" = "x" ; then
989 if test "x$OPENSSL" = "xnone" ; then
990 key=`autoconf/randpass 33`
992 key=`openssl rand -base64 33`
994 mon_dir_password=$key
998 AC_ARG_WITH(mon-fd-password,
999 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
1001 if test "x$withval" != "xno" ; then
1002 mon_fd_password=$withval
1007 if test "x$mon_fd_password" = "x" ; then
1008 if test "x$OPENSSL" = "xnone" ; then
1009 key=`autoconf/randpass 37`
1011 key=`openssl rand -base64 33`
1013 mon_fd_password=$key
1017 AC_ARG_WITH(mon-sd-password,
1018 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
1020 if test "x$withval" != "xno" ; then
1021 mon_sd_password=$withval
1026 if test "x$mon_sd_password" = "x" ; then
1027 if test "x$OPENSSL" = "xnone" ; then
1028 key=`autoconf/randpass 41`
1030 key=`openssl rand -base64 33`
1032 mon_sd_password=$key
1035 AC_SUBST(dir_password)
1036 AC_SUBST(fd_password)
1037 AC_SUBST(sd_password)
1038 AC_SUBST(mon_dir_password)
1039 AC_SUBST(mon_fd_password)
1040 AC_SUBST(mon_sd_password)
1044 # Handle users and groups for each daemon
1047 AC_ARG_WITH(dir_user,
1048 [ --with-dir-user=USER specify user for Director daemon],
1050 if test "x$withval" != "x" ; then
1057 AC_ARG_WITH(dir_group,
1058 [ --with-dir-group=GROUP specify group for Director daemon],
1060 if test "x$withval" != "x" ; then
1067 AC_ARG_WITH(sd_user,
1068 [ --with-sd-user=USER specify user for Storage daemon],
1070 if test "x$withval" != "x" ; then
1077 AC_ARG_WITH(sd_group,
1078 [ --with-sd-group=GROUP specify group for Storage daemon],
1080 if test "x$withval" != "x" ; then
1087 AC_ARG_WITH(fd_user,
1088 [ --with-fd-user=USER specify user for File daemon],
1090 if test "x$withval" != "x" ; then
1097 AC_ARG_WITH(fd_group,
1098 [ --with-fd-group=GROUP specify group for File daemon],
1100 if test "x$withval" != "x" ; then
1117 # allow setting default executable permissions
1120 AC_ARG_WITH(sbin-perm,
1121 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1123 if test "x$withval" != "x" ; then
1131 # ------------------------------------------------
1132 # Bacula check for various SQL database engines
1133 # ------------------------------------------------
1134 BA_CHECK_POSTGRESQL_DB
1145 AC_DEFINE(PROTOTYPES)
1147 dnl# --------------------------------------------------------------------------
1148 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1150 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1151 if test -z "$CCOPTS"; then
1152 CCOPTS='-g -O2 -Wall'
1161 dnl See if we can use 64 bit file addresses
1162 largefile_support="no"
1168 dnl# --------------------------------------------------------------------------
1169 dnl# CHECKING FOR HEADER FILES
1170 dnl# --------------------------------------------------------------------------
1206 AC_STRUCT_ST_BLKSIZE
1210 dnl# --------------------------------------------------------------------------
1211 dnl# Check for utime.h structure
1212 dnl# --------------------------------------------------------------------------
1213 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1215 #include <sys/types.h>
1216 #include <utime.h>], [struct utimbuf foo],
1217 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1218 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1220 dnl# --------------------------------------------------------------------------
1221 dnl# Check for socklen_t
1222 dnl# --------------------------------------------------------------------------
1223 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1225 #include <sys/types.h>
1226 #include <sys/socket.h>],
1228 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1229 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1231 dnl# --------------------------------------------------------------------------
1232 dnl# Check for bigendian
1233 dnl# --------------------------------------------------------------------------
1234 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1236 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1237 [ba_cv_bigendian=yes],
1238 [ba_cv_bigendian=no],
1239 [ba_cv_bigendian=no])])
1240 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1246 dnl# --------------------------------------------------------------------------
1247 dnl# CHECKING FOR FILESYSTEM TYPE
1248 dnl# --------------------------------------------------------------------------
1249 AC_MSG_CHECKING(how to get filesystem type)
1251 # The order of these tests is important.
1252 AC_TRY_CPP([#include <sys/statvfs.h>
1253 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1254 if test $fstype = no; then
1255 AC_TRY_CPP([#include <sys/statfs.h>
1256 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1258 if test $fstype = no; then
1259 AC_TRY_CPP([#include <sys/statfs.h>
1260 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1262 if test $fstype = no; then
1263 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1265 if test $fstype = no; then
1266 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1268 if test $fstype = no; then
1269 AC_TRY_CPP([#include <sys/mount.h>
1270 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1272 AC_MSG_RESULT($fstype)
1274 dnl# --------------------------------------------------------------------------
1275 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1276 dnl# --------------------------------------------------------------------------
1284 AC_CHECK_TYPE(ino_t, unsigned long)
1285 AC_CHECK_TYPE(dev_t, unsigned long)
1286 AC_CHECK_TYPE(daddr_t, long)
1287 AC_CHECK_TYPE(major_t, int)
1288 AC_CHECK_TYPE(minor_t, int)
1289 AC_CHECK_TYPE(ssize_t, int)
1296 AC_CHECK_SIZEOF(char, 1)
1297 AC_CHECK_SIZEOF(short int, 2)
1298 AC_CHECK_SIZEOF(int, 4)
1299 AC_CHECK_SIZEOF(long int, 4)
1300 AC_CHECK_SIZEOF(long long int, 8)
1301 AC_CHECK_SIZEOF(int *, 4)
1303 # Check for sys/types.h types
1304 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1306 [ #include <sys/types.h> ],
1308 [ ac_cv_have_u_int="yes" ],
1309 [ ac_cv_have_u_int="no" ]
1312 if test "x$ac_cv_have_u_int" = "xyes" ; then
1313 AC_DEFINE(HAVE_U_INT)
1317 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1319 [ #include <sys/types.h> ],
1320 [ intmax_t a; a = 1;],
1321 [ ac_cv_have_intmax_t="yes" ],
1324 [ #include <stdint.h> ],
1325 [ intmax_t a; a = 1;],
1326 [ ac_cv_have_intmax_t="yes" ],
1327 [ ac_cv_have_intmax_t="no" ]
1333 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1334 AC_DEFINE(HAVE_INTMAX_T)
1339 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1341 [ #include <sys/types.h> ],
1342 [ u_intmax_t a; a = 1;],
1343 [ ac_cv_have_u_intmax_t="yes" ],
1346 [ #include <stdint.h> ],
1347 [ u_intmax_t a; a = 1;],
1348 [ ac_cv_have_u_intmax_t="yes" ],
1349 [ ac_cv_have_u_intmax_t="no" ]
1354 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1355 AC_DEFINE(HAVE_U_INTMAX_T)
1360 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1362 [ #include <sys/types.h> ],
1363 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1364 [ ac_cv_have_intxx_t="yes" ],
1365 [ ac_cv_have_intxx_t="no" ]
1368 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1369 AC_DEFINE(HAVE_INTXX_T)
1373 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1375 [ #include <sys/types.h> ],
1376 [ int64_t a; a = 1;],
1377 [ ac_cv_have_int64_t="yes" ],
1378 [ ac_cv_have_int64_t="no" ]
1381 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1382 AC_DEFINE(HAVE_INT64_T)
1386 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1388 [ #include <sys/types.h> ],
1389 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1390 [ ac_cv_have_u_intxx_t="yes" ],
1391 [ ac_cv_have_u_intxx_t="no" ]
1394 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1395 AC_DEFINE(HAVE_U_INTXX_T)
1399 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1401 [ #include <sys/types.h> ],
1402 [ u_int64_t a; a = 1;],
1403 [ ac_cv_have_u_int64_t="yes" ],
1404 [ ac_cv_have_u_int64_t="no" ]
1407 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1408 AC_DEFINE(HAVE_U_INT64_T)
1412 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1413 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1415 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1417 [ #include <sys/bitypes.h> ],
1418 [ int8_t a; int16_t b; int32_t c;
1419 u_int8_t e; u_int16_t f; u_int32_t g;
1420 a = b = c = e = f = g = 1; ],
1421 [ AC_DEFINE(HAVE_U_INTXX_T)
1422 AC_DEFINE(HAVE_INTXX_T)
1423 AC_DEFINE(HAVE_SYS_BITYPES_H)
1424 AC_MSG_RESULT(yes) ],
1425 [ AC_MSG_RESULT(no)]
1429 if test -z "$have_u_intxx_t" ; then
1430 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1432 [ #include <sys/types.h> ],
1433 [ uint8_t a; uint16_t b;
1434 uint32_t c; a = b = c = 1; ],
1435 [ ac_cv_have_uintxx_t="yes" ],
1436 [ ac_cv_have_uintxx_t="no" ]
1439 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1440 AC_DEFINE(HAVE_UINTXX_T)
1444 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1445 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1447 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1449 [ #include <sys/bitypes.h> ],
1450 [ int64_t a; u_int64_t b;
1452 [ AC_DEFINE(HAVE_U_INT64_T)
1453 AC_DEFINE(HAVE_INT64_T)
1454 AC_MSG_RESULT(yes) ],
1455 [ AC_MSG_RESULT(no)]
1459 if (test -z "$have_uintxx_t" && \
1460 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1462 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1464 [ #include <sys/bitypes.h> ],
1465 [ uint8_t a; uint16_t b;
1466 uint32_t c; a = b = c = 1; ],
1467 [ AC_DEFINE(HAVE_UINTXX_T)
1468 AC_MSG_RESULT(yes) ],
1469 [ AC_MSG_RESULT(no)]
1477 dnl# --------------------------------------------------------------------------
1478 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1479 dnl# --------------------------------------------------------------------------
1495 [echo 'configure: cannot find needed function.'; exit 1]
1498 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1499 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1501 AC_CHECK_FUNCS(chflags)
1503 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1505 dnl# --------------------------------------------------------------------------
1506 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1507 dnl# --------------------------------------------------------------------------
1508 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1510 # If resolver functions are not in libc check for -lnsl or -lresolv.
1511 AC_CHECK_FUNC(gethostbyname_r,
1512 AC_MSG_RESULT(using libc's resolver),
1513 AC_CHECK_LIB(nsl,gethostbyname_r)
1514 AC_CHECK_LIB(resolv,gethostbyname_r))
1518 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1519 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1520 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1522 dnl ----------------------------
1523 dnl check sa_len of sockaddr
1524 dnl ----------------------------
1525 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1526 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1527 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1529 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1530 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1534 dnl Check for IPv6 support
1535 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1536 [AC_TRY_LINK([ #include <sys/types.h>
1537 #include <sys/socket.h>
1538 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1540 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1542 if test "$ac_cv_ipv6_support" = yes; then
1543 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1552 AC_FUNC_CLOSEDIR_VOID
1553 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1554 # AC_FUNC_FNMATCH dnl use local version
1557 dnl# FreeBSD needs to link libxpg4
1558 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1559 AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
1562 AC_CHECK_LIB(sun, getpwnam)
1564 AC_CHECK_HEADERS(zlib.h)
1565 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1567 if test x$FDLIBS = x-lz; then
1568 AC_DEFINE(HAVE_LIBZ)
1573 AC_CHECK_HEADER(sys/acl.h)
1574 AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
1575 [AC_CHECK_LIB(acl, acl_get_file, [have_acl=yes; FDLIBS="-lacl $FDLIBS"])]
1577 if test $have_acl = yes; then
1581 dnl Check for pthread libraries
1583 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1584 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1585 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1586 [AC_CHECK_FUNC(pthread_create)]
1596 LDFLAGS=${LDFLAGS--O}
1597 DB_LIBS="${SQL_LFLAGS}"
1599 CPPFLAGS="$CPPFLAGS"
1611 AC_SUBST(X_EXTRA_LIBS)
1616 dnl# extra configurable objects
1627 # Finally we set appropriate distribution specific
1628 # variables and defaults
1630 # PFILES are platform specific files
1631 PFILES="platforms/Makefile"
1635 hostname=`uname -n | cut -d '.' -f 1`
1639 PSCMD="ps -e -o pid,comm"
1641 platforms/aix/Makefile"
1642 TAPEDRIVE="/dev/rmt0.1"
1646 PTHREAD_LIB="-lpthread -lexc"
1647 if test "${CC}" = "gcc" ; then
1654 TAPEDRIVE="/dev/nrmt0"
1657 DISTVER=`uname -a |awk '{print $3}'`
1658 TAPEDRIVE="/dev/nrmt0"
1659 PTHREAD_LIB="-pthread"
1660 CFLAGS="${CFLAGS} -pthread"
1661 PSCMD="ps -ax -o pid,command"
1665 platforms/bsdi/Makefile \
1666 platforms/bsdi/bacula-fd \
1667 platforms/bsdi/bacula-sd \
1668 platforms/bsdi/bacula-dir"
1669 largefile_support="yes"
1672 DISTVER=`uname -a |awk '{print $3}'`
1673 TAPEDRIVE="/dev/nrst0"
1676 WLDFLAGS="-mwindows"
1680 TAPEDRIVE="/dev/nst0"
1681 PSCMD="ps -e -o pid,command"
1684 platforms/darwin/Makefile"
1687 DISTVER=`cat /etc/debian_version`
1688 TAPEDRIVE="/dev/nrst0"
1689 PSCMD="ps -e -o pid,command"
1692 DISTVER=`uname -a |awk '{print $3}'`
1693 VER=`echo $DISTVER | cut -c 1`
1694 if test x$VER = x4 ; then
1695 PTHREAD_LIB="-pthread"
1696 CFLAGS="${CFLAGS} -pthread"
1700 TAPEDRIVE="/dev/nrsa0"
1701 PSCMD="ps -ax -o pid,command"
1703 platforms/freebsd/Makefile \
1704 platforms/freebsd/bacula-fd \
1705 platforms/freebsd/bacula-sd \
1706 platforms/freebsd/bacula-dir"
1707 largefile_support="yes"
1710 PSCMD="UNIX95=1 ps -e -o pid,comm"
1711 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1713 TAPEDRIVE="/dev/rmt/0hnb"
1714 PTHREAD_LIB="-lpthread"
1715 AC_DEFINE([_INCLUDE_LONGLONG])
1719 TAPEDRIVE="/dev/rmt/0cbn"
1720 PSCMD="ps -e -o pid,comm"
1722 platforms/irix/Makefile \
1723 platforms/irix/bacula-fd \
1724 platforms/irix/bacula-sd \
1725 platforms/irix/bacula-dir"
1728 DISTVER=`uname -a |awk '{print $3}'`
1731 TAPEDRIVE="/dev/nrst0"
1732 PSCMD="ps -ax -o pid,command"
1733 PTHREAD_LIB="-pthread"
1734 CFLAGS="${CFLAGS} -pthread"
1737 DISTVER=`uname -a |awk '{print $3}'`
1740 TAPEDRIVE="/dev/nrst0"
1741 PSCMD="ps -ax -o pid,command"
1742 PTHREAD_LIB="-pthread"
1743 CFLAGS="${CFLAGS} -pthread"
1745 platforms/openbsd/Makefile \
1746 platforms/openbsd/bacula-fd \
1747 platforms/openbsd/bacula-sd \
1748 platforms/openbsd/bacula-dir"
1751 if test -f /etc/whitebox-release ; then
1752 f=/etc/whitebox-release
1754 f=/etc/redhat-release
1756 if test `cat $f | grep release |\
1757 cut -f 3 -d ' '`x = "Enterprise"x ; then
1758 DISTVER="Enterprise "`cat $f | grep release |\
1761 DISTVER=`cat /etc/redhat-release | grep release |\
1764 TAPEDRIVE="/dev/nst0"
1765 PSCMD="ps -e -o pid,command"
1767 platforms/redhat/Makefile \
1768 platforms/redhat/bacula-fd \
1769 platforms/redhat/bacula-sd \
1770 platforms/redhat/bacula-dir \
1771 platforms/redhat/bacula.spec \
1773 hostname=`hostname -s`
1776 DISTVER=`cat /etc/mandrake-release | grep release |\
1778 TAPEDRIVE="/dev/nst0"
1779 PSCMD="ps -e -o pid,command"
1781 platforms/mandrake/Makefile \
1782 platforms/mandrake/bacula-fd \
1783 platforms/mandrake/bacula-sd \
1784 platforms/mandrake/bacula-dir \
1785 platforms/mandrake/bacula.spec \
1789 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1790 TAPEDRIVE="/dev/nst0"
1791 PSCMD="ps -e -o pid,command"
1793 platforms/gentoo/Makefile \
1794 platforms/gentoo/bacula-init \
1795 platforms/gentoo/bacula-fd \
1796 platforms/gentoo/bacula-sd \
1797 platforms/gentoo/bacula-dir"
1800 DISTVER=`cat /etc/slackware-version`
1801 TAPEDRIVE="/dev/nst0"
1802 PSCMD="ps -e -o pid,command"
1804 platforms/slackware/Makefile \
1805 platforms/slackware/rc.bacula-fd \
1806 platforms/slackware/rc.bacula-sd \
1807 platforms/slackware/rc.bacula-dir\
1808 platforms/slackware/functions.bacula"
1812 TAPEDRIVE="/dev/rmt/0cbn"
1813 PSCMD="ps -e -o pid,comm"
1815 platforms/solaris/Makefile \
1816 platforms/solaris/bacula-fd \
1817 platforms/solaris/bacula-sd \
1818 platforms/solaris/bacula-dir"
1819 if test x$DISTVER = x5.6 ; then
1820 AC_DEFINE(HAVE_OLD_SOCKOPT)
1822 LIBS="$LIBS -lresolv"
1825 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1827 TAPEDRIVE="/dev/nst0"
1828 PSCMD="ps -e -o pid,command"
1830 platforms/suse/Makefile \
1831 platforms/suse/bacula-fd \
1832 platforms/suse/bacula-sd \
1833 platforms/suse/bacula-dir \
1834 platforms/suse/bacula \
1835 platforms/suse/bacula.spec"
1840 TAPEDRIVE="/dev/nst0"
1841 PSCMD="ps -e -o pid,command"
1843 platforms/suse/Makefile \
1844 platforms/suse/bacula-fd \
1845 platforms/suse/bacula-sd \
1846 platforms/suse/bacula-dir"
1850 TAPEDRIVE="/dev/nst0"
1853 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1859 LIBS="$PTHREAD_LIB $LIBS"
1861 AC_DEFINE_UNQUOTED(lld, "$lld")
1862 AC_DEFINE_UNQUOTED(llu, "$llu")
1870 dnl# common parts of the Makefile
1871 MCOMMON=./autoconf/Make.common
1872 AC_SUBST_FILE(MCOMMON)
1875 if test "x${subsysdir}" = "x${sbindir}" ; then
1878 echo "You have set both --sbindir and --with-subsys-dir"
1879 echo " equal to: ${subsysdir} "
1880 echo "This is not permitted. Please reconfigure."
1882 echo "Aborting configuration ..."
1888 AC_OUTPUT([autoconf/Make.common \
1890 scripts/startmysql \
1892 scripts/btraceback \
1898 scripts/devel_bacula \
1901 scripts/bacula.desktop.gnome1 \
1902 scripts/bacula.desktop.gnome2 \
1903 scripts/bacula.desktop.gnome1.consolehelper \
1904 scripts/bacula.desktop.gnome2.consolehelper \
1905 scripts/bacula.desktop.gnome1.xsu \
1906 scripts/bacula.desktop.gnome2.xsu \
1907 scripts/gnome-console.console_apps \
1908 scripts/mtx-changer \
1909 scripts/dvd-writepart \
1910 scripts/dvd-freespace \
1911 scripts/bacula-tray-monitor.desktop \
1912 scripts/logwatch/Makefile \
1913 scripts/logwatch/logfile.bacula.conf \
1916 src/console/Makefile \
1917 src/console/bconsole.conf \
1918 src/gnome2-console/Makefile \
1919 src/gnome2-console/gnome-console.conf \
1920 src/wx-console/Makefile \
1921 src/wx-console/wx-console.conf \
1922 src/tray-monitor/Makefile \
1923 src/tray-monitor/tray-monitor.conf \
1925 src/dird/bacula-dir.conf \
1927 src/stored/Makefile \
1928 src/stored/bacula-sd.conf \
1929 src/filed/Makefile \
1930 src/filed/bacula-fd.conf \
1931 src/filed/win32/Makefile \
1933 src/cats/make_catalog_backup \
1934 src/cats/delete_catalog_backup \
1935 src/cats/create_postgresql_database \
1936 src/cats/update_postgresql_tables \
1937 src/cats/make_postgresql_tables \
1938 src/cats/grant_postgresql_privileges \
1939 src/cats/drop_postgresql_tables \
1940 src/cats/drop_postgresql_database \
1941 src/cats/create_mysql_database \
1942 src/cats/update_mysql_tables \
1943 src/cats/make_mysql_tables \
1944 src/cats/grant_mysql_privileges \
1945 src/cats/drop_mysql_tables \
1946 src/cats/drop_mysql_database \
1947 src/cats/create_sqlite_database \
1948 src/cats/update_sqlite_tables \
1949 src/cats/make_sqlite_tables \
1950 src/cats/grant_sqlite_privileges \
1951 src/cats/drop_sqlite_tables \
1952 src/cats/drop_sqlite_database \
1953 src/cats/create_sqlite3_database \
1954 src/cats/update_sqlite3_tables \
1955 src/cats/make_sqlite3_tables \
1956 src/cats/grant_sqlite3_privileges \
1957 src/cats/drop_sqlite3_tables \
1958 src/cats/drop_sqlite3_database \
1961 src/cats/create_bdb_database \
1962 src/cats/update_bdb_tables \
1963 src/cats/make_bdb_tables \
1964 src/cats/grant_bdb_privileges \
1965 src/cats/drop_bdb_tables \
1966 src/cats/drop_bdb_database \
1967 src/cats/create_bacula_database \
1968 src/cats/update_bacula_tables \
1969 src/cats/grant_bacula_privileges \
1970 src/cats/make_bacula_tables \
1971 src/cats/drop_bacula_tables \
1972 src/cats/drop_bacula_database \
1973 src/findlib/Makefile \
1974 src/tools/Makefile \
1975 src/win32/winbacula.nsi \
1976 src/win32/baculafd/bacula-fd.conf \
1977 src/win32/Makefile \
1978 src/win32/console/bconsole.conf \
1979 src/win32/wx-console/wx-console.conf \
1980 src/win32/pebuilder/Makefile \
1983 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
1987 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1988 chmod 755 dvd-writepart dvd-freespace
1989 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
1994 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
1995 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
1997 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
1998 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2000 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2001 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2003 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2004 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2006 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2007 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2009 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2013 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2014 largefile_support="yes"
2018 # A whole lot of hand springs to get the compiler version.
2019 # This is because gcc changed the output in version 3.0
2021 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2022 if test "x${CCVERSION}" = "x" ; then
2023 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2025 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2026 if test x"${CXXVERSION}" = x ; then
2027 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2030 if test "x${subsysdir}" = "x${sbindir}" ; then
2033 echo "You have set --sbindir and --with-subsys-dir"
2034 echo " both equal to: ${subsysdir} "
2035 echo " This is not permitted. Please reconfigure."
2037 echo "Aborting configuration ..."
2043 if test "x${db_name}" = "xInternal" ; then
2046 echo "You have not specified either --enable-client-only or one of the"
2047 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
2048 echo " This is not permitted. Please reconfigure."
2050 echo "Aborting the configuration ..."
2057 Configuration on `date`:
2059 Host: $host -- ${DISTNAME} ${DISTVER}
2060 Bacula version: ${VERSION} (${DATE})
2061 Source code location: ${srcdir}
2062 Install binaries: ${sbindir}
2063 Install config files: ${sysconfdir}
2064 Scripts directory: ${scriptdir}
2065 Working directory: ${working_dir}
2066 PID directory: ${piddir}
2067 Subsys directory: ${subsysdir}
2068 Man directory: ${mandir}
2069 Data directory: ${datadir}
2070 C Compiler: ${CC} ${CCVERSION}
2071 C++ Compiler: ${CXX} ${CXXVERSION}
2072 Compiler flags: ${WCFLAGS} ${CFLAGS}
2073 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2075 Statically Linked Tools: ${support_static_tools}
2076 Statically Linked FD: ${support_static_fd}
2077 Statically Linked SD: ${support_static_sd}
2078 Statically Linked DIR: ${support_static_dir}
2079 Statically Linked CONS: ${support_static_cons}
2080 Database type: ${db_name}
2081 Database lib: ${DB_LIBS}
2083 Job Output Email: ${job_email}
2084 Traceback Email: ${dump_email}
2085 SMTP Host Address: ${smtp_host}
2087 Director Port: ${dir_port}
2088 File daemon Port: ${fd_port}
2089 Storage daemon Port: ${sd_port}
2091 Director User: ${dir_user}
2092 Director Group: ${dir_group}
2093 Storage Daemon User: ${sd_user}
2094 Storage DaemonGroup: ${sd_group}
2095 File Daemon User: ${fd_user}
2096 File Daemon Group: ${fd_group}
2098 SQL binaries Directory ${SQL_BINDIR}
2100 Large file support: $largefile_support
2101 Bacula conio support: ${got_conio} ${CONS_LIBS}
2102 readline support: ${got_readline} ${PRTREADLINE_SRC}
2103 TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
2104 TLS support: ${support_tls}
2105 ZLIB support: ${have_zlib}
2106 enable-smartalloc: ${support_smartalloc}
2107 enable-gnome: ${support_gnome} ${gnome_version}
2108 enable-wx-console: ${support_wx_console} ${wx_version}
2109 enable-tray-monitor: ${support_tray_monitor}
2110 client-only: ${build_client_only}
2111 build-dird: ${build_dird}
2112 build-stored: ${build_stored}
2113 ACL support: ${have_acl}
2114 Python support: ${support_python} ${PYTHON_LIBS}