public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/libgui] Fix cygwin build woes
@ 2008-08-02 23:36 Keith Seitz
  2008-08-04 23:35 ` Christopher Faylor
  0 siblings, 1 reply; 11+ messages in thread
From: Keith Seitz @ 2008-08-02 23:36 UTC (permalink / raw)
  To: insight

[-- Attachment #1: Type: text/plain, Size: 892 bytes --]

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  <keiths@redhat.com>

         * 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.

[-- Attachment #2: libgui-cygwin-update.patch --]
[-- Type: text/x-patch, Size: 2777 bytes --]

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
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-08-06  9:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-02 23:36 [PATCH/libgui] Fix cygwin build woes Keith Seitz
2008-08-04 23:35 ` Christopher Faylor
2008-08-05  4:13   ` Keith Seitz
2008-08-05 15:01     ` Christopher Faylor
2008-08-05 17:05       ` Dave Korn
2008-08-05 17:25         ` Weddington, Eric
2008-08-05 17:55           ` Dave Korn
2008-08-05 17:59             ` Weddington, Eric
2008-08-05 18:46               ` [OT] " Dave Korn
2008-08-05 20:53         ` Christopher Faylor
2008-08-06  9:28           ` Dave Korn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).