aboutsummaryrefslogtreecommitdiff
path: root/sprinkler/configure
diff options
context:
space:
mode:
authorBryan Jurish <mukau@users.sourceforge.net>2009-04-27 19:37:48 +0000
committerBryan Jurish <mukau@users.sourceforge.net>2009-04-27 19:37:48 +0000
commit67b63ce6c08bffaea091063e8f106a81eb456bc6 (patch)
tree8e134b06d19c3ea2262abc2059510f2fd5e0a844 /sprinkler/configure
parent0eeb1dc9455f8976a988e218bec446fdba5574fe (diff)
+ yet more *FLAGS madness
svn path=/trunk/externals/moocow/; revision=11174
Diffstat (limited to 'sprinkler/configure')
-rwxr-xr-xsprinkler/configure100
1 files changed, 88 insertions, 12 deletions
diff --git a/sprinkler/configure b/sprinkler/configure
index 664b27e..ad69bf5 100755
--- a/sprinkler/configure
+++ b/sprinkler/configure
@@ -617,7 +617,6 @@ build_alias
host_alias
target_alias
EXTRA_CPPFLAGS
-AM_CPPFLAGS
INSTALL_PROGRAM
INSTALL_SCRIPT
INSTALL_DATA
@@ -1768,7 +1767,15 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
##-- save user's CFLAGS,CPPFLAGS
##-- parse user's CFLAGS,CPPFLAGS
+ { echo "$as_me:$LINENO: pre-processing user CFLAGS..." >&5
+echo "$as_me: pre-processing user CFLAGS..." >&6;}
+ { echo "$as_me:$LINENO: got CFLAGS=\"$CFLAGS\"" >&5
+echo "$as_me: got CFLAGS=\"$CFLAGS\"" >&6;}
+ { echo "$as_me:$LINENO: got CPPFLAGS=\"$CPPFLAGS\"" >&5
+echo "$as_me: got CPPFLAGS=\"$CPPFLAGS\"" >&6;}
+ cflags=
+ cppflags=
##vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
## BEGIN AX_DISTRIBUTE_CFLAGS
@@ -1817,8 +1824,21 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
CFLAGS="$cflags"
CPPFLAGS="$cppflags"
- AM_CPPFLAGS="\${EXTRA_CPPFLAGS}"
+ ##-- trim whitespace
+ CFLAGS=`echo $CFLAGS`
+ CPPFLAGS=`echo $CPPFLAGS`
+ EXTRA_CPPFLAGS=`echo $EXTRA_CPPFLAGS`
+ #LDFLAGS=`echo $LDFLAGS`
+ { echo "$as_me:$LINENO: setting distributed CFLAGS..." >&5
+echo "$as_me: setting distributed CFLAGS..." >&6;}
+ { echo "$as_me:$LINENO: set CPPFLAGS=\"$CPPFLAGS\"" >&5
+echo "$as_me: set CPPFLAGS=\"$CPPFLAGS\"" >&6;}
+ { echo "$as_me:$LINENO: set EXTRA_CPPFLAGS=\"$EXTRA_CPPFLAGS\"" >&5
+echo "$as_me: set EXTRA_CPPFLAGS=\"$EXTRA_CPPFLAGS\"" >&6;}
+ { echo "$as_me:$LINENO: set CFLAGS=\"$CFLAGS\"" >&5
+echo "$as_me: set CFLAGS=\"$CFLAGS\"" >&6;}
+ #AM_CPPFLAGS="\${EXTRA_CPPFLAGS}"
##-- save (hacked) user's CFLAGS,CPPFLAGS
@@ -3843,8 +3863,8 @@ echo "$as_me: WARNING: Unknown kernel type \"$uname_s\" defaults to \"Linux\"" >
if test "$uname_s" = "MINGW32_NT"; #MINGW32_NT-5.1
then
PDEXT_DFLAGS="\
- -DO_NONBLOCK=1 -Dsrand48(n)=srand((n)) \
- -Ddrand48()=((double)rand()/RAND_MAX) -Dbzero(p,n)=memset(p,0,n) \
+ -D'O_NONBLOCK=1' -D'srand48(n)=srand((n))' \
+ -D'drand48()=((double)rand()/RAND_MAX)' -D'bzero(p,n)=memset(p,0,n)' \
"
PDEXT_LFLAGS="-shared -L${pddir}/bin -L${pddir}/obj"
PDEXT_CFLAGS="-mms-bitfields -DMSW -DNT"
@@ -3958,16 +3978,73 @@ fi
##-- add platform defaults to user flags
- CPPFLAGS="$UCPPFLAGS $PDEXT_IFLAGS $PDEXT_DFLAGS"
- CFLAGS="$UCFLAGS $PDEXT_OFLAGS $PDEXT_AFLAGS $PDEXT_WFLAGS"
- LDFLAGS="$ULDFLAGS $PDEXT_LFLAGS"
+ CPPFLAGS="$CPPFLAGS $PDEXT_IFLAGS $PDEXT_DFLAGS"
+ CFLAGS="$CFLAGS $PDEXT_OFLAGS $PDEXT_AFLAGS $PDEXT_WFLAGS"
+ LDFLAGS="$LDFLAGS $PDEXT_LFLAGS"
+
+ ##-- ... and re-hack
+ cflags=
+ cppflags=
+
+ ##vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+ ## BEGIN AX_DISTRIBUTE_CFLAGS
+ axdf_cppflags=
+ axdf_cflags=
+
+ for axdf_flag in $CFLAGS
+ do
+ case "$axdf_flag" in
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ axdf_cppflags="$axdf_cppflags $axdf_flag"
+ ;;
+ *)
+ axdf_cflags="$axdf_cflags $axdf_flag"
+ ;;
+ esac
+ done
+
+ test xCPPFLAGS != x && CPPFLAGS="$CPPFLAGS $axdf_cppflags"
+ test xcflags != x && cflags="$cflags $axdf_cflags"
+
+ ## END AX_DISTRIBUTE_CFLAGS
+ ##^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+
+ ##vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+ ## BEGIN AX_SAFE_CFLAGS
+ axsf_safe=
+ axsf_unsafe=
+
+ for axsf_flag in $CPPFLAGS
+ do
+ axsf_flag_tmp=`echo $axsf_flag | sed -e 's/[ '\''\"\(\)]//g'`
+ if test "${axsf_flag_tmp}" = "${axsf_flag}"; then
+ axsf_safe="$axsf_safe $axsf_flag"
+ else
+ axsf_unsafe="$axsf_unsafe $axsf_flag"
+ fi
+ done
+
+ test xcppflags != x && cppflags="$cppflags $axsf_safe"
+ test xEXTRA_CPPFLAGS != x && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS $axsf_unsafe"
+ ## END AX_SAFE_CFLAGS
+ ##^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ CFLAGS="$cflags"
+ CPPFLAGS="$cppflags"
+
+ ##-- trim whitespace
+ CFLAGS=`echo $CFLAGS`
+ CPPFLAGS=`echo $CPPFLAGS`
+ EXTRA_CPPFLAGS=`echo $EXTRA_CPPFLAGS`
+ LDFLAGS=`echo $LDFLAGS`
{ echo "$as_me:$LINENO: set CPPFLAGS=\"$CPPFLAGS\"" >&5
echo "$as_me: set CPPFLAGS=\"$CPPFLAGS\"" >&6;}
{ echo "$as_me:$LINENO: set EXTRA_CPPFLAGS=\"$EXTRA_CPPFLAGS\"" >&5
echo "$as_me: set EXTRA_CPPFLAGS=\"$EXTRA_CPPFLAGS\"" >&6;}
- { echo "$as_me:$LINENO: set CFLAGS=\"$CFLAGS" >&5
-echo "$as_me: set CFLAGS=\"$CFLAGS" >&6;}
+ { echo "$as_me:$LINENO: set CFLAGS=\"$CFLAGS\"" >&5
+echo "$as_me: set CFLAGS=\"$CFLAGS\"" >&6;}
{ echo "$as_me:$LINENO: set LDFLAGS=\"$LDFLAGS\"" >&5
echo "$as_me: set LDFLAGS=\"$LDFLAGS\"" >&6;}
@@ -4667,7 +4744,6 @@ build_alias!$build_alias$ac_delim
host_alias!$host_alias$ac_delim
target_alias!$target_alias$ac_delim
EXTRA_CPPFLAGS!$EXTRA_CPPFLAGS$ac_delim
-AM_CPPFLAGS!$AM_CPPFLAGS$ac_delim
INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
INSTALL_DATA!$INSTALL_DATA$ac_delim
@@ -4726,6 +4802,7 @@ PDEXT_AFLAGS!$PDEXT_AFLAGS$ac_delim
PDEXT_DFLAGS!$PDEXT_DFLAGS$ac_delim
PDEXT_IFLAGS!$PDEXT_IFLAGS$ac_delim
PDEXT_LFLAGS!$PDEXT_LFLAGS$ac_delim
+PDEXT_OFLAGS!$PDEXT_OFLAGS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -4767,7 +4844,6 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
-PDEXT_OFLAGS!$PDEXT_OFLAGS$ac_delim
PDEXT_WFLAGS!$PDEXT_WFLAGS$ac_delim
NON_MAX_FORWARD!$NON_MAX_FORWARD$ac_delim
SPRINKLER_COMPAT_TEXT!$SPRINKLER_COMPAT_TEXT$ac_delim
@@ -4777,7 +4853,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 7; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5