~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/ac_system_extensions.m4

  • Committer: Monty Taylor
  • Date: 2008-12-08 01:14:34 UTC
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: monty@inaugust.com-20081208011434-5e5m8nwqruhap24c
Reverted gnulib changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Profive AC_USE_SYSTEM_EXTENSIONS for old autoconf machines.
 
2
ifndef([AC_USE_SYSTEM_EXTENSIONS],[
 
3
AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS],[
 
4
  AC_BEFORE([$0], [AC_COMPILE_IFELSE])
 
5
  AC_BEFORE([$0], [AC_RUN_IFELSE])
 
6
 
 
7
  AC_REQUIRE([AC_GNU_SOURCE])
 
8
  AC_REQUIRE([AC_AIX])
 
9
  AC_REQUIRE([AC_MINIX])
 
10
 
 
11
  AH_VERBATIM([__EXTENSIONS__],
 
12
[/* Enable extensions on Solaris.  */
 
13
#ifndef __EXTENSIONS__
 
14
# undef __EXTENSIONS__
 
15
#endif#ifndef _POSIX_PTHREAD_SEMANTICS
 
16
# undef _POSIX_PTHREAD_SEMANTICS
 
17
#endif
 
18
#ifndef _TANDEM_SOURCE
 
19
# undef _TANDEM_SOURCE
 
20
#endif])
 
21
  AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
 
22
    [ac_cv_safe_to_define___extensions__],
 
23
    [AC_COMPILE_IFELSE(
 
24
       [AC_LANG_PROGRAM([
 
25
#         define __EXTENSIONS__ 1
 
26
          AC_INCLUDES_DEFAULT])],
 
27
       [ac_cv_safe_to_define___extensions__=yes],
 
28
       [ac_cv_safe_to_define___extensions__=no])])
 
29
  test $ac_cv_safe_to_define___extensions__ = yes &&
 
30
    AC_DEFINE([__EXTENSIONS__])
 
31
  AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
 
32
  AC_DEFINE([_TANDEM_SOURCE])
 
33
])
 
34
])