-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
77 lines (57 loc) · 1.73 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
AC_INIT(libngf/ngf.h)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR([m4])
NGF_LIBRARY_NAME=libngf
NGF_MAJOR_VERSION=0
NGF_MINOR_VERSION=24
NGF_MICRO_VERSION=0
NGF_API_VERSION=1.0
AC_SUBST(NGF_API_VERSION)
NGF_LIBRARY_VERSION=1:1:1
AC_SUBST(NGF_LIBRARY_VERSION)
PACKAGE=$NGF_LIBRARY_NAME
AC_SUBST(NGF_LIBRARY_NAME)
NGF_VERSION=$NGF_MAJOR_VERSION.$NGF_MINOR_VERSION.$NGF_MICRO_VERSION
NGF_RELEASE=$NGF_MAJOR_VERSION.$NGF_MINOR_VERSION
AC_SUBST(NGF_VERSION)
AC_SUBST(NGF_RELEASE)
VERSION=$NGF_VERSION
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
AC_PROG_CC
AC_PROG_CXX
AM_PROG_CC_C_O
AM_PROG_LIBTOOL
AM_SANITY_CHECK
PKG_CHECK_MODULES(BASE, dbus-1)
AC_SUBST(BASE_LIBS)
AC_SUBST(BASE_CFLAGS)
PKG_CHECK_MODULES(GLIB, glib-2.0 dbus-glib-1)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_CFLAGS)
PKG_CHECK_MODULES(CHECK, check)
AC_SUBST(CHECK_LIBS)
AC_SUBST(CHECK_CFLAGS)
AC_ARG_ENABLE([coverage],
AS_HELP_STRING([--enable-coverage],[Enable coverage @<:@default=false@:>@]),
[case "${enableval}" in
yes) coverage=true ; CHECK_CFLAGS="${CHECK_CFLAGS} -fprofile-arcs -ftest-coverage" ; CHECK_LIBS="${CHECK_LIBS} -lgcov" ;;
no) coverage=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-coverage]) ;;
esac],
[coverage=false])
AM_CONDITIONAL([COVERAGE], [test x$coverage = xtrue])
AC_SUBST(CHECK_LIBS)
AC_SUBST(CHECK_CFLAGS)
pkgconfigdir="\$(libdir)/pkgconfig"
AC_SUBST(pkgconfigdir)
servicesdir="`pkg-config --variable=session_bus_services_dir dbus-1`"
AC_SUBST(servicesdir)
CFLAGS="${CFLAGS} -D_GNU_SOURCE"
AC_SUBST(CFLAGS)
echo "
== $PACKAGE $VERSION ==
Compiler: ${CC}
CFLAGS: ${CFLAGS}
Code coverage: ${coverage}
"
AC_OUTPUT(Makefile libngf0.pc libngf/Makefile examples/Makefile tests/Makefile)