diff options
author | Adam Heath <doogie@debian.org> | 2000-12-24 01:34:55 +0000 |
---|---|---|
committer | Adam Heath <doogie@debian.org> | 2000-12-24 01:34:55 +0000 |
commit | 559e443fd0920cf624208950e13a5fdf6e3b510e (patch) | |
tree | e829ee46ea93a0bd1e216afb8e9cf63c313670d4 | |
parent | 709f432b6ba5d3bc25a950f2deb321deb6ef2292 (diff) | |
download | dpkg-559e443fd0920cf624208950e13a5fdf6e3b510e.tar.gz |
Modified DPKG_C_GCC_TRY_WARNS() to call AC_SUBST, so that we can use the
result of the test during build time.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Makefile.conf.in | 7 | ||||
-rw-r--r-- | automake/dpkg.m4 | 12 | ||||
-rw-r--r-- | configure.in | 8 | ||||
-rw-r--r-- | debian/changelog | 2 |
5 files changed, 26 insertions, 9 deletions
@@ -1,3 +1,9 @@ +Sat Dec 23 19:33:05 CST 2000 Adam Heath <doogie@debian.org> + + * automake/dpkg.m4, configure.in, Makefile.conf.in: + Modified DPKG_C_GCC_TRY_WARNS() to call AC_SUBST, so that we can + use the result of the test during build time. + Sat Dec 23 16:44:25 CST 2000 Adam Heath <doogie@debian.org> * main/depcon.c: Added description for "suggests" in describedepcon(). diff --git a/Makefile.conf.in b/Makefile.conf.in index 39e375911..140982d75 100644 --- a/Makefile.conf.in +++ b/Makefile.conf.in @@ -38,6 +38,11 @@ PERL = @PERL@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs LN = @LN_S@ +WARN_ALL = @WARN_ALL@ +WARN_WRITESTRINGS = @WARN_WRITESTRINGS@ +WARN_POINTERMATH = @WARN_POINTERMATH@ +WARN_IMPLICIT = @WARN_IMPLICIT@ + CC = @CC@ CFLAGS = @CFLAGS@ INSTALL = @INSTALL@ @@ -65,7 +70,7 @@ SSD_LIBS = @SSD_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ -ALL_CFLAGS = $(CFLAGS) $(DEFS) $(NLS_CFLAGS) $(INCLUDE_CFLAGS) $(ZLIB_CFLAGS) +ALL_CFLAGS = $(CFLAGS) $(DEFS) $(NLS_CFLAGS) $(INCLUDE_CFLAGS) $(ZLIB_CFLAGS) $(WARN_ALL) $(WARN_WRITESTRINGS) $(WARN_POINTERMATH) $(WARN_IMPLICIT) ALL_CXXFLAGS = $(ALL_CFLAGS) $(CXXFLAGS) .c.o: diff --git a/automake/dpkg.m4 b/automake/dpkg.m4 index f5146449d..8b2d68d7d 100644 --- a/automake/dpkg.m4 +++ b/automake/dpkg.m4 @@ -16,12 +16,12 @@ AC_DEFUN(DPKG_CACHED_TRY_COMPILE,[ fi ]) -dnl DPKG_C_GCC_TRY_WARNS(<warnings>,<cachevar>) +dnl DPKG_C_GCC_TRY_WARNS(<warnings>,<substvar>,<cachevar>) AC_DEFUN(DPKG_C_GCC_TRY_WARNS,[ AC_MSG_CHECKING([GCC warning flag(s) $1]) if test "${GCC-no}" = yes then - AC_CACHE_VAL($2,[ + AC_CACHE_VAL($3,[ oldcflags="${CFLAGS-}" CFLAGS="${CFLAGS-} ${CWARNS} $1 -Werror" AC_TRY_COMPILE([ @@ -29,16 +29,20 @@ AC_DEFUN(DPKG_C_GCC_TRY_WARNS,[ #include <stdio.h> ],[ strcmp("a","b"); fprintf(stdout,"test ok\n"); -], [$2=yes], [$2=no]) +], [$3=yes], [$3=no]) CFLAGS="${oldcflags}"]) - if test "x$$2" = xyes; then + if test "x$$3" = xyes; then + $2='$1' CWARNS="${CWARNS} $1" AC_MSG_RESULT(ok) else + $3='' $2='' AC_MSG_RESULT(no) fi else + $2='' AC_MSG_RESULT(no, not using GCC) fi + AC_SUBST($2) ]) diff --git a/configure.in b/configure.in index 495ae8f7c..9f7cade4e 100644 --- a/configure.in +++ b/configure.in @@ -158,10 +158,10 @@ AC_TRY_COMPILE(,[ } inline int foo (int x) {], AC_DEFINE(HAVE_INLINE)) -DPKG_C_GCC_TRY_WARNS(-Wall -Wno-implicit, dpkg_cv_c_gcc_warn_all) -DPKG_C_GCC_TRY_WARNS(-Wwrite-strings, dpkg_cv_c_gcc_warn_writestrings) -DPKG_C_GCC_TRY_WARNS(-Wpointer-arith, dpkg_cv_c_gcc_warn_pointerarith) -DPKG_C_GCC_TRY_WARNS(-Wimplicit -Wnested-externs, dpkg_cv_c_gcc_warn_implicit) +DPKG_C_GCC_TRY_WARNS(-Wall -Wno-implicit, WARN_ALL, dpkg_cv_c_gcc_warn_all) +DPKG_C_GCC_TRY_WARNS(-Wwrite-strings, WARN_WRITESTRINGS, dpkg_cv_c_gcc_warn_writestrings) +DPKG_C_GCC_TRY_WARNS(-Wpointer-arith, WARN_POINTERMATH, dpkg_cv_c_gcc_warn_pointerarith) +DPKG_C_GCC_TRY_WARNS(-Wimplicit -Wnested-externs, WARN_IMPLICIT, dpkg_cv_c_gcc_warn_implicit) dnl Force this here so we can do the next step test "x$prefix" = xNONE && prefix="$ac_default_prefix" diff --git a/debian/changelog b/debian/changelog index a6879974c..f30b9ec5f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,7 @@ dpkg (1.8.0) unstable; urgency=low + * Modified DPKG_C_GCC_TRY_WARNS() to call AC_SUBST, so that we can + use the result of the test during build time. Closes: Bug#75138 * Added description for "suggests" in main/depcon.c:describedepcon(). Closes: Bug#74113 * Removed bashing from dpkg.postinst. |