[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hurd's configure.in



libc's aclocal.m4 has macros that appear to have the same intent as the one
in the hurd's aclocal.m4 (I'm not entirely clear on what the point of these
actually is).  Can you try replacing your hurd aclocal.m4 with the
following, and changing hurd_PROC_CC -> AC_PROG_CC_LOCAL in configure.in,
and tell me whether that works with autoconf-2.50?  If not, then libc will
have a problem too.  Either way, we should have the same code for these
macros in libc and in hurd (gnumach has them too).


dnl These modifications are to allow for an empty cross compiler tree.
dnl In the situation that cross-linking is impossible, the variable
dnl `cross_linkable' will be substituted with "yes".
dnl The vercheck macros are expected to have been called already.
AC_DEFUN(AC_PROG_CC_LOCAL,
[AC_BEFORE([$0], [AC_PROG_CPP])dnl

AC_PROG_CC_WORKS_LOCAL
AC_PROG_CC_GNU
if test $ac_cv_prog_gcc != yes; then
  AC_MSG_ERROR([GNU libc must be compiled using GNU CC])
fi
])

AC_DEFUN(AC_PROG_CC_WORKS_LOCAL,
[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
AC_CACHE_VAL(ac_cv_prog_cc_works,
[AC_LANG_SAVE
AC_LANG_C
AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works,
ac_cv_prog_cc_cross)
AC_LANG_RESTORE])
AC_MSG_RESULT($ac_cv_prog_cc_works)
if test $ac_cv_prog_cc_works = no; then
 cross_linkable=no
 ac_cv_prog_cc_cross=yes
dnl AC_MSG_ERROR([installation or configuration problem: C compiler cannot
create executables.])
else
 cross_linkable=yes
fi
AC_CACHE_CHECK(
[whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler],
ac_cv_prog_cc_cross, [:])
AC_SUBST(cross_linkable)
cross_compiling=$ac_cv_prog_cc_cross
])



Reply to: