From: Nikos Mavrogiannopoulos Date: Tue, 26 Nov 2013 16:01:59 +0000 (+0100) Subject: checks FIPS-140 lib requirements, moved after clock_gettime() is checked for. X-Git-Tag: gnutls_3_3_0pre0~520^2~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dea3ed8975b04cdc93830db23e9afa62bcc95b95;p=thirdparty%2Fgnutls.git checks FIPS-140 lib requirements, moved after clock_gettime() is checked for. --- 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 ], [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 ], [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 ], [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 ], [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],