summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2013-11-26 17:01:59 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2013-11-27 11:41:45 +0100
commitdea3ed8975b04cdc93830db23e9afa62bcc95b95 (patch)
tree1f285bf0c1d5daf0a33027177e36fdea310f1e54 /configure.ac
parenta4a7743d94137254b84f87ad35712bce9cfbb76b (diff)
downloadgnutls-dea3ed8975b04cdc93830db23e9afa62bcc95b95.tar.gz
checks FIPS-140 lib requirements, moved after clock_gettime() is checked for.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac85
1 files changed, 43 insertions, 42 deletions
diff --git a/configure.ac b/configure.ac
index 8ab88079c3..859d04bf28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -122,48 +122,6 @@ AM_CONDITIONAL(ASM_X86, test x"$hw_accel" = x"x86" || test x"$hw_accel" = x"x86-
AM_CONDITIONAL(HAVE_GCC_GNU89_INLINE_OPTION, test "$gnu89_inline" = "yes"])
AM_CONDITIONAL(HAVE_GCC, test "$GCC" = "yes")
-AC_ARG_ENABLE(self-checks,
- AS_HELP_STRING([--enable-self-checks], [enable self checking functionality]),
- enable_self_checks=$enableval, enable_self_checks=no)
-
-AC_ARG_ENABLE(fips140-mode,
- AS_HELP_STRING([--enable-fips140-mode], [enable FIPS140-2 mode (implies self checks)]),
- enable_fips=$enableval, enable_fips=no)
-AM_CONDITIONAL(ENABLE_FIPS140, test "$enable_fips" = "yes")
-if [ test "$enable_fips" = "yes" ];then
- AC_LIB_HAVE_LINKFLAGS(dl,, [#include <dlfcn.h>], [dladdr (0, 0);])
- if test "x$HAVE_LIBDL" = "xyes";then
- enable_self_checks=yes
-
- dnl clock_gettime precision is needed on the FIPS140 DRBG.
- if test "$ac_cv_func_clock_gettime" != "yes";then
- AC_LIB_HAVE_LINKFLAGS(rt,, [#include <time.h>], [clock_gettime (0, 0);])
- fi
-
- AC_DEFINE([ENABLE_FIPS140], 1, [Enable FIPS140-2 mode])
-
- AC_SUBST([FIPS140_LIBS], $LIBDL)
- else
- enable_fips=no
- AC_MSG_WARN([[
-***
-*** This system is not supported in FIPS140 mode.
-*** libdl and dladdr() are required.
-*** ]])
- fi
-fi
-
-AC_ARG_ENABLE(non-suiteb-curves,
- AS_HELP_STRING([--disable-non-suiteb-curves], [disable curves not in SuiteB]),
- enable_non_suiteb=$enableval, enable_non_suiteb=yes)
-if [ test "$enable_non_suiteb" = "yes" ];then
- AC_DEFINE([ENABLE_NON_SUITEB_CURVES], 1, [Enable all curves])
-fi
-
-AM_CONDITIONAL(ENABLE_SELF_CHECKS, test "$enable_self_checks" = "yes")
-if [ test "$enable_self_checks" = "yes" ];then
- AC_DEFINE([ENABLE_SELF_CHECKS], 1, [Self checks are included in the library])
-fi
dnl Try the hooks.m4
LIBGNUTLS_HOOKS
@@ -294,6 +252,49 @@ if test "$ac_have_unicode" != "yes";then
fi
fi
+AC_ARG_ENABLE(self-checks,
+ AS_HELP_STRING([--enable-self-checks], [enable self checking functionality]),
+ enable_self_checks=$enableval, enable_self_checks=no)
+
+AC_ARG_ENABLE(fips140-mode,
+ AS_HELP_STRING([--enable-fips140-mode], [enable FIPS140-2 mode (implies self checks)]),
+ enable_fips=$enableval, enable_fips=no)
+AM_CONDITIONAL(ENABLE_FIPS140, test "$enable_fips" = "yes")
+if [ test "$enable_fips" = "yes" ];then
+ AC_LIB_HAVE_LINKFLAGS(dl,, [#include <dlfcn.h>], [dladdr (0, 0);])
+ if test "x$HAVE_LIBDL" = "xyes";then
+ enable_self_checks=yes
+
+ dnl clock_gettime precision is needed on the FIPS140 DRBG.
+ if test "$ac_cv_func_clock_gettime" != "yes";then
+ AC_LIB_HAVE_LINKFLAGS(rt,, [#include <time.h>], [clock_gettime (0, 0);])
+ fi
+
+ AC_DEFINE([ENABLE_FIPS140], 1, [Enable FIPS140-2 mode])
+
+ AC_SUBST([FIPS140_LIBS], $LIBDL)
+ else
+ enable_fips=no
+ AC_MSG_WARN([[
+***
+*** This system is not supported in FIPS140 mode.
+*** libdl and dladdr() are required.
+*** ]])
+ fi
+fi
+
+AC_ARG_ENABLE(non-suiteb-curves,
+ AS_HELP_STRING([--disable-non-suiteb-curves], [disable curves not in SuiteB]),
+ enable_non_suiteb=$enableval, enable_non_suiteb=yes)
+if [ test "$enable_non_suiteb" = "yes" ];then
+ AC_DEFINE([ENABLE_NON_SUITEB_CURVES], 1, [Enable all curves])
+fi
+
+AM_CONDITIONAL(ENABLE_SELF_CHECKS, test "$enable_self_checks" = "yes")
+if [ test "$enable_self_checks" = "yes" ];then
+ AC_DEFINE([ENABLE_SELF_CHECKS], 1, [Self checks are included in the library])
+fi
+
AC_MSG_CHECKING([whether to build libdane])
AC_ARG_ENABLE(libdane,
AS_HELP_STRING([--disable-libdane],