blob: 074cba21d91040375f907aa7df6a79967c319b98 [file] [log] [blame]
xuesong.jiang1c265482023-04-03 07:22:20 +00001dnl required version of autoconf
2AC_PREREQ([2.69])
3
4dnl TODO: fill in your package name and package version here
xuesong.jiang05743022023-04-03 08:25:53 +00005AC_INIT([amldmx-package],[1.0.0])
xuesong.jiang1c265482023-04-03 07:22:20 +00006
7dnl required versions of gstreamer and plugins-base
8GST_REQUIRED=1.0.0
9DRM_REQUIRED=2.4
10
hanghang.luoabd9a7b2024-08-28 17:22:19 +080011AC_CONFIG_SRCDIR([aml-hwdemux])
zengliang.lia6c0cdd2024-05-18 07:15:51 +000012AC_CONFIG_SRCDIR([aml-qtdemux])
hanghang.luo90674422024-06-11 22:14:39 +080013AC_CONFIG_SRCDIR([aml-tsdemux])
xuesong.jiang1c265482023-04-03 07:22:20 +000014AC_CONFIG_HEADERS([config.h])
15
16dnl required version of automake
17AM_INIT_AUTOMAKE([1.10])
18
19dnl enable mainainer mode by default
20AM_MAINTAINER_MODE([enable])
21
22dnl check for tools (compiler etc.)
23AC_PROG_CC
24
25dnl required version of libtool
26LT_PREREQ([2.2.6])
27LT_INIT
28
29dnl give error and exit if we don't have pkgconfig
30AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, [ ], [
31 AC_MSG_ERROR([You need to have pkg-config installed!])
32])
33
34PKG_CHECK_MODULES(DRM, [
35 libdrm >= $DRM_REQUIRED
36], [
37 AC_SUBST(DRM_CFLAGS)
38 AC_SUBST(DRM_LIBS)
39], [
40 AC_MSG_ERROR([Wrong libDRM version])
41])
42
43dnl Check for the required version of GStreamer core (and gst-plugins-base)
44dnl This will export GST_CFLAGS and GST_LIBS variables for use in Makefile.am
45dnl
46dnl If you need libraries from gst-plugins-base here, also add:
47dnl for libgstaudio-1.0: gstreamer-audio-1.0 >= $GST_REQUIRED
48dnl for libgstvideo-1.0: gstreamer-video-1.0 >= $GST_REQUIRED
49dnl for libgsttag-1.0: gstreamer-tag-1.0 >= $GST_REQUIRED
50dnl for libgstpbutils-1.0: gstreamer-pbutils-1.0 >= $GST_REQUIRED
51dnl for libgstfft-1.0: gstreamer-fft-1.0 >= $GST_REQUIRED
52dnl for libgstinterfaces-1.0: gstreamer-interfaces-1.0 >= $GST_REQUIRED
53dnl for libgstrtp-1.0: gstreamer-rtp-1.0 >= $GST_REQUIRED
54dnl for libgstrtsp-1.0: gstreamer-rtsp-1.0 >= $GST_REQUIRED
55dnl etc.
56
57PKG_CHECK_MODULES(GST, [
58 gstreamer-1.0 >= $GST_REQUIRED
59 gstreamer-base-1.0 >= $GST_REQUIRED
60 gstreamer-allocators-1.0 >= $GST_REQUIRED
61], [
62 AC_SUBST(GST_CFLAGS)
63 AC_SUBST(GST_LIBS)
64], [
65 AC_MSG_ERROR([
66 You need to install or upgrade the GStreamer development
67 packages on your system. On debian-based systems these are
68 libgstreamer1.0-dev and libgstreamer-plugins-base1.0-dev.
69 on RPM-based systems gstreamer1.0-devel, libgstreamer1.0-devel
70 or similar. The minimum version required is $GST_REQUIRED.
71 ])
72])
73
74dnl check if compiler understands -Wall (if yes, add -Wall to GST_CFLAGS)
75AC_MSG_CHECKING([to see if compiler understands -Wall])
76save_CFLAGS="$CFLAGS"
77CFLAGS="$CFLAGS -Wall"
78AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ ], [ ])], [
79 GST_CFLAGS="$GST_CFLAGS -Wall"
80 AC_MSG_RESULT([yes])
81], [
82 AC_MSG_RESULT([no])
83])
84
85dnl set the plugindir where plugins should be installed (for src/Makefile.am)
86if test "x${prefix}" = "x$HOME"; then
87 plugindir="$HOME/.gstreamer-1.0/plugins"
88else
89 plugindir="\$(libdir)/gstreamer-1.0"
90fi
91AC_SUBST(plugindir)
92
93dnl set proper LDFLAGS for plugins
94GST_PLUGIN_LDFLAGS='-module -avoid-version -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).*'
95AC_SUBST(GST_PLUGIN_LDFLAGS)
96
zengliang.lia6c0cdd2024-05-18 07:15:51 +000097AC_ARG_ENABLE([hwdemux],
98[ --enable-hwdemux , support hwdemux],
99[case "${enableval}" in
100 yes) hwdemux=true ;;
101 no) hwdemux=false ;;
102 *) AC_MSG_ERROR([bad value ${enableval} for --enable-hwdemux]) ;;
103esac],[hwdemux=false])
104AM_CONDITIONAL([HWDEMUX], [test x${hwdemux} = xtrue])
105
106AC_ARG_ENABLE([amlqtdemux],
107[ --enable-amlqtdemux , support amlqtdemux],
108[case "${enableval}" in
109 yes) amlqtdemux=true ;;
110 no) amlqtdemux=false ;;
111 *) AC_MSG_ERROR([bad value ${enableval} for --enable-amlqtdemux]) ;;
112esac],[amlqtdemux=false])
113AM_CONDITIONAL([QTDEMUX], [test x${amlqtdemux} = xtrue])
114
hanghang.luo90674422024-06-11 22:14:39 +0800115AC_ARG_ENABLE([amltsdemux],
116[ --enable-amltsdemux , support amltsdemux],
117[case "${enableval}" in
118 yes) amltsdemux=true ;;
119 no) amltsdemux=false ;;
120 *) AC_MSG_ERROR([bad value ${enableval} for --enable-amltsdemux]) ;;
121esac],[amltsdemux=false])
122AM_CONDITIONAL([TSDEMUX], [test x${amltsdemux} = xtrue])
123
xuesong.jiang1c265482023-04-03 07:22:20 +0000124AC_CONFIG_FILES([Makefile
hanghang.luoabd9a7b2024-08-28 17:22:19 +0800125 aml-hwdemux/Makefile aml-qtdemux/Makefile aml-tsdemux/Makefile
xuesong.jiang1c265482023-04-03 07:22:20 +0000126])
127AC_OUTPUT