1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734
|
#
# This file describes a "configure" script that is used to build
# makefiles for a particular platform. Process this file using
# Autoconf version 1.13 in order to generate that script. All
# lines of this file up to the AC_INIT macro are ignored.
#
# The build process allows for using a cross-compiler. But the default
# action is to target the same platform that we are running on. The
# configure script needs to discover the following properties of the
# build and target systems:
#
# srcdir
#
# The is the name of the directory that contains the
# "configure" shell script. All source files are
# located relative to this directory.
#
# bindir
#
# The name of the directory where executables should be
# written by the "install" target of the makefile.
#
# program_prefix
#
# Add this prefix to the names of all executables that run
# on the target machine. Default: ""
#
# ENABLE_SHARED
#
# True if shared libraries should be generated.
#
# BUILD_CC
#
# The name of a command that is used to convert C
# source files into executables that run on the build
# platform.
#
# BUILD_CFLAGS
#
# Switches that the build compiler needs in order to construct
# command-line programs.
#
# BUILD_LIBS
#
# Libraries that the build compiler needs in order to construct
# command-line programs.
#
# BUILD_EXEEXT
#
# The filename extension for executables on the build
# platform. "" for Unix and ".exe" for Windows.
#
# BUILD_TCLSH
#
# The name of a tclsh executable on the build platform.
#
# TARGET_CC
#
# The name of a command that runs on the build platform
# and converts C source files into *.o files for the
# target platform. In other words, the cross-compiler.
#
# TARGET_CFLAGS
#
# Switches that the target compiler needs to turn C source files
# into *.o files. Do not include TARGET_TCL_INC, TARGET_X_INC
# or TARGET_TK_INC in this list. Makefiles might add
# additional switches such as "-I.".
#
# TARGET_SHLIB_CFLAGS
#
# Switches that the target compiler needs to turn C source files
# into *.o files that can later be linked into a shared library.
# Does not include TARGET_*_INC.
#
# TARGET_TCL_INC
# TARGET_X_INC
# TARGET_TK_INC
# TARGET_BLT_INC
#
# These variables define the directories that contain header
# files for Tcl, X11, Tk, and BLT respectively. If the compiler
# is able to find <tcl.h>, <X11/Xlib.h>, <tk.h> and <blt.h>
# on its own, then these can be blank.
#
# TARGET_LINK
#
# The name of the linker that combines *.o files generated
# by TARGET_CC into executables for the target platform.
#
# TARGET_SHLIB_LINK
#
# The name of the linker an maybe some options that combines
# *.o files into a shared library.
#
# TARGET_SHLIB_EXT
#
# The extension used for shared libraries on the target system.
#
# TARGET_TCL_LIBS
# TARGET_X_LIBS
# TARGET_TK_LIBS
# TARGET_BLT_LIBS
#
# These are the library directives passed to the target linker
# that cause the executable to link against Tcl, X11, Tk, and
# BLT respectively. They might be switches like "-ltcl8.0" or
# pathnames of library files like "../../src/libtcl8.0.a".
#
# TARGET_LIBS
#
# Additional libraries or other switch that the target linker needs
# to build an executable on the target. Do not include
# on this list any libraries in TARGET_TCL_LIBS, TARGET_X_LIBS,
# TARGET_TK_LIBS, or TARGET_BLT_LIBS.
#
# TARGET_EXEEXT
#
# The filename extension for executables on the
# target platform. "" for Unix and ".exe" for windows.
#
# TARGET_TCL_SCRIPT_DIR
#
# A directory on the build platform that contains the
# Tcl script libraries that are compatible with the
# Tcl C libraries of the target platform.
#
# TARGET_TK_SCRIPT_DIR
#
# A directory on the build platform that contains the
# Tk script libraries that are compatible with the
# Tk C libraries of the target platform.
#
# The generated configure script will make an attempt to guess
# at all of the above parameters. You can override any of
# the guesses by setting the environment variable named
# "config_AAAA" where "AAAA" is the name of the parameter
# described above. (Exception: srcdir cannot be set this way.)
# If you have a file that sets one or more of these environment
# variables, you can invoke configure as follows:
#
# configure --with-hints=FILE
#
# where FILE is the name of the file that sets the environment
# variables. FILE should be an absolute pathname.
#
# If you have a Tcl/Tk/BLT source distribution available, then the
# files in that distribution will be used instead of any other
# Tcl/Tk/BLT files the script might discover if you tell the configure
# script about the source tree. Use commandline options:
#
# --with-tcl=PATH --with-tk=PATH --with-blt=PATH
#
# Or set environment variables config_WITH_TCL, config_WITH_TK, or
# config_WITH_BLT.
#
# This configure.in file is easy to reuse on other projects. Just
# change the argument to AC_INIT(). And disable any features that
# you don't need (for example BLT) by erasing or commenting out
# the corresponding code.
#
AC_INIT(src/html.h)
dnl Put the RCS revision string after AC_INIT so that it will also
dnl show in in configure.
# The following RCS revision string applies to configure.in
# $Revision: 1.2 $
#########
# Make sure we are not building in a subdirectory of the source tree.
#
changequote(<<<,>>>)
temp=`echo $srcdir | grep '[^./]'`
changequote([,])
if test "$temp" = ""; then
AC_MSG_ERROR([
**************************************************************************
** This program may not be compiled in the same directory that contains **
** the configure script or any subdirectory of that directory. Rerun **
** the configure script from a directory that is separate from the **
** source tree. **
**************************************************************************])
fi
#########
# Set up an appropriate program prefix
#
if test "$program_prefix" = "NONE"; then
program_prefix=""
fi
AC_SUBST(program_prefix)
#########
# Check to see if the --with-hints=FILE option is used. If there is none,
# then check for a files named "$host.hints" and ../$hosts.hints where
# $host is the hostname of the build system. If still no hints are
# found, try looking in $system.hints and ../$system.hints where
# $system is the result of uname -s.
#
AC_ARG_WITH(hints,
[ --with-hints=FILE Read configuration options from FILE],
hints=$withval)
if test "$hints" = ""; then
host=`hostname | sed 's/\..*//'`
if test -r $host.hints; then
hints=$host.hints
else
if test -r ../$host.hints; then
hints=../$host.hints
fi
fi
fi
if test "$hints" = ""; then
sys=`uname -s`
if test -r $sys.hints; then
hints=$sys.hints
else
if test -r ../$sys.hints; then
hints=../$sys.hints
fi
fi
fi
if test "$hints" != ""; then
AC_MSG_RESULT(reading hints from $hints)
. $hints
fi
#########
# Locate a compiler for the build machine. This compiler should
# generate command-line programs that run on the build machine.
#
default_build_cflags="-g"
if test "$config_BUILD_CC" = ""; then
AC_PROG_CC
if test "$cross_compiling" = "yes"; then
AC_MSG_ERROR([unable to find a compiler for building build tools])
fi
BUILD_CC=$CC
default_build_cflags=$CFLAGS
else
BUILD_CC=$config_BUILD_CC
AC_MSG_CHECKING([host compiler])
CC=$BUILD_CC
AC_MSG_RESULT($BUILD_CC)
fi
AC_MSG_CHECKING([switches for the host compiler])
if test "$config_BUILD_CFLAGS" != ""; then
CFLAGS=$config_BUILD_CFLAGS
BUILD_CFLAGS=$config_BUILD_CFLAGS
else
BUILD_CFLAGS=$default_build_cflags
fi
AC_MSG_RESULT($BUILD_CFLAGS)
if test "$config_BUILD_LIBS" != ""; then
BUILD_LIBS=$config_BUILD_LIBS
fi
AC_SUBST(BUILD_CC)
AC_SUBST(BUILD_CFLAGS)
AC_SUBST(BUILD_LIBS)
##########
# Locate a compiler that converts C code into *.o files that run on
# the target machine.
#
AC_MSG_CHECKING([target compiler])
if test "$config_TARGET_CC" != ""; then
TARGET_CC=$config_TARGET_CC
else
TARGET_CC=$BUILD_CC
fi
AC_MSG_RESULT($TARGET_CC)
AC_MSG_CHECKING([switches on the target compiler])
if test "$config_TARGET_CFLAGS" != ""; then
TARGET_CFLAGS=$config_TARGET_CFLAGS
else
TARGET_CFLAGS=$BUILD_CFLAGS
fi
AC_MSG_RESULT($TARGET_CFLAGS)
AC_MSG_CHECKING([target linker])
if test "$config_TARGET_LINK" = ""; then
TARGET_LINK=$TARGET_CC
else
TARGET_LINK=$config_TARGET_LINK
fi
AC_MSG_RESULT($TARGET_LINK)
AC_MSG_CHECKING([switches on the target compiler])
if test "$config_TARGET_TFLAGS" != ""; then
TARGET_TFLAGS=$config_TARGET_TFLAGS
else
TARGET_TFLAGS=$BUILD_CFLAGS
fi
if test "$config_TARGET_RANLIB" != ""; then
TARGET_RANLIB=$config_TARGET_RANLIB
else
AC_PROG_RANLIB
TARGET_RANLIB=$RANLIB
fi
if test "$config_TARGET_AR" != ""; then
TARGET_RANLIB=$config_TARGET_AR
else
TARGET_AR='ar cr'
fi
AC_MSG_RESULT($TARGET_TFLAGS)
AC_SUBST(TARGET_CC)
AC_SUBST(TARGET_CFLAGS)
AC_SUBST(TARGET_LINK)
AC_SUBST(TARGET_LFLAGS)
AC_SUBST(TARGET_RANLIB)
AC_SUBST(TARGET_AR)
# Set the $cross variable if we are cross-compiling. Make
# it 0 if we are not.
#
AC_MSG_CHECKING([if host and target compilers are the same])
if test "$BUILD_CC" = "$TARGET_CC"; then
cross=0
AC_MSG_RESULT(yes)
else
cross=1
AC_MSG_RESULT(no)
fi
###########
# Lots of things are different if we are compiling for Windows using
# the CYGWIN environment. So check for that special case and handle
# things accordingly.
#
AC_MSG_CHECKING([if executables have the .exe suffix])
if test "$config_BUILD_EXEEXT" = ".exe"; then
CYGWIN=yes
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(unknown)
fi
if test "$CYGWIN" = "yes"; then
BUILD_EXEEXT=.exe
else
BUILD_EXEEXT=""
fi
if test "$cross" = "0"; then
TARGET_EXEEXT=$BUILD_EXEEXT
else
TARGET_EXEEXT=$config_TARGET_EXEEXT
fi
if test "$TARGET_EXEEXT" = ".exe"; then
OS_UNIX=0
OS_WIN=1
tclsubdir=win
else
OS_UNIX=1
OS_WIN=0
tclsubdir=unix
fi
TARGET_CFLAGS="$TARGET_CFLAGS -DOS_UNIX=$OS_UNIX -DOS_WIN=$OS_WIN"
AC_SUBST(BUILD_EXEEXT)
AC_SUBST(OS_UNIX)
AC_SUBST(OS_WIN)
AC_SUBST(TARGET_EXEEXT)
#########
# Locate a working copy of tclsh. We have to have this program
# running on the build platform since the makefiles use it.
#
AC_ARG_WITH(tcl,
[ --with-tcl=DIR Directory holding Tcl source tree for target])
if test "$config_WITH_TCL" != ""; then
with_tcl=$config_WITH_TCL
fi
AC_ARG_WITH(tk,
[ --with-tk=DIR Directory holding Tk source tree for target])
if test "$config_WITH_TK" != ""; then
with_tk=$config_WITH_TK
fi
if test "$config_BUILD_TCLSH" != ""; then
AC_MSG_CHECKING([for a working "tclsh"])
BUILD_TCLSH=$config_BUILD_TCLSH
AC_MSG_RESULT($BUILD_TCLSH)
else
if test "$with_tcl" != ""; then
if test -x "$with_tcl/$tclsubdir/tclsh"; then
BUILD_TCLSH=$with_tcl/$tclsubdir/tclsh
else
if test -x "$with_tcl/$tclsubdir/tclsh8.0"; then
BUILD_TCLSH=$with_tcl/$tclsubdir/tclsh8.0
fi
fi
fi
if test "$BUILD_TCLSH" = ""; then
AC_CHECK_PROGS(BUILD_TCLSH, tclsh8.2 tclsh8.1 tclsh81 tclsh8.0 tclsh80 cygtclsh80 tclsh, "")
fi
if test "$BUILD_TCLSH" = ""; then
AC_MSG_ERROR([no working "tclsh" could be found])
fi
fi
AC_SUBST(BUILD_TCLSH)
###############
# Check to see if the user wants to build shared libraries. If so,
# then locate tclConfig.sh and tkConfig.sh to figure out how. Then
# set up variables to short-circuit most of the subsequent tests
# since the tclConfig.sh and tkConfig.sh files tell us most of what
# we need to know.
#
AC_ARG_ENABLE(shared,
[ --enable-shared Build the widget as a shared library],,
enable_shared=yes)
if test "$config_ENABLE_SHARED" = "yes"; then
enable_shared=yes
fi
AC_MSG_CHECKING([if shared libraries are requested])
if test "$enable_shared" = "yes"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
if test "$CYGWIN" = "yes"; then
if test "$enable_shared" = "yes"; then
AC_MSG_WARN([don't know how to build shared libraries with Cygwin, yet...])
enable_shared=no
fi
fi
if test "$enable_shared" = "yes"; then
ok=0
if test "$with_tcl" != ""; then
tclconf=$with_tcl/unix/tclConfig.sh
AC_CHECK_FILE($tclconf, ok=1; )
fi
if test "$ok" = "0"; then
changequote(<<<,>>>)dnl
cat > conftest.tcl <<\EOF
regsub {^([A-Za-z]):/} [file dirname [info library]] {//\1/} out
puts -nonewline $out
exit
EOF
changequote([,])dnl
dir=`$BUILD_TCLSH <conftest.tcl`
tclconf=$dir/tclConfig.sh
AC_CHECK_FILE($tclconf, ok=1)
fi
if test "$ok" = "0"; then
tclconf=$dir/unix/tclConfig.sh
AC_CHECK_FILE($tclconf, ok=1)
fi
if test "$ok" = "0"; then
tclconf=/usr/local/lib/tclConfig.sh
AC_CHECK_FILE($tclconf, ok=1)
fi
if test "$ok" = "0"; then
tclconf=/usr/lib/tclConfig.sh
AC_CHECK_FILE($tclconf, ok=1)
fi
if test "$ok" = "0"; then
AC_MSG_WARN(
[unable to locate tclConfig.sh. Shared libraries will not be built]);
enabled_shared=no
fi
fi
if test "$enable_shared" = "yes"; then
ok=0
tkconf=`echo $tclconf | sed 's/tclConfig.sh/tkConfig.sh/'`
AC_CHECK_FILE($tkconf, ok=1)
if test "$ok" = "0"; then
if test "$with_tk" != ""; then
tkconf=$with_tk/unix/tkConfig.sh
AC_CHECK_FILE($tkconf, ok=1; )
fi
fi
if test "$ok" = "0"; then
tkconf=/usr/local/lib/tkConfig.sh
AC_CHECK_FILE($tkconf, ok=1)
fi
if test "$ok" = "0"; then
tkconf=/usr/lib/tclConfig.sh
AC_CHECK_FILE($tkconf, ok=1)
fi
if test "$ok" = "0"; then
AC_MSG_WARN(
[unable to locate tkConfig.sh. Shared libraries will not be built]);
enabled_shared=no
fi
fi
if test "$enable_shared" = "yes"; then
ENABLE_SHLIB=1
. $tclconf
. $tkconf
TARGET_SHLIB_EXT=$TCL_SHLIB_SUFFIX
TARGET_SHLIB_CFLAGS="$TCL_SHLIB_CFLAGS $TARGET_CFLAGS"
TARGET_SHLIB_LINK="$TCL_SHLIB_LD"
TARGET_SHLIB_LIBS="$TCL_SHLIB_LD_LIBS"
else
ENABLE_SHLIB=0
fi
AC_SUBST(TARGET_SHLIB_EXT)
AC_SUBST(TARGET_SHLIB_CFLAGS)
AC_SUBST(TARGET_SHLIB_LINK)
AC_SUBST(TARGET_SHLIB_LIBS)
AC_SUBST(ENABLE_SHLIB)
#########
# Locate the directory that contains all of the Tcl initialization
# scripts for the target machine.
#
AC_MSG_CHECKING([Tcl script library])
if test "$config_TARGET_TCL_SCRIPT_DIR" != ""; then
TARGET_TCL_SCRIPT_DIR=$config_TARGET_TCL_SCRIPT_DIR
else
changequote(<<<,>>>)dnl
cat > conftest.tcl <<\EOF
regsub {^([A-Za-z]):/} [info library] {//\1/} out
puts -nonewline $out
exit
EOF
changequote([,])dnl
tcllibdir=`$BUILD_TCLSH <conftest.tcl`
rm -f conftest.tcl
if test ! -r $tcllibdir/init.tcl; then
AC_MSG_ERROR(not found)
fi
TARGET_TCL_SCRIPT_DIR=$tcllibdir
fi
AC_MSG_RESULT($TARGET_TCL_SCRIPT_DIR)
AC_SUBST(TARGET_TCL_SCRIPT_DIR)
#########
# Locate the directory that contains all of the Tk initialization
# scripts for the target machine.
#
AC_MSG_CHECKING([Tk script library])
if test "$config_TARGET_TK_SCRIPT_DIR" != ""; then
TARGET_TK_SCRIPT_DIR=$config_TARGET_TK_SCRIPT_DIR
else
if test "$with_tk" != ""; then
tklibdir=$with_tk/library
else
changequote(<<<,>>>)dnl
cat > conftest.tcl <<\EOF
regsub {^([A-Za-z]):/} [info library] {//\1/} out
regsub {/tcl7.6} $out {tk4.2} out
regsub {/tcl8([^/]*)} $out {/tk8\1} out
puts -nonewline $out
exit
EOF
changequote([,])dnl
tklibdir=`$BUILD_TCLSH <conftest.tcl`
rm -f conftest.tcl
fi
if test ! -r $tklibdir/tk.tcl; then
AC_MSG_ERROR(not found)
fi
TARGET_TK_SCRIPT_DIR=$tklibdir
fi
AC_MSG_RESULT($TARGET_TK_SCRIPT_DIR)
AC_SUBST(TARGET_TK_SCRIPT_DIR)
##########
# Extract generic linker options from the environment.
#
if test "$config_TARGET_LIBS" != ""; then
TARGET_LIBS=$config_TARGET_LIBS
else
TARGET_LIBS=""
fi
AC_SUBST(TARGET_LIBS)
##########
# Figure out what C libraries are required to compile Tcl programs.
#
if test "$config_TARGET_TCL_LIBS" != ""; then
TARGET_TCL_LIBS="$config_TARGET_TCL_LIBS"
else
if test "$with_tcl" != ""; then
extra=`echo $with_tcl/$tclsubdir/libtcl8*.a`
fi
CC=$TARGET_CC
AC_CHECK_FUNC(sin, LIBS="", LIBS="-lm")
AC_CHECK_LIB(dl, dlopen)
otherlibs=$LIBS
if test "$extra" != ""; then
LIBS=$extra
else
LIBS=""
AC_SEARCH_LIBS(Tcl_Init, tcl8.2 tcl8.1 tcl8.0 tcl80 tcl,,,$otherlibs)
fi
TARGET_TCL_LIBS="$LIBS $otherlibs"
fi
AC_SUBST(TARGET_TCL_LIBS)
##########
# Figure out where to get the TCL header files.
#
AC_MSG_CHECKING([TCL header files])
found=no
if test "$config_TARGET_TCL_INC" != ""; then
TARGET_TCL_INC=$config_TARGET_TCL_INC
found=yes
else
if test "$with_tcl" != ""; then
TARGET_TCL_INC="-I$with_tcl/generic -I$with_tcl/$tclsubdir"
found=yes
else
TARGET_TCL_INC=""
found=no
fi
fi
if test "$found" = "yes"; then
AC_MSG_RESULT($TARGET_TCL_INC)
else
AC_MSG_RESULT(not specified: still searching...)
AC_CHECK_HEADER(tcl.h, [found=yes])
fi
if test "$found" = "no"; then
for dir in /usr/include /usr/include/tcl /usr/include/tcl8.* ; do
n=$dir/tcl.h
AC_CHECK_FILE($dir/tcl.h, found=yes)
if test "$found" = "yes"; then
TARGET_TCL_INC="-I$dir"
break
fi
done
fi
AC_SUBST(TARGET_TCL_INC)
###########
# Figure out what C libraries are required to compile X11 programs.
# If the target is windows, we assume the compiler is Cygwin20 and
# insert arguments that generate a windows GUI application.
#
if test "$config_TARGET_X_LIBS" != ""; then
TARGET_X_LIBS=$config_TARGET_X_LIBS
TARGET_X_INC=$config_TARGET_X_INC
else
if test $OS_UNIX = 1; then
AC_PATH_XTRA
if test "$X_CFLAGS" = "-DX_DISPLAY_MISSING"; then
TARGET_X_LIBS=""
TARGET_X_INC=""
else
xlibs="$X_LIBS $X_PRE_LIB -lX11 $X_EXTRA_LIBS"
TARGET_X_LIBS=`echo $xlibs | sed -e 's/^ *//' -e 's/ //'g -e 's/ *$//'`
if test "$x_includes" != ""; then
TARGET_X_INC=`echo $x_includes | sed -e 's/^/-I/' -e 's/ */ -I/'`
fi
fi
else
TARGET_X_LIBS="-mwindows -e _mainCRTStartup -limm32 -lcomctl32"
TARGET_X_INC=""
fi
fi
AC_SUBST(TARGET_X_LIBS)
AC_SUBST(TARGET_X_INC)
##########
# Figure out what libraries are required to compile Tk programs.
#
if test "$config_TARGET_TK_LIBS" != ""; then
TARGET_TK_LIBS="$config_TARGET_TK_LIBS"
else
if test "$with_tk" != ""; then
TARGET_TK_LIBS=`echo $with_tk/$tclsubdir/libtk*.a`
else
CC=$TARGET_CC
otherlibs="$TARGET_X_LIBS $TARGET_TCL_LIBS"
LIBS=""
AC_SEARCH_LIBS(Tk_Init, tk8.2 tk8.1 tk8.0 tk80 tk,,,$otherlibs)
TARGET_TK_LIBS=$LIBS
fi
fi
AC_SUBST(TARGET_TK_LIBS)
###########
# Figure out where to get the TK header files.
#
AC_MSG_CHECKING([TK header files])
if test "$config_TARGET_TK_INC" != ""; then
TARGET_TK_INC=$config_TARGET_TK_INC
else
if test "$with_tk" != ""; then
TARGET_TK_INC="-I$with_tk/generic -I$with_tk/$tclsubdir"
if test "$tclsubdir" = "win"; then
TARGET_TK_INC="$TARGET_TK_INC -I$with_tk/xlib"
fi
else
TARGET_TK_INC=""
fi
fi
AC_MSG_RESULT($TARGET_TK_INC)
AC_SUBST(TARGET_TK_INC)
dnl ############
dnl # Figure out where to look for BLT header files <blt.h>.
dnl #
dnl AC_ARG_WITH(blt,
dnl [ --with-blt=DIR Directory holding BLT source tree for target])
dnl if test "$config_WITH_BLT" != ""; then
dnl with_tk=$config_WITH_BLT
dnl fi
dnl AC_MSG_CHECKING([BLT header files])
dnl if test "$config_TARGET_BLT_INC" != ""; then
dnl TARGET_BLT_INC=$config_TARGET_BLT_INC
dnl else
dnl if test "$with_blt" != ""; then
dnl TARGET_BLT_INC="-I$with_blt/src"
dnl else
dnl TARGET_BLT_INC=""
dnl fi
dnl fi
dnl AC_MSG_RESULT($TARGET_BLT_INC)
AC_SUBST(TARGET_BLT_INC)
dnl
dnl ##########
dnl # Figure out what libraries are required to compile BLT programs.
dnl #
dnl if test "$config_TARGET_BLT_LIBS" != ""; then
dnl TARGET_BLT_LIBS="$config_TARGET_BLT_LIBS"
dnl else
dnl if test "$with_blt" != ""; then
dnl TARGET_BLT_LIBS=`echo $with_blt/src/libBLT*.a`
dnl else
dnl CC=$TARGET_CC
dnl otherlibs="$TARGET_TK_LIBS $TARGET_X_LIBS $TARGET_TCL_LIBS"
dnl LIBS=""
dnl AC_SEARCH_LIBS(Blt_Init, BLT BLT2.4 BLT24,,,$otherlibs)
dnl TARGET_BLT_LIBS=$LIBS
dnl fi
dnl fi
AC_SUBST(TARGET_BLT_LIBS)
#########
# Generate the output files.
#
AC_OUTPUT_COMMANDS([$tclsh makemake.tcl >Makefile], tclsh=$BUILD_TCLSH)
AC_OUTPUT(makemake.tcl)
|