blob: 3a445a15609c8d810cdc28ddefd2a44fe1438166 [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
31dnl Check for the required version of GStreamer core (and gst-plugins-base)
32dnl This will export GST_CFLAGS and GST_LIBS variables for use in Makefile.am
33dnl
34dnl If you need libraries from gst-plugins-base here, also add:
35dnl for libgstaudio-1.0: gstreamer-audio-1.0 >= $GST_REQUIRED
36dnl for libgstvideo-1.0: gstreamer-video-1.0 >= $GST_REQUIRED
37dnl for libgsttag-1.0: gstreamer-tag-1.0 >= $GST_REQUIRED
38dnl for libgstpbutils-1.0: gstreamer-pbutils-1.0 >= $GST_REQUIRED
39dnl for libgstfft-1.0: gstreamer-fft-1.0 >= $GST_REQUIRED
40dnl for libgstinterfaces-1.0: gstreamer-interfaces-1.0 >= $GST_REQUIRED
41dnl for libgstrtp-1.0: gstreamer-rtp-1.0 >= $GST_REQUIRED
42dnl for libgstrtsp-1.0: gstreamer-rtsp-1.0 >= $GST_REQUIRED
43dnl etc.
44PKG_CHECK_MODULES(GST, [
45 gstreamer-1.0 >= $GST_REQUIRED
46 gstreamer-base-1.0 >= $GST_REQUIRED
47 gstreamer-plugins-bad-1.0 >= $GST_REQUIRED
48 gstreamer-app-1.0 >= $GST_REQUIRED
49 gstreamer-allocators-1.0 >= $GST_REQUIRED
50], [
51 AC_SUBST(GST_CFLAGS)
52 AC_SUBST(GST_LIBS)
53], [
54 AC_MSG_ERROR([
55 You need to install or upgrade the GStreamer development
56 packages on your system. On debian-based systems these are
57 libgstreamer1.0-dev and libgstreamer-plugins-base1.0-dev.
58 on RPM-based systems gstreamer1.0-devel, libgstreamer1.0-devel
59 or similar. The minimum version required is $GST_REQUIRED.
60 ])
61])
62
63dnl check if compiler understands -Wall (if yes, add -Wall to GST_CFLAGS)
64AC_MSG_CHECKING([to see if compiler understands -Wall])
65save_CFLAGS="$CFLAGS"
66CFLAGS="$CFLAGS -Wall"
67AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ ], [ ])], [
68 GST_CFLAGS="$GST_CFLAGS -Wall"
69 AC_MSG_RESULT([yes])
70], [
71 AC_MSG_RESULT([no])
72])
73
74dnl set the plugindir where plugins should be installed (for src/Makefile.am)
75if test "x${prefix}" = "x$HOME"; then
76 plugindir="$HOME/.gstreamer-1.0/plugins"
77else
78 plugindir="\$(libdir)/gstreamer-1.0"
79fi
80AC_SUBST(plugindir)
81
82dnl set proper LDFLAGS for plugins
83GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
84AC_SUBST(GST_PLUGIN_LDFLAGS)
85
86AC_CONFIG_FILES([Makefile
87src/Makefile
Song Zhao88613222020-03-26 12:51:09 -070088src/secmem/Makefile
89src/secure_parse/Makefile
Tao Guo79938852020-04-03 19:09:52 +080090src/dummy/Makefile
Song Zhao88613222020-03-26 12:51:09 -070091])
92AC_OUTPUT
93