* Ralf Wildenhues wrote on Sun, Mar 02, 2008 at 03:06:14PM CET:
> * Artur R. Czechowski wrote on Sun, Mar 02, 2008 at 02:47:13PM CET:
> > 
> > AC_TRY_RUN([#include <stdlib.h>
> > int main()
> > {
> >   static struct random_data rand_data;
> >   static char rand_state[256];
> >   initstate_r(0, rand_state, sizeof(rand_state), &rand_data);
> >   exit(0);
> > }], initstate_r_works=yes,, ])
> 
> Please drop the two consecutive commas and the trailing space, then
> retry.

Ah, now I understand why they are there.  You are trying to fool
autoconf so that the configure script does not cause an error when cross
compiling.  Well, don't do that.  Do something like

AC_TRY_RUN([#include <stdlib.h>
int main()
{
  static struct random_data rand_data;
  static char rand_state[256];
  initstate_r(0, rand_state, sizeof(rand_state), &rand_data);
  exit(0);
}], [initstate_r_works=yes], [initstate_r_works=no], [initstate_r_works=no])

in order to be on the safe side.  In the cross-compiling arg, you could
also test for $host or $host_os bits (in which case you have to ensure
that AC_CANONICAL_HOST has been invoked earlier) and set things for
systems you know about for sure.

BTW, AC_TRY_RUN has been obsoleted, autoupdate can typically update your
configure.ac script to use AC_RUN_IFELSE.

Cheers,
Ralf



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to