Ticket #1136: aegisub-2.1.8-as_needed.patch
| File aegisub-2.1.8-as_needed.patch, 5.8 KB (added by RedDwarf69, 2 years ago) |
|---|
-
m4macros/ac_agi.m4
old new 1 1 AC_DEFUN([AC_AGI_COMPILE],[ 2 aegisub_save_L DFLAGS="$LDFLAGS"2 aegisub_save_LIBS="$LIBS" 3 3 aegisub_save_CPPFLAGS="$CPPFLAGS" 4 4 CPPFLAGS="$3" 5 L DFLAGS="$4"5 LIBS="$4" 6 6 AC_CACHE_CHECK( 7 7 [whether $1 works], [agi_cv_with_$2], 8 8 [AC_RUN_IFELSE([$5], … … AC_DEFUN([AC_AGI_COMPILE],[ 15 15 fi]) 16 16 ]) 17 17 CPPFLAGS="$aegisub_save_CPPFLAGS" 18 L DFLAGS="$aegisub_save_LDFLAGS"18 LIBS="$aegisub_save_LIBS" 19 19 ]) 20 20 21 21 -
configure.in
old new AC_SUBST(ICONV_CFLAGS) 464 464 AC_ARG_WITH(alsa, [ --without-alsa build without ALSA audio provider. (default: auto)], alsa_disabled="(disabled)") 465 465 466 466 AC_ARG_VAR([ALSA_CFLAGS], [CFLAGS to use for ALSA (default: CPPFLAGS)]) 467 AC_ARG_VAR([ALSA_L DFLAGS], [LDFLAGS to use for ALSA (default: -lasound)])467 AC_ARG_VAR([ALSA_LIBS], [LIBS to use for ALSA (default: -lasound)]) 468 468 469 if test -z "$ALSA_L DFLAGS"; then470 ALSA_L DFLAGS="-lasound";469 if test -z "$ALSA_LIBS"; then 470 ALSA_LIBS="-lasound"; 471 471 fi 472 472 473 473 if test -z "$ALSA_CFLAGS"; then … … if test -z "$ALSA_CFLAGS"; then 475 475 fi 476 476 477 477 if test "$with_alsa" != "no"; then 478 aegisub_save_L DFLAGS="$LDFLAGS"479 L DFLAGS="$ALSA_LDFLAGS"480 AC_CHECK_LIB([asound], [snd_pcm_open], [ALSA_L DFLAGS="-lasound"; with_alsa="yes"], [with_alsa="no"])481 L DFLAGS="$aegisub_save_LDFLAGS"478 aegisub_save_LIBS="$LIBS" 479 LIBS="$ALSA_LIBS" 480 AC_CHECK_LIB([asound], [snd_pcm_open], [ALSA_LIBS="-lasound"; with_alsa="yes"], [with_alsa="no"]) 481 LIBS="$aegisub_save_LIBS" 482 482 fi 483 483 484 484 if test "$with_alsa" != "no"; then … … if test "$with_alsa" != "no"; then 487 487 fi 488 488 489 489 AM_CONDITIONAL([HAVE_ALSA], [test "$with_alsa" != "no"]) 490 AC_SUBST(ALSA_L DFLAGS)490 AC_SUBST(ALSA_LIBS) 491 491 492 492 493 493 ############ … … fi 869 869 aegisub_save_LIBS="$LIBS" 870 870 LIBS="$LUA_LDFLAGS" 871 871 if test "$with_lua" != no; then 872 AC_AGI_COMPILE([Lua 5.1 (auto4)], [lua], [$LUA_CFLAGS], [ ],[872 AC_AGI_COMPILE([Lua 5.1 (auto4)], [lua], [$LUA_CFLAGS], [$LUA_LDFLAGS],[ 873 873 #include <lua.hpp> 874 874 875 875 int main () { -
src/Makefile.am
old new aegisub_2_1_LDADD += libaudio_player.a 52 52 if HAVE_ALSA 53 53 noinst_LIBRARIES += libaudio_alsa.a 54 54 libaudio_alsa_a_SOURCES = audio_player_alsa.cpp 55 aegisub_2_1_LDFLAGS += @ALSA_LDFLAGS@ 56 aegisub_2_1_LDADD += libaudio_alsa.a 55 aegisub_2_1_LDADD += libaudio_alsa.a @ALSA_LIBS@ 57 56 endif 58 57 59 58 if HAVE_PORTAUDIO 60 59 noinst_LIBRARIES += libaudio_portaudio.a 61 60 libaudio_portaudio_a_SOURCES = audio_player_portaudio.cpp 62 61 libaudio_portaudio_a_CPPFLAGS = @PORTAUDIO_CFLAGS@ 63 aegisub_2_1_LDFLAGS += @PORTAUDIO_LIBS@ 64 aegisub_2_1_LDADD += libaudio_portaudio.a 62 aegisub_2_1_LDADD += libaudio_portaudio.a @PORTAUDIO_LIBS@ 65 63 endif 66 64 67 65 if HAVE_PULSEAUDIO 68 66 noinst_LIBRARIES += libaudio_pulseaudio.a 69 67 libaudio_pulseaudio_a_SOURCES = audio_player_pulse.cpp 70 68 libaudio_pulseaudio_a_CPPFLAGS = @LIBPULSE_CFLAGS@ 71 aegisub_2_1_LDFLAGS += @LIBPULSE_LIBS@ 72 aegisub_2_1_LDADD += libaudio_pulseaudio.a 69 aegisub_2_1_LDADD += libaudio_pulseaudio.a @LIBPULSE_LIBS@ 73 70 endif 74 71 75 72 if HAVE_OPENAL 76 73 noinst_LIBRARIES += libaudio_openal.a 77 74 libaudio_openal_a_SOURCES = audio_player_openal.cpp 78 75 libaudio_openal_a_CPPFLAGS = @OPENAL_CFLAGS@ 79 aegisub_2_1_LDFLAGS += @OPENAL_LIBS@ 80 aegisub_2_1_LDADD += libaudio_openal.a 76 aegisub_2_1_LDADD += libaudio_openal.a @OPENAL_LIBS@ 81 77 endif 82 78 83 79 if HAVE_OSS … … libaudio_oss_a_SOURCES = audio_player_os 86 82 aegisub_2_1_LDADD += libaudio_oss.a 87 83 endif 88 84 89 if HAVE_FFMPEG90 aegisub_2_1_LDFLAGS += @LIBAVFORMAT_LIBS@ @LIBAVCODEC_LIBS@ @LIBSWSCALE_LIBS@ @LIBAVUTIL_LIBS@91 endif92 93 85 if HAVE_PROVIDER_FFMPEG 94 86 noinst_LIBRARIES += libaudiovideo_ffmpeg.a 95 87 libaudiovideo_ffmpeg_a_SOURCES = audio_provider_lavc.cpp lavc_file.cpp video_provider_lavc.cpp lavc_keyframes.cpp … … if HAVE_PROVIDER_FFMPEGSOURCE 101 93 noinst_LIBRARIES += libaudiovideo_ffmpegsource.a 102 94 libaudiovideo_ffmpegsource_a_SOURCES = audio_provider_ffmpegsource.cpp video_provider_ffmpegsource.cpp ffmpegsource_common.cpp 103 95 libaudiovideo_ffmpegsource_a_CPPFLAGS = @LIBAVFORMAT_CFLAGS@ @LIBAVCODEC_CFLAGS@ @LIBSWSCALE_CFLAGS@ @LIBAVUTIL_CFLAGS@ @LIBPOSTPROC_CFLAGS@ 104 aegisub_2_1_LDADD += libaudiovideo_ffmpegsource.a ../libffms/libffmpegsource_aegisub.a 105 aegisub_2_1_LDFLAGS += @LIBPOSTPROC_LIBS@ 96 aegisub_2_1_LDADD += libaudiovideo_ffmpegsource.a ../libffms/libffmpegsource_aegisub.a @LIBPOSTPROC_LIBS@ 97 endif 98 99 if HAVE_FFMPEG 100 aegisub_2_1_LDADD += @LIBAVFORMAT_LIBS@ @LIBAVCODEC_LIBS@ @LIBSWSCALE_LIBS@ @LIBAVUTIL_LIBS@ 106 101 endif 107 102 108 103 noinst_LIBRARIES += libsubtitle_provider.a … … noinst_LIBRARIES += libsubtitle_ass.a 115 110 libsubtitle_ass_a_SOURCES = subtitles_provider_libass.cpp 116 111 libsubtitle_ass_a_CPPFLAGS = @LIBASS_CFLAGS@ @ICONV_CFLAGS@ 117 112 LIBS += @LIBASS_LIBS@ 118 aegisub_2_1_LDADD += libsubtitle_ass.a 119 aegisub_2_1_LDFLAGS += @FONTCONFIG_LIBS@ 113 aegisub_2_1_LDADD += libsubtitle_ass.a @FONTCONFIG_LIBS@ 120 114 endif 121 115 122 116 if WITH_CSRI … … noinst_LIBRARIES += libsubtitle_csri.a 124 118 libsubtitle_csri_a_SOURCES = subtitles_provider_csri.cpp 125 119 libsubtitle_csri_a_CPPFLAGS = @ICONV_CFLAGS@ @CSRI_CFLAGS@ 126 120 LIBS += @CSRI_LIBS@ 127 aegisub_2_1_LDADD += libsubtitle_csri.a 128 aegisub_2_1_LDFLAGS += @FONTCONFIG_LIBS@ 121 aegisub_2_1_LDADD += libsubtitle_csri.a @FONTCONFIG_LIBS@ 129 122 endif 130 123 131 124 if HAVE_AUTO4_LUA … … endif 169 162 if HAVE_HUNSPELL 170 163 noinst_LIBRARIES += libmisc_hunspell.a 171 164 libmisc_hunspell_a_SOURCES = spellchecker_hunspell.cpp 172 aegisub_2_1_LDFLAGS += @HUNSPELL_LIBS@ 173 aegisub_2_1_LDADD += libmisc_hunspell.a 165 aegisub_2_1_LDADD += libmisc_hunspell.a @HUNSPELL_LIBS@ 174 166 endif 175 167 176 168 if HAVE_UNIVCHARDET
