ruby-configure.patch 766 B

1234567891011121314151617181920212223242526272829
  1. --- ruby-1.8.3/configure.in.orig 2005-11-29 11:18:27.000000000 +0100
  2. +++ ruby-1.8.3/configure.in 2005-11-29 11:19:46.000000000 +0100
  3. @@ -529,7 +529,25 @@
  4. fi
  5. AC_FUNC_GETPGRP
  6. -AC_FUNC_SETPGRP
  7. +
  8. +dnl AC_FUNC_SETPGRP does not work if cross compiling
  9. +dnl Instead, assume we will have a prototype for setpgrp if cross compiling.
  10. +if test "$cross_compiling" = no; then
  11. + AC_FUNC_SETPGRP
  12. +else
  13. + AC_CACHE_CHECK([whether setpgrp takes no argument], ac_cv_func_setpgrp_void,
  14. + [AC_TRY_COMPILE([
  15. +#include <unistd.h>
  16. +], [
  17. + if (setpgrp(1,1) == -1)
  18. + exit (0);
  19. + else
  20. + exit (1);
  21. +], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes)])
  22. +if test $ac_cv_func_setpgrp_void = yes; then
  23. + AC_DEFINE(SETPGRP_VOID, 1)
  24. +fi
  25. +fi
  26. AC_C_BIGENDIAN
  27. AC_C_CONST