#!/bin/sh
+# Configure script bootstrap for SXEmacs
+#
+# Copyright (C) 2005 - 2012 Steve Youngs.
+# Copyright (C) 2006, 2007, 2008 Sebastian Freundt.
+# Copyright (C) 2007, 2010, 2011 Nelson Ferreira
+
+# This file is part of SXEmacs.
+
+# SXEmacs is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# SXEmacs is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Parts of SXEmacs are also distributed under a BSD-like licence.
+# 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
-M4_VERSION=$($M4 --version | head -1 | sed -e 's/^\(m4 \)\?(\?GNU M4)\? *//g' )
+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 }')
if [ "$GOOD_M4" != "1" ]; then
# 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
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)"
+ 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:"
+ TREE_VERSION="$EXPECTED_TREE_VERSION"
+ if test -n "$IN_GIT"; then
+ echo "If you cloned this branch into your own you could issue:"
echo "\tgit tag -s v${TREE_VERSION}.<your branch_name>"
- 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
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
git describe --long
git config -l
set +x
- echo "*******************************************"
+ echo "*******************************************"
fi
autoconf_ver=$(autoconf --version 2>/dev/null | head -n1)
LIBTOOLIZE=libtoolize
fi
+if test ! -d libtldl; then
+ # Force run of libtoolize before autoreconf because newer autoconf
+ # don't deal well with our inclusion of libtldl/m4 in sxe-libtool.m4
+ # if libltdl dir does not exist yet.
+ $LIBTOOLIZE --copy --ltdl > /dev/null 2>&1
+fi
autoreconf $FORCE --verbose --install -Wall
# hack-o-matic. Using gmp's config.{guess,sub} lets us have properer