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

parent fe40f64f
# Temporary files
*~
*.swp
# Compiled files
*.o
*.la
*.lo
auth-dialog/nm-l2tp-auth-dialog
src/nm-l2tp-service
# Generated
nm-l2tp-service.name
src/nm-l2tp-pppd-service-glue.h
# GNU Autotools
.deps
.libs
*.la
Makefile
Makefile.in*
configure
compile
config.*
aclocal.m4
autom4te.cache/
depcomp
compile
config.guess
config.h
config.h.in
config.h~
config.log
config.status
config.sub
configure
install-sh
intltool-extract.in
intltool-merge.in
intltool-update.in
libtool
ltmain.sh
m4/
Makefile
Makefile.in
missing
po/*.pot
po/Makefile.in.in
po/POTFILES
po/stamp-it
stamp-h1
#cdt files
.autotools
.cproject
.project
# gmo
*.gmo
mkinstalldirs
POTFILES
stamp-*
.deps
.libs
autom4te.cache
intltool-*
po/*.gmo
po/.intltool-merge-cache
m4/gtk-doc.m4
m4/intltool.m4
m4/libtool.m4
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
nm-l2tp-service.name: $(srcdir)/nm-l2tp-service.name.in
sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|g' $< >$@
DISTCHECK_CONFIGURE_FLAGS = --enable-more-warnings=yes
EXTRA_DIST = nm-l2tp-service.name.in \
$(dbusservice_DATA) \
$(desktopfile) \
......
......@@ -70,10 +70,10 @@ AC_SUBST(DBUS_GLIB_CFLAGS)
AC_SUBST(DBUS_GLIB_LIBS)
PKG_CHECK_MODULES(NM,
NetworkManager >= 0.9.0
libnm-util
libnm-glib
libnm-glib-vpn)
NetworkManager >= 0.9.4
libnm-util >= 0.9.4
libnm-glib >= 0.9.4
libnm-glib-vpn >= 0.9.4)
AC_SUBST(NM_CFLAGS)
AC_SUBST(NM_LIBS)
......@@ -102,6 +102,8 @@ if test x"$with_gnome" != xno; then
AC_SUBST(GNOMEKEYRING_LIBS)
fi
NM_COMPILER_WARNINGS
dnl
dnl Distribution version string
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