summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowitz@users.sourceforge.net>2011-08-24 23:08:58 -0500
committerYaakov Selkowitz <yselkowitz@users.sourceforge.net>2011-08-24 23:08:58 -0500
commit1410b0f0a9d50973ebfdcc696994ccbd91cea3ae (patch)
tree54b1c40d03869269518a6780f5f5558d780d619d /configure.ac
parent1c58b461a84a8e75c53ce863470a5c8d8201261b (diff)
Use AM_ICONV
AC_SEARCH_LIBS does not detect GNU libiconv because its symbols are exported in the "libiconv" namespace instead of "iconv". The AM_ICONV macro correctly detects both glibc and GNU libiconv, defines HAVE_ICONV, ICONV_CONST, and LIBICONV depending on the system. The config.rpath file is required by this macro. This adds a dependency on the aclocal macros from gettext (gettext-devel in some distros) when building from git, but not when building from a tarball. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 2 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index b86aa20..e712ba6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,9 +45,7 @@ if test "x$ac_cv_func_strnlen_working" = xyes; then
AC_DEFINE(HAVE_STRNLEN, 1, [Define to 1 if you have a working strnlen function.])
fi
-# Check for iconv in libc, then libiconv
-AC_SEARCH_LIBS([iconv], [iconv], [AC_DEFINE([HAVE_ICONV], 1,
- [Define to 1 if you have the iconv() function])])
+AM_ICONV
# Allow using xcb-icccm, but don't make it the default while the API is
# still being changed.
@@ -70,6 +68,7 @@ PKG_CHECK_MODULES(XWININFO, [xcb >= 1.6] xcb-shape ${xcb_icccm_pc})
# and libX11 headers for cursorfont.h
PKG_CHECK_MODULES(XLIB, x11 [xproto >= 7.0.17])
XWININFO_CFLAGS="${XWININFO_CFLAGS} ${XLIB_CFLAGS}"
+XWININFO_LIBS="${XWININFO_LIBS} ${LIBICONV}"
AC_CONFIG_FILES([
Makefile