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]*DATE.*"\(.*\)"$/\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 AC_PATH_PROG(RANLIB, ranlib, ranlib)
63 AC_PATH_PROG(OPENSSL, openssl, none)
65 test -n "$ARFLAG" || ARFLAGS="cr"
72 AC_SUBST(LOCAL_CFLAGS)
73 AC_SUBST(LOCAL_LDFLAGS)
78 dnl --------------------------------------------------
79 dnl Bacula OP Sys determination (see aclocal.m4)
80 dnl --------------------------------------------------
83 # -----------------------------------------------------------
84 dnl Bacula OPSys Distribution determination (see aclocal.m4)
85 # ----------------------------------------------------------
86 BA_CHECK_OPSYS_DISTNAME
88 # -----------------------------------------------------------
89 dnl Check for gnome stuff for gnome-console
90 # ----------------------------------------------------------
91 AM_ACLOCAL_INCLUDE(gnome-macros)
93 # ------------------------------------------------------------------
94 # If the user has not set --prefix, we set our default to nothing.
95 # In this case, if the user has not set --sysconfdir, we set it
96 # to the package default of /etc/bacula. If either --prefix or
97 # --sysconfdir is set, we leave sysconfdir alone except to eval it.
98 # ------------------------------------------------------------------
99 if test x${prefix} = xNONE ; then
100 if test `eval echo ${sysconfdir}` = NONE/etc ; then
101 sysconfdir=/etc/bacula
105 sysconfdir=`eval echo ${sysconfdir}`
107 # -------------------------------------------------------------------------
108 # If the user has not set --exec-prefix, we default to ${prefix}
109 # -------------------------------------------------------------------------
110 if test x${exec_prefix} = xNONE ; then
111 exec_prefix=${prefix}
114 # ------------------------------------------------------------------
115 # If the user has not set --sbindir, we set our default as /sbin
116 # ------------------------------------------------------------------
117 if test x$sbindir = x'${exec_prefix}/sbin' ; then
118 sbindir=${exec_prefix}/sbin
120 sbindir=`eval echo ${sbindir}`
122 # ------------------------------------------------------------------
123 # All list of languages for which a translation exist. Each
124 # language is separated by a space.
125 # ------------------------------------------------------------------
128 AC_PATH_PROGS(MSGFMT, msgfmt, no)
129 if test "$MSGFMT" = "no"
131 echo 'msgfmt program not found, disabling NLS !'
133 USE_INCLUDED_LIBINTL=no
141 support_smartalloc=yes
144 dnl# --------------------------------------------------------------------------
145 dnl# CHECKING COMMAND LINE OPTIONS
146 dnl# --------------------------------------------------------------------------
147 AC_ARG_ENABLE(everything,
148 [ --enable-everything enable standard non-multichoice features: marked *],
149 [if test x$enableval = xyes; then
150 support_smartalloc=yes
153 # -------------------------------------------
154 # gnome (default off)
155 # -------------------------------------------
158 [ --enable-gnome enable build of gnome-console GUI *],
159 [if test x$enableval = xyes; then
164 if test x$support_gnome = xyes; then
166 GNOME_DIR=src/gnome-console
171 # -------------------------------------------
172 # smartalloc (default off)
173 # -------------------------------------------
174 AC_ARG_ENABLE(smartalloc,
175 [ --enable-smartalloc enable smartalloc debugging support *],
176 [if test x$enableval = xno; then
177 support_smartalloc=no
180 if test x$support_smartalloc = xyes; then
181 AC_DEFINE(SMARTALLOC)
186 # ---------------------------------------------------
187 # Check for readline support/directory (default on)
188 # ---------------------------------------------------
190 # this allows you to turn it completely off
191 AC_ARG_ENABLE(readline,
192 [ --disable-readline disable readline support ],
193 [if test x$enableval = xno; then
199 if test x$support_readline = xyes; then
200 AC_ARG_WITH(readline,
201 [ --with-readline[=DIR] Specify readline library directory],
203 case "$with_readline" in
206 if test "$with_readline" != "yes"; then
207 CONS_INC="-I$with_readline"
208 CONS_LDFLAGS="-L$with_readline"
210 with_readline="/usr/include/readline"
212 AC_CHECK_HEADER($with_readline/readline.h,
214 AC_DEFINE(HAVE_READLINE)
215 CONS_LIBS="-lreadline -ltermcap"
218 [ AC_MSG_ERROR([*** readline library missing])
224 # check for standard readline library
225 AC_CHECK_HEADER(/usr/include/readline/readline.h,
227 AC_DEFINE(HAVE_READLINE)
229 CONS_INC="-I/usr/include/readline"
230 CONS_LIBS="-lreadline -ltermcap"
232 # Did not find starndard library, so user our own
234 AC_DEFINE(HAVE_READLINE)
236 CONS_INC="-I${TOP_DIR}/depkgs"
237 CONS_LIBS="-lreadline -lhistory -ltermcap"
238 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
239 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
246 AC_SUBST(CONS_LDFLAGS)
247 AC_SUBST(READLINE_SRC)
249 # Minimal stuff for readline Makefile configuration
256 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
258 #AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG),
259 # [LIBEXTRAOBJ="$LIBEXTRAOBJ getopt.o getopt1.o"
260 # EXTRAOBJ="$EXTRAOBJ lib/getopt.o lib/getopt1.o"])
262 AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG))
267 AC_CHECK_HEADERS(varargs.h \
268 sys/ptem.h sys/pte.h sys/stream.h)
270 # End of readline stuff
271 # -----------------------------------------------------------------------
274 # ---------------------------------------------------
275 # Check for GMP support/directory
276 # ---------------------------------------------------
280 [ --with-gmp[=DIR] Specify gmp library directory],
285 if test "$with_gmp" != "yes"; then
286 GMP_INC="-I$with_gmp"
288 GMP_LDFLAGS="-L$with_gmp"
290 with_gmp="/usr/include"
292 AC_CHECK_HEADER($with_gmp/gmp.h,
298 [ AC_MSG_ERROR([*** gmp library missing])
304 # check for standard gmp library
305 AC_CHECK_HEADER(/usr/include/gmp.h,
312 # Did not find standard library, so use our own
317 GMP_INC="-I${TOP_DIR}/depkgs/gmp"
319 GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
320 GMP_SRC="${TOP_DIR}/depkgs/gmp"
326 AC_SUBST(GMP_LDFLAGS)
330 # -----------------------------------------------------------------------
333 # ---------------------------------------------------
334 # Check for CWEB support/directory
335 # ---------------------------------------------------
340 [ --with-cweb[=DIR] Specify cweb library directory],
345 if test "$with_cweb" != "yes"; then
346 CWEB_INC="-I$with_cweb"
348 CWEB_LDFLAGS="-L$with_cweb"
350 with_cweb="/usr/include"
352 AC_CHECK_HEADER($with_cweb/cweb.h,
358 [ AC_MSG_ERROR([*** cweb library missing])
364 # check for standard cweb library
365 AC_CHECK_HEADER(/usr/include/cweb.h,
372 # Did not find starndard library, so use our own
377 CWEB=${TOP_DIR}/depkgs/cweb
378 CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
380 CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
381 CWEB_SRC="${TOP_DIR}/depkgs/cweb"
388 AC_SUBST(CWEB_LDFLAGS)
392 # -----------------------------------------------------------------------
396 # -----------------------------------------------------------
397 # Check whether user wants TCP wrappers support (default off)
398 # -----------------------------------------------------------
400 AC_ARG_WITH(tcp-wrappers,
401 [ --with-tcp-wrappers=DIR Enable tcpwrappers support],
403 if test "x$withval" != "xno" ; then
405 LIBS="$LIBS -lwrap -lnsl"
406 AC_MSG_CHECKING(for libwrap)
409 int deny_severity = 0;
410 int allow_severity = 0;
411 struct request_info *req; ],
412 [ hosts_access(req); ],
415 AC_DEFINE(HAVE_LIBWRAP)
418 [AC_MSG_ERROR([*** libwrap missing]) ]
424 # ------------------------------------------
425 # Where to place working dir
426 # ------------------------------------------
427 working_dir=`eval echo ${sysconfdir}/working`
428 AC_ARG_WITH(working-dir,
429 [ --with-working-dir=PATH Specify location of Bacula working files],
431 if test "x$withval" != "xno" ; then
437 AC_SUBST(working_dir)
439 # ------------------------------------------
440 # Where to send dump email
441 # ------------------------------------------
443 AC_ARG_WITH(dump-email,
444 [ --with-dump-email=Dump email address],
446 if test "x$withval" != "xno" ; then
454 # ------------------------------------------
455 # Where to send job email
456 # ------------------------------------------
458 AC_ARG_WITH(job-email,
459 [ --with-job-email=Job output email address],
461 if test "x$withval" != "xno" ; then
469 # ------------------------------------------
470 # Where to find smtp host
471 # ------------------------------------------
473 AC_ARG_WITH(smtp_host,
474 [ --with-smtp-host=SMTP mail host address],
476 if test "x$withval" != "xno" ; then
485 # ------------------------------------
486 # Where to place pid files
487 # ------------------------------------
490 [ --with-pid-dir=PATH Specify location of Bacula pid files],
492 if test "x$withval" != "xno" ; then
498 # make sure the pid directory exists
499 if test ! -d $piddir ; then
500 piddir=`eval echo ${sysconfdir}`
502 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
506 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
510 # ------------------------------------
511 # Where to place subsys "lock file"
512 # ------------------------------------
513 subsysdir=/var/run/subsys
514 AC_ARG_WITH(subsys-dir,
515 [ --with-subsys-dir=PATH Specify location of Bacula subsys file],
517 if test "x$withval" != "xno" ; then
523 # make sure the pid directory exists
524 if test ! -d $subsysdir ; then
525 subsysdir=`eval echo ${sysconfdir}`
527 NONE/*) subsysdir=`echo $subsysdir | sed "s~NONE~$ac_default_prefix~"` ;;
535 # ------------------------------------
536 # Where to start assigning ports
537 # ------------------------------------
539 AC_ARG_WITH(baseport,
540 [ --with-baseport=PORT Specify base port address for daemons],
542 if test "x$withval" != "xno" ; then
549 dir_port=`expr $baseport`
550 fd_port=`expr $baseport + 1`
551 sd_port=`expr $fd_port + 1`
558 # ------------------------------------------
560 # ------------------------------------------
562 AC_ARG_WITH(dir-password,
563 [ --with-dir-password=PASSWORD Specify Director's password],
565 if test "x$withval" != "xno" ; then
566 dir_password=$withval
571 if test "x$dir_password" = "x" ; then
572 if test "x$OPENSSL" = "xnone" ; then
573 key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
575 key=`openssl rand -base64 33`
581 AC_ARG_WITH(fd-password,
582 [ --with-fd-password=PASSWORD Specify Client's password],
584 if test "x$withval" != "xno" ; then
590 if test "x$fd_password" = "x" ; then
591 if test "x$OPENSSL" = "xnone" ; then
592 key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
594 key=`openssl rand -base64 33`
600 AC_ARG_WITH(sd-password,
601 [ --with-sd-password=PASSWORD Specify Storage daemon's password],
603 if test "x$withval" != "xno" ; then
609 if test "x$sd_password" = "x" ; then
610 if test "x$OPENSSL" = "xnone" ; then
611 key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
613 key=`openssl rand -base64 33`
619 AC_SUBST(dir_password)
620 AC_SUBST(fd_password)
621 AC_SUBST(sd_password)
627 # ------------------------------------------------
628 # Bacula check for various SQL database engines
629 # ------------------------------------------------
633 # ------------------------------------------------
634 # Bacula check for various SQL database engines
635 # ------------------------------------------------
639 AC_DEFINE(PROTOTYPES)
641 dnl# --------------------------------------------------------------------------
642 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
644 if test -z "$CFLAGS"; then
645 if test -z "$CCOPTS"; then
647 dnl> if test "x$GCC" = xyes; then
648 dnl> if test x$system = xLinux; then
649 dnl> CCOPTS="$CCOPTS "'-O2 -fno-strength-reduce'
659 dnl # AC_SYS_LARGEFILE must modify aclocal.m4
660 dnl LARGE_FILE_SUPPORT
666 dnl# --------------------------------------------------------------------------
667 dnl# CHECKING FOR HEADER FILES
668 dnl# --------------------------------------------------------------------------
696 # It seems that that many machines where <utime.h> seems to be
697 # broken just require something like -D_XXX_SOURCE, where XXX might
698 # be POSIX, POSIX_C, ALL, HPUX or whatever, depending on the machine.
700 AC_CACHE_CHECK(for utime.h, tar_cv_header_utime_h,
702 #include <sys/types.h>
703 #include <utime.h>], [struct utimbuf foo],
704 tar_cv_header_utime_h=yes, tar_cv_header_utime_h=no)])
705 test $tar_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
710 dnl# --------------------------------------------------------------------------
711 dnl# CHECKING FOR FILESYSTEM TYPE
712 dnl# --------------------------------------------------------------------------
713 AC_MSG_CHECKING(how to get filesystem type)
715 # The order of these tests is important.
716 AC_TRY_CPP([#include <sys/statvfs.h>
717 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
718 if test $fstype = no; then
719 AC_TRY_CPP([#include <sys/statfs.h>
720 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
722 if test $fstype = no; then
723 AC_TRY_CPP([#include <sys/statfs.h>
724 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
726 if test $fstype = no; then
727 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
729 if test $fstype = no; then
730 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
732 if test $fstype = no; then
733 AC_TRY_CPP([#include <sys/mount.h>
734 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
736 AC_MSG_RESULT($fstype)
738 dnl# --------------------------------------------------------------------------
739 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
740 dnl# --------------------------------------------------------------------------
748 AC_CHECK_TYPE(ino_t, unsigned long)
749 AC_CHECK_TYPE(dev_t, unsigned long)
750 AC_CHECK_TYPE(daddr_t, long)
751 AC_CHECK_TYPE(major_t, int)
752 AC_CHECK_TYPE(minor_t, int)
753 AC_CHECK_TYPE(ssize_t, int)
760 AC_CHECK_SIZEOF(char, 1)
761 AC_CHECK_SIZEOF(short int, 2)
762 AC_CHECK_SIZEOF(int, 4)
763 AC_CHECK_SIZEOF(long int, 4)
764 AC_CHECK_SIZEOF(long long int, 8)
765 AC_CHECK_SIZEOF(int *, 4)
767 # Check for sys/types.h types
768 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
770 [ #include <sys/types.h> ],
772 [ ac_cv_have_u_int="yes" ],
773 [ ac_cv_have_u_int="no" ]
776 if test "x$ac_cv_have_u_int" = "xyes" ; then
777 AC_DEFINE(HAVE_U_INT)
781 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
783 [ #include <sys/types.h> ],
784 [ intmax_t a; a = 1;],
785 [ ac_cv_have_intmax_t="yes" ],
788 [ #include <stdint.h> ],
789 [ intmax_t a; a = 1;],
790 [ ac_cv_have_intmax_t="yes" ],
791 [ ac_cv_have_intmax_t="no" ]
797 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
798 AC_DEFINE(HAVE_INTMAX_T)
803 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
805 [ #include <sys/types.h> ],
806 [ u_intmax_t a; a = 1;],
807 [ ac_cv_have_u_intmax_t="yes" ],
810 [ #include <stdint.h> ],
811 [ u_intmax_t a; a = 1;],
812 [ ac_cv_have_u_intmax_t="yes" ],
813 [ ac_cv_have_u_intmax_t="no" ]
818 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
819 AC_DEFINE(HAVE_U_INTMAX_T)
824 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
826 [ #include <sys/types.h> ],
827 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
828 [ ac_cv_have_intxx_t="yes" ],
829 [ ac_cv_have_intxx_t="no" ]
832 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
833 AC_DEFINE(HAVE_INTXX_T)
837 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
839 [ #include <sys/types.h> ],
840 [ int64_t a; a = 1;],
841 [ ac_cv_have_int64_t="yes" ],
842 [ ac_cv_have_int64_t="no" ]
845 if test "x$ac_cv_have_int64_t" = "xyes" ; then
846 AC_DEFINE(HAVE_INT64_T)
850 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
852 [ #include <sys/types.h> ],
853 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
854 [ ac_cv_have_u_intxx_t="yes" ],
855 [ ac_cv_have_u_intxx_t="no" ]
858 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
859 AC_DEFINE(HAVE_U_INTXX_T)
863 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
865 [ #include <sys/types.h> ],
866 [ u_int64_t a; a = 1;],
867 [ ac_cv_have_u_int64_t="yes" ],
868 [ ac_cv_have_u_int64_t="no" ]
871 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
872 AC_DEFINE(HAVE_U_INT64_T)
876 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
877 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
879 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
881 [ #include <sys/bitypes.h> ],
882 [ int8_t a; int16_t b; int32_t c;
883 u_int8_t e; u_int16_t f; u_int32_t g;
884 a = b = c = e = f = g = 1; ],
885 [ AC_DEFINE(HAVE_U_INTXX_T)
886 AC_DEFINE(HAVE_INTXX_T)
887 AC_DEFINE(HAVE_SYS_BITYPES_H)
888 AC_MSG_RESULT(yes) ],
893 if test -z "$have_u_intxx_t" ; then
894 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
896 [ #include <sys/types.h> ],
897 [ uint8_t a; uint16_t b;
898 uint32_t c; a = b = c = 1; ],
899 [ ac_cv_have_uintxx_t="yes" ],
900 [ ac_cv_have_uintxx_t="no" ]
903 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
904 AC_DEFINE(HAVE_UINTXX_T)
909 dnl# --------------------------------------------------------------------------
910 dnl# CHECKING FOR LIBRARY FUNCTIONS
911 dnl# --------------------------------------------------------------------------
926 [echo 'configure: cannot find needed function.'; exit 1]
929 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
931 AC_CHECK_FUNCS(snprintf vsnprintf)
933 AC_CHECK_FUNCS(localtime_r, [AC_DEFINE(HAVE_LOCALTIME_R)])
935 AC_CHECK_FUNCS(readdir_r, [AC_DEFINE(HAVE_READDIR_R)])
937 # Find where sockets are (especially for Solaris)
938 AC_CHECK_FUNC(socket,
939 AC_MSG_RESULT(using libc's socket),
940 AC_CHECK_LIB(xnet,socket)
941 AC_CHECK_LIB(socket,socket)
942 AC_CHECK_LIB(inet,socket))
944 # If resolver functions are not in libc check for -lnsl or -lresolv.
945 AC_CHECK_FUNC(gethostbyname,
946 AC_MSG_RESULT(using libc's resolver),
947 AC_CHECK_LIB(nsl,gethostbyname)
948 AC_CHECK_LIB(resolv,gethostbyname))
955 AC_FUNC_CLOSEDIR_VOID
956 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
960 dnl# FreeBSD needs to link libxpg4
961 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
964 AC_CHECK_LIB(sun, getpwnam)
965 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
967 if test x$FDLIBS = x-lz; then
972 dnl Check for pthread libraries
974 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
975 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
976 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
977 [AC_CHECK_FUNC(pthread_create)]
987 LDFLAGS=${LDFLAGS--O}
988 LIBS="${LIBS} ${SQL_LFLAGS}"
1000 AC_SUBST(X_EXTRA_LIBS)
1002 dnl# extra configurable objects
1010 # Finally we set appropriate distribution specific
1011 # variables and defaults
1013 # PFILES are platform specific files
1014 PFILES="platforms/Makefile"
1021 PTHREAD_LIB="-lpthread -lexc"
1022 if test "${CC}" = "gcc" ; then
1029 TAPEDRIVE="/dev/nrmt0"
1032 DISTVER=`uname -a |awk '{print $3}'`
1033 TAPEDRIVE="/dev/nrst0"
1036 DISTVER=`cat /etc/.issue | grep Version | cut -f 2 -d ' '`
1037 TAPEDRIVE="/dev/nrst0"
1038 PSCMD="ps -e -o pid,command"
1039 hostname=`hostname -s`
1042 DISTVER=`uname -a |awk '{print $3}'`
1043 TAPEDRIVE="/dev/nrst0"
1045 CFLAGS="${CFLAGS} -mwindows"
1046 LDFLAGS="${LDFLAGS} -mwindows"
1049 DISTVER=`cat /etc/debian_version`
1050 TAPEDRIVE="/dev/nrst0"
1051 PSCMD="ps -e -o pid,command"
1052 hostname=`hostname -s`
1055 DISTVER=`uname -a |awk '{print $3}'`
1056 PTHREAD_LIB="-pthread"
1057 CFLAGS="${CFLAGS} -pthread"
1060 TAPEDRIVE="/dev/nrst0"
1061 PSCMD="ps -x -o pid,command"
1063 platforms/freebsd/Makefile \
1064 platforms/freebsd/bacula-fd \
1065 platforms/freebsd/bacula-sd \
1066 platforms/freebsd/bacula-dir"
1067 hostname=`hostname -s`
1071 TAPEDRIVE="/dev/rmt/0hnb"
1074 DISTVER=`uname -a |awk '{print $3}'`
1077 TAPEDRIVE="/dev/nrst0"
1078 PSCMD="ps -a -o pid,command"
1081 DISTVER=`uname -a |awk '{print $3}'`
1084 TAPEDRIVE="/dev/nrst0"
1085 PSCMD="ps -a -o pid,command"
1088 DISTVER=`cat /etc/redhat-release | grep release |\
1090 TAPEDRIVE="/dev/nst0"
1091 PSCMD="ps -e -o pid,command"
1093 platforms/redhat/Makefile \
1094 platforms/redhat/bacula-fd \
1095 platforms/redhat/bacula-sd \
1096 platforms/redhat/bacula-dir"
1097 hostname=`hostname -s`
1100 DISTVER=`cat /etc/slackware-version`
1101 TAPEDRIVE="/dev/nst0"
1102 PSCMD="ps -e -o pid,command"
1103 hostname=`hostname -s`
1107 TAPEDRIVE="/dev/rmt/0cbn"
1108 PSCMD="ps -e -o pid,comm"
1110 platforms/solaris/Makefile \
1111 platforms/solaris/bacula-fd \
1112 platforms/solaris/bacula-sd \
1113 platforms/solaris/bacula-dir"
1116 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1118 TAPEDRIVE="/dev/nst0"
1119 PSCMD="ps -e -o pid,command"
1120 hostname=`hostname -s`
1125 TAPEDRIVE="/dev/nst0"
1126 PSCMD="ps -e -o pid,command"
1127 hostname=`hostname -s`
1131 TAPEDRIVE="/dev/nst0"
1134 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1141 LIBS="$PTHREAD_LIB $LIBS"
1143 AC_DEFINE_UNQUOTED(lld, "$lld")
1144 AC_DEFINE_UNQUOTED(llu, "$llu")
1152 dnl# common parts of the Makefile
1153 MCOMMON=./autoconf/Make.common
1154 AC_SUBST_FILE(MCOMMON)
1156 AC_OUTPUT([autoconf/Make.common \
1167 src/console/Makefile \
1168 src/console/console.conf \
1169 src/gnome-console/Makefile \
1170 src/gnome-console/gnome-console.conf \
1172 src/dird/bacula-dir.conf \
1174 src/stored/Makefile \
1175 src/stored/bacula-sd.conf \
1176 src/filed/Makefile \
1177 src/filed/bacula-fd.conf \
1178 src/filed/win32/Makefile \
1180 src/cats/make_mysql_tables \
1181 src/cats/drop_mysql_tables \
1182 src/cats/create_mysql_database \
1183 src/cats/grant_mysql_privileges \
1184 src/cats/make_sqlite_tables \
1185 src/cats/drop_sqlite_tables \
1187 src/findlib/Makefile \
1189 [(echo "Doing make of dependencies"; make depend;) ]
1192 chmod 755 startmysql stopmysql bacula startit stopit btraceback
1193 cp -f startit stopit btraceback btraceback.gdb src/console
1194 cp -f startit stopit btraceback btraceback.gdb src/dird
1195 cp -f startit stopit btraceback btraceback.gdb src/filed
1196 cp -f startit stopit btraceback btraceback.gdb src/lib
1197 cp -f startit stopit btraceback btraceback.gdb src/stored
1198 chmod 755 src/cats/make_mysql_tables src/cats/drop_mysql_tables
1199 chmod 755 src/cats/make_test_tables src/cats/drop_test_tables
1200 chmod 755 src/cats/create_mysql_database
1201 chmod 755 src/cats/grant_mysql_privileges
1202 chmod 755 src/cats/make_sqlite_tables src/cats/drop_sqlite_tables
1203 chmod 755 src/cats/sqlite
1207 Configuration on `date`:
1209 Host: ${DISTNAME} ${DISTVER}
1210 Bacula version: ${VERSION} (${DATE})
1211 Source code location: ${srcdir}
1212 Install binaries: ${sbindir}
1213 Install config files: ${sysconfdir}
1215 C++ Compiler: ${CXX}
1216 Compiler flags: ${CFLAGS}
1217 Linker flags: ${LDFLAGS}
1219 Database found: ${have_db}
1220 Database type: ${db_name}
1222 Job Output Email: ${job_email}
1223 Traceback Email: ${dump_email}
1224 SMTP Host Address: ${smtp_host}
1225 Director Port ${dir_port}
1226 File daemon Port ${fd_port}
1227 Storage daemon Port ${sd_port}
1228 Working directory ${working_dir}
1229 SQL binaries Directory ${SQL_BINDIR}
1231 readline support: ${got_readline} ${PRTREADLINE_SRC}
1232 cweb support: ${got_cweb} ${CWEB_SRC}
1233 TCP Wrappers support: ${TCPW_MSG}
1234 ZLIB support: ${have_zlib}
1235 enable-smartalloc: ${support_smartalloc}
1236 enable-gnome: ${support_gnome}
1237 gmp support: ${got_gmp} ${GMP_SRC}