File: configure.ac

package info (click to toggle)
gnome-dvb-daemon 1:0.2.91~git20170110-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 7,740 kB
  • sloc: ansic: 66,157; python: 4,341; sh: 4,265; makefile: 332; xml: 10
file content (173 lines) | stat: -rw-r--r-- 4,601 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
AC_PREREQ(2.63.2)
AC_INIT([gnome-dvb-daemon], [0.2.91],
       [https://bugzilla.gnome.org/browse.cgi?product=dvb-daemon],
       [gnome-dvb-daemon],
       [https://wiki.gnome.org/Projects/DVBDaemon])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.11 subdir-objects dist-xz no-dist-gzip])
AM_MAINTAINER_MODE([enable])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

AC_PROG_CC
AM_PROG_CC_C_O

LT_PREREQ([2.2.6])
LT_INIT([disable-static])

AM_PROG_VALAC([0.26])

AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)

dnl *********************
dnl * i18n
dnl *********************
IT_PROG_INTLTOOL([0.40.0])

AC_SUBST([GETTEXT_PACKAGE], [gnome-dvb-daemon])
AC_DEFINE([GETTEXT_PACKAGE], [PACKAGE_TARNAME], [Define to the gettext package name])

AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/po/LINGUAS'])

dnl *********************
dnl * time.h and timegm
dnl *********************
AC_CHECK_HEADERS([time.h], have_time=yes, have_time=no)
if test "x$have_time" = "xno"; then
	AC_MSG_ERROR([Could not find time.h])
fi

AC_CHECK_FUNC([timegm], have_timegm=yes, have_timegm=no)
if test "x$have_timegm" = "xno"; then
	AC_MSG_ERROR([Could not find timegm function])
fi

dnl ***********
dnl * signal.h
dnl ***********
AC_CHECK_HEADERS([signal.h], have_signal=yes, have_signal=no)
if test "x$have_signal" = "xno"; then
	AC_MSG_ERROR([Could not find signal.h])
fi

dnl ******************
dnl * Check for libs
dnl ******************
GLIB_REQUIRED=2.32.0
GST_REQUIRED=1.4.0
GEE_REQUIRED=0.8.0
SQLITE_REQUIRED=3.4
GST_RTSP_SERVER_REQUIRED=1.4.0
GST_MPEGTS_REQUIRED=1.4.0

PKG_CHECK_MODULES(GST, gstreamer-1.0 >= $GST_REQUIRED
                       gstreamer-rtsp-1.0 >= $GST_REQUIRED)
AC_SUBST(GST_CFLAGS)
AC_SUBST(GST_LIBS)

PKG_CHECK_MODULES(GNOME_DVB_DAEMON, glib-2.0 >= $GLIB_REQUIRED
                            gio-2.0 >= $GLIB_REQUIRED
                            gobject-2.0 >= $GLIB_REQUIRED
                            gee-0.8 >= $GEE_REQUIRED
                            sqlite3 >= $SQLITE_REQUIRED
                            gstreamer-rtsp-server-1.0 >= $GST_RTSP_SERVER_REQUIRED
                            gstreamer-mpegts-1.0 >= $GST_MPEGTS_REQUIRED)
AC_SUBST(GNOME_DVB_DAEMON_CFLAGS)
AC_SUBST(GNOME_DVB_DAEMON_LIBS)

PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

PKG_CHECK_MODULES(GUDEV, gudev-1.0)
AC_SUBST(GUDEV_CFLAGS)
AC_SUBST(GUDEV_LIBS)

AG_GST_CHECK_GST_INSPECT
AG_GST_CHECK_MODULE_BAD([tsparse])
AG_GST_CHECK_MODULE_BAD([dvbbasebin])
AG_GST_CHECK_MODULE_BAD([dvbsrc])
AG_GST_CHECK_MODULE_GOOD([rtpmp2tpay])

dnl ****************
dnl * Grilo plugin
dnl ****************
GRL_VERSION=0.3
GRL_NAME=grilo-${GRL_VERSION}
PKG_CHECK_MODULES([GRILO], [${GRL_NAME} gio-unix-2.0 gio-2.0 glib-2.0 gobject-2.0 gmodule-2.0],
                    HAVE_GRL=yes,
                    HAVE_GRL=no)

GRL_PLUGINS_DIR=`${PKG_CONFIG} --variable=plugindir ${GRL_NAME}`
AC_SUBST(GRL_PLUGINS_DIR)
AC_DEFINE_UNQUOTED(GRL_PLUGINS_DIR, "$GRL_PLUGINS_DIR", [Grilo Plugins directory])

DVBDAEMON_PLUGIN_ID="grl-dvb-daemon"
AC_SUBST(DVBDAEMON_PLUGIN_ID)
AC_DEFINE_UNQUOTED([DVBDAEMON_PLUGIN_ID], ["$DVBDAEMON_PLUGIN_ID"], [DVB Daemon plugin ID])

AC_ARG_ENABLE([grilo-plugin],
	AS_HELP_STRING([--enable-grilo-plugin], [Install the Grilo plugin (default: auto)]),
	[
		case "$enableval" in
			yes)
				if test "x$HAVE_GRL" = "xno"; then
					AC_MSG_ERROR([${GRL_NAME} not found, install it or use --disable-grilo-plugin])
				fi

			;;
		esac
	],
	[
		if test "x$HAVE_GRL" = "xyes"; then
			enable_grilo_plugin=yes
		else
			enable_grilo_plugin=no
		fi
	])

AM_CONDITIONAL(ENABLE_GRILO, test "x$enable_grilo_plugin" = "xyes")


dnl **********
dnl * Python
dnl **********
PYTHON_REQUIRED=3.2
AM_PATH_PYTHON($PYTHON_REQUIRED)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
AC_SUBST(PYTHONDIR)

PYGOBJECT_REQUIRED=3.2.1
PKG_CHECK_MODULES(PYGOBJECT, pygobject-3.0 >= $PYGOBJECT_REQUIRED)

dnl ******************
dnl * Python modules
dnl *****************
AM_CHECK_PYMOD(gi.repository)

AC_CONFIG_FILES([
	Makefile
	client/Makefile
	client/gnome-dvb-control
	client/gnome-dvb-setup
	client/gnomedvb/defs.py
	client/gnomedvb/Makefile
	client/grilo-plugin/Makefile
	data/Makefile
	data/gnome-dvb-control.desktop.in
	data/gnome-dvb-setup.desktop.in
	data/icons/Makefile
	po/Makefile.in])

AC_OUTPUT

echo "
$PACKAGE_NAME $PACKAGE_VERSION

    Install Prefix:               ${prefix}
    Python dir:                   ${pythondir}
    Build Grilo plugin            ${enable_grilo}
"