summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2012-03-16 11:12:50 -0700
committerRoland McGrath <roland@hack.frob.com>2012-03-16 11:12:50 -0700
commit10a803e0a2ed04ba1f5e7931121acbb0f8383e9b (patch)
tree36be05894483e1b4d66aebbff9c89c0192a6442c /aclocal.m4
parentf196c7f7afe356c2d99502e8f30efff87a8a718a (diff)
Use sysdeps/*/preconfigure fragments from main source tree.
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 02ff9bc359..fb546e46c1 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -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])