-lal
+dnl
dnl
dnl Process this file with autoconf to produce a configure script.
dnl
AC_CONFIG_AUX_DIR(${BUILD_DIR}/autoconf)
AC_CONFIG_HEADER(src/config.h:autoconf/config.h.in)
+dnl minimal Win32 stuff for "make clean"
+WIN32BUILDDIR=${BUILD_DIR}/src/win32
+WIN32MAINDIR=${BUILD_DIR}
+WIN32TOPDIR=${TOP_DIR}
+AC_SUBST(WIN32BUILDDIR)
+AC_SUBST(WIN32MAINDIR)
+AC_SUBST(WIN32TOPDIR)
+
dnl require a recent autoconf
AC_PREREQ(2.61)
if test "x$BACULA" != x; then
post_host=`echo -${BACULA} | tr 'A-Z ' 'a-z-'`
fi
-BACULA=${BACULA-Bacula}
+BACULA=${BACULA:-Bacula}
VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
DATE=`sed -n -e 's/^.*[ \t]*BDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
AC_PROG_CC
AC_PROG_CXX
-AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
+AC_PROG_CC_C_O dnl Determine if C compiler support -c -o.
AC_PROG_GCC_TRADITIONAL dnl Determine if ioctl() need -traditional.
BASECC=`basename $CC`
AC_PATH_PROG(PKGCONFIG, pkg-config, pkg-config)
AC_PATH_PROG(QMAKE, qmake, none)
AC_PATH_PROG(QMAKEQT4, qmake-qt4, none)
+AC_PATH_PROG(GMAKE, gmake, none)
AC_ARG_VAR(WXCONFIG, [wx-config command. On some systems, you must set it to wx-config-2.6 to use wxWidgets 2.6.])
if test "x$WXCONFIG" = x; then
WXCONFIG=wx-config
dnl --------------------------------------------------
dnl Libtool config
dnl --------------------------------------------------
-LT_INIT([shared disable-static])
-LT_LANG([C++])
AC_ARG_ENABLE(libtool,
AC_HELP_STRING([--enable-libtool], [enable building using GNU libtool @<:@default=yes@:>@]),
[
if test x$enableval = xno; then
- use_libtool=no
+ use_libtool=no
fi
]
)
+LT_INIT([shared disable-static])
+LT_LANG([C++])
if test x$use_libtool != xno; then
DEFAULT_OBJECT_TYPE=".lo"
AC_SUBST(LIBTOOL_CLEAN_TARGET)
AC_SUBST(QMAKE_LIBTOOL)
+dnl --------------------------------------------------
+dnl Include file handling
+dnl --------------------------------------------------
+AC_ARG_ENABLE(includes,
+ AC_HELP_STRING([--enable-includes], [enable installing of include files @<:@default=no@:>@]),
+ [
+ if test x$enableval = xyes; then
+ install_includes=yes
+ fi
+ ]
+)
+
+dnl It only makes sense to install include files when you install libraries which only happens when
+dnl libtool is enabled
+
+if test x$use_libtool != xno -a x$install_includes = xyes; then
+ INCLUDE_INSTALL_TARGET="install-includes"
+ INCLUDE_UNINSTALL_TARGET="uninstall-includes"
+else
+ INCLUDE_INSTALL_TARGET=""
+ INCLUDE_UNINSTALL_TARGET=""
+fi
+AC_SUBST(INCLUDE_INSTALL_TARGET)
+AC_SUBST(INCLUDE_UNINSTALL_TARGET)
+
dnl --------------------------------------------------
dnl Bacula OP Sys determination (see aclocal.m4)
dnl --------------------------------------------------
dnl By default, $datarootdir is ${prefix}/share
dnl --------------------------------------------------
AM_GNU_GETTEXT([external])
-if test x${prefix} = xNONE ; then
- if test `eval echo ${datarootdir}` = NONE/share ; then
- datarootdir=/usr/share
- fi
-fi
dnl ------------------------------------------------------------------
dnl If the user has not set --prefix, we set our default to nothing.
dnl In this case, if the user has not set --sysconfdir, we set it
dnl to the package default of /etc/bacula. If either --prefix or
dnl --sysconfdir is set, we leave sysconfdir alone except to eval it.
+dnl If the user has not set --libdir, we set it to the package
+dnl default of /usr/lib. If either --prefix or --libdir is set,
+dnl we leave libdir alone except to eval it. If the user has not set
+dnl --includedir, we set it to the package default of /usr/include.
+dnl If either --prefix or --includedir is set, we leave includedir
+dnl alone except to eval it
dnl ------------------------------------------------------------------
+os_name=`uname -s 2>/dev/null`
if test x${prefix} = xNONE ; then
if test `eval echo ${sysconfdir}` = NONE/etc ; then
sysconfdir=/etc/bacula
fi
+
+ if test `eval echo ${libdir}` = NONE/lib ; then
+ case ${os_name} in
+ Linux)
+ os_processor=`uname -p 2>/dev/null`
+ case ${os_processor} in
+ x86_64)
+ libdir=/usr/lib64
+ ;;
+ *)
+ libdir=/usr/lib
+ ;;
+ esac
+ ;;
+ *)
+ libdir=/usr/lib
+ ;;
+ esac
+ fi
+
+ if test `eval echo ${includedir}` = NONE/include ; then
+ includedir=/usr/include
+ fi
+
+ if test `eval echo ${datarootdir}` = NONE/share ; then
+ datarootdir=/usr/share
+ fi
prefix=
fi
-sysconfdir=`eval echo ${sysconfdir}`
-datarootdir=`eval echo ${datarootdir}`
-localedir=`eval echo ${datarootdir}/locale`
-AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir")
-AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
dnl -------------------------------------------------------------------------
dnl If the user has not set --exec-prefix, we default to ${prefix}
exec_prefix=${prefix}
fi
+sysconfdir=`eval echo ${sysconfdir}`
+datarootdir=`eval echo ${datarootdir}`
+docdir=`eval echo ${docdir}`
+htmldir=`eval echo ${htmldir}`
+libdir=`eval echo ${libdir}`
+includedir=`eval echo ${includedir}`
+localedir=`eval echo ${datarootdir}/locale`
+AC_DEFINE_UNQUOTED(SYSCONFDIR, "$sysconfdir")
+AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir")
+
dnl ------------------------------------------------------------------
dnl If the user has not set --sbindir, we set our default as /sbin
dnl ------------------------------------------------------------------
fi
sbindir=`eval echo ${sbindir}`
-dnl ------------------------------------------------------------------
-dnl If the user has not set --libdir, we set our default as /lib
-dnl ------------------------------------------------------------------
-if test x$libdir = x'${exec_prefix}/lib' ; then
- libdir=${exec_prefix}/lib
+dnl -------------------------------------------------------------------------
+dnl If the user has not set --mandir, we default to /usr/share/man
+dnl -------------------------------------------------------------------------
+if test x$mandir = x'${prefix}/man' ; then
+ mandir=/usr/share/man
fi
-libdir=`eval echo ${libdir}`
-dnl ------------------------------------------------------------------
-dnl If the user has not set --includedir, we set our default as /include
-dnl ------------------------------------------------------------------
-if test x$includedir = x'${exec_prefix}/include' ; then
- includedir=${exec_prefix}/include
+dnl -------------------------------------------------------------------------
+dnl If the user has not set --htmldir, we default to /usr/share/doc/bacula/html
+dnl -------------------------------------------------------------------------
+if test x$htmldir = x${docdir} ; then
+ htmldir=`eval echo ${docdir}bacula/html`
fi
-includedir=`eval echo ${includedir}`
dnl -------------------------------------------------------------------------
-dnl If the user has not set --mandir, we default to /usr/share/man
+dnl If the user has not set --docdir, we default to /usr/share/doc/
dnl -------------------------------------------------------------------------
-if test x$mandir = x'${prefix}/man' ; then
- mandir=/usr/share/man
+if test x$docdir = x'/usr/share/doc/' ; then
+ docdir=`eval echo ${docdir}bacula`
fi
-
+
+
AC_PATH_PROGS(MSGFMT, msgfmt, no)
if test "$MSGFMT" = "no"
then
support_gnome=no
support_bat=no
support_wx_console=no
+support_tray_monitor=no
support_tls=no
support_crypto=no
gnome_version=
build_stored=yes
cats=
db_type=Internal
+support_lockmgr=no
DB_TYPE=bdb
dnl --------------------------------------------------------------------------
AC_HELP_STRING([--enable-gnome], [enable build of bgnome-console GUI @<:@default=no@:>@]),
[
if test x$enableval = xyes; then
- support_gnome=yes
+ support_gnome=yes
fi
]
)
GNOME_DIR=
if test x$support_gnome = xyes; then
- abc=`$PKGCONFIG --exists libgnomeui-2.0`
- pkg=$?
- if test $pkg = 0; then
- GNOME_INCLUDEDIR=`$PKGCONFIG --cflags-only-I libgnomeui-2.0`
- GNOMEUI_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
- GNOME_LIBDIR=`$PKGCONFIG --libs libgnomeui-2.0`
- GNOME_LIBS=`$PKGCONFIG --libs-only-l libgnomeui-2.0`
- AC_SUBST(GNOME_INCLUDEDIR)
- AC_SUBST(GNOMEUI_LIBS)
- AC_SUBST(GNOME_LIBDIR)
- AC_SUBST(GNOME_LIBS)
- GNOME_DIR=src/gnome2-console
- gnome_version="Version 2.x"
- else
- AC_MSG_ERROR(Unable to find Gnome 2 installation)
- fi
+ AC_MSG_ERROR(bgnome-console no longer supported)
+ AC_MSG_ERROR(--enable-gnome option no longer supported)
fi
-AC_SUBST(GNOME_DIR)
+# AC_SUBST(GNOME_DIR)
dnl -------------------------------------------
dnl bat (default off)
AC_HELP_STRING([--enable-bat], [enable build of bat Qt4 GUI @<:@default=no@:>@]),
[
if test x$enableval = xyes; then
- AC_DEFINE(HAVE_BAT, 1, [Set if Bacula bat Qt4 GUI support enabled])
- support_bat=yes
+ AC_DEFINE(HAVE_BAT, 1, [Set if Bacula bat Qt4 GUI support enabled])
+ support_bat=yes
fi
]
)
AC_ARG_WITH(qwt,
AC_HELP_STRING([--with-qwt@<:@=DIR@:>@], [specify qwt library directory]),
[
- case "$with_qwt" in
- no)
- no_qwt=yes
- ;;
- yes|*)
- if test -f ${with_qwt}/include/qwt.h; then
- QWT_INC="${with_qwt}/include"
- QWT_LDFLAGS="-L${with_qwt}/lib"
- QWT_LIB="-lqwt"
- QWT="qwt"
- fi
- ;;
- esac
+ case "$with_qwt" in
+ no)
+ no_qwt=yes
+ ;;
+ yes|*)
+ if test -f ${with_qwt}/include/qwt.h; then
+ QWT_INC="${with_qwt}/include"
+ QWT_LDFLAGS="-L${with_qwt}/lib"
+ QWT_LIB="-lqwt"
+ QWT="qwt"
+ fi
+ ;;
+ esac
]
)
dnl
if test $no_qwt = no; then
if test x$QWT_INC = x; then
- for root in /usr /usr/local; do
- for ver in qwt qwt5 qwt-qt4; do
- if test -f ${root}/include/${ver}/qwt.h; then
- QWT_INC="${root}/include/${ver}"
- if test -d ${root}/lib64/; then
- QWT_LDFLAGS="-L${root}/lib64"
- elif test -d ${root}/lib/64/; then
- QWT_LDFLAGS="-L${root}/64"
- else
- QWT_LDFLAGS="-L${root}/lib"
- fi
- QWT_LIB="-lqwt"
- QWT="qwt"
- got_qwt=yes
- break;
- fi
- done
- done
+ for root in /usr /usr/local; do
+ for ver in qwt qwt5 qwt-qt4; do
+ if test -f ${root}/include/${ver}/qwt.h; then
+ QWT_INC="${root}/include/${ver}"
+ if test -d ${root}/lib64/; then
+ QWT_LDFLAGS="-L${root}/lib64"
+ elif test -d ${root}/lib/64/; then
+ QWT_LDFLAGS="-L${root}/64"
+ else
+ QWT_LDFLAGS="-L${root}/lib"
+ fi
+ QWT_LIB="-lqwt"
+ QWT="qwt"
+ got_qwt=yes
+ break;
+ fi
+ done
+ done
fi
fi
if test x$QWT_INC = x; then
AC_HELP_STRING([--enable-bwx-console], [enable build of wxWidgets console @<:@default=no@:>@]),
[
if test x$enableval = xyes; then
- support_wx_console=yes
+ support_wx_console=yes
fi
]
)
AC_SUBST(WXCONS_CPPFLAGS)
AC_SUBST(WXCONS_LDFLAGS)
- WX_DIR=src/wx-console
+ WX_DIR="src/wx-console"
else
echo " "
echo "wx-config program not found. bwx-console disabled."
AC_HELP_STRING([--enable-tray-monitor], [enable build of Gnome tray monitor (compatible with KDE @<:@default=no@:>@]),
[
if test x$enableval = xyes; then
- support_tray_monitor=yes
+ support_tray_monitor=yes
fi
]
)
abc=`$PKGCONFIG --atleast-version=2.4 gtk+-2.0`
pkg=$?
if test $pkg = 0; then
- AC_DEFINE(HAVE_GTK_2_4, 1, [Set if you have GTK 4.2 or greater loaded])
+ AC_DEFINE(HAVE_GTK_2_4, 1, [Set if you have GTK 4.2 or greater loaded])
fi
fi
fi
AC_HELP_STRING([--enable-smartalloc], [enable smartalloc debugging support @<:@default=no@:>@]),
[
if test x$enableval = xno; then
- support_smartalloc=no
+ support_smartalloc=no
fi
]
)
AC_DEFINE(SMARTALLOC, 1, [Set if you want Smartalloc enabled])
fi
+dnl -------------------------------------------
+dnl Lock Manager (default off)
+dnl -------------------------------------------
+AC_ARG_ENABLE(lockmgr,
+ AC_HELP_STRING([--enable-lockmgr], [enable lock manager support @<:@default=no@:>@]),
+ [
+ if test x$enableval = xyes; then
+ support_lockmgr=yes
+ fi
+ ]
+)
+
+if test x$support_lockmgr = xyes; then
+ AC_DEFINE(_USE_LOCKMGR, 1, [Set if you want Lock Manager enabled])
+fi
+
+
dnl -------------------------------------------
dnl static-tools (default off)
dnl -------------------------------------------
AC_HELP_STRING([--enable-static-tools], [enable static tape tools @<:@default=no@:>@]),
[
if test x$enableval = xyes; then
- support_static_tools=yes
+ if test x$use_libtool = xyes; then
+ AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
+ please rerun configure with --disable-libtool])
+ fi
+ support_static_tools=yes
fi
]
)
AC_SUBST(TTOOL_LDFLAGS)
dnl -------------------------------------------
-dnl static-fd (default off)
+dnl static-fd (default off)
dnl -------------------------------------------
AC_ARG_ENABLE(static-fd,
AC_HELP_STRING([--enable-static-fd], [enable static File daemon @<:@default=no@:>@]),
[
if test x$enableval = xyes; then
- support_static_fd=yes
+ if test x$use_libtool = xyes; then
+ AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
+ please rerun configure with --disable-libtool])
+ fi
+ support_static_fd=yes
fi
]
)
AC_SUBST(STATIC_FD)
dnl -------------------------------------------
-dnl static-sd (default off)
+dnl static-sd (default off)
dnl -------------------------------------------
AC_ARG_ENABLE(static-sd,
AC_HELP_STRING([--enable-static-sd], [enable static Storage daemon @<:@default=no@:>@]),
[
if test x$enableval = xyes; then
- support_static_sd=yes
+ if test x$use_libtool = xyes; then
+ AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
+ please rerun configure with --disable-libtool])
+ fi
+ support_static_sd=yes
fi
]
)
AC_SUBST(STATIC_SD)
dnl -------------------------------------------
-dnl static-dir (default off)
+dnl static-dir (default off)
dnl -------------------------------------------
AC_ARG_ENABLE(static-dir,
AC_HELP_STRING([--enable-static-dir], [enable static Director @<:@default=no@:>@]),
[
if test x$enableval = xyes; then
- support_static_dir=yes
+ if test x$use_libtool = xyes; then
+ AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
+ please rerun configure with --disable-libtool])
+ fi
+ support_static_dir=yes
fi
]
)
AC_HELP_STRING([--enable-static-cons], [enable static Console @<:@default=no@:>@]),
[
if test x$enableval = xyes; then
- support_static_cons=yes
+ if test x$use_libtool = xyes; then
+ AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
+ please rerun configure with --disable-libtool])
+ fi
+ support_static_cons=yes
fi
]
)
AC_HELP_STRING([--enable-client-only], [build client (File daemon) only @<:@default=no@:>@]),
[
if test x$enableval = xyes; then
- build_client_only=yes
- db_type=None
- DB_TYPE=none
+ build_client_only=yes
+ db_type=None
+ DB_TYPE=none
fi
]
)
AC_HELP_STRING([--enable-build-dird], [enable building of dird (Director) @<:@default=yes@:>@]),
[
if test x$enableval = xno; then
- build_dird=no
+ build_dird=no
fi
]
)
AC_HELP_STRING([--enable-build-stored], [enable building of stored (Storage daemon) @<:@default=yes@:>@]),
[
if test x$enableval = xno; then
- build_stored=no
+ build_stored=no
fi
]
)
AC_HELP_STRING([--disable-conio], [disable conio support @<:@default=no@:>@]),
[
if test x$enableval = xno; then
- support_conio=no
+ support_conio=no
fi
]
)
AC_HELP_STRING([--enable-ipv6], [enable ipv6 support @<:@default=yes@:>@]),
[
if test x$enableval = xno; then
- support_ipv6=no
+ support_ipv6=no
fi
]
)
[
AC_CHECK_HEADERS(curses.h)
AC_CHECK_HEADER(term.h,
- [ AC_CHECK_LIB(curses, tgetent,
+ [ AC_CHECK_LIB(curses, tgetent,
[ CONS_LIBS="-lcurses"
- CONS_OBJ="conio.o"
- CONS_SRC="conio.c"
- got_conio="yes"
- support_readline=no
- AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
+ CONS_OBJ="conio.o"
+ CONS_SRC="conio.c"
+ got_conio="yes"
+ support_readline=no
+ AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled])
])
- ],
- [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
+ ],
+ [ echo " "; echo "Required libraries not found. CONIO turned off ..."; echo " "],
[#if HAVE_CURSES_H
#include <curses.h>
#endif
AC_HELP_STRING([--disable-readline], [disable readline support @<:@default=yes@:>@]),
[
if test x$enableval = xno; then
- support_readline=no
+ support_readline=no
fi
]
)
AC_ARG_WITH(readline,
AC_HELP_STRING([--with-readline@<:@=DIR@:>@], [specify readline library directory]),
[
- case "$with_readline" in
- no)
- :
- ;;
- yes|*)
- if test -f ${with_readline}/readline.h; then
- CONS_INC="-I${with_readline}"
- CONS_LDFLAGS="-L$with_readline"
- elif test -f ${with_readline}/include/readline/readline.h; then
- CONS_INC="-I${with_readline}/include/readline"
- CONS_LDFLAGS="-L${with_readline}/lib"
- with_readline="${with_readline}/include/readline"
- else
- with_readline="/usr/include/readline"
- fi
-
- AC_CHECK_HEADER(${with_readline}/readline.h,
- [
- AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
- CONS_LIBS="-lreadline -lhistory -ltermcap"
- got_readline="yes"
- ], [
- echo " "
- echo "readline.h not found. readline turned off ..."
- echo " "
- ]
- )
- ;;
- esac
+ case "$with_readline" in
+ no)
+ :
+ ;;
+ yes|*)
+ if test -f ${with_readline}/readline.h; then
+ CONS_INC="-I${with_readline}"
+ CONS_LDFLAGS="-L$with_readline"
+ elif test -f ${with_readline}/include/readline/readline.h; then
+ CONS_INC="-I${with_readline}/include/readline"
+ CONS_LDFLAGS="-L${with_readline}/lib"
+ with_readline="${with_readline}/include/readline"
+ else
+ with_readline="/usr/include/readline"
+ fi
+
+ AC_CHECK_HEADER(${with_readline}/readline.h,
+ [
+ AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
+ CONS_LIBS="-lreadline -lhistory -ltermcap"
+ got_readline="yes"
+ ], [
+ echo " "
+ echo "readline.h not found. readline turned off ..."
+ echo " "
+ ]
+ )
+ ;;
+ esac
],[
- dnl check for standard readline library
- AC_CHECK_HEADER(/usr/include/readline/readline.h,
- [
- AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
- got_readline="yes"
- CONS_INC="-I/usr/include/readline"
- CONS_LIBS="-lreadline -ltermcap"
- ], [
- dnl Did not find standard library, so try Bacula's default
- AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
- [
- AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
- got_readline="yes"
- CONS_INC="-I${TOP_DIR}/depkgs/readline"
- CONS_LIBS="-lreadline -lhistory -ltermcap"
- CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
- PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
- ], [
- echo " "
- echo "readline.h not found. readline turned off ..."
- echo " "
- ]
- )
- ]
- )
+ dnl check for standard readline library
+ AC_CHECK_HEADER(/usr/include/readline/readline.h,
+ [
+ AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
+ got_readline="yes"
+ CONS_INC="-I/usr/include/readline"
+ CONS_LIBS="-lreadline -ltermcap"
+ ], [
+ dnl Did not find standard library, so try Bacula's default
+ AC_CHECK_HEADER(${TOP_DIR}/depkgs/readline/readline.h,
+ [
+ AC_DEFINE(HAVE_READLINE, 1, [Set to enable readline support])
+ got_readline="yes"
+ CONS_INC="-I${TOP_DIR}/depkgs/readline"
+ CONS_LIBS="-lreadline -lhistory -ltermcap"
+ CONS_LDFLAGS="-L${TOP_DIR}/depkgs/readline"
+ PRTREADLINE_SRC="${TOP_DIR}/depkgs/readline"
+ ], [
+ echo " "
+ echo "readline.h not found. readline turned off ..."
+ echo " "
+ ]
+ )
+ ]
+ )
]
)
fi
PYTHON_INCDIR=
PYTHON_LIBS=
if test "$withval" != "no"; then
- if test "$withval" = "yes"; then
- for python_root in /usr /usr/local /usr/sfw; do
- for ver in python2.2 python2.3 python2.4 python2.5; do
- if test -f $python_root/include/${ver}/Python.h; then
- PYTHON_INCDIR=-I$python_root/include/${ver}
- if test -d $python_root/lib64/${ver}/config; then
- PYTHON_LIBS="-L$python_root/lib64/${ver}/config -l${ver}"
- else
- PYTHON_LIBS="-L$python_root/lib/${ver}/config -l${ver}"
- fi
- break
- fi
- done
- done
-
- if test x$PYTHON_INCDIR = x; then
- if test -f $prefix/include/Python.h; then
- PYTHON_INCDIR=-I$prefix/include
- if test -d $prefix/lib64/config; then
- PYTHON_LIBS="-L$prefix/lib64/config -lpython"
- else
- PYTHON_LIBS="-L$prefix/lib/config -lpython"
- fi
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR(Unable to find Python.h in standard locations)
- fi
- fi
- else
- if test -f $withval/Python.h; then
- PYTHON_INCDIR=-I$withval
- PYTHON_LIBS="-L$withval/config -lpython"
- elif test -f $withval/include/Python.h; then
- PYTHON_INCDIR=-I$withval/include
- if test -d $withval/lib64/config; then
- PYTHON_LIBS="-L$withval/lib64/config -lpython"
- else
- PYTHON_LIBS="-L$withval/lib/config -lpython"
- fi
- elif test -f $withval/include/python/Python.h; then
- PYTHON_INCDIR=-I$withval/include/python
- if test -d $withval/lib64/python/config; then
- PYTHON_LIBS="-L$withval/lib64/python/config -lpython"
- else
- PYTHON_LIBS="-L$withval/lib/python/config -lpython"
- fi
- else
- AC_MSG_RESULT(no)
- AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
- fi
- fi
-
- AC_DEFINE([HAVE_PYTHON], 1)
- AC_MSG_RESULT(yes)
- support_python=yes
- AC_MSG_NOTICE(checking for more Python libs)
- saved_LIBS="$LIBS"; LIBS=
- AC_SEARCH_LIBS(shm_open, [rt])
- AC_CHECK_LIB(util, openpty)
- PYTHON_LIBS="$PYTHON_LIBS $LIBS"
- LIBS="$saved_LIBS"
+ if test "$withval" = "yes"; then
+ if test -e /usr/bin/python-config ; then
+ PYTHON_INCDIR=`/usr/bin/python-config --includes`
+ PYTHON_LIBS=`/usr/bin/python-config --libs`
+ else
+ for python_root in /usr /usr/local /usr/sfw; do
+ for ver in python2.2 python2.3 python2.4 python2.5 python2.6 python3; do
+ if test -f $python_root/include/${ver}/Python.h; then
+ PYTHON_INCDIR=-I$python_root/include/${ver}
+ if test -d $python_root/lib64/${ver}/config; then
+ PYTHON_LIBS="-L$python_root/lib64/${ver}/config -l${ver}"
+ else
+ PYTHON_LIBS="-L$python_root/lib/${ver}/config -l${ver}"
+ fi
+ break
+ fi
+ done
+ done
+
+ if test x$PYTHON_INCDIR = x; then
+ if test -f $prefix/include/Python.h; then
+ PYTHON_INCDIR=-I$prefix/include
+ if test -d $prefix/lib64/config; then
+ PYTHON_LIBS="-L$prefix/lib64/config -lpython"
+ else
+ PYTHON_LIBS="-L$prefix/lib/config -lpython"
+ fi
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Unable to find Python.h in standard locations)
+ fi
+ fi
+ fi
+ else
+ if test -e $withval/bin/python-config ; then
+ PYTHON_INCDIR=`$withval/bin/python-config --includes`
+ PYTHON_LIBS=`$withval/bin/python-config --libs`
+ elif test -f $withval/Python.h; then
+ PYTHON_INCDIR=-I$withval
+ PYTHON_LIBS="-L$withval/config -lpython"
+ elif test -f $withval/include/Python.h; then
+ PYTHON_INCDIR=-I$withval/include
+ if test -d $withval/lib64/config; then
+ PYTHON_LIBS="-L$withval/lib64/config -lpython"
+ else
+ PYTHON_LIBS="-L$withval/lib/config -lpython"
+ fi
+ elif test -f $withval/include/python/Python.h; then
+ PYTHON_INCDIR=-I$withval/include/python
+ if test -d $withval/lib64/python/config; then
+ PYTHON_LIBS="-L$withval/lib64/python/config -lpython"
+ else
+ PYTHON_LIBS="-L$withval/lib/python/config -lpython"
+ fi
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Invalid Python directory $withval - unable to find Python.h under $withval)
+ fi
+ fi
+
+ AC_DEFINE([HAVE_PYTHON], 1)
+ AC_MSG_RESULT(yes)
+ support_python=yes
+ AC_MSG_NOTICE(checking for more Python libs)
+ saved_LIBS="$LIBS"; LIBS=
+ AC_SEARCH_LIBS(shm_open, [rt])
+ AC_CHECK_LIB(util, openpty)
+ PYTHON_LIBS="$PYTHON_LIBS $LIBS"
+ LIBS="$saved_LIBS"
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(no)
fi
],[
AC_MSG_RESULT(no)
AC_HELP_STRING([--with-tcp-wrappers@<:@=DIR@:>@], [enable tcpwrappers support]),
[
if test "x$withval" != "xno" ; then
- saved_LIBS="$LIBS"
- LIBS="$saved_LIBS -lwrap"
- AC_MSG_CHECKING(for libwrap)
- AC_SEARCH_LIBS(nanosleep, [rt])
- AC_TRY_LINK(
- [
- #include <sys/types.h>
- #include <tcpd.h>
- int deny_severity = 0;
- int allow_severity = 0;
- struct request_info *req;
- ], [
- hosts_access(req);
- ], [
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
- TCPW_MSG="yes"
- LIBS="$saved_LIBS"
- WRAPLIBS="-lwrap"
- ], [
- LIBS="$saved_LIBS -lwrap -lnsl"
- WRAPLIBS="$saved_LIBS -lwrap -lnsl"
- AC_TRY_LINK(
- [
- #include <sys/types.h>
- #include <tcpd.h>
- int deny_severity = 0;
- int allow_severity = 0;
- struct request_info *req;
- ], [
- hosts_access(req);
- ], [
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
- TCPW_MSG="yes"
- LIBS="$saved_LIBS"
- WRAPLIBS="-lwrap"
- ], [
- AC_MSG_ERROR([*** libwrap missing])
- ]
- )
- ]
- )
+ saved_LIBS="$LIBS"
+ LIBS="$saved_LIBS -lwrap"
+ AC_SEARCH_LIBS(nanosleep, [rt])
+ AC_MSG_CHECKING(for libwrap)
+ AC_TRY_LINK(
+ [
+ #include <sys/types.h>
+ #include <tcpd.h>
+ int deny_severity = 0;
+ int allow_severity = 0;
+ struct request_info *req;
+ ], [
+ hosts_access(req);
+ ], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
+ TCPW_MSG="yes"
+ LIBS="$saved_LIBS"
+ WRAPLIBS="-lwrap"
+ ], [
+ LIBS="$saved_LIBS -lwrap -lnsl"
+ WRAPLIBS="$saved_LIBS -lwrap -lnsl"
+ AC_TRY_LINK(
+ [
+ #include <sys/types.h>
+ #include <tcpd.h>
+ int deny_severity = 0;
+ int allow_severity = 0;
+ struct request_info *req;
+ ], [
+ hosts_access(req);
+ ], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_LIBWRAP, 1, [Set to enable libwraper support])
+ TCPW_MSG="yes"
+ LIBS="$saved_LIBS"
+ WRAPLIBS="-lwrap"
+ ], [
+ AC_MSG_ERROR([*** libwrap missing])
+ ]
+ )
+ ]
+ )
fi
]
)
AC_ARG_WITH(openssl,
AC_HELP_STRING([--with-openssl@<:@=DIR@:>@], [Include OpenSSL support. DIR is the OpenSSL base]),
[
- with_openssl_directory=${withval}
+ with_openssl_directory=${withval}
]
)
# Make sure the $with_openssl_directory also makes sense
#
if test -d "$with_openssl_directory/lib" -a -d "$with_openssl_directory/include"; then
- OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
- OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
+ OPENSSL_LIBS="-L$with_openssl_directory/lib $OPENSSL_LIBS"
+ OPENSSL_INC="-I$with_openssl_directory/include $OPENSSL_INC"
fi
fi
AC_TRY_LINK(
[
- #include <openssl/ssl.h>
+ #include <openssl/ssl.h>
], [
- CRYPTO_set_id_callback(NULL);
+ CRYPTO_set_id_callback(NULL);
], [
- support_tls="yes"
- support_crypto="yes"
+ support_tls="yes"
+ support_crypto="yes"
], [
- support_tls="no"
+ support_tls="no"
]
)
AC_TRY_LINK(
[
- #include <openssl/evp.h>
+ #include <openssl/evp.h>
], [
- EVP_sha512();
+ EVP_sha512();
], [
- ac_cv_openssl_sha2="yes"
+ ac_cv_openssl_sha2="yes"
], [
- ac_cv_openssl_sha2="no"
+ ac_cv_openssl_sha2="no"
]
)
dnl openssl library.
AC_TRY_LINK(
[
- #include <openssl/evp.h>
+ #include <openssl/evp.h>
], [
- EVP_aes_192_cbc();
+ EVP_aes_192_cbc();
], [
- ac_cv_openssl_export="no"
+ ac_cv_openssl_export="no"
], [
- ac_cv_openssl_export="yes"
+ ac_cv_openssl_export="yes"
]
)
OPENSSL_INC=""
fi
+if test "$support_tls" = "no"; then
+ OPENSSL_LIBS=""
+ OPENSSL_INC=""
+fi
+
AC_MSG_RESULT([$support_tls])
AC_SUBST(OPENSSL_LIBS)
AC_SUBST(OPENSSL_INC)
AC_HELP_STRING([--with-working-dir=PATH], [specify path of Bacula working directory]),
[
if test "x$withval" != "xno" ; then
- working_dir=$withval
+ working_dir=$withval
fi
]
)
dnl ------------------------------------------------------------------
dnl If the user has not set archivedir, we set our default as /tmp
dnl ------------------------------------------------------------------
-archive_dir=/tmp
+archivedir=/tmp
AC_ARG_WITH(archivedir,
AC_HELP_STRING([--with-archivedir=PATH], [specify path of SD archive directory]),
[
if test "x$withval" != "xno" ; then
- archivedir=$withval
+ archivedir=$withval
fi
]
)
AC_SUBST(archivedir)
+dnl ------------------------------------------------------------------
+dnl Allow the user to specify the daemon resource name default hostname
+dnl ------------------------------------------------------------------
+basename=`hostname`
+AC_ARG_WITH(basename,
+ AC_HELP_STRING([--with-basename=RESNAME], [specify base resource name for daemons]),
+ [
+ if test "x$withval" != "xno" ; then
+ basename=$withval
+ fi
+ ]
+)
+
+AC_SUBST(basename)
+
+dnl ------------------------------------------------------------------
+dnl Allow the user to override the hostname (default = machine hostname)
+dnl ------------------------------------------------------------------
+hostname=`uname -n | cut -d '.' -f 1`
+if test x${hostname} = x ; then
+ hostname="localhost"
+fi
+AC_ARG_WITH(hostname,
+ AC_HELP_STRING([--with-hostname=RESNAME], [specify host name for daemons]),
+ [
+ if test "x$withval" != "xno" ; then
+ hostname=$withval
+ fi
+ ]
+)
+
+AC_SUBST(hostname)
+
+
dnl ------------------------------------------
dnl Where to place scriptdir (script files)
dnl ------------------------------------------
AC_HELP_STRING([--with-scriptdir=PATH], [specify path of Bacula scripts directory]),
[
if test "x$withval" != "xno" ; then
- scriptdir=$withval
+ scriptdir=$withval
fi
]
)
AC_SUBST(scriptdir)
+
+dnl ------------------------------------------
+dnl Where to place bsrdir (bsr files)
+dnl ------------------------------------------
+bsrdir=/tmp
+AC_ARG_WITH(bsrdir,
+ AC_HELP_STRING([--with-bsrdir=PATH], [specify path of Bacula bsrs directory]),
+ [
+ if test "x$withval" != "xno" ; then
+ bsrdir=$withval
+ fi
+ ]
+)
+
+AC_SUBST(bsrdir)
+
+dnl ------------------------------------------
+dnl Where to place logdir (bsr files)
+dnl ------------------------------------------
+logdir=/tmp
+AC_ARG_WITH(logdir,
+ AC_HELP_STRING([--with-logdir=PATH], [specify path of Bacula logs directory]),
+ [
+ if test "x$withval" != "xno" ; then
+ logdir=$withval
+ fi
+ ]
+)
+
+AC_SUBST(logdir)
+
+
# ------------------------------------------
-# Where to place plugindir (script files)
+# Where to place plugindir (plugin files)
# ------------------------------------------
-plugindir=`eval echo ${sysconfdir}`
+plugindir=`eval echo ${libdir}`
AC_ARG_WITH(plugindir,
AC_HELP_STRING([--with-plugindir=PATH], [specify path of Bacula plugins directory]),
[
if test "x$withval" != "xno" ; then
- plugindir=$withval
+ plugindir=$withval
fi
]
)
AC_HELP_STRING([--with-dump-email=EMAIL], [dump email address]),
[
if test "x$withval" != "xno" ; then
- dump_email=$withval
+ dump_email=$withval
fi
]
)
AC_HELP_STRING([--with-job-email=EMAIL], [job output email address]),
[
if test "x$withval" != "xno" ; then
- job_email=$withval
+ job_email=$withval
fi
]
)
AC_HELP_STRING([--with-smtp-host=HOST], [SMTP mail host address]),
[
if test "x$withval" != "xno" ; then
- smtp_host=$withval
+ smtp_host=$withval
fi
]
)
AC_HELP_STRING([--with-pid-dir=PATH], [specify location of Bacula pid files]),
[
if test "x$withval" != "xno" ; then
- piddir=$withval
+ piddir=$withval
fi
]
)
AC_HELP_STRING([--with-subsys-dir=PATH], [specify location of Bacula subsys file]),
[
if test "x$withval" != "xno" ; then
- subsysdir=$withval
+ subsysdir=$withval
fi
]
)
AC_HELP_STRING([--with-baseport=PORT], [specify base port address for daemons]),
[
if test "x$withval" != "xno" ; then
- baseport=$withval
+ baseport=$withval
fi
]
)
AC_HELP_STRING([--with-dir-password=PASSWORD], [specify Director's password]),
[
if test "x$withval" != "xno" ; then
- dir_password=$withval
+ dir_password=$withval
fi
]
)
AC_HELP_STRING([--with-fd-password=PASSWORD], [specify Client's password]),
[
if test "x$withval" != "xno" ; then
- fd_password=$withval
+ fd_password=$withval
fi
]
)
AC_HELP_STRING([--with-sd-password=PASSWORD], [specify Storage daemon's password]),
[
if test "x$withval" != "xno" ; then
- sd_password=$withval
+ sd_password=$withval
fi
]
)
AC_HELP_STRING([--with-mon-dir-password=PASSWORD], [specify Director's password used by the monitor]),
[
if test "x$withval" != "xno" ; then
- mon_dir_password=$withval
+ mon_dir_password=$withval
fi
]
)
AC_HELP_STRING([--with-mon-fd-password=PASSWORD], [specify Client's password used by the monitor]),
[
if test "x$withval" != "xno" ; then
- mon_fd_password=$withval
+ mon_fd_password=$withval
fi
]
)
AC_HELP_STRING([--with-mon-sd-password=PASSWORD], [specify Storage daemon's password used by the monitor]),
[
if test "x$withval" != "xno" ; then
- mon_sd_password=$withval
+ mon_sd_password=$withval
fi
]
)
AC_HELP_STRING([--with-db-name=DBNAME], [specify database name @<:@default=bacula@:>@]),
[
if test "x$withval" != "x" ; then
- db_name=$withval
+ db_name=$withval
fi
]
)
AC_HELP_STRING([--with-db-user=UNAME], [specify database user @<:@default=bacula@:>@]),
[
if test "x$withval" != "x" ; then
- db_user=$withval
+ db_user=$withval
fi
]
)
AC_HELP_STRING([--with-db-password=PWD], [specify database password @<:@default=*none*@:>@]),
[
if test "x$withval" != "x" ; then
- db_password=$withval
+ db_password=$withval
fi
]
)
AC_HELP_STRING([--with-db-port=DBPORT], [specify a database port @<:@default=null@:>@]),
[
if test "x$withval" != "x" ; then
- db_port=$withval
+ db_port=$withval
fi
]
)
AC_HELP_STRING([--with-dir-user=USER], [specify user for Director daemon]),
[
if test "x$withval" != "x" ; then
- dir_user=$withval
+ dir_user=$withval
fi
]
)
AC_HELP_STRING([--with-dir-group=GROUP], [specify group for Director daemon]),
[
if test "x$withval" != "x" ; then
- dir_group=$withval
+ dir_group=$withval
fi
]
)
AC_HELP_STRING([--with-sd-user=USER], [specify user for Storage daemon]),
[
if test "x$withval" != "x" ; then
- sd_user=$withval
+ sd_user=$withval
fi
]
)
AC_HELP_STRING([--with-sd-group=GROUP], [specify group for Storage daemon]),
[
if test "x$withval" != "x" ; then
- sd_group=$withval
+ sd_group=$withval
fi
]
)
AC_HELP_STRING([--with-fd-user=USER], [specify user for File daemon]),
[
if test "x$withval" != "x" ; then
- fd_user=$withval
+ fd_user=$withval
fi
]
)
AC_HELP_STRING([--with-fd-group=GROUP], [specify group for File daemon]),
[
if test "x$withval" != "x" ; then
- fd_group=$withval
+ fd_group=$withval
fi
]
)
AC_HELP_STRING([--with-sbin-perm=MODE], [specify permissions for sbin binaries @<:@default=0754@:>@]),
[
if test "x$withval" != "x" ; then
- SBINPERM=$withval
+ SBINPERM=$withval
fi
]
)
AC_ARG_ENABLE(batch-insert,
AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]),
[
- if test x$enableval = xno; then
- support_batch_insert=no
- else
- support_batch_insert=yes
- fi
+ if test x$enableval = xno; then
+ support_batch_insert=no
+ else
+ support_batch_insert=yes
+ fi
]
)
fi
if test $DB_PROG = mysql; then
A=`test -f $SQL_LIB && nm $DB_PROG_LIB | grep pthread_mutex_lock`
- pkg=$?
+ pkg=$?
fi
if test $DB_PROG = sqlite3; then
if test $pkg = 0; then
AC_ARG_ENABLE(batch-insert,
- AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]),
- [
- if test x$enableval = xno; then
- support_batch_insert=no
- else
- support_batch_insert=yes
- fi
- ]
+ AC_HELP_STRING([--enable-batch-insert], [enable the DB batch insert code @<:@default=no@:>@]),
+ [
+ if test x$enableval = xno; then
+ support_batch_insert=no
+ else
+ support_batch_insert=yes
+ fi
+ ]
)
fi
else
sys/time.h \
sys/types.h \
arpa/nameser.h \
- resolv.h \
mtio.h \
sys/mtio.h \
sys/tape.h \
AC_CACHE_CHECK(for utime.h, ba_cv_header_utime_h,
[
AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- #include <utime.h>
- ], [
- struct utimbuf foo
- ], [
- ba_cv_header_utime_h=yes
- ], [
- ba_cv_header_utime_h=no
- ]
+ [
+ #include <sys/types.h>
+ #include <utime.h>
+ ], [
+ struct utimbuf foo
+ ], [
+ ba_cv_header_utime_h=yes
+ ], [
+ ba_cv_header_utime_h=no
+ ]
)
]
)
AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
[
AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- #include <sys/socket.h>
- ], [
- socklen_t x
- ], [
- ba_cv_header_socklen_t=yes
- ], [
- ba_cv_header_socklen_t=no
- ]
+ [
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ ], [
+ socklen_t x
+ ], [
+ ba_cv_header_socklen_t=yes
+ ], [
+ ba_cv_header_socklen_t=no
+ ]
)
]
)
test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
-dnl --------------------------------------------------------------------------
-dnl Check for bigendian
-dnl --------------------------------------------------------------------------
-AC_CACHE_CHECK([for bigendian], ba_cv_bigendian,
- [
- AC_TRY_RUN(
- [
- main(){long a=1L; char *p=(char *)&a; exit(*p);}
- ], [
- ba_cv_bigendian=yes
- ], [
- ba_cv_bigendian=no
- ], [
- ba_cv_bigendian=no
- ]
- )
- ]
-)
-test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
-
dnl --------------------------------------------------------------------------
dnl Check for typeof()
dnl --------------------------------------------------------------------------
AC_CACHE_CHECK(for typeof, ba_cv_have_typeof,
[
AC_TRY_RUN(
- [
- main(){char *a = 0; a = (typeof a)a;}
- ], [
- ba_cv_have_typeof=yes
- ], [
- ba_cv_have_typeof=no
- ], [
- ba_cv_have_typeof=no
- ]
+ [
+ main(){char *a = 0; a = (typeof a)a;}
+ ], [
+ ba_cv_have_typeof=yes
+ ], [
+ ba_cv_have_typeof=no
+ ], [
+ ba_cv_have_typeof=no
+ ]
)
]
)
if test $fstype = no; then
AC_TRY_CPP(
[
- #include <sys/statfs.h>
- #include <sys/fstyp.h>
+ #include <sys/statfs.h>
+ #include <sys/fstyp.h>
],
AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3
)
if test $fstype = no; then
AC_TRY_CPP(
[
- #include <sys/statfs.h>
- #include <sys/vmount.h>
+ #include <sys/statfs.h>
+ #include <sys/vmount.h>
],
AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX
)
if test $fstype = no; then
AC_TRY_CPP(
[
- #include <mntent.h>
+ #include <mntent.h>
],
AC_DEFINE(FSTYPE_MNTENT) fstype=4.3BSD
)
if test $fstype = no; then
AC_TRY_CPP(
[
- #include <sys/mount.h>
- #include <sys/fs_types.h>
+ #include <sys/mount.h>
+ #include <sys/fs_types.h>
],
AC_DEFINE(FSTYPE_GETMNT) fstype=Ultrix
)
AC_TYPE_SIZE_T
AC_TYPE_PID_T
AC_TYPE_OFF_T
+AC_TYPE_INTPTR_T
+AC_TYPE_UINTPTR_T
AC_CHECK_TYPE(ino_t, unsigned long)
AC_CHECK_TYPE(dev_t, unsigned long)
AC_CHECK_TYPE(daddr_t, long)
AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int,
[
AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- ], [
- u_int a; a = 1;
- ], [
- ac_cv_have_u_int="yes"
- ], [
- ac_cv_have_u_int="no"
- ]
+ [
+ #include <sys/types.h>
+ ], [
+ u_int a; a = 1;
+ ], [
+ ac_cv_have_u_int="yes"
+ ], [
+ ac_cv_have_u_int="no"
+ ]
)
]
)
AC_CACHE_CHECK([for intmax_t type], ac_cv_have_intmax_t,
[
AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- ], [
- intmax_t a; a = 1;
- ], [
- ac_cv_have_intmax_t="yes"
- ], [
- AC_TRY_COMPILE(
- [
- #include <stdint.h>
- ], [
- intmax_t a; a = 1;
- ], [
- ac_cv_have_intmax_t="yes"
- ], [
- ac_cv_have_intmax_t="no"
- ]
- )
- ]
+ [
+ #include <sys/types.h>
+ ], [
+ intmax_t a; a = 1;
+ ], [
+ ac_cv_have_intmax_t="yes"
+ ], [
+ AC_TRY_COMPILE(
+ [
+ #include <stdint.h>
+ ], [
+ intmax_t a; a = 1;
+ ], [
+ ac_cv_have_intmax_t="yes"
+ ], [
+ ac_cv_have_intmax_t="no"
+ ]
+ )
+ ]
)
]
)
AC_CACHE_CHECK([for u_intmax_t type], ac_cv_have_u_intmax_t,
[
AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- ], [
- u_intmax_t a; a = 1;
- ], [
- ac_cv_have_u_intmax_t="yes"
- ], [
- AC_TRY_COMPILE(
- [
- #include <stdint.h>
- ], [
- u_intmax_t a; a = 1;
- ], [
- ac_cv_have_u_intmax_t="yes"
- ], [
- ac_cv_have_u_intmax_t="no"
- ]
- )
- ]
+ [
+ #include <sys/types.h>
+ ], [
+ u_intmax_t a; a = 1;
+ ], [
+ ac_cv_have_u_intmax_t="yes"
+ ], [
+ AC_TRY_COMPILE(
+ [
+ #include <stdint.h>
+ ], [
+ u_intmax_t a; a = 1;
+ ], [
+ ac_cv_have_u_intmax_t="yes"
+ ], [
+ ac_cv_have_u_intmax_t="no"
+ ]
+ )
+ ]
)
]
)
AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t,
[
AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- ], [
- int8_t a; int16_t b; int32_t c; a = b = c = 1;
- ], [
- ac_cv_have_intxx_t="yes"
- ], [
- ac_cv_have_intxx_t="no"
- ]
+ [
+ #include <sys/types.h>
+ ], [
+ int8_t a; int16_t b; int32_t c; a = b = c = 1;
+ ], [
+ ac_cv_have_intxx_t="yes"
+ ], [
+ ac_cv_have_intxx_t="no"
+ ]
)
]
)
AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t,
[
AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- ], [
- int64_t a; a = 1;
- ], [
- ac_cv_have_int64_t="yes"
- ], [
- ac_cv_have_int64_t="no"
- ]
+ [
+ #include <sys/types.h>
+ ], [
+ int64_t a; a = 1;
+ ], [
+ ac_cv_have_int64_t="yes"
+ ], [
+ ac_cv_have_int64_t="no"
+ ]
)
]
)
AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t,
[
AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- ], [
- u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
- ], [
- ac_cv_have_u_intxx_t="yes"
- ], [
- ac_cv_have_u_intxx_t="no"
- ]
+ [
+ #include <sys/types.h>
+ ], [
+ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
+ ], [
+ ac_cv_have_u_intxx_t="yes"
+ ], [
+ ac_cv_have_u_intxx_t="no"
+ ]
)
]
)
AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t,
[
AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- ], [
- u_int64_t a; a = 1;
- ], [
- ac_cv_have_u_int64_t="yes"
- ], [
- ac_cv_have_u_int64_t="no"
- ]
+ [
+ #include <sys/types.h>
+ ], [
+ u_int64_t a; a = 1;
+ ], [
+ ac_cv_have_u_int64_t="yes"
+ ], [
+ ac_cv_have_u_int64_t="no"
+ ]
)
]
)
AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
AC_TRY_COMPILE(
[
- #include <sys/bitypes.h>
+ #include <sys/bitypes.h>
], [
- int8_t a; int16_t b; int32_t c;
- u_int8_t e; u_int16_t f; u_int32_t g;
- a = b = c = e = f = g = 1;
+ int8_t a; int16_t b; int32_t c;
+ u_int8_t e; u_int16_t f; u_int32_t g;
+ a = b = c = e = f = g = 1;
], [
- AC_DEFINE(HAVE_U_INTXX_T)
- AC_DEFINE(HAVE_INTXX_T)
- AC_DEFINE(HAVE_SYS_BITYPES_H)
- AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_U_INTXX_T)
+ AC_DEFINE(HAVE_INTXX_T)
+ AC_DEFINE(HAVE_SYS_BITYPES_H)
+ AC_MSG_RESULT(yes)
], [
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(no)
]
)
fi
if test -z "$have_u_intxx_t" ; then
AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t,
[
- AC_TRY_COMPILE(
- [
- #include <sys/types.h>
- ], [
- uint8_t a; uint16_t b;
- uint32_t c; a = b = c = 1;
- ], [
- ac_cv_have_uintxx_t="yes"
- ], [
- ac_cv_have_uintxx_t="no"
- ]
- )
+ AC_TRY_COMPILE(
+ [
+ #include <sys/types.h>
+ ], [
+ uint8_t a; uint16_t b;
+ uint32_t c; a = b = c = 1;
+ ], [
+ ac_cv_have_uintxx_t="yes"
+ ], [
+ ac_cv_have_uintxx_t="no"
+ ]
+ )
]
)
if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
AC_MSG_CHECKING([for int64_t and u_int64_t types in sys/bitypes.h])
AC_TRY_COMPILE(
[
- #include <sys/bitypes.h>
+ #include <sys/bitypes.h>
], [
- int64_t a; u_int64_t b;
- a = b = 1;
+ int64_t a; u_int64_t b;
+ a = b = 1;
], [
- AC_DEFINE(HAVE_U_INT64_T)
- AC_DEFINE(HAVE_INT64_T)
- AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_U_INT64_T)
+ AC_DEFINE(HAVE_INT64_T)
+ AC_MSG_RESULT(yes)
], [
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(no)
]
)
fi
AC_MSG_CHECKING([for uintXX_t types in sys/bitypes.h])
AC_TRY_COMPILE(
[
- #include <sys/bitypes.h>
+ #include <sys/bitypes.h>
], [
- uint8_t a; uint16_t b;
- uint32_t c; a = b = c = 1;
+ uint8_t a; uint16_t b;
+ uint32_t c; a = b = c = 1;
], [
- AC_DEFINE(HAVE_UINTXX_T)
- AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_UINTXX_T)
+ AC_MSG_RESULT(yes)
], [
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(no)
]
)
fi
AC_CACHE_CHECK(for va_copy, ba_cv_va_copy,
[
AC_TRY_LINK(
- [
- #include <stdarg.h>
- void use_va_copy(va_list args){va_list args2; va_copy(args2,args); va_end(args2);}
- void call_use_va_copy(int junk,...){va_list args; va_start(args,junk); use_va_copy(args); va_end(args);}
- ], [
- call_use_va_copy(1,2,3)
- ], [
- ba_cv_va_copy=yes,
- ], [
- ba_cv_va_copy=no
- ]
+ [
+ #include <stdarg.h>
+ void use_va_copy(va_list args){va_list args2; va_copy(args2,args); va_end(args2);}
+ void call_use_va_copy(int junk,...){va_list args; va_start(args,junk); use_va_copy(args); va_end(args);}
+ ], [
+ call_use_va_copy(1,2,3)
+ ], [
+ ba_cv_va_copy=yes,
+ ], [
+ ba_cv_va_copy=no
+ ]
)
]
)
AC_CACHE_CHECK(for struct sockaddr has a sa_len field, ac_cv_struct_sockaddr_sa_len,
[
AC_TRY_COMPILE(
- [
- #include <sys/socket.h>
- ], [
- struct sockaddr s; s.sa_len;
- ], [
- ac_cv_struct_sockaddr_sa_len=yes
- ], [ac_cv_struct_sockaddr_sa_len=no
- ]
+ [
+ #include <sys/socket.h>
+ ], [
+ struct sockaddr s; s.sa_len;
+ ], [
+ ac_cv_struct_sockaddr_sa_len=yes
+ ], [ac_cv_struct_sockaddr_sa_len=no
+ ]
)
]
)
AC_FUNC_ALLOCA
AC_FUNC_GETMNTENT
AC_FUNC_CLOSEDIR_VOID
-AC_FUNC_SETPGRP dnl check for BSD setpgrp.
+AC_FUNC_SETPGRP dnl check for BSD setpgrp.
# AC_FUNC_FNMATCH dnl use local version
AC_CHECK_LIB(intl, gettext, [LIBS="$LIBS -lintl"])
fi
dnl
-dnl Check for ACL libraries
+dnl Check for ACL support and libraries
dnl
+support_acl=auto
+AC_ARG_ENABLE(acl,
+ AC_HELP_STRING([--disable-acl], [disable acl support @<:@default=auto@:>@]),
+ [
+ if test x$enableval = xyes; then
+ support_acl=yes
+ elif test x$enableval = xno; then
+ support_acl=no
+ fi
+ ]
+)
+
have_acl=no
-AC_CHECK_HEADER(sys/acl.h)
-AC_CHECK_FUNC(acl_get_file, [have_acl=yes],
- [
- AC_CHECK_LIB(acl, acl_get_file,
- [
- have_acl=yes;
- FDLIBS="-lacl $FDLIBS"
- ], [
- AC_CHECK_LIB(sec, acltotext,
- [
- have_acl=yes;
- FDLIBS="-lsec $FDLIBS"
- ]
- )
- ]
- )
+have_extended_acl=no
+if test x$support_acl = xyes -o x$support_acl = xauto; then
+ AC_CHECK_HEADER(sys/acl.h, [ AC_DEFINE(HAVE_SYS_ACL_H,1,[Defines if your system have the sys/acl.h header file])] , )
+ AC_CHECK_FUNC(acl_get_file,
+ [
+ have_acl=yes
+ ], [
+ AC_CHECK_LIB(acl, acl_get_file,
+ [
+ have_acl=yes;
+ FDLIBS="-lacl $FDLIBS"
+ ], [
+ AC_CHECK_LIB(pacl, acl_get_file,
+ [
+ have_acl=yes;
+ FDLIBS="-lpacl $FDLIBS"
+ ], [
+ AC_CHECK_LIB(sec, acltotext,
+ [
+ have_acl=yes;
+ FDLIBS="-lsec $FDLIBS"
+
+ AC_CHECK_LIB(sec, acl_totext,
+ [
+ have_extended_acl=yes
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ ]
+ )
+
+ if test x$support_acl = xyes -a $have_acl != yes; then
+ AC_MSG_ERROR([acl support explicitly enabled but no supported acl implementation found,
+ please either load the acl libraries or rerun configure without --enable-acl])
+ else
+ if test $have_acl = yes; then
+ AC_DEFINE([HAVE_ACL],1,[Normal acl support])
+ fi
+
+ if test $have_extended_acl = yes; then
+ AC_DEFINE([HAVE_EXTENDED_ACL],1,[Extended acl support])
+ fi
+ fi
+fi
+
+dnl
+dnl Check for XATTR support
+dnl
+support_xattr=auto
+AC_ARG_ENABLE(xattr,
+ AC_HELP_STRING([--disable-xattr], [disable xattr support @<:@default=auto@:>@]),
+ [
+ if test x$enableval = xyes; then
+ support_xattr=yes
+ elif test x$enableval = xno; then
+ support_xattr=no
+ fi
]
)
-if test $have_acl = yes; then
- AC_DEFINE(HAVE_ACL)
+
+have_xattr=no
+if test x$support_xattr = xyes -o x$support_xattr = xauto; then
+ dnl
+ dnl First check for *BSD support
+ dnl
+ AC_CHECK_HEADER(sys/extattr.h, [ AC_DEFINE(HAVE_SYS_EXTATTR_H,1,[Defines if your system have the sys/extattr.h header file])] , )
+ AC_CHECK_HEADER(libutil.h, [ AC_DEFINE(HAVE_LIBUTIL_H,1,[Defines if your system have the libutil.h header file])] , )
+ AC_CHECK_FUNCS(extattr_get_link extattr_set_link extattr_list_link,
+ [
+ have_xattr=yes
+ AC_DEFINE([HAVE_EXTATTR_GET_LINK],1,[Define to 1 if you have the 'extattr_get_link' function.])
+ AC_DEFINE([HAVE_EXTATTR_SET_LINK],1,[Define to 1 if you have the 'extattr_set_link' function.])
+ AC_DEFINE([HAVE_EXTATTR_LIST_LINK],1,[Define to 1 if you have the 'extattr_list_link' function.])
+ ]
+ )
+
+ if test $have_xattr = no; then
+ AC_CHECK_FUNCS(extattr_get_file extattr_set_file extattr_list_file,
+ [
+ have_xattr=yes
+ AC_DEFINE([HAVE_EXTATTR_GET_FILE],1,[Define to 1 if you have the 'extattr_get_file' function.])
+ AC_DEFINE([HAVE_EXTATTR_SET_FILE],1,[Define to 1 if you have the 'extattr_set_file' function.])
+ AC_DEFINE([HAVE_EXTATTR_LIST_FILE],1,[Define to 1 if you have the 'extattr_list_file' function.])
+ ]
+ )
+ fi
+
+ if test $have_xattr = yes; then
+ have_extattr_string_in_libc=no
+ AC_CHECK_FUNCS(extattr_namespace_to_string extattr_string_to_namespace,
+ [
+ have_extattr_string_in_libc=yes
+ AC_DEFINE([HAVE_EXTATTR_NAMESPACE_TO_STRING],1,[Define to 1 if you have the 'extattr_namespace_to_string' function.])
+ AC_DEFINE([HAVE_EXTATTR_STRING_TO_NAMESPACE],1,[Define to 1 if you have the 'extattr_string_to_namespace' function.])
+ ]
+ )
+
+ dnl
+ dnl If extattr_namespace_to_string and extattr_string_to_namespace are not in libc see if they are in libutil
+ dnl
+ if test $have_extattr_string_in_libc = no; then
+ AC_CHECK_LIB(util, extattr_namespace_to_string extattr_string_to_namespace,
+ [
+ AC_DEFINE([HAVE_EXTATTR_NAMESPACE_TO_STRING],1,[Define to 1 if you have the 'extattr_namespace_to_string' function.])
+ AC_DEFINE([HAVE_EXTATTR_STRING_TO_NAMESPACE],1,[Define to 1 if you have the 'extattr_string_to_namespace' function.])
+ FDLIBS="-lutil $FDLIBS"
+ ]
+ )
+ fi
+ fi
+
+ dnl
+ dnl If we failed to find *BSD support try the Linux or OSX implementation of xattr
+ dnl
+ if test $have_xattr = no; then
+ AC_CHECK_HEADER(sys/xattr.h, [ AC_DEFINE(HAVE_SYS_XATTR_H,1,[Defines if your system have the sys/xattr.h header file])] , )
+ AC_CHECK_FUNCS(llistxattr lgetxattr lsetxattr,
+ [
+ have_xattr=yes
+ AC_DEFINE([HAVE_LLISTXATTR],1,[Define to 1 if you have the 'llistxattr' function.])
+ AC_DEFINE([HAVE_LGETXATTR],1,[Define to 1 if you have the 'lgetxattr' function.])
+ AC_DEFINE([HAVE_LSETXATTR],1,[Define to 1 if you have the 'lsetxattr' function.])
+ ]
+ )
+
+ if test $have_xattr = no; then
+ AC_CHECK_FUNCS(listxattr getxattr setxattr,
+ [
+ have_xattr=yes
+ AC_DEFINE([HAVE_LISTXATTR],1,[Define to 1 if you have the 'listxattr' function.])
+ AC_DEFINE([HAVE_GETXATTR],1,[Define to 1 if you have the 'getxattr' function.])
+ AC_DEFINE([HAVE_SETXATTR],1,[Define to 1 if you have the 'setxattr' function.])
+ ]
+ )
+ fi
+ fi
+
+ dnl
+ dnl If we failed to find *BSD support and the Linux or OSX implementation of xattr try the Solaris xattr implementation
+ dnl
+ if test $have_xattr = no; then
+ AC_CHECK_HEADER(sys/attr.h, [ AC_DEFINE(HAVE_SYS_ATTR_H,1,[Defines if your system have the sys/attr.h header file])] , )
+ AC_CHECK_HEADER(sys/nvpair.h, [ AC_DEFINE(HAVE_SYS_NVPAIR_H,1,[Defines if your system have the sys/nvpair.h header file])] , )
+ AC_CHECK_HEADER(attr.h, [ AC_DEFINE(HAVE_ATTR_H,1,[Defines if your system have the attr.h header file])] , )
+
+ AC_CHECK_FUNCS(openat fstatat unlinkat fchownat futimesat,
+ [
+ have_xattr=yes
+ AC_DEFINE([HAVE_OPENAT],1,[Define to 1 if you have the 'openat' function.])
+ AC_DEFINE([HAVE_FSTATAT],1,[Define to 1 if you have the 'fstatat' function.])
+ AC_DEFINE([HAVE_UNLINKAT],1,[Define to 1 if you have the 'unlinkat' function.])
+ AC_DEFINE([HAVE_FCHOWNAT],1,[Define to 1 if you have the 'fchownat' function.])
+ AC_DEFINE([HAVE_FUTIMESAT],1,[Define to 1 if you have the 'futimesat' function.])
+ ]
+ )
+
+ if test $have_xattr = yes; then
+ AC_CHECK_LIB(nvpair, nvlist_next_nvpair,
+ [
+ AC_DEFINE([HAVE_NVLIST_NEXT_NVPAIR],1,[Define to 1 if you have the 'nvlist_next_nvpair' function.])
+ FDLIBS="-lnvpair $FDLIBS"
+ ]
+ )
+ fi
+ fi
+
+ if test x$support_xattr = xyes -a $have_xattr != yes; then
+ AC_MSG_ERROR([xattr support explicitly enabled but no supported xattr implementation found,
+ please either load the xattr libraries or rerun configure without --enable-xattr])
+ else
+ if test $have_xattr = yes; then
+ AC_DEFINE([HAVE_XATTR],1,[Extended Attributes support])
+ fi
+ fi
fi
+dnl
dnl Check for pthread libraries
+dnl
PTHREAD_LIB=""
AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
[
AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
- [
- AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
- [
- AC_CHECK_FUNC(pthread_create)
- ]
- )
- ]
+ [
+ AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
+ [
+ AC_CHECK_FUNC(pthread_create)
+ ]
+ )
+ ]
)
]
)
+dnl
+dnl Check for headers, functions and libraries required to support
+dnl keeping readall capabilities
+dnl
+AC_CHECK_HEADERS(sys/prctl.h sys/capability.h)
+AC_CHECK_FUNCS(prctl setreuid)
+AC_CHECK_LIB([cap], [cap_set_proc], [CAP_LIBS="-lcap"], [CAP_LIBS=])
+if test x$CAP_LIBS = x-lcap; then
+ AC_DEFINE(HAVE_LIBCAP, 1, [Define if you have libcap])
+fi
+AC_SUBST(CAP_LIBS)
+
AC_SUBST(FDLIBS)
AC_DEFINE(FDLIBS)
PSCMD="ps -e"
WIN32=
MACOSX=
+
hostname=`uname -n | cut -d '.' -f 1`
if test x${hostname} = x ; then
hostname="localhost"
fi
+dnl Make sure hostname is resolved
+ping -c 1 $hostname 2>/dev/null 1>/dev/null
+if test ! $? = 0; then
+ hostname="localhost"
+fi
+
case "$DISTNAME" in
aix)
DISTVER=`uname -r`
PFILES="${PFILES} \
platforms/aix/Makefile"
TAPEDRIVE="/dev/rmt0.1"
- ;;
+ ;;
alpha)
DISTVER=`uname -r`
PTHREAD_LIB="-lpthread -lexc"
PFILES="${PFILES} \
platforms/darwin/Makefile"
;;
+osx)
+ DISTVER=`uname -r`
+ TAPEDRIVE="/dev/nst0"
+ PSCMD="ps -e -o pid,command"
+ MACOSX=macosx
+ PFILES="${PFILES} \
+ platforms/osx/Makefile"
+ ;;
debian)
- dnl Make sure hostname is resolved
- ping -c 1 $hostname 2>&1 1>/dev/null
- if test ! $? = 0; then
- hostname="localhost"
- fi
if `test -f /etc/apt/sources.list && grep -q ubuntu /etc/apt/sources.list`; then
DISTNAME="ubuntu"
fi
if test -f /etc/lsb-release ; then
. /etc/lsb-release
if test "x$DISTRIB_ID" != "x" ; then
- DISTNAME=$DISTRIB_ID
+ DISTNAME=$DISTRIB_ID
fi
if test "x$DISTRIB_RELEASE" != "x" ; then
- DISTVER=$DISTRIB_RELEASE
+ DISTVER=$DISTRIB_RELEASE
fi
fi
if test "$DISTNAME" = "Ubuntu" ; then
PSCMD="ps -e -o pid,command"
if test "$DISTNAME" = "ubuntu" ; then
PFILES="${PFILES} \
- platforms/ubuntu/Makefile \
- platforms/ubuntu/bacula-fd \
- platforms/ubuntu/bacula-sd \
- platforms/ubuntu/bacula-dir"
+ platforms/ubuntu/Makefile \
+ platforms/ubuntu/bacula-fd \
+ platforms/ubuntu/bacula-sd \
+ platforms/ubuntu/bacula-dir"
else
PFILES="${PFILES} \
- platforms/debian/Makefile \
- platforms/debian/bacula-fd \
- platforms/debian/bacula-sd \
- platforms/debian/bacula-dir"
+ platforms/debian/Makefile \
+ platforms/debian/bacula-fd \
+ platforms/debian/bacula-sd \
+ platforms/debian/bacula-dir"
fi
;;
freebsd)
- dnl Make sure hostname is resolved
- ping -c 1 $hostname 2>&1 1>/dev/null
- if test ! $? = 0; then
- hostname="localhost"
- fi
DISTVER=`uname -a |awk '{print $3}'`
VER=`echo $DISTVER | cut -c 1`
if test x$VER = x4 ; then
platforms/openbsd/bacula-dir"
;;
redhat)
- dnl Make sure hostname is resolved
- ping -c 1 $hostname 2>&1 1>/dev/null
- if test ! $? = 0; then
- hostname="localhost"
- fi
if test -f /etc/whitebox-release ; then
f=/etc/whitebox-release
else
f=/etc/redhat-release
fi
if test `cat $f | grep release |\
- cut -f 3 -d ' '`x = "Enterprise"x ; then
+ cut -f 3 -d ' '`x = "Enterprise"x ; then
DISTVER="Enterprise "`cat $f | grep release |\
- cut -f 6 -d ' '`
+ cut -f 6 -d ' '`
else
DISTVER=`cat /etc/redhat-release | grep release |\
- cut -f 5 -d ' '`
+ cut -f 5 -d ' '`
fi
TAPEDRIVE="/dev/nst0"
PSCMD="ps -e -o pid,command"
platforms/redhat/Makefile \
platforms/redhat/bacula-fd \
platforms/redhat/bacula-sd \
- platforms/redhat/bacula-dir \
- platforms/redhat/bacula.spec \
+ platforms/redhat/bacula-dir
"
;;
mandrake)
- dnl Make sure hostname is resolved
- ping -c 1 $hostname 2>&1 1>/dev/null
- if test ! $? = 0; then
- hostname="localhost"
- fi
DISTVER=`cat /etc/mandrake-release | grep release |\
cut -f 5 -d ' '`
TAPEDRIVE="/dev/nst0"
"
;;
gentoo)
- dnl Make sure hostname is resolved
- ping -c 1 $hostname 2>&1 1>/dev/null
- if test ! $? = 0; then
- hostname="localhost"
- fi
DISTVER=`awk '/version / {print $5}' < /etc/gentoo-release`
TAPEDRIVE="/dev/nst0"
PSCMD="ps -e -o pid,command"
platforms/gentoo/bacula-dir"
;;
slackware)
- dnl Make sure hostname is resolved
- ping -c 1 $hostname 2>&1 1>/dev/null
- if test ! $? = 0; then
- hostname="localhost"
- fi
DISTVER=`cat /etc/slackware-version`
TAPEDRIVE="/dev/nst0"
PSCMD="ps -e -o pid,command"
LIBS="$LIBS -lresolv"
;;
suse)
- dnl Make sure hostname is resolved
- ping -c 1 $hostname 2>&1 1>/dev/null
- if test ! $? = 0; then
- hostname="localhost"
- fi
DISTVER=`cat /etc/SuSE-release |grep VERSION|\
cut -f 3 -d ' '`
TAPEDRIVE="/dev/nst0"
platforms/suse/bacula.spec"
;;
suse5)
- dnl Make sure hostname is resolved
- ping -c 1 $hostname 2>&1 1>/dev/null
- if test ! $? = 0; then
- hostname="localhost"
- fi
DISTNAME=suse
DISTVER=5.x
TAPEDRIVE="/dev/nst0"
fi
AC_OUTPUT([autoconf/Make.common \
- Makefile \
- manpages/Makefile \
- scripts/startmysql \
- scripts/stopmysql \
- scripts/btraceback \
- scripts/startit \
- scripts/stopit \
- scripts/bconsole \
- scripts/gconsole \
- scripts/bacula \
- scripts/bacula-ctl-dir \
- scripts/bacula-ctl-fd \
- scripts/bacula-ctl-sd \
- scripts/devel_bacula \
- scripts/Makefile \
- scripts/logrotate \
- scripts/bacula.desktop.gnome1 \
- scripts/bacula.desktop.gnome2 \
- scripts/bacula.desktop.gnome1.consolehelper \
- scripts/bacula.desktop.gnome2.consolehelper \
- scripts/bacula.desktop.gnome1.xsu \
- scripts/bacula.desktop.gnome2.xsu \
- scripts/bgnome-console.console_apps \
- scripts/mtx-changer \
- scripts/disk-changer \
- scripts/dvd-handler \
- scripts/dvd-simulator \
- scripts/bacula-tray-monitor.desktop \
- scripts/logwatch/Makefile \
- scripts/logwatch/logfile.bacula.conf \
- scripts/wxconsole.console_apps \
- scripts/wxconsole.desktop.consolehelper \
- scripts/wxconsole.desktop.xsu \
- scripts/bat.desktop \
- scripts/bat.desktop.xsu \
- scripts/bat.desktop.consolehelper \
- scripts/bat.console_apps \
- src/Makefile \
- src/host.h \
- src/console/Makefile \
- src/console/bconsole.conf \
- src/gnome2-console/Makefile \
- src/gnome2-console/bgnome-console.conf \
- src/qt-console/bat.conf \
- src/qt-console/bat.pro \
- src/qt-console/bat.pro.mingw32 \
- src/qt-console/install_conf_file \
- src/wx-console/Makefile \
- src/wx-console/bwx-console.conf \
- src/tray-monitor/Makefile \
- src/tray-monitor/tray-monitor.conf \
- src/dird/Makefile \
- src/dird/bacula-dir.conf \
- src/lib/Makefile \
- src/stored/Makefile \
- src/stored/bacula-sd.conf \
- src/filed/Makefile \
- src/filed/bacula-fd.conf \
- src/cats/Makefile \
- src/cats/make_catalog_backup \
- src/cats/delete_catalog_backup \
- src/cats/create_postgresql_database \
- src/cats/update_postgresql_tables \
- src/cats/make_postgresql_tables \
- src/cats/grant_postgresql_privileges \
- src/cats/drop_postgresql_tables \
- src/cats/drop_postgresql_database \
- src/cats/create_mysql_database \
- src/cats/update_mysql_tables \
- src/cats/make_mysql_tables \
- src/cats/grant_mysql_privileges \
- src/cats/drop_mysql_tables \
- src/cats/drop_mysql_database \
- src/cats/create_sqlite_database \
- src/cats/update_sqlite_tables \
- src/cats/make_sqlite_tables \
- src/cats/grant_sqlite_privileges \
- src/cats/drop_sqlite_tables \
- src/cats/drop_sqlite_database \
- src/cats/create_sqlite3_database \
- src/cats/update_sqlite3_tables \
- src/cats/make_sqlite3_tables \
- src/cats/grant_sqlite3_privileges \
- src/cats/drop_sqlite3_tables \
- src/cats/drop_sqlite3_database \
- src/cats/sqlite \
- src/cats/mysql \
- src/cats/create_bdb_database \
- src/cats/update_bdb_tables \
- src/cats/make_bdb_tables \
- src/cats/grant_bdb_privileges \
- src/cats/drop_bdb_tables \
- src/cats/drop_bdb_database \
- src/cats/create_bacula_database \
- src/cats/update_bacula_tables \
- src/cats/grant_bacula_privileges \
- src/cats/make_bacula_tables \
- src/cats/drop_bacula_tables \
- src/cats/drop_bacula_database \
- src/findlib/Makefile \
- src/tools/Makefile \
- src/plugins/fd/Makefile \
- po/Makefile.in \
- updatedb/update_mysql_tables_10_to_11 \
- updatedb/update_sqlite3_tables_10_to_11 \
- updatedb/update_postgresql_tables_10_to_11 \
- updatedb/update_sqlite_tables_10_to_11 \
- $PFILES ],
+ Makefile \
+ manpages/Makefile \
+ scripts/startmysql \
+ scripts/stopmysql \
+ scripts/btraceback \
+ scripts/startit \
+ scripts/stopit \
+ scripts/bconsole \
+ scripts/gconsole \
+ scripts/bacula \
+ scripts/bacula-ctl-dir \
+ scripts/bacula-ctl-fd \
+ scripts/bacula-ctl-sd \
+ scripts/devel_bacula \
+ scripts/Makefile \
+ scripts/logrotate \
+ scripts/bacula.desktop.gnome1 \
+ scripts/bacula.desktop.gnome2 \
+ scripts/bacula.desktop.gnome1.consolehelper \
+ scripts/bacula.desktop.gnome2.consolehelper \
+ scripts/bacula.desktop.gnome1.xsu \
+ scripts/bacula.desktop.gnome2.xsu \
+ scripts/bgnome-console.console_apps \
+ scripts/mtx-changer \
+ scripts/disk-changer \
+ scripts/dvd-handler \
+ scripts/dvd-simulator \
+ scripts/bacula-tray-monitor.desktop \
+ scripts/logwatch/Makefile \
+ scripts/logwatch/logfile.bacula.conf \
+ scripts/wxconsole.console_apps \
+ scripts/wxconsole.desktop.consolehelper \
+ scripts/wxconsole.desktop.xsu \
+ scripts/bat.desktop \
+ scripts/bat.desktop.xsu \
+ scripts/bat.desktop.consolehelper \
+ scripts/bat.console_apps \
+ src/Makefile \
+ src/host.h \
+ src/console/Makefile \
+ src/console/bconsole.conf \
+ src/qt-console/bat.conf \
+ src/qt-console/bat.pro \
+ src/qt-console/bat.pro.mingw32 \
+ src/qt-console/install_conf_file \
+ src/wx-console/Makefile \
+ src/wx-console/bwx-console.conf \
+ src/tray-monitor/Makefile \
+ src/tray-monitor/tray-monitor.conf \
+ src/dird/Makefile \
+ src/dird/bacula-dir.conf \
+ src/lib/Makefile \
+ src/stored/Makefile \
+ src/stored/bacula-sd.conf \
+ src/filed/Makefile \
+ src/filed/bacula-fd.conf \
+ src/cats/Makefile \
+ src/cats/make_catalog_backup \
+ src/cats/delete_catalog_backup \
+ src/cats/create_postgresql_database \
+ src/cats/update_postgresql_tables \
+ src/cats/make_postgresql_tables \
+ src/cats/grant_postgresql_privileges \
+ src/cats/drop_postgresql_tables \
+ src/cats/drop_postgresql_database \
+ src/cats/create_mysql_database \
+ src/cats/update_mysql_tables \
+ src/cats/make_mysql_tables \
+ src/cats/grant_mysql_privileges \
+ src/cats/drop_mysql_tables \
+ src/cats/drop_mysql_database \
+ src/cats/create_sqlite_database \
+ src/cats/update_sqlite_tables \
+ src/cats/make_sqlite_tables \
+ src/cats/grant_sqlite_privileges \
+ src/cats/drop_sqlite_tables \
+ src/cats/drop_sqlite_database \
+ src/cats/create_sqlite3_database \
+ src/cats/update_sqlite3_tables \
+ src/cats/make_sqlite3_tables \
+ src/cats/grant_sqlite3_privileges \
+ src/cats/drop_sqlite3_tables \
+ src/cats/drop_sqlite3_database \
+ src/cats/sqlite \
+ src/cats/mysql \
+ src/cats/create_bdb_database \
+ src/cats/update_bdb_tables \
+ src/cats/make_bdb_tables \
+ src/cats/grant_bdb_privileges \
+ src/cats/drop_bdb_tables \
+ src/cats/drop_bdb_database \
+ src/cats/create_bacula_database \
+ src/cats/update_bacula_tables \
+ src/cats/grant_bacula_privileges \
+ src/cats/make_bacula_tables \
+ src/cats/drop_bacula_tables \
+ src/cats/drop_bacula_database \
+ src/findlib/Makefile \
+ src/tools/Makefile \
+ src/plugins/fd/Makefile \
+ src/plugins/sd/Makefile \
+ src/plugins/dir/Makefile \
+ src/win32/Makefile.inc \
+ po/Makefile.in \
+ updatedb/update_mysql_tables_9_to_10 \
+ updatedb/update_sqlite3_tables_9_to_10 \
+ updatedb/update_postgresql_tables_9_to_10 \
+ updatedb/update_sqlite_tables_9_to_10 \
+ updatedb/update_mysql_tables_10_to_11 \
+ updatedb/update_sqlite3_tables_10_to_11 \
+ updatedb/update_postgresql_tables_10_to_11 \
+ updatedb/update_sqlite_tables_10_to_11 \
+ $PFILES ],
[ ]
)
if test "${support_bat}" = "yes" ; then
if test "x$QMAKE" = "xnone" && test "x$QMAKEQT4" = "xnone"; then
- echo "Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation"
- exit 1
+ AC_MSG_ERROR([Could not find qmake or qmake-qt4 in $PATH. Check your Qt installation])
fi
QMAKEBIN="qmake"
fi
cd src/qt-console
- chmod 755 install_conf_file build-depkgs-qt-console
echo "Creating bat Makefile"
+ touch bat
+ chmod 755 bat
$QMAKEBIN
- make clean
+ ${MAKE:-make} clean
cd ${BUILD_DIR}
fi
${MAKE:-make} depend
fi
+cd src/qt-console
+chmod 755 install_conf_file build-depkgs-qt-console
+cd ${BUILD_DIR}
+
cd scripts
chmod 755 startmysql stopmysql bacula startit stopit btraceback mtx-changer
chmod 755 dvd-handler dvd-simulator
c=updatedb
chmod 755 $c/update_mysql_tables_10_to_11 $c/update_sqlite3_tables_10_to_11
-chmod 755 $c/update_postgresql_tables_10_to_11 $c/update_sqlite_tables_10_to_11
+chmod 755 $c/update_postgresql_tables_10_to_11 $c/update_sqlite_tables_10_to_11
c=src/cats
chmod 755 $c/grant_sqlite_privileges $c/drop_sqlite_tables $c/drop_sqlite_database
chmod 755 $c/create_sqlite3_database $c/update_sqlite3_tables $c/make_sqlite3_tables
-chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
+chmod 755 $c/grant_sqlite3_privileges $c/drop_sqlite3_tables $c/drop_sqlite3_database
chmod 755 $c/create_postgresql_database $c/update_postgresql_tables $c/make_postgresql_tables
chmod 755 $c/grant_postgresql_privileges $c/drop_postgresql_tables $c/drop_postgresql_database
if test X"$GCC" = "Xyes" ; then
dnl
dnl A whole lot of hand springs to get the compiler version.
- dnl This is because gcc changed the output in version 3.0
+ dnl This is because gcc changed the output in version 3.0
dnl
CCVERSION=`${CC} --version | tr '\n' ' ' | cut -f 3 -d ' '`
if test "x${CCVERSION}" = "x" ; then
fi
fi
+# clean up any old junk
+echo " "
+echo "Cleaning up"
+echo " "
+${MAKE:-make} clean
+
if test "x${db_type}" = "xInternal" ; then
echo " "
echo " "
echo "
Configuration on `date`:
- Host: ${host}${post_host} -- ${DISTNAME} ${DISTVER}
- Bacula version: ${BACULA} ${VERSION} (${DATE})
+ Host: ${host}${post_host} -- ${DISTNAME} ${DISTVER}
+ Bacula version: ${BACULA} ${VERSION} (${DATE})
Source code location: ${srcdir}
- Install binaries: ${sbindir}
- Install libraries: ${libdir}
+ Install binaries: ${sbindir}
+ Install libraries: ${libdir}
Install config files: ${sysconfdir}
- Scripts directory: ${scriptdir}
- Archive directory: ${archivedir}
- Working directory: ${working_dir}
- PID directory: ${piddir}
- Subsys directory: ${subsysdir}
- Man directory: ${mandir}
- Data directory: ${datarootdir}
- C Compiler: ${CC} ${CCVERSION}
- C++ Compiler: ${CXX} ${CXXVERSION}
- Compiler flags: ${WCFLAGS} ${CFLAGS}
- Linker flags: ${WLDFLAGS} ${LDFLAGS}
- Libraries: ${LIBS}
+ Scripts directory: ${scriptdir}
+ Archive directory: ${archivedir}
+ Working directory: ${working_dir}
+ PID directory: ${piddir}
+ Subsys directory: ${subsysdir}
+ Man directory: ${mandir}
+ Data directory: ${datarootdir}
+ Plugin directory: ${plugindir}
+ C Compiler: ${CC} ${CCVERSION}
+ C++ Compiler: ${CXX} ${CXXVERSION}
+ Compiler flags: ${WCFLAGS} ${CFLAGS}
+ Linker flags: ${WLDFLAGS} ${LDFLAGS}
+ Libraries: ${LIBS}
Statically Linked Tools: ${support_static_tools}
Statically Linked FD: ${support_static_fd}
Statically Linked SD: ${support_static_sd}
Statically Linked DIR: ${support_static_dir}
Statically Linked CONS: ${support_static_cons}
- Database type: ${db_type}
- Database port: ${db_port}
- Database lib: ${DB_LIBS}
- Database name: ${db_name}
- Database user: ${db_user}
+ Database type: ${db_type}
+ Database port: ${db_port}
+ Database lib: ${DB_LIBS}
+ Database name: ${db_name}
+ Database user: ${db_user}
- Job Output Email: ${job_email}
- Traceback Email: ${dump_email}
- SMTP Host Address: ${smtp_host}
+ Job Output Email: ${job_email}
+ Traceback Email: ${dump_email}
+ SMTP Host Address: ${smtp_host}
- Director Port: ${dir_port}
- File daemon Port: ${fd_port}
+ Director Port: ${dir_port}
+ File daemon Port: ${fd_port}
Storage daemon Port: ${sd_port}
- Director User: ${dir_user}
- Director Group: ${dir_group}
+ Director User: ${dir_user}
+ Director Group: ${dir_group}
Storage Daemon User: ${sd_user}
Storage DaemonGroup: ${sd_group}
- File Daemon User: ${fd_user}
- File Daemon Group: ${fd_group}
+ File Daemon User: ${fd_user}
+ File Daemon Group: ${fd_group}
SQL binaries Directory ${SQL_BINDIR}
- Large file support: $largefile_support
+ Large file support: $largefile_support
Bacula conio support: ${got_conio} ${CONS_LIBS}
- readline support: ${got_readline} ${PRTREADLINE_SRC}
+ readline support: ${got_readline} ${PRTREADLINE_SRC}
TCP Wrappers support: ${TCPW_MSG} ${WRAPLIBS}
- TLS support: ${support_tls}
- Encryption support: ${support_crypto}
- ZLIB support: ${have_zlib}
- enable-smartalloc: ${support_smartalloc}
- bat support: ${support_bat} ${QWT_LDFLAGS}
- enable-gnome: ${support_gnome} ${gnome_version}
- enable-bwx-console: ${support_wx_console} ${wx_version}
+ TLS support: ${support_tls}
+ Encryption support: ${support_crypto}
+ ZLIB support: ${have_zlib}
+ enable-smartalloc: ${support_smartalloc}
+ enable-lockmgr: ${support_lockmgr}
+ bat support: ${support_bat} ${QWT_LDFLAGS}
+ enable-gnome: ${support_gnome} ${gnome_version}
+ enable-bwx-console: ${support_wx_console} ${wx_version}
enable-tray-monitor: ${support_tray_monitor}
- client-only: ${build_client_only}
- build-dird: ${build_dird}
- build-stored: ${build_stored}
- ACL support: ${have_acl}
- Python support: ${support_python} ${PYTHON_LIBS}
+ client-only: ${build_client_only}
+ build-dird: ${build_dird}
+ build-stored: ${build_stored}
+ ACL support: ${have_acl}
+ XATTR support: ${have_xattr}
+ Python support: ${support_python} ${PYTHON_LIBS}
Batch insert enabled: ${support_batch_insert}
" > config.out