Only use the installed com_err if we can find a compile_et with the
features we need, as well as libcom_err and com_err.h. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10592 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -9,7 +9,7 @@ krb_cv_compile_et="no"
|
|||||||
if test "${COMPILE_ET}" = "compile_et"; then
|
if test "${COMPILE_ET}" = "compile_et"; then
|
||||||
|
|
||||||
dnl We have compile_et. Now let's see if it supports `prefix' and `index'.
|
dnl We have compile_et. Now let's see if it supports `prefix' and `index'.
|
||||||
AC_MSG_CHECKING(compile_et features)
|
AC_MSG_CHECKING(whether compile_et has the features we need)
|
||||||
cat > conftest.et <<'EOF'
|
cat > conftest.et <<'EOF'
|
||||||
error_table conf
|
error_table conf
|
||||||
prefix CONFTEST
|
prefix CONFTEST
|
||||||
@@ -19,31 +19,46 @@ error_code CODE2, "CODE2"
|
|||||||
end
|
end
|
||||||
EOF
|
EOF
|
||||||
if ${COMPILE_ET} conftest.et >/dev/null 2>&1; then
|
if ${COMPILE_ET} conftest.et >/dev/null 2>&1; then
|
||||||
AC_MSG_RESULT(enough)
|
|
||||||
krb_cv_compile_et="yes"
|
krb_cv_compile_et="yes"
|
||||||
else
|
|
||||||
AC_MSG_RESULT(insufficient)
|
|
||||||
fi
|
fi
|
||||||
|
AC_MSG_RESULT(${krb_cv_compile_et})
|
||||||
rm -fr conftest*
|
rm -fr conftest*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_LIB(com_err, error_message,
|
if test "${krb_cv_compile_et}" = "yes"; then
|
||||||
[krb_cv_com_err="yes"],
|
dnl Since compile_et seems to work, let's check libcom_err
|
||||||
[krb_cv_com_err="no"])
|
krb_cv_save_LIBS="${LIBS}"
|
||||||
|
LIBS="${LIBS} -lcom_err"
|
||||||
|
if test -d "/usr/include/et"; then
|
||||||
|
CPPFLAGS="-I/usr/include/et ${CPPFLAGS}"
|
||||||
|
fi
|
||||||
|
AC_MSG_CHECKING(for com_err)
|
||||||
|
AC_TRY_LINK([#include <com_err.h>],[
|
||||||
|
const char *p;
|
||||||
|
p = error_message(0);
|
||||||
|
],[krb_cv_com_err="yes"],[krb_cv_com_err="no"])
|
||||||
|
AC_MSG_RESULT(${krb_cv_com_err})
|
||||||
|
LIBS="${krb_cv_save_LIBS}"
|
||||||
|
else
|
||||||
|
dnl Since compile_et doesn't work, forget about libcom_err
|
||||||
|
krb_cv_com_err="no"
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Only use the system's compile_et or libcom_err if we have them both.
|
dnl Only use the system's com_err if we found compile_et, libcom_err, and
|
||||||
if test "${krb_cv_compile_et}" = "yes" && \
|
dnl com_err.h.
|
||||||
test "${krb_cv_com_err}" = "yes"; then
|
if test "${krb_cv_com_err}" = "yes"; then
|
||||||
DIR_com_err=""
|
DIR_com_err=""
|
||||||
LIB_com_err="-lcom_err"
|
LIB_com_err="-lcom_err"
|
||||||
LIB_com_err_a=""
|
LIB_com_err_a=""
|
||||||
LIB_com_err_so=""
|
LIB_com_err_so=""
|
||||||
|
AC_MSG_NOTICE(Using the already-installed com_err)
|
||||||
else
|
else
|
||||||
COMPILE_ET="\$(top_builddir)/lib/com_err_compile_et"
|
COMPILE_ET="\$(top_builddir)/lib/com_err_compile_et"
|
||||||
DIR_com_err="com_err"
|
DIR_com_err="com_err"
|
||||||
LIB_com_err="\$(top_builddir)/lib/com_err/libcom_err.la"
|
LIB_com_err="\$(top_builddir)/lib/com_err/libcom_err.la"
|
||||||
LIB_com_err_a="\$(top_builddir)/lib/com_err/.libs/libcom_err.a"
|
LIB_com_err_a="\$(top_builddir)/lib/com_err/.libs/libcom_err.a"
|
||||||
LIB_com_err_so="\$(top_builddir)/lib/com_err/.libs/libcom_err.so"
|
LIB_com_err_so="\$(top_builddir)/lib/com_err/.libs/libcom_err.so"
|
||||||
|
AC_MSG_NOTICE(Using our own com_err)
|
||||||
fi
|
fi
|
||||||
AC_SUBST(DIR_com_err)
|
AC_SUBST(DIR_com_err)
|
||||||
AC_SUBST(LIB_com_err)
|
AC_SUBST(LIB_com_err)
|
||||||
|
Reference in New Issue
Block a user