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(MKISOFS, mkisofs, mkisofs)
66 AC_PATH_PROG(PYTHON, python, python)
67 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
68 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
69 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
70 AC_PATH_PROG(WXCONFIG, wx-config, wx-config)
71 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
72 AC_PATH_PROG(PIDOF, pidof, pidof)
74 test -n "$ARFLAG" || ARFLAGS="cr"
81 AC_SUBST(LOCAL_CFLAGS)
82 AC_SUBST(LOCAL_LDFLAGS)
87 dnl --------------------------------------------------
88 dnl Bacula OP Sys determination (see aclocal.m4)
89 dnl --------------------------------------------------
92 # -----------------------------------------------------------
93 dnl Bacula OPSys Distribution determination (see aclocal.m4)
94 # ----------------------------------------------------------
95 BA_CHECK_OPSYS_DISTNAME
97 # -----------------------------------------------------------
98 dnl Check for gnome stuff for gnome-console
99 # ----------------------------------------------------------
100 AM_ACLOCAL_INCLUDE(gnome-macros)
102 # ------------------------------------------------------------------
103 # If the user has not set --prefix, we set our default to nothing.
104 # In this case, if the user has not set --sysconfdir, we set it
105 # to the package default of /etc/bacula. If either --prefix or
106 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
107 # ------------------------------------------------------------------
108 if test x${prefix} = xNONE ; then
109 if test `eval echo ${sysconfdir}` = NONE/etc ; then
110 sysconfdir=/etc/bacula
114 sysconfdir=`eval echo ${sysconfdir}`
116 # -------------------------------------------------------------------------
117 # If the user has not set --exec-prefix, we default to ${prefix}
118 # -------------------------------------------------------------------------
119 if test x${exec_prefix} = xNONE ; then
120 exec_prefix=${prefix}
123 # ------------------------------------------------------------------
124 # If the user has not set --sbindir, we set our default as /sbin
125 # ------------------------------------------------------------------
126 if test x$sbindir = x'${exec_prefix}/sbin' ; then
127 sbindir=${exec_prefix}/sbin
129 sbindir=`eval echo ${sbindir}`
131 # ------------------------------------------------------------------
132 # All list of languages for which a translation exist. Each
133 # language is separated by a space.
134 # ------------------------------------------------------------------
137 AC_PATH_PROGS(MSGFMT, msgfmt, no)
138 if test "$MSGFMT" = "no"
140 echo 'msgfmt program not found, disabling NLS !'
142 USE_INCLUDED_LIBINTL=no
150 support_postgresql=no
151 support_smartalloc=yes
155 support_wx_console=no
157 support_static_tools=no
160 support_static_dir=no
161 support_static_cons=no
168 dnl# --------------------------------------------------------------------------
169 dnl# CHECKING COMMAND LINE OPTIONS
170 dnl# --------------------------------------------------------------------------
172 # -------------------------------------------
173 # gnome (default off)
174 # -------------------------------------------
176 [ --enable-gnome enable build of gnome-console GUI [disabled]],
177 [if test x$enableval = xyes; then
182 if test x$support_gnome = xyes; then
183 abc=`$PKGCONFIG --exists libgnomeui-2.0`
185 if test $pkg = 0; then
186 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
187 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
188 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
189 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
190 AC_SUBST(GNOME_INCLUDEDIR)
191 AC_SUBST(GNOMEUI_LIBS)
192 AC_SUBST(GNOME_LIBDIR)
194 GNOME_DIR=src/gnome2-console
195 gnome_version="Version 2.x"
199 GNOME_DIR=src/gnome-console
200 gnome_version="Version 1.4"
206 # -------------------------------------------
207 # wx-console (default off)
208 # -------------------------------------------
209 AC_ARG_ENABLE(wx-console,
210 [ --enable-wx-console enable build of wxWidgets console [disabled]],
211 [if test x$enableval = xyes; then
212 support_wx_console=yes
216 if test x$support_wx_console = xyes; then
217 abc=`$WXCONFIG --cppflags`
219 if test $pkg = 0; then
220 WXCONS_CPPFLAGS=`$WXCONFIG --cppflags`
221 WXCONS_LDFLAGS=`$WXCONFIG --libs`
222 AC_SUBST(WXCONS_CPPFLAGS)
223 AC_SUBST(WXCONS_LDFLAGS)
224 WX_DIR=src/wx-console
227 echo "wx-config program not found. wx-console disabled."
229 support_wx_console=no
235 # -------------------------------------------
236 # tray-monitor (default off)
237 # -------------------------------------------
238 AC_ARG_ENABLE(tray-monitor,
239 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
240 [if test x$enableval = xyes; then
241 support_tray_monitor=yes
245 if test x$support_tray_monitor = xyes; then
246 abc=`$PKGCONFIG --exists gtk+-2.0`
248 if test $pkg = 0; then
249 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
250 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
251 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
252 AC_SUBST(TRAY_MONITOR_LDFLAGS)
253 TRAY_MONITOR_DIR=src/tray-monitor
254 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
256 if test $pkg = 0; then
257 AC_DEFINE(HAVE_GTK_2_4)
261 AC_SUBST(TRAY_MONITOR_DIR)
263 # -------------------------------------------
264 # smartalloc (default off)
265 # -------------------------------------------
266 AC_ARG_ENABLE(smartalloc,
267 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
268 [if test x$enableval = xno; then
269 support_smartalloc=no
272 if test x$support_smartalloc = xyes; then
273 AC_DEFINE(SMARTALLOC)
276 # -------------------------------------------
277 # static-tools (default off)
278 # -------------------------------------------
279 AC_ARG_ENABLE(static-tools,
280 [ --enable-static-tools enable static tape tools [disabled]],
281 [if test x$enableval = xyes; then
282 support_static_tools=yes
286 if test x$support_static_tools = xyes; then
287 TTOOL_LDFLAGS="-static"
289 AC_SUBST(TTOOL_LDFLAGS)
291 # -------------------------------------------
292 # static-fd (default off)
293 # -------------------------------------------
294 AC_ARG_ENABLE(static-fd,
295 [ --enable-static-fd enable static File daemon [disabled]],
296 [if test x$enableval = xyes; then
297 support_static_fd=yes
301 if test x$support_static_fd = xyes; then
302 STATIC_FD="static-bacula-fd"
306 # -------------------------------------------
307 # static-sd (default off)
308 # -------------------------------------------
309 AC_ARG_ENABLE(static-sd,
310 [ --enable-static-sd enable static Storage daemon [disabled]],
311 [if test x$enableval = xyes; then
312 support_static_sd=yes
316 if test x$support_static_sd = xyes; then
317 STATIC_SD="static-bacula-sd"
321 # -------------------------------------------
322 # static-dir (default off)
323 # -------------------------------------------
324 AC_ARG_ENABLE(static-dir,
325 [ --enable-static-dir enable static Director [disabled]],
326 [if test x$enableval = xyes; then
327 support_static_dir=yes
331 if test x$support_static_dir = xyes; then
332 STATIC_DIR="static-bacula-dir"
336 # -------------------------------------------
337 # static-cons (default off)
338 # -------------------------------------------
339 AC_ARG_ENABLE(static-cons,
340 [ --enable-static-cons enable static Console [disabled]],
341 [if test x$enableval = xyes; then
342 support_static_cons=yes
348 if test x$support_static_cons = xyes; then
349 STATIC_CONS="static-bconsole"
350 STATIC_GNOME_CONS="static-gnome-console"
351 STATIC_WX_CONS="static-wx-console"
353 AC_SUBST(STATIC_CONS)
354 AC_SUBST(STATIC_GNOME_CONS)
355 AC_SUBST(STATIC_WX_CONS)
357 # -------------------------------------------
358 # client_only (default off)
359 # -------------------------------------------
360 AC_ARG_ENABLE(client-only,
361 [ --enable-client-only build client (File daemon) only [disabled]],
362 [if test x$enableval = xyes; then
363 build_client_only=yes
367 if test x$build_client_only = xno; then
374 # ---------------------------------------------------
375 # Check for conio (Bacula readline substitute)(
376 # ---------------------------------------------------
377 # this allows you to turn it completely off
379 [ --disable-conio disable conio support [enabled]
381 [if test x$enableval = xno; then
386 if test x$support_conio = xyes; then
387 AC_CHECK_HEADER(termcap.h,
388 [ AC_CHECK_LIB(termcap, tgetent,
389 [ CONS_LIBS="-ltermcap"
394 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
396 [ AC_CHECK_LIB(ncurses, tgetent,
397 [ CONS_LIBS="-lncurses"
402 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
407 AC_CHECK_HEADERS(curses.h)
408 AC_CHECK_HEADER(term.h,
409 [ AC_CHECK_LIB(curses, tgetent,
410 [ CONS_LIBS="-lcurses"
415 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
418 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
427 # ---------------------------------------------------
428 # Check for readline support/directory (default off)
429 # ---------------------------------------------------
430 # this allows you to turn it completely off
431 AC_ARG_ENABLE(readline,
432 [ --disable-readline disable readline support [disable]
434 [if test x$enableval = xno; then
440 if test x$support_readline = xyes; then
441 AC_ARG_WITH(readline,
442 [ --with-readline=DIR specify readline library directory],
444 case "$with_readline" in
447 if test "$with_readline" != "yes"; then
448 CONS_INC="-I${with_readline}"
449 CONS_LDFLAGS="-L$with_readline"
451 with_readline="/usr/include/readline"
453 AC_CHECK_HEADER(${with_readline}/readline.h,
454 [ AC_DEFINE(HAVE_READLINE)
455 CONS_LIBS="-lreadline -ltermcap"
459 echo "readline.h not found. readline turned off ..."
466 # check for standard readline library
467 AC_CHECK_HEADER(/usr/include/readline/readline.h,
468 [ AC_DEFINE(HAVE_READLINE)
470 CONS_INC="-I/usr/include/readline"
471 CONS_LIBS="-lreadline -ltermcap"
473 # Did not find standard library, so try Bacula's default
474 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
475 [ AC_DEFINE(HAVE_READLINE)
477 CONS_INC="-I${TOP_DIR}/depkgs/readline"
478 CONS_LIBS="-lreadline -lhistory -ltermcap"
479 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
480 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
483 echo "readline.h not found. readline turned off ..."
499 AC_SUBST(CONS_LDFLAGS)
500 AC_SUBST(READLINE_SRC)
502 # Minimal stuff for readline Makefile configuration
507 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
508 AC_CHECK_FUNCS(nanosleep nl_langinfo)
509 AC_CHECK_HEADERS(varargs.h)
511 # End of readline/conio stuff
512 # -----------------------------------------------------------------------
514 # -----------------------------------------------------------------------
515 # Check for Python support
517 AC_MSG_CHECKING(for Python support)
520 --with-python[=DIR] Include Python support. DIR is the Python base
521 install directory, default is to search through
522 a number of common places for the Python files.],
526 if test "$withval" != "no"; then
527 if test "$withval" = "yes"; then
528 if test -f /usr/include/python2.2/Python.h; then
529 PYTHON_INCDIR=-I/usr/include/python2.2
530 PYTHON_LIBS="-L/usr/lib/python2.2/config -lpython2.2 -lutil -ldl"
531 elif test -f /usr/include/python2.3/Python.h; then
532 PYTHON_INCDIR=-I/usr/include/python2.3
533 PYTHON_LIBS="-L/usr/lib/python2.3/config -lpython2.3 -lutil -ldl"
534 elif test -f /usr/include/python2.4/Python.h; then
535 PYTHON_INCDIR=-I/usr/include/python2.4
536 PYTHON_LIBS="-L/usr/lib/python2.4/config -lpython2.4 -lutil -ldl"
537 elif test -f $prefix/include/Python.h; then
538 PYTHON_INCDIR=-I$prefix/include
539 PYTHON_LIBS="-L$prefix/lib/config -lpython -lutil -ldl"
542 AC_MSG_ERROR(Unable to find Python.h in standard locations)
545 if test -f $withval/Python.h; then
546 PYTHON_INCDIR=-I$withval
547 PYTHON_LIBS="-L$withval/config -lpython -lutil -ldl"
548 elif test -f $withval/include/Python.h; then
549 PYTHON_INCDIR=-I$withval/include
550 PYTHON_LIBS="-L$withval/lib/config -lpython -lutil -ldl"
553 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
556 AC_DEFINE([HAVE_PYTHON], 1)
566 AC_SUBST(PYTHON_LIBS)
567 AC_SUBST(PYTHON_INCDIR)
570 # -------------------------------------------
571 # check for cdrecord writer location
572 # get scsibus,target,lun
573 # -------------------------------------------
575 if test ! x$CDRECORD = x ; then
576 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD-RW | ${AWK} '{print $1}'`
577 if test x${CDSTL} = x ; then
578 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD+RW | ${AWK} '{print $1}'`
580 if test x${CDSTL} = x ; then
587 # ---------------------------------------------------
588 # Check for GMP support/directory
589 # ---------------------------------------------------
593 # [ --with-gmp[=DIR] Specify gmp library directory],
595 # case "$with_gmp" in
598 # if test "$with_gmp" != "yes"; then
599 # GMP_INC="-I$with_gmp"
601 # GMP_LDFLAGS="-L$with_gmp"
603 # with_gmp="/usr/include"
605 # AC_CHECK_HEADER($with_gmp/gmp.h,
606 # [ AC_MSG_RESULT(yes)
607 # AC_DEFINE(HAVE_GMP)
611 # [ AC_MSG_ERROR([*** gmp library missing])
617 # # check for standard gmp library
618 # AC_CHECK_HEADER(/usr/include/gmp.h,
619 # [ AC_MSG_RESULT(yes)
620 # AC_DEFINE(HAVE_GMP)
625 # # Did not find standard library, so use our own
627 # AC_DEFINE(HAVE_GMP)
630 # GMP_INC="-I${TOP_DIR}/depkgs/gmp"
632 # GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
633 # GMP_SRC="${TOP_DIR}/depkgs/gmp"
639 #AC_SUBST(GMP_LDFLAGS)
643 # -----------------------------------------------------------------------
646 # ---------------------------------------------------
647 # Check for CWEB support/directory
648 # ---------------------------------------------------
653 # [ --with-cweb[=DIR] Specify cweb library directory],
655 # case "$with_cweb" in
658 # if test "$with_cweb" != "yes"; then
659 # CWEB_INC="-I$with_cweb"
661 # CWEB_LDFLAGS="-L$with_cweb"
663 # with_cweb="/usr/include"
665 # AC_CHECK_HEADER($with_cweb/cweb.h,
666 # [ AC_MSG_RESULT(yes)
667 # AC_DEFINE(HAVE_CWEB)
671 # [ AC_MSG_ERROR([*** cweb library missing])
677 # # check for standard cweb library
678 # AC_CHECK_HEADER(/usr/include/cweb.h,
679 # [ AC_MSG_RESULT(yes)
680 # AC_DEFINE(HAVE_CWEB)
685 # # Did not find starndard library, so use our own
687 # AC_DEFINE(HAVE_CWEB)
690 # CWEB=${TOP_DIR}/depkgs/cweb
691 # CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
693 # CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
694 # CWEB_SRC="${TOP_DIR}/depkgs/cweb"
701 #AC_SUBST(CWEB_LDFLAGS)
705 # -----------------------------------------------------------------------
708 # Find where sockets are (especially for Solaris)
709 # Do this before the TCP Wrappers test since tcp wrappers
710 # uses the socket library and some linkers are stupid.
712 AC_CHECK_FUNC(socket,
713 AC_MSG_RESULT(using libc's socket),
714 AC_CHECK_LIB(xnet,socket)
715 AC_CHECK_LIB(socket,socket)
716 AC_CHECK_LIB(inet,socket))
719 # -----------------------------------------------------------
720 # Check whether user wants TCP wrappers support (default off)
721 # -----------------------------------------------------------
723 AC_ARG_WITH(tcp-wrappers,
724 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
726 if test "x$withval" != "xno" ; then
728 LIBS="$saved_LIBS -lwrap"
729 AC_MSG_CHECKING(for libwrap)
732 int deny_severity = 0;
733 int allow_severity = 0;
734 struct request_info *req; ],
735 [ hosts_access(req); ],
738 AC_DEFINE(HAVE_LIBWRAP)
741 LIBS="$saved_LIBS -lwrap -lnsl"
744 int deny_severity = 0;
745 int allow_severity = 0;
746 struct request_info *req; ],
747 [ hosts_access(req); ],
750 AC_DEFINE(HAVE_LIBWRAP)
753 [AC_MSG_ERROR([*** libwrap missing]) ] ]
760 # ------------------------------------------
761 # Where to place working dir
762 # ------------------------------------------
763 working_dir=`eval echo ${prefix}/var/bacula/working`
764 AC_ARG_WITH(working-dir,
765 [ --with-working-dir=PATH specify path of Bacula working directory],
767 if test "x$withval" != "xno" ; then
773 AC_SUBST(working_dir)
776 # ------------------------------------------
777 # Where to place scriptdir (script files)
778 # ------------------------------------------
779 scriptdir=`eval echo ${sysconfdir}`
780 AC_ARG_WITH(scriptdir,
781 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
783 if test "x$withval" != "xno" ; then
792 # ------------------------------------------
793 # Where to send dump email
794 # ------------------------------------------
795 dump_email=root@localhost
796 AC_ARG_WITH(dump-email,
797 [ --with-dump-email=EMAIL dump email address],
799 if test "x$withval" != "xno" ; then
807 # ------------------------------------------
808 # Where to send job email
809 # ------------------------------------------
810 job_email=root@localhost
811 AC_ARG_WITH(job-email,
812 [ --with-job-email=EMAIL job output email address],
814 if test "x$withval" != "xno" ; then
822 # ------------------------------------------
823 # Where to find smtp host
824 # ------------------------------------------
826 AC_ARG_WITH(smtp_host,
827 [ --with-smtp-host=HOST SMTP mail host address],
829 if test "x$withval" != "xno" ; then
838 # ------------------------------------
839 # Where to place pid files
840 # ------------------------------------
843 [ --with-pid-dir=PATH specify location of Bacula pid files],
845 if test "x$withval" != "xno" ; then
851 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
855 # ------------------------------------
856 # Where to place subsys "lock file"
857 # ------------------------------------
858 subsysdir=/var/run/subsys
859 AC_ARG_WITH(subsys-dir,
860 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
862 if test "x$withval" != "xno" ; then
872 # ------------------------------------
873 # Where to start assigning ports
874 # ------------------------------------
876 AC_ARG_WITH(baseport,
877 [ --with-baseport=PORT specify base port address for daemons],
879 if test "x$withval" != "xno" ; then
886 dir_port=`expr $baseport`
887 fd_port=`expr $baseport + 1`
888 sd_port=`expr $fd_port + 1`
895 # ------------------------------------------
897 # ------------------------------------------
899 AC_ARG_WITH(dir-password,
900 [ --with-dir-password=PASSWORD specify Director's password],
902 if test "x$withval" != "xno" ; then
903 dir_password=$withval
908 if test "x$dir_password" = "x" ; then
909 if test "x$OPENSSL" = "xnone" ; then
910 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
911 key=`autoconf/randpass 33`
913 key=`openssl rand -base64 33`
919 AC_ARG_WITH(fd-password,
920 [ --with-fd-password=PASSWORD specify Client's password],
922 if test "x$withval" != "xno" ; then
928 if test "x$fd_password" = "x" ; then
929 if test "x$OPENSSL" = "xnone" ; then
930 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
931 key=`autoconf/randpass 37`
933 key=`openssl rand -base64 33`
939 AC_ARG_WITH(sd-password,
940 [ --with-sd-password=PASSWORD specify Storage daemon's password],
942 if test "x$withval" != "xno" ; then
948 if test "x$sd_password" = "x" ; then
949 if test "x$OPENSSL" = "xnone" ; then
950 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
951 key=`autoconf/randpass 41`
953 key=`openssl rand -base64 33`
959 AC_ARG_WITH(mon-dir-password,
960 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
962 if test "x$withval" != "xno" ; then
963 mon_dir_password=$withval
968 if test "x$mon_dir_password" = "x" ; then
969 if test "x$OPENSSL" = "xnone" ; then
970 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
971 key=`autoconf/randpass 33`
973 key=`openssl rand -base64 33`
975 mon_dir_password=$key
979 AC_ARG_WITH(mon-fd-password,
980 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
982 if test "x$withval" != "xno" ; then
983 mon_fd_password=$withval
988 if test "x$mon_fd_password" = "x" ; then
989 if test "x$OPENSSL" = "xnone" ; then
990 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
991 key=`autoconf/randpass 37`
993 key=`openssl rand -base64 33`
999 AC_ARG_WITH(mon-sd-password,
1000 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
1002 if test "x$withval" != "xno" ; then
1003 mon_sd_password=$withval
1008 if test "x$mon_sd_password" = "x" ; then
1009 if test "x$OPENSSL" = "xnone" ; then
1010 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
1011 key=`autoconf/randpass 41`
1013 key=`openssl rand -base64 33`
1015 mon_sd_password=$key
1018 AC_SUBST(dir_password)
1019 AC_SUBST(fd_password)
1020 AC_SUBST(sd_password)
1021 AC_SUBST(mon_dir_password)
1022 AC_SUBST(mon_fd_password)
1023 AC_SUBST(mon_sd_password)
1025 # -------------------------------------------------------------------------
1026 # Set variables for bimagemgr installation
1027 # -------------------------------------------------------------------------
1028 bimagemgr_cgidir=/var/www/cgi-bin
1029 AC_ARG_WITH(bimagemgr-cgidir,
1030 [ --with-bimagemgr-cgidir=DIR specify bimagemgr cgi-bin dir],
1032 if test "x$withval" != "xno" ; then
1033 bimagemgr_cgidir=$withval
1038 bimagemgr_docdir=/var/www/html
1039 AC_ARG_WITH(bimagemgr-docdir,
1040 [ --with-bimagemgr-docdir=DIR specify bimagemgr doc root dir],
1042 if test "x$withval" != "xno" ; then
1043 bimagemgr_docdir=$withval
1048 bimagemgr_binowner=root
1049 AC_ARG_WITH(bimagemgr-binowner,
1050 [ --with-bimagemgr-binowner=USER specify bimagemgr binary file owner],
1052 if test "x$withval" != "xno" ; then
1053 bimagemgr_binowner=$withval
1058 bimagemgr_bingroup=root
1059 AC_ARG_WITH(bimagemgr-bingroup,
1060 [ --with-bimagemgr-bingroup=USER specify bimagemgr binary file group],
1062 if test "x$withval" != "xno" ; then
1063 bimagemgr_bingroup=$withval
1068 bimagemgr_dataowner=apache
1069 AC_ARG_WITH(bimagemgr-dataowner,
1070 [ --with-bimagemgr-dataowner=USER specify bimagemgr data file owner],
1072 if test "x$withval" != "xno" ; then
1073 bimagemgr_dataowner=$withval
1078 bimagemgr_datagroup=apache
1079 AC_ARG_WITH(bimagemgr-datagroup,
1080 [ --with-bimagemgr-datagroup=USER specify bimagemgr data file group],
1082 if test "x$withval" != "xno" ; then
1083 bimagemgr_datagroup=$withval
1088 AC_SUBST(bimagemgr_cgidir)
1089 AC_SUBST(bimagemgr_docdir)
1090 AC_SUBST(bimagemgr_binowner)
1091 AC_SUBST(bimagemgr_bingroup)
1092 AC_SUBST(bimagemgr_dataowner)
1093 AC_SUBST(bimagemgr_datagroup)
1096 # Handle users and groups for each daemon
1099 AC_ARG_WITH(dir_user,
1100 [ --with-dir-user=USER specify user for Director daemon],
1102 if test "x$withval" != "x" ; then
1109 AC_ARG_WITH(dir_group,
1110 [ --with-dir-group=GROUP specify group for Director daemon],
1112 if test "x$withval" != "x" ; then
1119 AC_ARG_WITH(sd_user,
1120 [ --with-sd-user=USER specify user for Storage daemon],
1122 if test "x$withval" != "x" ; then
1129 AC_ARG_WITH(sd_group,
1130 [ --with-sd-group=GROUP specify group for Storage daemon],
1132 if test "x$withval" != "x" ; then
1139 AC_ARG_WITH(fd_user,
1140 [ --with-fd-user=USER specify user for File daemon],
1142 if test "x$withval" != "x" ; then
1149 AC_ARG_WITH(fd_group,
1150 [ --with-fd-group=GROUP specify group for File daemon],
1152 if test "x$withval" != "x" ; then
1169 # allow setting default executable permissions
1172 AC_ARG_WITH(sbin-perm,
1173 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1175 if test "x$withval" != "x" ; then
1183 # ------------------------------------------------
1184 # Bacula check for various SQL database engines
1185 # ------------------------------------------------
1186 BA_CHECK_POSTGRESQL_DB
1195 AC_DEFINE(PROTOTYPES)
1197 dnl# --------------------------------------------------------------------------
1198 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1200 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1201 if test -z "$CCOPTS"; then
1202 CCOPTS='-g -O2 -Wall'
1211 dnl See if we can use 64 bit file addresses
1212 largefile_support="no"
1218 dnl# --------------------------------------------------------------------------
1219 dnl# CHECKING FOR HEADER FILES
1220 dnl# --------------------------------------------------------------------------
1256 AC_STRUCT_ST_BLKSIZE
1260 dnl# --------------------------------------------------------------------------
1261 dnl# Check for utime.h structure
1262 dnl# --------------------------------------------------------------------------
1263 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1265 #include <sys/types.h>
1266 #include <utime.h>], [struct utimbuf foo],
1267 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1268 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1270 dnl# --------------------------------------------------------------------------
1271 dnl# Check for socklen_t
1272 dnl# --------------------------------------------------------------------------
1273 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1275 #include <sys/types.h>
1276 #include <sys/socket.h>],
1278 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1279 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1281 dnl# --------------------------------------------------------------------------
1282 dnl# Check for bigendian
1283 dnl# --------------------------------------------------------------------------
1284 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1286 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1287 [ba_cv_bigendian=yes],
1288 [ba_cv_bigendian=no],
1289 [ba_cv_bigendian=no])])
1290 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1296 dnl# --------------------------------------------------------------------------
1297 dnl# CHECKING FOR FILESYSTEM TYPE
1298 dnl# --------------------------------------------------------------------------
1299 AC_MSG_CHECKING(how to get filesystem type)
1301 # The order of these tests is important.
1302 AC_TRY_CPP([#include <sys/statvfs.h>
1303 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1304 if test $fstype = no; then
1305 AC_TRY_CPP([#include <sys/statfs.h>
1306 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1308 if test $fstype = no; then
1309 AC_TRY_CPP([#include <sys/statfs.h>
1310 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1312 if test $fstype = no; then
1313 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1315 if test $fstype = no; then
1316 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1318 if test $fstype = no; then
1319 AC_TRY_CPP([#include <sys/mount.h>
1320 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1322 AC_MSG_RESULT($fstype)
1324 dnl# --------------------------------------------------------------------------
1325 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1326 dnl# --------------------------------------------------------------------------
1334 AC_CHECK_TYPE(ino_t, unsigned long)
1335 AC_CHECK_TYPE(dev_t, unsigned long)
1336 AC_CHECK_TYPE(daddr_t, long)
1337 AC_CHECK_TYPE(major_t, int)
1338 AC_CHECK_TYPE(minor_t, int)
1339 AC_CHECK_TYPE(ssize_t, int)
1346 AC_CHECK_SIZEOF(char, 1)
1347 AC_CHECK_SIZEOF(short int, 2)
1348 AC_CHECK_SIZEOF(int, 4)
1349 AC_CHECK_SIZEOF(long int, 4)
1350 AC_CHECK_SIZEOF(long long int, 8)
1351 AC_CHECK_SIZEOF(int *, 4)
1353 # Check for sys/types.h types
1354 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1356 [ #include <sys/types.h> ],
1358 [ ac_cv_have_u_int="yes" ],
1359 [ ac_cv_have_u_int="no" ]
1362 if test "x$ac_cv_have_u_int" = "xyes" ; then
1363 AC_DEFINE(HAVE_U_INT)
1367 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1369 [ #include <sys/types.h> ],
1370 [ intmax_t a; a = 1;],
1371 [ ac_cv_have_intmax_t="yes" ],
1374 [ #include <stdint.h> ],
1375 [ intmax_t a; a = 1;],
1376 [ ac_cv_have_intmax_t="yes" ],
1377 [ ac_cv_have_intmax_t="no" ]
1383 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1384 AC_DEFINE(HAVE_INTMAX_T)
1389 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1391 [ #include <sys/types.h> ],
1392 [ u_intmax_t a; a = 1;],
1393 [ ac_cv_have_u_intmax_t="yes" ],
1396 [ #include <stdint.h> ],
1397 [ u_intmax_t a; a = 1;],
1398 [ ac_cv_have_u_intmax_t="yes" ],
1399 [ ac_cv_have_u_intmax_t="no" ]
1404 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1405 AC_DEFINE(HAVE_U_INTMAX_T)
1410 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1412 [ #include <sys/types.h> ],
1413 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1414 [ ac_cv_have_intxx_t="yes" ],
1415 [ ac_cv_have_intxx_t="no" ]
1418 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1419 AC_DEFINE(HAVE_INTXX_T)
1423 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1425 [ #include <sys/types.h> ],
1426 [ int64_t a; a = 1;],
1427 [ ac_cv_have_int64_t="yes" ],
1428 [ ac_cv_have_int64_t="no" ]
1431 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1432 AC_DEFINE(HAVE_INT64_T)
1436 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1438 [ #include <sys/types.h> ],
1439 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1440 [ ac_cv_have_u_intxx_t="yes" ],
1441 [ ac_cv_have_u_intxx_t="no" ]
1444 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1445 AC_DEFINE(HAVE_U_INTXX_T)
1449 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1451 [ #include <sys/types.h> ],
1452 [ u_int64_t a; a = 1;],
1453 [ ac_cv_have_u_int64_t="yes" ],
1454 [ ac_cv_have_u_int64_t="no" ]
1457 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1458 AC_DEFINE(HAVE_U_INT64_T)
1462 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1463 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1465 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1467 [ #include <sys/bitypes.h> ],
1468 [ int8_t a; int16_t b; int32_t c;
1469 u_int8_t e; u_int16_t f; u_int32_t g;
1470 a = b = c = e = f = g = 1; ],
1471 [ AC_DEFINE(HAVE_U_INTXX_T)
1472 AC_DEFINE(HAVE_INTXX_T)
1473 AC_DEFINE(HAVE_SYS_BITYPES_H)
1474 AC_MSG_RESULT(yes) ],
1475 [ AC_MSG_RESULT(no)]
1479 if test -z "$have_u_intxx_t" ; then
1480 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1482 [ #include <sys/types.h> ],
1483 [ uint8_t a; uint16_t b;
1484 uint32_t c; a = b = c = 1; ],
1485 [ ac_cv_have_uintxx_t="yes" ],
1486 [ ac_cv_have_uintxx_t="no" ]
1489 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1490 AC_DEFINE(HAVE_UINTXX_T)
1494 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1495 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1497 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1499 [ #include <sys/bitypes.h> ],
1500 [ int64_t a; u_int64_t b;
1502 [ AC_DEFINE(HAVE_U_INT64_T)
1503 AC_DEFINE(HAVE_INT64_T)
1504 AC_MSG_RESULT(yes) ],
1505 [ AC_MSG_RESULT(no)]
1509 if (test -z "$have_uintxx_t" && \
1510 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1512 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1514 [ #include <sys/bitypes.h> ],
1515 [ uint8_t a; uint16_t b;
1516 uint32_t c; a = b = c = 1; ],
1517 [ AC_DEFINE(HAVE_UINTXX_T)
1518 AC_MSG_RESULT(yes) ],
1519 [ AC_MSG_RESULT(no)]
1527 dnl# --------------------------------------------------------------------------
1528 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1529 dnl# --------------------------------------------------------------------------
1545 [echo 'configure: cannot find needed function.'; exit 1]
1548 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1549 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1551 AC_CHECK_FUNCS(chflags)
1553 AC_CHECK_FUNCS(snprintf vsnprintf gethostid getdomainname)
1555 dnl# --------------------------------------------------------------------------
1556 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1557 dnl# --------------------------------------------------------------------------
1558 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1560 # If resolver functions are not in libc check for -lnsl or -lresolv.
1561 AC_CHECK_FUNC(gethostbyname_r,
1562 AC_MSG_RESULT(using libc's resolver),
1563 AC_CHECK_LIB(nsl,gethostbyname_r)
1564 AC_CHECK_LIB(resolv,gethostbyname_r))
1568 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1569 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1570 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1572 dnl ----------------------------
1573 dnl check sa_len of sockaddr
1574 dnl ----------------------------
1575 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1576 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1577 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1579 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1580 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1584 dnl Check for IPv6 support
1585 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1586 [AC_TRY_LINK([ #include <sys/types.h>
1587 #include <sys/socket.h>
1588 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1590 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1592 if test "$ac_cv_ipv6_support" = yes; then
1593 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1602 AC_FUNC_CLOSEDIR_VOID
1603 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1604 # AC_FUNC_FNMATCH dnl use local version
1607 dnl# FreeBSD needs to link libxpg4
1608 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1611 AC_CHECK_LIB(sun, getpwnam)
1613 AC_CHECK_HEADERS(zlib.h)
1614 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1616 if test x$FDLIBS = x-lz; then
1617 AC_DEFINE(HAVE_LIBZ)
1621 AC_CHECK_HEADER(sys/acl.h)
1622 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1624 if test $ac_cv_lib_acl_acl_get_file = yes; then
1629 dnl Check for pthread libraries
1631 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1632 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1633 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1634 [AC_CHECK_FUNC(pthread_create)]
1644 LDFLAGS=${LDFLAGS--O}
1645 DB_LIBS="${SQL_LFLAGS}"
1647 CPPFLAGS="$CPPFLAGS"
1658 AC_SUBST(X_EXTRA_LIBS)
1662 dnl# extra configurable objects
1673 # Finally we set appropriate distribution specific
1674 # variables and defaults
1676 # PFILES are platform specific files
1677 PFILES="platforms/Makefile"
1681 hostname=`uname -n | cut -d '.' -f 1`
1685 PSCMD="ps -e -o pid,comm"
1687 platforms/aix/Makefile"
1688 TAPEDRIVE="/dev/rmt0.1"
1692 PTHREAD_LIB="-lpthread -lexc"
1693 if test "${CC}" = "gcc" ; then
1700 TAPEDRIVE="/dev/nrmt0"
1703 DISTVER=`uname -a |awk '{print $3}'`
1704 TAPEDRIVE="/dev/nrmt0"
1705 PTHREAD_LIB="-pthread"
1706 CFLAGS="${CFLAGS} -pthread"
1707 PSCMD="ps -x -o pid,command"
1711 platforms/bsdi/Makefile \
1712 platforms/bsdi/bacula-fd \
1713 platforms/bsdi/bacula-sd \
1714 platforms/bsdi/bacula-dir"
1715 largefile_support="yes"
1718 DISTVER=`uname -a |awk '{print $3}'`
1719 TAPEDRIVE="/dev/nrst0"
1722 WLDFLAGS="-mwindows"
1726 TAPEDRIVE="/dev/nst0"
1727 PSCMD="ps -e -o pid,command"
1730 platforms/darwin/Makefile"
1733 DISTVER=`cat /etc/debian_version`
1734 TAPEDRIVE="/dev/nrst0"
1735 PSCMD="ps -e -o pid,command"
1738 DISTVER=`uname -a |awk '{print $3}'`
1739 VER=`echo $DISTVER | cut -c 1`
1740 if test x$VER = x4 ; then
1741 PTHREAD_LIB="-pthread"
1742 CFLAGS="${CFLAGS} -pthread"
1746 TAPEDRIVE="/dev/nrsa0"
1747 PSCMD="ps -x -o pid,command"
1749 platforms/freebsd/Makefile \
1750 platforms/freebsd/bacula-fd \
1751 platforms/freebsd/bacula-sd \
1752 platforms/freebsd/bacula-dir"
1753 largefile_support="yes"
1756 PSCMD="UNIX95=1 ps -e -o pid,comm"
1757 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1759 TAPEDRIVE="/dev/rmt/0hnb"
1763 TAPEDRIVE="/dev/rmt/0cbn"
1764 PSCMD="ps -e -o pid,comm"
1766 platforms/irix/Makefile \
1767 platforms/irix/bacula-fd \
1768 platforms/irix/bacula-sd \
1769 platforms/irix/bacula-dir"
1772 DISTVER=`uname -a |awk '{print $3}'`
1775 TAPEDRIVE="/dev/nrst0"
1776 PSCMD="ps -a -o pid,command"
1777 PTHREAD_LIB="-pthread"
1778 CFLAGS="${CFLAGS} -pthread"
1781 DISTVER=`uname -a |awk '{print $3}'`
1784 TAPEDRIVE="/dev/nrst0"
1785 PSCMD="ps -ax -o pid,command"
1786 PTHREAD_LIB="-pthread"
1787 CFLAGS="${CFLAGS} -pthread"
1789 platforms/openbsd/Makefile \
1790 platforms/openbsd/bacula-fd \
1791 platforms/openbsd/bacula-sd \
1792 platforms/openbsd/bacula-dir"
1795 if test -f /etc/whitebox-release ; then
1796 f=/etc/whitebox-release
1798 f=/etc/redhat-release
1800 if test `cat $f | grep release |\
1801 cut -f 3 -d ' '`x = "Enterprise"x ; then
1802 DISTVER="Enterprise "`cat $f | grep release |\
1805 DISTVER=`cat /etc/redhat-release | grep release |\
1808 TAPEDRIVE="/dev/nst0"
1809 PSCMD="ps -e -o pid,command"
1811 platforms/redhat/Makefile \
1812 platforms/redhat/bacula-fd \
1813 platforms/redhat/bacula-sd \
1814 platforms/redhat/bacula-dir \
1815 platforms/redhat/bacula.spec \
1817 hostname=`hostname -s`
1820 DISTVER=`cat /etc/mandrake-release | grep release |\
1822 TAPEDRIVE="/dev/nst0"
1823 PSCMD="ps -e -o pid,command"
1825 platforms/mandrake/Makefile \
1826 platforms/mandrake/bacula-fd \
1827 platforms/mandrake/bacula-sd \
1828 platforms/mandrake/bacula-dir \
1829 platforms/mandrake/bacula.spec \
1833 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1834 TAPEDRIVE="/dev/nst0"
1835 PSCMD="ps -e -o pid,command"
1837 platforms/gentoo/Makefile \
1838 platforms/gentoo/bacula-init \
1839 platforms/gentoo/bacula-fd \
1840 platforms/gentoo/bacula-sd \
1841 platforms/gentoo/bacula-dir"
1844 DISTVER=`cat /etc/slackware-version`
1845 TAPEDRIVE="/dev/nst0"
1846 PSCMD="ps -e -o pid,command"
1848 platforms/slackware/Makefile \
1849 platforms/slackware/rc.bacula-fd \
1850 platforms/slackware/rc.bacula-sd \
1851 platforms/slackware/rc.bacula-dir\
1852 platforms/slackware/functions.bacula"
1856 TAPEDRIVE="/dev/rmt/0cbn"
1857 PSCMD="ps -e -o pid,comm"
1859 platforms/solaris/Makefile \
1860 platforms/solaris/bacula-fd \
1861 platforms/solaris/bacula-sd \
1862 platforms/solaris/bacula-dir"
1863 if test x$DISTVER = x5.6 ; then
1864 AC_DEFINE(HAVE_OLD_SOCKOPT)
1868 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1870 TAPEDRIVE="/dev/nst0"
1871 PSCMD="ps -e -o pid,command"
1873 platforms/suse/Makefile \
1874 platforms/suse/bacula-fd \
1875 platforms/suse/bacula-sd \
1876 platforms/suse/bacula-dir \
1877 platforms/suse/bacula \
1878 platforms/suse/bacula.spec"
1883 TAPEDRIVE="/dev/nst0"
1884 PSCMD="ps -e -o pid,command"
1886 platforms/suse/Makefile \
1887 platforms/suse/bacula-fd \
1888 platforms/suse/bacula-sd \
1889 platforms/suse/bacula-dir"
1893 TAPEDRIVE="/dev/nst0"
1896 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1902 LIBS="$PTHREAD_LIB $LIBS"
1904 AC_DEFINE_UNQUOTED(lld, "$lld")
1905 AC_DEFINE_UNQUOTED(llu, "$llu")
1913 dnl# common parts of the Makefile
1914 MCOMMON=./autoconf/Make.common
1915 AC_SUBST_FILE(MCOMMON)
1918 if test "x${subsysdir}" = "x${sbindir}" ; then
1921 echo "You have set both --sbindir and --with-subsys-dir"
1922 echo " equal to: ${subsysdir} "
1923 echo "This is not permitted. Please reconfigure."
1925 echo "Aborting configuration ..."
1931 AC_OUTPUT([autoconf/Make.common \
1934 rescue/linux/Makefile \
1935 rescue/linux/floppy/Makefile \
1936 rescue/linux/cdrom/Makefile \
1937 rescue/linux/cdrom/bacula/Makefile \
1938 rescue/freebsd/Makefile \
1939 rescue/solaris/Makefile \
1940 scripts/startmysql \
1942 scripts/btraceback \
1948 scripts/devel_bacula \
1951 scripts/bacula.desktop.gnome1 \
1952 scripts/bacula.desktop.gnome2 \
1953 scripts/bacula.desktop.gnome1.consolehelper \
1954 scripts/bacula.desktop.gnome2.consolehelper \
1955 scripts/bacula.desktop.gnome1.xsu \
1956 scripts/bacula.desktop.gnome2.xsu \
1957 scripts/gnome-console.console_apps \
1958 scripts/mtx-changer \
1959 scripts/dvd-writepart \
1960 scripts/dvd-freespace \
1961 scripts/bacula-tray-monitor.desktop \
1962 scripts/logwatch/Makefile \
1963 scripts/logwatch/logfile.bacula.conf \
1967 src/console/Makefile \
1968 src/console/bconsole.conf \
1969 src/gnome-console/Makefile \
1970 src/gnome-console/gnome-console.conf \
1971 src/gnome2-console/Makefile \
1972 src/gnome2-console/gnome-console.conf \
1973 src/wx-console/Makefile \
1974 src/wx-console/wx-console.conf \
1975 src/tray-monitor/Makefile \
1976 src/tray-monitor/tray-monitor.conf \
1978 src/dird/bacula-dir.conf \
1980 src/stored/Makefile \
1981 src/stored/bacula-sd.conf \
1982 src/filed/Makefile \
1983 src/filed/bacula-fd.conf \
1984 src/filed/win32/Makefile \
1986 src/cats/make_catalog_backup \
1987 src/cats/delete_catalog_backup \
1988 src/cats/create_postgresql_database \
1989 src/cats/update_postgresql_tables \
1990 src/cats/make_postgresql_tables \
1991 src/cats/grant_postgresql_privileges \
1992 src/cats/drop_postgresql_tables \
1993 src/cats/drop_postgresql_database \
1994 src/cats/create_mysql_database \
1995 src/cats/update_mysql_tables \
1996 src/cats/make_mysql_tables \
1997 src/cats/grant_mysql_privileges \
1998 src/cats/drop_mysql_tables \
1999 src/cats/drop_mysql_database \
2000 src/cats/create_sqlite_database \
2001 src/cats/update_sqlite_tables \
2002 src/cats/make_sqlite_tables \
2003 src/cats/grant_sqlite_privileges \
2004 src/cats/drop_sqlite_tables \
2005 src/cats/drop_sqlite_database \
2008 src/cats/create_bdb_database \
2009 src/cats/update_bdb_tables \
2010 src/cats/make_bdb_tables \
2011 src/cats/grant_bdb_privileges \
2012 src/cats/drop_bdb_tables \
2013 src/cats/drop_bdb_database \
2014 src/cats/create_bacula_database \
2015 src/cats/update_bacula_tables \
2016 src/cats/grant_bacula_privileges \
2017 src/cats/make_bacula_tables \
2018 src/cats/drop_bacula_tables \
2019 src/cats/drop_bacula_database \
2020 src/findlib/Makefile \
2021 src/tools/Makefile \
2022 src/win32/winbacula.nsi \
2023 src/win32/baculafd/bacula-fd.conf \
2024 src/win32/Makefile \
2025 src/win32/console/bconsole.conf \
2026 src/win32/wx-console/wx-console.conf \
2027 src/win32/pebuilder/Makefile \
2028 src/bimagemgr/Makefile \
2029 src/bimagemgr/bacula-bimagemgr.spec \
2031 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
2035 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2036 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2041 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2042 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2044 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2045 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2047 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2048 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2050 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2051 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2053 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2054 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2056 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2060 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2061 largefile_support="yes"
2065 # A whole lot of hand springs to get the compiler version.
2066 # This is because gcc changed the output in version 3.0
2068 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2069 if test "x${CCVERSION}" = "x" ; then
2070 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2072 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2073 if test x"${CXXVERSION}" = x ; then
2074 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2077 if test "x${subsysdir}" = "x${sbindir}" ; then
2080 echo "You have set --sbindir and --with-subsys-dir"
2081 echo " both equal to: ${subsysdir} "
2082 echo " This is not permitted. Please reconfigure."
2084 echo "Aborting configuration ..."
2090 if test "x${db_name}" = "xInternal" ; then
2093 echo "You have not specified either --enable-client-only or one of the"
2094 echo " supported databases: MySQL, PostgreSQL, or SQLite".
2095 echo " This is not permitted. Please reconfigure."
2097 echo "Aborting the configuration ..."
2104 Configuration on `date`:
2106 Host: $host -- ${DISTNAME} ${DISTVER}
2107 Bacula version: ${VERSION} (${DATE})
2108 Source code location: ${srcdir}
2109 Install binaries: ${sbindir}
2110 Install config files: ${sysconfdir}
2111 Scripts directory: ${scriptdir}
2112 Working directory: ${working_dir}
2113 PID directory: ${piddir}
2114 Subsys directory: ${subsysdir}
2115 C Compiler: ${CC} ${CCVERSION}
2116 C++ Compiler: ${CXX} ${CXXVERSION}
2117 Compiler flags: ${WCFLAGS} ${CFLAGS}
2118 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2120 Statically Linked Tools: ${support_static_tools}
2121 Statically Linked FD: ${support_static_fd}
2122 Statically Linked SD: ${support_static_sd}
2123 Statically Linked DIR: ${support_static_dir}
2124 Statically Linked CONS: ${support_static_cons}
2125 Database type: ${db_name}
2126 Database lib: ${DB_LIBS}
2128 Job Output Email: ${job_email}
2129 Traceback Email: ${dump_email}
2130 SMTP Host Address: ${smtp_host}
2132 Director Port: ${dir_port}
2133 File daemon Port: ${fd_port}
2134 Storage daemon Port: ${sd_port}
2136 Director User: ${dir_user}
2137 Director Group: ${dir_group}
2138 Storage Daemon User: ${sd_user}
2139 Storage DaemonGroup: ${sd_group}
2140 File Daemon User: ${fd_user}
2141 File Daemon Group: ${fd_group}
2143 SQL binaries Directory ${SQL_BINDIR}
2145 Large file support: $largefile_support
2146 Bacula conio support: ${got_conio} ${CONS_LIBS}
2147 readline support: ${got_readline} ${PRTREADLINE_SRC}
2148 TCP Wrappers support: ${TCPW_MSG}
2149 ZLIB support: ${have_zlib}
2150 enable-smartalloc: ${support_smartalloc}
2151 enable-gnome: ${support_gnome} ${gnome_version}
2152 enable-wx-console: ${support_wx_console}
2153 enable-tray-monitor: ${support_tray_monitor}
2154 client-only: ${build_client_only}
2155 ACL support: ${have_acl}
2156 Python support: ${support_python} ${PYTHON_LIBS}
2163 # cweb support: ${got_cweb} ${CWEB_SRC}
2164 # gmp support: ${got_gmp} ${GMP_SRC}