release time
[platform/upstream/gstreamer.git] / configure.ac
1 dnl autoconf configuration file for gst-ffmpeg 
2 AC_INIT
3 AC_CANONICAL_TARGET
4
5 dnl We disable static building for development, for time savings
6 dnl this goes before AS_LIBTOOL to appease autoconf
7 dnl *NOTE*: dnl this line before release, so release does static too
8 AM_DISABLE_STATIC
9
10 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
11 AM_MAINTAINER_MODE
12
13 dnl when going to/from release please set the nano (fourth number) right !
14 dnl releases only do Wall, cvs and prerelease does Werror too
15 AS_VERSION(gst-ffmpeg, GST_FFMPEG_VERSION, 0, 9, 3, 0, GST_CVS="no", GST_CVS="yes")
16 dnl we cheat here so we don't have to change the actual configure code bit
17 GST_PLUGINS_VERSION_NANO=$GST_FFMPEG_VERSION_NANO
18
19 dnl required GStreamer version
20 GST_REQ=0.9.1
21
22 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
23
24 dnl our libraries and install dirs use major.minor as a version
25 #GST_MAJORMINOR=$GST_FFMPEG_VERSION_MAJOR.$GST_FFMPEG_VERSION_MINOR
26 dnl hack while GST_MAJORMINOR doesn't match the release
27 GST_MAJORMINOR=0.9
28 AC_SUBST(GST_MAJORMINOR)
29                                                                                 
30 dnl CURRENT, REVISION, AGE
31 dnl - library source changed -> increment REVISION
32 dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
33 dnl - interfaces added -> increment AGE
34 dnl - interfaces removed -> AGE = 0
35 AS_LIBTOOL(GST_FFMPEG, 1, 0, 0)
36 AM_PROG_LIBTOOL()
37
38 AC_CONFIG_SRCDIR(configure.ac)
39 AM_CONFIG_HEADER(config.h)
40
41 dnl Add parameters for aclocal
42 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4 $ACLOCAL_FLAGS")
43
44 AC_PROG_CC
45 AM_PROG_CC_STDC
46 AS="${CC}"
47
48 dnl decide on error flags
49 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
50
51 if test "x$GST_WALL" = "xyes"; then
52    GST_ERROR="$GST_ERROR -Wall"
53
54    if test "x$GST_CVS" = "xyes"; then
55      AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
56      GST_ERROR="$GST_ERROR -DG_DISABLE_DEPRECATED"
57    fi
58 fi
59
60 AC_HEADER_STDC([])
61
62
63 dnl check for gstreamer; uninstalled is selected preferentially -- see pkg-config(1)
64 PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ \
65                        gstreamer-plugins-base-$GST_MAJORMINOR,
66   HAVE_GST="yes", HAVE_GST="no")
67
68 if test "x$HAVE_GST" = "xno"; then
69   AC_MSG_ERROR(no GStreamer found)
70 fi
71
72 dnl ============================= gst plug-ins ================================
73
74 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
75 AC_SUBST(plugindir)
76
77 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
78 AC_SUBST(GST_PLUGIN_LDFLAGS)
79
80 dnl Determine CPU
81 GST_ARCH()
82
83 dnl ###########################
84 dnl # Configure external libs #
85 dnl ###########################
86
87 AC_DEFINE_UNQUOTED(HAVE_FFMPEG_UNINSTALLED, 1,
88                    [Defined if building against uninstalled FFmpeg source])
89 ac_configure_args="$ac_configure_args --disable-v4l --disable-audio-oss --disable-dv1394 --disable-vhook --disable-ffmpeg --disable-ffserver --enable-pp"
90 AC_CONFIG_SUBDIRS(gst-libs/ext/ffmpeg)
91
92 AC_CONFIG_FILES(
93 Makefile
94 gst-ffmpeg.spec
95 ext/Makefile
96 ext/ffmpeg/Makefile
97 ext/libpostproc/Makefile
98 gst-libs/Makefile
99 gst-libs/ext/Makefile
100 )
101 AC_OUTPUT