1
dnl Copyright (C) 2009 Sun Microsystems
2
dnl This file is free software; Sun Microsystems
3
dnl gives unlimited permission to copy and/or distribute it,
4
dnl with or without modifications, as long as this notice is preserved.
6
AC_DEFUN([PANDORA_EXTENSIONS],[
8
m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
9
[AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
10
[AC_REQUIRE([AC_GNU_SOURCE])])
14
AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS],[
15
AC_REQUIRE([PANDORA_EXTENSIONS])
1
dnl Provide AC_USE_SYSTEM_EXTENSIONS for old autoconf machines.
2
AC_DEFUN([ACX_USE_SYSTEM_EXTENSIONS],[
3
ifdef([AC_USE_SYSTEM_EXTENSIONS],[
4
AC_USE_SYSTEM_EXTENSIONS
6
AC_BEFORE([$0], [AC_COMPILE_IFELSE])
7
AC_BEFORE([$0], [AC_RUN_IFELSE])
9
AC_REQUIRE([AC_GNU_SOURCE])
11
AC_REQUIRE([AC_MINIX])
13
AH_VERBATIM([__EXTENSIONS__],
14
[/* Enable extensions on Solaris. */
15
#ifndef __EXTENSIONS__
16
# undef __EXTENSIONS__
18
#ifndef _POSIX_PTHREAD_SEMANTICS
19
# undef _POSIX_PTHREAD_SEMANTICS
21
#ifndef _TANDEM_SOURCE
22
# undef _TANDEM_SOURCE
24
AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
25
[ac_cv_safe_to_define___extensions__],
28
# define __EXTENSIONS__ 1
29
AC_INCLUDES_DEFAULT])],
30
[ac_cv_safe_to_define___extensions__=yes],
31
[ac_cv_safe_to_define___extensions__=no])])
32
test $ac_cv_safe_to_define___extensions__ = yes &&
33
AC_DEFINE([__EXTENSIONS__])
34
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
35
AC_DEFINE([_TANDEM_SOURCE])