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
146 dnl# --------------------------------------------------------------------------
147 dnl# CHECKING COMMAND LINE OPTIONS
148 dnl# --------------------------------------------------------------------------
149 AC_ARG_ENABLE(everything,
150 [ --enable-everything enable standard non-multichoice features: marked *],
151 [if test x$enableval = xyes; then
152 support_smartalloc=yes
155 # -------------------------------------------
156 # gnome (default off)
157 # -------------------------------------------
160 [ --enable-gnome enable build of gnome-console GUI *],
161 [if test x$enableval = xyes; then
166 if test x$support_gnome = xyes; then
168 GNOME_DIR=src/gnome-console
173 # -------------------------------------------
174 # smartalloc (default off)
175 # -------------------------------------------
176 AC_ARG_ENABLE(smartalloc,
177 [ --enable-smartalloc enable smartalloc debugging support *],
178 [if test x$enableval = xno; then
179 support_smartalloc=no
182 if test x$support_smartalloc = xyes; then
183 AC_DEFINE(SMARTALLOC)
188 # ---------------------------------------------------
189 # Check for readline support/directory (default on)
190 # ---------------------------------------------------
192 # this allows you to turn it completely off
193 AC_ARG_ENABLE(readline,
194 [ --disable-readline disable readline support ],
195 [if test x$enableval = xno; then
201 if test x$support_readline = xyes; then
202 AC_ARG_WITH(readline,
203 [ --with-readline[=DIR] Specify readline library directory],
205 case "$with_readline" in
208 if test "$with_readline" != "yes"; then
209 CONS_INC="-I$with_readline"
210 CONS_LDFLAGS="-L$with_readline"
212 with_readline="/usr/include/readline"
214 AC_CHECK_HEADER($with_readline/readline.h,
216 AC_DEFINE(HAVE_READLINE)
217 CONS_LIBS="-lreadline -ltermcap"
220 [ AC_MSG_ERROR([*** readline library missing])
226 # check for standard readline library
227 AC_CHECK_HEADER(/usr/include/readline/readline.h,
229 AC_DEFINE(HAVE_READLINE)
231 CONS_INC="-I/usr/include/readline"
232 CONS_LIBS="-lreadline -ltermcap"
234 # Did not find starndard library, so user our own
236 AC_DEFINE(HAVE_READLINE)
238 CONS_INC="-I${TOP_DIR}/depkgs"
239 CONS_LIBS="-lreadline -lhistory -ltermcap"
240 CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
241 PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
248 AC_SUBST(CONS_LDFLAGS)
249 AC_SUBST(READLINE_SRC)
251 # Minimal stuff for readline Makefile configuration
258 AC_CHECK_FUNCS(strcasecmp select setenv putenv tcgetattr setlocale lstat lchown)
260 #AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG),
261 # [LIBEXTRAOBJ="$LIBEXTRAOBJ getopt.o getopt1.o"
262 # EXTRAOBJ="$EXTRAOBJ lib/getopt.o lib/getopt1.o"])
264 AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPT_LONG))
269 AC_CHECK_HEADERS(varargs.h \
270 sys/ptem.h sys/pte.h sys/stream.h)
272 # End of readline stuff
273 # -----------------------------------------------------------------------
276 # ---------------------------------------------------
277 # Check for GMP support/directory
278 # ---------------------------------------------------
282 [ --with-gmp[=DIR] Specify gmp library directory],
287 if test "$with_gmp" != "yes"; then
288 GMP_INC="-I$with_gmp"
290 GMP_LDFLAGS="-L$with_gmp"
292 with_gmp="/usr/include"
294 AC_CHECK_HEADER($with_gmp/gmp.h,
300 [ AC_MSG_ERROR([*** gmp library missing])
306 # check for standard gmp library
307 AC_CHECK_HEADER(/usr/include/gmp.h,
314 # Did not find standard library, so use our own
319 GMP_INC="-I${TOP_DIR}/depkgs/gmp"
321 GMP_LDFLAGS="-L${TOP_DIR}/depkgs/gmp"
322 GMP_SRC="${TOP_DIR}/depkgs/gmp"
328 AC_SUBST(GMP_LDFLAGS)
332 # -----------------------------------------------------------------------
335 # ---------------------------------------------------
336 # Check for CWEB support/directory
337 # ---------------------------------------------------
342 [ --with-cweb[=DIR] Specify cweb library directory],
347 if test "$with_cweb" != "yes"; then
348 CWEB_INC="-I$with_cweb"
350 CWEB_LDFLAGS="-L$with_cweb"
352 with_cweb="/usr/include"
354 AC_CHECK_HEADER($with_cweb/cweb.h,
360 [ AC_MSG_ERROR([*** cweb library missing])
366 # check for standard cweb library
367 AC_CHECK_HEADER(/usr/include/cweb.h,
374 # Did not find starndard library, so use our own
379 CWEB=${TOP_DIR}/depkgs/cweb
380 CWEB_INC="-I${TOP_DIR}/depkgs/cweb"
382 CWEB_LDFLAGS="-L${TOP_DIR}/depkgs/cweb"
383 CWEB_SRC="${TOP_DIR}/depkgs/cweb"
390 AC_SUBST(CWEB_LDFLAGS)
394 # -----------------------------------------------------------------------
398 # -----------------------------------------------------------
399 # Check whether user wants TCP wrappers support (default off)
400 # -----------------------------------------------------------
402 AC_ARG_WITH(tcp-wrappers,
403 [ --with-tcp-wrappers=DIR Enable tcpwrappers support],
405 if test "x$withval" != "xno" ; then
407 LIBS="$LIBS -lwrap -lnsl"
408 AC_MSG_CHECKING(for libwrap)
411 int deny_severity = 0;
412 int allow_severity = 0;
413 struct request_info *req; ],
414 [ hosts_access(req); ],
417 AC_DEFINE(HAVE_LIBWRAP)
420 [AC_MSG_ERROR([*** libwrap missing]) ]
426 # ------------------------------------------
427 # Where to place working dir
428 # ------------------------------------------
429 working_dir=`eval echo ${sysconfdir}/working`
430 AC_ARG_WITH(working-dir,
431 [ --with-working-dir=PATH Specify location of Bacula working files],
433 if test "x$withval" != "xno" ; then
439 AC_SUBST(working_dir)
441 # ------------------------------------------
442 # Where to send dump email
443 # ------------------------------------------
444 dump_email=root@localhost
445 AC_ARG_WITH(dump-email,
446 [ --with-dump-email=Dump email address],
448 if test "x$withval" != "xno" ; then
456 # ------------------------------------------
457 # Where to send job email
458 # ------------------------------------------
459 job_email=root@localhost
460 AC_ARG_WITH(job-email,
461 [ --with-job-email=Job output email address],
463 if test "x$withval" != "xno" ; then
471 # ------------------------------------------
472 # Where to find smtp host
473 # ------------------------------------------
475 AC_ARG_WITH(smtp_host,
476 [ --with-smtp-host=SMTP mail host address],
478 if test "x$withval" != "xno" ; then
487 # ------------------------------------
488 # Where to place pid files
489 # ------------------------------------
492 [ --with-pid-dir=PATH Specify location of Bacula pid files],
494 if test "x$withval" != "xno" ; then
500 # make sure the pid directory exists
501 if test ! -d $piddir ; then
502 piddir=`eval echo ${sysconfdir}`
504 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
508 AC_DEFINE_UNQUOTED(_PATH_BACULA_PIDDIR, "$piddir")
512 # ------------------------------------
513 # Where to place subsys "lock file"
514 # ------------------------------------
515 subsysdir=/var/run/subsys
516 AC_ARG_WITH(subsys-dir,
517 [ --with-subsys-dir=PATH Specify location of Bacula subsys file],
519 if test "x$withval" != "xno" ; then
525 # make sure the pid directory exists
526 if test ! -d $subsysdir ; then
527 subsysdir=`eval echo ${sysconfdir}`
529 NONE/*) subsysdir=`echo $subsysdir | sed "s~NONE~$ac_default_prefix~"` ;;
537 # ------------------------------------
538 # Where to start assigning ports
539 # ------------------------------------
541 AC_ARG_WITH(baseport,
542 [ --with-baseport=PORT Specify base port address for daemons],
544 if test "x$withval" != "xno" ; then
551 dir_port=`expr $baseport`
552 fd_port=`expr $baseport + 1`
553 sd_port=`expr $fd_port + 1`
560 # ------------------------------------------
562 # ------------------------------------------
564 AC_ARG_WITH(dir-password,
565 [ --with-dir-password=PASSWORD Specify Director's password],
567 if test "x$withval" != "xno" ; then
568 dir_password=$withval
573 if test "x$dir_password" = "x" ; then
574 if test "x$OPENSSL" = "xnone" ; then
575 key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" abcdefghijklmnopqrst | awk '{getline} {print} {exit}'`
577 key=`openssl rand -base64 33`
583 AC_ARG_WITH(fd-password,
584 [ --with-fd-password=PASSWORD Specify Client's password],
586 if test "x$withval" != "xno" ; then
592 if test "x$fd_password" = "x" ; then
593 if test "x$OPENSSL" = "xnone" ; then
594 key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" tsrqponmlkjihgfedcba | awk '{getline} {print} {exit}'`
596 key=`openssl rand -base64 33`
602 AC_ARG_WITH(sd-password,
603 [ --with-sd-password=PASSWORD Specify Storage daemon's password],
605 if test "x$withval" != "xno" ; then
611 if test "x$sd_password" = "x" ; then
612 if test "x$OPENSSL" = "xnone" ; then
613 key=`date | uuencode 1 | tr "\"@\\\`\\ \\=\\,\\(\\)\\#\\.\\!\\-$'" 123456789uvwxyzabcdef | awk '{getline} {print} {exit}'`
615 key=`openssl rand -base64 33`
621 AC_SUBST(dir_password)
622 AC_SUBST(fd_password)
623 AC_SUBST(sd_password)
628 # ------------------------------------------------
629 # Bacula check for various SQL database engines
630 # ------------------------------------------------
634 # ------------------------------------------------
635 # Bacula check for various SQL database engines
636 # ------------------------------------------------
642 AC_DEFINE(PROTOTYPES)
644 dnl# --------------------------------------------------------------------------
645 dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
647 if test -z "$CFLAGS"; then
648 if test -z "$CCOPTS"; then
650 dnl> if test "x$GCC" = xyes; then
651 dnl> if test x$system = xLinux; then
652 dnl> CCOPTS="$CCOPTS "'-O2 -fno-strength-reduce'
662 dnl # AC_SYS_LARGEFILE must modify aclocal.m4
663 dnl LARGE_FILE_SUPPORT
669 dnl# --------------------------------------------------------------------------
670 dnl# CHECKING FOR HEADER FILES
671 dnl# --------------------------------------------------------------------------
699 # It seems that that many machines where <utime.h> seems to be
700 # broken just require something like -D_XXX_SOURCE, where XXX might
701 # be POSIX, POSIX_C, ALL, HPUX or whatever, depending on the machine.
703 AC_CACHE_CHECK(for utime.h, tar_cv_header_utime_h,
705 #include <sys/types.h>
706 #include <utime.h>], [struct utimbuf foo],
707 tar_cv_header_utime_h=yes, tar_cv_header_utime_h=no)])
708 test $tar_cv_header_utime_h = yes && AC_DEFINE(HAVE_UTIME_H)
713 dnl# --------------------------------------------------------------------------
714 dnl# CHECKING FOR FILESYSTEM TYPE
715 dnl# --------------------------------------------------------------------------
716 AC_MSG_CHECKING(how to get filesystem type)
718 # The order of these tests is important.
719 AC_TRY_CPP([#include <sys/statvfs.h>
720 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
721 if test $fstype = no; then
722 AC_TRY_CPP([#include <sys/statfs.h>
723 #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
725 if test $fstype = no; then
726 AC_TRY_CPP([#include <sys/statfs.h>
727 #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
729 if test $fstype = no; then
730 AC_TRY_CPP([#include <mntent.h>], AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD)
732 if test $fstype = no; then
733 AC_EGREP_HEADER(f_type;, sys/mount.h, AC_DEFINE(FSTYPE_STATFS) fstype=4.4BSD/OSF1)
735 if test $fstype = no; then
736 AC_TRY_CPP([#include <sys/mount.h>
737 #include <sys/fs_types.h>], AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix)
739 AC_MSG_RESULT($fstype)
741 dnl# --------------------------------------------------------------------------
742 dnl# CHECKING FOR TYPEDEFS, STRUCTURES, AND COMPILER CHARACTERISTICS.
743 dnl# --------------------------------------------------------------------------
751 AC_CHECK_TYPE(ino_t, unsigned long)
752 AC_CHECK_TYPE(dev_t, unsigned long)
753 AC_CHECK_TYPE(daddr_t, long)
754 AC_CHECK_TYPE(major_t, int)
755 AC_CHECK_TYPE(minor_t, int)
756 AC_CHECK_TYPE(ssize_t, int)
763 AC_CHECK_SIZEOF(char, 1)
764 AC_CHECK_SIZEOF(short int, 2)
765 AC_CHECK_SIZEOF(int, 4)
766 AC_CHECK_SIZEOF(long int, 4)
767 AC_CHECK_SIZEOF(long long int, 8)
768 AC_CHECK_SIZEOF(int *, 4)
770 # Check for sys/types.h types
771 AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
773 [ #include <sys/types.h> ],
775 [ ac_cv_have_u_int="yes" ],
776 [ ac_cv_have_u_int="no" ]
779 if test "x$ac_cv_have_u_int" = "xyes" ; then
780 AC_DEFINE(HAVE_U_INT)
784 AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t, [
786 [ #include <sys/types.h> ],
787 [ intmax_t a; a = 1;],
788 [ ac_cv_have_intmax_t="yes" ],
791 [ #include <stdint.h> ],
792 [ intmax_t a; a = 1;],
793 [ ac_cv_have_intmax_t="yes" ],
794 [ ac_cv_have_intmax_t="no" ]
800 if test "x$ac_cv_have_intmax_t" = "xyes" ; then
801 AC_DEFINE(HAVE_INTMAX_T)
806 AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t, [
808 [ #include <sys/types.h> ],
809 [ u_intmax_t a; a = 1;],
810 [ ac_cv_have_u_intmax_t="yes" ],
813 [ #include <stdint.h> ],
814 [ u_intmax_t a; a = 1;],
815 [ ac_cv_have_u_intmax_t="yes" ],
816 [ ac_cv_have_u_intmax_t="no" ]
821 if test "x$ac_cv_have_u_intmax_t" = "xyes" ; then
822 AC_DEFINE(HAVE_U_INTMAX_T)
827 AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
829 [ #include <sys/types.h> ],
830 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
831 [ ac_cv_have_intxx_t="yes" ],
832 [ ac_cv_have_intxx_t="no" ]
835 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
836 AC_DEFINE(HAVE_INTXX_T)
840 AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
842 [ #include <sys/types.h> ],
843 [ int64_t a; a = 1;],
844 [ ac_cv_have_int64_t="yes" ],
845 [ ac_cv_have_int64_t="no" ]
848 if test "x$ac_cv_have_int64_t" = "xyes" ; then
849 AC_DEFINE(HAVE_INT64_T)
853 AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
855 [ #include <sys/types.h> ],
856 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
857 [ ac_cv_have_u_intxx_t="yes" ],
858 [ ac_cv_have_u_intxx_t="no" ]
861 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
862 AC_DEFINE(HAVE_U_INTXX_T)
866 AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
868 [ #include <sys/types.h> ],
869 [ u_int64_t a; a = 1;],
870 [ ac_cv_have_u_int64_t="yes" ],
871 [ ac_cv_have_u_int64_t="no" ]
874 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
875 AC_DEFINE(HAVE_U_INT64_T)
879 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
880 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
882 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
884 [ #include <sys/bitypes.h> ],
885 [ int8_t a; int16_t b; int32_t c;
886 u_int8_t e; u_int16_t f; u_int32_t g;
887 a = b = c = e = f = g = 1; ],
888 [ AC_DEFINE(HAVE_U_INTXX_T)
889 AC_DEFINE(HAVE_INTXX_T)
890 AC_DEFINE(HAVE_SYS_BITYPES_H)
891 AC_MSG_RESULT(yes) ],
896 if test -z "$have_u_intxx_t" ; then
897 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
899 [ #include <sys/types.h> ],
900 [ uint8_t a; uint16_t b;
901 uint32_t c; a = b = c = 1; ],
902 [ ac_cv_have_uintxx_t="yes" ],
903 [ ac_cv_have_uintxx_t="no" ]
906 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
907 AC_DEFINE(HAVE_UINTXX_T)
912 dnl# --------------------------------------------------------------------------
913 dnl# CHECKING FOR LIBRARY FUNCTIONS
914 dnl# --------------------------------------------------------------------------
929 [echo 'configure: cannot find needed function.'; exit 1]
932 AC_CHECK_FUNCS(fchdir, [AC_DEFINE(HAVE_FCHDIR)])
934 AC_CHECK_FUNCS(snprintf vsnprintf)
936 dnl# --------------------------------------------------------------------------
937 dnl# CHECKING FOR THREAD SAFE FUNCTIONS
938 dnl# --------------------------------------------------------------------------
939 AC_CHECK_FUNCS(localtime_r readdir_r strerror_r gethostbyname_r)
941 # If resolver functions are not in libc check for -lnsl or -lresolv.
942 AC_CHECK_FUNC(gethostbyname_r,
943 AC_MSG_RESULT(using libc's resolver),
944 AC_CHECK_LIB(nsl,gethostbyname_r)
945 AC_CHECK_LIB(resolv,gethostbyname_r))
948 # Find where sockets are (especially for Solaris)
949 AC_CHECK_FUNC(socket,
950 AC_MSG_RESULT(using libc's socket),
951 AC_CHECK_LIB(xnet,socket)
952 AC_CHECK_LIB(socket,socket)
953 AC_CHECK_LIB(inet,socket))
960 AC_FUNC_CLOSEDIR_VOID
961 AC_FUNC_SETPGRP dnl check for BSD setpgrp.
965 dnl# FreeBSD needs to link libxpg4
966 AC_CHECK_LIB(xpg4, setlocale, [LIBS="$LIBS -lxpg4"])
969 AC_CHECK_LIB(sun, getpwnam)
971 AC_CHECK_HEADERS(zlib.h)
972 AC_CHECK_LIB(z, deflate, [FDLIBS="-lz"])
974 if test x$FDLIBS = x-lz; then
979 dnl Check for pthread libraries
981 AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
982 [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
983 [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
984 [AC_CHECK_FUNC(pthread_create)]
994 LDFLAGS=${LDFLAGS--O}
995 LIBS="${LIBS} ${SQL_LFLAGS}"
1007 AC_SUBST(X_EXTRA_LIBS)
1009 dnl# extra configurable objects
1017 # Finally we set appropriate distribution specific
1018 # variables and defaults
1020 # PFILES are platform specific files
1021 PFILES="platforms/Makefile"
1028 PTHREAD_LIB="-lpthread -lexc"
1029 if test "${CC}" = "gcc" ; then
1036 TAPEDRIVE="/dev/nrmt0"
1039 DISTVER=`uname -a |awk '{print $3}'`
1040 TAPEDRIVE="/dev/nrst0"
1043 DISTVER=`cat /etc/.issue | grep Version | cut -f 2 -d ' '`
1044 TAPEDRIVE="/dev/nrst0"
1045 PSCMD="ps -e -o pid,command"
1046 hostname=`hostname -s`
1049 DISTVER=`uname -a |awk '{print $3}'`
1050 TAPEDRIVE="/dev/nrst0"
1052 CFLAGS="${CFLAGS} -mwindows"
1053 LDFLAGS="${LDFLAGS} -mwindows"
1056 DISTVER=`cat /etc/debian_version`
1057 TAPEDRIVE="/dev/nrst0"
1058 PSCMD="ps -e -o pid,command"
1059 hostname=`hostname -s`
1062 DISTVER=`uname -a |awk '{print $3}'`
1063 PTHREAD_LIB="-pthread"
1064 CFLAGS="${CFLAGS} -pthread"
1067 TAPEDRIVE="/dev/nrst0"
1068 PSCMD="ps -x -o pid,command"
1070 platforms/freebsd/Makefile \
1071 platforms/freebsd/bacula-fd \
1072 platforms/freebsd/bacula-sd \
1073 platforms/freebsd/bacula-dir"
1074 hostname=`hostname -s`
1078 TAPEDRIVE="/dev/rmt/0hnb"
1082 TAPEDRIVE="/dev/rmt/0cbn"
1083 PSCMD="ps -e -o pid,comm"
1084 hostname=`/usr/bsd/hostname -s`
1086 platforms/irix/Makefile \
1087 platforms/irix/bacula-fd \
1088 platforms/irix/bacula-sd \
1089 platforms/irix/bacula-dir"
1092 DISTVER=`uname -a |awk '{print $3}'`
1095 TAPEDRIVE="/dev/nrst0"
1096 PSCMD="ps -a -o pid,command"
1099 DISTVER=`uname -a |awk '{print $3}'`
1102 TAPEDRIVE="/dev/nrst0"
1103 PSCMD="ps -a -o pid,command"
1106 DISTVER=`cat /etc/redhat-release | grep release |\
1108 TAPEDRIVE="/dev/nst0"
1109 PSCMD="ps -e -o pid,command"
1111 platforms/redhat/Makefile \
1112 platforms/redhat/bacula-fd \
1113 platforms/redhat/bacula-sd \
1114 platforms/redhat/bacula-dir"
1115 hostname=`hostname -s`
1118 DISTVER=`cat /etc/slackware-version`
1119 TAPEDRIVE="/dev/nst0"
1120 PSCMD="ps -e -o pid,command"
1121 hostname=`hostname -s`
1125 TAPEDRIVE="/dev/rmt/0cbn"
1126 PSCMD="ps -e -o pid,comm"
1128 platforms/solaris/Makefile \
1129 platforms/solaris/bacula-fd \
1130 platforms/solaris/bacula-sd \
1131 platforms/solaris/bacula-dir"
1134 DISTVER=`cat /etc/SuSE-release |grep VERSION|\
1136 TAPEDRIVE="/dev/nst0"
1137 PSCMD="ps -e -o pid,command"
1138 hostname=`hostname -s`
1143 TAPEDRIVE="/dev/nst0"
1144 PSCMD="ps -e -o pid,command"
1145 hostname=`hostname -s`
1149 TAPEDRIVE="/dev/nst0"
1152 echo " === Something went wrong. Unknown DISTNAME $DISTNAME ==="
1159 LIBS="$PTHREAD_LIB $LIBS"
1161 AC_DEFINE_UNQUOTED(lld, "$lld")
1162 AC_DEFINE_UNQUOTED(llu, "$llu")
1170 dnl# common parts of the Makefile
1171 MCOMMON=./autoconf/Make.common
1172 AC_SUBST_FILE(MCOMMON)
1174 AC_OUTPUT([autoconf/Make.common \
1187 src/console/Makefile \
1188 src/console/console.conf \
1189 src/gnome-console/Makefile \
1190 src/gnome-console/gnome-console.conf \
1192 src/dird/bacula-dir.conf \
1194 src/stored/Makefile \
1195 src/stored/bacula-sd.conf \
1196 src/filed/Makefile \
1197 src/filed/bacula-fd.conf \
1198 src/filed/win32/Makefile \
1200 src/cats/alter_mysql_tables \
1201 src/cats/make_mysql_tables \
1202 src/cats/drop_mysql_tables \
1203 src/cats/create_mysql_database \
1204 src/cats/grant_mysql_privileges \
1205 src/cats/alter_sqlite_tables \
1206 src/cats/make_sqlite_tables \
1207 src/cats/drop_sqlite_tables \
1208 src/cats/create_sqlite_database \
1211 src/cats/create_bdb_database \
1212 src/cats/make_bdb_tables \
1213 src/cats/drop_bdb_tables \
1214 src/findlib/Makefile \
1216 [(echo "Doing make of dependencies"; make depend;) ]
1219 chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
1220 cp -f startit stopit btraceback btraceback.gdb src/console
1221 cp -f startit stopit btraceback btraceback.gdb src/dird
1222 cp -f startit stopit btraceback btraceback.gdb src/filed
1223 cp -f startit stopit btraceback btraceback.gdb src/lib
1224 cp -f startit stopit btraceback btraceback.gdb src/stored
1225 chmod 755 src/cats/make_mysql_tables src/cats/drop_mysql_tables
1226 chmod 755 src/cats/make_test_tables src/cats/drop_test_tables
1227 chmod 755 src/cats/create_mysql_database
1228 chmod 755 src/cats/alter_mysql_tables
1229 chmod 755 src/cats/grant_mysql_privileges
1230 chmod 755 src/cats/make_sqlite_tables src/cats/drop_sqlite_tables
1231 chmod 755 src/cats/create_sqlite_database
1232 chmod 755 src/cats/alter_sqlite_tables
1233 chmod 755 src/cats/sqlite
1234 chmod 755 src/cats/make_bdb_tables src/cats/drop_bdb_tables
1235 chmod 755 src/cats/create_bdb_database
1238 Configuration on `date`:
1240 Host: ${DISTNAME} ${DISTVER}
1241 Bacula version: ${VERSION} (${DATE})
1242 Source code location: ${srcdir}
1243 Install binaries: ${sbindir}
1244 Install config files: ${sysconfdir}
1246 C++ Compiler: ${CXX}
1247 Compiler flags: ${CFLAGS}
1248 Linker flags: ${LDFLAGS}
1250 Database found: ${have_db}
1251 Database type: ${db_name}
1253 Job Output Email: ${job_email}
1254 Traceback Email: ${dump_email}
1255 SMTP Host Address: ${smtp_host}
1256 Director Port ${dir_port}
1257 File daemon Port ${fd_port}
1258 Storage daemon Port ${sd_port}
1259 Working directory ${working_dir}
1260 SQL binaries Directory ${SQL_BINDIR}
1262 readline support: ${got_readline} ${PRTREADLINE_SRC}
1263 cweb support: ${got_cweb} ${CWEB_SRC}
1264 TCP Wrappers support: ${TCPW_MSG}
1265 ZLIB support: ${have_zlib}
1266 enable-smartalloc: ${support_smartalloc}
1267 enable-gnome: ${support_gnome}
1268 gmp support: ${got_gmp} ${GMP_SRC}