diff options
54 files changed, 569 insertions, 736 deletions
diff --git a/autogen.sh b/autogen.sh index 33ef528a8..95bce9774 100755 --- a/autogen.sh +++ b/autogen.sh @@ -192,7 +192,7 @@ run_automake () { echo $_echo_n " + Running automake: $_echo_c"; - automake --gnu --add-missing --copy; + automake --gnu --add-missing --copy -Wno-portability; echo "done." } diff --git a/configure.ac b/configure.ac index aa282de1a..433387eb1 100644 --- a/configure.ac +++ b/configure.ac @@ -83,7 +83,7 @@ dnl include -O2, which is not desirable in a debug build, and it messes with dnl other optimizations that we'll want to be setting ourselves later. ASFLAGS="-g $ASFLAGS" CFLAGS="-g $CFLAGS" -CPPFLAGS="-D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE $CPPFLAGS" +CPPFLAGS="-D_REENTRANT -DXINE_COMPILE $CPPFLAGS" LDFLAGS="-g $LDFLAGS" OBJCFLAGS="-g $OBJCFLAGS" @@ -211,37 +211,6 @@ else fi AC_SUBST(STATIC) -dnl Windows ports checks -dnl check if we are using the cygwin, mingw or cygwin with mno-cygwin mode -dnl in which case we are actually dealing with a mingw32 compiler -dnl This cannot be done until AC_PROG_EGREP and AC_PROG_CC are both done. -case "$host_or_hostalias" in - *-*-mingw* | *-*-cygwin*) - case "$host_or_hostalias" in - *-*-mingw32*) - WIN32_SYS=mingw32 - ;; - *-*-cygwin*) - AC_EGREP_CPP([yes], - [#ifdef WIN32 - yes - #endif], - [WIN32_SYS=mingw32], [WIN32_SYS=cygwin]) - ;; - esac - - if test "$WIN32_SYS" = "mingw32"; then - WIN32_CPPFLAGS='-I$(top_srcdir)/win32/include' - LIBS="-lwinmm -lwsock32 $LIBS" - GOOM_LIBS="-liberty" - fi - LDFLAGS="-no-undefined $LDFLAGS" - ;; -esac -AC_SUBST(GOOM_LIBS) -AC_SUBST(WIN32_CPPFLAGS) -AM_CONDITIONAL([WIN32], [test x"$WIN32_SYS" = x"mingw32"]) - dnl --------------------------------------------- dnl REVISIT: NLS Support @@ -332,6 +301,17 @@ dnl ----------------------------------- dnl checks for compiler characteristics dnl ----------------------------------- +if test x"$GCC" = x"yes"; then + GCC_VERSION="`"$CC" -dumpversion`" + GCC_VERSION_MAJOR="`echo "$GCC_VERSION" | cut -d '.' -f1`" + GCC_VERSION_MINOR="`echo "$GCC_VERSION" | cut -d '.' -f2`" + GCC_VERSION_PATCHLEVEL="`echo "$GCC_VERSION" | cut -d '.' -f3`" +fi +AC_SUBST(GCC_VERSION) +AC_SUBST(GCC_VERSION_MAJOR) +AC_SUBST(GCC_VERSION_MINOR) +AC_SUBST(GCC_VERSION_PATCHLEVEL) + CC_CHECK_WERROR CC_PTHREAD_FLAGS([], [AC_MSG_ERROR([Pthread support is needed])]) @@ -372,9 +352,14 @@ CC_ATTRIBUTE_SENTINEL CC_ATTRIBUTE_FORMAT CC_ATTRIBUTE_FORMAT_ARG +CC_CHECK_CFLAGS([-pipe], [miscflags="$miscflags -pipe"]) + dnl Set warning flags for warnings that we do not want to skip. In all cases, dnl these warnings should be enabled. Set these into CFLAGS and OBJCFLAGS dnl later after all testing is done. + +CC_CHECK_CFLAGS([-Wall], [warnflags="$warnflags -Wall"]) + CC_CHECK_CFLAGS([-Wformat=2], [wformat="-Wformat=2"], [CC_CHECK_CFLAGS([-Wformat], [wformat="-Wformat"])]) if test x"$wformat" != x""; then @@ -389,16 +374,340 @@ CC_CHECK_CFLAGS([-Werror-implicit-function-declaration], [warnflags="$warnflags CC_CHECK_CFLAGS([-Wstrict-aliasing=2], [warnflags="$warnflags -Wstrict-aliasing=2"], [CC_CHECK_CFLAGS([-Wstrict-aliasing], [warnflags="$warnflags -Wstrict-aliasing"])]) +CC_CHECK_CFLAGS([-Wchar-subscripts], [warnflags="$warnflags -Wchar-subscripts"]) +CC_CHECK_CFLAGS([-Wmissing-declarations], [warnflags="$warnflags -Wmissing-declarations"]) +CC_CHECK_CFLAGS([-Wmissing-prototypes], [warnflags="$warnflags -Wmissing-prototypes"]) + +dnl Some combinations of gcc and glibc produce useless warnings on memset when +dnl compiling with -Wpointer-arith, so check for this first. +AC_MSG_CHECKING([for sane -Wpointer-arith]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], [[int a; memset(&a, 0, sizeof(int))]])], + [warnflags="$warnflags -Wpointer-arith" + AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) + dnl FreeBSD (et al.) does not complete linking for shared objects when pthreads dnl are requested, as different implementations are present; to avoid problems -dnl use -Wl,-z,defs only for those platform not behaving this way. -case $host_or_hostalias in +dnl use -Wl,-z,defs only for those platforms not behaving this way. +case "$host_or_hostalias" in *-freebsd*) ;; + + dnl check if we are using the cygwin, mingw or cygwin with mno-cygwin mode + dnl in which case we are actually dealing with a mingw32 compiler + dnl This cannot be done until AC_PROG_EGREP and AC_PROG_CC are both done. + *-*-mingw* | *-*-cygwin*) + case "$host_or_hostalias" in + *-*-mingw32*) + WIN32_SYS=mingw32 + ;; + *-*-cygwin*) + AC_EGREP_CPP([yes], + [#ifdef WIN32 + yes + #endif], + [WIN32_SYS=mingw32], [WIN32_SYS=cygwin]) + ;; + esac + + if test "$WIN32_SYS" = "mingw32"; then + WIN32_CPPFLAGS='-I$(top_srcdir)/win32/include' + LIBS="-lwinmm -lwsock32 $LIBS" + GOOM_LIBS="-liberty" + AC_SUBST(GOOM_LIBS) + AC_SUBST(WIN32_CPPFLAGS) + fi + LDFLAGS="-no-undefined $LDFLAGS" + ;; + *) - AC_TRY_LDFLAGS([-Wl,-z,defs], [NOUNDEF="-Wl,-z,defs"]) + CC_CHECK_LDFLAGS([-Wl,-z,defs], [NOUNDEF="-Wl,-z,defs"]) + AC_SUBST([NOUNDEF]) + ;; +esac + +AM_CONDITIONAL([WIN32], [test x"$WIN32_SYS" = x"mingw32"]) + +dnl No optimization at all. For gcc, this is the optimization level. +O0_CFLAGS="-O0" + +dnl Lowest level of optimization. For gcc, this enables: +dnl -fdefer-pop -fdelayed-branch -fguess-branch-probability -fcprop-registers +dnl -floop-optimize -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce +dnl -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs +dnl -ftree-sra -ftree-copyrename -ftree-fre -ftree-ch -fmerge-constants +dnl On platforms where -fomit-frame-pointer does not interfere with debugging, +dnl it is also enabled by -O1. +O1_CFLAGS="-O1" + +dnl Middle level of optimization. For gcc, this enables -O1 and: +dnl -fthread-jumps -fcrossjumping -foptimize-sibling-calls -fcse-follow-jumps +dnl -fcse-skip-blocks -fgcse -fgcse-lm -fexpensive-optimizations +dnl -fstrength-reduce -frerun-cse-after-loop -frerun-loop-opt -fcaller-saves +dnl -fforce-mem -fpeephole2 -fschedule-insns -fschedule-insns2 +dnl -fsched-interblock -fsched-spec -fregmove -fstrict-aliasing +dnl -fdelete-null-pointer-checks -freorder-blocks -freorder-functions +dnl -funit-at-a-time -falign-functions -falign-jumps -falign-loops +dnl -falign-labels -ftree-pre +dnl Note that Apple's version of gcc differs slightly, because it does not enable +dnl -fstrict-aliasing -freorder-blocks -fsched-interblock +O2_CFLAGS="-O2" + +dnl Highest level of optimization. For gcc, this enables -O2 and: +dnl -finline-functions -funswitch-loops -fgcse-after-reload +O3_CFLAGS="-O3" + +dnl gcc 3.3.5 (at least) is known to be buggy wrt optimization with +dnl -finline-functions, so use -fno-inline-functions for gcc < 3.4.0 +if test x"$GCC" = x"yes"; then + if test "$GCC_VERSION_MAJOR" -lt 3; then + O3_CFLAGS="$O3_CFLAGS -fno-inline-functions" + else + if test "$GCC_VERSION_MAJOR" -eq 3 -a "$GCC_VERSION_MINOR" -lt 4; then + O3_CFLAGS="$O3_CFLAGS -fno-inline-functions" + fi + fi +fi + +CC_CHECK_CFLAGS([-ffast-math], [optflags="$optflags -ffast-math"]) +CC_CHECK_CFLAGS([-fexpensive-optimizations], [optflags="$optflags -fexpensive-optimizations"]) + +case "$host_or_hostalias" in + alphaev56-*) cpuflags="-mcpu=ev56 -mieee $cpuflags" ;; + alpha*) cpuflags="-mieee $cpuflags" ;; + + armv4l-*-linux*) + cpuflags="-mcpu=strongarm1100 -ffast-math -fsigned-char $cpuflags" + DEFAULT_OCFLAGS='$(O2_CFLAGS)' + ;; + + sparc*-*-linux*) + case "`uname -m`" in + sparc) cpuflags="-mcpu=supersparc -mtune=supersparc" ;; + sparc64) cpuflags="-mcpu=ultrasparc -mtune=ultrasparc" ;; + esac + test x"$enable_vis" != x"no" && has_vis=yes + AC_DEFINE([ARCH_SPARC], [], [Define this if you're running SPARC architecture]) + ;; + + sparc-*-solaris*) + if test x"$GCC" = x"yes"; then + case "`uname -m`" in + sun4c) cpuflags="-mcpu=v7 -mtune=supersparc" ;; + sun4m) cpuflags="-mcpu=v8 -mtune=supersparc" ;; + sun4u) + if test x"$GCC_VERSION_MAJOR" -lt 3; then + # -mcpu=ultrasparc triggers a GCC 2.95.x compiler bug + # when compiling video_out.c: + # gcc: Internal compiler error: program cc1 got fatal signal 11 + # avoid -mcpu=ultrasparc with gcc 2.* + cpuflags="-mcpu=v8 -mtune=ultrasparc" + else + cpuflags="-mcpu=ultrasparc -mtune=ultrasparc" + fi + ;; + esac + if test "$GCC_VERSION_MAJOR" -ge 3; then + test x$"enable_vis" != x"no" && has_vis=yes + fi + else + case "`uname -m`" in + sun4c) cpuflags="-xarch=v7" ;; + sun4m) cpuflags="-xarch=v8" ;; + sun4u) cpuflags="-xarch=v8plusa" ;; + esac + O1_CFLAGS="-fast -xCC" + O2_CFLAGS="$O1_CFLAGS" + O3_CFLAGS="$O1_CFLAGS" + fi + AC_DEFINE([ARCH_SPARC], [], [Define this if you're running SPARC architecture]) + ;; + + x86_64-*) + arch_x86=yes + AC_DEFINE([ARCH_X86_64], [], [Define this if you're running x86 architecture 64 bits]) + ;; + + *-*-darwin*) + case "$host_or_hostalias" in + i386-* | universal-* | x86_64-*) + arch_x86=yes + ;; + ppc* | powerpc*) + dnl avoid ppc compilation crash + AS="$CC" + + AC_CHECK_HEADER([altivec.h], [], [enable_altivec=no]) + if test x"$enable_altivec" != x"no"; then + AC_DEFINE([ENABLE_ALTIVEC], [], [Define this if you want to use altivec on PowerPC CPUs]) + cpuflags="$cpuflags -faltivec -maltivec" + LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -force_cpusubtype_ALL" + fi + ;; + esac + + enable_impure_text=yes + HOST_OS_DARWIN=1 + dnl HOST_OS_DARWIN is used by a bunch of difference stuff, including + dnl libdvdnav, libmpeg2, and xine itself (xine-engine, xine-utils) + AC_DEFINE([HOST_OS_DARWIN], 1, [Define this if built on Mac OS X/Darwin]) + dnl CONFIG_DARWIN is used by ffmpeg, so anything that pulls ffmpeg + dnl headers needs to have this set. + AC_DEFINE([CONFIG_DARWIN], 1, [Define this if built on Mac OS X/Darwin]) + CPPFLAGS="-D_INTL_REDIRECT_MACROS $CPPFLAGS" + ;; + + ppc-*-linux* | powerpc-*) + dnl avoid ppc compilation crash + AS="$CC" + AC_DEFINE([ARCH_PPC], [], [Define this if you're running PowerPC architecture]) + + AC_CHECK_HEADER([altivec.h], [], [enable_altivec=no]) + + if test x"$enable_altivec" != x"no"; then + AC_DEFINE([ENABLE_ALTIVEC], [], [Define this if you want to use altivec on PowerPC CPUs]) + cpuflags="$cpuflags -maltivec" + fi + ;; + + i?86-* | k?-* | athlon-* | pentium*) + arch_x86=yes + enable_impure_text=yes + + case "$host_or_hostalias" in + *-*-cygwin* | *-*-mingw32*) + CC_CHECK_CFLAGS([-fno-omit-frame-pointer], [W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-omit-frame-pointer"]) + CC_CHECK_CFLAGS([-fno-inline-functions], [W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-inline-functions"]) + CC_CHECK_CFLAGS([-fno-rename-registers], [W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-rename-registers"]) + AC_SUBST(W32_NO_OPTIMIZE) + case "$host_or_hostalias" in + *-*-cygwin*) LIBS="$LIBS @INTLLIBS@ -lkernel32" ;; + esac + ;; + esac + + AC_DEFINE([ARCH_X86_32], [], [Define this if you're running x86 architecture 32 bits]) + + if test x"$GCC" = x"yes" -o x"${CC##*/}" = x"icc"; then + if test x"$GCC" = x"yes"; then + # GCC optimizations + CC_CHECK_CFLAGS([-mtune=i386], [sarchopt="-mtune"], + [CC_CHECK_CFLAGS([-mcpu=i386], [sarchopt="-mcpu"], + [CC_CHECK_CFLAGS([-march=i386], [sarchopt="-march"], [sarchopt="no"])])]) + if test "$sarchopt" != "no"; then + case "$host_or_hostalias" in + i386-*) archopt_val="i386" ;; + i486-*) archopt_val="i486" ;; + i586-*) archopt_val="pentium" ;; + pentium-mmx-*) archopt_val="pentium-mmx" ;; + k6-2* | k6-3-*) archopt_val="k6-2" ;; + k6-*) archopt_val="k6" ;; + pentium3-*) archopt_val="pentium3" ;; + pentium4-*) archopt_val="pentium4" ;; + + athlon-4-* | athlon-xp-* | althon-mp-*) archopt_val="athlon-4" ;; + k7-* | athlon-tbird-* | athlon-*) archopt_val="athlon" ;; + + pentiumpro-* | pentium2-* | i686-*) + archopt_val="pentiumpro" + if test x"$cross_compiling" != x"yes"; then + if test -f /proc/cpuinfo; then + modelname=`cat /proc/cpuinfo | grep "model\ name\ :" | sed -e 's/ //g' | cut -d ':' -f2` + case "$modelname" in + *Athlon* | *Duron* | *K7*) + dnl Special check for k7 cpu CC support + CC_CHECK_CFLAGS([$sarchopt=athlon], + [archopt_val="athlon"], [archopt_val="i686"]) + ;; + VIAEzra) + archopt_val="c3" + ;; + esac + fi + fi + ;; + esac + test x$"archopt_val" != x"" && cpuflags="$cpuflags $sarchopt=$archopt_val" + fi + else + # Intel optimizations + O3_CFLAGS="$O3_CFLAGS -unroll -ipo -ipo_obj" + fi + fi ;; esac -AC_SUBST([NOUNDEF]) + +if test "x$has_vis" = "xyes"; then + AC_DEFINE([ENABLE_VIS], [], [Define this if you have Sun UltraSPARC CPU]) + case "$cpuflags" in + *-mcpu=*) ;; + *) cpuflags="$cpuflags -mcpu=v9" ;; + esac +fi +AM_CONDITIONAL([ENABLE_VIS], test x"$has_vis" = x"yes") + +dnl Allow turning off/on of optimizations. By default, optimizations are +dnl enabled if --enable-debug is not specified. Even with --enable-debug, +dnl optimizations can be enabled by explicitly specifying --enable-optimizations +AC_ARG_ENABLE([optimizations], + [AS_HELP_STRING([--disable-optimizations], [Don't try to guess what optimization to enable])], + [], [test x"$enable_debug" != x"no" && enable_optimizations="no"]) +if test x"$enable_optimizations" = x"no"; then + O1_CFLAGS="$O0_CLFAGS" + O2_CFLAGS="$O0_CFLAGS" + O3_CFLAGS="$O0_CFLAGS" +else + O1_CFLAGS="$O1_CFLAGS $optflags $cpuflags" + O2_CFLAGS="$O2_CFLAGS $optflags $cpuflags" + O3_CFLAGS="$O3_CFLAGS $optflags $cpuflags" + + dnl For multi-pass compilation: never when cross-compiling + if test x"$cross_compiling" != x"yes"; then + if test x"$GCC" = x"yes"; then + CC_CHECK_CFLAGS([-fprofile-arcs], [CC_CHECK_CFLAGS([-fbranch-probabilities], + [PASS1_CFLAGS="-fprofile-arcs $PASS1_CFLAGS" + PASS2_CFLAGS="-fbranch-probabilities $PASS2_CFLAGS"])]) + else + pass1flags="-prof_dir \$(PWD)/\$(top_builddir)/ -prof_genx" + pass2flags="-prof_dir \$(PWD)/\$(top_builddir)/ -prof_use" + CC_CHECK_CFLAGS(["$pass1flags"], [CC_CHECK_CFLAGS(["$pass2flags"], + [PASS1_CFLAGS="$pass1flags $PASS1_CFLAGS" + PASS2_CFLAGS="$pass2flags $PASS2_CFLAGS"])]) + fi + fi +fi +AC_SUBST(O0_CFLAGS) +AC_SUBST(O1_CFLAGS) +AC_SUBST(O2_CFLAGS) +AC_SUBST(O3_CFLAGS) + +AC_SUBST(PASS1_CFLAGS) +AC_SUBST(PASS2_CFLAGS) + +test x"$DEFAULT_OCFLAGS" = x"" && DEFAULT_OCFLAGS='$(O3_CFLAGS)' +AC_SUBST(DEFAULT_OCFLAGS) + +if test x"$arch_x86" = x"yes"; then + AC_DEFINE([ARCH_X86], [], [Define this if you're running x86 architecture]) + AC_DEFINE([HAVE_MMX], [], [Define this if you can compile MMX asm instructions]) +fi +AM_CONDITIONAL([ARCH_X86], test x"$arch_x86" = x"yes") +AM_CONDITIONAL([HAVE_MMX], test x"$arch_x86" = x"yes") +AM_CONDITIONAL([HOST_OS_DARWIN], test x"$HOST_OS_DARWIN" = x"1") + +if test x"$enable_impure_text" = x"yes"; then + case "$host_or_hostalias" in + *solaris*) + if test "$GCC" = yes; then + IMPURE_TEXT_LDFLAGS="-mimpure-text" + else + IMPURE_TEXT_LDFLAGS="-z textoff" + fi + ;; + *darwin*) + IMPURE_TEXT_LDFLAGS="-Wl,-read_only_relocs,warning" + ;; + esac +fi +AC_SUBST(IMPURE_TEXT_LDFLAGS) dnl ---------------------------- @@ -1702,161 +2011,6 @@ fi AM_CONDITIONAL(HAVE_W32DLL, test "x$enable_w32dll" != "xno") - - - - - - - - - - - - - -AC_OPTIMIZATIONS - -arch_x86="no" -enable_armv4l="no" - -case "$host_or_hostalias" in - i?86-* | k?-* | athlon-* | pentium*-) - dnl enable x86 specific parts of the code - dnl - dnl all of this stuff needs gcc/gas; it uses gnu c compiler extensions - dnl like the extended asm() or __attribute(__cdecl__), or other direct - dnl mmx/sse/3dnow assembler instructions. - dnl - AC_DEFINE_UNQUOTED(ARCH_X86_32,,[Define this if you're running x86 architecture 32 bits]) - arch_x86="yes" - enable_impure_text="yes" - - case "$host_or_hostalias" in - *-*-cygwin) - LIBS="$LIBS @INTLLIBS@ -lkernel32" - ;; - esac - ;; - x86_64-*) - AC_DEFINE_UNQUOTED(ARCH_X86_64,,[Define this if you're running x86 architecture 64 bits]) - arch_x86="yes" - ;; - universal-*-darwin*) - enable_impure_text="yes" - ;; - powerpc-*-darwin*) - dnl avoid ppc compilation crash - AS="$CC" - AC_DEFINE_UNQUOTED(ARCH_PPC,,[Define this if you're running PowerPC architecture]) - - AC_CHECK_HEADER([altivec.h], , enable_altivec=no) - - if test "x$enable_altivec" != xno; then - AC_DEFINE_UNQUOTED(ENABLE_ALTIVEC,,[Define this if you want to use altivec on PowerPC CPUs]) - CFLAGS="$CFLAGS -faltivec -maltivec" - LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -force_cpusubtype_ALL -faltivec -maltivec" - fi - ;; - ppc-*-linux* | powerpc-*) - dnl avoid ppc compilation crash - AS="$CC" - AC_DEFINE_UNQUOTED(ARCH_PPC,,[Define this if you're running PowerPC architecture]) - - AC_CHECK_HEADER([altivec.h], , enable_altivec=no) - - if test "x$enable_altivec" != xno; then - AC_DEFINE_UNQUOTED(ENABLE_ALTIVEC,,[Define this if you have a Motorola 74xx CPU]) - CFLAGS="$CFLAGS -maltivec" - LIBMPEG2_CFLAGS="$LIBMPEG2_CFLAGS -maltivec" - fi - ;; - sparc*-*-linux*) - if test "x$enable_vis" != xno; then - has_vis=yes - fi - - AC_DEFINE_UNQUOTED(ARCH_SPARC,,[Define this if you're running SPARC architecture]) - ;; - sparc-*-solaris*) - if test "$GCC" = yes; then - case `$CC --version 2>/dev/null` in - 1.*|2.*) ;; - *) - if test "x$enable_vis" != xno; then - has_vis=yes - fi - ;; - esac - - AC_DEFINE_UNQUOTED(ARCH_SPARC,,[Define this if you're running SPARC architecture]) - fi - ;; - armv4l-*-linux*) - enable_armv4l="yes" - ;; -esac - -if test "x$has_vis" = "xyes"; then - AC_DEFINE_UNQUOTED(ENABLE_VIS,,[Define this if you have Sun UltraSPARC CPU]) - case "$CFLAGS" in - *-mcpu=*) ;; - *) CFLAGS="$CFLAGS -mcpu=v9" ;; - esac -fi -AM_CONDITIONAL(ENABLE_VIS, test "x$has_vis" = "xyes") - -if test "x$arch_x86" = "xyes"; then - AC_DEFINE_UNQUOTED(ARCH_X86,,[Define this if you're running x86 architecture]) - AC_DEFINE_UNQUOTED(HAVE_MMX,,[Define this if you can compile MMX asm instructions]) -fi -AM_CONDITIONAL(ARCH_X86, test "x$arch_x86" = "xyes") -AM_CONDITIONAL(HAVE_MMX, test "x$arch_x86" = "xyes") - -case $host_os in - darwin*) - HOST_OS_DARWIN=1 - AC_DEFINE_UNQUOTED(HOST_OS_DARWIN, 1, [Define this if built on Mac OS X/Darwin]) - OBJCFLAGS="-D_INTL_REDIRECT_MACROS $OBJCFLAGS" - ;; -esac -AM_CONDITIONAL(HOST_OS_DARWIN, test "x$HOST_OS_DARWIN" = "x1") - -dnl --------------------------------------------- -dnl Set IMPURE_TEXT_LDFLAGS -dnl --------------------------------------------- - -IMPURE_TEXT_LDFLAGS="" -if test "x$enable_impure_text" = xyes; then - case "$host_or_hostalias" in - *solaris*) - if test "$GCC" = yes; then - IMPURE_TEXT_LDFLAGS="-mimpure-text" - else - IMPURE_TEXT_LDFLAGS="-z textoff" - fi - ;; - *-darwin*) - IMPURE_TEXT_LDFLAGS="-Wl,-read_only_relocs,warning" - ;; - esac -fi -AC_SUBST(IMPURE_TEXT_LDFLAGS) - - - - - - - - - - - - - - - dnl --------------------------------------------- dnl XINE_ROOTDIR does not work if architecture independent files are dnl installed to another place than architecture dependent files !!! @@ -1977,9 +2131,9 @@ AC_SUBST(INCLUDES) dnl Common cflags for all platforms -CFLAGS="$UNIVERSAL_CFLAGS \$(MULTIPASS_CFLAGS) $warnflags $CFLAGS" +CFLAGS="$UNIVERSAL_CFLAGS \$(MULTIPASS_CFLAGS) $miscflags $warnflags $CFLAGS" LDFLAGS="$UNIVERSAL_LDFLAGS $LDFLAGS" -OBJCFLAGS="$UNIVERSAL_CFLAGS $warnflags $OBJCFLAGS" +OBJCFLAGS="$UNIVERSAL_CFLAGS $miscflags $warnflags $OBJCFLAGS" dnl Some informations about xine-lib compilation for xine-config diff --git a/contrib/libdca/Makefile.am b/contrib/libdca/Makefile.am index 14206a363..a118a9dc9 100644 --- a/contrib/libdca/Makefile.am +++ b/contrib/libdca/Makefile.am @@ -4,12 +4,14 @@ noinst_LTLIBRARIES = libdca.la endif endif +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) + libdca_la_SOURCES = dca_internal.h tables.h tables_quantization.h \ tables_huffman.h tables_fir.h tables_adpcm.h tables_vq.h \ bitstream.h bitstream.c parse.c downmix.c \ include/dca.h include/dts.h -libdca_la_CFLAGS = -I$(srcdir)/include $(VISIBILITY_FLAG) +libdca_la_CPPFLAGS = -I$(srcdir)/include libdca_la_LIBADD = -lm EXTRA_DIST = COPYING diff --git a/contrib/libmpcdec/Makefile.am b/contrib/libmpcdec/Makefile.am index 16ea80c28..5751239bf 100644 --- a/contrib/libmpcdec/Makefile.am +++ b/contrib/libmpcdec/Makefile.am @@ -4,11 +4,12 @@ noinst_LTLIBRARIES = libmpcdec.la endif endif +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) + libmpcdec_la_SOURCES = huffsv46.c huffsv7.c idtag.c mpc_decoder.c mpc_reader.c \ requant.c streaminfo.c synth_filter.c \ mpcdec/internal.h mpcdec/mpcdec.h mpcdec/streaminfo.h mpcdec/math.h \ mpcdec/decoder.h mpcdec/config_types.h mpcdec/requant.h mpcdec/huffman.h \ mpcdec/reader.h -libmpcdec_la_CFLAGS = $(VISIBILITY_FLAG) EXTRA_DIST = diff_from_libmpcdec_1.2.5.patch COPYING diff --git a/contrib/libxdg-basedir/Makefile.am b/contrib/libxdg-basedir/Makefile.am index 68f09b0a9..420d85999 100644 --- a/contrib/libxdg-basedir/Makefile.am +++ b/contrib/libxdg-basedir/Makefile.am @@ -2,5 +2,6 @@ if !EXTERNAL_LIBXDG_BASEDIR noinst_LTLIBRARIES = libxdg-basedir.la endif +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) + libxdg_basedir_la_SOURCES = basedir.c basedir.h -libxdg_basedir_la_CFLAGS = $(VISIBILITY_FLAG) diff --git a/lib/Makefile.am b/lib/Makefile.am index 36b695bc8..c6462037e 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,5 +1,7 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) + EXTRA_DIST = Makefile.common noinst_LTLIBRARIES = libxineposix.la diff --git a/m4/Makefile.am b/m4/Makefile.am index 242fff4d3..90067a942 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -25,7 +25,6 @@ EXTRA_DIST = \ macosx.m4 \ objc.m4 \ opengl.m4 \ - optimizations.m4 \ pkg.m4 \ pthreads.m4 \ symbol.m4 \ diff --git a/m4/_xine.m4 b/m4/_xine.m4 index 930703bbb..92e372fcb 100644 --- a/m4/_xine.m4 +++ b/m4/_xine.m4 @@ -142,36 +142,6 @@ AC_DEFUN([AC_CHECK_DXR3], fi ]) -dnl AC_TRY_CFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS]) -dnl check if $CC supports a given set of cflags -AC_DEFUN([AC_TRY_CFLAGS], - [AC_MSG_CHECKING([if $CC supports $1 flags]) - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$1" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_try_cflags_ok=yes],[ac_cv_try_cflags_ok=no]) - CFLAGS="$SAVE_CFLAGS" - AC_MSG_RESULT([$ac_cv_try_cflags_ok]) - if test x"$ac_cv_try_cflags_ok" = x"yes"; then - ifelse([$2],[],[:],[$2]) - else - ifelse([$3],[],[:],[$3]) - fi]) - -dnl AC_TRY_LDFLAGS (CFLAGS, [ACTION-IF-WORKS], [ACTION-IF-FAILS]) -dnl check if $CC supports a given set of ldflags -AC_DEFUN([AC_TRY_LDFLAGS], - [AC_MSG_CHECKING([if $CC supports $1 flags]) - SAVE_LDFLAGS="$LDFLAGS" - LDFLAGS="$1" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_try_ldflags_ok=yes],[ac_cv_try_ldflags_ok=no]) - LDFLAGS="$SAVE_LDFLAGS" - AC_MSG_RESULT([$ac_cv_try_ldflags_ok]) - if test x"$ac_cv_try_ldflags_ok" = x"yes"; then - ifelse([$2],[],[:],[$2]) - else - ifelse([$3],[],[:],[$3]) - fi]) - dnl AC_CHECK_GENERATE_INTTYPES_H (INCLUDE-DIRECTORY) dnl generate a default inttypes.h if the header file does not exist already AC_DEFUN([AC_CHECK_GENERATE_INTTYPES], diff --git a/m4/attributes.m4 b/m4/attributes.m4 index 23b5f2ee4..f781429f7 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -50,6 +50,24 @@ AC_DEFUN([CC_CHECK_CFLAGS], [ fi ]) +AC_DEFUN([CC_CHECK_LDFLAGS], [ + AC_CACHE_CHECK([if $CC supports $1 flag], + AS_TR_SH([cc_cv_ldflags_$1]), + [ac_save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $1" + AC_LINK_IFELSE([int a;], + [eval "AS_TR_SH([cc_cv_ldflags_$1])='yes'"], + [eval "AS_TR_SH([cc_cv_ldflags_$1])="]) + LDFLAGS="$ac_save_LDFLAGS" + ]) + + if eval test [x$]AS_TR_SH([cc_cv_ldflags_$1]) = xyes; then + ifelse([$2], , [:], [$2]) + else + ifelse([$3], , [:], [$3]) + fi +]) + dnl Check for a -Werror flag or equivalent. -Werror is the GCC dnl and ICC flag that tells the compiler to treat all the warnings dnl as fatal. We usually need this option to make sure that some diff --git a/m4/optimizations.m4 b/m4/optimizations.m4 deleted file mode 100644 index f25da2a02..000000000 --- a/m4/optimizations.m4 +++ /dev/null @@ -1,261 +0,0 @@ -dnl -dnl M4 macro to add support for extra optimizations -dnl -dnl It understand --enable/--disable-optimizations . -dnl when optimizations are disabled, it does not touch cflags -dnl -dnl Note: always disable while crosscompiling -dnl - -AC_DEFUN([AC_OPTIMIZATIONS], [ - dnl By default, enable optimizations only if --enable-debug is not specified - AC_ARG_ENABLE([optimizations], - AS_HELP_STRING([--disable-optimizations], [Don't try to guess what optimization to enable]), - [], [test x"$enable_debug" != x"no" && enable_optimizations="no"]) - - if test "x$enable_optimizations" != "xno"; then - INLINE_FUNCTIONS=-finline-functions - - if test "$GCC" = yes; then - dnl - dnl check cflags not supported by all gcc versions - AC_TRY_CFLAGS("-fschedule-insns2", f_si="-fschedule-insns2", f_si="") - AC_TRY_CFLAGS("-mwide-multiply", m_wm="-mwide-multiply", m_wm="") - dnl - dnl gcc 3.1 uses the -f version - dnl - AC_TRY_CFLAGS("-falign-functions=4", f_af="-falign-functions=4", - f_af="-malign-functions=4") - AC_TRY_CFLAGS("-falign-loops=4", f_al="-falign-loops=4", - f_al="-malign-loops=4") - AC_TRY_CFLAGS("-falign-jumps=4", f_aj="-falign-jumps=4", - f_aj="-malign-jumps=4") - dnl - dnl Check for some optimization disabling - dnl needed for win32 code - dnl - AC_TRY_CFLAGS("-fno-omit-frame-pointer", W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-omit-frame-pointer",) - AC_TRY_CFLAGS("-fno-inline-functions", W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-inline-functions",) - AC_TRY_CFLAGS("-fno-rename-registers", W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE -fno-rename-registers",) - AC_SUBST(W32_NO_OPTIMIZE) - dnl - dnl Multipass compilation - dnl - AC_TRY_CFLAGS("-fprofile-arcs", PASS1_CFLAGS="-fprofile_arcs $PASS1_CFLAGS",) - AC_TRY_CFLAGS("-fbranch-probabilities", PASS2_CFLAGS="-fbranch-probabilities $PASS2_CFLAGS",) - AC_SUBST(PASS1_CFLAGS) - AC_SUBST(PASS2_CFLAGS) - dnl - dnl Warnings - dnl - CFLAGS="-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes $CFLAGS" - CFLAGS="-Wnested-externs -Wcast-align $CFLAGS" - dnl some combinations of gcc+glibc produce useless warnings on memset - dnl when compiling with -Wpointer-arith, so we check for this first - AC_MSG_CHECKING(for sane -Wpointer-arith) - SAVE_CFLAGS="$CFLAGS" - CFLAGS="-O2 -Wpointer-arith -Werror $CFLAGS" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string.h>]], [[int a; memset(&a, 0, sizeof(int));]])], - [AC_MSG_RESULT(yes); CFLAGS="-Wpointer-arith $SAVE_CFLAGS"], - [AC_MSG_RESULT(no); CFLAGS="$SAVE_CFLAGS"]); - - dnl gcc 3.3.5 (at least) is known to be buggy wrt optimisation and - dnl -finline-functions. Use -fno-inline-functions for gcc < 3.4.0. - - AC_MSG_CHECKING(for gcc 3.4.0 or later) - newGCC="`"$CC" -dumpversion | - awk -F. '{ if ((@S|@1 * 10000 + @S|@2 * 100 + @S|@3) >= 30400) { print "yes" } }' - `" - AC_MSG_RESULT(${newGCC:-no - assuming bugginess in -finline-functions}) - test "$newGCC" = yes || INLINE_FUNCTIONS=-fno-inline-functions - fi - - dnl Flags not supported by all *cc* variants - AC_TRY_CFLAGS("-Wall", wall="-Wall", wall="") - - CFLAGS="$wall ${CFLAGS}" - DEBUG_CFLAGS="$wall ${DEBUG_CFLAGS}" - - if test "$enable_macosx_universal"; then - optimize_for_host="universal-darwin" - else - optimize_for_host="$host_or_hostalias" - fi - - case "$optimize_for_host" in - i?86-* | k?-* | athlon-* | pentium*) - if test "$GCC" = yes -o "${CC##*/}x" = "iccx" ; then - - if test "$GCC" = yes; then - dnl Check for gcc cpu optimization support - AC_TRY_CFLAGS("-mtune=i386", - sarchopt="-mtune", - AC_TRY_CFLAGS("-mcpu=i386", - sarchopt="-mcpu", - AC_TRY_CFLAGS("-march=i386", - sarchopt="-march", - [ AC_MSG_RESULT(** no cpu optimization supports **) - sarchopt=no - ] - ) - ) - ) - - dnl special check for k7 cpu CC support - AC_TRY_CFLAGS("$sarchopt=athlon", k7cpu="athlon", k7cpu="i686") - - dnl add x86 specific gcc CFLAGS - CFLAGS="-O3 -pipe -fomit-frame-pointer $f_af $f_al $f_aj $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS $CFLAGS" - - DEBUG_CFLAGS="-O $DEBUG_CFLAGS" - - if test x"$sarchopt" != "xno"; then - archopt_val= - - case "$host_or_hostalias" in - i386-*) - archopt_val="i386" ;; - i486-*) - archopt_val="i486" ;; - i586-*) - archopt_val="pentium" - ;; - pentium-mmx-*) - archopt_val="pentium-mmx" - ;; - pentiumpro-* | pentium2-* | i686-*) - archopt_val="pentiumpro" - if test x"$host" = x"$build"; then - if test -f /proc/cpuinfo; then - modelname=`cat /proc/cpuinfo | grep "model\ name\ :" | sed -e 's/ //g' | cut -d':' -f2` - case "$modelname" in - *Athlon* | *Duron* | *K7*) - archopt_val="$k7cpu" - ;; - VIAEzra) - archopt_val="c3" - ;; - esac - fi - fi - ;; - k6-2-* | k6-3-*) - archopt_val="k6-2" - ;; - k6-*) - archopt_val="k6" - ;; - pentium3-*) - archopt_val="pentium3" - ;; - pentium4-*) - archopt_val="pentium4" - ;; - athlon-4-* | athlon-xp-* | athlon-mp-*) - archopt_val="athlon-4" - ;; - k7-* | athlon-tbird-* | athlon-*) - archopt_val="athlon" - ;; - - esac - if test x"$archopt_val" != x; then - CFLAGS="$sarchopt=$archopt_val $CFLAGS" - DEBUG_CFLAGS="$sarchopt=$archopt_val $DEBUG_CFLAGS" - fi - fi - else - dnl we have the Intel compiler - CFLAGS="-unroll -ipo -ipo_obj -O3 $CFLAGS" - PASS1_CFLAGS="-prof_genx -prof_dir \$(PWD)/\$(top_builddir)/ $PASS1_CFLAGS" - PASS2_CFLAGS="-prof_use -prof_dir \$(PWD)/\$(top_builddir)/ $PASS2_CFLAGS" - AC_SUBST(PASS1_CFLAGS) - AC_SUBST(PASS2_CFLAGS) - fi - - else - dnl add x86 specific cc CFLAGS - CFLAGS="-O $CFLAGS" - DEBUG_CFLAGS="-O $DEBUG_CFLAGS" - AC_DEFINE_UNQUOTED(FPM_64BIT,,[Define to select libmad fixed point arithmetic implementation]) - fi - ;; - alphaev56-*) - CFLAGS="-O3 -mcpu=ev56 -mieee $CFLAGS" - DEBUG_CFLAGS="-O3 -mcpu=ev56 -mieee $DEBUG_CFLAGS" - ;; - alpha*) - CFLAGS="-O3 -mieee $CFLAGS" - DEBUG_CFLAGS="-O3 -mieee $DEBUG_CFLAGS" - ;; - *darwin*) - CFLAGS="-O3 -pipe -fomit-frame-pointer $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS -no-cpp-precomp -D_INTL_REDIRECT_MACROS $CFLAGS" - OBJCFLAGS="-O3 -pipe -fomit-frame-pointer $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS -no-cpp-precomp -D_INTL_REDIRECT_MACROS $CFLAGS" - DEBUG_CFLAGS="-O3 $DEBUG_CFLAGS" - ;; - ppc-*-linux* | powerpc-*) - CFLAGS="-O3 -pipe -fomit-frame-pointer $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS $CFLAGS" - DEBUG_CFLAGS="-O3 $DEBUG_CFLAGS" - ;; - sparc*-*-linux*) - CFLAGS="-O3 $cpu_cflags $INLINE_FUNCTIONS $CFLAGS" - DEBUG_CFLAGS="-O $cpu_cflags $INLINE_FUNCTIONS $DEBUG_CFLAGS" - - case `uname -m` in - sparc) - cpu_cflags="-mcpu=supersparc -mtune=supersparc" ;; - sparc64) - cpu_cflags="-mcpu=ultrasparc -mtune=ultrasparc" ;; - esac - ;; - sparc-*-solaris*) - if test "$GCC" = yes; then - case `uname -m` in - sun4c) cpu_cflags="-mcpu=v7 -mtune=supersparc" ;; - sun4m) cpu_cflags="-mcpu=v8 -mtune=supersparc" ;; - sun4u) - case `$CC --version 2>/dev/null` in - 1.*|2.*) - # -mcpu=ultrasparc triggers a GCC 2.95.x compiler bug when - # compiling video_out.c: - # gcc: Internal compiler error: program cc1 got fatal signal 11 - # avoid -mcpu=ultrasparc with gcc 2.* - cpu_cflags="-mcpu=v8 -mtune=ultrasparc" - ;; - *) - # GCC 3 or newer should have no problem with -mcpu=ultrasparc - cpu_cflags="-mcpu=ultrasparc -mtune=ultrasparc" - ;; - esac - ;; - esac - cc_optimize_cflags="-O3 $cpu_cflags $INLINE_FUNCTIONS" - cc_debug_cflags="-O $cpu_cflags $INLINE_FUNCTIONS" - else - case `uname -m` in - sun4c) cpu_cflags="-xarch=v7" ;; - sun4m) cpu_cflags="-xarch=v8" ;; - sun4u) cpu_cflags="-xarch=v8plusa" ;; - esac - cc_optimize_cflags="-fast $cpu_cflags -xCC" - cc_debug_cflags="-O" - fi - - CFLAGS="$cc_optimize_cflags $CFLAGS" - DEBUG_CFLAGS="$cc_debug_cflags $DEBUG_CFLAGS" - ;; - x86_64-*) - CFLAGS="-O3 -fomit-frame-pointer $m_wm $m_psb -fexpensive-optimizations $f_si -ffast-math $INLINE_FUNCTIONS $CFLAGS" - DEBUG_CFLAGS="-g $DEBUG_CFLAGS" - ;; - armv4l-*-linux*) - CFLAGS="-O2 -fsigned-char -ffast-math -mcpu=strongarm1100 -fomit-frame-pointer -fthread-jumps -fregmove $CFLAGS" - dnl CFLAGS="-O1 -fforce-mem -fforce-addr -fthread-jumps -fcse-follow-jumps -fcse-skip-blocks -fexpensive-optimizations -fregmove -fschedule-insns2 $INLINE_FUNCTIONS -fsigned-char -fomit-frame-pointer -march=armv4 -mtune=strongarm $CFLAGS" - DEBUG_CFLAGS="-O2 $DEBUG_CFLAGS" - ;; - esac - fi -]) - -dnl Kate modeline: leave at the end -dnl kate: indent-width 2; replace-trailing-space-save 1; space-indent 1; backspace-indents 1; diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am index 20a4e708b..d9b44557e 100644 --- a/src/audio_out/Makefile.am +++ b/src/audio_out/Makefile.am @@ -1,6 +1,7 @@ include $(top_srcdir)/misc/Makefile.common -AM_CPPFLAGS = -DXINE_COMPILE +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) EXTRA_DIST = audio_irixal_out.c @@ -70,77 +71,52 @@ xineplug_LTLIBRARIES = xineplug_ao_out_none.la xineplug_ao_out_file.la \ xineplug_ao_out_none_la_SOURCES = audio_none_out.c xineplug_ao_out_none_la_LIBADD = $(XINE_LIB) -xineplug_ao_out_none_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_ao_out_none_la_LDFLAGS = -avoid-version -module xineplug_ao_out_file_la_SOURCES = audio_file_out.c xineplug_ao_out_file_la_LIBADD = $(XINE_LIB) -xineplug_ao_out_file_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_ao_out_file_la_LDFLAGS = -avoid-version -module xineplug_ao_out_oss_la_SOURCES = audio_oss_out.c xineplug_ao_out_oss_la_LIBADD = $(XINE_LIB) -xineplug_ao_out_oss_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_ao_out_oss_la_LDFLAGS = -avoid-version -module xineplug_ao_out_alsa_la_SOURCES = audio_alsa_out.c xineplug_ao_out_alsa_la_LIBADD = $(ALSA_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_ao_out_alsa_la_CFLAGS = $(VISIBILITY_FLAG) $(ALSA_CFLAGS) -xineplug_ao_out_alsa_la_LDFLAGS = -avoid-version -module +xineplug_ao_out_alsa_la_CFLAGS = $(AM_CFLAGS) $(ALSA_CFLAGS) xineplug_ao_out_esd_la_SOURCES = audio_esd_out.c xineplug_ao_out_esd_la_LIBADD = $(ESD_LIBS) $(XINE_LIB) -xineplug_ao_out_esd_la_CFLAGS = $(VISIBILITY_FLAG) $(ESD_CFLAGS) -xineplug_ao_out_esd_la_LDFLAGS = -avoid-version -module +xineplug_ao_out_esd_la_CFLAGS = $(AM_CFLAGS) $(ESD_CFLAGS) xineplug_ao_out_sun_la_SOURCES = audio_sun_out.c xineplug_ao_out_sun_la_LIBADD = $(XINE_LIB) -xineplug_ao_out_sun_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_ao_out_sun_la_LDFLAGS = -avoid-version -module #xineplug_ao_out_irixal_la_SOURCES = audio_irixal_out.c #xineplug_ao_out_irixal_la_LIBADD = $(IRIXAL_LIBS) -#xineplug_ao_out_irixal_la_CFLAGS = $(VISIBILITY_FLAG) $(IRIXAL_CFLAGS) -#xineplug_ao_out_irixal_la_LDFLAGS = -avoid-version -module +#xineplug_ao_out_irixal_la_CFLAGS = $(AM_CFLAGS) $(IRIXAL_CFLAGS) xineplug_ao_out_arts_la_SOURCES = audio_arts_out.c xineplug_ao_out_arts_la_LIBADD = $(ARTS_LIBS) $(XINE_LIB) -xineplug_ao_out_arts_la_CFLAGS = $(VISIBILITY_FLAG) $(ARTS_CFLAGS) -xineplug_ao_out_arts_la_LDFLAGS = -avoid-version -module +xineplug_ao_out_arts_la_CFLAGS = $(AM_CFLAGS) $(ARTS_CFLAGS) xineplug_ao_out_directx_la_SOURCES = audio_directx_out.c xineplug_ao_out_directx_la_CPPFLAGS = $(DIRECTX_CPPFLAGS) xineplug_ao_out_directx_la_LIBADD = $(DIRECTX_AUDIO_LIBS) $(XINE_LIB) -xineplug_ao_out_directx_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_ao_out_directx_la_LDFLAGS = -avoid-version -module xineplug_ao_out_coreaudio_la_SOURCES = audio_coreaudio_out.c xineplug_ao_out_coreaudio_la_LIBADD = $(XINE_LIB) -# The "-Wl,-framework -Wl,..." is needed for libtool versions before -# 1.5.x (1.257): the default version that ships with Mac OS X is 1.5 (1.1220) -xineplug_ao_out_coreaudio_la_LDFLAGS = \ - -Wl,-framework -Wl,Cocoa -framework CoreAudio \ - -Wl,-framework -Wl,AudioUnit -framework AudioUnit \ - -avoid-version -module -xineplug_ao_out_coreaudio_la_CFLAGS = -framework CoreAudio -framework AudioUnit $(VISIBILITY_FLAG) +xineplug_ao_out_coreaudio_la_LDFLAGS = $(AM_LDFLAGS) -framework CoreAudio -framework AudioUnit xineplug_ao_out_pulseaudio_la_SOURCES = audio_pulse_out.c xineplug_ao_out_pulseaudio_la_LIBADD = $(PULSEAUDIO_LIBS) $(XINE_LIB) -xineplug_ao_out_pulseaudio_la_CFLAGS = $(VISIBILITY_FLAG) $(PULSEAUDIO_CFLAGS) -xineplug_ao_out_pulseaudio_la_LDFLAGS = -avoid-version -module +xineplug_ao_out_pulseaudio_la_CFLAGS = $(AM_CFLAGS) $(PULSEAUDIO_CFLAGS) xineplug_ao_out_directx2_la_SOURCES = audio_directx2_out.c xineplug_ao_out_directx2_la_CPPFLAGS = $(DIRECTX_CPPFLAGS) xineplug_ao_out_directx2_la_LIBADD = $(XINE_LIB) $(DIRECTX_AUDIO_LIBS) $(PTHREAD_LIBS) -xineplug_ao_out_directx2_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_ao_out_directx2_la_LDFLAGS = -avoid-version -module xineplug_ao_out_fusionsound_la_SOURCES = audio_fusionsound_out.c xineplug_ao_out_fusionsound_la_LIBADD = $(FUSIONSOUND_LIBS) $(XINE_LIB) -xineplug_ao_out_fusionsound_la_CFLAGS = $(VISIBILITY_FLAG) $(FUSIONSOUND_CFLAGS) -xineplug_ao_out_fusionsound_la_LDFLAGS = -avoid-version -module +xineplug_ao_out_fusionsound_la_CFLAGS = $(AM_CFLAGS) $(FUSIONSOUND_CFLAGS) xineplug_ao_out_jack_la_SOURCES = audio_jack_out.c xineplug_ao_out_jack_la_LIBADD = $(JACK_LIBS) $(XINE_LIB) -xineplug_ao_out_jack_la_CFLAGS = $(VISIBILITY_FLAG) $(JACK_CFLAGS) -xineplug_ao_out_jack_la_LDFLAGS = -avoid-version -module +xineplug_ao_out_jack_la_CFLAGS = $(AM_FLAGS) $(JACK_CFLAGS) diff --git a/src/combined/Makefile.am b/src/combined/Makefile.am index 884fcf0cc..64655c1eb 100644 --- a/src/combined/Makefile.am +++ b/src/combined/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + if HAVE_WAVPACK xineplug_wavpack = xineplug_wavpack.la endif @@ -11,11 +14,10 @@ endif xineplug_LTLIBRARIES = $(xineplug_wavpack) $(xineplug_flac) xineplug_wavpack_la_SOURCES = demux_wavpack.c decoder_wavpack.c combined_wavpack.c combined_wavpack.h -xineplug_wavpack_la_CFLAGS = $(VISIBILITY_FLAG) $(WAVPACK_CFLAGS) -I$(srcdir)/../demuxers +xineplug_wavpack_la_CFLAGS = $(AM_CFLAGS) $(WAVPACK_CFLAGS) +xineplug_wavpack_la_CPPFLAGS = -I$(srcdir)/../demuxers xineplug_wavpack_la_LIBADD = $(XINE_LIB) $(WAVPACK_LIBS) -xineplug_wavpack_la_LDFLAGS = $(xineplug_ldflags) xineplug_flac_la_SOURCES = demux_flac.c decoder_flac.c demux_flac.h -xineplug_flac_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBFLAC_CFLAGS) +xineplug_flac_la_CFLAGS = $(AM_CFLAGS) $(LIBFLAC_CFLAGS) xineplug_flac_la_LIBADD = $(XINE_LIB) $(LIBFLAC_LIBS) -xineplug_flac_la_LDFLAGS = $(xineplug_ldflags) diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am index 8a931c2d6..4722a982d 100644 --- a/src/demuxers/Makefile.am +++ b/src/demuxers/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) if HAVE_VORBIS @@ -101,7 +101,6 @@ xineplug_dmx_games_la_SOURCES = group_games.c demux_eawve.c \ demux_film.c demux_smjpeg.c demux_4xm.c \ demux_vmd.c xineplug_dmx_games_la_LIBADD = $(XINE_LIB) -xineplug_dmx_games_la_LDFLAGS = -avoid-version -module xineplug_dmx_audio_la_SOURCES = group_audio.c demux_aud.c demux_aiff.c \ demux_cdda.c demux_mpgaudio.c demux_nsf.c \ diff --git a/src/dxr3/Makefile.am b/src/dxr3/Makefile.am index 5f413f804..836f57e6e 100644 --- a/src/dxr3/Makefile.am +++ b/src/dxr3/Makefile.am @@ -1,6 +1,7 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(X_CFLAGS) $(LIBFAME_CFLAGS) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) $(X_CFLAGS) $(LIBFAME_CFLAGS) +AM_LDFLAGS = $(xineplug_ldflags) if HAVE_DXR3 dxr3_modules = xineplug_decode_dxr3_video.la \ @@ -21,8 +22,6 @@ xineplug_LTLIBRARIES = $(dxr3_modules) xineplug_decode_dxr3_video_la_SOURCES = dxr3_decode_video.c xineplug_decode_dxr3_video_la_LIBADD = $(XINE_LIB) -xineplug_decode_dxr3_video_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_decode_dxr3_video_la_LDFLAGS = -avoid-version -module if HAVE_DVDNAV AM_CPPFLAGS = $(DVDNAV_CFLAGS) @@ -33,8 +32,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/src/input/libdvdnav xineplug_decode_dxr3_spu_la_SOURCES = dxr3_decode_spu.c nav_read.c xineplug_decode_dxr3_spu_la_LIBADD = $(XINE_LIB) endif -xineplug_decode_dxr3_spu_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_decode_dxr3_spu_la_LDFLAGS = -avoid-version -module xineplug_vo_out_dxr3_la_SOURCES = \ dxr3_mpeg_encoders.c \ @@ -43,8 +40,6 @@ xineplug_vo_out_dxr3_la_SOURCES = \ video_out_dxr3.c xineplug_vo_out_dxr3_la_LIBADD = $(link_fame) $(link_rte) $(link_x_libs) $(XINE_LIB) $(DYNAMIC_LD_LIBS) -lm -xineplug_vo_out_dxr3_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_vo_out_dxr3_la_LDFLAGS = -avoid-version -module noinst_HEADERS = \ em8300.h \ diff --git a/src/input/Makefile.am b/src/input/Makefile.am index ae38de187..ce8c2fe33 100644 --- a/src/input/Makefile.am +++ b/src/input/Makefile.am @@ -1,5 +1,11 @@ include $(top_srcdir)/misc/Makefile.common +# REVISIT: This second line here bothers me more than just a little bit +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) \ + $(GNOME_VFS_CFLAGS) $(ALSA_CFLAGS) $(DVD_CFLAGS) +AM_CPPFLAGS = -D_LARGEFILE64_SOURCE +AM_LDFLAGS = $(xineplug_ldflags) + EXTRA_DIST = input_dvd.c input_vcd.c input_gnome_vfs.c input_rtp.c if HAVE_DVDNAV @@ -48,7 +54,6 @@ in_rtp = xineplug_inp_rtp.la in_dvb = xineplug_inp_dvb.la endif -AM_CFLAGS = -D_LARGEFILE64_SOURCE $(GNOME_VFS_CFLAGS) $(ALSA_CFLAGS) $(DVD_CFLAGS) xineplug_LTLIBRARIES = \ xineplug_inp_file.la \ @@ -71,85 +76,55 @@ xineplug_LTLIBRARIES = \ xineplug_inp_file_la_SOURCES = input_file.c xineplug_inp_file_la_LIBADD = $(XINE_LIB) -xineplug_inp_file_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_file_la_LDFLAGS = -avoid-version -module xineplug_inp_dvd_la_SOURCES = input_dvd.c media_helper.c xineplug_inp_dvd_la_LIBADD = $(XINE_LIB) $(link_dvdnav) $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS) -xineplug_inp_dvd_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_dvd_la_LDFLAGS = -avoid-version -module xineplug_inp_net_la_SOURCES = input_net.c net_buf_ctrl.c xineplug_inp_net_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(PTHREAD_LIBS) -xineplug_inp_net_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_net_la_LDFLAGS = -avoid-version -module xineplug_inp_mms_la_SOURCES = input_mms.c net_buf_ctrl.c mms.c mmsh.c http_helper.c ../demuxers/asfheader.c xineplug_inp_mms_la_LIBADD = $(XINE_LIB) @LIBICONV@ $(PTHREAD_LIBS) -xineplug_inp_mms_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_mms_la_LDFLAGS = -avoid-version -module xineplug_inp_vcdo_la_SOURCES = input_vcd.c media_helper.c xineplug_inp_vcdo_la_LIBADD = $(XINE_LIB) -xineplug_inp_vcdo_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_vcdo_la_LDFLAGS = -avoid-version -module xineplug_inp_stdin_fifo_la_SOURCES = input_stdin_fifo.c net_buf_ctrl.c xineplug_inp_stdin_fifo_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_inp_stdin_fifo_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_stdin_fifo_la_LDFLAGS = -avoid-version -module xineplug_inp_rtp_la_SOURCES = input_rtp.c net_buf_ctrl.c xineplug_inp_rtp_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(PTHREAD_LIBS) -xineplug_inp_rtp_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_rtp_la_LDFLAGS = -avoid-version -module xineplug_inp_http_la_SOURCES = input_http.c net_buf_ctrl.c http_helper.c xineplug_inp_http_la_LIBADD = $(XINE_LIB) $(NET_LIBS) $(PTHREAD_LIBS) -xineplug_inp_http_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_http_la_LDFLAGS = -avoid-version -module xineplug_inp_pnm_la_SOURCES = input_pnm.c net_buf_ctrl.c pnm.c xineplug_inp_pnm_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_inp_pnm_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_pnm_la_LDFLAGS = -avoid-version -module xineplug_inp_dvb_la_SOURCES = input_dvb.c net_buf_ctrl.c xineplug_inp_dvb_la_DEPS = $(XDG_BASEDIR_DEPS) xineplug_inp_dvb_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(XDG_BASEDIR_LIBS) -xineplug_inp_dvb_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS) -xineplug_inp_dvb_la_LDFLAGS = -avoid-version -module +xineplug_inp_dvb_la_CFLAGS = $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS) xineplug_inp_rtsp_la_SOURCES = input_rtsp.c net_buf_ctrl.c xineplug_inp_rtsp_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) libreal/libreal.la librtsp/librtsp.la -xineplug_inp_rtsp_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_rtsp_la_LDFLAGS = -avoid-version -module xineplug_inp_cdda_la_SOURCES = input_cdda.c media_helper.c sha1.c sha1.h base64.c base64.h xineplug_inp_cdda_la_DEPS = $(XDG_BASEDIR_DEPS) xineplug_inp_cdda_la_LIBADD = $(XINE_LIB) $(XDG_BASEDIR_LIBS) -xineplug_inp_cdda_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS) -xineplug_inp_cdda_la_LDFLAGS = -avoid-version -module +xineplug_inp_cdda_la_CFLAGS = $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS) xineplug_inp_v4l_la_SOURCES = input_v4l.c xineplug_inp_v4l_la_LIBADD = $(ALSA_LIBS) $(XINE_LIB) -xineplug_inp_v4l_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_v4l_la_LDFLAGS = -avoid-version -module xineplug_inp_gnome_vfs_la_SOURCES = input_gnome_vfs.c net_buf_ctrl.c xineplug_inp_gnome_vfs_la_LIBADD = $(GNOME_VFS_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_inp_gnome_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_gnome_vfs_la_LDFLAGS = -avoid-version -module xineplug_inp_smb_la_SOURCES = input_smb.c xineplug_inp_smb_la_LIBADD = $(LIBSMBCLIENT_LIBS) $(XINE_LIB) -xineplug_inp_smb_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_smb_la_LDFLAGS = -avoid-version -module xineplug_inp_pvr_la_SOURCES = input_pvr.c xineplug_inp_pvr_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_inp_pvr_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_inp_pvr_la_LDFLAGS = -avoid-version -module xineinclude_HEADERS = input_plugin.h noinst_HEADERS = net_buf_ctrl.h mms.h mmsh.h pnm.h media_helper.h videodev2.h http_helper.h diff --git a/src/input/libdvdnav/Makefile.am b/src/input/libdvdnav/Makefile.am index 412828261..b7e313a38 100644 --- a/src/input/libdvdnav/Makefile.am +++ b/src/input/libdvdnav/Makefile.am @@ -1,6 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = -D_LARGEFILE64_SOURCE -DDVDNAV_COMPILE -DHAVE_DLFCN_H +AM_LDFLAGS = $(xineplug_ldflags) noinst_LTLIBRARIES = libdvdnav.la @@ -23,8 +25,6 @@ libdvdnav_la_SOURCES = \ dvd_input.c \ dvd_udf.c libdvdnav_la_LIBADD = $(PTHREAD_LIBS) -libdvdnav_la_CFLAGS = $(VISIBILITY_FLAG) -libdvdnav_la_LDFLAGS = -avoid-version -module noinst_HEADERS = \ decoder.h \ diff --git a/src/input/libreal/Makefile.am b/src/input/libreal/Makefile.am index 5b10d1bca..500dfb910 100644 --- a/src/input/libreal/Makefile.am +++ b/src/input/libreal/Makefile.am @@ -1,5 +1,6 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = -D_LARGEFILE64_SOURCE -I$(srcdir)/../librtsp noinst_LTLIBRARIES = libreal.la @@ -10,8 +11,6 @@ libreal_la_SOURCES = \ rmff.c \ sdpplin.c -libreal_la_CFLAGS = $(VISIBILITY_FLAG) - noinst_HEADERS = \ real.h \ asmrp.h \ diff --git a/src/input/librtsp/Makefile.am b/src/input/librtsp/Makefile.am index bb85f9cf4..9027ab260 100644 --- a/src/input/librtsp/Makefile.am +++ b/src/input/librtsp/Makefile.am @@ -1,6 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = -D_LARGEFILE64_SOURCE -I$(srcdir)/../libreal +AM_LDFLAGS = $(xineplug_ldflags) noinst_LTLIBRARIES = librtsp.la @@ -8,9 +10,6 @@ librtsp_la_SOURCES = \ rtsp.c \ rtsp_session.c -librtsp_la_CFLAGS = $(VISIBILITY_FLAG) -librtsp_la_LDFLAGS = -avoid-version -module - noinst_HEADERS = \ rtsp.h \ rtsp_session.h diff --git a/src/input/vcd/Makefile.am b/src/input/vcd/Makefile.am index 16eece779..014d28679 100644 --- a/src/input/vcd/Makefile.am +++ b/src/input/vcd/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(LIBCDIO_CFLAGS) +AM_LDFLAGS = $(xineplug_ldflags) + SUBDIRS = libcdio libvcd vcd_SRCS = xineplug_inp_vcd.c vcdplayer.c vcdio.c xine-extra.c @@ -9,10 +12,9 @@ EXTRA_DIST = $(vcd_SRCS) if ENABLE_VCD xineplug_LTLIBRARIES = xineplug_inp_vcd.la -AM_CFLAGS = $(LIBCDIO_CFLAGS) $(LIBVCD_CFLAGS) +AM_CFLAGS += $(LIBCDIO_CFLAGS) $(LIBVCD_CFLAGS) xineplug_inp_vcd_la_SOURCES = $(vcd_SRCS) -xineplug_inp_vcd_la_LDFLAGS = -avoid-version -module if HAVE_VCDNAV xineplug_inp_vcd_la_LIBADD = $(XINE_LIB) $(LIBVCDINFO_LIBS) else diff --git a/src/input/vcd/libcdio/Makefile.am b/src/input/vcd/libcdio/Makefile.am index c7415e787..0c6b26dac 100644 --- a/src/input/vcd/libcdio/Makefile.am +++ b/src/input/vcd/libcdio/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) +AM_LDFLAGS = $(xineplug_ldflags) + SUBDIRS = cdio MSWindows image INCLUDES = $(LIBCDIO_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/lib -I$(top_builddir)/lib @@ -54,9 +57,7 @@ if HAVE_VCDNAV else noinst_LTLIBRARIES = libcdio.la libiso9660.la libcdio_la_SOURCES = $(libcdio_SRCS) -libcdio_la_LDFLAGS = -avoid-version -module libiso9660_la_SOURCES = $(libiso9660_SRCS) -libiso9660_la_LDFLAGS = -avoid-version -module endif endif diff --git a/src/input/vcd/libvcd/Makefile.am b/src/input/vcd/libvcd/Makefile.am index 01b100aa4..cba784d26 100644 --- a/src/input/vcd/libvcd/Makefile.am +++ b/src/input/vcd/libvcd/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) +AM_LDFLAGS = $(xineplug_ldflags) + SUBDIRS = libvcd INCLUDES = $(LIBCDIO_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/lib @@ -36,10 +39,8 @@ if HAVE_VCDNAV else noinst_LTLIBRARIES = libvcd.la libvcdinfo.la libvcd_la_SOURCES = $(libvcd_SRCS) -libvcd_la_LDFLAGS = -avoid-version -module libvcd_la_LIBADD = $(LIBCDIO_LIBS) $(LIBISO9660_LIBS) libvcdinfo_la_SOURCES = $(libvcdinfo_SRCS) -libvcdinfo_la_LDFLAGS = -avoid-version -module endif endif diff --git a/src/liba52/Makefile.am b/src/liba52/Makefile.am index 6a0aebe62..948a7ab28 100644 --- a/src/liba52/Makefile.am +++ b/src/liba52/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + if A52 a52_module = xineplug_decode_a52.la endif @@ -27,9 +30,6 @@ else xineplug_decode_a52_la_LIBADD = $(XINE_LIB) -lm endif -xineplug_decode_a52_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_a52_la_LDFLAGS = $(xineplug_ldflags) - noinst_HEADERS = \ a52.h \ a52_internal.h \ diff --git a/src/libfaad/Makefile.am b/src/libfaad/Makefile.am index d1a4ed865..c02810f00 100644 --- a/src/libfaad/Makefile.am +++ b/src/libfaad/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + SUBDIRS = codebook if BUILD_FAAD @@ -10,7 +13,7 @@ xineplug_LTLIBRARIES = $(faad_module) VPATH = @srcdir@:@srcdir@/codebook: -xineplug_decode_faad_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -fno-strict-aliasing +xineplug_decode_faad_la_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing xineplug_decode_faad_la_SOURCES = \ bits.c \ cfft.c \ @@ -52,7 +55,6 @@ xineplug_decode_faad_la_SOURCES = \ tns.c \ xine_faad_decoder.c -xineplug_decode_faad_la_LDFLAGS = $(xineplug_ldflags) xineplug_decode_faad_la_LIBADD = -lm $(XINE_LIB) noinst_HEADERS = \ diff --git a/src/libffmpeg/Makefile.am b/src/libffmpeg/Makefile.am index 7b622cf74..b2571a4ea 100644 --- a/src/libffmpeg/Makefile.am +++ b/src/libffmpeg/Makefile.am @@ -1,7 +1,11 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CPPFLAGS = $(ff_cppflags) $(ZLIB_CPPFLAGS) +AM_LDFLAGS = $(xineplug_ldflags) + if HAVE_FFMPEG -AM_CFLAGS = $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS) +AM_CFLAGS += $(FFMPEG_CFLAGS) $(FFMPEG_POSTPROC_CFLAGS) link_ffmpeg = $(FFMPEG_LIBS) $(FFMPEG_POSTPROC_LIBS) else @@ -39,25 +43,21 @@ EXTRA_DIST = ffmpeg_encoder.c xineplug_LTLIBRARIES = xineplug_decode_ff.la xineplug_decode_dvaudio.la if HAVE_DXR3 -AM_CPPFLAGS = -I$(top_srcdir)/src/dxr3 $(X_CFLAGS) $(ff_cppflags) \ - $(ZLIB_CPPFLAGS) +AM_CPPFLAGS += -I$(top_srcdir)/src/dxr3 $(X_CFLAGS) xineplug_decode_ff_la_SOURCES = ffmpeg_decoder.c ff_audio_decoder.c ff_video_decoder.c \ ffmpeg_encoder.c ff_mpeg_parser.c ffmpeg_decoder.h \ ff_mpeg_parser.h else -AM_CPPFLAGS = $(ff_cppflags) $(ZLIB_CPPFLAGS) xineplug_decode_ff_la_SOURCES = ffmpeg_decoder.c ff_audio_decoder.c ff_video_decoder.c \ ff_mpeg_parser.c ffmpeg_decoder.h ff_mpeg_parser.h endif nodist_xineplug_decode_ff_la_SOURCES = ffmpeg_config.h -xineplug_decode_ff_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -xineplug_decode_ff_la_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) +xineplug_decode_ff_la_LDFLAGS = $(AM_LDFLAGS) $(IMPURE_TEXT_LDFLAGS) xineplug_decode_ff_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm $(ZLIB_LIBS) \ $(link_ffmpeg) $(PTHREAD_LIBS) -xineplug_decode_dvaudio_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -I $(top_srcdir)/contrib/ffmpeg/libavcodec -xineplug_decode_dvaudio_la_LDFLAGS = $(xineplug_ldflags) +xineplug_decode_dvaudio_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/contrib/ffmpeg/libavcodec xineplug_decode_dvaudio_la_SOURCES = ff_dvaudio_decoder.c xineplug_decode_dvaudio_la_LIBADD = $(XINE_LIB) diff --git a/src/libmad/Makefile.am b/src/libmad/Makefile.am index c879645c5..7e8b617f4 100644 --- a/src/libmad/Makefile.am +++ b/src/libmad/Makefile.am @@ -1,6 +1,8 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = -DOPT_SPEED +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CPPFLAGS = -DOPT_SPEED +AM_LDFLAGS = $(xineplug_ldflags) EXTRA_DIST = imdct_l_arm.S @@ -35,8 +37,7 @@ xineplug_decode_mad_la_LIBADD = $(XINE_LIB) $(LIBMAD_LIBS) else xineplug_decode_mad_la_LIBADD = $(XINE_LIB) endif -xineplug_decode_mad_la_CFLAGS = $(LIBMAD_CFLAGS) $(VISIBILITY_FLAG) -xineplug_decode_mad_la_LDFLAGS = $(xineplug_ldflags) +xineplug_decode_mad_la_CFLAGS = $(AM_CFLAGS) $(LIBMAD_CFLAGS) noinst_HEADERS = \ D.dat \ diff --git a/src/libmpeg2/Makefile.am b/src/libmpeg2/Makefile.am index 66fb39f13..6b194ebbb 100644 --- a/src/libmpeg2/Makefile.am +++ b/src/libmpeg2/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la xineplug_decode_mpeg2_la_SOURCES = \ @@ -23,8 +26,7 @@ xineplug_decode_mpeg2_la_SOURCES = \ libmpeg2_accel.c xineplug_decode_mpeg2_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) -lm -xineplug_decode_mpeg2_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBMPEG2_CFLAGS) -xineplug_decode_mpeg2_la_LDFLAGS = $(xineplug_ldflags) +xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(LIBMPEG2_CFLAGS) noinst_HEADERS = vlc.h mpeg2.h xvmc.h xvmc_vld.h mpeg2_internal.h idct_mlib.h vis.h \ libmpeg2_accel.h diff --git a/src/libmpeg2new/Makefile.am b/src/libmpeg2new/Makefile.am index 49959da86..8f8f1c940 100644 --- a/src/libmpeg2new/Makefile.am +++ b/src/libmpeg2new/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + SUBDIRS = libmpeg2 xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la @@ -7,7 +10,5 @@ xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la xineplug_decode_mpeg2_la_SOURCES = \ xine_mpeg2_decoder.c -xineplug_decode_mpeg2_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBMPEG2_CFLAGS) +xineplug_decode_mpeg2_la_CFLAGS = $(AM_CFLAGS) $(LIBMPEG2_CFLAGS) xineplug_decode_mpeg2_la_LIBADD = $(XINE_LIB) ./libmpeg2/libmpeg2.la -xineplug_decode_mpeg2_la_LDFLAGS = $(xineplug_ldflags) - diff --git a/src/libmpeg2new/libmpeg2/Makefile.am b/src/libmpeg2new/libmpeg2/Makefile.am index f99894f12..83ae1c32f 100644 --- a/src/libmpeg2new/libmpeg2/Makefile.am +++ b/src/libmpeg2new/libmpeg2/Makefile.am @@ -1,5 +1,7 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) + noinst_LTLIBRARIES = libmpeg2.la libmpeg2arch.la libmpeg2_la_SOURCES = alloc.c header.c decode.c slice.c motion_comp.c idct.c diff --git a/src/libreal/Makefile.am b/src/libreal/Makefile.am index c9cf62984..28d85fe45 100644 --- a/src/libreal/Makefile.am +++ b/src/libreal/Makefile.am @@ -1,12 +1,13 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + if ENABLE_REAL xineplug_LTLIBRARIES = xineplug_decode_real.la endif xineplug_decode_real_la_SOURCES = xine_real_video_decoder.c real_common.c xine_real_audio_decoder.c xineplug_decode_real_la_LIBADD = $(XINE_LIB) $(DYNAMIC_LD_LIBS) -xineplug_decode_real_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_real_la_LDFLAGS = $(xineplug_ldflags) noinst_HEADERS = real_common.h diff --git a/src/libspucc/Makefile.am b/src/libspucc/Makefile.am index aefe4d7c1..c32e7a292 100644 --- a/src/libspucc/Makefile.am +++ b/src/libspucc/Makefile.am @@ -1,10 +1,12 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + xineplug_LTLIBRARIES = xineplug_decode_spucc.la xineplug_decode_spucc_la_SOURCES = cc_decoder.c xine_cc_decoder.c -xineplug_decode_spucc_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -fno-strict-aliasing +xineplug_decode_spucc_la_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing xineplug_decode_spucc_la_LIBADD = $(XINE_LIB) -xineplug_decode_spucc_la_LDFLAGS = -avoid-version -module noinst_HEADERS = cc_decoder.h diff --git a/src/libspucmml/Makefile.am b/src/libspucmml/Makefile.am index ac2970482..95b611008 100644 --- a/src/libspucmml/Makefile.am +++ b/src/libspucmml/Makefile.am @@ -1,8 +1,9 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + xineplug_LTLIBRARIES = xineplug_decode_spucmml.la xineplug_decode_spucmml_la_SOURCES = xine_cmml_decoder.c xineplug_decode_spucmml_la_LIBADD = $(XINE_LIB) -xineplug_decode_spucmml_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_spucmml_la_LDFLAGS = $(xineplug_ldflags) diff --git a/src/libspudec/Makefile.am b/src/libspudec/Makefile.am index 208d994f5..d159728fc 100644 --- a/src/libspudec/Makefile.am +++ b/src/libspudec/Makefile.am @@ -1,5 +1,9 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CPPFLAGS = -I$(top_srcdir)/src/input/libdvdnav +AM_LDFLAGS = $(xineplug_ldflags) + xineplug_LTLIBRARIES = xineplug_decode_spu.la if HAVE_DVDNAV @@ -15,12 +19,10 @@ xineplug_decode_spu_la_SOURCES = \ nav_read.c \ spu.c \ xine_spu_decoder.c -AM_CPPFLAGS = -I$(top_srcdir)/src/input/libdvdnav xineplug_decode_spu_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) endif -xineplug_decode_spu_la_CFLAGS = $(DVDNAV_CFLAGS) $(VISIBILITY_FLAG) -xineplug_decode_spu_la_LDFLAGS = $(xineplug_ldflags) +xineplug_decode_spu_la_CFLAGS = $(AM_CFLAGS) $(DVDNAV_CFLAGS) noinst_HEADERS = spu.h diff --git a/src/libspudvb/Makefile.am b/src/libspudvb/Makefile.am index e385e5553..f4248909f 100644 --- a/src/libspudvb/Makefile.am +++ b/src/libspudvb/Makefile.am @@ -1,8 +1,9 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + xineplug_LTLIBRARIES = xineplug_decode_spudvb.la xineplug_decode_spudvb_la_SOURCES = xine_spudvb_decoder.c xineplug_decode_spudvb_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_decode_spudvb_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_decode_spudvb_la_LDFLAGS = $(xineplug_ldflags) diff --git a/src/libsputext/Makefile.am b/src/libsputext/Makefile.am index 5e4ce59d0..71af2a1d3 100644 --- a/src/libsputext/Makefile.am +++ b/src/libsputext/Makefile.am @@ -1,13 +1,12 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) xineplug_LTLIBRARIES = xineplug_decode_sputext.la xineplug_dmx_sputext.la xineplug_dmx_sputext_la_SOURCES = demux_sputext.c xineplug_dmx_sputext_la_LIBADD = $(XINE_LIB) -xineplug_dmx_sputext_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_decode_sputext_la_SOURCES = xine_sputext_decoder.c xineplug_decode_sputext_la_LIBADD = $(XINE_LIB) -xineplug_decode_sputext_la_CFLAGS = $(VISIBILITY_FLAG) diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am index 367dc3bda..774cc8705 100644 --- a/src/libw32dll/Makefile.am +++ b/src/libw32dll/Makefile.am @@ -1,6 +1,8 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = -I$(srcdir)/wine -DWIN32_PATH=\"@w32_path@\" $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_CPPFLAGS = -I$(srcdir)/wine -DWIN32_PATH=\"@w32_path@\" +AM_LDFLAGS = $(xineplug_ldflags) SUBDIRS = wine DirectShow dmo qtx @@ -15,7 +17,6 @@ EXTRA_DIST = common.c xineplug_decode_w32dll_la_SOURCES = w32codec.c xineplug_decode_w32dll_la_CFLAGS = $(AM_CFLAGS) $(XDG_BASEDIR_CFLAGS) -xineplug_decode_w32dll_la_LDFLAGS = -avoid-version -module xineplug_decode_w32dll_la_DEPS = $(XDG_BASEDIR_DEPS) xineplug_decode_w32dll_la_LIBADD = \ $(top_builddir)/src/libw32dll/wine/libwine.la \ @@ -28,7 +29,6 @@ xineplug_decode_w32dll_la_LIBADD = \ $(XDG_BASEDIR_LIBS) xineplug_decode_qt_la_SOURCES = qt_decoder.c -xineplug_decode_qt_la_LDFLAGS = -avoid-version -module xineplug_decode_qt_la_LIBADD = \ $(top_builddir)/src/libw32dll/wine/libwine.la \ $(XINE_LIB) \ diff --git a/src/libw32dll/wine/Makefile.am b/src/libw32dll/wine/Makefile.am index b53d2c078..1fd132dca 100644 --- a/src/libw32dll/wine/Makefile.am +++ b/src/libw32dll/wine/Makefile.am @@ -1,20 +1,16 @@ include $(top_srcdir)/misc/Makefile.common -LIBTOOL = $(SHELL) $(top_builddir)/libtool - EXTRA_DIST = stubs.s wrapper.S noinst_LTLIBRARIES = $(wine_lib) -AM_CFLAGS = $(X_CFLAGS) @W32_NO_OPTIMIZE@ \ - -Wmissing-prototypes -Wimplicit-function-declaration \ - -DWIN32_PATH=\"@w32_path@\" -I$(srcdir)/.. -D__WINE__ \ +# disable -fomit-frame-pointer, -finline-functions, and -frename-registers +# because they cause bad behavior of wine +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) @W32_NO_OPTIMIZE@ \ + -fno-omit-frame-pointer -fno-inline-functions -fno-rename-registers +AM_CPPFLAGS = -DWIN32_PATH=\"@w32_path@\" -I$(srcdir)/.. -D__WINE__ \ -Ddbg_printf=__vprintf -DTRACE=__vprintf -# CFLAGS is here to filter out -fomit-frame-pointer, -# -finline-functions and -frename-registers because they cause bad -# behavior of wine -CFLAGS = `echo @CFLAGS@ | sed -e 's/-fomit-frame-pointer//g;s/-finline-functions//g;s/-frename-registers//g'` if HAVE_W32DLL wine_lib = libwine.la diff --git a/src/libxineadec/Makefile.am b/src/libxineadec/Makefile.am index 08d1df3dc..0d209be43 100644 --- a/src/libxineadec/Makefile.am +++ b/src/libxineadec/Makefile.am @@ -4,6 +4,7 @@ EXTRA_DIST = fooaudio.c SUBDIRS = gsm610 nosefart +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) if HAVE_VORBIS @@ -38,31 +39,30 @@ xineplug_LTLIBRARIES = \ $(dts_module) xineplug_decode_gsm610_la_SOURCES = gsm610.c -xineplug_decode_gsm610_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_decode_gsm610_la_LIBADD = $(XINE_LIB) gsm610/libgsm610.la xineplug_decode_nsf_la_SOURCES = nsf.c -xineplug_decode_nsf_la_CFLAGS = $(VISIBILITY_FLAG) -DNSF_PLAYER -fno-strict-aliasing +xineplug_decode_nsf_la_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing +xineplug_decode_nsf_la_CPPFLAGS = -DNSF_PLAYER xineplug_decode_nsf_la_LIBADD = $(XINE_LIB) -lm nosefart/libnosefart.la xineplug_decode_lpcm_la_SOURCES = xine_lpcm_decoder.c -xineplug_decode_lpcm_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_decode_lpcm_la_LIBADD = $(XINE_LIB) xineplug_decode_vorbis_la_SOURCES = xine_vorbis_decoder.c xineplug_decode_vorbis_la_LIBADD = $(XINE_LIB) $(VORBIS_LIBS) $(OGG_LIBS) -xineplug_decode_vorbis_la_CFLAGS = $(VISIBILITY_FLAG) $(VORBIS_CFLAGS) +xineplug_decode_vorbis_la_CFLAGS = $(AM_CFLAGS) $(VORBIS_CFLAGS) xineplug_decode_speex_la_SOURCES = xine_speex_decoder.c xineplug_decode_speex_la_LIBADD = $(XINE_LIB) $(SPEEX_LIBS) -xineplug_decode_speex_la_CFLAGS = $(VISIBILITY_FLAGS) $(SPEEX_CFLAGS) +xineplug_decode_speex_la_CFLAGS = $(AM_CFLAGS) $(SPEEX_CFLAGS) xineplug_decode_mpc_la_SOURCES = xine_musepack_decoder.c -xineplug_decode_mpc_la_CFLAGS = $(VISIBILITY_FLAG) $(MPCDEC_CFLAGS) +xineplug_decode_mpc_la_CFLAGS = $(AM_CFLAGS) $(MPCDEC_CFLAGS) xineplug_decode_mpc_la_DEPENDENCIES = $(MPCDEC_DEPS) xineplug_decode_mpc_la_LIBADD = $(XINE_LIB) $(MPCDEC_LIBS) xineplug_decode_dts_la_SOURCES = xine_dts_decoder.c -xineplug_decode_dts_la_CFLAGS = $(LIBDTS_CFLAGS) $(VISIBILITY_FLAG) +xineplug_decode_dts_la_CFLAGS = $(AM_CFLAGS) $(LIBDTS_CFLAGS) xineplug_decode_dts_la_DEPENDENCIES = $(LIBDTS_DEPS) xineplug_decode_dts_la_LIBADD = $(XINE_LIB) $(LIBDTS_LIBS) diff --git a/src/libxineadec/gsm610/Makefile.am b/src/libxineadec/gsm610/Makefile.am index fe25ad9c3..f2011dfd4 100644 --- a/src/libxineadec/gsm610/Makefile.am +++ b/src/libxineadec/gsm610/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + noinst_LTLIBRARIES = libgsm610.la libgsm610_la_SOURCES = \ @@ -14,8 +17,6 @@ libgsm610_la_SOURCES = \ short_term.c \ table.c -libgsm610_la_CFLAGS = $(VISIBILITY_FLAG) -libgsm610_la_LDFLAGS = -avoid-version -module noinst_HEADERS = \ gsm_config.h \ diff --git a/src/libxineadec/nosefart/Makefile.am b/src/libxineadec/nosefart/Makefile.am index 51cc3f238..83c04a28d 100644 --- a/src/libxineadec/nosefart/Makefile.am +++ b/src/libxineadec/nosefart/Makefile.am @@ -1,5 +1,7 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) + noinst_LTLIBRARIES = libnosefart.la libnosefart_la_SOURCES = \ @@ -15,7 +17,8 @@ libnosefart_la_SOURCES = \ nsf.c \ vrcvisnd.c -libnosefart_la_CFLAGS = $(VISIBILITY_FLAG) -DNSF_PLAYER -fno-strict-aliasing +libnosefart_la_CFLAGS = $(AM_CFLAGS) -fno-strict-aliasing +libnosefart_la_CPPFLAGS = -DNSF_PLAYER noinst_HEADERS = \ dis6502.h \ diff --git a/src/libxinevdec/Makefile.am b/src/libxinevdec/Makefile.am index 87ee050e6..728991a96 100644 --- a/src/libxinevdec/Makefile.am +++ b/src/libxinevdec/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) EXTRA_DIST = foovideo.c diff --git a/src/post/audio/Makefile.am b/src/post/audio/Makefile.am index f4018a780..3fae4f92c 100644 --- a/src/post/audio/Makefile.am +++ b/src/post/audio/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + noinst_HEADERS = dsp.h filter.h window.h audio_filters.h xinepost_LTLIBRARIES = xineplug_post_audio_filters.la @@ -7,6 +10,4 @@ xinepost_LTLIBRARIES = xineplug_post_audio_filters.la xineplug_post_audio_filters_la_SOURCES = \ upmix.c upmix_mono.c filter.c window.c stretch.c volnorm.c audio_filters.c xineplug_post_audio_filters_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -lm -xineplug_post_audio_filters_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_post_audio_filters_la_LDFLAGS = -avoid-version -module diff --git a/src/post/deinterlace/Makefile.am b/src/post/deinterlace/Makefile.am index d2d1d5c10..4296b637c 100644 --- a/src/post/deinterlace/Makefile.am +++ b/src/post/deinterlace/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) + SUBDIRS = plugins EXTRA_DIST = @@ -11,8 +14,4 @@ xineplug_post_tvtime_la_SOURCES = xine_plugin.c \ xineplug_post_tvtime_la_LIBADD = $(XINE_LIB) \ $(top_builddir)/src/post/deinterlace/plugins/libdeinterlaceplugins.la -xineplug_post_tvtime_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_post_tvtime_la_LDFLAGS = -avoid-version -module \ - @IMPURE_TEXT_LDFLAGS@ - noinst_HEADERS = deinterlace.h pulldown.h speedtools.h speedy.h tvtime.h diff --git a/src/post/deinterlace/plugins/Makefile.am b/src/post/deinterlace/plugins/Makefile.am index dcfa60180..33cff9d7f 100644 --- a/src/post/deinterlace/plugins/Makefile.am +++ b/src/post/deinterlace/plugins/Makefile.am @@ -29,10 +29,17 @@ EXTRA_DIST = greedy2frame_template.c greedyh.asm \ tomsmocomp/tomsmocompmacros.h x86-64_macros.inc # libpostproc is here so we can use their nice mangle.h -AM_CFLAGS = -I$(top_srcdir)/src/post/deinterlace \ +AM_CFLAGS = $(VISIBILITY_FLAG) +AM_CPPFLAGS = -I$(top_srcdir)/src/post/deinterlace \ -I$(top_srcdir)/contrib/ffmpeg/libpostproc -noinst_LTLIBRARIES = libdeinterlaceplugins.la +# per-object CFLAGS -- drop optimization on kdetv_greedyh.c so that gcc +# doesn't run out of general registers trying to compile it. + +noinst_LTLIBRARIES = libdeinterlacepluginsO1.la libdeinterlaceplugins.la + +libdeinterlacepluginsO1_la_SOURCES = kdetv_greedyh.c +libdeinterlacepluginsO1_la_CFLAGS = $(AM_CFLAGS) $(O1_CFLAGS) libdeinterlaceplugins_la_SOURCES = \ double.c \ @@ -43,10 +50,9 @@ libdeinterlaceplugins_la_SOURCES = \ weave.c \ greedy2frame.c \ scalerbob.c \ - kdetv_greedyh.c \ kdetv_tomsmocomp.c -libdeinterlaceplugins_la_LIBADD = $(XINE_LIB) -libdeinterlaceplugins_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) -libdeinterlaceplugins_la_LDFLAGS = -avoid-version -module +libdeinterlaceplugins_la_LIBADD = libdeinterlacepluginsO1.la $(XINE_LIB) +libdeinterlaceplugins_la_CFLAGS = $(AM_CFLAGS) $(DEFAULT_OCFLAGS) +libdeinterlaceplugins_la_LDFLAGS = $(xineplug_ldflags) noinst_HEADERS = plugins.h greedyhmacros.h diff --git a/src/post/goom/Makefile.am b/src/post/goom/Makefile.am index 481b66b41..a8dc13ab0 100644 --- a/src/post/goom/Makefile.am +++ b/src/post/goom/Makefile.am @@ -1,15 +1,18 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + EXTRA_DIST = mmx.c xmmx.c ppc_drawings.s ppc_zoom_ultimate.s diff_against_release.patch \ gfontrle.c mathtools.c ## -fomit-frame-pointer segfaults here ## Use -O2 if -Os is stripped or x86 does not build #CFLAGS = `echo @CFLAGS@ | sed -e 's/-fomit-frame-pointer//g;s/-Os/-O2/g'` -CFLAGS = `echo @CFLAGS@ | sed -e 's/-Os/-O2/g'` +#CFLAGS = `echo @CFLAGS@ | sed -e 's/-Os/-O2/g'` # Avoid errors with -O0 -xineplug_post_goom_la-xmmx.o xineplug_post_goom_la-xmmx.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'` +#xineplug_post_goom_la-xmmx.o xineplug_post_goom_la-xmmx.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'` xinepost_LTLIBRARIES = xineplug_post_goom.la @@ -19,18 +22,12 @@ xinepost_LTLIBRARIES = xineplug_post_goom.la #AM_CPPFLAGS = -DCPU_POWERPC #endif -#if HAVE_MMX -extra_files = mmx.c xmmx.c -#endif - -xineplug_post_goom_la_SOURCES = $(extra_files) xine_goom.c \ +xineplug_post_goom_la_SOURCES = mmx.c xmmx.c xine_goom.c \ config_param.c convolve_fx.c cpu_info.c drawmethods.c filters.c flying_stars_fx.c \ gfontlib.c goom_core.c goom_tools.c goomsl.c goomsl_hash.c goomsl_heap.c \ goomsl_lex.c goomsl_yacc.c graphic.c ifs.c lines.c \ plugin_info.c sound_tester.c surf3d.c tentacle3d.c v3d.c xineplug_post_goom_la_LIBADD = $(XINE_LIB) $(GOOM_LIBS) $(PTHREAD_LIBS) -lm -xineplug_post_goom_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_post_goom_la_LDFLAGS = -avoid-version -module noinst_HEADERS = cpu_info.h default_scripts.h drawmethods.h gfontlib.h goom.h \ goom_config.h goom_config_param.h goom_filters.h goom_fx.h goom_graphic.h \ diff --git a/src/post/mosaico/Makefile.am b/src/post/mosaico/Makefile.am index c18b4e19c..2fa3fc7a5 100644 --- a/src/post/mosaico/Makefile.am +++ b/src/post/mosaico/Makefile.am @@ -1,13 +1,12 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + xinepost_LTLIBRARIES = xineplug_post_mosaico.la xineplug_post_switch.la xineplug_post_mosaico_la_SOURCES = mosaico.c xineplug_post_mosaico_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_post_mosaico_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_post_mosaico_la_LDFLAGS = -avoid-version -module xineplug_post_switch_la_SOURCES = switch.c xineplug_post_switch_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_post_switch_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_post_switch_la_LDFLAGS = -avoid-version -module diff --git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am index 6d239202b..1c243397d 100644 --- a/src/post/planar/Makefile.am +++ b/src/post/planar/Makefile.am @@ -15,21 +15,19 @@ endif # -fomit-frame-pointer is always needed. it might cause debug to not # work, but at least it compiles. -AM_CFLAGS = $(ff_cflags) -fomit-frame-pointer +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) $(ff_cflags) -fomit-frame-pointer +AM_LDFLAGS = $(xineplug_ldflags) $(IMPURE_TEXT_LDFLAGS) # Avoid errors with -O0 -xineplug_post_planar_la-eq.o xineplug_post_planar_la-eq.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'` -xineplug_post_planar_la-eq2.o xineplug_post_planar_la-eq2.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'` -xineplug_post_planar_la-noise.o xineplug_post_planar_la-noise.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'` +#xineplug_post_planar_la-eq.o xineplug_post_planar_la-eq.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'` +#xineplug_post_planar_la-eq2.o xineplug_post_planar_la-eq2.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'` +#xineplug_post_planar_la-noise.o xineplug_post_planar_la-noise.lo: CFLAGS=`echo @CFLAGS@ | sed -e 's/-O0\?\s/-Os /g'` xinepost_LTLIBRARIES = xineplug_post_planar.la xineplug_post_planar_la_SOURCES = planar.c invert.c expand.c fill.c boxblur.c \ denoise3d.c eq.c eq2.c unsharp.c pp.c noise.c xineplug_post_planar_la_LIBADD = $(XINE_LIB) $(postproc_lib) -lm $(PTHREAD_LIBS) -xineplug_post_planar_la_LDFLAGS = -avoid-version -module \ - @IMPURE_TEXT_LDFLAGS@ -xineplug_post_planar_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS) $(POSTPROC_INT_LIB): cd $(top_builddir)/src/libffmpeg/libavcodec/libpostproc && $(MAKE) libpostprocess.la diff --git a/src/post/visualizations/Makefile.am b/src/post/visualizations/Makefile.am index f42598d9c..a02a74f77 100644 --- a/src/post/visualizations/Makefile.am +++ b/src/post/visualizations/Makefile.am @@ -1,5 +1,8 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) +AM_LDFLAGS = $(xineplug_ldflags) + EXTRA_DIST = fooviz.c xinepost_LTLIBRARIES = xineplug_post_visualizations.la @@ -7,7 +10,5 @@ xinepost_LTLIBRARIES = xineplug_post_visualizations.la xineplug_post_visualizations_la_SOURCES = \ visualizations.c fft.c fftscope.c oscope.c fftgraph.c xineplug_post_visualizations_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -lm -xineplug_post_visualizations_la_CFLAGS = $(VISIBILITY_FLAG) -xineplug_post_visualizations_la_LDFLAGS = -avoid-version -module noinst_HEADERS = fft.h visualizations.h diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am index 148eda84c..acab646c8 100644 --- a/src/video_out/Makefile.am +++ b/src/video_out/Makefile.am @@ -1,13 +1,14 @@ include $(top_srcdir)/misc/Makefile.common -AM_CPPFLAGS = -DXINE_COMPILE +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) AM_LDFLAGS = $(xineplug_ldflags) +AM_OBJCFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) SUBDIRS = libdha vidix macosx EXTRA_DIST = video_out_directfb.c video_out_directfb_fb.c video_out_directfb_x.c video_out_directx.c video_out_macosx.m -VIDIX_CFLAGS = -I$(top_builddir)/src/video_out/vidix \ +VIDIX_CPPFLAGS = -I$(top_builddir)/src/video_out/vidix \ -I$(top_srcdir)/src/video_out/vidix if HAVE_X11 @@ -104,101 +105,93 @@ xineplug_LTLIBRARIES = $(xshm_module) $(xv_module) $(xvmc_module) \ xineplug_vo_out_xcbshm_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c video_out_xcbshm.c $(XCBOSD) xineplug_vo_out_xcbshm_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(XCB_LIBS) $(XCBSHM_LIBS) -xineplug_vo_out_xcbshm_la_CFLAGS = $(VISIBILITY_FLAG) $(MLIB_CFLAGS) $(XCB_CFLAGS) $(XCBSHM_CFLAGS) +xineplug_vo_out_xcbshm_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS) $(XCB_CFLAGS) $(XCBSHM_CFLAGS) xineplug_vo_out_xcbxv_la_SOURCES = deinterlace.c video_out_xcbxv.c $(XCBOSD) xineplug_vo_out_xcbxv_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) $(XCBXV_LIBS) $(XCB_LIBS) -xineplug_vo_out_xcbxv_la_CFLAGS = $(VISIBILITY_FLAG) $(XCB_CFLAGS) $(XCBXV_CFLAGS) +xineplug_vo_out_xcbxv_la_CFLAGS = $(AM_CFLAGS) $(XCB_CFLAGS) $(XCBXV_CFLAGS) xineplug_vo_out_xshm_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_xshm.c $(X11OSD) xineplug_vo_out_xshm_la_LIBADD = $(MLIB_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_xshm_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_xshm_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing xineplug_vo_out_xv_la_SOURCES = $(X11OSD) deinterlace.c video_out_xv.c xineplug_vo_out_xv_la_LIBADD = $(XV_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_xv_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_xv_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing xineplug_vo_out_xvmc_la_SOURCES = deinterlace.c video_out_xvmc.c xineplug_vo_out_xvmc_la_LIBADD = $(XVMC_LIBS) $(XV_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_xvmc_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(XV_CFLAGS) +xineplug_vo_out_xvmc_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(XV_CFLAGS) xineplug_vo_out_xxmc_la_SOURCES = $(X11OSD) deinterlace.c video_out_xxmc.c\ xvmc_mocomp.c xvmc_vld.c xxmc.h xineplug_vo_out_xxmc_la_LIBADD = $(XXMC_LIBS) $(XV_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_xxmc_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_xxmc_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(XV_CFLAGS) -fno-strict-aliasing xineplug_vo_out_opengl_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_opengl.c myglext.h $(X11OSD) xineplug_vo_out_opengl_la_LIBADD = $(MLIB_LIBS) $(OPENGL_LIBS) $(GLUT_LIBS) \ $(GLU_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) $(DYNAMIC_LD_LIBS) -xineplug_vo_out_opengl_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_opengl_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(MLIB_CFLAGS) -fno-strict-aliasing xineplug_vo_out_syncfb_la_SOURCES = video_out_syncfb.c xineplug_vo_out_syncfb_la_LIBADD = $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_syncfb_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_vo_out_pgx64_la_SOURCES = video_out_pgx64.c xineplug_vo_out_pgx64_la_LIBADD = $(XINE_LIB) $(X_LIBS) $(SUNDGA_LIBS) $(PTHREAD_LIBS) -xineplug_vo_out_pgx64_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) +xineplug_vo_out_pgx64_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) xineplug_vo_out_pgx32_la_SOURCES = video_out_pgx32.c xineplug_vo_out_pgx32_la_LIBADD = $(XINE_LIB) $(X_LIBS) $(SUNDGA_LIBS) $(PTHREAD_LIBS) -xineplug_vo_out_pgx32_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) +xineplug_vo_out_pgx32_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) xineplug_vo_out_vidix_la_SOURCES = video_out_vidix.c $(X11OSD) xineplug_vo_out_vidix_la_LIBADD = $(XINE_LIB) $(X_LIBS) \ $(top_builddir)/src/video_out/vidix/libvidix.la $(PTHREAD_LIBS) -xineplug_vo_out_vidix_la_CFLAGS = $(VISIBILITY_FLAG) $(VIDIX_CFLAGS) $(X_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_vidix_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_vidix_la_CPPFLAGS = $(VIDIX_CPPFLAGS) xineplug_vo_out_aa_la_SOURCES = video_out_aa.c xineplug_vo_out_aa_la_LIBADD = $(AALIB_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_aa_la_CFLAGS = $(VISIBILITY_FLAG) $(AALIB_CFLAGS) +xineplug_vo_out_aa_la_CFLAGS = $(AM_CFLAGS) $(AALIB_CFLAGS) xineplug_vo_out_caca_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_caca.c xineplug_vo_out_caca_la_LIBADD = $(CACA_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_caca_la_CFLAGS = $(VISIBILITY_FLAG) $(CACA_CFLAGS) +xineplug_vo_out_caca_la_CFLAGS = $(AM_CFLAGS) $(CACA_CFLAGS) xineplug_vo_out_fb_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c yuv2rgb_mlib.c \ video_out_fb.c xineplug_vo_out_fb_la_LIBADD = $(MLIB_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_fb_la_CFLAGS = $(VISIBILITY_FLAG) $(MLIB_CFLAGS) +xineplug_vo_out_fb_la_CFLAGS = $(AM_CFLAGS) $(MLIB_CFLAGS) xineplug_vo_out_directfb_la_SOURCES = video_out_directfb_fb.c xineplug_vo_out_directfb_la_LIBADD = $(XINE_LIB) $(DIRECTFB_LIBS) $(PTHREAD_LIBS) -xineplug_vo_out_directfb_la_CFLAGS = $(VISIBILITY_FLAG) $(DIRECTFB_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_directfb_la_CFLAGS = $(AM_CFLAGS) $(DIRECTFB_CFLAGS) -fno-strict-aliasing xineplug_vo_out_xdirectfb_la_SOURCES = video_out_directfb_x.c $(X11OSD) xineplug_vo_out_xdirectfb_la_LIBADD = $(XINE_LIB) $(DIRECTFB_LIBS) $(X_LIBS) $(PTHREAD_LIBS) -xineplug_vo_out_xdirectfb_la_CFLAGS = $(VISIBILITY_FLAG) $(DIRECTFB_CFLAGS) -fno-strict-aliasing +xineplug_vo_out_xdirectfb_la_CFLAGS = $(AM_CFLAGS) $(DIRECTFB_CFLAGS) -fno-strict-aliasing xineplug_vo_out_sdl_la_SOURCES = video_out_sdl.c xineplug_vo_out_sdl_la_LIBADD = $(SDL_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_sdl_la_CFLAGS = $(VISIBILITY_FLAG) $(X_CFLAGS) $(SDL_CFLAGS) +xineplug_vo_out_sdl_la_CFLAGS = $(AM_CFLAGS) $(X_CFLAGS) $(SDL_CFLAGS) xineplug_vo_out_stk_la_SOURCES = video_out_stk.c xineplug_vo_out_stk_la_LIBADD = $(XINE_LIB) $(LIBSTK_LIBS) $(PTHREAD_LIBS) -xineplug_vo_out_stk_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBSTK_CFLAGS) +xineplug_vo_out_stk_la_CFLAGS = $(AM_CFLAGS) $(LIBSTK_CFLAGS) xineplug_vo_out_directx_la_SOURCES = yuv2rgb.c yuv2rgb_mmx.c video_out_directx.c -xineplug_vo_out_directx_la_CPPFLAGS = $(AM_CPPFLAGS) $(DIRECTX_CPPFLAGS) +xineplug_vo_out_directx_la_CPPFLAGS = $(DIRECTX_CPPFLAGS) xineplug_vo_out_directx_la_LIBADD = $(DIRECTX_VIDEO_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_directx_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_vo_out_none_la_SOURCES = video_out_none.c xineplug_vo_out_none_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) -xineplug_vo_out_none_la_CFLAGS = $(VISIBILITY_FLAG) xineplug_vo_out_macosx_la_SOURCES = video_out_macosx.m -xineplug_vo_out_macosx_la_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS) $(MLIB_CFLAGS) -xineplug_vo_out_macosx_la_OBJCFLAGS = $(VISIBILITY_FLAG) -xineplug_vo_out_macosx_la_LIBADD = $(MLIB_LIBS) $(OPENGL_LIBS) $(GLUT_LIBS) \ - $(GLU_LIBS) $(X_LIBS) $(XINE_LIB) $(PTHREAD_LIBS) -# The "-Wl,-framework -Wl,Cocoa" is needed for libtool versions before -# 1.5.x (1.257): the default version that ships with Mac OS X is 1.5 (1.1220) -xineplug_vo_out_macosx_la_LDFLAGS = $(AM_LDFLAGS) \ - -Wl,-framework -Wl,Cocoa -framework Cocoa -framework OpenGL +xineplug_vo_out_macosx_la_LIBADD = $(XINE_LIB) $(PTHREAD_LIBS) +xineplug_vo_out_macosx_la_LDFLAGS = $(AM_LDFLAGS) -framework Cocoa -framework OpenGL noinst_HEADERS = deinterlace.h video_out_syncfb.h \ yuv2rgb.h x11osd.h xcbosd.h diff --git a/src/video_out/libdha/Makefile.am b/src/video_out/libdha/Makefile.am index 8d94347d1..553907fc9 100644 --- a/src/video_out/libdha/Makefile.am +++ b/src/video_out/libdha/Makefile.am @@ -4,7 +4,7 @@ EXTRA_DIST = README pci_db2c.awk SUBDIRS = bin kernelhelper oth sysdep -AM_CFLAGS = @STATIC@ +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(STATIC) if HAVE_VIDIX dha_lib = libdha.la diff --git a/src/video_out/macosx/Makefile.am b/src/video_out/macosx/Makefile.am index a69f30dc5..d649dfe1d 100644 --- a/src/video_out/macosx/Makefile.am +++ b/src/video_out/macosx/Makefile.am @@ -1,6 +1,6 @@ include $(top_srcdir)/misc/Makefile.common -AM_CPPFLAGS = -DXINE_COMPILE +AM_OBJCFLAGS = $(DEFAULT_OCFLAGS) $(VISIBILITY_FLAG) EXTRA_DIST = \ video_window.h \ @@ -14,12 +14,8 @@ if HAVE_MACOSX_VIDEO lib_LTLIBRARIES = libxineMacOSXVideo.la libxineMacOSXVideo_la_SOURCES = XineOpenGLView.m XineVideoWindow.m -# The "-Wl,-framework -Wl,..." is needed for libtool versions before -# 1.5.x (1.257): the default version that ships with Mac OS X is 1.5 (1.1220) -libxineMacOSXVideo_la_LDFLAGS = -version-info \ - $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE) \ - -Wl,-framework -Wl,Cocoa -framework Cocoa \ - -Wl,-framework -Wl,OpenGL -framework OpenGL +libxineMacOSXVideo_la_LDFLAGS = -framework Cocoa -framework OpenGL \ + -version-info $(XINE_LT_CURRENT):$(XINE_LT_REVISION):$(XINE_LT_AGE) xineinclude_HEADERS = video_window.h XineOpenGLView.h XineVideoWindow.h diff --git a/src/video_out/vidix/Makefile.am b/src/video_out/vidix/Makefile.am index 2ca8f168a..e002c56f0 100644 --- a/src/video_out/vidix/Makefile.am +++ b/src/video_out/vidix/Makefile.am @@ -4,7 +4,9 @@ EXTRA_DIST = README vidix.txt SUBDIRS = drivers -AM_CFLAGS = @STATIC@ +AM_CFLAGS = $(STATIC) +AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix \ + -I$(top_builddir)/src/video_out/libdha if HAVE_VIDIX vidix_lib = libvidix.la @@ -17,5 +19,3 @@ libvidix_la_LIBADD = $(DYNAMIC_LD_LIBS) $(top_builddir)/src/video_out/libdha/lib noinst_HEADERS = fourcc.h vidix.h vidixlib.h -AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix \ - -I$(top_builddir)/src/video_out/libdha diff --git a/src/video_out/vidix/drivers/Makefile.am b/src/video_out/vidix/drivers/Makefile.am index f438dde36..23272e4c9 100644 --- a/src/video_out/vidix/drivers/Makefile.am +++ b/src/video_out/vidix/drivers/Makefile.am @@ -1,5 +1,11 @@ include $(top_srcdir)/misc/Makefile.common +AM_CFLAGS = $(DEFAULT_OCFLAGS) +AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix \ + -I$(top_srcdir)/src/video_out/libdha \ + -I$(top_builddir)/src/video_out/libdha +AM_LDFLAGS = $(xineplug_ldflags) + EXTRA_DIST = genfb_vid.c if HAVE_VIDIX @@ -21,46 +27,36 @@ endif vidix_LTLIBRARIES = $(vidix_drivers) radeon_vid_la_SOURCES = radeon_vid.c -radeon_vid_la_LDFLAGS = -avoid-version -module -lm +radeon_vid_la_LIBADD = -lm rage128_vid_la_SOURCES = radeon_vid.c -rage128_vid_la_LDFLAGS = -avoid-version -module -lm -rage128_vid_la_CFLAGS = -DRAGE128 $(AM_CFLAGS) +rage128_vid_la_LIBADD = -lm +rage128_vid_la_CPPFLAGS = $(AM_CPPFLAGS) -DRAGE128 pm2_vid_la_SOURCES = pm2_vid.c -pm2_vid_la_LDFLAGS = -avoid-version -module pm3_vid_la_SOURCES = pm3_vid.c -pm3_vid_la_LDFLAGS = -avoid-version -module mach64_vid_la_SOURCES = mach64_vid.c -mach64_vid_la_LDFLAGS = -avoid-version -module mga_vid_la_SOURCES = mga_vid.c -mga_vid_la_LDFLAGS = -avoid-version -module -lm +mga_vid_la_LIBADD = -lm mga_crtc2_vid_la_SOURCES = mga_vid.c -mga_crtc2_vid_la_LDFLAGS = -avoid-version -module -lm -mga_crtc2_vid_la_CFLAGS = -DCRTC2 $(AM_CFLAGS) +mga_crtc2_vid_la_LIBADD = -lm +mga_crtc2_vid_la_CPPFLAGS = $(AM_CPPFLAGS) -DCRTC2 cyberblade_vid_la_SOURCES = cyberblade_vid.c -cyberblade_vid_la_LDFLAGS = -avoid-version -module unichrome_vid_la_SOURCES = unichrome_vid.c -unichrome_vid_la_LDFLAGS = -avoid-version -module nvidia_vid_la_SOURCES = nvidia_vid.c -nvidia_vid_la_LDFLAGS = -avoid-version -module sis_vid_la_SOURCES = sis_vid.c sis_bridge.c -sis_vid_la_LDFLAGS = -avoid-version -module savage_vid_la_SOURCES = savage_vid.c -savage_vid_la_LDFLAGS = -avoid-version -module -lm +savage_vid_la_LIBADD = -lm noinst_HEADERS = mach64.h glint_regs.h pm3_regs.h radeon.h savage_regs.h \ cyberblade_regs.h unichrome_regs.h sis_defs.h sis_regs.h -AM_CPPFLAGS = -I$(top_srcdir)/src/video_out/vidix \ - -I$(top_srcdir)/src/video_out/libdha \ - -I$(top_builddir)/src/video_out/libdha diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index aeb142708..f64dacba1 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -1,10 +1,9 @@ include $(top_srcdir)/misc/Makefile.common include $(top_srcdir)/lib/Makefile.common -AM_CFLAGS = $(X_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(XDG_BASEDIR_CFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(XDG_BASEDIR_CFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS = $(ZLIB_CPPFLAGS) -DXINE_LIBRARY_COMPILE -LIBTOOL = $(SHELL) $(top_builddir)/libtool lib_LTLIBRARIES = libxine.la XINEUTILS_LIB = $(top_builddir)/src/xine-utils/libxineutils.la diff --git a/src/xine-utils/Makefile.am b/src/xine-utils/Makefile.am index 95de06b9e..1e58d9fc1 100644 --- a/src/xine-utils/Makefile.am +++ b/src/xine-utils/Makefile.am @@ -1,6 +1,5 @@ include $(top_srcdir)/misc/Makefile.common -LIBTOOL = $(SHELL) $(top_builddir)/libtool noinst_LTLIBRARIES = libxineutils.la EXTRA_DIST = ppcasm_string.S ppc_asm.tmpl @@ -11,7 +10,7 @@ pppc_files = ppcasm_string.S endif endif -AM_CFLAGS = $(X_CFLAGS) $(VISIBILITY_FLAG) +AM_CFLAGS = $(DEFAULT_OCFLAGS) $(X_CFLAGS) $(VISIBILITY_FLAG) AM_CPPFLAGS=-DXINE_LIBRARY_COMPILE libxineutils_la_SOURCES = $(pppc_files) \ |