add suffix 0.10 to package name, fix build failure.
[profile/ivi/gst-openmax0.10.git] / configure.ac
1 AC_PREREQ([2.52])
2
3 AC_INIT([gst-openmax], m4_esyscmd([build-aux/git-version-gen]),
4         [http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer&component=gst-openmax])
5
6 AC_CONFIG_AUX_DIR([build-aux])
7 AM_INIT_AUTOMAKE([-Wall -Wno-portability])
8 AC_CONFIG_HEADERS([config.h])
9
10 dnl versions of GStreamer
11 GST_MAJORMINOR=0.10
12 GST_REQUIRED=0.10.0
13
14 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
15 AM_MAINTAINER_MODE
16
17 dnl check for tools
18 AC_PROG_CC
19 AM_PROG_CC_C_O
20 AC_PROG_INSTALL
21 AC_PROG_LIBTOOL
22
23 PKG_CHECK_MODULES([CHECK], [check], HAVE_CHECK=yes, HAVE_CHECK=no)
24
25 dnl Keep correct libtool macros in-tree.
26 AC_CONFIG_MACRO_DIR([m4])
27
28 dnl initialize GStreamer macros
29 AG_GST_INIT
30
31 dnl define an ERROR_CFLAGS Makefile variable
32 GST_CVS=no
33 AG_GST_SET_ERROR_CFLAGS($GST_CVS)
34
35 dnl add GStreamer arguments
36 AG_GST_ARG_DEBUG
37 AG_GST_ARG_PROFILING
38 AG_GST_ARG_VALGRIND
39 AG_GST_ARG_GCOV
40
41 AG_GST_ARG_WITH_PKG_CONFIG_PATH
42 AG_GST_ARG_WITH_PACKAGE_NAME
43 AG_GST_ARG_WITH_PACKAGE_ORIGIN
44
45 AC_ARG_ENABLE([experimental], AC_HELP_STRING([--enable-experimental]), [EXPERIMENTAL=$enableval], [EXPERIMENTAL=no])
46 AM_CONDITIONAL([EXPERIMENTAL], [test x$EXPERIMENTAL = xyes])
47 if test x$EXPERIMENTAL = xyes; then
48         AC_DEFINE([EXPERIMENTAL], , [Enable experimental elements])
49 fi
50
51 dnl ** checks **
52
53 dnl Check for GLib
54 PKG_CHECK_MODULES([GTHREAD], [gthread-2.0])
55
56 dnl Check for GStreamer
57 AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQUIRED])
58 AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQUIRED])
59 AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQUIRED], [no])
60
61 dnl ** finalize ***
62
63 dnl set license and copyright notice
64 GST_LICENSE="LGPL"
65 AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
66 AC_SUBST(GST_LICENSE)
67
68 dnl set GStreamer plug-in dir
69 AG_GST_SET_PLUGINDIR
70
71 dnl GST_OPTION_CFLAGS
72 if test "x$USE_DEBUG" = xyes; then
73    PROFILE_CFLAGS="-g"
74 fi
75 AC_SUBST(PROFILE_CFLAGS)
76
77 DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
78 AC_SUBST(DEPRECATED_CFLAGS)
79
80 dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
81 GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
82 AC_SUBST(GST_OPTION_CFLAGS)
83
84 dnl our libraries need to be versioned correctly
85 AC_SUBST(GST_LT_LDFLAGS)
86
87 dnl FIXME: do we want to rename to GST_ALL_* ?
88 dnl prefer internal headers to already installed ones
89 dnl also add builddir include for enumtypes and marshal
90 dnl add GST_OPTION_CFLAGS, but overridable
91 GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
92 AC_SUBST(GST_CFLAGS)
93 AC_SUBST(GST_LIBS)
94
95 dnl LDFLAGS really should only contain flags, not libs - they get added before
96 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
97 GST_ALL_LDFLAGS="-no-undefined"
98 AC_SUBST(GST_ALL_LDFLAGS)
99
100 dnl this really should only contain flags, not libs - they get added before
101 dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
102 GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
103 AC_SUBST(GST_PLUGIN_LDFLAGS)
104
105 SHAVE_INIT
106 AC_CONFIG_FILES([shave shave-libtool])
107
108 AC_CONFIG_FILES([Makefile \
109                  omx/Makefile \
110                  util/Makefile \
111                  tests/Makefile \
112                  tests/standalone/Makefile \
113                  m4/Makefile])
114
115 AC_OUTPUT