[m-dev.] diff: don't link with -lsocket when not required

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Oct 11 16:29:01 AEST 1999


Estimated hours taken: 0.5

Fix a problem where some test cases were failing on munta,
due to the lack of a socket library that works with static linking,
even though Mercury was configured with --disable-extern-debug.

configure.in:
	If the external debugger is not enabled, then don't link
	against the socket library, since it is not needed.

Workspace: /mnt/munkora/home/clp/mercury/public/test_mercury/test_dirs/munta/mercury
Index: configure.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/configure.in,v
retrieving revision 1.181
diff -u -r1.181 configure.in
--- configure.in	1999/09/23 02:15:00	1.181
+++ configure.in	1999/10/11 06:25:50
@@ -2018,7 +2018,6 @@
 # check whether we need -lsocket
 #
 AC_CHECK_LIB(socket, socket, SOCKET_LIBRARY=-lsocket, SOCKET_LIBRARY="")
-AC_SUBST(SOCKET_LIBRARY)
 
 #
 # temporarily add -lsocket to LIBS, for use by TRY_LINK
@@ -2225,7 +2224,12 @@
 	fi		
 else
 	AC_MSG_RESULT(no)
+
+	# don't link with the socket library if we're not going to use it
+	SOCKET_LIBRARY=
 fi
+
+AC_SUBST(SOCKET_LIBRARY)
 #-----------------------------------------------------------------------------#
 MERCURY_CHECK_READLINE
 #-----------------------------------------------------------------------------#

-- 
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