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)
24 dnl make aclocal work in maintainer mode
25 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
26 AC_CONFIG_MACRO_DIR(m4)
28 AM_CONFIG_HEADER(config.h)
37 dnl decide on error flags
38 AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
40 if test "x$GST_WALL" = "xyes"; then
41 GST_ERROR="$GST_ERROR -Wall"
43 if test "x$GST_PLUGIN_CVS" = "xyes"; then
44 AS_COMPILER_FLAG(-Werror,GST_ERROR="$GST_ERROR -Werror",GST_ERROR="$GST_ERROR")
48 dnl Check for pkgconfig first
49 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
51 dnl Give error and exit if we don't have pkgconfig
52 if test "x$HAVE_PKGCONFIG" = "xno"; then
53 AC_MSG_ERROR(you need to have pkgconfig installed !)
56 dnl Now we're ready to ask for gstreamer libs and cflags
57 dnl And we can also ask for the right version of gstreamer
60 PKG_CHECK_MODULES(GST, \
61 gstreamer-$GST_MAJORMINOR >= $GST_REQUIRED,
62 HAVE_GST=yes,HAVE_GST=no)
64 dnl Give error and exit if we don't have gstreamer
65 if test "x$HAVE_GST" = "xno"; then
66 AC_MSG_ERROR(you need gstreamer development packages installed !)
69 dnl append GST_ERROR cflags to GST_CFLAGS
70 GST_CFLAGS="$GST_CFLAGS $GST_ERROR"
72 dnl make GST_CFLAGS and GST_LIBS available
76 dnl make GST_MAJORMINOR available in Makefile.am
77 AC_SUBST(GST_MAJORMINOR)
79 AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [compile with DEBUG]),,enable_debug=no)
82 dnl Check for debug build
83 if test "x$enable_debug" = "xyes"; then
87 dnl If we need them, we can also use the base class libraries
88 PKG_CHECK_MODULES(GST_BASE, gstreamer-base-$GST_MAJORMINOR >= $GST_REQUIRED,
89 HAVE_GST_BASE=yes, HAVE_GST_BASE=no)
91 dnl Give a warning if we don't have gstreamer libs
92 dnl you can turn this into an error if you need them
93 if test "x$HAVE_GST_BASE" = "xno"; then
94 AC_MSG_NOTICE(no GStreamer base class libraries found (gstreamer-base-$GST_MAJORMINOR))
97 dnl make _CFLAGS and _LIBS available
98 AC_SUBST(GST_BASE_CFLAGS)
99 AC_SUBST(GST_BASE_LIBS)
101 dnl If we need them, we can also use the base class libraries
102 PKG_CHECK_MODULES(GST_CONTROLLER, gstreamer-controller-$GST_MAJORMINOR >= $GST_REQUIRED,
103 HAVE_GST_BASE=yes, HAVE_GST_BASE=no)
105 dnl Give a warning if we don't have gstreamer libs
106 dnl you can turn this into an error if you need them
107 if test "x$HAVE_GST_BASE" = "xno"; then
108 AC_MSG_NOTICE(no GStreamer controllerlibraries found (gstreamer-controller-$GST_MAJORMINOR))
111 dnl make _CFLAGS and _LIBS available
112 AC_SUBST(GST_CONTROLLER_CFLAGS)
113 AC_SUBST(GST_CONTROLLER_LIBS)
115 dnl Check gst-plugins-bad
116 PKG_CHECK_MODULES(GST_BAD, gstreamer-plugins-bad-$GST_MAJORMINOR,
117 HAVE_GST_BAD=yes, HAVE_GST_BAD=no)
119 if test "x$HAVE_GST_BAD" = "xno"; then
120 AC_MSG_NOTICE(no gstreamer-plugins-bad libraries found (gstreamer-plugins-bad-$GST_MAJORMINOR))
123 dnl make _CFLAGS and _LIBS available
124 AC_SUBST(GST_BAD_CFLAGS)
125 AC_SUBST(GST_BAD_LIBS)
127 dnl set the plugindir where plugins should be installed
128 if test "x${prefix}" = "x$HOME"; then
129 plugindir="$HOME/.gstreamer-$GST_MAJORMINOR/plugins"
131 plugindir="\$(libdir)/gstreamer-$GST_MAJORMINOR"
135 dnl set proper LDFLAGS for plugins
136 GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
137 AC_SUBST(GST_PLUGIN_LDFLAGS)
139 dnl LDFLAGS really should only contain flags, not libs - they get added before
140 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
141 GST_ALL_LDFLAGS="-no-undefined"
142 AC_SUBST(GST_ALL_LDFLAGS)
145 dnl linker flags shared by all libraries
146 dnl LDFLAGS modifier defining exported symbols from built libraries
147 dnl (export _gst_foo but not __gst_foo)
148 GST_LIB_LDFLAGS="-export-symbols-regex ^_?\(gst_\|Gst\|GST_\).*"
149 AC_SUBST(GST_LIB_LDFLAGS)
151 dnl check gst check support
153 PKG_CHECK_MODULES(GST_CHECK, gstreamer-check-$GST_MAJORMINOR, HAVE_GST_CHECK=yes, HAVE_GST_CHECK=no)
154 AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
155 AC_SUBST(GST_CHECK_CFLAGS)
156 AC_SUBST(GST_CHECK_LIBS)
158 dnl check gst check 3a support
159 dnl LIBMFLDADVCI_CFLAGS
160 dnl LIBMFLDADVCI_LIBS
161 HAVE_LIBMFLDADVCI=yes
162 PKG_CHECK_MODULES(LIBMFLDADVCI, libmfldadvci >= $LIBMFLD_REQUIRED, HAVE_LIBMFLDADVCI=yes, HAVE_LIBMFLDADVCI=no)
163 AM_CONDITIONAL(HAVE_LIBMFLDADVCI, test ! "x$LIBMFLDADVCI" = "xyes")
164 if test "x$HAVE_LIBMFLDADVCI" = "xyes"; then
165 LIBMFLDADVCI_CFLAGS=""
167 AC_SUBST(LIBMFLDADVCI_CFLAGS)
168 AC_SUBST(LIBMFLDADVCI_LIBS)
170 AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
171 AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")
173 GST_PLUGINS_DIR=`$PKG_CONFIG --variable=pluginsdir gstreamer-$GST_MAJORMINOR`
174 AC_MSG_NOTICE([using GStreamer plug-ins in $GST_PLUGINS_DIR])
175 AC_SUBST(GST_PLUGINS_DIR)
177 GENERAL_CFLAGS="-D___LINUX___ -D___GNUC___ -DOSAL_ROVER $DEBUG_FLAGS"
178 AC_SUBST(GENERAL_CFLAGS)
183 gst-libs/atomisphal/Makefile \
184 gst-libs/gst/Makefile \
185 gst-libs/gst/camera/Makefile \
187 gst/mfldv4l2cam/Makefile \
189 docs/reference/Makefile \
190 docs/reference/gst-mfld-videosrc/Makefile
192 pkgconfig/gstreamer-atomisphal.pc
193 pkgconfig/gstreamer-mfld-videosrc.pc)