-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigure.ac
157 lines (134 loc) · 3.87 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
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
AC_PREREQ(2.52)
AC_INIT(NetworkManager-ipop, 0.1, [email protected], NetworkManager-ipop)
AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2])
AM_MAINTAINER_MODE
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
dnl
dnl Require programs
dnl
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LIBTOOL
dnl
dnl Required headers
dnl
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h syslog.h unistd.h)
dnl
dnl Checks for typedefs, structures, and compiler characteristics.
dnl
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_HEADER_TIME
dnl
dnl Checks for library functions.
dnl
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_CHECK_FUNCS(select socket uname)
dnl ensure that when the Automake generated makefile calls aclocal,
dnl it honours the $ACLOCAL_FLAGS environment variable
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
if test -n "$ac_macro_dir"; then
ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
fi
AC_SUBST([ACLOCAL_AMFLAGS])
dnl
dnl GNOME support
dnl
AC_ARG_WITH(gnome, AS_HELP_STRING([--without-gnome], [Build NetworkManager-ipop without GNOME support, e.g. vpn service only]))
AM_CONDITIONAL(WITH_GNOME, test x"$with_gnome" != xno)
GETTEXT_PACKAGE=NetworkManager-ipop
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
IT_PROG_INTLTOOL([0.35])
AM_GLIB_GNU_GETTEXT
PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
AC_SUBST(GTHREAD_CFLAGS)
AC_SUBST(GTHREAD_LIBS)
PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.74)
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
PKG_CHECK_MODULES(JSON, json-glib-1.0)
AC_SUBST(JSON_CFLAGS)
AC_SUBST(JSON_LIBS)
PKG_CHECK_MODULES(NM,
NetworkManager >= 0.9.6
libnm-util >= 0.9.6
libnm-glib >= 0.9.6
libnm-glib-vpn >= 0.9.6)
AC_SUBST(NM_CFLAGS)
AC_SUBST(NM_LIBS)
if test x"$with_gnome" != xno; then
AC_ARG_WITH([gtkver], AS_HELP_STRING([--with-gtkver], [The major version of GTK+ to build with]),
with_gtkver="$withval",with_gtkver=0)
gtk2_req=2.20
gtk3_req=2.91.4
case "${with_gtkver}" in
0) PKG_CHECK_MODULES(GTK, gtk+-3.0 > $gtk3_req, ,
[PKG_CHECK_MODULES(GTK, gtk+-2.0 > $gtk2_req)])
;;
2) PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $gtk2_req)
;;
3) PKG_CHECK_MODULES(GTK, gtk+-3.0 >= $gtk3_req)
;;
*) AC_MSG_ERROR(unknown GTK+ version $with_gtkver!)
;;
esac
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
PKG_CHECK_EXISTS([libsecret-1],
[
PKG_CHECK_MODULES([LIBSECRET], [libsecret-unstable])
AC_SUBST(LIBSECRET_CFLAGS)
AC_SUBST(LIBSECRET_LIBS)
AC_DEFINE_UNQUOTED([HAVE_LIBSECRET], "1", [Use libsecret])
],
[
PKG_CHECK_MODULES([GNOMEKEYRING], [gnome-keyring-1])
AC_SUBST(GNOMEKEYRING_CFLAGS)
AC_SUBST(GNOMEKEYRING_LIBS)
]
)
dnl maintainer mode stuff
if test $USE_MAINTAINER_MODE = yes; then
DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED"
else
DISABLE_DEPRECATED=""
fi
AC_SUBST(DISABLE_DEPRECATED)
fi
NM_COMPILER_WARNINGS
dnl
dnl Tests
dnl
AC_ARG_WITH(tests, AS_HELP_STRING([--with-tests], [Build NetworkManager tests]))
AM_CONDITIONAL(WITH_TESTS, test "x$with_tests" = "xyes")
case $with_tests in
yes)
with_tests=yes
;;
*)
with_tests=no
;;
esac
dnl
dnl Distribution version string
dnl
AC_ARG_WITH(dist-version, AS_HELP_STRING([--with-dist-version=<dist-version>], [Define the custom version (like distribution package name and revision)]), ac_distver=$withval, ac_distver="")
if ! test x"$ac_distver" = x""; then
AC_DEFINE_UNQUOTED(DIST_VERSION, "$ac_distver", [Define the distribution version string])
fi
AC_CONFIG_FILES([
Makefile
src/Makefile
common/Makefile
auth-dialog/Makefile
properties/Makefile
properties/tests/Makefile
properties/tests/conf/Makefile
po/Makefile.in
])
AC_OUTPUT