llvm.org GIT mirror llvm / 51e5713
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121101 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 8 years ago
2 changed file(s) with 38 addition(s) and 27 deletion(s). Raw diff Collapse all Expand all
13241324 AC_CHECK_HEADERS([CrashReporterClient.h])
13251325
13261326 dnl Try to find Darwin specific crash reporting global.
1327 AC_LINK_IFELSE([AC_LANG_PROGRAM([[const char *__crashreporter_info__;]], [[]])],[darwin_crashreport = yes],[darwin_crashreport = no])
1328 AC_MSG_RESULT($darwin_crashreport)
1329 if test "x$darwin_crashreport = xyes"
1330 then
1331 AC_DEFINE([HAVE_CRASHREPORTER_INFO],[1],
1332 [Define if __crashreporter_info__ exists.])
1333 fi
1327 AC_MSG_CHECKING([__crashreporter_info__])
1328 AC_LINK_IFELSE(
1329 AC_LANG_SOURCE(
1330 [[extern const char *__crashreporter_info__;
1331 int main() {
1332 __crashreporter_info__ = "test";
1333 return 0;
1334 }
1335 ]]),
1336 AC_MSG_RESULT(yes)
1337 AC_DEFINE(HAVE_CRASHREPORTER_INFO, 1, Can use __crashreporter_info__),
1338 AC_MSG_RESULT(no)
1339 AC_DEFINE(HAVE_CRASHREPORTER_INFO, 0,
1340 Define if __crashreporter_info__ exists.))
1341
13341342 dnl===-----------------------------------------------------------------------===
13351343 dnl===
13361344 dnl=== SECTION 7: Check for types and structures
1741817418 done
1741917419
1742017420
17421 { echo "$as_me:$LINENO: checking __crashreporter_info__" >&5
17422 echo $ECHO_N "checking __crashreporter_info__... $ECHO_C" >&6; }
1742117423 cat >conftest.$ac_ext <<_ACEOF
1742217424 /* confdefs.h. */
1742317425 _ACEOF
1742417426 cat confdefs.h >>conftest.$ac_ext
1742517427 cat >>conftest.$ac_ext <<_ACEOF
1742617428 /* end confdefs.h. */
17427 const char *__crashreporter_info__;
17428 int
17429 main ()
17430 {
17431
17432 ;
17433 return 0;
17434 }
17429 extern const char *__crashreporter_info__;
17430 int main() {
17431 __crashreporter_info__ = "test";
17432 return 0;
17433 }
17434
1743517435 _ACEOF
1743617436 rm -f conftest.$ac_objext conftest$ac_exeext
1743717437 if { (ac_try="$ac_link"
1746717467 ac_status=$?
1746817468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1746917469 (exit $ac_status); }; }; then
17470 darwin_crashreport = yes
17470 { echo "$as_me:$LINENO: result: yes" >&5
17471 echo "${ECHO_T}yes" >&6; }
17472
17473 cat >>confdefs.h <<\_ACEOF
17474 #define HAVE_CRASHREPORTER_INFO 1
17475 _ACEOF
17476
1747117477 else
1747217478 echo "$as_me: failed program was:" >&5
1747317479 sed 's/^/| /' conftest.$ac_ext >&5
1747417480
17475 darwin_crashreport = no
17481 { echo "$as_me:$LINENO: result: no" >&5
17482 echo "${ECHO_T}no" >&6; }
17483
17484 cat >>confdefs.h <<\_ACEOF
17485 #define HAVE_CRASHREPORTER_INFO 0
17486 _ACEOF
17487
1747617488 fi
1747717489
1747817490 rm -f core conftest.err conftest.$ac_objext \
1747917491 conftest$ac_exeext conftest.$ac_ext
17480 { echo "$as_me:$LINENO: result: $darwin_crashreport" >&5
17481 echo "${ECHO_T}$darwin_crashreport" >&6; }
17482 if test "x$darwin_crashreport = xyes"
17483 then
17484
17485 cat >>confdefs.h <<\_ACEOF
17486 #define HAVE_CRASHREPORTER_INFO 1
17487 _ACEOF
17488
17489 fi
17492
1749017493
1749117494
1749217495