[
if test x$enableval = xyes; then
if test x$use_libtool = xyes; then
- echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
- exit 1
+ AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
+ please rerun configure with --disable-libtool])
fi
support_static_tools=yes
fi
[
if test x$enableval = xyes; then
if test x$use_libtool = xyes; then
- echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
- exit 1
+ AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
+ please rerun configure with --disable-libtool])
fi
support_static_fd=yes
fi
[
if test x$enableval = xyes; then
if test x$use_libtool = xyes; then
- echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
- exit 1
+ AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
+ please rerun configure with --disable-libtool])
fi
support_static_sd=yes
fi
[
if test x$enableval = xyes; then
if test x$use_libtool = xyes; then
- echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
- exit 1
+ AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
+ please rerun configure with --disable-libtool])
fi
support_static_dir=yes
fi
[
if test x$enableval = xyes; then
if test x$use_libtool = xyes; then
- echo "Libtool is enabled, not compatible with static tools, please rerun configure with --disable-libtool"
- exit 1
+ AC_MSG_ERROR([Libtool is enabled, not compatible with static tools,
+ please rerun configure with --disable-libtool])
fi
support_static_cons=yes
fi
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 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}"
+ 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
- break
- fi
+ done
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"
+ 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
- PYTHON_LIBS="-L$prefix/lib/config -lpython"
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Unable to find Python.h in standard locations)
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
+ 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
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)
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]),
[
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
dnl Check for ACL support and libraries
dnl
-support_acl=yes
+support_acl=auto
AC_ARG_ENABLE(acl,
AC_HELP_STRING([--disable-acl], [disable acl support @<:@default=auto@:>@]),
[
- if test x$enableval = xno; then
+ if test x$enableval = xyes; then
+ support_acl=yes
+ elif test x$enableval = xno; then
support_acl=no
fi
]
have_acl=no
have_extended_acl=no
-if test x$support_acl = xyes; then
+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,
[
)
]
)
- if test $have_acl = yes; then
- AC_DEFINE([HAVE_ACL], [], [Normal attribute support])
- fi
- if test $have_extended_acl = yes; then
- AC_DEFINE([HAVE_EXTENDED_ACL], [], [Extended attribute support])
+ 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], [], [Normal attribute support])
+ fi
+
+ if test $have_extended_acl = yes; then
+ AC_DEFINE([HAVE_EXTENDED_ACL], [], [Extended attribute support])
+ fi
fi
fi
dnl
dnl Check for XATTR support
dnl
-support_xattr=yes
+support_xattr=auto
AC_ARG_ENABLE(xattr,
AC_HELP_STRING([--disable-xattr], [disable xattr support @<:@default=auto@:>@]),
[
- if test x$enableval = xno; then
+ if test x$enableval = xyes; then
+ support_xattr=yes
+ elif test x$enableval = xno; then
support_xattr=no
fi
]
)
have_xattr=no
-if test x$support_xattr = xyes; then
+if test x$support_xattr = xyes -o x$support_xattr = xauto; 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,
[
fi
fi
- if test $have_xattr = yes; then
- AC_DEFINE([HAVE_XATTR], [], [XATTR support])
+ 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-xatt])
+ else
+ if test $have_xattr = yes; then
+ AC_DEFINE([HAVE_XATTR], [], [XATTR support])
+ fi
fi
fi
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`
platforms/darwin/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
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
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"
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"
cd src/qt-console
echo "Creating bat Makefile"
+ touch bat
+ chmod 755 bat
$QMAKEBIN
make clean
cd ${BUILD_DIR}