From 7746efa54eefc86084d5b02e2046e84549d48855 Mon Sep 17 00:00:00 2001 From: Amar Takhar Date: Sun, 30 Mar 2008 08:08:43 +0000 Subject: [PATCH] * 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. --- aegisub/Makefile.am | 4 ++-- configure.in | 7 +++---- libass/Makefile.am | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/aegisub/Makefile.am b/aegisub/Makefile.am index 9e994fda4..ae956f461 100644 --- a/aegisub/Makefile.am +++ b/aegisub/Makefile.am @@ -9,7 +9,7 @@ AM_CXXFLAGS = -DAEGISUB -Iposix -include posix/defines.h -Iinclude @WX_CPPFLAGS@ bin_PROGRAMS = aegisub aegisub_LDADD = posix/libposix.a 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@ if BUILD_DARWIN @@ -56,7 +56,7 @@ endif if WITH_LIBASS noinst_LIBRARIES += libsubtitle_ass.a 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@ aegisub_LDADD += libsubtitle_ass.a aegisub_LDFLAGS += @FONTCONFIG_LIBS@ diff --git a/configure.in b/configure.in index 013f99677..5c8456030 100644 --- a/configure.in +++ b/configure.in @@ -405,7 +405,6 @@ if test -z "$ICONV_CFLAGS"; then ICONV_CFLAGS="$CPPFLAGS"; fi - if test "$enable_libass" != "no"; then aegisub_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$ICONV_CFLAGS" @@ -414,10 +413,9 @@ if test "$enable_libass" != "no"; then aegisub_save_LDFLAGS="$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" - if test "$with_iconv" = "yes"; then LIBASS_LIBS="-L../libass -lass_aegisub" LIBASS_CFLAGS="-I../libass" @@ -428,11 +426,12 @@ if test "$enable_libass" != "no"; then fi fi - if test "$with_libass" = "yes"; then AC_DEFINE(WITH_LIBASS, 1, [Enable libass Subtitle Provider]) fi +AC_SUBST(ICONV_LDFLAGS) +AC_SUBST(ICONV_CFLAGS) AC_SUBST(LIBASS_LIBS) AC_SUBST(LIBASS_CFLAGS) AM_CONDITIONAL([WITH_LIBASS], [test "$with_libass" = "yes"]) diff --git a/libass/Makefile.am b/libass/Makefile.am index c76c0ecdd..fd12c1d92 100644 --- a/libass/Makefile.am +++ b/libass/Makefile.am @@ -1,6 +1,6 @@ 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 = \ ass.c \