X-Git-Url: http://cgit.sxemacs.org/?p=sxemacs;a=blobdiff_plain;f=autogen.sh;h=1b64347f2bfb9e9649d29ef3a24777c0e3e218fe;hp=a3690c1598694f73e02f94c841d799c29d8e557c;hb=d6cb8fad24fdb64c5c6b7f1b0cfa09853b93c973;hpb=f922deb15970dbe7a23b7d0a4d313a56a6a7005d diff --git a/autogen.sh b/autogen.sh index a3690c1..1b64347 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,7 +1,7 @@ #!/bin/sh # Configure script bootstrap for SXEmacs # -# Copyright (C) 2005, 2006, 2007 Steve Youngs. +# Copyright (C) 2005 - 2012 Steve Youngs. # Copyright (C) 2006, 2007, 2008 Sebastian Freundt. # Copyright (C) 2007, 2010, 2011 Nelson Ferreira @@ -24,7 +24,10 @@ # Check file headers for more information. # BSD's m4 probably isn't gonna cut it, use gm4 if it is available -type gm4 >/dev/null 2>&1 && M4=gm4 || M4=m4 +if test -z "$M4" +then + type gm4 >/dev/null 2>&1 && M4=gm4 || M4=m4 +fi M4_VERSION=$($M4 --version | head -n1 | sed -e 's/^\(m4 \)\?(\?GNU M4)\? *//g' ) GOOD_M4=$( echo $M4_VERSION | awk -F. '{if( ($1>1) || ( ($1==1) && ($2>4) ) || ( ($1==1) && ($2==4) && ($3>=6) )) print 1 }') @@ -36,29 +39,41 @@ fi # To cater for Solaris if test -d "/usr/xpg4/bin"; then - PATH=/usr/xpg4/bin:$PATH + # don't add xpg4 dir to PATH if on OpenIndiana + grep -q OpenIndiana /etc/release 2>/dev/null||PATH=/usr/xpg4/bin:$PATH export PATH fi -type git >/dev/null 2>&1 && GIT=git +if test -z "$GIT" +then + type git >/dev/null 2>&1 && GIT=git +fi + olddir=$(pwd) srcdir=$(dirname $0) cd "$srcdir" -EXPECTED_TREE_VERSION="22.1.14" +EXPECTED_TREE_VERSION="22.1.15" emacs_is_beta=t if test -n "$GIT" -a -n "$($GIT symbolic-ref HEAD 2>/dev/null)"; then TREE_VERSION="$($GIT tag|tail -n1|tr -d v)" GIT_VERSION="$($GIT describe | head -n1)" + GIT_BRANCH="$(git branch --no-color | awk '/^\*/ { print $2 }')" IN_GIT="1" fi if test -z "$TREE_VERSION"; then TREE_VERSION="$EXPECTED_TREE_VERSION" if test -n "$IN_GIT"; then - echo "If you cloned this branch into your own you should issue:" + echo "If you cloned this branch into your own you could issue:" echo "\tgit tag -s v${TREE_VERSION}." - echo "\tgit push --tag" + echo "" + echo "Be careful about pushing the tags as they probably will be " + echo "more of a nuisance..." + echo "" + TREE_VERSION="$EXPECTED_TREE_VERSION.$GIT_BRANCH" + echo "For now I am assuming the tre version will be $TREE_VERSION" + echo "" fi fi if test -z "$GIT_VERSION"; then @@ -69,7 +84,7 @@ emacs_major_version="$(echo $TREE_VERSION|cut -d. -f1)" emacs_minor_version="$(echo $TREE_VERSION|cut -d. -f2)" emacs_beta_version="$(echo $TREE_VERSION|cut -d. -f3)" emacs_full_version="$emacs_major_version.$emacs_minor_version.$emacs_beta_version" -sxemacs_codename="Geo" +sxemacs_codename="Goggomobil" sxemacs_git_version="$GIT_VERSION" if test "$emacs_full_version" != "$EXPECTED_TREE_VERSION"; then @@ -89,12 +104,59 @@ if test "$emacs_full_version" != "$EXPECTED_TREE_VERSION"; then echo "*******************************************" fi -autoconf_ver=$(autoconf --version 2>/dev/null | head -n1) -autoheader_ver=$(autoheader --version 2>/dev/null | head -n1) -automake_ver=$(automake --version 2>/dev/null | head -n1) -aclocal_ver=$(aclocal --version 2>/dev/null | head -n1) -libtool_ver=$(libtool --version 2>/dev/null | head -n1) +test -z "$AUTOCONF" && type autoconf >/dev/null 2>&1 && AUTOCONF=autoconf +export AUTOCONF +test -z "$AUTORECONF" && type autoreconf >/dev/null 2>&1 && AUTORECONF=autoreconf +export AUTORECONF +test -z "$AUTOHEADER" && type autoheader >/dev/null 2>&1 && AUTOHEADER=autoheader +export AUTOHEADER +test -z "$AUTOMAKE" && type automake >/dev/null 2>&1 && AUTOMAKE=automake +export AUTOMAKE +test -z "$ACLOCAL" && type aclocal >/dev/null 2>&1 && ACLOCAL=aclocal +export ACLOCAL +test -z "$LIBTOOL" && type libtool >/dev/null 2>&1 && LIBTOOL=libtool +export LIBTOOL +if test -z "$LIBTOOLIZE"; then + if type glibtoolize >/dev/null 2>&1; then + LIBTOOLIZE=glibtoolize + elif type libtoolize >/dev/null 2>&1; then + LIBTOOLIZE=libtoolize + fi +fi +export LIBTOOLIZE +autoconf_ver=$($AUTOCONF --version 2>/dev/null | head -n1) +if test -z "$autoconf_ver"; then + echo Could not determine autoconf + exit 1 +fi +autoreconf_ver=$($AUTORECONF --version 2>/dev/null | head -n1) +if test -z "$autoreconf_ver"; then + echo Could not determine autoreconf + exit 1 +fi +autoheader_ver=$($AUTOHEADER --version 2>/dev/null | head -n1) +if test -z "$autoheader_ver"; then + echo Could not determine autoheader + exit 1 +fi +automake_ver=$($AUTOMAKE --version 2>/dev/null | head -n1) +if test -z "$automake_ver"; then + echo Could not determine automake + exit 1 +fi +aclocal_ver=$($ACLOCAL --version 2>/dev/null | head -n1) +if test -z "$aclocal_ver"; then + echo Could not determine aclocal + exit 1 +fi +libtool_ver=$($LIBTOOL --version 2>/dev/null | head -n1) +if test -z "$libtool_ver" -a -n "$LIBTOOLIZE"; then + libtool_ver=$($LIBTOOLIZE --version 2>/dev/null | head -n1) +fi +if test -z "$libtool_ver"; then + echo WARNING: Could not determine libtool +fi # When things go wrong... get a bigger hammer! if test -n "$PHAMMER"; then @@ -128,32 +190,22 @@ m4_define([4UTOMAKE_VERSION], [$automake_ver]) m4_define([4IBTOOL_VERSION], [$libtool_ver]) EOF -if test -z "$FORCE"; then - FORCE= -else - rm -rf autom4te.cache aclocal.m4 - FORCE=--force -fi - -if type glibtoolize 2>/dev/null; then - LIBTOOLIZE=glibtoolize -else - LIBTOOLIZE=libtoolize -fi -autoreconf $FORCE --verbose --install -Wall +# using libtoolize as we did before doesn't work anymore, so just mkdir --Horst +test -d libtld/m4 || mkdir -p libltdl/m4 +$AUTORECONF --force --verbose --install -Wall # hack-o-matic. Using gmp's config.{guess,sub} lets us have properer # detected machine configurations --SY. guess=$(grep GMP config.guess) sub=$(grep GMP config.sub) if test -z "${guess}"; then - mv -vf config.guess configfsf.guess - cp -v configgmp.guess config.guess + mv -f config.guess configfsf.guess + cp configgmp.guess config.guess fi if test -z "${sub}"; then - mv -vf config.sub configfsf.sub - cp -v configgmp.sub config.sub + mv -f config.sub configfsf.sub + cp configgmp.sub config.sub fi cd $olddir