summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2011-04-22 16:58:18 +0200
committerLudovic Courtès <ludo@gnu.org>2011-04-22 16:59:08 +0200
commit969bb92e9b13068abadb22eb7ab13c7f6616d266 (patch)
tree1ef3fb2ed78f8176b8cbec956535e454af1144d8 /configure.ac
parenta508fbdb01373aed4aed5378806454672e8e702c (diff)
downloadguile-969bb92e9b13068abadb22eb7ab13c7f6616d266.tar.gz
Turn the libunistring/iconv configure check into a macro.
* acinclude.m4 (GUILE_LIBUNISTRING_WITH_ICONV_SUPPORT): New macro. * configure.ac: Use it.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 4 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac
index 7708fb4f8..685f9c18b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -874,26 +874,10 @@ if test "x$LTLIBUNISTRING" = "x"; then
AC_MSG_ERROR([GNU libunistring is required, please install it.])
fi
-AC_MSG_CHECKING([that libunistring was built with iconv support])
-save_LIBS=$LIBS
-LIBS="$LIBS $LIBUNISTRING"
-AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <uniconv.h>
-#include <unistring/iconveh.h>
-int
-main (int argc, char *argv[])
-{
- size_t result_size;
- return (NULL == u32_conv_from_encoding ("ASCII", iconveh_question_mark,
- "a", 1,
- NULL, NULL, &result_size));
-}
-]])],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- AC_MSG_ERROR([No iconv support. Please recompile libunistring with iconv enabled.])],
- [AC_MSG_RESULT([yes, hopefully (cross-compiling)])])
-LIBS=$save_LIBS
+GUILE_LIBUNISTRING_WITH_ICONV_SUPPORT
+if test "x$ac_cv_libunistring_with_iconv_support" != "xyes"; then
+ AC_MSG_ERROR([No iconv support. Please recompile libunistring with iconv enabled.])
+fi
dnl Libffi is needed to compile Guile's foreign function interface, but its
dnl interface isn't exposed in Guile's API.