~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/misc.m4

  • Committer: Monty Taylor
  • Date: 2009-03-18 19:18:55 UTC
  • mto: (950.1.1 mordred)
  • mto: This revision was merged to the branch mainline in revision 943.
  • Revision ID: mordred@inaugust.com-20090318191855-30mv0eskfel4giwx
Removed more unused macros/things we don't need to check because they are posix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Local macros for automake & autoconf
2
2
 
3
3
 
4
 
 
5
 
AC_DEFUN([DRIZZLE_TIMESPEC_TS],
6
 
[AC_CACHE_CHECK([if struct timespec has a ts_sec member], mysql_cv_timespec_ts,
7
 
[AC_TRY_COMPILE([#include <pthread.h>
8
 
#ifdef __cplusplus
9
 
extern "C"
10
 
#endif
11
 
],
12
 
[struct timespec abstime;
13
 
 
14
 
abstime.ts_sec = time(NULL)+1;
15
 
abstime.ts_nsec = 0;
16
 
], mysql_cv_timespec_ts=yes, mysql_cv_timespec_ts=no)])
17
 
if test "$mysql_cv_timespec_ts" = "yes"
18
 
then
19
 
  AC_DEFINE([HAVE_TIMESPEC_TS_SEC], [1],
20
 
            [Timespec has a ts_sec instead of tv_sev])
21
 
fi
22
 
])
23
 
 
24
 
AC_DEFUN([DRIZZLE_TZNAME],
25
 
[AC_CACHE_CHECK([if we have tzname variable], mysql_cv_tzname,
26
 
[AC_TRY_COMPILE([#include <time.h>
27
 
#ifdef __cplusplus
28
 
extern "C"
29
 
#endif
30
 
],
31
 
[ tzset();
32
 
  return tzname[0] != 0;
33
 
], mysql_cv_tzname=yes, mysql_cv_tzname=no)])
34
 
if test "$mysql_cv_tzname" = "yes"
35
 
then
36
 
  AC_DEFINE([HAVE_TZNAME], [1], [Have the tzname variable])
37
 
fi
38
 
])
39
 
 
40
 
 
41
4
AC_DEFUN([DRIZZLE_PTHREAD_YIELD],[
42
5
# Some OSes like Mac OS X have that as a replacement for pthread_yield()
43
6
AC_CHECK_FUNCS(pthread_yield_np, AC_DEFINE([HAVE_PTHREAD_YIELD_NP],[],[Define if you have pthread_yield_np]))