AC_DEFUN(TCLUDP_CHECK_CLOEXEC, [
AC_CHECK_HEADERS(fcntl.h)
- AC_CACHE_CHECK([check for usable FD_CLOEXEC flag],tcludp_cloexec,
+ AC_CACHE_CHECK([for usable FD_CLOEXEC flag],tcludp_cloexec,
AC_TRY_COMPILE([
#if HAVE_UNISTD_H
#include <unistd.h>
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CYGPATH EXEEXT PKG_LIB_FILE PKG_STUB_LIB_FILE PKG_STUB_SOURCES PKG_STUB_OBJECTS PKG_TCL_SOURCES PKG_HEADERS PKG_INCLUDES PKG_LIBS PKG_CFLAGS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS CLEANFILES TCL_INCLUDES TCL_THREADS SHARED_BUILD AR CELIB_DIR LIBOBJS DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS LD_LIBRARY_PATH_VAR TCL_DBGX CFLAGS_DEFAULT LDFLAGS_DEFAULT MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB TCLSH_PROG DTPLITE ac_pt_DTPLITE LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CYGPATH EXEEXT PKG_LIB_FILE PKG_STUB_LIB_FILE PKG_STUB_SOURCES PKG_STUB_OBJECTS PKG_TCL_SOURCES PKG_HEADERS PKG_INCLUDES PKG_LIBS PKG_CFLAGS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS CLEANFILES TCL_INCLUDES TCL_THREADS SHARED_BUILD AR CELIB_DIR LIBOBJS DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS LD_LIBRARY_PATH_VAR TCL_DBGX CFLAGS_DEFAULT LDFLAGS_DEFAULT MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB TCLSH_PROG DTPLITE ac_pt_DTPLITE CONFIGURE_OUTPUTS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
# Load the tkConfig.sh file if necessary (Tk extension)
#--------------------------------------------------------------------
-#TEA_PATH_TKCONFIG
-#TEA_LOAD_TKCONFIG
#-----------------------------------------------------------------------
# Handle the --prefix=... option by defaulting to what Tcl gave.
_ACEOF
CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
- #TEA_ADD_SOURCES([win/winFile.c])
- #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
- vars="-lws2_32"
+ vars="ws2_32.lib"
for i in $vars; do
if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
# Convert foo.lib to -lfoo for GCC. No-op if not *.lib
else
CLEANFILES="pkgIndex.tcl"
- #TEA_ADD_SOURCES([unix/unixFile.c])
- #TEA_ADD_LIBS([-lsuperfly])
-fi
+ fi
#--------------------------------------------------------------------
-#TEA_PRIVATE_TCL_HEADERS
-#TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TK_HEADERS
-#TEA_PATH_X
#--------------------------------------------------------------------
# Check whether --enable-threads or --disable-threads was given.
#define USE_TCL_STUBS 1
_ACEOF
-#AC_DEFINE(USE_TK_STUBS)
#--------------------------------------------------------------------
# Additional headers or symbols needed for the tcludp projects.
done
- echo "$as_me:$LINENO: checking check for usable FD_CLOEXEC flag" >&5
-echo $ECHO_N "checking check for usable FD_CLOEXEC flag... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for usable FD_CLOEXEC flag" >&5
+echo $ECHO_N "checking for usable FD_CLOEXEC flag... $ECHO_C" >&6
if test "${tcludp_cloexec+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
echo "${ECHO_T}${TCLSH_PROG}" >&6
-#TEA_PROG_WISH
# -------------------------------------------------------------------
# Find a usable dtplite (from tcllib) to use in document generation.
#--------------------------------------------------------------------
# Finally, substitute all of the various values into the Makefile.
# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in. Include these here.
+# which require substituting the AC variables in. Include these here.
#--------------------------------------------------------------------
+CONFIGURE_OUTPUTS="Makefile config.cache config.log config.status"
+
ac_config_files="$ac_config_files Makefile"
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
s,@TCLSH_PROG@,$TCLSH_PROG,;t t
s,@DTPLITE@,$DTPLITE,;t t
s,@ac_pt_DTPLITE@,$ac_pt_DTPLITE,;t t
+s,@CONFIGURE_OUTPUTS@,$CONFIGURE_OUTPUTS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
# Load the tkConfig.sh file if necessary (Tk extension)
#--------------------------------------------------------------------
-#TEA_PATH_TKCONFIG
-#TEA_LOAD_TKCONFIG
+dnl#TEA_PATH_TKCONFIG
+dnl#TEA_LOAD_TKCONFIG
#-----------------------------------------------------------------------
# Handle the --prefix=... option by defaulting to what Tcl gave.
if test "${TEA_PLATFORM}" = "windows" ; then
AC_DEFINE(BUILD_udp)
CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
- #TEA_ADD_SOURCES([win/winFile.c])
- #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
- TEA_ADD_LIBS([-lws2_32])
+ dnl#TEA_ADD_SOURCES([win/winFile.c])
+ dnl#TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
+ TEA_ADD_LIBS([ws2_32.lib])
else
CLEANFILES="pkgIndex.tcl"
- #TEA_ADD_SOURCES([unix/unixFile.c])
- #TEA_ADD_LIBS([-lsuperfly])
+ dnl#TEA_ADD_SOURCES([unix/unixFile.c])
+ dnl#TEA_ADD_LIBS([-lsuperfly])
fi
AC_SUBST(CLEANFILES)
#--------------------------------------------------------------------
TEA_PUBLIC_TCL_HEADERS
-#TEA_PRIVATE_TCL_HEADERS
+dnl#TEA_PRIVATE_TCL_HEADERS
-#TEA_PUBLIC_TK_HEADERS
-#TEA_PRIVATE_TK_HEADERS
-#TEA_PATH_X
+dnl#TEA_PUBLIC_TK_HEADERS
+dnl#TEA_PRIVATE_TK_HEADERS
+dnl#TEA_PATH_X
#--------------------------------------------------------------------
# Check whether --enable-threads or --disable-threads was given.
#--------------------------------------------------------------------
AC_DEFINE(USE_TCL_STUBS)
-#AC_DEFINE(USE_TK_STUBS)
+dnl#AC_DEFINE(USE_TK_STUBS)
#--------------------------------------------------------------------
# Additional headers or symbols needed for the tcludp projects.
#--------------------------------------------------------------------
TEA_PROG_TCLSH
-#TEA_PROG_WISH
+dnl#TEA_PROG_WISH
# -------------------------------------------------------------------
# Find a usable dtplite (from tcllib) to use in document generation.
#--------------------------------------------------------------------
# Finally, substitute all of the various values into the Makefile.
# You may alternatively have a special pkgIndex.tcl.in or other files
-# which require substituting th AC variables in. Include these here.
+# which require substituting the AC variables in. Include these here.
#--------------------------------------------------------------------
-AC_OUTPUT([Makefile])
+CONFIGURE_OUTPUTS="Makefile config.cache config.log config.status"
+AC_SUBST(CONFIGURE_OUTPUTS)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
fcntl(sock, F_SETFD, FD_CLOEXEC);
#else
#ifdef WIN32
- if (SetHandleInformation(sock, HANDLE_FLAG_INHERIT, 0) == 0) {
- Tcl_AppendResult(interp, "failed to set close-on-exec bit", NULL);
- return TCL_ERROR;
+ if (SetHandleInformation((HANDLE)sock, HANDLE_FLAG_INHERIT, 0) == 0) {
+ Tcl_AppendResult(interp, "failed to set close-on-exec bit", NULL);
+ return TCL_ERROR;
}
#endif /* WIN32 */
#endif /* HAVE_FLAG_FD_CLOEXEC */