[llvm-commits] [llvm] r108737 - /llvm/trunk/autoconf/configure.ac

Owen Anderson resistor at mac.com
Mon Jul 19 12:24:38 PDT 2010


Author: resistor
Date: Mon Jul 19 14:24:37 2010
New Revision: 108737

URL: http://llvm.org/viewvc/llvm-project?rev=108737&view=rev
Log:
Add support for detecting <mach-o/getsect.h> and the getsect() function.

Modified:
    llvm/trunk/autoconf/configure.ac

Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=108737&r1=108736&r2=108737&view=diff
==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Mon Jul 19 14:24:37 2010
@@ -1287,6 +1287,9 @@
 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_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===





More information about the llvm-commits mailing list