diff options
author | Roland McGrath <roland@hack.frob.com> | 2012-05-09 15:45:53 -0700 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2012-05-15 11:04:22 -0700 |
commit | ba75122dd93b6188d1be446df0502c4cbe5c32e6 (patch) | |
tree | e8d46ab86543b54a088f8a0efda34d180f50d0d1 /configure.in | |
parent | 5f658cf1473dc9d2daffdc28fa8480258967d0c4 (diff) | |
download | glibc-ba75122dd93b6188d1be446df0502c4cbe5c32e6.tar.gz |
configure change to handle Implies-{before,after} files
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 69 |
1 files changed, 37 insertions, 32 deletions
diff --git a/configure.in b/configure.in index 4eb9277e8c..30a062fe6d 100644 --- a/configure.in +++ b/configure.in @@ -761,41 +761,42 @@ while test $# -gt 0; do test -n "$enable_debug_configure" && echo "[DEBUG]: name/Implies $xsrcdir$name/Implies" >&2 - if test -f $xsrcdir$name/Implies; then - # Collect more names from the `Implies' file (removing comments). - implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/Implies`" - implied= - for x in $implied_candidate; do - found=no - if test -d $xsrcdir$name_base/$x; then - implied="$implied $name_base/$x"; - found=yes - fi - for d in $add_ons_pfx ''; do - try="${d}sysdeps/$x" - case $d in - /*) try_srcdir= ;; - *) try_srcdir=$srcdir/ ;; - esac - test -n "$enable_debug_configure" && - echo "[DEBUG]: $name implied $x try($d) {$try_srcdir}$try" >&2 - if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try; - then - implied="$implied $try" + for implies_file in Implies Implies-before Implies-after; do + implies_type=`echo $implies_file | sed s/-/_/` + eval ${implies_type}= + if test -f $xsrcdir$name/$implies_file; then + # Collect more names from the `Implies' file (removing comments). + implied_candidate="`sed 's/#.*$//' < $xsrcdir$name/$implies_file`" + for x in $implied_candidate; do + found=no + if test -d $xsrcdir$name_base/$x; then + eval "${implies_type}=\"\$${implies_type} \$name_base/\$x\"" found=yes - case "$sysnames_add_ons" in - *" $d "*) ;; - *|'') sysnames_add_ons="$sysnames_add_ons $d" ;; + fi + for d in $add_ons_pfx ''; do + try="${d}sysdeps/$x" + case $d in + /*) try_srcdir= ;; + *) try_srcdir=$srcdir/ ;; esac + test -n "$enable_debug_configure" && + echo "[DEBUG]: $name $implies_file $x try($d) {$try_srcdir}$try" >&2 + if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try; + then + eval "${implies_type}=\"\$${implies_type} \$try\"" + found=yes + case "$sysnames_add_ons" in + *" $d "*) ;; + *|'') sysnames_add_ons="$sysnames_add_ons $d" ;; + esac + fi + done + if test $found = no; then + AC_MSG_WARN($name/$implies_file specifies nonexistent $x) fi done - if test $found = no; then - AC_MSG_WARN($name/Implies specifies nonexistent $x) - fi - done - else - implied= - fi + fi + done # Add NAME to the list of names. names="$names $name" @@ -805,6 +806,10 @@ changequote(,)dnl parent="`echo $name | sed -n -e 's=/[^/]*$==' -e '/sysdeps$/q' -e p`" changequote([,])dnl + test -n "$enable_debug_configure" && + echo "[DEBUG]: $name Implies='$Implies' rest='$*' parent='$parent' \ +Implies_before='$Implies_after' Implies_after='$Implies_after'" >&2 + # Add the names implied by NAME, and NAME's parent (if it has one), to # the list of names to be processed (the argument list). We prepend the # implied names to the list and append the parent. We want implied @@ -812,7 +817,7 @@ changequote([,])dnl # configuration components; this ensures that for sysv4, unix/common # (implied by unix/sysv/sysv4) comes before unix/sysv (in ostry (here $*) # after sysv4). - sysnames="`echo $implied $* $parent`" + sysnames="`echo $Implies $* $Implies_before $parent $Implies_after`" test -n "$sysnames" && set $sysnames done |