diff options
author | Dick Porter <dick@acm.org> | 2003-03-27 21:49:16 +0300 |
---|---|---|
committer | Dick Porter <dick@acm.org> | 2003-03-27 21:49:16 +0300 |
commit | 460f583ef29ab35d9bf1c6ac27fd028a07b759f5 (patch) | |
tree | 066ab3e8ce962a3cb3c292a55178c7ebd74d917e /web/mono-build.sh | |
parent | 5c65bfeb02c276b4118a114335b049f5c2146ebc (diff) |
Fix for gcc 3.2 printing gratuitous warnings, and configure thinking a test
failed because some (any) output was printed
svn path=/trunk/mono/; revision=12868
Diffstat (limited to 'web/mono-build.sh')
-rwxr-xr-x | web/mono-build.sh | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/web/mono-build.sh b/web/mono-build.sh index 75abacef06d..17b604cc273 100755 --- a/web/mono-build.sh +++ b/web/mono-build.sh @@ -155,27 +155,37 @@ export PKG_CONFIG_PATH # /usr/local/include and /usr/local/lib to CPPFLAGS and LDFLAGS. We could # skip this if it would add /usr/include and /usr/lib, but leaving it # shouldnt break anything. -iconvdirs="/usr/include /usr/local/include" -for i in $iconvdirs -do - if [ -f $i/iconv.h ]; then - iconvh_dir=$i - break +# +# Actually, it does break stuff :-( gcc 3.2 prints gratuitous warnings +# and configure fails to find header files because of this cpp output. + +if [ ! -f /usr/include/iconv.h ]; then + iconvdirs="/usr/local/include" + for i in $iconvdirs + do + if [ -f $i/iconv.h ]; then + iconvh_dir=$i + break + fi + done + + if [ -z "$iconvh_dir" ]; then + echo "Can't find iconv headers (looked in $iconvdirs)" + exit -1 fi -done -if [ -z "$iconvh_dir" ]; then - echo "Can't find iconv headers (looked in $iconvdirs)" - exit -1 -fi + iconvlib_dir=`echo $iconvh_dir | sed -e 's/include/lib/'` -iconvlib_dir=`echo $iconvh_dir | sed -e 's/include/lib/'` + echo "Adding $iconvh_dir to CPPFLAGS" + echo "Adding $iconvlib_dir to LDFLAGS" -echo "Adding $iconvh_dir to CPPFLAGS" -echo "Adding $iconvlib_dir to LDFLAGS" + CPPFLAGS="$CPPFLAGS -I$here/install/include -I$iconvh_dir" + LDFLAGS="$LDFLAGS -L$here/install/lib -L$iconvlib_dir" +else + CPPFLAGS="$CPPFLAGS -I$here/install/include" + LDFLAGS="$LDFLAGS -L$here/install/lib" +fi -CPPFLAGS="$CPPFLAGS -I$here/install/include -I$iconvh_dir" -LDFLAGS="$LDFLAGS -L$here/install/lib -L$iconvlib_dir" export CPPFLAGS export LDFLAGS |