explicitly allow libiconv flags

SVN revision: 12147
This commit is contained in:
Carsten Haitzler 2004-11-08 02:48:12 +00:00
parent 73e9cce533
commit e0d996c007
1 changed files with 54 additions and 39 deletions

View File

@ -127,59 +127,74 @@ AC_ARG_ENABLE(ecore-txt,
] ]
) )
AC_ARG_WITH(iconv-link,
[ --with-iconv-link=ICONV_LINK explicitly specify an iconv link option],
[
v=$withval;
iconv_libs=$v;
echo " Ecore iconv link flags explicitly set to: "$iconv_libs;
])
if test "x$have_ecore_txt" = "xyes"; then if test "x$have_ecore_txt" = "xyes"; then
if test -z "$iconv_libs"; then
AC_CHECK_LIB(iconv, libiconv, AC_CHECK_LIB(iconv, libiconv,
[ [
AC_DEFINE(BUILD_ECORE_TXT, 1, [Build Ecore_Txt Module]) AC_DEFINE(BUILD_ECORE_TXT, 1, [Build Ecore_Txt Module])
AM_CONDITIONAL(BUILD_ECORE_TXT, true) AM_CONDITIONAL(BUILD_ECORE_TXT, true)
iconv_libs="-liconv" iconv_libs="-liconv"
ecore_txt_libs="-lecore_txt -liconv" ecore_txt_libs="-lecore_txt "$iconv_libs
have_ecore_txt="yes" have_ecore_txt="yes"
], [ ], [
have_ecore_txt="no" have_ecore_txt="no"
] ]
) )
if test "x$have_ecore_txt" != "xyes"; then if test "x$have_ecore_txt" != "xyes"; then
AC_CHECK_LIB(iconv, iconv, AC_CHECK_LIB(iconv, iconv,
[ [
AC_DEFINE(BUILD_ECORE_TXT, 1, [Build Ecore_Txt Module]) AC_DEFINE(BUILD_ECORE_TXT, 1, [Build Ecore_Txt Module])
AM_CONDITIONAL(BUILD_ECORE_TXT, true) AM_CONDITIONAL(BUILD_ECORE_TXT, true)
iconv_libs="-liconv" iconv_libs="-liconv"
ecore_txt_libs="-lecore_txt -liconv" ecore_txt_libs="-lecore_txt "$iconv_libs
have_ecore_txt="yes" have_ecore_txt="yes"
], [ ], [
have_ecore_txt="no" have_ecore_txt="no"
] ]
) )
fi fi
if test "x$have_ecore_txt" != "xyes"; then if test "x$have_ecore_txt" != "xyes"; then
AC_CHECK_LIB(c, libiconv, AC_CHECK_LIB(c, libiconv,
[ [
AC_DEFINE(BUILD_ECORE_TXT, 1, [Build Ecore_Txt Module]) AC_DEFINE(BUILD_ECORE_TXT, 1, [Build Ecore_Txt Module])
AM_CONDITIONAL(BUILD_ECORE_TXT, true) AM_CONDITIONAL(BUILD_ECORE_TXT, true)
ecore_txt_libs="-lecore_txt" ecore_txt_libs="-lecore_txt "$iconv_libs
have_ecore_txt="yes" have_ecore_txt="yes"
], [ ], [
have_ecore_txt="no" have_ecore_txt="no"
] ]
) )
fi fi
if test "x$have_ecore_txt" != "xyes"; then if test "x$have_ecore_txt" != "xyes"; then
AC_CHECK_LIB(c, iconv, AC_CHECK_LIB(c, iconv,
[ [
AC_DEFINE(BUILD_ECORE_TXT, 1, [Build Ecore_Txt Module]) AC_DEFINE(BUILD_ECORE_TXT, 1, [Build Ecore_Txt Module])
AM_CONDITIONAL(BUILD_ECORE_TXT, true) AM_CONDITIONAL(BUILD_ECORE_TXT, true)
ecore_txt_libs="-lecore_txt" ecore_txt_libs="-lecore_txt "$iconv_libs
have_ecore_txt="yes" have_ecore_txt="yes"
], [ ], [
AC_MSG_RESULT("no - disabling ecore_txt") AC_MSG_RESULT("no - disabling ecore_txt")
AM_CONDITIONAL(BUILD_ECORE_TXT, false) AM_CONDITIONAL(BUILD_ECORE_TXT, false)
have_ecore_txt="no" have_ecore_txt="no"
] ]
) )
fi
else
AC_DEFINE(BUILD_ECORE_TXT, 1, [Build Ecore_Txt Module])
AM_CONDITIONAL(BUILD_ECORE_TXT, true)
ecore_txt_libs="-lecore_txt "$iconv_libs
have_ecore_txt="yes"
fi fi
else else
AM_CONDITIONAL(BUILD_ECORE_TXT, false) AM_CONDITIONAL(BUILD_ECORE_TXT, false)