'') ;;
[12]*) ;; # gcc versions 1 (gasp!) and 2 are not good for this.
Intel*) ;; # # Is that you, Intel C++?
-*) for opt in -ansi -pedantic -std=c89 -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat -fstack-protector
+*) for opt in -ansi -std=c89 -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat
do
case " $ccflags " in
*" $opt "*) ;; # Skip if already there.
;;
esac
-if test -f .patch; then
- ccflags="-DPERL_PATCHNUM=`cat .patch` $ccflags"
+if test -d .git; then
+ ccflags="-DPERL_PATCHNUM=`git describe` $ccflags"
+else
+ if test -f .patch; then
+ ccflags="-DPERL_PATCHNUM=`awk '{print $4}' .patch` $ccflags"
+ fi
fi
: Can we perhaps use $ansi2knr here