mirror of
https://github.com/uroni/urbackup_backend.git
synced 2025-10-26 11:36:50 +00:00
116 lines
3.1 KiB
Plaintext
116 lines
3.1 KiB
Plaintext
# -*- Autoconf -*-
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
AC_PREREQ(2.61)
|
|
AC_INIT([urbackup-server], [1.4.8.BUILDID], [martin@urbackup.org])
|
|
AC_CONFIG_SRCDIR([AcceptThread.cpp])
|
|
AC_CONFIG_HEADER([config.h])
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
AM_INIT_AUTOMAKE
|
|
AC_ARG_WITH([mail],
|
|
AS_HELP_STRING([--without-mail], [Disables server mailing features. Use this to remove the dependency on libcurl.]))
|
|
AC_ARG_WITH([crypto],
|
|
AS_HELP_STRING([--without-crypto], [Disables cryptography functions. Internet mode will not be available. Use this to remove the dependency on libcrypto++.]))
|
|
AC_ARG_ENABLE([install_initd],
|
|
AS_HELP_STRING([--enable-install_initd], [Enables installing of supplied init.d file into /etc/init.d]))
|
|
AC_ARG_ENABLE([packaging],
|
|
AS_HELP_STRING([--enable-packaging], [Will be installed for packaging.]))
|
|
AC_ARG_WITH([mountvhd],
|
|
AS_HELP_STRING([--with-mountvhd], [Enable mounting of VHD files via fuse.]))
|
|
|
|
AC_ARG_ENABLE([fortify],
|
|
AS_HELP_STRING([--disable-fortify], [Disable GCC/runtime fortification]))
|
|
AM_CONDITIONAL(WITH_FORTIFY, test "x$enable_fortify" != xno)
|
|
|
|
|
|
|
|
# Checks for programs.
|
|
AC_PROG_CXX
|
|
AC_PROG_CC
|
|
|
|
#AX_BOOST_BASE([1.38.0])
|
|
#AX_BOOST_THREAD
|
|
|
|
#if !($HAVE_BOOST_THREAD)
|
|
#then
|
|
# echo "Sorry, you need the Thread-Lib from Boost."
|
|
# echo "Please install from http://www.boost.org"
|
|
# exit 1
|
|
#fi
|
|
|
|
AX_PTHREAD
|
|
if !($HAVE_PTHREAD)
|
|
then
|
|
echo "Sorry, your system needs the pthread library."
|
|
echo "Either install it or give up."
|
|
exit 1
|
|
fi
|
|
|
|
# Checks for libraries.
|
|
|
|
# Checks for header files.
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS([pthread.h arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h sys/socket.h sys/time.h unistd.h])
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
AC_HEADER_STDBOOL
|
|
AC_C_CONST
|
|
AC_C_INLINE
|
|
AC_TYPE_SIZE_T
|
|
AC_HEADER_TIME
|
|
AC_STRUCT_TM
|
|
|
|
AX_LIB_SOCKET_NSL
|
|
|
|
AC_MSG_CHECKING([for operating system])
|
|
case "$host_os" in
|
|
freebsd*)
|
|
opsys="freebsd"
|
|
;;
|
|
linux*)
|
|
opsys="linux"
|
|
;;
|
|
*)
|
|
opsys=""
|
|
;;
|
|
esac
|
|
AM_CONDITIONAL([FREEBSD], test x"$opsys" = x"freebsd")
|
|
AM_CONDITIONAL([LINUX], test x"$opsys" = x"linux")
|
|
|
|
# Checks for library functions.
|
|
AC_FUNC_SELECT_ARGTYPES
|
|
AC_FUNC_STRFTIME
|
|
AC_CHECK_FUNCS([gettimeofday memset select socket strstr])
|
|
AC_CHECK_LIB(dl, dlopen, [DLOPEN_LIBS="-ldl"])
|
|
AC_SUBST([DLOPEN_LIBS])
|
|
|
|
P_SUBDIRS="snapshot_helper fsimageplugin httpserver urbackupserver"
|
|
|
|
AS_IF([test "x$with_mail" != "xno"],
|
|
[P_SUBDIRS="urlplugin $P_SUBDIRS"])
|
|
AS_IF([test "x$with_crypto" != "xno"],
|
|
[P_SUBDIRS="cryptoplugin $P_SUBDIRS"])
|
|
AS_IF([test "x$with_mountvhd" = "xyes"],
|
|
[P_SUBDIRS="fuseplugin $P_SUBDIRS"])
|
|
|
|
AC_SUBST([P_SUBDIRS])
|
|
|
|
if test "x$with_crypto" != "xno"; then
|
|
AC_CONFIG_SUBDIRS([cryptoplugin])
|
|
fi
|
|
|
|
if test "x$with_mail" != "xno"; then
|
|
AC_CONFIG_SUBDIRS([urlplugin])
|
|
fi
|
|
|
|
if test "x$with_mountvhd" = "xyes"; then
|
|
AC_CONFIG_SUBDIRS([fuseplugin])
|
|
fi
|
|
|
|
AM_CONDITIONAL(PACKAGING, test "x$enable_packaging" = xyes)
|
|
AM_CONDITIONAL(INSTALL_INITD, test "x$enable_install_initd" = xyes)
|
|
|
|
AC_CONFIG_SUBDIRS([snapshot_helper fsimageplugin httpserver urbackupserver])
|
|
AC_CONFIG_FILES([Makefile])
|
|
AC_OUTPUT
|