[m-dev.] diff: fix portability problem with `-lm'

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Sep 23 23:58:49 AEDT 2000


On 22-Sep-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> Estimated hours taken: 1
> 
> Fix a portability problem: we were assuming that `-lm' would work, but
> on some systems, e.g. MacOS X (Darwin), it doesn't.

In my haste to get down to the pub on Friday night,
I committed that one a little too hastily...

----------

Estimated hours taken: 0.25

configure.in:
	Fix a bug in my previous fix for the `-lm' portability problem.
	I was using the wrong syntax for variable references (Make syntax
	rather than sh syntax).

Workspace: /home/pgrad/fjh/ws/hg
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.226
diff -u -d -r1.226 configure.in
--- configure.in	2000/09/22 08:23:43	1.226
+++ configure.in	2000/09/23 12:52:57
@@ -2018,7 +2018,7 @@
 # see Mmake.common.in for documentation on the meaning of these variables
 LINK_SHARED_OBJ="$CC -shared"
 LINK_SHARED_OBJ_SH="$CC -shared"
-SHARED_LIBS='`gcc -print-libgcc-file-name` $(MATH_LIB) -lc'
+SHARED_LIBS='`gcc -print-libgcc-file-name` $MATH_LIB -lc'
 EXE_RPATH_OPT="-Wl,-rpath,"
 EXE_RPATH_SEP=" -Wl,-rpath,"
 SHLIB_RPATH_OPT="-Wl,-rpath,"
@@ -2055,7 +2055,7 @@
 		;;
 	sparc-sun-solaris2.*)
 		AC_MSG_RESULT(yes)
-		SHARED_LIBS="$(MATH_LIB) -lc"	# don't link in libgcc.a
+		SHARED_LIBS="$MATH_LIB -lc"	# don't link in libgcc.a
 		LINK_SHARED_OBJ="$CC -G"
 		LINK_SHARED_OBJ_SH="$CC -G"
 		ERROR_UNDEFINED="-Wl,-z,defs"

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list