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 && test x${datadir} = x${prefix}/share ; then
126 # ------------------------------------------------------------------
127 # If the user has not set --prefix, we set our default to nothing.
128 # In this case, if the user has not set --sysconfdir, we set it
129 # to the package default of /etc/bacula. If either --prefix or
130 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
131 # ------------------------------------------------------------------
132 if test x${prefix} = xNONE ; then
133 if test `eval echo ${sysconfdir}` = NONE/etc ; then
134 sysconfdir=/etc/bacula
138 sysconfdir=`eval echo ${sysconfdir}`
139 datadir=`eval echo ${datadir}`
140 localedir=`eval echo ${datadir}/locale`
141 AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
143 # -------------------------------------------------------------------------
144 # If the user has not set --exec-prefix, we default to ${prefix}
145 # -------------------------------------------------------------------------
146 if test x${exec_prefix} = xNONE ; then
147 exec_prefix=${prefix}
150 # ------------------------------------------------------------------
151 # If the user has not set --sbindir, we set our default as /sbin
152 # ------------------------------------------------------------------
153 if test x$sbindir = x'${exec_prefix}/sbin' ; then
154 sbindir=${exec_prefix}/sbin
156 sbindir=`eval echo ${sbindir}`
158 # -------------------------------------------------------------------------
159 # If the user has not set --mandir, we default to /usr/share/man
160 # -------------------------------------------------------------------------
161 if test x$mandir = x'${prefix}/man' ; then
162 mandir=/usr/share/man
166 # ------------------------------------------------------------------
167 # All list of languages for which a translation exist. Each
168 # language is separated by a space.
169 # ------------------------------------------------------------------
172 AC_PATH_PROGS(MSGFMT, msgfmt, no)
173 if test "$MSGFMT" = "no"
175 echo 'msgfmt program not found, disabling NLS !'
177 USE_INCLUDED_LIBINTL=no
186 support_postgresql=no
187 support_smartalloc=yes
191 support_wx_console=no
195 support_static_tools=no
198 support_static_dir=no
199 support_static_cons=no
206 dnl# --------------------------------------------------------------------------
207 dnl# CHECKING COMMAND LINE OPTIONS
208 dnl# --------------------------------------------------------------------------
210 # -------------------------------------------
211 # gnome (default off)
212 # -------------------------------------------
214 [ --enable-gnome enable build of gnome-console GUI [disabled]],
215 [if test x$enableval = xyes; then
220 if test x$support_gnome = xyes; then
221 abc=`$PKGCONFIG --exists libgnomeui-2.0`
223 if test $pkg = 0; then
224 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
225 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
226 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
227 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
228 AC_SUBST(GNOME_INCLUDEDIR)
229 AC_SUBST(GNOMEUI_LIBS)
230 AC_SUBST(GNOME_LIBDIR)
232 GNOME_DIR=src/gnome2-console
233 gnome_version="Version 2.x"
235 AC_MSG_ERROR(Unable to find Gnome 2 installation)
241 # -------------------------------------------
242 # wx-console (default off)
243 # -------------------------------------------
244 AC_ARG_ENABLE(wx-console,
245 [ --enable-wx-console enable build of wxWidgets console [disabled]],
246 [if test x$enableval = xyes; then
247 support_wx_console=yes
251 if test x$support_wx_console = xyes; then
252 abc=`$WXCONFIG $WXFLAGS --cppflags`
254 if test $pkg = 0; then
255 wx_version="wxWidgets `$WXCONFIG $WXFLAGS --release`"
256 WXCONS_CPPFLAGS=`$WXCONFIG $WXFLAGS --cppflags`
257 WXCONS_LDFLAGS=`$WXCONFIG $WXFLAGS --libs`
259 AC_SUBST(WXCONS_CPPFLAGS)
260 AC_SUBST(WXCONS_LDFLAGS)
261 WX_DIR=src/wx-console
264 echo "wx-config program not found. wx-console disabled."
266 support_wx_console=no
272 # -------------------------------------------
273 # tray-monitor (default off)
274 # -------------------------------------------
275 AC_ARG_ENABLE(tray-monitor,
276 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
277 [if test x$enableval = xyes; then
278 support_tray_monitor=yes
282 if test x$support_tray_monitor = xyes; then
283 abc=`$PKGCONFIG --exists gtk+-2.0`
285 if test $pkg = 0; then
286 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
287 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
288 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
289 AC_SUBST(TRAY_MONITOR_LDFLAGS)
290 TRAY_MONITOR_DIR=src/tray-monitor
291 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
293 if test $pkg = 0; then
294 AC_DEFINE(HAVE_GTK_2_4)
298 AC_SUBST(TRAY_MONITOR_DIR)
300 # -------------------------------------------
301 # smartalloc (default off)
302 # -------------------------------------------
303 AC_ARG_ENABLE(smartalloc,
304 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
305 [if test x$enableval = xno; then
306 support_smartalloc=no
309 if test x$support_smartalloc = xyes; then
310 AC_DEFINE(SMARTALLOC)
313 # -------------------------------------------
314 # static-tools (default off)
315 # -------------------------------------------
316 AC_ARG_ENABLE(static-tools,
317 [ --enable-static-tools enable static tape tools [disabled]],
318 [if test x$enableval = xyes; then
319 support_static_tools=yes
323 if test x$support_static_tools = xyes; then
324 TTOOL_LDFLAGS="-static"
326 AC_SUBST(TTOOL_LDFLAGS)
328 # -------------------------------------------
329 # static-fd (default off)
330 # -------------------------------------------
331 AC_ARG_ENABLE(static-fd,
332 [ --enable-static-fd enable static File daemon [disabled]],
333 [if test x$enableval = xyes; then
334 support_static_fd=yes
338 if test x$support_static_fd = xyes; then
339 STATIC_FD="static-bacula-fd"
343 # -------------------------------------------
344 # static-sd (default off)
345 # -------------------------------------------
346 AC_ARG_ENABLE(static-sd,
347 [ --enable-static-sd enable static Storage daemon [disabled]],
348 [if test x$enableval = xyes; then
349 support_static_sd=yes
353 if test x$support_static_sd = xyes; then
354 STATIC_SD="static-bacula-sd"
358 # -------------------------------------------
359 # static-dir (default off)
360 # -------------------------------------------
361 AC_ARG_ENABLE(static-dir,
362 [ --enable-static-dir enable static Director [disabled]],
363 [if test x$enableval = xyes; then
364 support_static_dir=yes
368 if test x$support_static_dir = xyes; then
369 STATIC_DIR="static-bacula-dir"
373 # -------------------------------------------
374 # static-cons (default off)
375 # -------------------------------------------
376 AC_ARG_ENABLE(static-cons,
377 [ --enable-static-cons enable static Console [disabled]],
378 [if test x$enableval = xyes; then
379 support_static_cons=yes
385 if test x$support_static_cons = xyes; then
386 STATIC_CONS="static-bconsole"
387 STATIC_GNOME_CONS="static-gnome-console"
388 STATIC_WX_CONS="static-wx-console"
390 AC_SUBST(STATIC_CONS)
391 AC_SUBST(STATIC_GNOME_CONS)
392 AC_SUBST(STATIC_WX_CONS)
394 # -------------------------------------------
395 # client_only (default off)
396 # -------------------------------------------
397 AC_ARG_ENABLE(client-only,
398 [ --enable-client-only build client (File daemon) only [disabled]],
399 [if test x$enableval = xyes; then
400 build_client_only=yes
404 if test x$build_client_only = xno; then
411 # ---------------------------------------------------
412 # Check for conio (Bacula readline substitute)(
413 # ---------------------------------------------------
414 # this allows you to turn it completely off
416 [ --disable-conio disable conio support [enabled]
418 [if test x$enableval = xno; then
423 if test x$support_conio = xyes; then
424 AC_CHECK_HEADER(termcap.h,
425 [ AC_CHECK_LIB(termcap, tgetent,
426 [ CONS_LIBS="-ltermcap"
431 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
433 [ AC_CHECK_LIB(ncurses, tgetent,
434 [ CONS_LIBS="-lncurses"
439 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
444 AC_CHECK_HEADERS(curses.h)
445 AC_CHECK_HEADER(term.h,
446 [ AC_CHECK_LIB(curses, tgetent,
447 [ CONS_LIBS="-lcurses"
452 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
455 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
464 # ---------------------------------------------------
465 # Check for readline support/directory (default off)
466 # ---------------------------------------------------
467 # this allows you to turn it completely off
468 AC_ARG_ENABLE(readline,
469 [ --disable-readline disable readline support [disable]
471 [if test x$enableval = xno; then
477 if test x$support_readline = xyes; then
478 AC_ARG_WITH(readline,
479 [ --with-readline=DIR specify readline library directory],
481 case "$with_readline" in
484 if test -f ${with_readline}/readline.h; then
485 CONS_INC="-I${with_readline}"
486 CONS_LDFLAGS="-L$with_readline"
487 elif test -f ${with_readline}/include/readline/readline.h; then
488 CONS_INC="-I${with_readline}/include/readline"
489 CONS_LDFLAGS="-L${with_readline}/lib"
490 with_readline="${with_readline}/include/readline"
492 with_readline="/usr/include/readline"
494 AC_CHECK_HEADER(${with_readline}/readline.h,
495 [ AC_DEFINE(HAVE_READLINE)
496 CONS_LIBS="-lreadline -lhistory -ltermcap"
500 echo "readline.h not found. readline turned off ..."
507 # check for standard readline library
508 AC_CHECK_HEADER(/usr/include/readline/readline.h,
509 [ AC_DEFINE(HAVE_READLINE)
511 CONS_INC="-I/usr/include/readline"
512 CONS_LIBS="-lreadline -ltermcap"
514 # Did not find standard library, so try Bacula's default
515 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
516 [ AC_DEFINE(HAVE_READLINE)
518 CONS_INC="-I${TOP_DIR}/depkgs/readline"
519 CONS_LIBS="-lreadline -lhistory -ltermcap"
520 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
521 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
524 echo "readline.h not found. readline turned off ..."
540 AC_SUBST(CONS_LDFLAGS)
541 AC_SUBST(READLINE_SRC)
543 # Minimal stuff for readline Makefile configuration
548 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr lstat lchown)
549 AC_CHECK_FUNCS(nanosleep nl_langinfo)
550 AC_CHECK_HEADERS(varargs.h)
552 # End of readline/conio stuff
553 # -----------------------------------------------------------------------
555 # -----------------------------------------------------------------------
556 # Check for Python support
558 AC_MSG_CHECKING(for Python support)
561 --with-python[=DIR] Include Python support. DIR is the Python base
562 install directory, default is to search through
563 a number of common places for the Python files.],
567 if test "$withval" != "no"; then
568 if test "$withval" = "yes"; then
569 for python_root in /usr /usr/local; do
570 if test -f $python_root/include/python2.2/Python.h; then
571 PYTHON_INCDIR=-I$python_root/include/python2.2
572 PYTHON_LIBS="-L$python_root/lib/python2.2/config -lpython2.2"
574 elif test -f $python_root/include/python2.3/Python.h; then
575 PYTHON_INCDIR=-I$python_root/include/python2.3
576 PYTHON_LIBS="-L$python_root/lib/python2.3/config -lpython2.3"
578 elif test -f $python_root/include/python2.4/Python.h; then
579 PYTHON_INCDIR=-I$python_root/include/python2.4
580 PYTHON_LIBS="-L$python_root/lib/python2.4/config -lpython2.4"
584 if test x$PYTHON_INCDIR = x; then
585 if test -f $prefix/include/Python.h; then
586 PYTHON_INCDIR=-I$prefix/include
587 PYTHON_LIBS="-L$prefix/lib/config -lpython"
590 AC_MSG_ERROR(Unable to find Python.h in standard locations)
594 if test -f $withval/Python.h; then
595 PYTHON_INCDIR=-I$withval
596 PYTHON_LIBS="-L$withval/config -lpython"
597 elif test -f $withval/include/Python.h; then
598 PYTHON_INCDIR=-I$withval/include
599 PYTHON_LIBS="-L$withval/lib/config -lpython"
600 elif test -f $withval/include/python/Python.h; then
601 PYTHON_INCDIR=-I$withval/include/python
602 PYTHON_LIBS="-L$withval/lib/python/config -lpython"
605 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
608 AC_DEFINE([HAVE_PYTHON], 1)
611 AC_MSG_NOTICE(checking for more Python libs)
612 saved_LIBS="$LIBS"; LIBS=
613 AC_SEARCH_LIBS(shm_open, [rt])
614 AC_CHECK_LIB(util, openpty)
615 PYTHON_LIBS="$PYTHON_LIBS $LIBS"
623 AC_SUBST(PYTHON_LIBS)
624 AC_SUBST(PYTHON_INCDIR)
628 # Find where sockets are (especially for Solaris)
629 # Do this before the TCP Wrappers test since tcp wrappers
630 # uses the socket library and some linkers are stupid.
632 AC_CHECK_FUNC(socket,
633 AC_MSG_RESULT(using libc's socket),
634 AC_CHECK_LIB(xnet,socket)
635 AC_CHECK_LIB(socket,socket)
636 AC_CHECK_LIB(inet,socket))
639 # -----------------------------------------------------------
640 # Check whether user wants TCP wrappers support (default off)
641 # -----------------------------------------------------------
643 AC_ARG_WITH(tcp-wrappers,
644 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
646 if test "x$withval" != "xno" ; then
648 LIBS="$saved_LIBS -lwrap"
649 AC_MSG_CHECKING(for libwrap)
652 int deny_severity = 0;
653 int allow_severity = 0;
654 struct request_info *req; ],
655 [ hosts_access(req); ],
658 AC_DEFINE(HAVE_LIBWRAP)
661 LIBS="$saved_LIBS -lwrap -lnsl"
664 int deny_severity = 0;
665 int allow_severity = 0;
666 struct request_info *req; ],
667 [ hosts_access(req); ],
670 AC_DEFINE(HAVE_LIBWRAP)
673 [AC_MSG_ERROR([*** libwrap missing]) ] ]
680 # -----------------------------------------------------------
681 # Check whether OpenSSL is available
682 # -----------------------------------------------------------
683 AC_MSG_CHECKING([for OpenSSL])
684 dnl The following uses quadrigraphs:
688 AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
689 [with_openssl_directory=${withval}])
691 if test "x$with_openssl_directory" != "x"; then
692 OPENSSL_LIBS="-lssl -lcrypto"
695 if test "x$with_openssl_directory" != "xyes" && test x"${with_openssl_directory}" != "x"; then
696 OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
697 OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
701 saved_CFLAGS="$CFLAGS"
702 LIBS="$saved_LIBS $OPENSSL_LIBS"
703 CFLAGS="$saved_CFLAGS $OPENSSL_INC"
705 AC_TRY_LINK([ #include <openssl/ssl.h> ],
706 [ CRYPTO_set_id_callback(NULL); ],
707 [ support_tls="yes" ],
712 CFLAGS="$saved_CFLAGS"
714 if test "$support_tls" = "yes"; then
715 AC_DEFINE(HAVE_OPENSSL, 1, [Define if OpenSSL library is available])
716 AC_DEFINE(HAVE_TLS, 1, [Define if TLS support should be enabled])
724 AC_MSG_RESULT([$support_tls])
725 AC_SUBST(OPENSSL_LIBS)
726 AC_SUBST(OPENSSL_INC)
729 # -----------------------------------------------------------
730 # Python and OpenSSL are using dlopen
731 # -----------------------------------------------------------
733 if test "$support_python" = "yes" -o "$support_tls" = "yes"; then
734 AC_SEARCH_LIBS(dlopen, [dl])
737 # ------------------------------------------
738 # Where to place working dir
739 # ------------------------------------------
740 working_dir=`eval echo ${prefix}/var/bacula/working`
741 AC_ARG_WITH(working-dir,
742 [ --with-working-dir=PATH specify path of Bacula working directory],
744 if test "x$withval" != "xno" ; then
750 AC_SUBST(working_dir)
753 # ------------------------------------------
754 # Where to place scriptdir (script files)
755 # ------------------------------------------
756 scriptdir=`eval echo ${sysconfdir}`
757 AC_ARG_WITH(scriptdir,
758 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
760 if test "x$withval" != "xno" ; then
769 # ------------------------------------------
770 # Where to send dump email
771 # ------------------------------------------
772 dump_email=root@localhost
773 AC_ARG_WITH(dump-email,
774 [ --with-dump-email=EMAIL dump email address],
776 if test "x$withval" != "xno" ; then
784 # ------------------------------------------
785 # Where to send job email
786 # ------------------------------------------
787 job_email=root@localhost
788 AC_ARG_WITH(job-email,
789 [ --with-job-email=EMAIL job output email address],
791 if test "x$withval" != "xno" ; then
799 # ------------------------------------------
800 # Where to find smtp host
801 # ------------------------------------------
803 AC_ARG_WITH(smtp_host,
804 [ --with-smtp-host=HOST SMTP mail host address],
806 if test "x$withval" != "xno" ; then
815 # ------------------------------------
816 # Where to place pid files
817 # ------------------------------------
820 [ --with-pid-dir=PATH specify location of Bacula pid files],
822 if test "x$withval" != "xno" ; then
828 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
832 # ------------------------------------
833 # Where to place subsys "lock file"
834 # ------------------------------------
835 subsysdir=/var/run/subsys
836 AC_ARG_WITH(subsys-dir,
837 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
839 if test "x$withval" != "xno" ; then
849 # ------------------------------------
850 # Where to start assigning ports
851 # ------------------------------------
853 AC_ARG_WITH(baseport,
854 [ --with-baseport=PORT specify base port address for daemons],
856 if test "x$withval" != "xno" ; then
863 dir_port=`expr $baseport`
864 fd_port=`expr $baseport + 1`
865 sd_port=`expr $fd_port + 1`
872 # ------------------------------------------
874 # ------------------------------------------
876 AC_ARG_WITH(dir-password,
877 [ --with-dir-password=PASSWORD specify Director's password],
879 if test "x$withval" != "xno" ; then
880 dir_password=$withval
885 if test "x$dir_password" = "x" ; then
886 if test "x$OPENSSL" = "xnone" ; then
887 key=`autoconf/randpass 33`
889 key=`openssl rand -base64 33`
895 AC_ARG_WITH(fd-password,
896 [ --with-fd-password=PASSWORD specify Client's password],
898 if test "x$withval" != "xno" ; then
904 if test "x$fd_password" = "x" ; then
905 if test "x$OPENSSL" = "xnone" ; then
906 key=`autoconf/randpass 37`
908 key=`openssl rand -base64 33`
914 AC_ARG_WITH(sd-password,
915 [ --with-sd-password=PASSWORD specify Storage daemon's password],
917 if test "x$withval" != "xno" ; then
923 if test "x$sd_password" = "x" ; then
924 if test "x$OPENSSL" = "xnone" ; then
925 key=`autoconf/randpass 41`
927 key=`openssl rand -base64 33`
933 AC_ARG_WITH(mon-dir-password,
934 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
936 if test "x$withval" != "xno" ; then
937 mon_dir_password=$withval
942 if test "x$mon_dir_password" = "x" ; then
943 if test "x$OPENSSL" = "xnone" ; then
944 key=`autoconf/randpass 33`
946 key=`openssl rand -base64 33`
948 mon_dir_password=$key
952 AC_ARG_WITH(mon-fd-password,
953 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
955 if test "x$withval" != "xno" ; then
956 mon_fd_password=$withval
961 if test "x$mon_fd_password" = "x" ; then
962 if test "x$OPENSSL" = "xnone" ; then
963 key=`autoconf/randpass 37`
965 key=`openssl rand -base64 33`
971 AC_ARG_WITH(mon-sd-password,
972 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
974 if test "x$withval" != "xno" ; then
975 mon_sd_password=$withval
980 if test "x$mon_sd_password" = "x" ; then
981 if test "x$OPENSSL" = "xnone" ; then
982 key=`autoconf/randpass 41`
984 key=`openssl rand -base64 33`
989 AC_SUBST(dir_password)
990 AC_SUBST(fd_password)
991 AC_SUBST(sd_password)
992 AC_SUBST(mon_dir_password)
993 AC_SUBST(mon_fd_password)
994 AC_SUBST(mon_sd_password)
998 # Handle users and groups for each daemon
1001 AC_ARG_WITH(dir_user,
1002 [ --with-dir-user=USER specify user for Director daemon],
1004 if test "x$withval" != "x" ; then
1011 AC_ARG_WITH(dir_group,
1012 [ --with-dir-group=GROUP specify group for Director daemon],
1014 if test "x$withval" != "x" ; then
1021 AC_ARG_WITH(sd_user,
1022 [ --with-sd-user=USER specify user for Storage daemon],
1024 if test "x$withval" != "x" ; then
1031 AC_ARG_WITH(sd_group,
1032 [ --with-sd-group=GROUP specify group for Storage daemon],
1034 if test "x$withval" != "x" ; then
1041 AC_ARG_WITH(fd_user,
1042 [ --with-fd-user=USER specify user for File daemon],
1044 if test "x$withval" != "x" ; then
1051 AC_ARG_WITH(fd_group,
1052 [ --with-fd-group=GROUP specify group for File daemon],
1054 if test "x$withval" != "x" ; then
1071 # allow setting default executable permissions
1074 AC_ARG_WITH(sbin-perm,
1075 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1077 if test "x$withval" != "x" ; then
1085 # ------------------------------------------------
1086 # Bacula check for various SQL database engines
1087 # ------------------------------------------------
1088 BA_CHECK_POSTGRESQL_DB
1099 AC_DEFINE(PROTOTYPES)
1101 dnl# --------------------------------------------------------------------------
1102 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1104 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1105 if test -z "$CCOPTS"; then
1106 CCOPTS='-g -O2 -Wall'
1115 dnl See if we can use 64 bit file addresses
1116 largefile_support="no"
1122 dnl# --------------------------------------------------------------------------
1123 dnl# CHECKING FOR HEADER FILES
1124 dnl# --------------------------------------------------------------------------
1160 AC_STRUCT_ST_BLKSIZE
1164 dnl# --------------------------------------------------------------------------
1165 dnl# Check for utime.h structure
1166 dnl# --------------------------------------------------------------------------
1167 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1169 #include <sys/types.h>
1170 #include <utime.h>], [struct utimbuf foo],
1171 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1172 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1174 dnl# --------------------------------------------------------------------------
1175 dnl# Check for socklen_t
1176 dnl# --------------------------------------------------------------------------
1177 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1179 #include <sys/types.h>
1180 #include <sys/socket.h>],
1182 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1183 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1185 dnl# --------------------------------------------------------------------------
1186 dnl# Check for bigendian
1187 dnl# --------------------------------------------------------------------------
1188 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1190 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1191 [ba_cv_bigendian=yes],
1192 [ba_cv_bigendian=no],
1193 [ba_cv_bigendian=no])])
1194 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1200 dnl# --------------------------------------------------------------------------
1201 dnl# CHECKING FOR FILESYSTEM TYPE
1202 dnl# --------------------------------------------------------------------------
1203 AC_MSG_CHECKING(how to get filesystem type)
1205 # The order of these tests is important.
1206 AC_TRY_CPP([#include <sys/statvfs.h>
1207 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1208 if test $fstype = no; then
1209 AC_TRY_CPP([#include <sys/statfs.h>
1210 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1212 if test $fstype = no; then
1213 AC_TRY_CPP([#include <sys/statfs.h>
1214 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1216 if test $fstype = no; then
1217 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1219 if test $fstype = no; then
1220 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1222 if test $fstype = no; then
1223 AC_TRY_CPP([#include <sys/mount.h>
1224 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1226 AC_MSG_RESULT($fstype)
1228 dnl# --------------------------------------------------------------------------
1229 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1230 dnl# --------------------------------------------------------------------------
1238 AC_CHECK_TYPE(ino_t, unsigned long)
1239 AC_CHECK_TYPE(dev_t, unsigned long)
1240 AC_CHECK_TYPE(daddr_t, long)
1241 AC_CHECK_TYPE(major_t, int)
1242 AC_CHECK_TYPE(minor_t, int)
1243 AC_CHECK_TYPE(ssize_t, int)
1250 AC_CHECK_SIZEOF(char, 1)
1251 AC_CHECK_SIZEOF(short int, 2)
1252 AC_CHECK_SIZEOF(int, 4)
1253 AC_CHECK_SIZEOF(long int, 4)
1254 AC_CHECK_SIZEOF(long long int, 8)
1255 AC_CHECK_SIZEOF(int *, 4)
1257 # Check for sys/types.h types
1258 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1260 [ #include <sys/types.h> ],
1262 [ ac_cv_have_u_int="yes" ],
1263 [ ac_cv_have_u_int="no" ]
1266 if test "x$ac_cv_have_u_int" = "xyes" ; then
1267 AC_DEFINE(HAVE_U_INT)
1271 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1273 [ #include <sys/types.h> ],
1274 [ intmax_t a; a = 1;],
1275 [ ac_cv_have_intmax_t="yes" ],
1278 [ #include <stdint.h> ],
1279 [ intmax_t a; a = 1;],
1280 [ ac_cv_have_intmax_t="yes" ],
1281 [ ac_cv_have_intmax_t="no" ]
1287 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1288 AC_DEFINE(HAVE_INTMAX_T)
1293 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1295 [ #include <sys/types.h> ],
1296 [ u_intmax_t a; a = 1;],
1297 [ ac_cv_have_u_intmax_t="yes" ],
1300 [ #include <stdint.h> ],
1301 [ u_intmax_t a; a = 1;],
1302 [ ac_cv_have_u_intmax_t="yes" ],
1303 [ ac_cv_have_u_intmax_t="no" ]
1308 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1309 AC_DEFINE(HAVE_U_INTMAX_T)
1314 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1316 [ #include <sys/types.h> ],
1317 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1318 [ ac_cv_have_intxx_t="yes" ],
1319 [ ac_cv_have_intxx_t="no" ]
1322 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1323 AC_DEFINE(HAVE_INTXX_T)
1327 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1329 [ #include <sys/types.h> ],
1330 [ int64_t a; a = 1;],
1331 [ ac_cv_have_int64_t="yes" ],
1332 [ ac_cv_have_int64_t="no" ]
1335 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1336 AC_DEFINE(HAVE_INT64_T)
1340 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1342 [ #include <sys/types.h> ],
1343 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1344 [ ac_cv_have_u_intxx_t="yes" ],
1345 [ ac_cv_have_u_intxx_t="no" ]
1348 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1349 AC_DEFINE(HAVE_U_INTXX_T)
1353 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1355 [ #include <sys/types.h> ],
1356 [ u_int64_t a; a = 1;],
1357 [ ac_cv_have_u_int64_t="yes" ],
1358 [ ac_cv_have_u_int64_t="no" ]
1361 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1362 AC_DEFINE(HAVE_U_INT64_T)
1366 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1367 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1369 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1371 [ #include <sys/bitypes.h> ],
1372 [ int8_t a; int16_t b; int32_t c;
1373 u_int8_t e; u_int16_t f; u_int32_t g;
1374 a = b = c = e = f = g = 1; ],
1375 [ AC_DEFINE(HAVE_U_INTXX_T)
1376 AC_DEFINE(HAVE_INTXX_T)
1377 AC_DEFINE(HAVE_SYS_BITYPES_H)
1378 AC_MSG_RESULT(yes) ],
1379 [ AC_MSG_RESULT(no)]
1383 if test -z "$have_u_intxx_t" ; then
1384 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1386 [ #include <sys/types.h> ],
1387 [ uint8_t a; uint16_t b;
1388 uint32_t c; a = b = c = 1; ],
1389 [ ac_cv_have_uintxx_t="yes" ],
1390 [ ac_cv_have_uintxx_t="no" ]
1393 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1394 AC_DEFINE(HAVE_UINTXX_T)
1398 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1399 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1401 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1403 [ #include <sys/bitypes.h> ],
1404 [ int64_t a; u_int64_t b;
1406 [ AC_DEFINE(HAVE_U_INT64_T)
1407 AC_DEFINE(HAVE_INT64_T)
1408 AC_MSG_RESULT(yes) ],
1409 [ AC_MSG_RESULT(no)]
1413 if (test -z "$have_uintxx_t" && \
1414 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1416 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1418 [ #include <sys/bitypes.h> ],
1419 [ uint8_t a; uint16_t b;
1420 uint32_t c; a = b = c = 1; ],
1421 [ AC_DEFINE(HAVE_UINTXX_T)
1422 AC_MSG_RESULT(yes) ],
1423 [ AC_MSG_RESULT(no)]
1431 dnl# --------------------------------------------------------------------------
1432 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1433 dnl# --------------------------------------------------------------------------
1449 [echo 'configure: cannot find needed function.'; exit 1]
1452 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1453 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1455 AC_CHECK_FUNCS(chflags)
1457 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1459 dnl# --------------------------------------------------------------------------
1460 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1461 dnl# --------------------------------------------------------------------------
1462 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1464 # If resolver functions are not in libc check for -lnsl or -lresolv.
1465 AC_CHECK_FUNC(gethostbyname_r,
1466 AC_MSG_RESULT(using libc's resolver),
1467 AC_CHECK_LIB(nsl,gethostbyname_r)
1468 AC_CHECK_LIB(resolv,gethostbyname_r))
1472 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1473 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1474 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1476 dnl ----------------------------
1477 dnl check sa_len of sockaddr
1478 dnl ----------------------------
1479 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1480 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1481 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1483 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1484 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1488 dnl Check for IPv6 support
1489 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1490 [AC_TRY_LINK([ #include <sys/types.h>
1491 #include <sys/socket.h>
1492 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1494 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1496 if test "$ac_cv_ipv6_support" = yes; then
1497 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1506 AC_FUNC_CLOSEDIR_VOID
1507 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1508 # AC_FUNC_FNMATCH dnl use local version
1511 dnl# FreeBSD needs to link libxpg4
1512 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1515 AC_CHECK_LIB(sun, getpwnam)
1517 AC_CHECK_HEADERS(zlib.h)
1518 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1520 if test x$FDLIBS = x-lz; then
1521 AC_DEFINE(HAVE_LIBZ)
1526 AC_CHECK_HEADER(sys/acl.h)
1527 AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
1528 [AC_CHECK_LIB(acl, acl_get_file, [have_acl=yes; FDLIBS="-lacl $FDLIBS"])]
1530 if test $have_acl = yes; then
1534 dnl Check for pthread libraries
1536 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1537 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1538 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1539 [AC_CHECK_FUNC(pthread_create)]
1549 LDFLAGS=${LDFLAGS--O}
1550 DB_LIBS="${SQL_LFLAGS}"
1552 CPPFLAGS="$CPPFLAGS"
1564 AC_SUBST(X_EXTRA_LIBS)
1568 dnl# extra configurable objects
1579 # Finally we set appropriate distribution specific
1580 # variables and defaults
1582 # PFILES are platform specific files
1583 PFILES="platforms/Makefile"
1587 hostname=`uname -n | cut -d '.' -f 1`
1591 PSCMD="ps -e -o pid,comm"
1593 platforms/aix/Makefile"
1594 TAPEDRIVE="/dev/rmt0.1"
1598 PTHREAD_LIB="-lpthread -lexc"
1599 if test "${CC}" = "gcc" ; then
1606 TAPEDRIVE="/dev/nrmt0"
1609 DISTVER=`uname -a |awk '{print $3}'`
1610 TAPEDRIVE="/dev/nrmt0"
1611 PTHREAD_LIB="-pthread"
1612 CFLAGS="${CFLAGS} -pthread"
1613 PSCMD="ps -ax -o pid,command"
1617 platforms/bsdi/Makefile \
1618 platforms/bsdi/bacula-fd \
1619 platforms/bsdi/bacula-sd \
1620 platforms/bsdi/bacula-dir"
1621 largefile_support="yes"
1624 DISTVER=`uname -a |awk '{print $3}'`
1625 TAPEDRIVE="/dev/nrst0"
1628 WLDFLAGS="-mwindows"
1632 TAPEDRIVE="/dev/nst0"
1633 PSCMD="ps -e -o pid,command"
1636 platforms/darwin/Makefile"
1639 DISTVER=`cat /etc/debian_version`
1640 TAPEDRIVE="/dev/nrst0"
1641 PSCMD="ps -e -o pid,command"
1644 DISTVER=`uname -a |awk '{print $3}'`
1645 VER=`echo $DISTVER | cut -c 1`
1646 if test x$VER = x4 ; then
1647 PTHREAD_LIB="-pthread"
1648 CFLAGS="${CFLAGS} -pthread"
1652 TAPEDRIVE="/dev/nrsa0"
1653 PSCMD="ps -ax -o pid,command"
1655 platforms/freebsd/Makefile \
1656 platforms/freebsd/bacula-fd \
1657 platforms/freebsd/bacula-sd \
1658 platforms/freebsd/bacula-dir"
1659 largefile_support="yes"
1662 PSCMD="UNIX95=1 ps -e -o pid,comm"
1663 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1665 TAPEDRIVE="/dev/rmt/0hnb"
1666 PTHREAD_LIB="-lpthread"
1667 AC_DEFINE([_INCLUDE_LONGLONG])
1671 TAPEDRIVE="/dev/rmt/0cbn"
1672 PSCMD="ps -e -o pid,comm"
1674 platforms/irix/Makefile \
1675 platforms/irix/bacula-fd \
1676 platforms/irix/bacula-sd \
1677 platforms/irix/bacula-dir"
1680 DISTVER=`uname -a |awk '{print $3}'`
1683 TAPEDRIVE="/dev/nrst0"
1684 PSCMD="ps -ax -o pid,command"
1685 PTHREAD_LIB="-pthread"
1686 CFLAGS="${CFLAGS} -pthread"
1689 DISTVER=`uname -a |awk '{print $3}'`
1692 TAPEDRIVE="/dev/nrst0"
1693 PSCMD="ps -ax -o pid,command"
1694 PTHREAD_LIB="-pthread"
1695 CFLAGS="${CFLAGS} -pthread"
1697 platforms/openbsd/Makefile \
1698 platforms/openbsd/bacula-fd \
1699 platforms/openbsd/bacula-sd \
1700 platforms/openbsd/bacula-dir"
1703 if test -f /etc/whitebox-release ; then
1704 f=/etc/whitebox-release
1706 f=/etc/redhat-release
1708 if test `cat $f | grep release |\
1709 cut -f 3 -d ' '`x = "Enterprise"x ; then
1710 DISTVER="Enterprise "`cat $f | grep release |\
1713 DISTVER=`cat /etc/redhat-release | grep release |\
1716 TAPEDRIVE="/dev/nst0"
1717 PSCMD="ps -e -o pid,command"
1719 platforms/redhat/Makefile \
1720 platforms/redhat/bacula-fd \
1721 platforms/redhat/bacula-sd \
1722 platforms/redhat/bacula-dir \
1723 platforms/redhat/bacula.spec \
1725 hostname=`hostname -s`
1728 DISTVER=`cat /etc/mandrake-release | grep release |\
1730 TAPEDRIVE="/dev/nst0"
1731 PSCMD="ps -e -o pid,command"
1733 platforms/mandrake/Makefile \
1734 platforms/mandrake/bacula-fd \
1735 platforms/mandrake/bacula-sd \
1736 platforms/mandrake/bacula-dir \
1737 platforms/mandrake/bacula.spec \
1741 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1742 TAPEDRIVE="/dev/nst0"
1743 PSCMD="ps -e -o pid,command"
1745 platforms/gentoo/Makefile \
1746 platforms/gentoo/bacula-init \
1747 platforms/gentoo/bacula-fd \
1748 platforms/gentoo/bacula-sd \
1749 platforms/gentoo/bacula-dir"
1752 DISTVER=`cat /etc/slackware-version`
1753 TAPEDRIVE="/dev/nst0"
1754 PSCMD="ps -e -o pid,command"
1756 platforms/slackware/Makefile \
1757 platforms/slackware/rc.bacula-fd \
1758 platforms/slackware/rc.bacula-sd \
1759 platforms/slackware/rc.bacula-dir\
1760 platforms/slackware/functions.bacula"
1764 TAPEDRIVE="/dev/rmt/0cbn"
1765 PSCMD="ps -e -o pid,comm"
1767 platforms/solaris/Makefile \
1768 platforms/solaris/bacula-fd \
1769 platforms/solaris/bacula-sd \
1770 platforms/solaris/bacula-dir"
1771 if test x$DISTVER = x5.6 ; then
1772 AC_DEFINE(HAVE_OLD_SOCKOPT)
1774 LIBS="$LIBS -lresolv"
1777 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1779 TAPEDRIVE="/dev/nst0"
1780 PSCMD="ps -e -o pid,command"
1782 platforms/suse/Makefile \
1783 platforms/suse/bacula-fd \
1784 platforms/suse/bacula-sd \
1785 platforms/suse/bacula-dir \
1786 platforms/suse/bacula \
1787 platforms/suse/bacula.spec"
1792 TAPEDRIVE="/dev/nst0"
1793 PSCMD="ps -e -o pid,command"
1795 platforms/suse/Makefile \
1796 platforms/suse/bacula-fd \
1797 platforms/suse/bacula-sd \
1798 platforms/suse/bacula-dir"
1802 TAPEDRIVE="/dev/nst0"
1805 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1811 LIBS="$PTHREAD_LIB $LIBS"
1813 AC_DEFINE_UNQUOTED(lld, "$lld")
1814 AC_DEFINE_UNQUOTED(llu, "$llu")
1822 dnl# common parts of the Makefile
1823 MCOMMON=./autoconf/Make.common
1824 AC_SUBST_FILE(MCOMMON)
1827 if test "x${subsysdir}" = "x${sbindir}" ; then
1830 echo "You have set both --sbindir and --with-subsys-dir"
1831 echo " equal to: ${subsysdir} "
1832 echo "This is not permitted. Please reconfigure."
1834 echo "Aborting configuration ..."
1840 AC_OUTPUT([autoconf/Make.common \
1842 scripts/startmysql \
1844 scripts/btraceback \
1850 scripts/devel_bacula \
1853 scripts/bacula.desktop.gnome1 \
1854 scripts/bacula.desktop.gnome2 \
1855 scripts/bacula.desktop.gnome1.consolehelper \
1856 scripts/bacula.desktop.gnome2.consolehelper \
1857 scripts/bacula.desktop.gnome1.xsu \
1858 scripts/bacula.desktop.gnome2.xsu \
1859 scripts/gnome-console.console_apps \
1860 scripts/mtx-changer \
1861 scripts/dvd-writepart \
1862 scripts/dvd-freespace \
1863 scripts/bacula-tray-monitor.desktop \
1864 scripts/logwatch/Makefile \
1865 scripts/logwatch/logfile.bacula.conf \
1868 src/console/Makefile \
1869 src/console/bconsole.conf \
1870 src/gnome2-console/Makefile \
1871 src/gnome2-console/gnome-console.conf \
1872 src/wx-console/Makefile \
1873 src/wx-console/wx-console.conf \
1874 src/tray-monitor/Makefile \
1875 src/tray-monitor/tray-monitor.conf \
1877 src/dird/bacula-dir.conf \
1879 src/stored/Makefile \
1880 src/stored/bacula-sd.conf \
1881 src/filed/Makefile \
1882 src/filed/bacula-fd.conf \
1883 src/filed/win32/Makefile \
1885 src/cats/make_catalog_backup \
1886 src/cats/delete_catalog_backup \
1887 src/cats/create_postgresql_database \
1888 src/cats/update_postgresql_tables \
1889 src/cats/make_postgresql_tables \
1890 src/cats/grant_postgresql_privileges \
1891 src/cats/drop_postgresql_tables \
1892 src/cats/drop_postgresql_database \
1893 src/cats/create_mysql_database \
1894 src/cats/update_mysql_tables \
1895 src/cats/make_mysql_tables \
1896 src/cats/grant_mysql_privileges \
1897 src/cats/drop_mysql_tables \
1898 src/cats/drop_mysql_database \
1899 src/cats/create_sqlite_database \
1900 src/cats/update_sqlite_tables \
1901 src/cats/make_sqlite_tables \
1902 src/cats/grant_sqlite_privileges \
1903 src/cats/drop_sqlite_tables \
1904 src/cats/drop_sqlite_database \
1905 src/cats/create_sqlite3_database \
1906 src/cats/update_sqlite3_tables \
1907 src/cats/make_sqlite3_tables \
1908 src/cats/grant_sqlite3_privileges \
1909 src/cats/drop_sqlite3_tables \
1910 src/cats/drop_sqlite3_database \
1913 src/cats/create_bdb_database \
1914 src/cats/update_bdb_tables \
1915 src/cats/make_bdb_tables \
1916 src/cats/grant_bdb_privileges \
1917 src/cats/drop_bdb_tables \
1918 src/cats/drop_bdb_database \
1919 src/cats/create_bacula_database \
1920 src/cats/update_bacula_tables \
1921 src/cats/grant_bacula_privileges \
1922 src/cats/make_bacula_tables \
1923 src/cats/drop_bacula_tables \
1924 src/cats/drop_bacula_database \
1925 src/findlib/Makefile \
1926 src/tools/Makefile \
1927 src/win32/winbacula.nsi \
1928 src/win32/baculafd/bacula-fd.conf \
1929 src/win32/Makefile \
1930 src/win32/console/bconsole.conf \
1931 src/win32/wx-console/wx-console.conf \
1932 src/win32/pebuilder/Makefile \
1935 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
1939 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1940 chmod 755 dvd-writepart dvd-freespace
1941 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
1946 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
1947 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
1949 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
1950 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
1952 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
1953 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
1955 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
1956 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
1958 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
1959 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
1961 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
1965 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
1966 largefile_support="yes"
1970 # A whole lot of hand springs to get the compiler version.
1971 # This is because gcc changed the output in version 3.0
1973 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1974 if test "x${CCVERSION}" = "x" ; then
1975 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1977 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1978 if test x"${CXXVERSION}" = x ; then
1979 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1982 if test "x${subsysdir}" = "x${sbindir}" ; then
1985 echo "You have set --sbindir and --with-subsys-dir"
1986 echo " both equal to: ${subsysdir} "
1987 echo " This is not permitted. Please reconfigure."
1989 echo "Aborting configuration ..."
1995 if test "x${db_name}" = "xInternal" ; then
1998 echo "You have not specified either --enable-client-only or one of the"
1999 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
2000 echo " This is not permitted. Please reconfigure."
2002 echo "Aborting the configuration ..."
2009 Configuration on `date`:
2011 Host: $host -- ${DISTNAME} ${DISTVER}
2012 Bacula version: ${VERSION} (${DATE})
2013 Source code location: ${srcdir}
2014 Install binaries: ${sbindir}
2015 Install config files: ${sysconfdir}
2016 Scripts directory: ${scriptdir}
2017 Working directory: ${working_dir}
2018 PID directory: ${piddir}
2019 Subsys directory: ${subsysdir}
2020 Man directory: ${mandir}
2021 Data directory: ${datadir}
2022 C Compiler: ${CC} ${CCVERSION}
2023 C++ Compiler: ${CXX} ${CXXVERSION}
2024 Compiler flags: ${WCFLAGS} ${CFLAGS}
2025 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2027 Statically Linked Tools: ${support_static_tools}
2028 Statically Linked FD: ${support_static_fd}
2029 Statically Linked SD: ${support_static_sd}
2030 Statically Linked DIR: ${support_static_dir}
2031 Statically Linked CONS: ${support_static_cons}
2032 Database type: ${db_name}
2033 Database lib: ${DB_LIBS}
2035 Job Output Email: ${job_email}
2036 Traceback Email: ${dump_email}
2037 SMTP Host Address: ${smtp_host}
2039 Director Port: ${dir_port}
2040 File daemon Port: ${fd_port}
2041 Storage daemon Port: ${sd_port}
2043 Director User: ${dir_user}
2044 Director Group: ${dir_group}
2045 Storage Daemon User: ${sd_user}
2046 Storage DaemonGroup: ${sd_group}
2047 File Daemon User: ${fd_user}
2048 File Daemon Group: ${fd_group}
2050 SQL binaries Directory ${SQL_BINDIR}
2052 Large file support: $largefile_support
2053 Bacula conio support: ${got_conio} ${CONS_LIBS}
2054 readline support: ${got_readline} ${PRTREADLINE_SRC}
2055 TCP Wrappers support: ${TCPW_MSG}
2056 TLS support: ${support_tls}
2057 ZLIB support: ${have_zlib}
2058 enable-smartalloc: ${support_smartalloc}
2059 enable-gnome: ${support_gnome} ${gnome_version}
2060 enable-wx-console: ${support_wx_console} ${wx_version}
2061 enable-tray-monitor: ${support_tray_monitor}
2062 client-only: ${build_client_only}
2063 ACL support: ${have_acl}
2064 Python support: ${support_python} ${PYTHON_LIBS}