Apache OpenOffice (AOO) Bugzilla – Issue 98688
configure.in munges CFLAGS and LDFLAGS
Last modified: 2017-05-20 11:27:43 UTC
in configure.in, LDFLAGS and CFLAGS are not properly reset after test for X libraries. Here's a patch: ************************************************* --- configure.in 2009-01-31 15:27:50 -05:00 +++ configure.in.new 2009-01-31 15:34:02 -05:00 @@ -4298,11 +4298,15 @@ if test -z "$x_includes"; then AC_MSG_ERROR([No X includes found]) # Exit fi + x_cflags_save="$CFLAGS" + x_ldflags_save="$LDFLAGS" CFLAGS=$X_CFLAGS LDFLAGS="$X_LDFLAGS $X_LIBS" AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])]) dnl Check if the XauDisposeAuth symbol is provided by libXau. AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", []) + CFLAGS="$x_cflags_save" + LDFLAGS="$x_ldflags_save" else x_includes="no_x_includes" x_libraries="no_x_libraries" *************************************************
This actually can be considered to be a feature. :) See e.g. http://www.openoffice.org/issues/show_bug.cgi?id=98498. It now works at the new place because the stuff for unusual/ancient X lib places is already defined.
Is it then a feature that later tests like openssl, hunspell, etc. fail because user-supplied LDFLAGS have now been replaced by X_LDFLAGS?
no, but apparently no one saw that yet because no one needed user-LDFLAGS. What I just was saying is that your patch as-is breaks configure for people with ancient systems using /usr/X11R6/lib. And the checks do work when the libs are in /usr/lib or somewhere else in lds search path :) Of course, one can argue that those system are no longer relevant, but...
Rene, what have you been smoking? The correct response to this report is, "oh my gosh, what a bonehead mistake! We'll fix it right away!"
It is even worse: configure --help documents (among others) the environment variables CFLAGS, LDFLAGS, LIBS, CPPFLAGS, CXXFLAGS Apart from the fact that they don't make into set_soenv.sh via AC_SUBST's, these variables either aren't used at all (LIBS, CPPFLAGS, CXXFLAGS) by the dmake makefiles or get overwritten here and there (CFLAGS, LDFLAGS). This behaviour makes it very painful do build ooffice on a system with non-standadrd locations, e.g. on solaris.
It bugs me too (typically when trying to integrate external modules into the OOo build system) that the OOo build system does not follow established conventions for those environment/configure variables.
gentlemen, what's the status of the patch ? Is it a valid on we can apply ?
I'm adding this comment to all open issues with Issue Type == PATCH. We have 220 such issues, many of them quite old. I apologize for that. We need your help in prioritizing which patches should be integrated into our next release, Apache OpenOffice 4.0. If you have submitted a patch and think it is applicable for AOO 4.0, please respond with a comment to let us know. On the other hand, if the patch is no longer relevant, please let us know that as well. If you have any general questions or want to discuss this further, please send a note to our dev mailing list: dev@openoffice.apache.org Thanks! -Rob
Reset assigne to the default "issues@openoffice.apache.org".