about summary refs log tree commit diff
path: root/configure.in
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-15 18:54:41 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-15 18:54:41 +0000
commitcbdb12dec1284048430dbd9c354475ddffd7047e (patch)
tree92289c3e645fd213d888e791740a09f7faf2b844 /configure.in
parentf8d8a2650ce753bcc162ccfa55f79a6967c21d06 (diff)
downloadglibc-cbdb12dec1284048430dbd9c354475ddffd7047e.tar.gz
glibc-cbdb12dec1284048430dbd9c354475ddffd7047e.tar.xz
glibc-cbdb12dec1284048430dbd9c354475ddffd7047e.zip
Update.
2004-09-08  H.J. Lu  <hongjiu.lu@intel.com>

	* Makeconfig (libunwind): New.
	(libgcc_eh): Add $(libunwind).
	(gnulib): Always set to -lgcc $(libgcc_eh).
	(static-gnulib): Always set to -lgcc -lgcc_eh $(libunwind).
	(libc.so-gnulib): New.
	* Makerules (LDLIBS-c.so): Use $(libc.so-gnulib) instead of
	$(static-gnulib).
	* configure.in (libc_cv_cc_with_libunwind): Set to yes if gcc
	uses -lunwind for static binaries.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in18
1 files changed, 11 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index 9b8a1eb26d..559bee0173 100644
--- a/configure.in
+++ b/configure.in
@@ -1260,13 +1260,17 @@ EOF
   fi
 
   AC_CACHE_CHECK(for libunwind-support in compiler,
-		 libc_cv_cc_with_libunwind, [dnl
-    AC_TRY_LINK([#include <libunwind.h>], [
-      unw_context_t uc;
-      unw_cursor_t c;
-      unw_getcontext (&uc);
-      unw_init_local (&c, &uc)],
-        libc_cv_cc_with_libunwind=yes, libc_cv_cc_with_libunwind=no)])
+		 libc_cv_cc_with_libunwind, [
+    cat > conftest.c <<EOF
+int main (void) { return 0; }
+EOF
+    if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -static -o conftest \
+       conftest.c -v 2>&1 >/dev/null | grep -q " -lunwind "; then
+      libc_cv_cc_with_libunwind=yes
+    else
+      libc_cv_cc_with_libunwind=no
+    fi
+    rm -f conftest*])
   AC_SUBST(libc_cv_cc_with_libunwind)
   if test $libc_cv_cc_with_libunwind = yes; then
     AC_DEFINE(HAVE_CC_WITH_LIBUNWIND)