Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [patch] Fix expect build under Cygwin + Tcl/Tk 8.3
@ 2002-05-15 15:18 Mo DeJong
  2002-05-16 10:58 ` [patch] Fix expect build under cygwin " Christopher Faylor
  0 siblings, 1 reply; 9+ messages in thread
From: Mo DeJong @ 2002-05-15 15:18 UTC (permalink / raw)
  To: gdb-patches

Greetings.

The current CVS version of expect does not build correctly under Cygwin. The root of the problem is that expect is searching for a tclConfig.sh file in tcl/unix when it should be looking in tcl/win. The following patch fixes the problem by updating the m4 macros used by the expect build.

Note: This patch was extracted from a larger patch posted to the Insight list but it does not depend on the other Cygwin related changes to Tcl.

http://sources.redhat.com/ml/insight/2002-q2/msg00071.html

cheers
Mo DeJong

2002-05-15  Mo DeJong  <supermo@bayarea.net>

	* aclocal.m4 (CY_AC_PATH_TCLCONFIG, CY_AC_PATH_TKCONFIG,
	CY_AC_PATH_ITCLH): Update macros that search for tclConfig.sh
	and tkConfig.sh so that they also check the win/ subdirectory.
	Update macro that checks for itcl.h so that it looks in
	itcl/itcl/generic instead of itcl/src. These updates
	are needed to get things building correctly under Cygwin
	gcc and Tcl/Tk 8.3.
 	* configure: Regen.

Index: aclocal.m4
===================================================================
RCS file: /cvs/src/src/expect/aclocal.m4,v
retrieving revision 1.2
diff -u -r1.2 aclocal.m4
--- aclocal.m4	11 Sep 2001 19:24:02 -0000	1.2
+++ aclocal.m4	5 May 2002 02:31:20 -0000
@@ -201,6 +201,10 @@
         ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
 	break
       fi
+      if test -f "$i/win/tclConfig.sh" ; then
+        ac_cv_c_tclconfig=`(cd $i/win; pwd)`
+	break
+      fi
     done
   fi
 changequote([,])
@@ -459,6 +463,10 @@
         ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
 	break
       fi
+      if test -f "$i/win/tkConfig.sh" ; then
+        ac_cv_c_tkconfig=`(cd $i/win; pwd)`
+	break
+      fi
     done
   fi
 changequote([,])
@@ -533,8 +541,8 @@
 AC_MSG_CHECKING(for Itcl private headers. srcdir=${srcdir})
 if test x"${ac_cv_c_itclh}" = x ; then
   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do
-    if test -f $i/src/itcl.h ; then
-      ac_cv_c_itclh=`(cd $i/src; pwd)`
+    if test -f $i/itcl/generic/itcl.h ; then
+      ac_cv_c_itclh=`(cd $i/itcl/generic; pwd)`
       break
     fi
   done


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [patch] Fix expect build under cygwin + Tcl/Tk 8.3
@ 2002-07-15  3:06 Mo DeJong
  2002-07-15 11:05 ` Christopher Faylor
  0 siblings, 1 reply; 9+ messages in thread
From: Mo DeJong @ 2002-07-15  3:06 UTC (permalink / raw)
  To: gdb-patches

Hello.

I am just checking back on a patch I sent in:

http://sources.redhat.com/ml/gdb-patches/2002-05/msg00621.html

It got one response:

http://sources.redhat.com/ml/gdb-patches/2002-05/msg00654.html

> >The current CVS version of expect does not build correctly under
> >Cygwin.  The root of the problem is that expect is searching for a
> >tclConfig.sh file in tcl/unix when it should be looking in tcl/win.
> >The following patch fixes the problem by updating the m4 macros used by
> >the expect build.

> AFAIK, expect shouldn't be using the win version of anything.  It is
> supposed to be using a UNIX-only implementation of tcl.
> cgf

I guess it would have helped if I had included the more detailed description
from my earlier post to the insight list:

"This patch will get the configure script to pickup the tclConfig.sh
out of the tcl/win subdirectory instead of the fake one Tcl is
currently generating in the tcl/unix subdirectory. One possible
objection to this patch would be that a tclConfig.sh should be
created in the tcl/cygwin subdirectory and then found there before
checking tcl/win. That may be the "more correct" thing to do, but
this patch just tries to do the "less wrong" thing since it is
the minimal change that should get everything working again."

The other way to fix the problem would be to create a new tclConfig.sh
file in the tcl/cygwin sub and populate it with needed values and then
add support for this new subdirectory to any of the Tcl extensions
that needed it. That could end up being quite a bit of work. In the
end, I don't think it would matter since expect seems to ignore the
contents of the tclConfig.sh file, it just wants it to be there. Also,
the configure scripts in the expect subdir seem to be way out of sync
with the configures in the other extensions, so it seems like a big
rewrite would be needed to actually use the contents of the tclConfig.sh
file.

So, my point is that I think my patch should be applied since it fixes
the problem. It might be the most minimal fix, but I don't see how that
is any worse than what we have now. Currently, the Windows version
of Tcl/Tk/Itcl will not build because Tcl incorrectly emits a unix/tclConfig.sh
file just to make expect happy (and that hoses Itcl).

