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(ECHO, echo, echo)
58 AC_PATH_PROG(CMP, cmp, cmp)
59 AC_PATH_PROG(TBL, tbl, tbl)
60 AC_PATH_PROG(AR, ar, ar)
61 dnl AC_PATH_PROG(RANLIB, ranlib, ranlib)
62 AC_PATH_PROG(OPENSSL, openssl, none)
63 AC_PATH_PROG(MTX, mtx, mtx)
64 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
65 AC_PATH_PROG(PYTHON, python, python)
66 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
67 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
68 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
69 AC_PATH_PROG(WXCONFIG, wx-config, wx-config)
70 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
71 AC_PATH_PROG(PIDOF, pidof, pidof)
73 # Some AWK programs fail, so test it and warn the user
74 if echo xfoo | $AWK 'BEGIN { prog=ARGV[1]; ARGC=1 }
75 { if ((prog == $2) || (("(" prog ")") == $2) ||
76 (("[" prog "]") == $2) ||
77 ((prog ":") == $2)) { print $1 ; exit 0 } }' xfoo>/dev/null; then :;
79 AC_MSG_ERROR([!!!!!!!!! WARNING !!!!!!!!!!!!!!
80 The regex engine of $AWK is too broken to be used you
81 might want to install GNU AWK.
82 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!])
85 AC_PATH_PROG(AWK, $THE_AWK, $THE_AWK)
87 test -n "$ARFLAG" || ARFLAGS="cr"
94 AC_SUBST(LOCAL_CFLAGS)
95 AC_SUBST(LOCAL_LDFLAGS)
100 dnl --------------------------------------------------
101 dnl Bacula OP Sys determination (see aclocal.m4)
102 dnl --------------------------------------------------
105 # -----------------------------------------------------------
106 dnl Bacula OPSys Distribution determination (see aclocal.m4)
107 # ----------------------------------------------------------
108 BA_CHECK_OPSYS_DISTNAME
110 # -----------------------------------------------------------
111 dnl Check for gnome stuff for gnome-console
112 # ----------------------------------------------------------
113 AM_ACLOCAL_INCLUDE(gnome-macros)
115 # ------------------------------------------------------------------
116 # If the user has not set --prefix, we set our default to nothing.
117 # In this case, if the user has not set --sysconfdir, we set it
118 # to the package default of /etc/bacula. If either --prefix or
119 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
120 # ------------------------------------------------------------------
121 if test x${prefix} = xNONE ; then
122 if test `eval echo ${sysconfdir}` = NONE/etc ; then
123 sysconfdir=/etc/bacula
127 sysconfdir=`eval echo ${sysconfdir}`
129 # -------------------------------------------------------------------------
130 # If the user has not set --exec-prefix, we default to ${prefix}
131 # -------------------------------------------------------------------------
132 if test x${exec_prefix} = xNONE ; then
133 exec_prefix=${prefix}
136 # ------------------------------------------------------------------
137 # If the user has not set --sbindir, we set our default as /sbin
138 # ------------------------------------------------------------------
139 if test x$sbindir = x'${exec_prefix}/sbin' ; then
140 sbindir=${exec_prefix}/sbin
142 sbindir=`eval echo ${sbindir}`
144 # ------------------------------------------------------------------
145 # All list of languages for which a translation exist. Each
146 # language is separated by a space.
147 # ------------------------------------------------------------------
150 AC_PATH_PROGS(MSGFMT, msgfmt, no)
151 if test "$MSGFMT" = "no"
153 echo 'msgfmt program not found, disabling NLS !'
155 USE_INCLUDED_LIBINTL=no
164 support_postgresql=no
165 support_smartalloc=yes
169 support_wx_console=no
171 support_static_tools=no
174 support_static_dir=no
175 support_static_cons=no
182 dnl# --------------------------------------------------------------------------
183 dnl# CHECKING COMMAND LINE OPTIONS
184 dnl# --------------------------------------------------------------------------
186 # -------------------------------------------
187 # gnome (default off)
188 # -------------------------------------------
190 [ --enable-gnome enable build of gnome-console GUI [disabled]],
191 [if test x$enableval = xyes; then
196 if test x$support_gnome = xyes; then
197 abc=`$PKGCONFIG --exists libgnomeui-2.0`
199 if test $pkg = 0; then
200 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
201 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
202 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
203 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
204 AC_SUBST(GNOME_INCLUDEDIR)
205 AC_SUBST(GNOMEUI_LIBS)
206 AC_SUBST(GNOME_LIBDIR)
208 GNOME_DIR=src/gnome2-console
209 gnome_version="Version 2.x"
213 GNOME_DIR=src/gnome-console
214 gnome_version="Version 1.4"
220 # -------------------------------------------
221 # wx-console (default off)
222 # -------------------------------------------
223 AC_ARG_ENABLE(wx-console,
224 [ --enable-wx-console enable build of wxWidgets console [disabled]],
225 [if test x$enableval = xyes; then
226 support_wx_console=yes
230 if test x$support_wx_console = xyes; then
231 abc=`$WXCONFIG --cppflags`
233 if test $pkg = 0; then
234 WXCONS_CPPFLAGS=`$WXCONFIG --cppflags`
235 WXCONS_LDFLAGS=`$WXCONFIG --libs`
236 AC_SUBST(WXCONS_CPPFLAGS)
237 AC_SUBST(WXCONS_LDFLAGS)
238 WX_DIR=src/wx-console
241 echo "wx-config program not found. wx-console disabled."
243 support_wx_console=no
249 # -------------------------------------------
250 # tray-monitor (default off)
251 # -------------------------------------------
252 AC_ARG_ENABLE(tray-monitor,
253 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
254 [if test x$enableval = xyes; then
255 support_tray_monitor=yes
259 if test x$support_tray_monitor = xyes; then
260 abc=`$PKGCONFIG --exists gtk+-2.0`
262 if test $pkg = 0; then
263 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
264 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
265 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
266 AC_SUBST(TRAY_MONITOR_LDFLAGS)
267 TRAY_MONITOR_DIR=src/tray-monitor
268 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
270 if test $pkg = 0; then
271 AC_DEFINE(HAVE_GTK_2_4)
275 AC_SUBST(TRAY_MONITOR_DIR)
277 # -------------------------------------------
278 # smartalloc (default off)
279 # -------------------------------------------
280 AC_ARG_ENABLE(smartalloc,
281 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
282 [if test x$enableval = xno; then
283 support_smartalloc=no
286 if test x$support_smartalloc = xyes; then
287 AC_DEFINE(SMARTALLOC)
290 # -------------------------------------------
291 # static-tools (default off)
292 # -------------------------------------------
293 AC_ARG_ENABLE(static-tools,
294 [ --enable-static-tools enable static tape tools [disabled]],
295 [if test x$enableval = xyes; then
296 support_static_tools=yes
300 if test x$support_static_tools = xyes; then
301 TTOOL_LDFLAGS="-static"
303 AC_SUBST(TTOOL_LDFLAGS)
305 # -------------------------------------------
306 # static-fd (default off)
307 # -------------------------------------------
308 AC_ARG_ENABLE(static-fd,
309 [ --enable-static-fd enable static File daemon [disabled]],
310 [if test x$enableval = xyes; then
311 support_static_fd=yes
315 if test x$support_static_fd = xyes; then
316 STATIC_FD="static-bacula-fd"
320 # -------------------------------------------
321 # static-sd (default off)
322 # -------------------------------------------
323 AC_ARG_ENABLE(static-sd,
324 [ --enable-static-sd enable static Storage daemon [disabled]],
325 [if test x$enableval = xyes; then
326 support_static_sd=yes
330 if test x$support_static_sd = xyes; then
331 STATIC_SD="static-bacula-sd"
335 # -------------------------------------------
336 # static-dir (default off)
337 # -------------------------------------------
338 AC_ARG_ENABLE(static-dir,
339 [ --enable-static-dir enable static Director [disabled]],
340 [if test x$enableval = xyes; then
341 support_static_dir=yes
345 if test x$support_static_dir = xyes; then
346 STATIC_DIR="static-bacula-dir"
350 # -------------------------------------------
351 # static-cons (default off)
352 # -------------------------------------------
353 AC_ARG_ENABLE(static-cons,
354 [ --enable-static-cons enable static Console [disabled]],
355 [if test x$enableval = xyes; then
356 support_static_cons=yes
362 if test x$support_static_cons = xyes; then
363 STATIC_CONS="static-bconsole"
364 STATIC_GNOME_CONS="static-gnome-console"
365 STATIC_WX_CONS="static-wx-console"
367 AC_SUBST(STATIC_CONS)
368 AC_SUBST(STATIC_GNOME_CONS)
369 AC_SUBST(STATIC_WX_CONS)
371 # -------------------------------------------
372 # client_only (default off)
373 # -------------------------------------------
374 AC_ARG_ENABLE(client-only,
375 [ --enable-client-only build client (File daemon) only [disabled]],
376 [if test x$enableval = xyes; then
377 build_client_only=yes
381 if test x$build_client_only = xno; then
388 # ---------------------------------------------------
389 # Check for conio (Bacula readline substitute)(
390 # ---------------------------------------------------
391 # this allows you to turn it completely off
393 [ --disable-conio disable conio support [enabled]
395 [if test x$enableval = xno; then
400 if test x$support_conio = xyes; then
401 AC_CHECK_HEADER(termcap.h,
402 [ AC_CHECK_LIB(termcap, tgetent,
403 [ CONS_LIBS="-ltermcap"
408 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
410 [ AC_CHECK_LIB(ncurses, tgetent,
411 [ CONS_LIBS="-lncurses"
416 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
421 AC_CHECK_HEADERS(curses.h)
422 AC_CHECK_HEADER(term.h,
423 [ AC_CHECK_LIB(curses, tgetent,
424 [ CONS_LIBS="-lcurses"
429 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
432 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
441 # ---------------------------------------------------
442 # Check for readline support/directory (default off)
443 # ---------------------------------------------------
444 # this allows you to turn it completely off
445 AC_ARG_ENABLE(readline,
446 [ --disable-readline disable readline support [disable]
448 [if test x$enableval = xno; then
454 if test x$support_readline = xyes; then
455 AC_ARG_WITH(readline,
456 [ --with-readline=DIR specify readline library directory],
458 case "$with_readline" in
461 if test "$with_readline" != "yes"; then
462 CONS_INC="-I${with_readline}"
463 CONS_LDFLAGS="-L$with_readline"
465 with_readline="/usr/include/readline"
467 AC_CHECK_HEADER(${with_readline}/readline.h,
468 [ AC_DEFINE(HAVE_READLINE)
469 CONS_LIBS="-lreadline -ltermcap"
473 echo "readline.h not found. readline turned off ..."
480 # check for standard readline library
481 AC_CHECK_HEADER(/usr/include/readline/readline.h,
482 [ AC_DEFINE(HAVE_READLINE)
484 CONS_INC="-I/usr/include/readline"
485 CONS_LIBS="-lreadline -ltermcap"
487 # Did not find standard library, so try Bacula's default
488 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
489 [ AC_DEFINE(HAVE_READLINE)
491 CONS_INC="-I${TOP_DIR}/depkgs/readline"
492 CONS_LIBS="-lreadline -lhistory -ltermcap"
493 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
494 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
497 echo "readline.h not found. readline turned off ..."
513 AC_SUBST(CONS_LDFLAGS)
514 AC_SUBST(READLINE_SRC)
516 # Minimal stuff for readline Makefile configuration
521 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
522 AC_CHECK_FUNCS(nanosleep nl_langinfo)
523 AC_CHECK_HEADERS(varargs.h)
525 # End of readline/conio stuff
526 # -----------------------------------------------------------------------
528 # -----------------------------------------------------------------------
529 # Check for Python support
531 AC_MSG_CHECKING(for Python support)
534 --with-python[=DIR] Include Python support. DIR is the Python base
535 install directory, default is to search through
536 a number of common places for the Python files.],
540 if test "$withval" != "no"; then
541 if test "$withval" = "yes"; then
542 if test -f /usr/include/python2.2/Python.h; then
543 PYTHON_INCDIR=-I/usr/include/python2.2
544 PYTHON_LIBS="-L/usr/lib/python2.2/config -lpython2.2 -lutil -ldl"
545 elif test -f /usr/include/python2.3/Python.h; then
546 PYTHON_INCDIR=-I/usr/include/python2.3
547 PYTHON_LIBS="-L/usr/lib/python2.3/config -lpython2.3 -lutil -ldl"
548 elif test -f /usr/include/python2.4/Python.h; then
549 PYTHON_INCDIR=-I/usr/include/python2.4
550 PYTHON_LIBS="-L/usr/lib/python2.4/config -lpython2.4 -lutil -ldl"
551 elif test -f $prefix/include/Python.h; then
552 PYTHON_INCDIR=-I$prefix/include
553 PYTHON_LIBS="-L$prefix/lib/config -lpython -lutil -ldl"
556 AC_MSG_ERROR(Unable to find Python.h in standard locations)
559 if test -f $withval/Python.h; then
560 PYTHON_INCDIR=-I$withval
561 PYTHON_LIBS="-L$withval/config -lpython -lutil -ldl"
562 elif test -f $withval/include/Python.h; then
563 PYTHON_INCDIR=-I$withval/include
564 PYTHON_LIBS="-L$withval/lib/config -lpython -lutil -ldl"
567 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
570 AC_DEFINE([HAVE_PYTHON], 1)
580 AC_SUBST(PYTHON_LIBS)
581 AC_SUBST(PYTHON_INCDIR)
584 # -------------------------------------------
585 # check for cdrecord writer location
586 # get scsibus,target,lun
587 # -------------------------------------------
589 if test ! x$CDRECORD = x ; then
590 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD-RW | ${AWK} '{print $1}'`
591 if test x${CDSTL} = x ; then
592 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD+RW | ${AWK} '{print $1}'`
594 if test x${CDSTL} = x ; then
595 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep DVD+RW | ${AWK} '{print $1}'`
597 if test x${CDSTL} = x ; then
598 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep DVD-RW | ${AWK} '{print $1}'`
600 if test x${CDSTL} = x ; then
608 # Find where sockets are (especially for Solaris)
609 # Do this before the TCP Wrappers test since tcp wrappers
610 # uses the socket library and some linkers are stupid.
612 AC_CHECK_FUNC(socket,
613 AC_MSG_RESULT(using libc's socket),
614 AC_CHECK_LIB(xnet,socket)
615 AC_CHECK_LIB(socket,socket)
616 AC_CHECK_LIB(inet,socket))
619 # -----------------------------------------------------------
620 # Check whether user wants TCP wrappers support (default off)
621 # -----------------------------------------------------------
623 AC_ARG_WITH(tcp-wrappers,
624 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
626 if test "x$withval" != "xno" ; then
628 LIBS="$saved_LIBS -lwrap"
629 AC_MSG_CHECKING(for libwrap)
632 int deny_severity = 0;
633 int allow_severity = 0;
634 struct request_info *req; ],
635 [ hosts_access(req); ],
638 AC_DEFINE(HAVE_LIBWRAP)
641 LIBS="$saved_LIBS -lwrap -lnsl"
644 int deny_severity = 0;
645 int allow_severity = 0;
646 struct request_info *req; ],
647 [ hosts_access(req); ],
650 AC_DEFINE(HAVE_LIBWRAP)
653 [AC_MSG_ERROR([*** libwrap missing]) ] ]
660 # ------------------------------------------
661 # Where to place working dir
662 # ------------------------------------------
663 working_dir=`eval echo ${prefix}/var/bacula/working`
664 AC_ARG_WITH(working-dir,
665 [ --with-working-dir=PATH specify path of Bacula working directory],
667 if test "x$withval" != "xno" ; then
673 AC_SUBST(working_dir)
676 # ------------------------------------------
677 # Where to place scriptdir (script files)
678 # ------------------------------------------
679 scriptdir=`eval echo ${sysconfdir}`
680 AC_ARG_WITH(scriptdir,
681 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
683 if test "x$withval" != "xno" ; then
692 # ------------------------------------------
693 # Where to send dump email
694 # ------------------------------------------
695 dump_email=root@localhost
696 AC_ARG_WITH(dump-email,
697 [ --with-dump-email=EMAIL dump email address],
699 if test "x$withval" != "xno" ; then
707 # ------------------------------------------
708 # Where to send job email
709 # ------------------------------------------
710 job_email=root@localhost
711 AC_ARG_WITH(job-email,
712 [ --with-job-email=EMAIL job output email address],
714 if test "x$withval" != "xno" ; then
722 # ------------------------------------------
723 # Where to find smtp host
724 # ------------------------------------------
726 AC_ARG_WITH(smtp_host,
727 [ --with-smtp-host=HOST SMTP mail host address],
729 if test "x$withval" != "xno" ; then
738 # ------------------------------------
739 # Where to place pid files
740 # ------------------------------------
743 [ --with-pid-dir=PATH specify location of Bacula pid files],
745 if test "x$withval" != "xno" ; then
751 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
755 # ------------------------------------
756 # Where to place subsys "lock file"
757 # ------------------------------------
758 subsysdir=/var/run/subsys
759 AC_ARG_WITH(subsys-dir,
760 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
762 if test "x$withval" != "xno" ; then
772 # ------------------------------------
773 # Where to start assigning ports
774 # ------------------------------------
776 AC_ARG_WITH(baseport,
777 [ --with-baseport=PORT specify base port address for daemons],
779 if test "x$withval" != "xno" ; then
786 dir_port=`expr $baseport`
787 fd_port=`expr $baseport + 1`
788 sd_port=`expr $fd_port + 1`
795 # ------------------------------------------
797 # ------------------------------------------
799 AC_ARG_WITH(dir-password,
800 [ --with-dir-password=PASSWORD specify Director's password],
802 if test "x$withval" != "xno" ; then
803 dir_password=$withval
808 if test "x$dir_password" = "x" ; then
809 if test "x$OPENSSL" = "xnone" ; then
810 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
811 key=`autoconf/randpass 33`
813 key=`openssl rand -base64 33`
819 AC_ARG_WITH(fd-password,
820 [ --with-fd-password=PASSWORD specify Client's password],
822 if test "x$withval" != "xno" ; then
828 if test "x$fd_password" = "x" ; then
829 if test "x$OPENSSL" = "xnone" ; then
830 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
831 key=`autoconf/randpass 37`
833 key=`openssl rand -base64 33`
839 AC_ARG_WITH(sd-password,
840 [ --with-sd-password=PASSWORD specify Storage daemon's password],
842 if test "x$withval" != "xno" ; then
848 if test "x$sd_password" = "x" ; then
849 if test "x$OPENSSL" = "xnone" ; then
850 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
851 key=`autoconf/randpass 41`
853 key=`openssl rand -base64 33`
859 AC_ARG_WITH(mon-dir-password,
860 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
862 if test "x$withval" != "xno" ; then
863 mon_dir_password=$withval
868 if test "x$mon_dir_password" = "x" ; then
869 if test "x$OPENSSL" = "xnone" ; then
870 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
871 key=`autoconf/randpass 33`
873 key=`openssl rand -base64 33`
875 mon_dir_password=$key
879 AC_ARG_WITH(mon-fd-password,
880 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
882 if test "x$withval" != "xno" ; then
883 mon_fd_password=$withval
888 if test "x$mon_fd_password" = "x" ; then
889 if test "x$OPENSSL" = "xnone" ; then
890 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
891 key=`autoconf/randpass 37`
893 key=`openssl rand -base64 33`
899 AC_ARG_WITH(mon-sd-password,
900 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
902 if test "x$withval" != "xno" ; then
903 mon_sd_password=$withval
908 if test "x$mon_sd_password" = "x" ; then
909 if test "x$OPENSSL" = "xnone" ; then
910 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
911 key=`autoconf/randpass 41`
913 key=`openssl rand -base64 33`
918 AC_SUBST(dir_password)
919 AC_SUBST(fd_password)
920 AC_SUBST(sd_password)
921 AC_SUBST(mon_dir_password)
922 AC_SUBST(mon_fd_password)
923 AC_SUBST(mon_sd_password)
925 # -------------------------------------------------------------------------
926 # Set variables for bimagemgr installation
927 # -------------------------------------------------------------------------
928 bimagemgr_cgidir=/var/www/cgi-bin
929 AC_ARG_WITH(bimagemgr-cgidir,
930 [ --with-bimagemgr-cgidir=DIR specify bimagemgr cgi-bin dir],
932 if test "x$withval" != "xno" ; then
933 bimagemgr_cgidir=$withval
938 bimagemgr_docdir=/var/www/html
939 AC_ARG_WITH(bimagemgr-docdir,
940 [ --with-bimagemgr-docdir=DIR specify bimagemgr doc root dir],
942 if test "x$withval" != "xno" ; then
943 bimagemgr_docdir=$withval
948 bimagemgr_binowner=root
949 AC_ARG_WITH(bimagemgr-binowner,
950 [ --with-bimagemgr-binowner=USER specify bimagemgr binary file owner],
952 if test "x$withval" != "xno" ; then
953 bimagemgr_binowner=$withval
958 bimagemgr_bingroup=root
959 AC_ARG_WITH(bimagemgr-bingroup,
960 [ --with-bimagemgr-bingroup=USER specify bimagemgr binary file group],
962 if test "x$withval" != "xno" ; then
963 bimagemgr_bingroup=$withval
968 bimagemgr_dataowner=apache
969 AC_ARG_WITH(bimagemgr-dataowner,
970 [ --with-bimagemgr-dataowner=USER specify bimagemgr data file owner],
972 if test "x$withval" != "xno" ; then
973 bimagemgr_dataowner=$withval
978 bimagemgr_datagroup=apache
979 AC_ARG_WITH(bimagemgr-datagroup,
980 [ --with-bimagemgr-datagroup=USER specify bimagemgr data file group],
982 if test "x$withval" != "xno" ; then
983 bimagemgr_datagroup=$withval
988 AC_SUBST(bimagemgr_cgidir)
989 AC_SUBST(bimagemgr_docdir)
990 AC_SUBST(bimagemgr_binowner)
991 AC_SUBST(bimagemgr_bingroup)
992 AC_SUBST(bimagemgr_dataowner)
993 AC_SUBST(bimagemgr_datagroup)
996 # Handle users and groups for each daemon
999 AC_ARG_WITH(dir_user,
1000 [ --with-dir-user=USER specify user for Director daemon],
1002 if test "x$withval" != "x" ; then
1009 AC_ARG_WITH(dir_group,
1010 [ --with-dir-group=GROUP specify group for Director daemon],
1012 if test "x$withval" != "x" ; then
1019 AC_ARG_WITH(sd_user,
1020 [ --with-sd-user=USER specify user for Storage daemon],
1022 if test "x$withval" != "x" ; then
1029 AC_ARG_WITH(sd_group,
1030 [ --with-sd-group=GROUP specify group for Storage daemon],
1032 if test "x$withval" != "x" ; then
1039 AC_ARG_WITH(fd_user,
1040 [ --with-fd-user=USER specify user for File daemon],
1042 if test "x$withval" != "x" ; then
1049 AC_ARG_WITH(fd_group,
1050 [ --with-fd-group=GROUP specify group for File daemon],
1052 if test "x$withval" != "x" ; then
1069 # allow setting default executable permissions
1072 AC_ARG_WITH(sbin-perm,
1073 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1075 if test "x$withval" != "x" ; then
1083 # ------------------------------------------------
1084 # Bacula check for various SQL database engines
1085 # ------------------------------------------------
1086 BA_CHECK_POSTGRESQL_DB
1097 AC_DEFINE(PROTOTYPES)
1099 dnl# --------------------------------------------------------------------------
1100 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1102 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1103 if test -z "$CCOPTS"; then
1104 CCOPTS='-g -O2 -Wall'
1113 dnl See if we can use 64 bit file addresses
1114 largefile_support="no"
1120 dnl# --------------------------------------------------------------------------
1121 dnl# CHECKING FOR HEADER FILES
1122 dnl# --------------------------------------------------------------------------
1158 AC_STRUCT_ST_BLKSIZE
1162 dnl# --------------------------------------------------------------------------
1163 dnl# Check for utime.h structure
1164 dnl# --------------------------------------------------------------------------
1165 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1167 #include <sys/types.h>
1168 #include <utime.h>], [struct utimbuf foo],
1169 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1170 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1172 dnl# --------------------------------------------------------------------------
1173 dnl# Check for socklen_t
1174 dnl# --------------------------------------------------------------------------
1175 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1177 #include <sys/types.h>
1178 #include <sys/socket.h>],
1180 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1181 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1183 dnl# --------------------------------------------------------------------------
1184 dnl# Check for bigendian
1185 dnl# --------------------------------------------------------------------------
1186 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1188 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1189 [ba_cv_bigendian=yes],
1190 [ba_cv_bigendian=no],
1191 [ba_cv_bigendian=no])])
1192 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1198 dnl# --------------------------------------------------------------------------
1199 dnl# CHECKING FOR FILESYSTEM TYPE
1200 dnl# --------------------------------------------------------------------------
1201 AC_MSG_CHECKING(how to get filesystem type)
1203 # The order of these tests is important.
1204 AC_TRY_CPP([#include <sys/statvfs.h>
1205 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1206 if test $fstype = no; then
1207 AC_TRY_CPP([#include <sys/statfs.h>
1208 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1210 if test $fstype = no; then
1211 AC_TRY_CPP([#include <sys/statfs.h>
1212 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1214 if test $fstype = no; then
1215 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1217 if test $fstype = no; then
1218 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1220 if test $fstype = no; then
1221 AC_TRY_CPP([#include <sys/mount.h>
1222 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1224 AC_MSG_RESULT($fstype)
1226 dnl# --------------------------------------------------------------------------
1227 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1228 dnl# --------------------------------------------------------------------------
1236 AC_CHECK_TYPE(ino_t, unsigned long)
1237 AC_CHECK_TYPE(dev_t, unsigned long)
1238 AC_CHECK_TYPE(daddr_t, long)
1239 AC_CHECK_TYPE(major_t, int)
1240 AC_CHECK_TYPE(minor_t, int)
1241 AC_CHECK_TYPE(ssize_t, int)
1248 AC_CHECK_SIZEOF(char, 1)
1249 AC_CHECK_SIZEOF(short int, 2)
1250 AC_CHECK_SIZEOF(int, 4)
1251 AC_CHECK_SIZEOF(long int, 4)
1252 AC_CHECK_SIZEOF(long long int, 8)
1253 AC_CHECK_SIZEOF(int *, 4)
1255 # Check for sys/types.h types
1256 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1258 [ #include <sys/types.h> ],
1260 [ ac_cv_have_u_int="yes" ],
1261 [ ac_cv_have_u_int="no" ]
1264 if test "x$ac_cv_have_u_int" = "xyes" ; then
1265 AC_DEFINE(HAVE_U_INT)
1269 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1271 [ #include <sys/types.h> ],
1272 [ intmax_t a; a = 1;],
1273 [ ac_cv_have_intmax_t="yes" ],
1276 [ #include <stdint.h> ],
1277 [ intmax_t a; a = 1;],
1278 [ ac_cv_have_intmax_t="yes" ],
1279 [ ac_cv_have_intmax_t="no" ]
1285 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1286 AC_DEFINE(HAVE_INTMAX_T)
1291 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1293 [ #include <sys/types.h> ],
1294 [ u_intmax_t a; a = 1;],
1295 [ ac_cv_have_u_intmax_t="yes" ],
1298 [ #include <stdint.h> ],
1299 [ u_intmax_t a; a = 1;],
1300 [ ac_cv_have_u_intmax_t="yes" ],
1301 [ ac_cv_have_u_intmax_t="no" ]
1306 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1307 AC_DEFINE(HAVE_U_INTMAX_T)
1312 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1314 [ #include <sys/types.h> ],
1315 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1316 [ ac_cv_have_intxx_t="yes" ],
1317 [ ac_cv_have_intxx_t="no" ]
1320 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1321 AC_DEFINE(HAVE_INTXX_T)
1325 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1327 [ #include <sys/types.h> ],
1328 [ int64_t a; a = 1;],
1329 [ ac_cv_have_int64_t="yes" ],
1330 [ ac_cv_have_int64_t="no" ]
1333 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1334 AC_DEFINE(HAVE_INT64_T)
1338 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1340 [ #include <sys/types.h> ],
1341 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1342 [ ac_cv_have_u_intxx_t="yes" ],
1343 [ ac_cv_have_u_intxx_t="no" ]
1346 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1347 AC_DEFINE(HAVE_U_INTXX_T)
1351 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1353 [ #include <sys/types.h> ],
1354 [ u_int64_t a; a = 1;],
1355 [ ac_cv_have_u_int64_t="yes" ],
1356 [ ac_cv_have_u_int64_t="no" ]
1359 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1360 AC_DEFINE(HAVE_U_INT64_T)
1364 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1365 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1367 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1369 [ #include <sys/bitypes.h> ],
1370 [ int8_t a; int16_t b; int32_t c;
1371 u_int8_t e; u_int16_t f; u_int32_t g;
1372 a = b = c = e = f = g = 1; ],
1373 [ AC_DEFINE(HAVE_U_INTXX_T)
1374 AC_DEFINE(HAVE_INTXX_T)
1375 AC_DEFINE(HAVE_SYS_BITYPES_H)
1376 AC_MSG_RESULT(yes) ],
1377 [ AC_MSG_RESULT(no)]
1381 if test -z "$have_u_intxx_t" ; then
1382 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1384 [ #include <sys/types.h> ],
1385 [ uint8_t a; uint16_t b;
1386 uint32_t c; a = b = c = 1; ],
1387 [ ac_cv_have_uintxx_t="yes" ],
1388 [ ac_cv_have_uintxx_t="no" ]
1391 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1392 AC_DEFINE(HAVE_UINTXX_T)
1396 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1397 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1399 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1401 [ #include <sys/bitypes.h> ],
1402 [ int64_t a; u_int64_t b;
1404 [ AC_DEFINE(HAVE_U_INT64_T)
1405 AC_DEFINE(HAVE_INT64_T)
1406 AC_MSG_RESULT(yes) ],
1407 [ AC_MSG_RESULT(no)]
1411 if (test -z "$have_uintxx_t" && \
1412 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1414 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1416 [ #include <sys/bitypes.h> ],
1417 [ uint8_t a; uint16_t b;
1418 uint32_t c; a = b = c = 1; ],
1419 [ AC_DEFINE(HAVE_UINTXX_T)
1420 AC_MSG_RESULT(yes) ],
1421 [ AC_MSG_RESULT(no)]
1429 dnl# --------------------------------------------------------------------------
1430 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1431 dnl# --------------------------------------------------------------------------
1447 [echo 'configure: cannot find needed function.'; exit 1]
1450 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1451 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1453 AC_CHECK_FUNCS(chflags)
1455 AC_CHECK_FUNCS(snprintf vsnprintf gethostid fseeko)
1457 dnl# --------------------------------------------------------------------------
1458 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1459 dnl# --------------------------------------------------------------------------
1460 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1462 # If resolver functions are not in libc check for -lnsl or -lresolv.
1463 AC_CHECK_FUNC(gethostbyname_r,
1464 AC_MSG_RESULT(using libc's resolver),
1465 AC_CHECK_LIB(nsl,gethostbyname_r)
1466 AC_CHECK_LIB(resolv,gethostbyname_r))
1470 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1471 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1472 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1474 dnl ----------------------------
1475 dnl check sa_len of sockaddr
1476 dnl ----------------------------
1477 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1478 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1479 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1481 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1482 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1486 dnl Check for IPv6 support
1487 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1488 [AC_TRY_LINK([ #include <sys/types.h>
1489 #include <sys/socket.h>
1490 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1492 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1494 if test "$ac_cv_ipv6_support" = yes; then
1495 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1504 AC_FUNC_CLOSEDIR_VOID
1505 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1506 # AC_FUNC_FNMATCH dnl use local version
1509 dnl# FreeBSD needs to link libxpg4
1510 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1513 AC_CHECK_LIB(sun, getpwnam)
1515 AC_CHECK_HEADERS(zlib.h)
1516 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1518 if test x$FDLIBS = x-lz; then
1519 AC_DEFINE(HAVE_LIBZ)
1523 AC_CHECK_HEADER(sys/acl.h)
1524 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1526 if test $ac_cv_lib_acl_acl_get_file = yes; then
1531 dnl Check for pthread libraries
1533 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1534 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1535 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1536 [AC_CHECK_FUNC(pthread_create)]
1546 LDFLAGS=${LDFLAGS--O}
1547 DB_LIBS="${SQL_LFLAGS}"
1549 CPPFLAGS="$CPPFLAGS"
1560 AC_SUBST(X_EXTRA_LIBS)
1564 dnl# extra configurable objects
1575 # Finally we set appropriate distribution specific
1576 # variables and defaults
1578 # PFILES are platform specific files
1579 PFILES="platforms/Makefile"
1583 hostname=`uname -n | cut -d '.' -f 1`
1587 PSCMD="ps -e -o pid,comm"
1589 platforms/aix/Makefile"
1590 TAPEDRIVE="/dev/rmt0.1"
1594 PTHREAD_LIB="-lpthread -lexc"
1595 if test "${CC}" = "gcc" ; then
1602 TAPEDRIVE="/dev/nrmt0"
1605 DISTVER=`uname -a |awk '{print $3}'`
1606 TAPEDRIVE="/dev/nrmt0"
1607 PTHREAD_LIB="-pthread"
1608 CFLAGS="${CFLAGS} -pthread"
1609 PSCMD="ps -x -o pid,command"
1613 platforms/bsdi/Makefile \
1614 platforms/bsdi/bacula-fd \
1615 platforms/bsdi/bacula-sd \
1616 platforms/bsdi/bacula-dir"
1617 largefile_support="yes"
1620 DISTVER=`uname -a |awk '{print $3}'`
1621 TAPEDRIVE="/dev/nrst0"
1624 WLDFLAGS="-mwindows"
1628 TAPEDRIVE="/dev/nst0"
1629 PSCMD="ps -e -o pid,command"
1632 platforms/darwin/Makefile"
1635 DISTVER=`cat /etc/debian_version`
1636 TAPEDRIVE="/dev/nrst0"
1637 PSCMD="ps -e -o pid,command"
1640 DISTVER=`uname -a |awk '{print $3}'`
1641 VER=`echo $DISTVER | cut -c 1`
1642 if test x$VER = x4 ; then
1643 PTHREAD_LIB="-pthread"
1644 CFLAGS="${CFLAGS} -pthread"
1648 TAPEDRIVE="/dev/nrsa0"
1649 PSCMD="ps -x -o pid,command"
1651 platforms/freebsd/Makefile \
1652 platforms/freebsd/bacula-fd \
1653 platforms/freebsd/bacula-sd \
1654 platforms/freebsd/bacula-dir"
1655 largefile_support="yes"
1658 PSCMD="UNIX95=1 ps -e -o pid,comm"
1659 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1661 TAPEDRIVE="/dev/rmt/0hnb"
1662 PTHREAD_LIB="-lpthread"
1663 AC_DEFINE([_INCLUDE_LONGLONG])
1667 TAPEDRIVE="/dev/rmt/0cbn"
1668 PSCMD="ps -e -o pid,comm"
1670 platforms/irix/Makefile \
1671 platforms/irix/bacula-fd \
1672 platforms/irix/bacula-sd \
1673 platforms/irix/bacula-dir"
1676 DISTVER=`uname -a |awk '{print $3}'`
1679 TAPEDRIVE="/dev/nrst0"
1680 PSCMD="ps -a -o pid,command"
1681 PTHREAD_LIB="-pthread"
1682 CFLAGS="${CFLAGS} -pthread"
1685 DISTVER=`uname -a |awk '{print $3}'`
1688 TAPEDRIVE="/dev/nrst0"
1689 PSCMD="ps -ax -o pid,command"
1690 PTHREAD_LIB="-pthread"
1691 CFLAGS="${CFLAGS} -pthread"
1693 platforms/openbsd/Makefile \
1694 platforms/openbsd/bacula-fd \
1695 platforms/openbsd/bacula-sd \
1696 platforms/openbsd/bacula-dir"
1699 if test -f /etc/whitebox-release ; then
1700 f=/etc/whitebox-release
1702 f=/etc/redhat-release
1704 if test `cat $f | grep release |\
1705 cut -f 3 -d ' '`x = "Enterprise"x ; then
1706 DISTVER="Enterprise "`cat $f | grep release |\
1709 DISTVER=`cat /etc/redhat-release | grep release |\
1712 TAPEDRIVE="/dev/nst0"
1713 PSCMD="ps -e -o pid,command"
1715 platforms/redhat/Makefile \
1716 platforms/redhat/bacula-fd \
1717 platforms/redhat/bacula-sd \
1718 platforms/redhat/bacula-dir \
1719 platforms/redhat/bacula.spec \
1721 hostname=`hostname -s`
1724 DISTVER=`cat /etc/mandrake-release | grep release |\
1726 TAPEDRIVE="/dev/nst0"
1727 PSCMD="ps -e -o pid,command"
1729 platforms/mandrake/Makefile \
1730 platforms/mandrake/bacula-fd \
1731 platforms/mandrake/bacula-sd \
1732 platforms/mandrake/bacula-dir \
1733 platforms/mandrake/bacula.spec \
1737 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1738 TAPEDRIVE="/dev/nst0"
1739 PSCMD="ps -e -o pid,command"
1741 platforms/gentoo/Makefile \
1742 platforms/gentoo/bacula-init \
1743 platforms/gentoo/bacula-fd \
1744 platforms/gentoo/bacula-sd \
1745 platforms/gentoo/bacula-dir"
1748 DISTVER=`cat /etc/slackware-version`
1749 TAPEDRIVE="/dev/nst0"
1750 PSCMD="ps -e -o pid,command"
1752 platforms/slackware/Makefile \
1753 platforms/slackware/rc.bacula-fd \
1754 platforms/slackware/rc.bacula-sd \
1755 platforms/slackware/rc.bacula-dir\
1756 platforms/slackware/functions.bacula"
1760 TAPEDRIVE="/dev/rmt/0cbn"
1761 PSCMD="ps -e -o pid,comm"
1763 platforms/solaris/Makefile \
1764 platforms/solaris/bacula-fd \
1765 platforms/solaris/bacula-sd \
1766 platforms/solaris/bacula-dir"
1767 if test x$DISTVER = x5.6 ; then
1768 AC_DEFINE(HAVE_OLD_SOCKOPT)
1770 LIBS="$LIBS -lresolv"
1773 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1775 TAPEDRIVE="/dev/nst0"
1776 PSCMD="ps -e -o pid,command"
1778 platforms/suse/Makefile \
1779 platforms/suse/bacula-fd \
1780 platforms/suse/bacula-sd \
1781 platforms/suse/bacula-dir \
1782 platforms/suse/bacula \
1783 platforms/suse/bacula.spec"
1788 TAPEDRIVE="/dev/nst0"
1789 PSCMD="ps -e -o pid,command"
1791 platforms/suse/Makefile \
1792 platforms/suse/bacula-fd \
1793 platforms/suse/bacula-sd \
1794 platforms/suse/bacula-dir"
1798 TAPEDRIVE="/dev/nst0"
1801 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1807 LIBS="$PTHREAD_LIB $LIBS"
1809 AC_DEFINE_UNQUOTED(lld, "$lld")
1810 AC_DEFINE_UNQUOTED(llu, "$llu")
1818 dnl# common parts of the Makefile
1819 MCOMMON=./autoconf/Make.common
1820 AC_SUBST_FILE(MCOMMON)
1823 if test "x${subsysdir}" = "x${sbindir}" ; then
1826 echo "You have set both --sbindir and --with-subsys-dir"
1827 echo " equal to: ${subsysdir} "
1828 echo "This is not permitted. Please reconfigure."
1830 echo "Aborting configuration ..."
1836 AC_OUTPUT([autoconf/Make.common \
1839 rescue/linux/Makefile \
1840 rescue/linux/floppy/Makefile \
1841 rescue/linux/cdrom/Makefile \
1842 rescue/linux/cdrom/bacula/Makefile \
1843 rescue/freebsd/Makefile \
1844 rescue/solaris/Makefile \
1845 scripts/startmysql \
1847 scripts/btraceback \
1853 scripts/devel_bacula \
1856 scripts/bacula.desktop.gnome1 \
1857 scripts/bacula.desktop.gnome2 \
1858 scripts/bacula.desktop.gnome1.consolehelper \
1859 scripts/bacula.desktop.gnome2.consolehelper \
1860 scripts/bacula.desktop.gnome1.xsu \
1861 scripts/bacula.desktop.gnome2.xsu \
1862 scripts/gnome-console.console_apps \
1863 scripts/mtx-changer \
1864 scripts/dvd-writepart \
1865 scripts/dvd-freespace \
1866 scripts/bacula-tray-monitor.desktop \
1867 scripts/logwatch/Makefile \
1868 scripts/logwatch/logfile.bacula.conf \
1872 src/console/Makefile \
1873 src/console/bconsole.conf \
1874 src/gnome-console/Makefile \
1875 src/gnome-console/gnome-console.conf \
1876 src/gnome2-console/Makefile \
1877 src/gnome2-console/gnome-console.conf \
1878 src/wx-console/Makefile \
1879 src/wx-console/wx-console.conf \
1880 src/tray-monitor/Makefile \
1881 src/tray-monitor/tray-monitor.conf \
1883 src/dird/bacula-dir.conf \
1885 src/stored/Makefile \
1886 src/stored/bacula-sd.conf \
1887 src/filed/Makefile \
1888 src/filed/bacula-fd.conf \
1889 src/filed/win32/Makefile \
1891 src/cats/make_catalog_backup \
1892 src/cats/delete_catalog_backup \
1893 src/cats/create_postgresql_database \
1894 src/cats/update_postgresql_tables \
1895 src/cats/make_postgresql_tables \
1896 src/cats/grant_postgresql_privileges \
1897 src/cats/drop_postgresql_tables \
1898 src/cats/drop_postgresql_database \
1899 src/cats/create_mysql_database \
1900 src/cats/update_mysql_tables \
1901 src/cats/make_mysql_tables \
1902 src/cats/grant_mysql_privileges \
1903 src/cats/drop_mysql_tables \
1904 src/cats/drop_mysql_database \
1905 src/cats/create_sqlite_database \
1906 src/cats/update_sqlite_tables \
1907 src/cats/make_sqlite_tables \
1908 src/cats/grant_sqlite_privileges \
1909 src/cats/drop_sqlite_tables \
1910 src/cats/drop_sqlite_database \
1911 src/cats/create_sqlite3_database \
1912 src/cats/update_sqlite3_tables \
1913 src/cats/make_sqlite3_tables \
1914 src/cats/grant_sqlite3_privileges \
1915 src/cats/drop_sqlite3_tables \
1916 src/cats/drop_sqlite3_database \
1919 src/cats/create_bdb_database \
1920 src/cats/update_bdb_tables \
1921 src/cats/make_bdb_tables \
1922 src/cats/grant_bdb_privileges \
1923 src/cats/drop_bdb_tables \
1924 src/cats/drop_bdb_database \
1925 src/cats/create_bacula_database \
1926 src/cats/update_bacula_tables \
1927 src/cats/grant_bacula_privileges \
1928 src/cats/make_bacula_tables \
1929 src/cats/drop_bacula_tables \
1930 src/cats/drop_bacula_database \
1931 src/findlib/Makefile \
1932 src/tools/Makefile \
1933 src/win32/winbacula.nsi \
1934 src/win32/baculafd/bacula-fd.conf \
1935 src/win32/Makefile \
1936 src/win32/console/bconsole.conf \
1937 src/win32/wx-console/wx-console.conf \
1938 src/win32/pebuilder/Makefile \
1939 src/bimagemgr/Makefile \
1940 src/bimagemgr/bacula-bimagemgr.spec \
1942 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
1946 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1947 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
1952 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
1953 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
1955 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
1956 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
1958 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
1959 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
1961 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
1962 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
1964 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
1965 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
1967 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
1971 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
1972 largefile_support="yes"
1976 # A whole lot of hand springs to get the compiler version.
1977 # This is because gcc changed the output in version 3.0
1979 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1980 if test "x${CCVERSION}" = "x" ; then
1981 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1983 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
1984 if test x"${CXXVERSION}" = x ; then
1985 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
1988 if test "x${subsysdir}" = "x${sbindir}" ; then
1991 echo "You have set --sbindir and --with-subsys-dir"
1992 echo " both equal to: ${subsysdir} "
1993 echo " This is not permitted. Please reconfigure."
1995 echo "Aborting configuration ..."
2001 if test "x${db_name}" = "xInternal" ; then
2004 echo "You have not specified either --enable-client-only or one of the"
2005 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
2006 echo " This is not permitted. Please reconfigure."
2008 echo "Aborting the configuration ..."
2015 Configuration on `date`:
2017 Host: $host -- ${DISTNAME} ${DISTVER}
2018 Bacula version: ${VERSION} (${DATE})
2019 Source code location: ${srcdir}
2020 Install binaries: ${sbindir}
2021 Install config files: ${sysconfdir}
2022 Scripts directory: ${scriptdir}
2023 Working directory: ${working_dir}
2024 PID directory: ${piddir}
2025 Subsys directory: ${subsysdir}
2026 C Compiler: ${CC} ${CCVERSION}
2027 C++ Compiler: ${CXX} ${CXXVERSION}
2028 Compiler flags: ${WCFLAGS} ${CFLAGS}
2029 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2031 Statically Linked Tools: ${support_static_tools}
2032 Statically Linked FD: ${support_static_fd}
2033 Statically Linked SD: ${support_static_sd}
2034 Statically Linked DIR: ${support_static_dir}
2035 Statically Linked CONS: ${support_static_cons}
2036 Database type: ${db_name}
2037 Database lib: ${DB_LIBS}
2039 Job Output Email: ${job_email}
2040 Traceback Email: ${dump_email}
2041 SMTP Host Address: ${smtp_host}
2043 Director Port: ${dir_port}
2044 File daemon Port: ${fd_port}
2045 Storage daemon Port: ${sd_port}
2047 Director User: ${dir_user}
2048 Director Group: ${dir_group}
2049 Storage Daemon User: ${sd_user}
2050 Storage DaemonGroup: ${sd_group}
2051 File Daemon User: ${fd_user}
2052 File Daemon Group: ${fd_group}
2054 SQL binaries Directory ${SQL_BINDIR}
2056 Large file support: $largefile_support
2057 Bacula conio support: ${got_conio} ${CONS_LIBS}
2058 readline support: ${got_readline} ${PRTREADLINE_SRC}
2059 TCP Wrappers support: ${TCPW_MSG}
2060 ZLIB support: ${have_zlib}
2061 enable-smartalloc: ${support_smartalloc}
2062 enable-gnome: ${support_gnome} ${gnome_version}
2063 enable-wx-console: ${support_wx_console}
2064 enable-tray-monitor: ${support_tray_monitor}
2065 client-only: ${build_client_only}
2066 ACL support: ${have_acl}
2067 Python support: ${support_python} ${PYTHON_LIBS}
2074 # cweb support: ${got_cweb} ${CWEB_SRC}
2075 # gmp support: ${got_gmp} ${GMP_SRC}