]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled as a target library.
authorIan Lance Taylor <iant@google.com>
Wed, 19 Sep 2012 22:57:53 +0000 (22:57 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 19 Sep 2012 22:57:53 +0000 (22:57 +0000)
* configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
as a target library.
* configure: Rebuild.

From-SVN: r191503

libbacktrace/ChangeLog
libbacktrace/configure
libbacktrace/configure.ac

index ea9ff2fa59f1b5a9f708d27c8f43283462cdce46..e5baeb53506d6ea7717bfdaea8d84e7b89d3b6dc 100644 (file)
@@ -1,3 +1,9 @@
+2012-09-19  Ian Lance Taylor  <iant@google.com>
+
+       * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
+       as a target library.
+       * configure: Rebuild.
+
 2012-09-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
            Ian Lance Taylor  <iant@google.com>
 
index bbd5d1182d352e9b499ca0319c8f5b85cc565efc..a57b51b29515d8ca173da88f8bc3b1c015971eb8 100755 (executable)
@@ -11734,6 +11734,7 @@ fi
 
 
 
+if test -n "${with_target_subdir}"; then
 
 
 # Check whether --with-system-libunwind was given.
@@ -11770,6 +11771,20 @@ $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
 
   fi
 
+else
+  ac_fn_c_check_func "$LINENO" "_Unwind_GetIPInfo" "ac_cv_func__Unwind_GetIPInfo"
+if test "x$ac_cv_func__Unwind_GetIPInfo" = x""yes; then :
+  have_unwind_getipinfo=yes
+else
+  have_unwind_getipinfo=no
+fi
+
+  if test "$have_unwind_getipinfo" = "yes"; then
+
+$as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h
+
+  fi
+fi
 
 # When building as a target library, shared libraries may want to link
 # this in.  We don't want to provide another shared library to
index 4e0abbab720714a249ef2477f834cf295d226682..b21beea11b02efceb7b8b8628e5fa17d063adf23 100644 (file)
@@ -98,7 +98,15 @@ fi
 
 AC_SUBST(WARN_FLAGS)
 
-GCC_CHECK_UNWIND_GETIPINFO
+if test -n "${with_target_subdir}"; then
+  GCC_CHECK_UNWIND_GETIPINFO
+else
+  AC_CHECK_FUNC(_Unwind_GetIPInfo, [have_unwind_getipinfo=yes],
+               [have_unwind_getipinfo=no])
+  if test "$have_unwind_getipinfo" = "yes"; then
+    AC_DEFINE(HAVE_GETIPINFO, 1, [Define if _Unwind_GetIPInfo is available.])
+  fi
+fi
 
 # When building as a target library, shared libraries may want to link
 # this in.  We don't want to provide another shared library to