summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWichert Akkerman <wakkerma@debian.org>2000-12-24 16:59:21 +0000
committerWichert Akkerman <wakkerma@debian.org>2000-12-24 16:59:21 +0000
commitcf95267c74ba7c16827f06f9e3a7be4e89b10e7c (patch)
treec4e8d242a6f3ca7e822d2644ae3cbf945c421425
parentd3539ab33b60c098afc3948e32b28b5bf45aa457 (diff)
downloaddpkg-cf95267c74ba7c16827f06f9e3a7be4e89b10e7c.tar.gz
Undo earlier changes from Adam to handle -W options for the compiler
and do things much simpler instead based on the old working but not correctly used code.
-rw-r--r--ChangeLog3
-rw-r--r--Makefile.conf.in4
-rw-r--r--automake/dpkg.m412
-rw-r--r--configure.in9
4 files changed, 14 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index c40d8a65e..1dc729843 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
Sun Dec 24 17:35:12 CET 2000 Wichert Akkerman <wakkerma@debian.org>
* dselect/main.cc: make commandline options work again
+ * Makefile.conf.in, configure.in,automake/dpkg.m4: revert changes from Adam
+ * Makefile.conf.in: add @CWARNS@ to CFLAGS
+ * configure.in: add AC_SUBST for CWARNS
Sun Dec 24 17:05:45 CET 2000 Wichert Akkerman <wakkerma@debian.org>
diff --git a/Makefile.conf.in b/Makefile.conf.in
index 140982d75..00a645488 100644
--- a/Makefile.conf.in
+++ b/Makefile.conf.in
@@ -44,7 +44,7 @@ WARN_POINTERMATH = @WARN_POINTERMATH@
WARN_IMPLICIT = @WARN_IMPLICIT@
CC = @CC@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ @CWARNS@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
@@ -70,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) $(WARN_ALL) $(WARN_WRITESTRINGS) $(WARN_POINTERMATH) $(WARN_IMPLICIT)
+ALL_CFLAGS = $(CFLAGS) $(DEFS) $(NLS_CFLAGS) $(INCLUDE_CFLAGS) $(ZLIB_CFLAGS)
ALL_CXXFLAGS = $(ALL_CFLAGS) $(CXXFLAGS)
.c.o:
diff --git a/automake/dpkg.m4 b/automake/dpkg.m4
index 8b2d68d7d..f5146449d 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>,<substvar>,<cachevar>)
+dnl DPKG_C_GCC_TRY_WARNS(<warnings>,<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($3,[
+ AC_CACHE_VAL($2,[
oldcflags="${CFLAGS-}"
CFLAGS="${CFLAGS-} ${CWARNS} $1 -Werror"
AC_TRY_COMPILE([
@@ -29,20 +29,16 @@ AC_DEFUN(DPKG_C_GCC_TRY_WARNS,[
#include <stdio.h>
],[
strcmp("a","b"); fprintf(stdout,"test ok\n");
-], [$3=yes], [$3=no])
+], [$2=yes], [$2=no])
CFLAGS="${oldcflags}"])
- if test "x$$3" = xyes; then
- $2='$1'
+ if test "x$$2" = xyes; then
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 9f7cade4e..fd3b4d9f4 100644
--- a/configure.in
+++ b/configure.in
@@ -158,10 +158,11 @@ AC_TRY_COMPILE(,[
} inline int foo (int x) {], AC_DEFINE(HAVE_INLINE))
-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)
+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)
+AC_SUBST(CWARNS)
dnl Force this here so we can do the next step
test "x$prefix" = xNONE && prefix="$ac_default_prefix"