From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1095 invoked by alias); 2 Aug 2008 23:36:19 -0000 Received: (qmail 1086 invoked by uid 22791); 2 Aug 2008 23:36:19 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 02 Aug 2008 23:35:24 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m72NZMdw014709 for ; Sat, 2 Aug 2008 19:35:22 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m72NZLBg018565 for ; Sat, 2 Aug 2008 19:35:21 -0400 Received: from lindt.uglyboxes.com (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m72NZIAr016184 for ; Sat, 2 Aug 2008 19:35:20 -0400 Message-ID: <4894EF36.4070908@redhat.com> Date: Sat, 02 Aug 2008 23:36:00 -0000 From: Keith Seitz User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: insight Subject: [PATCH/libgui] Fix cygwin build woes Content-Type: multipart/mixed; boundary="------------070003070807030404080803" X-IsSubscribed: yes Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00019.txt.bz2 This is a multi-part message in MIME format. --------------070003070807030404080803 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 892 Hi, I've committed the attached patch which should fix any problems with building libgui on cygwin. At least, it builds on *my* cygwin box. NOTE: Not tested (and probably won't work) with mingw! Please let me know (via this list) if there are any problems. Keith ChangeLog 2008-08-02 Keith Seitz * tcl.m4: Remove. I changed my mind. * acinclude.m4: Include ../config/tcl.m4. (CY_AC_TCL_PRIVATE_HEADERS): New macro. (CY_AC_TK_PRIVATE_HEADERS): New macro. * configure.ac: When using in-tree tcl/tk, include Tcl's/Tk's platform directory. When using installed Tcl/Tk, use CY_AC_{TCL,TK}_PRIVATE_HEADERS to find the private header files. * aclocal.m4: Regenerated. * configure: Regenerated. * library/Makefile.in: Regenerated. * src/Makefile.in: Regenerated. --------------070003070807030404080803 Content-Type: text/x-patch; name="libgui-cygwin-update.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libgui-cygwin-update.patch" Content-length: 2777 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 --------------070003070807030404080803--