Improved the error reporting by making use of strerror() if present.
* generic/udp_tcl.c: Added support for IP_MULTICAST_LOOP for
Konstantin Khomoutov to control multicast loopback transmission.
+ Improved the error reporting by using strerror if available.
+ * Makefile.in: Fix 'make shell' to load the built library.
+ * configure.in: Incremented version and use TEA 3.6
+ * tclconfig/*: Upgraded to TEA 3.6
+ * aclocal.m4: Check for strerror presence.
2007-01-31 Pat Thoyts <patthoyts@users.sourceforge.net>
$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
shell: binaries libraries
- @$(TCLSH) $(SCRIPT)
+ echo "load $(PKG_LIB_FILE);set argv $(SCRIPT)" | $(TCLSH)
gdb:
$(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
fi
])
+#-------------------------------------------------------------------------
+# TCLUDP_CHECK_STRERROR
+#
+# Do we have strerror()
+#
+# Results
+# Sets HAVE_STRERROR
+#
+#-------------------------------------------------------------------------
+
+AC_DEFUN(TCLUDP_CHECK_STRERROR, [
+ AC_CHECK_LIB(c,strerror,[tcludp_strerror_ok=yes],[tcludp_strerror_ok=no])
+ if test "$tcludp_strerror_ok" = "yes"; then
+ TEA_ADD_CFLAGS([-DHAVE_STRERROR])
+ fi
+])
+
#-------------------------------------------------------------------------
# TCLUDP_CONFIG
#
AC_DEFUN(TCLUDP_CONFIG, [
TCLUDP_CHECK_CLOEXEC
+ TCLUDP_CHECK_STRERROR
])
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for udp 1.0.8.
+# Generated by GNU Autoconf 2.59 for udp 1.0.9.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# Identity of this package.
PACKAGE_NAME='udp'
PACKAGE_TARNAME='udp'
-PACKAGE_VERSION='1.0.8'
-PACKAGE_STRING='udp 1.0.8'
+PACKAGE_VERSION='1.0.9'
+PACKAGE_STRING='udp 1.0.9'
PACKAGE_BUGREPORT=''
# Factoring default headers for most tests.
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures udp 1.0.8 to adapt to many kinds of systems.
+\`configure' configures udp 1.0.9 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of udp 1.0.8:";;
+ short | recursive ) echo "Configuration of udp 1.0.9:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-udp configure 1.0.8
+udp configure 1.0.9
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by udp $as_me 1.0.8, which was
+It was created by udp $as_me 1.0.9, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
# TEA extensions pass this us the version of TEA they think they
# are compatible with.
- TEA_VERSION="3.5"
+ TEA_VERSION="3.6"
echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6
The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
{ (exit 1); exit 1; }; }
fi
- if test x"3.5" = x ; then
+ if test x"3.6" = x ; then
{ { echo "$as_me:$LINENO: error:
TEA version not specified." >&5
echo "$as_me: error:
TEA version not specified." >&2;}
{ (exit 1); exit 1; }; }
- elif test "3.5" != "${TEA_VERSION}" ; then
- echo "$as_me:$LINENO: result: warning: requested TEA version \"3.5\", have \"${TEA_VERSION}\"" >&5
-echo "${ECHO_T}warning: requested TEA version \"3.5\", have \"${TEA_VERSION}\"" >&6
+ elif test "3.6" != "${TEA_VERSION}" ; then
+ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.6\", have \"${TEA_VERSION}\"" >&5
+echo "${ECHO_T}warning: requested TEA version \"3.6\", have \"${TEA_VERSION}\"" >&6
else
echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6
if test -z "$no_pipe" -a -n "$GCC"; then
echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6
- OLDCC="$CC"
- CC="$CC -pipe"
- cat >conftest.$ac_ext <<_ACEOF
+if test "${tcl_cv_cc_pipe+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+ tcl_cv_cc_pipe=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-CC="$OLDCC"
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+tcl_cv_cc_pipe=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$hold_cflags
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
+echo "${ECHO_T}$tcl_cv_cc_pipe" >&6
+ if test $tcl_cv_cc_pipe = yes; then
+ CFLAGS="$CFLAGS -pipe"
+ fi
fi
#--------------------------------------------------------------------
TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
TCL_LIB_VERSIONS_OK=ok
- CFLAGS="${CPPFLAGS} ${CFLAGS}"
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE=-O
if test "$GCC" = "yes" ; then
#AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
#LIBS="$LIBS -lxnet" # Use the XOPEN network library
- SHLIB_SUFFIX=".sl"
+ if test "`uname -m`" = "ia64" ; then
+ SHLIB_SUFFIX=".so"
+ else
+ SHLIB_SUFFIX=".sl"
+ fi
echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
if test "${ac_cv_lib_dld_shl_load+set}" = set; then
CFLAGS_OPTIMIZE="-Os"
SHLIB_CFLAGS="-fno-common"
# To avoid discrepancies between what headers configure sees during
- # preprocessing tests and compiling tests, add any -isysroot and
- # -mmacosx-version-min flags present in CFLAGS to CPPFLAGS:
+ # preprocessing tests and compiling tests, move any -isysroot and
+ # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
- awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=1;i<=NF;i++) \
+ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
+ CFLAGS="`echo " ${CFLAGS}" | \
+ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+ if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
if test $do64bit = yes; then
case `arch` in
ppc)
DL_LIBS=""
# Don't use -prebind when building for Mac OS X 10.4 or later only:
test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
- "`echo "${CFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \
+ "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \
LDFLAGS="$LDFLAGS -prebind"
LDFLAGS="$LDFLAGS -headerpad_max_install_names"
echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
fi
+
+
# Step 4: disable dynamic loading if requested via a command-line switch.
# Check whether --enable-load or --disable-load was given.
fi
+ echo "$as_me:$LINENO: checking for strerror in -lc" >&5
+echo $ECHO_N "checking for strerror in -lc... $ECHO_C" >&6
+if test "${ac_cv_lib_c_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_c_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_c_strerror=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_c_strerror" >&5
+echo "${ECHO_T}$ac_cv_lib_c_strerror" >&6
+if test $ac_cv_lib_c_strerror = yes; then
+ tcludp_strerror_ok=yes
+else
+ tcludp_strerror_ok=no
+fi
+
+ if test "$tcludp_strerror_ok" = "yes"; then
+
+ PKG_CFLAGS="$PKG_CFLAGS -DHAVE_STRERROR"
+
+
+ fi
+
+
#--------------------------------------------------------------------
# This macro generates a line to use when building a library. It
LTLIBOBJS=$ac_ltlibobjs
+CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
} >&5
cat >&5 <<_CSEOF
-This file was extended by udp $as_me 1.0.8, which was
+This file was extended by udp $as_me 1.0.9, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-udp config.status 1.0.8
+udp config.status 1.0.9
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
# so you can encode the package version directly into the source files.
#-----------------------------------------------------------------------
-AC_INIT([udp], [1.0.8])
+AC_INIT([udp], [1.0.9])
#--------------------------------------------------------------------
# Call TEA_INIT as the first TEA_ macro to set up initial vars.
# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
#--------------------------------------------------------------------
-TEA_INIT([3.5])
+TEA_INIT([3.6])
AC_CONFIG_AUX_DIR(tclconfig)
static void udpTrace(const char *format, ...);
static int udpGetService(Tcl_Interp *interp, const char *service,
unsigned short *servicePort);
+static Tcl_Obj *ErrorToObj(const char * prefix);
/*
mreq.imr_interface.s_addr = INADDR_ANY;
if (setsockopt(statePtr->sock, IPPROTO_IP, action,
(const char*)&mreq, sizeof(mreq)) < 0) {
- Tcl_SetResult(interp, "error changing multicast group", TCL_STATIC);
+ Tcl_SetObjResult(interp, ErrorToObj("error changing multicast group"));
return TCL_ERROR;
}
CONST84 char *optionName, Tcl_DString *optionValue)
{
UdpState *statePtr = (UdpState *)instanceData;
- CONST84 char * options[] = { "myport", "remote", "peer", "mcastgroups", "mcastloopback", "broadcast", "ttl", NULL};
+ CONST84 char * options[] = { "myport", "remote", "peer", "mcastgroups", "mcastloop", "broadcast", "ttl", NULL};
int r = TCL_OK;
if (optionName == NULL) {
socklen_t optlen = sizeof(int);
if (getsockopt(statePtr->sock, SOL_SOCKET, SO_BROADCAST,
(char *)&tmp, &optlen)) {
- UDPTRACE("UDP error - getsockopt\n");
- Tcl_SetResult(interp, "error in getsockopt", TCL_STATIC);
+ Tcl_SetObjResult(interp, ErrorToObj("error reading -broadcast"));
r = TCL_ERROR;
} else {
Tcl_DStringSetLength(&ds, TCL_INTEGER_SPACE);
sprintf(Tcl_DStringValue(&ds), "%d", tmp);
}
- } else if (!strcmp("-mcastloopback", optionName)) {
+ } else if (!strcmp("-mcastloop", optionName)) {
unsigned char tmp = 0;
socklen_t optlen = sizeof(unsigned char);
if (getsockopt(statePtr->sock, IPPROTO_IP, IP_MULTICAST_LOOP,
(char *)&tmp, &optlen)) {
- UDPTRACE("UDP error - getsockopt\n");
- Tcl_SetResult(interp, "error in getsockopt", TCL_STATIC);
+ Tcl_SetObjResult(interp, ErrorToObj("error reading -mcastloop"));
r = TCL_ERROR;
} else {
Tcl_DStringSetLength(&ds, TCL_INTEGER_SPACE);
cmd = IP_MULTICAST_TTL;
if (getsockopt(statePtr->sock, IPPROTO_IP, cmd,
(char *)&tmp, &optlen)) {
- UDPTRACE("UDP error - getsockopt");
- Tcl_SetResult(interp, "error in getsockopt", TCL_STATIC);
+ Tcl_SetObjResult(interp, ErrorToObj("error reading -ttl"));
r = TCL_ERROR;
} else {
Tcl_DStringSetLength(&ds, TCL_INTEGER_SPACE);
CONST84 char *optionName, CONST84 char *newValue)
{
UdpState *statePtr = (UdpState *)instanceData;
- CONST84 char * options = "remote mcastadd mcastdrop mcastloopback broadcast ttl";
+ CONST84 char * options = "remote mcastadd mcastdrop mcastloop broadcast ttl";
int r = TCL_OK;
if (!strcmp("-remote", optionName)) {
if (r == TCL_OK) {
if (setsockopt(statePtr->sock, SOL_SOCKET, SO_BROADCAST,
(const char *)&tmp, sizeof(int))) {
- sprintf(errBuf, "%s", "udp - setsockopt");
- UDPTRACE("UDP error - setsockopt\n");
- Tcl_SetObjResult(interp, Tcl_NewStringObj(errBuf, -1));
+ Tcl_SetObjResult(interp, ErrorToObj("error setting -broadcast"));
r = TCL_ERROR;
} else {
Tcl_SetObjResult(interp, Tcl_NewIntObj(tmp));
}
}
- } else if (!strcmp("-mcastloopback", optionName)) {
+ } else if (!strcmp("-mcastloop", optionName)) {
int tmp = 1;
r = Tcl_GetInt(interp, newValue, &tmp);
unsigned char ctmp = (unsigned char)tmp;
if (setsockopt(statePtr->sock, IPPROTO_IP, IP_MULTICAST_LOOP,
(const char *)&ctmp, sizeof(unsigned char))) {
- sprintf(errBuf, "%s", "udp - setsockopt");
- UDPTRACE("UDP error - setsockopt\n");
- Tcl_SetObjResult(interp, Tcl_NewStringObj(errBuf, -1));
+ Tcl_SetObjResult(interp, ErrorToObj("error setting -mcastloop"));
r = TCL_ERROR;
} else {
Tcl_SetObjResult(interp, Tcl_NewIntObj(tmp));
if (r == TCL_OK) {
if (setsockopt(statePtr->sock, IPPROTO_IP, cmd,
(const char *)&tmp, sizeof(unsigned int))) {
- sprintf(errBuf, "udp - setsockopt ttl");
- UDPTRACE("UDP error - setsockopt\n");
- Tcl_SetObjResult(interp, Tcl_NewStringObj(errBuf, -1));
+ Tcl_SetObjResult(interp, ErrorToObj("error setting -ttl"));
r = TCL_ERROR;
} else {
Tcl_SetObjResult(interp, Tcl_NewIntObj(tmp));
return r;
}
+static Tcl_Obj *
+ErrorToObj(const char * prefix)
+{
+ extern int errno;
+ Tcl_Obj *errObj = Tcl_NewStringObj(prefix, -1);
+#ifdef HAVE_STRERROR
+ Tcl_AppendStringsToObj(errObj, ": ", strerror(errno), NULL);
+#endif
+ return errObj;
+}
+
/*
* ----------------------------------------------------------------------
* udpTrace --
#
# RCS: @(#) $Id$
-AC_PREREQ(2.50)
+AC_PREREQ(2.57)
dnl TEA extensions pass us the version of TEA they think they
dnl are compatible with (must be set in TEA_INIT below)
-dnl TEA_VERSION="3.5"
+dnl TEA_VERSION="3.6"
# Possible values for key variables defined:
#
TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
TCL_LIB_VERSIONS_OK=ok
- CFLAGS="${CPPFLAGS} ${CFLAGS}"
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE=-O
if test "$GCC" = "yes" ; then
#AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
#LIBS="$LIBS -lxnet" # Use the XOPEN network library
- SHLIB_SUFFIX=".sl"
+ if test "`uname -m`" = "ia64" ; then
+ SHLIB_SUFFIX=".so"
+ else
+ SHLIB_SUFFIX=".sl"
+ fi
AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
if test "$tcl_ok" = yes; then
SHLIB_CFLAGS="+z"
CFLAGS_OPTIMIZE="-Os"
SHLIB_CFLAGS="-fno-common"
# To avoid discrepancies between what headers configure sees during
- # preprocessing tests and compiling tests, add any -isysroot and
- # -mmacosx-version-min flags present in CFLAGS to CPPFLAGS:
+ # preprocessing tests and compiling tests, move any -isysroot and
+ # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
- awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=1;i<=NF;i++) \
+ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
if ([$]i~/^(isysroot|mmacosx-version-min)/) print "-"[$]i}'`"
+ CFLAGS="`echo " ${CFLAGS}" | \
+ awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
+ if (!([$]i~/^(isysroot|mmacosx-version-min)/)) print "-"[$]i}'`"
if test $do64bit = yes; then
case `arch` in
ppc)
DL_LIBS=""
# Don't use -prebind when building for Mac OS X 10.4 or later only:
test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
- "`echo "${CFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4 && \
+ "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4 && \
LDFLAGS="$LDFLAGS -prebind"
LDFLAGS="$LDFLAGS -headerpad_max_install_names"
AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [
AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
fi
+dnl # Add any CPPFLAGS set in the environment to our CFLAGS, but delay doing so
+dnl # until the end of configure, as configure's compile and link tests use
+dnl # both CPPFLAGS and CFLAGS (unlike our compile and link) but configure's
+dnl # preprocessing tests use only CPPFLAGS.
+ AC_CONFIG_COMMANDS_PRE([CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""])
+
# Step 4: disable dynamic loading if requested via a command-line switch.
AC_ARG_ENABLE(load,
AC_DEFUN([TEA_INIT], [
# TEA extensions pass this us the version of TEA they think they
# are compatible with.
- TEA_VERSION="3.5"
+ TEA_VERSION="3.6"
AC_MSG_CHECKING([for correct TEA configuration])
if test x"${PACKAGE_NAME}" = x ; then
#------------------------------------------------------------------------
if test -z "$no_pipe" -a -n "$GCC"; then
- AC_MSG_CHECKING([if the compiler understands -pipe])
- OLDCC="$CC"
- CC="$CC -pipe"
- AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC"
- AC_MSG_RESULT([no]))
+ AC_CACHE_CHECK([if the compiler understands -pipe],
+ tcl_cv_cc_pipe, [
+ hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
+ AC_TRY_COMPILE(,, tcl_cv_cc_pipe=yes, tcl_cv_cc_pipe=no)
+ CFLAGS=$hold_cflags])
+ if test $tcl_cv_cc_pipe = yes; then
+ CFLAGS="$CFLAGS -pipe"
+ fi
fi
#--------------------------------------------------------------------
TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"; fi
;;
esac
+ else
+ if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
+ AC_MSG_ERROR([Cannot find private header tclInt.h in ${TCL_SRC_DIR}])
+ fi
fi
+
AC_SUBST(TCL_TOP_DIR_NATIVE)
AC_SUBST(TCL_GENERIC_DIR_NATIVE)
AC_SUBST(TCL_UNIX_DIR_NATIVE)
TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"; fi
;;
esac
+ else
+ if test ! -f "${TK_SRC_DIR}/generic/tkInt.h" ; then
+ AC_MSG_ERROR([Cannot find private header tkInt.h in ${TK_SRC_DIR}])
+ fi
fi
AC_SUBST(TK_TOP_DIR_NATIVE)
# Some tests are marked as slow as they can take 30s to test a volume of packets.
# We generally just test for correctness and these do not significantly contribute
# in testing correctness.
-::tcltest::testConstraint slow 0
+::tcltest::testConstraint slow 1
# Enable printing timing information during some tests.
-::tcltest::testConstraint timestamp 0
+::tcltest::testConstraint timestamp 1
set scriptName [makeFile {} udptest2.tcl]
set script {