Apache OpenOffice (AOO) Bugzilla – Issue 28579
CYGWIN mis-management ...
Last modified: 2006-03-14 21:02:56 UTC
AC_PATH_PROG(CYGWIN,bash) will use the environment variable 'CYGWIN' as the answer - _without checking_ if you have CYGWIN already defined; CYGWIN is defined by the result of this process; CYGWIN=`dirname "$CYGWIN"` happens after the check; so running configure multiple times from clean you get: CYGWIN=/usr/bin CYGWIN=/usr CYGWIN=/ decay as you re-run configure; the trivial fix is to use (as a check) a different variable name so AC_PATH_PROG looks for something else: --- config_office/configure.in 19 Feb 2004 10:59:25 -0000 1.55.6.7 +++ config_office/configure.in 30 Apr 2004 16:03:45 -0000 @@ -1529,11 +1921,13 @@ dnl ************************************ dnl testing bash tools path on Windows dnl *************************************** if test "$_os" = "WINNT"; then - AC_PATH_PROG(CYGWIN, bash) - CYGWIN=`dirname "$CYGWIN"` + AC_PATH_PROG(CYGWIN_PATH, bash) + CYGWIN_PATH=`dirname "$CYGWIN_PATH"` fi -if test -z "$CYGWIN"; then +if test -z "$CYGWIN_PATH"; then CYGWIN="NO_CYGWIN" +else + CYGWIN="$CYGWIN_PATH" fi AC_SUBST(CYGWIN) Simple but very effective. This is the only instance of 'dirname' related env. var fiddling that I could see in configure.in - there may be other gotchas though.
Doh! I hope that's nothing I did to configure.in in the first place. The var CYGWIN has a special meaning for cygwin and should't used at all. So, the patch is not approved, correct is *not* to use CYGWIN at all. Thanks for catching this Michael! We have to use your fix, but with something like CYGWIN_TMP and export CYGWIN_PATH instead of CYGWIN.
Committed to cws_src680_ooo20040509. I found no other use of $(CYGWIN) in the sources, I'll propably remove the export of (now:) CYGWIN_PATH. It is only used in configure and set_soenv.in Will also commit to 112fix2 after I did a test build. @mmeeks: It is no good idea to repeat configure ... ; source win*.set in the same shell, because the current path is added each time as after the OOo path is created. This is a general uglyness.
Created attachment 15334 [details] Patch for config_office (112fix2)
Committed iz28579.diff to cws_srx645_ooo112fix2.
setting target
verified
set target 1.1.2
close issue.