diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-12-30 22:30:48 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-12-30 22:30:48 +0000 |
commit | fceec98e767bce7ad2c24dde73cdcf8837e04013 (patch) | |
tree | d5226c087ce187ff52dfbb336fe01c0eb8f33d85 /configure.ac | |
parent | 2d70eb89f5204adb1e88e325f6ebf78d11ed0bf6 (diff) | |
download | gnunet-fceec98e767bce7ad2c24dde73cdcf8837e04013.tar.gz gnunet-fceec98e767bce7ad2c24dde73cdcf8837e04013.zip |
-add test for libunistring
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 37 |
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, | |||
212 | LDFLAGS="$LDFLAGS -pie" | 212 | LDFLAGS="$LDFLAGS -pie" |
213 | fi]) | 213 | fi]) |
214 | 214 | ||
215 | |||
215 | # Linker hardening options | 216 | # Linker hardening options |
216 | # Currently these options are ELF specific - you can't use this with MacOSX | 217 | # Currently these options are ELF specific - you can't use this with MacOSX |
217 | AC_ARG_ENABLE(linker-hardening, | 218 | AC_ARG_ENABLE(linker-hardening, |
@@ -367,6 +368,42 @@ fi | |||
367 | # restore LIBS | 368 | # restore LIBS |
368 | LIBS=$SAVE_LIBS | 369 | LIBS=$SAVE_LIBS |
369 | 370 | ||
371 | # test for libunistring | ||
372 | unistring=0 | ||
373 | AC_MSG_CHECKING(for libunistring) | ||
374 | AC_ARG_WITH(unistring, | ||
375 | [ --with-unistring=PFX base of libunistring installation], | ||
376 | [AC_MSG_RESULT([$with_unistring]) | ||
377 | case $with_unistring in | ||
378 | no) | ||
379 | ;; | ||
380 | yes) | ||
381 | AC_CHECK_HEADERS(unistr.h, | ||
382 | AC_CHECK_LIB([unistring], [u8_check], | ||
383 | unistring=1)) | ||
384 | ;; | ||
385 | *) | ||
386 | LDFLAGS="-L$with_unistring/lib $LDFLAGS" | ||
387 | CPPFLAGS="-I$with_unistring/include $CPPFLAGS" | ||
388 | AC_CHECK_HEADERS(unistr.h, | ||
389 | AC_CHECK_LIB([unistring], [u8_check], | ||
390 | EXT_LIB_PATH="-L$with_unistring/lib $EXT_LIB_PATH" | ||
391 | unistring=1)) | ||
392 | ;; | ||
393 | esac | ||
394 | ], | ||
395 | [AC_MSG_RESULT([--with-unistring not specified]) | ||
396 | AC_CHECK_HEADERS(unistr.h, | ||
397 | AC_CHECK_LIB([unistring], [u8_check], | ||
398 | unistring=1))]) | ||
399 | if test "$unistring" != 1 | ||
400 | then | ||
401 | AC_MSG_ERROR([GNUnet requires libunistring]) | ||
402 | fi | ||
403 | # restore LIBS | ||
404 | LIBS=$SAVE_LIBS | ||
405 | |||
406 | |||
370 | 407 | ||
371 | # Checks for standard header files. | 408 | # Checks for standard header files. |
372 | AC_HEADER_DIRENT | 409 | AC_HEADER_DIRENT |