-# bootstrap.conf (GNU Libtool) version 2011-11-21
+# bootstrap.conf (GNU Libtool) version 2011-11-24
#
# Copyright (C) 2010-2012 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2010
# func_reconfigure
# ------------------
-# In addition to needing to autoreconf several directories, Libtool
-# provides `libtoolize' and doesn't use `autopoint', so we can use a
-# somewhat simpler `func_reconfigure' implementation.
+# In addition to needing to autoreconf two directories, Libtool provides
+# `libtoolize' and doesn't use `autopoint', so we can use a somewhat
+# simpler `func_reconfigure' implementation than bootstrap's version.
func_reconfigure ()
{
$debug_cmd
$require_autoheader
$require_build_aux
+ $require_ltdl_dir
$require_macro_dir
# Only need this from the top level directory
export LIBTOOLIZE
func_verbose "export LIBTOOLIZE='$LIBTOOLIZE'"
- # Also bootstrap any additional directories that were specified with
- # `reconfdirs' in the environment.
- save_IFS=$IFS
- IFS=,
- for sub in $opt_reconf_dirs; do
- IFS=$save_IFS
- my_autoreconf_options=
- $opt_copy || func_append my_autoreconf_options " --symlink"
- $opt_force && func_append my_autoreconf_options " --force"
- $opt_verbose && func_append my_autoreconf_options " --verbose"
- func_show_eval "$AUTORECONF$my_autoreconf_options --install $sub" \
- 'exit $?'
- done
- IFS=$save_IFS
-}
-
-
-
-## --------------- ##
-## Hook functions. ##
-## --------------- ##
-
-# `bootstrap' itself takes care of the arguments it recognises, so we only
-# have to handle additional options here. Setting exit_cmd to anything
-# other than `:', will tell `bootstrap' to exit after printing it's own
-# option loop parser errors. Best not to use any time-consuming $require_
-# functions here, otherwise they will be run even if we only need to
-# process `--version'.
-
-# libtool_options_prep [ARG...]
-# -----------------------------
-# Preparation for supporting additional options in Libtool bootstrap,
-# before the option parsing loop.
-libtool_options_prep ()
-{
- $debug_cmd
-
- # Extend the existing usage message
- usage_message=$usage_message'
-Libtool Specific Options:
- -r, --reconf-dirs=DIR1,DIR2,...
- limit the directories to be bootstrapped to
- the comma-delimited list of DIR1,DIR2,...
-'
-
- # autoreconf all directories by default
- test -n "$reconfdirs" \
- || reconfdirs=". libltdl `ls -1d tests/*demo tests/*demo[0-9]`"
-
- # pass back the list of options we consumed
- func_quote_for_eval ${1+"$@"}
- libtool_options_prep_result=$func_quote_for_eval_result
-}
-func_add_hook func_options_prep libtool_options_prep
+ my_autoreconf_options=
+ $opt_copy || func_append my_autoreconf_options " --symlink"
+ $opt_force && func_append my_autoreconf_options " --force"
+ $opt_verbose && func_append my_autoreconf_options " --verbose"
+ func_show_eval "$AUTORECONF$my_autoreconf_options --install ." \
+ 'exit $?'
-# libtool_parse_options [ARG...]
-# ------------------------------
-# Provide handling for additional Libtool options inside the main option
-# parsing loop.
-libtool_parse_options ()
-{
- $debug_cmd
-
- # this inner loop lets us handle `-r.' in a single iteration
- while test $# -gt 0; do
- opt=$1
- shift
-
- case $opt in
- --reconf-dirs|--reconfdirs|-r)
- test $# = 0 && func_missing_arg $opt && break
- # squash spaces so that delimiter is just `,' and nothing else
- opt_reconf_dirs=`echo "$1" |$SED 's|, *|,|g'`
- shift
- ;;
-
- # Separate arguments to short options:
- -r*) func_split_short_opt "$opt"
- set dummy "$func_split_short_opt_name" "$func_split_short_opt_arg" ${1+"$@"}
- shift
- ;;
-
- *) set dummy "$opt" ${1+"$@"}; shift; break ;;
- esac
- done
-
- # pass back the list of options we consumed
- func_quote_for_eval ${1+"$@"}
- libtool_parse_options_result=$func_quote_for_eval_result
+ # Also bootstrap libltdl ready for installation.
+ func_show_eval "$AUTORECONF$my_autoreconf_options --install $ltdl_dir" \
+ 'exit $?'
}
-func_add_hook func_parse_options libtool_parse_options
-
-
-# libtool_validate_options [ARG...]
-# ---------------------------------
-# Validation of additional Libtool bootstrap options, after the main option
-# parsing loop.
-libtool_validate_options ()
-{
- # support the old interface too: `reconfdirs='. libltdl' ./bootstrap'
- test -n "$opt_reconf_dirs" \
- || opt_reconf_dirs=`echo $reconfdirs |$SED 's| *|,|g'`
-
- # validate $opt_reconf_dirs
- save_IFS=$IFS
- IFS=,
- for reconfdir in $opt_reconf_dirs; do
- IFS=$save_IFS
- test -d "$reconfdir" || {
- func_error "bad reconf directory \`$reconfdir': directory does not exist"
- exit_cmd=exit
- }
- done
- IFS=$save_IFS
- # pass back the list of options we consumed
- func_quote_for_eval ${1+"$@"}
- libtool_validate_options_result=$func_quote_for_eval_result
-}
-func_add_hook func_validate_options libtool_validate_options
## ---------------------------- ##
$debug_cmd
$require_build_aux
+ $require_ltdl_dir
$require_macro_dir
$require_package
$require_package_bugreport
$require_package_url
$require_package_version
- func_extract_trace LT_CONFIG_LTDL_DIR
-
- save_ifs=$IFS
- IFS=:
- set dummy $func_extract_trace_result
- IFS=$save_ifs
- shift
-
- ltdl_dir=$1
- func_check_configuration ltdl_dir \
- "LT_CONFIG_LTDL_DIR([name of your libltdl directory])"
- func_verbose "ltdl_dir='$ltdl_dir'"
-
# Whip up a dirty Makefile:
makes='Makefile.am libltdl/ltdl.mk'
rm -f Makefile
## Resource management. ##
## -------------------- ##
+# require_ltdl_dir
+# ----------------
+# Extract libtool's ltdl directory from configure.ac.
+require_ltdl_dir=func_require_ltdl_dir
+func_require_ltdl_dir ()
+{
+ $require_configure_ac
+
+ func_extract_trace LT_CONFIG_LTDL_DIR
+
+ save_ifs=$IFS
+ IFS=:
+ set dummy $func_extract_trace_result
+ IFS=$save_ifs
+ shift
+
+ ltdl_dir=$1
+ func_check_configuration ltdl_dir \
+ "LT_CONFIG_LTDL_DIR([name of your libltdl directory])"
+
+ func_verbose "ltdl_dir='$ltdl_dir'"
+
+ require_ltdl_dir=:
+}
+
+
# require_package_url
# -------------------
# Ensure that package_url has a sensible default.