3 dnl# Process this file with autoconf to produce a configure script.
11 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
12 AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
14 dnl require a recent autoconf
18 dnl search for true and false programs.
19 AC_PATH_PROGS(TRUEPRG, true, :)
20 AC_PATH_PROGS(FALSEPRG, false, :)
25 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
26 DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
27 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
31 echo "configuring for bacula $VERSION ($DATE)"
34 dnl -------------------------------------------------------
35 dnl# Check for compiler.
36 dnl ------------------------------------------------------
40 AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
41 AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
48 dnl -------------------------------------------------------
49 dnl# Check for programs.
50 dnl ------------------------------------------------------
53 AC_PATH_PROG(MV, mv, mv)
54 AC_PATH_PROG(RM, rm, rm)
55 AC_PATH_PROG(CP, cp, cp)
56 AC_PATH_PROG(SED, sed, sed)
57 AC_PATH_PROG(AWK, awk, awk)
58 AC_PATH_PROG(ECHO, echo, echo)
59 AC_PATH_PROG(CMP, cmp, cmp)
60 AC_PATH_PROG(TBL, tbl, tbl)
61 AC_PATH_PROG(AR, ar, ar)
62 dnl AC_PATH_PROG(RANLIB, ranlib, ranlib)
63 AC_PATH_PROG(OPENSSL, openssl, none)
64 AC_PATH_PROG(MTX, mtx, mtx)
65 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
66 AC_PATH_PROG(WXCONFIG, wx-config, wx-config)
67 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
68 AC_PATH_PROG(PIDOF, pidof, pidof)
70 test -n "$ARFLAG" || ARFLAGS="cr"
77 AC_SUBST(LOCAL_CFLAGS)
78 AC_SUBST(LOCAL_LDFLAGS)
83 dnl --------------------------------------------------
84 dnl Bacula OP Sys determination (see aclocal.m4)
85 dnl --------------------------------------------------
88 # -----------------------------------------------------------
89 dnl Bacula OPSys Distribution determination (see aclocal.m4)
90 # ----------------------------------------------------------
91 BA_CHECK_OPSYS_DISTNAME
93 # -----------------------------------------------------------
94 dnl Check for gnome stuff for gnome-console
95 # ----------------------------------------------------------
96 AM_ACLOCAL_INCLUDE(gnome-macros)
98 # ------------------------------------------------------------------
99 # If the user has not set --prefix, we set our default to nothing.
100 # In this case, if the user has not set --sysconfdir, we set it
101 # to the package default of /etc/bacula. If either --prefix or
102 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
103 # ------------------------------------------------------------------
104 if test x${prefix} = xNONE ; then
105 if test `eval echo ${sysconfdir}` = NONE/etc ; then
106 sysconfdir=/etc/bacula
110 sysconfdir=`eval echo ${sysconfdir}`
112 # -------------------------------------------------------------------------
113 # If the user has not set --exec-prefix, we default to ${prefix}
114 # -------------------------------------------------------------------------
115 if test x${exec_prefix} = xNONE ; then
116 exec_prefix=${prefix}
119 # ------------------------------------------------------------------
120 # If the user has not set --sbindir, we set our default as /sbin
121 # ------------------------------------------------------------------
122 if test x$sbindir = x'${exec_prefix}/sbin' ; then
123 sbindir=${exec_prefix}/sbin
125 sbindir=`eval echo ${sbindir}`
127 # ------------------------------------------------------------------
128 # All list of languages for which a translation exist. Each
129 # language is separated by a space.
130 # ------------------------------------------------------------------
133 AC_PATH_PROGS(MSGFMT, msgfmt, no)
134 if test "$MSGFMT" = "no"
136 echo 'msgfmt program not found, disabling NLS !'
138 USE_INCLUDED_LIBINTL=no
146 support_postgresql=no
147 support_smartalloc=yes
151 support_wx_console=no
153 support_static_tools=no
156 support_static_dir=no
157 support_static_cons=no
164 dnl# --------------------------------------------------------------------------
165 dnl# CHECKING COMMAND LINE OPTIONS
166 dnl# --------------------------------------------------------------------------
168 # -------------------------------------------
169 # gnome (default off)
170 # -------------------------------------------
172 [ --enable-gnome enable build of gnome-console GUI [disabled]],
173 [if test x$enableval = xyes; then
178 if test x$support_gnome = xyes; then
179 abc=`$PKGCONFIG --exists libgnomeui-2.0`
181 if test $pkg = 0; then
182 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
183 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
184 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
185 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
186 AC_SUBST(GNOME_INCLUDEDIR)
187 AC_SUBST(GNOMEUI_LIBS)
188 AC_SUBST(GNOME_LIBDIR)
190 GNOME_DIR=src/gnome2-console
191 gnome_version="Version 2.x"
195 GNOME_DIR=src/gnome-console
196 gnome_version="Version 1.4"
202 # -------------------------------------------
203 # wx-console (default off)
204 # -------------------------------------------
205 AC_ARG_ENABLE(wx-console,
206 [ --enable-wx-console enable build of wxWidgets console [disabled]],
207 [if test x$enableval = xyes; then
208 support_wx_console=yes
212 if test x$support_wx_console = xyes; then
213 abc=`$WXCONFIG --cppflags`
215 if test $pkg = 0; then
216 WXCONS_CPPFLAGS=`$WXCONFIG --cppflags`
217 WXCONS_LDFLAGS=`$WXCONFIG --libs`
218 AC_SUBST(WXCONS_CPPFLAGS)
219 AC_SUBST(WXCONS_LDFLAGS)
220 WX_DIR=src/wx-console
223 echo "wx-config program not found. wx-console disabled."
225 support_wx_console=no
231 # -------------------------------------------
232 # tray-monitor (default off)
233 # -------------------------------------------
234 AC_ARG_ENABLE(tray-monitor,
235 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
236 [if test x$enableval = xyes; then
237 support_tray_monitor=yes
241 if test x$support_tray_monitor = xyes; then
242 abc=`$PKGCONFIG --exists gtk+-2.0`
244 if test $pkg = 0; then
245 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
246 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
247 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
248 AC_SUBST(TRAY_MONITOR_LDFLAGS)
249 TRAY_MONITOR_DIR=src/tray-monitor
250 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
252 if test $pkg = 0; then
253 AC_DEFINE(HAVE_GTK_2_4)
257 AC_SUBST(TRAY_MONITOR_DIR)
259 # -------------------------------------------
260 # smartalloc (default off)
261 # -------------------------------------------
262 AC_ARG_ENABLE(smartalloc,
263 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
264 [if test x$enableval = xno; then
265 support_smartalloc=no
268 if test x$support_smartalloc = xyes; then
269 AC_DEFINE(SMARTALLOC)
272 # -------------------------------------------
273 # static-tools (default off)
274 # -------------------------------------------
275 AC_ARG_ENABLE(static-tools,
276 [ --enable-static-tools enable static tape tools [disabled]],
277 [if test x$enableval = xyes; then
278 support_static_tools=yes
282 if test x$support_static_tools = xyes; then
283 TTOOL_LDFLAGS="-static"
285 AC_SUBST(TTOOL_LDFLAGS)
287 # -------------------------------------------
288 # static-fd (default off)
289 # -------------------------------------------
290 AC_ARG_ENABLE(static-fd,
291 [ --enable-static-fd enable static File daemon [disabled]],
292 [if test x$enableval = xyes; then
293 support_static_fd=yes
297 if test x$support_static_fd = xyes; then
298 STATIC_FD="static-bacula-fd"
302 # -------------------------------------------
303 # static-sd (default off)
304 # -------------------------------------------
305 AC_ARG_ENABLE(static-sd,
306 [ --enable-static-sd enable static Storage daemon [disabled]],
307 [if test x$enableval = xyes; then
308 support_static_sd=yes
312 if test x$support_static_sd = xyes; then
313 STATIC_SD="static-bacula-sd"
317 # -------------------------------------------
318 # static-dir (default off)
319 # -------------------------------------------
320 AC_ARG_ENABLE(static-dir,
321 [ --enable-static-dir enable static Director [disabled]],
322 [if test x$enableval = xyes; then
323 support_static_dir=yes
327 if test x$support_static_dir = xyes; then
328 STATIC_DIR="static-bacula-dir"
332 # -------------------------------------------
333 # static-cons (default off)
334 # -------------------------------------------
335 AC_ARG_ENABLE(static-cons,
336 [ --enable-static-cons enable static Console [disabled]],
337 [if test x$enableval = xyes; then
338 support_static_cons=yes
344 if test x$support_static_cons = xyes; then
345 STATIC_CONS="static-bconsole"
346 STATIC_GNOME_CONS="static-gnome-console"
347 STATIC_WX_CONS="static-wx-console"
349 AC_SUBST(STATIC_CONS)
350 AC_SUBST(STATIC_GNOME_CONS)
351 AC_SUBST(STATIC_WX_CONS)
353 # -------------------------------------------
354 # client_only (default off)
355 # -------------------------------------------
356 AC_ARG_ENABLE(client-only,
357 [ --enable-client-only build client (File daemon) only [disabled]],
358 [if test x$enableval = xyes; then
359 build_client_only=yes
363 if test x$build_client_only = xno; then
370 # ---------------------------------------------------
371 # Check for conio (Bacula readline substitute)(
372 # ---------------------------------------------------
373 # this allows you to turn it completely off
375 [ --disable-conio disable conio support [enabled]
377 [if test x$enableval = xno; then
382 if test x$support_conio = xyes; then
383 AC_CHECK_HEADER(termcap.h,
384 [ AC_CHECK_LIB(termcap, tgetent,
385 [ CONS_LIBS="-ltermcap"
390 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
392 [ AC_CHECK_LIB(ncurses, tgetent,
393 [ CONS_LIBS="-lncurses"
398 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
403 AC_CHECK_HEADERS(curses.h)
404 AC_CHECK_HEADER(term.h,
405 [ AC_CHECK_LIB(curses, tgetent,
406 [ CONS_LIBS="-lcurses"
411 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
414 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
423 # ---------------------------------------------------
424 # Check for readline support/directory (default off)
425 # ---------------------------------------------------
426 # this allows you to turn it completely off
427 AC_ARG_ENABLE(readline,
428 [ --disable-readline disable readline support [disable]
430 [if test x$enableval = xno; then
436 if test x$support_readline = xyes; then
437 AC_ARG_WITH(readline,
438 [ --with-readline=DIR specify readline library directory],
440 case "$with_readline" in
443 if test "$with_readline" != "yes"; then
444 CONS_INC="-I${with_readline}"
445 CONS_LDFLAGS="-L$with_readline"
447 with_readline="/usr/include/readline"
449 AC_CHECK_HEADER(${with_readline}/readline.h,
450 [ AC_DEFINE(HAVE_READLINE)
451 CONS_LIBS="-lreadline -ltermcap"
455 echo "readline.h not found. readline turned off ..."
462 # check for standard readline library
463 AC_CHECK_HEADER(/usr/include/readline/readline.h,
464 [ AC_DEFINE(HAVE_READLINE)
466 CONS_INC="-I/usr/include/readline"
467 CONS_LIBS="-lreadline -ltermcap"
469 # Did not find standard library, so try Bacula's default
470 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
471 [ AC_DEFINE(HAVE_READLINE)
473 CONS_INC="-I${TOP_DIR}/depkgs/readline"
474 CONS_LIBS="-lreadline -lhistory -ltermcap"
475 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
476 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
479 echo "readline.h not found. readline turned off ..."
495 AC_SUBST(CONS_LDFLAGS)
496 AC_SUBST(READLINE_SRC)
498 # Minimal stuff for readline Makefile configuration
503 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
504 AC_CHECK_FUNCS(nanosleep nl_langinfo)
505 AC_CHECK_HEADERS(varargs.h)
507 # End of readline/conio stuff
508 # -----------------------------------------------------------------------
510 # -----------------------------------------------------------------------
511 # Check for Python support
513 AC_MSG_CHECKING(for Python support)
516 --with-python[=DIR] Include Python support. DIR is the Python base
517 install directory, default is to search through
518 a number of common places for the Python files.],
522 if test "$withval" != "no"; then
523 if test "$withval" = "yes"; then
524 if test -f /usr/include/python2.2/Python.h; then
525 PYTHON_INCDIR=-I/usr/include/python2.2
526 PYTHON_LIBS="-L/usr/lib/python2.2/config -lpython2.2 -lutil -ldl"
527 elif test -f /usr/include/python2.3/Python.h; then
528 PYTHON_INCDIR=-I/usr/include/python2.3
529 PYTHON_LIBS="-L/usr/lib/python2.3/config -lpython2.3 -lutil -ldl"
530 elif test -f /usr/include/python2.4/Python.h; then
531 PYTHON_INCDIR=-I/usr/include/python2.4
532 PYTHON_LIBS="-L/usr/lib/python2.4/config -lpython2.4 -lutil -ldl"
533 elif test -f $prefix/include/Python.h; then
534 PYTHON_INCDIR=-I$prefix/include
535 PYTHON_LIBS="-L$prefix/lib/config -lpython -lutil -ldl"
538 AC_MSG_ERROR(Unable to find Python.h in standard locations)
541 if test -f $withval/Python.h; then
542 PYTHON_INCDIR=-I$withval
543 PYTHON_LIBS="-L$withval/config -lpython -lutil -ldl"
544 elif test -f $withval/include/Python.h; then
545 PYTHON_INCDIR=-I$withval/include
546 PYTHON_LIBS="-L$withval/lib/config -lpython -lutil -ldl"
549 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
552 AC_DEFINE([HAVE_PYTHON], 1)
562 AC_SUBST(PYTHON_LIBS)
563 AC_SUBST(PYTHON_INCDIR)
566 # -------------------------------------------
567 # check for cdrecord writer location
568 # get scsibus,target,lun
569 # -------------------------------------------
571 if test ! x$CDRECORD = x ; then
572 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD-RW | ${AWK} '{print $1}'`
573 if test x${CDSTL} = x ; then
574 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD+RW | ${AWK} '{print $1}'`
576 if test x${CDSTL} = x ; then
583 # ---------------------------------------------------
584 # Check for GMP support/directory
585 # ---------------------------------------------------
589 # [ --with-gmp[=DIR] Specify gmp library directory],
591 # case "$with_gmp" in
594 # if test "$with_gmp" != "yes"; then
595 # GMP_INC="-I$with_gmp"
597 # GMP_LDFLAGS="-L$with_gmp"
599 # with_gmp="/usr/include"
601 # AC_CHECK_HEADER($with_gmp/gmp.h,
602 # [ AC_MSG_RESULT(yes)
603 # AC_DEFINE(HAVE_GMP)
607 # [ AC_MSG_ERROR([*** gmp library missing])
613 # # check for standard gmp library
614 # AC_CHECK_HEADER(/usr/include/gmp.h,
615 # [ AC_MSG_RESULT(yes)
616 # AC_DEFINE(HAVE_GMP)
621 # # Did not find standard library, so use our own
623 # AC_DEFINE(HAVE_GMP)
626 # GMP_INC="-I${TOP_DIR}/depkgs/gmp"
628 # GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
629 # GMP_SRC="${TOP_DIR}/depkgs/gmp"
635 #AC_SUBST(GMP_LDFLAGS)
639 # -----------------------------------------------------------------------
642 # ---------------------------------------------------
643 # Check for CWEB support/directory
644 # ---------------------------------------------------
649 # [ --with-cweb[=DIR] Specify cweb library directory],
651 # case "$with_cweb" in
654 # if test "$with_cweb" != "yes"; then
655 # CWEB_INC="-I$with_cweb"
657 # CWEB_LDFLAGS="-L$with_cweb"
659 # with_cweb="/usr/include"
661 # AC_CHECK_HEADER($with_cweb/cweb.h,
662 # [ AC_MSG_RESULT(yes)
663 # AC_DEFINE(HAVE_CWEB)
667 # [ AC_MSG_ERROR([*** cweb library missing])
673 # # check for standard cweb library
674 # AC_CHECK_HEADER(/usr/include/cweb.h,
675 # [ AC_MSG_RESULT(yes)
676 # AC_DEFINE(HAVE_CWEB)
681 # # Did not find starndard library, so use our own
683 # AC_DEFINE(HAVE_CWEB)
686 # CWEB=${TOP_DIR}/depkgs/cweb
687 # CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
689 # CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
690 # CWEB_SRC="${TOP_DIR}/depkgs/cweb"
697 #AC_SUBST(CWEB_LDFLAGS)
701 # -----------------------------------------------------------------------
704 # Find where sockets are (especially for Solaris)
705 # Do this before the TCP Wrappers test since tcp wrappers
706 # uses the socket library and some linkers are stupid.
708 AC_CHECK_FUNC(socket,
709 AC_MSG_RESULT(using libc's socket),
710 AC_CHECK_LIB(xnet,socket)
711 AC_CHECK_LIB(socket,socket)
712 AC_CHECK_LIB(inet,socket))
715 # -----------------------------------------------------------
716 # Check whether user wants TCP wrappers support (default off)
717 # -----------------------------------------------------------
719 AC_ARG_WITH(tcp-wrappers,
720 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
722 if test "x$withval" != "xno" ; then
724 LIBS="$saved_LIBS -lwrap"
725 AC_MSG_CHECKING(for libwrap)
728 int deny_severity = 0;
729 int allow_severity = 0;
730 struct request_info *req; ],
731 [ hosts_access(req); ],
734 AC_DEFINE(HAVE_LIBWRAP)
737 LIBS="$saved_LIBS -lwrap -lnsl"
740 int deny_severity = 0;
741 int allow_severity = 0;
742 struct request_info *req; ],
743 [ hosts_access(req); ],
746 AC_DEFINE(HAVE_LIBWRAP)
749 [AC_MSG_ERROR([*** libwrap missing]) ] ]
756 # ------------------------------------------
757 # Where to place working dir
758 # ------------------------------------------
759 working_dir=`eval echo ${prefix}/var/bacula/working`
760 AC_ARG_WITH(working-dir,
761 [ --with-working-dir=PATH specify path of Bacula working directory],
763 if test "x$withval" != "xno" ; then
769 AC_SUBST(working_dir)
772 # ------------------------------------------
773 # Where to place scriptdir (script files)
774 # ------------------------------------------
775 scriptdir=`eval echo ${sysconfdir}`
776 AC_ARG_WITH(scriptdir,
777 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
779 if test "x$withval" != "xno" ; then
788 # ------------------------------------------
789 # Where to send dump email
790 # ------------------------------------------
791 dump_email=root@localhost
792 AC_ARG_WITH(dump-email,
793 [ --with-dump-email=EMAIL dump email address],
795 if test "x$withval" != "xno" ; then
803 # ------------------------------------------
804 # Where to send job email
805 # ------------------------------------------
806 job_email=root@localhost
807 AC_ARG_WITH(job-email,
808 [ --with-job-email=EMAIL job output email address],
810 if test "x$withval" != "xno" ; then
818 # ------------------------------------------
819 # Where to find smtp host
820 # ------------------------------------------
822 AC_ARG_WITH(smtp_host,
823 [ --with-smtp-host=HOST SMTP mail host address],
825 if test "x$withval" != "xno" ; then
834 # ------------------------------------
835 # Where to place pid files
836 # ------------------------------------
839 [ --with-pid-dir=PATH specify location of Bacula pid files],
841 if test "x$withval" != "xno" ; then
847 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
851 # ------------------------------------
852 # Where to place subsys "lock file"
853 # ------------------------------------
854 subsysdir=/var/run/subsys
855 AC_ARG_WITH(subsys-dir,
856 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
858 if test "x$withval" != "xno" ; then
868 # ------------------------------------
869 # Where to start assigning ports
870 # ------------------------------------
872 AC_ARG_WITH(baseport,
873 [ --with-baseport=PORT specify base port address for daemons],
875 if test "x$withval" != "xno" ; then
882 dir_port=`expr $baseport`
883 fd_port=`expr $baseport + 1`
884 sd_port=`expr $fd_port + 1`
891 # ------------------------------------------
893 # ------------------------------------------
895 AC_ARG_WITH(dir-password,
896 [ --with-dir-password=PASSWORD specify Director's password],
898 if test "x$withval" != "xno" ; then
899 dir_password=$withval
904 if test "x$dir_password" = "x" ; then
905 if test "x$OPENSSL" = "xnone" ; then
906 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
907 key=`autoconf/randpass 33`
909 key=`openssl rand -base64 33`
915 AC_ARG_WITH(fd-password,
916 [ --with-fd-password=PASSWORD specify Client's password],
918 if test "x$withval" != "xno" ; then
924 if test "x$fd_password" = "x" ; then
925 if test "x$OPENSSL" = "xnone" ; then
926 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
927 key=`autoconf/randpass 37`
929 key=`openssl rand -base64 33`
935 AC_ARG_WITH(sd-password,
936 [ --with-sd-password=PASSWORD specify Storage daemon's password],
938 if test "x$withval" != "xno" ; then
944 if test "x$sd_password" = "x" ; then
945 if test "x$OPENSSL" = "xnone" ; then
946 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
947 key=`autoconf/randpass 41`
949 key=`openssl rand -base64 33`
955 AC_ARG_WITH(mon-dir-password,
956 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
958 if test "x$withval" != "xno" ; then
959 mon_dir_password=$withval
964 if test "x$mon_dir_password" = "x" ; then
965 if test "x$OPENSSL" = "xnone" ; then
966 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
967 key=`autoconf/randpass 33`
969 key=`openssl rand -base64 33`
971 mon_dir_password=$key
975 AC_ARG_WITH(mon-fd-password,
976 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
978 if test "x$withval" != "xno" ; then
979 mon_fd_password=$withval
984 if test "x$mon_fd_password" = "x" ; then
985 if test "x$OPENSSL" = "xnone" ; then
986 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
987 key=`autoconf/randpass 37`
989 key=`openssl rand -base64 33`
995 AC_ARG_WITH(mon-sd-password,
996 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
998 if test "x$withval" != "xno" ; then
999 mon_sd_password=$withval
1004 if test "x$mon_sd_password" = "x" ; then
1005 if test "x$OPENSSL" = "xnone" ; then
1006 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
1007 key=`autoconf/randpass 41`
1009 key=`openssl rand -base64 33`
1011 mon_sd_password=$key
1014 AC_SUBST(dir_password)
1015 AC_SUBST(fd_password)
1016 AC_SUBST(sd_password)
1017 AC_SUBST(mon_dir_password)
1018 AC_SUBST(mon_fd_password)
1019 AC_SUBST(mon_sd_password)
1021 # -------------------------------------------------------------------------
1022 # Set variables for bimagemgr installation
1023 # -------------------------------------------------------------------------
1024 bimagemgr_cgidir=/var/www/cgi-bin
1025 AC_ARG_WITH(bimagemgr-cgidir,
1026 [ --with-bimagemgr-cgidir=DIR specify bimagemgr cgi-bin dir],
1028 if test "x$withval" != "xno" ; then
1029 bimagemgr_cgidir=$withval
1034 bimagemgr_docdir=/var/www/html
1035 AC_ARG_WITH(bimagemgr-docdir,
1036 [ --with-bimagemgr-docdir=DIR specify bimagemgr doc root dir],
1038 if test "x$withval" != "xno" ; then
1039 bimagemgr_docdir=$withval
1044 bimagemgr_binowner=root
1045 AC_ARG_WITH(bimagemgr-binowner,
1046 [ --with-bimagemgr-binowner=USER specify bimagemgr binary file owner],
1048 if test "x$withval" != "xno" ; then
1049 bimagemgr_binowner=$withval
1054 bimagemgr_bingroup=root
1055 AC_ARG_WITH(bimagemgr-bingroup,
1056 [ --with-bimagemgr-bingroup=USER specify bimagemgr binary file group],
1058 if test "x$withval" != "xno" ; then
1059 bimagemgr_bingroup=$withval
1064 bimagemgr_dataowner=apache
1065 AC_ARG_WITH(bimagemgr-dataowner,
1066 [ --with-bimagemgr-dataowner=USER specify bimagemgr data file owner],
1068 if test "x$withval" != "xno" ; then
1069 bimagemgr_dataowner=$withval
1074 bimagemgr_datagroup=apache
1075 AC_ARG_WITH(bimagemgr-datagroup,
1076 [ --with-bimagemgr-datagroup=USER specify bimagemgr data file group],
1078 if test "x$withval" != "xno" ; then
1079 bimagemgr_datagroup=$withval
1084 AC_SUBST(bimagemgr_cgidir)
1085 AC_SUBST(bimagemgr_docdir)
1086 AC_SUBST(bimagemgr_binowner)
1087 AC_SUBST(bimagemgr_bingroup)
1088 AC_SUBST(bimagemgr_dataowner)
1089 AC_SUBST(bimagemgr_datagroup)
1092 # Handle users and groups for each daemon
1095 AC_ARG_WITH(dir_user,
1096 [ --with-dir-user=USER specify user for Director daemon],
1098 if test "x$withval" != "x" ; then
1105 AC_ARG_WITH(dir_group,
1106 [ --with-dir-group=GROUP specify group for Director daemon],
1108 if test "x$withval" != "x" ; then
1115 AC_ARG_WITH(sd_user,
1116 [ --with-sd-user=USER specify user for Storage daemon],
1118 if test "x$withval" != "x" ; then
1125 AC_ARG_WITH(sd_group,
1126 [ --with-sd-group=GROUP specify group for Storage daemon],
1128 if test "x$withval" != "x" ; then
1135 AC_ARG_WITH(fd_user,
1136 [ --with-fd-user=USER specify user for File daemon],
1138 if test "x$withval" != "x" ; then
1145 AC_ARG_WITH(fd_group,
1146 [ --with-fd-group=GROUP specify group for File daemon],
1148 if test "x$withval" != "x" ; then
1165 # allow setting default executable permissions
1168 AC_ARG_WITH(sbin-perm,
1169 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1171 if test "x$withval" != "x" ; then
1179 # ------------------------------------------------
1180 # Bacula check for various SQL database engines
1181 # ------------------------------------------------
1182 BA_CHECK_POSTGRESQL_DB
1191 AC_DEFINE(PROTOTYPES)
1193 dnl# --------------------------------------------------------------------------
1194 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1196 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1197 if test -z "$CCOPTS"; then
1198 CCOPTS='-g -O2 -Wall'
1207 dnl See if we can use 64 bit file addresses
1208 largefile_support="no"
1214 dnl# --------------------------------------------------------------------------
1215 dnl# CHECKING FOR HEADER FILES
1216 dnl# --------------------------------------------------------------------------
1252 AC_STRUCT_ST_BLKSIZE
1256 dnl# --------------------------------------------------------------------------
1257 dnl# Check for utime.h structure
1258 dnl# --------------------------------------------------------------------------
1259 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1261 #include <sys/types.h>
1262 #include <utime.h>], [struct utimbuf foo],
1263 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1264 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1266 dnl# --------------------------------------------------------------------------
1267 dnl# Check for socklen_t
1268 dnl# --------------------------------------------------------------------------
1269 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1271 #include <sys/types.h>
1272 #include <sys/socket.h>],
1274 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1275 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1277 dnl# --------------------------------------------------------------------------
1278 dnl# Check for bigendian
1279 dnl# --------------------------------------------------------------------------
1280 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1282 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1283 [ba_cv_bigendian=yes],
1284 [ba_cv_bigendian=no],
1285 [ba_cv_bigendian=no])])
1286 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1292 dnl# --------------------------------------------------------------------------
1293 dnl# CHECKING FOR FILESYSTEM TYPE
1294 dnl# --------------------------------------------------------------------------
1295 AC_MSG_CHECKING(how to get filesystem type)
1297 # The order of these tests is important.
1298 AC_TRY_CPP([#include <sys/statvfs.h>
1299 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1300 if test $fstype = no; then
1301 AC_TRY_CPP([#include <sys/statfs.h>
1302 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1304 if test $fstype = no; then
1305 AC_TRY_CPP([#include <sys/statfs.h>
1306 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1308 if test $fstype = no; then
1309 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1311 if test $fstype = no; then
1312 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1314 if test $fstype = no; then
1315 AC_TRY_CPP([#include <sys/mount.h>
1316 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1318 AC_MSG_RESULT($fstype)
1320 dnl# --------------------------------------------------------------------------
1321 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1322 dnl# --------------------------------------------------------------------------
1330 AC_CHECK_TYPE(ino_t, unsigned long)
1331 AC_CHECK_TYPE(dev_t, unsigned long)
1332 AC_CHECK_TYPE(daddr_t, long)
1333 AC_CHECK_TYPE(major_t, int)
1334 AC_CHECK_TYPE(minor_t, int)
1335 AC_CHECK_TYPE(ssize_t, int)
1342 AC_CHECK_SIZEOF(char, 1)
1343 AC_CHECK_SIZEOF(short int, 2)
1344 AC_CHECK_SIZEOF(int, 4)
1345 AC_CHECK_SIZEOF(long int, 4)
1346 AC_CHECK_SIZEOF(long long int, 8)
1347 AC_CHECK_SIZEOF(int *, 4)
1349 # Check for sys/types.h types
1350 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1352 [ #include <sys/types.h> ],
1354 [ ac_cv_have_u_int="yes" ],
1355 [ ac_cv_have_u_int="no" ]
1358 if test "x$ac_cv_have_u_int" = "xyes" ; then
1359 AC_DEFINE(HAVE_U_INT)
1363 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1365 [ #include <sys/types.h> ],
1366 [ intmax_t a; a = 1;],
1367 [ ac_cv_have_intmax_t="yes" ],
1370 [ #include <stdint.h> ],
1371 [ intmax_t a; a = 1;],
1372 [ ac_cv_have_intmax_t="yes" ],
1373 [ ac_cv_have_intmax_t="no" ]
1379 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1380 AC_DEFINE(HAVE_INTMAX_T)
1385 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1387 [ #include <sys/types.h> ],
1388 [ u_intmax_t a; a = 1;],
1389 [ ac_cv_have_u_intmax_t="yes" ],
1392 [ #include <stdint.h> ],
1393 [ u_intmax_t a; a = 1;],
1394 [ ac_cv_have_u_intmax_t="yes" ],
1395 [ ac_cv_have_u_intmax_t="no" ]
1400 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1401 AC_DEFINE(HAVE_U_INTMAX_T)
1406 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1408 [ #include <sys/types.h> ],
1409 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1410 [ ac_cv_have_intxx_t="yes" ],
1411 [ ac_cv_have_intxx_t="no" ]
1414 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1415 AC_DEFINE(HAVE_INTXX_T)
1419 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1421 [ #include <sys/types.h> ],
1422 [ int64_t a; a = 1;],
1423 [ ac_cv_have_int64_t="yes" ],
1424 [ ac_cv_have_int64_t="no" ]
1427 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1428 AC_DEFINE(HAVE_INT64_T)
1432 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1434 [ #include <sys/types.h> ],
1435 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1436 [ ac_cv_have_u_intxx_t="yes" ],
1437 [ ac_cv_have_u_intxx_t="no" ]
1440 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1441 AC_DEFINE(HAVE_U_INTXX_T)
1445 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1447 [ #include <sys/types.h> ],
1448 [ u_int64_t a; a = 1;],
1449 [ ac_cv_have_u_int64_t="yes" ],
1450 [ ac_cv_have_u_int64_t="no" ]
1453 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1454 AC_DEFINE(HAVE_U_INT64_T)
1458 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1459 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1461 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1463 [ #include <sys/bitypes.h> ],
1464 [ int8_t a; int16_t b; int32_t c;
1465 u_int8_t e; u_int16_t f; u_int32_t g;
1466 a = b = c = e = f = g = 1; ],
1467 [ AC_DEFINE(HAVE_U_INTXX_T)
1468 AC_DEFINE(HAVE_INTXX_T)
1469 AC_DEFINE(HAVE_SYS_BITYPES_H)
1470 AC_MSG_RESULT(yes) ],
1471 [ AC_MSG_RESULT(no)]
1475 if test -z "$have_u_intxx_t" ; then
1476 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1478 [ #include <sys/types.h> ],
1479 [ uint8_t a; uint16_t b;
1480 uint32_t c; a = b = c = 1; ],
1481 [ ac_cv_have_uintxx_t="yes" ],
1482 [ ac_cv_have_uintxx_t="no" ]
1485 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1486 AC_DEFINE(HAVE_UINTXX_T)
1490 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1491 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1493 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1495 [ #include <sys/bitypes.h> ],
1496 [ int64_t a; u_int64_t b;
1498 [ AC_DEFINE(HAVE_U_INT64_T)
1499 AC_DEFINE(HAVE_INT64_T)
1500 AC_MSG_RESULT(yes) ],
1501 [ AC_MSG_RESULT(no)]
1505 if (test -z "$have_uintxx_t" && \
1506 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1508 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1510 [ #include <sys/bitypes.h> ],
1511 [ uint8_t a; uint16_t b;
1512 uint32_t c; a = b = c = 1; ],
1513 [ AC_DEFINE(HAVE_UINTXX_T)
1514 AC_MSG_RESULT(yes) ],
1515 [ AC_MSG_RESULT(no)]
1523 dnl# --------------------------------------------------------------------------
1524 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1525 dnl# --------------------------------------------------------------------------
1541 [echo 'configure: cannot find needed function.'; exit 1]
1544 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1545 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1547 AC_CHECK_FUNCS(chflags)
1549 AC_CHECK_FUNCS(snprintf vsnprintf gethostid getdomainname)
1551 dnl# --------------------------------------------------------------------------
1552 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1553 dnl# --------------------------------------------------------------------------
1554 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1556 # If resolver functions are not in libc check for -lnsl or -lresolv.
1557 AC_CHECK_FUNC(gethostbyname_r,
1558 AC_MSG_RESULT(using libc's resolver),
1559 AC_CHECK_LIB(nsl,gethostbyname_r)
1560 AC_CHECK_LIB(resolv,gethostbyname_r))
1564 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1565 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1566 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1568 dnl ----------------------------
1569 dnl check sa_len of sockaddr
1570 dnl ----------------------------
1571 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1572 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1573 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1575 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1576 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1580 dnl Check for IPv6 support
1581 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1582 [AC_TRY_LINK([ #include <sys/types.h>
1583 #include <sys/socket.h>
1584 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1586 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1588 if test "$ac_cv_ipv6_support" = yes; then
1589 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1598 AC_FUNC_CLOSEDIR_VOID
1599 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1600 # AC_FUNC_FNMATCH dnl use local version
1603 dnl# FreeBSD needs to link libxpg4
1604 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1607 AC_CHECK_LIB(sun, getpwnam)
1609 AC_CHECK_HEADERS(zlib.h)
1610 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1612 if test x$FDLIBS = x-lz; then
1613 AC_DEFINE(HAVE_LIBZ)
1617 AC_CHECK_HEADER(sys/acl.h)
1618 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1620 if test $ac_cv_lib_acl_acl_get_file = yes; then
1625 dnl Check for pthread libraries
1627 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1628 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1629 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1630 [AC_CHECK_FUNC(pthread_create)]
1640 LDFLAGS=${LDFLAGS--O}
1641 DB_LIBS="${SQL_LFLAGS}"
1643 CPPFLAGS="$CPPFLAGS"
1654 AC_SUBST(X_EXTRA_LIBS)
1658 dnl# extra configurable objects
1669 # Finally we set appropriate distribution specific
1670 # variables and defaults
1672 # PFILES are platform specific files
1673 PFILES="platforms/Makefile"
1677 hostname=`uname -n | cut -d '.' -f 1`
1681 PSCMD="ps -e -o pid,comm"
1683 platforms/aix/Makefile"
1684 TAPEDRIVE="/dev/rmt0.1"
1688 PTHREAD_LIB="-lpthread -lexc"
1689 if test "${CC}" = "gcc" ; then
1696 TAPEDRIVE="/dev/nrmt0"
1699 DISTVER=`uname -a |awk '{print $3}'`
1700 TAPEDRIVE="/dev/nrmt0"
1701 PTHREAD_LIB="-pthread"
1702 CFLAGS="${CFLAGS} -pthread"
1703 PSCMD="ps -x -o pid,command"
1707 platforms/bsdi/Makefile \
1708 platforms/bsdi/bacula-fd \
1709 platforms/bsdi/bacula-sd \
1710 platforms/bsdi/bacula-dir"
1711 largefile_support="yes"
1714 DISTVER=`uname -a |awk '{print $3}'`
1715 TAPEDRIVE="/dev/nrst0"
1718 WLDFLAGS="-mwindows"
1722 TAPEDRIVE="/dev/nst0"
1723 PSCMD="ps -e -o pid,command"
1726 platforms/darwin/Makefile"
1729 DISTVER=`cat /etc/debian_version`
1730 TAPEDRIVE="/dev/nrst0"
1731 PSCMD="ps -e -o pid,command"
1734 DISTVER=`uname -a |awk '{print $3}'`
1735 VER=`echo $DISTVER | cut -c 1`
1736 if test x$VER = x4 ; then
1737 PTHREAD_LIB="-pthread"
1738 CFLAGS="${CFLAGS} -pthread"
1742 TAPEDRIVE="/dev/nrsa0"
1743 PSCMD="ps -x -o pid,command"
1745 platforms/freebsd/Makefile \
1746 platforms/freebsd/bacula-fd \
1747 platforms/freebsd/bacula-sd \
1748 platforms/freebsd/bacula-dir"
1749 largefile_support="yes"
1752 PSCMD="UNIX95=1 ps -e -o pid,comm"
1753 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1755 TAPEDRIVE="/dev/rmt/0hnb"
1759 TAPEDRIVE="/dev/rmt/0cbn"
1760 PSCMD="ps -e -o pid,comm"
1762 platforms/irix/Makefile \
1763 platforms/irix/bacula-fd \
1764 platforms/irix/bacula-sd \
1765 platforms/irix/bacula-dir"
1768 DISTVER=`uname -a |awk '{print $3}'`
1771 TAPEDRIVE="/dev/nrst0"
1772 PSCMD="ps -a -o pid,command"
1773 PTHREAD_LIB="-pthread"
1774 CFLAGS="${CFLAGS} -pthread"
1777 DISTVER=`uname -a |awk '{print $3}'`
1780 TAPEDRIVE="/dev/nrst0"
1781 PSCMD="ps -ax -o pid,command"
1782 PTHREAD_LIB="-pthread"
1783 CFLAGS="${CFLAGS} -pthread"
1785 platforms/openbsd/Makefile \
1786 platforms/openbsd/bacula-fd \
1787 platforms/openbsd/bacula-sd \
1788 platforms/openbsd/bacula-dir"
1791 if test -f /etc/whitebox-release ; then
1792 f=/etc/whitebox-release
1794 f=/etc/redhat-release
1796 if test `cat $f | grep release |\
1797 cut -f 3 -d ' '`x = "Enterprise"x ; then
1798 DISTVER="Enterprise "`cat $f | grep release |\
1801 DISTVER=`cat /etc/redhat-release | grep release |\
1804 TAPEDRIVE="/dev/nst0"
1805 PSCMD="ps -e -o pid,command"
1807 platforms/redhat/Makefile \
1808 platforms/redhat/bacula-fd \
1809 platforms/redhat/bacula-sd \
1810 platforms/redhat/bacula-dir \
1811 platforms/redhat/bacula.spec \
1813 hostname=`hostname -s`
1816 DISTVER=`cat /etc/mandrake-release | grep release |\
1818 TAPEDRIVE="/dev/nst0"
1819 PSCMD="ps -e -o pid,command"
1821 platforms/mandrake/Makefile \
1822 platforms/mandrake/bacula-fd \
1823 platforms/mandrake/bacula-sd \
1824 platforms/mandrake/bacula-dir \
1825 platforms/mandrake/bacula.spec \
1829 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1830 TAPEDRIVE="/dev/nst0"
1831 PSCMD="ps -e -o pid,command"
1833 platforms/gentoo/Makefile \
1834 platforms/gentoo/bacula-init \
1835 platforms/gentoo/bacula-fd \
1836 platforms/gentoo/bacula-sd \
1837 platforms/gentoo/bacula-dir"
1840 DISTVER=`cat /etc/slackware-version`
1841 TAPEDRIVE="/dev/nst0"
1842 PSCMD="ps -e -o pid,command"
1844 platforms/slackware/Makefile \
1845 platforms/slackware/rc.bacula-fd \
1846 platforms/slackware/rc.bacula-sd \
1847 platforms/slackware/rc.bacula-dir\
1848 platforms/slackware/functions.bacula"
1852 TAPEDRIVE="/dev/rmt/0cbn"
1853 PSCMD="ps -e -o pid,comm"
1855 platforms/solaris/Makefile \
1856 platforms/solaris/bacula-fd \
1857 platforms/solaris/bacula-sd \
1858 platforms/solaris/bacula-dir"
1859 if test x$DISTVER = x5.6 ; then
1860 AC_DEFINE(HAVE_OLD_SOCKOPT)
1864 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1866 TAPEDRIVE="/dev/nst0"
1867 PSCMD="ps -e -o pid,command"
1869 platforms/suse/Makefile \
1870 platforms/suse/bacula-fd \
1871 platforms/suse/bacula-sd \
1872 platforms/suse/bacula-dir \
1873 platforms/suse/bacula \
1874 platforms/suse/bacula.spec"
1879 TAPEDRIVE="/dev/nst0"
1880 PSCMD="ps -e -o pid,command"
1882 platforms/suse/Makefile \
1883 platforms/suse/bacula-fd \
1884 platforms/suse/bacula-sd \
1885 platforms/suse/bacula-dir"
1889 TAPEDRIVE="/dev/nst0"
1892 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1898 LIBS="$PTHREAD_LIB $LIBS"
1900 AC_DEFINE_UNQUOTED(lld, "$lld")
1901 AC_DEFINE_UNQUOTED(llu, "$llu")
1909 dnl# common parts of the Makefile
1910 MCOMMON=./autoconf/Make.common
1911 AC_SUBST_FILE(MCOMMON)
1914 if test "x${subsysdir}" = "x${sbindir}" ; then
1917 echo "You have set both --sbindir and --with-subsys-dir"
1918 echo " equal to: ${subsysdir} "
1919 echo "This is not permitted. Please reconfigure."
1921 echo "Aborting configuration ..."
1927 AC_OUTPUT([autoconf/Make.common \
1930 rescue/linux/Makefile \
1931 rescue/linux/floppy/Makefile \
1932 rescue/linux/cdrom/Makefile \
1933 rescue/linux/cdrom/bacula/Makefile \
1934 rescue/freebsd/Makefile \
1935 rescue/solaris/Makefile \
1936 scripts/startmysql \
1938 scripts/btraceback \
1944 scripts/devel_bacula \
1947 scripts/bacula.desktop.gnome1 \
1948 scripts/bacula.desktop.gnome2 \
1949 scripts/bacula.desktop.gnome1.consolehelper \
1950 scripts/bacula.desktop.gnome2.consolehelper \
1951 scripts/bacula.desktop.gnome1.xsu \
1952 scripts/bacula.desktop.gnome2.xsu \
1953 scripts/gnome-console.console_apps \
1954 scripts/mtx-changer \
1955 scripts/bacula-tray-monitor.desktop \
1959 src/console/Makefile \
1960 src/console/bconsole.conf \
1961 src/gnome-console/Makefile \
1962 src/gnome-console/gnome-console.conf \
1963 src/gnome2-console/Makefile \
1964 src/gnome2-console/gnome-console.conf \
1965 src/wx-console/Makefile \
1966 src/wx-console/wx-console.conf \
1967 src/tray-monitor/Makefile \
1968 src/tray-monitor/tray-monitor.conf \
1970 src/dird/bacula-dir.conf \
1972 src/stored/Makefile \
1973 src/stored/bacula-sd.conf \
1974 src/filed/Makefile \
1975 src/filed/bacula-fd.conf \
1976 src/filed/win32/Makefile \
1978 src/cats/make_catalog_backup \
1979 src/cats/delete_catalog_backup \
1980 src/cats/create_postgresql_database \
1981 src/cats/update_postgresql_tables \
1982 src/cats/make_postgresql_tables \
1983 src/cats/grant_postgresql_privileges \
1984 src/cats/drop_postgresql_tables \
1985 src/cats/drop_postgresql_database \
1986 src/cats/create_mysql_database \
1987 src/cats/update_mysql_tables \
1988 src/cats/make_mysql_tables \
1989 src/cats/grant_mysql_privileges \
1990 src/cats/drop_mysql_tables \
1991 src/cats/drop_mysql_database \
1992 src/cats/create_sqlite_database \
1993 src/cats/update_sqlite_tables \
1994 src/cats/make_sqlite_tables \
1995 src/cats/grant_sqlite_privileges \
1996 src/cats/drop_sqlite_tables \
1997 src/cats/drop_sqlite_database \
2000 src/cats/create_bdb_database \
2001 src/cats/update_bdb_tables \
2002 src/cats/make_bdb_tables \
2003 src/cats/grant_bdb_privileges \
2004 src/cats/drop_bdb_tables \
2005 src/cats/drop_bdb_database \
2006 src/cats/create_bacula_database \
2007 src/cats/update_bacula_tables \
2008 src/cats/grant_bacula_privileges \
2009 src/cats/make_bacula_tables \
2010 src/cats/drop_bacula_tables \
2011 src/cats/drop_bacula_database \
2012 src/findlib/Makefile \
2013 src/tools/Makefile \
2014 src/win32/winbacula.nsi \
2015 src/win32/baculafd/bacula-fd.conf \
2016 src/win32/Makefile \
2017 src/win32/console/bconsole.conf \
2018 src/win32/wx-console/wx-console.conf \
2019 src/win32/pebuilder/Makefile \
2020 src/bimagemgr/Makefile \
2021 src/bimagemgr/bacula-bimagemgr.spec \
2023 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
2027 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2028 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2033 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2034 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2036 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2037 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2039 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2040 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2042 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2043 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2045 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2046 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2048 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2052 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2053 largefile_support="yes"
2057 # A whole lot of hand springs to get the compiler version.
2058 # This is because gcc changed the output in version 3.0
2060 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2061 if test "x${CCVERSION}" = "x" ; then
2062 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2064 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2065 if test x"${CXXVERSION}" = x ; then
2066 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2069 if test "x${subsysdir}" = "x${sbindir}" ; then
2072 echo "You have set --sbindir and --with-subsys-dir"
2073 echo " both equal to: ${subsysdir} "
2074 echo " This is not permitted. Please reconfigure."
2076 echo "Aborting configuration ..."
2082 if test "x${db_name}" = "xInternal" ; then
2085 echo "You have not specified either --enable-client-only or one of the"
2086 echo " supported databases: MySQL, PostgreSQL, or SQLite".
2087 echo " This is not permitted. Please reconfigure."
2089 echo "Aborting the configuration ..."
2096 Configuration on `date`:
2098 Host: $host -- ${DISTNAME} ${DISTVER}
2099 Bacula version: ${VERSION} (${DATE})
2100 Source code location: ${srcdir}
2101 Install binaries: ${sbindir}
2102 Install config files: ${sysconfdir}
2103 Scripts directory: ${scriptdir}
2104 Working directory: ${working_dir}
2105 PID directory: ${piddir}
2106 Subsys directory: ${subsysdir}
2107 C Compiler: ${CC} ${CCVERSION}
2108 C++ Compiler: ${CXX} ${CXXVERSION}
2109 Compiler flags: ${WCFLAGS} ${CFLAGS}
2110 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2112 Statically Linked Tools: ${support_static_tools}
2113 Statically Linked FD: ${support_static_fd}
2114 Statically Linked SD: ${support_static_sd}
2115 Statically Linked DIR: ${support_static_dir}
2116 Statically Linked CONS: ${support_static_cons}
2117 Database type: ${db_name}
2118 Database lib: ${DB_LIBS}
2120 Job Output Email: ${job_email}
2121 Traceback Email: ${dump_email}
2122 SMTP Host Address: ${smtp_host}
2124 Director Port: ${dir_port}
2125 File daemon Port: ${fd_port}
2126 Storage daemon Port: ${sd_port}
2128 Director User: ${dir_user}
2129 Director Group: ${dir_group}
2130 Storage Daemon User: ${sd_user}
2131 Storage DaemonGroup: ${sd_group}
2132 File Daemon User: ${fd_user}
2133 File Daemon Group: ${fd_group}
2135 SQL binaries Directory ${SQL_BINDIR}
2137 Large file support: $largefile_support
2138 Bacula conio support: ${got_conio} ${CONS_LIBS}
2139 readline support: ${got_readline} ${PRTREADLINE_SRC}
2140 TCP Wrappers support: ${TCPW_MSG}
2141 ZLIB support: ${have_zlib}
2142 enable-smartalloc: ${support_smartalloc}
2143 enable-gnome: ${support_gnome} ${gnome_version}
2144 enable-wx-console: ${support_wx_console}
2145 enable-tray-monitor: ${support_tray_monitor}
2146 client-only: ${build_client_only}
2147 ACL support: ${have_acl}
2148 Python support: ${support_python} ${PYTHON_LIBS}
2155 # cweb support: ${got_cweb} ${CWEB_SRC}
2156 # gmp support: ${got_gmp} ${GMP_SRC}