updated build system to newer autotool/gnome conventions
authorMartin Willi <martin@strongswan.org>
Tue, 19 May 2009 09:35:09 +0000 (11:35 +0200)
committerMartin Willi <martin@strongswan.org>
Tue, 19 May 2009 10:23:20 +0000 (12:23 +0200)
src/charon/plugins/nm/gnome/Makefile.am
src/charon/plugins/nm/gnome/auth-dialog/Makefile.am
src/charon/plugins/nm/gnome/config.h.in
src/charon/plugins/nm/gnome/configure.ac [new file with mode: 0644]
src/charon/plugins/nm/gnome/configure.in [deleted file]
src/charon/plugins/nm/gnome/m4/.gitignore [new file with mode: 0644]
src/charon/plugins/nm/gnome/m4/compiler_warnings.m4 [new file with mode: 0644]
src/charon/plugins/nm/gnome/properties/Makefile.am

index 62d28e4..fb29085 100644 (file)
@@ -12,13 +12,15 @@ nmvpnservice_DATA = nm-strongswan-service.name
 
 nm-strongswan-service.name: $(srcdir)/nm-strongswan-service.name.in
        sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|' \
-               -e 's|[@]CHARON[@]|$(charon)|' $< >$@
+           -e 's|[@]CHARON[@]|$(charon)|' $< >$@
 
 EXTRA_DIST = nm-strongswan-service.name.in \
-             $(dbusservice_DATA)  \
-             intltool-extract.in  \
-             intltool-merge.in    \
-             intltool-update.in
+    $(dbusservice_DATA)  \
+    intltool-extract.in  \
+    intltool-merge.in    \
+    intltool-update.in
 
 CLEANFILES = $(nmvpnservice_DATA) *~
 DISTCLEANFILES = intltool-extract intltool-merge intltool-update
+
+ACLOCAL_AMFLAGS = -I m4
index c951647..6722871 100644 (file)
@@ -10,7 +10,6 @@ nm_strongswan_auth_dialog_CPPFLAGS = \
        -DICONDIR=\""$(datadir)/pixmaps"\" \
        -DGLADEDIR=\""$(gladedir)"\" \
        -DBINDIR=\""$(bindir)"\" \
-       -DDBUS_API_SUBJECT_TO_CHANGE \
        -DG_DISABLE_DEPRECATED \
        -DGDK_DISABLE_DEPRECATED \
        -DGNOME_DISABLE_DEPRECATED \
index fa27ae9..5311bdd 100644 (file)
@@ -1,4 +1,4 @@
-/* config.h.in.  Generated from configure.in by autoheader.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
 
 /* always defined to indicate that i18n is enabled */
 #undef ENABLE_NLS
