* bootstrap (usage): New function. Call it when invoked with option `-h, --help'. Do not install the GNU Build System (with autoreconf) if invoked with option `--no-autoreconf'. Remove the workaround for autoheader no honoring `--force'. * configure.gnu: New. * Makefile.am (EXTRA_DIST): Add configure.gnu. --- extatica/ChangeLog | 12 ++++++++++++ extatica/Makefile.am | 3 +++ extatica/bootstrap | 37 +++++++++++++++++++++++++++++++------ extatica/configure.gnu | 39 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 6 deletions(-) create mode 100644 extatica/configure.gnu
diff --git a/extatica/ChangeLog b/extatica/ChangeLog index 3166f76..41b95fa 100644 --- a/extatica/ChangeLog +++ b/extatica/ChangeLog @@ -1,5 +1,17 @@ 2010-11-10 Roland Levillain roland@lrde.epita.fr
+ Prepare Extatica to be bundled with Olena. + + * bootstrap (usage): New function. Call it when invoked with + option `-h, --help'. + Do not install the GNU Build System (with autoreconf) if invoked + with option `--no-autoreconf'. + Remove the workaround for autoheader no honoring `--force'. + * configure.gnu: New. + * Makefile.am (EXTRA_DIST): Add configure.gnu. + +2010-11-10 Roland Levillain roland@lrde.epita.fr + Properly configure xtc-config.
* configure.ac: Execute `chmod +x bin/xtc-config' only once. diff --git a/extatica/Makefile.am b/extatica/Makefile.am index 44f7b5f..5d8880d 100644 --- a/extatica/Makefile.am +++ b/extatica/Makefile.am @@ -24,3 +24,6 @@ endif SWIG_PYTHON_BINDINGS ACLOCAL_AMFLAGS = -I config -I libltdl
EXTRA_DIST = bootstrap + +# `configure' wrapper used in recursive configuration. +EXTRA_DIST += configure.gnu diff --git a/extatica/bootstrap b/extatica/bootstrap index 5f624d0..c4ae947 100755 --- a/extatica/bootstrap +++ b/extatica/bootstrap @@ -1,6 +1,7 @@ #! /bin/sh
-# Copyright (C) 2005, 2009 EPITA Research and Development Laboratory (LRDE). +# Copyright (C) 2005, 2009, 2010 EPITA Research and Development +# Laboratory (LRDE). # # This file is part of Olena. # @@ -21,6 +22,31 @@ set -e # Tell what's going on. set -x
+# Run autoreconf? +run_autoreconf_p=true + +usage () +{ + cat <<EOF +Usage: $0 [OPTION] + +Options: + -h, --help display this message + --no-autoreconf do not run autoreconf + +Report bugs to olena-bugs@lrde.epita.fr +EOF +} + +# Process arguments. +for arg in "$@"; do + case "$arg" in + -h|--help) usage; exit 0 ;; + --no-autoreconf) run_autoreconf_p=false ;; + *) fatal "error: unrecognized option: $1" ;; + esac +done + mkdir -p _config touch _config/local-config.rb.in
@@ -36,8 +62,7 @@ export LIBTOOLIZE=$libtoolize # Make the libtool with ltdl "$libtoolize" --force --copy --automake --ltdl
-# Finally, install the GNU Build System. -autoreconf -f -v -i - -# FIXME: autoheader does not obey --force. -find . -name 'config.h*.in' -o -name 'local-config.*.in' | xargs touch +if $run_autoreconf_p; then + # Finally, install the GNU Build System. + autoreconf -f -v -i +fi diff --git a/extatica/configure.gnu b/extatica/configure.gnu new file mode 100644 index 0000000..09a9463 --- /dev/null +++ b/extatica/configure.gnu @@ -0,0 +1,39 @@ +#! /bin/sh + +# This `configure.gnu' script is invoked by the parent `configure' +# instead of `configure' in recursive configurations (see +# ``Configuring Other Packages in Subdirectories'' in Autoconf's +# manual). This is convenient to pass extra options, like the path to +# Milena's source directory. +# +# This idea was taken and adapted from this message: +# http://lists.gnu.org/archive/html/autoconf/2002-12/msg00116.html + +# Is option checking disabled? +no_option_checking_p=false +# Is ``--with-milena' not provided? +no_milena_p=true + +for i; do + case "$i" in + # First try to get SRCDIR from a possible `--srcdir' argument. + --srcdir=*) srcdir=`echo "$i" | sed 's/^--srcdir=//'`;; + --disable-option-checking) no_option_checking_p=true;; + --with-milena*) no_milena_p=false;; + esac +done + +# Then try to guess it from this script's path. +test x"${srcdir+set}" != xset && srcdir=`dirname $0` + +# Disabled option checking is a hint that this `configure.gnu' was +# called from a parent `configure'. If so, and if no `--with-milena' +# option was provided, pass our own `--with-milena' option to the +# recursive call to the actual `configure', carrying the path to +# Milena's source directory. +if $no_option_checking_p && $no_milena_p; then + milena_dir=`cd "$srcdir/../milena" && pwd` + exec "$srcdir/configure" ${1+"$@"} "--with-milena=$milena_dir" +else + exec "$srcdir/configure" ${1+"$@"} +fi