Release 0.8.3
[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, 8, 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.8.4
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.8
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   HAVE_GST="yes", HAVE_GST="no")
66                                                                                 
67 if test "x$HAVE_GST" = "xno"; then
68   AC_MSG_ERROR(no GStreamer found)
69 fi
70
71 dnl ============================= gst plug-ins ================================
72
73 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
74 AC_SUBST(plugindir)
75
76 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
77 AC_SUBST(GST_PLUGIN_LDFLAGS)
78
79 dnl Determine CPU
80 GST_ARCH()
81
82 dnl ###########################
83 dnl # Configure external libs #
84 dnl ###########################
85
86 AC_DEFINE_UNQUOTED(HAVE_FFMPEG_UNINSTALLED, 1,
87                    [Defined if building against uninstalled FFmpeg source])
88 ac_configure_args="$ac_configure_args --disable-v4l --disable-audio-oss --disable-dv1394 --disable-vhook --disable-ffmpeg --disable-ffserver"
89 AC_CONFIG_SUBDIRS(gst-libs/ext/ffmpeg)
90
91 AC_CONFIG_FILES(
92 Makefile
93 gst-ffmpeg.spec
94 ext/Makefile
95 ext/ffmpeg/Makefile
96 gst-libs/Makefile
97 gst-libs/ext/Makefile
98 )
99 AC_OUTPUT