* Fix ICONV_CFLAGS / ICONV_LDFLAGS so they're properly propogated during the

build.
* s/ICONV_LIBS/ICONV_LDFLAGS/ to fix the addtion of ICONV_LDFLAGS during final
  linking.

Originally committed to SVN as r2159.
This commit is contained in:
Amar Takhar 2008-03-30 08:08:43 +00:00
parent 0cf6fce7de
commit 7746efa54e
3 changed files with 6 additions and 7 deletions

View file

@ -9,7 +9,7 @@ AM_CXXFLAGS = -DAEGISUB -Iposix -include posix/defines.h -Iinclude @WX_CPPFLAGS@
bin_PROGRAMS = aegisub bin_PROGRAMS = aegisub
aegisub_LDADD = posix/libposix.a aegisub_LDADD = posix/libposix.a
aegisub_CPPFLAGS = @FREETYPE_CFLAGS@ aegisub_CPPFLAGS = @FREETYPE_CFLAGS@
aegisub_LDFLAGS = @GL_LIBS@ @PTHREAD_LIBS@ @WX_LIBS@ aegisub_LDFLAGS = @GL_LIBS@ @PTHREAD_LIBS@ @WX_LIBS@ @ICONV_LDFLAGS@
LIBS += @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ LIBS += @FREETYPE_LIBS@ @FONTCONFIG_LIBS@
if BUILD_DARWIN if BUILD_DARWIN
@ -56,7 +56,7 @@ endif
if WITH_LIBASS if WITH_LIBASS
noinst_LIBRARIES += libsubtitle_ass.a noinst_LIBRARIES += libsubtitle_ass.a
libsubtitle_ass_a_SOURCES = subtitles_provider_libass.cpp libsubtitle_ass_a_SOURCES = subtitles_provider_libass.cpp
libsubtitle_ass_a_CPPFLAGS = @LIBASS_CFLAGS@ libsubtitle_ass_a_CPPFLAGS = @LIBASS_CFLAGS@ @ICONV_CFLAGS@
LIBS += @LIBASS_LIBS@ LIBS += @LIBASS_LIBS@
aegisub_LDADD += libsubtitle_ass.a aegisub_LDADD += libsubtitle_ass.a
aegisub_LDFLAGS += @FONTCONFIG_LIBS@ aegisub_LDFLAGS += @FONTCONFIG_LIBS@

View file

@ -405,7 +405,6 @@ if test -z "$ICONV_CFLAGS"; then
ICONV_CFLAGS="$CPPFLAGS"; ICONV_CFLAGS="$CPPFLAGS";
fi fi
if test "$enable_libass" != "no"; then if test "$enable_libass" != "no"; then
aegisub_save_CPPFLAGS="$CPPFLAGS" aegisub_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$ICONV_CFLAGS" CPPFLAGS="$ICONV_CFLAGS"
@ -414,10 +413,9 @@ if test "$enable_libass" != "no"; then
aegisub_save_LDFLAGS="$LDFLAGS" aegisub_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$ICONV_LDFLAGS" LDFLAGS="$ICONV_LDFLAGS"
AC_CHECK_LIB([iconv], [iconv_open],[ICONV_LDFLAGS="$ICONV_LIBS"; with_iconv="yes"], with_iconv="no") AC_CHECK_LIB([iconv], [iconv_open],[ICONV_LDFLAGS="$ICONV_LDFLAGS"; with_iconv="yes"], with_iconv="no")
LDFLAGS="$aegisub_save_LDFLAGS" LDFLAGS="$aegisub_save_LDFLAGS"
if test "$with_iconv" = "yes"; then if test "$with_iconv" = "yes"; then
LIBASS_LIBS="-L../libass -lass_aegisub" LIBASS_LIBS="-L../libass -lass_aegisub"
LIBASS_CFLAGS="-I../libass" LIBASS_CFLAGS="-I../libass"
@ -428,11 +426,12 @@ if test "$enable_libass" != "no"; then
fi fi
fi fi
if test "$with_libass" = "yes"; then if test "$with_libass" = "yes"; then
AC_DEFINE(WITH_LIBASS, 1, [Enable libass Subtitle Provider]) AC_DEFINE(WITH_LIBASS, 1, [Enable libass Subtitle Provider])
fi fi
AC_SUBST(ICONV_LDFLAGS)
AC_SUBST(ICONV_CFLAGS)
AC_SUBST(LIBASS_LIBS) AC_SUBST(LIBASS_LIBS)
AC_SUBST(LIBASS_CFLAGS) AC_SUBST(LIBASS_CFLAGS)
AM_CONDITIONAL([WITH_LIBASS], [test "$with_libass" = "yes"]) AM_CONDITIONAL([WITH_LIBASS], [test "$with_libass" = "yes"])

View file

@ -1,6 +1,6 @@
noinst_LIBRARIES = libass_aegisub.a noinst_LIBRARIES = libass_aegisub.a
AM_CPPFLAGS = @FREETYPE_CFLAGS@ -DHAVE_FONTCONFIG -DUSE_ICONV @FONTCONFIG_CFLAGS@ AM_CPPFLAGS = @FREETYPE_CFLAGS@ -DHAVE_FONTCONFIG -DUSE_ICONV @FONTCONFIG_CFLAGS@ @ICONV_CFLAGS@
libass_aegisub_a_SOURCES = \ libass_aegisub_a_SOURCES = \
ass.c \ ass.c \