be348b381b6c95a571091035c0202101a10092b6
[strongswan.git] / src / frontends / gnome / configure.ac
1 AC_PREREQ(2.52)
2
3 AC_INIT(NetworkManager-strongswan, 1.4.1, martin@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 PKG_CHECK_MODULES(LIBNM_GLIB, NetworkManager >= 1.1.0 libnm-util libnm-glib libnm-glib-vpn)
50 PKG_CHECK_MODULES(LIBNM_GTK, libnm-gtk >= 1.1.0)
51 PKG_CHECK_MODULES(LIBNMA, libnma >= 1.1.0)
52
53 PKG_CHECK_MODULES(LIBNM, libnm >= 1.1.0)
54 LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2"
55 LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2"
56
57 AC_ARG_WITH(
58         [charon],
59         AS_HELP_STRING([--with-charon=file],[path to the strongSwan charon NetworkManager backend"]),
60         [AC_SUBST(charon, "$withval")],
61         [AC_SUBST(charon, "${libexecdir}/ipsec/charon-nm")]
62 )
63 AC_ARG_ENABLE(
64         [nm-absolute-paths],
65         AS_HELP_STRING([--enable-nm-absolute-paths],[use absolute paths for NM plugins in the .name file])
66 )
67
68 nm_libexecdir=$($PKG_CONFIG --variable=libgnome_serverdir NetworkManager)
69 AC_SUBST(nm_libexecdir)
70 nm_plugindir=$($PKG_CONFIG --variable=plugindir NetworkManager)
71 AC_SUBST(nm_plugindir)
72 test x"$enable_nm_absolute_paths" = x"yes" && nm_plugindir_abs="$(nm_plugindir)/"
73 AC_SUBST(nm_plugindir_abs)
74
75 NM_COMPILER_WARNINGS
76
77 AC_CONFIG_FILES([
78 Makefile
79 properties/Makefile
80 auth-dialog/Makefile
81 po/Makefile.in
82 ])
83 AC_OUTPUT