| 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)
| ])
This is indecent from you Mo, exhibiting all these poor macros naked
on a public list! You could have left their quotes on :)
AC_CHECK_FUNC(BSDgettimeofday,
[AC_DEFINE(HAVE_BSDGETTIMEOFDAY)],
[AC_CHECK_FUNC(gettimeofday, ,
[AC_DEFINE(NO_GETTOD)])])
In fact, this might be enough to catch the problem. A common trap
when under quoting is that the (&*£$ syntax of sh) the right parens of
case statements are understood by m4 [1]. I don't know if there are
some above, but in that case the result is a stupid configure.
I tell you my friend, the path to felicity is paved with quotes :)
| Here is what appears in the configure file. I really
| have no idea what the diff between EOF and \EOF is.
About the same as in "" vs ''. But the closing tag does not wear the
`\', only the opening one. I was referring to a different issue:
there are places where you'd better not use EOF at all, since Autoconf
uses it internally. Stupid Autoconf :(
| | 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
Something is broken here: you have two openers (<<EOF) but only one
closer. My bet is that right after `hopefully few prototypes' there
is a coma, and since you under quoted, m4 completely lost track of the
various arguments.
There is nothing as beautiful as a perfectly quoted m4 program :)
Akim
[1] BTW, what is the conclusion on the portability of
case (pattern) action ;; esac
???