updated build system to newer autotool/gnome conventions

This commit is contained in:
Martin Willi 2009-05-19 11:35:09 +02:00
parent 7de1884270
commit 9e2d7f962f
7 changed files with 75 additions and 67 deletions

View 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

View 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 \

View 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

View File

@ -1,11 +1,11 @@
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)
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
dnl
dnl Require programs
@ -87,42 +87,12 @@ AC_ARG_WITH(
[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"
NM_COMPILER_WARNINGS
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([
AC_CONFIG_FILES([
Makefile
properties/Makefile
auth-dialog/Makefile
po/Makefile.in
])
AC_OUTPUT

View File

@ -0,0 +1,7 @@
intltool.m4
libtool.m4
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4

View File

@ -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
])

View 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)