summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
authorescoffon <escoffon>1998-07-22 13:39:28 (GMT)
committerescoffon <escoffon>1998-07-22 13:39:28 (GMT)
commit4b30f059a8862f77079033a74b10f2522d7cc460 (patch)
tree0bb268e0d60763ccab65baf89734e7825afdfa38 /unix/configure.in
parent4f44a7f538df22b28f9c746b923dc6458bace717 (diff)
downloadtk-4b30f059a8862f77079033a74b10f2522d7cc460.zip
tk-4b30f059a8862f77079033a74b10f2522d7cc460.tar.gz
tk-4b30f059a8862f77079033a74b10f2522d7cc460.tar.bz2
Added support for specifying warning flags for the compiler, with checks
for gcc and appropriate defaults.
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/unix/configure.in b/unix/configure.in
index 54c897f..5579147 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -30,6 +30,13 @@ fi
AC_C_CROSS
AC_HAVE_HEADERS(unistd.h limits.h)
+# 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
+
#--------------------------------------------------------------------
# See if there was a command-line option for where Tcl is; if
# not, assume that its top-level directory is a sibling of ours.
@@ -394,6 +401,7 @@ TK_LIB_SPEC="-L${exec_prefix}/lib \${TK_LIB_FLAG}"
AC_SUBST(CFLAGS_DEBUG)
AC_SUBST(CFLAGS_DEFAULT)
AC_SUBST(CFLAGS_OPTIMIZE)
+AC_SUBST(CFLAGS_WARNING)
AC_SUBST(DBGX)
AC_SUBST(DL_LIBS)
AC_SUBST(LD_FLAGS)