summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac37
1 files changed, 37 insertions, 0 deletions
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