X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/ed7f1a6c5caaf4159125c08db5d18c5471fdd032..HEAD:/autogen.sh diff --git a/autogen.sh b/autogen.sh index d15817d059..48e6d19c69 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,9 +1,10 @@ #!/bin/sh ### autogen.sh - tool to help build Emacs from a bzr checkout -## Copyright (C) 2011 Free Software Foundation, Inc. +## Copyright (C) 2011-2014 Free Software Foundation, Inc. ## Author: Glenn Morris +## Maintainer: emacs-devel@gnu.org ## This file is part of GNU Emacs. @@ -25,7 +26,7 @@ ## The Emacs bzr repository does not include the configure script ## (and associated helpers). The first time you fetch Emacs from bzr, ## run this script to generate the necessary files. -## For more details, see the file INSTALL.BZR. +## For more details, see the file INSTALL.REPO. ### Code: @@ -34,10 +35,11 @@ progs="autoconf automake" ## Minimum versions we need: -autoconf_min=`sed -n 's/^ *AC_PREREQ(\([0-9\.]*\)).*/\1/p' configure.in` +autoconf_min=`sed -n 's/^ *AC_PREREQ(\([0-9\.]*\)).*/\1/p' configure.ac` -## FIXME how to determine this from the sources? -automake_min=1.11 +## This will need improving if more options are ever added to the +## AM_INIT_AUTOMAKE call. +automake_min=`sed -n 's/^ *AM_INIT_AUTOMAKE(\([0-9\.]*\)).*/\1/p' configure.ac` ## $1 = program, eg "autoconf". @@ -48,7 +50,7 @@ automake_min=1.11 get_version () { ## Remove eg "./autogen.sh: line 50: autoconf: command not found". - $1 --version 2>&1 | sed -e '/not found/d' -n -e '1 s/.* \([1-9][0-9\.]*\).*/\1/p' + $1 --version 2>&1 | sed -e '/not found/d' -e 's/.* //' -n -e '1 s/\([0-9][0-9\.]*\).*/\1/p' } ## $1 = version string, eg "2.59" @@ -67,14 +69,14 @@ minor_version () ## $1 = program ## $2 = minimum version. -## Return 0 if program is present with version >= minumum version. +## Return 0 if program is present with version >= minimum version. ## Return 1 if program is missing. ## Return 2 if program is present but too old. ## Return 3 for unexpected error (eg failed to parse version). check_version () { ## Respect eg $AUTOMAKE if it is set, like autoreconf does. - uprog=`echo $1 | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + uprog=`echo $1 | sed -e 's/-/_/g' -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` eval uprog=\$${uprog} @@ -104,7 +106,7 @@ check_version () cat < src/stamp-h.in || exit -echo "You can now run \`./configure'." +echo "You can now run './configure'." exit 0