configure.ac 3.05 KB
Newer Older
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
1
dnl autoconf configuration file for gst-ffmpeg 
2
AC_INIT
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
3
AC_CANONICAL_TARGET
4
5
6
7
8
9
10
11
12
13
14

dnl We disable static building for development, for time savings
dnl this goes before AS_LIBTOOL to appease autoconf
dnl *NOTE*: dnl this line before release, so release does static too
AM_DISABLE_STATIC

dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
AM_MAINTAINER_MODE

dnl when going to/from release please set the nano (fourth number) right !
dnl releases only do Wall, cvs and prerelease does Werror too
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
15
AS_VERSION(gst-ffmpeg, GST_FFMPEG_VERSION, 0, 9, 6, 1,
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
16
17
    GST_CVS="no", GST_CVS="yes")

Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
18
19
dnl we cheat here so we don't have to change the actual configure code bit
GST_PLUGINS_VERSION_NANO=$GST_FFMPEG_VERSION_NANO
20

Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
21
dnl required GStreamer version
22
GST_REQ=0.9.1
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
23

24
25
26
AM_INIT_AUTOMAKE($PACKAGE,$VERSION)

dnl our libraries and install dirs use major.minor as a version
27
28
#GST_MAJORMINOR=$GST_FFMPEG_VERSION_MAJOR.$GST_FFMPEG_VERSION_MINOR
dnl hack while GST_MAJORMINOR doesn't match the release
29
GST_MAJORMINOR=0.9
30
31
32
33
34
35
36
37
AC_SUBST(GST_MAJORMINOR)
                                                                                
dnl CURRENT, REVISION, AGE
dnl - library source changed -> increment REVISION
dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
dnl - interfaces added -> increment AGE
dnl - interfaces removed -> AGE = 0
AS_LIBTOOL(GST_FFMPEG, 1, 0, 0)
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
38
AM_PROG_LIBTOOL()
39
40
41
42
43

AC_CONFIG_SRCDIR(configure.ac)
AM_CONFIG_HEADER(config.h)

dnl Add parameters for aclocal
44
AC_SUBST(ACLOCAL_AMFLAGS, "-I common/m4")
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

AC_PROG_CC
AM_PROG_CC_STDC
AS="${CC}"

dnl decide on error flags
AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")

if test "x$GST_WALL" = "xyes"; then
   GST_ERROR="$GST_ERROR -Wall"

   if test "x$GST_CVS" = "xyes"; then
     AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
     GST_ERROR="$GST_ERROR -DG_DISABLE_DEPRECATED"
   fi
fi

AC_HEADER_STDC([])


dnl check for gstreamer; uninstalled is selected preferentially -- see pkg-config(1)
66
PKG_CHECK_MODULES(GST, gstreamer-$GST_MAJORMINOR >= $GST_REQ \
67
		       gstreamer-plugins-base-$GST_MAJORMINOR,
68
  HAVE_GST="yes", HAVE_GST="no")
69

70
71
72
73
74
75
76
77
78
if test "x$HAVE_GST" = "xno"; then
  AC_MSG_ERROR(no GStreamer found)
fi

dnl ============================= gst plug-ins ================================

plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
AC_SUBST(plugindir)

79
GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).* -no-undefined'
80
81
82
AC_SUBST(GST_PLUGIN_LDFLAGS)

dnl Determine CPU
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
83
GST_ARCH()
84
85
86
87

dnl ###########################
dnl # Configure external libs #
dnl ###########################
88
89
90

AC_DEFINE_UNQUOTED(HAVE_FFMPEG_UNINSTALLED, 1,
                   [Defined if building against uninstalled FFmpeg source])
91
ac_configure_args="$ac_configure_args --disable-v4l --disable-audio-oss --disable-dv1394 --disable-vhook --disable-ffmpeg --disable-ffserver --enable-pp"
92
AC_CONFIG_SUBDIRS(gst-libs/ext/ffmpeg)
93
94
95

AC_CONFIG_FILES(
Makefile
Christian Schaller's avatar
Christian Schaller committed
96
gst-ffmpeg.spec
97
98
ext/Makefile
ext/ffmpeg/Makefile
99
ext/libpostproc/Makefile
100
101
102
103
gst-libs/Makefile
gst-libs/ext/Makefile
)
AC_OUTPUT