2 AC_INIT(cryptsetup,1.0.6)
3 AC_CONFIG_SRCDIR(src/cryptsetup.c)
5 AM_CONFIG_HEADER([config.h:config.h.in])
6 AM_INIT_AUTOMAKE(dist-bzip2)
8 if test "x$prefix" = "xNONE"; then
11 AC_PREFIX_DEFAULT(/usr)
25 AC_CHECK_HEADERS(fcntl.h malloc.h inttypes.h sys/ioctl.h sys/mman.h \
26 ctype.h unistd.h locale.h)
28 AC_CHECK_HEADERS(uuid/uuid.h,,[AC_MSG_ERROR('You need the uuid library (from e2fsprogs)')])
31 AC_CHECK_LIB(uuid, uuid_clear, ,[AC_MSG_ERROR('You need the uuid library (from e2fsprogs)')])
36 AC_CHECK_FUNCS(setlocale)
45 AC_PROG_GCC_TRADITIONAL
47 dnl ==========================================================================
49 AM_GNU_GETTEXT([external],[need-ngettext])
50 AM_GNU_GETTEXT_VERSION([0.15])
52 dnl ==========================================================================
55 AC_CHECK_LIB(popt, poptConfigFileToString,,
56 AC_MSG_ERROR([You need popt 1.7 or newer to compile.]))
61 dnl ==========================================================================
63 AC_ARG_ENABLE(shared-library,
64 [ --disable-shared-library
65 disable building of shared cryptsetup library],,
66 enable_shared_library=yes)
67 AM_CONDITIONAL(STATIC_LIBRARY, test x$enable_shared_library = xno)
69 AC_ARG_ENABLE(plugins,
70 [ --enable-plugins disable shared library plugins],,enable_plugins=no)
71 if test "x$enable_plugins" = xyes; then
72 AC_DEFINE(USE_PLUGINS, 1, [Define if you wish to use the plugin loader])
77 --with-MODULE[[=shared]] builds the module MODULE as a shared library plugin
81 [ --disable-all disable all modules built by default],,enable_all=default)
83 MODULE_HELPER(libgcrypt,
84 [ --enable-libgcrypt enable libgcrypt crypto functions [[default=auto]]],auto,[
85 AM_PATH_LIBGCRYPT(1.1.42,have_module=yes)
87 AM_CONDITIONAL(BUILD_LIBGCRYPT, test x$build_static = xyes)
88 AM_CONDITIONAL(SHARED_LIBGCRYPT, test x$build_shared = xyes)
90 MODULE_HELPER(libdevmapper,
91 [ --enable-libdevmapper enable dm-crypt backend through libdevmapper
92 [[default=auto]]],auto,[
95 AC_CHECK_LIB(sepol, sepol_bool_set)
96 AC_CHECK_LIB(selinux, is_selinux_enabled)
97 AC_CHECK_LIB(devmapper, dm_task_set_name,,unset have_module)
98 AC_CHECK_HEADER(libdevmapper.h,,unset have_module)
99 LIBDEVMAPPER_LIBS="$LIBS"
101 AC_SUBST(LIBDEVMAPPER_LIBS)
102 AC_SUBST(LIBDEVMAPPER_CFLAGS)
104 AM_CONDITIONAL(BUILD_LIBDEVMAPPER, test x$build_static = xyes)
105 AM_CONDITIONAL(SHARED_LIBDEVMAPPER, test x$build_shared = xyes)
107 dnl ==========================================================================
109 AM_CONDITIONAL(STATIC_CRYPTSETUP, test x$enable_static = xyes)
110 AM_CONDITIONAL(DYNAMIC_CRYPTSETUP, test x$enable_static = xno)
112 dnl ==========================================================================