/[path-sandbox]/trunk/configure.in
Gentoo

Diff of /trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 74 Revision 75
79AC_MSG_CHECKING(libc path) 79AC_MSG_CHECKING(libc path)
80echo "int main(void) { return 0; }" > libctest.c 80echo "int main(void) { return 0; }" > libctest.c
81$CC -Wall -o libctest libctest.c 81$CC -Wall -o libctest libctest.c
82LIBC_PATH=`$CC $CFLAGS -Wl,-verbose -o libctest libctest.c 2>&1 | \ 82LIBC_PATH=`$CC $CFLAGS -Wl,-verbose -o libctest libctest.c 2>&1 | \
83 $AWK '/attempt to open/ { if (($4 ~ /libc\.so/) && ($5 == "succeeded")) LIBC = $4; }; END {print LIBC}'` 83 $AWK '/attempt to open/ { if (($4 ~ /libc\.so/) && ($5 == "succeeded")) LIBC = $4; }; END {print LIBC}'`
84rm -f libctest.c
84if test "$LIBC_PATH"x = x ; then 85if test "$LIBC_PATH"x = x ; then
85 AC_MSG_ERROR(Unable to determine LIBC PATH) 86 AC_MSG_ERROR(Unable to determine LIBC PATH)
86fi 87fi
87AC_MSG_RESULT($LIBC_PATH) 88AC_MSG_RESULT($LIBC_PATH)
88AC_SUBST(LIBC_PATH) 89AC_SUBST(LIBC_PATH)
91dnl libc to load and search with dl*() calls 92dnl libc to load and search with dl*() calls
92AC_MSG_CHECKING(libc version) 93AC_MSG_CHECKING(libc version)
93dnl the sed script at the end here looks funny but it's ok ... 94dnl the sed script at the end here looks funny but it's ok ...
94dnl they're m4 escape sequences for left and right brackets 95dnl they're m4 escape sequences for left and right brackets
95LIBC_VERSION=`readelf -d libctest | grep NEEDED.*libc\\.so | $AWK '{print $NF}' | sed -e 's:\@<:@::' -e 's:\@:>@::'` 96LIBC_VERSION=`readelf -d libctest | grep NEEDED.*libc\\.so | $AWK '{print $NF}' | sed -e 's:\@<:@::' -e 's:\@:>@::'`
97rm -f libctest
96if test "$LIBC_VERSION"x = x ; then 98if test "$LIBC_VERSION"x = x ; then
97 AC_MSG_ERROR(Unable to determine LIBC VERSION) 99 AC_MSG_ERROR(Unable to determine LIBC VERSION)
98fi 100fi
99AC_MSG_RESULT($LIBC_VERSION) 101AC_MSG_RESULT($LIBC_VERSION)
100AC_DEFINE_UNQUOTED(LIBC_VERSION, "$LIBC_VERSION", [name of libc to hook into]) 102AC_DEFINE_UNQUOTED(LIBC_VERSION, "$LIBC_VERSION", [name of libc to hook into])
101rm -f libctest
102 103
103AC_OUTPUT([Makefile]) 104AC_OUTPUT([Makefile])

Legend:
Removed from v.74  
changed lines
  Added in v.75

  ViewVC Help
Powered by ViewVC 1.1.20