Use val_to_str_const().
[obnox/wireshark/wip.git] / autogen.sh
index d86cca928fb9652a57d2f33cde3f589e93026568..5d45e447f6ba16bb35a0ac21b6bacb996c1d32e2 100755 (executable)
@@ -17,9 +17,13 @@ AUTOHEADER=autoheader
 AUTOMAKE=automake$AM_VERSION
 AUTOCONF=autoconf
 
-# Check for python. There's no "--version" option!
-python -c "print 'Checking for python.'"
-if [ $? != 0 ] ; then
+# Check for python. Python did not support --version before version 2.5.
+# Until we require a version > 2.5, we should use -V.
+PYVER=`python -V 2>&1 | sed 's/Python *//'`
+case "$PYVER" in
+2*|3*)
+  ;;
+*)
   cat >&2 <<_EOF_
 
        You must have Python in order to compile $PROJECT.
@@ -27,16 +31,15 @@ if [ $? != 0 ] ; then
        or get the source tarball at http://www.python.org/
 _EOF_
   DIE="exit 1"
-fi
+esac
 
 
 ACVER=`$AUTOCONF --version | grep '^autoconf' | sed 's/.*) *//'`
 case "$ACVER" in
-'' | 0.* | 1.* | 2.[0-4]* | \
-2.5[0-1] | 2.5[0-1][a-z]* )
+'' | 0.* | 1.* | 2.[0-5]* )
   cat >&2 <<_EOF_
 
-       You must have autoconf 2.52 or later installed to compile $PROJECT.
+       You must have autoconf 2.60 or later installed to compile $PROJECT.
        Download the appropriate package for your distribution/OS,
        or get the source tarball at ftp://ftp.gnu.org/pub/gnu/autoconf/
 _EOF_