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 $prefix/include/Python.h; then
531 PYTHON_INCDIR=-I$prefix/include
532 PYTHON_LIBS="-L$prefix/lib/config -lpython -lutil -ldl"
535 AC_MSG_ERROR(Unable to find Python.h in standard locations)
538 if test -f $withval/Python.h; then
539 PYTHON_INCDIR=-I$withval
540 PYTHON_LIBS="-L$withval/config -lpython -lutil -ldl"
541 elif test -f $withval/include/Python.h; then
542 PYTHON_INCDIR=-I$withval/include
543 PYTHON_LIBS="-L$withval/lib/config -lpython -lutil -ldl"
546 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
549 AC_DEFINE([HAVE_PYTHON], 1)
559 AC_SUBST(PYTHON_LIBS)
560 AC_SUBST(PYTHON_INCDIR)
563 # -------------------------------------------
564 # check for cdrecord writer location
565 # get scsibus,target,lun
566 # -------------------------------------------
568 if test ! x$CDRECORD = x ; then
569 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD-RW | ${AWK} '{print $1}'`
570 if test x${CDSTL} = x ; then
571 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD+RW | ${AWK} '{print $1}'`
573 if test x${CDSTL} = x ; then
580 # ---------------------------------------------------
581 # Check for GMP support/directory
582 # ---------------------------------------------------
586 # [ --with-gmp[=DIR] Specify gmp library directory],
588 # case "$with_gmp" in
591 # if test "$with_gmp" != "yes"; then
592 # GMP_INC="-I$with_gmp"
594 # GMP_LDFLAGS="-L$with_gmp"
596 # with_gmp="/usr/include"
598 # AC_CHECK_HEADER($with_gmp/gmp.h,
599 # [ AC_MSG_RESULT(yes)
600 # AC_DEFINE(HAVE_GMP)
604 # [ AC_MSG_ERROR([*** gmp library missing])
610 # # check for standard gmp library
611 # AC_CHECK_HEADER(/usr/include/gmp.h,
612 # [ AC_MSG_RESULT(yes)
613 # AC_DEFINE(HAVE_GMP)
618 # # Did not find standard library, so use our own
620 # AC_DEFINE(HAVE_GMP)
623 # GMP_INC="-I${TOP_DIR}/depkgs/gmp"
625 # GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
626 # GMP_SRC="${TOP_DIR}/depkgs/gmp"
632 #AC_SUBST(GMP_LDFLAGS)
636 # -----------------------------------------------------------------------
639 # ---------------------------------------------------
640 # Check for CWEB support/directory
641 # ---------------------------------------------------
646 # [ --with-cweb[=DIR] Specify cweb library directory],
648 # case "$with_cweb" in
651 # if test "$with_cweb" != "yes"; then
652 # CWEB_INC="-I$with_cweb"
654 # CWEB_LDFLAGS="-L$with_cweb"
656 # with_cweb="/usr/include"
658 # AC_CHECK_HEADER($with_cweb/cweb.h,
659 # [ AC_MSG_RESULT(yes)
660 # AC_DEFINE(HAVE_CWEB)
664 # [ AC_MSG_ERROR([*** cweb library missing])
670 # # check for standard cweb library
671 # AC_CHECK_HEADER(/usr/include/cweb.h,
672 # [ AC_MSG_RESULT(yes)
673 # AC_DEFINE(HAVE_CWEB)
678 # # Did not find starndard library, so use our own
680 # AC_DEFINE(HAVE_CWEB)
683 # CWEB=${TOP_DIR}/depkgs/cweb
684 # CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
686 # CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
687 # CWEB_SRC="${TOP_DIR}/depkgs/cweb"
694 #AC_SUBST(CWEB_LDFLAGS)
698 # -----------------------------------------------------------------------
701 # Find where sockets are (especially for Solaris)
702 # Do this before the TCP Wrappers test since tcp wrappers
703 # uses the socket library and some linkers are stupid.
705 AC_CHECK_FUNC(socket,
706 AC_MSG_RESULT(using libc's socket),
707 AC_CHECK_LIB(xnet,socket)
708 AC_CHECK_LIB(socket,socket)
709 AC_CHECK_LIB(inet,socket))
712 # -----------------------------------------------------------
713 # Check whether user wants TCP wrappers support (default off)
714 # -----------------------------------------------------------
716 AC_ARG_WITH(tcp-wrappers,
717 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
719 if test "x$withval" != "xno" ; then
721 LIBS="$saved_LIBS -lwrap"
722 AC_MSG_CHECKING(for libwrap)
725 int deny_severity = 0;
726 int allow_severity = 0;
727 struct request_info *req; ],
728 [ hosts_access(req); ],
731 AC_DEFINE(HAVE_LIBWRAP)
734 LIBS="$saved_LIBS -lwrap -lnsl"
737 int deny_severity = 0;
738 int allow_severity = 0;
739 struct request_info *req; ],
740 [ hosts_access(req); ],
743 AC_DEFINE(HAVE_LIBWRAP)
746 [AC_MSG_ERROR([*** libwrap missing]) ] ]
753 # ------------------------------------------
754 # Where to place working dir
755 # ------------------------------------------
756 working_dir=`eval echo ${prefix}/var/bacula/working`
757 AC_ARG_WITH(working-dir,
758 [ --with-working-dir=PATH specify path of Bacula working directory],
760 if test "x$withval" != "xno" ; then
766 AC_SUBST(working_dir)
769 # ------------------------------------------
770 # Where to place scriptdir (script files)
771 # ------------------------------------------
772 scriptdir=`eval echo ${sysconfdir}`
773 AC_ARG_WITH(scriptdir,
774 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
776 if test "x$withval" != "xno" ; then
785 # ------------------------------------------
786 # Where to send dump email
787 # ------------------------------------------
788 dump_email=root@localhost
789 AC_ARG_WITH(dump-email,
790 [ --with-dump-email=EMAIL dump email address],
792 if test "x$withval" != "xno" ; then
800 # ------------------------------------------
801 # Where to send job email
802 # ------------------------------------------
803 job_email=root@localhost
804 AC_ARG_WITH(job-email,
805 [ --with-job-email=EMAIL job output email address],
807 if test "x$withval" != "xno" ; then
815 # ------------------------------------------
816 # Where to find smtp host
817 # ------------------------------------------
819 AC_ARG_WITH(smtp_host,
820 [ --with-smtp-host=HOST SMTP mail host address],
822 if test "x$withval" != "xno" ; then
831 # ------------------------------------
832 # Where to place pid files
833 # ------------------------------------
836 [ --with-pid-dir=PATH specify location of Bacula pid files],
838 if test "x$withval" != "xno" ; then
844 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
848 # ------------------------------------
849 # Where to place subsys "lock file"
850 # ------------------------------------
851 subsysdir=/var/run/subsys
852 AC_ARG_WITH(subsys-dir,
853 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
855 if test "x$withval" != "xno" ; then
865 # ------------------------------------
866 # Where to start assigning ports
867 # ------------------------------------
869 AC_ARG_WITH(baseport,
870 [ --with-baseport=PORT specify base port address for daemons],
872 if test "x$withval" != "xno" ; then
879 dir_port=`expr $baseport`
880 fd_port=`expr $baseport + 1`
881 sd_port=`expr $fd_port + 1`
888 # ------------------------------------------
890 # ------------------------------------------
892 AC_ARG_WITH(dir-password,
893 [ --with-dir-password=PASSWORD specify Director's password],
895 if test "x$withval" != "xno" ; then
896 dir_password=$withval
901 if test "x$dir_password" = "x" ; then
902 if test "x$OPENSSL" = "xnone" ; then
903 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
904 key=`autoconf/randpass 33`
906 key=`openssl rand -base64 33`
912 AC_ARG_WITH(fd-password,
913 [ --with-fd-password=PASSWORD specify Client's password],
915 if test "x$withval" != "xno" ; then
921 if test "x$fd_password" = "x" ; then
922 if test "x$OPENSSL" = "xnone" ; then
923 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
924 key=`autoconf/randpass 37`
926 key=`openssl rand -base64 33`
932 AC_ARG_WITH(sd-password,
933 [ --with-sd-password=PASSWORD specify Storage daemon's password],
935 if test "x$withval" != "xno" ; then
941 if test "x$sd_password" = "x" ; then
942 if test "x$OPENSSL" = "xnone" ; then
943 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
944 key=`autoconf/randpass 41`
946 key=`openssl rand -base64 33`
952 AC_ARG_WITH(mon-dir-password,
953 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
955 if test "x$withval" != "xno" ; then
956 mon_dir_password=$withval
961 if test "x$mon_dir_password" = "x" ; then
962 if test "x$OPENSSL" = "xnone" ; then
963 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
964 key=`autoconf/randpass 33`
966 key=`openssl rand -base64 33`
968 mon_dir_password=$key
972 AC_ARG_WITH(mon-fd-password,
973 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
975 if test "x$withval" != "xno" ; then
976 mon_fd_password=$withval
981 if test "x$mon_fd_password" = "x" ; then
982 if test "x$OPENSSL" = "xnone" ; then
983 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
984 key=`autoconf/randpass 37`
986 key=`openssl rand -base64 33`
992 AC_ARG_WITH(mon-sd-password,
993 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
995 if test "x$withval" != "xno" ; then
996 mon_sd_password=$withval
1001 if test "x$mon_sd_password" = "x" ; then
1002 if test "x$OPENSSL" = "xnone" ; then
1003 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
1004 key=`autoconf/randpass 41`
1006 key=`openssl rand -base64 33`
1008 mon_sd_password=$key
1011 AC_SUBST(dir_password)
1012 AC_SUBST(fd_password)
1013 AC_SUBST(sd_password)
1014 AC_SUBST(mon_dir_password)
1015 AC_SUBST(mon_fd_password)
1016 AC_SUBST(mon_sd_password)
1018 # -------------------------------------------------------------------------
1019 # Set variables for bimagemgr installation
1020 # -------------------------------------------------------------------------
1021 bimagemgr_cgidir=/var/www/cgi-bin
1022 AC_ARG_WITH(bimagemgr-cgidir,
1023 [ --with-bimagemgr-cgidir=DIR specify bimagemgr cgi-bin dir],
1025 if test "x$withval" != "xno" ; then
1026 bimagemgr_cgidir=$withval
1031 bimagemgr_docdir=/var/www/html
1032 AC_ARG_WITH(bimagemgr-docdir,
1033 [ --with-bimagemgr-docdir=DIR specify bimagemgr doc root dir],
1035 if test "x$withval" != "xno" ; then
1036 bimagemgr_docdir=$withval
1041 bimagemgr_binowner=root
1042 AC_ARG_WITH(bimagemgr-binowner,
1043 [ --with-bimagemgr-binowner=USER specify bimagemgr binary file owner],
1045 if test "x$withval" != "xno" ; then
1046 bimagemgr_binowner=$withval
1051 bimagemgr_bingroup=root
1052 AC_ARG_WITH(bimagemgr-bingroup,
1053 [ --with-bimagemgr-bingroup=USER specify bimagemgr binary file group],
1055 if test "x$withval" != "xno" ; then
1056 bimagemgr_bingroup=$withval
1061 bimagemgr_dataowner=apache
1062 AC_ARG_WITH(bimagemgr-dataowner,
1063 [ --with-bimagemgr-dataowner=USER specify bimagemgr data file owner],
1065 if test "x$withval" != "xno" ; then
1066 bimagemgr_dataowner=$withval
1071 bimagemgr_datagroup=apache
1072 AC_ARG_WITH(bimagemgr-datagroup,
1073 [ --with-bimagemgr-datagroup=USER specify bimagemgr data file group],
1075 if test "x$withval" != "xno" ; then
1076 bimagemgr_datagroup=$withval
1081 AC_SUBST(bimagemgr_cgidir)
1082 AC_SUBST(bimagemgr_docdir)
1083 AC_SUBST(bimagemgr_binowner)
1084 AC_SUBST(bimagemgr_bingroup)
1085 AC_SUBST(bimagemgr_dataowner)
1086 AC_SUBST(bimagemgr_datagroup)
1089 # Handle users and groups for each daemon
1092 AC_ARG_WITH(dir_user,
1093 [ --with-dir-user=USER specify user for Director daemon],
1095 if test "x$withval" != "x" ; then
1102 AC_ARG_WITH(dir_group,
1103 [ --with-dir-group=GROUP specify group for Director daemon],
1105 if test "x$withval" != "x" ; then
1112 AC_ARG_WITH(sd_user,
1113 [ --with-sd-user=USER specify user for Storage daemon],
1115 if test "x$withval" != "x" ; then
1122 AC_ARG_WITH(sd_group,
1123 [ --with-sd-group=GROUP specify group for Storage daemon],
1125 if test "x$withval" != "x" ; then
1132 AC_ARG_WITH(fd_user,
1133 [ --with-fd-user=USER specify user for File daemon],
1135 if test "x$withval" != "x" ; then
1142 AC_ARG_WITH(fd_group,
1143 [ --with-fd-group=GROUP specify group for File daemon],
1145 if test "x$withval" != "x" ; then
1162 # allow setting default executable permissions
1165 AC_ARG_WITH(sbin-perm,
1166 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1168 if test "x$withval" != "x" ; then
1176 # ------------------------------------------------
1177 # Bacula check for various SQL database engines
1178 # ------------------------------------------------
1179 BA_CHECK_POSTGRESQL_DB
1188 AC_DEFINE(PROTOTYPES)
1190 dnl# --------------------------------------------------------------------------
1191 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1193 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1194 if test -z "$CCOPTS"; then
1195 CCOPTS='-g -O2 -Wall'
1204 dnl See if we can use 64 bit file addresses
1205 largefile_support="no"
1211 dnl# --------------------------------------------------------------------------
1212 dnl# CHECKING FOR HEADER FILES
1213 dnl# --------------------------------------------------------------------------
1249 AC_STRUCT_ST_BLKSIZE
1253 dnl# --------------------------------------------------------------------------
1254 dnl# Check for utime.h structure
1255 dnl# --------------------------------------------------------------------------
1256 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1258 #include <sys/types.h>
1259 #include <utime.h>], [struct utimbuf foo],
1260 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1261 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1263 dnl# --------------------------------------------------------------------------
1264 dnl# Check for socklen_t
1265 dnl# --------------------------------------------------------------------------
1266 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1268 #include <sys/types.h>
1269 #include <sys/socket.h>],
1271 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1272 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1274 dnl# --------------------------------------------------------------------------
1275 dnl# Check for bigendian
1276 dnl# --------------------------------------------------------------------------
1277 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1279 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1280 [ba_cv_bigendian=yes],
1281 [ba_cv_bigendian=no],
1282 [ba_cv_bigendian=no])])
1283 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1289 dnl# --------------------------------------------------------------------------
1290 dnl# CHECKING FOR FILESYSTEM TYPE
1291 dnl# --------------------------------------------------------------------------
1292 AC_MSG_CHECKING(how to get filesystem type)
1294 # The order of these tests is important.
1295 AC_TRY_CPP([#include <sys/statvfs.h>
1296 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1297 if test $fstype = no; then
1298 AC_TRY_CPP([#include <sys/statfs.h>
1299 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1301 if test $fstype = no; then
1302 AC_TRY_CPP([#include <sys/statfs.h>
1303 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1305 if test $fstype = no; then
1306 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1308 if test $fstype = no; then
1309 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1311 if test $fstype = no; then
1312 AC_TRY_CPP([#include <sys/mount.h>
1313 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1315 AC_MSG_RESULT($fstype)
1317 dnl# --------------------------------------------------------------------------
1318 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1319 dnl# --------------------------------------------------------------------------
1327 AC_CHECK_TYPE(ino_t, unsigned long)
1328 AC_CHECK_TYPE(dev_t, unsigned long)
1329 AC_CHECK_TYPE(daddr_t, long)
1330 AC_CHECK_TYPE(major_t, int)
1331 AC_CHECK_TYPE(minor_t, int)
1332 AC_CHECK_TYPE(ssize_t, int)
1339 AC_CHECK_SIZEOF(char, 1)
1340 AC_CHECK_SIZEOF(short int, 2)
1341 AC_CHECK_SIZEOF(int, 4)
1342 AC_CHECK_SIZEOF(long int, 4)
1343 AC_CHECK_SIZEOF(long long int, 8)
1344 AC_CHECK_SIZEOF(int *, 4)
1346 # Check for sys/types.h types
1347 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1349 [ #include <sys/types.h> ],
1351 [ ac_cv_have_u_int="yes" ],
1352 [ ac_cv_have_u_int="no" ]
1355 if test "x$ac_cv_have_u_int" = "xyes" ; then
1356 AC_DEFINE(HAVE_U_INT)
1360 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1362 [ #include <sys/types.h> ],
1363 [ intmax_t a; a = 1;],
1364 [ ac_cv_have_intmax_t="yes" ],
1367 [ #include <stdint.h> ],
1368 [ intmax_t a; a = 1;],
1369 [ ac_cv_have_intmax_t="yes" ],
1370 [ ac_cv_have_intmax_t="no" ]
1376 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1377 AC_DEFINE(HAVE_INTMAX_T)
1382 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1384 [ #include <sys/types.h> ],
1385 [ u_intmax_t a; a = 1;],
1386 [ ac_cv_have_u_intmax_t="yes" ],
1389 [ #include <stdint.h> ],
1390 [ u_intmax_t a; a = 1;],
1391 [ ac_cv_have_u_intmax_t="yes" ],
1392 [ ac_cv_have_u_intmax_t="no" ]
1397 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1398 AC_DEFINE(HAVE_U_INTMAX_T)
1403 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1405 [ #include <sys/types.h> ],
1406 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1407 [ ac_cv_have_intxx_t="yes" ],
1408 [ ac_cv_have_intxx_t="no" ]
1411 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1412 AC_DEFINE(HAVE_INTXX_T)
1416 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1418 [ #include <sys/types.h> ],
1419 [ int64_t a; a = 1;],
1420 [ ac_cv_have_int64_t="yes" ],
1421 [ ac_cv_have_int64_t="no" ]
1424 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1425 AC_DEFINE(HAVE_INT64_T)
1429 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1431 [ #include <sys/types.h> ],
1432 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1433 [ ac_cv_have_u_intxx_t="yes" ],
1434 [ ac_cv_have_u_intxx_t="no" ]
1437 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1438 AC_DEFINE(HAVE_U_INTXX_T)
1442 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1444 [ #include <sys/types.h> ],
1445 [ u_int64_t a; a = 1;],
1446 [ ac_cv_have_u_int64_t="yes" ],
1447 [ ac_cv_have_u_int64_t="no" ]
1450 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1451 AC_DEFINE(HAVE_U_INT64_T)
1455 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1456 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1458 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1460 [ #include <sys/bitypes.h> ],
1461 [ int8_t a; int16_t b; int32_t c;
1462 u_int8_t e; u_int16_t f; u_int32_t g;
1463 a = b = c = e = f = g = 1; ],
1464 [ AC_DEFINE(HAVE_U_INTXX_T)
1465 AC_DEFINE(HAVE_INTXX_T)
1466 AC_DEFINE(HAVE_SYS_BITYPES_H)
1467 AC_MSG_RESULT(yes) ],
1468 [ AC_MSG_RESULT(no)]
1472 if test -z "$have_u_intxx_t" ; then
1473 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1475 [ #include <sys/types.h> ],
1476 [ uint8_t a; uint16_t b;
1477 uint32_t c; a = b = c = 1; ],
1478 [ ac_cv_have_uintxx_t="yes" ],
1479 [ ac_cv_have_uintxx_t="no" ]
1482 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1483 AC_DEFINE(HAVE_UINTXX_T)
1487 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1488 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1490 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1492 [ #include <sys/bitypes.h> ],
1493 [ int64_t a; u_int64_t b;
1495 [ AC_DEFINE(HAVE_U_INT64_T)
1496 AC_DEFINE(HAVE_INT64_T)
1497 AC_MSG_RESULT(yes) ],
1498 [ AC_MSG_RESULT(no)]
1502 if (test -z "$have_uintxx_t" && \
1503 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1505 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1507 [ #include <sys/bitypes.h> ],
1508 [ uint8_t a; uint16_t b;
1509 uint32_t c; a = b = c = 1; ],
1510 [ AC_DEFINE(HAVE_UINTXX_T)
1511 AC_MSG_RESULT(yes) ],
1512 [ AC_MSG_RESULT(no)]
1520 dnl# --------------------------------------------------------------------------
1521 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1522 dnl# --------------------------------------------------------------------------
1538 [echo 'configure: cannot find needed function.'; exit 1]
1541 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1542 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1544 AC_CHECK_FUNCS(chflags)
1546 AC_CHECK_FUNCS(snprintf vsnprintf gethostid getdomainname)
1548 dnl# --------------------------------------------------------------------------
1549 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1550 dnl# --------------------------------------------------------------------------
1551 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1553 # If resolver functions are not in libc check for -lnsl or -lresolv.
1554 AC_CHECK_FUNC(gethostbyname_r,
1555 AC_MSG_RESULT(using libc's resolver),
1556 AC_CHECK_LIB(nsl,gethostbyname_r)
1557 AC_CHECK_LIB(resolv,gethostbyname_r))
1561 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1562 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1563 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1565 dnl ----------------------------
1566 dnl check sa_len of sockaddr
1567 dnl ----------------------------
1568 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1569 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1570 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1572 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1573 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1577 dnl Check for IPv6 support
1578 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1579 [AC_TRY_LINK([ #include <sys/types.h>
1580 #include <sys/socket.h>
1581 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1583 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1585 if test "$ac_cv_ipv6_support" = yes; then
1586 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1595 AC_FUNC_CLOSEDIR_VOID
1596 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1597 # AC_FUNC_FNMATCH dnl use local version
1600 dnl# FreeBSD needs to link libxpg4
1601 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1604 AC_CHECK_LIB(sun, getpwnam)
1606 AC_CHECK_HEADERS(zlib.h)
1607 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1609 if test x$FDLIBS = x-lz; then
1610 AC_DEFINE(HAVE_LIBZ)
1614 AC_CHECK_HEADER(sys/acl.h)
1615 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1617 if test $ac_cv_lib_acl_acl_get_file = yes; then
1622 dnl Check for pthread libraries
1624 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1625 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1626 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1627 [AC_CHECK_FUNC(pthread_create)]
1637 LDFLAGS=${LDFLAGS--O}
1638 DB_LIBS="${SQL_LFLAGS}"
1640 CPPFLAGS="$CPPFLAGS"
1651 AC_SUBST(X_EXTRA_LIBS)
1655 dnl# extra configurable objects
1666 # Finally we set appropriate distribution specific
1667 # variables and defaults
1669 # PFILES are platform specific files
1670 PFILES="platforms/Makefile"
1674 hostname=`uname -n | cut -d '.' -f 1`
1678 PSCMD="ps -e -o pid,comm"
1680 platforms/aix/Makefile"
1681 TAPEDRIVE="/dev/rmt0.1"
1685 PTHREAD_LIB="-lpthread -lexc"
1686 if test "${CC}" = "gcc" ; then
1693 TAPEDRIVE="/dev/nrmt0"
1696 DISTVER=`uname -a |awk '{print $3}'`
1697 TAPEDRIVE="/dev/nrmt0"
1698 PTHREAD_LIB="-pthread"
1699 CFLAGS="${CFLAGS} -pthread"
1700 PSCMD="ps -x -o pid,command"
1704 platforms/bsdi/Makefile \
1705 platforms/bsdi/bacula-fd \
1706 platforms/bsdi/bacula-sd \
1707 platforms/bsdi/bacula-dir"
1708 largefile_support="yes"
1711 DISTVER=`uname -a |awk '{print $3}'`
1712 TAPEDRIVE="/dev/nrst0"
1715 WLDFLAGS="-mwindows"
1719 TAPEDRIVE="/dev/nst0"
1720 PSCMD="ps -e -o pid,command"
1723 platforms/darwin/Makefile"
1726 DISTVER=`cat /etc/debian_version`
1727 TAPEDRIVE="/dev/nrst0"
1728 PSCMD="ps -e -o pid,command"
1731 DISTVER=`uname -a |awk '{print $3}'`
1732 VER=`echo $DISTVER | cut -c 1`
1733 if test x$VER = x4 ; then
1734 PTHREAD_LIB="-pthread"
1735 CFLAGS="${CFLAGS} -pthread"
1739 TAPEDRIVE="/dev/nrsa0"
1740 PSCMD="ps -x -o pid,command"
1742 platforms/freebsd/Makefile \
1743 platforms/freebsd/bacula-fd \
1744 platforms/freebsd/bacula-sd \
1745 platforms/freebsd/bacula-dir"
1746 largefile_support="yes"
1749 PSCMD="UNIX95=1 ps -e -o pid,comm"
1750 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1752 TAPEDRIVE="/dev/rmt/0hnb"
1756 TAPEDRIVE="/dev/rmt/0cbn"
1757 PSCMD="ps -e -o pid,comm"
1759 platforms/irix/Makefile \
1760 platforms/irix/bacula-fd \
1761 platforms/irix/bacula-sd \
1762 platforms/irix/bacula-dir"
1765 DISTVER=`uname -a |awk '{print $3}'`
1768 TAPEDRIVE="/dev/nrst0"
1769 PSCMD="ps -a -o pid,command"
1770 PTHREAD_LIB="-pthread"
1771 CFLAGS="${CFLAGS} -pthread"
1774 DISTVER=`uname -a |awk '{print $3}'`
1777 TAPEDRIVE="/dev/nrst0"
1778 PSCMD="ps -ax -o pid,command"
1779 PTHREAD_LIB="-pthread"
1780 CFLAGS="${CFLAGS} -pthread"
1782 platforms/openbsd/Makefile \
1783 platforms/openbsd/bacula-fd \
1784 platforms/openbsd/bacula-sd \
1785 platforms/openbsd/bacula-dir"
1788 if test -f /etc/whitebox-release ; then
1789 f=/etc/whitebox-release
1791 f=/etc/redhat-release
1793 if test `cat $f | grep release |\
1794 cut -f 3 -d ' '`x = "Enterprise"x ; then
1795 DISTVER="Enterprise "`cat $f | grep release |\
1798 DISTVER=`cat /etc/redhat-release | grep release |\
1801 TAPEDRIVE="/dev/nst0"
1802 PSCMD="ps -e -o pid,command"
1804 platforms/redhat/Makefile \
1805 platforms/redhat/bacula-fd \
1806 platforms/redhat/bacula-sd \
1807 platforms/redhat/bacula-dir \
1808 platforms/redhat/bacula.spec \
1810 hostname=`hostname -s`
1813 DISTVER=`cat /etc/mandrake-release | grep release |\
1815 TAPEDRIVE="/dev/nst0"
1816 PSCMD="ps -e -o pid,command"
1818 platforms/mandrake/Makefile \
1819 platforms/mandrake/bacula-fd \
1820 platforms/mandrake/bacula-sd \
1821 platforms/mandrake/bacula-dir \
1822 platforms/mandrake/bacula.spec \
1826 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1827 TAPEDRIVE="/dev/nst0"
1828 PSCMD="ps -e -o pid,command"
1830 platforms/gentoo/Makefile \
1831 platforms/gentoo/bacula-init \
1832 platforms/gentoo/bacula-fd \
1833 platforms/gentoo/bacula-sd \
1834 platforms/gentoo/bacula-dir"
1837 DISTVER=`cat /etc/slackware-version`
1838 TAPEDRIVE="/dev/nst0"
1839 PSCMD="ps -e -o pid,command"
1841 platforms/slackware/Makefile \
1842 platforms/slackware/rc.bacula-fd \
1843 platforms/slackware/rc.bacula-sd \
1844 platforms/slackware/rc.bacula-dir\
1845 platforms/slackware/functions.bacula"
1849 TAPEDRIVE="/dev/rmt/0cbn"
1850 PSCMD="ps -e -o pid,comm"
1852 platforms/solaris/Makefile \
1853 platforms/solaris/bacula-fd \
1854 platforms/solaris/bacula-sd \
1855 platforms/solaris/bacula-dir"
1856 if test x$DISTVER = x5.6 ; then
1857 AC_DEFINE(HAVE_OLD_SOCKOPT)
1861 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1863 TAPEDRIVE="/dev/nst0"
1864 PSCMD="ps -e -o pid,command"
1866 platforms/suse/Makefile \
1867 platforms/suse/bacula-fd \
1868 platforms/suse/bacula-sd \
1869 platforms/suse/bacula-dir \
1870 platforms/suse/bacula \
1871 platforms/suse/bacula.spec"
1876 TAPEDRIVE="/dev/nst0"
1877 PSCMD="ps -e -o pid,command"
1879 platforms/suse/Makefile \
1880 platforms/suse/bacula-fd \
1881 platforms/suse/bacula-sd \
1882 platforms/suse/bacula-dir"
1886 TAPEDRIVE="/dev/nst0"
1889 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1895 LIBS="$PTHREAD_LIB $LIBS"
1897 AC_DEFINE_UNQUOTED(lld, "$lld")
1898 AC_DEFINE_UNQUOTED(llu, "$llu")
1906 dnl# common parts of the Makefile
1907 MCOMMON=./autoconf/Make.common
1908 AC_SUBST_FILE(MCOMMON)
1911 if test "x${subsysdir}" = "x${sbindir}" ; then
1914 echo "You have set both --sbindir and --with-subsys-dir"
1915 echo " equal to: ${subsysdir} "
1916 echo "This is not permitted. Please reconfigure."
1918 echo "Aborting configuration ..."
1924 AC_OUTPUT([autoconf/Make.common \
1927 rescue/linux/Makefile \
1928 rescue/linux/floppy/Makefile \
1929 rescue/linux/cdrom/Makefile \
1930 rescue/linux/cdrom/bacula/Makefile \
1931 rescue/freebsd/Makefile \
1932 rescue/solaris/Makefile \
1933 scripts/startmysql \
1935 scripts/btraceback \
1941 scripts/devel_bacula \
1944 scripts/bacula.desktop.gnome1 \
1945 scripts/bacula.desktop.gnome2 \
1946 scripts/bacula.desktop.gnome1.consolehelper \
1947 scripts/bacula.desktop.gnome2.consolehelper \
1948 scripts/bacula.desktop.gnome1.xsu \
1949 scripts/bacula.desktop.gnome2.xsu \
1950 scripts/gnome-console.console_apps \
1951 scripts/mtx-changer \
1952 scripts/bacula-tray-monitor.desktop \
1956 src/console/Makefile \
1957 src/console/bconsole.conf \
1958 src/gnome-console/Makefile \
1959 src/gnome-console/gnome-console.conf \
1960 src/gnome2-console/Makefile \
1961 src/gnome2-console/gnome-console.conf \
1962 src/wx-console/Makefile \
1963 src/wx-console/wx-console.conf \
1964 src/tray-monitor/Makefile \
1965 src/tray-monitor/tray-monitor.conf \
1967 src/dird/bacula-dir.conf \
1969 src/stored/Makefile \
1970 src/stored/bacula-sd.conf \
1971 src/filed/Makefile \
1972 src/filed/bacula-fd.conf \
1973 src/filed/win32/Makefile \
1975 src/cats/make_catalog_backup \
1976 src/cats/delete_catalog_backup \
1977 src/cats/create_postgresql_database \
1978 src/cats/update_postgresql_tables \
1979 src/cats/make_postgresql_tables \
1980 src/cats/grant_postgresql_privileges \
1981 src/cats/drop_postgresql_tables \
1982 src/cats/drop_postgresql_database \
1983 src/cats/create_mysql_database \
1984 src/cats/update_mysql_tables \
1985 src/cats/make_mysql_tables \
1986 src/cats/grant_mysql_privileges \
1987 src/cats/drop_mysql_tables \
1988 src/cats/drop_mysql_database \
1989 src/cats/create_sqlite_database \
1990 src/cats/update_sqlite_tables \
1991 src/cats/make_sqlite_tables \
1992 src/cats/grant_sqlite_privileges \
1993 src/cats/drop_sqlite_tables \
1994 src/cats/drop_sqlite_database \
1997 src/cats/create_bdb_database \
1998 src/cats/update_bdb_tables \
1999 src/cats/make_bdb_tables \
2000 src/cats/grant_bdb_privileges \
2001 src/cats/drop_bdb_tables \
2002 src/cats/drop_bdb_database \
2003 src/cats/create_bacula_database \
2004 src/cats/update_bacula_tables \
2005 src/cats/grant_bacula_privileges \
2006 src/cats/make_bacula_tables \
2007 src/cats/drop_bacula_tables \
2008 src/cats/drop_bacula_database \
2009 src/findlib/Makefile \
2010 src/tools/Makefile \
2011 src/win32/winbacula.nsi \
2012 src/win32/baculafd/bacula-fd.conf \
2013 src/win32/Makefile \
2014 src/win32/console/bconsole.conf \
2015 src/win32/wx-console/wx-console.conf \
2016 src/win32/pebuilder/Makefile \
2017 src/bimagemgr/Makefile \
2018 src/bimagemgr/bacula-bimagemgr.spec \
2020 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
2024 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2025 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2030 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2031 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2033 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2034 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2036 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2037 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2039 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2040 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2042 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2043 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2045 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2049 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2050 largefile_support="yes"
2054 # A whole lot of hand springs to get the compiler version.
2055 # This is because gcc changed the output in version 3.0
2057 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2058 if test "x${CCVERSION}" = "x" ; then
2059 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2061 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2062 if test x"${CXXVERSION}" = x ; then
2063 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2066 if test "x${subsysdir}" = "x${sbindir}" ; then
2069 echo "You have set --sbindir and --with-subsys-dir"
2070 echo " both equal to: ${subsysdir} "
2071 echo " This is not permitted. Please reconfigure."
2073 echo "Aborting configuration ..."
2079 if test "x${db_name}" = "xInternal" ; then
2082 echo "You have not specified either --enable-client-only or one of the"
2083 echo " supported databases: MySQL, PostgreSQL, or SQLite".
2084 echo " This is not permitted. Please reconfigure."
2086 echo "Aborting the configuration ..."
2093 Configuration on `date`:
2095 Host: $host -- ${DISTNAME} ${DISTVER}
2096 Bacula version: ${VERSION} (${DATE})
2097 Source code location: ${srcdir}
2098 Install binaries: ${sbindir}
2099 Install config files: ${sysconfdir}
2100 Scripts directory: ${scriptdir}
2101 Working directory: ${working_dir}
2102 PID directory: ${piddir}
2103 Subsys directory: ${subsysdir}
2104 C Compiler: ${CC} ${CCVERSION}
2105 C++ Compiler: ${CXX} ${CXXVERSION}
2106 Compiler flags: ${WCFLAGS} ${CFLAGS}
2107 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2109 Statically Linked Tools: ${support_static_tools}
2110 Statically Linked FD: ${support_static_fd}
2111 Statically Linked SD: ${support_static_sd}
2112 Statically Linked DIR: ${support_static_dir}
2113 Statically Linked CONS: ${support_static_cons}
2114 Database type: ${db_name}
2115 Database lib: ${DB_LIBS}
2117 Job Output Email: ${job_email}
2118 Traceback Email: ${dump_email}
2119 SMTP Host Address: ${smtp_host}
2121 Director Port: ${dir_port}
2122 File daemon Port: ${fd_port}
2123 Storage daemon Port: ${sd_port}
2125 Director User: ${dir_user}
2126 Director Group: ${dir_group}
2127 Storage Daemon User: ${sd_user}
2128 Storage DaemonGroup: ${sd_group}
2129 File Daemon User: ${fd_user}
2130 File Daemon Group: ${fd_group}
2132 SQL binaries Directory ${SQL_BINDIR}
2134 Large file support: $largefile_support
2135 Bacula conio support: ${got_conio} ${CONS_LIBS}
2136 readline support: ${got_readline} ${PRTREADLINE_SRC}
2137 TCP Wrappers support: ${TCPW_MSG}
2138 ZLIB support: ${have_zlib}
2139 enable-smartalloc: ${support_smartalloc}
2140 enable-gnome: ${support_gnome} ${gnome_version}
2141 enable-wx-console: ${support_wx_console}
2142 enable-tray-monitor: ${support_tray_monitor}
2143 client-only: ${build_client_only}
2144 ACL support: ${have_acl}
2145 Python support: ${support_python} ${PYTHON_LIBS}
2152 # cweb support: ${got_cweb} ${CWEB_SRC}
2153 # gmp support: ${got_gmp} ${GMP_SRC}