-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
104 lines (84 loc) · 3.01 KB
/
configure.ac
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
# Copyright (C) 2012-2013 Canonical Ltd.
# Author: Martin Pitt <[email protected]>
#
# umockdev is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# umockdev is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ([2.64])
AC_INIT([umockdev],
m4_esyscmd([head -n1 NEWS | cut -f1 -d' ' | tr -d '\n']),
[https://github.com/martinpitt/umockdev/issues],
[umockdev],
[https://github.com/martinpitt/umockdev])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR([src/umockdev-wrapper])
AC_CONFIG_HEADERS([config.h])
AC_SYS_LARGEFILE
AM_SILENT_RULES([yes])
AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Werror -Wno-portability silent-rules subdir-objects tar-pax no-dist-gzip dist-xz])
AM_PROG_CC_C_O
AC_PROG_CC_C99
AM_PROG_AR
LT_PREREQ(2.2)
LT_INIT
# check for gtk-doc
m4_ifdef([GTK_DOC_CHECK], [
GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
],[
AM_CONDITIONAL([ENABLE_GTK_DOC], false)
])
# check for gobject-introspection
m4_ifdef([GOBJECT_INTROSPECTION_CHECK],
[GOBJECT_INTROSPECTION_CHECK([1.32])],
[AM_CONDITIONAL([HAVE_INTROSPECTION], [false])])
AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([Dynamic linking loader library not found])])
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.32.0 gobject-2.0 >= 2.32.0 gio-2.0 >= 2.32.0 gio-unix-2.0 >= 2.32.0])
PKG_CHECK_MODULES([LIBUDEV], [libudev])
PKG_CHECK_MODULES([GUDEV], [gudev-1.0])
# if we have Python 2 or 3, run the GI test (they will skip if gi.repository is
# not available)
AC_CHECK_PROGS(PYTHON, [python3 python])
AM_CONDITIONAL(HAVE_PYTHON, [test x$PYTHON != x])
AC_CHECK_PROGS(VALAC, [valac])
AM_PROG_VALAC([0.16.1])
# code coverage support
AC_MSG_CHECKING(for GNOME code coverage support)
m4_ifdef([GNOME_CODE_COVERAGE],
[AC_MSG_RESULT(yes)
GNOME_CODE_COVERAGE],
[AC_MSG_RESULT(no)
GNOME_CODE_COVERAGE_RULES=''
AC_SUBST([GNOME_CODE_COVERAGE_RULES])
enable_code_coverage="no"])
CFLAGS="$CFLAGS $CODE_COVERAGE_CFLAGS"
LDFLAGS="$LDFLAGS $CODE_COVERAGE_CFLAGS"
AC_CONFIG_FILES([
Makefile
src/umockdev-1.0.pc
docs/reference/Makefile
docs/reference/version.xml
])
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE_NAME $VERSION
CPPFLAGS: ${CPPFLAGS}
CFLAGS: ${CFLAGS}
LDFLAGS: ${LDFLAGS}
gobject-introspection support: ${enable_introspection}
code coverage support: ${enable_code_coverage}])
if test x$PYTHON != x; then
AC_MSG_RESULT([ Python: ${PYTHON}])
else
AC_MSG_RESULT([
WARNING! No Python interpreter found. Some tests cannot be run.])
fi