Fix usage of LDFLAGS / ICONV_LDFLAGS.

Originally committed to SVN as r2098.
This commit is contained in:
Amar Takhar 2008-03-22 07:37:38 +00:00
parent 664af8498a
commit ae3f8a037b
1 changed files with 4 additions and 1 deletions

View File

@ -279,7 +279,7 @@ AC_ARG_WITH(libass, [ --without-libass disable libass (default=enable)],
AC_ARG_ENABLE(libass, [ --disable-libass disable internal libass support (default=enabled)],libass_internal_disabled="(disabled)")
AC_ARG_VAR([ICONV_CFLAGS], [CFLAGS to use for iconv (default: CPPFLAGS)])
AC_ARG_VAR([ICONV_LDFLAGS], [LDFLAGS to use for iconv (default: -liconv)])
AC_ARG_VAR([ICONV_LDFLAGS], [LDFLAGS to use for iconv (default: LDFLAGS -liconv)])
if test -z "ICONV_LDFLAGS"; then
ICONV_LDFLAGS="-liconv";
@ -289,7 +289,10 @@ if test "$with_libass" != "no"; then
if test "$enable_libass" != "no"; then
AC_CHECK_HEADER(iconv.h, [ICONV_CFLAGS="$ICONV_CFLAGS"; with_iconv="yes"], with_iconv="no")
aegisub_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $ICONV_LDFLAGS"
AC_CHECK_LIB([iconv], [iconv_open],[ICONV_LDFLAGS="$ICONV_LIBS"; with_iconv="yes"], with_iconv="no")
LDFLAGS="$aegisub_save_LDFLAGS"
if test "$with_iconv" = "yes"; then
LIBASS_LIBS="-L../libass -lass_aegisub"