configure
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:266k
- LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- ;;
- MP-RAS-02*)
- SHLIB_CFLAGS="-K PIC"
- SHLIB_LD="cc -G"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- MP-RAS-*)
- SHLIB_CFLAGS="-K PIC"
- SHLIB_LD="cc -G"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- LDFLAGS="$LDFLAGS -Wl,-Bexport"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- NetBSD-*|FreeBSD-[1-2].*)
- # Not available on all versions: check for include file.
- ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
- echo "configure:3274: checking for dlfcn.h" >&5
- if eval "test "`echo '$''{'ac_cv_header_$ac_safe'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 3279 "configure"
- #include "confdefs.h"
- #include <dlfcn.h>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:3284: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_header_'$ac_safe`" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- # NetBSD/SPARC needs -fPIC, -fpic will not do.
- SHLIB_CFLAGS="-fPIC"
- SHLIB_LD="ld -Bshareable -x"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
- echo $ac_n "checking for ELF""... $ac_c" 1>&6
- echo "configure:3311: checking for ELF" >&5
- if eval "test "`echo '$''{'tcl_cv_ld_elf'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 3317 "configure"
- #include "confdefs.h"
- #ifdef __ELF__
- yes
- #endif
-
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
- tcl_cv_ld_elf=yes
- else
- rm -rf conftest*
- tcl_cv_ld_elf=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_ld_elf" 1>&6
- if test $tcl_cv_ld_elf = yes; then
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.so'
- else
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.so.1.0'
- fi
-
- else
- echo "$ac_t""no" 1>&6
- SHLIB_CFLAGS=""
- SHLIB_LD="echo tclLdAout $CC {$SHLIB_CFLAGS} | `pwd`/tclsh -r"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".a"
- DL_OBJS="tclLoadAout.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.a'
-
- fi
- # FreeBSD doesn't handle version numbers with dots.
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.a'
- TCL_LIB_VERSIONS_OK=nodots
- ;;
- OpenBSD-*)
- case `arch -s` in
- m88k|vax)
- SHLIB_CFLAGS=""
- SHLIB_LD="echo tclLdAout $CC {$SHLIB_CFLAGS} | `pwd`/tclsh -r"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".a"
- DL_OBJS="tclLoadAout.o"
- DL_LIBS=""
- LDFLAGS=""
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.a'
- ;;
- *)
- # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
- case `machine` in
- sparc|sparc64)
- SHLIB_CFLAGS="-fPIC";;
- *)
- SHLIB_CFLAGS="-fpic";;
- esac
- SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.so.1.0'
- echo $ac_n "checking for ELF""... $ac_c" 1>&6
- echo "configure:3396: checking for ELF" >&5
- if eval "test "`echo '$''{'tcl_cv_ld_elf'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 3402 "configure"
- #include "confdefs.h"
- #ifdef __ELF__
- yes
- #endif
-
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
- tcl_cv_ld_elf=yes
- else
- rm -rf conftest*
- tcl_cv_ld_elf=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_ld_elf" 1>&6
- if test $tcl_cv_ld_elf = yes; then
- LDFLAGS=-Wl,-export-dynamic
- else
- LDFLAGS=""
- fi
- ;;
- esac
- # OpenBSD doesn't do version numbers with dots.
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.a'
- TCL_LIB_VERSIONS_OK=nodots
- ;;
- FreeBSD-*)
- # FreeBSD 3.* and greater have ELF.
- SHLIB_CFLAGS="-fPIC"
- SHLIB_LD="ld -Bshareable -x"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- LDFLAGS="$LDFLAGS -export-dynamic"
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
- if test "${TCL_THREADS}" = "1" ; then
- # The -pthread needs to go in the CFLAGS, not LIBS
- LIBS=`echo $LIBS | sed s/-pthread//`
- CFLAGS="$CFLAGS -pthread"
- LDFLAGS="$LDFLAGS -pthread"
- fi
- case $system in
- FreeBSD-3.*)
- # FreeBSD-3 doesn't handle version numbers with dots.
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.a'
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.so'
- TCL_LIB_VERSIONS_OK=nodots
- ;;
- esac
- ;;
- Darwin-*)
- CFLAGS_OPTIMIZE="-Os"
- SHLIB_CFLAGS="-fno-common"
- # To avoid discrepancies between what headers configure sees during
- # 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=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)
- echo $ac_n "checking if compiler accepts -arch ppc64 flag""... $ac_c" 1>&6
- echo "configure:3477: checking if compiler accepts -arch ppc64 flag" >&5
- if eval "test "`echo '$''{'tcl_cv_cc_arch_ppc64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_cflags=$CFLAGS
- CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
- cat > conftest.$ac_ext <<EOF
- #line 3485 "configure"
- #include "confdefs.h"
- int main() {
- ; return 0; }
- EOF
- if { (eval echo configure:3492: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_cc_arch_ppc64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_cc_arch_ppc64=no
- fi
- rm -f conftest*
- CFLAGS=$hold_cflags
- fi
- echo "$ac_t""$tcl_cv_cc_arch_ppc64" 1>&6
- if test $tcl_cv_cc_arch_ppc64 = yes; then
- CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
- do64bit_ok=yes
- fi;;
- i386)
- echo $ac_n "checking if compiler accepts -arch x86_64 flag""... $ac_c" 1>&6
- echo "configure:3512: checking if compiler accepts -arch x86_64 flag" >&5
- if eval "test "`echo '$''{'tcl_cv_cc_arch_x86_64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_cflags=$CFLAGS
- CFLAGS="$CFLAGS -arch x86_64"
- cat > conftest.$ac_ext <<EOF
- #line 3520 "configure"
- #include "confdefs.h"
- int main() {
- ; return 0; }
- EOF
- if { (eval echo configure:3527: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_cc_arch_x86_64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_cc_arch_x86_64=no
- fi
- rm -f conftest*
- CFLAGS=$hold_cflags
- fi
- echo "$ac_t""$tcl_cv_cc_arch_x86_64" 1>&6
- if test $tcl_cv_cc_arch_x86_64 = yes; then
- CFLAGS="$CFLAGS -arch x86_64"
- do64bit_ok=yes
- fi;;
- *)
- echo "configure: warning: Don't know how enable 64-bit on architecture `arch`" 1>&2;;
- esac
- else
- # Check for combined 32-bit and 64-bit fat build
- echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' &&
- echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' &&
- fat_32_64=yes
- fi
- SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS}'
- echo $ac_n "checking if ld accepts -single_module flag""... $ac_c" 1>&6
- echo "configure:3556: checking if ld accepts -single_module flag" >&5
- if eval "test "`echo '$''{'tcl_cv_ld_single_module'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_ldflags=$LDFLAGS
- LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
- cat > conftest.$ac_ext <<EOF
- #line 3564 "configure"
- #include "confdefs.h"
- int main() {
- int i;
- ; return 0; }
- EOF
- if { (eval echo configure:3571: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_ld_single_module=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_ld_single_module=no
- fi
- rm -f conftest*
- LDFLAGS=$hold_ldflags
- fi
- echo "$ac_t""$tcl_cv_ld_single_module" 1>&6
- if test $tcl_cv_ld_single_module = yes; then
- SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
- fi
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".dylib"
- DL_OBJS="tclLoadDyld.o"
- 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 "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\.' '{print int($2)}'`" -lt 4 &&
- LDFLAGS="$LDFLAGS -prebind"
- LDFLAGS="$LDFLAGS -headerpad_max_install_names"
- echo $ac_n "checking if ld accepts -search_paths_first flag""... $ac_c" 1>&6
- echo "configure:3598: checking if ld accepts -search_paths_first flag" >&5
- if eval "test "`echo '$''{'tcl_cv_ld_search_paths_first'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_ldflags=$LDFLAGS
- LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
- cat > conftest.$ac_ext <<EOF
- #line 3606 "configure"
- #include "confdefs.h"
- int main() {
- int i;
- ; return 0; }
- EOF
- if { (eval echo configure:3613: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_ld_search_paths_first=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_ld_search_paths_first=no
- fi
- rm -f conftest*
- LDFLAGS=$hold_ldflags
- fi
- echo "$ac_t""$tcl_cv_ld_search_paths_first" 1>&6
- if test $tcl_cv_ld_search_paths_first = yes; then
- LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
- fi
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
- PLAT_OBJS=$(MAC_OSX_OBJS)
- PLAT_SRCS=$(MAC_OSX_SRCS)
- echo $ac_n "checking whether to use CoreFoundation""... $ac_c" 1>&6
- echo "configure:3636: checking whether to use CoreFoundation" >&5
- # Check whether --enable-corefoundation or --disable-corefoundation was given.
- if test "${enable_corefoundation+set}" = set; then
- enableval="$enable_corefoundation"
- tcl_corefoundation=$enableval
- else
- tcl_corefoundation=yes
- fi
- echo "$ac_t""$tcl_corefoundation" 1>&6
- if test $tcl_corefoundation = yes; then
- echo $ac_n "checking for CoreFoundation.framework""... $ac_c" 1>&6
- echo "configure:3648: checking for CoreFoundation.framework" >&5
- if eval "test "`echo '$''{'tcl_cv_lib_corefoundation'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_libs=$LIBS
- if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
- # On Tiger there is no 64-bit CF, so remove 64-bit archs
- # from CFLAGS et al. while testing for presence of CF.
- # 64-bit CF is disabled in tclUnixPort.h if necessary.
- eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
- done; fi
- LIBS="$LIBS -framework CoreFoundation"
- cat > conftest.$ac_ext <<EOF
- #line 3662 "configure"
- #include "confdefs.h"
- #include <CoreFoundation/CoreFoundation.h>
- int main() {
- CFBundleRef b = CFBundleGetMainBundle();
- ; return 0; }
- EOF
- if { (eval echo configure:3669: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_lib_corefoundation=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_lib_corefoundation=no
- fi
- rm -f conftest*
- if test "$fat_32_64" = yes; then for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval $v'="$hold_'$v'"'
- done; fi; LIBS=$hold_libs
- fi
- echo "$ac_t""$tcl_cv_lib_corefoundation" 1>&6
- if test $tcl_cv_lib_corefoundation = yes; then
- LIBS="$LIBS -framework CoreFoundation"
- cat >> confdefs.h <<EOF
- #define HAVE_COREFOUNDATION 1
- EOF
- else
- tcl_corefoundation=no
- fi
- if test "$fat_32_64" = yes -a $tcl_corefoundation = yes; then
- echo $ac_n "checking for 64-bit CoreFoundation""... $ac_c" 1>&6
- echo "configure:3696: checking for 64-bit CoreFoundation" >&5
- if eval "test "`echo '$''{'tcl_cv_lib_corefoundation_64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
- done
- cat > conftest.$ac_ext <<EOF
- #line 3705 "configure"
- #include "confdefs.h"
- #include <CoreFoundation/CoreFoundation.h>
- int main() {
- CFBundleRef b = CFBundleGetMainBundle();
- ; return 0; }
- EOF
- if { (eval echo configure:3712: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_lib_corefoundation_64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_lib_corefoundation_64=no
- fi
- rm -f conftest*
- for v in CFLAGS CPPFLAGS LDFLAGS; do
- eval $v'="$hold_'$v'"'
- done
- fi
- echo "$ac_t""$tcl_cv_lib_corefoundation_64" 1>&6
- if test $tcl_cv_lib_corefoundation_64 = no; then
- cat >> confdefs.h <<EOF
- #define NO_COREFOUNDATION_64 1
- EOF
- fi
- fi
- fi
- cat >> confdefs.h <<EOF
- #define MAC_OSX_TCL 1
- EOF
- ;;
- NEXTSTEP-*)
- SHLIB_CFLAGS=""
- SHLIB_LD="cc -nostdlib -r"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadNext.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- OS/390-*)
- CFLAGS_OPTIMIZE="" # Optimizer is buggy
- cat >> confdefs.h <<EOF
- #define _OE_SOCKETS 1
- EOF
- # needed in sys/socket.h
- ;;
- OSF1-1.0|OSF1-1.1|OSF1-1.2)
- # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
- SHLIB_CFLAGS=""
- # Hack: make package name same as library name
- SHLIB_LD='ld -R -export :'
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadOSF.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- OSF1-1.*)
- # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
- SHLIB_CFLAGS="-fPIC"
- if test "$SHARED_BUILD" = "1" ; then
- SHLIB_LD="ld -shared"
- else
- SHLIB_LD="ld -non_shared"
- fi
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- OSF1-V*)
- # Digital OSF/1
- SHLIB_CFLAGS=""
- if test "$SHARED_BUILD" = "1" ; then
- SHLIB_LD='ld -shared -expect_unresolved "*"'
- else
- SHLIB_LD='ld -non_shared -expect_unresolved "*"'
- fi
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
- if test "$GCC" = "yes" ; then
- CFLAGS="$CFLAGS -mieee"
- else
- CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
- fi
- # see pthread_intro(3) for pthread support on osf1, k.furukawa
- if test "${TCL_THREADS}" = "1" ; then
- CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
- CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
- LIBS=`echo $LIBS | sed s/-lpthreads//`
- if test "$GCC" = "yes" ; then
- LIBS="$LIBS -lpthread -lmach -lexc"
- else
- CFLAGS="$CFLAGS -pthread"
- LDFLAGS="$LDFLAGS -pthread"
- fi
- fi
- ;;
- QNX-6*)
- # QNX RTP
- # This may work for all QNX, but it was only reported for v6.
- SHLIB_CFLAGS="-fPIC"
- SHLIB_LD="ld -Bshareable -x"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- # dlopen is in -lc on QNX
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- RISCos-*)
- SHLIB_CFLAGS="-G 0"
- SHLIB_LD="echo tclLdAout $CC {$SHLIB_CFLAGS} | `pwd`/tclsh -r -G 0"
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".a"
- DL_OBJS="tclLoadAout.o"
- DL_LIBS=""
- LDFLAGS="$LDFLAGS -Wl,-D,08000000"
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- ;;
- SCO_SV-3.2*)
- # 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.
- if test "$GCC" = "yes" ; then
- SHLIB_CFLAGS="-fPIC -melf"
- LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
- else
- SHLIB_CFLAGS="-Kpic -belf"
- LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
- fi
- SHLIB_LD="ld -G"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS=""
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- SINIX*5.4*)
- SHLIB_CFLAGS="-K PIC"
- SHLIB_LD="cc -G"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- SunOS-4*)
- SHLIB_CFLAGS="-PIC"
- SHLIB_LD="ld"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- # SunOS can't handle version numbers with dots in them in library
- # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
- # requires an extra version number at the end of .so file names.
- # So, the library has to have a name like libtcl75.so.1.0
- SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.so.1.0'
- UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}${DBGX}.a'
- TCL_LIB_VERSIONS_OK=nodots
- ;;
- SunOS-5.[0-6])
- # Careful to not let 5.10+ fall into this case
- # Note: If _REENTRANT isn't defined, then Solaris
- # won't define thread-safe library routines.
- cat >> confdefs.h <<EOF
- #define _REENTRANT 1
- EOF
- cat >> confdefs.h <<EOF
- #define _POSIX_PTHREAD_SEMANTICS 1
- EOF
- SHLIB_CFLAGS="-KPIC"
- # Note: need the LIBS below, otherwise Tk won't find Tcl's
- # symbols when dynamically loaded into tclsh.
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- if test "$GCC" = "yes" ; then
- SHLIB_LD="$CC -shared"
- CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- else
- SHLIB_LD="/usr/ccs/bin/ld -G -z text"
- CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- fi
- ;;
- SunOS-5*)
- # Note: If _REENTRANT isn't defined, then Solaris
- # won't define thread-safe library routines.
- cat >> confdefs.h <<EOF
- #define _REENTRANT 1
- EOF
- cat >> confdefs.h <<EOF
- #define _POSIX_PTHREAD_SEMANTICS 1
- EOF
- SHLIB_CFLAGS="-KPIC"
- # Check to enable 64-bit flags for compiler/linker
- if test "$do64bit" = "yes" ; then
- arch=`isainfo`
- if test "$arch" = "sparcv9 sparc" ; then
- if test "$GCC" = "yes" ; then
- if test "`gcc -dumpversion | awk -F. '{print $1}'`" -lt "3" ; then
- echo "configure: warning: 64bit mode not supported with GCC < 3.2 on $system" 1>&2
- else
- do64bit_ok=yes
- CFLAGS="$CFLAGS -m64 -mcpu=v9"
- LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
- SHLIB_CFLAGS="-fPIC"
- fi
- else
- do64bit_ok=yes
- if test "$do64bitVIS" = "yes" ; then
- CFLAGS="$CFLAGS -xarch=v9a"
- LDFLAGS="$LDFLAGS -xarch=v9a"
- else
- CFLAGS="$CFLAGS -xarch=v9"
- LDFLAGS="$LDFLAGS -xarch=v9"
- fi
- # Solaris 64 uses this as well
- #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
- fi
- elif test "$arch" = "amd64 i386" ; then
- if test "$GCC" = "yes" ; then
- echo "configure: warning: 64bit mode not supported with GCC on $system" 1>&2
- else
- do64bit_ok=yes
- CFLAGS="$CFLAGS -xarch=amd64"
- LDFLAGS="$LDFLAGS -xarch=amd64"
- fi
- else
- echo "configure: warning: 64bit mode not supported for $arch" 1>&2
- fi
- fi
-
- # Note: need the LIBS below, otherwise Tk won't find Tcl's
- # symbols when dynamically loaded into tclsh.
- SHLIB_LD_LIBS='${LIBS}'
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- if test "$GCC" = "yes" ; then
- SHLIB_LD="$CC -shared"
- CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- if test "$do64bit_ok" = "yes" ; then
- # We need to specify -static-libgcc or we need to
- # add the path to the sparv9 libgcc.
- SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
- # for finding sparcv9 libgcc, get the regular libgcc
- # path, remove so name and append 'sparcv9'
- #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
- #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
- fi
- else
- case $system in
- SunOS-5.[1-9][0-9]*)
- SHLIB_LD='${CC} -G -z text';;
- *)
- SHLIB_LD="/usr/ccs/bin/ld -G -z text";;
- esac
- CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
- fi
- ;;
- ULTRIX-4.*)
- SHLIB_CFLAGS="-G 0"
- SHLIB_SUFFIX=".a"
- SHLIB_LD="echo tclLdAout $CC {$SHLIB_CFLAGS} | `pwd`/tclsh -r -G 0"
- SHLIB_LD_LIBS='${LIBS}'
- DL_OBJS="tclLoadAout.o"
- DL_LIBS=""
- LDFLAGS="$LDFLAGS -Wl,-D,08000000"
- CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
- if test "$GCC" != "yes" ; then
- CFLAGS="$CFLAGS -DHAVE_TZSET -std1"
- fi
- ;;
- UNIX_SV* | UnixWare-5*)
- SHLIB_CFLAGS="-KPIC"
- SHLIB_LD="cc -G"
- SHLIB_LD_LIBS=""
- SHLIB_SUFFIX=".so"
- DL_OBJS="tclLoadDl.o"
- DL_LIBS="-ldl"
- # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
- # that don't grok the -Bexport option. Test that it does.
- echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
- echo "configure:4032: checking for ld accepts -Bexport flag" >&5
- if eval "test "`echo '$''{'tcl_cv_ld_Bexport'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- hold_ldflags=$LDFLAGS
- LDFLAGS="$LDFLAGS -Wl,-Bexport"
- cat > conftest.$ac_ext <<EOF
- #line 4040 "configure"
- #include "confdefs.h"
- int main() {
- int i;
- ; return 0; }
- EOF
- if { (eval echo configure:4047: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- tcl_cv_ld_Bexport=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_ld_Bexport=no
- fi
- rm -f conftest*
- LDFLAGS=$hold_ldflags
- fi
- echo "$ac_t""$tcl_cv_ld_Bexport" 1>&6
- if test $tcl_cv_ld_Bexport = yes; then
- LDFLAGS="$LDFLAGS -Wl,-Bexport"
- fi
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- ;;
- esac
- if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
- echo "configure: warning: 64bit support being disabled -- don't know magic for this platform" 1>&2
- fi
-
-
- # Step 4: If pseudo-static linking is in use (see K. B. Kenny, "Dynamic
- # Loading for Tcl -- What Became of It?". Proc. 2nd Tcl/Tk Workshop,
- # New Orleans, LA, Computerized Processes Unlimited, 1994), then we need
- # to determine which of several header files defines the a.out file
- # format (a.out.h, sys/exec.h, or sys/exec_aout.h). At present, we
- # support only a file format that is more or less version-7-compatible.
- # In particular,
- # - a.out files must begin with `struct exec'.
- # - the N_TXTOFF on the `struct exec' must compute the seek address
- # of the text segment
- # - The `struct exec' must contain a_magic, a_text, a_data, a_bss
- # and a_entry fields.
- # The following compilation should succeed if and only if either sys/exec.h
- # or a.out.h is usable for the purpose.
- #
- # Note that the modified COFF format used on MIPS Ultrix 4.x is usable; the
- # `struct exec' includes a second header that contains information that
- # duplicates the v7 fields that are needed.
- if test "x$DL_OBJS" = "xtclLoadAout.o" ; then
- echo $ac_n "checking sys/exec.h""... $ac_c" 1>&6
- echo "configure:4097: checking sys/exec.h" >&5
- if eval "test "`echo '$''{'tcl_cv_sysexec_h'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 4103 "configure"
- #include "confdefs.h"
- #include <sys/exec.h>
- int main() {
- struct exec foo;
- unsigned long seek;
- int flag;
- #if defined(__mips) || defined(mips)
- seek = N_TXTOFF (foo.ex_f, foo.ex_o);
- #else
- seek = N_TXTOFF (foo);
- #endif
- flag = (foo.a_magic == OMAGIC);
- return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-
- ; return 0; }
- EOF
- if { (eval echo configure:4121: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_sysexec_h=usable
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_sysexec_h=unusable
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_sysexec_h" 1>&6
- if test $tcl_cv_sysexec_h = usable; then
- cat >> confdefs.h <<EOF
- #define USE_SYS_EXEC_H 1
- EOF
- else
- echo $ac_n "checking a.out.h""... $ac_c" 1>&6
- echo "configure:4141: checking a.out.h" >&5
- if eval "test "`echo '$''{'tcl_cv_aout_h'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 4147 "configure"
- #include "confdefs.h"
- #include <a.out.h>
- int main() {
- struct exec foo;
- unsigned long seek;
- int flag;
- #if defined(__mips) || defined(mips)
- seek = N_TXTOFF (foo.ex_f, foo.ex_o);
- #else
- seek = N_TXTOFF (foo);
- #endif
- flag = (foo.a_magic == OMAGIC);
- return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-
- ; return 0; }
- EOF
- if { (eval echo configure:4165: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_aout_h=usable
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_aout_h=unusable
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_aout_h" 1>&6
- if test $tcl_cv_aout_h = usable; then
- cat >> confdefs.h <<EOF
- #define USE_A_OUT_H 1
- EOF
- else
- echo $ac_n "checking sys/exec_aout.h""... $ac_c" 1>&6
- echo "configure:4185: checking sys/exec_aout.h" >&5
- if eval "test "`echo '$''{'tcl_cv_sysexecaout_h'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 4191 "configure"
- #include "confdefs.h"
- #include <sys/exec_aout.h>
- int main() {
- struct exec foo;
- unsigned long seek;
- int flag;
- #if defined(__mips) || defined(mips)
- seek = N_TXTOFF (foo.ex_f, foo.ex_o);
- #else
- seek = N_TXTOFF (foo);
- #endif
- flag = (foo.a_midmag == OMAGIC);
- return foo.a_text + foo.a_data + foo.a_bss + foo.a_entry;
-
- ; return 0; }
- EOF
- if { (eval echo configure:4209: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_sysexecaout_h=usable
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_sysexecaout_h=unusable
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_sysexecaout_h" 1>&6
- if test $tcl_cv_sysexecaout_h = usable; then
- cat >> confdefs.h <<EOF
- #define USE_SYS_EXEC_AOUT_H 1
- EOF
- else
- DL_OBJS=""
- fi
- fi
- fi
- fi
- # Step 5: disable dynamic loading if requested via a command-line switch.
- # Check whether --enable-load or --disable-load was given.
- if test "${enable_load+set}" = set; then
- enableval="$enable_load"
- tcl_ok=$enableval
- else
- tcl_ok=yes
- fi
- if test "$tcl_ok" = "no"; then
- DL_OBJS=""
- fi
- if test "x$DL_OBJS" != "x" ; then
- BUILD_DLTEST="$(DLTEST_TARGETS)"
- else
- echo "Can't figure out how to do dynamic loading or shared libraries"
- echo "on this system."
- SHLIB_CFLAGS=""
- SHLIB_LD=""
- SHLIB_SUFFIX=""
- DL_OBJS="tclLoadNone.o"
- DL_LIBS=""
- LDFLAGS="$LDFLAGS_ORIG"
- CC_SEARCH_FLAGS=""
- LD_SEARCH_FLAGS=""
- BUILD_DLTEST=""
- fi
- # If we're running gcc, then change the C flags for compiling shared
- # libraries to the right flags for gcc, instead of those for the
- # standard manufacturer compiler.
- if test "$DL_OBJS" != "tclLoadNone.o" ; then
- if test "$GCC" = "yes" ; then
- case $system in
- AIX-*)
- ;;
- BSD/OS*)
- ;;
- IRIX*)
- ;;
- NetBSD-*|FreeBSD-*|OpenBSD-*)
- ;;
- Darwin-*)
- ;;
- RISCos-*)
- ;;
- SCO_SV-3.2*)
- ;;
- ULTRIX-4.*)
- ;;
- *)
- SHLIB_CFLAGS="-fPIC"
- ;;
- esac
- fi
- fi
- if test "$SHARED_LIB_SUFFIX" = "" ; then
- SHARED_LIB_SUFFIX='${VERSION}${DBGX}${SHLIB_SUFFIX}'
- fi
- if test "$UNSHARED_LIB_SUFFIX" = "" ; then
- UNSHARED_LIB_SUFFIX='${VERSION}${DBGX}.a'
- fi
- if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
- LIB_SUFFIX=${SHARED_LIB_SUFFIX}
- MAKE_LIB='${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
- else
- LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
- if test "$RANLIB" = "" ; then
- MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
- else
- MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
- fi
- fi
- # Stub lib does not depend on shared/static configuration
- if test "$RANLIB" = "" ; then
- MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
- INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
- else
- MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
- INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
- fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
- echo "configure:4362: checking for build with symbols" >&5
- # Check whether --enable-symbols or --disable-symbols was given.
- if test "${enable_symbols+set}" = set; then
- enableval="$enable_symbols"
- tcl_ok=$enableval
- else
- tcl_ok=no
- fi
- # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
- if test "$tcl_ok" = "no"; then
- CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
- LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
- DBGX=""
- echo "$ac_t""no" 1>&6
- else
- CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
- LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
- DBGX=g
- if test "$tcl_ok" = "yes"; then
- echo "$ac_t""yes (standard debugging)" 1>&6
- fi
- fi
-
-
- if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
- cat >> confdefs.h <<EOF
- #define TCL_MEM_DEBUG 1
- EOF
- fi
- if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
- cat >> confdefs.h <<EOF
- #define TCL_COMPILE_DEBUG 1
- EOF
- cat >> confdefs.h <<EOF
- #define TCL_COMPILE_STATS 1
- EOF
- fi
- if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
- if test "$tcl_ok" = "all"; then
- echo "$ac_t""enabled symbols mem compile debugging" 1>&6
- else
- echo "$ac_t""enabled $tcl_ok debugging" 1>&6
- fi
- fi
- TCL_DBGX=${DBGX}
- #--------------------------------------------------------------------
- # Detect what compiler flags to set for 64-bit support.
- #--------------------------------------------------------------------
- echo $ac_n "checking for required early compiler flags""... $ac_c" 1>&6
- echo "configure:4423: checking for required early compiler flags" >&5
- tcl_flags=""
-
- if eval "test "`echo '$''{'tcl_cv_flag__isoc99_source'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4430 "configure"
- #include "confdefs.h"
- #include <stdlib.h>
- int main() {
- char *p = (char *)strtoll; char *q = (char *)strtoull;
- ; return 0; }
- EOF
- if { (eval echo configure:4437: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_flag__isoc99_source=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cat > conftest.$ac_ext <<EOF
- #line 4445 "configure"
- #include "confdefs.h"
- #define _ISOC99_SOURCE 1
- #include <stdlib.h>
- int main() {
- char *p = (char *)strtoll; char *q = (char *)strtoull;
- ; return 0; }
- EOF
- if { (eval echo configure:4453: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_flag__isoc99_source=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_flag__isoc99_source=no
- fi
- rm -f conftest*
- fi
- rm -f conftest*
- fi
- if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
- cat >> confdefs.h <<EOF
- #define _ISOC99_SOURCE 1
- EOF
- tcl_flags="$tcl_flags _ISOC99_SOURCE"
- fi
-
- if eval "test "`echo '$''{'tcl_cv_flag__largefile64_source'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4480 "configure"
- #include "confdefs.h"
- #include <sys/stat.h>
- int main() {
- struct stat64 buf; int i = stat64("/", &buf);
- ; return 0; }
- EOF
- if { (eval echo configure:4487: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_flag__largefile64_source=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cat > conftest.$ac_ext <<EOF
- #line 4495 "configure"
- #include "confdefs.h"
- #define _LARGEFILE64_SOURCE 1
- #include <sys/stat.h>
- int main() {
- struct stat64 buf; int i = stat64("/", &buf);
- ; return 0; }
- EOF
- if { (eval echo configure:4503: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_flag__largefile64_source=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_flag__largefile64_source=no
- fi
- rm -f conftest*
- fi
- rm -f conftest*
- fi
- if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
- cat >> confdefs.h <<EOF
- #define _LARGEFILE64_SOURCE 1
- EOF
- tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
- fi
-
- if eval "test "`echo '$''{'tcl_cv_flag__largefile_source64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4530 "configure"
- #include "confdefs.h"
- #include <sys/stat.h>
- int main() {
- char *p = (char *)open64;
- ; return 0; }
- EOF
- if { (eval echo configure:4537: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_flag__largefile_source64=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- cat > conftest.$ac_ext <<EOF
- #line 4545 "configure"
- #include "confdefs.h"
- #define _LARGEFILE_SOURCE64 1
- #include <sys/stat.h>
- int main() {
- char *p = (char *)open64;
- ; return 0; }
- EOF
- if { (eval echo configure:4553: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_flag__largefile_source64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_flag__largefile_source64=no
- fi
- rm -f conftest*
- fi
- rm -f conftest*
- fi
- if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
- cat >> confdefs.h <<EOF
- #define _LARGEFILE_SOURCE64 1
- EOF
- tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
- fi
- if test "x${tcl_flags}" = "x" ; then
- echo "$ac_t""none" 1>&6
- else
- echo "$ac_t""${tcl_flags}" 1>&6
- fi
- echo $ac_n "checking for 64-bit integer type""... $ac_c" 1>&6
- echo "configure:4584: checking for 64-bit integer type" >&5
- if eval "test "`echo '$''{'tcl_cv_type_64bit'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- tcl_cv_type_64bit=none
- # See if the compiler knows natively about __int64
- cat > conftest.$ac_ext <<EOF
- #line 4592 "configure"
- #include "confdefs.h"
- int main() {
- __int64 value = (__int64) 0;
- ; return 0; }
- EOF
- if { (eval echo configure:4599: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_type_64bit=__int64
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_type_64bit="long long"
- fi
- rm -f conftest*
- # See if we should use long anyway Note that we substitute in the
- # type that is our current guess for a 64-bit type inside this check
- # program, so it should be modified only carefully...
- cat > conftest.$ac_ext <<EOF
- #line 4613 "configure"
- #include "confdefs.h"
- int main() {
- switch (0) {
- case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
- }
- ; return 0; }
- EOF
- if { (eval echo configure:4622: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_type_64bit=${tcl_type_64bit}
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- fi
- if test "${tcl_cv_type_64bit}" = none ; then
- cat >> confdefs.h <<EOF
- #define TCL_WIDE_INT_IS_LONG 1
- EOF
- echo "$ac_t""using long" 1>&6
- else
- cat >> confdefs.h <<EOF
- #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
- EOF
- echo "$ac_t""${tcl_cv_type_64bit}" 1>&6
- # Now check for auxiliary declarations
- echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
- echo "configure:4647: checking for struct dirent64" >&5
- if eval "test "`echo '$''{'tcl_cv_struct_dirent64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 4653 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/dirent.h>
- int main() {
- struct dirent64 p;
- ; return 0; }
- EOF
- if { (eval echo configure:4661: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_struct_dirent64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_struct_dirent64=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_struct_dirent64" 1>&6
- if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
- cat >> confdefs.h <<EOF
- #define HAVE_STRUCT_DIRENT64 1
- EOF
- fi
- echo $ac_n "checking for struct stat64""... $ac_c" 1>&6
- echo "configure:4682: checking for struct stat64" >&5
- if eval "test "`echo '$''{'tcl_cv_struct_stat64'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 4688 "configure"
- #include "confdefs.h"
- #include <sys/stat.h>
- int main() {
- struct stat64 p;
- ; return 0; }
- EOF
- if { (eval echo configure:4696: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_struct_stat64=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_struct_stat64=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_struct_stat64" 1>&6
- if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
- cat >> confdefs.h <<EOF
- #define HAVE_STRUCT_STAT64 1
- EOF
- fi
- for ac_func in open64 lseek64
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:4719: checking for $ac_func" >&5
- if eval "test "`echo '$''{'ac_cv_func_$ac_func'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4724 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:4747: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- echo $ac_n "checking for off64_t""... $ac_c" 1>&6
- echo "configure:4772: checking for off64_t" >&5
- if eval "test "`echo '$''{'tcl_cv_type_off64_t'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 4778 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- int main() {
- off64_t offset;
- ; return 0; }
- EOF
- if { (eval echo configure:4786: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_type_off64_t=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_type_off64_t=no
- fi
- rm -f conftest*
- fi
- if test "x${tcl_cv_type_off64_t}" = "xyes" &&
- test "x${ac_cv_func_lseek64}" = "xyes" &&
- test "x${ac_cv_func_open64}" = "xyes" ; then
- cat >> confdefs.h <<EOF
- #define HAVE_TYPE_OFF64_T 1
- EOF
- echo "$ac_t""yes" 1>&6
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- #--------------------------------------------------------------------
- # Check endianness because we can optimize comparisons of
- # Tcl_UniChar strings to memcmp on big-endian systems.
- #--------------------------------------------------------------------
- echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
- echo "configure:4818: checking whether byte ordering is bigendian" >&5
- if eval "test "`echo '$''{'ac_cv_c_bigendian'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_cv_c_bigendian=unknown
- # See if sys/param.h defines the BYTE_ORDER macro.
- cat > conftest.$ac_ext <<EOF
- #line 4825 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/param.h>
- int main() {
- #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:4836: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- # It does; now see whether it defined to BIG_ENDIAN or not.
- cat > conftest.$ac_ext <<EOF
- #line 4840 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/param.h>
- int main() {
- #if BYTE_ORDER != BIG_ENDIAN
- not big endian
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:4851: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_c_bigendian=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_c_bigendian=no
- fi
- rm -f conftest*
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- if test $ac_cv_c_bigendian = unknown; then
- if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
- else
- cat > conftest.$ac_ext <<EOF
- #line 4871 "configure"
- #include "confdefs.h"
- main () {
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long l;
- char c[sizeof (long)];
- } u;
- u.l = 1;
- exit (u.c[sizeof (long) - 1] == 1);
- }
- EOF
- if { (eval echo configure:4884: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- ac_cv_c_bigendian=no
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_c_bigendian=yes
- fi
- rm -fr conftest*
- fi
- fi
- fi
- echo "$ac_t""$ac_cv_c_bigendian" 1>&6
- if test $ac_cv_c_bigendian = yes; then
- cat >> confdefs.h <<EOF
- #define WORDS_BIGENDIAN 1
- EOF
- fi
- #--------------------------------------------------------------------
- # Supply substitutes for missing POSIX library procedures, or
- # set flags so Tcl uses alternate procedures.
- #--------------------------------------------------------------------
- # Check if Posix compliant getcwd exists, if not we'll use getwd.
- for ac_func in getcwd
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:4917: checking for $ac_func" >&5
- if eval "test "`echo '$''{'ac_cv_func_$ac_func'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4922 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:4945: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- cat >> confdefs.h <<EOF
- #define USEGETWD 1
- EOF
- fi
- done
- # Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really
- # define USEGETWD even if the posix getcwd exists. Add a test ?
- for ac_func in opendir strstr strtol strtoll strtoull tmpnam waitpid
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:4979: checking for $ac_func" >&5
- if eval "test "`echo '$''{'ac_cv_func_$ac_func'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 4984 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5007: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
- fi
- done
- echo $ac_n "checking for strerror""... $ac_c" 1>&6
- echo "configure:5034: checking for strerror" >&5
- if eval "test "`echo '$''{'ac_cv_func_strerror'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5039 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char strerror(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* 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() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_strerror) || defined (__stub___strerror)
- choke me
- #else
- strerror();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5062: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_strerror=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_strerror=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'strerror`" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
- else
- echo "$ac_t""no" 1>&6
- cat >> confdefs.h <<EOF
- #define NO_STRERROR 1
- EOF
- fi
- echo $ac_n "checking for getwd""... $ac_c" 1>&6
- echo "configure:5086: checking for getwd" >&5
- if eval "test "`echo '$''{'ac_cv_func_getwd'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5091 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char getwd(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char getwd();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_getwd) || defined (__stub___getwd)
- choke me
- #else
- getwd();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5114: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_getwd=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_getwd=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'getwd`" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
- else
- echo "$ac_t""no" 1>&6
- cat >> confdefs.h <<EOF
- #define NO_GETWD 1
- EOF
- fi
- echo $ac_n "checking for wait3""... $ac_c" 1>&6
- echo "configure:5138: checking for wait3" >&5
- if eval "test "`echo '$''{'ac_cv_func_wait3'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5143 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char wait3(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char wait3();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_wait3) || defined (__stub___wait3)
- choke me
- #else
- wait3();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5166: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_wait3=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_wait3=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'wait3`" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
- else
- echo "$ac_t""no" 1>&6
- cat >> confdefs.h <<EOF
- #define NO_WAIT3 1
- EOF
- fi
- echo $ac_n "checking for uname""... $ac_c" 1>&6
- echo "configure:5190: checking for uname" >&5
- if eval "test "`echo '$''{'ac_cv_func_uname'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5195 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char uname(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char uname();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_uname) || defined (__stub___uname)
- choke me
- #else
- uname();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5218: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_uname=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_uname=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'uname`" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
- else
- echo "$ac_t""no" 1>&6
- cat >> confdefs.h <<EOF
- #define NO_UNAME 1
- EOF
- fi
- if test "`uname -s`" = "Darwin" && test "${TCL_THREADS}" = 1 &&
- test "`uname -r | awk -F. '{print $1}'`" -lt 7; then
- # prior to Darwin 7, realpath is not threadsafe, so don't
- # use it when threads are enabled, c.f. bug # 711232
- ac_cv_func_realpath=no
- fi
- echo $ac_n "checking for realpath""... $ac_c" 1>&6
- echo "configure:5249: checking for realpath" >&5
- if eval "test "`echo '$''{'ac_cv_func_realpath'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5254 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char realpath(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char realpath();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_realpath) || defined (__stub___realpath)
- choke me
- #else
- realpath();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5277: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_realpath=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_realpath=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'realpath`" = yes"; then
- echo "$ac_t""yes" 1>&6
- :
- else
- echo "$ac_t""no" 1>&6
- cat >> confdefs.h <<EOF
- #define NO_REALPATH 1
- EOF
- fi
- #--------------------------------------------------------------------
- # Look for thread-safe variants of some library functions.
- #--------------------------------------------------------------------
- if test "${TCL_THREADS}" = 1; then
- echo $ac_n "checking for getpwuid_r""... $ac_c" 1>&6
- echo "configure:5307: checking for getpwuid_r" >&5
- if eval "test "`echo '$''{'ac_cv_func_getpwuid_r'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5312 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char getpwuid_r(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char getpwuid_r();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_getpwuid_r) || defined (__stub___getpwuid_r)
- choke me
- #else
- getpwuid_r();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5335: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_getpwuid_r=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_getpwuid_r=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'getpwuid_r`" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- echo $ac_n "checking for getpwuid_r with 5 args""... $ac_c" 1>&6
- echo "configure:5351: checking for getpwuid_r with 5 args" >&5
- if eval "test "`echo '$''{'tcl_cv_api_getpwuid_r_5'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 5357 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <pwd.h>
-
- int main() {
- uid_t uid;
- struct passwd pw, *pwp;
- char buf[512];
- int buflen = 512;
- (void) getpwuid_r(uid, &pw, buf, buflen, &pwp);
-
- ; return 0; }
- EOF
- if { (eval echo configure:5374: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_api_getpwuid_r_5=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_api_getpwuid_r_5=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_api_getpwuid_r_5" 1>&6
- tcl_ok=$tcl_cv_api_getpwuid_r_5
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETPWUID_R_5 1
- EOF
- else
- echo $ac_n "checking for getpwuid_r with 4 args""... $ac_c" 1>&6
- echo "configure:5395: checking for getpwuid_r with 4 args" >&5
- if eval "test "`echo '$''{'tcl_cv_api_getpwuid_r_4'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 5401 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <pwd.h>
-
- int main() {
- uid_t uid;
- struct passwd pw;
- char buf[512];
- int buflen = 512;
- (void)getpwnam_r(uid, &pw, buf, buflen);
-
- ; return 0; }
- EOF
- if { (eval echo configure:5418: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_api_getpwuid_r_4=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_api_getpwuid_r_4=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_api_getpwuid_r_4" 1>&6
- tcl_ok=$tcl_cv_api_getpwuid_r_4
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETPWUID_R_4 1
- EOF
- fi
- fi
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETPWUID_R 1
- EOF
- fi
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for getpwnam_r""... $ac_c" 1>&6
- echo "configure:5451: checking for getpwnam_r" >&5
- if eval "test "`echo '$''{'ac_cv_func_getpwnam_r'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5456 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char getpwnam_r(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char getpwnam_r();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_getpwnam_r) || defined (__stub___getpwnam_r)
- choke me
- #else
- getpwnam_r();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5479: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_getpwnam_r=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_getpwnam_r=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'getpwnam_r`" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- echo $ac_n "checking for getpwnam_r with 5 args""... $ac_c" 1>&6
- echo "configure:5495: checking for getpwnam_r with 5 args" >&5
- if eval "test "`echo '$''{'tcl_cv_api_getpwnam_r_5'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 5501 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <pwd.h>
-
- int main() {
- char *name;
- struct passwd pw, *pwp;
- char buf[512];
- int buflen = 512;
- (void) getpwnam_r(name, &pw, buf, buflen, &pwp);
-
- ; return 0; }
- EOF
- if { (eval echo configure:5518: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_api_getpwnam_r_5=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_api_getpwnam_r_5=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_api_getpwnam_r_5" 1>&6
- tcl_ok=$tcl_cv_api_getpwnam_r_5
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETPWNAM_R_5 1
- EOF
- else
- echo $ac_n "checking for getpwnam_r with 4 args""... $ac_c" 1>&6
- echo "configure:5539: checking for getpwnam_r with 4 args" >&5
- if eval "test "`echo '$''{'tcl_cv_api_getpwnam_r_4'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 5545 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <pwd.h>
-
- int main() {
- char *name;
- struct passwd pw;
- char buf[512];
- int buflen = 512;
- (void)getpwnam_r(name, &pw, buf, buflen);
-
- ; return 0; }
- EOF
- if { (eval echo configure:5562: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_api_getpwnam_r_4=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_api_getpwnam_r_4=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_api_getpwnam_r_4" 1>&6
- tcl_ok=$tcl_cv_api_getpwnam_r_4
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETPWNAM_R_4 1
- EOF
- fi
- fi
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETPWNAM_R 1
- EOF
- fi
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for getgrgid_r""... $ac_c" 1>&6
- echo "configure:5595: checking for getgrgid_r" >&5
- if eval "test "`echo '$''{'ac_cv_func_getgrgid_r'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5600 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char getgrgid_r(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char getgrgid_r();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_getgrgid_r) || defined (__stub___getgrgid_r)
- choke me
- #else
- getgrgid_r();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5623: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_getgrgid_r=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_getgrgid_r=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'getgrgid_r`" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- echo $ac_n "checking for getgrgid_r with 5 args""... $ac_c" 1>&6
- echo "configure:5639: checking for getgrgid_r with 5 args" >&5
- if eval "test "`echo '$''{'tcl_cv_api_getgrgid_r_5'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 5645 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <grp.h>
-
- int main() {
- gid_t gid;
- struct group gr, *grp;
- char buf[512];
- int buflen = 512;
- (void) getgrgid_r(gid, &gr, buf, buflen, &grp);
-
- ; return 0; }
- EOF
- if { (eval echo configure:5662: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_api_getgrgid_r_5=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_api_getgrgid_r_5=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_api_getgrgid_r_5" 1>&6
- tcl_ok=$tcl_cv_api_getgrgid_r_5
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETGRGID_R_5 1
- EOF
- else
- echo $ac_n "checking for getgrgid_r with 4 args""... $ac_c" 1>&6
- echo "configure:5683: checking for getgrgid_r with 4 args" >&5
- if eval "test "`echo '$''{'tcl_cv_api_getgrgid_r_4'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 5689 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <grp.h>
-
- int main() {
- gid_t gid;
- struct group gr;
- char buf[512];
- int buflen = 512;
- (void)getgrgid_r(gid, &gr, buf, buflen);
-
- ; return 0; }
- EOF
- if { (eval echo configure:5706: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_api_getgrgid_r_4=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_api_getgrgid_r_4=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_api_getgrgid_r_4" 1>&6
- tcl_ok=$tcl_cv_api_getgrgid_r_4
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETGRGID_R_4 1
- EOF
- fi
- fi
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETGRGID_R 1
- EOF
- fi
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for getgrnam_r""... $ac_c" 1>&6
- echo "configure:5739: checking for getgrnam_r" >&5
- if eval "test "`echo '$''{'ac_cv_func_getgrnam_r'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5744 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char getgrnam_r(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char getgrnam_r();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_getgrnam_r) || defined (__stub___getgrnam_r)
- choke me
- #else
- getgrnam_r();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5767: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_getgrnam_r=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_getgrnam_r=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'getgrnam_r`" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- echo $ac_n "checking for getgrnam_r with 5 args""... $ac_c" 1>&6
- echo "configure:5783: checking for getgrnam_r with 5 args" >&5
- if eval "test "`echo '$''{'tcl_cv_api_getgrnam_r_5'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 5789 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <grp.h>
-
- int main() {
- char *name;
- struct group gr, *grp;
- char buf[512];
- int buflen = 512;
- (void) getgrnam_r(name, &gr, buf, buflen, &grp);
-
- ; return 0; }
- EOF
- if { (eval echo configure:5806: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_api_getgrnam_r_5=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_api_getgrnam_r_5=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_api_getgrnam_r_5" 1>&6
- tcl_ok=$tcl_cv_api_getgrnam_r_5
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETGRNAM_R_5 1
- EOF
- else
- echo $ac_n "checking for getgrnam_r with 4 args""... $ac_c" 1>&6
- echo "configure:5827: checking for getgrnam_r with 4 args" >&5
- if eval "test "`echo '$''{'tcl_cv_api_getgrnam_r_4'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 5833 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <grp.h>
-
- int main() {
- char *name;
- struct group gr;
- char buf[512];
- int buflen = 512;
- (void)getgrnam_r(name, &gr, buf, buflen);
-
- ; return 0; }
- EOF
- if { (eval echo configure:5850: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_api_getgrnam_r_4=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_api_getgrnam_r_4=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_api_getgrnam_r_4" 1>&6
- tcl_ok=$tcl_cv_api_getgrnam_r_4
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETGRNAM_R_4 1
- EOF
- fi
- fi
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETGRNAM_R 1
- EOF
- fi
- else
- echo "$ac_t""no" 1>&6
- fi
- if test "`uname -s`" = "Darwin" &&
- test "`uname -r | awk -F. '{print $1}'`" -gt 5; then
- # Starting with Darwin 6 (Mac OSX 10.2), gethostbyX
- # are actually MT-safe as they always return pointers
- # from the TSD instead of the static storage.
- cat >> confdefs.h <<EOF
- #define HAVE_MTSAFE_GETHOSTBYNAME 1
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_MTSAFE_GETHOSTBYADDR 1
- EOF
- elif test "`uname -s`" = "HP-UX" &&
- test "`uname -r|sed -e 's|B.||' -e 's|..*$||'`" -gt 10; then
- # Starting with HPUX 11.00 (we believe), gethostbyX
- # are actually MT-safe as they always return pointers
- # from TSD instead of static storage.
- cat >> confdefs.h <<EOF
- #define HAVE_MTSAFE_GETHOSTBYNAME 1
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_MTSAFE_GETHOSTBYADDR 1
- EOF
- else
- echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
- echo "configure:5910: checking for gethostbyname_r" >&5
- if eval "test "`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 5915 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char gethostbyname_r(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char gethostbyname_r();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
- choke me
- #else
- gethostbyname_r();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:5938: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname_r=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_gethostbyname_r=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'gethostbyname_r`" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- echo $ac_n "checking for gethostbyname_r with 6 args""... $ac_c" 1>&6
- echo "configure:5954: checking for gethostbyname_r with 6 args" >&5
- if eval "test "`echo '$''{'tcl_cv_api_gethostbyname_r_6'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 5960 "configure"
- #include "confdefs.h"
- #include <netdb.h>
-
- int main() {
- char *name;
- struct hostent *he, *res;
- char buffer[2048];
- int buflen = 2048;
- int h_errnop;
- (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop);
-
- ; return 0; }
- EOF
- if { (eval echo configure:5977: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_api_gethostbyname_r_6=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_api_gethostbyname_r_6=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_api_gethostbyname_r_6" 1>&6
- tcl_ok=$tcl_cv_api_gethostbyname_r_6
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETHOSTBYNAME_R_6 1
- EOF
- else
- echo $ac_n "checking for gethostbyname_r with 5 args""... $ac_c" 1>&6
- echo "configure:5998: checking for gethostbyname_r with 5 args" >&5
- if eval "test "`echo '$''{'tcl_cv_api_gethostbyname_r_5'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 6004 "configure"
- #include "confdefs.h"
- #include <netdb.h>
-
- int main() {
- char *name;
- struct hostent *he;
- char buffer[2048];
- int buflen = 2048;
- int h_errnop;
- (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop);
-
- ; return 0; }
- EOF
- if { (eval echo configure:6021: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_api_gethostbyname_r_5=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_api_gethostbyname_r_5=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_api_gethostbyname_r_5" 1>&6
- tcl_ok=$tcl_cv_api_gethostbyname_r_5
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETHOSTBYNAME_R_5 1
- EOF
- else
- echo $ac_n "checking for gethostbyname_r with 3 args""... $ac_c" 1>&6
- echo "configure:6042: checking for gethostbyname_r with 3 args" >&5
- if eval "test "`echo '$''{'tcl_cv_api_gethostbyname_r_3'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 6048 "configure"
- #include "confdefs.h"
- #include <netdb.h>
-
- int main() {
- char *name;
- struct hostent *he;
- struct hostent_data data;
- (void) gethostbyname_r(name, he, &data);
-
- ; return 0; }
- EOF
- if { (eval echo configure:6063: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_api_gethostbyname_r_3=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_api_gethostbyname_r_3=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_api_gethostbyname_r_3" 1>&6
- tcl_ok=$tcl_cv_api_gethostbyname_r_3
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETHOSTBYNAME_R_3 1
- EOF
- fi
- fi
- fi
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETHOSTBYNAME_R 1
- EOF
- fi
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for gethostbyaddr_r""... $ac_c" 1>&6
- echo "configure:6097: checking for gethostbyaddr_r" >&5
- if eval "test "`echo '$''{'ac_cv_func_gethostbyaddr_r'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 6102 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char gethostbyaddr_r(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char gethostbyaddr_r();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_gethostbyaddr_r) || defined (__stub___gethostbyaddr_r)
- choke me
- #else
- gethostbyaddr_r();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:6125: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_gethostbyaddr_r=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_gethostbyaddr_r=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'gethostbyaddr_r`" = yes"; then
- echo "$ac_t""yes" 1>&6
-
- echo $ac_n "checking for gethostbyaddr_r with 7 args""... $ac_c" 1>&6
- echo "configure:6141: checking for gethostbyaddr_r with 7 args" >&5
- if eval "test "`echo '$''{'tcl_cv_api_gethostbyaddr_r_7'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 6147 "configure"
- #include "confdefs.h"
- #include <netdb.h>
-
- int main() {
- char *addr;
- int length;
- int type;
- struct hostent *result;
- char buffer[2048];
- int buflen = 2048;
- int h_errnop;
- (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
- &h_errnop);
-
- ; return 0; }
- EOF
- if { (eval echo configure:6167: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_api_gethostbyaddr_r_7=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_api_gethostbyaddr_r_7=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_api_gethostbyaddr_r_7" 1>&6
- tcl_ok=$tcl_cv_api_gethostbyaddr_r_7
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETHOSTBYADDR_R_7 1
- EOF
- else
- echo $ac_n "checking for gethostbyaddr_r with 8 args""... $ac_c" 1>&6
- echo "configure:6188: checking for gethostbyaddr_r with 8 args" >&5
- if eval "test "`echo '$''{'tcl_cv_api_gethostbyaddr_r_8'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- cat > conftest.$ac_ext <<EOF
- #line 6194 "configure"
- #include "confdefs.h"
- #include <netdb.h>
-
- int main() {
- char *addr;
- int length;
- int type;
- struct hostent *result, *resultp;
- char buffer[2048];
- int buflen = 2048;
- int h_errnop;
- (void) gethostbyaddr_r(addr, length, type, result, buffer, buflen,
- &resultp, &h_errnop);
-
- ; return 0; }
- EOF
- if { (eval echo configure:6214: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- tcl_cv_api_gethostbyaddr_r_8=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- tcl_cv_api_gethostbyaddr_r_8=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$tcl_cv_api_gethostbyaddr_r_8" 1>&6
- tcl_ok=$tcl_cv_api_gethostbyaddr_r_8
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETHOSTBYADDR_R_8 1
- EOF
- fi
- fi
- if test "$tcl_ok" = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_GETHOSTBYADDR_R 1
- EOF
- fi
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- fi
- #---------------------------------------------------------------------------
- # Determine which interface to use to talk to the serial port.
- # Note that #include lines must begin in leftmost column for
- # some compilers to recognize them as preprocessor directives.
- #---------------------------------------------------------------------------
- for ac_hdr in sys/modem.h
- do
- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
- echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
- echo "configure:6260: checking for $ac_hdr" >&5
- if eval "test "`echo '$''{'ac_cv_header_$ac_safe'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 6265 "configure"
- #include "confdefs.h"
- #include <$ac_hdr>
- EOF
- ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
- { (eval echo configure:6270: "$ac_try") 1>&5; (eval $ac_try) 2>&5; }
- ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}$"`
- if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
- else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_header_'$ac_safe`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_hdr 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- echo $ac_n "checking termios vs. termio vs. sgtty""... $ac_c" 1>&6
- echo "configure:6297: checking termios vs. termio vs. sgtty" >&5
- if eval "test "`echo '$''{'tcl_cv_api_serial'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
-
- if test "$cross_compiling" = yes; then
- tcl_cv_api_serial=no
- else
- cat > conftest.$ac_ext <<EOF
- #line 6306 "configure"
- #include "confdefs.h"
- #include <termios.h>
- int main() {
- struct termios t;
- if (tcgetattr(0, &t) == 0) {
- cfsetospeed(&t, 0);
- t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
- return 0;
- }
- return 1;
- }
- EOF
- if { (eval echo configure:6321: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- tcl_cv_api_serial=termios
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- tcl_cv_api_serial=no
- fi
- rm -fr conftest*
- fi
- if test $tcl_cv_api_serial = no ; then
- if test "$cross_compiling" = yes; then
- tcl_cv_api_serial=no
- else
- cat > conftest.$ac_ext <<EOF
- #line 6338 "configure"
- #include "confdefs.h"
- #include <termio.h>
- int main() {
- struct termio t;
- if (ioctl(0, TCGETA, &t) == 0) {
- t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
- return 0;
- }
- return 1;
- }
- EOF
- if { (eval echo configure:6352: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- tcl_cv_api_serial=termio
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- tcl_cv_api_serial=no
- fi
- rm -fr conftest*
- fi
- fi
- if test $tcl_cv_api_serial = no ; then
- if test "$cross_compiling" = yes; then
- tcl_cv_api_serial=no
- else
- cat > conftest.$ac_ext <<EOF
- #line 6370 "configure"
- #include "confdefs.h"
- #include <sgtty.h>
- int main() {
- struct sgttyb t;
- if (ioctl(0, TIOCGETP, &t) == 0) {
- t.sg_ospeed = 0;
- t.sg_flags |= ODDP | EVENP | RAW;
- return 0;
- }
- return 1;
- }
- EOF
- if { (eval echo configure:6385: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- tcl_cv_api_serial=sgtty
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- tcl_cv_api_serial=no
- fi
- rm -fr conftest*
- fi
- fi
- if test $tcl_cv_api_serial = no ; then
- if test "$cross_compiling" = yes; then
- tcl_cv_api_serial=no
- else
- cat > conftest.$ac_ext <<EOF
- #line 6403 "configure"
- #include "confdefs.h"
- #include <termios.h>
- #include <errno.h>
- int main() {
- struct termios t;
- if (tcgetattr(0, &t) == 0
- || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
- cfsetospeed(&t, 0);
- t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
- return 0;
- }
- return 1;
- }
- EOF
- if { (eval echo configure:6420: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- tcl_cv_api_serial=termios
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- tcl_cv_api_serial=no
- fi
- rm -fr conftest*
- fi
- fi
- if test $tcl_cv_api_serial = no; then
- if test "$cross_compiling" = yes; then
- tcl_cv_api_serial=no
- else
- cat > conftest.$ac_ext <<EOF
- #line 6438 "configure"
- #include "confdefs.h"
- #include <termio.h>
- #include <errno.h>
- int main() {
- struct termio t;
- if (ioctl(0, TCGETA, &t) == 0
- || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
- t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
- return 0;
- }
- return 1;
- }
- EOF
- if { (eval echo configure:6454: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- tcl_cv_api_serial=termio
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- tcl_cv_api_serial=no
- fi
- rm -fr conftest*
- fi
- fi
- if test $tcl_cv_api_serial = no; then
- if test "$cross_compiling" = yes; then
- tcl_cv_api_serial=none
- else
- cat > conftest.$ac_ext <<EOF
- #line 6472 "configure"
- #include "confdefs.h"
- #include <sgtty.h>
- #include <errno.h>
- int main() {
- struct sgttyb t;
- if (ioctl(0, TIOCGETP, &t) == 0
- || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
- t.sg_ospeed = 0;
- t.sg_flags |= ODDP | EVENP | RAW;
- return 0;
- }
- return 1;
- }
- EOF
- if { (eval echo configure:6489: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- tcl_cv_api_serial=sgtty