aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/configure.in
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-04-20 17:39:30 +0200
committermarha <marha@users.sourceforge.net>2012-04-20 17:39:30 +0200
commitae228baa2cfe88bd7c7de40d5038ad2cc1ecffa4 (patch)
treeb18ae337e913f36a95f97530f6a792e9366a393c /fontconfig/configure.in
parent4207bc7b2972aed9a45756fae8c48957d323fa21 (diff)
parent0e3699334faf92f508b6c187a261548b656b0dd3 (diff)
downloadvcxsrv-ae228baa2cfe88bd7c7de40d5038ad2cc1ecffa4.tar.gz
vcxsrv-ae228baa2cfe88bd7c7de40d5038ad2cc1ecffa4.tar.bz2
vcxsrv-ae228baa2cfe88bd7c7de40d5038ad2cc1ecffa4.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/dix/dispatch.c xorg-server/dix/resource.c
Diffstat (limited to 'fontconfig/configure.in')
-rw-r--r--fontconfig/configure.in44
1 files changed, 24 insertions, 20 deletions
diff --git a/fontconfig/configure.in b/fontconfig/configure.in
index 9c9de30e7..9bb0988ec 100644
--- a/fontconfig/configure.in
+++ b/fontconfig/configure.in
@@ -150,7 +150,11 @@ AC_DEFINE_UNQUOTED(USE_REGEX,$use_regex,[Use regex.])
AC_ARG_WITH(libiconv,
[AC_HELP_STRING([--with-libiconv=DIR],
[Use libiconv in DIR])],
- [libiconv_prefix=$withval],
+ [if test "x$withval" = "xyes"; then
+ libiconv_prefix=$prefix
+ else
+ libiconv_prefix=$withval
+ fi],
[libiconv_prefix=auto])
AC_ARG_WITH(libiconv-includes,
[AC_HELP_STRING([--with-libiconv-includes=DIR],
@@ -163,33 +167,33 @@ AC_ARG_WITH(libiconv-lib,
[libiconv_lib=$withval],
[libiconv_lib=auto])
-# if none of libiconv,libiconv-includes,libiconv-libs are specified
-if test "$libiconv_prefix" != "auto" -o "$libiconv_includes" != "auto" -o "$libiconv_lib" != "auto"; then
- if test "$libiconv_includes" != "auto" -a -r ${libiconv_includes}/iconv.h; then
- libiconv_cflags="-I${libiconv_includes}"
- elif test "$libiconv_prefix" != "auto" -a -r ${libiconv_prefix}/include/iconv.h; then
- libiconv_cflags="-I${libiconv_prefix}/include"
- else
- libiconv_cflags=""
- fi
- if test "$libiconv_lib" != "auto"; then
- libiconv_lib="-L${libiconv_lib} -liconv"
- elif test "$libiconv_prefix" != "auto"; then
- libiconv_lib="-L${libiconv_prefix}/lib -liconv"
- elif test "x$libiconv_cflags" != "x"; then
- libiconv_lib="-liconv"
+# if no libiconv,libiconv-includes,libiconv-lib are specified,
+# libc's iconv has a priority.
+if test "$libiconv_includes" != "auto" -a -r ${libiconv_includes}/iconv.h; then
+ libiconv_cflags="-I${libiconv_includes}"
+elif test "$libiconv_prefix" != "auto" -a -r ${libiconv_prefix}/include/iconv.h; then
+ libiconv_cflags="-I${libiconv_prefix}/include"
+else
+ libiconv_cflags=""
+fi
+libiconv_libs=""
+if test "x$libiconv_cflags" != "x"; then
+ if test "$libiconv_lib" != "auto" -a -d ${libiconv_lib}; then
+ libiconv_libs="-L${libiconv_lib} -liconv"
+ elif test "$libiconv_prefix" != "auto" -a -d ${libiconv_prefix}/lib; then
+ libiconv_libs="-L${libiconv_prefix}/lib -liconv"
else
- libiconv_lib=""
+ libiconv_libs="-liconv"
fi
fi
use_iconv=0
AC_MSG_CHECKING([for a usable iconv])
-if test "x$libiconv_cflags" != "x" -o "x$libiconv_lib" != "x"; then
+if test "x$libiconv_cflags" != "x" -o "x$libiconv_libs" != "x"; then
iconvsaved_CFLAGS="$CFLAGS"
iconvsaved_LIBS="$LIBS"
CFLAGS="$CFLAGS $libiconv_cflags"
- LIBS="$LIBS $libiconv_lib"
+ LIBS="$LIBS $libiconv_libs"
AC_TRY_LINK([#include <iconv.h>],
[iconv_open ("from", "to");],
@@ -200,7 +204,7 @@ if test "x$libiconv_cflags" != "x" -o "x$libiconv_lib" != "x"; then
CFLAGS="$iconvsaved_CFLAGS"
LIBS="$iconvsaved_LIBS"
ICONV_CFLAGS="$libiconv_cflags"
- ICONV_LIBS="$libiconv_lib"
+ ICONV_LIBS="$libiconv_libs"
fi
if test "x$use_iconv" = "x0"; then
AC_TRY_LINK([#include <iconv.h>],