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 GETTEXT_PACKAGE=cryptsetup
50 AC_SUBST(GETTEXT_PACKAGE)
51 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
52 [Definition for the gettext package name])
54 AM_GNU_GETTEXT([external],[need-ngettext])
55 AM_GNU_GETTEXT_VERSION([0.15])
57 dnl ==========================================================================
60 AC_CHECK_LIB(popt, poptConfigFileToString,,
61 AC_MSG_ERROR([You need popt 1.7 or newer to compile.]))
66 dnl ==========================================================================
68 AC_ARG_ENABLE(shared-library,
69 [ --disable-shared-library
70 disable building of shared cryptsetup library],,
71 enable_shared_library=yes)
72 AM_CONDITIONAL(STATIC_LIBRARY, test x$enable_shared_library = xno)
74 AC_ARG_ENABLE(plugins,
75 [ --enable-plugins disable shared library plugins],,enable_plugins=no)
76 if test "x$enable_plugins" = xyes; then
77 AC_DEFINE(USE_PLUGINS, 1, [Define if you wish to use the plugin loader])
82 --with-MODULE[[=shared]] builds the module MODULE as a shared library plugin
86 [ --disable-all disable all modules built by default],,enable_all=default)
88 MODULE_HELPER(libgcrypt,
89 [ --enable-libgcrypt enable libgcrypt crypto functions [[default=auto]]],auto,[
90 AM_PATH_LIBGCRYPT(1.1.42,have_module=yes)
92 AM_CONDITIONAL(BUILD_LIBGCRYPT, test x$build_static = xyes)
93 AM_CONDITIONAL(SHARED_LIBGCRYPT, test x$build_shared = xyes)
95 MODULE_HELPER(libdevmapper,
96 [ --enable-libdevmapper enable dm-crypt backend through libdevmapper
97 [[default=auto]]],auto,[
100 AC_CHECK_LIB(sepol, sepol_bool_set)
101 AC_CHECK_LIB(selinux, is_selinux_enabled)
102 AC_CHECK_LIB(devmapper, dm_task_set_name,,unset have_module)
103 AC_CHECK_HEADER(libdevmapper.h,,unset have_module)
104 LIBDEVMAPPER_LIBS="$LIBS"
106 AC_SUBST(LIBDEVMAPPER_LIBS)
107 AC_SUBST(LIBDEVMAPPER_CFLAGS)
109 AM_CONDITIONAL(BUILD_LIBDEVMAPPER, test x$build_static = xyes)
110 AM_CONDITIONAL(SHARED_LIBDEVMAPPER, test x$build_shared = xyes)
112 dnl ==========================================================================
114 AM_CONDITIONAL(STATIC_CRYPTSETUP, test x$enable_static = xyes)
115 AM_CONDITIONAL(DYNAMIC_CRYPTSETUP, test x$enable_static = xno)
117 dnl ==========================================================================