mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-11 11:53:51 +00:00
Fix `mmc --make' test failures in debugging grades on mundroo
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.
This commit is contained in:
6
aclocal.m4
vendored
6
aclocal.m4
vendored
@@ -95,6 +95,7 @@ AC_DEFUN(MERCURY_CHECK_LOCAL_C_INCL_DIRS,
|
||||
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 @@ else
|
||||
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 @@ AC_MSG_CHECKING(whether to pass -L/usr/local/lib to the linker)
|
||||
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)
|
||||
])
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
@@ -52,6 +52,8 @@ export DEFAULT_MERCURY_LINKAGE
|
||||
# --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@}\" \
|
||||
|
||||
Reference in New Issue
Block a user