use a slightly adopted package versioning scheme
[strongswan.git] / src / charon / plugins / nm / gnome / configure.in
1 AC_PREREQ(2.52)
2
3 AC_INIT(NetworkManager-strongswan, 1.0.0, martin@strongswan.org, NetworkManager-strongswan)
4 AC_CONFIG_AUX_DIR(.)
5 AM_INIT_AUTOMAKE([subdir-objects])
6 AM_MAINTAINER_MODE
7
8 AM_CONFIG_HEADER(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
18 dnl
19 dnl Required headers
20 dnl
21 AC_HEADER_STDC
22 AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h syslog.h unistd.h)
23
24 dnl
25 dnl Checks for typedefs, structures, and compiler characteristics.
26 dnl
27 AC_TYPE_MODE_T
28 AC_TYPE_PID_T
29 AC_HEADER_TIME
30
31 dnl
32 dnl Checks for library functions.
33 dnl
34 AC_PROG_GCC_TRADITIONAL
35 AC_FUNC_MEMCMP
36 AC_CHECK_FUNCS(select socket uname)
37
38 GETTEXT_PACKAGE=NetworkManager-strongswan
39 AC_SUBST(GETTEXT_PACKAGE)
40 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
41
42 IT_PROG_INTLTOOL([0.35])
43 AM_GLIB_GNU_GETTEXT
44
45 PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
46 AC_SUBST(GTHREAD_CFLAGS)
47 AC_SUBST(GTHREAD_LIBS)
48
49 PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.30)
50 AC_SUBST(DBUS_CFLAGS)
51 AC_SUBST(DBUS_LIBS)
52
53 if test x"$with_gnome" != xno; then
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(GDK_PIXBUF, gdk-pixbuf-2.0)
59         AC_SUBST(GDK_PIXBUF_CFLAGS)
60         AC_SUBST(GDK_PIXBUF_LIBS)
61
62         PKG_CHECK_MODULES(GLADE, libglade-2.0)
63         AC_SUBST(GLADE_CFLAGS)
64         AC_SUBST(GLADE_LIBS)
65
66         PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0)
67         AC_SUBST(LIBGNOMEUI_CFLAGS)
68         AC_SUBST(LIBGNOMEUI_LIBS)
69
70         PKG_CHECK_MODULES(GCONF, gconf-2.0)
71         AC_SUBST(GCONF_CFLAGS)
72         AC_SUBST(GCONF_LIBS)
73
74         PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1)
75         AC_SUBST(GNOMEKEYRING_CFLAGS)
76         AC_SUBST(GNOMEKEYRING_LIBS)
77 fi
78
79 PKG_CHECK_MODULES(NM_UTILS, NetworkManager >= 0.7.0 libnm-util libnm_glib libnm_glib_vpn)
80 AC_SUBST(NM_UTILS_CFLAGS)
81 AC_SUBST(NM_UTILS_LIBS)
82
83 AC_ARG_WITH(
84         [charon],
85         AS_HELP_STRING([--with-charon=file],[path to the strongSwan IKEv2 daemon charon"]),
86         [AC_SUBST(charon, "$withval")],
87         [AC_SUBST(charon, "${libexecdir}/ipsec/charon")]
88 )
89
90 AC_ARG_ENABLE(more-warnings,
91 AC_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]),
92 set_more_warnings="$enableval",[
93 if test -d "$srcdir/{arch}" || test -d "$srcdir/CVS"; then
94         set_more_warnings=yes
95 else
96         set_more_warnings=no
97 fi
98 ])
99 AC_MSG_CHECKING(for more warnings, including -Werror)
100 if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
101         AC_MSG_RESULT(yes)
102         CFLAGS="-Wall -Werror -std=gnu89 $CFLAGS"
103
104         for option in -Wno-unused -Wno-strict-aliasing -Wno-sign-compare -Wdeclaration-after-statement -Wno-pointer-sign ; do
105                 SAVE_CFLAGS="$CFLAGS"
106                 CFLAGS="$CFLAGS $option"
107                 AC_MSG_CHECKING([whether gcc understands $option])
108                 AC_TRY_COMPILE([], [],
109                         has_option=yes,
110                         has_option=no,)
111                 if test $has_option = no; then
112                         CFLAGS="$SAVE_CFLAGS"
113                 fi
114                 AC_MSG_RESULT($has_option)
115                 unset has_option
116                 unset SAVE_CFLAGS
117         done
118         unset option
119 else
120         AC_MSG_RESULT(no)
121 fi
122
123 AC_OUTPUT([
124 Makefile
125 properties/Makefile
126 auth-dialog/Makefile
127 po/Makefile.in
128 ])