summaryrefslogtreecommitdiffstats
path: root/unix/aclocal.m4
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-02-10 08:53:14 (GMT)
committerhobbs <hobbs>2000-02-10 08:53:14 (GMT)
commit38362e8f5997f57fd93f4fdc48ae5b14e988b7c2 (patch)
tree792e35f923db1468f1898b0e36a7de40dfe261b5 /unix/aclocal.m4
parent4dfb3aeabdcba38301d5fb68534eec9dc88028bd (diff)
downloadtk-38362e8f5997f57fd93f4fdc48ae5b14e988b7c2.zip
tk-38362e8f5997f57fd93f4fdc48ae5b14e988b7c2.tar.gz
tk-38362e8f5997f57fd93f4fdc48ae5b14e988b7c2.tar.bz2
* unix/tkUnixWm.c (Tk_CoordsToWindow): qualified delete of error
handler as the goto label is reached from above and below. * unix/configure.in: * unix/aclocal.m4: cleaned up macros to coincide with tcl.m4, added -export-dynamic to LDFLAGS for FreeBSD-3+ [Bug: 2998] * unix/README: * unix/Makefile.in (dist): removed porting.notes and porting.old from distribution and CVS. The information was very outdated. Now refer to http://dev.scriptics.com/services/support/platforms.html
Diffstat (limited to 'unix/aclocal.m4')
-rw-r--r--unix/aclocal.m465
1 files changed, 42 insertions, 23 deletions
diff --git a/unix/aclocal.m4 b/unix/aclocal.m4
index 714b8d5..6ee04c1 100644
--- a/unix/aclocal.m4
+++ b/unix/aclocal.m4
@@ -543,6 +543,12 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
fi
fi
+ if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
+ using_gcc="yes"
+ else
+ using_gcc="no"
+ fi
+
# Step 2: check for existence of -ldl library. This is needed because
# Linux can use either -ldl or -ldld for dynamic loading.
@@ -560,14 +566,21 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
TCL_LIB_VERSIONS_OK=ok
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE=-O
+ if test "$using_gcc" = "yes" ; then
+ CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
+ else
+ CFLAGS_WARNING=""
+ fi
TCL_NEEDS_EXP_FILE=0
TCL_BUILD_EXP_FILE=""
TCL_EXP_FILE=""
case $system in
AIX-4.[[2-9]])
- # The IBM compiler has a bug with -O when compiling the
- # text widget code (TkTextPixelIndex segv)
- CFLAGS_OPTIMIZE=""
+ if test "$using_gcc" = "no" ; then
+ # The IBM compiler has a bug with -O when compiling the
+ # text widget code (TkTextPixelIndex segv)
+ CFLAGS_OPTIMIZE=""
+ fi
SHLIB_CFLAGS=""
SHLIB_LD=$TCL_SHLIB_LD
SHLIB_LD_LIBS='${LIBS}'
@@ -576,7 +589,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
DL_LIBS="-ldl ${TCL_BUILD_LIB_SPEC}"
LDFLAGS=""
LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- TCL_NEEDS_EXP_FILE=1
+ TCL_NEEDS_EXP_FILE=0
TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.exp'
;;
AIX-*)
@@ -654,7 +667,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
+ if test "$using_gcc" = "yes" ; then
EXTRA_CFLAGS="-mabi=n32"
LDFLAGS="-mabi=n32"
else
@@ -777,7 +790,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- LDFLAGS=""
+ LDFLAGS="-export-dynamic"
LD_SEARCH_FLAGS=""
;;
NEXTSTEP-*)
@@ -839,16 +852,21 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
LD_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
;;
SCO_SV-3.2*)
- # Note, dlopen is available only on SCO 3.2.5 and greater. However,
+ # Note, dlopen is available only on SCO 3.2.5 and greater. However,
# this test works, since "uname -s" was non-standard in 3.2.4 and
# below.
- SHLIB_CFLAGS="-Kpic -belf"
+ if test "$using_gcc" = "yes" ; then
+ SHLIB_CFLAGS="-fPIC -melf"
+ LDFLAGS="-melf -Wl,-Bexport"
+ else
+ SHLIB_CFLAGS="-Kpic -belf"
+ LDFLAGS="-belf -Wl,-Bexport"
+ fi
SHLIB_LD="ld -G"
SHLIB_LD_LIBS=""
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
- LDFLAGS="-belf -Wl,-Bexport"
LD_SEARCH_FLAGS=""
;;
SINIX*5.4*)
@@ -901,20 +919,20 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
do64bit_ok=no
if test "$do64bit" = "yes" ; then
- arch=`isainfo`
- if test "$arch" = "sparcv9 sparc" ; then
- if test "$CC" != "gcc" -a `$CC -v 2>&1 | grep -c gcc` = "0" ; then
- do64bit_ok=yes
- EXTRA_CFLAGS="-xarch=v9"
- LDFLAGS="-xarch=v9"
- else
- AC_MSG_WARN("64bit mode not supported using GCC on $system")
+ arch=`isainfo`
+ if test "$arch" = "sparcv9 sparc" ; then
+ if test "$using_gcc" = "no" ; then
+ do64bit_ok=yes
+ EXTRA_CFLAGS="-xarch=v9"
+ LDFLAGS="-xarch=v9"
+ else
+ AC_MSG_WARN("64bit mode not supported with GCC on $system")
+ fi
+ else
+ AC_MSG_WARN("64bit mode only supported sparcv9 system")
fi
- else
- AC_MSG_WARN("64bit mode only supported sparcv9 system")
- fi
fi
-
+
# Note: need the LIBS below, otherwise Tk won't find Tcl's
# symbols when dynamically loaded into tclsh.
@@ -922,7 +940,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
- if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
+ if test "$using_gcc" = "yes" ; then
LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
else
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
@@ -1071,7 +1089,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
# standard manufacturer compiler.
if test "$DL_OBJS" != "tclLoadNone.o" ; then
- if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
+ if test "$using_gcc" = "yes" ; then
case $system in
AIX-*)
;;
@@ -1102,6 +1120,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
AC_SUBST(DL_LIBS)
AC_SUBST(CFLAGS_DEBUG)
AC_SUBST(CFLAGS_OPTIMIZE)
+ AC_SUBST(CFLAGS_WARNING)
])
#--------------------------------------------------------------------