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)
69 test -n "$ARFLAG" || ARFLAGS="cr"
76 AC_SUBST(LOCAL_CFLAGS)
77 AC_SUBST(LOCAL_LDFLAGS)
82 dnl --------------------------------------------------
83 dnl Bacula OP Sys determination (see aclocal.m4)
84 dnl --------------------------------------------------
87 # -----------------------------------------------------------
88 dnl Bacula OPSys Distribution determination (see aclocal.m4)
89 # ----------------------------------------------------------
90 BA_CHECK_OPSYS_DISTNAME
92 # -----------------------------------------------------------
93 dnl Check for gnome stuff for gnome-console
94 # ----------------------------------------------------------
95 AM_ACLOCAL_INCLUDE(gnome-macros)
97 # ------------------------------------------------------------------
98 # If the user has not set --prefix, we set our default to nothing.
99 # In this case, if the user has not set --sysconfdir, we set it
100 # to the package default of /etc/bacula. If either --prefix or
101 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
102 # ------------------------------------------------------------------
103 if test x${prefix} = xNONE ; then
104 if test `eval echo ${sysconfdir}` = NONE/etc ; then
105 sysconfdir=/etc/bacula
109 sysconfdir=`eval echo ${sysconfdir}`
111 # -------------------------------------------------------------------------
112 # If the user has not set --exec-prefix, we default to ${prefix}
113 # -------------------------------------------------------------------------
114 if test x${exec_prefix} = xNONE ; then
115 exec_prefix=${prefix}
118 # ------------------------------------------------------------------
119 # If the user has not set --sbindir, we set our default as /sbin
120 # ------------------------------------------------------------------
121 if test x$sbindir = x'${exec_prefix}/sbin' ; then
122 sbindir=${exec_prefix}/sbin
124 sbindir=`eval echo ${sbindir}`
126 # ------------------------------------------------------------------
127 # All list of languages for which a translation exist. Each
128 # language is separated by a space.
129 # ------------------------------------------------------------------
132 AC_PATH_PROGS(MSGFMT, msgfmt, no)
133 if test "$MSGFMT" = "no"
135 echo 'msgfmt program not found, disabling NLS !'
137 USE_INCLUDED_LIBINTL=no
145 support_postgresql=no
146 support_smartalloc=yes
150 support_wx_console=no
152 support_static_tools=no
155 support_static_dir=no
156 support_static_cons=no
163 dnl# --------------------------------------------------------------------------
164 dnl# CHECKING COMMAND LINE OPTIONS
165 dnl# --------------------------------------------------------------------------
167 # -------------------------------------------
168 # gnome (default off)
169 # -------------------------------------------
171 [ --enable-gnome enable build of gnome-console GUI [disabled]],
172 [if test x$enableval = xyes; then
177 if test x$support_gnome = xyes; then
178 abc=`$PKGCONFIG --exists libgnomeui-2.0`
180 if test $pkg = 0; then
181 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
182 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
183 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
184 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
185 AC_SUBST(GNOME_INCLUDEDIR)
186 AC_SUBST(GNOMEUI_LIBS)
187 AC_SUBST(GNOME_LIBDIR)
189 GNOME_DIR=src/gnome2-console
190 gnome_version="Version 2.x"
194 GNOME_DIR=src/gnome-console
195 gnome_version="Version 1.4"
201 # -------------------------------------------
202 # wx-console (default off)
203 # -------------------------------------------
204 AC_ARG_ENABLE(wx-console,
205 [ --enable-wx-console enable build of wxWidgets console [disabled]],
206 [if test x$enableval = xyes; then
207 support_wx_console=yes
211 if test x$support_wx_console = xyes; then
212 abc=`$WXCONFIG --cppflags`
214 if test $pkg = 0; then
215 WXCONS_CPPFLAGS=`$WXCONFIG --cppflags`
216 WXCONS_LDFLAGS=`$WXCONFIG --libs`
217 AC_SUBST(WXCONS_CPPFLAGS)
218 AC_SUBST(WXCONS_LDFLAGS)
219 WX_DIR=src/wx-console
222 echo "wx-config program not found. wx-console disabled."
224 support_wx_console=no
230 # -------------------------------------------
231 # tray-monitor (default off)
232 # -------------------------------------------
233 AC_ARG_ENABLE(tray-monitor,
234 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
235 [if test x$enableval = xyes; then
236 support_tray_monitor=yes
240 if test x$support_tray_monitor = xyes; then
241 abc=`$PKGCONFIG --exists gtk+-2.0`
243 if test $pkg = 0; then
244 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
245 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
246 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
247 AC_SUBST(TRAY_MONITOR_LDFLAGS)
248 TRAY_MONITOR_DIR=src/tray-monitor
249 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
251 if test $pkg = 0; then
252 AC_DEFINE(HAVE_GTK_2_4)
256 AC_SUBST(TRAY_MONITOR_DIR)
258 # -------------------------------------------
259 # smartalloc (default off)
260 # -------------------------------------------
261 AC_ARG_ENABLE(smartalloc,
262 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
263 [if test x$enableval = xno; then
264 support_smartalloc=no
267 if test x$support_smartalloc = xyes; then
268 AC_DEFINE(SMARTALLOC)
271 # -------------------------------------------
272 # static-tools (default off)
273 # -------------------------------------------
274 AC_ARG_ENABLE(static-tools,
275 [ --enable-static-tools enable static tape tools [disabled]],
276 [if test x$enableval = xyes; then
277 support_static_tools=yes
281 if test x$support_static_tools = xyes; then
282 TTOOL_LDFLAGS="-static"
284 AC_SUBST(TTOOL_LDFLAGS)
286 # -------------------------------------------
287 # static-fd (default off)
288 # -------------------------------------------
289 AC_ARG_ENABLE(static-fd,
290 [ --enable-static-fd enable static File daemon [disabled]],
291 [if test x$enableval = xyes; then
292 support_static_fd=yes
296 if test x$support_static_fd = xyes; then
297 STATIC_FD="static-bacula-fd"
301 # -------------------------------------------
302 # static-sd (default off)
303 # -------------------------------------------
304 AC_ARG_ENABLE(static-sd,
305 [ --enable-static-sd enable static Storage daemon [disabled]],
306 [if test x$enableval = xyes; then
307 support_static_sd=yes
311 if test x$support_static_sd = xyes; then
312 STATIC_SD="static-bacula-sd"
316 # -------------------------------------------
317 # static-dir (default off)
318 # -------------------------------------------
319 AC_ARG_ENABLE(static-dir,
320 [ --enable-static-dir enable static Director [disabled]],
321 [if test x$enableval = xyes; then
322 support_static_dir=yes
326 if test x$support_static_dir = xyes; then
327 STATIC_DIR="static-bacula-dir"
331 # -------------------------------------------
332 # static-cons (default off)
333 # -------------------------------------------
334 AC_ARG_ENABLE(static-cons,
335 [ --enable-static-cons enable static Console [disabled]],
336 [if test x$enableval = xyes; then
337 support_static_cons=yes
343 if test x$support_static_cons = xyes; then
344 STATIC_CONS="static-bconsole"
345 STATIC_GNOME_CONS="static-gnome-console"
346 STATIC_WX_CONS="static-wx-console"
348 AC_SUBST(STATIC_CONS)
349 AC_SUBST(STATIC_GNOME_CONS)
350 AC_SUBST(STATIC_WX_CONS)
352 # -------------------------------------------
353 # client_only (default off)
354 # -------------------------------------------
355 AC_ARG_ENABLE(client-only,
356 [ --enable-client-only build client (File daemon) only [disabled]],
357 [if test x$enableval = xyes; then
358 build_client_only=yes
362 if test x$build_client_only = xno; then
369 # ---------------------------------------------------
370 # Check for conio (Bacula readline substitute)(
371 # ---------------------------------------------------
372 # this allows you to turn it completely off
374 [ --disable-conio disable conio support [enabled]
376 [if test x$enableval = xno; then
381 if test x$support_conio = xyes; then
382 AC_CHECK_HEADER(termcap.h,
383 [ AC_CHECK_LIB(termcap, tgetent,
384 [ CONS_LIBS="-ltermcap"
389 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
391 [ AC_CHECK_LIB(ncurses, tgetent,
392 [ CONS_LIBS="-lncurses"
397 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
402 AC_CHECK_HEADERS(curses.h)
403 AC_CHECK_HEADER(term.h,
404 [ AC_CHECK_LIB(curses, tgetent,
405 [ CONS_LIBS="-lcurses"
410 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
413 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
422 # ---------------------------------------------------
423 # Check for readline support/directory (default off)
424 # ---------------------------------------------------
425 # this allows you to turn it completely off
426 AC_ARG_ENABLE(readline,
427 [ --disable-readline disable readline support [disable]
429 [if test x$enableval = xno; then
435 if test x$support_readline = xyes; then
436 AC_ARG_WITH(readline,
437 [ --with-readline=DIR specify readline library directory],
439 case "$with_readline" in
442 if test "$with_readline" != "yes"; then
443 CONS_INC="-I${with_readline}"
444 CONS_LDFLAGS="-L$with_readline"
446 with_readline="/usr/include/readline"
448 AC_CHECK_HEADER(${with_readline}/readline.h,
449 [ AC_DEFINE(HAVE_READLINE)
450 CONS_LIBS="-lreadline -ltermcap"
454 echo "readline.h not found. readline turned off ..."
461 # check for standard readline library
462 AC_CHECK_HEADER(/usr/include/readline/readline.h,
463 [ AC_DEFINE(HAVE_READLINE)
465 CONS_INC="-I/usr/include/readline"
466 CONS_LIBS="-lreadline -ltermcap"
468 # Did not find standard library, so try Bacula's default
469 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
470 [ AC_DEFINE(HAVE_READLINE)
472 CONS_INC="-I${TOP_DIR}/depkgs/readline"
473 CONS_LIBS="-lreadline -lhistory -ltermcap"
474 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
475 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
478 echo "readline.h not found. readline turned off ..."
494 AC_SUBST(CONS_LDFLAGS)
495 AC_SUBST(READLINE_SRC)
497 # Minimal stuff for readline Makefile configuration
502 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
503 AC_CHECK_FUNCS(nanosleep nl_langinfo)
504 AC_CHECK_HEADERS(varargs.h)
506 # End of readline/conio stuff
507 # -----------------------------------------------------------------------
509 # -----------------------------------------------------------------------
510 # Check for Python support
512 AC_MSG_CHECKING(for Python support)
515 --with-python[=DIR] Include Python support. DIR is the Python base
516 install directory, default is to search through
517 a number of common places for the Python files.],
521 if test "$withval" != "no"; then
522 if test "$withval" = "yes"; then
523 if test -f /usr/include/python2.2/Python.h; then
524 PYTHON_INCDIR=/usr/include/python2.2
525 PYTHON_LIBS="-L/usr/lib/python2.2/config -lpython2.2 -lutil -ldl"
526 elif test -f $prefix/include/Python.h; then
527 PYTHON_INCDIR=$prefix/include
528 PYTHON_LIBS="-L$prefix/lib/config -lpython -lutil -ldl"
531 AC_MSG_ERROR(Unable to find Python.h in standard locations)
534 if test -f $withval/Python.h; then
535 PYTHON_INCDIR=$withval
536 PYTHON_LIBS="-L$withval/config -lpython -lutil -ldl"
537 elif test -f $withval/include/Python.h; then
538 PYTHON_INCDIR=$withval/include
539 PYTHON_LIBS="-L$withval/lib/config -lpython -lutil -ldl"
542 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
545 AC_DEFINE([HAVE_PYTHON], 1)
555 AC_SUBST(PYTHON_LIBS)
556 AC_SUBST(PYTHON_INCDIR)
559 # -------------------------------------------
560 # check for cdrecord writer location
561 # get scsibus,target,lun
562 # -------------------------------------------
564 if test ! x$CDRECORD = x ; then
565 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD-RW | ${AWK} '{print $1}'`
566 if test x${CDSTL} = x ; then
567 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD+RW | ${AWK} '{print $1}'`
569 if test x${CDSTL} = x ; then
576 # ---------------------------------------------------
577 # Check for GMP support/directory
578 # ---------------------------------------------------
582 # [ --with-gmp[=DIR] Specify gmp library directory],
584 # case "$with_gmp" in
587 # if test "$with_gmp" != "yes"; then
588 # GMP_INC="-I$with_gmp"
590 # GMP_LDFLAGS="-L$with_gmp"
592 # with_gmp="/usr/include"
594 # AC_CHECK_HEADER($with_gmp/gmp.h,
595 # [ AC_MSG_RESULT(yes)
596 # AC_DEFINE(HAVE_GMP)
600 # [ AC_MSG_ERROR([*** gmp library missing])
606 # # check for standard gmp library
607 # AC_CHECK_HEADER(/usr/include/gmp.h,
608 # [ AC_MSG_RESULT(yes)
609 # AC_DEFINE(HAVE_GMP)
614 # # Did not find standard library, so use our own
616 # AC_DEFINE(HAVE_GMP)
619 # GMP_INC="-I${TOP_DIR}/depkgs/gmp"
621 # GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
622 # GMP_SRC="${TOP_DIR}/depkgs/gmp"
628 #AC_SUBST(GMP_LDFLAGS)
632 # -----------------------------------------------------------------------
635 # ---------------------------------------------------
636 # Check for CWEB support/directory
637 # ---------------------------------------------------
642 # [ --with-cweb[=DIR] Specify cweb library directory],
644 # case "$with_cweb" in
647 # if test "$with_cweb" != "yes"; then
648 # CWEB_INC="-I$with_cweb"
650 # CWEB_LDFLAGS="-L$with_cweb"
652 # with_cweb="/usr/include"
654 # AC_CHECK_HEADER($with_cweb/cweb.h,
655 # [ AC_MSG_RESULT(yes)
656 # AC_DEFINE(HAVE_CWEB)
660 # [ AC_MSG_ERROR([*** cweb library missing])
666 # # check for standard cweb library
667 # AC_CHECK_HEADER(/usr/include/cweb.h,
668 # [ AC_MSG_RESULT(yes)
669 # AC_DEFINE(HAVE_CWEB)
674 # # Did not find starndard library, so use our own
676 # AC_DEFINE(HAVE_CWEB)
679 # CWEB=${TOP_DIR}/depkgs/cweb
680 # CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
682 # CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
683 # CWEB_SRC="${TOP_DIR}/depkgs/cweb"
690 #AC_SUBST(CWEB_LDFLAGS)
694 # -----------------------------------------------------------------------
697 # Find where sockets are (especially for Solaris)
698 # Do this before the TCP Wrappers test since tcp wrappers
699 # uses the socket library and some linkers are stupid.
701 AC_CHECK_FUNC(socket,
702 AC_MSG_RESULT(using libc's socket),
703 AC_CHECK_LIB(xnet,socket)
704 AC_CHECK_LIB(socket,socket)
705 AC_CHECK_LIB(inet,socket))
708 # -----------------------------------------------------------
709 # Check whether user wants TCP wrappers support (default off)
710 # -----------------------------------------------------------
712 AC_ARG_WITH(tcp-wrappers,
713 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
715 if test "x$withval" != "xno" ; then
717 LIBS="$saved_LIBS -lwrap"
718 AC_MSG_CHECKING(for libwrap)
721 int deny_severity = 0;
722 int allow_severity = 0;
723 struct request_info *req; ],
724 [ hosts_access(req); ],
727 AC_DEFINE(HAVE_LIBWRAP)
730 LIBS="$saved_LIBS -lwrap -lnsl"
733 int deny_severity = 0;
734 int allow_severity = 0;
735 struct request_info *req; ],
736 [ hosts_access(req); ],
739 AC_DEFINE(HAVE_LIBWRAP)
742 [AC_MSG_ERROR([*** libwrap missing]) ] ]
749 # ------------------------------------------
750 # Where to place working dir
751 # ------------------------------------------
752 working_dir=`eval echo ${prefix}/var/bacula/working`
753 AC_ARG_WITH(working-dir,
754 [ --with-working-dir=PATH specify path of Bacula working directory],
756 if test "x$withval" != "xno" ; then
762 AC_SUBST(working_dir)
765 # ------------------------------------------
766 # Where to place scriptdir (script files)
767 # ------------------------------------------
768 scriptdir=`eval echo ${sysconfdir}`
769 AC_ARG_WITH(scriptdir,
770 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
772 if test "x$withval" != "xno" ; then
781 # ------------------------------------------
782 # Where to send dump email
783 # ------------------------------------------
784 dump_email=root@localhost
785 AC_ARG_WITH(dump-email,
786 [ --with-dump-email=EMAIL dump email address],
788 if test "x$withval" != "xno" ; then
796 # ------------------------------------------
797 # Where to send job email
798 # ------------------------------------------
799 job_email=root@localhost
800 AC_ARG_WITH(job-email,
801 [ --with-job-email=EMAIL job output email address],
803 if test "x$withval" != "xno" ; then
811 # ------------------------------------------
812 # Where to find smtp host
813 # ------------------------------------------
815 AC_ARG_WITH(smtp_host,
816 [ --with-smtp-host=HOST SMTP mail host address],
818 if test "x$withval" != "xno" ; then
827 # ------------------------------------
828 # Where to place pid files
829 # ------------------------------------
832 [ --with-pid-dir=PATH specify location of Bacula pid files],
834 if test "x$withval" != "xno" ; then
840 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
844 # ------------------------------------
845 # Where to place subsys "lock file"
846 # ------------------------------------
847 subsysdir=/var/run/subsys
848 AC_ARG_WITH(subsys-dir,
849 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
851 if test "x$withval" != "xno" ; then
861 # ------------------------------------
862 # Where to start assigning ports
863 # ------------------------------------
865 AC_ARG_WITH(baseport,
866 [ --with-baseport=PORT specify base port address for daemons],
868 if test "x$withval" != "xno" ; then
875 dir_port=`expr $baseport`
876 fd_port=`expr $baseport + 1`
877 sd_port=`expr $fd_port + 1`
884 # ------------------------------------------
886 # ------------------------------------------
888 AC_ARG_WITH(dir-password,
889 [ --with-dir-password=PASSWORD specify Director's password],
891 if test "x$withval" != "xno" ; then
892 dir_password=$withval
897 if test "x$dir_password" = "x" ; then
898 if test "x$OPENSSL" = "xnone" ; then
899 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
900 key=`autoconf/randpass 33`
902 key=`openssl rand -base64 33`
908 AC_ARG_WITH(fd-password,
909 [ --with-fd-password=PASSWORD specify Client's password],
911 if test "x$withval" != "xno" ; then
917 if test "x$fd_password" = "x" ; then
918 if test "x$OPENSSL" = "xnone" ; then
919 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
920 key=`autoconf/randpass 37`
922 key=`openssl rand -base64 33`
928 AC_ARG_WITH(sd-password,
929 [ --with-sd-password=PASSWORD specify Storage daemon's password],
931 if test "x$withval" != "xno" ; then
937 if test "x$sd_password" = "x" ; then
938 if test "x$OPENSSL" = "xnone" ; then
939 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
940 key=`autoconf/randpass 41`
942 key=`openssl rand -base64 33`
948 AC_ARG_WITH(mon-dir-password,
949 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
951 if test "x$withval" != "xno" ; then
952 mon_dir_password=$withval
957 if test "x$mon_dir_password" = "x" ; then
958 if test "x$OPENSSL" = "xnone" ; then
959 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
960 key=`autoconf/randpass 33`
962 key=`openssl rand -base64 33`
964 mon_dir_password=$key
968 AC_ARG_WITH(mon-fd-password,
969 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
971 if test "x$withval" != "xno" ; then
972 mon_fd_password=$withval
977 if test "x$mon_fd_password" = "x" ; then
978 if test "x$OPENSSL" = "xnone" ; then
979 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
980 key=`autoconf/randpass 37`
982 key=`openssl rand -base64 33`
988 AC_ARG_WITH(mon-sd-password,
989 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
991 if test "x$withval" != "xno" ; then
992 mon_sd_password=$withval
997 if test "x$mon_sd_password" = "x" ; then
998 if test "x$OPENSSL" = "xnone" ; then
999 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
1000 key=`autoconf/randpass 41`
1002 key=`openssl rand -base64 33`
1004 mon_sd_password=$key
1007 AC_SUBST(dir_password)
1008 AC_SUBST(fd_password)
1009 AC_SUBST(sd_password)
1010 AC_SUBST(mon_dir_password)
1011 AC_SUBST(mon_fd_password)
1012 AC_SUBST(mon_sd_password)
1014 # -------------------------------------------------------------------------
1015 # Set variables for bimagemgr installation
1016 # -------------------------------------------------------------------------
1017 bimagemgr_cgidir=/var/www/cgi-bin
1018 AC_ARG_WITH(bimagemgr-cgidir,
1019 [ --with-bimagemgr-cgidir=DIR specify bimagemgr cgi-bin dir],
1021 if test "x$withval" != "xno" ; then
1022 bimagemgr_cgidir=$withval
1027 bimagemgr_docdir=/var/www/html
1028 AC_ARG_WITH(bimagemgr-docdir,
1029 [ --with-bimagemgr-docdir=DIR specify bimagemgr doc root dir],
1031 if test "x$withval" != "xno" ; then
1032 bimagemgr_docdir=$withval
1037 bimagemgr_binowner=root
1038 AC_ARG_WITH(bimagemgr-binowner,
1039 [ --with-bimagemgr-binowner=USER specify bimagemgr binary file owner],
1041 if test "x$withval" != "xno" ; then
1042 bimagemgr_binowner=$withval
1047 bimagemgr_bingroup=root
1048 AC_ARG_WITH(bimagemgr-bingroup,
1049 [ --with-bimagemgr-bingroup=USER specify bimagemgr binary file group],
1051 if test "x$withval" != "xno" ; then
1052 bimagemgr_bingroup=$withval
1057 bimagemgr_dataowner=apache
1058 AC_ARG_WITH(bimagemgr-dataowner,
1059 [ --with-bimagemgr-dataowner=USER specify bimagemgr data file owner],
1061 if test "x$withval" != "xno" ; then
1062 bimagemgr_dataowner=$withval
1067 bimagemgr_datagroup=apache
1068 AC_ARG_WITH(bimagemgr-datagroup,
1069 [ --with-bimagemgr-datagroup=USER specify bimagemgr data file group],
1071 if test "x$withval" != "xno" ; then
1072 bimagemgr_datagroup=$withval
1077 AC_SUBST(bimagemgr_cgidir)
1078 AC_SUBST(bimagemgr_docdir)
1079 AC_SUBST(bimagemgr_binowner)
1080 AC_SUBST(bimagemgr_bingroup)
1081 AC_SUBST(bimagemgr_dataowner)
1082 AC_SUBST(bimagemgr_datagroup)
1085 # Handle users and groups for each daemon
1088 AC_ARG_WITH(dir_user,
1089 [ --with-dir-user=USER specify user for Director daemon],
1091 if test "x$withval" != "x" ; then
1098 AC_ARG_WITH(dir_group,
1099 [ --with-dir-group=GROUP specify group for Director daemon],
1101 if test "x$withval" != "x" ; then
1108 AC_ARG_WITH(sd_user,
1109 [ --with-sd-user=USER specify user for Storage daemon],
1111 if test "x$withval" != "x" ; then
1118 AC_ARG_WITH(sd_group,
1119 [ --with-sd-group=GROUP specify group for Storage daemon],
1121 if test "x$withval" != "x" ; then
1128 AC_ARG_WITH(fd_user,
1129 [ --with-fd-user=USER specify user for File daemon],
1131 if test "x$withval" != "x" ; then
1138 AC_ARG_WITH(fd_group,
1139 [ --with-fd-group=GROUP specify group for File daemon],
1141 if test "x$withval" != "x" ; then
1158 # allow setting default executable permissions
1161 AC_ARG_WITH(sbin-perm,
1162 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1164 if test "x$withval" != "x" ; then
1172 # ------------------------------------------------
1173 # Bacula check for various SQL database engines
1174 # ------------------------------------------------
1175 BA_CHECK_POSTGRESQL_DB
1184 AC_DEFINE(PROTOTYPES)
1186 dnl# --------------------------------------------------------------------------
1187 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1189 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1190 if test -z "$CCOPTS"; then
1191 CCOPTS='-g -O2 -Wall'
1200 dnl See if we can use 64 bit file addresses
1201 largefile_support="no"
1207 dnl# --------------------------------------------------------------------------
1208 dnl# CHECKING FOR HEADER FILES
1209 dnl# --------------------------------------------------------------------------
1245 AC_STRUCT_ST_BLKSIZE
1249 dnl# --------------------------------------------------------------------------
1250 dnl# Check for utime.h structure
1251 dnl# --------------------------------------------------------------------------
1252 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1254 #include <sys/types.h>
1255 #include <utime.h>], [struct utimbuf foo],
1256 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1257 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1259 dnl# --------------------------------------------------------------------------
1260 dnl# Check for socklen_t
1261 dnl# --------------------------------------------------------------------------
1262 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1264 #include <sys/types.h>
1265 #include <sys/socket.h>],
1267 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1268 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1270 dnl# --------------------------------------------------------------------------
1271 dnl# Check for bigendian
1272 dnl# --------------------------------------------------------------------------
1273 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1275 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1276 [ba_cv_bigendian=yes],
1277 [ba_cv_bigendian=no],
1278 [ba_cv_bigendian=no])])
1279 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1285 dnl# --------------------------------------------------------------------------
1286 dnl# CHECKING FOR FILESYSTEM TYPE
1287 dnl# --------------------------------------------------------------------------
1288 AC_MSG_CHECKING(how to get filesystem type)
1290 # The order of these tests is important.
1291 AC_TRY_CPP([#include <sys/statvfs.h>
1292 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1293 if test $fstype = no; then
1294 AC_TRY_CPP([#include <sys/statfs.h>
1295 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1297 if test $fstype = no; then
1298 AC_TRY_CPP([#include <sys/statfs.h>
1299 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1301 if test $fstype = no; then
1302 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1304 if test $fstype = no; then
1305 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1307 if test $fstype = no; then
1308 AC_TRY_CPP([#include <sys/mount.h>
1309 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1311 AC_MSG_RESULT($fstype)
1313 dnl# --------------------------------------------------------------------------
1314 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1315 dnl# --------------------------------------------------------------------------
1323 AC_CHECK_TYPE(ino_t, unsigned long)
1324 AC_CHECK_TYPE(dev_t, unsigned long)
1325 AC_CHECK_TYPE(daddr_t, long)
1326 AC_CHECK_TYPE(major_t, int)
1327 AC_CHECK_TYPE(minor_t, int)
1328 AC_CHECK_TYPE(ssize_t, int)
1335 AC_CHECK_SIZEOF(char, 1)
1336 AC_CHECK_SIZEOF(short int, 2)
1337 AC_CHECK_SIZEOF(int, 4)
1338 AC_CHECK_SIZEOF(long int, 4)
1339 AC_CHECK_SIZEOF(long long int, 8)
1340 AC_CHECK_SIZEOF(int *, 4)
1342 # Check for sys/types.h types
1343 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1345 [ #include <sys/types.h> ],
1347 [ ac_cv_have_u_int="yes" ],
1348 [ ac_cv_have_u_int="no" ]
1351 if test "x$ac_cv_have_u_int" = "xyes" ; then
1352 AC_DEFINE(HAVE_U_INT)
1356 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1358 [ #include <sys/types.h> ],
1359 [ intmax_t a; a = 1;],
1360 [ ac_cv_have_intmax_t="yes" ],
1363 [ #include <stdint.h> ],
1364 [ intmax_t a; a = 1;],
1365 [ ac_cv_have_intmax_t="yes" ],
1366 [ ac_cv_have_intmax_t="no" ]
1372 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1373 AC_DEFINE(HAVE_INTMAX_T)
1378 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1380 [ #include <sys/types.h> ],
1381 [ u_intmax_t a; a = 1;],
1382 [ ac_cv_have_u_intmax_t="yes" ],
1385 [ #include <stdint.h> ],
1386 [ u_intmax_t a; a = 1;],
1387 [ ac_cv_have_u_intmax_t="yes" ],
1388 [ ac_cv_have_u_intmax_t="no" ]
1393 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1394 AC_DEFINE(HAVE_U_INTMAX_T)
1399 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1401 [ #include <sys/types.h> ],
1402 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1403 [ ac_cv_have_intxx_t="yes" ],
1404 [ ac_cv_have_intxx_t="no" ]
1407 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1408 AC_DEFINE(HAVE_INTXX_T)
1412 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1414 [ #include <sys/types.h> ],
1415 [ int64_t a; a = 1;],
1416 [ ac_cv_have_int64_t="yes" ],
1417 [ ac_cv_have_int64_t="no" ]
1420 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1421 AC_DEFINE(HAVE_INT64_T)
1425 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1427 [ #include <sys/types.h> ],
1428 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1429 [ ac_cv_have_u_intxx_t="yes" ],
1430 [ ac_cv_have_u_intxx_t="no" ]
1433 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1434 AC_DEFINE(HAVE_U_INTXX_T)
1438 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1440 [ #include <sys/types.h> ],
1441 [ u_int64_t a; a = 1;],
1442 [ ac_cv_have_u_int64_t="yes" ],
1443 [ ac_cv_have_u_int64_t="no" ]
1446 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1447 AC_DEFINE(HAVE_U_INT64_T)
1451 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1452 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1454 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1456 [ #include <sys/bitypes.h> ],
1457 [ int8_t a; int16_t b; int32_t c;
1458 u_int8_t e; u_int16_t f; u_int32_t g;
1459 a = b = c = e = f = g = 1; ],
1460 [ AC_DEFINE(HAVE_U_INTXX_T)
1461 AC_DEFINE(HAVE_INTXX_T)
1462 AC_DEFINE(HAVE_SYS_BITYPES_H)
1463 AC_MSG_RESULT(yes) ],
1464 [ AC_MSG_RESULT(no)]
1468 if test -z "$have_u_intxx_t" ; then
1469 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1471 [ #include <sys/types.h> ],
1472 [ uint8_t a; uint16_t b;
1473 uint32_t c; a = b = c = 1; ],
1474 [ ac_cv_have_uintxx_t="yes" ],
1475 [ ac_cv_have_uintxx_t="no" ]
1478 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1479 AC_DEFINE(HAVE_UINTXX_T)
1483 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1484 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1486 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1488 [ #include <sys/bitypes.h> ],
1489 [ int64_t a; u_int64_t b;
1491 [ AC_DEFINE(HAVE_U_INT64_T)
1492 AC_DEFINE(HAVE_INT64_T)
1493 AC_MSG_RESULT(yes) ],
1494 [ AC_MSG_RESULT(no)]
1498 if (test -z "$have_uintxx_t" && \
1499 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1501 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1503 [ #include <sys/bitypes.h> ],
1504 [ uint8_t a; uint16_t b;
1505 uint32_t c; a = b = c = 1; ],
1506 [ AC_DEFINE(HAVE_UINTXX_T)
1507 AC_MSG_RESULT(yes) ],
1508 [ AC_MSG_RESULT(no)]
1516 dnl# --------------------------------------------------------------------------
1517 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1518 dnl# --------------------------------------------------------------------------
1534 [echo 'configure: cannot find needed function.'; exit 1]
1537 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1538 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1540 AC_CHECK_FUNCS(chflags)
1542 AC_CHECK_FUNCS(snprintf vsnprintf gethostid getdomainname)
1544 dnl# --------------------------------------------------------------------------
1545 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1546 dnl# --------------------------------------------------------------------------
1547 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1549 # If resolver functions are not in libc check for -lnsl or -lresolv.
1550 AC_CHECK_FUNC(gethostbyname_r,
1551 AC_MSG_RESULT(using libc's resolver),
1552 AC_CHECK_LIB(nsl,gethostbyname_r)
1553 AC_CHECK_LIB(resolv,gethostbyname_r))
1557 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1558 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1559 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1561 dnl ----------------------------
1562 dnl check sa_len of sockaddr
1563 dnl ----------------------------
1564 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1565 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1566 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1568 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1569 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1573 dnl Check for IPv6 support
1574 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1575 [AC_TRY_LINK([ #include <sys/types.h>
1576 #include <sys/socket.h>
1577 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1579 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1581 if test "$ac_cv_ipv6_support" = yes; then
1582 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1591 AC_FUNC_CLOSEDIR_VOID
1592 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1596 dnl# FreeBSD needs to link libxpg4
1597 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1600 AC_CHECK_LIB(sun, getpwnam)
1602 AC_CHECK_HEADERS(zlib.h)
1603 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1605 if test x$FDLIBS = x-lz; then
1606 AC_DEFINE(HAVE_LIBZ)
1610 AC_CHECK_HEADER(sys/acl.h)
1611 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1613 if test $ac_cv_lib_acl_acl_get_file = yes; then
1618 dnl Check for pthread libraries
1620 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1621 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1622 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1623 [AC_CHECK_FUNC(pthread_create)]
1633 LDFLAGS=${LDFLAGS--O}
1634 DB_LIBS="${SQL_LFLAGS}"
1636 CPPFLAGS="$CPPFLAGS"
1647 AC_SUBST(X_EXTRA_LIBS)
1651 dnl# extra configurable objects
1662 # Finally we set appropriate distribution specific
1663 # variables and defaults
1665 # PFILES are platform specific files
1666 PFILES="platforms/Makefile"
1670 hostname=`uname -n | cut -d '.' -f 1`
1674 PSCMD="ps -e -o pid,comm"
1676 platforms/aix/Makefile"
1677 TAPEDRIVE="/dev/rmt0.1"
1681 PTHREAD_LIB="-lpthread -lexc"
1682 if test "${CC}" = "gcc" ; then
1689 TAPEDRIVE="/dev/nrmt0"
1692 DISTVER=`uname -a |awk '{print $3}'`
1693 TAPEDRIVE="/dev/nrmt0"
1694 PTHREAD_LIB="-pthread"
1695 CFLAGS="${CFLAGS} -pthread"
1696 PSCMD="ps -x -o pid,command"
1700 platforms/bsdi/Makefile \
1701 platforms/bsdi/bacula-fd \
1702 platforms/bsdi/bacula-sd \
1703 platforms/bsdi/bacula-dir"
1704 largefile_support="yes"
1707 DISTVER=`uname -a |awk '{print $3}'`
1708 TAPEDRIVE="/dev/nrst0"
1711 WLDFLAGS="-mwindows"
1715 TAPEDRIVE="/dev/nst0"
1716 PSCMD="ps -e -o pid,command"
1719 platforms/darwin/Makefile"
1722 DISTVER=`cat /etc/debian_version`
1723 TAPEDRIVE="/dev/nrst0"
1724 PSCMD="ps -e -o pid,command"
1727 DISTVER=`uname -a |awk '{print $3}'`
1728 VER=`echo $DISTVER | cut -c 1`
1729 if test x$VER = x4 ; then
1730 PTHREAD_LIB="-pthread"
1731 CFLAGS="${CFLAGS} -pthread"
1735 TAPEDRIVE="/dev/nrsa0"
1736 PSCMD="ps -x -o pid,command"
1738 platforms/freebsd/Makefile \
1739 platforms/freebsd/bacula-fd \
1740 platforms/freebsd/bacula-sd \
1741 platforms/freebsd/bacula-dir"
1742 largefile_support="yes"
1745 PSCMD="UNIX95=1 ps -e -o pid,comm"
1746 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1748 TAPEDRIVE="/dev/rmt/0hnb"
1752 TAPEDRIVE="/dev/rmt/0cbn"
1753 PSCMD="ps -e -o pid,comm"
1755 platforms/irix/Makefile \
1756 platforms/irix/bacula-fd \
1757 platforms/irix/bacula-sd \
1758 platforms/irix/bacula-dir"
1761 DISTVER=`uname -a |awk '{print $3}'`
1764 TAPEDRIVE="/dev/nrst0"
1765 PSCMD="ps -a -o pid,command"
1766 PTHREAD_LIB="-pthread"
1767 CFLAGS="${CFLAGS} -pthread"
1770 DISTVER=`uname -a |awk '{print $3}'`
1773 TAPEDRIVE="/dev/nrst0"
1774 PSCMD="ps -ax -o pid,command"
1775 PTHREAD_LIB="-pthread"
1776 CFLAGS="${CFLAGS} -pthread"
1778 platforms/openbsd/Makefile \
1779 platforms/openbsd/bacula-fd \
1780 platforms/openbsd/bacula-sd \
1781 platforms/openbsd/bacula-dir"
1784 if test -f /etc/whitebox-release ; then
1785 f=/etc/whitebox-release
1787 f=/etc/redhat-release
1789 if test `cat $f | grep release |\
1790 cut -f 3 -d ' '`x = "Enterprise"x ; then
1791 DISTVER="Enterprise "`cat $f | grep release |\
1794 DISTVER=`cat /etc/redhat-release | grep release |\
1797 TAPEDRIVE="/dev/nst0"
1798 PSCMD="ps -e -o pid,command"
1800 platforms/redhat/Makefile \
1801 platforms/redhat/bacula-fd \
1802 platforms/redhat/bacula-sd \
1803 platforms/redhat/bacula-dir \
1804 platforms/redhat/bacula.spec \
1806 hostname=`hostname -s`
1809 DISTVER=`cat /etc/mandrake-release | grep release |\
1811 TAPEDRIVE="/dev/nst0"
1812 PSCMD="ps -e -o pid,command"
1814 platforms/mandrake/Makefile \
1815 platforms/mandrake/bacula-fd \
1816 platforms/mandrake/bacula-sd \
1817 platforms/mandrake/bacula-dir \
1818 platforms/mandrake/bacula.spec \
1822 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1823 TAPEDRIVE="/dev/nst0"
1824 PSCMD="ps -e -o pid,command"
1826 platforms/gentoo/Makefile \
1827 platforms/gentoo/bacula-init \
1828 platforms/gentoo/bacula-fd \
1829 platforms/gentoo/bacula-sd \
1830 platforms/gentoo/bacula-dir"
1833 DISTVER=`cat /etc/slackware-version`
1834 TAPEDRIVE="/dev/nst0"
1835 PSCMD="ps -e -o pid,command"
1837 platforms/slackware/Makefile \
1838 platforms/slackware/rc.bacula-fd \
1839 platforms/slackware/rc.bacula-sd \
1840 platforms/slackware/rc.bacula-dir\
1841 platforms/slackware/functions.bacula"
1845 TAPEDRIVE="/dev/rmt/0cbn"
1846 PSCMD="ps -e -o pid,comm"
1848 platforms/solaris/Makefile \
1849 platforms/solaris/bacula-fd \
1850 platforms/solaris/bacula-sd \
1851 platforms/solaris/bacula-dir"
1852 if test x$DISTVER = x5.6 ; then
1853 AC_DEFINE(HAVE_OLD_SOCKOPT)
1857 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1859 TAPEDRIVE="/dev/nst0"
1860 PSCMD="ps -e -o pid,command"
1862 platforms/suse/Makefile \
1863 platforms/suse/bacula-fd \
1864 platforms/suse/bacula-sd \
1865 platforms/suse/bacula-dir \
1866 platforms/suse/bacula \
1867 platforms/suse/bacula.spec"
1872 TAPEDRIVE="/dev/nst0"
1873 PSCMD="ps -e -o pid,command"
1875 platforms/suse/Makefile \
1876 platforms/suse/bacula-fd \
1877 platforms/suse/bacula-sd \
1878 platforms/suse/bacula-dir"
1882 TAPEDRIVE="/dev/nst0"
1885 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1891 LIBS="$PTHREAD_LIB $LIBS"
1893 AC_DEFINE_UNQUOTED(lld, "$lld")
1894 AC_DEFINE_UNQUOTED(llu, "$llu")
1902 dnl# common parts of the Makefile
1903 MCOMMON=./autoconf/Make.common
1904 AC_SUBST_FILE(MCOMMON)
1907 if test "x${subsysdir}" = "x${sbindir}" ; then
1910 echo "You have set both --sbindir and --with-subsys-dir"
1911 echo " equal to: ${subsysdir} "
1912 echo "This is not permitted. Please reconfigure."
1914 echo "Aborting configuration ..."
1920 AC_OUTPUT([autoconf/Make.common \
1923 rescue/linux/Makefile \
1924 rescue/linux/floppy/Makefile \
1925 rescue/linux/cdrom/Makefile \
1926 rescue/linux/cdrom/bacula/Makefile \
1927 rescue/freebsd/Makefile \
1928 rescue/solaris/Makefile \
1929 scripts/startmysql \
1931 scripts/btraceback \
1937 scripts/devel_bacula \
1940 scripts/bacula.desktop.gnome1 \
1941 scripts/bacula.desktop.gnome2 \
1942 scripts/bacula.desktop.gnome1.consolehelper \
1943 scripts/bacula.desktop.gnome2.consolehelper \
1944 scripts/bacula.desktop.gnome1.xsu \
1945 scripts/bacula.desktop.gnome2.xsu \
1946 scripts/gnome-console.console_apps \
1947 scripts/mtx-changer \
1948 scripts/bacula-tray-monitor.desktop \
1952 src/console/Makefile \
1953 src/console/bconsole.conf \
1954 src/gnome-console/Makefile \
1955 src/gnome-console/gnome-console.conf \
1956 src/gnome2-console/Makefile \
1957 src/gnome2-console/gnome-console.conf \
1958 src/wx-console/Makefile \
1959 src/wx-console/wx-console.conf \
1960 src/tray-monitor/Makefile \
1961 src/tray-monitor/tray-monitor.conf \
1963 src/dird/bacula-dir.conf \
1965 src/stored/Makefile \
1966 src/stored/bacula-sd.conf \
1967 src/filed/Makefile \
1968 src/filed/bacula-fd.conf \
1969 src/filed/win32/Makefile \
1971 src/cats/make_catalog_backup \
1972 src/cats/delete_catalog_backup \
1973 src/cats/create_postgresql_database \
1974 src/cats/update_postgresql_tables \
1975 src/cats/make_postgresql_tables \
1976 src/cats/grant_postgresql_privileges \
1977 src/cats/drop_postgresql_tables \
1978 src/cats/drop_postgresql_database \
1979 src/cats/create_mysql_database \
1980 src/cats/update_mysql_tables \
1981 src/cats/make_mysql_tables \
1982 src/cats/grant_mysql_privileges \
1983 src/cats/drop_mysql_tables \
1984 src/cats/drop_mysql_database \
1985 src/cats/create_sqlite_database \
1986 src/cats/update_sqlite_tables \
1987 src/cats/make_sqlite_tables \
1988 src/cats/grant_sqlite_privileges \
1989 src/cats/drop_sqlite_tables \
1990 src/cats/drop_sqlite_database \
1993 src/cats/create_bdb_database \
1994 src/cats/update_bdb_tables \
1995 src/cats/make_bdb_tables \
1996 src/cats/grant_bdb_privileges \
1997 src/cats/drop_bdb_tables \
1998 src/cats/drop_bdb_database \
1999 src/cats/create_bacula_database \
2000 src/cats/update_bacula_tables \
2001 src/cats/grant_bacula_privileges \
2002 src/cats/make_bacula_tables \
2003 src/cats/drop_bacula_tables \
2004 src/cats/drop_bacula_database \
2005 src/findlib/Makefile \
2006 src/tools/Makefile \
2007 src/win32/winbacula.nsi \
2008 src/win32/baculafd/bacula-fd.conf \
2009 src/win32/Makefile \
2010 src/win32/console/bconsole.conf \
2011 src/win32/wx-console/wx-console.conf \
2012 src/win32/pebuilder/Makefile \
2013 src/bimagemgr/Makefile \
2014 src/bimagemgr/bacula-bimagemgr.spec \
2016 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
2020 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2021 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2026 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2027 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2029 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2030 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2032 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2033 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2035 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2036 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2038 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2039 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2041 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2045 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2046 largefile_support="yes"
2050 # A whole lot of hand springs to get the compiler version.
2051 # This is because gcc changed the output in version 3.0
2053 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2054 if test "x${CCVERSION}" = "x" ; then
2055 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2057 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2058 if test x"${CXXVERSION}" = x ; then
2059 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2062 if test "x${subsysdir}" = "x${sbindir}" ; then
2065 echo "You have set --sbindir and --with-subsys-dir"
2066 echo " both equal to: ${subsysdir} "
2067 echo " This is not permitted. Please reconfigure."
2069 echo "Aborting configuration ..."
2075 if test "x${db_name}" = "xInternal" ; then
2078 echo "You have not specified either --enable-client-only or one of the"
2079 echo " supported databases: MySQL, PostgreSQL, or SQLite".
2080 echo " This is not permitted. Please reconfigure."
2082 echo "Aborting the configuration ..."
2089 Configuration on `date`:
2091 Host: $host -- ${DISTNAME} ${DISTVER}
2092 Bacula version: ${VERSION} (${DATE})
2093 Source code location: ${srcdir}
2094 Install binaries: ${sbindir}
2095 Install config files: ${sysconfdir}
2096 Scripts directory: ${scriptdir}
2097 Working directory: ${working_dir}
2098 PID directory: ${piddir}
2099 Subsys directory: ${subsysdir}
2100 C Compiler: ${CC} ${CCVERSION}
2101 C++ Compiler: ${CXX} ${CXXVERSION}
2102 Compiler flags: ${WCFLAGS} ${CFLAGS}
2103 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2105 Statically Linked Tools: ${support_static_tools}
2106 Statically Linked FD: ${support_static_fd}
2107 Statically Linked SD: ${support_static_sd}
2108 Statically Linked DIR: ${support_static_dir}
2109 Statically Linked CONS: ${support_static_cons}
2110 Database type: ${db_name}
2111 Database lib: ${DB_LIBS}
2113 Job Output Email: ${job_email}
2114 Traceback Email: ${dump_email}
2115 SMTP Host Address: ${smtp_host}
2117 Director Port: ${dir_port}
2118 File daemon Port: ${fd_port}
2119 Storage daemon Port: ${sd_port}
2121 Director User: ${dir_user}
2122 Director Group: ${dir_group}
2123 Storage Daemon User: ${sd_user}
2124 Storage DaemonGroup: ${sd_group}
2125 File Daemon User: ${fd_user}
2126 File Daemon Group: ${fd_group}
2128 SQL binaries Directory ${SQL_BINDIR}
2130 Large file support: $largefile_support
2131 Bacula conio support: ${got_conio} ${CONS_LIBS}
2132 readline support: ${got_readline} ${PRTREADLINE_SRC}
2133 TCP Wrappers support: ${TCPW_MSG}
2134 ZLIB support: ${have_zlib}
2135 enable-smartalloc: ${support_smartalloc}
2136 enable-gnome: ${support_gnome} ${gnome_version}
2137 enable-wx-console: ${support_wx_console}
2138 enable-tray-monitor: ${support_tray_monitor}
2139 client-only: ${build_client_only}
2140 ACL support: ${have_acl}
2141 Python support: ${support_python} ${PYTHON_LIBS}
2148 # cweb support: ${got_cweb} ${CWEB_SRC}
2149 # gmp support: ${got_gmp} ${GMP_SRC}