diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 73 |
1 files changed, 40 insertions, 33 deletions
diff --git a/configure.ac b/configure.ac index ec30ff12ae..3128ca8672 100644 --- a/configure.ac +++ b/configure.ac @@ -668,11 +668,14 @@ AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK esac], [have_smack=auto]) -if test "x${have_smack}" = xauto; then +if test "x${have_smack}" != xno; then + AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available]) M4_DEFINES="$M4_DEFINES -DHAVE_SMACK" have_smack=yes fi +AM_CONDITIONAL([HAVE_SMACK], [test "x$have_smack" = "xyes"]) + have_smack_run_label=no AC_ARG_WITH(smack-run-label, AS_HELP_STRING([--with-smack-run-label=STRING], @@ -690,12 +693,6 @@ AS_HELP_STRING([--with-smack-default-process-label=STRING], [AC_DEFINE_UNQUOTED(SMACK_DEFAULT_PROCESS_LABEL, ["$withval"], [Default SMACK label for executed processes])], []) -if test "x${have_smack}" = xyes ; then - AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available]) -fi - -AM_CONDITIONAL([HAVE_SMACK], [test "x$have_smack" = "xyes"]) - # ------------------------------------------------------------------------------ AC_ARG_ENABLE([gcrypt], AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]), @@ -708,7 +705,7 @@ AC_ARG_ENABLE([gcrypt], if test "x${have_gcrypt}" != xno ; then m4_define([AM_PATH_LIBGCRYPT_FAIL], - [{ test "x$have_gcrypt" != xyes || AC_MSG_ERROR([*** GCRYPT headers not found.]); }] + [{ test "x$have_gcrypt" != xyes || AC_MSG_ERROR([*** GCRYPT/GPG-ERROR headers not found.]); }] ) m4_ifdef([AM_PATH_LIBGCRYPT], [AM_PATH_LIBGCRYPT( [1.4.5], @@ -723,12 +720,22 @@ if test "x${have_gcrypt}" != xno ; then [AM_PATH_LIBGCRYPT_FAIL] ) - if test "x$have_gcrypt" = xyes ; then - GCRYPT_LIBS="$LIBGCRYPT_LIBS" - GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS" + have_gpg_error=no + m4_ifdef([AM_PATH_GPG_ERROR], [AM_PATH_GPG_ERROR( + [1.12], + [have_gpg_error=yes], + [AM_PATH_LIBGCRYPT_FAIL] + )], + [AM_PATH_LIBGCRYPT_FAIL] + ) + + if test "x$have_gcrypt" = xyes -a "x$have_gpg_error" = xyes ; then + GCRYPT_LIBS="$LIBGCRYPT_LIBS $GPG_ERROR_LIBS" + GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS $GPG_ERROR_CFLAGS" AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available]) else have_gcrypt=no + have_gpg_error=no fi else GCRYPT_LIBS= @@ -839,18 +846,6 @@ fi AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"]) # ------------------------------------------------------------------------------ -have_microhttpd=no -AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support])) -if test "x$enable_microhttpd" != "xno"; then - PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33], - [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no) - if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then - AC_MSG_ERROR([*** microhttpd support requested but libraries not found]) - fi -fi -AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"]) - -# ------------------------------------------------------------------------------ have_gnutls=no AC_ARG_ENABLE(gnutls, AS_HELP_STRING([--disable-gnutls], [disable gnutls support])) if test "x$enable_gnutls" != "xno"; then @@ -863,11 +858,29 @@ fi AM_CONDITIONAL(HAVE_GNUTLS, [test "$have_gnutls" = "yes"]) # ------------------------------------------------------------------------------ +have_microhttpd=no +AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support])) +if test "x$enable_microhttpd" != "xno"; then + PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33], + [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) + have_microhttpd=yes + M4_DEFINES="$M4_DEFINES -DHAVE_MICROHTTPD"], + [have_microhttpd=no]) + if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then + AC_MSG_ERROR([*** microhttpd support requested but libraries not found]) + fi +fi +AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"]) + +# ------------------------------------------------------------------------------ have_libcurl=no AC_ARG_ENABLE(libcurl, AS_HELP_STRING([--disable-libcurl], [disable libcurl support])) if test "x$enable_libcurl" != "xno"; then PKG_CHECK_MODULES(LIBCURL, [libcurl], - [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available]) have_libcurl=yes], have_libcurl=no) + [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available]) + have_libcurl=yes + M4_DEFINES="$M4_DEFINES -DHAVE_LIBCURL"], + [have_libcurl=no]) if test "x$have_libcurl" = xno -a "x$enable_libcurl" = xyes; then AC_MSG_ERROR([*** libcurl support requested but libraries not found]) fi @@ -875,6 +888,9 @@ fi AM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"]) # ------------------------------------------------------------------------------ +AM_CONDITIONAL(HAVE_REMOTE, [test "$have_microhttpd" = "yes" -o "$have_libcurl" = "yes"]) + +# ------------------------------------------------------------------------------ have_libidn=no AC_ARG_ENABLE(libidn, AS_HELP_STRING([--disable-libidn], [Disable optional LIBIDN support])) if test "x$enable_libidn" != "xno"; then @@ -1421,14 +1437,6 @@ AC_ARG_ENABLE([split-usr], enable_split_usr=no ])]) -AC_ARG_WITH([dkr-index-url], - [AS_HELP_STRING([--dkr-index-url=URL], [Specify the default index URL to use for image downloads])], - [DEFAULT_DKR_INDEX_URL="\"$withval\""], - [DEFAULT_DKR_INDEX_URL="NULL"]) - -AC_DEFINE_UNQUOTED(DEFAULT_DKR_INDEX_URL, [$DEFAULT_DKR_INDEX_URL], [Default index URL to use for image downloads]) -AC_SUBST(DEFAULT_DKR_INDEX_URL) - AS_IF([test "x${enable_split_usr}" = "xyes"], [ AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr]) ]) @@ -1597,7 +1605,6 @@ AC_MSG_RESULT([ Maximum System UID: ${SYSTEM_UID_MAX} Maximum System GID: ${SYSTEM_GID_MAX} Certificate root: ${CERTIFICATEROOT} - Default dkr Index ${DEFAULT_DKR_INDEX_URL} CFLAGS: ${OUR_CFLAGS} ${CFLAGS} CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS} |