summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorCliff Brake <cbrake@bec-systems.com>2007-06-26 19:50:42 +0000
committerCliff Brake <cbrake@bec-systems.com>2007-06-26 19:50:42 +0000
commitb58802a573ba49b8754816c4167c83628487d9e9 (patch)
tree92666512f3a9c21b0c5b87436fc8fa9fa6bd9b95 /contrib
parentfe8a092442c3fff0ff1ec2e82a5880c7cc11b5fa (diff)
mono: add mono_cv_uscore to arm-linux site file
add section to contrib/site-conf/m4/mono.m4, but this still needs some work.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/site-conf/m4/mono.m439
1 files changed, 39 insertions, 0 deletions
diff --git a/contrib/site-conf/m4/mono.m4 b/contrib/site-conf/m4/mono.m4
index 4dcd34fbf8..4e0bb6296b 100644
--- a/contrib/site-conf/m4/mono.m4
+++ b/contrib/site-conf/m4/mono.m4
@@ -1 +1,40 @@
# Tests for mono
+# this likely does not work, needs to be packaged.
+# the MONO_DL_NEED_USCORE is the macro that needs to be defined in site.conf
+
+dnl dynamic loader support
+AC_CHECK_FUNC(dlopen, DL_LIB="",
+ AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl", dl_support=no)
+)
+if test x$dl_support = xno; then
+ AC_MSG_WARN([No dynamic loading support available])
+else
+ LIBS="$LIBS $DL_LIB"
+ AC_DEFINE(HAVE_DL_LOADER,1,[dlopen-based dynamic loader available])
+ dnl from glib's configure.in
+ AC_CACHE_CHECK([for preceeding underscore in symbols],
+ mono_cv_uscore,[
+ AC_TRY_RUN([#include <dlfcn.h>
+ int mono_underscore_test (void) { return 42; }
+ int main() {
+ void *f1 = (void*)0, *f2 = (void*)0, *handle;
+ handle = dlopen ((void*)0, 0);
+ if (handle) {
+ f1 = dlsym (handle, "mono_underscore_test");
+ f2 = dlsym (handle, "_mono_underscore_test");
+ } return (!f2 || f1);
+ }],
+ [mono_cv_uscore=yes],
+ [mono_cv_uscore=no],
+ [])
+ ])
+ if test "x$mono_cv_uscore" = "xyes"; then
+ MONO_DL_NEED_USCORE=1
+ else
+ MONO_DL_NEED_USCORE=0
+ fi
+ AC_SUBST(MONO_DL_NEED_USCORE)
+ AC_CHECK_FUNC(dlerror)
+fi
+
+