60
60
dnl These are the plugins we can build, depending on the libs we find.
61
PLUGINS_TO_BUILD="screenshot" dnl "template lirc"
61
dnl Screenshot and (parts of) deinterlace can compile unconditional.
62
PLUGINS_TO_BUILD="deinterlace screenshot" dnl "template lirc"
63
64
dnl ===========================================================================
65
66
dnl ===========================================================================
68
dnl GCC_VERSION(min_version, max_version, action_if_true, action_if_false)
69
AC_DEFUN([GCC_VERSION], [
70
AC_EGREP_CPP([6177459036], [
72
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
73
#if $1 <= GCC_VERSION && GCC_VERSION < $2
67
79
dnl ---------------------------------------------------------------------------
69
81
dnl ---------------------------------------------------------------------------
83
AC_DEFUN(CHECK_SIMD, [
95
AC_DEFUN([CHECK_SIMD], [
84
96
AC_MSG_CHECKING(for $1 support)
85
97
SAVE_CFLAGS="$CFLAGS"
86
98
CFLAGS="$CFLAGS $2"
88
AC_LANG_PROGRAM([#include <$3>], [$4]),
89
[AC_DEFINE(HAVE_$1, 1, [Define if GCC supports $1 extensions])
90
SIMD_SUPPORT="${SIMD_SUPPORT}$1 "
93
AM_CONDITIONAL(HAVE_$1, test "x$HAVE_$1" = "xyes")
100
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include <$3>], [$4]),, HAVE_$1="no")
101
if test x$HAVE_$1 = xyes; then
102
dnl Older versions of GCC have not been tested.
103
GCC_VERSION(0, 30200, HAVE_$1="disabled")
105
if test x$HAVE_$1 = xyes; then
107
dnl DI_TomsMoComp.c: In function `Search_Effort_1':
108
dnl DI_TomsMoComp.c:876: Internal compiler error
109
dnl in find_reloads_toplev, at reload.c:4438
110
GCC_VERSION(30200, 30300, HAVE_$1="broken")
112
if test x$HAVE_$1 = xyes -a x$1 = xSSE2; then
114
dnl DI_GreedyHF.c: In function `DI_GreedyHF_SSE2':
115
dnl DI_GreedyHF.c:172: internal compiler error:
116
dnl in push_reload, at reload.c:1315
117
dnl GCC 3.4.1 (x86_64), GCC 4.0.0 (i686):
118
dnl DI_GreedyHM.c:1281: internal compiler error:
119
dnl in extract_insn, at recog.c:2083
120
GCC_VERSION(30300, 40100, HAVE_$1="broken")
122
if test x$HAVE_$1 = xyes; then
123
SIMD_SUPPORT="${SIMD_SUPPORT}$1 "
124
AC_DEFINE(HAVE_$1, 1, [Define if GCC supports $1 extensions])
126
AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 = yes)
94
127
CFLAGS="$SAVE_CFLAGS"]
95
128
AC_MSG_RESULT($HAVE_$1))
97
130
dnl x86 and x86_64
98
131
CHECK_SIMD(MMX, [-mmmx], [mmintrin.h], [_mm_setzero_si64 ()])
132
CHECK_SIMD(3DNOW, [-mmmx], [mm3dnow.h], [_m_femms ()])
99
133
CHECK_SIMD(SSE, [-msse], [xmmintrin.h], [_mm_setzero_ps ()])
100
134
CHECK_SIMD(SSE2, [-msse2], [emmintrin.h], [_mm_setzero_pd ()])
135
dnl CHECK_SIMD(SSE3, [-msse3], [pmmintrin.h], [_mm_lddqu_si128 (0x1000)])
103
138
CHECK_SIMD(ALTIVEC, [-maltivec -mabi=altivec], [altivec.h], [vec_dssall ()])
113
148
dnl Some old code will not run on x86_64.
114
149
AM_CONDITIONAL(HAVE_X86, test "x$HAVE_X86" = "xyes")
116
test "x$HAVE_X86" = "xyes" -a "x$HAVE_SSE2" = "xyes" && \
151
dnl See if we can increase inlining limits for SIMD code (GCC 3.4+).
152
AC_MSG_CHECKING([if $CC supports --param inline-unit-growth])
153
SAVE_CFLAGS="$CFLAGS"
154
CFLAGS="$CFLAGS --param inline-unit-growth=3000"
155
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [return 0;]),
156
[HAVE_GCC_LIMITS=yes], [HAVE_GCC_LIMITS=no])
157
AC_MSG_RESULT($HAVE_GCC_LIMITS)
158
AM_CONDITIONAL(HAVE_GCC_LIMITS, test "x$HAVE_GCC_LIMITS" = "xyes")
159
CFLAGS="$SAVE_CFLAGS"
161
test "x$HAVE_X86" = "xyes" -a "x$HAVE_SSE2_ASM" = "xyes" && \
117
162
PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD deinterlace"
119
164
dnl ---------------------------------------------------------------------------
323
368
dnl Macros and other pieces stolen from JWZ's xscreensaver package.
325
AC_DEFUN(CHECK_X_HEADER, [
370
AC_DEFUN([CHECK_X_HEADER], [
326
371
SAVE_CPPFLAGS="$CPPFLAGS"
327
372
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
328
373
AC_CHECK_HEADER([$1],[$2],[$3],[$4])
329
374
CPPFLAGS="$SAVE_CPPFLAGS"])
331
AC_DEFUN(CHECK_X_LIB, [
376
AC_DEFUN([CHECK_X_LIB], [
332
377
SAVE_CPPFLAGS="$CPPFLAGS"
333
378
SAVE_LDFLAGS="$LDFLAGS"
334
379
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
506
PKG_CHECK_MODULES(ZVBI, [zvbi-0.2 >= 0.2.9],
507
AC_DEFINE(HAVE_LIBZVBI, 1, [Define if ZVBI lib is present])
508
HAVE_ZVBI="yes", HAVE_ZVBI="no")
509
AC_SUBST(ZVBI_CFLAGS)
552
AS_HELP_STRING([--with-zvbi], [Use libzvbi (yes).]),
553
[with_zvbi="$withval"], [with_zvbi=yes])
555
if test "x$with_zvbi" = "xyes"; then
556
PKG_CHECK_MODULES(ZVBI, [zvbi-0.2 >= 0.2.9],
557
[AC_DEFINE(HAVE_LIBZVBI, 1, [Define if ZVBI lib is present])
559
AC_SUBST(ZVBI_CFLAGS)
560
AC_SUBST(ZVBI_LIBS)],
561
[echo "*** Could not find libzvbi >= 0.2.9. The library is required"
562
echo "*** for Teletext, caption/subtitles and OSD. The latest version"
563
echo "*** is available from http://zapping.sourceforge.net. To compile"
564
echo "*** Zapping without libzvbi run ./configure --without-zvbi"
512
568
AM_CONDITIONAL(HAVE_LIBZVBI, test "x$HAVE_ZVBI" = "xyes")
773
829
plugins/deinterlace/Makefile
774
830
plugins/deinterlace/DI_GreedyH/Makefile
775
831
plugins/deinterlace/DI_Misc/Makefile
776
plugins/deinterlace/DI_MoComp2/Makefile
777
plugins/deinterlace/DI_TomsMoComp/Makefile
832
plugins/deinterlace/test/Makefile
778
833
plugins/mpeg/Makefile
779
834
plugins/screenshot/Makefile
780
835
plugins/teletext/Makefile