1489
1481
CC_SEARCH_FLAGS=""
1490
1482
LD_SEARCH_FLAGS=""
1492
NetBSD-1.*|FreeBSD-[[1-2]].*)
1493
SHLIB_CFLAGS="-fPIC"
1494
SHLIB_LD="ld -Bshareable -x"
1496
DL_OBJS="tclLoadDl.o"
1498
AS_IF([test $doRpath = yes], [
1499
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
1500
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
1501
AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
1506
], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
1507
AS_IF([test $tcl_cv_ld_elf = yes], [
1508
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
1510
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
1513
# Ancient FreeBSD doesn't handle version numbers with dots.
1515
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
1516
TCL_LIB_VERSIONS_OK=nodots
1520
1486
case "$arch" in
1522
1488
# Equivalent using configure option --disable-load
1523
1489
# Step 4 will set the necessary variables
1525
1491
SHLIB_LD_LIBS=""
1528
1495
SHLIB_CFLAGS="-fPIC"
1547
1515
CFLAGS_OPTIMIZE="-O2"
1550
AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
1555
], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
1556
AS_IF([test $tcl_cv_ld_elf = yes], [
1557
LDFLAGS=-Wl,-export-dynamic
1559
1518
AS_IF([test "${TCL_THREADS}" = "1"], [
1560
1519
# On OpenBSD: Compile with -pthread
1561
1520
# Don't link with -lpthread
1584
1542
CFLAGS="$CFLAGS -pthread"
1585
1543
LDFLAGS="$LDFLAGS -pthread"
1589
# FreeBSD-3 doesn't handle version numbers with dots.
1590
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
1591
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
1592
TCL_LIB_VERSIONS_OK=nodots
1597
1547
# This configuration from FreeBSD Ports.
1598
1548
SHLIB_CFLAGS="-fPIC"
1599
1549
SHLIB_LD="${CC} -shared"
1600
TCL_SHLIB_LD_EXTRAS="-soname \$[@]"
1550
TCL_SHLIB_LD_EXTRAS="-Wl,-soname=\$[@]"
1601
1551
SHLIB_SUFFIX=".so"
1602
1552
DL_OBJS="tclLoadDl.o"
1605
1555
AS_IF([test $doRpath = yes], [
1606
1556
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
1607
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'])
1557
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
1608
1558
AS_IF([test "${TCL_THREADS}" = "1"], [
1609
1559
# The -pthread needs to go in the LDFLAGS, not LIBS
1610
1560
LIBS=`echo $LIBS | sed s/-pthread//`
2201
2150
#--------------------------------------------------------------------
2204
# Determine which interface to use to talk to the serial port.
2205
# Note that #include lines must begin in leftmost column for
2206
# some compilers to recognize them as preprocessor directives,
2207
# and some build environments have stdin not pointing at a
2208
# pseudo-terminal (usually /dev/null instead.)
2215
# Defines only one of the following vars:
2221
#--------------------------------------------------------------------
2223
AC_DEFUN([SC_SERIAL_PORT], [
2224
AC_CHECK_HEADERS(sys/modem.h)
2225
AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [
2227
#include <termios.h>
2231
if (tcgetattr(0, &t) == 0) {
2233
t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
2237
}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
2238
if test $tcl_cv_api_serial = no ; then
2244
if (ioctl(0, TCGETA, &t) == 0) {
2245
t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
2249
}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
2251
if test $tcl_cv_api_serial = no ; then
2257
if (ioctl(0, TIOCGETP, &t) == 0) {
2259
t.sg_flags |= ODDP | EVENP | RAW;
2263
}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
2265
if test $tcl_cv_api_serial = no ; then
2267
#include <termios.h>
2272
if (tcgetattr(0, &t) == 0
2273
|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
2275
t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
2279
}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
2281
if test $tcl_cv_api_serial = no; then
2288
if (ioctl(0, TCGETA, &t) == 0
2289
|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
2290
t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
2294
}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
2296
if test $tcl_cv_api_serial = no; then
2303
if (ioctl(0, TIOCGETP, &t) == 0
2304
|| errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
2306
t.sg_flags |= ODDP | EVENP | RAW;
2310
}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
2312
case $tcl_cv_api_serial in
2313
termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);;
2314
termio) AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
2315
sgtty) AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
2319
#--------------------------------------------------------------------
2320
2151
# SC_MISSING_POSIX_HEADERS
2322
2153
# Supply substitutes for missing POSIX header files. Special
2438
2269
if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
2439
2270
AC_MSG_CHECKING([for X11 header files])
2440
2271
found_xincludes="no"
2441
AC_TRY_CPP([#include <X11/Intrinsic.h>], found_xincludes="yes", found_xincludes="no")
2272
AC_TRY_CPP([#include <X11/Xlib.h>], found_xincludes="yes", found_xincludes="no")
2442
2273
if test "$found_xincludes" = "no"; then
2443
2274
dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
2444
2275
for i in $dirs ; do
2445
if test -r $i/X11/Intrinsic.h; then
2276
if test -r $i/X11/Xlib.h; then
2446
2277
AC_MSG_RESULT([$i])
2447
2278
XINCLUDES=" -I$i"
2448
2279
found_xincludes="yes"
2813
2644
# Now check for auxiliary declarations
2814
2645
AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
2815
2646
AC_TRY_COMPILE([#include <sys/types.h>
2816
#include <sys/dirent.h>],[struct dirent64 p;],
2647
#include <dirent.h>],[struct dirent64 p;],
2817
2648
tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
2818
2649
if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
2819
2650
AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])