On 3 Jul 2000, Akim Demaille wrote:
> You didn't send the input, but my bet is that you have nested two here
> docs with the same tags. You might not even know this since Autoconf
> stupidly uses EOF at zillions of different places. I plan to change
> them all into ACEOF or alike.
>
> But then, maybe that's another issue :)
Here is the input from configure.in.
AC_CHECK_FUNC(BSDgettimeofday, AC_DEFINE(HAVE_BSDGETTIMEOFDAY),
AC_CHECK_FUNC(gettimeofday, , AC_DEFINE(NO_GETTOD)))
AC_MSG_CHECKING([for gettimeofday declaration])
AC_EGREP_HEADER(gettimeofday, sys/time.h, AC_MSG_RESULT(present), [
AC_MSG_RESULT(missing)
AC_DEFINE(GETTOD_NOT_DECLARED)
])
Here is what appears in the configure file. I really
have no idea what the diff between EOF and \EOF is.
echo "configure:3955: checking for BSDgettimeofday" >&5
echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6
if test "${ac_cv_func_BSDgettimeofday+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<EOF
#line 3961 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char BSDgettimeofday (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char BSDgettimeofday ();
char (*f) ();
int
main ()
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
choke me
#else
f = BSDgettimeofday;
#endif
;
return 0;
}
EOF
if { (eval echo configure:3989: \"$ac_link\") >&5; (eval $ac_link) 2>&5;
} && test -s conftest${ac_exeext}; then
ac_cv_func_BSDgettimeofday=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
ac_cv_func_BSDgettimeofday=no
fi
rm -f conftest*
fi
echo "configure:3998: result: $ac_cv_func_BSDgettimeofday" >&5
echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6
if test $ac_cv_func_BSDgettimeofday = yes; then
cat >>confdefs.h <<\EOF
#define HAVE_BSDGETTIMEOFDAY 1
EOF
else
echo "configure:4005: checking for gettimeofday" >&5
echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
if test "${ac_cv_func_gettimeofday+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<EOF
#line 4011 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes
fi
echo "configure:4015: checking for gettimeofday declaration" >&5
echo $ECHO_N "checking for gettimeofday declaration... $ECHO_C" >&6
cat >conftest.$ac_ext <<EOF
#line 4018 "configure"
#include "confdefs.h"
#include <sys/time.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "gettimeofday" >/dev/null 2>&1; then
echo "configure:4024: result: present" >&5
echo "${ECHO_T}present" >&6
else
echo "configure:4027: result: missing" >&5
echo "${ECHO_T}missing" >&6
cat >>confdefs.h <<\EOF
#define GETTOD_NOT_DECLARED 1
EOF
fi
rm -f conftest*
Mo DeJong
Red Hat Inc