PR13689: Check for backtrace(3) in the cmake build.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 1 Sep 2012 20:50:18 +0000 (20:50 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 1 Sep 2012 20:50:18 +0000 (20:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163074 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/config-ix.cmake
include/llvm/Config/config.h.cmake

index 85af1f54db6ec9640bd6e971914013d999536036..9637363d38c984e725a4a97131dc70f2824a3f6d 100755 (executable)
@@ -93,6 +93,7 @@ endif()
 
 # function checks
 check_symbol_exists(arc4random "stdlib.h" HAVE_ARC4RANDOM)
+check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE)
 check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE)
 check_symbol_exists(getrusage sys/resource.h HAVE_GETRUSAGE)
 check_symbol_exists(setrlimit sys/resource.h HAVE_SETRLIMIT)
index b912251239dad93d3212963cbf58943cb4c1dbed..eb20b6470b32511019dc394bbb8fa888bcda0f9f 100644 (file)
@@ -51,7 +51,7 @@
 #cmakedefine HAVE_ASSERT_H ${HAVE_ASSERT_H}
 
 /* Define to 1 if you have the `backtrace' function. */
-#undef HAVE_BACKTRACE
+#cmakedefine HAVE_BACKTRACE ${HAVE_BACKTRACE}
 
 /* Define to 1 if you have the `bcopy' function. */
 #undef HAVE_BCOPY