diff --git a/src/charon/plugins/nm/gnome/configure.ac b/src/charon/plugins/nm/gnome/configure.ac
new file mode 100644 (file)
index 0000000..df1c0ed
--- /dev/null
@@ -0,0 +1,98 @@
+AC_PREREQ(2.52)
+
+AC_INIT(NetworkManager-strongswan, 1.1.0, martin@strongswan.org, NetworkManager-strongswan)
+AM_INIT_AUTOMAKE([subdir-objects])
+AM_MAINTAINER_MODE
+
+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
+
+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)
+
+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)
+
+GETTEXT_PACKAGE=NetworkManager-strongswan
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
+
+IT_PROG_INTLTOOL([0.35])
+AM_GLIB_GNU_GETTEXT
+
+PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
+AC_SUBST(GTHREAD_CFLAGS)
+AC_SUBST(GTHREAD_LIBS)
+
+PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.30)
+AC_SUBST(DBUS_CFLAGS)
+AC_SUBST(DBUS_LIBS)
+
+if test x"$with_gnome" != xno; then
+       PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6)
+       AC_SUBST(GTK_CFLAGS)
+       AC_SUBST(GTK_LIBS)
+
+       PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0)
+       AC_SUBST(GDK_PIXBUF_CFLAGS)
+       AC_SUBST(GDK_PIXBUF_LIBS)
+
+       PKG_CHECK_MODULES(GLADE, libglade-2.0)
+       AC_SUBST(GLADE_CFLAGS)
+       AC_SUBST(GLADE_LIBS)
+
+       PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0)
+       AC_SUBST(LIBGNOMEUI_CFLAGS)
+       AC_SUBST(LIBGNOMEUI_LIBS)
+
+       PKG_CHECK_MODULES(GCONF, gconf-2.0)
+       AC_SUBST(GCONF_CFLAGS)
+       AC_SUBST(GCONF_LIBS)
+
+       PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1)
+       AC_SUBST(GNOMEKEYRING_CFLAGS)
+       AC_SUBST(GNOMEKEYRING_LIBS)
+fi
+
+PKG_CHECK_MODULES(NM_UTILS, NetworkManager >= 0.7.0 libnm-util libnm_glib libnm_glib_vpn)
+AC_SUBST(NM_UTILS_CFLAGS)
+AC_SUBST(NM_UTILS_LIBS)
+
+AC_ARG_WITH(
+       [charon],
+       AS_HELP_STRING([--with-charon=file],[path to the strongSwan IKEv2 daemon charon"]),
+       [AC_SUBST(charon, "$withval")],
+       [AC_SUBST(charon, "${libexecdir}/ipsec/charon")]
+)
+
+NM_COMPILER_WARNINGS
+
+AC_CONFIG_FILES([
+Makefile
+properties/Makefile
+auth-dialog/Makefile
+po/Makefile.in
+])
+AC_OUTPUT
diff --git a/src/charon/plugins/nm/gnome/configure.in b/src/charon/plugins/nm/gnome/configure.in
deleted file mode 100644 (file)
index 3e83c37..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-AC_PREREQ(2.52)
-
-AC_INIT(NetworkManager-strongswan, 1.1.0, martin@strongswan.org, NetworkManager-strongswan)
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE([subdir-objects])
-AM_MAINTAINER_MODE
-
-AM_CONFIG_HEADER(config.h)
-
-dnl
-dnl Require programs
-dnl
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_INSTALL
-AC_PROG_LIBTOOL
-
-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)
-
-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)
-
-GETTEXT_PACKAGE=NetworkManager-strongswan
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
-
-IT_PROG_INTLTOOL([0.35])
-AM_GLIB_GNU_GETTEXT
-
-PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
-AC_SUBST(GTHREAD_CFLAGS)
-AC_SUBST(GTHREAD_LIBS)
-
-PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.30)
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
-
-if test x"$with_gnome" != xno; then
-       PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6)
-       AC_SUBST(GTK_CFLAGS)
-       AC_SUBST(GTK_LIBS)
-
-       PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0)
-       AC_SUBST(GDK_PIXBUF_CFLAGS)
-       AC_SUBST(GDK_PIXBUF_LIBS)
-
-       PKG_CHECK_MODULES(GLADE, libglade-2.0)
-       AC_SUBST(GLADE_CFLAGS)
-       AC_SUBST(GLADE_LIBS)
-
-       PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0)
-       AC_SUBST(LIBGNOMEUI_CFLAGS)
-       AC_SUBST(LIBGNOMEUI_LIBS)
-
-       PKG_CHECK_MODULES(GCONF, gconf-2.0)
-       AC_SUBST(GCONF_CFLAGS)
-       AC_SUBST(GCONF_LIBS)
-
-       PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1)
-       AC_SUBST(GNOMEKEYRING_CFLAGS)
-       AC_SUBST(GNOMEKEYRING_LIBS)
-fi
-
-PKG_CHECK_MODULES(NM_UTILS, NetworkManager >= 0.7.0 libnm-util libnm_glib libnm_glib_vpn)
-AC_SUBST(NM_UTILS_CFLAGS)
-AC_SUBST(NM_UTILS_LIBS)
-
-AC_ARG_WITH(
-       [charon],
-       AS_HELP_STRING([--with-charon=file],[path to the strongSwan IKEv2 daemon charon"]),
-       [AC_SUBST(charon, "$withval")],
-       [AC_SUBST(charon, "${libexecdir}/ipsec/charon")]
-)
-
-AC_ARG_ENABLE(more-warnings,
-AC_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]),
-set_more_warnings="$enableval",[
-if test -d "$srcdir/{arch}" || test -d "$srcdir/CVS"; then
-       set_more_warnings=yes
-else
-       set_more_warnings=no
-fi
-])
-AC_MSG_CHECKING(for more warnings, including -Werror)
-if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
-       AC_MSG_RESULT(yes)
-       CFLAGS="-Wall -Werror -std=gnu89 $CFLAGS"
-
-       for option in -Wno-unused -Wno-strict-aliasing -Wno-sign-compare -Wdeclaration-after-statement -Wno-pointer-sign ; do
-               SAVE_CFLAGS="$CFLAGS"
-               CFLAGS="$CFLAGS $option"
-               AC_MSG_CHECKING([whether gcc understands $option])
-               AC_TRY_COMPILE([], [],
-                       has_option=yes,
-                       has_option=no,)
-               if test $has_option = no; then
-                       CFLAGS="$SAVE_CFLAGS"
-               fi
-               AC_MSG_RESULT($has_option)
-               unset has_option
-               unset SAVE_CFLAGS
-       done
-       unset option
-else
-       AC_MSG_RESULT(no)
-fi
-
-AC_OUTPUT([
-Makefile
-properties/Makefile
-auth-dialog/Makefile
-po/Makefile.in
-])
diff --git a/src/charon/plugins/nm/gnome/m4/.gitignore b/src/charon/plugins/nm/gnome/m4/.gitignore
new file mode 100644 (file)
index 0000000..3d067d0
--- /dev/null
@@ -0,0 +1,7 @@
+intltool.m4
+libtool.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+lt~obsolete.m4
+
diff --git a/src/charon/plugins/nm/gnome/m4/compiler_warnings.m4 b/src/charon/plugins/nm/gnome/m4/compiler_warnings.m4
new file mode 100644 (file)
index 0000000..6cea2f7
--- /dev/null
@@ -0,0 +1,31 @@
+AC_DEFUN([NM_COMPILER_WARNINGS],
+[AC_ARG_ENABLE(more-warnings,
+       AS_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]),
+       set_more_warnings="$enableval",set_more_warnings=yes)
+AC_MSG_CHECKING(for more warnings, including -Werror)
+if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
+       AC_MSG_RESULT(yes)
+       CFLAGS="-Wall -Werror -std=gnu89 $CFLAGS"
+
+       for option in -Wshadow -Wmissing-declarations -Wmissing-prototypes \
+                     -Wdeclaration-after-statement -Wstrict-prototypes \
+                     -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare \
+                     -fno-strict-aliasing; do
+               SAVE_CFLAGS="$CFLAGS"
+               CFLAGS="$CFLAGS $option"
+               AC_MSG_CHECKING([whether gcc understands $option])
+               AC_TRY_COMPILE([], [],
+                       has_option=yes,
+                       has_option=no,)
+               if test $has_option = no; then
+                       CFLAGS="$SAVE_CFLAGS"
+               fi
+               AC_MSG_RESULT($has_option)
+               unset has_option
+               unset SAVE_CFLAGS
+       done
+       unset option
+else
+       AC_MSG_RESULT(no)
+fi
+])
index acbab63..3db7c22 100644 (file)
@@ -2,37 +2,36 @@ plugindir = $(libdir)/NetworkManager
 plugin_LTLIBRARIES = libnm-strongswan-properties.la
 
 libnm_strongswan_properties_la_SOURCES = \
