> +/* On AmigaOS, fork() isn't implemented due to missing MP. */
> +int main ()
> +{
> + if (fork() < 0)
> + exit (1);
> + exit (0);
> +}],
> + [ac_cv_func_fork_works=yes],
> + [ac_cv_func_fork_works=no],
> + [AC_CHECK_FUNC(fork)
> +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __amigaos__;])],
> + [ac_cv_func_fork_works=no],
> + [ac_cv_func_fork_works=$ac_cv_func_fork])
There are some other systems were fork exists but is not implemented
(such as DJGPP). So I'm not too happy about the hardcoded reference
to AmigaOS.
For the cross-compiling case, I think
case "$host" in
*-*-amigaos* | *-*-msdosdjgpp*)
# Override, as these systems have only a dummy fork() stub
ac_cv_func_fork_works=no
;;
esac
will do just fine; no need to try a compile.
And I'd use
/* Some systems only have a dummy stub for fork() */
or something similar.