diff: search /usr/local/{include,lib}

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Apr 4 03:10:17 AEST 1999


Estimated hours taken: 0.75

configure.in:
scripts/mgnuc.in:
scripts/ml.in:
	Search for header files and libraries in /usr/local/include
	and /usr/local/lib.  This is useful because readline is often
	installed there.

Index: configure.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/configure.in,v
retrieving revision 1.156
diff -u -r1.156 configure.in
--- configure.in	1999/03/30 05:45:18	1.156
+++ configure.in	1999/04/03 16:17:56
@@ -193,6 +193,15 @@
 # we also need to add the appropriate `-I' options so that the test programs
 # can #include various Mercury runtime headers.
 CFLAGS="-I runtime -I runtime/machdeps $CFLAGS"
+
+# Make sure we search /usr/local/include and /usr/local/lib for
+# header files and libraries.  GNU C normally searches /usr/local/include
+# by default, but (inconsistently) it does _not_ search /usr/local/lib;
+# and in any case the user might be using a different C compiler that
+# doesn't search either of those by default.
+CFLAGS="-I /usr/local/include $CFLAGS"
+LIBS="-L/usr/local/lib $LIBS"
+
 AC_PROG_CPP
 AC_C_CROSS
 AC_PROG_RANLIB
Index: scripts/mgnuc.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/scripts/mgnuc.in,v
retrieving revision 1.59
diff -u -r1.59 mgnuc.in
--- mgnuc.in	1999/03/12 23:39:43	1.59
+++ mgnuc.in	1999/04/03 16:47:11
@@ -57,8 +57,12 @@
 
 FULLARCH=@FULLARCH@
 NONSHARED_LIB_DIR=${MERCURY_NONSHARED_LIB_DIR=@NONSHARED_LIB_DIR@}
-C_INCL_DIR=${MERCURY_C_INCL_DIR=@LIBDIR@/inc}
-ALL_C_INCL_DIRS=${MERCURY_ALL_C_INCL_DIRS=-I$C_INCL_DIR}
+MERC_C_INCL_DIR=${MERCURY_C_INCL_DIR=@LIBDIR@/inc}
+MERC_ALL_C_INCL_DIRS=${MERCURY_ALL_C_INCL_DIRS=-I$C_INCL_DIR}
+LOCAL_C_INCL_DIR=${MERCURY_LOCAL_C_INCL_DIR=/usr/local/include}
+ALL_LOCAL_C_INCL_DIRS=${MERCURY_ALL_LOCAL_C_INCL_DIRS=-I$LOCAL_C_INCL_DIR}
+ALL_C_INCL_DIRS="$MERC_ALL_C_INCL_DIRS $ALL_LOCAL_C_INCL_DIRS"
+
 DEFAULT_GRADE=${MERCURY_DEFAULT_GRADE=@DEFAULT_GRADE@}
 CC=${MERCURY_C_COMPILER="@CC@"}
 CFLAGS_FOR_REGS="@CFLAGS_FOR_REGS@"
Index: scripts/ml.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/scripts/ml.in,v
retrieving revision 1.57
diff -u -r1.57 ml.in
--- ml.in	1999/03/30 05:45:45	1.57
+++ ml.in	1999/04/03 16:20:00
@@ -433,6 +433,7 @@
 merc_libdir_opts="\
 	-L$LIBDIR/$GRADE/$FULLARCH
 	-L$LIBDIR/$FULLARCH
+	-L/usr/local/lib
 "
 LIBDIR_OPTS="$user_libdir_opts $merc_libdir_opts"
 

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



More information about the developers mailing list