GNOME Bugzilla – Bug 707658
AS_SCRUB_INCLUDE only works with gcc's cpp
Last modified: 2013-09-26 09:38:27 UTC
Created attachment 254306 [details] [review] fix as-scrub-include so that it works for the non-gcc case Building gst-plugins-ugly 0.10.19 on x86_64-pc-solaris2.11 (OpenIndiana oi151a8) with the Oracle Studio 12.3 compiler toolchain. When running configure, it outputs: checking for GLIB... yes "s#-I[No ## ": 1: unbalanced brackets ([]) checking for ORC... no I eventually tracked that down to the AS_SCRUB_INCLUDE, which is attempting to execute INCLUDE_DIRS=`echo | cpp -v 2>&1` INCLUDE_DIRS=`echo $INCLUDE_DIRS | sed -e 's/.*<...> search starts here://' | sed -e 's/End of search list.*//'` for dir in $INCLUDE_DIRS; do GIVEN_CFLAGS=`echo $GIVEN_CFLAGS | sed -e "s#-I$dir ##"` done That's not portable for a couple reasons -- it expects cpp to exist, be in the person running configure's PATH, and to have GNU cpp syntax. Some platforms don't even have a separate cpp anymore, they just use "cc -E", which configure correctly detects. What should probably happen is something like if test X"$GCC" = X"yes" ; then INCLUDE_DIRS=`echo | cpp -v 2>&1` else dnl a suitable default, so that $INCLUDE_DIRS isn't empty later INCLUDE_DIRS=/usr/include fi Alternately, the entire check could just be skipped if not using gcc, as it appears to be coded just to work around an issue with some versions of gcc. One possible patch is attached.
I think we should just get rid of the SCRUB, very weird stuff. Will wait to see if anyone else sees a compelling reason to keep it.
Yes, I agree that it should just go away.
I think we've removed all occurrences of this awful macro now. Thanks for making a patch though, it might come handy if we need to revive it, but let's hope that's not needed :) commit ec0de98860f5a4138243ef8a86c2060b2428d8ae Author: Tim-Philipp Müller <tim@centricular.net> Date: Thu Sep 26 10:30:59 2013 +0100 m4: don't try to dist file we've just removed commit 3b8efccf32c0da4a08609676910a4ad045e6d015 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Thu Sep 26 10:55:02 2013 +0200 m4: Get rid of AS_SCRUB_INCLUDE now that it's not used anymore