summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-07-11 06:27:00 (GMT)
committerFred Drake <fdrake@acm.org>2001-07-11 06:27:00 (GMT)
commit9f71582c14b9651cad329da83d284a6a3773d309 (patch)
tree39e396a98bc966725a40f3f2d747eb714c4a4286 /configure.in
parent79c8671c7aee3dfaeb3aa9ce14abe08cc30ecc54 (diff)
downloadcpython-9f71582c14b9651cad329da83d284a6a3773d309.zip
cpython-9f71582c14b9651cad329da83d284a6a3773d309.tar.gz
cpython-9f71582c14b9651cad329da83d284a6a3773d309.tar.bz2
Check for --with-pydebug earlier, and record the result.
When setting up the basic OPT value for GCC, only use optimization if not using debugging mode. Fix a typo in a comment in the IPv6 check.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in36
1 files changed, 21 insertions, 15 deletions
diff --git a/configure.in b/configure.in
index 65ee7b4..c7bfe6a 100644
--- a/configure.in
+++ b/configure.in
@@ -303,6 +303,16 @@ if test -z "$LN" ; then
esac
fi
+# Check for --with-pydebug
+AC_MSG_CHECKING(for --with-pydebug)
+AC_ARG_WITH(pydebug,
+[ --with-pydebug build with Py_DEBUG defined], [
+if test "$withval" != no
+then AC_DEFINE(Py_DEBUG) AC_MSG_RESULT(yes); Py_DEBUG='true'
+else AC_MSG_RESULT(no); Py_DEBUG='false'
+fi],
+[AC_MSG_RESULT(no)])
+
# Optimizer/debugger flags
AC_SUBST(OPT)
if test -z "$OPT"
@@ -311,11 +321,17 @@ then
yes)
case $ac_cv_prog_cc_g in
yes)
- OPT="-g -O2 -Wall -Wstrict-prototypes";;
+ if test "$Py_DEBUG" = 'true' ; then
+ # Optimization messes up debuggers, so turn it off for
+ # debug builds.
+ OPT="-g -Wall -Wstrict-prototypes"
+ else
+ OPT="-g -O3 -Wall -Wstrict-prototypes"
+ fi;;
*)
- OPT="-O2 -Wall -Wstrict-prototypes";;
- esac
- ;;
+ OPT="-O3 -Wall -Wstrict-prototypes";;
+ esac
+ ;;
*)
case $ac_sys_system in
UnixWare*)
@@ -385,7 +401,7 @@ AC_ARG_ENABLE(ipv6,
;;
esac ],
- AC_TRY_RUN([ /* AF_INET6 avalable check */
+ AC_TRY_RUN([ /* AF_INET6 available check */
#include <sys/types.h>
#include <sys/socket.h>
main()
@@ -861,16 +877,6 @@ AC_MSG_RESULT($CFLAGSFORSHARED)
AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
-# Check for --with-pydebug
-AC_MSG_CHECKING(for --with-pydebug)
-AC_ARG_WITH(pydebug,
-[ --with-pydebug build with Py_DEBUG defined], [
-if test "$withval" != no
-then AC_DEFINE(Py_DEBUG) AC_MSG_RESULT(yes)
-else AC_MSG_RESULT(no)
-fi],
-[AC_MSG_RESULT(no)])
-
# checks for system dependent C++ extensions support
case "$ac_sys_system" in
AIX*) AC_MSG_CHECKING(for genuine AIX C++ extensions support)