]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
checks FIPS-140 lib requirements, moved after clock_gettime() is checked for.
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Tue, 26 Nov 2013 16:01:59 +0000 (17:01 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 27 Nov 2013 10:41:45 +0000 (11:41 +0100)
configure.ac

index 8ab88079c337ef1de4de70be9bc4f161542c54e0..859d04bf28833487ac3ee3cbd34f36aec06a6fe5 100644 (file)
@@ -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],