| 1 |
#! /bin/bash -norc |
| 2 |
dnl This file is an input file used by the GNU "autoconf" program to |
| 3 |
dnl generate the file "configure", which is run during Tcl installation |
| 4 |
dnl to configure the system for the local environment. |
| 5 |
# |
| 6 |
# RCS: @(#) $Id: configure.in,v 1.106.2.3 2003/10/02 23:07:34 dgp Exp $ |
| 7 |
|
| 8 |
AC_INIT(../generic/tcl.h) |
| 9 |
AC_PREREQ(2.13) |
| 10 |
|
| 11 |
TCL_VERSION=8.4 |
| 12 |
TCL_MAJOR_VERSION=8 |
| 13 |
TCL_MINOR_VERSION=4 |
| 14 |
TCL_PATCH_LEVEL=".5" |
| 15 |
VERSION=${TCL_VERSION} |
| 16 |
|
| 17 |
#------------------------------------------------------------------------ |
| 18 |
# Handle the --prefix=... option |
| 19 |
#------------------------------------------------------------------------ |
| 20 |
|
| 21 |
if test "${prefix}" = "NONE"; then |
| 22 |
prefix=/usr/local |
| 23 |
fi |
| 24 |
if test "${exec_prefix}" = "NONE"; then |
| 25 |
exec_prefix=$prefix |
| 26 |
fi |
| 27 |
# libdir must be a fully qualified path and (not ${exec_prefix}/lib) |
| 28 |
eval libdir="$libdir" |
| 29 |
TCL_SRC_DIR=`cd $srcdir/..; pwd` |
| 30 |
|
| 31 |
#------------------------------------------------------------------------ |
| 32 |
# Compress and/or soft link the manpages? |
| 33 |
#------------------------------------------------------------------------ |
| 34 |
SC_CONFIG_MANPAGES |
| 35 |
|
| 36 |
#------------------------------------------------------------------------ |
| 37 |
# Standard compiler checks |
| 38 |
#------------------------------------------------------------------------ |
| 39 |
|
| 40 |
# If the user did not set CFLAGS, set it now to keep |
| 41 |
# the AC_PROG_CC macro from adding "-g -O2". |
| 42 |
if test "${CFLAGS+set}" != "set" ; then |
| 43 |
CFLAGS="" |
| 44 |
fi |
| 45 |
|
| 46 |
AC_PROG_CC |
| 47 |
AC_HAVE_HEADERS(unistd.h limits.h) |
| 48 |
|
| 49 |
#------------------------------------------------------------------------ |
| 50 |
# Threads support |
| 51 |
#------------------------------------------------------------------------ |
| 52 |
|
| 53 |
SC_ENABLE_THREADS |
| 54 |
|
| 55 |
#------------------------------------------------------------------------ |
| 56 |
# If we're using GCC, see if the compiler understands -pipe. If so, use it. |
| 57 |
# It makes compiling go faster. (This is only a performance feature.) |
| 58 |
#------------------------------------------------------------------------ |
| 59 |
|
| 60 |
if test -z "$no_pipe"; then |
| 61 |
if test -n "$GCC"; then |
| 62 |
AC_MSG_CHECKING([if the compiler understands -pipe]) |
| 63 |
OLDCC="$CC" |
| 64 |
CC="$CC -pipe" |
| 65 |
AC_TRY_COMPILE(,, |
| 66 |
AC_MSG_RESULT(yes), |
| 67 |
CC="$OLDCC" |
| 68 |
AC_MSG_RESULT(no)) |
| 69 |
fi |
| 70 |
fi |
| 71 |
|
| 72 |
#-------------------------------------------------------------------- |
| 73 |
# Detect what compiler flags to set for 64-bit support. |
| 74 |
#-------------------------------------------------------------------- |
| 75 |
|
| 76 |
SC_TCL_EARLY_FLAGS |
| 77 |
|
| 78 |
SC_TCL_64BIT_FLAGS |
| 79 |
|
| 80 |
#-------------------------------------------------------------------- |
| 81 |
# Check endianness because we can optimize comparisons of |
| 82 |
# Tcl_UniChar strings to memcmp on big-endian systems. |
| 83 |
#-------------------------------------------------------------------- |
| 84 |
|
| 85 |
AC_C_BIGENDIAN |
| 86 |
|
| 87 |
#-------------------------------------------------------------------- |
| 88 |
# Supply substitutes for missing POSIX library procedures, or |
| 89 |
# set flags so Tcl uses alternate procedures. |
| 90 |
#-------------------------------------------------------------------- |
| 91 |
|
| 92 |
# Check if Posix compliant getcwd exists, if not we'll use getwd. |
| 93 |
AC_CHECK_FUNCS(getcwd, , [AC_DEFINE(USEGETWD)]) |
| 94 |
# Nb: if getcwd uses popen and pwd(1) (like SunOS 4) we should really |
| 95 |
# define USEGETWD even if the posix getcwd exists. Add a test ? |
| 96 |
|
| 97 |
AC_REPLACE_FUNCS(opendir strstr) |
| 98 |
|
| 99 |
AC_REPLACE_FUNCS(strtol strtoll strtoull tmpnam waitpid) |
| 100 |
AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR)]) |
| 101 |
AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD)]) |
| 102 |
AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3)]) |
| 103 |
AC_CHECK_FUNC(uname, , [AC_DEFINE(NO_UNAME)]) |
| 104 |
AC_CHECK_FUNC(realpath, , [AC_DEFINE(NO_REALPATH)]) |
| 105 |
|
| 106 |
#-------------------------------------------------------------------- |
| 107 |
# Supply substitutes for missing POSIX header files. Special |
| 108 |
# notes: |
| 109 |
# - stdlib.h doesn't define strtol, strtoul, or |
| 110 |
# strtod insome versions of SunOS |
| 111 |
# - some versions of string.h don't declare procedures such |
| 112 |
# as strstr |
| 113 |
#-------------------------------------------------------------------- |
| 114 |
|
| 115 |
SC_MISSING_POSIX_HEADERS |
| 116 |
|
| 117 |
#--------------------------------------------------------------------------- |
| 118 |
# Determine which interface to use to talk to the serial port. |
| 119 |
# Note that #include lines must begin in leftmost column for |
| 120 |
# some compilers to recognize them as preprocessor directives. |
| 121 |
#--------------------------------------------------------------------------- |
| 122 |
|
| 123 |
SC_SERIAL_PORT |
| 124 |
|
| 125 |
#-------------------------------------------------------------------- |
| 126 |
# Include sys/select.h if it exists and if it supplies things |
| 127 |
# that appear to be useful and aren't already in sys/types.h. |
| 128 |
# This appears to be true only on the RS/6000 under AIX. Some |
| 129 |
# systems like OSF/1 have a sys/select.h that's of no use, and |
| 130 |
# other systems like SCO UNIX have a sys/select.h that's |
| 131 |
# pernicious. If "fd_set" isn't defined anywhere then set a |
| 132 |
# special flag. |
| 133 |
#-------------------------------------------------------------------- |
| 134 |
|
| 135 |
AC_MSG_CHECKING([for fd_set in sys/types]) |
| 136 |
AC_CACHE_VAL(tcl_cv_type_fd_set, |
| 137 |
AC_TRY_COMPILE([#include <sys/types.h>],[fd_set readMask, writeMask;], |
| 138 |
tcl_cv_type_fd_set=yes, tcl_cv_type_fd_set=no)) |
| 139 |
AC_MSG_RESULT($tcl_cv_type_fd_set) |
| 140 |
tk_ok=$tcl_cv_type_fd_set |
| 141 |
if test $tcl_cv_type_fd_set = no; then |
| 142 |
AC_MSG_CHECKING([for fd_mask in sys/select]) |
| 143 |
AC_CACHE_VAL(tcl_cv_grep_fd_mask, |
| 144 |
AC_HEADER_EGREP(fd_mask, sys/select.h, |
| 145 |
tcl_cv_grep_fd_mask=present, tcl_cv_grep_fd_mask=missing)) |
| 146 |
AC_MSG_RESULT($tcl_cv_grep_fd_mask) |
| 147 |
if test $tcl_cv_grep_fd_mask = present; then |
| 148 |
AC_DEFINE(HAVE_SYS_SELECT_H) |
| 149 |
tk_ok=yes |
| 150 |
fi |
| 151 |
fi |
| 152 |
if test $tk_ok = no; then |
| 153 |
AC_DEFINE(NO_FD_SET) |
| 154 |
fi |
| 155 |
|
| 156 |
#------------------------------------------------------------------------------ |
| 157 |
# Find out all about time handling differences. |
| 158 |
#------------------------------------------------------------------------------ |
| 159 |
|
| 160 |
SC_TIME_HANDLER |
| 161 |
|
| 162 |
#-------------------------------------------------------------------- |
| 163 |
# Some systems (e.g., IRIX 4.0.5) lack the st_blksize field |
| 164 |
# in struct stat. But we might be able to use fstatfs instead. |
| 165 |
#-------------------------------------------------------------------- |
| 166 |
AC_STRUCT_ST_BLKSIZE |
| 167 |
AC_CHECK_FUNC(fstatfs, , [AC_DEFINE(NO_FSTATFS)]) |
| 168 |
|
| 169 |
#-------------------------------------------------------------------- |
| 170 |
# Some system have no memcmp or it does not work with 8 bit |
| 171 |
# data, this checks it and add memcmp.o to LIBOBJS if needed |
| 172 |
#-------------------------------------------------------------------- |
| 173 |
AC_FUNC_MEMCMP |
| 174 |
|
| 175 |
#-------------------------------------------------------------------- |
| 176 |
# Some system like SunOS 4 and other BSD like systems |
| 177 |
# have no memmove (we assume they have bcopy instead). |
| 178 |
# {The replacement define is in compat/string.h} |
| 179 |
#-------------------------------------------------------------------- |
| 180 |
AC_CHECK_FUNC(memmove, , [AC_DEFINE(NO_MEMMOVE) AC_DEFINE(NO_STRING_H)]) |
| 181 |
|
| 182 |
#-------------------------------------------------------------------- |
| 183 |
# On some systems strstr is broken: it returns a pointer even |
| 184 |
# even if the original string is empty. |
| 185 |
#-------------------------------------------------------------------- |
| 186 |
|
| 187 |
AC_MSG_CHECKING([proper strstr implementation]) |
| 188 |
AC_TRY_RUN([ |
| 189 |
extern int strstr(); |
| 190 |
int main() |
| 191 |
{ |
| 192 |
exit(strstr("\0test", "test") ? 1 : 0); |
| 193 |
} |
| 194 |
], tcl_ok=yes, tcl_ok=no, tcl_ok=no) |
| 195 |
if test $tcl_ok = yes; then |
| 196 |
AC_MSG_RESULT(yes) |
| 197 |
else |
| 198 |
AC_MSG_RESULT([broken, using substitute]) |
| 199 |
LIBOBJS="$LIBOBJS strstr.o" |
| 200 |
fi |
| 201 |
|
| 202 |
#-------------------------------------------------------------------- |
| 203 |
# Check for strtoul function. This is tricky because under some |
| 204 |
# versions of AIX strtoul returns an incorrect terminator |
| 205 |
# pointer for the string "0". |
| 206 |
#-------------------------------------------------------------------- |
| 207 |
|
| 208 |
AC_CHECK_FUNC(strtoul, tcl_ok=1, tcl_ok=0) |
| 209 |
AC_TRY_RUN([ |
| 210 |
extern int strtoul(); |
| 211 |
int main() |
| 212 |
{ |
| 213 |
char *string = "0"; |
| 214 |
char *term; |
| 215 |
int value; |
| 216 |
value = strtoul(string, &term, 0); |
| 217 |
if ((value != 0) || (term != (string+1))) { |
| 218 |
exit(1); |
| 219 |
} |
| 220 |
exit(0); |
| 221 |
}], , tcl_ok=0, tcl_ok=0) |
| 222 |
if test "$tcl_ok" = 0; then |
| 223 |
test -n "$verbose" && echo " Adding strtoul.o." |
| 224 |
LIBOBJS="$LIBOBJS strtoul.o" |
| 225 |
fi |
| 226 |
|
| 227 |
#-------------------------------------------------------------------- |
| 228 |
# Check for the strtod function. This is tricky because in some |
| 229 |
# versions of Linux strtod mis-parses strings starting with "+". |
| 230 |
#-------------------------------------------------------------------- |
| 231 |
|
| 232 |
AC_CHECK_FUNC(strtod, tcl_ok=1, tcl_ok=0) |
| 233 |
AC_TRY_RUN([ |
| 234 |
extern double strtod(); |
| 235 |
int main() |
| 236 |
{ |
| 237 |
char *string = " +69"; |
| 238 |
char *term; |
| 239 |
double value; |
| 240 |
value = strtod(string, &term); |
| 241 |
if ((value != 69) || (term != (string+4))) { |
| 242 |
exit(1); |
| 243 |
} |
| 244 |
exit(0); |
| 245 |
}], , tcl_ok=0, tcl_ok=0) |
| 246 |
if test "$tcl_ok" = 0; then |
| 247 |
test -n "$verbose" && echo " Adding strtod.o." |
| 248 |
LIBOBJS="$LIBOBJS strtod.o" |
| 249 |
fi |
| 250 |
|
| 251 |
#-------------------------------------------------------------------- |
| 252 |
# Under Solaris 2.4, strtod returns the wrong value for the |
| 253 |
# terminating character under some conditions. Check for this |
| 254 |
# and if the problem exists use a substitute procedure |
| 255 |
# "fixstrtod" that corrects the error. |
| 256 |
#-------------------------------------------------------------------- |
| 257 |
|
| 258 |
SC_BUGGY_STRTOD |
| 259 |
|
| 260 |
#-------------------------------------------------------------------- |
| 261 |
# Check for various typedefs and provide substitutes if |
| 262 |
# they don't exist. |
| 263 |
#-------------------------------------------------------------------- |
| 264 |
|
| 265 |
AC_TYPE_MODE_T |
| 266 |
AC_TYPE_PID_T |
| 267 |
AC_TYPE_SIZE_T |
| 268 |
AC_TYPE_UID_T |
| 269 |
|
| 270 |
AC_MSG_CHECKING([for socklen_t]) |
| 271 |
AC_CACHE_VAL(ac_cv_type_socklen_t,[AC_EGREP_CPP(changequote(<<,>>)dnl |
| 272 |
<<(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]>>dnl |
| 273 |
changequote([,]),[ |
| 274 |
#include <sys/types.h> |
| 275 |
#include <sys/socket.h> |
| 276 |
#if STDC_HEADERS |
| 277 |
#include <stdlib.h> |
| 278 |
#include <stddef.h> |
| 279 |
#endif |
| 280 |
], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)]) |
| 281 |
AC_MSG_RESULT($ac_cv_type_socklen_t) |
| 282 |
if test $ac_cv_type_socklen_t = no; then |
| 283 |
AC_DEFINE(socklen_t, unsigned) |
| 284 |
fi |
| 285 |
|
| 286 |
#-------------------------------------------------------------------- |
| 287 |
# If a system doesn't have an opendir function (man, that's old!) |
| 288 |
# then we have to supply a different version of dirent.h which |
| 289 |
# is compatible with the substitute version of opendir that's |
| 290 |
# provided. This version only works with V7-style directories. |
| 291 |
#-------------------------------------------------------------------- |
| 292 |
|
| 293 |
AC_CHECK_FUNC(opendir, , [AC_DEFINE(USE_DIRENT2_H)]) |
| 294 |
|
| 295 |
#-------------------------------------------------------------------- |
| 296 |
# The check below checks whether <sys/wait.h> defines the type |
| 297 |
# "union wait" correctly. It's needed because of weirdness in |
| 298 |
# HP-UX where "union wait" is defined in both the BSD and SYS-V |
| 299 |
# environments. Checking the usability of WIFEXITED seems to do |
| 300 |
# the trick. |
| 301 |
#-------------------------------------------------------------------- |
| 302 |
|
| 303 |
AC_MSG_CHECKING([union wait]) |
| 304 |
AC_CACHE_VAL(tcl_cv_union_wait, |
| 305 |
AC_TRY_LINK([#include <sys/types.h> |
| 306 |
#include <sys/wait.h>], [ |
| 307 |
union wait x; |
| 308 |
WIFEXITED(x); /* Generates compiler error if WIFEXITED |
| 309 |
* uses an int. */ |
| 310 |
], tcl_cv_union_wait=yes, tcl_cv_union_wait=no)) |
| 311 |
AC_MSG_RESULT($tcl_cv_union_wait) |
| 312 |
if test $tcl_cv_union_wait = no; then |
| 313 |
AC_DEFINE(NO_UNION_WAIT) |
| 314 |
fi |
| 315 |
|
| 316 |
#-------------------------------------------------------------------- |
| 317 |
# Check whether there is an strncasecmp function on this system. |
| 318 |
# This is a bit tricky because under SCO it's in -lsocket and |
| 319 |
# under Sequent Dynix it's in -linet. |
| 320 |
#-------------------------------------------------------------------- |
| 321 |
|
| 322 |
AC_CHECK_FUNC(strncasecmp, tcl_ok=1, tcl_ok=0) |
| 323 |
if test "$tcl_ok" = 0; then |
| 324 |
AC_CHECK_LIB(socket, strncasecmp, tcl_ok=1, tcl_ok=0) |
| 325 |
fi |
| 326 |
if test "$tcl_ok" = 0; then |
| 327 |
AC_CHECK_LIB(inet, strncasecmp, tcl_ok=1, tcl_ok=0) |
| 328 |
fi |
| 329 |
if test "$tcl_ok" = 0; then |
| 330 |
LIBOBJS="$LIBOBJS strncasecmp.o" |
| 331 |
fi |
| 332 |
|
| 333 |
#-------------------------------------------------------------------- |
| 334 |
# The code below deals with several issues related to gettimeofday: |
| 335 |
# 1. Some systems don't provide a gettimeofday function at all |
| 336 |
# (set NO_GETTOD if this is the case). |
| 337 |
# 2. SGI systems don't use the BSD form of the gettimeofday function, |
| 338 |
# but they have a BSDgettimeofday function that can be used instead. |
| 339 |
# 3. See if gettimeofday is declared in the <sys/time.h> header file. |
| 340 |
# if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can |
| 341 |
# declare it. |
| 342 |
#-------------------------------------------------------------------- |
| 343 |
|
| 344 |
AC_CHECK_FUNC(BSDgettimeofday, |
| 345 |
[AC_DEFINE(HAVE_BSDGETTIMEOFDAY)], [ |
| 346 |
AC_CHECK_FUNC(gettimeofday, , [AC_DEFINE(NO_GETTOD)]) |
| 347 |
]) |
| 348 |
AC_MSG_CHECKING([for gettimeofday declaration]) |
| 349 |
AC_CACHE_VAL(tcl_cv_grep_gettimeofday, |
| 350 |
AC_EGREP_HEADER(gettimeofday, sys/time.h, |
| 351 |
tcl_cv_grep_gettimeofday=present, tcl_cv_grep_gettimeofday=missing)) |
| 352 |
AC_MSG_RESULT($tcl_cv_grep_gettimeofday) |
| 353 |
if test $tcl_cv_grep_gettimeofday = missing ; then |
| 354 |
AC_DEFINE(GETTOD_NOT_DECLARED) |
| 355 |
fi |
| 356 |
|
| 357 |
#-------------------------------------------------------------------- |
| 358 |
# The following code checks to see whether it is possible to get |
| 359 |
# signed chars on this platform. This is needed in order to |
| 360 |
# properly generate sign-extended ints from character values. |
| 361 |
#-------------------------------------------------------------------- |
| 362 |
|
| 363 |
AC_C_CHAR_UNSIGNED |
| 364 |
AC_MSG_CHECKING([signed char declarations]) |
| 365 |
AC_CACHE_VAL(tcl_cv_char_signed, |
| 366 |
AC_TRY_COMPILE(, [ |
| 367 |
signed char *p; |
| 368 |
p = 0; |
| 369 |
], tcl_cv_char_signed=yes, tcl_cv_char_signed=no)) |
| 370 |
AC_MSG_RESULT($tcl_cv_char_signed) |
| 371 |
if test $tcl_cv_char_signed = yes; then |
| 372 |
AC_DEFINE(HAVE_SIGNED_CHAR) |
| 373 |
fi |
| 374 |
|
| 375 |
#-------------------------------------------------------------------- |
| 376 |
# Does putenv() copy or not? We need to know to avoid memory leaks. |
| 377 |
#-------------------------------------------------------------------- |
| 378 |
|
| 379 |
AC_MSG_CHECKING([for a putenv() that copies the buffer]) |
| 380 |
AC_CACHE_VAL(tcl_cv_putenv_copy, |
| 381 |
AC_TRY_RUN([ |
| 382 |
#include <stdlib.h> |
| 383 |
#define OURVAR "havecopy=yes" |
| 384 |
int main (int argc, char *argv[]) |
| 385 |
{ |
| 386 |
char *foo, *bar; |
| 387 |
foo = (char *)strdup(OURVAR); |
| 388 |
putenv(foo); |
| 389 |
strcpy((char *)(strchr(foo, '=') + 1), "no"); |
| 390 |
bar = getenv("havecopy"); |
| 391 |
if (!strcmp(bar, "no")) { |
| 392 |
/* doesnt copy */ |
| 393 |
return 0; |
| 394 |
} else { |
| 395 |
/* does copy */ |
| 396 |
return 1; |
| 397 |
} |
| 398 |
} |
| 399 |
], |
| 400 |
tcl_cv_putenv_copy=no, |
| 401 |
tcl_cv_putenv_copy=yes, |
| 402 |
tcl_cv_putenv_copy=no) |
| 403 |
) |
| 404 |
AC_MSG_RESULT($tcl_cv_putenv_copy) |
| 405 |
if test $tcl_cv_putenv_copy = yes; then |
| 406 |
AC_DEFINE(HAVE_PUTENV_THAT_COPIES) |
| 407 |
fi |
| 408 |
|
| 409 |
#-------------------------------------------------------------------- |
| 410 |
# Check for support of nl_langinfo function |
| 411 |
#-------------------------------------------------------------------- |
| 412 |
|
| 413 |
SC_ENABLE_LANGINFO |
| 414 |
|
| 415 |
#-------------------------------------------------------------------- |
| 416 |
# Look for libraries that we will need when compiling the Tcl shell |
| 417 |
#-------------------------------------------------------------------- |
| 418 |
|
| 419 |
SC_TCL_LINK_LIBS |
| 420 |
|
| 421 |
# Add the threads support libraries |
| 422 |
|
| 423 |
LIBS="$LIBS$THREADS_LIBS" |
| 424 |
|
| 425 |
SC_ENABLE_SHARED |
| 426 |
|
| 427 |
#-------------------------------------------------------------------- |
| 428 |
# The statements below define a collection of compile flags. This |
| 429 |
# macro depends on the value of SHARED_BUILD, and should be called |
| 430 |
# after SC_ENABLE_SHARED checks the configure switches. |
| 431 |
#-------------------------------------------------------------------- |
| 432 |
|
| 433 |
SC_CONFIG_CFLAGS |
| 434 |
|
| 435 |
SC_ENABLE_SYMBOLS |
| 436 |
|
| 437 |
TCL_DBGX=${DBGX} |
| 438 |
|
| 439 |
#-------------------------------------------------------------------- |
| 440 |
# The statements below check for systems where POSIX-style |
| 441 |
# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented. |
| 442 |
# On these systems (mostly older ones), use the old BSD-style |
| 443 |
# FIONBIO approach instead. |
| 444 |
#-------------------------------------------------------------------- |
| 445 |
|
| 446 |
SC_BLOCKING_STYLE |
| 447 |
|
| 448 |
#-------------------------------------------------------------------- |
| 449 |
# The statements below define a collection of symbols related to |
| 450 |
# building libtcl as a shared library instead of a static library. |
| 451 |
#-------------------------------------------------------------------- |
| 452 |
|
| 453 |
TCL_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX} |
| 454 |
TCL_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX} |
| 455 |
eval "TCL_LIB_FILE=libtcl${LIB_SUFFIX}" |
| 456 |
|
| 457 |
SC_ENABLE_FRAMEWORK |
| 458 |
|
| 459 |
# tclConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed |
| 460 |
# so that the backslashes quoting the DBX braces are dropped. |
| 461 |
|
| 462 |
# Trick to replace DBGX with TCL_DBGX |
| 463 |
DBGX='${TCL_DBGX}' |
| 464 |
eval "TCL_LIB_FILE=${TCL_LIB_FILE}" |
| 465 |
|
| 466 |
# Note: in the following variable, it's important to use the absolute |
| 467 |
# path name of the Tcl directory rather than "..": this is because |
| 468 |
# AIX remembers this path and will attempt to use it at run-time to look |
| 469 |
# up the Tcl library. |
| 470 |
|
| 471 |
if test "$FRAMEWORK_BUILD" = "1" ; then |
| 472 |
TCL_BUILD_LIB_SPEC="-F`pwd` -framework Tcl" |
| 473 |
TCL_LIB_SPEC="-framework Tcl" |
| 474 |
TCL_LIB_FILE="Tcl" |
| 475 |
elif test "$SHARED_BUILD" = "0" || test "$TCL_NEEDS_EXP_FILE" = "0"; then |
| 476 |
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then |
| 477 |
TCL_LIB_FLAG="-ltcl${TCL_VERSION}\${TCL_DBGX}" |
| 478 |
else |
| 479 |
TCL_LIB_FLAG="-ltcl`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}" |
| 480 |
fi |
| 481 |
TCL_BUILD_LIB_SPEC="-L`pwd` ${TCL_LIB_FLAG}" |
| 482 |
TCL_LIB_SPEC="-L${libdir} ${TCL_LIB_FLAG}" |
| 483 |
else |
| 484 |
TCL_BUILD_EXP_FILE="lib.exp" |
| 485 |
eval "TCL_EXP_FILE=libtcl${TCL_EXPORT_FILE_SUFFIX}" |
| 486 |
|
| 487 |
# Replace DBGX with TCL_DBGX |
| 488 |
eval "TCL_EXP_FILE=\"${TCL_EXP_FILE}\"" |
| 489 |
|
| 490 |
if test "$GCC" = "yes" ; then |
| 491 |
TCL_BUILD_LIB_SPEC="-Wl,-bI:`pwd`/${TCL_BUILD_EXP_FILE} -L`pwd`" |
| 492 |
TCL_LIB_SPEC="-Wl,-bI:${libdir}/${TCL_EXP_FILE} -L`pwd`" |
| 493 |
else |
| 494 |
TCL_BUILD_LIB_SPEC="-bI:`pwd`/${TCL_BUILD_EXP_FILE}" |
| 495 |
TCL_LIB_SPEC="-bI:${libdir}/${TCL_EXP_FILE}" |
| 496 |
fi |
| 497 |
fi |
| 498 |
VERSION='${VERSION}' |
| 499 |
eval "CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}" |
| 500 |
eval "CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}" |
| 501 |
eval "CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}" |
| 502 |
VERSION=${TCL_VERSION} |
| 503 |
|
| 504 |
#-------------------------------------------------------------------- |
| 505 |
# The statements below define the symbol TCL_PACKAGE_PATH, which |
| 506 |
# gives a list of directories that may contain packages. The list |
| 507 |
# consists of one directory for machine-dependent binaries and |
| 508 |
# another for platform-independent scripts. |
| 509 |
#-------------------------------------------------------------------- |
| 510 |
|
| 511 |
if test "$FRAMEWORK_BUILD" = "1" ; then |
| 512 |
TCL_PACKAGE_PATH="${libdir}/Resources/Scripts" |
| 513 |
elif test "$prefix" != "$exec_prefix"; then |
| 514 |
TCL_PACKAGE_PATH="${libdir} ${prefix}/lib" |
| 515 |
else |
| 516 |
TCL_PACKAGE_PATH="${prefix}/lib" |
| 517 |
fi |
| 518 |
|
| 519 |
#-------------------------------------------------------------------- |
| 520 |
# The statements below define various symbols relating to Tcl |
| 521 |
# stub support. |
| 522 |
#-------------------------------------------------------------------- |
| 523 |
|
| 524 |
# Replace ${VERSION} with contents of ${TCL_VERSION} |
| 525 |
eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}" |
| 526 |
# Replace DBGX with TCL_DBGX |
| 527 |
eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" |
| 528 |
|
| 529 |
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then |
| 530 |
TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}\${TCL_DBGX}" |
| 531 |
else |
| 532 |
TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`\${TCL_DBGX}" |
| 533 |
fi |
| 534 |
|
| 535 |
TCL_BUILD_STUB_LIB_SPEC="-L`pwd` ${TCL_STUB_LIB_FLAG}" |
| 536 |
TCL_STUB_LIB_SPEC="-L${libdir} ${TCL_STUB_LIB_FLAG}" |
| 537 |
TCL_BUILD_STUB_LIB_PATH="`pwd`/${TCL_STUB_LIB_FILE}" |
| 538 |
TCL_STUB_LIB_PATH="${libdir}/${TCL_STUB_LIB_FILE}" |
| 539 |
|
| 540 |
# Install time header dir can be set via --includedir |
| 541 |
eval "TCL_INCLUDE_SPEC=\"-I${includedir}\"" |
| 542 |
|
| 543 |
#------------------------------------------------------------------------ |
| 544 |
# tclConfig.sh refers to this by a different name |
| 545 |
#------------------------------------------------------------------------ |
| 546 |
|
| 547 |
TCL_SHARED_BUILD=${SHARED_BUILD} |
| 548 |
|
| 549 |
AC_SUBST(TCL_VERSION) |
| 550 |
AC_SUBST(TCL_MAJOR_VERSION) |
| 551 |
AC_SUBST(TCL_MINOR_VERSION) |
| 552 |
AC_SUBST(TCL_PATCH_LEVEL) |
| 553 |
|
| 554 |
AC_SUBST(TCL_LIB_FILE) |
| 555 |
AC_SUBST(TCL_LIB_FLAG) |
| 556 |
AC_SUBST(TCL_LIB_SPEC) |
| 557 |
AC_SUBST(TCL_STUB_LIB_FILE) |
| 558 |
AC_SUBST(TCL_STUB_LIB_FLAG) |
| 559 |
AC_SUBST(TCL_STUB_LIB_SPEC) |
| 560 |
AC_SUBST(TCL_STUB_LIB_PATH) |
| 561 |
AC_SUBST(TCL_INCLUDE_SPEC) |
| 562 |
AC_SUBST(TCL_BUILD_STUB_LIB_SPEC) |
| 563 |
AC_SUBST(TCL_BUILD_STUB_LIB_PATH) |
| 564 |
|
| 565 |
AC_SUBST(TCL_SRC_DIR) |
| 566 |
AC_SUBST(TCL_DBGX) |
| 567 |
AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX) |
| 568 |
AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX) |
| 569 |
AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX) |
| 570 |
|
| 571 |
AC_SUBST(TCL_SHARED_BUILD) |
| 572 |
AC_SUBST(LD_LIBRARY_PATH_VAR) |
| 573 |
|
| 574 |
AC_SUBST(TCL_BUILD_LIB_SPEC) |
| 575 |
AC_SUBST(TCL_NEEDS_EXP_FILE) |
| 576 |
AC_SUBST(TCL_BUILD_EXP_FILE) |
| 577 |
AC_SUBST(TCL_EXP_FILE) |
| 578 |
|
| 579 |
AC_SUBST(TCL_LIB_VERSIONS_OK) |
| 580 |
AC_SUBST(TCL_SHARED_LIB_SUFFIX) |
| 581 |
AC_SUBST(TCL_UNSHARED_LIB_SUFFIX) |
| 582 |
|
| 583 |
AC_SUBST(TCL_HAS_LONGLONG) |
| 584 |
|
| 585 |
AC_SUBST(BUILD_DLTEST) |
| 586 |
AC_SUBST(TCL_PACKAGE_PATH) |
| 587 |
|
| 588 |
AC_OUTPUT(Makefile dltest/Makefile tclConfig.sh) |