build: copied some updates frop pptp plugin (build-time warnings & error options)

parent fe40f64f
# Temporary files
*~ *~
*.swp
# Compiled files
*.o *.o
*.la
*.lo *.lo
auth-dialog/nm-l2tp-auth-dialog *.la
src/nm-l2tp-service Makefile
Makefile.in*
# Generated configure
nm-l2tp-service.name compile
src/nm-l2tp-pppd-service-glue.h config.*
# GNU Autotools
.deps
.libs
aclocal.m4 aclocal.m4
autom4te.cache/
depcomp depcomp
compile
config.guess
config.h
config.h.in
config.h~
config.log
config.status
config.sub
configure
install-sh install-sh
intltool-extract.in
intltool-merge.in
intltool-update.in
libtool libtool
ltmain.sh ltmain.sh
m4/
Makefile
Makefile.in
missing missing
po/*.pot mkinstalldirs
po/Makefile.in.in POTFILES
po/POTFILES stamp-*
po/stamp-it .deps
stamp-h1 .libs
autom4te.cache
#cdt files intltool-*
.autotools po/*.gmo
.cproject po/.intltool-merge-cache
.project m4/gtk-doc.m4
m4/intltool.m4
# gmo m4/libtool.m4
*.gmo m4/lt*.m4
auth-dialog/nm-l2tp-auth-dialog
nm-l2tp-service.name
nm-l2tp.desktop
src/nm-l2tp-pppd-service-glue.h
src/nm-l2tp-service
...@@ -29,6 +29,8 @@ endif ...@@ -29,6 +29,8 @@ endif
nm-l2tp-service.name: $(srcdir)/nm-l2tp-service.name.in nm-l2tp-service.name: $(srcdir)/nm-l2tp-service.name.in
sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|g' $< >$@ sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|g' $< >$@
DISTCHECK_CONFIGURE_FLAGS = --enable-more-warnings=yes
EXTRA_DIST = nm-l2tp-service.name.in \ EXTRA_DIST = nm-l2tp-service.name.in \
$(dbusservice_DATA) \ $(dbusservice_DATA) \
$(desktopfile) \ $(desktopfile) \
......
...@@ -70,10 +70,10 @@ AC_SUBST(DBUS_GLIB_CFLAGS) ...@@ -70,10 +70,10 @@ AC_SUBST(DBUS_GLIB_CFLAGS)
AC_SUBST(DBUS_GLIB_LIBS) AC_SUBST(DBUS_GLIB_LIBS)
PKG_CHECK_MODULES(NM, PKG_CHECK_MODULES(NM,
NetworkManager >= 0.9.0 NetworkManager >= 0.9.4
libnm-util libnm-util >= 0.9.4
libnm-glib libnm-glib >= 0.9.4
libnm-glib-vpn) libnm-glib-vpn >= 0.9.4)
AC_SUBST(NM_CFLAGS) AC_SUBST(NM_CFLAGS)
AC_SUBST(NM_LIBS) AC_SUBST(NM_LIBS)
...@@ -102,6 +102,8 @@ if test x"$with_gnome" != xno; then ...@@ -102,6 +102,8 @@ if test x"$with_gnome" != xno; then
AC_SUBST(GNOMEKEYRING_LIBS) AC_SUBST(GNOMEKEYRING_LIBS)
fi fi
NM_COMPILER_WARNINGS
dnl dnl
dnl Distribution version string dnl Distribution version string
dnl dnl
......
AC_DEFUN([NM_COMPILER_WARNINGS],
[AC_ARG_ENABLE(more-warnings,
AS_HELP_STRING([--enable-more-warnings], [Possible values: no/yes/error]),
set_more_warnings="$enableval",set_more_warnings=error)
AC_MSG_CHECKING(for more warnings)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
AC_MSG_RESULT(yes)
CFLAGS="-Wall -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 -Wno-unused-but-set-variable; 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
if test "x$set_more_warnings" = xerror; then
CFLAGS="$CFLAGS -Werror"
fi
else
AC_MSG_RESULT(no)
fi
])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment