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])
27 if test $ac_cv_prog_gcc = yes; then
29 dnl Check whether -g works, even if CFLAGS is set, in case the package
30 dnl plays around with CFLAGS (such as to build both debugging and
31 dnl normal versions of a library), tasteless as that idea is.
32 ac_test_CFLAGS="${CFLAGS+set}"
33 ac_save_CFLAGS="$CFLAGS"
36 if test "$ac_test_CFLAGS" = set; then
37 CFLAGS="$ac_save_CFLAGS"
38 elif test $ac_cv_prog_cc_g = yes; then
45 test "${CFLAGS+set}" = set || CFLAGS="-g"
54 if ${CC} -c -mno-win32 ac$$.c >/dev/null 2>&1; then
55 case "$EXTRA_CFLAGS" in
57 *) EXTRA_CFLAGS="-mno-win32 $EXTRA_CFLAGS" ;;
64 AC_CHECK_TOOL(AR, ar, ar)
66 AC_SUBST(EXTRA_CFLAGS)
70 #--------------------------------------------------------------------
71 # The statements below define the symbol TCL_PACKAGE_PATH, which
72 # gives a list of directories that may contain packages. The list
73 # consists of one directory for machine-dependent binaries and
74 # another for platform-independent scripts.
75 #--------------------------------------------------------------------
77 if test "$prefix" != "$exec_prefix"; then
78 TCL_PACKAGE_PATH="${exec_prefix}/lib ${prefix}/lib"
80 TCL_PACKAGE_PATH="${prefix}/lib"
83 TCL_LIBRARY=@datadir@/tcl${VERSION}
85 cross_cache=${srcdir}/cygwin-cache
88 AC_SUBST(TCL_PACKAGE_PATH)
91 # These variables are needed to get expect working with
92 # the tclConfig.sh script in the cygwin directory.
95 TCL_LD_SEARCH_FLAGS=""
96 AC_SUBST(TCL_LD_SEARCH_FLAGS)
101 SHLIB_LD='${CC} -shared ${CFLAGS}'
103 TCL_BUILD_LIB_SPEC=`pwd`/libtcl_cygwin.a
104 AC_SUBST(TCL_BUILD_LIB_SPEC)
105 TCL_LIB_SPEC="$TCL_BUILD_LIB_SPEC"
106 AC_SUBST(TCL_LIB_SPEC)
109 AC_OUTPUT([Makefile tclConfig.sh])