~ubuntu-branches/ubuntu/maverick/zapping/maverick

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2005-11-08 11:07:34 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051108110734-ygvf6uljvgcjmca7
Tags: 0.9.6-1ubuntu1
* Resynchronise with Debian (Closes: #4022):
  - Fix desktop file to not use absolute path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl Process this file with autoconf to produce a configure script.
2
 
dnl $Id: configure.in,v 1.172 2005/02/25 18:15:47 mschimek Exp $
3
2
 
4
 
AC_INIT(zapping, 0.9.2,
 
3
AC_INIT(zapping, 0.9.6,
5
4
  [http://sourceforge.net/tracker/?atid=102599&group_id=2599&func=browse])
6
5
AC_CONFIG_SRCDIR(configure.in)
7
6
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
34
33
#define SITE_DEF_H
35
34
/* #define AUDIO_MIXER_LOG_FP stderr */
36
35
/* #define DI_MAIN_HEIGHT_DIV 1 */
 
36
/* #define DI_GREEDYHM_V_ASSERT 1 */
37
37
/* #define KEYBOARD_KEY_LOG 1 */
38
38
/* #define OSD_TEST 1 */
39
39
/* #define OSS_LOG_FP stderr */
58
58
EOF
59
59
 
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"
62
63
 
63
64
dnl ===========================================================================
64
65
dnl Compile checks
65
66
dnl ===========================================================================
66
67
 
 
68
dnl GCC_VERSION(min_version, max_version, action_if_true, action_if_false)
 
69
AC_DEFUN([GCC_VERSION], [
 
70
  AC_EGREP_CPP([6177459036], [
 
71
    #define GCC_VERSION \
 
72
      (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
 
73
    #if $1 <= GCC_VERSION && GCC_VERSION < $2
 
74
      6177459036
 
75
    #endif
 
76
    ], [$3], [$4])
 
77
  ])
 
78
 
67
79
dnl ---------------------------------------------------------------------------
68
80
dnl Endianess
69
81
dnl ---------------------------------------------------------------------------
80
92
 
81
93
SIMD_SUPPORT=""
82
94
 
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"
87
 
  AC_COMPILE_IFELSE(
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 "
91
 
     HAVE_$1="yes"],
92
 
    [HAVE_$1="no"])
93
 
  AM_CONDITIONAL(HAVE_$1, test "x$HAVE_$1" = "xyes")
 
99
  HAVE_$1="yes"
 
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")
 
104
  fi
 
105
  if test x$HAVE_$1 = xyes; then
 
106
    dnl GCC 3.2.3
 
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")
 
111
  fi
 
112
  if test x$HAVE_$1 = xyes -a x$1 = xSSE2; then
 
113
    dnl GCC 3.3.5:
 
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")
 
121
  fi
 
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])
 
125
  fi
 
126
  AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 = yes)
94
127
  CFLAGS="$SAVE_CFLAGS"]
95
128
  AC_MSG_RESULT($HAVE_$1))
96
129
 
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)])
101
136
 
102
137
dnl powerpc
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")
115
150
 
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"
 
160
 
 
161
test "x$HAVE_X86" = "xyes" -a "x$HAVE_SSE2_ASM" = "xyes" && \
117
162
  PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD deinterlace"
118
163
 
119
164
dnl ---------------------------------------------------------------------------
322
367
 
323
368
dnl Macros and other pieces stolen from JWZ's xscreensaver package.
324
369
 
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"])
330
375
 
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"
503
548
 
504
549
HAVE_ZVBI="no"
505
550
 
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)
510
 
AC_SUBST(ZVBI_LIBS)
 
551
AC_ARG_WITH([zvbi], 
 
552
  AS_HELP_STRING([--with-zvbi], [Use libzvbi (yes).]),
 
553
  [with_zvbi="$withval"], [with_zvbi=yes])
 
554
 
 
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])
 
558
     HAVE_ZVBI="yes"
 
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"
 
565
     exit 1])
 
566
fi
511
567
 
512
568
AM_CONDITIONAL(HAVE_LIBZVBI, test "x$HAVE_ZVBI" = "xyes")
513
569
 
703
759
 
704
760
dnl ---------------------------------------------------------------------------
705
761
 
706
 
dnl Setup the compilation flags
 
762
dnl Compilation flags
707
763
 
708
764
# Warnings are not enabled by default, they must be added to CFLAGS
709
765
# at configure or autogen.sh time by the maintainer.
758
814
zapping.spec
759
815
common/Makefile
760
816
libtv/Makefile
 
817
libtv/avec/Makefile
761
818
libtv/mmx/Makefile
762
819
libtv/sse/Makefile
763
 
libtv/avec/Makefile
764
820
libvbi/Makefile
765
821
src/Makefile
766
822
po/Makefile.in
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