[HURD PATCH 2/7] Add check for file_exec_file_name
Jeremie Koenig
jk@jk.fr.eu.org
Wed Aug 17 19:52:00 GMT 2011
From: Emilio Pozuelo Monfort <pochu27@gmail.com>
* aclocal.m4: Define AC_CHECK_MIG_FUNC.
* sysdeps/mach/hurd/configure.in: Use it for file_exec_file_name.
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
---
aclocal.m4 | 17 +++++++++++++++++
sysdeps/mach/hurd/configure.in | 3 +++
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/aclocal.m4 b/aclocal.m4
index 6ad3c87..64bb4d3 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -103,12 +103,29 @@ OBJDUMP=`$CC -print-prog-name=objdump`
AC_SUBST(OBJDUMP)
# Determine whether we are using GNU binutils.
AC_CACHE_CHECK(whether $AS is GNU as, libc_cv_prog_as_gnu,
[LIBC_PROG_FOO_GNU($AS, libc_cv_prog_as_gnu=yes, libc_cv_prog_as_gnu=no)])
rm -f a.out
gnu_as=$libc_cv_prog_as_gnu
AC_CACHE_CHECK(whether $LD is GNU ld, libc_cv_prog_ld_gnu,
[LIBC_PROG_FOO_GNU($LD, libc_cv_prog_ld_gnu=yes, libc_cv_prog_ld_gnu=no)])
gnu_ld=$libc_cv_prog_ld_gnu
])
+
+dnl AC_CHECK_MIG_FUNC(DEFS-FILE, FUNCTION, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+AC_DEFUN([AC_CHECK_MIG_FUNC],
+[
+ AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$2])
+ AC_CACHE_CHECK([for $2], ac_var,
+ [mig -q -V -list conf.mig.list -server conf.mig.server \
+ -user conf.mig.user -header conf.mig.header $1
+ if grep -wq $2 conf.mig.list; then
+ AS_VAR_SET(ac_var, yes)
+ else
+ AS_VAR_SET(ac_var, no)
+ fi
+ rm -f conf.mig.*])
+ AS_IF([test AS_VAR_GET(ac_var) = yes], [$3], [$4])
+ AS_VAR_POPDEF([ac_var])
+])
diff --git a/sysdeps/mach/hurd/configure.in b/sysdeps/mach/hurd/configure.in
index 87c07c1..370be79 100644
--- a/sysdeps/mach/hurd/configure.in
+++ b/sysdeps/mach/hurd/configure.in
@@ -15,24 +15,27 @@ if test "x$prefix" != x; then
fi
case "$machine" in
i386*)
# The default oldest ABI is 2.2.6.
# We only need a "yes" here if the oldest ABI supported will be < 2.2.6.
if test "$oldest_abi" != default && test "$oldest_abi" \< "2.2.6"; then
libc_cv_gcc_unwind_find_fde=yes
fi
;;
esac
+AC_CHECK_MIG_FUNC([/usr/include/hurd/fs.defs], [file_exec_file_name],,
+ [AC_MSG_ERROR('Your Hurd definitions dont provide file_exec_file_name')])
+
AC_CACHE_CHECK(Hurd header version, libc_cv_hurd_version, [dnl
AC_TRY_COMPILE(dnl
[#include <hurd/version.h>], [
#define NEED_VERSION 20020609
#if HURD_INTERFACE_VERSION < NEED_VERSION
# error Hurd version too old: HURD_INTERFACE_VERSION < NEED_VERSION
#endif],
libc_cv_hurd_version=ok,
libc_cv_hurd_version=bad)])
if test "x$libc_cv_hurd_version" != xok; then
AC_MSG_ERROR(Hurd headers not installed or too old)
fi
--
1.7.5.4
More information about the Libc-alpha
mailing list