Author: cazfi
Date: Tue Nov 17 19:48:05 2015
New Revision: 30655

URL: http://svn.gna.org/viewcvs/freeciv?rev=30655&view=rev
Log:
autogen.sh checks that python is available.

See bug #24085

Modified:
    branches/S2_6/autogen.sh

Modified: branches/S2_6/autogen.sh
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/autogen.sh?rev=30655&r1=30654&r2=30655&view=diff
==============================================================================
--- branches/S2_6/autogen.sh    (original)
+++ branches/S2_6/autogen.sh    Tue Nov 17 19:48:05 2015
@@ -49,7 +49,7 @@
   RMAJOR=$3
   RMINOR=$4
   RMICRO=$5
-  
+
   new_pkg=$RPACKAGE
 
   # check if given package is suitable
@@ -155,8 +155,15 @@
   if [ ! -z "$MICRO" ]; then VERSION=$VERSION.$MICRO; else MICRO=0; fi
 
   debug "version $VERSION"
-  if [ "$COMPLAIN" -ne "2" ]; then
-    echo "+ checking for $PACKAGEMSG >= $VERSION ... " | tr -d '\n'
+  if [ "x$VERSION" != "x" ] ; then
+      if [ "$COMPLAIN" -ne "2" ]; then
+          echo "+ checking for $PACKAGEMSG >= $VERSION ... " | tr -d '\n'
+      fi
+  else
+      MAJOR=0
+      if [ "$COMPLAIN" -ne "2" ]; then
+          echo "+ checking for $PACKAGEMSG ... " | tr -d '\n'
+      fi
   fi
   
   ($PACKAGE --version) < /dev/null > /dev/null 2>&1 || 
@@ -169,9 +176,9 @@
     fi
     return 1
   }
-    
+
   # the following line is carefully crafted sed magic
-  pkg_version=`$PACKAGE --version|head -n 1|sed 's/([^)]*)//g;s/^[a-zA-Z\.\ 
\-]*//;s/ .*$//'`
+  pkg_version=`$PACKAGE --version 2>&1|head -n 1|sed 
's/([^)]*)//g;s/^[a-zA-Z\.\ \-]*//;s/ .*$//'`
   debug "pkg_version $pkg_version"
   pkg_major=`echo $pkg_version | cut -d. -f1`
   pkg_minor=`echo $pkg_version | sed s/[-,a-z,A-Z].*// | cut -d. -f2`
@@ -239,6 +246,7 @@
 ACLOCAL=$REALPKGNAME
 real_package_name "libtoolize" "ftp://ftp.gnu.org/pub/gnu/libtool/"; 1 5 2 || 
DIE=1
 LIBTOOLIZE=$REALPKGNAME
+real_package_name "python" "https://www.python.org/"; || DIE=1
 
 if [ "$FC_USE_NLS" = "yes" ]; then
   DIE2=0


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to