From 2f3ece21e787249e1d58f8c3db1b36a330ca65d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Thu, 18 Jul 2002 14:23:09 +0200
Subject: [PATCH] * configure.ac: Use -ggdb3 for gcc, except for gcc-2.96.

Rev: configure.ac:1.13
---
 configure.ac | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2a324c99a..c3722509a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -787,9 +787,15 @@ AC_CONFIG_SUBDIRS(src/sftp)
 
 # Set these flags *last*, or else the test programs won't compile
 if test x$GCC = xyes ; then
-    CFLAGS="$CFLAGS -Wall -W \
- -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes \
- -Wpointer-arith -Wbad-function-cast -Wnested-externs"
+  # Using -ggdb3 makes (some versions of) Redhat's gcc-2.96 dump core
+  if "$CC" --version | grep '^2\.96$' 1>/dev/null 2>&1; then
+    true
+  else
+    CFLAGS="$CFLAGS -ggdb3"
+  fi
+  CFLAGS="$CFLAGS -Wall -W \
+  -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes \
+  -Wpointer-arith -Wbad-function-cast -Wnested-externs"
 
 # Don't enable -Wcast-align as it results in tons of warnings in the
 # DES code. And when using stdio.
-- 
GitLab