diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-23 15:06:46 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-05-23 15:06:46 +0200 |
commit | 683816956c72b12685e60e3082e2195d8eaa7758 (patch) | |
tree | 4268e813e4c890eb64be6c00465b875933e473be /m4 | |
parent | 9c1ca7282eba7499c604a5bdaa27b635261025a9 (diff) | |
parent | 77a00bc73b2ab8eb0924e09fe18f5b0e694949e1 (diff) | |
download | xine-lib-683816956c72b12685e60e3082e2195d8eaa7758.tar.gz xine-lib-683816956c72b12685e60e3082e2195d8eaa7758.tar.bz2 |
Merge from 1.1. VDR needs to be updated.
--HG--
rename : src/liba52/parse.c => contrib/a52dec/parse.c
rename : include/xine.h.in => include/xine.h
rename : src/xine-engine/alphablend.h => include/xine/alphablend.h
rename : src/xine-utils/attributes.h => include/xine/attributes.h
rename : src/xine-engine/buffer.h => include/xine/buffer.h
rename : src/input/input_plugin.h => include/xine/input_plugin.h
rename : src/xine-utils/xineutils.h => include/xine/xineutils.h
rename : src/libxineadec/fooaudio.c => src/audio_dec/fooaudio.c
rename : src/libxineadec/gsm610.c => src/audio_dec/gsm610.c
rename : src/liba52/xine_a52_decoder.c => src/audio_dec/xine_a52_decoder.c
rename : src/libdts/xine_dts_decoder.c => src/audio_dec/xine_dts_decoder.c
rename : src/libfaad/xine_faad_decoder.c => src/audio_dec/xine_faad_decoder.c
rename : src/libxineadec/xine_lpcm_decoder.c => src/audio_dec/xine_lpcm_decoder.c
rename : src/libmad/xine_mad_decoder.c => src/audio_dec/xine_mad_decoder.c
rename : src/libmusepack/xine_musepack_decoder.c => src/audio_dec/xine_musepack_decoder.c
rename : src/combined/decoder_flac.c => src/combined/flac_decoder.c
rename : src/combined/demux_flac.c => src/combined/flac_demuxer.c
rename : src/libxineadec/nsf.c => src/combined/nsf_decoder.c
rename : src/demuxers/demux_nsf.c => src/combined/nsf_demuxer.c
rename : src/combined/combined_wavpack.h => src/combined/wavpack_combined.h
rename : src/combined/decoder_wavpack.c => src/combined/wavpack_decoder.c
rename : src/combined/demux_wavpack.c => src/combined/wavpack_demuxer.c
rename : src/demuxers/demux_ogg.c => src/combined/xine_ogg_demuxer.c
rename : src/libxineadec/xine_speex_decoder.c => src/combined/xine_speex_decoder.c
rename : src/libxinevdec/xine_theora_decoder.c => src/combined/xine_theora_decoder.c
rename : src/libxineadec/xine_vorbis_decoder.c => src/combined/xine_vorbis_decoder.c
rename : src/libspucc/cc_decoder.c => src/spu_dec/cc_decoder.c
rename : src/libspucmml/xine_cmml_decoder.c => src/spu_dec/cmml_decoder.c
rename : src/libspudec/xine_spu_decoder.c => src/spu_dec/spu_decoder.c
rename : src/libspudec/spu.c => src/spu_dec/spudec.c
rename : src/libspudvb/xine_spudvb_decoder.c => src/spu_dec/spudvb_decoder.c
rename : src/libsputext/xine_sputext_decoder.c => src/spu_dec/sputext_decoder.c
rename : src/libsputext/demux_sputext.c => src/spu_dec/sputext_demuxer.c
rename : src/libspucc/xine_cc_decoder.c => src/spu_dec/xine_cc_decoder.c
rename : src/libxinevdec/bitplane.c => src/video_dec/bitplane.c
rename : src/libxinevdec/foovideo.c => src/video_dec/foovideo.c
rename : src/libxinevdec/gdkpixbuf.c => src/video_dec/gdkpixbuf.c
rename : src/libxinevdec/image.c => src/video_dec/image.c
rename : src/libmpeg2/xine_mpeg2_decoder.c => src/video_dec/libmpeg2/xine_mpeg2_decoder.c
rename : src/libxinevdec/rgb.c => src/video_dec/rgb.c
rename : src/libxinevdec/yuv.c => src/video_dec/yuv.c
Diffstat (limited to 'm4')
-rw-r--r-- | m4/attributes.m4 | 74 | ||||
-rw-r--r-- | m4/pthreads.m4 | 12 |
2 files changed, 54 insertions, 32 deletions
diff --git a/m4/attributes.m4 b/m4/attributes.m4 index b1f8e5ba2..17d57fbeb 100644 --- a/m4/attributes.m4 +++ b/m4/attributes.m4 @@ -32,14 +32,13 @@ dnl distribute a modified version of the Autoconf Macro, you may extend dnl this special exception to the GPL to apply to your modified version as dnl well. -AC_DEFUN([CC_CHECK_CFLAGS], [ - AC_CACHE_CHECK([if $CC supports $1 flag], - AS_TR_SH([cc_cv_cflags_$1]), +AC_DEFUN([CC_CHECK_CFLAGS_SILENT], [ + AC_CACHE_VAL(AS_TR_SH([cc_cv_cflags_$1]), [ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" AC_COMPILE_IFELSE([int a;], [eval "AS_TR_SH([cc_cv_cflags_$1])='yes'"], - [eval "AS_TR_SH([cc_cv_cflags_$1])="]) + [eval "AS_TR_SH([cc_cv_cflags_$1])='no'"]) CFLAGS="$ac_save_CFLAGS" ]) @@ -50,6 +49,19 @@ AC_DEFUN([CC_CHECK_CFLAGS], [ fi ]) +AC_DEFUN([CC_CHECK_CFLAGS], [ + AC_CACHE_CHECK([if $CC supports $1 flag], + AS_TR_SH([cc_cv_cflags_$1]), + CC_CHECK_CFLAGS_SILENT([$1]) dnl Don't execute actions here! + ) + + if eval test [x$]AS_TR_SH([cc_cv_cflags_$1]) = xyes; then + ifelse([$2], , [:], [$2]) + else + ifelse([$3], , [:], [$3]) + fi +]) + AC_DEFUN([CC_CHECK_LDFLAGS], [ AC_CACHE_CHECK([if $CC supports $1 flag], AS_TR_SH([cc_cv_ldflags_$1]), @@ -77,9 +89,11 @@ dnl Other compilers don't support -Werror per se, but they support dnl an equivalent flag: dnl - Sun Studio compiler supports -errwarn=%all AC_DEFUN([CC_CHECK_WERROR], [ - AC_CACHE_VAL([cc_cv_werror], - [CC_CHECK_CFLAGS([-Werror], [cc_cv_werror=-Werror], - [CC_CHECK_CFLAGS([-errwarn=%all], [cc_cv_werror=-errwarn=%all])]) + AC_CACHE_CHECK( + [for $CC way to treat warnings as errors], + [cc_cv_werror], + [CC_CHECK_CFLAGS_SILENT([-Werror], [cc_cv_werror=-Werror], + [CC_CHECK_CFLAGS_SILENT([-errwarn=%all], [cc_cv_werror=-errwarn=%all])]) ]) ]) @@ -184,29 +198,31 @@ AC_DEFUN([CC_ATTRIBUTE_MALLOC], [ [$2]) ]) +AC_DEFUN([CC_ATTRIBUTE_PACKED], [ + CC_CHECK_ATTRIBUTE( + [packed], , + [struct astructure { char a; int b; long c; void *d; } __attribute__((packed));], + [$1], + [$2]) +]) + AC_DEFUN([CC_FLAG_VISIBILITY], [ - AC_REQUIRE([CC_CHECK_WERROR]) - ac_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $cc_cv_werror" - AC_CACHE_CHECK([if compiler supports -fvisibility=hidden], - [cc_cv_flag_visibility], - [ - save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -fvisibility=hidden" - AC_COMPILE_IFELSE([int a;], - [cc_cv_flag_visibility=yes], - [cc_cv_flag_visibility=no]) - CFLAGS="$save_CFLAGS" - ]) - CFLAGS="$ac_save_CFLAGS" - - if test "x$cc_cv_flag_visibility" = "xyes"; then - AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1, [Define this if the compiler supports the -fvisibility flag]) - $1 - else - true - $2 - fi + AC_REQUIRE([CC_CHECK_WERROR]) + AC_CACHE_CHECK([if $CC supports -fvisibility=hidden], + [cc_cv_flag_visibility], + [cc_flag_visibility_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $cc_cv_werror" + CC_CHECK_CFLAGS_SILENT([-fvisibility=hidden], + cc_cv_flag_visibility='yes', + cc_cv_flag_visibility='no') + CFLAGS="$cc_flag_visibility_save_CFLAGS"]) + + if test "x$cc_cv_flag_visibility" = "xyes"; then + AC_DEFINE([SUPPORT_FLAG_VISIBILITY], 1, [Define this if the compiler supports the -fvisibility flag]) + ifelse([$1], , [:], [$1]) + else + ifelse([$2], , [:], [$2]) + fi ]) AC_DEFUN([CC_FUNC_EXPECT], [ diff --git a/m4/pthreads.m4 b/m4/pthreads.m4 index 7f914e562..facac076f 100644 --- a/m4/pthreads.m4 +++ b/m4/pthreads.m4 @@ -20,9 +20,10 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [ case $host in *-hpux11*) PTHREAD_CFLAGS="" ;; *-darwin*) PTHREAD_CFLAGS="" ;; - *-solaris*) - # Handle Studio compiler + *-solaris*|*-linux-gnu) + dnl Handle Sun Studio compiler (also on Linux) CC_CHECK_CFLAGS([-mt], [PTHREAD_CFLAGS="-mt"]);; + *) PTHREAD_CFLAGS="-pthread" ;; esac fi @@ -31,10 +32,15 @@ AC_DEFUN([CC_PTHREAD_FLAGS], [ *-hpux11*) PTHREAD_LIBS="-lpthread" ;; *-darwin*) PTHREAD_LIBS="" ;; *-solaris*) - # Use the same libraries for gcc and sun studio cc + dnl Use the same libraries for gcc and Sun Studio cc PTHREAD_LIBS="-lpthread -lposix4 -lrt";; *) PTHREAD_LIBS="-pthread" ;; esac + + dnl Again, handle Sun Studio compiler + if test "x${PTHREAD_CFLAGS}" = "x-mt"; then + PTHREAD_LIBS="-mt" + fi fi AC_CACHE_CHECK([if $CC supports Pthread], |