change the logic a bit..

git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@320 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
Joshua Kwan 2004-06-21 01:20:56 +00:00
parent b094a201ac
commit c712485ff1
1 changed files with 15 additions and 10 deletions

View File

@ -33,25 +33,30 @@ case "`$CC -V 2>&1`" in
;;
esac
AC_PATH_PROG(MKDEP, mkdep)
AC_PATH_PROG(MAKEDEPEND, makedepend)
AC_MSG_CHECKING([how to generate dependency info])
if test "$ac_cv_c_compiler_gnu" = yes; then
CFLAGS="$CFLAGS -Wall -Wno-unused"
MKDEP="$CC -MM"
MKDEP_DIRECT="> .depend"
AC_MSG_RESULT(gcc)
elif test "$suncc" = yes; then
MKDEP="$CC -xM"
# -xM is noisy
MKDEP_DIRECT="> .depend 2>/dev/null"
else
AC_CHECK_PROG(MKDEP, mkdep, mkdep,)
if test -z "$MKDEP"; then
AC_CHECK_PROG(MKDEP, makedepend, makedepend,)
if test -n "$MKDEP"; then
MKDEP=":> .depend; $MKDEP -f.depend"
AC_MSG_RESULT([Solaris cc])
elif test -n "$MKDEP"; then
AC_MSG_RESULT(mkdep)
elif test -n "$MAKEDEPEND"; then
MKDEP=":> .depend; $MAKEDEPEND -f.depend"
MKDEP_DIRECT=">/dev/null 2>&1" # noisy prick of a program
else
AC_MSG_RESULT(makedepend)
else
MKDEP=:
fi
fi
AC_MSG_RESULT([nothing!])
fi
AC_SUBST(MKDEP)