changeset 3574:b5ddfcc90902

* configure.in (CFLAGS): Don't set this according to the value of the GCC shell variable. Instead, consult the machine and system files for the values of C_OPTIMIZE_SWITCH and C_DEBUG_SWITCH, and test __GNUC__ while we're at it. * configure.in: Check to see if the system has -ldnet.
author Jim Blandy <jimb@redhat.com>
date Tue, 08 Jun 1993 07:18:40 +0000
parents 7ff6a8013a4d
children 1b93c0bc8bf4
files configure1.in
diffstat 1 files changed, 17 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/configure1.in	Tue Jun 08 07:17:32 1993 +0000
+++ b/configure1.in	Tue Jun 08 07:18:40 1993 +0000
@@ -921,11 +921,6 @@
     ] AC_PROG_CC [
 esac
 
-CFLAGS='-g'
-if test -n "${GCC}"; then
-  CFLAGS='-g -O'
-fi
-
 #### Some other nice autoconf tests.  If you add a test here which
 #### should make an entry in src/config.h, don't forget to add an
 #### #undef clause to src/config.h.in for autoconf to modify.
@@ -942,6 +937,9 @@
 AC_STDC_HEADERS
 AC_TIME_WITH_SYS_TIME
 
+dnl checks for library files
+AC_HAVE_LIBRARY(-ldnet)
+
 dnl checks for typedefs
 AC_RETSIGTYPE
 
@@ -1085,6 +1083,20 @@
 #else
 @configure@ system_malloc=no
 #endif
+
+#ifndef C_DEBUG_SWITCH
+#define C_DEBUG_SWITCH -g
+#endif
+
+#ifndef C_OPTIMIZE_SWITCH
+#define C_OPTIMIZE_SWITCH -O
+#endif
+
+#ifdef __GNUC__
+@configure@ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH
+#else
+@configure@ CFLAGS=C_DEBUG_SWITCH
+#endif
 ' > ${tempcname}
 # The value of CPP is a quoted variable reference, so we need to do this
 # to get its actual value...