summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--unix/Makefile.in6
-rw-r--r--unix/configure.in10
2 files changed, 14 insertions, 2 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 8a96a01..0ecf5cd 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -74,6 +74,9 @@ MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann
# Libraries built with optimization switches have this additional extension
DBGX = @DBGX@
+# warning flags
+CFLAGS_WARNING = @CFLAGS_WARNING@
+
# The default switches for optimization or debugging
CFLAGS_DEBUG = @CFLAGS_DEBUG@
CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
@@ -207,7 +210,8 @@ CC = @CC@
#----------------------------------------------------------------
-CC_SWITCHES = ${CFLAGS} ${TCL_SHLIB_CFLAGS} -I${GENERIC_DIR} -I${SRC_DIR} \
+CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${TCL_SHLIB_CFLAGS} \
+-I${GENERIC_DIR} -I${SRC_DIR} \
${AC_FLAGS} ${MATH_FLAGS} ${GENERIC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
${COMPILE_DEBUG_FLAGS} ${ENV_FLAGS} -DTCL_SHLIB_EXT=\"${SHLIB_SUFFIX}\"
diff --git a/unix/configure.in b/unix/configure.in
index fd88976..15c91d7 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -2,7 +2,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
AC_INIT(../generic/tcl.h)
-# SCCS: %Z% $Id: configure.in,v 1.8 1998/07/21 15:26:05 escoffon Exp $
+# SCCS: %Z% $Id: configure.in,v 1.9 1998/07/22 13:39:13 escoffon Exp $
TCL_VERSION=8.0
TCL_MAJOR_VERSION=8
@@ -29,6 +29,13 @@ AC_SUBST(CC)
fi
AC_C_CROSS
+# set the warning flags depending on whether or not we are using gcc
+if test "${GCC}" = "yes" ; then
+ CFLAGS_WARNING="-Wall -Wconversion"
+else
+ CFLAGS_WARNING=""
+fi
+
#--------------------------------------------------------------------
# Supply substitutes for missing POSIX library procedures, or
# set flags so Tcl uses alternate procedures.
@@ -1227,6 +1234,7 @@ AC_SUBST(BUILD_DLTEST)
AC_SUBST(CFLAGS_DEBUG)
AC_SUBST(CFLAGS_DEFAULT)
AC_SUBST(CFLAGS_OPTIMIZE)
+AC_SUBST(CFLAGS_WARNING)
AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX)
AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX)
AC_SUBST(DBGX)