blob: 9c2aacde080ec91fca9e6879b2bd2dad8bcb1f2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
From: "P. J. McDermott" <pjm@nac.net>
Description: Fix sysdeps preconfigure fragments on BusyBox ash
On shells that don't support the LINENO parameter (e.g. BusyBox ash), the
AS_LINENO_PREPARE macro (executed by AC_INIT) preprocesses the script
$as_myself into $as_me.lineno.
.
Unfortunately, when loading sysdeps preconfigure fragements, these as_*
parameters refer to the configure script rather than the fragments.
.
As a result, the configure script is executed by a preconfigure fragment in an
infinitely recursive loop.
.
This patch temporarily changes the parameters to refer to the fragments,
allowing the fragments to be properly preprocessed and breaking the loop.
diff -Naur src.orig/libc/aclocal.m4 src/libc/aclocal.m4
--- src.orig/libc/aclocal.m4 2012-12-02 16:11:45.000000000 -0500
+++ src/libc/aclocal.m4 2013-06-20 12:19:51.818414209 -0400
@@ -161,7 +161,14 @@
for frag in $frags; do
name=`echo "$frag" | sed 's@/[[^/]]*[$]@@;s@^.*/@@'`
echo $ECHO_N "$name $ECHO_C" >&AS_MESSAGE_FD
+ orig_as_me=$as_me
+ orig_as_myself=$as_myself
+ as_me=${frag##*/sysdeps/}
+ as_me=${as_me%/preconfigure}-preconfigure
+ as_myself=$frag
. "$frag"
+ as_me=$orig_as_me
+ as_myself=$orig_as_myself
done
AC_MSG_RESULT()
fi])
diff -Naur src.orig/libc/configure src/libc/configure
--- src.orig/libc/configure 2012-12-02 16:11:45.000000000 -0500
+++ src/libc/configure 2013-06-20 12:24:26.226678382 -0400
@@ -4000,7 +4000,14 @@
for frag in $frags; do
name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'`
echo $ECHO_N "$name $ECHO_C" >&6
+ orig_as_me=$as_me
+ orig_as_myself=$as_myself
+ as_me=${frag##*/sysdeps/}
+ as_me=${as_me%/preconfigure}-preconfigure
+ as_myself=$frag
. "$frag"
+ as_me=$orig_as_me
+ as_myself=$orig_as_myself
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
$as_echo "" >&6; }
|