extensions.m4 927 B

123456789101112131415161718192021222324252627282930
  1. # Enable extensions on systems that normally disable them.
  2. # Copyright (C) 2003 Free Software Foundation, Inc.
  3. # This file is free software; the Free Software Foundation
  4. # gives unlimited permission to copy and/or distribute it,
  5. # with or without modifications, as long as this notice is preserved.
  6. # gl_USE_SYSTEM_EXTENSIONS
  7. # ------------------------
  8. # Enable extensions on systems that normally disable them,
  9. # typically due to standards-conformance issues.
  10. AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], [
  11. AC_BEFORE([$0], [AC_COMPILE_IFELSE])
  12. AC_BEFORE([$0], [AC_RUN_IFELSE])
  13. AC_REQUIRE([AC_GNU_SOURCE])
  14. AC_REQUIRE([AC_AIX])
  15. AC_REQUIRE([AC_MINIX])
  16. AH_VERBATIM([__EXTENSIONS__],
  17. [/* Enable extensions on Solaris. */
  18. #ifndef __EXTENSIONS__
  19. # undef __EXTENSIONS__
  20. #endif
  21. #ifndef _POSIX_PTHREAD_SEMANTICS
  22. # undef _POSIX_PTHREAD_SEMANTICS
  23. #endif])
  24. AC_DEFINE([__EXTENSIONS__])
  25. AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
  26. ])