sec-updater: Use latest versions
[strongswan.git] / src / frontends / gnome / configure.ac
1 AC_PREREQ(2.52)
2
3 AC_INIT(NetworkManager-strongswan, 1.5.2, info@strongswan.org, NetworkManager-strongswan)
4 AM_INIT_AUTOMAKE([subdir-objects])
5 AM_MAINTAINER_MODE
6
7 AC_CONFIG_MACRO_DIR([m4])
8 AC_CONFIG_HEADERS([config.h])
9
10 dnl
11 dnl Require programs
12 dnl
13 AC_PROG_CC
14 AM_PROG_CC_C_O
15 AC_PROG_INSTALL
16 AC_PROG_LIBTOOL
17 PKG_PROG_PKG_CONFIG
18
19 dnl
20 dnl Required headers
21 dnl
22 AC_HEADER_STDC
23 AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h syslog.h unistd.h)
24
25 dnl
26 dnl Checks for typedefs, structures, and compiler characteristics.
27 dnl
28 AC_TYPE_MODE_T
29 AC_TYPE_PID_T
30 AC_HEADER_TIME
31
32 dnl
33 dnl Checks for library functions.
34 dnl
35 AC_PROG_GCC_TRADITIONAL
36 AC_FUNC_MEMCMP
37 AC_CHECK_FUNCS(select socket uname)
38
39 GETTEXT_PACKAGE=NetworkManager-strongswan
40 AC_SUBST(GETTEXT_PACKAGE)
41 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
42
43 IT_PROG_INTLTOOL([0.35])
44 AM_GLIB_GNU_GETTEXT
45
46 PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.0)
47 PKG_CHECK_MODULES(LIBSECRET, libsecret-1)
48
49 AC_ARG_WITH(
50         [charon],
51         AS_HELP_STRING([--with-charon=file],[path to the strongSwan charon NetworkManager backend]),
52         [AC_SUBST(charon, "$withval")],
53         [AC_SUBST(charon, "${libexecdir}/ipsec/charon-nm")]
54 )
55 AC_ARG_WITH(
56         [nm-libexecdir],
57         AS_HELP_STRING([--nm-libexecdir=path],[use custom path where the auth dialog is installed]),
58         [nm_libexecdir="$withval"], []
59 )
60 AC_ARG_WITH(
61         [nm-plugindir],
62         AS_HELP_STRING([--nm-plugindir=path],[use custom path where the NM plugin is installed]),
63         [nm_plugindir="$withval"], []
64 )
65 AC_ARG_ENABLE(
66         [nm-absolute-paths],
67         AS_HELP_STRING([--enable-nm-absolute-paths],[use absolute paths for NM plugins in the .name file])
68 )
69 AC_ARG_WITH(
70         [libnm-glib],
71         AS_HELP_STRING([--without-libnm-glib], [build NetworkManager-strongswan without libnm-glib compatibility]),
72         [with_libnm_glib=no],
73         [with_libnm_glib=yes]
74 )
75
76 AM_CONDITIONAL(WITH_LIBNM_GLIB, test "$with_libnm_glib" != no)
77
78 PKG_CHECK_MODULES(LIBNM, libnm >= 1.1.0)
79 LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2"
80 LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2"
81 PKG_CHECK_MODULES(LIBNMA, libnma >= 1.1.0)
82
83 if test x"$with_libnm_glib" != xno; then
84         PKG_CHECK_MODULES(LIBNM_GLIB, NetworkManager >= 1.1.0 libnm-util libnm-glib libnm-glib-vpn)
85         PKG_CHECK_MODULES(LIBNM_GTK, libnm-gtk >= 1.1.0)
86         if test -z "$nm_libexecdir"; then
87                 nm_libexecdir=$($PKG_CONFIG --variable=libgnome_serverdir NetworkManager)
88         fi
89         if test -z "$nm_plugindir"; then
90                 nm_plugindir=$($PKG_CONFIG --variable=plugindir NetworkManager)
91         fi
92 else
93         if test -z "$nm_libexecdir"; then
94                 nm_libexecdir=$($PKG_CONFIG --variable=exec_prefix libnm)/lib/NetworkManager
95         fi
96         if test -z "$nm_plugindir"; then
97                 nm_plugindir=$($PKG_CONFIG --variable=libdir libnm)/NetworkManager
98         fi
99 fi
100
101 AC_SUBST(nm_libexecdir)
102 AC_SUBST(nm_plugindir)
103 test x"$enable_nm_absolute_paths" = x"yes" && nm_plugindir_abs="$(nm_plugindir)/"
104 AC_SUBST(nm_plugindir_abs)
105
106 nmvpnservicedir=$($PKG_CONFIG --variable=vpnservicedir libnm)
107 AC_SUBST(nmvpnservicedir)
108
109 NM_COMPILER_WARNINGS
110
111 AC_CONFIG_FILES([
112 Makefile
113 properties/Makefile
114 auth-dialog/Makefile
115 po/Makefile.in
116 ])
117 AC_OUTPUT