nm: Automatically determine path to the auth dialog
[strongswan.git] / src / frontends / gnome / configure.ac
1 AC_PREREQ(2.52)
2
3 AC_INIT(NetworkManager-strongswan, 1.3.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(GTHREAD, gthread-2.0)
47 AC_SUBST(GTHREAD_CFLAGS)
48 AC_SUBST(GTHREAD_LIBS)
49
50 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.30)
51 AC_SUBST(DBUS_CFLAGS)
52 AC_SUBST(DBUS_LIBS)
53
54 PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6)
55 AC_SUBST(GTK_CFLAGS)
56 AC_SUBST(GTK_LIBS)
57
58 PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0)
59 AC_SUBST(LIBGNOMEUI_CFLAGS)
60 AC_SUBST(LIBGNOMEUI_LIBS)
61
62 PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1)
63 AC_SUBST(GNOMEKEYRING_CFLAGS)
64 AC_SUBST(GNOMEKEYRING_LIBS)
65
66 PKG_CHECK_EXISTS([libnm-glib],
67         [PKG_CHECK_MODULES(NM_UTILS, NetworkManager >= 0.9.0 libnm-util libnm-glib libnm-glib-vpn)],
68         [PKG_CHECK_MODULES(NM_UTILS, NetworkManager >= 0.9.0 libnm-util libnm_glib libnm_glib_vpn)]
69 )
70 AC_SUBST(NM_UTILS_CFLAGS)
71 AC_SUBST(NM_UTILS_LIBS)
72
73 AC_ARG_WITH(
74         [charon],
75         AS_HELP_STRING([--with-charon=file],[path to the strongSwan charon NetworkManager backend"]),
76         [AC_SUBST(charon, "$withval")],
77         [AC_SUBST(charon, "${libexecdir}/ipsec/charon-nm")]
78 )
79 nm_libexecdir=$($PKG_CONFIG --variable=libgnome_serverdir NetworkManager)
80 AC_SUBST(nm_libexecdir)
81
82 NM_COMPILER_WARNINGS
83
84 AC_CONFIG_FILES([
85 Makefile
86 properties/Makefile
87 auth-dialog/Makefile
88 po/Makefile.in
89 ])
90 AC_OUTPUT