3 dnl# Process this file with autoconf to produce a configure script.
11 AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
12 AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
14 dnl require a recent autoconf
18 dnl search for true and false programs.
19 AC_PATH_PROGS(TRUEPRG, true, :)
20 AC_PATH_PROGS(FALSEPRG, false, :)
25 VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
26 DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
27 LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
31 echo "configuring for bacula $VERSION ($DATE)"
34 dnl -------------------------------------------------------
35 dnl# Check for compiler.
36 dnl ------------------------------------------------------
40 AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
41 AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
48 dnl -------------------------------------------------------
49 dnl# Check for programs.
50 dnl ------------------------------------------------------
53 AC_PATH_PROG(MV, mv, mv)
54 AC_PATH_PROG(RM, rm, rm)
55 AC_PATH_PROG(CP, cp, cp)
56 AC_PATH_PROG(SED, sed, sed)
57 AC_PATH_PROG(AWK, awk, awk)
58 AC_PATH_PROG(ECHO, echo, echo)
59 AC_PATH_PROG(CMP, cmp, cmp)
60 AC_PATH_PROG(TBL, tbl, tbl)
61 AC_PATH_PROG(AR, ar, ar)
62 dnl AC_PATH_PROG(RANLIB, ranlib, ranlib)
63 AC_PATH_PROG(OPENSSL, openssl, none)
64 AC_PATH_PROG(MTX, mtx, mtx)
65 AC_PATH_PROG(MKISOFS, mkisofs, mkisofs)
66 AC_PATH_PROG(PYTHON, python, python)
67 AC_PATH_PROG(GROWISOFS, growisofs, growisofs)
68 AC_PATH_PROG(DVDRWMEDIAINFO, dvd+rw-mediainfo, dvd+rw-mediainfo)
69 AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
70 AC_PATH_PROG(WXCONFIG, wx-config, wx-config)
71 AC_PATH_PROG(CDRECORD, cdrecord, cdrecord)
72 AC_PATH_PROG(PIDOF, pidof, pidof)
74 test -n "$ARFLAG" || ARFLAGS="cr"
81 AC_SUBST(LOCAL_CFLAGS)
82 AC_SUBST(LOCAL_LDFLAGS)
87 dnl --------------------------------------------------
88 dnl Bacula OP Sys determination (see aclocal.m4)
89 dnl --------------------------------------------------
92 # -----------------------------------------------------------
93 dnl Bacula OPSys Distribution determination (see aclocal.m4)
94 # ----------------------------------------------------------
95 BA_CHECK_OPSYS_DISTNAME
97 # -----------------------------------------------------------
98 dnl Check for gnome stuff for gnome-console
99 # ----------------------------------------------------------
100 AM_ACLOCAL_INCLUDE(gnome-macros)
102 # ------------------------------------------------------------------
103 # If the user has not set --prefix, we set our default to nothing.
104 # In this case, if the user has not set --sysconfdir, we set it
105 # to the package default of /etc/bacula. If either --prefix or
106 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
107 # ------------------------------------------------------------------
108 if test x${prefix} = xNONE ; then
109 if test `eval echo ${sysconfdir}` = NONE/etc ; then
110 sysconfdir=/etc/bacula
114 sysconfdir=`eval echo ${sysconfdir}`
116 # -------------------------------------------------------------------------
117 # If the user has not set --exec-prefix, we default to ${prefix}
118 # -------------------------------------------------------------------------
119 if test x${exec_prefix} = xNONE ; then
120 exec_prefix=${prefix}
123 # ------------------------------------------------------------------
124 # If the user has not set --sbindir, we set our default as /sbin
125 # ------------------------------------------------------------------
126 if test x$sbindir = x'${exec_prefix}/sbin' ; then
127 sbindir=${exec_prefix}/sbin
129 sbindir=`eval echo ${sbindir}`
131 # ------------------------------------------------------------------
132 # All list of languages for which a translation exist. Each
133 # language is separated by a space.
134 # ------------------------------------------------------------------
137 AC_PATH_PROGS(MSGFMT, msgfmt, no)
138 if test "$MSGFMT" = "no"
140 echo 'msgfmt program not found, disabling NLS !'
142 USE_INCLUDED_LIBINTL=no
151 support_postgresql=no
152 support_smartalloc=yes
156 support_wx_console=no
158 support_static_tools=no
161 support_static_dir=no
162 support_static_cons=no
169 dnl# --------------------------------------------------------------------------
170 dnl# CHECKING COMMAND LINE OPTIONS
171 dnl# --------------------------------------------------------------------------
173 # -------------------------------------------
174 # gnome (default off)
175 # -------------------------------------------
177 [ --enable-gnome enable build of gnome-console GUI [disabled]],
178 [if test x$enableval = xyes; then
183 if test x$support_gnome = xyes; then
184 abc=`$PKGCONFIG --exists libgnomeui-2.0`
186 if test $pkg = 0; then
187 GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
188 GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
189 GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
190 GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
191 AC_SUBST(GNOME_INCLUDEDIR)
192 AC_SUBST(GNOMEUI_LIBS)
193 AC_SUBST(GNOME_LIBDIR)
195 GNOME_DIR=src/gnome2-console
196 gnome_version="Version 2.x"
200 GNOME_DIR=src/gnome-console
201 gnome_version="Version 1.4"
207 # -------------------------------------------
208 # wx-console (default off)
209 # -------------------------------------------
210 AC_ARG_ENABLE(wx-console,
211 [ --enable-wx-console enable build of wxWidgets console [disabled]],
212 [if test x$enableval = xyes; then
213 support_wx_console=yes
217 if test x$support_wx_console = xyes; then
218 abc=`$WXCONFIG --cppflags`
220 if test $pkg = 0; then
221 WXCONS_CPPFLAGS=`$WXCONFIG --cppflags`
222 WXCONS_LDFLAGS=`$WXCONFIG --libs`
223 AC_SUBST(WXCONS_CPPFLAGS)
224 AC_SUBST(WXCONS_LDFLAGS)
225 WX_DIR=src/wx-console
228 echo "wx-config program not found. wx-console disabled."
230 support_wx_console=no
236 # -------------------------------------------
237 # tray-monitor (default off)
238 # -------------------------------------------
239 AC_ARG_ENABLE(tray-monitor,
240 [ --enable-tray-monitor enable build of Gnome tray monitor (compatible with KDE) [disabled]],
241 [if test x$enableval = xyes; then
242 support_tray_monitor=yes
246 if test x$support_tray_monitor = xyes; then
247 abc=`$PKGCONFIG --exists gtk+-2.0`
249 if test $pkg = 0; then
250 TRAY_MONITOR_CPPFLAGS=`$PKGCONFIG --cflags gtk+-2.0`
251 TRAY_MONITOR_LDFLAGS=`$PKGCONFIG --libs gtk+-2.0`
252 AC_SUBST(TRAY_MONITOR_CPPFLAGS)
253 AC_SUBST(TRAY_MONITOR_LDFLAGS)
254 TRAY_MONITOR_DIR=src/tray-monitor
255 abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
257 if test $pkg = 0; then
258 AC_DEFINE(HAVE_GTK_2_4)
262 AC_SUBST(TRAY_MONITOR_DIR)
264 # -------------------------------------------
265 # smartalloc (default off)
266 # -------------------------------------------
267 AC_ARG_ENABLE(smartalloc,
268 [ --enable-smartalloc enable smartalloc debugging support [disabled]],
269 [if test x$enableval = xno; then
270 support_smartalloc=no
273 if test x$support_smartalloc = xyes; then
274 AC_DEFINE(SMARTALLOC)
277 # -------------------------------------------
278 # static-tools (default off)
279 # -------------------------------------------
280 AC_ARG_ENABLE(static-tools,
281 [ --enable-static-tools enable static tape tools [disabled]],
282 [if test x$enableval = xyes; then
283 support_static_tools=yes
287 if test x$support_static_tools = xyes; then
288 TTOOL_LDFLAGS="-static"
290 AC_SUBST(TTOOL_LDFLAGS)
292 # -------------------------------------------
293 # static-fd (default off)
294 # -------------------------------------------
295 AC_ARG_ENABLE(static-fd,
296 [ --enable-static-fd enable static File daemon [disabled]],
297 [if test x$enableval = xyes; then
298 support_static_fd=yes
302 if test x$support_static_fd = xyes; then
303 STATIC_FD="static-bacula-fd"
307 # -------------------------------------------
308 # static-sd (default off)
309 # -------------------------------------------
310 AC_ARG_ENABLE(static-sd,
311 [ --enable-static-sd enable static Storage daemon [disabled]],
312 [if test x$enableval = xyes; then
313 support_static_sd=yes
317 if test x$support_static_sd = xyes; then
318 STATIC_SD="static-bacula-sd"
322 # -------------------------------------------
323 # static-dir (default off)
324 # -------------------------------------------
325 AC_ARG_ENABLE(static-dir,
326 [ --enable-static-dir enable static Director [disabled]],
327 [if test x$enableval = xyes; then
328 support_static_dir=yes
332 if test x$support_static_dir = xyes; then
333 STATIC_DIR="static-bacula-dir"
337 # -------------------------------------------
338 # static-cons (default off)
339 # -------------------------------------------
340 AC_ARG_ENABLE(static-cons,
341 [ --enable-static-cons enable static Console [disabled]],
342 [if test x$enableval = xyes; then
343 support_static_cons=yes
349 if test x$support_static_cons = xyes; then
350 STATIC_CONS="static-bconsole"
351 STATIC_GNOME_CONS="static-gnome-console"
352 STATIC_WX_CONS="static-wx-console"
354 AC_SUBST(STATIC_CONS)
355 AC_SUBST(STATIC_GNOME_CONS)
356 AC_SUBST(STATIC_WX_CONS)
358 # -------------------------------------------
359 # client_only (default off)
360 # -------------------------------------------
361 AC_ARG_ENABLE(client-only,
362 [ --enable-client-only build client (File daemon) only [disabled]],
363 [if test x$enableval = xyes; then
364 build_client_only=yes
368 if test x$build_client_only = xno; then
375 # ---------------------------------------------------
376 # Check for conio (Bacula readline substitute)(
377 # ---------------------------------------------------
378 # this allows you to turn it completely off
380 [ --disable-conio disable conio support [enabled]
382 [if test x$enableval = xno; then
387 if test x$support_conio = xyes; then
388 AC_CHECK_HEADER(termcap.h,
389 [ AC_CHECK_LIB(termcap, tgetent,
390 [ CONS_LIBS="-ltermcap"
395 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
397 [ AC_CHECK_LIB(ncurses, tgetent,
398 [ CONS_LIBS="-lncurses"
403 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
408 AC_CHECK_HEADERS(curses.h)
409 AC_CHECK_HEADER(term.h,
410 [ AC_CHECK_LIB(curses, tgetent,
411 [ CONS_LIBS="-lcurses"
416 AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
419 [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
428 # ---------------------------------------------------
429 # Check for readline support/directory (default off)
430 # ---------------------------------------------------
431 # this allows you to turn it completely off
432 AC_ARG_ENABLE(readline,
433 [ --disable-readline disable readline support [disable]
435 [if test x$enableval = xno; then
441 if test x$support_readline = xyes; then
442 AC_ARG_WITH(readline,
443 [ --with-readline=DIR specify readline library directory],
445 case "$with_readline" in
448 if test "$with_readline" != "yes"; then
449 CONS_INC="-I${with_readline}"
450 CONS_LDFLAGS="-L$with_readline"
452 with_readline="/usr/include/readline"
454 AC_CHECK_HEADER(${with_readline}/readline.h,
455 [ AC_DEFINE(HAVE_READLINE)
456 CONS_LIBS="-lreadline -ltermcap"
460 echo "readline.h not found. readline turned off ..."
467 # check for standard readline library
468 AC_CHECK_HEADER(/usr/include/readline/readline.h,
469 [ AC_DEFINE(HAVE_READLINE)
471 CONS_INC="-I/usr/include/readline"
472 CONS_LIBS="-lreadline -ltermcap"
474 # Did not find standard library, so try Bacula's default
475 AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
476 [ AC_DEFINE(HAVE_READLINE)
478 CONS_INC="-I${TOP_DIR}/depkgs/readline"
479 CONS_LIBS="-lreadline -lhistory -ltermcap"
480 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
481 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
484 echo "readline.h not found. readline turned off ..."
500 AC_SUBST(CONS_LDFLAGS)
501 AC_SUBST(READLINE_SRC)
503 # Minimal stuff for readline Makefile configuration
508 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
509 AC_CHECK_FUNCS(nanosleep nl_langinfo)
510 AC_CHECK_HEADERS(varargs.h)
512 # End of readline/conio stuff
513 # -----------------------------------------------------------------------
515 # -----------------------------------------------------------------------
516 # Check for Python support
518 AC_MSG_CHECKING(for Python support)
521 --with-python[=DIR] Include Python support. DIR is the Python base
522 install directory, default is to search through
523 a number of common places for the Python files.],
527 if test "$withval" != "no"; then
528 if test "$withval" = "yes"; then
529 if test -f /usr/include/python2.2/Python.h; then
530 PYTHON_INCDIR=-I/usr/include/python2.2
531 PYTHON_LIBS="-L/usr/lib/python2.2/config -lpython2.2 -lutil -ldl"
532 elif test -f /usr/include/python2.3/Python.h; then
533 PYTHON_INCDIR=-I/usr/include/python2.3
534 PYTHON_LIBS="-L/usr/lib/python2.3/config -lpython2.3 -lutil -ldl"
535 elif test -f /usr/include/python2.4/Python.h; then
536 PYTHON_INCDIR=-I/usr/include/python2.4
537 PYTHON_LIBS="-L/usr/lib/python2.4/config -lpython2.4 -lutil -ldl"
538 elif test -f $prefix/include/Python.h; then
539 PYTHON_INCDIR=-I$prefix/include
540 PYTHON_LIBS="-L$prefix/lib/config -lpython -lutil -ldl"
543 AC_MSG_ERROR(Unable to find Python.h in standard locations)
546 if test -f $withval/Python.h; then
547 PYTHON_INCDIR=-I$withval
548 PYTHON_LIBS="-L$withval/config -lpython -lutil -ldl"
549 elif test -f $withval/include/Python.h; then
550 PYTHON_INCDIR=-I$withval/include
551 PYTHON_LIBS="-L$withval/lib/config -lpython -lutil -ldl"
554 AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
557 AC_DEFINE([HAVE_PYTHON], 1)
567 AC_SUBST(PYTHON_LIBS)
568 AC_SUBST(PYTHON_INCDIR)
571 # -------------------------------------------
572 # check for cdrecord writer location
573 # get scsibus,target,lun
574 # -------------------------------------------
576 if test ! x$CDRECORD = x ; then
577 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD-RW | ${AWK} '{print $1}'`
578 if test x${CDSTL} = x ; then
579 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep CD+RW | ${AWK} '{print $1}'`
581 if test x${CDSTL} = x ; then
582 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep DVD+RW | ${AWK} '{print $1}'`
584 if test x${CDSTL} = x ; then
585 CDSTL=`${CDRECORD} -scanbus 2>/dev/null | grep DVD-RW | ${AWK} '{print $1}'`
587 if test x${CDSTL} = x ; then
594 # ---------------------------------------------------
595 # Check for GMP support/directory
596 # ---------------------------------------------------
600 # [ --with-gmp[=DIR] Specify gmp library directory],
602 # case "$with_gmp" in
605 # if test "$with_gmp" != "yes"; then
606 # GMP_INC="-I$with_gmp"
608 # GMP_LDFLAGS="-L$with_gmp"
610 # with_gmp="/usr/include"
612 # AC_CHECK_HEADER($with_gmp/gmp.h,
613 # [ AC_MSG_RESULT(yes)
614 # AC_DEFINE(HAVE_GMP)
618 # [ AC_MSG_ERROR([*** gmp library missing])
624 # # check for standard gmp library
625 # AC_CHECK_HEADER(/usr/include/gmp.h,
626 # [ AC_MSG_RESULT(yes)
627 # AC_DEFINE(HAVE_GMP)
632 # # Did not find standard library, so use our own
634 # AC_DEFINE(HAVE_GMP)
637 # GMP_INC="-I${TOP_DIR}/depkgs/gmp"
639 # GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
640 # GMP_SRC="${TOP_DIR}/depkgs/gmp"
646 #AC_SUBST(GMP_LDFLAGS)
650 # -----------------------------------------------------------------------
653 # ---------------------------------------------------
654 # Check for CWEB support/directory
655 # ---------------------------------------------------
660 # [ --with-cweb[=DIR] Specify cweb library directory],
662 # case "$with_cweb" in
665 # if test "$with_cweb" != "yes"; then
666 # CWEB_INC="-I$with_cweb"
668 # CWEB_LDFLAGS="-L$with_cweb"
670 # with_cweb="/usr/include"
672 # AC_CHECK_HEADER($with_cweb/cweb.h,
673 # [ AC_MSG_RESULT(yes)
674 # AC_DEFINE(HAVE_CWEB)
678 # [ AC_MSG_ERROR([*** cweb library missing])
684 # # check for standard cweb library
685 # AC_CHECK_HEADER(/usr/include/cweb.h,
686 # [ AC_MSG_RESULT(yes)
687 # AC_DEFINE(HAVE_CWEB)
692 # # Did not find starndard library, so use our own
694 # AC_DEFINE(HAVE_CWEB)
697 # CWEB=${TOP_DIR}/depkgs/cweb
698 # CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
700 # CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
701 # CWEB_SRC="${TOP_DIR}/depkgs/cweb"
708 #AC_SUBST(CWEB_LDFLAGS)
712 # -----------------------------------------------------------------------
715 # Find where sockets are (especially for Solaris)
716 # Do this before the TCP Wrappers test since tcp wrappers
717 # uses the socket library and some linkers are stupid.
719 AC_CHECK_FUNC(socket,
720 AC_MSG_RESULT(using libc's socket),
721 AC_CHECK_LIB(xnet,socket)
722 AC_CHECK_LIB(socket,socket)
723 AC_CHECK_LIB(inet,socket))
726 # -----------------------------------------------------------
727 # Check whether user wants TCP wrappers support (default off)
728 # -----------------------------------------------------------
730 AC_ARG_WITH(tcp-wrappers,
731 [ --with-tcp-wrappers=DIR enable tcpwrappers support],
733 if test "x$withval" != "xno" ; then
735 LIBS="$saved_LIBS -lwrap"
736 AC_MSG_CHECKING(for libwrap)
739 int deny_severity = 0;
740 int allow_severity = 0;
741 struct request_info *req; ],
742 [ hosts_access(req); ],
745 AC_DEFINE(HAVE_LIBWRAP)
748 LIBS="$saved_LIBS -lwrap -lnsl"
751 int deny_severity = 0;
752 int allow_severity = 0;
753 struct request_info *req; ],
754 [ hosts_access(req); ],
757 AC_DEFINE(HAVE_LIBWRAP)
760 [AC_MSG_ERROR([*** libwrap missing]) ] ]
767 # ------------------------------------------
768 # Where to place working dir
769 # ------------------------------------------
770 working_dir=`eval echo ${prefix}/var/bacula/working`
771 AC_ARG_WITH(working-dir,
772 [ --with-working-dir=PATH specify path of Bacula working directory],
774 if test "x$withval" != "xno" ; then
780 AC_SUBST(working_dir)
783 # ------------------------------------------
784 # Where to place scriptdir (script files)
785 # ------------------------------------------
786 scriptdir=`eval echo ${sysconfdir}`
787 AC_ARG_WITH(scriptdir,
788 [ --with-scriptdir=PATH specify path of Bacula scripts directory],
790 if test "x$withval" != "xno" ; then
799 # ------------------------------------------
800 # Where to send dump email
801 # ------------------------------------------
802 dump_email=root@localhost
803 AC_ARG_WITH(dump-email,
804 [ --with-dump-email=EMAIL dump email address],
806 if test "x$withval" != "xno" ; then
814 # ------------------------------------------
815 # Where to send job email
816 # ------------------------------------------
817 job_email=root@localhost
818 AC_ARG_WITH(job-email,
819 [ --with-job-email=EMAIL job output email address],
821 if test "x$withval" != "xno" ; then
829 # ------------------------------------------
830 # Where to find smtp host
831 # ------------------------------------------
833 AC_ARG_WITH(smtp_host,
834 [ --with-smtp-host=HOST SMTP mail host address],
836 if test "x$withval" != "xno" ; then
845 # ------------------------------------
846 # Where to place pid files
847 # ------------------------------------
850 [ --with-pid-dir=PATH specify location of Bacula pid files],
852 if test "x$withval" != "xno" ; then
858 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
862 # ------------------------------------
863 # Where to place subsys "lock file"
864 # ------------------------------------
865 subsysdir=/var/run/subsys
866 AC_ARG_WITH(subsys-dir,
867 [ --with-subsys-dir=PATH specify location of Bacula subsys file],
869 if test "x$withval" != "xno" ; then
879 # ------------------------------------
880 # Where to start assigning ports
881 # ------------------------------------
883 AC_ARG_WITH(baseport,
884 [ --with-baseport=PORT specify base port address for daemons],
886 if test "x$withval" != "xno" ; then
893 dir_port=`expr $baseport`
894 fd_port=`expr $baseport + 1`
895 sd_port=`expr $fd_port + 1`
902 # ------------------------------------------
904 # ------------------------------------------
906 AC_ARG_WITH(dir-password,
907 [ --with-dir-password=PASSWORD specify Director's password],
909 if test "x$withval" != "xno" ; then
910 dir_password=$withval
915 if test "x$dir_password" = "x" ; then
916 if test "x$OPENSSL" = "xnone" ; then
917 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
918 key=`autoconf/randpass 33`
920 key=`openssl rand -base64 33`
926 AC_ARG_WITH(fd-password,
927 [ --with-fd-password=PASSWORD specify Client's password],
929 if test "x$withval" != "xno" ; then
935 if test "x$fd_password" = "x" ; then
936 if test "x$OPENSSL" = "xnone" ; then
937 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
938 key=`autoconf/randpass 37`
940 key=`openssl rand -base64 33`
946 AC_ARG_WITH(sd-password,
947 [ --with-sd-password=PASSWORD specify Storage daemon's password],
949 if test "x$withval" != "xno" ; then
955 if test "x$sd_password" = "x" ; then
956 if test "x$OPENSSL" = "xnone" ; then
957 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
958 key=`autoconf/randpass 41`
960 key=`openssl rand -base64 33`
966 AC_ARG_WITH(mon-dir-password,
967 [ --with-mon-dir-password=PASSWORD specify Director's password used by the monitor],
969 if test "x$withval" != "xno" ; then
970 mon_dir_password=$withval
975 if test "x$mon_dir_password" = "x" ; then
976 if test "x$OPENSSL" = "xnone" ; then
977 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
978 key=`autoconf/randpass 33`
980 key=`openssl rand -base64 33`
982 mon_dir_password=$key
986 AC_ARG_WITH(mon-fd-password,
987 [ --with-mon-fd-password=PASSWORD specify Client's password used by the monitor],
989 if test "x$withval" != "xno" ; then
990 mon_fd_password=$withval
995 if test "x$mon_fd_password" = "x" ; then
996 if test "x$OPENSSL" = "xnone" ; then
997 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
998 key=`autoconf/randpass 37`
1000 key=`openssl rand -base64 33`
1002 mon_fd_password=$key
1006 AC_ARG_WITH(mon-sd-password,
1007 [ --with-mon-sd-password=PASSWORD specify Storage daemon's password used by the monitor],
1009 if test "x$withval" != "xno" ; then
1010 mon_sd_password=$withval
1015 if test "x$mon_sd_password" = "x" ; then
1016 if test "x$OPENSSL" = "xnone" ; then
1017 # key=`date | uuencode /dev/stdout | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
1018 key=`autoconf/randpass 41`
1020 key=`openssl rand -base64 33`
1022 mon_sd_password=$key
1025 AC_SUBST(dir_password)
1026 AC_SUBST(fd_password)
1027 AC_SUBST(sd_password)
1028 AC_SUBST(mon_dir_password)
1029 AC_SUBST(mon_fd_password)
1030 AC_SUBST(mon_sd_password)
1032 # -------------------------------------------------------------------------
1033 # Set variables for bimagemgr installation
1034 # -------------------------------------------------------------------------
1035 bimagemgr_cgidir=/var/www/cgi-bin
1036 AC_ARG_WITH(bimagemgr-cgidir,
1037 [ --with-bimagemgr-cgidir=DIR specify bimagemgr cgi-bin dir],
1039 if test "x$withval" != "xno" ; then
1040 bimagemgr_cgidir=$withval
1045 bimagemgr_docdir=/var/www/html
1046 AC_ARG_WITH(bimagemgr-docdir,
1047 [ --with-bimagemgr-docdir=DIR specify bimagemgr doc root dir],
1049 if test "x$withval" != "xno" ; then
1050 bimagemgr_docdir=$withval
1055 bimagemgr_binowner=root
1056 AC_ARG_WITH(bimagemgr-binowner,
1057 [ --with-bimagemgr-binowner=USER specify bimagemgr binary file owner],
1059 if test "x$withval" != "xno" ; then
1060 bimagemgr_binowner=$withval
1065 bimagemgr_bingroup=root
1066 AC_ARG_WITH(bimagemgr-bingroup,
1067 [ --with-bimagemgr-bingroup=USER specify bimagemgr binary file group],
1069 if test "x$withval" != "xno" ; then
1070 bimagemgr_bingroup=$withval
1075 bimagemgr_dataowner=apache
1076 AC_ARG_WITH(bimagemgr-dataowner,
1077 [ --with-bimagemgr-dataowner=USER specify bimagemgr data file owner],
1079 if test "x$withval" != "xno" ; then
1080 bimagemgr_dataowner=$withval
1085 bimagemgr_datagroup=apache
1086 AC_ARG_WITH(bimagemgr-datagroup,
1087 [ --with-bimagemgr-datagroup=USER specify bimagemgr data file group],
1089 if test "x$withval" != "xno" ; then
1090 bimagemgr_datagroup=$withval
1095 AC_SUBST(bimagemgr_cgidir)
1096 AC_SUBST(bimagemgr_docdir)
1097 AC_SUBST(bimagemgr_binowner)
1098 AC_SUBST(bimagemgr_bingroup)
1099 AC_SUBST(bimagemgr_dataowner)
1100 AC_SUBST(bimagemgr_datagroup)
1103 # Handle users and groups for each daemon
1106 AC_ARG_WITH(dir_user,
1107 [ --with-dir-user=USER specify user for Director daemon],
1109 if test "x$withval" != "x" ; then
1116 AC_ARG_WITH(dir_group,
1117 [ --with-dir-group=GROUP specify group for Director daemon],
1119 if test "x$withval" != "x" ; then
1126 AC_ARG_WITH(sd_user,
1127 [ --with-sd-user=USER specify user for Storage daemon],
1129 if test "x$withval" != "x" ; then
1136 AC_ARG_WITH(sd_group,
1137 [ --with-sd-group=GROUP specify group for Storage daemon],
1139 if test "x$withval" != "x" ; then
1146 AC_ARG_WITH(fd_user,
1147 [ --with-fd-user=USER specify user for File daemon],
1149 if test "x$withval" != "x" ; then
1156 AC_ARG_WITH(fd_group,
1157 [ --with-fd-group=GROUP specify group for File daemon],
1159 if test "x$withval" != "x" ; then
1176 # allow setting default executable permissions
1179 AC_ARG_WITH(sbin-perm,
1180 [ --with-sbin-perm=MODE specify permissions for sbin binaries (0754)],
1182 if test "x$withval" != "x" ; then
1190 # ------------------------------------------------
1191 # Bacula check for various SQL database engines
1192 # ------------------------------------------------
1193 BA_CHECK_POSTGRESQL_DB
1204 AC_DEFINE(PROTOTYPES)
1206 dnl# --------------------------------------------------------------------------
1207 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
1209 if test -z "$CFLAGS" -o "$CFLAGS" = "-g -O2"; then
1210 if test -z "$CCOPTS"; then
1211 CCOPTS='-g -O2 -Wall'
1220 dnl See if we can use 64 bit file addresses
1221 largefile_support="no"
1227 dnl# --------------------------------------------------------------------------
1228 dnl# CHECKING FOR HEADER FILES
1229 dnl# --------------------------------------------------------------------------
1265 AC_STRUCT_ST_BLKSIZE
1269 dnl# --------------------------------------------------------------------------
1270 dnl# Check for utime.h structure
1271 dnl# --------------------------------------------------------------------------
1272 AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
1274 #include <sys/types.h>
1275 #include <utime.h>], [struct utimbuf foo],
1276 ba_cv_header_utime_h=yes, ba_cv_header_utime_h=no)])
1277 test $ba_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
1279 dnl# --------------------------------------------------------------------------
1280 dnl# Check for socklen_t
1281 dnl# --------------------------------------------------------------------------
1282 AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
1284 #include <sys/types.h>
1285 #include <sys/socket.h>],
1287 ba_cv_header_socklen_t=yes, ba_cv_header_socklen_t=no)])
1288 test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
1290 dnl# --------------------------------------------------------------------------
1291 dnl# Check for bigendian
1292 dnl# --------------------------------------------------------------------------
1293 AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
1295 [main(){long a=1L; char *p=(char *)&a; exit(*p);}],
1296 [ba_cv_bigendian=yes],
1297 [ba_cv_bigendian=no],
1298 [ba_cv_bigendian=no])])
1299 test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
1305 dnl# --------------------------------------------------------------------------
1306 dnl# CHECKING FOR FILESYSTEM TYPE
1307 dnl# --------------------------------------------------------------------------
1308 AC_MSG_CHECKING(how to get filesystem type)
1310 # The order of these tests is important.
1311 AC_TRY_CPP([#include <sys/statvfs.h>
1312 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
1313 if test $fstype = no; then
1314 AC_TRY_CPP([#include <sys/statfs.h>
1315 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
1317 if test $fstype = no; then
1318 AC_TRY_CPP([#include <sys/statfs.h>
1319 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
1321 if test $fstype = no; then
1322 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
1324 if test $fstype = no; then
1325 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
1327 if test $fstype = no; then
1328 AC_TRY_CPP([#include <sys/mount.h>
1329 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
1331 AC_MSG_RESULT($fstype)
1333 dnl# --------------------------------------------------------------------------
1334 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
1335 dnl# --------------------------------------------------------------------------
1343 AC_CHECK_TYPE(ino_t, unsigned long)
1344 AC_CHECK_TYPE(dev_t, unsigned long)
1345 AC_CHECK_TYPE(daddr_t, long)
1346 AC_CHECK_TYPE(major_t, int)
1347 AC_CHECK_TYPE(minor_t, int)
1348 AC_CHECK_TYPE(ssize_t, int)
1355 AC_CHECK_SIZEOF(char, 1)
1356 AC_CHECK_SIZEOF(short int, 2)
1357 AC_CHECK_SIZEOF(int, 4)
1358 AC_CHECK_SIZEOF(long int, 4)
1359 AC_CHECK_SIZEOF(long long int, 8)
1360 AC_CHECK_SIZEOF(int *, 4)
1362 # Check for sys/types.h types
1363 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
1365 [ #include <sys/types.h> ],
1367 [ ac_cv_have_u_int="yes" ],
1368 [ ac_cv_have_u_int="no" ]
1371 if test "x$ac_cv_have_u_int" = "xyes" ; then
1372 AC_DEFINE(HAVE_U_INT)
1376 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
1378 [ #include <sys/types.h> ],
1379 [ intmax_t a; a = 1;],
1380 [ ac_cv_have_intmax_t="yes" ],
1383 [ #include <stdint.h> ],
1384 [ intmax_t a; a = 1;],
1385 [ ac_cv_have_intmax_t="yes" ],
1386 [ ac_cv_have_intmax_t="no" ]
1392 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
1393 AC_DEFINE(HAVE_INTMAX_T)
1398 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
1400 [ #include <sys/types.h> ],
1401 [ u_intmax_t a; a = 1;],
1402 [ ac_cv_have_u_intmax_t="yes" ],
1405 [ #include <stdint.h> ],
1406 [ u_intmax_t a; a = 1;],
1407 [ ac_cv_have_u_intmax_t="yes" ],
1408 [ ac_cv_have_u_intmax_t="no" ]
1413 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
1414 AC_DEFINE(HAVE_U_INTMAX_T)
1419 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
1421 [ #include <sys/types.h> ],
1422 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
1423 [ ac_cv_have_intxx_t="yes" ],
1424 [ ac_cv_have_intxx_t="no" ]
1427 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
1428 AC_DEFINE(HAVE_INTXX_T)
1432 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
1434 [ #include <sys/types.h> ],
1435 [ int64_t a; a = 1;],
1436 [ ac_cv_have_int64_t="yes" ],
1437 [ ac_cv_have_int64_t="no" ]
1440 if test "x$ac_cv_have_int64_t" = "xyes" ; then
1441 AC_DEFINE(HAVE_INT64_T)
1445 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
1447 [ #include <sys/types.h> ],
1448 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
1449 [ ac_cv_have_u_intxx_t="yes" ],
1450 [ ac_cv_have_u_intxx_t="no" ]
1453 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
1454 AC_DEFINE(HAVE_U_INTXX_T)
1458 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
1460 [ #include <sys/types.h> ],
1461 [ u_int64_t a; a = 1;],
1462 [ ac_cv_have_u_int64_t="yes" ],
1463 [ ac_cv_have_u_int64_t="no" ]
1466 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
1467 AC_DEFINE(HAVE_U_INT64_T)
1471 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
1472 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1474 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
1476 [ #include <sys/bitypes.h> ],
1477 [ int8_t a; int16_t b; int32_t c;
1478 u_int8_t e; u_int16_t f; u_int32_t g;
1479 a = b = c = e = f = g = 1; ],
1480 [ AC_DEFINE(HAVE_U_INTXX_T)
1481 AC_DEFINE(HAVE_INTXX_T)
1482 AC_DEFINE(HAVE_SYS_BITYPES_H)
1483 AC_MSG_RESULT(yes) ],
1484 [ AC_MSG_RESULT(no)]
1488 if test -z "$have_u_intxx_t" ; then
1489 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
1491 [ #include <sys/types.h> ],
1492 [ uint8_t a; uint16_t b;
1493 uint32_t c; a = b = c = 1; ],
1494 [ ac_cv_have_uintxx_t="yes" ],
1495 [ ac_cv_have_uintxx_t="no" ]
1498 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
1499 AC_DEFINE(HAVE_UINTXX_T)
1503 if (test -z "$have_u_int64_t" || test -z "$have_int64_t" && \
1504 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1506 AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
1508 [ #include <sys/bitypes.h> ],
1509 [ int64_t a; u_int64_t b;
1511 [ AC_DEFINE(HAVE_U_INT64_T)
1512 AC_DEFINE(HAVE_INT64_T)
1513 AC_MSG_RESULT(yes) ],
1514 [ AC_MSG_RESULT(no)]
1518 if (test -z "$have_uintxx_t" && \
1519 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
1521 AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
1523 [ #include <sys/bitypes.h> ],
1524 [ uint8_t a; uint16_t b;
1525 uint32_t c; a = b = c = 1; ],
1526 [ AC_DEFINE(HAVE_UINTXX_T)
1527 AC_MSG_RESULT(yes) ],
1528 [ AC_MSG_RESULT(no)]
1536 dnl# --------------------------------------------------------------------------
1537 dnl# CHECKING FOR REQUIRED LIBRARY FUNCTIONS
1538 dnl# --------------------------------------------------------------------------
1554 [echo 'configure: cannot find needed function.'; exit 1]
1557 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
1558 AC_CHECK_FUNCS(strtoll, [AC_DEFINE(HAVE_STRTOLL)])
1560 AC_CHECK_FUNCS(chflags)
1562 AC_CHECK_FUNCS(snprintf vsnprintf gethostid getdomainname)
1564 dnl# --------------------------------------------------------------------------
1565 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
1566 dnl# --------------------------------------------------------------------------
1567 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
1569 # If resolver functions are not in libc check for -lnsl or -lresolv.
1570 AC_CHECK_FUNC(gethostbyname_r,
1571 AC_MSG_RESULT(using libc's resolver),
1572 AC_CHECK_LIB(nsl,gethostbyname_r)
1573 AC_CHECK_LIB(resolv,gethostbyname_r))
1577 AC_CHECK_FUNCS(inet_pton, [AC_DEFINE(HAVE_INET_PTON)])
1578 AC_CHECK_FUNCS(inet_ntop, [AC_DEFINE(HAVE_INET_NTOP)])
1579 AC_CHECK_FUNCS(gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2)])
1581 dnl ----------------------------
1582 dnl check sa_len of sockaddr
1583 dnl ----------------------------
1584 AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
1585 [AC_TRY_COMPILE([#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
1586 ac_cv_struct_sockaddr_sa_len=yes, ac_cv_struct_sockaddr_sa_len=no)])
1588 if test $ac_cv_struct_sockaddr_sa_len = yes; then
1589 AC_DEFINE(HAVE_SA_LEN, 1, [Define if sa_len field exists in struct sockaddr])
1593 dnl Check for IPv6 support
1594 AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
1595 [AC_TRY_LINK([ #include <sys/types.h>
1596 #include <sys/socket.h>
1597 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] =
1599 [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
1601 if test "$ac_cv_ipv6_support" = yes; then
1602 AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
1611 AC_FUNC_CLOSEDIR_VOID
1612 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
1613 # AC_FUNC_FNMATCH dnl use local version
1616 dnl# FreeBSD needs to link libxpg4
1617 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
1620 AC_CHECK_LIB(sun, getpwnam)
1622 AC_CHECK_HEADERS(zlib.h)
1623 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
1625 if test x$FDLIBS = x-lz; then
1626 AC_DEFINE(HAVE_LIBZ)
1630 AC_CHECK_HEADER(sys/acl.h)
1631 AC_CHECK_LIB(acl, acl_get_file, [FDLIBS="-lacl $FDLIBS"])
1633 if test $ac_cv_lib_acl_acl_get_file = yes; then
1638 dnl Check for pthread libraries
1640 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
1641 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
1642 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
1643 [AC_CHECK_FUNC(pthread_create)]
1653 LDFLAGS=${LDFLAGS--O}
1654 DB_LIBS="${SQL_LFLAGS}"
1656 CPPFLAGS="$CPPFLAGS"
1667 AC_SUBST(X_EXTRA_LIBS)
1671 dnl# extra configurable objects
1682 # Finally we set appropriate distribution specific
1683 # variables and defaults
1685 # PFILES are platform specific files
1686 PFILES="platforms/Makefile"
1690 hostname=`uname -n | cut -d '.' -f 1`
1694 PSCMD="ps -e -o pid,comm"
1696 platforms/aix/Makefile"
1697 TAPEDRIVE="/dev/rmt0.1"
1701 PTHREAD_LIB="-lpthread -lexc"
1702 if test "${CC}" = "gcc" ; then
1709 TAPEDRIVE="/dev/nrmt0"
1712 DISTVER=`uname -a |awk '{print $3}'`
1713 TAPEDRIVE="/dev/nrmt0"
1714 PTHREAD_LIB="-pthread"
1715 CFLAGS="${CFLAGS} -pthread"
1716 PSCMD="ps -x -o pid,command"
1720 platforms/bsdi/Makefile \
1721 platforms/bsdi/bacula-fd \
1722 platforms/bsdi/bacula-sd \
1723 platforms/bsdi/bacula-dir"
1724 largefile_support="yes"
1727 DISTVER=`uname -a |awk '{print $3}'`
1728 TAPEDRIVE="/dev/nrst0"
1731 WLDFLAGS="-mwindows"
1735 TAPEDRIVE="/dev/nst0"
1736 PSCMD="ps -e -o pid,command"
1739 platforms/darwin/Makefile"
1742 DISTVER=`cat /etc/debian_version`
1743 TAPEDRIVE="/dev/nrst0"
1744 PSCMD="ps -e -o pid,command"
1747 DISTVER=`uname -a |awk '{print $3}'`
1748 VER=`echo $DISTVER | cut -c 1`
1749 if test x$VER = x4 ; then
1750 PTHREAD_LIB="-pthread"
1751 CFLAGS="${CFLAGS} -pthread"
1755 TAPEDRIVE="/dev/nrsa0"
1756 PSCMD="ps -x -o pid,command"
1758 platforms/freebsd/Makefile \
1759 platforms/freebsd/bacula-fd \
1760 platforms/freebsd/bacula-sd \
1761 platforms/freebsd/bacula-dir"
1762 largefile_support="yes"
1765 PSCMD="UNIX95=1 ps -e -o pid,comm"
1766 CFLAGS="$(CFLAGS) -D_XOPEN_SOURCE_EXTENDED=1"
1768 TAPEDRIVE="/dev/rmt/0hnb"
1772 TAPEDRIVE="/dev/rmt/0cbn"
1773 PSCMD="ps -e -o pid,comm"
1775 platforms/irix/Makefile \
1776 platforms/irix/bacula-fd \
1777 platforms/irix/bacula-sd \
1778 platforms/irix/bacula-dir"
1781 DISTVER=`uname -a |awk '{print $3}'`
1784 TAPEDRIVE="/dev/nrst0"
1785 PSCMD="ps -a -o pid,command"
1786 PTHREAD_LIB="-pthread"
1787 CFLAGS="${CFLAGS} -pthread"
1790 DISTVER=`uname -a |awk '{print $3}'`
1793 TAPEDRIVE="/dev/nrst0"
1794 PSCMD="ps -ax -o pid,command"
1795 PTHREAD_LIB="-pthread"
1796 CFLAGS="${CFLAGS} -pthread"
1798 platforms/openbsd/Makefile \
1799 platforms/openbsd/bacula-fd \
1800 platforms/openbsd/bacula-sd \
1801 platforms/openbsd/bacula-dir"
1804 if test -f /etc/whitebox-release ; then
1805 f=/etc/whitebox-release
1807 f=/etc/redhat-release
1809 if test `cat $f | grep release |\
1810 cut -f 3 -d ' '`x = "Enterprise"x ; then
1811 DISTVER="Enterprise "`cat $f | grep release |\
1814 DISTVER=`cat /etc/redhat-release | grep release |\
1817 TAPEDRIVE="/dev/nst0"
1818 PSCMD="ps -e -o pid,command"
1820 platforms/redhat/Makefile \
1821 platforms/redhat/bacula-fd \
1822 platforms/redhat/bacula-sd \
1823 platforms/redhat/bacula-dir \
1824 platforms/redhat/bacula.spec \
1826 hostname=`hostname -s`
1829 DISTVER=`cat /etc/mandrake-release | grep release |\
1831 TAPEDRIVE="/dev/nst0"
1832 PSCMD="ps -e -o pid,command"
1834 platforms/mandrake/Makefile \
1835 platforms/mandrake/bacula-fd \
1836 platforms/mandrake/bacula-sd \
1837 platforms/mandrake/bacula-dir \
1838 platforms/mandrake/bacula.spec \
1842 DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
1843 TAPEDRIVE="/dev/nst0"
1844 PSCMD="ps -e -o pid,command"
1846 platforms/gentoo/Makefile \
1847 platforms/gentoo/bacula-init \
1848 platforms/gentoo/bacula-fd \
1849 platforms/gentoo/bacula-sd \
1850 platforms/gentoo/bacula-dir"
1853 DISTVER=`cat /etc/slackware-version`
1854 TAPEDRIVE="/dev/nst0"
1855 PSCMD="ps -e -o pid,command"
1857 platforms/slackware/Makefile \
1858 platforms/slackware/rc.bacula-fd \
1859 platforms/slackware/rc.bacula-sd \
1860 platforms/slackware/rc.bacula-dir\
1861 platforms/slackware/functions.bacula"
1865 TAPEDRIVE="/dev/rmt/0cbn"
1866 PSCMD="ps -e -o pid,comm"
1868 platforms/solaris/Makefile \
1869 platforms/solaris/bacula-fd \
1870 platforms/solaris/bacula-sd \
1871 platforms/solaris/bacula-dir"
1872 if test x$DISTVER = x5.6 ; then
1873 AC_DEFINE(HAVE_OLD_SOCKOPT)
1877 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1879 TAPEDRIVE="/dev/nst0"
1880 PSCMD="ps -e -o pid,command"
1882 platforms/suse/Makefile \
1883 platforms/suse/bacula-fd \
1884 platforms/suse/bacula-sd \
1885 platforms/suse/bacula-dir \
1886 platforms/suse/bacula \
1887 platforms/suse/bacula.spec"
1892 TAPEDRIVE="/dev/nst0"
1893 PSCMD="ps -e -o pid,command"
1895 platforms/suse/Makefile \
1896 platforms/suse/bacula-fd \
1897 platforms/suse/bacula-sd \
1898 platforms/suse/bacula-dir"
1902 TAPEDRIVE="/dev/nst0"
1905 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1911 LIBS="$PTHREAD_LIB $LIBS"
1913 AC_DEFINE_UNQUOTED(lld, "$lld")
1914 AC_DEFINE_UNQUOTED(llu, "$llu")
1922 dnl# common parts of the Makefile
1923 MCOMMON=./autoconf/Make.common
1924 AC_SUBST_FILE(MCOMMON)
1927 if test "x${subsysdir}" = "x${sbindir}" ; then
1930 echo "You have set both --sbindir and --with-subsys-dir"
1931 echo " equal to: ${subsysdir} "
1932 echo "This is not permitted. Please reconfigure."
1934 echo "Aborting configuration ..."
1940 AC_OUTPUT([autoconf/Make.common \
1943 rescue/linux/Makefile \
1944 rescue/linux/floppy/Makefile \
1945 rescue/linux/cdrom/Makefile \
1946 rescue/linux/cdrom/bacula/Makefile \
1947 rescue/freebsd/Makefile \
1948 rescue/solaris/Makefile \
1949 scripts/startmysql \
1951 scripts/btraceback \
1957 scripts/devel_bacula \
1960 scripts/bacula.desktop.gnome1 \
1961 scripts/bacula.desktop.gnome2 \
1962 scripts/bacula.desktop.gnome1.consolehelper \
1963 scripts/bacula.desktop.gnome2.consolehelper \
1964 scripts/bacula.desktop.gnome1.xsu \
1965 scripts/bacula.desktop.gnome2.xsu \
1966 scripts/gnome-console.console_apps \
1967 scripts/mtx-changer \
1968 scripts/dvd-writepart \
1969 scripts/dvd-freespace \
1970 scripts/bacula-tray-monitor.desktop \
1971 scripts/logwatch/Makefile \
1972 scripts/logwatch/logfile.bacula.conf \
1976 src/console/Makefile \
1977 src/console/bconsole.conf \
1978 src/gnome-console/Makefile \
1979 src/gnome-console/gnome-console.conf \
1980 src/gnome2-console/Makefile \
1981 src/gnome2-console/gnome-console.conf \
1982 src/wx-console/Makefile \
1983 src/wx-console/wx-console.conf \
1984 src/tray-monitor/Makefile \
1985 src/tray-monitor/tray-monitor.conf \
1987 src/dird/bacula-dir.conf \
1989 src/stored/Makefile \
1990 src/stored/bacula-sd.conf \
1991 src/filed/Makefile \
1992 src/filed/bacula-fd.conf \
1993 src/filed/win32/Makefile \
1995 src/cats/make_catalog_backup \
1996 src/cats/delete_catalog_backup \
1997 src/cats/create_postgresql_database \
1998 src/cats/update_postgresql_tables \
1999 src/cats/make_postgresql_tables \
2000 src/cats/grant_postgresql_privileges \
2001 src/cats/drop_postgresql_tables \
2002 src/cats/drop_postgresql_database \
2003 src/cats/create_mysql_database \
2004 src/cats/update_mysql_tables \
2005 src/cats/make_mysql_tables \
2006 src/cats/grant_mysql_privileges \
2007 src/cats/drop_mysql_tables \
2008 src/cats/drop_mysql_database \
2009 src/cats/create_sqlite_database \
2010 src/cats/update_sqlite_tables \
2011 src/cats/make_sqlite_tables \
2012 src/cats/grant_sqlite_privileges \
2013 src/cats/drop_sqlite_tables \
2014 src/cats/drop_sqlite_database \
2015 src/cats/create_sqlite3_database \
2016 src/cats/update_sqlite3_tables \
2017 src/cats/make_sqlite3_tables \
2018 src/cats/grant_sqlite3_privileges \
2019 src/cats/drop_sqlite3_tables \
2020 src/cats/drop_sqlite3_database \
2023 src/cats/create_bdb_database \
2024 src/cats/update_bdb_tables \
2025 src/cats/make_bdb_tables \
2026 src/cats/grant_bdb_privileges \
2027 src/cats/drop_bdb_tables \
2028 src/cats/drop_bdb_database \
2029 src/cats/create_bacula_database \
2030 src/cats/update_bacula_tables \
2031 src/cats/grant_bacula_privileges \
2032 src/cats/make_bacula_tables \
2033 src/cats/drop_bacula_tables \
2034 src/cats/drop_bacula_database \
2035 src/findlib/Makefile \
2036 src/tools/Makefile \
2037 src/win32/winbacula.nsi \
2038 src/win32/baculafd/bacula-fd.conf \
2039 src/win32/Makefile \
2040 src/win32/console/bconsole.conf \
2041 src/win32/wx-console/wx-console.conf \
2042 src/win32/pebuilder/Makefile \
2043 src/bimagemgr/Makefile \
2044 src/bimagemgr/bacula-bimagemgr.spec \
2046 [(echo "Doing make of dependencies"; ${MAKE:-make} depend;) ]
2050 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
2051 chmod 755 bconsole gconsole mtx-changer devel_bacula logrotate
2056 chmod 755 $c/create_bacula_database $c/update_bacula_tables $c/make_bacula_tables
2057 chmod 755 $c/grant_bacula_privileges $c/drop_bacula_tables $c/drop_bacula_database
2059 chmod 755 $c/create_bdb_database $c/update_bdb_tables $c/make_bdb_tables
2060 chmod 755 $c/grant_bdb_privileges $c/drop_bdb_tables $c/drop_bdb_database
2062 chmod 755 $c/create_mysql_database $c/update_mysql_tables $c/make_mysql_tables
2063 chmod 755 $c/grant_mysql_privileges $c/drop_mysql_tables $c/drop_mysql_database
2065 chmod 755 $c/create_sqlite_database $c/update_sqlite_tables $c/make_sqlite_tables
2066 chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
2068 chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
2069 chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
2071 chmod 755 $c/make_catalog_backup $c/delete_catalog_backup
2075 if test "x$ac_cv_sys_largefile_CFLAGS" != "xno" ; then
2076 largefile_support="yes"
2080 # A whole lot of hand springs to get the compiler version.
2081 # This is because gcc changed the output in version 3.0
2083 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2084 if test "x${CCVERSION}" = "x" ; then
2085 CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2087 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 3 -d ' '`
2088 if test x"${CXXVERSION}" = x ; then
2089 CXXVERSION=`${CXX} --version | tr '\n' ' ' | cut -f 1 -d ' '`
2092 if test "x${subsysdir}" = "x${sbindir}" ; then
2095 echo "You have set --sbindir and --with-subsys-dir"
2096 echo " both equal to: ${subsysdir} "
2097 echo " This is not permitted. Please reconfigure."
2099 echo "Aborting configuration ..."
2105 if test "x${db_name}" = "xInternal" ; then
2108 echo "You have not specified either --enable-client-only or one of the"
2109 echo " supported databases: MySQL, PostgreSQL, SQLite3 or SQLite."
2110 echo " This is not permitted. Please reconfigure."
2112 echo "Aborting the configuration ..."
2119 Configuration on `date`:
2121 Host: $host -- ${DISTNAME} ${DISTVER}
2122 Bacula version: ${VERSION} (${DATE})
2123 Source code location: ${srcdir}
2124 Install binaries: ${sbindir}
2125 Install config files: ${sysconfdir}
2126 Scripts directory: ${scriptdir}
2127 Working directory: ${working_dir}
2128 PID directory: ${piddir}
2129 Subsys directory: ${subsysdir}
2130 C Compiler: ${CC} ${CCVERSION}
2131 C++ Compiler: ${CXX} ${CXXVERSION}
2132 Compiler flags: ${WCFLAGS} ${CFLAGS}
2133 Linker flags: ${WLDFLAGS} ${LDFLAGS}
2135 Statically Linked Tools: ${support_static_tools}
2136 Statically Linked FD: ${support_static_fd}
2137 Statically Linked SD: ${support_static_sd}
2138 Statically Linked DIR: ${support_static_dir}
2139 Statically Linked CONS: ${support_static_cons}
2140 Database type: ${db_name}
2141 Database lib: ${DB_LIBS}
2143 Job Output Email: ${job_email}
2144 Traceback Email: ${dump_email}
2145 SMTP Host Address: ${smtp_host}
2147 Director Port: ${dir_port}
2148 File daemon Port: ${fd_port}
2149 Storage daemon Port: ${sd_port}
2151 Director User: ${dir_user}
2152 Director Group: ${dir_group}
2153 Storage Daemon User: ${sd_user}
2154 Storage DaemonGroup: ${sd_group}
2155 File Daemon User: ${fd_user}
2156 File Daemon Group: ${fd_group}
2158 SQL binaries Directory ${SQL_BINDIR}
2160 Large file support: $largefile_support
2161 Bacula conio support: ${got_conio} ${CONS_LIBS}
2162 readline support: ${got_readline} ${PRTREADLINE_SRC}
2163 TCP Wrappers support: ${TCPW_MSG}
2164 ZLIB support: ${have_zlib}
2165 enable-smartalloc: ${support_smartalloc}
2166 enable-gnome: ${support_gnome} ${gnome_version}
2167 enable-wx-console: ${support_wx_console}
2168 enable-tray-monitor: ${support_tray_monitor}
2169 client-only: ${build_client_only}
2170 ACL support: ${have_acl}
2171 Python support: ${support_python} ${PYTHON_LIBS}
2178 # cweb support: ${got_cweb} ${CWEB_SRC}
2179 # gmp support: ${got_gmp} ${GMP_SRC}