summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorrmanfredi <rmanfredi@190e5f8e-a817-0410-acf6-e9863daed9af>2008-05-28 11:19:25 +0000
committerrmanfredi <rmanfredi@190e5f8e-a817-0410-acf6-e9863daed9af>2008-05-28 11:19:25 +0000
commit6ed168ff814db8f9bcaad6f2e218fb2bbacbdb1c (patch)
treed714e774455de2d2950794b5b3ebe9c9da43035e /Configure
parent5de075ee96dc6fc8b18e37a70af93fca66bbfa25 (diff)
SVN revision number is now automatically generated in "revision.h".
The old patchlevel information is no longer used, and <PATCHLEVEL> is deprecated in unit files, replaced by <REVISION>. git-svn-id: https://dist.svn.sourceforge.net/svnroot/dist/trunk/dist@25 190e5f8e-a817-0410-acf6-e9863daed9af
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure53
1 files changed, 44 insertions, 9 deletions
diff --git a/Configure b/Configure
index fc94aef..1fb9e5f 100755
--- a/Configure
+++ b/Configure
@@ -18,7 +18,7 @@
# $Id: Head.U 6 2006-08-25 22:21:46Z rmanfredi $
#
-# Generated on Sat Aug 26 00:34:34 MEST 2006 [metaconfig 3.5 PL0]
+# Generated on Wed May 28 13:11:20 CEST 2008 [metaconfig 3.5-17]
cat >c1$$ <<EOF
ARGGGHHHH!!!!!
@@ -318,6 +318,7 @@ package=''
spackage=''
pager=''
patchlevel=''
+revision=''
perlpath=''
pkgsrc=''
prefix=''
@@ -714,7 +715,7 @@ while test $# -gt 0; do
esac
shift
;;
- -V) echo "$me generated by metaconfig 3.5 PL0." >&2
+ -V) echo "$me generated by metaconfig 3.5-17." >&2
exit 0;;
--) break;;
-*) echo "$me: unknown option $1" >&2; shift; error=true;;
@@ -1351,7 +1352,6 @@ tr
uniq
"
trylist="
-Mcc
cpp
date
inews
@@ -3618,10 +3618,16 @@ esac
: determine optimize, if desired, or use for debug flag also
case "$optimize" in
' '|$undef) dflt='none';;
-'') dflt='-O';;
+'')
+ case "$gccversion" in
+ '') dflt='-O';;
+ *) dflt='-O2 -g';;
+ esac
+ ;;
*) dflt="$optimize";;
esac
-$cat <<EOH
+case "$gccversion" in
+'') $cat <<EOH
Some C compilers have problems with their optimizers. By default, $package
compiles with the -O flag to use the optimizer. Alternately, you might want
@@ -3630,6 +3636,17 @@ systems). Either flag can be specified here. To use neither flag, specify
the word "none".
EOH
+ ;;
+*) $cat <<EOH
+
+With the GNU C compiler, it is possible to supply both -O2 and -g flags, to
+be able to reasonably optimize, whilst retaining the ability to use a
+symbolic debugger. Either flag can be specified here. To use neither flag,
+specify the word "none".
+
+EOH
+ ;;
+esac
rp="What optimizer/debugger flag should be used?"
. ./myread
optimize="$ans"
@@ -3655,7 +3672,7 @@ default|recommended)
esac
case "$gccversion" in
1*|2*) dflt="$dflt -Wall";;
- *) dflt="$dflt -W -Wall -Wformat=2";;
+ *) dflt="$dflt -W -Wall -Wformat=2 -Wshadow";;
esac
;;
esac
@@ -4191,9 +4208,9 @@ rp='What pager is used on your system?'
. ./getfile
pager="$ans"
-: get the patchlevel
+: get the patchlevel / revision
echo " "
-echo "Getting the current patchlevel..." >&4
+echo "Getting the current patchlevel / revision..." >&4
if $test -r $rsrc/patchlevel.h;then
patchlevel=`awk \
'/^#[ ]*define[ ][ ]*PATCHLEVEL/ {print $3}' \
@@ -4201,7 +4218,22 @@ if $test -r $rsrc/patchlevel.h;then
else
patchlevel=0
fi
-echo "(You have $package $baserev PL$patchlevel.)"
+if $test -r $rsrc/revision.h;then
+ revision=`awk \
+ '/^#[ ]*define[ ][ ]*REVISION/ {print $3}' \
+ < $rsrc/revision.h`
+else
+ revision=0
+fi
+case "$revision" in
+0) echo "(You have $package $baserev PL$patchlevel.)" ;;
+*)
+ case "$patchlevel" in
+ 0) echo "(You have $package $baserev-$revision)";;
+ *) echo "(You have $package $baserev-$revision PL$patchlevel)";;
+ esac
+ ;;
+esac
: determine perl absolute location
case "$perlpath" in
@@ -4474,6 +4506,7 @@ prefix='$prefix'
prefixexp='$prefixexp'
privlib='$privlib'
privlibexp='$privlibexp'
+revision='$revision'
rm='$rm'
rmail='$rmail'
run='$run'
@@ -4520,6 +4553,8 @@ EOT
: add special variables
$test -f $src/patchlevel.h && \
awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh
+$test -f $src/revision.h && \
+awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/revision.h >>config.sh
echo "CONFIG=true" >>config.sh
: propagate old symbols