changeset 1678:2422c1cd1afd

[xemacs-hg @ 2003-09-12 02:02:06 by james] Andrew Begel's patch to make modules build correctly on MacOS X.
author james
date Fri, 12 Sep 2003 02:02:07 +0000
parents c28d1cb3107d
children fc968521654a
files ChangeLog aclocal.m4
diffstat 2 files changed, 32 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Sep 11 21:52:39 2003 +0000
+++ b/ChangeLog	Fri Sep 12 02:02:07 2003 +0000
@@ -1,3 +1,9 @@
+2003-05-10  Andrew Begel  <abegel@CS.Berkeley.EDU>
+
+	* aclocal.m4 (XE_SHLIB_STUFF): Use -bundle when testing the
+	ability to build shared libraries, but use -bundle_loader in
+	ellcc.  Properly handle other flags for MacOS X.
+	
 2003-09-03  Steve Youngs  <youngs@xemacs.org>
 
 	* XEmacs 21.5.15 "celery" is released.
--- a/aclocal.m4	Thu Sep 11 21:52:39 2003 +0000
+++ b/aclocal.m4	Fri Sep 12 02:02:07 2003 +0000
@@ -92,6 +92,9 @@
     # PIC is the default for these OSes.
     ;;
 
+  *darwin*) dll_cflags='-dynamic'
+    ;;
+
   os2*)
     # We can build DLLs from non-PIC.
     ;;
@@ -244,8 +247,16 @@
 xcldf=
 AC_MSG_CHECKING(if C compiler can produce shared libraries)
 if test "$XEGCC" = yes; then
-  xcldf="-shared"
-  xldf="-shared"
+  case "$xehost_os" in
+    *darwin*)
+      xcldf='-bundle'
+      xldf='-bundle -bundle_loader ../../src/xemacs'
+      ;;
+    *)
+      xcldf="-shared"
+      xldf="-shared"
+      ;;
+  esac
 else # Not using GCC
   case "$xehost_os" in
     aix[[3-9]]*)
@@ -393,7 +404,15 @@
 
 if test "$cc_produces_so" = "yes"; then
   dll_ld=$CC
-  dll_ldflags=$xcldf
+  case "$xehost_os" in
+    *darwin*)
+      dnl On Darwin, we test with xcldf, but we use xldf
+      dll_ldflags=$xldf 
+      ;;
+    *) 
+      dll_ldflags=$xcldf
+      ;;
+  esac
   can_build_shared=yes
   ld_shlibs=yes
 else
@@ -542,6 +561,10 @@
     ld_dynamic_link_flags=
     ;;
 
+  *darwin*)
+    ld_dynamic_link_flags=
+    ;;
+
   freebsd2.2*)
     ld_dynamic_link_flags=
     ;;