configure.ac: Apply patch from Sebastien Cote to handle --with-pkg-config-path before...
[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, 10, 0, 1,
16     GST_CVS="no", GST_CVS="yes")
17
18 dnl we cheat here so we don't have to change the actual configure code bit
19 GST_PLUGINS_VERSION_NANO=$GST_FFMPEG_VERSION_NANO
20
21 dnl required GStreamer version
22 GST_REQ=0.10.0
23
24 AM_INIT_AUTOMAKE($PACKAGE,$VERSION)
25
26 dnl our libraries and install dirs use major.minor as a version
27 #GST_MAJORMINOR=$GST_FFMPEG_VERSION_MAJOR.$GST_FFMPEG_VERSION_MINOR
28 dnl hack while GST_MAJORMINOR doesn't match the release
29 GST_MAJORMINOR=0.10
30 AC_SUBST(GST_MAJORMINOR)
31                                                                                 
32 dnl CURRENT, REVISION, AGE
33 dnl - library source changed -> increment REVISION
34 dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
35 dnl - interfaces added -> increment AGE
36 dnl - interfaces removed -> AGE = 0
37 AS_LIBTOOL(GST_FFMPEG, 0, 0, 0)
38 AM_PROG_LIBTOOL()
39
40 AC_CONFIG_SRCDIR(configure.ac)
41 AM_CONFIG_HEADER(config.h)
42
43 dnl Add parameters for aclocal
44 AC_SUBST(ACLOCAL_AMFLAGS, "-I common/m4")
45
46 AC_PROG_CC
47 AM_PROG_CC_STDC
48 AS="${CC}"
49
50 dnl decide on error flags
51 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
52
53 if test "x$GST_WALL" = "xyes"; then
54    GST_ERROR="$GST_ERROR -Wall"
55
56    if test "x$GST_CVS" = "xyes"; then
57      AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
58      GST_ERROR="$GST_ERROR -DG_DISABLE_DEPRECATED"
59    fi
60 fi
61
62 AC_HEADER_STDC([])
63
64 GST_ARG_WITH_PKG_CONFIG_PATH
65
66 dnl check for gstreamer
67 dnl uninstalled is selected preferentially -- see pkg-config(1)
68 GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ])
69 GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ])
70 GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$GST_REQ])
71
72 if test "x$HAVE_GST" = "xno"; then
73   AC_MSG_ERROR(no GStreamer found)
74 fi
75
76 dnl ============================= gst plug-ins ================================
77
78 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
79 AC_SUBST(plugindir)
80
81 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).* -no-undefined'
82 AC_SUBST(GST_PLUGIN_LDFLAGS)
83
84 dnl Determine CPU
85 GST_ARCH()
86
87 dnl check for documentation tools
88 GTK_DOC_CHECK([1.3])
89 AS_PATH_PYTHON([2.1])
90
91 dnl ###########################
92 dnl # Configure external libs #
93 dnl ###########################
94
95 AC_DEFINE_UNQUOTED(HAVE_FFMPEG_UNINSTALLED, 1,
96                    [Defined if building against uninstalled FFmpeg source])
97 ac_configure_args="$ac_configure_args --disable-v4l --disable-audio-oss --disable-dv1394 --disable-vhook --disable-ffmpeg --disable-ffserver --enable-pp"
98 AC_CONFIG_SUBDIRS(gst-libs/ext/ffmpeg)
99
100 AC_CONFIG_FILES(
101 Makefile
102 gst-ffmpeg.spec
103 ext/Makefile
104 ext/ffmpeg/Makefile
105 ext/libpostproc/Makefile
106 gst-libs/Makefile
107 gst-libs/ext/Makefile
108 docs/Makefile
109 docs/version.entities
110 docs/plugins/Makefile
111 common/Makefile
112 common/m4/Makefile
113 )
114 AC_OUTPUT