Merge from emacs-23; up to 2010-05-28T19:18:47Z!juri@jurta.org.
[bpt/emacs.git] / admin / quick-install-emacs
index 24972e6..841a895 100755 (executable)
@@ -1,8 +1,7 @@
 #!/bin/sh
 ### quick-install-emacs --- do a halfway-decent job of installing emacs quickly
 
-## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-##   2010  Free Software Foundation, Inc.
+## Copyright (C) 2001-2011  Free Software Foundation, Inc.
 
 ## Author: Miles Bader <miles@gnu.org>
 
@@ -171,8 +170,10 @@ test x"$SRC" = x && { SRC="`get_config_var srcdir`" || exit 4 ; }
 test x"$prefix" = x && { prefix="`get_config_var prefix`" || exit 4 ; }
 test x"$ARCH" = x && { ARCH="`get_config_var host`" || exit 4 ; }
 
-VERSION=`grep 'char emacs_version' $SRC/src/emacs.c \
-         | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
+VERSION=`
+  sed -n 's/^AC_INIT(emacs,[    ]*\([^  )]*\).*/\1/p' <$SRC/configure.in
+` || exit 4
+test -n "$VERSION" || { echo >&2 "$me: no version in configure.in"; exit 4; }
 
 DST_SHARE="$prefix/share/emacs/$VERSION"
 DST_BIN="$prefix/bin"