Use sysdeps/*/preconfigure fragments from main source tree.

This commit is contained in:
Roland McGrath 2012-03-16 11:12:50 -07:00
parent f196c7f7af
commit 10a803e0a2
4 changed files with 46 additions and 19 deletions

View File

@ -1,3 +1,9 @@
2012-03-16 Roland McGrath <roland@hack.frob.com>
* aclocal.m4 (LIBC_PRECONFIGURE): New macro.
* configure.in: Use it for both main tree and add-ons.
* configure: Regenerated.
2012-03-16 H.J. Lu <hongjiu.lu@intel.com>
* time/offtime.c (__offtime): Use time_t on days, rem, y and yg.

14
aclocal.m4 vendored
View File

@ -127,3 +127,17 @@ AS_IF([AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest
1>&AS_MESSAGE_LOG_FD])],
[$2], [$3])
rm -f conftest*])
dnl Find and source sysdeps/*/preconfigure.
dnl LIBC_PRECONFIGURE([$srcdir], [for])
AC_DEFUN([LIBC_PRECONFIGURE], [dnl
if frags=`ls -d $1/sysdeps/*/preconfigure 2> /dev/null`
then
AC_MSG_CHECKING($2 preconfigure fragments)
for frag in $frags; do
name=`echo "$frag" | sed 's@/[[^/]]*[$]@@;s@^.*/@@'`
echo $ECHO_N "$name $ECHO_C" >&AS_MESSAGE_FD
. "$frag"
done
AC_MSG_RESULT()
fi])

31
configure vendored
View File

@ -3819,6 +3819,19 @@ if test "${with_cpu+set}" = set; then :
fi
if frags=`ls -d $srcdir/sysdeps/*/preconfigure 2> /dev/null`
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysdeps preconfigure fragments" >&5
$as_echo_n "checking for sysdeps preconfigure fragments... " >&6; }
for frag in $frags; do
name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'`
echo $ECHO_N "$name $ECHO_C" >&6
. "$frag"
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
fi
# An add-on can set this when it wants to disable the sanity check below.
libc_config_ok=no
@ -3936,17 +3949,17 @@ $d-srcdir = $subdir_srcdir"
fi
if test -n "$libc_add_on"; then
if frags=`ls -d $libc_add_on_srcdir/sysdeps/*/preconfigure 2> /dev/null`
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking add-on $libc_add_on for preconfigure fragments" >&5
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking add-on $libc_add_on for preconfigure fragments" >&5
$as_echo_n "checking add-on $libc_add_on for preconfigure fragments... " >&6; }
for frag in $frags; do
name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'`
echo $ECHO_N "$name $ECHO_C" >&6
. "$frag"
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
for frag in $frags; do
name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'`
echo $ECHO_N "$name $ECHO_C" >&6
. "$frag"
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
fi
fi
use_add_ons="$use_add_ons $libc_add_on"
add_ons_pfx="$add_ons_pfx $libc_add_on/"
test -z "$libc_add_on_canonical" ||

View File

@ -317,6 +317,9 @@ AC_ARG_WITH([cpu],
esac
])
dnl Let sysdeps/*/preconfigure act here, like they can in add-ons.
LIBC_PRECONFIGURE([$srcdir], [for sysdeps])
# An add-on can set this when it wants to disable the sanity check below.
libc_config_ok=no
@ -436,16 +439,7 @@ relative path required for add-on using \$libc_add_on_config_subdirs) ;;
}
fi
if test -n "$libc_add_on"; then
if frags=`ls -d $libc_add_on_srcdir/sysdeps/*/preconfigure 2> /dev/null`
then
AC_MSG_CHECKING(add-on $libc_add_on for preconfigure fragments)
for frag in $frags; do
name=`echo "$frag" | sed 's@/[[^/]]*$@@;s@^.*/@@'`
echo $ECHO_N "$name $ECHO_C" >&AS_MESSAGE_FD
. "$frag"
done
AC_MSG_RESULT()
fi
LIBC_PRECONFIGURE([$libc_add_on_srcdir], [add-on $libc_add_on for])
use_add_ons="$use_add_ons $libc_add_on"
add_ons_pfx="$add_ons_pfx $libc_add_on/"
test -z "$libc_add_on_canonical" ||