|
version 1.1, 2012/02/21 22:57:49
|
version 1.1.1.2, 2012/05/29 09:29:44
|
|
Line 1
|
Line 1
|
| # serial 8 -*- Autoconf -*- | # serial 10 -*- Autoconf -*- |
| # Enable extensions on systems that normally disable them. |
# Enable extensions on systems that normally disable them. |
| |
|
| # Copyright (C) 2003, 2006-2009 Free Software Foundation, Inc. | # Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. |
| # This file is free software; the Free Software Foundation |
# This file is free software; the Free Software Foundation |
| # gives unlimited permission to copy and/or distribute it, |
# gives unlimited permission to copy and/or distribute it, |
| # with or without modifications, as long as this notice is preserved. |
# with or without modifications, as long as this notice is preserved. |
|
Line 12
|
Line 12
|
| # enough in this area it's likely we'll need to redefine |
# enough in this area it's likely we'll need to redefine |
| # AC_USE_SYSTEM_EXTENSIONS for quite some time. |
# AC_USE_SYSTEM_EXTENSIONS for quite some time. |
| |
|
| |
# If autoconf reports a warning |
| |
# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS |
| |
# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS |
| |
# the fix is |
| |
# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked |
| |
# but always AC_REQUIREd, |
| |
# 2) to ensure that for each occurrence of |
| |
# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) |
| |
# or |
| |
# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) |
| |
# the corresponding gnulib module description has 'extensions' among |
| |
# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS |
| |
# invocation occurs in gl_EARLY, not in gl_INIT. |
| |
|
| # AC_USE_SYSTEM_EXTENSIONS |
# AC_USE_SYSTEM_EXTENSIONS |
| # ------------------------ |
# ------------------------ |
| # Enable extensions on systems that normally disable them, |
# Enable extensions on systems that normally disable them, |
|
Line 53 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
|
Line 67 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
|
| #ifndef _ALL_SOURCE |
#ifndef _ALL_SOURCE |
| # undef _ALL_SOURCE |
# undef _ALL_SOURCE |
| #endif |
#endif |
| |
/* Enable general extensions on MacOS X. */ |
| |
#ifndef _DARWIN_C_SOURCE |
| |
# undef _DARWIN_C_SOURCE |
| |
#endif |
| /* Enable GNU extensions on systems that have them. */ |
/* Enable GNU extensions on systems that have them. */ |
| #ifndef _GNU_SOURCE |
#ifndef _GNU_SOURCE |
| # undef _GNU_SOURCE |
# undef _GNU_SOURCE |
|
Line 74 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
|
Line 92 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
|
| [ac_cv_safe_to_define___extensions__], |
[ac_cv_safe_to_define___extensions__], |
| [AC_COMPILE_IFELSE( |
[AC_COMPILE_IFELSE( |
| [AC_LANG_PROGRAM([[ |
[AC_LANG_PROGRAM([[ |
| # define __EXTENSIONS__ 1 | # define __EXTENSIONS__ 1 |
| ]AC_INCLUDES_DEFAULT])], | ]AC_INCLUDES_DEFAULT])], |
| [ac_cv_safe_to_define___extensions__=yes], |
[ac_cv_safe_to_define___extensions__=yes], |
| [ac_cv_safe_to_define___extensions__=no])]) |
[ac_cv_safe_to_define___extensions__=no])]) |
| test $ac_cv_safe_to_define___extensions__ = yes && |
test $ac_cv_safe_to_define___extensions__ = yes && |
| AC_DEFINE([__EXTENSIONS__]) |
AC_DEFINE([__EXTENSIONS__]) |
| AC_DEFINE([_ALL_SOURCE]) |
AC_DEFINE([_ALL_SOURCE]) |
| |
AC_DEFINE([_DARWIN_C_SOURCE]) |
| AC_DEFINE([_GNU_SOURCE]) |
AC_DEFINE([_GNU_SOURCE]) |
| AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) |
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) |
| AC_DEFINE([_TANDEM_SOURCE]) |
AC_DEFINE([_TANDEM_SOURCE]) |