[m-rev.] diff: MacOS: use ranlib -c

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Oct 21 00:18:09 AEST 2002


The following seems to be needed for MacOS.  I haven't tested this yet,
but I'm going to go ahead and commit it, so that I can more easily
test it thoroughly.

Estimated hours taken: 2
Branches: main

configure.in:
	On MacOS, pass "-c" to ranlib.
	This is needed to avoid brain-damaged default behaviour.

Workspace: /home/ceres/fjh/ws-ceres2/mercury
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.327
diff -u -d -r1.327 configure.in
--- configure.in	16 Oct 2002 05:45:15 -0000	1.327
+++ configure.in	20 Oct 2002 13:32:46 -0000
@@ -430,6 +430,17 @@
 	CYGPATH=echo
 
 	AC_PROG_RANLIB
+
+	# On MacOS 10.1 (and other MacOS systems?),
+	# we need to pass the `-c' option to ranlib.
+	# Otherwise, "common" symbols, i.e. "int foo;" without an initializer,
+	# do not get included in the archive table of contents, and so
+	# don't get found during linking.  Whose !@#$ing idea was it to make
+	# that brain-damaged and non-standard-conforming mode the default?
+
+	case "$host" in *-apple-darwin*)
+		RANLIB="$RANLIB -c"
+	esac
 fi
 
 AC_SUBST(OBJFILE_OPT)

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list