mono: add mono_cv_uscore to arm-linux site file
authorCliff Brake <cbrake@bec-systems.com>
Tue, 26 Jun 2007 19:50:42 +0000 (19:50 +0000)
committerCliff Brake <cbrake@bec-systems.com>
Tue, 26 Jun 2007 19:50:42 +0000 (19:50 +0000)
 add section to contrib/site-conf/m4/mono.m4, but this still needs some work.

contrib/site-conf/m4/mono.m4
site/arm-linux

index 4dcd34f..4e0bb62 100644 (file)
@@ -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
+
+
index f891400..8240530 100644 (file)
@@ -169,3 +169,6 @@ ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=no}
 # lftp
 ac_cv_file___dev_ptc_=yes
 
+#mono
+mono_cv_uscore=${mono_cv_uscore=no}
+