Commit 4ed216b3 authored by Jim Blandy's avatar Jim Blandy
Browse files

* 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.
parent ea2c2e02
...@@ -921,11 +921,6 @@ case ${with_gcc} in ...@@ -921,11 +921,6 @@ case ${with_gcc} in
] AC_PROG_CC [ ] AC_PROG_CC [
esac esac
CFLAGS='-g'
if test -n "${GCC}"; then
CFLAGS='-g -O'
fi
#### Some other nice autoconf tests. If you add a test here which #### 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 #### 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. #### #undef clause to src/config.h.in for autoconf to modify.
...@@ -942,6 +937,9 @@ AC_HAVE_HEADERS(sys/timeb.h sys/time.h) ...@@ -942,6 +937,9 @@ AC_HAVE_HEADERS(sys/timeb.h sys/time.h)
AC_STDC_HEADERS AC_STDC_HEADERS
AC_TIME_WITH_SYS_TIME AC_TIME_WITH_SYS_TIME
dnl checks for library files
AC_HAVE_LIBRARY(-ldnet)
dnl checks for typedefs dnl checks for typedefs
AC_RETSIGTYPE AC_RETSIGTYPE
...@@ -1085,6 +1083,20 @@ echo ' ...@@ -1085,6 +1083,20 @@ echo '
#else #else
@configure@ system_malloc=no @configure@ system_malloc=no
#endif #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} ' > ${tempcname}
# The value of CPP is a quoted variable reference, so we need to do this # The value of CPP is a quoted variable reference, so we need to do this
# to get its actual value... # to get its actual value...
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment