AC_DEFUN(GST_FUNC_WAITPID, [
AC_REQUIRE([AC_HEADER_SYS_WAIT])
AC_CHECK_FUNCS(wait wait3 waitpid)
# Check whether we have no waitpid, but we can emulate it
if test $ac_cv_func_waitpid = no; then
  if test $ac_cv_func_wait = yes || test $ac_cv_func_wait3 = yes; then
    LIBOBJS="$LIBOBJS waitpid.o"
    AC_DEFINE(HAVE_WAITPID)
  fi
fi


])dnl
