;;
esac
+# If we have g++, we cannot have the -Wdeclaration-after-statement.
+# Some g++s accept it but then whine about it with every file.
+case "$cc" in
+*g++*) warn="`echo $warn|sed 's/-Wdeclaration-after-statement/ /'`" ;;
+esac
-stdflags=''
+extra=''
-# Be strict C89 for gcc (but not for g++).
-case "$gccversion" in
-'') ;;
-Intel*) ;; # Nice try, Intel C++.
-12]*) ;; # Go easy on the older versions of gcc.
-*) case "$cc" in
- *g++*) ;;
- *) stdflags="$stdflags -std=c89" ;;
- esac
- ;;
+# C and C++ have different rules for const strings;
+# without the -fno-const-strings g++ cannot handle our habit
+# of mixing char literals and char pointers.
+case "$cc" in
+*g++*) extra="$extra -fno-const-strings" ;;
esac
+stdflags=''
+
echo "Extracting cflags (with variable substitutions)"
: This section of the file will have variable substitutions done on it.
: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
warn="$warn"
# Extra standardness.
stdflags="$stdflags"
+# Extra extra.
+extra="$extra"
!GROK!THIS!
doio) ;;
doop) ;;
dump) ;;
+ globals) ;;
gv) ;;
hv) ;;
locale) ;;
+ madly) ;;
main) ;;
malloc) ;;
mg) ;;
miniperlmain) ;;
numeric) ;;
op) ;;
+ opmini) ;;
+ pad) ;;
perl) ;;
perlapi) ;;
perlmain) ;;
pp_ctl) ;;
pp_hot) ;;
pp_pack) ;;
+ pp_sort) ;;
pp_sys) ;;
regcomp) ;;
regexec) ;;
sv) ;;
taint) ;;
toke) ;;
+ universal) ;;
usersub) ;;
+ utf8) ;;
util) ;;
+ xsutils) ;;
*) ;;
esac
fi
: Can we perhaps use $ansi2knr here
- echo "$cc -c -DPERL_CORE $ccflags $stdflags $optimize $warn"
- eval "$also "'"$cc -DPERL_CORE -c $ccflags $stdflags $optimize $warn"'
+ echo "$cc -c -DPERL_CORE $ccflags $stdflags $optimize $warn $extra"
+ eval "$also "'"$cc -DPERL_CORE -c $ccflags $stdflags $optimize $warn $extra"'
. $TOP/config.sh