Commit 621af11c authored by Karl Wette's avatar Karl Wette Committed by Adam Mercer

./00boot: simplify and standardise

- use AUTORECONF, etc. environment variables to change autotool versions
- remove autom4te.cache/ and aclocal.m4 prior to autoreconfiguring
Original: 2a67a0b7383c905cfe22929a710584c50cc67a56
parent f58bf1f9
#!/bin/sh
## Function to report failure
## function to print error message and exit
fail () {
echo "!!! 00boot: $1 failed" >&2
echo "!!! 00boot: consult the file 'README' for help" >&2
echo "!!! $0: $1" >&2
exit 1
}
echo "00boot: running autoreconf"
LIBTOOLIZE=true autoreconf || fail "autoreconf"
## check script is being run from top-level source directory
test "$0" = "./00boot" || fail "must be run from top-level source directory"
echo "00boot: success"
echo "
=================================================================
## remove M4 cache files
rm -rf autom4te.cache/
rm -f aclocal.m4
00boot has been run.
# FIXME: autoreconf from Ubuntu 9.10 (and probably also from recent
# Debian versions) automatically run libtoolize with the --copy option
# therefore over writing the supplied libtool scripts with system
# version. This can lead to unexpected build failures therefore to work
# round this "feature" we set the LIBTOOLIZE enviroment variable to
# point to the the true executable which bypasses the running of
# libtoolize, this will not effect the vast majority of users and those
# it will effect will know how to run libtoolize, if required.
Now run './configure' with appropriate options
to configure LALSuite.
## run autoreconf
AUTORECONF=${AUTORECONF:-"autoreconf"}
echo "00boot: running ${AUTORECONF}"
LIBTOOLIZE=true ${AUTORECONF} || fail "${AUTORECONF} failed"
================================================================="
echo "
==================================================
00boot has been run successfully.
Now run './configure' with appropriate options
to configure LALSuite.
==================================================
"
#!/bin/sh
# function to report failure
## function to print error message and exit
fail () {
echo "!!! 00boot: $1 failed" >&2
echo "!!! 00boot: consult the file 'README.install' for help" >&2
echo "!!! $0: $1" >&2
exit 1
}
# help message
helpmsg="Usage $0 [options]
Options: [defaults in brackets after description]"
helpmsg="$helpmsg
--help print this message"
helpmsg="$helpmsg
--with-autoreconf=AUTORECONF use autoreconf program AUTORECONF [autoreconf]"
helpmsg="$helpmsg
--with-aclocal=ACLOCAL use aclocal program ACLOCAL [aclocal]"
helpmsg="$helpmsg
--with-autoheader=AUTOHEADER use autoheader program AUTOHEADER [autoheader]"
helpmsg="$helpmsg
--with-automake=AUTOMAKE use automake program AUTOMAKE [automake]"
helpmsg="$helpmsg
--with-autoconf=AUTOCONF use autoconf program AUTOCONF [autoconf]"
## check script is being run from top-level source directory
test "$0" = "./00boot" || fail "must be run from top-level source directory"
# default options
only_build_sources="false"
# process args
verbose="false"
while test $# -gt 0 ; do
option=$1
case "$option" in
-*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $option in
-h | -help | --help ) echo "$helpmsg"; exit 0;;
-with-autoreconf=* | --with-autoreconf=* ) AUTORECONF="$optarg";;
-with-aclocal=* | --with-aclocal=* ) ACLOCAL="$optarg";;
-with-autoheader=* | --with-autoheader=* ) AUTOHEADER="$optarg";;
-with-automake=* | --with-automake=* ) AUTOMAKE="$optarg";;
-with-autoconf=* | --with-autoconf=* ) AUTOCONF="$optarg";;
*) echo "unrecognized option $option"; exit 1;;
esac
shift
done
# check autotools versions
echo "00boot: checking versions of autotools"
AUTORECONF=${AUTORECONF:-"autoreconf"}
ACLOCAL=${ACLOCAL:-"aclocal"}
AUTOHEADER=${AUTOHEADER:-"autoheader"}
AUTOMAKE=${AUTOMAKE:-"automake"}
AUTOCONF=${AUTOCONF:-"autoconf"}
autoreconf_version="`$AUTORECONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
aclocal_version="`$ACLOCAL --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoheader_version="`$AUTOHEADER --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
automake_version="`$AUTOMAKE --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoconf_version="`$AUTOCONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
if test -z "$autoreconf_version"; then
fail "finding program autoreconf"
fi
if test -z "$aclocal_version"; then
fail "finding program aclocal"
fi
if test -z "$autoheader_version"; then
fail "finding program autoheader"
fi
if test -z "$automake_version"; then
fail "finding program automake"
fi
if test -z "$autoconf_version"; then
fail "finding program autoconf"
fi
# report autotools versions
echo "00boot: using:"
printf "00boot:\t%-16s %s\n" "autoreconf-$autoreconf_version:" "`which $AUTORECONF`"
printf "00boot:\t%-16s %s\n" "aclocal-$aclocal_version:" "`which $ACLOCAL`"
printf "00boot:\t%-16s %s\n" "autoheader-$autoheader_version:" "`which $AUTOHEADER`"
printf "00boot:\t%-16s %s\n" "automake-$automake_version:" "`which $AUTOMAKE`"
printf "00boot:\t%-16s %s\n" "autoconf-$autoconf_version:" "`which $AUTOCONF`"
## remove M4 cache files
rm -rf autom4te.cache/
rm -f aclocal.m4
# FIXME: autoreconf from Ubuntu 9.10 (and probably also from recent
# Debian versions) automatically run libtoolize with the --copy option
......@@ -91,23 +22,15 @@ printf "00boot:\t%-16s %s\n" "autoconf-$autoconf_version:" "`which $AUTOCONF`"
# libtoolize, this will not effect the vast majority of users and those
# it will effect will know how to run libtoolize, if required.
# generate build system
echo "00boot: running autoreconf"
LIBTOOLIZE=true $AUTORECONF || fail "autoreconf"
## run autoreconf
AUTORECONF=${AUTORECONF:-"autoreconf"}
echo "00boot: running ${AUTORECONF}"
LIBTOOLIZE=true ${AUTORECONF} || fail "${AUTORECONF} failed"
# report success
echo "00boot: success"
echo "
=================================================================
00boot has been run.
Now run './configure' with appropriate options
to configure LAL.
If you are building LAL for use with LALApps, see
the LALApps README file for futher instructions
Otherwise consult the file README.install
================================================================="
==================================================
00boot has been run successfully.
Now run './configure' with appropriate options
to configure LAL.
==================================================
"
#!/bin/sh
# function to report failure
## function to print error message and exit
fail () {
echo "!!! 00boot: $1 failed" >&2
echo "!!! 00boot: consult the file 'README' for help" >&2
echo "!!! $0: $1" >&2
exit 1
}
# help message
helpmsg="Usage $0 [options]
Options: [defaults in brackets after description]"
helpmsg="$helpmsg
--help print this message"
helpmsg="$helpmsg
--with-autoreconf=AUTORECONF use autoreconf program AUTORECONF [autoreconf]"
helpmsg="$helpmsg
--with-aclocal=ACLOCAL use aclocal program ACLOCAL [aclocal]"
helpmsg="$helpmsg
--with-autoheader=AUTOHEADER use autoheader program AUTOHEADER [autoheader]"
helpmsg="$helpmsg
--with-automake=AUTOMAKE use automake program AUTOMAKE [automake]"
helpmsg="$helpmsg
--with-autoconf=AUTOCONF use autoconf program AUTOCONF [autoconf]"
## check script is being run from top-level source directory
test "$0" = "./00boot" || fail "must be run from top-level source directory"
# process args
while test $# -gt 0 ; do
option=$1
case "$option" in
-*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $option in
-h | -help | --help ) echo "$helpmsg"; exit 0;;
-with-autoreconf=* | --with-autoreconf=* ) AUTORECONF="$optarg";;
-with-aclocal=* | --with-aclocal=* ) ACLOCAL="$optarg";;
-with-autoheader=* | --with-autoheader=* ) AUTOHEADER="$optarg";;
-with-automake=* | --with-automake=* ) AUTOMAKE="$optarg";;
-with-autoconf=* | --with-autoconf=* ) AUTOCONF="$optarg";;
*) echo "unrecognized option $option"; exit 1;;
esac
shift
done
# check autotools versions
echo "00boot: checking versions of autotools"
AUTORECONF=${AUTORECONF:-"autoreconf"}
ACLOCAL=${ACLOCAL:-"aclocal"}
AUTOHEADER=${AUTOHEADER:-"autoheader"}
AUTOMAKE=${AUTOMAKE:-"automake"}
AUTOCONF=${AUTOCONF:-"autoconf"}
autoreconf_version="`$AUTORECONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
aclocal_version="`$ACLOCAL --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoheader_version="`$AUTOHEADER --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
automake_version="`$AUTOMAKE --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoconf_version="`$AUTOCONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
if test -z "$autoreconf_version"; then
fail "finding program autoreconf"
fi
if test -z "$aclocal_version"; then
fail "finding program aclocal"
fi
if test -z "$autoheader_version"; then
fail "finding program autoheader"
fi
if test -z "$automake_version"; then
fail "finding program automake"
fi
if test -z "$autoconf_version"; then
fail "finding program autoconf"
fi
# report autotools versions
echo "00boot: using:"
printf "00boot:\t%-16s %s\n" "autoreconf-$autoreconf_version:" "`which $AUTORECONF`"
printf "00boot:\t%-16s %s\n" "aclocal-$aclocal_version:" "`which $ACLOCAL`"
printf "00boot:\t%-16s %s\n" "autoheader-$autoheader_version:" "`which $AUTOHEADER`"
printf "00boot:\t%-16s %s\n" "automake-$automake_version:" "`which $AUTOMAKE`"
printf "00boot:\t%-16s %s\n" "autoconf-$autoconf_version:" "`which $AUTOCONF`"
## remove M4 cache files
rm -rf autom4te.cache/
rm -f aclocal.m4
# FIXME: autoreconf from Ubuntu 9.10 (and probably also from recent
# Debian versions) automatically run libtoolize with the --copy option
......@@ -87,20 +22,15 @@ printf "00boot:\t%-16s %s\n" "autoconf-$autoconf_version:" "`which $AUTOCONF`"
# libtoolize, this will not effect the vast majority of users and those
# it will effect will know how to run libtoolize, if required.
# generate build system
echo "00boot: running autoreconf"
LIBTOOLIZE=true $AUTORECONF || fail "autoreconf"
## run autoreconf
AUTORECONF=${AUTORECONF:-"autoreconf"}
echo "00boot: running ${AUTORECONF}"
LIBTOOLIZE=true ${AUTORECONF} || fail "${AUTORECONF} failed"
# report success
echo "00boot: success"
echo "
=================================================================
00boot has been run.
Now run './configure' with appropriate options
to configure LALApps.
See the LALApps README file for futher instructions
================================================================="
==================================================
00boot has been run successfully.
Now run './configure' with appropriate options
to configure LALApps.
==================================================
"
#!/bin/sh
# function to report failure
## function to print error message and exit
fail () {
echo "!!! 00boot: $1 failed" >&2
echo "!!! $0: $1" >&2
exit 1
}
# help message
helpmsg="Usage $0 [options]
Options: [defaults in brackets after description]"
helpmsg="$helpmsg
--help print this message"
helpmsg="$helpmsg
--with-autoreconf=AUTORECONF use autoreconf program AUTORECONF [autoreconf]"
helpmsg="$helpmsg
--with-aclocal=ACLOCAL use aclocal program ACLOCAL [aclocal]"
helpmsg="$helpmsg
--with-autoheader=AUTOHEADER use autoheader program AUTOHEADER [autoheader]"
helpmsg="$helpmsg
--with-automake=AUTOMAKE use automake program AUTOMAKE [automake]"
helpmsg="$helpmsg
--with-autoconf=AUTOCONF use autoconf program AUTOCONF [autoconf]"
## check script is being run from top-level source directory
test "$0" = "./00boot" || fail "must be run from top-level source directory"
# process args
while test $# -gt 0 ; do
option=$1
case "$option" in
-*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $option in
-h | -help | --help ) echo "$helpmsg"; exit 0;;
-with-autoreconf=* | --with-autoreconf=* ) AUTORECONF="$optarg";;
-with-aclocal=* | --with-aclocal=* ) ACLOCAL="$optarg";;
-with-autoheader=* | --with-autoheader=* ) AUTOHEADER="$optarg";;
-with-automake=* | --with-automake=* ) AUTOMAKE="$optarg";;
-with-autoconf=* | --with-autoconf=* ) AUTOCONF="$optarg";;
*) echo "unrecognized option $option"; exit 1;;
esac
shift
done
# check autotools versions
echo "00boot: checking versions of autotools"
AUTORECONF=${AUTORECONF:-"autoreconf"}
ACLOCAL=${ACLOCAL:-"aclocal"}
AUTOHEADER=${AUTOHEADER:-"autoheader"}
AUTOMAKE=${AUTOMAKE:-"automake"}
AUTOCONF=${AUTOCONF:-"autoconf"}
autoreconf_version="`$AUTORECONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
aclocal_version="`$ACLOCAL --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoheader_version="`$AUTOHEADER --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
automake_version="`$AUTOMAKE --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoconf_version="`$AUTOCONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
if test -z "$autoreconf_version"; then
fail "finding program autoreconf"
fi
if test -z "$aclocal_version"; then
fail "finding program aclocal"
fi
if test -z "$autoheader_version"; then
fail "finding program autoheader"
fi
if test -z "$automake_version"; then
fail "finding program automake"
fi
if test -z "$autoconf_version"; then
fail "finding program autoconf"
fi
# report autotools versions
echo "00boot: using:"
printf "00boot:\t%-16s %s\n" "autoreconf-$autoreconf_version:" "`which $AUTORECONF`"
printf "00boot:\t%-16s %s\n" "aclocal-$aclocal_version:" "`which $ACLOCAL`"
printf "00boot:\t%-16s %s\n" "autoheader-$autoheader_version:" "`which $AUTOHEADER`"
printf "00boot:\t%-16s %s\n" "automake-$automake_version:" "`which $AUTOMAKE`"
printf "00boot:\t%-16s %s\n" "autoconf-$autoconf_version:" "`which $AUTOCONF`"
## remove M4 cache files
rm -rf autom4te.cache/
rm -f aclocal.m4
# FIXME: autoreconf from Ubuntu 9.10 (and probably also from recent
# Debian versions) automatically run libtoolize with the --copy option
......@@ -83,21 +19,18 @@ printf "00boot:\t%-16s %s\n" "autoconf-$autoconf_version:" "`which $AUTOCONF`"
# version. This can lead to unexpected build failures therefore to work
# round this "feature" we set the LIBTOOLIZE enviroment variable to
# point to the the true executable which bypasses the running of
# libtoolize, which will not effect the vast majority of users and those
# libtoolize, this will not effect the vast majority of users and those
# it will effect will know how to run libtoolize, if required.
# generate build system
echo "00boot: running autoreconf"
LIBTOOLIZE=true $AUTORECONF || fail "autoreconf"
## run autoreconf
AUTORECONF=${AUTORECONF:-"autoreconf"}
echo "00boot: running ${AUTORECONF}"
LIBTOOLIZE=true ${AUTORECONF} || fail "${AUTORECONF} failed"
# report success
echo "00boot: success"
echo "
=================================================================
00boot has been run.
Now run './configure' with appropriate options
to configure LAL Burst.
================================================================="
==================================================
00boot has been run successfully.
Now run './configure' with appropriate options
to configure LALBurst.
==================================================
"
#!/bin/sh
# function to report failure
## function to print error message and exit
fail () {
echo "!!! 00boot: $1 failed" >&2
echo "!!! $0: $1" >&2
exit 1
}
# help message
helpmsg="Usage $0 [options]
Options: [defaults in brackets after description]"
helpmsg="$helpmsg
--help print this message"
helpmsg="$helpmsg
--with-autoreconf=AUTORECONF use autoreconf program AUTORECONF [autoreconf]"
helpmsg="$helpmsg
--with-aclocal=ACLOCAL use aclocal program ACLOCAL [aclocal]"
helpmsg="$helpmsg
--with-autoheader=AUTOHEADER use autoheader program AUTOHEADER [autoheader]"
helpmsg="$helpmsg
--with-automake=AUTOMAKE use automake program AUTOMAKE [automake]"
helpmsg="$helpmsg
--with-autoconf=AUTOCONF use autoconf program AUTOCONF [autoconf]"
## check script is being run from top-level source directory
test "$0" = "./00boot" || fail "must be run from top-level source directory"
# process args
while test $# -gt 0 ; do
option=$1
case "$option" in
-*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $option in
-h | -help | --help ) echo "$helpmsg"; exit 0;;
-with-autoreconf=* | --with-autoreconf=* ) AUTORECONF="$optarg";;
-with-aclocal=* | --with-aclocal=* ) ACLOCAL="$optarg";;
-with-autoheader=* | --with-autoheader=* ) AUTOHEADER="$optarg";;
-with-automake=* | --with-automake=* ) AUTOMAKE="$optarg";;
-with-autoconf=* | --with-autoconf=* ) AUTOCONF="$optarg";;
*) echo "unrecognized option $option"; exit 1;;
esac
shift
done
# check autotools versions
echo "00boot: checking versions of autotools"
AUTORECONF=${AUTORECONF:-"autoreconf"}
ACLOCAL=${ACLOCAL:-"aclocal"}
AUTOHEADER=${AUTOHEADER:-"autoheader"}
AUTOMAKE=${AUTOMAKE:-"automake"}
AUTOCONF=${AUTOCONF:-"autoconf"}
autoreconf_version="`$AUTORECONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
aclocal_version="`$ACLOCAL --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoheader_version="`$AUTOHEADER --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
automake_version="`$AUTOMAKE --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoconf_version="`$AUTOCONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
if test -z "$autoreconf_version"; then
fail "finding program autoreconf"
fi
if test -z "$aclocal_version"; then
fail "finding program aclocal"
fi
if test -z "$autoheader_version"; then
fail "finding program autoheader"
fi
if test -z "$automake_version"; then
fail "finding program automake"
fi
if test -z "$autoconf_version"; then
fail "finding program autoconf"
fi
# report autotools versions
echo "00boot: using:"
printf "00boot:\t%-16s %s\n" "autoreconf-$autoreconf_version:" "`which $AUTORECONF`"
printf "00boot:\t%-16s %s\n" "aclocal-$aclocal_version:" "`which $ACLOCAL`"
printf "00boot:\t%-16s %s\n" "autoheader-$autoheader_version:" "`which $AUTOHEADER`"
printf "00boot:\t%-16s %s\n" "automake-$automake_version:" "`which $AUTOMAKE`"
printf "00boot:\t%-16s %s\n" "autoconf-$autoconf_version:" "`which $AUTOCONF`"
## remove M4 cache files
rm -rf autom4te.cache/
rm -f aclocal.m4
# FIXME: autoreconf from Ubuntu 9.10 (and probably also from recent
# Debian versions) automatically run libtoolize with the --copy option
......@@ -86,18 +22,15 @@ printf "00boot:\t%-16s %s\n" "autoconf-$autoconf_version:" "`which $AUTOCONF`"
# libtoolize, this will not effect the vast majority of users and those
# it will effect will know how to run libtoolize, if required.
# generate build system
echo "00boot: running autoreconf"
LIBTOOLIZE=true $AUTORECONF || fail "autoreconf"
## run autoreconf
AUTORECONF=${AUTORECONF:-"autoreconf"}
echo "00boot: running ${AUTORECONF}"
LIBTOOLIZE=true ${AUTORECONF} || fail "${AUTORECONF} failed"
# report success
echo "00boot: success"
echo "
=================================================================
00boot has been run.
Now run './configure' with appropriate options
to configure LAL DetChar.
================================================================="
==================================================
00boot has been run successfully.
Now run './configure' with appropriate options
to configure LALDetChar.
==================================================
"
#!/bin/sh
# function to report failure
## function to print error message and exit
fail () {
echo "!!! 00boot: $1 failed" >&2
echo "!!! $0: $1" >&2
exit 1
}
# help message
helpmsg="Usage $0 [options]
Options: [defaults in brackets after description]"
helpmsg="$helpmsg
--help print this message"
helpmsg="$helpmsg
--with-autoreconf=AUTORECONF use autoreconf program AUTORECONF [autoreconf]"
helpmsg="$helpmsg
--with-aclocal=ACLOCAL use aclocal program ACLOCAL [aclocal]"
helpmsg="$helpmsg
--with-autoheader=AUTOHEADER use autoheader program AUTOHEADER [autoheader]"
helpmsg="$helpmsg
--with-automake=AUTOMAKE use automake program AUTOMAKE [automake]"
helpmsg="$helpmsg
--with-autoconf=AUTOCONF use autoconf program AUTOCONF [autoconf]"
## check script is being run from top-level source directory
test "$0" = "./00boot" || fail "must be run from top-level source directory"
# default options
only_build_sources="false"
# process args
while test $# -gt 0 ; do
option=$1
case "$option" in
-*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $option in
-h | -help | --help ) echo "$helpmsg"; exit 0;;
-with-autoreconf=* | --with-autoreconf=* ) AUTORECONF="$optarg";;
-with-aclocal=* | --with-aclocal=* ) ACLOCAL="$optarg";;
-with-autoheader=* | --with-autoheader=* ) AUTOHEADER="$optarg";;
-with-automake=* | --with-automake=* ) AUTOMAKE="$optarg";;
-with-autoconf=* | --with-autoconf=* ) AUTOCONF="$optarg";;
*) echo "unrecognized option $option"; exit 1;;
esac
shift
done
# check autotools versions
echo "00boot: checking versions of autotools"
AUTORECONF=${AUTORECONF:-"autoreconf"}
ACLOCAL=${ACLOCAL:-"aclocal"}
AUTOHEADER=${AUTOHEADER:-"autoheader"}
AUTOMAKE=${AUTOMAKE:-"automake"}
AUTOCONF=${AUTOCONF:-"autoconf"}
autoreconf_version="`$AUTORECONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
aclocal_version="`$ACLOCAL --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoheader_version="`$AUTOHEADER --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
automake_version="`$AUTOMAKE --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoconf_version="`$AUTOCONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
if test -z "$autoreconf_version"; then
fail "finding program autoreconf"
fi
if test -z "$aclocal_version"; then
fail "finding program aclocal"
fi
if test -z "$autoheader_version"; then
fail "finding program autoheader"
fi
if test -z "$automake_version"; then
fail "finding program automake"
fi
if test -z "$autoconf_version"; then
fail "finding program autoconf"
fi
# report autotools versions
echo "00boot: using:"
printf "00boot:\t%-16s %s\n" "autoreconf-$autoreconf_version:" "`which $AUTORECONF`"
printf "00boot:\t%-16s %s\n" "aclocal-$aclocal_version:" "`which $ACLOCAL`"
printf "00boot:\t%-16s %s\n" "autoheader-$autoheader_version:" "`which $AUTOHEADER`"
printf "00boot:\t%-16s %s\n" "automake-$automake_version:" "`which $AUTOMAKE`"
printf "00boot:\t%-16s %s\n" "autoconf-$autoconf_version:" "`which $AUTOCONF`"
## remove M4 cache files
rm -rf autom4te.cache/
rm -f aclocal.m4
# FIXME: autoreconf from Ubuntu 9.10 (and probably also from recent
# Debian versions) automatically run libtoolize with the --copy option
......@@ -89,18 +22,15 @@ printf "00boot:\t%-16s %s\n" "autoconf-$autoconf_version:" "`which $AUTOCONF`"
# libtoolize, this will not effect the vast majority of users and those
# it will effect will know how to run libtoolize, if required.
# generate build system
echo "00boot: running autoreconf"
LIBTOOLIZE=true $AUTORECONF || fail "autoreconf"
## run autoreconf
AUTORECONF=${AUTORECONF:-"autoreconf"}
echo "00boot: running ${AUTORECONF}"
LIBTOOLIZE=true ${AUTORECONF} || fail "${AUTORECONF} failed"
# report success
echo "00boot: success"
echo "
=================================================================
00boot has been run.
Now run './configure' with appropriate options
to configure LAL Frame.
================================================================="
==================================================
00boot has been run successfully.
Now run './configure' with appropriate options
to configure LALFrame.
==================================================
"
#!/bin/sh
# function to report failure
## function to print error message and exit
fail () {
echo "!!! 00boot: $1 failed" >&2
echo "!!! $0: $1" >&2
exit 1
}
# help message
helpmsg="Usage $0 [options]
Options: [defaults in brackets after description]"
helpmsg="$helpmsg
--help print this message"
helpmsg="$helpmsg
--with-autoreconf=AUTORECONF use autoreconf program AUTORECONF [autoreconf]"
helpmsg="$helpmsg
--with-aclocal=ACLOCAL use aclocal program ACLOCAL [aclocal]"
helpmsg="$helpmsg
--with-autoheader=AUTOHEADER use autoheader program AUTOHEADER [autoheader]"
helpmsg="$helpmsg
--with-automake=AUTOMAKE use automake program AUTOMAKE [automake]"
helpmsg="$helpmsg
--with-autoconf=AUTOCONF use autoconf program AUTOCONF [autoconf]"
## check script is being run from top-level source directory
test "$0" = "./00boot" || fail "must be run from top-level source directory"
# process args
while test $# -gt 0 ; do
option=$1
case "$option" in
-*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $option in
-h | -help | --help ) echo "$helpmsg"; exit 0;;
-with-autoreconf=* | --with-autoreconf=* ) AUTORECONF="$optarg";;
-with-aclocal=* | --with-aclocal=* ) ACLOCAL="$optarg";;
-with-autoheader=* | --with-autoheader=* ) AUTOHEADER="$optarg";;
-with-automake=* | --with-automake=* ) AUTOMAKE="$optarg";;
-with-autoconf=* | --with-autoconf=* ) AUTOCONF="$optarg";;
*) echo "unrecognized option $option"; exit 1;;
esac
shift
done
# check autotools versions
echo "00boot: checking versions of autotools"
AUTORECONF=${AUTORECONF:-"autoreconf"}
ACLOCAL=${ACLOCAL:-"aclocal"}
AUTOHEADER=${AUTOHEADER:-"autoheader"}
AUTOMAKE=${AUTOMAKE:-"automake"}
AUTOCONF=${AUTOCONF:-"autoconf"}
autoreconf_version="`$AUTORECONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
aclocal_version="`$ACLOCAL --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoheader_version="`$AUTOHEADER --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
automake_version="`$AUTOMAKE --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
autoconf_version="`$AUTOCONF --version 2>/dev/null | sed -n '1s/^.* \([0-9.]*\)/\1/p'`"
if test -z "$autoreconf_version"; then
fail "finding program autoreconf"
fi
if test -z "$aclocal_version"; then
fail "finding program aclocal"
fi
if test -z "$autoheader_version"; then
fail "finding program autoheader"
fi
if test -z "$automake_version"; then
fail "finding program automake"
fi
if test -z "$autoconf_version"; then
fail "finding program autoconf"
fi
# report autotools versions
echo "00boot: using:"
printf "00boot:\t%-16s %s\n" "autoreconf-$autoreconf_version:" "`which $AUTORECONF`"
printf "00boot:\t%-16s %s\n" "aclocal-$aclocal_version:" "`which $ACLOCAL`"
printf "00boot:\t%-16s %s\n" "autoheader-$autoheader_version:" "`which $AUTOHEADER`"
printf "00boot:\t%-16s %s\n" "automake-$automake_version:" "`which $AUTOMAKE`"
printf "00boot:\t%-16s %s\n" "autoconf-$autoconf_version:" "`which $AUTOCONF`"