summaryrefslogtreecommitdiffstats
path: root/llvm/autoconf/configure.ac
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-12-07 02:05:42 +0000
committerEric Christopher <echristo@apple.com>2010-12-07 02:05:42 +0000
commitba4f77262c916976bdb56dd1a117622ecde73586 (patch)
tree9ec84dcbbcc37b0fb3e8e4715f30fa0de99fd864 /llvm/autoconf/configure.ac
parent287f4366c1acad05cfb4acf988a2aef519da8492 (diff)
downloadbcm5719-llvm-ba4f77262c916976bdb56dd1a117622ecde73586.tar.gz
bcm5719-llvm-ba4f77262c916976bdb56dd1a117622ecde73586.zip
Two things: Fix testcase to use extern - otherwise the link will always
succeed. Also make the testcase clearer as to what we're doing and emit a checking notification to the log. llvm-svn: 121101
Diffstat (limited to 'llvm/autoconf/configure.ac')
-rw-r--r--llvm/autoconf/configure.ac22
1 files changed, 15 insertions, 7 deletions
diff --git a/llvm/autoconf/configure.ac b/llvm/autoconf/configure.ac
index b8d4a30715a..d186b0ea662 100644
--- a/llvm/autoconf/configure.ac
+++ b/llvm/autoconf/configure.ac
@@ -1325,13 +1325,21 @@ dnl Try to find Darwin specific crash reporting libraries.
AC_CHECK_HEADERS([CrashReporterClient.h])
dnl Try to find Darwin specific crash reporting global.
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[const char *__crashreporter_info__;]], [[]])],[darwin_crashreport = yes],[darwin_crashreport = no])
-AC_MSG_RESULT($darwin_crashreport)
-if test "x$darwin_crashreport = xyes"
-then
- AC_DEFINE([HAVE_CRASHREPORTER_INFO],[1],
- [Define if __crashreporter_info__ exists.])
-fi
+AC_MSG_CHECKING([__crashreporter_info__])
+AC_LINK_IFELSE(
+ AC_LANG_SOURCE(
+ [[extern const char *__crashreporter_info__;
+ int main() {
+ __crashreporter_info__ = "test";
+ return 0;
+ }
+ ]]),
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_CRASHREPORTER_INFO, 1, Can use __crashreporter_info__),
+ AC_MSG_RESULT(no)
+ AC_DEFINE(HAVE_CRASHREPORTER_INFO, 0,
+ Define if __crashreporter_info__ exists.))
+
dnl===-----------------------------------------------------------------------===
dnl===
dnl=== SECTION 7: Check for types and structures
OpenPOWER on IntegriCloud