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)
24 AC_CHECK_HEADERS(fcntl.h malloc.h inttypes.h sys/ioctl.h sys/mman.h \
25 ctype.h unistd.h locale.h)
27 AC_CHECK_HEADERS(uuid/uuid.h,,[AC_MSG_ERROR('You need the uuid library (from e2fsprogs)')])
30 AC_CHECK_LIB(uuid, uuid_clear, ,[AC_MSG_ERROR('You need the uuid library (from e2fsprogs)')])
35 AC_CHECK_FUNCS(setlocale)
44 AC_PROG_GCC_TRADITIONAL
46 dnl ==========================================================================
48 GETTEXT_PACKAGE=cryptsetup
49 AC_SUBST(GETTEXT_PACKAGE)
50 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
51 [Definition for the gettext package name])
53 AM_GNU_GETTEXT([external],[need-ngettext])
54 AM_GNU_GETTEXT_VERSION([0.15])
56 dnl ==========================================================================
59 AC_CHECK_LIB(popt, poptConfigFileToString,,
60 AC_MSG_ERROR([You need popt 1.7 or newer to compile.]))
65 dnl ==========================================================================
67 AC_ARG_ENABLE(shared-library,
68 [ --disable-shared-library
69 disable building of shared cryptsetup library],,
70 enable_shared_library=yes)
71 AM_CONDITIONAL(STATIC_LIBRARY, test x$enable_shared_library = xno)
73 AC_ARG_ENABLE(plugins,
74 [ --enable-plugins disable shared library plugins],,enable_plugins=no)
75 if test "x$enable_plugins" = xyes; then
76 AC_DEFINE(USE_PLUGINS, 1, [Define if you wish to use the plugin loader])
81 --with-MODULE[[=shared]] builds the module MODULE as a shared library plugin
85 [ --disable-all disable all modules built by default],,enable_all=default)
87 MODULE_HELPER(libgcrypt,
88 [ --enable-libgcrypt enable libgcrypt crypto functions [[default=auto]]],auto,[
89 AM_PATH_LIBGCRYPT(1.1.42,have_module=yes)
91 AM_CONDITIONAL(BUILD_LIBGCRYPT, test x$build_static = xyes)
92 AM_CONDITIONAL(SHARED_LIBGCRYPT, test x$build_shared = xyes)
94 MODULE_HELPER(libdevmapper,
95 [ --enable-libdevmapper enable dm-crypt backend through libdevmapper
96 [[default=auto]]],auto,[
99 AC_CHECK_LIB(sepol, sepol_bool_set)
100 AC_CHECK_LIB(selinux, is_selinux_enabled)
101 AC_CHECK_LIB(devmapper, dm_task_set_name,,unset have_module)
102 AC_CHECK_HEADER(libdevmapper.h,,unset have_module)
103 LIBDEVMAPPER_LIBS="$LIBS"
105 AC_SUBST(LIBDEVMAPPER_LIBS)
106 AC_SUBST(LIBDEVMAPPER_CFLAGS)
108 AM_CONDITIONAL(BUILD_LIBDEVMAPPER, test x$build_static = xyes)
109 AM_CONDITIONAL(SHARED_LIBDEVMAPPER, test x$build_shared = xyes)
111 dnl ==========================================================================
113 AM_CONDITIONAL(STATIC_CRYPTSETUP, test x$enable_static = xyes)
114 AM_CONDITIONAL(DYNAMIC_CRYPTSETUP, test x$enable_static = xno)
116 dnl ==========================================================================
118 AC_OUTPUT([ m4/Makefile