Index: acinclude.m4 =================================================================== RCS file: /cvs/src/src/libgui/acinclude.m4,v retrieving revision 1.3 diff -u -p -r1.3 acinclude.m4 --- acinclude.m4 22 Jul 2008 20:11:35 -0000 1.3 +++ acinclude.m4 2 Aug 2008 23:32:51 -0000 @@ -1 +1,43 @@ -"sinclude(tcl.m4)" +sinclude(../config/tcl.m4) + +dnl Find the location of the private Tcl headers +dnl When Tcl is installed, this is TCL_INCLUDE_SPEC/tcl-private/generic +dnl When Tcl is in the build tree, this is not needed. +dnl +dnl Note: you must use first use SC_LOAD_TCLCONFIG! +AC_DEFUN([CY_AC_TCL_PRIVATE_HEADERS], [ + AC_MSG_CHECKING([for Tcl private headers]) + private_dir="" + dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` + if test -f ${dir}/tclInt.h ; then + private_dir=${dir} + fi + + if test x"${private_dir}" = x; then + AC_ERROR(could not find private Tcl headers) + else + TCL_PRIVATE_INCLUDE="-I${private_dir}" + AC_MSG_RESULT(${private_dir}) + fi +]) + +dnl Find the location of the private Tk headers +dnl When Tk is installed, this is TK_INCLUDE_SPEC/tk-private/generic +dnl When Tk is in the build tree, this not needed. +dnl +dnl Note: you must first use SC_LOAD_TKCONFIG +AC_DEFUN([CY_AC_TK_PRIVATE_HEADERS], [ + AC_MSG_CHECKING([for Tk private headers]) + private_dir="" + dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` + if test -f ${dir}/tkInt.h; then + private_dir=${dir} + fi + + if test x"${private_dir}" = x; then + AC_ERROR(could not find Tk private headers) + else + TK_PRIVATE_INCLUDE="-I${private_dir}" + AC_MSG_RESULT(${private_dir}) + fi +]) Index: configure.ac =================================================================== RCS file: /cvs/src/src/libgui/configure.ac,v retrieving revision 1.3 diff -u -p -r1.3 configure.ac --- configure.ac 22 Jul 2008 20:11:35 -0000 1.3 +++ configure.ac 2 Aug 2008 23:32:51 -0000 @@ -92,15 +92,22 @@ cd ${here} if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then # Using in-tree Tcl/Tk - TCL_INCLUDES="-I${TCL_SRC_DIR}/generic" + case "${host}" in + *-*-cygwin*) platDir="win" ;; + *) platDir="unix" ;; + esac + + TCL_INCLUDES="-I${TCL_SRC_DIR}/generic -I${TCL_SRC_DIR}/${platDir}" TCL_LIBRARY=${TCL_BUILD_LIB_SPEC} - TK_INCLUDES="-I${TK_SRC_DIR}/generic" + TK_INCLUDES="-I${TK_SRC_DIR}/generic -I${TK_SRC_DIR}/${platDir}" TK_LIBRARY=${TK_BUILD_LIB_SPEC} else # Using installed Tcl/Tk - TCL_INCLUDES=${TCL_INCLUDE_SPEC} + CY_AC_TCL_PRIVATE_HEADERS + CY_AC_TK_PRIVATE_HEADERS + TCL_INCLUDES="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" TCL_LIBRARY=${TCL_LIB_SPEC} - TK_INCLUDES=${TK_INCLUDE_SPEC} + TK_INCLUDES="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" TK_LIBRARY=${TK_LIB_SPEC} fi