[m-rev.] diff: fix `mmc --make' test failure on mundroo

Simon Taylor stayl at cs.mu.OZ.AU
Mon Feb 17 18:43:27 AEDT 2003


Estimated hours taken: 0.25
Branches: main

Fix `mmc --make' test failures in debugging grades on mundroo
(it wasn't finding the readline library).

aclocal.m4:
scripts/mmc.in:
	Pass `-L/usr/local/lib' and `--c-include-directory /usr/local/include'
	to mmc if those directories exist.

Index: aclocal.m4
===================================================================
RCS file: /home/mercury1/repository/mercury/aclocal.m4,v
retrieving revision 1.18
diff -u -u -r1.18 aclocal.m4
--- aclocal.m4	28 Jan 2003 05:03:45 -0000	1.18
+++ aclocal.m4	17 Feb 2003 07:40:39 -0000
@@ -95,6 +95,7 @@
 AC_REQUIRE([AC_PROG_CC])
 AC_MSG_CHECKING(whether to pass -I/usr/local/include to C compiler)
 ALL_LOCAL_C_INCL_DIRS=""
+ALL_LOCAL_C_INCL_DIR_MMC_OPTS=""
 if test "$GCC" = yes; then
 	# Don't add -I/usr/local/include, since it causes a warning
 	# with gcc 3.1, and gcc already searches /usr/local/include
@@ -105,11 +106,13 @@
 	if test -d /usr/local/include/.; then
 		AC_MSG_RESULT(yes)
 		ALL_LOCAL_C_INCL_DIRS="-I/usr/local/include "
+		ALL_LOCAL_C_INCL_DIR_MMC_OPTS="--c-include-directory /usr/local/include "
 	else
 		AC_MSG_RESULT(no)
 	fi
 fi
 AC_SUBST(ALL_LOCAL_C_INCL_DIRS)
+AC_SUBST(ALL_LOCAL_C_INCL_DIR_MMC_OPTS)
 ])
 #-----------------------------------------------------------------------------#
 #
@@ -122,11 +125,14 @@
 if test -d /usr/local/lib/.; then
 	AC_MSG_RESULT(yes)
 	ALL_LOCAL_C_LIB_DIRS=/usr/local/lib
+	ALL_LOCAL_C_LIB_DIR_MMC_OPTS=-L/usr/local/lib
 else
 	AC_MSG_RESULT(no)
 	ALL_LOCAL_C_LIB_DIRS=
+	ALL_LOCAL_C_LIB_DIR_MMC_OPTS=
 fi
 AC_SUBST(ALL_LOCAL_C_LIB_DIRS)
+AC_SUBST(ALL_LOCAL_C_LIB_DIR_MMC_OPTS)
 ])
 
 #-----------------------------------------------------------------------------#
Index: scripts/mmc.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mmc.in,v
retrieving revision 1.31
diff -u -u -r1.31 mmc.in
--- scripts/mmc.in	5 Feb 2003 14:41:20 -0000	1.31
+++ scripts/mmc.in	17 Feb 2003 07:39:07 -0000
@@ -52,6 +52,8 @@
 #	--shlib-linker-trace-flags "@LD_LIBFLAGS_FOR_TRACE@"
 #	once those options are accepted everywhere.
 DEFAULT_MCFLAGS=${DEFAULT_MCFLAGS-"\
+		@ALL_LOCAL_C_INCL_DIR_MMC_OPTS@ \
+		@ALL_LOCAL_C_LIB_DIR_MMC_OPTS@ \
 		$MERCURY_ALL_MC_C_INCL_DIRS \
 		--cc \"${MERCURY_C_COMPILER=@CC@}\" \
 		--grade \"${MERCURY_DEFAULT_GRADE=@DEFAULT_GRADE@}\" \
--------------------------------------------------------------------------
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