OL_MKDEPEND: Round 2

now supports DETECTION using:
	./configure
	env MKDEP_FLAGS=-MM ./configure
	env MKDEP=foo ./configure (no tests, no flags)
	env MKDEP=foo MKDEP_FLAGS=-bar ./configure (no tests)
Exported AC_MKDEP and AC_MKDEP_FLAGS which can no be used
in build/*.mk
This commit is contained in:
Kurt Zeilenga 1999-06-08 01:33:36 +00:00
parent b594f5209f
commit a9fca665e6
3 changed files with 557 additions and 535 deletions

View File

@ -80,31 +80,40 @@ AC_SUBST(LN_H)dnl
dnl dnl
dnl ==================================================================== dnl ====================================================================
dnl Check for dependency generation flag dnl Check for dependency generation flag
AC_DEFUN([OL_CC_DEPEND], [# test for cc depend flag AC_DEFUN([OL_MKDEPEND], [# test for make depend flag
AC_CACHE_CHECK([for ${CC-cc} depend flag], ol_cv_cc_depend, OL_MKDEP=
[ ol_cv_cc_depend=no OL_MKDEP_FLAGS=
if test $GCC = yes ; then if test -z "${MKDEP}"; then
ol_cv_cc_depend="-M" OL_MKDEP="${CC-cc}"
else if test -z "${MKDEP_FLAGS}"; then
AC_CACHE_CHECK([for ${OL_MKDEP} depend flag], ol_cv_mkdep, [
ol_cv_mkdep=no
for flag in "-M" "-xM"; do for flag in "-M" "-xM"; do
cat > conftest.c <<EOF cat > conftest.c <<EOF
noCode; noCode;
EOF EOF
if AC_TRY_COMMAND(${CC-cc} $flag conftest.c) \ if AC_TRY_COMMAND($OL_MKDEP $flag conftest.c) \
| egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1 | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
then then
cc_cv_cc_depend=$flag ol_cv_mkdep=$flag
OL_MKDEP_FLAGS="$flag"
break break
fi fi
done done
rm -f conftest* rm -f conftest*
fi]) ])
if test "${ol_cv_cc_depend}" != no ; then else
CC_DEPEND_FLAGS="${ol_cv_cc_depend}" cc_cv_mkdep=yes
AC_SUBST(CC_DEPEND_FLAGS) OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
fi
else else
AC_MSG_WARN([do not know how to generate dependencies]) cc_cv_mkdep=yes
fi]) OL_MKDEP="${MKDEP}"
OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
fi
dnl AC_SUBST(OL_MKDEP)
dnl AC_SUBST(OL_MKDEP_FLAGS)
])
dnl dnl
dnl ==================================================================== dnl ====================================================================
dnl Check if system uses EBCDIC instead of ASCII dnl Check if system uses EBCDIC instead of ASCII

1016
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -408,8 +408,11 @@ fi
dnl AM_C_PROTOTYPES dnl AM_C_PROTOTYPES
dnl Check cc depend flags dnl Check cc depend flags
OL_CC_DEPEND OL_MKDEPEND
if test "${ol_cv_mkdep}" = no ; then
# this will soon become an error
AC_MSG_WARN([do not know how to generate dependencies])
fi
dnl Checks for libraries dnl Checks for libraries