summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2015-10-16 08:10:40 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2015-10-16 12:19:32 -0400
commit76e6b6c7dc4c93d421dfe6c24866c3cd4560b57a (patch)
tree6bbfd39f96f39c3b95038341da8d43acad7dd6a1 /Configure
parenta7dba6f870a82e3be87bda50593cb5d2042277fd (diff)
downloadperl-76e6b6c7dc4c93d421dfe6c24866c3cd4560b57a.tar.gz
Try to avoid doubling the cppflags if rerun without removing config.sh
This bug has been here since 2001, introduced by yours truly in 58e77565. Hasn't been too harmful, obviously. It doubles the cppflags only once, thankfully, unlimited doubling would probably have been noticed earlier. The avoidance maneuver is far from fool-proof. To be more fooler-proofer, some sort of order-preserving deduping would be needed.
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure7
1 files changed, 6 insertions, 1 deletions
diff --git a/Configure b/Configure
index e751dd9527..0d7796c4e8 100755
--- a/Configure
+++ b/Configure
@@ -5533,7 +5533,12 @@ esac
: the following weeds options from ccflags that are of no interest to cpp
case "$cppflags" in
'') cppflags="$ccflags" ;;
-*) cppflags="$cppflags $ccflags" ;;
+*) set X $ccflags; shift
+ case " $cppflags " in
+ *" $1 "*) ;; # Try to avoid doubling the cppflags.
+ *) cppflags="$cppflags $ccflags" ;;
+ esac
+ ;;
esac
case "$gccversion" in
1*) cppflags="$cppflags -D__GNUC__"