summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2013-11-12 12:46:10 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2013-11-27 11:41:42 +0100
commit21d4cd5acdc6dc88b339724f484cec1521c8be46 (patch)
tree8fa5c75bacade8a98de2541e2906abff8df8c5e5 /configure.ac
parentf965513341aa5fc5c40c8711cfea3d3fe9dfe5d0 (diff)
downloadgnutls-21d4cd5acdc6dc88b339724f484cec1521c8be46.tar.gz
Updated FIPS140 initialization and added a self test for it.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 7681b56b79..18b03117d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -131,8 +131,20 @@ AC_ARG_ENABLE(fips140-mode,
enable_fips=$enableval, enable_fips=no)
AM_CONDITIONAL(ENABLE_FIPS140, test "$enable_fips" = "yes")
if [ test "$enable_fips" = "yes" ];then
- enable_self_checks=yes
- AC_DEFINE([ENABLE_FIPS140], 1, [Enable FIPS140-2 mode])
+ AC_LIB_HAVE_LINKFLAGS(dl,, [#include <dlfcn.h>], [dladdr (0, 0);])
+ if test "x$HAVE_LIBDL" = "xyes";then
+ enable_self_checks=yes
+ 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
AM_CONDITIONAL(ENABLE_SELF_CHECKS, test "$enable_self_checks" = "yes")