This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

correct dylib suffix in libltdl


Hi,

this patch adds correct dylib detection for darwin. It is necessary to continue jni call support on darwin.

I have taken it from the current libtool cvs.

Tested on 3.3/3.4 on darwin ppc.

It needs regeneration of aclocal.m4 and configure.
To do it right, I have taken an automake 1.4 and an autoconf 2.13, is this correct? And how do I proceed when commiting such a patch?


Just commit aclocal.m4 and configure too? (in case of acceptance)

Thanks,
Andreas

2003-03-09 Andreas Tobler <a dot tobler at schweiz dot ch>

        * acinclude.m4: Add darwin dylib suffix detection.
        * aclocal.m4: Rebuilt.
        * configure: Rebuilt.
Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/libjava/libltdl/acinclude.m4,v
retrieving revision 1.2
diff -u -r1.2 acinclude.m4
--- acinclude.m4	10 Sep 2000 08:04:40 -0000	1.2
+++ acinclude.m4	8 Mar 2003 15:36:57 -0000
@@ -528,6 +528,19 @@
   lt_cv_file_magic_cmd='${OBJDUMP} -f'
   ;;
 
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  case "$host_os" in
+  rhapsody* | darwin1.[[012]])
+    lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
+    ;;
+  *) # Darwin 1.3 on
+    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+    ;;
+  esac
+  ;;
+
 freebsd* )
   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
     case "$host_cpu" in
@@ -915,6 +928,14 @@
 libltdl_cv_shlibext=`cat conftest`
 rm -f conftest
 ])
+# The above does not work on darwin, due to the test's in the library_names_sp
+ec
+# The test description should probably say "which extension is used for loadab
+le
+# modules"
+  case "$host_os" in
+    darwin*) libltdl_cv_shlibext=".dylib" ;;
+  esac 
 if test -n "$libltdl_cv_shlibext"; then
   AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
     [Define to the extension used for shared libraries, say, ".so". ])

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]