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 #
Hi, On Tue, April 24, 2012 04:41, Akira TAGOH wrote:> Add --enable-iconv option to configure > > Disable iconv support by default, which provide a feature to convert > non-Unicode SFNT names to UTF-8.Is it really disabled by default? I just pulled it and ./configure still seems to enable it if I don''t specify any further argument. Raimund -- Worringer Str 31 Duesseldorf 40211 Germany +49-179-2981632 icq 16845346
Check if you see --enable-iconv option available in the output of configure --help. otherwise you have to run autoconf to update again. On Wed, Apr 25, 2012 at 4:26 AM, Raimund Steger <rs at mytum.de> wrote:> Hi, > > On Tue, April 24, 2012 04:41, Akira TAGOH wrote: >> ? ? Add --enable-iconv option to configure >> >> ? ? Disable iconv support by default, which provide a feature to convert >> ? ? non-Unicode SFNT names to UTF-8. > > Is it really disabled by default? I just pulled it and ./configure still > seems to enable it if I don''t specify any further argument. > > Raimund > > > -- > Worringer Str 31 Duesseldorf 40211 Germany +49-179-2981632 icq 16845346 >-- Akira TAGOH
Akira TAGOH wrote:> Check if you see --enable-iconv option available in the output of > configure --help. otherwise you have to run autoconf to update again.Here''s what I do: ---8<-------------- sun2:fontconfig-git>git clone git://anongit.freedesktop.org/fontconfig Cloning into fontconfig... remote: Counting objects: 9454, done. remote: Compressing objects: 100% (2814/2814), done. remote: Total 9454 (delta 7369), reused 8465 (delta 6617) Receiving objects: 100% (9454/9454), 2.79 MiB | 242 KiB/s, done. Resolving deltas: 100% (7369/7369), done. sun2:fontconfig-git>cd fontconfig sun2:fontconfig>./autogen.sh --enable-libxml2 [...] checking for a usable iconv... libc [...] Now type ''make'' to compile Fontconfig. sun2:fontconfig>./configure --help|grep iconv --enable-iconv Use iconv to support non-Unicode SFNT name --with-libiconv=DIR Use libiconv in DIR --with-libiconv-includes=DIR Use libiconv includes in DIR --with-libiconv-lib=DIR Use libiconv library in DIR sun2:fontconfig>make [...] sun2:fontconfig>nm ./src/.libs/libfontconfig.so|grep iconv [1360] | 0| 0|FUNC |GLOB |0 |UNDEF |iconv [1453] | 0| 0|FUNC |GLOB |0 |UNDEF |iconv_close [1425] | 0| 0|FUNC |GLOB |0 |UNDEF |iconv_open ---8<-------------- Applying this seems to fix it for me: diff --git a/configure.in b/configure.in index ee79faf..2de6224 100644 --- a/configure.in +++ b/configure.in @@ -189,7 +189,7 @@ if test "x$libiconv_cflags" != "x"; then fi use_iconv=0 -if test "x$enable_iconv" != "xno"; then +if test "x$enable_iconv" = "xyes"; then AC_MSG_CHECKING([for a usable iconv]) if test "x$libiconv_cflags" != "x" -o "x$libiconv_libs" != "x"; then iconvsaved_CFLAGS="$CFLAGS" Raimund
Hmm, okay. should works now. thanks! On Wed, Apr 25, 2012 at 4:11 PM, Raimund Steger <rs at mytum.de> wrote:> Akira TAGOH wrote: >> >> Check if you see --enable-iconv option available in the output of >> configure --help. otherwise you have to run autoconf to update again. > > > Here''s what I do: > > > ---8<-------------- > > > sun2:fontconfig-git>git clone git://anongit.freedesktop.org/fontconfig > Cloning into fontconfig... > remote: Counting objects: 9454, done. > remote: Compressing objects: 100% (2814/2814), done. > remote: Total 9454 (delta 7369), reused 8465 (delta 6617) > Receiving objects: 100% (9454/9454), 2.79 MiB | 242 KiB/s, done. > Resolving deltas: 100% (7369/7369), done. > sun2:fontconfig-git>cd fontconfig > sun2:fontconfig>./autogen.sh --enable-libxml2 > [...] > checking for a usable iconv... libc > [...] > Now type ''make'' to compile Fontconfig. > sun2:fontconfig>./configure --help|grep iconv > ?--enable-iconv ? ? ? ? ?Use iconv to support non-Unicode SFNT name > ?--with-libiconv=DIR ? ? Use libiconv in DIR > ?--with-libiconv-includes=DIR > ? ? ? ? ? ? ? ? ? ? ? ? ?Use libiconv includes in DIR > ?--with-libiconv-lib=DIR Use libiconv library in DIR > sun2:fontconfig>make > [...] > sun2:fontconfig>nm ./src/.libs/libfontconfig.so|grep iconv > [1360] ?| ? ? ? ? 0| ? ? ? ? 0|FUNC |GLOB |0 ? ?|UNDEF ?|iconv > [1453] ?| ? ? ? ? 0| ? ? ? ? 0|FUNC |GLOB |0 ? ?|UNDEF ?|iconv_close > [1425] ?| ? ? ? ? 0| ? ? ? ? 0|FUNC |GLOB |0 ? ?|UNDEF ?|iconv_open > > > ---8<-------------- > > > Applying this seems to fix it for me: > > > diff --git a/configure.in b/configure.in > index ee79faf..2de6224 100644 > --- a/configure.in > +++ b/configure.in > @@ -189,7 +189,7 @@ if test "x$libiconv_cflags" != "x"; then > ?fi > > ?use_iconv=0 > > -if test "x$enable_iconv" != "xno"; then > +if test "x$enable_iconv" = "xyes"; then > > ? ? ? ?AC_MSG_CHECKING([for a usable iconv]) > ? ? ? ?if test "x$libiconv_cflags" != "x" -o "x$libiconv_libs" != "x"; then > ? ? ? ? ? ? ? ?iconvsaved_CFLAGS="$CFLAGS" > > > > > > Raimund-- Akira TAGOH