# print_help() function.
+if test "$(pwd)" != "`pwd`"
+then
+ echo "Urgh. Dinosaur shell, eh?"
+ exit 1
+fi
+
+
########################################################################
-# Initial values
+# Constant and initial values
debug=false
self="$(basename "$0")"
+autogen_version="0.3.0"
########################################################################
Commands:
--help
Print this help text
+ --version
+ Print the tool versions
--verbose
Verbose output
########################################################################
+# Print software versions
+
+print_versions() {
+ echo "${self} (ndim's autogen) ${autogen_version}"
+ for tool in \
+ "${AUTOCONF-autoconf}" \
+ "${AUTOMAKE-automake}" \
+ "${AUTOPOINT-autopoint}" \
+ "${LIBTOOLIZE-libtoolize}"
+ do
+ "$tool" --version 2>&1 | sed '1q'
+ done
+}
+
+
+########################################################################
# Initialize variables for configure.{in,ac} in $1
init_vars() {
# OK, the "init" part is done recursively by autopoint, so that is easy.
# But the cleaning should also work recursively, but that is difficult
# with the current structure of the script.
- AG_SUBDIRS="$(for k in $(sed -n 's/^AC_CONFIG_SUBDIRS(\[\{0,1\}\([^])]*\).*/\1/p' "$CONFIGURE_AC"); do echo "${dir}/${k}"; done)"
+ AG_SUBDIRS="$(for k in $(sed -n 's/^[[:space:]]*AC_CONFIG_SUBDIRS(\[\{0,1\}\([^])]*\).*/\1/p' "$CONFIGURE_AC"); do echo "${dir}/${k}"; done)"
AG_AUX="$(sed -n 's/^AC_CONFIG_AUX_DIR(\[\{0,1\}\([^])]*\).*/\1/p' < "$CONFIGURE_AC")"
if test "x$AG_AUX" = "x"; then
AG_AUX="."
--verbose)
debug="true"
;;
+ --version)
+ print_versions
+ exit 0
+ ;;
-h|--help)
print_help
exit 0