| … | |
… | |
| 66 | dnl but we have to know which symbols the libc supports first |
66 | dnl but we have to know which symbols the libc supports first |
| 67 | AC_MSG_CHECKING(libc path) |
67 | AC_MSG_CHECKING(libc path) |
| 68 | echo "int main(void) { return 0; }" > libctest.c |
68 | echo "int main(void) { return 0; }" > libctest.c |
| 69 | $CC -Wall -o libctest libctest.c |
69 | $CC -Wall -o libctest libctest.c |
| 70 | LIBC_PATH=`$CC $CFLAGS -Wl,-verbose -o libctest libctest.c 2>&1 | \ |
70 | LIBC_PATH=`$CC $CFLAGS -Wl,-verbose -o libctest libctest.c 2>&1 | \ |
| 71 | gawk '/attempt to open/ { if (($4 ~ /libc\.so/) && ($5 == "succeeded")) LIBC = $4; }; END {print LIBC}'` |
71 | $AWK '/attempt to open/ { if (($4 ~ /libc\.so/) && ($5 == "succeeded")) LIBC = $4; }; END {print LIBC}'` |
| 72 | if test "$LIBC_PATH"x = x ; then |
72 | if test "$LIBC_PATH"x = x ; then |
| 73 | AC_MSG_ERROR(Unable to determine LIBC PATH) |
73 | AC_MSG_ERROR(Unable to determine LIBC PATH) |
| 74 | fi |
74 | fi |
| 75 | AC_MSG_RESULT($LIBC_PATH) |
75 | AC_MSG_RESULT($LIBC_PATH) |
| 76 | AC_SUBST(LIBC_PATH) |
76 | AC_SUBST(LIBC_PATH) |