Fix some uninitialized variable warnings reported in bug 8904 (https://bugs.wireshark...
[metze/wireshark/wip.git] / autogen.sh
index bf1255188d226c3a252ccd1740e3bc9ed894938a..cbeb84af9abe73ef48c4bc181712d81ad152f1a3 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,7 +31,7 @@ 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/.*) *//'`
@@ -35,7 +39,7 @@ case "$ACVER" in
 '' | 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_
@@ -119,7 +123,12 @@ $AUTOMAKE --add-missing --gnu $am_opt || exit 1
 echo $AUTOCONF
 $AUTOCONF || exit 1
 
-#./configure "$@" || exit 1
+if [ `uname -s` = Darwin ] ; then
+    echo
+    echo "To configure Wireshark on OS X, you will need to type:"
+    echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/lib/pkgconfig"
+    echo "before you can run configure."
+fi
 
 echo
 echo "Now type \"./configure [options]\" and \"make\" to compile $PROJECT."