1 dnl required version of autoconf
2 AC_PREREQ([2.53])
4 dnl TODO: fill in your package name and package version here
5 AC_INIT([gst-ducati],[1.0.0])
7 dnl required versions of gstreamer and plugins-base
8 GST_MAJORMINOR=1.0
9 GST_REQUIRED=1.2.3
11 AC_CONFIG_SRCDIR([src/gstducati.c])
12 AC_CONFIG_HEADERS([config.h])
14 dnl required version of automake
15 AM_INIT_AUTOMAKE([1.10])
17 dnl enable mainainer mode by default
18 AM_MAINTAINER_MODE
20 dnl sets host_* variables
21 AC_CANONICAL_HOST
23 dnl use pretty build output with automake >= 1.11
24 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
25 [AM_DEFAULT_VERBOSITY=1
26 AC_SUBST(AM_DEFAULT_VERBOSITY)])
28 dnl check for tools
29 AC_PROG_CC
30 AM_PROG_CC_C_O
31 AC_PROG_INSTALL
32 AC_PROG_LIBTOOL
34 PKG_CHECK_MODULES([CHECK], [check], HAVE_CHECK=yes, HAVE_CHECK=no)
36 dnl Keep correct libtool macros in-tree.
37 AC_CONFIG_MACRO_DIR([m4])
39 dnl initialize GStreamer macros
40 AG_GST_INIT
41 dnl define an ERROR_CFLAGS Makefile variable
42 AG_GST_SET_ERROR_CFLAGS($GST_GIT, [
43 -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls
44 -Wwrite-strings -Wformat-nonliteral -Wformat-security -Wold-style-definition
45 -Winit-self -Wmissing-include-dirs -Waddress
46 -Waggregate-return -Wno-multichar])
48 dnl define correct level for debugging messages
49 AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
51 dnl set up gettext
52 dnl the version check needs to stay here because autopoint greps for it
53 AM_GNU_GETTEXT_VERSION([0.17])
54 AM_GNU_GETTEXT([external])
55 AG_GST_GETTEXT([gst-ducati-$GST_MAJORMINOR])
57 dnl add GStreamer arguments
58 AG_GST_ARG_DEBUG
59 AG_GST_ARG_PROFILING
60 AG_GST_ARG_VALGRIND
61 AG_GST_ARG_GCOV
63 AG_GST_ARG_WITH_PKG_CONFIG_PATH
64 AG_GST_ARG_WITH_PACKAGE_NAME
65 AG_GST_ARG_WITH_PACKAGE_ORIGIN
67 dnl required version of libtool
68 LT_PREREQ([2.2.6])
69 LT_INIT
71 dnl give error and exit if we don't have pkgconfig
72 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, [ ], [
73 AC_MSG_ERROR([You need to have pkg-config installed!])
74 ])
76 dnl Check for required codec-engine library..
77 PKG_CHECK_MODULES(LIBDCE, [libdce >= 1.0.0])
79 dnl Check for the required version of GStreamer core (and gst-plugins-base)
80 dnl This will export GST_CFLAGS and GST_LIBS variables for use in Makefile.am
81 PKG_CHECK_MODULES(GST, [
82 gstreamer-1.0 >= $GST_REQUIRED
83 gstreamer-base-1.0 >= $GST_REQUIRED
84 gstreamer-plugins-base-1.0 >= $GST_REQUIRED
85 gstreamer-plugins-bad-1.0
86 ], [
87 AC_SUBST(GST_CFLAGS)
88 AC_SUBST(GST_LIBS)
89 ], [
90 AC_MSG_ERROR([
91 You need to install or upgrade the GStreamer development
92 packages on your system. On debian-based systems these are
93 libgstreamer0.10-dev and libgstreamer-plugins-base0.10-dev.
94 on RPM-based systems gstreamer0.10-devel, libgstreamer0.10-devel
95 or similar. The minimum version required is $GST_REQUIRED.
96 ])
97 ])
99 dnl set license and copyright notice
100 GST_LICENSE="LGPL"
101 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
102 AC_SUBST(GST_LICENSE)
104 dnl set GStreamer plug-in dir
105 AG_GST_SET_PLUGINDIR
107 dnl GST_OPTION_CFLAGS
108 if test "x$USE_DEBUG" = xyes; then
109 PROFILE_CFLAGS="-g"
110 fi
111 AC_SUBST(PROFILE_CFLAGS)
113 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
114 AC_SUBST(DEPRECATED_CFLAGS)
116 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
117 GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
118 AC_SUBST(GST_OPTION_CFLAGS)
120 dnl our libraries need to be versioned correctly
121 AC_SUBST(GST_LT_LDFLAGS)
123 dnl FIXME: do we want to rename to GST_ALL_* ?
124 dnl prefer internal headers to already installed ones
125 dnl also add builddir include for enumtypes and marshal
126 dnl add GST_OPTION_CFLAGS, but overridable
127 GST_CFLAGS="$GST_CFLAGS \$(GST_OPTION_CFLAGS)"
128 AC_SUBST(GST_CFLAGS)
129 AC_SUBST(GST_LIBS)
131 dnl LDFLAGS really should only contain flags, not libs - they get added before
132 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
133 GST_ALL_LDFLAGS=""
134 AC_SUBST(GST_ALL_LDFLAGS)
136 dnl this really should only contain flags, not libs - they get added before
137 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
138 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
139 AC_SUBST(GST_PLUGIN_LDFLAGS)
141 AC_CONFIG_FILES([Makefile src/Makefile])
142 AC_OUTPUT