1 dnl Process this file with autoconf to produce a configure script.
7 AM_INIT_AUTOMAKE(libtcl_cygwin, 8.4)
11 # FIXME: We temporarily define our own version of AC_PROG_CC. This is
12 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
13 # are probably using a cross compiler, which will not be able to fully
14 # link an executable. This should really be fixed in autoconf
17 AC_DEFUN(LIB_AC_PROG_CC,
18 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
19 AC_CHECK_PROG(CC, gcc, gcc)
20 if test -z "$CC"; then
21 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
22 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
25 if test $ac_cv_prog_gcc = yes; then
27 dnl Check whether -g works, even if CFLAGS is set, in case the package
28 dnl plays around with CFLAGS (such as to build both debugging and
29 dnl normal versions of a library), tasteless as that idea is.
30 ac_test_CFLAGS="${CFLAGS+set}"
31 ac_save_CFLAGS="$CFLAGS"
33 if test "$ac_test_CFLAGS" = set; then
34 CFLAGS="$ac_save_CFLAGS"
35 elif test $ac_cv_prog_cc_g = yes; then
42 test "${CFLAGS+set}" = set || CFLAGS="-g"
51 if ${CC} -c -mno-win32 ac$$.c >/dev/null 2>&1; then
52 case "$EXTRA_CFLAGS" in
54 *) EXTRA_CFLAGS="-mno-win32 $EXTRA_CFLAGS" ;;
61 AC_CHECK_TOOL(AR, ar, ar)
63 AC_SUBST(EXTRA_CFLAGS)
67 #--------------------------------------------------------------------
68 # The statements below define the symbol TCL_PACKAGE_PATH, which
69 # gives a list of directories that may contain packages. The list
70 # consists of one directory for machine-dependent binaries and
71 # another for platform-independent scripts.
72 #--------------------------------------------------------------------
74 if test "$prefix" != "$exec_prefix"; then
75 TCL_PACKAGE_PATH="${exec_prefix}/lib ${prefix}/lib"
77 TCL_PACKAGE_PATH="${prefix}/lib"
80 TCL_LIBRARY=@datadir@/tcl${VERSION}
82 cross_cache=${srcdir}/cygwin-cache
85 AC_SUBST(TCL_PACKAGE_PATH)
88 # These variables are needed to get expect working with
89 # the tclConfig.sh script in the cygwin directory.
92 TCL_LD_SEARCH_FLAGS=""
93 AC_SUBST(TCL_LD_SEARCH_FLAGS)
98 SHLIB_LD='${CC} -shared ${CFLAGS}'
100 TCL_BUILD_LIB_SPEC=`pwd`/libtcl_cygwin.a
101 AC_SUBST(TCL_BUILD_LIB_SPEC)
102 TCL_LIB_SPEC="$TCL_BUILD_LIB_SPEC"
103 AC_SUBST(TCL_LIB_SPEC)
106 AC_OUTPUT([Makefile tclConfig.sh])