~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/pandora_canonical.m4

  • Committer: Brian Aker
  • Date: 2010-10-28 17:12:01 UTC
  • mfrom: (1887.1.3 merge)
  • Revision ID: brian@tangent.org-20101028171201-baj6l1bnntn1s4ad
Merge in POTFILES changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl  Copyright (C) 2009 Sun Microsystems, Inc.
2
 
dnl This file is free software; Sun Microsystems, Inc.
 
1
dnl  Copyright (C) 2009 Sun Microsystems
 
2
dnl This file is free software; Sun Microsystems
3
3
dnl gives unlimited permission to copy and/or distribute it,
4
4
dnl with or without modifications, as long as this notice is preserved.
5
5
 
6
6
dnl Which version of the canonical setup we're using
7
 
AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.171])
 
7
AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.161])
8
8
 
9
9
AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
10
10
  AC_ARG_ENABLE([fat-binaries],
38
38
  m4_define([PCT_REQUIRE_CXX],[no])
39
39
  m4_define([PCT_FORCE_GCC42],[no])
40
40
  m4_define([PCT_DONT_SUPPRESS_INCLUDE],[no])
41
 
  m4_define([PCT_NO_VC_CHANGELOG],[no])
42
41
  m4_define([PCT_VERSION_FROM_VC],[no])
43
42
  m4_define([PCT_USE_VISIBILITY],[yes])
44
43
  m4_foreach([pct_arg],[$*],[
59
58
        m4_undefine([PCT_DONT_SUPPRESS_INCLUDE])
60
59
        m4_define([PCT_DONT_SUPPRESS_INCLUDE],[yes])
61
60
      ],
62
 
      [no-vc-changelog], [
63
 
        m4_undefine([PCT_NO_VC_CHANGELOG])
64
 
        m4_define([PCT_NO_VC_CHANGELOG],[yes])
65
 
      ],
66
61
      [version-from-vc], [
67
62
        m4_undefine([PCT_VERSION_FROM_VC])
68
63
        m4_define([PCT_VERSION_FROM_VC],[yes])
109
104
  ])
110
105
  AC_REQUIRE([PANDORA_64BIT])
111
106
 
112
 
  m4_if(PCT_NO_VC_CHANGELOG,yes,[
113
 
    vc_changelog=no
114
 
  ],[
115
 
    vc_changelog=yes
116
 
  ])
117
107
  m4_if(PCT_VERSION_FROM_VC,yes,[
118
108
    PANDORA_VC_VERSION
119
109
  ],[
211
201
    AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned])
212
202
  ])
213
203
 
214
 
  AC_CACHE_CHECK([if system defines RUSAGE_THREAD], [ac_cv_rusage_thread],[
215
 
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
216
 
      [[
217
 
#include <sys/time.h>
218
 
#include <sys/resource.h>
219
 
      ]],[[
220
 
      int x= RUSAGE_THREAD;
221
 
      ]])
222
 
    ],[
223
 
      ac_cv_rusage_thread=yes
224
 
    ],[
225
 
      ac_cv_rusage_thread=no
226
 
    ])
227
 
  ])
228
 
  AS_IF([test "$ac_cv_rusage_thread" = "no"],[
229
 
    AC_DEFINE([RUSAGE_THREAD], [RUSAGE_SELF],
230
 
      [Define if system doesn't define])
231
 
  ])
232
 
 
233
204
  AC_CHECK_LIBM
234
205
  dnl Bug on FreeBSD - LIBM check doesn't set the damn variable
235
206
  AC_SUBST([LIBM])
254
225
 
255
226
  PANDORA_HAVE_GCC_ATOMICS
256
227
 
 
228
  save_CFLAGS="${CFLAGS}"
 
229
  CFLAGS="${CFLAGS} -Werror"
 
230
  PANDORA_CHECK_VISIBILITY
 
231
  CFLAGS="${save_CFLAGS}"
257
232
  m4_if(PCT_USE_VISIBILITY,[yes],[
258
233
    PANDORA_ENABLE_VISIBILITY
259
 
    ],[
260
 
    PANDORA_CHECK_VISIBILITY
261
234
  ])
262
235
 
263
236
  PANDORA_HEADER_ASSERT
355
328
#endif
356
329
 
357
330
#if !defined(HAVE_ULONG) && !defined(__USE_MISC)
358
 
# define HAVE_ULONG 1
359
331
typedef unsigned long int ulong;
360
332
#endif
361
333
 
377
349
#define get_socket_errno() errno
378
350
#endif
379
351
 
380
 
#if defined(__cplusplus)
381
 
# if defined(DEBUG)
382
 
#  include <cassert>
383
 
#  include <cstddef>
384
 
# endif
385
 
template<typename To, typename From>
386
 
inline To implicit_cast(From const &f) {
387
 
  return f;
388
 
}
389
 
template<typename To, typename From>     // use like this: down_cast<T*>(foo);
390
 
inline To down_cast(From* f) {                   // so we only accept pointers
391
 
  // Ensures that To is a sub-type of From *.  This test is here only
392
 
  // for compile-time type checking, and has no overhead in an
393
 
  // optimized build at run-time, as it will be optimized away
394
 
  // completely.
395
 
  if (false) {
396
 
    implicit_cast<From*, To>(0);
397
 
  }
398
 
 
399
 
#if defined(DEBUG)
400
 
  assert(f == NULL || dynamic_cast<To>(f) != NULL);  // RTTI: debug mode only!
401
 
#endif
402
 
  return static_cast<To>(f);
403
 
}
404
 
#endif /* defined(__cplusplus) */
405
 
 
406
352
#endif /* __CONFIG_H__ */
407
353
  ])
408
354