blob: dc677eddb6f2ae3466232eb60a07420cbf64752c [file] [log] [blame]
Song Zhao88613222020-03-26 12:51:09 -07001dnl required version of autoconf
2AC_PREREQ([2.53])
3
4dnl TODO: fill in your package name and package version here
5AC_INIT([gst-aml-drm-plugins],[1.0.0])
6
7dnl required versions of gstreamer and plugins-base
8GST_REQUIRED=1.0.0
9GSTPB_REQUIRED=1.0.0
10
11AC_CONFIG_HEADERS([config.h])
12
13dnl required version of automake
14AM_INIT_AUTOMAKE([1.10])
15
16dnl enable mainainer mode by default
17AM_MAINTAINER_MODE([enable])
18
19dnl check for tools (compiler etc.)
20AC_PROG_CC
21
22dnl required version of libtool
23LT_PREREQ([2.2.6])
24LT_INIT
25
26dnl give error and exit if we don't have pkgconfig
27AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, [ ], [
28 AC_MSG_ERROR([You need to have pkg-config installed!])
29])
30
Tao Guo1813a3e2020-11-30 20:56:09 +080031GST_API_VERSION=1.0
32AC_SUBST(GST_API_VERSION)
33AC_DEFINE_UNQUOTED(GST_API_VERSION, "$GST_API_VERSION", [GStreamer API Version])
34
Song Zhao88613222020-03-26 12:51:09 -070035dnl Check for the required version of GStreamer core (and gst-plugins-base)
36dnl This will export GST_CFLAGS and GST_LIBS variables for use in Makefile.am
37dnl
38dnl If you need libraries from gst-plugins-base here, also add:
39dnl for libgstaudio-1.0: gstreamer-audio-1.0 >= $GST_REQUIRED
40dnl for libgstvideo-1.0: gstreamer-video-1.0 >= $GST_REQUIRED
41dnl for libgsttag-1.0: gstreamer-tag-1.0 >= $GST_REQUIRED
42dnl for libgstpbutils-1.0: gstreamer-pbutils-1.0 >= $GST_REQUIRED
43dnl for libgstfft-1.0: gstreamer-fft-1.0 >= $GST_REQUIRED
44dnl for libgstinterfaces-1.0: gstreamer-interfaces-1.0 >= $GST_REQUIRED
45dnl for libgstrtp-1.0: gstreamer-rtp-1.0 >= $GST_REQUIRED
46dnl for libgstrtsp-1.0: gstreamer-rtsp-1.0 >= $GST_REQUIRED
47dnl etc.
48PKG_CHECK_MODULES(GST, [
49 gstreamer-1.0 >= $GST_REQUIRED
50 gstreamer-base-1.0 >= $GST_REQUIRED
51 gstreamer-plugins-bad-1.0 >= $GST_REQUIRED
52 gstreamer-app-1.0 >= $GST_REQUIRED
53 gstreamer-allocators-1.0 >= $GST_REQUIRED
54], [
55 AC_SUBST(GST_CFLAGS)
56 AC_SUBST(GST_LIBS)
57], [
58 AC_MSG_ERROR([
59 You need to install or upgrade the GStreamer development
60 packages on your system. On debian-based systems these are
61 libgstreamer1.0-dev and libgstreamer-plugins-base1.0-dev.
62 on RPM-based systems gstreamer1.0-devel, libgstreamer1.0-devel
63 or similar. The minimum version required is $GST_REQUIRED.
64 ])
65])
66
67dnl check if compiler understands -Wall (if yes, add -Wall to GST_CFLAGS)
68AC_MSG_CHECKING([to see if compiler understands -Wall])
69save_CFLAGS="$CFLAGS"
70CFLAGS="$CFLAGS -Wall"
71AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ ], [ ])], [
72 GST_CFLAGS="$GST_CFLAGS -Wall"
73 AC_MSG_RESULT([yes])
74], [
75 AC_MSG_RESULT([no])
76])
77
78dnl set the plugindir where plugins should be installed (for src/Makefile.am)
79if test "x${prefix}" = "x$HOME"; then
80 plugindir="$HOME/.gstreamer-1.0/plugins"
81else
82 plugindir="\$(libdir)/gstreamer-1.0"
83fi
84AC_SUBST(plugindir)
85
86dnl set proper LDFLAGS for plugins
87GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
88AC_SUBST(GST_PLUGIN_LDFLAGS)
89
90AC_CONFIG_FILES([Makefile
91src/Makefile
Song Zhao88613222020-03-26 12:51:09 -070092src/secmem/Makefile
Tao Guo1813a3e2020-11-30 20:56:09 +080093src/secmem/gstsecmemallocator.pc
Song Zhao88613222020-03-26 12:51:09 -070094src/secure_parse/Makefile
Tao Guo79938852020-04-03 19:09:52 +080095src/dummy/Makefile
Song Zhao88613222020-03-26 12:51:09 -070096])
97AC_OUTPUT
98