mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 10:50:01 +01:00
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@147 36d66b0a-2a48-0410-832c-cd162a569da5
123 lines
3.3 KiB
Plaintext
123 lines
3.3 KiB
Plaintext
AC_PREREQ(2.57)
|
|
AC_INIT(cryptsetup,1.1.0-rc3)
|
|
AC_CONFIG_SRCDIR(src/cryptsetup.c)
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
AM_CONFIG_HEADER([config.h:config.h.in])
|
|
AM_INIT_AUTOMAKE(dist-bzip2)
|
|
|
|
if test "x$prefix" = "xNONE"; then
|
|
sysconfdir=/etc
|
|
fi
|
|
AC_PREFIX_DEFAULT(/usr)
|
|
|
|
AC_CANONICAL_HOST
|
|
AC_GNU_SOURCE
|
|
AC_PROG_CC
|
|
AM_PROG_CC_C_O
|
|
AC_PROG_CPP
|
|
AC_PROG_INSTALL
|
|
AC_PROG_MAKE_SET
|
|
AC_ENABLE_STATIC(no)
|
|
AM_PROG_LIBTOOL
|
|
|
|
AC_HEADER_DIRENT
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS(fcntl.h malloc.h inttypes.h sys/ioctl.h sys/mman.h \
|
|
ctype.h unistd.h locale.h)
|
|
|
|
AC_CHECK_HEADERS(uuid/uuid.h,,[AC_MSG_ERROR('You need the uuid library')])
|
|
AC_CHECK_HEADER(libdevmapper.h,,[AC_MSG_ERROR('You need the device-mapper library')])
|
|
|
|
saved_LIBS=$LIBS
|
|
AC_CHECK_LIB(uuid, uuid_clear, ,[AC_MSG_ERROR('You need the uuid library')])
|
|
AC_SUBST(UUID_LIBS, $LIBS)
|
|
LIBS=$saved_LIBS
|
|
|
|
|
|
AM_PATH_LIBGCRYPT(1.1.42,,[AC_MSG_ERROR('You need the gcrypt library')])
|
|
|
|
AC_CHECK_FUNCS([setlocale, posix_memalign])
|
|
|
|
AC_C_CONST
|
|
AC_C_BIGENDIAN
|
|
AC_TYPE_OFF_T
|
|
AC_STRUCT_ST_RDEV
|
|
AC_SYS_LARGEFILE
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
dnl ==========================================================================
|
|
|
|
AM_GNU_GETTEXT([external],[need-ngettext])
|
|
AM_GNU_GETTEXT_VERSION([0.15])
|
|
|
|
dnl ==========================================================================
|
|
|
|
saved_LIBS=$LIBS
|
|
AC_CHECK_LIB(popt, poptConfigFileToString,,
|
|
[AC_MSG_ERROR([You need popt 1.7 or newer to compile.])])
|
|
AC_SUBST(POPT_LIBS, $LIBS)
|
|
LIBS=$saved_LIBS
|
|
|
|
dnl ==========================================================================
|
|
|
|
AC_ARG_ENABLE(shared-library,
|
|
[ --disable-shared-library
|
|
disable building of shared cryptsetup library],,
|
|
enable_shared_library=yes)
|
|
AM_CONDITIONAL(STATIC_LIBRARY, test x$enable_shared_library = xno)
|
|
|
|
AC_ARG_ENABLE(selinux,
|
|
[ --disable-selinux disable selinux support [[default=auto]]],[], [])
|
|
|
|
saved_LIBS=$LIBS
|
|
AC_CHECK_LIB(devmapper, dm_task_set_name,,[AC_MSG_ERROR('You need the device-mapper library')])
|
|
DEVMAPPER_LIBS=$LIBS
|
|
LIBS=$saved_LIBS
|
|
if test "x$enable_selinux" != xno; then
|
|
AC_CHECK_LIB(sepol, sepol_bool_set)
|
|
AC_CHECK_LIB(selinux, is_selinux_enabled)
|
|
if test x$enable_static = xyes; then
|
|
SELINUX_STATIC_LIBS=$LIBS
|
|
# Check if we need -pthread with --enable-static and selinux
|
|
saved_LIBS2=$LIBS
|
|
LIBS="$LIBS -static"
|
|
AC_SEARCH_LIBS([pthread_mutex_lock], [pthread],
|
|
[test "$ac_cv_search_pthread_mutex_lock" = "none required" || LIB_PTHREAD=-lpthread])
|
|
LIBS=$saved_LIBS2
|
|
fi
|
|
fi
|
|
|
|
if test x$enable_static = xyes; then
|
|
saved_LIBS2=$LIBS
|
|
LIBS="$LIBS -static"
|
|
# Check if it there is still not some missing dependency like static selinux libs
|
|
AC_SEARCH_LIBS([dm_set_selinux_context], [devmapper],,
|
|
[AC_MSG_ERROR([Your system requires SElinux libraries for static compilation.])])
|
|
LIBS=$saved_LIBS2
|
|
fi
|
|
|
|
LIBS=$saved_LIBS
|
|
|
|
DEVMAPPER_LIBS="$DEVMAPPER_LIBS $LIB_PTHREAD"
|
|
AC_SUBST(DEVMAPPER_LIBS)
|
|
AC_SUBST(SELINUX_STATIC_LIBS)
|
|
|
|
dnl ==========================================================================
|
|
|
|
AM_CONDITIONAL(STATIC_CRYPTSETUP, test x$enable_static = xyes)
|
|
AM_CONDITIONAL(DYNAMIC_CRYPTSETUP, test x$enable_static = xno)
|
|
|
|
dnl ==========================================================================
|
|
|
|
AC_OUTPUT([ Makefile
|
|
lib/Makefile
|
|
lib/libcryptsetup.pc
|
|
src/Makefile
|
|
po/Makefile.in
|
|
luks/Makefile
|
|
man/Makefile
|
|
tests/Makefile
|
|
])
|