mirror of https://github.com/odrling/Aegisub
Fix some instances of LDFLAGS being confused with LIBS; based on a patch by RedDwarf69 on the bugtracker. Fixes #1136. Tested and confirmed to work on Ubuntu 10.04.2 LTS and FreeBSD 8.0. If you still have issues, reopen the ticket.
Originally committed to SVN as r5374.
This commit is contained in:
parent
e4e0cf5086
commit
bb8b94bcb5
|
@ -237,7 +237,7 @@ elif test -f "$srcdir/svn_revision"; then
|
|||
AC_MSG_RESULT([$SVN_REVISION from "$srcdir/svn_revision"])
|
||||
else
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_FAILURE([unable to get SVN Revision from $srcdir/svn_version or 'svnversion $srcdir'])
|
||||
AC_MSG_FAILURE([unable to get SVN Revision from $srcdir/svn_revision or 'svnversion $srcdir'])
|
||||
fi
|
||||
|
||||
# This is required in order for the config file to work correctly.
|
||||
|
@ -434,21 +434,21 @@ AC_SUBST(FONTCONFIG_LIBS)
|
|||
## iconv
|
||||
########
|
||||
AC_ARG_VAR([ICONV_CFLAGS], [CFLAGS to use for iconv (default: CPPFLAGS)])
|
||||
AC_ARG_VAR([ICONV_LDFLAGS], [LDFLAGS to use for iconv (default: LDFLAGS -liconv)])
|
||||
AC_ARG_VAR([ICONV_LIBS], [LIBS to use for iconv (default: LIBS -liconv)])
|
||||
|
||||
if test -z "$ICONV_LDFLAGS"; then
|
||||
if test -z "$ICONV_LIBS"; then
|
||||
if test "$build_linux" = "yes"; then
|
||||
ICONV_LDFLAGS="$LDFLAGS"
|
||||
ICONV_LIBS="$LIBS"
|
||||
else
|
||||
ICONV_LDFLAGS="$LDFLAGS -liconv";
|
||||
ICONV_LIBS="$LIBS -liconv";
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$ICONV_CFLAGS"; then
|
||||
ICONV_CFLAGS="$CPPFLAGS";
|
||||
ICONV_CFLAGS="$CPPFLAGS"; # I don't get this. Why CPPFLAGS? I would understand CFLAGS and even CXXFLAGS, but why CPPFLAGS? -Fluff
|
||||
fi
|
||||
|
||||
AC_AGI_COMPILE([iconv], [iconv], [$ICONV_CFLAGS], [$ICONV_LDFLAGS],[
|
||||
AC_AGI_COMPILE([iconv], [iconv], [$ICONV_CFLAGS], [$ICONV_LIBS],[
|
||||
#include <iconv.h>
|
||||
int main(void) {
|
||||
iconv_t ic;
|
||||
|
@ -457,7 +457,7 @@ int main(void) {
|
|||
return 0;
|
||||
} ])
|
||||
|
||||
AC_SUBST(ICONV_LDFLAGS)
|
||||
AC_SUBST(ICONV_LIBS)
|
||||
AC_SUBST(ICONV_CFLAGS)
|
||||
|
||||
|
||||
|
@ -471,21 +471,21 @@ AC_SUBST(ICONV_CFLAGS)
|
|||
AC_ARG_WITH(alsa, [ --without-alsa build without ALSA audio provider. (default: auto)], alsa_disabled="(disabled)")
|
||||
|
||||
AC_ARG_VAR([ALSA_CFLAGS], [CFLAGS to use for ALSA (default: CPPFLAGS)])
|
||||
AC_ARG_VAR([ALSA_LDFLAGS], [LDFLAGS to use for ALSA (default: -lasound)])
|
||||
AC_ARG_VAR([ALSA_LIBS], [LIBS to use for ALSA (default: -lasound)])
|
||||
|
||||
if test -z "$ALSA_LDFLAGS"; then
|
||||
ALSA_LDFLAGS="-lasound";
|
||||
if test -z "$ALSA_LIBS"; then
|
||||
ALSA_LIBS="-lasound";
|
||||
fi
|
||||
|
||||
if test -z "$ALSA_CFLAGS"; then
|
||||
ALSA_CFLAGS="$CPPFLAGS";
|
||||
ALSA_CFLAGS="$CPPFLAGS"; # I don't get this. Why CPPFLAGS? I would understand CFLAGS and even CXXFLAGS, but why CPPFLAGS? -Fluff
|
||||
fi
|
||||
|
||||
if test "$with_alsa" != "no"; then
|
||||
aegisub_save_LDFLAGS="$LDFLAGS"
|
||||
LDFLAGS="$ALSA_LDFLAGS"
|
||||
AC_CHECK_LIB([asound], [snd_pcm_open], [ALSA_LDFLAGS="-lasound"; with_alsa="yes"], [with_alsa="no"])
|
||||
LDFLAGS="$aegisub_save_LDFLAGS"
|
||||
aegisub_save_LIBS="$LDFLAGS"
|
||||
LIBS="$ALSA_LIBS"
|
||||
AC_CHECK_LIB([asound], [snd_pcm_open], [ALSA_LIBS="-lasound"; with_alsa="yes"], [with_alsa="no"])
|
||||
LIBS="$aegisub_save_LIBS"
|
||||
fi
|
||||
|
||||
if test "$with_alsa" != "no"; then
|
||||
|
@ -494,7 +494,7 @@ if test "$with_alsa" != "no"; then
|
|||
fi
|
||||
|
||||
AM_CONDITIONAL([HAVE_ALSA], [test "$with_alsa" != "no"])
|
||||
AC_SUBST(ALSA_LDFLAGS)
|
||||
AC_SUBST(ALSA_LIBS)
|
||||
|
||||
|
||||
############
|
||||
|
@ -642,6 +642,9 @@ fi
|
|||
|
||||
if test "$with_ffmpeg" != "no" && test "$enable_old_ffmpeg" != "yes"; then
|
||||
AC_AGI_COMPILE([FFMPEG], [ffmpeg], [$LIBSWSCALE_CFLAGS $LIBAVCODEC_CFLAGS $LIBAVFORMAT_CFLAGS $LIBAVUTIL_CFLAGS], [$LIBSWSCALE_LIBS $LIBAVCODEC_LIBS $LIBAVFORMAT_LIBS $LIBAVUTIL_LIBS],[
|
||||
#ifndef __STDC_CONSTANT_MACROS
|
||||
#define __STDC_CONSTANT_MACROS
|
||||
#endif
|
||||
extern "C" {
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
|
@ -878,7 +881,7 @@ fi
|
|||
aegisub_save_LIBS="$LIBS"
|
||||
LIBS="$LUA_LDFLAGS"
|
||||
if test "$with_lua" != no; then
|
||||
AC_AGI_COMPILE([Lua 5.1 (auto4)], [lua], [$LUA_CFLAGS], [],[
|
||||
AC_AGI_COMPILE([Lua 5.1 (auto4)], [lua], [$LUA_CFLAGS], [$LUA_LDFLAGS],[
|
||||
#include <lua.hpp>
|
||||
|
||||
int main () {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
AC_DEFUN([AC_AGI_COMPILE],[
|
||||
aegisub_save_LDFLAGS="$LDFLAGS"
|
||||
aegisub_save_LIBS="$LIBS"
|
||||
aegisub_save_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$3"
|
||||
LDFLAGS="$4"
|
||||
LIBS="$4"
|
||||
AC_CACHE_CHECK(
|
||||
[whether $1 works], [agi_cv_with_$2],
|
||||
[AC_RUN_IFELSE([$5],
|
||||
|
@ -15,7 +15,7 @@ AC_DEFUN([AC_AGI_COMPILE],[
|
|||
fi])
|
||||
])
|
||||
CPPFLAGS="$aegisub_save_CPPFLAGS"
|
||||
LDFLAGS="$aegisub_save_LDFLAGS"
|
||||
LIBS="$aegisub_save_LIBS"
|
||||
])
|
||||
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ AM_CXXFLAGS += -DAEGISUB -Iinclude -I../libffms/include @CXXFLAGS_OSX@ @WX_CPPFL
|
|||
bin_PROGRAMS = aegisub-2.1
|
||||
aegisub_2_1_LDADD = libresrc/libresrc.a $(libosxutil_lib)
|
||||
aegisub_2_1_CPPFLAGS = @FREETYPE_CFLAGS@
|
||||
aegisub_2_1_LDFLAGS = @DEBUG_FLAGS@ @PROFILE_FLAGS@ @GL_LIBS@ @PTHREAD_LIBS@ @WX_LIBS@ @ICONV_LDFLAGS@ $(libosxutil_ldflags) @CCMALLOC_LDFLAGS@ @EFENCE_LDFLAGS@
|
||||
aegisub_2_1_LDFLAGS = @DEBUG_FLAGS@ @PROFILE_FLAGS@ @GL_LIBS@ @PTHREAD_LIBS@ @WX_LIBS@ @ICONV_LIBS@ $(libosxutil_ldflags) @CCMALLOC_LDFLAGS@ @EFENCE_LDFLAGS@
|
||||
LIBS += @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @CCMALLOC_LIBS@
|
||||
|
||||
if PRECOMPILED_HEADER
|
||||
|
@ -54,32 +54,28 @@ aegisub_2_1_LDADD += libaudio_player.a
|
|||
if HAVE_ALSA
|
||||
noinst_LIBRARIES += libaudio_alsa.a
|
||||
libaudio_alsa_a_SOURCES = audio_player_alsa.cpp
|
||||
aegisub_2_1_LDFLAGS += @ALSA_LDFLAGS@
|
||||
aegisub_2_1_LDADD += libaudio_alsa.a
|
||||
aegisub_2_1_LDADD += libaudio_alsa.a @ALSA_LIBS@
|
||||
endif
|
||||
|
||||
if HAVE_PORTAUDIO
|
||||
noinst_LIBRARIES += libaudio_portaudio.a
|
||||
libaudio_portaudio_a_SOURCES = audio_player_portaudio.cpp
|
||||
libaudio_portaudio_a_CPPFLAGS = @PORTAUDIO_CFLAGS@
|
||||
aegisub_2_1_LDFLAGS += @PORTAUDIO_LIBS@
|
||||
aegisub_2_1_LDADD += libaudio_portaudio.a
|
||||
aegisub_2_1_LDADD += libaudio_portaudio.a @PORTAUDIO_LIBS@
|
||||
endif
|
||||
|
||||
if HAVE_PULSEAUDIO
|
||||
noinst_LIBRARIES += libaudio_pulseaudio.a
|
||||
libaudio_pulseaudio_a_SOURCES = audio_player_pulse.cpp
|
||||
libaudio_pulseaudio_a_CPPFLAGS = @LIBPULSE_CFLAGS@
|
||||
aegisub_2_1_LDFLAGS += @LIBPULSE_LIBS@
|
||||
aegisub_2_1_LDADD += libaudio_pulseaudio.a
|
||||
aegisub_2_1_LDADD += libaudio_pulseaudio.a @LIBPULSE_LIBS@
|
||||
endif
|
||||
|
||||
if HAVE_OPENAL
|
||||
noinst_LIBRARIES += libaudio_openal.a
|
||||
libaudio_openal_a_SOURCES = audio_player_openal.cpp
|
||||
libaudio_openal_a_CPPFLAGS = @OPENAL_CFLAGS@
|
||||
aegisub_2_1_LDFLAGS += @OPENAL_LIBS@
|
||||
aegisub_2_1_LDADD += libaudio_openal.a
|
||||
aegisub_2_1_LDADD += libaudio_openal.a @OPENAL_LIBS@
|
||||
endif
|
||||
|
||||
if HAVE_OSS
|
||||
|
@ -88,10 +84,6 @@ libaudio_oss_a_SOURCES = audio_player_oss.cpp
|
|||
aegisub_2_1_LDADD += libaudio_oss.a
|
||||
endif
|
||||
|
||||
if HAVE_FFMPEG
|
||||
aegisub_2_1_LDFLAGS += @LIBAVFORMAT_LIBS@ @LIBAVCODEC_LIBS@ @LIBSWSCALE_LIBS@ @LIBAVUTIL_LIBS@
|
||||
endif
|
||||
|
||||
if HAVE_PROVIDER_FFMPEG
|
||||
noinst_LIBRARIES += libaudiovideo_ffmpeg.a
|
||||
libaudiovideo_ffmpeg_a_SOURCES = audio_provider_lavc.cpp lavc_file.cpp video_provider_lavc.cpp lavc_keyframes.cpp
|
||||
|
@ -103,8 +95,11 @@ if HAVE_PROVIDER_FFMPEGSOURCE
|
|||
noinst_LIBRARIES += libaudiovideo_ffmpegsource.a
|
||||
libaudiovideo_ffmpegsource_a_SOURCES = audio_provider_ffmpegsource.cpp video_provider_ffmpegsource.cpp ffmpegsource_common.cpp
|
||||
libaudiovideo_ffmpegsource_a_CPPFLAGS = @LIBAVFORMAT_CFLAGS@ @LIBAVCODEC_CFLAGS@ @LIBSWSCALE_CFLAGS@ @LIBAVUTIL_CFLAGS@ @LIBPOSTPROC_CFLAGS@
|
||||
aegisub_2_1_LDADD += libaudiovideo_ffmpegsource.a ../libffms/libffmpegsource_aegisub.a
|
||||
aegisub_2_1_LDFLAGS += @LIBPOSTPROC_LIBS@
|
||||
aegisub_2_1_LDADD += libaudiovideo_ffmpegsource.a ../libffms/libffmpegsource_aegisub.a @LIBPOSTPROC_LIBS@
|
||||
endif
|
||||
|
||||
if HAVE_FFMPEG
|
||||
aegisub_2_1_LDADD += @LIBAVFORMAT_LIBS@ @LIBAVCODEC_LIBS@ @LIBSWSCALE_LIBS@ @LIBAVUTIL_LIBS@
|
||||
endif
|
||||
|
||||
noinst_LIBRARIES += libsubtitle_provider.a
|
||||
|
@ -117,8 +112,7 @@ noinst_LIBRARIES += libsubtitle_ass.a
|
|||
libsubtitle_ass_a_SOURCES = subtitles_provider_libass.cpp
|
||||
libsubtitle_ass_a_CPPFLAGS = @LIBASS_CFLAGS@ @ICONV_CFLAGS@
|
||||
LIBS += @LIBASS_LIBS@
|
||||
aegisub_2_1_LDADD += libsubtitle_ass.a
|
||||
aegisub_2_1_LDFLAGS += @FONTCONFIG_LIBS@
|
||||
aegisub_2_1_LDADD += libsubtitle_ass.a @FONTCONFIG_LIBS@
|
||||
endif
|
||||
|
||||
if WITH_CSRI
|
||||
|
@ -126,8 +120,7 @@ noinst_LIBRARIES += libsubtitle_csri.a
|
|||
libsubtitle_csri_a_SOURCES = subtitles_provider_csri.cpp
|
||||
libsubtitle_csri_a_CPPFLAGS = @ICONV_CFLAGS@ @CSRI_CFLAGS@
|
||||
LIBS += @CSRI_LIBS@
|
||||
aegisub_2_1_LDADD += libsubtitle_csri.a
|
||||
aegisub_2_1_LDFLAGS += @FONTCONFIG_LIBS@
|
||||
aegisub_2_1_LDADD += libsubtitle_csri.a @FONTCONFIG_LIBS@
|
||||
endif
|
||||
|
||||
if HAVE_AUTO4_LUA
|
||||
|
@ -171,8 +164,7 @@ endif
|
|||
if HAVE_HUNSPELL
|
||||
noinst_LIBRARIES += libmisc_hunspell.a
|
||||
libmisc_hunspell_a_SOURCES = spellchecker_hunspell.cpp
|
||||
aegisub_2_1_LDFLAGS += @HUNSPELL_LIBS@
|
||||
aegisub_2_1_LDADD += libmisc_hunspell.a
|
||||
aegisub_2_1_LDADD += libmisc_hunspell.a @HUNSPELL_LIBS@
|
||||
endif
|
||||
|
||||
if HAVE_UNIVCHARDET
|
||||
|
|
Loading…
Reference in New Issue