mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
First cut of OL_CC_DEPEND test. Attempts to detect the appropriate
flag to generate dependencies. Output not used (yet).
This commit is contained in:
parent
ca00536233
commit
b594f5209f
@ -79,6 +79,34 @@ AC_SUBST(LN_H)dnl
|
|||||||
])dnl
|
])dnl
|
||||||
dnl
|
dnl
|
||||||
dnl ====================================================================
|
dnl ====================================================================
|
||||||
|
dnl Check for dependency generation flag
|
||||||
|
AC_DEFUN([OL_CC_DEPEND], [# test for cc depend flag
|
||||||
|
AC_CACHE_CHECK([for ${CC-cc} depend flag], ol_cv_cc_depend,
|
||||||
|
[ ol_cv_cc_depend=no
|
||||||
|
if test $GCC = yes ; then
|
||||||
|
ol_cv_cc_depend="-M"
|
||||||
|
else
|
||||||
|
for flag in "-M" "-xM"; do
|
||||||
|
cat > conftest.c <<EOF
|
||||||
|
noCode;
|
||||||
|
EOF
|
||||||
|
if AC_TRY_COMMAND(${CC-cc} $flag conftest.c) \
|
||||||
|
| egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
cc_cv_cc_depend=$flag
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
rm -f conftest*
|
||||||
|
fi])
|
||||||
|
if test "${ol_cv_cc_depend}" != no ; then
|
||||||
|
CC_DEPEND_FLAGS="${ol_cv_cc_depend}"
|
||||||
|
AC_SUBST(CC_DEPEND_FLAGS)
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([do not know how to generate dependencies])
|
||||||
|
fi])
|
||||||
|
dnl
|
||||||
|
dnl ====================================================================
|
||||||
dnl Check if system uses EBCDIC instead of ASCII
|
dnl Check if system uses EBCDIC instead of ASCII
|
||||||
AC_DEFUN([OL_CPP_EBCDIC], [# test for EBCDIC
|
AC_DEFUN([OL_CPP_EBCDIC], [# test for EBCDIC
|
||||||
AC_MSG_CHECKING([for EBCDIC])
|
AC_MSG_CHECKING([for EBCDIC])
|
||||||
|
@ -407,6 +407,10 @@ fi
|
|||||||
|
|
||||||
dnl AM_C_PROTOTYPES
|
dnl AM_C_PROTOTYPES
|
||||||
|
|
||||||
|
dnl Check cc depend flags
|
||||||
|
OL_CC_DEPEND
|
||||||
|
|
||||||
|
|
||||||
dnl Checks for libraries
|
dnl Checks for libraries
|
||||||
|
|
||||||
dnl Find socket()
|
dnl Find socket()
|
||||||
|
Loading…
Reference in New Issue
Block a user