summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-11-10 21:06:12 +0100
committerSimon Josefsson <simon@josefsson.org>2008-11-10 21:06:12 +0100
commit62fac578a9f3327e0fbc650b39a0b5fd4074c9bd (patch)
treecd9df09b6fa97c0607851fa420c1c90dd53acebf
parent81d83236e9a5ae5d10392be6c780f574aa247aa1 (diff)
downloadlibtasn1-62fac578a9f3327e0fbc650b39a0b5fd4074c9bd.tar.gz
libtasn1-62fac578a9f3327e0fbc650b39a0b5fd4074c9bd.tar.bz2
libtasn1-62fac578a9f3327e0fbc650b39a0b5fd4074c9bd.zip
Use gnulib warnings module.
-rw-r--r--Makefile.am3
-rw-r--r--configure.in25
-rw-r--r--examples/Makefile.am1
-rw-r--r--gl/Makefile.am2
-rw-r--r--gl/m4/gnulib-cache.m43
-rw-r--r--gl/m4/gnulib-comp.m42
6 files changed, 13 insertions, 23 deletions
diff --git a/Makefile.am b/Makefile.am
index 7b4b7b5..435e896 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,8 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc \
- WARN_CFLAGS="-Wall -Werror"
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
EXTRA_DIST = windows/asn1-parser/asn1-parser.vcproj \
windows/asn1-parser/config.h windows/libtasn1.ncb \
diff --git a/configure.in b/configure.in
index 691677a..d64e940 100644
--- a/configure.in
+++ b/configure.in
@@ -48,19 +48,6 @@ AM_PROG_LIBTOOL
AC_MSG_NOTICE([Detecting compiler options])
AC_C_CONST
-if test "$GCC" = "yes"; then
- CFLAGS="${CFLAGS} -Wall -Wpointer-arith -Wstrict-prototypes"
-
- AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign])
- _gcc_cflags_save="$CFLAGS"
- CFLAGS="${CFLAGS} -Wno-pointer-sign"
- AC_COMPILE_IFELSE(AC_LANG_PROGRAM([]), _gcc_psign=yes, _gcc_psign=no)
- AC_MSG_RESULT($_gcc_psign)
- if test "$_gcc_psign" != "yes"; then
- CFLAGS="$_gcc_cflags_save"
- fi
-fi
-
AC_MSG_NOTICE([Detecting system's parameters])
# Run self-tests under valgrind?
@@ -112,16 +99,16 @@ elif ! mv fixhdr.tmp $srcdir/lib/libtasn1.h; then
AC_MSG_ERROR([[*** Failed to move fixhdr.tmp to lib/libtasn1.h...]])
fi
-# Make it possible to pass -Werror when building relevant parts of
-# the library. Normally, -Werror breaks when running autoconf tests.
-AC_ARG_VAR(WARN_CFLAGS, [Flags to enable compiler warnings])
-AC_MSG_CHECKING([what compiler warning flags we will use])
-AC_MSG_RESULT($WARN_CFLAGS)
-
# For gnulib compatibility modules in gl/.
AC_MSG_NOTICE([Running gnulib checks])
gl_INIT
+gl_WARN_ADD([-Wall])
+gl_WARN_ADD([-Wpointer-arith])
+gl_WARN_ADD([-Wstrict-prototypes])
+gl_WARN_ADD([-Wno-pointer-sign])
+gl_WARN_ADD([-Werror])
+
AC_CONFIG_FILES([ \
Makefile \
gl/Makefile \
diff --git a/examples/Makefile.am b/examples/Makefile.am
index ea9a040..40d78c2 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -16,6 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+AM_CFLAGS = $(WARN_CFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_builddir)/gl
EXTRA_DIST = asn1Coding_test.asn asn1Coding_test.asg
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 0915eb1..ccd2580 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files autobuild fdl-1.3 gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile pmccabe2html progname read-file stdint version-etc-fsf
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files autobuild fdl-1.3 gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile pmccabe2html progname read-file stdint version-etc-fsf warnings
AUTOMAKE_OPTIONS = 1.5 gnits
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 9844b0b..89185b6 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files autobuild fdl-1.3 gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile pmccabe2html progname read-file stdint version-etc-fsf
+# gnulib-tool --import --dir=. --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --libtool --macro-prefix=gl --no-vc-files autobuild fdl-1.3 gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile pmccabe2html progname read-file stdint version-etc-fsf warnings
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([gl/override])
@@ -32,6 +32,7 @@ gl_MODULES([
read-file
stdint
version-etc-fsf
+ warnings
])
gl_AVOID([])
gl_SOURCE_BASE([gl])
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index b0a7b45..6b8e047 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -68,6 +68,7 @@ AC_DEFUN([gl_INIT],
gl_STDINT_H
gl_STDLIB_H
gl_UNISTD_H
+ gl_WARN_INIT
gl_WCHAR_H
m4_ifval(gl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
@@ -236,6 +237,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/stdint.m4
m4/stdlib_h.m4
m4/unistd_h.m4
+ m4/warnings.m4
m4/wchar.m4
m4/wint_t.m4
top/GNUmakefile