cheers
Mo DeJong


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [patch] Fix expect build under cygwin + Tcl/Tk 8.3
@ 2002-07-15 16:34 Mo DeJong
  2002-07-29 20:33 ` Christopher Faylor
  0 siblings, 1 reply; 9+ messages in thread
From: Mo DeJong @ 2002-07-15 16:34 UTC (permalink / raw)
  To: gdb-patches

> What would have helped would have been if it actually failed for me.
> I can build expect with no problem.

Expect currently builds, it is Itcl that does not build:

http://sources.redhat.com/ml/insight/2002-q2/msg00073.html

> Again, expect is not supposed to be using the windows version of
> anything.  It is supposed to be using the cygwin/unix version.
>
> cgf

Ok, you win. Here is a patch to fixup the tcl/cygwin and tcl/win
configures along with expect. It will also fix the Itcl build.

2002-07-15  Mo DeJong  <supermo@bayarea.net>

	* cygwin/configure: Regen.
	* cygwin/configure.in: Emit a tclConfig.sh file
	so that expect can load it at configure time.
	* win/configure: Regen.
	* win/configure.in: Don't emit a ../unix/tclConfig.sh
	file, this was a hack to get expect to build and
	it breaks the Itcl build.

Index: cygwin/configure.in
===================================================================
RCS file: /cvs/src/src/tcl/cygwin/configure.in,v
retrieving revision 1.5
diff -u -r1.5 configure.in
--- cygwin/configure.in	28 Oct 2001 23:31:03 -0000	1.5
+++ cygwin/configure.in	15 Jul 2002 21:37:11 -0000
@@ -88,4 +88,19 @@
 AC_SUBST(TCL_PACKAGE_PATH)
 AC_SUBST(TCL_LIBRARY)
 
-AC_OUTPUT([Makefile])
+# These variables are needed to get expect working with
+# the tclConfig.sh script in the cygwin directory.
+LD_FLAGS=""
+AC_SUBST(LD_FLAGS)
+TCL_LD_SEARCH_FLAGS=""
+AC_SUBST(TCL_LD_SEARCH_FLAGS)
+DL_LIBS=""
+AC_SUBST(DL_LIBS)
+MATH_LIBS=""
+AC_SUBST(MATH_LIBS)
+SHLIB_LD='${CC} -shared ${CFLAGS}'
+AC_SUBST(SHLIB_LD)
+
+
+AC_OUTPUT([Makefile tclConfig.sh])
+
Index: win/configure.in
===================================================================
RCS file: /cvs/src/src/tcl/win/configure.in,v
retrieving revision 1.7
diff -u -r1.7 configure.in
--- win/configure.in	28 Oct 2001 16:26:29 -0000	1.7
+++ win/configure.in	15 Jul 2002 21:37:11 -0000
@@ -247,5 +247,5 @@
 AC_SUBST(MAKE_DLL)
 AC_SUBST(MAKE_EXE)
 
-AC_OUTPUT(Makefile tclConfig.sh tcl.hpj ../unix/tclConfig.sh)
+AC_OUTPUT(Makefile tclConfig.sh tcl.hpj)
 

2002-07-15  Mo DeJong  <supermo@bayarea.net>

	* aclocal.m4 (CY_AC_PATH_TCLCONFIG): Check for a
	tclConfig.sh file in tcl/cygwin if one can't
	be found in tcl/unix. Update Itcl header check.
	* configure: Regen.

Index: aclocal.m4
===================================================================
RCS file: /cvs/src/src/expect/aclocal.m4,v
retrieving revision 1.2
diff -u -r1.2 aclocal.m4
--- aclocal.m4	11 Sep 2001 19:24:02 -0000	1.2
+++ aclocal.m4	15 Jul 2002 21:38:21 -0000
@@ -201,6 +201,10 @@
         ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
 	break
       fi
+      if test -f "$i/cygwin/tclConfig.sh" ; then
+        ac_cv_c_tclconfig=`(cd $i/cygwin; pwd)`
+	break
+      fi
     done
   fi
 changequote([,])
@@ -533,8 +537,8 @@
 AC_MSG_CHECKING(for Itcl private headers. srcdir=${srcdir})
 if test x"${ac_cv_c_itclh}" = x ; then
   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do
-    if test -f $i/src/itcl.h ; then
-      ac_cv_c_itclh=`(cd $i/src; pwd)`
+    if test -f $i/itcl/generic/itcl.h ; then
+      ac_cv_c_itclh=`(cd $i/itcl/generic; pwd)`
       break
     fi
   done


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

end of thread, other threads:[~2002-07-30  1:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-15 15:18 [patch] Fix expect build under Cygwin + Tcl/Tk 8.3 Mo DeJong
2002-05-16 10:58 ` [patch] Fix expect build under cygwin " Christopher Faylor
2002-07-15  3:06 Mo DeJong
2002-07-15 11:05 ` Christopher Faylor
2002-07-15 12:00   ` Keith Seitz
2002-07-15 12:58     ` Christopher Faylor
2002-07-15 13:09     ` Keith Seitz
2002-07-15 16:34 Mo DeJong
2002-07-29 20:33 ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox