Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 200 lines (140 sloc) 5.45 kb
892306e @honkasuo initial import
authored
1 AC_PREREQ(2.52)
2
3 dnl initialize autoconf
4 dnl when going to/from release please set the nano (fourth number) right !
5 dnl releases only do Wall, cvs and prerelease does Werror too
6 AC_INIT(GStreamer SHVIDEO, 0.0.0.1,
7 http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer,
8 gst-shvideo)
9
10 AG_GST_INIT
11
12 dnl initialize automake
13 AM_INIT_AUTOMAKE
14
15 dnl define PACKAGE_VERSION_* variables
16 AS_VERSION
17
18 dnl check if this is a release version
19 AS_NANO(GST_CVS="no", GST_CVS="yes")
20
21 dnl can autoconf find the source ?
22 AC_CONFIG_SRCDIR([gstshvideodec.c])
23
24 dnl define the output header for config
25 AM_CONFIG_HEADER([config.h])
26
27 dnl can autoconf find the macros
28 AC_CONFIG_MACRO_DIR([common/m4])
29
30 dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
31 AM_MAINTAINER_MODE
32
33 dnl sets host_* variables
34 AC_CANONICAL_HOST
35
36 dnl our libraries and install dirs use major.minor as a version
37 GST_MAJORMINOR=$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR
38 dnl we override it here if we need to for the release candidate of new series
39 GST_MAJORMINOR=0.10
40 AC_SUBST(GST_MAJORMINOR)
41
42 AM_PROG_LIBTOOL
43
44 dnl *** required versions of GStreamer stuff ***
45 GST_REQ=0.10.22
46
47 dnl *** autotools stuff ****
48
49 dnl allow for different autotools
50 AS_AUTOTOOLS_ALTERNATE
51
52 dnl Add parameters for aclocal
53 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
54
55 dnl *** check for arguments to configure ***
56
57 AG_GST_ARG_WITH_PKG_CONFIG_PATH
58 AG_GST_ARG_WITH_PACKAGE_NAME
59 AG_GST_ARG_WITH_PACKAGE_ORIGIN
60 AG_GST_ARG_WITH_PLUGINS
61
62 dnl *** checks for platform ***
63
64 dnl * hardware/architecture *
65
66 dnl common/m4/gst-arch.m4
67 dnl check CPU type
68 AG_GST_ARCH
69
70 dnl *** checks for programs ***
71
72 dnl find a compiler
73 AC_PROG_CC
74
75 # FIXME: are these two lines needed ?
76 AM_PROG_CC_STDC
77 AS="${CC}"
78
79 dnl check if the compiler supports '-c' and '-o' options
80 AM_PROG_CC_C_O
81
82 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
83 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
84
85 dnl check for documentation tools
86
87 dnl *** checks for libraries ***
88
89 AC_CHECK_LIB(glib-2.0, strcmp)
90
91 dnl *** checks for header files ***
92
93 dnl check if we have ANSI C header files
94 AC_HEADER_STDC
95
96 dnl *** checks for types/defines ***
97
98 dnl *** checks for structures ***
99
100 dnl *** checks for compiler characteristics ***
101
102 dnl *** checks for library functions ***
103
104 dnl *** checks for dependancy libraries ***
105
106 AG_GST_CHECK_FUNCTION
107
108 AG_GST_GLIB_CHECK([2.12])
109
110 dnl checks for gstreamer
111 dnl uninstalled is selected preferentially -- see pkg-config(1)
112 AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQ], yes)
113 AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQ], yes)
114 AG_GST_CHECK_GST_GDP($GST_MAJORMINOR, [$GST_REQ], yes)
115 AG_GST_CHECK_GST_CONTROLLER($GST_MAJORMINOR, [$GST_REQ], yes)
116 dnl AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQ], no)
117 dnl AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
118
119 AC_MSG_NOTICE(Using GStreamer Core Plugins in $GST_PLUGINS_DIR)
120 AC_MSG_NOTICE(Using GStreamer Base Plugins in $GSTPB_PLUGINS_DIR)
121
122 dnl liboil is required for cpu detection for libpostproc
123 dnl FIXME : In theory we should be able to compile libpostproc with cpudetect
124 dnl capabilities, which would enable us to get rid of this
125 PKG_CHECK_MODULES(LIBSHCODECS, shcodecs >= 0.9.5, HAVE_LIBSHCODECS=yes, HAVE_LIBSHCODECS=no)
126 if test "x$HAVE_LIBSHCODECS" != "xyes"
127 then
128 AC_MSG_ERROR([libshcodecs is required])
129 AC_ERROR
130 fi
131
132 AC_SUBST(LIBSHCODECS_CFLAGS)
133 AC_SUBST(LIBSHCODECS_LIBS)
134
a34bb26 @honkasuo added support for buffering
authored
135 AC_CHECK_LIB(shcodecs,shcodecs_decoder_set_use_physical,,AC_ERROR,"-lstdc++")
892306e @honkasuo initial import
authored
136
137 dnl *** set variables based on configure arguments ***
138
139 dnl set location of plugin directory
140 AG_GST_SET_PLUGINDIR
141
142 dnl define an ERROR_CFLAGS Makefile variable
143 AG_GST_SET_ERROR_CFLAGS($GST_CVS)
144
145 dnl define correct level for debugging messages
146 AG_GST_SET_LEVEL_DEFAULT($GST_CVS)
147
148 dnl *** finalize CFLAGS, LDFLAGS, LIBS ***
149
150 AG_GST_DEFAULT_ELEMENTS
151
152 dnl Overview:
153 dnl GST_OPTION_CFLAGS: common flags for profiling, debugging, errors, ...
154 dnl GST_*: flags shared by built objects to link against GStreamer
155 dnl GST_ALL_LDFLAGS: linker flags shared by all
156 dnl GST_LIB_LDFLAGS: additional linker flags for all libaries
157 dnl GST_LT_LDFLAGS: library versioning of our libraries
158 dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
159
160 dnl GST_OPTION_CFLAGS
161 if test "x$USE_DEBUG" = xyes; then
162 PROFILE_CFLAGS="-g"
163 fi
164 AC_SUBST(PROFILE_CFLAGS)
165
166 if test "x$GST_CVS" = "xyes"; then
167 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
168 else
169 DEPRECATED_CFLAGS=""
170 fi
171 AC_SUBST(DEPRECATED_CFLAGS)
172
173 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
174 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
175
176 AC_SUBST(GST_OPTION_CFLAGS)
177
178 dnl FIXME: do we want to rename to GST_ALL_* ?
179 dnl prefer internal headers to already installed ones
180 dnl also add builddir include for enumtypes and marshal
181 dnl add GST_OPTION_CFLAGS, but overridable
182 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
183 AC_SUBST(GST_CFLAGS)
184 AC_SUBST(GST_LIBS)
185
186 GST_ALL_LDFLAGS="-no-undefined"
187 AC_SUBST(GST_ALL_LDFLAGS)
188
189 dnl this really should only contain flags, not libs - they get added before
190 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
191 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
192 AC_SUBST(GST_PLUGIN_LDFLAGS)
193
194 AC_CONFIG_FILES(
195 Makefile
196 )
197 AC_OUTPUT
198
199 AG_GST_OUTPUT_PLUGINS
Something went wrong with that request. Please try again.