3 dnl versions of gstreamer and plugins-base
7 LIBMFLD_REQUIRED=0.10.0
9 dnl fill in your package name and version here
10 dnl the fourth (nano) number should be 0 for a release, 1 for CVS,
11 dnl and 2... for a prerelease
13 dnl when going to/from release please set the nano correctly !
14 dnl releases only do Wall, cvs and prerelease does Werror too
15 AS_VERSION(gst-plugins-camera, GST_PLUGIN_VERSION, 0, 10, 0, 0,
16 GST_PLUGIN_CVS="no", GST_PLUGIN_CVS="yes")
18 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
21 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
23 dnl make aclocal work in maintainer mode
24 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
25 AC_CONFIG_MACRO_DIR(m4)
27 AM_CONFIG_HEADER(config.h)
36 dnl decide on error flags
37 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
39 if test "x$GST_WALL" = "xyes"; then
40 GST_ERROR="$GST_ERROR -Wall"
42 if test "x$GST_PLUGIN_CVS" = "xyes"; then
43 AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
47 dnl Check for pkgconfig first
48 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
50 dnl Give error and exit if we don't have pkgconfig
51 if test "x$HAVE_PKGCONFIG" = "xno"; then
52 AC_MSG_ERROR(you need to have pkgconfig installed !)
55 dnl Now we're ready to ask for gstreamer libs and cflags
56 dnl And we can also ask for the right version of gstreamer
59 PKG_CHECK_MODULES(GST, \
60 gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
61 HAVE_GST=yes,HAVE_GST=no)
63 dnl Give error and exit if we don't have gstreamer
64 if test "x$HAVE_GST" = "xno"; then
65 AC_MSG_ERROR(you need gstreamer development packages installed !)
68 dnl append GST_ERROR cflags to GST_CFLAGS
69 GST_CFLAGS="$GST_CFLAGS $GST_ERROR"
71 dnl make GST_CFLAGS and GST_LIBS available
75 dnl make GST_MAJORMINOR available in Makefile.am
76 AC_SUBST(GST_MAJORMINOR)
78 AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [compile with DEBUG]),,enable_debug=no)
81 dnl Check for debug build
82 if test "x$enable_debug" = "xyes"; then
86 dnl If we need them, we can also use the base class libraries
87 PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQUIRED,
88 HAVE_GST_BASE=yes, HAVE_GST_BASE=no)
90 dnl Give a warning if we don't have gstreamer libs
91 dnl you can turn this into an error if you need them
92 if test "x$HAVE_GST_BASE" = "xno"; then
93 AC_MSG_NOTICE(no GStreamer base class libraries found (gstreamer-base-$GST_MAJORMINOR))
96 dnl make _CFLAGS and _LIBS available
97 AC_SUBST(GST_BASE_CFLAGS)
98 AC_SUBST(GST_BASE_LIBS)
100 dnl If we need them, we can also use the base class libraries
101 PKG_CHECK_MODULES(GST_CONTROLLER, gstreamer-controller-$GST_MAJORMINOR >= $GST_REQUIRED,
102 HAVE_GST_BASE=yes, HAVE_GST_BASE=no)
104 dnl Give a warning if we don't have gstreamer libs
105 dnl you can turn this into an error if you need them
106 if test "x$HAVE_GST_BASE" = "xno"; then
107 AC_MSG_NOTICE(no GStreamer controllerlibraries found (gstreamer-controller-$GST_MAJORMINOR))
110 dnl make _CFLAGS and _LIBS available
111 AC_SUBST(GST_CONTROLLER_CFLAGS)
112 AC_SUBST(GST_CONTROLLER_LIBS)
114 dnl Check gst-plugins-bad
115 PKG_CHECK_MODULES(GST_BAD, gstreamer-plugins-bad-$GST_MAJORMINOR,
116 HAVE_GST_BAD=yes, HAVE_GST_BAD=no)
118 if test "x$HAVE_GST_BAD" = "xno"; then
119 AC_MSG_NOTICE(no gstreamer-plugins-bad libraries found (gstreamer-plugins-bad-$GST_MAJORMINOR))
122 dnl make _CFLAGS and _LIBS available
123 AC_SUBST(GST_BAD_CFLAGS)
124 AC_SUBST(GST_BAD_LIBS)
126 dnl set the plugindir where plugins should be installed
127 if test "x${prefix}" = "x$HOME"; then
128 plugindir="$HOME/.gstreamer-$GST_MAJORMINOR/plugins"
130 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
134 dnl set proper LDFLAGS for plugins
135 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
136 AC_SUBST(GST_PLUGIN_LDFLAGS)
138 dnl LDFLAGS really should only contain flags, not libs - they get added before
139 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
140 GST_ALL_LDFLAGS="-no-undefined"
141 AC_SUBST(GST_ALL_LDFLAGS)
144 dnl linker flags shared by all libraries
145 dnl LDFLAGS modifier defining exported symbols from built libraries
146 dnl (export _gst_foo but not __gst_foo)
147 GST_LIB_LDFLAGS="-export-symbols-regex ^_?\(gst_\|Gst\|GST_\).*"
148 AC_SUBST(GST_LIB_LDFLAGS)
150 dnl check gst check support
152 PKG_CHECK_MODULES(GST_CHECK, gstreamer-check-$GST_MAJORMINOR, HAVE_GST_CHECK=yes, HAVE_GST_CHECK=no)
153 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
154 AC_SUBST(GST_CHECK_CFLAGS)
155 AC_SUBST(GST_CHECK_LIBS)
157 dnl check gst check 3a support
158 dnl LIBMFLDADVCI_CFLAGS
159 dnl LIBMFLDADVCI_LIBS
160 HAVE_LIBMFLDADVCI=yes
161 PKG_CHECK_MODULES(LIBMFLDADVCI, libmfldadvci >= $LIBMFLD_REQUIRED, HAVE_LIBMFLDADVCI=yes, HAVE_LIBMFLDADVCI=no)
162 AM_CONDITIONAL(HAVE_LIBMFLDADVCI, test ! "x$LIBMFLDADVCI" = "xyes")
163 if test "x$HAVE_LIBMFLDADVCI" = "xyes"; then
164 LIBMFLDADVCI_CFLAGS=""
166 AC_SUBST(LIBMFLDADVCI_CFLAGS)
167 AC_SUBST(LIBMFLDADVCI_LIBS)
169 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
170 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
172 GST_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-$GST_MAJORMINOR`
173 AC_MSG_NOTICE([using GStreamer plug-ins in $GST_PLUGINS_DIR])
174 AC_SUBST(GST_PLUGINS_DIR)
176 GENERAL_CFLAGS="-D___LINUX___ -D___GNUC___ -DOSAL_ROVER $DEBUG_FLAGS"
177 AC_SUBST(GENERAL_CFLAGS)
182 gst-libs/atomisphal/Makefile \
183 gst-libs/gst/Makefile \
184 gst-libs/gst/camera/Makefile \
186 gst/mfldv4l2cam/Makefile \
188 docs/reference/Makefile \
189 docs/reference/gst-mfld-videosrc/Makefile
191 pkgconfig/gstreamer-atomisphal.pc
192 pkgconfig/gstreamer-mfld-videosrc.pc)