[Fontconfig] fontconfig: Branch 'master'

Akira TAGOH tagoh at kemper.freedesktop.org
Mon Apr 23 19:41:55 PDT 2012


 configure.in |   64 +++++++++++++++++++++++++++++++----------------------------
 1 file changed, 34 insertions(+), 30 deletions(-)

New commits:
commit 526f0da93fc487e9b33a4d97386a9054156d01ac
Author: Akira TAGOH <akira at tagoh.org>
Date:   Tue Apr 24 11:40:51 2012 +0900

    Add --enable-iconv option to configure
    
    Disable iconv support by default, which provide a feature to convert
    non-Unicode SFNT names to UTF-8.

diff --git a/configure.in b/configure.in
index 62bc25e..ee79faf 100644
--- a/configure.in
+++ b/configure.in
@@ -145,6 +145,9 @@ fi
 #
 # Checks for iconv
 #
+AC_ARG_ENABLE(iconv,
+	[AC_HELP_STRING([--enable-iconv],
+			[Use iconv to support non-Unicode SFNT name])])
 AC_ARG_WITH(libiconv,
 	[AC_HELP_STRING([--with-libiconv=DIR],
 			[Use libiconv in DIR])],
@@ -186,38 +189,39 @@ if test "x$libiconv_cflags" != "x"; then
 fi
 
 use_iconv=0
-AC_MSG_CHECKING([for a usable iconv])
-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_libs"
-
-	AC_TRY_LINK([#include <iconv.h>],
-		[iconv_open ("from", "to");],
-		[iconv_type="libiconv"
-		 use_iconv=1],
-		[use_iconv=0])
-
-	CFLAGS="$iconvsaved_CFLAGS"
-	LIBS="$iconvsaved_LIBS"
-	ICONV_CFLAGS="$libiconv_cflags"
-	ICONV_LIBS="$libiconv_libs"
-fi
-if test "x$use_iconv" = "x0"; then
-	AC_TRY_LINK([#include <iconv.h>],
-		[iconv_open ("from", "to");],
-		[iconv_type="libc"
-		 use_iconv=1],
-		[iconv_type="not found"
-		 use_iconv=0])
-fi
+if test "x$enable_iconv" != "xno"; then
+	AC_MSG_CHECKING([for a usable iconv])
+	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_libs"
+
+		AC_TRY_LINK([#include <iconv.h>],
+			[iconv_open ("from", "to");],
+			[iconv_type="libiconv"
+			 use_iconv=1],
+			[use_iconv=0])
+
+		CFLAGS="$iconvsaved_CFLAGS"
+		LIBS="$iconvsaved_LIBS"
+		ICONV_CFLAGS="$libiconv_cflags"
+		ICONV_LIBS="$libiconv_libs"
+	fi
+	if test "x$use_iconv" = "x0"; then
+		AC_TRY_LINK([#include <iconv.h>],
+			[iconv_open ("from", "to");],
+			[iconv_type="libc"
+			 use_iconv=1],
+			[iconv_type="not found"
+			 use_iconv=0])
+	fi
 
-AC_MSG_RESULT([$iconv_type])
-AC_SUBST(ICONV_CFLAGS)
-AC_SUBST(ICONV_LIBS)
+	AC_MSG_RESULT([$iconv_type])
+	AC_SUBST(ICONV_CFLAGS)
+	AC_SUBST(ICONV_LIBS)
+fi
 AC_DEFINE_UNQUOTED(USE_ICONV,$use_iconv,[Use iconv.])
-
 #
 # Checks for FreeType
 #


More information about the Fontconfig mailing list