-       nm-strongswan.c \
-       nm-strongswan.h
+    nm-strongswan.c \
+    nm-strongswan.h
 
 gladedir = $(datadir)/gnome-vpn-properties/strongswan
 glade_DATA = nm-strongswan-dialog.glade
 
-libnm_strongswan_properties_la_CFLAGS =                          \
-        $(GLADE_CFLAGS)                                 \
-        $(GTK_CFLAGS)                                   \
-        $(GCONF_CFLAGS)                                 \
-        $(LIBGNOMEUI_CFLAGS)                            \
-        $(NM_UTILS_CFLAGS)                              \
-        -DICONDIR=\""$(datadir)/pixmaps"\"              \
-        -DGLADEDIR=\""$(gladedir)"\"                    \
-        -DG_DISABLE_DEPRECATED                          \
-        -DGDK_DISABLE_DEPRECATED                        \
-        -DGNOME_DISABLE_DEPRECATED                      \
-        -DGNOMELOCALEDIR=\"$(datadir)/locale\"         \
-        -DVERSION=\"$(VERSION)\"
+libnm_strongswan_properties_la_CFLAGS =      \
+    $(GLADE_CFLAGS)                          \
+    $(GTK_CFLAGS)                            \
+    $(GCONF_CFLAGS)                          \
+    $(LIBGNOMEUI_CFLAGS)                     \
+    $(NM_UTILS_CFLAGS)                       \
+    -DICONDIR=\""$(datadir)/pixmaps"\"       \
+    -DGLADEDIR=\""$(gladedir)"\"             \
+    -DG_DISABLE_DEPRECATED                   \
+    -DGDK_DISABLE_DEPRECATED                 \
+    -DGNOME_DISABLE_DEPRECATED               \
+    -DGNOMELOCALEDIR=\"$(datadir)/locale\"   \
+    -DVERSION=\"$(VERSION)\"
 
-libnm_strongswan_properties_la_LIBADD = \
-        $(GLADE_LIBS) \
-        $(GTK_LIBS) \
-        $(GCONF_LIBS) \
-        $(LIBGNOMEUI_LIBS) \
-        $(NM_UTILS_LIBS)
+libnm_strongswan_properties_la_LIBADD =      \
+    $(GLADE_LIBS) \
+    $(GTK_LIBS) \
+    $(GCONF_LIBS) \
+    $(LIBGNOMEUI_LIBS) \
+    $(NM_UTILS_LIBS)
 
-libnm_strongswan_properties_la_LDFLAGS =      \
-        -avoid-version
+libnm_strongswan_properties_la_LDFLAGS =     \
+    -avoid-version
 
 CLEANFILES = *.bak *.gladep *~
 
-EXTRA_DIST =                            \
-        $(glade_DATA)
+EXTRA_DIST = $(glade_DATA)