| 1 |
define([AC_CACHE_LOAD], )dnl |
| 2 |
define([AC_CACHE_SAVE], )dnl |
| 3 |
AC_INIT(generic/bltInit.c) |
| 4 |
AC_CONFIG_HEADER(generic/bltConfig.h) |
| 5 |
AC_CONFIG_AUX_DIR(cf) |
| 6 |
AC_PREREQ(2.0) |
| 7 |
|
| 8 |
# ----------------------------------------------------------------------- |
| 9 |
# |
| 10 |
# Handle command line options |
| 11 |
# |
| 12 |
# --with-tcl=DIR |
| 13 |
# --with-tk=DIR |
| 14 |
# --with-cc=CC |
| 15 |
# --with-cflags=flags This is probably for me only |
| 16 |
# --with-gnu-ld |
| 17 |
# |
| 18 |
# ----------------------------------------------------------------------- |
| 19 |
|
| 20 |
INC_SPECS="" |
| 21 |
LIB_SPECS="" |
| 22 |
TCL_ONLY_LIB_SPECS="" |
| 23 |
loader_run_path="" |
| 24 |
DEFINES="" |
| 25 |
|
| 26 |
blt_with_tcl="" |
| 27 |
blt_with_tk="" |
| 28 |
blt_enable_jpeg="no" |
| 29 |
blt_enable_cygwin="yes" |
| 30 |
blt_with_cc="" |
| 31 |
blt_with_cflags="$CFLAGS" |
| 32 |
blt_with_gnu_ld="no" |
| 33 |
blt_with_tcl_includes="" |
| 34 |
blt_with_tk_includes="" |
| 35 |
blt_with_tcl_libraries="" |
| 36 |
blt_with_tk_libraries="" |
| 37 |
blt_with_scriptdir="" |
| 38 |
|
| 39 |
AC_ARG_WITH(blt, [ --with-blt=DIR Install BLT scripts in DIR], |
| 40 |
blt_with_scriptdir=$withval) |
| 41 |
AC_ARG_WITH(tcl, [ --with-tcl=DIR Find tclConfig.sh in DIR], |
| 42 |
blt_with_tcl=$withval) |
| 43 |
AC_ARG_WITH(tk, [ --with-tk=DIR Find tkConfig.sh in DIR], |
| 44 |
blt_with_tk=$withval) |
| 45 |
AC_ARG_WITH(tclincls, [ --with-tclincls=DIR Find tcl.h in DIR], |
| 46 |
blt_with_tcl_includes=$withval) |
| 47 |
AC_ARG_WITH(tkincls, [ --with-tkincls=DIR Find tk.h in DIR], |
| 48 |
blt_with_tk_includes=$withval) |
| 49 |
AC_ARG_WITH(tcllibs, [ --with-tcllibs=DIR Find Tcl library in DIR], |
| 50 |
blt_with_tcl_libraries=$withval) |
| 51 |
AC_ARG_WITH(tklibs, [ --with-tklibs=DIR Find Tk library in DIR], |
| 52 |
blt_with_tk_libraries=$withval) |
| 53 |
AC_ARG_ENABLE(jpeg, [ --enable-jpeg=DIR Find JPEG headers and libraries in DIR], [ |
| 54 |
unset ac_cv_header_jpeglib_h |
| 55 |
unset ac_cv_lib_jpeg ac_cv_lib_jpeg_jpeg_read_header |
| 56 |
blt_enable_jpeg=$enableval ]) |
| 57 |
AC_ARG_ENABLE(cygwin, [ --enable-cygwin Use cygwin Tcl/Tk libraries. Requires cygwin1.dll], [ |
| 58 |
blt_enable_cygwin=$enableval ]) |
| 59 |
AC_ARG_WITH(cc, [ --with-cc=CC Set C compiler to CC], [ |
| 60 |
blt_with_cc=$with_cc |
| 61 |
unset ac_cv_prog_CC |
| 62 |
unset ac_cv_prog_CPP ]) |
| 63 |
AC_ARG_WITH(cflags, [ --with-cflags=FLAGS Set compiler flags to FLAGS], |
| 64 |
blt_with_cflags="$with_cflags") |
| 65 |
AC_ARG_WITH(gnu_ld, [ --with-gnu-ld Use GNU linker], |
| 66 |
blt_with_gnu_ld="yes") |
| 67 |
|
| 68 |
AC_CANONICAL_SYSTEM |
| 69 |
AC_PREFIX_PROGRAM(wish) |
| 70 |
|
| 71 |
# ----------------------------------------------------------------------- |
| 72 |
# |
| 73 |
# Set a variable containing current working directory if /bin/sh |
| 74 |
# doesn't do it already. |
| 75 |
# |
| 76 |
# ----------------------------------------------------------------------- |
| 77 |
|
| 78 |
PWD=`pwd` |
| 79 |
|
| 80 |
# ----------------------------------------------------------------------- |
| 81 |
# |
| 82 |
# C compiler and debugging flags |
| 83 |
# |
| 84 |
# ----------------------------------------------------------------------- |
| 85 |
|
| 86 |
BLT_ENV_CC=$CC |
| 87 |
|
| 88 |
# |
| 89 |
# CC search order |
| 90 |
# |
| 91 |
# 1. command line (--with-cc) |
| 92 |
# 2. environment variable ($CC) |
| 93 |
# 3. cached variable ($blt_cv_prog_cc) |
| 94 |
# 4. check for program (AC_PROG_CC) |
| 95 |
# 4. default to cc |
| 96 |
# |
| 97 |
|
| 98 |
AC_MSG_CHECKING([which C compiler]) |
| 99 |
if test "x${blt_with_cc}" != "x" ; then |
| 100 |
CC=${blt_with_cc} |
| 101 |
unset ac_cv_prog_CPP |
| 102 |
unset ac_cv_prog_CC |
| 103 |
elif test "x${BLT_ENV_CC}" != "x" ; then |
| 104 |
unset ac_cv_prog_CPP |
| 105 |
unset ac_cv_prog_CC |
| 106 |
elif test "x${blt_cv_prog_cc}" != "x" ; then |
| 107 |
CC=${blt_cv_prog_cc} |
| 108 |
unset ac_cv_prog_CC |
| 109 |
else |
| 110 |
AC_PROG_CC |
| 111 |
fi |
| 112 |
if test "x${CC}" = "x" ; then |
| 113 |
CC=cc |
| 114 |
fi |
| 115 |
|
| 116 |
case $target in |
| 117 |
*-*-cygwin*|*-*-mingw*) |
| 118 |
if test "${blt_enable_cygwin}" = "no" ; then |
| 119 |
CC="${CC} -mno-cygwin" |
| 120 |
fi |
| 121 |
;; |
| 122 |
esac |
| 123 |
|
| 124 |
AC_MSG_RESULT([$CC]) |
| 125 |
|
| 126 |
unset blt_cv_prog_cc |
| 127 |
AC_CACHE_VAL(blt_cv_prog_cc, blt_cv_prog_cc=$CC) |
| 128 |
AC_SUBST(CC) |
| 129 |
AC_PROG_CPP |
| 130 |
if test "x${GCC}" != "x" ; then |
| 131 |
blt_have_gcc="yes" |
| 132 |
else |
| 133 |
AC_MSG_CHECKING([if C compiler is really gcc]) |
| 134 |
AC_EGREP_CPP(_cc_is_gcc_, [ |
| 135 |
#ifdef __GNUC__ |
| 136 |
_cc_is_gcc_ |
| 137 |
#endif |
| 138 |
], [blt_have_gcc=yes], [blt_have_gcc=no]) |
| 139 |
AC_MSG_RESULT([$blt_have_gcc]) |
| 140 |
fi |
| 141 |
|
| 142 |
# |
| 143 |
# CFLAGS search order |
| 144 |
# |
| 145 |
# 1. command line (--with-cflags) |
| 146 |
# 2. cached variable ($blt_cv_prog_cflags) |
| 147 |
# 3. set to "-O6" if using gcc ($blt_have_gcc) |
| 148 |
# 4. otherwise, default to "-O" |
| 149 |
# |
| 150 |
AC_MSG_CHECKING([default compiler flags]) |
| 151 |
if test "x${blt_with_cflags}" != "x" ; then |
| 152 |
CFLAGS=${blt_with_cflags} |
| 153 |
elif test "x${blt_cv_prog_cflags}" != "x" ; then |
| 154 |
CFLAGS=${blt_cv_prog_cflags} |
| 155 |
elif test "${blt_have_gcc}" = "yes" ; then |
| 156 |
CFLAGS=-O6 |
| 157 |
else |
| 158 |
CFLAGS=-O |
| 159 |
fi |
| 160 |
AC_MSG_RESULT([$CFLAGS]) |
| 161 |
unset blt_cv_prog_cflags |
| 162 |
AC_CACHE_VAL(blt_cv_prog_cflags, blt_cv_prog_cflags=$CFLAGS) |
| 163 |
AC_SUBST(CFLAGS) |
| 164 |
|
| 165 |
GCCFLAGS="" |
| 166 |
if test "${blt_have_gcc}" = "yes" ; then |
| 167 |
GCCFLAGS="-Wall" |
| 168 |
if test "${CFLAGS}" = "-g" ; then |
| 169 |
GCCFLAGS="-Wshadow -Winline -Wpointer-arith ${GCCFLAGS}" |
| 170 |
fi |
| 171 |
fi |
| 172 |
AC_SUBST(GCCFLAGS) |
| 173 |
|
| 174 |
AC_CYGWIN |
| 175 |
|
| 176 |
blt_lib_prefix="lib" |
| 177 |
case $target in |
| 178 |
*-*-cygwin*|*-*-mingw*) |
| 179 |
blt_platform="win" |
| 180 |
if test "$ac_cv_cygwin" = "yes" ; then |
| 181 |
blt_lib_prefix="cyg" |
| 182 |
else |
| 183 |
blt_lib_prefix="" |
| 184 |
fi |
| 185 |
;; |
| 186 |
*-*-macosx) |
| 187 |
blt_platform="macosx" |
| 188 |
;; |
| 189 |
*) |
| 190 |
blt_platform="unix" |
| 191 |
;; |
| 192 |
esac |
| 193 |
|
| 194 |
|
| 195 |
# ----------------------------------------------------------------------- |
| 196 |
# |
| 197 |
# Programs: Check for existence of ranlib and install programs |
| 198 |
# |
| 199 |
# ----------------------------------------------------------------------- |
| 200 |
AC_PROG_AWK |
| 201 |
AC_PROG_INSTALL |
| 202 |
AC_PROG_RANLIB |
| 203 |
AC_PROG_LN_S |
| 204 |
|
| 205 |
# ----------------------------------------------------------------------- |
| 206 |
# |
| 207 |
# Libraries: Check for libraries used |
| 208 |
# |
| 209 |
# ----------------------------------------------------------------------- |
| 210 |
AC_CHECK_LIB(socket, main) |
| 211 |
AC_CHECK_LIB(nsl, main) |
| 212 |
AC_CHECK_LIB(m, main) |
| 213 |
# ----------------------------------------------------------------------- |
| 214 |
# |
| 215 |
# Headers: Check for header files used |
| 216 |
# |
| 217 |
# ----------------------------------------------------------------------- |
| 218 |
|
| 219 |
AC_HEADER_STDC |
| 220 |
AC_HEADER_SYS_WAIT |
| 221 |
AC_HEADER_TIME |
| 222 |
|
| 223 |
AC_CHECK_HEADERS(inttypes.h) |
| 224 |
if test "${ac_cv_header_inttypes_h}" = "yes" ; then |
| 225 |
HAVE_INTTYPES_H=1 |
| 226 |
else |
| 227 |
HAVE_INTTYPES_H=0 |
| 228 |
fi |
| 229 |
AC_SUBST(HAVE_INTTYPES_H) |
| 230 |
|
| 231 |
AC_CHECK_HEADERS(limits.h sys/param.h) |
| 232 |
AC_CHECK_HEADERS(string.h ctype.h) |
| 233 |
AC_CHECK_HEADERS(errno.h float.h math.h ieeefp.h) |
| 234 |
AC_CHECK_HEADERS(sys/time.h waitflags.h sys/wait.h) |
| 235 |
AC_CHECK_HEADERS(malloc.h memory.h) |
| 236 |
AC_CHECK_HEADERS(setjmp.h) |
| 237 |
|
| 238 |
if test "${blt_enable_jpeg}" != "no" ; then |
| 239 |
jpeg_save_CPPFLAGS=${CPPFLAGS} |
| 240 |
CPPFLAGS="" |
| 241 |
if test "${blt_enable_jpeg}" != "yes" ; then |
| 242 |
CPPFLAGS="-I${blt_enable_jpeg}/include" |
| 243 |
fi |
| 244 |
AC_CHECK_HEADERS(jpeglib.h, [JPEG_INC_SPEC="${CPPFLAGS}"], [JPEG_INC_SPEC=""]) |
| 245 |
CPPFLAGS=${jpeg_save_CPPFLAGS} |
| 246 |
fi |
| 247 |
|
| 248 |
# Run this check after jpeglib.h because jpeglib.h sets HAVE_STDLIB_H |
| 249 |
AC_CHECK_HEADERS(stdlib.h unistd.h) |
| 250 |
|
| 251 |
# ----------------------------------------------------------------------- |
| 252 |
# |
| 253 |
# Types: Check for existence of types of size_t and pid_t |
| 254 |
# |
| 255 |
# ----------------------------------------------------------------------- |
| 256 |
AC_TYPE_SIZE_T |
| 257 |
AC_TYPE_PID_T |
| 258 |
|
| 259 |
AC_MSG_CHECKING([whether union wait is defined correctly]) |
| 260 |
AC_CACHE_VAL(blt_cv_struct_wait_works, |
| 261 |
AC_TRY_COMPILE([#include <sys/types.h> |
| 262 |
#include <sys/wait.h>], [ |
| 263 |
/* |
| 264 |
* Check whether <sys/wait.h> defines the type "union wait" |
| 265 |
* correctly. It's needed because of weirdness in HP-UX where |
| 266 |
* "union wait" is defined in both the BSD and SYS-V environments. |
| 267 |
* Checking the usability of WIFEXITED seems to do the trick. |
| 268 |
*/ |
| 269 |
union wait x; |
| 270 |
WIFEXITED(x); /* Generates compiler error if WIFEXITED |
| 271 |
* uses an int. */ |
| 272 |
], |
| 273 |
[blt_cv_struct_wait_works="yes"], |
| 274 |
[blt_cv_struct_wait_works="no"])) |
| 275 |
|
| 276 |
if test "${blt_cv_struct_wait_works}" = "yes"; then |
| 277 |
AC_DEFINE(HAVE_UNION_WAIT) |
| 278 |
fi |
| 279 |
AC_MSG_RESULT([$blt_cv_struct_wait_works]) |
| 280 |
|
| 281 |
# ----------------------------------------------------------------------- |
| 282 |
# |
| 283 |
# Compiler characteristics: |
| 284 |
# Check for existence of types of size_t and pid_t |
| 285 |
# |
| 286 |
# ----------------------------------------------------------------------- |
| 287 |
|
| 288 |
AC_C_BIGENDIAN |
| 289 |
AC_CHECK_SIZEOF(int) |
| 290 |
AC_CHECK_SIZEOF(long) |
| 291 |
AC_CHECK_SIZEOF(long long) |
| 292 |
AC_CHECK_SIZEOF(void *) |
| 293 |
|
| 294 |
SIZEOF_LONG="${ac_cv_sizeof_long}" |
| 295 |
SIZEOF_LONG_LONG="${ac_cv_sizeof_long_long}" |
| 296 |
SIZEOF_VOID_P="${ac_cv_sizeof_void_p}" |
| 297 |
SIZEOF_INT="${ac_cv_sizeof_int}" |
| 298 |
AC_SUBST(SIZEOF_INT) |
| 299 |
AC_SUBST(SIZEOF_LONG) |
| 300 |
AC_SUBST(SIZEOF_LONG_LONG) |
| 301 |
AC_SUBST(SIZEOF_VOID_P) |
| 302 |
|
| 303 |
# ----------------------------------------------------------------------- |
| 304 |
# |
| 305 |
# Library Functions: Check for strdup, drand48, and srand48. |
| 306 |
# |
| 307 |
# ----------------------------------------------------------------------- |
| 308 |
|
| 309 |
AC_HAVE_FUNCS(strdup strcasecmp strncasecmp drand48 srand48 finite isnan) |
| 310 |
|
| 311 |
# For HPUX it's a little more complicated to search for isfinite |
| 312 |
AC_MSG_CHECKING([for isfinite]) |
| 313 |
AC_CACHE_VAL(blt_cv_have_isfinite, |
| 314 |
AC_TRY_LINK([#include <math.h>], [ |
| 315 |
double x = 1.0; |
| 316 |
if (isfinite(x)) { |
| 317 |
return 0; |
| 318 |
} |
| 319 |
], [blt_cv_have_isfinite="yes"], [blt_cv_have_isfinite="no"])) |
| 320 |
|
| 321 |
if test "${blt_cv_have_isfinite}" = "yes"; then |
| 322 |
AC_DEFINE(HAVE_ISFINITE) |
| 323 |
fi |
| 324 |
AC_MSG_RESULT([$blt_cv_have_isfinite]) |
| 325 |
|
| 326 |
# ----------------------------------------------------------------------- |
| 327 |
# |
| 328 |
# Check the smallest value such that 1.0 + x != 1.0. |
| 329 |
# For ANSI compilers this is DBL_EPSILON in float.h |
| 330 |
# |
| 331 |
#-------------------------------------------------------------------- |
| 332 |
|
| 333 |
AC_MSG_CHECKING([whether DBL_EPSILON is defined in float.h]) |
| 334 |
AC_CACHE_VAL(blt_cv_found_dbl_epsilon, |
| 335 |
AC_EGREP_CPP(yes, |
| 336 |
[ |
| 337 |
#ifdef HAVE_FLOAT_H |
| 338 |
#include <float.h> |
| 339 |
#endif |
| 340 |
#ifdef DBL_EPSILON |
| 341 |
yes |
| 342 |
#endif |
| 343 |
], blt_cv_found_dbl_epsilon=yes, blt_cv_found_dbl_epsilon=no) |
| 344 |
) |
| 345 |
AC_MSG_RESULT([${blt_cv_found_dbl_epsilon}]) |
| 346 |
|
| 347 |
if test "${blt_cv_found_dbl_epsilon}" = "no" ; then |
| 348 |
AC_CACHE_VAL(blt_cv_dbl_epsilon, |
| 349 |
old_flags="$CFLAGS" |
| 350 |
CFLAGS="-g -lm" |
| 351 |
AC_MSG_CHECKING([whether DBL_EPSILON can be computed]) |
| 352 |
AC_TRY_RUN_WITH_OUTPUT([blt_cv_dbl_epsilon], [ |
| 353 |
main () { |
| 354 |
double e, u; |
| 355 |
/* |
| 356 |
* Check the smallest value such that 1.0 + x != 1.0. |
| 357 |
* For ANSI compilers this is DBL_EPSILON in float.h |
| 358 |
*/ |
| 359 |
u = 1.0; |
| 360 |
for(;;) { |
| 361 |
u *= 0.5; |
| 362 |
if ((1.0 + u) == 1.0) { |
| 363 |
break; |
| 364 |
} |
| 365 |
} |
| 366 |
e = u * 2.0; |
| 367 |
printf("%.17e\n", e); |
| 368 |
exit(0); |
| 369 |
}]) |
| 370 |
CFLAGS="$old_flags" |
| 371 |
AC_DEFINE_UNQUOTED(BLT_DBL_EPSILON, ${blt_cv_dbl_epsilon}) |
| 372 |
AC_MSG_RESULT([${blt_cv_dbl_epsilon}]) |
| 373 |
) |
| 374 |
fi |
| 375 |
|
| 376 |
|
| 377 |
AC_MSG_CHECKING([whether declaration is needed for strdup]) |
| 378 |
AC_CACHE_VAL(blt_cv_nedd_decl_strdup, |
| 379 |
AC_EGREP_CPP(strdup, [ |
| 380 |
#ifdef HAVE_STDLIB_H |
| 381 |
#include <stdlib.h> |
| 382 |
#endif |
| 383 |
#ifdef HAVE_STRING_H |
| 384 |
#include <string.h> |
| 385 |
#endif |
| 386 |
#ifdef HAVE_UNISTD_H |
| 387 |
#include <unistd.h> |
| 388 |
#endif /* HAVE_UNISTD_H */ |
| 389 |
], [blt_cv_need_decl_strdup=no], [blt_cv_need_decl_strdup=yes])) |
| 390 |
|
| 391 |
if test "${blt_cv_need_decl_strdup}" = "yes"; then |
| 392 |
AC_DEFINE(NEED_DECL_STRDUP) |
| 393 |
fi |
| 394 |
AC_MSG_RESULT([$blt_cv_need_decl_strdup]) |
| 395 |
|
| 396 |
AC_MSG_CHECKING([whether declaration is needed for drand48]) |
| 397 |
AC_CACHE_VAL(blt_cv_need_decl_drand48, |
| 398 |
AC_EGREP_CPP(drand48, [ |
| 399 |
#ifdef HAVE_STDLIB_H |
| 400 |
#include <stdlib.h> |
| 401 |
#endif |
| 402 |
#ifdef HAVE_MATH_H |
| 403 |
#include <math.h> |
| 404 |
#endif |
| 405 |
#ifdef HAVE_UNISTD_H |
| 406 |
#include <unistd.h> |
| 407 |
#endif /* HAVE_UNISTD_H */ |
| 408 |
], [blt_cv_need_decl_drand48=no], [blt_cv_need_decl_drand48=yes])) |
| 409 |
|
| 410 |
if test "${blt_cv_need_decl_drand48}" = "yes"; then |
| 411 |
AC_DEFINE(NEED_DECL_DRAND48) |
| 412 |
fi |
| 413 |
AC_MSG_RESULT([$blt_cv_need_decl_drand48]) |
| 414 |
|
| 415 |
AC_MSG_CHECKING([whether declaration is needed for srand48]) |
| 416 |
AC_CACHE_VAL(blt_cv_need_decl_srand48, |
| 417 |
AC_EGREP_CPP(srand48, [ |
| 418 |
#ifdef HAVE_STDLIB_H |
| 419 |
#include <stdlib.h> |
| 420 |
#endif |
| 421 |
#ifdef HAVE_MATH_H |
| 422 |
#include <math.h> |
| 423 |
#endif |
| 424 |
#ifdef HAVE_UNISTD_H |
| 425 |
#include <unistd.h> |
| 426 |
#endif /* HAVE_UNISTD_H */ |
| 427 |
], [blt_cv_need_decl_srand48=no], [blt_cv_need_decl_srand48=yes])) |
| 428 |
|
| 429 |
if test "${blt_cv_need_decl_srand48}" = "yes"; then |
| 430 |
AC_DEFINE(NEED_DECL_SRAND48) |
| 431 |
fi |
| 432 |
AC_MSG_RESULT([$blt_cv_need_decl_srand48]) |
| 433 |
|
| 434 |
AC_MSG_CHECKING([whether declaration is needed for j1]) |
| 435 |
AC_CACHE_VAL(blt_cv_need_decl_j1, |
| 436 |
AC_EGREP_CPP(j1, [ |
| 437 |
#ifdef HAVE_STDLIB_H |
| 438 |
#include <stdlib.h> |
| 439 |
#endif |
| 440 |
#ifdef HAVE_MATH_H |
| 441 |
#include <math.h> |
| 442 |
#endif |
| 443 |
#ifdef HAVE_UNISTD_H |
| 444 |
#include <unistd.h> |
| 445 |
#endif /* HAVE_UNISTD_H */ |
| 446 |
], [blt_cv_need_decl_j1=no], [blt_cv_need_decl_j1=yes])) |
| 447 |
|
| 448 |
if test "${blt_cv_need_decl_j1}" = "yes"; then |
| 449 |
AC_DEFINE(NEED_DECL_J1) |
| 450 |
fi |
| 451 |
AC_MSG_RESULT([$blt_cv_need_decl_j1]) |
| 452 |
|
| 453 |
# ----------------------------------------------------------------------- |
| 454 |
# |
| 455 |
# System services: X, Tcl, Tk |
| 456 |
# |
| 457 |
# ----------------------------------------------------------------------- |
| 458 |
AC_PATH_X |
| 459 |
|
| 460 |
# ----------------------------------------------------------------------- |
| 461 |
# |
| 462 |
# Find the Tcl build configuration file "tclConfig.sh" |
| 463 |
# |
| 464 |
# ----------------------------------------------------------------------- |
| 465 |
|
| 466 |
AC_MSG_CHECKING([for tclConfig.sh]) |
| 467 |
tcl_config_sh="" |
| 468 |
if test "x$blt_with_tcl" != "x" ; then |
| 469 |
|
| 470 |
# Verify that a tclConfig.sh file exists in the directory specified |
| 471 |
# by --with-tcl. |
| 472 |
|
| 473 |
for dir in \ |
| 474 |
$blt_with_tcl |
| 475 |
do |
| 476 |
if test -r "$dir/tclConfig.sh" ; then |
| 477 |
tcl_config_sh="$dir/tclConfig.sh" |
| 478 |
break |
| 479 |
elif test -r "$dir/lib/tclConfig.sh" ; then |
| 480 |
tcl_config_sh="$dir/lib/tclConfig.sh" |
| 481 |
break |
| 482 |
elif test -r "$dir/$blt_platform/tclConfig.sh" ; then |
| 483 |
tcl_config_sh="$dir/$blt_platform/tclConfig.sh" |
| 484 |
break |
| 485 |
fi |
| 486 |
done |
| 487 |
else |
| 488 |
|
| 489 |
# Otherwise, search for Tcl configuration file. |
| 490 |
|
| 491 |
# 1. Search previously named locations. |
| 492 |
|
| 493 |
for dir in \ |
| 494 |
$prefix \ |
| 495 |
$exec_prefix \ |
| 496 |
$blt_cv_tcl_lib |
| 497 |
do |
| 498 |
if test -r "$dir/tclConfig.sh" ; then |
| 499 |
tcl_config_sh="$dir/tclConfig.sh" |
| 500 |
break |
| 501 |
elif test -r "$dir/lib/tclConfig.sh" ; then |
| 502 |
tcl_config_sh="$dir/lib/tclConfig.sh" |
| 503 |
break |
| 504 |
elif test -r "$dir/$blt_platform/tclConfig.sh" ; then |
| 505 |
tcl_config_sh="$dir/$blt_platform/tclConfig.sh" |
| 506 |
break |
| 507 |
fi |
| 508 |
done |
| 509 |
|
| 510 |
# 2. Search source directories. |
| 511 |
|
| 512 |
if test "x$tcl_config_sh" = "x" ; then |
| 513 |
for dir in \ |
| 514 |
`ls -dr ../tcl[[7-9]].[[0-9]]* 2>/dev/null` \ |
| 515 |
../tcl \ |
| 516 |
`ls -dr ../../tcl[[7-9]].[[0-9]]* 2>/dev/null` \ |
| 517 |
../../tcl \ |
| 518 |
`ls -dr ../../../tcl[[7-9]].[[0-9]]* 2>/dev/null` \ |
| 519 |
../../../tcl |
| 520 |
do |
| 521 |
if test -r "$dir/$blt_platform/tclConfig.sh" ; then |
| 522 |
tcl_config_sh="$dir/$blt_platform/tclConfig.sh" |
| 523 |
break |
| 524 |
fi |
| 525 |
done |
| 526 |
fi |
| 527 |
|
| 528 |
# 3. Search standard locations. |
| 529 |
|
| 530 |
if test "x$tcl_config_sh" = "x" ; then |
| 531 |
for dir in \ |
| 532 |
`ls -dr /usr/local/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ |
| 533 |
/usr/local/tcl \ |
| 534 |
/usr/local \ |
| 535 |
/usr |
| 536 |
do |
| 537 |
if test -r "$dir/tclConfig.sh" ; then |
| 538 |
tcl_config_sh="$dir/tclConfig.sh" |
| 539 |
break |
| 540 |
elif test -r "$dir/lib/tclConfig.sh" ; then |
| 541 |
tcl_config_sh="$dir/lib/tclConfig.sh" |
| 542 |
break |
| 543 |
fi |
| 544 |
done |
| 545 |
fi |
| 546 |
fi |
| 547 |
|
| 548 |
AC_MSG_RESULT([${tcl_config_sh}]) |
| 549 |
|
| 550 |
if test "x$tcl_config_sh" = "x" ; then |
| 551 |
echo "can't find Tcl configuration script \"tclConfig.sh\"" |
| 552 |
exit 1 |
| 553 |
fi |
| 554 |
|
| 555 |
# ----------------------------------------------------------------------- |
| 556 |
# |
| 557 |
# Find the Tk build configuration file "tkConfig.sh" |
| 558 |
# |
| 559 |
# ----------------------------------------------------------------------- |
| 560 |
|
| 561 |
AC_MSG_CHECKING([for tkConfig.sh]) |
| 562 |
tk_config_sh="" |
| 563 |
if test "x$blt_with_tk" != "x" -o "x$blt_with_tcl" != "x"; then |
| 564 |
|
| 565 |
# Verify that a tkConfig.sh file exists in the directory specified |
| 566 |
# by --with-tcl or --with-tk. |
| 567 |
|
| 568 |
for dir in \ |
| 569 |
$blt_with_tk \ |
| 570 |
$blt_with_tcl |
| 571 |
do |
| 572 |
if test -r "$dir/tkConfig.sh" ; then |
| 573 |
tk_config_sh="$dir/tkConfig.sh" |
| 574 |
break |
| 575 |
elif test -r "$dir/lib/tkConfig.sh" ; then |
| 576 |
tk_config_sh="$dir/lib/tkConfig.sh" |
| 577 |
break |
| 578 |
elif test -r "$dir/$blt_platform/tkConfig.sh" ; then |
| 579 |
tk_config_sh="$dir/$blt_platform/tkConfig.sh" |
| 580 |
break |
| 581 |
fi |
| 582 |
done |
| 583 |
else |
| 584 |
|
| 585 |
# Search for Tk configuration file. |
| 586 |
|
| 587 |
# 1. Search previously named locations. |
| 588 |
|
| 589 |
for dir in \ |
| 590 |
$prefix \ |
| 591 |
$exec_prefix \ |
| 592 |
$blt_cv_tk_lib \ |
| 593 |
$blt_cv_tcl_lib |
| 594 |
do |
| 595 |
if test -r "$dir/tkConfig.sh" ; then |
| 596 |
tk_config_sh="$dir/tkConfig.sh" |
| 597 |
break |
| 598 |
elif test -r "$dir/lib/tkConfig.sh" ; then |
| 599 |
tk_config_sh="$dir/lib/tkConfig.sh" |
| 600 |
break |
| 601 |
elif test -r "$dir/$blt_platform/tkConfig.sh" ; then |
| 602 |
tk_config_sh="$dir/$blt_platform/tkConfig.sh" |
| 603 |
break |
| 604 |
fi |
| 605 |
done |
| 606 |
|
| 607 |
# 2. Search source directories. |
| 608 |
|
| 609 |
if test "x$tk_config_sh" = "x" ; then |
| 610 |
for dir in \ |
| 611 |
../tcl \ |
| 612 |
`ls -dr ../tk[[4-9]].[[0-9]]* 2>/dev/null` \ |
| 613 |
../../tcl \ |
| 614 |
`ls -dr ../../tk[[4-9]].[[0-9]]* 2>/dev/null` \ |
| 615 |
../../../tcl \ |
| 616 |
`ls -dr ../../../tk[[4-9]].[[0-9]]* 2>/dev/null` |
| 617 |
do |
| 618 |
if test -r "$dir/$blt_platform/tkConfig.sh"; then |
| 619 |
tk_config_sh="$dir/$blt_platform/tkConfig.sh" |
| 620 |
break |
| 621 |
fi |
| 622 |
done |
| 623 |
fi |
| 624 |
|
| 625 |
# 3. Search standard locations. |
| 626 |
|
| 627 |
if test "x$tk_config_sh" = "x" ; then |
| 628 |
for dir in \ |
| 629 |
`ls -dr /usr/local/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ |
| 630 |
/usr/local/tcl \ |
| 631 |
/usr/local \ |
| 632 |
${x_libraries} \ |
| 633 |
/usr |
| 634 |
do |
| 635 |
if test -r "$dir/tkConfig.sh" ; then |
| 636 |
tk_config_sh="$dir/tkConfig.sh" |
| 637 |
break |
| 638 |
elif test -r "$dir/lib/tkConfig.sh" ; then |
| 639 |
tk_config_sh="$dir/lib/tkConfig.sh" |
| 640 |
break |
| 641 |
fi |
| 642 |
done |
| 643 |
fi |
| 644 |
fi |
| 645 |
AC_MSG_RESULT([${tk_config_sh}]) |
| 646 |
|
| 647 |
if test "x$tk_config_sh" = "x" ; then |
| 648 |
echo "can't find Tk configuration script \"tkConfig.sh\"" |
| 649 |
exit 1 |
| 650 |
fi |
| 651 |
|
| 652 |
# ----------------------------------------------------------------------- |
| 653 |
# |
| 654 |
# Source in the Tcl/Tk configuration scripts. |
| 655 |
# |
| 656 |
# ----------------------------------------------------------------------- |
| 657 |
|
| 658 |
. $tcl_config_sh |
| 659 |
. $tk_config_sh |
| 660 |
|
| 661 |
TCL_INC_DIR="" |
| 662 |
TK_INC_DIR="" |
| 663 |
|
| 664 |
if test "x${blt_with_tcl_includes}" != "x" ; then |
| 665 |
if test -r "${blt_with_tcl_includes}/tcl.h" ; then |
| 666 |
TCL_INC_DIR=${blt_with_tcl_includes} |
| 667 |
else |
| 668 |
echo "Can't find tcl.h in \"${blt_with_tcl_includes}\"" |
| 669 |
exit 1 |
| 670 |
fi |
| 671 |
else |
| 672 |
for dir in \ |
| 673 |
${TCL_PREFIX}/include/tcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION} \ |
| 674 |
${TCL_PREFIX}/include \ |
| 675 |
${TCL_SRC_DIR}/generic |
| 676 |
do |
| 677 |
if test -r "$dir/tcl.h" ; then |
| 678 |
TCL_INC_DIR=$dir |
| 679 |
break |
| 680 |
fi |
| 681 |
done |
| 682 |
if test "x${TCL_INC_DIR}" = "x" ; then |
| 683 |
echo "Can't find tcl.h header file" |
| 684 |
exit 1 |
| 685 |
fi |
| 686 |
fi |
| 687 |
|
| 688 |
if test "x${blt_with_tk_includes}" != "x" ; then |
| 689 |
if test -r "${blt_with_tk_includes}/tk.h" ; then |
| 690 |
TK_INC_DIR=${blt_with_tk_includes} |
| 691 |
else |
| 692 |
echo "Can't find tk.h in \"${blt_with_tk_includes}\"" |
| 693 |
exit 1 |
| 694 |
fi |
| 695 |
else |
| 696 |
for dir in \ |
| 697 |
${TK_PREFIX}/include/tk${TK_MAJOR_VERSION}.${TK_MINOR_VERSION} \ |
| 698 |
${TK_PREFIX}/include \ |
| 699 |
${TK_SRC_DIR}/generic \ |
| 700 |
${TCL_INC_DIR} |
| 701 |
do |
| 702 |
if test -r "$dir/tk.h" ; then |
| 703 |
TK_INC_DIR=$dir |
| 704 |
break |
| 705 |
fi |
| 706 |
done |
| 707 |
if test "x${TK_INC_DIR}" = "x" ; then |
| 708 |
echo "Can't find tk.h header file" |
| 709 |
exit 1 |
| 710 |
fi |
| 711 |
fi |
| 712 |
|
| 713 |
case $target in |
| 714 |
*-sunos4*|*-*-netbsd|NetBSD-*|FreeBSD-*|OpenBSD-*|*-*-cygwin*|*-*-mingw*) |
| 715 |
TCL_LIB_NAME="tcl${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}" |
| 716 |
TK_LIB_NAME="tk${TK_MAJOR_VERSION}${TK_MINOR_VERSION}" |
| 717 |
;; |
| 718 |
*) |
| 719 |
TCL_LIB_NAME="tcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}" |
| 720 |
TK_LIB_NAME="tk${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}" |
| 721 |
;; |
| 722 |
esac |
| 723 |
|
| 724 |
TCL_LIB_SPEC="-l${TCL_LIB_NAME}" |
| 725 |
TK_LIB_SPEC="-l${TK_LIB_NAME}" |
| 726 |
|
| 727 |
case $target in |
| 728 |
*-hpux*) |
| 729 |
SHLIB_SUFFIX="sl" |
| 730 |
;; |
| 731 |
*) |
| 732 |
SHLIB_SUFFIX="so" |
| 733 |
;; |
| 734 |
esac |
| 735 |
|
| 736 |
TCL_LIB_DIR="${TCL_SRC_DIR}/$blt_platform" |
| 737 |
TK_LIB_DIR="${TK_SRC_DIR}/$blt_platform" |
| 738 |
|
| 739 |
if test "x${blt_with_tcl_libraries}" != "x" ; then |
| 740 |
for libname in \ |
| 741 |
"${blt_with_tcl_libraries}/lib${TCL_LIB_NAME}.${SHLIB_SUFFIX}" \ |
| 742 |
"${blt_with_tcl_libraries}/lib${TCL_LIB_NAME}.a" |
| 743 |
do |
| 744 |
if test -r "$libname" ; then |
| 745 |
TCL_LIB_DIR="${blt_with_tcl_libraries}" |
| 746 |
break |
| 747 |
fi |
| 748 |
done |
| 749 |
if test "x${TCL_LIB_DIR}" = "x" ; then |
| 750 |
echo "Can't find tcl library in \"${blt_with_tcl_libraries}\"" |
| 751 |
exit 1 |
| 752 |
fi |
| 753 |
else |
| 754 |
for libname in \ |
| 755 |
"${TCL_EXEC_PREFIX}/lib/lib${TCL_LIB_NAME}.${SHLIB_SUFFIX}" \ |
| 756 |
"${TCL_EXEC_PREFIX}/lib/lib${TCL_LIB_NAME}.a" |
| 757 |
do |
| 758 |
if test -r "$libname" ; then |
| 759 |
TCL_LIB_DIR="${TCL_EXEC_PREFIX}/lib" |
| 760 |
break |
| 761 |
fi |
| 762 |
done |
| 763 |
if test "x${TCL_LIB_DIR}" = "x" ; then |
| 764 |
echo "Can't find tcl library" |
| 765 |
exit 1 |
| 766 |
fi |
| 767 |
fi |
| 768 |
|
| 769 |
if test "x${blt_with_tk_libraries}" != "x" ; then |
| 770 |
for libname in \ |
| 771 |
"${blt_with_tk_libraries}/lib${TK_LIB_NAME}.${SHLIB_SUFFIX}" \ |
| 772 |
"${blt_with_tk_libraries}/lib${TK_LIB_NAME}.a" |
| 773 |
do |
| 774 |
if test -r "$libname" ; then |
| 775 |
TK_LIB_DIR="${blt_with_tk_libraries}" |
| 776 |
break |
| 777 |
fi |
| 778 |
done |
| 779 |
if test "x${TK_LIB_DIR}" = "x" ; then |
| 780 |
echo "Can't find tk library in \"${blt_with_tk_libraries}\"" |
| 781 |
exit 1 |
| 782 |
fi |
| 783 |
else |
| 784 |
for libname in \ |
| 785 |
"${TK_EXEC_PREFIX}/lib/lib${TK_LIB_NAME}.${SHLIB_SUFFIX}" \ |
| 786 |
"${TK_EXEC_PREFIX}/lib/lib${TK_LIB_NAME}.a" |
| 787 |
do |
| 788 |
if test -r "$libname" ; then |
| 789 |
TK_LIB_DIR="${TK_EXEC_PREFIX}/lib" |
| 790 |
break |
| 791 |
fi |
| 792 |
done |
| 793 |
if test "x${TK_LIB_DIR}" = "x" ; then |
| 794 |
echo "Can't find tk library" |
| 795 |
exit 1 |
| 796 |
fi |
| 797 |
fi |
| 798 |
|
| 799 |
# ----------------------------------------------------------------------- |
| 800 |
# |
| 801 |
# Include files |
| 802 |
# |
| 803 |
# Append to INC_SPECS the various include files specifications |
| 804 |
# (built fromt the include directory information). |
| 805 |
# |
| 806 |
# ----------------------------------------------------------------------- |
| 807 |
|
| 808 |
# JPEG include files |
| 809 |
if test "${blt_enable_jpeg}" != "no" ; then |
| 810 |
if test "x${JPEG_INC_SPEC}" != "x" ; then |
| 811 |
INC_SPECS="${INC_SPECS} ${JPEG_INC_SPEC}" |
| 812 |
fi |
| 813 |
fi |
| 814 |
|
| 815 |
# Tk include files |
| 816 |
if test "${TK_INC_DIR}" != "/usr/include" ; then |
| 817 |
INC_SPECS="${INC_SPECS} -I${TK_INC_DIR}" |
| 818 |
fi |
| 819 |
|
| 820 |
# Tcl include files |
| 821 |
# |
| 822 |
# Add the include directory specification only if the Tcl |
| 823 |
# headers reside in a different directory from Tk's. |
| 824 |
if test "${TCL_INC_DIR}" != "/usr/include" -a \ |
| 825 |
"${TCL_INC_DIR}" != "${TK_INC_DIR}" ; then |
| 826 |
INC_SPECS="${INC_SPECS} -I${TCL_INC_DIR}" |
| 827 |
fi |
| 828 |
INC_SPECS="${INC_SPECS} -I${TCL_SRC_DIR}/generic -I${TCL_SRC_DIR}/unix" |
| 829 |
|
| 830 |
|
| 831 |
# On Windows, override the default include directory with our own. |
| 832 |
if test "${blt_platform}" = "win"; then |
| 833 |
x_includes="NONE" |
| 834 |
fi |
| 835 |
|
| 836 |
# X11 include files |
| 837 |
if test "x${x_includes}" != "x" -a \ |
| 838 |
"${x_includes}" != "NONE" -a \ |
| 839 |
"${x_includes}" != "/usr/include" -a \ |
| 840 |
"${x_includes}" != "${TK_INC_DIR}" -a \ |
| 841 |
"${x_includes}" != "${TCL_INC_DIR}" ; then |
| 842 |
INC_SPECS="${INC_SPECS} -I${x_includes}" |
| 843 |
fi |
| 844 |
|
| 845 |
# ----------------------------------------------------------------------- |
| 846 |
# |
| 847 |
# Libraries |
| 848 |
# |
| 849 |
# Append to LIB the various library specifications |
| 850 |
# (built from the library directory information). |
| 851 |
# |
| 852 |
# ----------------------------------------------------------------------- |
| 853 |
|
| 854 |
# Tk libraries |
| 855 |
if test "${TK_LIB_DIR}" = "/usr/lib" ; then |
| 856 |
LIB_SPECS="${LIB_SPECS} ${TK_LIB_SPEC}" |
| 857 |
else |
| 858 |
LIB_SPECS="${LIB_SPECS} -L${TK_LIB_DIR} ${TK_LIB_SPEC}" |
| 859 |
if test "x${loader_run_path}" = "x" ; then |
| 860 |
loader_run_path="${TK_LIB_DIR}" |
| 861 |
else |
| 862 |
loader_run_path="${TK_LIB_DIR}:${loader_run_path}" |
| 863 |
fi |
| 864 |
fi |
| 865 |
|
| 866 |
# Tcl libraries |
| 867 |
if test "${TCL_LIB_DIR}" = "/usr/lib" -o \ |
| 868 |
"${TCL_LIB_DIR}" = "${TK_LIB_DIR}" ; then |
| 869 |
LIB_SPECS="${LIB_SPECS} ${TCL_LIB_SPEC}" |
| 870 |
else |
| 871 |
LIB_SPECS="${LIB_SPECS} -L${TCL_LIB_DIR} ${TCL_LIB_SPEC}" |
| 872 |
if test "x${loader_run_path}" = "x" ; then |
| 873 |
loader_run_path="${TCL_LIB_DIR}" |
| 874 |
else |
| 875 |
loader_run_path="${TCL_LIB_DIR}:${loader_run_path}" |
| 876 |
fi |
| 877 |
fi |
| 878 |
|
| 879 |
if test "${TCL_LIB_DIR}" = "/usr/lib" ; then |
| 880 |
TCL_ONLY_LIB_SPECS="${TCL_LIB_SPEC}" |
| 881 |
else |
| 882 |
TCL_ONLY_LIB_SPECS="-L${TCL_LIB_DIR} ${TCL_LIB_SPEC}" |
| 883 |
fi |
| 884 |
|
| 885 |
|
| 886 |
# Collect the libraries for AIX that aren't using stubs. |
| 887 |
aix_lib_specs="" |
| 888 |
|
| 889 |
|
| 890 |
if test "${blt_platform}" = "win"; then |
| 891 |
LIB_SPECS="${LIB_SPECS} -mwindows" |
| 892 |
elif test "${blt_platform}" = "unix"; then |
| 893 |
|
| 894 |
# Add specification for X11 library only on Unix platforms. |
| 895 |
|
| 896 |
if test "x${x_libraries}" = "x" -o \ |
| 897 |
"x${x_libraries}" = "NONE" -o \ |
| 898 |
"${x_libraries}" = "/usr/lib" -o \ |
| 899 |
"${x_libraries}" = "${TK_LIB_DIR}" -o \ |
| 900 |
"${x_libraries}" = "${TCL_LIB_DIR}" ; then |
| 901 |
LIB_SPECS="${LIB_SPECS} -lX11" |
| 902 |
aix_lib_specs="${aix_lib_specs} -lX11" |
| 903 |
else |
| 904 |
LIB_SPECS="${LIB_SPECS} -L${x_libraries} -lX11" |
| 905 |
aix_lib_specs="${aix_lib_specs} -L${x_libraries} -lX11" |
| 906 |
if test "x${loader_run_path}" = "x" ; then |
| 907 |
loader_run_path="${x_libraries}" |
| 908 |
else |
| 909 |
loader_run_path="${loader_run_path}:${x_libraries}" |
| 910 |
fi |
| 911 |
fi |
| 912 |
fi |
| 913 |
|
| 914 |
# JPEG library |
| 915 |
if test "${blt_enable_jpeg}" != "no" ; then |
| 916 |
jpeg_save_LDFlags="${LDFLAGS}" |
| 917 |
JPEG_LIB_SPEC="-ljpeg" |
| 918 |
JPEG_LIB_DIR="" |
| 919 |
if test "${blt_enable_jpeg}" != "yes" ; then |
| 920 |
JPEG_LIB_DIR="${blt_enable_jpeg}/lib" |
| 921 |
JPEG_LIB_SPEC="-L${JPEG_LIB_DIR} ${JPEG_LIB_SPEC}" |
| 922 |
LDFLAGS="-L${JPEG_LIB_DIR} ${LDFLAGS}" |
| 923 |
fi |
| 924 |
AC_CHECK_LIB(jpeg, jpeg_read_header, [found=yes], [found=no], ) |
| 925 |
if test "${found}" = "yes" ; then |
| 926 |
LIB_SPECS="${LIB_SPECS} ${JPEG_LIB_SPEC}" |
| 927 |
aix_lib_specs="${aix_lib_specs} ${JPEG_LIB_SPEC}" |
| 928 |
if test "x${JPEG_LIB_DIR}" != "x" ; then |
| 929 |
loader_run_path="${loader_run_path}:${JPEG_LIB_DIR}" |
| 930 |
fi |
| 931 |
fi |
| 932 |
LDFLAGS=${jpeg_save_LDFlags} |
| 933 |
fi |
| 934 |
|
| 935 |
save_libs=$LIBS |
| 936 |
LIBS="$LIB_SPECS $LIBS" |
| 937 |
AC_CHECK_FUNCS(XExtendedMaxRequestSize) |
| 938 |
LIBS=$save_libs |
| 939 |
|
| 940 |
# ----------------------------------------------------------------------- |
| 941 |
# |
| 942 |
# Set up a new default prefix to installation path. The ways |
| 943 |
# the prefix can be set and their precedence are as follows: |
| 944 |
# |
| 945 |
# 1. --prefix option given to ./configure. (prefix != NONE) |
| 946 |
# 2. use previously configured Tk prefix |
| 947 |
# |
| 948 |
# ----------------------------------------------------------------------- |
| 949 |
|
| 950 |
if test "$prefix" = "NONE" ; then |
| 951 |
prefix=${TCL_PREFIX} |
| 952 |
fi |
| 953 |
|
| 954 |
if test "$exec_prefix" = "NONE" ; then |
| 955 |
exec_prefix=$prefix |
| 956 |
fi |
| 957 |
|
| 958 |
# ------------------------------------------------------------------------- |
| 959 |
# |
| 960 |
# Extract the BLT version number for the blt.h header |
| 961 |
# |
| 962 |
# ------------------------------------------------------------------------- |
| 963 |
AC_MSG_CHECKING([BLT_MAJOR_VERSION]) |
| 964 |
AC_CACHE_VAL(blt_cv_major_version, |
| 965 |
AC_GREP_SYMBOL(blt_cv_major_version, BLT_MAJOR_VERSION, ${srcdir}/generic/blt.h) |
| 966 |
) |
| 967 |
BLT_MAJOR_VERSION=${blt_cv_major_version} |
| 968 |
AC_MSG_RESULT([$blt_cv_major_version]) |
| 969 |
|
| 970 |
AC_MSG_CHECKING([BLT_MINOR_VERSION]) |
| 971 |
AC_CACHE_VAL(blt_cv_minor_version, |
| 972 |
AC_GREP_SYMBOL(blt_cv_minor_version, BLT_MINOR_VERSION, ${srcdir}/generic/blt.h) |
| 973 |
) |
| 974 |
AC_MSG_RESULT([$blt_cv_minor_version]) |
| 975 |
BLT_MINOR_VERSION=${blt_cv_minor_version} |
| 976 |
|
| 977 |
BLT_VERSION=${BLT_MAJOR_VERSION}.${BLT_MINOR_VERSION} |
| 978 |
|
| 979 |
# Add BLT to the run path |
| 980 |
libdir=${exec_prefix}/lib |
| 981 |
|
| 982 |
if test "x${libdir}" != "x" -a \ |
| 983 |
"${libdir}" != "/usr/lib" -a \ |
| 984 |
"${libdir}" != "${x_libraries}" -a \ |
| 985 |
"${libdir}" != "${TK_LIB_DIR}" -a \ |
| 986 |
"${libdir}" != "${TCL_LIB_DIR}" ; then |
| 987 |
if test "x${loader_run_path}" = "x" ; then |
| 988 |
loader_run_path="${libdir}" |
| 989 |
else |
| 990 |
loader_run_path="${libdir}:${loader_run_path}" |
| 991 |
fi |
| 992 |
fi |
| 993 |
|
| 994 |
aix_lib_specs="${aix_lib_specs} ${LIBS}" |
| 995 |
LIB_SPECS="${LIB_SPECS} ${LIBS}" |
| 996 |
TCL_ONLY_LIB_SPECS="${TCL_ONLY_LIB_SPECS} ${LIBS}" |
| 997 |
|
| 998 |
# ------------------------------------------------------------------------- |
| 999 |
# |
| 1000 |
# Extract the Tcl version number for the tcl.h header |
| 1001 |
# |
| 1002 |
# ------------------------------------------------------------------------- |
| 1003 |
AC_MSG_CHECKING([TCL_VERSION in tcl.h]) |
| 1004 |
AC_CACHE_VAL(blt_cv_tcl_h_version, |
| 1005 |
AC_GREP_SYMBOL(blt_cv_tcl_h_version, [TCL_VERSION], ${TCL_INC_DIR}/tcl.h) |
| 1006 |
) |
| 1007 |
eval TCL_H_VERSION=${blt_cv_tcl_h_version} |
| 1008 |
AC_MSG_RESULT([$TCL_H_VERSION]) |
| 1009 |
if test "${TCL_H_VERSION}" != "${TCL_VERSION}" ; then |
| 1010 |
echo "Error: Tcl version mismatch. " |
| 1011 |
echo " ${TCL_VERSION} ${tcl_config_sh}" |
| 1012 |
echo " ${TCL_H_VERSION} ${TCL_INC_DIR}/tcl.h" |
| 1013 |
exit 1 |
| 1014 |
fi |
| 1015 |
AC_MSG_CHECKING([TK_VERSION in tk.h]) |
| 1016 |
AC_CACHE_VAL(blt_cv_tk_h_version, |
| 1017 |
AC_GREP_SYMBOL(blt_cv_tk_h_version, [TK_VERSION], ${TK_INC_DIR}/tk.h) |
| 1018 |
) |
| 1019 |
eval TK_H_VERSION=${blt_cv_tk_h_version} |
| 1020 |
AC_MSG_RESULT([$TK_H_VERSION]) |
| 1021 |
if test "${TK_H_VERSION}" != "${TK_VERSION}" ; then |
| 1022 |
echo "Error: Tk version mismatch." |
| 1023 |
echo " ${TK_VERSION} ${tk_config_sh}" |
| 1024 |
echo " ${TK_H_VERSION} ${TK_INC_DIR}/tk.h" |
| 1025 |
exit 1 |
| 1026 |
fi |
| 1027 |
|
| 1028 |
if test "$TCL_VERSION" = "7.6" -a "$TK_VERSION" = "4.2" ; then |
| 1029 |
: |
| 1030 |
elif test "$TCL_VERSION" = "7.5" -a "$TK_VERSION" = "4.1" ; then |
| 1031 |
: |
| 1032 |
elif test "$TCL_VERSION" = "$TK_VERSION" ; then |
| 1033 |
: |
| 1034 |
else |
| 1035 |
echo "Mismatched Tcl/Tk versions ($TCL_VERSION != $TK_VERSION)" |
| 1036 |
exit 1 |
| 1037 |
fi |
| 1038 |
|
| 1039 |
#-------------------------------------------------------------------- |
| 1040 |
# |
| 1041 |
# Check if we can generate shared libraries on this system. Set flags |
| 1042 |
# to generate shared libraries for systems that we know about. Start |
| 1043 |
# with the values found in tclConfig.sh, make changes as we know about |
| 1044 |
# the different systems. |
| 1045 |
# |
| 1046 |
#-------------------------------------------------------------------- |
| 1047 |
|
| 1048 |
LIB_BASE_NAME=libBLT |
| 1049 |
|
| 1050 |
# Initialize shared library build variables |
| 1051 |
|
| 1052 |
SHLIB_CFLAGS="$TCL_SHLIB_CFLAGS" |
| 1053 |
SHLIB_LD="$TCL_SHLIB_LD" |
| 1054 |
SHLIB_LD_FLAGS="$TCL_LD_FLAGS" |
| 1055 |
SHLIB_RUNPATH="$TCL_LD_SEARCH_FLAGS" |
| 1056 |
|
| 1057 |
SHLIB_SUFFIX=".so" |
| 1058 |
SHLIB_TARGET="" |
| 1059 |
SHLIB_CFLAGS="" |
| 1060 |
SHLIB_LIB_SPECS="${JPEG_LIB_SPEC}" |
| 1061 |
SHLIB_TCL_ONLY_LIB_SPECS="${TCL_ONLY_LIB_SPECS}" |
| 1062 |
SHLIB_TCL_ONLY_LIB_SPECS="" |
| 1063 |
LDFLAGS="" |
| 1064 |
LD_RUN_PATH="" |
| 1065 |
EXTRA_LIB_SPECS="" |
| 1066 |
|
| 1067 |
build_shared="yes" |
| 1068 |
library_name=libBLT${BLT_MAJOR_VERSION}${BLT_MINOR_VERSION} |
| 1069 |
|
| 1070 |
case $target in |
| 1071 |
*-aix4.[[2-9]]*) |
| 1072 |
# No Position-Independent flags needed |
| 1073 |
SHLIB_CFLAGS="" |
| 1074 |
|
| 1075 |
# Use the installed export file or the one found in the source directory. |
| 1076 |
|
| 1077 |
if test -r "${TCL_LIB_DIR}/lib${TCL_LIB_NAME}.exp" ; then |
| 1078 |
tcl_exp="${TCL_LIB_DIR}/lib${TCL_LIB_NAME}.exp" |
| 1079 |
else |
| 1080 |
tcl_exp="${TCL_SRC_DIR}/unix/lib.exp" |
| 1081 |
fi |
| 1082 |
if test -r "${TK_LIB_DIR}/lib${TK_LIB_NAME}.exp" ; then |
| 1083 |
tk_exp="${TK_LIB_DIR}/lib${TK_LIB_NAME}.exp" |
| 1084 |
else |
| 1085 |
tk_exp="${TK_SRC_DIR}/unix/lib.exp" |
| 1086 |
fi |
| 1087 |
|
| 1088 |
full_src_path=`cd ${srcdir}; pwd` |
| 1089 |
|
| 1090 |
# Use shell-script to link shared library |
| 1091 |
SHLIB_LD="${full_src_path}/cf/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry -bI:${tk_exp} -bI:${tcl_exp}" |
| 1092 |
|
| 1093 |
SHLIB_LIB_SPECS="${aix_lib_specs} -lc" |
| 1094 |
|
| 1095 |
LDFLAGS="-L${loader_run_path}" |
| 1096 |
EXTRA_LIB_SPECS="-ldl" |
| 1097 |
;; |
| 1098 |
|
| 1099 |
*-aix*) |
| 1100 |
# No Position-Independent flags needed |
| 1101 |
SHLIB_CFLAGS="" |
| 1102 |
|
| 1103 |
# Use the installed export file or the one found in the source directory. |
| 1104 |
|
| 1105 |
if test -r "${TCL_LIB_DIR}/lib${TCL_LIB_NAME}.exp" ; then |
| 1106 |
tcl_exp="${TCL_LIB_DIR}/lib${TCL_LIB_NAME}.exp" |
| 1107 |
else |
| 1108 |
tcl_exp="${TCL_SRC_DIR}/unix/lib.exp" |
| 1109 |
fi |
| 1110 |
if test -r "${TK_LIB_DIR}/lib${TK_LIB_NAME}.exp" ; then |
| 1111 |
tk_exp="${TK_LIB_DIR}/lib${TK_LIB_NAME}.exp" |
| 1112 |
else |
| 1113 |
tk_exp="${TK_SRC_DIR}/unix/lib.exp" |
| 1114 |
fi |
| 1115 |
|
| 1116 |
full_src_path=`cd ${srcdir}/cf; pwd` |
| 1117 |
|
| 1118 |
# Use shell-script to link shared library |
| 1119 |
|
| 1120 |
SHLIB_LD="${full_src_path}/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry -bI:${tk_exp} -bI:${tcl_exp}" |
| 1121 |
|
| 1122 |
SHLIB_LIB_SPECS="${aix_lib_specs} -lc" |
| 1123 |
|
| 1124 |
LDFLAGS="-L${loader_run_path}" |
| 1125 |
EXTRA_LIB_SPECS="-lld" |
| 1126 |
;; |
| 1127 |
|
| 1128 |
*-bsdi2*|*-bsdi3*) |
| 1129 |
SHLIB_CFLAGS="" |
| 1130 |
SHLIB_LD="shlicc" |
| 1131 |
SHLIB_LD_FLAGS="-r" |
| 1132 |
|
| 1133 |
EXTRA_LIB_SPECS="-ldl" |
| 1134 |
;; |
| 1135 |
|
| 1136 |
*-bsdi4*) |
| 1137 |
SHLIB_CFLAGS="-export-dynamic -fPIC" |
| 1138 |
SHLIB_LD="${CC}" |
| 1139 |
SHLIB_LD_FLAGS='-shared -Wl,-E -Wl,-soname,$@' |
| 1140 |
;; |
| 1141 |
|
| 1142 |
*-*-cygwin* | *-*-mingw*) |
| 1143 |
SHLIB_LD="${CC}" |
| 1144 |
SHLIB_LD_FLAGS='-shared -Wl,-E -Wl,--out-implib,$@' |
| 1145 |
EXTRA_LIB_SPECS="-lwinspool" |
| 1146 |
LDFLAGS="" |
| 1147 |
;; |
| 1148 |
|
| 1149 |
*-dgux*) |
| 1150 |
SHLIB_CFLAGS="-K PIC" |
| 1151 |
SHLIB_LD="cc" |
| 1152 |
SHLIB_LD_FLAGS="-G" |
| 1153 |
|
| 1154 |
EXTRA_LIB_SPECS="-ldl" |
| 1155 |
;; |
| 1156 |
|
| 1157 |
*-hpux*) |
| 1158 |
if test "$blt_have_gcc" = "no" ; then |
| 1159 |
DEFINES="$DEFINES -D_HPUX_SOURCE" |
| 1160 |
fi |
| 1161 |
AC_CHECK_LIB(dld, shl_load, [found=yes], [found=no]) |
| 1162 |
if test "${found}" = "yes" ; then |
| 1163 |
SHLIB_CFLAGS="+Z" |
| 1164 |
SHLIB_LD="ld" |
| 1165 |
SHLIB_LD_FLAGS="-b -E -n +s +b,${loader_run_path}:." |
| 1166 |
SHLIB_SUFFIX=".sl" |
| 1167 |
|
| 1168 |
# The run path is included in both LDFLAGS and SHLIB_LD_FLAGS |
| 1169 |
# because SHLIB_LD is ld and LD is cc/gcc. |
| 1170 |
|
| 1171 |
LDFLAGS="-Wl,-E -Wl,+s,+b,${loader_run_path}:." |
| 1172 |
EXTRA_LIB_SPECS="-ldld" |
| 1173 |
fi |
| 1174 |
;; |
| 1175 |
|
| 1176 |
*-irix64-6.5*) |
| 1177 |
SHLIB_CFLAGS="" |
| 1178 |
SHLIB_LD="ld" |
| 1179 |
SHLIB_LD_FLAGS="-32 -shared -rdata_shared" |
| 1180 |
LD_RUN_PATH="-Wl,-rpath,${loader_run_path}" |
| 1181 |
;; |
| 1182 |
|
| 1183 |
*-irix-[56].*|*-irix64-*) |
| 1184 |
SHLIB_CFLAGS="" |
| 1185 |
SHLIB_LD="ld" |
| 1186 |
SHLIB_LD_FLAGS="-shared -rdata_shared" |
| 1187 |
LD_RUN_PATH="-Wl,-rpath,${loader_run_path}" |
| 1188 |
LDFLAGS="" |
| 1189 |
if test "$blt_have_gcc" = "yes" ; then |
| 1190 |
SHLIB_CFLAGS="-mabi=n32 $SHLIB_CFLAGS" |
| 1191 |
SHLIB_LD_FLAGS="-mabi=n32 $SHLIB_LD_FLAGS" |
| 1192 |
LDFLAGS="-mabi=n32 $LDFLAGS" |
| 1193 |
else |
| 1194 |
CFLAGS="-n32 $CFLAGS" |
| 1195 |
LDFLAGS="-n32 $LDFLAGS" |
| 1196 |
fi |
| 1197 |
;; |
| 1198 |
|
| 1199 |
*-linux*) |
| 1200 |
SHLIB_CFLAGS="-fPIC" |
| 1201 |
SHLIB_LD="${CC}" |
| 1202 |
SHLIB_LD_FLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@' |
| 1203 |
LD_RUN_PATH="-Wl,-rpath,${loader_run_path}" |
| 1204 |
|
| 1205 |
LDFLAGS="" |
| 1206 |
EXTRA_LIB_SPECS="-ldl" |
| 1207 |
;; |
| 1208 |
|
| 1209 |
*-mp-ras-02*) |
| 1210 |
SHLIB_CFLAGS="-G -K PIC" |
| 1211 |
SHLIB_LD="${CC}" |
| 1212 |
SHLIB_LD_FLAGS="" |
| 1213 |
;; |
| 1214 |
|
| 1215 |
*-mp-ras-*) |
| 1216 |
SHLIB_CFLAGS="-G -K PIC" |
| 1217 |
SHLIB_LD="${CC}" |
| 1218 |
SHLIB_LD_FLAGS="-Wl,-Bexport" |
| 1219 |
;; |
| 1220 |
|
| 1221 |
*-ncr-sysv4-*2*) |
| 1222 |
SHLIB_CFLAGS="-K PIC" |
| 1223 |
SHLIB_LD="cc" |
| 1224 |
SHLIB_LD_FLAGS="-G" |
| 1225 |
|
| 1226 |
EXTRA_LIB_SPECS="-ldl" |
| 1227 |
;; |
| 1228 |
|
| 1229 |
*-ncr-sysv4*) |
| 1230 |
SHLIB_CFLAGS="-K PIC" |
| 1231 |
SHLIB_LD="cc" |
| 1232 |
SHLIB_LD_FLAGS="-G -Wl,-Bexport" |
| 1233 |
|
| 1234 |
LDFLAGS="-Wl,-Bexport" |
| 1235 |
EXTRA_LIB_SPECS="-ldl" |
| 1236 |
;; |
| 1237 |
|
| 1238 |
*-netbsd*|*-freebsd*|*-openbsd*) |
| 1239 |
# Not available on all versions: check for include file. |
| 1240 |
AC_CHECK_HEADER(dlfcn.h, test_ok=yes, test_ok=no) |
| 1241 |
if test "$test_ok" = yes; then |
| 1242 |
SHLIB_CFLAGS="-fpic" |
| 1243 |
SHLIB_LD="ld" |
| 1244 |
SHLIB_LD_FLAGS="-Bshareable -x" |
| 1245 |
fi |
| 1246 |
;; |
| 1247 |
|
| 1248 |
*-nextstep*) |
| 1249 |
SHLIB_CFLAGS="" |
| 1250 |
SHLIB_LD="cc" |
| 1251 |
SHLIB_LD_FLAGS="-nostdlib -r" |
| 1252 |
;; |
| 1253 |
|
| 1254 |
*-osf1-1.[012]*) |
| 1255 |
# OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1 |
| 1256 |
|
| 1257 |
SHLIB_CFLAGS="" |
| 1258 |
|
| 1259 |
# Warning: Ugly Makefile Hack |
| 1260 |
# Make package name same as library name |
| 1261 |
|
| 1262 |
SHLIB_LD='ld -R -export $@:' |
| 1263 |
;; |
| 1264 |
|
| 1265 |
*-osf1-1.*) |
| 1266 |
# OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 |
| 1267 |
|
| 1268 |
SHLIB_CFLAGS="-fpic" |
| 1269 |
SHLIB_LD="ld -shared" |
| 1270 |
;; |
| 1271 |
|
| 1272 |
*-osf1V*) |
| 1273 |
# Digital OSF/1 |
| 1274 |
|
| 1275 |
SHLIB_CFLAGS="" |
| 1276 |
SHLIB_LD='ld' |
| 1277 |
SHLIB_LD_FLAGS='-shared -expect_unresolved "*"' |
| 1278 |
LD_RUN_PATH="-Wl,-rpath,${loader_run_path}" |
| 1279 |
LDFLAGS="" |
| 1280 |
;; |
| 1281 |
|
| 1282 |
*-sco*) |
| 1283 |
# Note, dlopen is available only on SCO 3.2.5 and greater. However, |
| 1284 |
# this test works, since "uname -s" was non-standard in 3.2.4 and |
| 1285 |
# below. |
| 1286 |
|
| 1287 |
SHLIB_CFLAGS="-Kpic -belf" |
| 1288 |
SHLIB_LD="ld" |
| 1289 |
SHLIB_LD_FLAGS="-G" |
| 1290 |
LDFLAGS="-belf -Wl,-Bexport" |
| 1291 |
;; |
| 1292 |
|
| 1293 |
*-sni-sysv*) |
| 1294 |
|
| 1295 |
SHLIB_CFLAGS="-K PIC" |
| 1296 |
SHLIB_LD="cc" |
| 1297 |
SHLIB_LD_FLAGS="-G" |
| 1298 |
|
| 1299 |
EXTRA_LIB_SPECS="-ldl" |
| 1300 |
;; |
| 1301 |
|
| 1302 |
*-sunos4*) |
| 1303 |
|
| 1304 |
SHLIB_CFLAGS="-PIC" |
| 1305 |
SHLIB_LD="ld" |
| 1306 |
SHLIB_LD_FLAGS="-assert pure-text" |
| 1307 |
|
| 1308 |
EXTRA_LIB_SPECS="-ldl" |
| 1309 |
;; |
| 1310 |
|
| 1311 |
*-solaris2*) |
| 1312 |
|
| 1313 |
SHLIB_CFLAGS="-KPIC" |
| 1314 |
if test "${blt_with_gnu_ld}" = "yes" -a "$blt_have_gcc" = "yes" ; then |
| 1315 |
SHLIB_LD="gcc" |
| 1316 |
SHLIB_LD_FLAGS='-rdynamic -shared -Wl,-E -Wl,-soname,$@' |
| 1317 |
LD_RUN_PATH="-Wl,-rpath,${loader_run_path}" |
| 1318 |
else |
| 1319 |
SHLIB_LD="/usr/ccs/bin/ld" |
| 1320 |
SHLIB_LD_FLAGS="-G -z text" |
| 1321 |
LD_RUN_PATH="-R ${loader_run_path}" |
| 1322 |
fi |
| 1323 |
EXTRA_LIB_SPECS="-ldl" |
| 1324 |
;; |
| 1325 |
|
| 1326 |
*-mips-dde-sysv*) |
| 1327 |
|
| 1328 |
SHLIB_CFLAGS="-KPIC" |
| 1329 |
SHLIB_LD="cc" |
| 1330 |
SHLIB_LD_FLAGS="-G" |
| 1331 |
|
| 1332 |
EXTRA_LIB_SPECS="-ldl" |
| 1333 |
;; |
| 1334 |
|
| 1335 |
*-pc-sysv4* | *-unixware-5*) |
| 1336 |
SHLIB_CFLAGS="-G -KPIC" |
| 1337 |
SHLIB_LD="${CC}" |
| 1338 |
SHLIB_LD_FLAGS=" -Wl,-Bexport" |
| 1339 |
;; |
| 1340 |
|
| 1341 |
*) |
| 1342 |
build_shared="no" |
| 1343 |
;; |
| 1344 |
|
| 1345 |
esac |
| 1346 |
|
| 1347 |
# If we're running gcc, then set SHLIB_CFLAGS flags for compiling |
| 1348 |
# shared libraries for gcc, instead of those of the vendor's |
| 1349 |
# compiler. |
| 1350 |
|
| 1351 |
|
| 1352 |
if test "$blt_have_gcc" = "yes" ; then |
| 1353 |
SHLIB_CFLAGS="-fPIC" |
| 1354 |
fi |
| 1355 |
|
| 1356 |
# We can't back link against static versions of Tcl/Tk. |
| 1357 |
# If # ${TCL_SHARED_BUILD} can't be found or isn't "1", assume that |
| 1358 |
# shared libraies weren't built. |
| 1359 |
|
| 1360 |
if test "${TCL_SHARED_BUILD}" != "1" ; then |
| 1361 |
SHLIB_LIB_SPECS="" |
| 1362 |
fi |
| 1363 |
|
| 1364 |
if test "${build_shared}" = "yes" ; then |
| 1365 |
SHLIB_TARGET="build_shared" |
| 1366 |
AC_SUBST(SHLIB_CFLAGS) |
| 1367 |
AC_SUBST(SHLIB_TARGET) |
| 1368 |
AC_SUBST(SHLIB_LD) |
| 1369 |
AC_SUBST(SHLIB_LD_FLAGS) |
| 1370 |
AC_SUBST(SHLIB_LIB_SPECS) |
| 1371 |
AC_SUBST(SHLIB_TCL_ONLY_LIB_SPECS) |
| 1372 |
AC_SUBST(SHLIB_SUFFIX) |
| 1373 |
fi |
| 1374 |
|
| 1375 |
AC_SUBST(LDFLAGS) |
| 1376 |
AC_SUBST(LD_RUN_PATH) |
| 1377 |
|
| 1378 |
LIBS=${LIB_SPECS} |
| 1379 |
AC_SUBST(LIB_SPECS) |
| 1380 |
AC_SUBST(TCL_ONLY_LIB_SPECS) |
| 1381 |
AC_SUBST(EXTRA_LIB_SPECS) |
| 1382 |
|
| 1383 |
INCLUDES=${INC_SPECS} |
| 1384 |
AC_SUBST(INCLUDES) |
| 1385 |
AC_SUBST(DEFINES) |
| 1386 |
AC_SUBST(BLT_MAJOR_VERSION) |
| 1387 |
AC_SUBST(BLT_MINOR_VERSION) |
| 1388 |
AC_SUBST(BLT_VERSION) |
| 1389 |
AC_SUBST(AUX_LIBS) |
| 1390 |
AC_SUBST(TCL_LIB_DIR) |
| 1391 |
AC_SUBST(TCL_VERSION) |
| 1392 |
BLT_LIB_PREFIX=${blt_lib_prefix} |
| 1393 |
AC_SUBST(BLT_LIB_PREFIX) |
| 1394 |
|
| 1395 |
#-------------------------------------------------------------------- |
| 1396 |
# The BLT script directory was either specified or we |
| 1397 |
# assume <prefix>/lib |
| 1398 |
#-------------------------------------------------------------------- |
| 1399 |
if test "x${blt_with_scriptdir}" = "x" ; then |
| 1400 |
BLT_LIBRARY="${prefix}/lib/blt${BLT_VERSION}" |
| 1401 |
else |
| 1402 |
BLT_LIBRARY="${blt_with_scriptdir}/blt${BLT_VERSION}" |
| 1403 |
fi |
| 1404 |
AC_SUBST(BLT_LIBRARY) |
| 1405 |
|
| 1406 |
#-------------------------------------------------------------------- |
| 1407 |
# Print out some of the more important settings |
| 1408 |
#-------------------------------------------------------------------- |
| 1409 |
echo "" |
| 1410 |
echo "Configuration results:" |
| 1411 |
echo "" |
| 1412 |
echo " tcl.h found in $TCL_INC_DIR" |
| 1413 |
echo " tk.h found in $TK_INC_DIR" |
| 1414 |
echo " X11/Xlib.h found in $x_includes" |
| 1415 |
echo " lib${TCL_LIB_NAME} found in $TCL_LIB_DIR" |
| 1416 |
echo " lib${TK_LIB_NAME} found in $TK_LIB_DIR" |
| 1417 |
echo " libX11 found in $x_libraries" |
| 1418 |
echo "" |
| 1419 |
echo "Directories where BLT is to be installed:" |
| 1420 |
echo "" |
| 1421 |
echo " \"\$prefix\" is $prefix" |
| 1422 |
echo " \"\$exec_prefix\" is $exec_prefix" |
| 1423 |
echo "" |
| 1424 |
echo " bltwish to be installed in $bindir" |
| 1425 |
echo " libBLT.a to be installed in $libdir" |
| 1426 |
echo " scripts to be installed in $BLT_LIBRARY" |
| 1427 |
echo " manual pages to be installed in $mandir" |
| 1428 |
echo "" |
| 1429 |
|
| 1430 |
#-------------------------------------------------------------------- |
| 1431 |
# |
| 1432 |
# Generate the following Makefiles |
| 1433 |
# |
| 1434 |
# ./Makefile |
| 1435 |
# ./generic/Makefile |
| 1436 |
# ./generic/shared/Makefile |
| 1437 |
# ./man/Makefile |
| 1438 |
# ./library/Makefile |
| 1439 |
# ./demos/Makefile |
| 1440 |
# |
| 1441 |
#-------------------------------------------------------------------- |
| 1442 |
src_Makefile="generic/Makefile" |
| 1443 |
if test "${blt_platform}" = "win"; then |
| 1444 |
src_Makefile="generic/Makefile:generic/Makefile-cyg.in" |
| 1445 |
fi |
| 1446 |
AC_OUTPUT(Makefile ${src_Makefile} generic/bltHash.h generic/shared/Makefile man/Makefile library/Makefile demos/Makefile) |
| 1447 |
|