forked from NetworkManager/NetworkManager-fortisslvpn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
176 lines (146 loc) · 5.35 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
AC_PREREQ(2.59)
AC_INIT(NetworkManager-fortisslvpn,
1.3.90,
https://gitlab.gnome.org/GNOME/NetworkManager-fortisslvpn/issues,
NetworkManager-fortisslvpn)
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-xz -Wno-portability])
AM_MAINTAINER_MODE
AM_SILENT_RULES([yes])
AC_USE_SYSTEM_EXTENSIONS
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
AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
AC_GNU_SOURCE
AC_CHECK_PROG([has_file], file, yes, no)
if test x$has_file = xno ; then
AC_MSG_ERROR(["file" utility not found.])
fi
AC_CHECK_PROG([has_find], find, yes, no)
if test x$has_find = xno ; then
AC_MSG_ERROR(["find" utility not found.])
fi
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)
AC_CHECK_HEADERS(pppd/pppd.h,,
AC_MSG_ERROR(couldn't find pppd.h. pppd development headers are required.))
AC_ARG_WITH([pppd-plugin-dir], AS_HELP_STRING([--with-pppd-plugin-dir=DIR], [path to the pppd plugins directory]))
if test -n "$with_pppd_plugin_dir" ; then
PPPD_PLUGIN_DIR="$with_pppd_plugin_dir"
else
PPPD_PLUGIN_DIR="${libdir}/pppd/2.4.5"
fi
AC_SUBST(PPPD_PLUGIN_DIR)
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)
GIT_SHA_RECORD(NM_GIT_SHA)
AC_SEARCH_LIBS([dlopen], [dl dld], [], [ac_cv_search_dlopen=])
AC_SUBST([DL_LIBS], "$ac_cv_search_dlopen")
dnl
dnl GNOME support
dnl
AC_ARG_WITH(gnome, AS_HELP_STRING([--without-gnome], [Build NetworkManager-fortisslvpn without GNOME support, e.g. vpn service only]), [], [with_gnome_specified=no])
AC_ARG_WITH(libnm-glib, AS_HELP_STRING([--with-libnm-glib], [Build NetworkManager-fortisslvpn with libnm-glib comatibility (depreacted)]), [], [with_libnm_glib_specified=no])
if test "$with_libnm_glib_specified" != no -a "$with_libnm_glib" != no; then
if test "$with_gnome_specified" != no -a "$with_gnome" == no; then
AC_MSG_ERROR(Building --with-libnm-glib conflicts with --without-gnome)
fi
fi
if test "$with_gnome" != no; then
with_gnome=yes
fi
if test "$with_libnm_glib_specified" == no; then
with_libnm_glib=no
fi
if test "$with_libnm_glib" != yes; then
with_libnm_glib=no
fi
AM_CONDITIONAL(WITH_GNOME, test "$with_gnome" != no)
AM_CONDITIONAL(WITH_LIBNM_GLIB, test "$with_libnm_glib" != no)
AC_ARG_ENABLE(absolute-paths, AS_HELP_STRING([--enable-absolute-paths], [Use absolute paths to in .name files. Useful for development. (default is no)]))
GETTEXT_PACKAGE=NetworkManager-fortisslvpn
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19])
# gio-unix will require glib and gio
PKG_CHECK_MODULES(GLIB, gio-unix-2.0 >= 2.32)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32"
GLIB_CFLAGS="$GLIB_CFLAGS -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32"
if test x"$with_gnome" != xno; then
PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.4)
GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_4"
GTK_CFLAGS="$GTK_CFLAGS -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4"
PKG_CHECK_MODULES(LIBNMA, libnma >= 1.2.0)
PKG_CHECK_MODULES(LIBSECRET, libsecret-1 >= 0.18, [], [
dnl We use the secret service API that went stable in 0.18
PKG_CHECK_MODULES(LIBSECRET, libsecret-unstable)
LIBSECRET_CFLAGS="$LIBSECRET_CFLAGS -DSECRET_API_SUBJECT_TO_CHANGE"
])
if test x"$with_libnm_glib" != xno; then
PKG_CHECK_MODULES(LIBNM_GTK, libnm-gtk >= 1.2.0)
PKG_CHECK_MODULES(LIBNM_GLIB,
NetworkManager >= 1.2.0
libnm-util >= 1.2.0
libnm-glib >= 1.2.0
libnm-glib-vpn >= 1.2.0)
LIBNM_GLIB_CFLAGS="$LIBNM_GLIB_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2"
LIBNM_GLIB_CFLAGS="$LIBNM_GLIB_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2"
fi
fi
PKG_CHECK_MODULES(LIBNM, libnm >= 1.2.0)
LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2"
LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2"
NM_VPN_SERVICE_DIR=`$PKG_CONFIG --define-variable prefix='\${prefix}' --variable vpnservicedir libnm`
AC_SUBST(NM_VPN_SERVICE_DIR)
NM_COMPILER_WARNINGS([yes])
NM_PLUGIN_DIR="$libdir/NetworkManager"
AC_SUBST(NM_PLUGIN_DIR)
if test x"$enable_absolute_paths" == x"yes"; then
NM_PLUGIN_DIR_NAME_FILE="$NM_PLUGIN_DIR/"
else
enable_absolute_paths=no
NM_PLUGIN_DIR_NAME_FILE=""
fi
AC_SUBST(NM_PLUGIN_DIR_NAME_FILE)
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
po/Makefile.in
])
AC_OUTPUT
echo ""
echo "Build configuration: "
echo " --with-dist-version=$ac_distver"
echo " --with-gnome=$with_gnome"
echo " --with-libnm-glib=$with_libnm_glib"
echo " --with-pppd-plugin-dir=$PPPD_PLUGIN_DIR"
echo " --enable-absolute-paths=$enable_absolute_paths"
echo " --enable-more-warnings=$set_more_warnings"