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
AG_GST_SET_ERROR_CFLAGS($GST_CVS)
33
34
dnl add GStreamer arguments
35
AG_GST_ARG_DEBUG
36
AG_GST_ARG_PROFILING
37
AG_GST_ARG_VALGRIND
38
AG_GST_ARG_GCOV
39
40
AG_GST_ARG_WITH_PKG_CONFIG_PATH
41
AG_GST_ARG_WITH_PACKAGE_NAME
42
AG_GST_ARG_WITH_PACKAGE_ORIGIN
43
44
AC_ARG_ENABLE([experimental], AC_HELP_STRING([--enable-experimental]), [EXPERIMENTAL=$enableval], [EXPERIMENTAL=no])
45
AM_CONDITIONAL([EXPERIMENTAL], [test x$EXPERIMENTAL = xyes])
46
if test x$EXPERIMENTAL = xyes; then
47
        AC_DEFINE([EXPERIMENTAL], , [Enable experimental elements])
48
fi
49
50
dnl ** checks **
51
52
dnl Check for GLib
53
PKG_CHECK_MODULES([GTHREAD], [gthread-2.0])
54
55
dnl Check for GStreamer
56
AG_GST_CHECK_GST($GST_MAJORMINOR, [$GST_REQUIRED])
57
AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$GST_REQUIRED])
58
AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$GST_REQUIRED], [no])
59
60
dnl ** finalize ***
61
62
dnl set license and copyright notice
63
GST_LICENSE="LGPL"
64
AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
65
AC_SUBST(GST_LICENSE)
66
67
dnl set GStreamer plug-in dir
68
AG_GST_SET_PLUGINDIR
69
70
dnl GST_OPTION_CFLAGS
71
if test "x$USE_DEBUG" = xyes; then
72
   PROFILE_CFLAGS="-g"
73
fi
74
AC_SUBST(PROFILE_CFLAGS)
75
76
DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
77
AC_SUBST(DEPRECATED_CFLAGS)
78
79
dnl every flag in GST_OPTION_CFLAGS can be overridden at make time
80
GST_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
81
AC_SUBST(GST_OPTION_CFLAGS)
82
83
dnl our libraries need to be versioned correctly
84
AC_SUBST(GST_LT_LDFLAGS)
85
86
dnl FIXME: do we want to rename to GST_ALL_* ?
87
dnl prefer internal headers to already installed ones
88
dnl also add builddir include for enumtypes and marshal
89
dnl add GST_OPTION_CFLAGS, but overridable
90
GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS \$(GST_OPTION_CFLAGS)"
91
AC_SUBST(GST_CFLAGS)
92
AC_SUBST(GST_LIBS)
93
94
dnl LDFLAGS really should only contain flags, not libs - they get added before
95
dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
96
GST_ALL_LDFLAGS="-no-undefined"
97
AC_SUBST(GST_ALL_LDFLAGS)
98
99
dnl this really should only contain flags, not libs - they get added before
100
dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
101
GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_desc\$\$' $GST_ALL_LDFLAGS"
102
AC_SUBST(GST_PLUGIN_LDFLAGS)
103
104
SHAVE_INIT
105
AC_CONFIG_FILES([shave shave-libtool])
106
107
AC_CONFIG_FILES([Makefile \
108
		 omx/Makefile \
109
		 util/Makefile \
110
		 tests/Makefile \
111
		 m4/Makefile])
112
113
AC_OUTPUT