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=-I/usr/include/python2.2
525 PYTHON_LIBS="-L/usr/lib/python2.2/config -lpython2.2 -lutil -ldl"
526 elif test -f /usr/include/python2.3/Python.h; then
527 PYTHON_INCDIR=-I/usr/include/python2.3
528 PYTHON_LIBS="-L/usr/lib/python2.3/config -lpython2.3 -lutil -ldl"
529 elif test -f $prefix/include/Python.h; then
530 PYTHON_INCDIR=-I$prefix/include
531 PYTHON_LIBS="-L$prefix/lib/config -lpython -lutil -ldl"
534 AC_MSG_ERROR(Unable to find Python.h in standard locations)
537 if test -f $withval/Python.h; then
538 PYTHON_INCDIR=-I$withval
539 PYTHON_LIBS="-L$withval/config -lpython -lutil -ldl"
540 elif test -f $withval/include/Python.h; then
541 PYTHON_INCDIR=-I$withval/include
542 PYTHON_LIBS="-L$withval/lib/config -lpython -lutil -ldl"
545 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
548 AC_DEFINE([HAVE_PYTHON], 1)
558 AC_SUBST(PYTHON_LIBS)
559 AC_SUBST(PYTHON_INCDIR)
562 # -------------------------------------------
563 # check for cdrecord writer location
564 # get scsibus,target,lun
565 # -------------------------------------------
567 if test ! x$CDRECORD = x ; then
568 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD-RW | ${AWK} '{print $1}'`
569 if test x${CDSTL} = x ; then
570 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD+RW | ${AWK} '{print $1}'`
572 if test x${CDSTL} = x ; then
579 # ---------------------------------------------------
580 # Check for GMP support/directory
581 # ---------------------------------------------------
585 # [ --with-gmp[=DIR] Specify gmp library directory],
587 # case "$with_gmp" in
590 # if test "$with_gmp" != "yes"; then
591 # GMP_INC="-I$with_gmp"
593 # GMP_LDFLAGS="-L$with_gmp"
595 # with_gmp="/usr/include"
597 # AC_CHECK_HEADER($with_gmp/gmp.h,
598 # [ AC_MSG_RESULT(yes)
599 # AC_DEFINE(HAVE_GMP)
603 # [ AC_MSG_ERROR([*** gmp library missing])
609 # # check for standard gmp library
610 # AC_CHECK_HEADER(/usr/include/gmp.h,
611 # [ AC_MSG_RESULT(yes)
612 # AC_DEFINE(HAVE_GMP)
617 # # Did not find standard library, so use our own
619 # AC_DEFINE(HAVE_GMP)
622 # GMP_INC="-I${TOP_DIR}/depkgs/gmp"
624 # GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
625 # GMP_SRC="${TOP_DIR}/depkgs/gmp"
631 #AC_SUBST(GMP_LDFLAGS)
635 # -----------------------------------------------------------------------
638 # ---------------------------------------------------
639 # Check for CWEB support/directory
640 # ---------------------------------------------------
645 # [ --with-cweb[=DIR] Specify cweb library directory],
647 # case "$with_cweb" in
650 # if test "$with_cweb" != "yes"; then
651 # CWEB_INC="-I$with_cweb"
653 # CWEB_LDFLAGS="-L$with_cweb"
655 # with_cweb="/usr/include"
657 # AC_CHECK_HEADER($with_cweb/cweb.h,
658 # [ AC_MSG_RESULT(yes)
659 # AC_DEFINE(HAVE_CWEB)
663 # [ AC_MSG_ERROR([*** cweb library missing])
669 # # check for standard cweb library
670 # AC_CHECK_HEADER(/usr/include/cweb.h,
671 # [ AC_MSG_RESULT(yes)
672 # AC_DEFINE(HAVE_CWEB)
677 # # Did not find starndard library, so use our own
679 # AC_DEFINE(HAVE_CWEB)
682 # CWEB=${TOP_DIR}/depkgs/cweb
683 # CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
685 # CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
686 # CWEB_SRC="${TOP_DIR}/depkgs/cweb"
693 #AC_SUBST(CWEB_LDFLAGS)
697 # -----------------------------------------------------------------------
700 # Find where sockets are (especially for Solaris)
701 # Do this before the TCP Wrappers test since tcp wrappers
702 # uses the socket library and some linkers are stupid.
704 AC_CHECK_FUNC(socket,
705 AC_MSG_RESULT(using libc's socket),
706 AC_CHECK_LIB(xnet,socket)
707 AC_CHECK_LIB(socket,socket)
708 AC_CHECK_LIB(inet,socket))
711 # -----------------------------------------------------------
712 # Check whether user wants TCP wrappers support (default off)
713 # -----------------------------------------------------------
715 AC_ARG_WITH(tcp-wrappers,
716 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
718 if test "x$withval" != "xno" ; then
720 LIBS="$saved_LIBS -lwrap"
721 AC_MSG_CHECKING(for libwrap)
724 int deny_severity = 0;
725 int allow_severity = 0;
726 struct request_info *req; ],
727 [ hosts_access(req); ],
730 AC_DEFINE(HAVE_LIBWRAP)
733 LIBS="$saved_LIBS -lwrap -lnsl"
736 int deny_severity = 0;
737 int allow_severity = 0;
738 struct request_info *req; ],
739 [ hosts_access(req); ],
742 AC_DEFINE(HAVE_LIBWRAP)
745 [AC_MSG_ERROR([*** libwrap missing]) ] ]
752 # ------------------------------------------
753 # Where to place working dir
754 # ------------------------------------------
755 working_dir=`eval echo ${prefix}/var/bacula/working`
756 AC_ARG_WITH(working-dir,
757 [ --with-working-dir=PATH specify path of Bacula working directory],
759 if test "x$withval" != "xno" ; then
765 AC_SUBST(working_dir)
768 # ------------------------------------------
769 # Where to place scriptdir (script files)
770 # ------------------------------------------
771 scriptdir=`eval echo ${sysconfdir}`
772 AC_ARG_WITH(scriptdir,
773 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
775 if test "x$withval" != "xno" ; then
784 # ------------------------------------------
785 # Where to send dump email
786 # ------------------------------------------
787 dump_email=root@localhost
788 AC_ARG_WITH(dump-email,
789 [ --with-dump-email=EMAIL dump email address],
791 if test "x$withval" != "xno" ; then
799 # ------------------------------------------
800 # Where to send job email
801 # ------------------------------------------
802 job_email=root@localhost
803 AC_ARG_WITH(job-email,
804 [ --with-job-email=EMAIL job output email address],
806 if test "x$withval" != "xno" ; then
814 # ------------------------------------------
815 # Where to find smtp host
816 # ------------------------------------------
818 AC_ARG_WITH(smtp_host,
819 [ --with-smtp-host=HOST SMTP mail host address],
821 if test "x$withval" != "xno" ; then
830 # ------------------------------------
831 # Where to place pid files
832 # ------------------------------------
835 [ --with-pid-dir=PATH specify location of Bacula pid files],
837 if test "x$withval" != "xno" ; then
843 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
847 # ------------------------------------
848 # Where to place subsys "lock file"
849 # ------------------------------------
850 subsysdir=/var/run/subsys
851 AC_ARG_WITH(subsys-dir,
852 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
854 if test "x$withval" != "xno" ; then
864 # ------------------------------------
865 # Where to start assigning ports
866 # ------------------------------------
868 AC_ARG_WITH(baseport,
869 [ --with-baseport=PORT specify base port address for daemons],
871 if test "x$withval" != "xno" ; then
878 dir_port=`expr $baseport`
879 fd_port=`expr $baseport + 1`
880 sd_port=`expr $fd_port + 1`
887 # ------------------------------------------
889 # ------------------------------------------
891 AC_ARG_WITH(dir-password,
892 [ --with-dir-password=PASSWORD specify Director's password],
894 if test "x$withval" != "xno" ; then
895 dir_password=$withval
900 if test "x$dir_password" = "x" ; then
901 if test "x$OPENSSL" = "xnone" ; then
902 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
903 key=`autoconf/randpass 33`
905 key=`openssl rand -base64 33`
911 AC_ARG_WITH(fd-password,
912 [ --with-fd-password=PASSWORD specify Client's password],
914 if test "x$withval" != "xno" ; then
920 if test "x$fd_password" = "x" ; then
921 if test "x$OPENSSL" = "xnone" ; then
922 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
923 key=`autoconf/randpass 37`
925 key=`openssl rand -base64 33`
931 AC_ARG_WITH(sd-password,
932 [ --with-sd-password=PASSWORD specify Storage daemon's password],
934 if test "x$withval" != "xno" ; then
940 if test "x$sd_password" = "x" ; then
941 if test "x$OPENSSL" = "xnone" ; then
942 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
943 key=`autoconf/randpass 41`
945 key=`openssl rand -base64 33`
951 AC_ARG_WITH(mon-dir-password,
952 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
954 if test "x$withval" != "xno" ; then
955 mon_dir_password=$withval
960 if test "x$mon_dir_password" = "x" ; then
961 if test "x$OPENSSL" = "xnone" ; then
962 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
963 key=`autoconf/randpass 33`
965 key=`openssl rand -base64 33`
967 mon_dir_password=$key
971 AC_ARG_WITH(mon-fd-password,
972 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
974 if test "x$withval" != "xno" ; then
975 mon_fd_password=$withval
980 if test "x$mon_fd_password" = "x" ; then
981 if test "x$OPENSSL" = "xnone" ; then
982 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
983 key=`autoconf/randpass 37`
985 key=`openssl rand -base64 33`
991 AC_ARG_WITH(mon-sd-password,
992 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
994 if test "x$withval" != "xno" ; then
995 mon_sd_password=$withval
1000 if test "x$mon_sd_password" = "x" ; then
1001 if test "x$OPENSSL" = "xnone" ; then
1002 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
1003 key=`autoconf/randpass 41`
1005 key=`openssl rand -base64 33`
1007 mon_sd_password=$key
1010 AC_SUBST(dir_password)
1011 AC_SUBST(fd_password)
1012 AC_SUBST(sd_password)
1013 AC_SUBST(mon_dir_password)
1014 AC_SUBST(mon_fd_password)
1015 AC_SUBST(mon_sd_password)
1017 # -------------------------------------------------------------------------
1018 # Set variables for bimagemgr installation
1019 # -------------------------------------------------------------------------
1020 bimagemgr_cgidir=/var/www/cgi-bin
1021 AC_ARG_WITH(bimagemgr-cgidir,
1022 [ --with-bimagemgr-cgidir=DIR specify bimagemgr cgi-bin dir],
1024 if test "x$withval" != "xno" ; then
1025 bimagemgr_cgidir=$withval
1030 bimagemgr_docdir=/var/www/html
1031 AC_ARG_WITH(bimagemgr-docdir,
1032 [ --with-bimagemgr-docdir=DIR specify bimagemgr doc root dir],
1034 if test "x$withval" != "xno" ; then
1035 bimagemgr_docdir=$withval
1040 bimagemgr_binowner=root
1041 AC_ARG_WITH(bimagemgr-binowner,
1042 [ --with-bimagemgr-binowner=USER specify bimagemgr binary file owner],
1044 if test "x$withval" != "xno" ; then
1045 bimagemgr_binowner=$withval
1050 bimagemgr_bingroup=root
1051 AC_ARG_WITH(bimagemgr-bingroup,
1052 [ --with-bimagemgr-bingroup=USER specify bimagemgr binary file group],
1054 if test "x$withval" != "xno" ; then
1055 bimagemgr_bingroup=$withval
1060 bimagemgr_dataowner=apache
1061 AC_ARG_WITH(bimagemgr-dataowner,
1062 [ --with-bimagemgr-dataowner=USER specify bimagemgr data file owner],
1064 if test "x$withval" != "xno" ; then
1065 bimagemgr_dataowner=$withval
1070 bimagemgr_datagroup=apache
1071 AC_ARG_WITH(bimagemgr-datagroup,
1072 [ --with-bimagemgr-datagroup=USER specify bimagemgr data file group],
1074 if test "x$withval" != "xno" ; then
1075 bimagemgr_datagroup=$withval
1080 AC_SUBST(bimagemgr_cgidir)
1081 AC_SUBST(bimagemgr_docdir)
1082 AC_SUBST(bimagemgr_binowner)
1083 AC_SUBST(bimagemgr_bingroup)
1084 AC_SUBST(bimagemgr_dataowner)
1085 AC_SUBST(bimagemgr_datagroup)
1088 # Handle users and groups for each daemon
1091 AC_ARG_WITH(dir_user,
1092 [ --with-dir-user=USER specify user for Director daemon],
1094 if test "x$withval" != "x" ; then
1101 AC_ARG_WITH(dir_group,
1102 [ --with-dir-group=GROUP specify group for Director daemon],
1104 if test "x$withval" != "x" ; then
1111 AC_ARG_WITH(sd_user,
1112 [ --with-sd-user=USER specify user for Storage daemon],
1114 if test "x$withval" != "x" ; then
1121 AC_ARG_WITH(sd_group,
1122 [ --with-sd-group=GROUP specify group for Storage daemon],
1124 if test "x$withval" != "x" ; then
1131 AC_ARG_WITH(fd_user,
1132 [ --with-fd-user=USER specify user for File daemon],
1134 if test "x$withval" != "x" ; then
1141 AC_ARG_WITH(fd_group,
1142 [ --with-fd-group=GROUP specify group for File daemon],
1144 if test "x$withval" != "x" ; then
1161 # allow setting default executable permissions
1164 AC_ARG_WITH(sbin-perm,
1165 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1167 if test "x$withval" != "x" ; then
1175 # ------------------------------------------------
1176 # Bacula check for various SQL database engines
1177 # ------------------------------------------------
1178 BA_CHECK_POSTGRESQL_DB
1187 AC_DEFINE(PROTOTYPES)
1189 dnl# --------------------------------------------------------------------------
1190 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1192 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1193 if test -z "$CCOPTS"; then
1194 CCOPTS='-g -O2 -Wall'
1203 dnl See if we can use 64 bit file addresses
1204 largefile_support="no"
1210 dnl# --------------------------------------------------------------------------
1211 dnl# CHECKING FOR HEADER FILES
1212 dnl# --------------------------------------------------------------------------
1248 AC_STRUCT_ST_BLKSIZE
1252 dnl# --------------------------------------------------------------------------
1253 dnl# Check for utime.h structure
1254 dnl# --------------------------------------------------------------------------
1255 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1257 #include <sys/types.h>
1258 #include <utime.h>], [struct utimbuf foo],
1259 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1260 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1262 dnl# --------------------------------------------------------------------------
1263 dnl# Check for socklen_t
1264 dnl# --------------------------------------------------------------------------
1265 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1267 #include <sys/types.h>
1268 #include <sys/socket.h>],
1270 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1271 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1273 dnl# --------------------------------------------------------------------------
1274 dnl# Check for bigendian
1275 dnl# --------------------------------------------------------------------------
1276 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1278 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1279 [ba_cv_bigendian=yes],
1280 [ba_cv_bigendian=no],
1281 [ba_cv_bigendian=no])])
1282 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1288 dnl# --------------------------------------------------------------------------
1289 dnl# CHECKING FOR FILESYSTEM TYPE
1290 dnl# --------------------------------------------------------------------------
1291 AC_MSG_CHECKING(how to get filesystem type)
1293 # The order of these tests is important.
1294 AC_TRY_CPP([#include <sys/statvfs.h>
1295 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1296 if test $fstype = no; then
1297 AC_TRY_CPP([#include <sys/statfs.h>
1298 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1300 if test $fstype = no; then
1301 AC_TRY_CPP([#include <sys/statfs.h>
1302 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1304 if test $fstype = no; then
1305 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1307 if test $fstype = no; then
1308 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1310 if test $fstype = no; then
1311 AC_TRY_CPP([#include <sys/mount.h>
1312 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1314 AC_MSG_RESULT($fstype)
1316 dnl# --------------------------------------------------------------------------
1317 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1318 dnl# --------------------------------------------------------------------------
1326 AC_CHECK_TYPE(ino_t, unsigned long)
1327 AC_CHECK_TYPE(dev_t, unsigned long)
1328 AC_CHECK_TYPE(daddr_t, long)
1329 AC_CHECK_TYPE(major_t, int)
1330 AC_CHECK_TYPE(minor_t, int)
1331 AC_CHECK_TYPE(ssize_t, int)
1338 AC_CHECK_SIZEOF(char, 1)
1339 AC_CHECK_SIZEOF(short int, 2)
1340 AC_CHECK_SIZEOF(int, 4)
1341 AC_CHECK_SIZEOF(long int, 4)
1342 AC_CHECK_SIZEOF(long long int, 8)
1343 AC_CHECK_SIZEOF(int *, 4)
1345 # Check for sys/types.h types
1346 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1348 [ #include <sys/types.h> ],
1350 [ ac_cv_have_u_int="yes" ],
1351 [ ac_cv_have_u_int="no" ]
1354 if test "x$ac_cv_have_u_int" = "xyes" ; then
1355 AC_DEFINE(HAVE_U_INT)
1359 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1361 [ #include <sys/types.h> ],
1362 [ intmax_t a; a = 1;],
1363 [ ac_cv_have_intmax_t="yes" ],
1366 [ #include <stdint.h> ],
1367 [ intmax_t a; a = 1;],
1368 [ ac_cv_have_intmax_t="yes" ],
1369 [ ac_cv_have_intmax_t="no" ]
1375 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1376 AC_DEFINE(HAVE_INTMAX_T)
1381 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1383 [ #include <sys/types.h> ],
1384 [ u_intmax_t a; a = 1;],
1385 [ ac_cv_have_u_intmax_t="yes" ],
1388 [ #include <stdint.h> ],
1389 [ u_intmax_t a; a = 1;],
1390 [ ac_cv_have_u_intmax_t="yes" ],
1391 [ ac_cv_have_u_intmax_t="no" ]
1396 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1397 AC_DEFINE(HAVE_U_INTMAX_T)
1402 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1404 [ #include <sys/types.h> ],
1405 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1406 [ ac_cv_have_intxx_t="yes" ],
1407 [ ac_cv_have_intxx_t="no" ]
1410 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1411 AC_DEFINE(HAVE_INTXX_T)
1415 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1417 [ #include <sys/types.h> ],
1418 [ int64_t a; a = 1;],
1419 [ ac_cv_have_int64_t="yes" ],
1420 [ ac_cv_have_int64_t="no" ]
1423 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1424 AC_DEFINE(HAVE_INT64_T)
1428 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1430 [ #include <sys/types.h> ],
1431 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1432 [ ac_cv_have_u_intxx_t="yes" ],
1433 [ ac_cv_have_u_intxx_t="no" ]
1436 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1437 AC_DEFINE(HAVE_U_INTXX_T)
1441 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1443 [ #include <sys/types.h> ],
1444 [ u_int64_t a; a = 1;],
1445 [ ac_cv_have_u_int64_t="yes" ],
1446 [ ac_cv_have_u_int64_t="no" ]
1449 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1450 AC_DEFINE(HAVE_U_INT64_T)
1454 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1455 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1457 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1459 [ #include <sys/bitypes.h> ],
1460 [ int8_t a; int16_t b; int32_t c;
1461 u_int8_t e; u_int16_t f; u_int32_t g;
1462 a = b = c = e = f = g = 1; ],
1463 [ AC_DEFINE(HAVE_U_INTXX_T)
1464 AC_DEFINE(HAVE_INTXX_T)
1465 AC_DEFINE(HAVE_SYS_BITYPES_H)
1466 AC_MSG_RESULT(yes) ],
1467 [ AC_MSG_RESULT(no)]
1471 if test -z "$have_u_intxx_t" ; then
1472 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1474 [ #include <sys/types.h> ],
1475 [ uint8_t a; uint16_t b;
1476 uint32_t c; a = b = c = 1; ],
1477 [ ac_cv_have_uintxx_t="yes" ],
1478 [ ac_cv_have_uintxx_t="no" ]
1481 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1482 AC_DEFINE(HAVE_UINTXX_T)
1486 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1487 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1489 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1491 [ #include <sys/bitypes.h> ],
1492 [ int64_t a; u_int64_t b;
1494 [ AC_DEFINE(HAVE_U_INT64_T)
1495 AC_DEFINE(HAVE_INT64_T)
1496 AC_MSG_RESULT(yes) ],
1497 [ AC_MSG_RESULT(no)]
1501 if (test -z "$have_uintxx_t" && \
1502 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1504 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1506 [ #include <sys/bitypes.h> ],
1507 [ uint8_t a; uint16_t b;
1508 uint32_t c; a = b = c = 1; ],
1509 [ AC_DEFINE(HAVE_UINTXX_T)
1510 AC_MSG_RESULT(yes) ],
1511 [ AC_MSG_RESULT(no)]
1519 dnl# --------------------------------------------------------------------------
1520 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1521 dnl# --------------------------------------------------------------------------
1537 [echo 'configure: cannot find needed function.'; exit 1]
1540 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1541 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1543 AC_CHECK_FUNCS(chflags)
1545 AC_CHECK_FUNCS(snprintf vsnprintf gethostid getdomainname)
1547 dnl# --------------------------------------------------------------------------
1548 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1549 dnl# --------------------------------------------------------------------------
1550 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1552 # If resolver functions are not in libc check for -lnsl or -lresolv.
1553 AC_CHECK_FUNC(gethostbyname_r,
1554 AC_MSG_RESULT(using libc's resolver),
1555 AC_CHECK_LIB(nsl,gethostbyname_r)
1556 AC_CHECK_LIB(resolv,gethostbyname_r))
1560 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1561 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1562 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1564 dnl ----------------------------
1565 dnl check sa_len of sockaddr
1566 dnl ----------------------------
1567 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1568 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1569 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1571 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1572 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1576 dnl Check for IPv6 support
1577 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1578 [AC_TRY_LINK([ #include <sys/types.h>
1579 #include <sys/socket.h>
1580 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1582 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1584 if test "$ac_cv_ipv6_support" = yes; then
1585 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1594 AC_FUNC_CLOSEDIR_VOID
1595 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1599 dnl# FreeBSD needs to link libxpg4
1600 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1603 AC_CHECK_LIB(sun, getpwnam)
1605 AC_CHECK_HEADERS(zlib.h)
1606 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1608 if test x$FDLIBS = x-lz; then
1609 AC_DEFINE(HAVE_LIBZ)
1613 AC_CHECK_HEADER(sys/acl.h)
1614 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1616 if test $ac_cv_lib_acl_acl_get_file = yes; then
1621 dnl Check for pthread libraries
1623 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1624 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1625 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1626 [AC_CHECK_FUNC(pthread_create)]
1636 LDFLAGS=${LDFLAGS--O}
1637 DB_LIBS="${SQL_LFLAGS}"
1639 CPPFLAGS="$CPPFLAGS"
1650 AC_SUBST(X_EXTRA_LIBS)
1654 dnl# extra configurable objects
1665 # Finally we set appropriate distribution specific
1666 # variables and defaults
1668 # PFILES are platform specific files
1669 PFILES="platforms/Makefile"
1673 hostname=`uname -n | cut -d '.' -f 1`
1677 PSCMD="ps -e -o pid,comm"
1679 platforms/aix/Makefile"
1680 TAPEDRIVE="/dev/rmt0.1"
1684 PTHREAD_LIB="-lpthread -lexc"
1685 if test "${CC}" = "gcc" ; then
1692 TAPEDRIVE="/dev/nrmt0"
1695 DISTVER=`uname -a |awk '{print $3}'`
1696 TAPEDRIVE="/dev/nrmt0"
1697 PTHREAD_LIB="-pthread"
1698 CFLAGS="${CFLAGS} -pthread"
1699 PSCMD="ps -x -o pid,command"
1703 platforms/bsdi/Makefile \
1704 platforms/bsdi/bacula-fd \
1705 platforms/bsdi/bacula-sd \
1706 platforms/bsdi/bacula-dir"
1707 largefile_support="yes"
1710 DISTVER=`uname -a |awk '{print $3}'`
1711 TAPEDRIVE="/dev/nrst0"
1714 WLDFLAGS="-mwindows"
1718 TAPEDRIVE="/dev/nst0"
1719 PSCMD="ps -e -o pid,command"
1722 platforms/darwin/Makefile"
1725 DISTVER=`cat /etc/debian_version`
1726 TAPEDRIVE="/dev/nrst0"
1727 PSCMD="ps -e -o pid,command"
1730 DISTVER=`uname -a |awk '{print $3}'`
1731 VER=`echo $DISTVER | cut -c 1`
1732 if test x$VER = x4 ; then
1733 PTHREAD_LIB="-pthread"
1734 CFLAGS="${CFLAGS} -pthread"
1738 TAPEDRIVE="/dev/nrsa0"
1739 PSCMD="ps -x -o pid,command"
1741 platforms/freebsd/Makefile \
1742 platforms/freebsd/bacula-fd \
1743 platforms/freebsd/bacula-sd \
1744 platforms/freebsd/bacula-dir"
1745 largefile_support="yes"
1748 PSCMD="UNIX95=1 ps -e -o pid,comm"
1749 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1751 TAPEDRIVE="/dev/rmt/0hnb"
1755 TAPEDRIVE="/dev/rmt/0cbn"
1756 PSCMD="ps -e -o pid,comm"
1758 platforms/irix/Makefile \
1759 platforms/irix/bacula-fd \
1760 platforms/irix/bacula-sd \
1761 platforms/irix/bacula-dir"
1764 DISTVER=`uname -a |awk '{print $3}'`
1767 TAPEDRIVE="/dev/nrst0"
1768 PSCMD="ps -a -o pid,command"
1769 PTHREAD_LIB="-pthread"
1770 CFLAGS="${CFLAGS} -pthread"
1773 DISTVER=`uname -a |awk '{print $3}'`
1776 TAPEDRIVE="/dev/nrst0"
1777 PSCMD="ps -ax -o pid,command"
1778 PTHREAD_LIB="-pthread"
1779 CFLAGS="${CFLAGS} -pthread"
1781 platforms/openbsd/Makefile \
1782 platforms/openbsd/bacula-fd \
1783 platforms/openbsd/bacula-sd \
1784 platforms/openbsd/bacula-dir"
1787 if test -f /etc/whitebox-release ; then
1788 f=/etc/whitebox-release
1790 f=/etc/redhat-release
1792 if test `cat $f | grep release |\
1793 cut -f 3 -d ' '`x = "Enterprise"x ; then
1794 DISTVER="Enterprise "`cat $f | grep release |\
1797 DISTVER=`cat /etc/redhat-release | grep release |\
1800 TAPEDRIVE="/dev/nst0"
1801 PSCMD="ps -e -o pid,command"
1803 platforms/redhat/Makefile \
1804 platforms/redhat/bacula-fd \
1805 platforms/redhat/bacula-sd \
1806 platforms/redhat/bacula-dir \
1807 platforms/redhat/bacula.spec \
1809 hostname=`hostname -s`
1812 DISTVER=`cat /etc/mandrake-release | grep release |\
1814 TAPEDRIVE="/dev/nst0"
1815 PSCMD="ps -e -o pid,command"
1817 platforms/mandrake/Makefile \
1818 platforms/mandrake/bacula-fd \
1819 platforms/mandrake/bacula-sd \
1820 platforms/mandrake/bacula-dir \
1821 platforms/mandrake/bacula.spec \
1825 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1826 TAPEDRIVE="/dev/nst0"
1827 PSCMD="ps -e -o pid,command"
1829 platforms/gentoo/Makefile \
1830 platforms/gentoo/bacula-init \
1831 platforms/gentoo/bacula-fd \
1832 platforms/gentoo/bacula-sd \
1833 platforms/gentoo/bacula-dir"
1836 DISTVER=`cat /etc/slackware-version`
1837 TAPEDRIVE="/dev/nst0"
1838 PSCMD="ps -e -o pid,command"
1840 platforms/slackware/Makefile \
1841 platforms/slackware/rc.bacula-fd \
1842 platforms/slackware/rc.bacula-sd \
1843 platforms/slackware/rc.bacula-dir\
1844 platforms/slackware/functions.bacula"
1848 TAPEDRIVE="/dev/rmt/0cbn"
1849 PSCMD="ps -e -o pid,comm"
1851 platforms/solaris/Makefile \
1852 platforms/solaris/bacula-fd \
1853 platforms/solaris/bacula-sd \
1854 platforms/solaris/bacula-dir"
1855 if test x$DISTVER = x5.6 ; then
1856 AC_DEFINE(HAVE_OLD_SOCKOPT)
1860 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1862 TAPEDRIVE="/dev/nst0"
1863 PSCMD="ps -e -o pid,command"
1865 platforms/suse/Makefile \
1866 platforms/suse/bacula-fd \
1867 platforms/suse/bacula-sd \
1868 platforms/suse/bacula-dir \
1869 platforms/suse/bacula \
1870 platforms/suse/bacula.spec"
1875 TAPEDRIVE="/dev/nst0"
1876 PSCMD="ps -e -o pid,command"
1878 platforms/suse/Makefile \
1879 platforms/suse/bacula-fd \
1880 platforms/suse/bacula-sd \
1881 platforms/suse/bacula-dir"
1885 TAPEDRIVE="/dev/nst0"
1888 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1894 LIBS="$PTHREAD_LIB $LIBS"
1896 AC_DEFINE_UNQUOTED(lld, "$lld")
1897 AC_DEFINE_UNQUOTED(llu, "$llu")
1905 dnl# common parts of the Makefile
1906 MCOMMON=./autoconf/Make.common
1907 AC_SUBST_FILE(MCOMMON)
1910 if test "x${subsysdir}" = "x${sbindir}" ; then
1913 echo "You have set both --sbindir and --with-subsys-dir"
1914 echo " equal to: ${subsysdir} "
1915 echo "This is not permitted. Please reconfigure."
1917 echo "Aborting configuration ..."
1923 AC_OUTPUT([autoconf/Make.common \
1926 rescue/linux/Makefile \
1927 rescue/linux/floppy/Makefile \
1928 rescue/linux/cdrom/Makefile \
1929 rescue/linux/cdrom/bacula/Makefile \
1930 rescue/freebsd/Makefile \
1931 rescue/solaris/Makefile \
1932 scripts/startmysql \
1934 scripts/btraceback \
1940 scripts/devel_bacula \
1943 scripts/bacula.desktop.gnome1 \
1944 scripts/bacula.desktop.gnome2 \
1945 scripts/bacula.desktop.gnome1.consolehelper \
1946 scripts/bacula.desktop.gnome2.consolehelper \
1947 scripts/bacula.desktop.gnome1.xsu \
1948 scripts/bacula.desktop.gnome2.xsu \
1949 scripts/gnome-console.console_apps \
1950 scripts/mtx-changer \
1951 scripts/bacula-tray-monitor.desktop \
1955 src/console/Makefile \
1956 src/console/bconsole.conf \
1957 src/gnome-console/Makefile \
1958 src/gnome-console/gnome-console.conf \
1959 src/gnome2-console/Makefile \
1960 src/gnome2-console/gnome-console.conf \
1961 src/wx-console/Makefile \
1962 src/wx-console/wx-console.conf \
1963 src/tray-monitor/Makefile \
1964 src/tray-monitor/tray-monitor.conf \
1966 src/dird/bacula-dir.conf \
1968 src/stored/Makefile \
1969 src/stored/bacula-sd.conf \
1970 src/filed/Makefile \
1971 src/filed/bacula-fd.conf \
1972 src/filed/win32/Makefile \
1974 src/cats/make_catalog_backup \
1975 src/cats/delete_catalog_backup \
1976 src/cats/create_postgresql_database \
1977 src/cats/update_postgresql_tables \
1978 src/cats/make_postgresql_tables \
1979 src/cats/grant_postgresql_privileges \
1980 src/cats/drop_postgresql_tables \
1981 src/cats/drop_postgresql_database \
1982 src/cats/create_mysql_database \
1983 src/cats/update_mysql_tables \
1984 src/cats/make_mysql_tables \
1985 src/cats/grant_mysql_privileges \
1986 src/cats/drop_mysql_tables \
1987 src/cats/drop_mysql_database \
1988 src/cats/create_sqlite_database \
1989 src/cats/update_sqlite_tables \
1990 src/cats/make_sqlite_tables \
1991 src/cats/grant_sqlite_privileges \
1992 src/cats/drop_sqlite_tables \
1993 src/cats/drop_sqlite_database \
1996 src/cats/create_bdb_database \
1997 src/cats/update_bdb_tables \
1998 src/cats/make_bdb_tables \
1999 src/cats/grant_bdb_privileges \
2000 src/cats/drop_bdb_tables \
2001 src/cats/drop_bdb_database \
2002 src/cats/create_bacula_database \
2003 src/cats/update_bacula_tables \
2004 src/cats/grant_bacula_privileges \
2005 src/cats/make_bacula_tables \
2006 src/cats/drop_bacula_tables \
2007 src/cats/drop_bacula_database \
2008 src/findlib/Makefile \
2009 src/tools/Makefile \
2010 src/win32/winbacula.nsi \
2011 src/win32/baculafd/bacula-fd.conf \
2012 src/win32/Makefile \
2013 src/win32/console/bconsole.conf \
2014 src/win32/wx-console/wx-console.conf \
2015 src/win32/pebuilder/Makefile \
2016 src/bimagemgr/Makefile \
2017 src/bimagemgr/bacula-bimagemgr.spec \
2019 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
2023 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2024 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2029 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2030 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2032 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2033 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2035 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2036 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2038 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2039 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2041 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2042 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2044 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2048 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2049 largefile_support="yes"
2053 # A whole lot of hand springs to get the compiler version.
2054 # This is because gcc changed the output in version 3.0
2056 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2057 if test "x${CCVERSION}" = "x" ; then
2058 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2060 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2061 if test x"${CXXVERSION}" = x ; then
2062 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2065 if test "x${subsysdir}" = "x${sbindir}" ; then
2068 echo "You have set --sbindir and --with-subsys-dir"
2069 echo " both equal to: ${subsysdir} "
2070 echo " This is not permitted. Please reconfigure."
2072 echo "Aborting configuration ..."
2078 if test "x${db_name}" = "xInternal" ; then
2081 echo "You have not specified either --enable-client-only or one of the"
2082 echo " supported databases: MySQL, PostgreSQL, or SQLite".
2083 echo " This is not permitted. Please reconfigure."
2085 echo "Aborting the configuration ..."
2092 Configuration on `date`:
2094 Host: $host -- ${DISTNAME} ${DISTVER}
2095 Bacula version: ${VERSION} (${DATE})
2096 Source code location: ${srcdir}
2097 Install binaries: ${sbindir}
2098 Install config files: ${sysconfdir}
2099 Scripts directory: ${scriptdir}
2100 Working directory: ${working_dir}
2101 PID directory: ${piddir}
2102 Subsys directory: ${subsysdir}
2103 C Compiler: ${CC} ${CCVERSION}
2104 C++ Compiler: ${CXX} ${CXXVERSION}
2105 Compiler flags: ${WCFLAGS} ${CFLAGS}
2106 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2108 Statically Linked Tools: ${support_static_tools}
2109 Statically Linked FD: ${support_static_fd}
2110 Statically Linked SD: ${support_static_sd}
2111 Statically Linked DIR: ${support_static_dir}
2112 Statically Linked CONS: ${support_static_cons}
2113 Database type: ${db_name}
2114 Database lib: ${DB_LIBS}
2116 Job Output Email: ${job_email}
2117 Traceback Email: ${dump_email}
2118 SMTP Host Address: ${smtp_host}
2120 Director Port: ${dir_port}
2121 File daemon Port: ${fd_port}
2122 Storage daemon Port: ${sd_port}
2124 Director User: ${dir_user}
2125 Director Group: ${dir_group}
2126 Storage Daemon User: ${sd_user}
2127 Storage DaemonGroup: ${sd_group}
2128 File Daemon User: ${fd_user}
2129 File Daemon Group: ${fd_group}
2131 SQL binaries Directory ${SQL_BINDIR}
2133 Large file support: $largefile_support
2134 Bacula conio support: ${got_conio} ${CONS_LIBS}
2135 readline support: ${got_readline} ${PRTREADLINE_SRC}
2136 TCP Wrappers support: ${TCPW_MSG}
2137 ZLIB support: ${have_zlib}
2138 enable-smartalloc: ${support_smartalloc}
2139 enable-gnome: ${support_gnome} ${gnome_version}
2140 enable-wx-console: ${support_wx_console}
2141 enable-tray-monitor: ${support_tray_monitor}
2142 client-only: ${build_client_only}
2143 ACL support: ${have_acl}
2144 Python support: ${support_python} ${PYTHON_LIBS}
2151 # cweb support: ${got_cweb} ${CWEB_SRC}
2152 # gmp support: ${got_gmp} ${GMP_SRC}