1
# Enable extensions on systems that normally disable them.
3
# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
4
# This file is free software; the Free Software Foundation
5
# gives unlimited permission to copy and/or distribute it,
6
# with or without modifications, as long as this notice is preserved.
8
# This file is only needed in autoconf <= 2.59. Newer versions of autoconf
9
# have a macro AC_USE_SYSTEM_EXTENSIONS with identical semantics.
11
# gl_USE_SYSTEM_EXTENSIONS
12
# ------------------------
13
# Enable extensions on systems that normally disable them,
14
# typically due to standards-conformance issues.
15
AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], [
16
AC_BEFORE([$0], [AC_COMPILE_IFELSE])
17
AC_BEFORE([$0], [AC_RUN_IFELSE])
19
AC_REQUIRE([AC_GNU_SOURCE])
21
AC_REQUIRE([AC_MINIX])
23
AH_VERBATIM([__EXTENSIONS__],
24
[/* Enable extensions on Solaris. */
25
#ifndef __EXTENSIONS__
26
# undef __EXTENSIONS__
28
#ifndef _POSIX_PTHREAD_SEMANTICS
29
# undef _POSIX_PTHREAD_SEMANTICS
31
AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
32
[ac_cv_safe_to_define___extensions__],
35
#define __EXTENSIONS__ 1
36
AC_INCLUDES_DEFAULT])],
37
[ac_cv_safe_to_define___extensions__=yes],
38
[ac_cv_safe_to_define___extensions__=no])])
39
test $ac_cv_safe_to_define___extensions__ = yes &&
40
AC_DEFINE([__EXTENSIONS__])
41
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])