~mordred/ubuntu/lucid/pandora-build/lucid

« back to all changes in this revision

Viewing changes to m4/pandora_canonical.m4

  • Committer: Monty Taylor
  • Date: 2010-12-10 20:45:01 UTC
  • mfrom: (91.1.60 lifeless)
  • Revision ID: mordred@inaugust.com-20101210204501-mdninq1xl26pgm8o
* New upstream release.
* New upstream release.
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.159])
 
7
AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.162])
8
8
 
9
9
AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
10
10
  AC_ARG_ENABLE([fat-binaries],
108
108
    PANDORA_VC_VERSION
109
109
  ],[
110
110
    PANDORA_TEST_VC_DIR
 
111
 
 
112
    changequote(<<, >>)dnl
 
113
    PANDORA_RELEASE_ID=`echo $VERSION | sed 's/[^0-9]//g'`
 
114
    changequote([, ])dnl
 
115
 
 
116
    PANDORA_RELEASE_COMMENT=""
 
117
    AC_DEFINE_UNQUOTED([PANDORA_RELEASE_VERSION],["$VERSION"],
 
118
                       [Version of the software])
 
119
 
 
120
    AC_SUBST(PANDORA_RELEASE_COMMENT)
 
121
    AC_SUBST(PANDORA_RELEASE_VERSION)
 
122
    AC_SUBST(PANDORA_RELEASE_ID)
111
123
  ])
112
124
  PANDORA_VERSION
113
125
 
189
201
    AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned])
190
202
  ])
191
203
 
 
204
  AC_CACHE_CHECK([if system defines RUSAGE_THREAD], [ac_cv_rusage_thread],[
 
205
  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
 
206
      [[
 
207
#include <sys/time.h>
 
208
#include <sys/resource.h>
 
209
      ]],[[
 
210
      int x= RUSAGE_THREAD;
 
211
      ]])
 
212
    ],[
 
213
      ac_cv_rusage_thread=yes
 
214
    ],[
 
215
      ac_cv_rusage_thread=no
 
216
    ])
 
217
  ])
 
218
  AS_IF([test "$ac_cv_rusage_thread" = "no"],[
 
219
    AC_DEFINE([RUSAGE_THREAD], [RUSAGE_SELF],
 
220
      [Define if system doesn't define])
 
221
  ])
 
222
 
192
223
  AC_CHECK_LIBM
193
224
  dnl Bug on FreeBSD - LIBM check doesn't set the damn variable
194
225
  AC_SUBST([LIBM])
337
368
#define get_socket_errno() errno
338
369
#endif
339
370
 
 
371
#if defined(__cplusplus)
 
372
# if defined(DEBUG)
 
373
#  include <cassert>
 
374
#  include <cstddef>
 
375
# endif
 
376
template<typename To, typename From>
 
377
inline To implicit_cast(From const &f) {
 
378
  return f;
 
379
}
 
380
template<typename To, typename From>     // use like this: down_cast<T*>(foo);
 
381
inline To down_cast(From* f) {                   // so we only accept pointers
 
382
  // Ensures that To is a sub-type of From *.  This test is here only
 
383
  // for compile-time type checking, and has no overhead in an
 
384
  // optimized build at run-time, as it will be optimized away
 
385
  // completely.
 
386
  if (false) {
 
387
    implicit_cast<From*, To>(0);
 
388
  }
 
389
 
 
390
#if defined(DEBUG)
 
391
  assert(f == NULL || dynamic_cast<To>(f) != NULL);  // RTTI: debug mode only!
 
392
#endif
 
393
  return static_cast<To>(f);
 
394
}
 
395
#endif /* defined(__cplusplus) */
 
396
 
340
397
#endif /* __CONFIG_H__ */
341
398
  ])
342
399