summaryrefslogtreecommitdiff
path: root/autoconf
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-07-19 19:24:37 +0000
committerOwen Anderson <resistor@mac.com>2010-07-19 19:24:37 +0000
commitba3fe6961798cbe9713e1d89b11f431def494f12 (patch)
treef5a2d8e5ac25887c842c0ed7ac67f7b041c8075a /autoconf
parent5f23a938b0fb7c2e3626c59b93d2fc2530cc4dc4 (diff)
downloadllvm-ba3fe6961798cbe9713e1d89b11f431def494f12.tar.gz
llvm-ba3fe6961798cbe9713e1d89b11f431def494f12.tar.bz2
llvm-ba3fe6961798cbe9713e1d89b11f431def494f12.tar.xz
Add support for detecting <mach-o/getsect.h> and the getsect() function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108737 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index be320cf398..35cbc88226 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -1287,6 +1287,9 @@ fi
dnl Try to find Darwin specific crash reporting library.
AC_CHECK_HEADERS([CrashReporterClient.h])
+dnl Try to find Darwin specific linker-section library.
+AC_CHECK_HEADERS([mach-o/getsect.h])
+
dnl===-----------------------------------------------------------------------===
dnl===
dnl=== SECTION 7: Check for types and structures
@@ -1362,6 +1365,22 @@ AC_LINK_IFELSE(
AC_DEFINE(LLVM_MULTITHREADED, 0, Build multithreading support into LLVM)
AC_MSG_WARN([LLVM will be built thread-unsafe because atomic builtins are missing]))
+dnl Check for Darwin-specific getsect().
+AC_MSG_CHECKING(for getsect())
+AC_COMPILE_IFELSE(
+ AC_LANG_SOURCE(
+ [[#include <mach-o/getsect.h>
+ int main() {
+ unsigned long p;
+ return (int)getsect("__DATA","ยด__pass_info", &p);
+ }
+ ]]),
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GETSECT, 1, Have Darwin getsect() support),
+ AC_MSG_RESULT(no)
+ AC_DEFINE(HAVE_GETSECT, 1, Have Darwin getsect() support)
+)
+
dnl===-----------------------------------------------------------------------===
dnl===