summaryrefslogtreecommitdiffstats
path: root/unix/tcl.m4
diff options
context:
space:
mode:
authormdejong <mdejong>2001-12-19 21:37:32 (GMT)
committermdejong <mdejong>2001-12-19 21:37:32 (GMT)
commita307ef5b1e57756cadfe4f8f8af6eaf362ed0345 (patch)
tree0e0e81c084bf4a4c61d88b883e0fddd42fb51690 /unix/tcl.m4
parent6a51736291c6f10e90b7ed6f74ecc498e8609875 (diff)
downloadtk-a307ef5b1e57756cadfe4f8f8af6eaf362ed0345.zip
tk-a307ef5b1e57756cadfe4f8f8af6eaf362ed0345.tar.gz
tk-a307ef5b1e57756cadfe4f8f8af6eaf362ed0345.tar.bz2
* unix/configure: Regen.
* unix/tcl.m4: Update from Tcl.
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r--unix/tcl.m453
1 files changed, 51 insertions, 2 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index d70c95f..08d84b1 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -429,6 +429,51 @@ AC_DEFUN(SC_ENABLE_SYMBOLS, [
fi
])
+#------------------------------------------------------------------------
+# SC_ENABLE_LANGINFO --
+#
+# Allows use of modern nl_langinfo check for better l10n.
+# This is only relevant for Unix.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-langinfo=yes|no (default is yes)
+#
+# Defines the following vars:
+# HAVE_LANGINFO Triggers use of nl_langinfo if defined.
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN(SC_ENABLE_LANGINFO, [
+ AC_ARG_ENABLE(langinfo,
+ [ --enable-langinfo use nl_langinfo if possible to determine
+ encoding at startup, otherwise use old heuristic],
+ [langinfo_ok=$enableval], [langinfo_ok=yes])
+
+ HAVE_LANGINFO=0
+ if test "$langinfo_ok" = "yes"; then
+ if test "$langinfo_ok" = "yes"; then
+ AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
+ fi
+ fi
+ AC_MSG_CHECKING([whether to use nl_langinfo])
+ if test "$langinfo_ok" = "yes"; then
+ AC_TRY_COMPILE([#include <langinfo.h>],
+ [nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
+ if test "$langinfo_ok" = "no"; then
+ langinfo_ok="no (could not compile with nl_langinfo)";
+ fi
+ if test "$langinfo_ok" = "yes"; then
+ AC_DEFINE(HAVE_LANGINFO)
+ fi
+ fi
+ AC_MSG_RESULT([$langinfo_ok])
+])
+
#--------------------------------------------------------------------
# SC_CONFIG_CFLAGS
#
@@ -926,7 +971,7 @@ dnl AC_CHECK_TOOL(AR, ar, :)
# FreeBSD 3.* and greater have ELF.
SHLIB_CFLAGS="-fPIC"
SHLIB_LD="ld -Bshareable -x"
- SHLIB_LD_LIBS=""
+ SHLIB_LD_LIBS='${LIBS}'
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
@@ -1104,7 +1149,11 @@ dnl AC_CHECK_TOOL(AR, ar, :)
DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl"
LDFLAGS=""
- LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ LD_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ else
+ LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+ fi
;;
SunOS-5*)