CHECK_SYMBOL_EXISTS(system stdlib.h HAVE_SYSTEM)
CHECK_SYMBOL_EXISTS(CreateProcess windows.h HAVE_CREATEPROCESS)
CHECK_FUNCTION_EXISTS(stpcpy HAVE_STPCPY)
+CHECK_FUNCTION_EXISTS(sbrk HAVE_SBRK)
### Configure build
AC_MSG_CHECKING(for CreateProcess)
AC_TRY_LINK([#include <windows.h>], [CreateProcess(NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL);],AC_MSG_RESULT(yes);AC_DEFINE(HAVE_CREATEPROCESS, 1, [Define to 1 if you have the `CreateProcess' function.]) speech_cmdline=yes; speech_cmdline_reason="CreateProcess exists", AC_MSG_RESULT(no))
+# sbrk
+AC_MSG_CHECKING(for sbrk)
+AC_TRY_LINK([#include <unistd.h>], [sbrk(0);],AC_MSG_RESULT(yes);AC_DEFINE(HAVE_SBRK, 1, [Define to 1 if you have the `sbrk' function.]),AC_MSG_RESULT(no))
+
+
AC_ARG_ENABLE(graphics-sdl, [ --disable-graphics-sdl don't create graphics sdl], graphics_sdl=$enableval;graphics_sdl_reason="configure parameter")
if test "x${graphics_sdl}" = "xyes" ; then
static void
progress_memory(void)
{
-#ifdef HAVE_UNISTD_H
+#ifdef HAVE_SBRK
long mem=(long)sbrk(0)-start_brk;
fprintf(stderr," %ld MB",mem/1024/1024);
#endif
p.process_relations=1;
p.timestamp=current_to_iso8601();
-#ifdef HAVE_UNISTD_H
+#ifdef HAVE_SBRK
start_brk=(long)sbrk(0);
#endif
gettimeofday(&start_tv, NULL);