From fceec98e767bce7ad2c24dde73cdcf8837e04013 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 30 Dec 2011 22:30:48 +0000 Subject: [PATCH] -add test for libunistring --- configure.ac | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/configure.ac b/configure.ac index 6eccb5327..e6e465435 100644 --- a/configure.ac +++ b/configure.ac @@ -212,6 +212,7 @@ AC_ARG_ENABLE(gcc-hardening, LDFLAGS="$LDFLAGS -pie" fi]) + # Linker hardening options # Currently these options are ELF specific - you can't use this with MacOSX AC_ARG_ENABLE(linker-hardening, @@ -367,6 +368,42 @@ fi # restore LIBS LIBS=$SAVE_LIBS +# test for libunistring +unistring=0 +AC_MSG_CHECKING(for libunistring) +AC_ARG_WITH(unistring, + [ --with-unistring=PFX base of libunistring installation], + [AC_MSG_RESULT([$with_unistring]) + case $with_unistring in + no) + ;; + yes) + AC_CHECK_HEADERS(unistr.h, + AC_CHECK_LIB([unistring], [u8_check], + unistring=1)) + ;; + *) + LDFLAGS="-L$with_unistring/lib $LDFLAGS" + CPPFLAGS="-I$with_unistring/include $CPPFLAGS" + AC_CHECK_HEADERS(unistr.h, + AC_CHECK_LIB([unistring], [u8_check], + EXT_LIB_PATH="-L$with_unistring/lib $EXT_LIB_PATH" + unistring=1)) + ;; + esac + ], + [AC_MSG_RESULT([--with-unistring not specified]) + AC_CHECK_HEADERS(unistr.h, + AC_CHECK_LIB([unistring], [u8_check], + unistring=1))]) +if test "$unistring" != 1 +then + AC_MSG_ERROR([GNUnet requires libunistring]) +fi +# restore LIBS +LIBS=$SAVE_LIBS + + # Checks for standard header files. AC_HEADER_DIRENT -- 2.25.1