summaryrefslogtreecommitdiffstats
path: root/unix/configure.in
diff options
context:
space:
mode:
authorescoffon <escoffon>1998-07-01 18:28:41 (GMT)
committerescoffon <escoffon>1998-07-01 18:28:41 (GMT)
commit0cd8b438851fba52f42877525214ee7382290b0b (patch)
tree0adc3b36e7d07fd47e3f4d1a9363d8464b6fb58a /unix/configure.in
parent46581d8aea4d13bed3e2759770da9213435cde0f (diff)
downloadtk-0cd8b438851fba52f42877525214ee7382290b0b.zip
tk-0cd8b438851fba52f42877525214ee7382290b0b.tar.gz
tk-0cd8b438851fba52f42877525214ee7382290b0b.tar.bz2
- added support for configuration of debug/nodebug in configure script.
- also added a atring to append to generated libraries when built with symbols.
Diffstat (limited to 'unix/configure.in')
-rw-r--r--unix/configure.in24
1 files changed, 24 insertions, 0 deletions
diff --git a/unix/configure.in b/unix/configure.in
index 5f0ba06..0b7cc16 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -52,6 +52,19 @@ fi
file=$TCL_BIN_DIR/tclConfig.sh
. $file
+
+# Set the default compiler switches based on the --enable-symbols option
+
+AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols],
+ [tcl_ok=$enableval], [tcl_ok=no])
+if test "$tcl_ok" = "yes"; then
+ CFLAGS_DEFAULT=CFLAGS_DEBUG
+ DBGX=g
+else
+ CFLAGS_DEFAULT=CFLAGS_OPTIMIZE
+ DBGX=""
+fi
+
SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
SHLIB_LD=$TCL_SHLIB_LD
SHLIB_LD_LIBS=$TCL_SHLIB_LD_LIBS
@@ -59,6 +72,8 @@ SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
SHLIB_VERSION=$TCL_SHLIB_VERSION
DL_LIBS=$TCL_DL_LIBS
LD_FLAGS=$TCL_LD_FLAGS
+CFLAGS_DEBUG=$TCL_CFLAGS_DEBUG
+CFLAGS_OPTIMIZE=$TCL_CFLAGS_OPTIMIZE
LIB_RUNTIME_DIR='${LIB_RUNTIME_DIR}'
@@ -376,6 +391,15 @@ else
TK_LIB_SPEC="-L${exec_prefix}/lib -ltk`echo ${VERSION} | tr -d .`"
fi
+echo CFLAGS_DEBUG=$CFLAGS_DEBUG
+echo CFLAGS_DEFAULT=$CFLAGS_DEFAULT
+echo CFLAGS_OPTIMIZE=$CFLAGS_OPTIMIZE
+echo DBGX=$DBGX
+
+AC_SUBST(CFLAGS_DEBUG)
+AC_SUBST(CFLAGS_DEFAULT)
+AC_SUBST(CFLAGS_OPTIMIZE)
+AC_SUBST(DBGX)
AC_SUBST(DL_LIBS)
AC_SUBST(LD_FLAGS)
AC_SUBST(MATH_LIBS)