~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/pandora_canonical.m4

  • Committer: LinuxJedi
  • Date: 2010-09-09 06:14:45 UTC
  • mto: (1750.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1751.
  • Revision ID: linuxjedi@linuxjedi-laptop-20100909061445-1jz91d5eed932616
Fix another wrong header, grr...

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.161])
 
7
AC_DEFUN([PANDORA_CANONICAL_VERSION],[0.150])
8
8
 
9
9
AC_DEFUN([PANDORA_FORCE_DEPEND_TRACKING],[
10
10
  AC_ARG_ENABLE([fat-binaries],
23
23
  ])
24
24
])
25
25
 
26
 
AC_DEFUN([PANDORA_BLOCK_BAD_OPTIONS],[
27
 
  AS_IF([test "x${prefix}" = "x"],[
28
 
    AC_MSG_ERROR([--prefix requires an argument])
29
 
  ])
30
 
])
31
 
 
32
26
dnl The standard setup for how we build Pandora projects
33
27
AC_DEFUN([PANDORA_CANONICAL_TARGET],[
34
28
  AC_REQUIRE([PANDORA_FORCE_DEPEND_TRACKING])
72
66
    AC_CONFIG_HEADERS([config.h])
73
67
  ])
74
68
 
75
 
  PANDORA_BLOCK_BAD_OPTIONS
76
 
 
77
69
  # We need to prevent canonical target
78
70
  # from injecting -O2 into CFLAGS - but we won't modify anything if we have
79
71
  # set CFLAGS on the command line, since that should take ultimate precedence
108
100
    PANDORA_VC_VERSION
109
101
  ],[
110
102
    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)
123
103
  ])
124
104
  PANDORA_VERSION
125
105
 
143
123
    AS_IF([test "$ac_cv_cxx_stdcxx_98" = "no"],[
144
124
      AC_MSG_ERROR([No working C++ Compiler has been found. ${PACKAGE} requires a C++ compiler that can handle C++98])
145
125
    ])
 
126
 
146
127
  ])
147
 
  PANDORA_CXX_CSTDINT
148
 
  PANDORA_CXX_CINTTYPES
149
128
  
150
129
  m4_if(m4_substr(m4_esyscmd(test -d gnulib && echo 0),0,1),0,[
151
130
    gl_INIT
201
180
    AC_DEFINE([TIME_T_UNSIGNED], 1, [Define to 1 if time_t is unsigned])
202
181
  ])
203
182
 
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
 
 
223
183
  AC_CHECK_LIBM
224
184
  dnl Bug on FreeBSD - LIBM check doesn't set the damn variable
225
185
  AC_SUBST([LIBM])
264
224
  AC_CHECK_PROGS([DOXYGEN], [doxygen])
265
225
  AC_CHECK_PROGS([PERL], [perl])
266
226
  AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:])
267
 
  AC_CHECK_PROGS([LCOV], [lcov], [echo lcov not found])
268
 
  AC_CHECK_PROGS([LCOV_GENHTML], [genhtml], [echo genhtml not found])
269
 
 
270
 
  AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build], [:])
271
 
  AS_IF([test "x${SPHINXBUILD}" != "x:"],[
272
 
    AC_CACHE_CHECK([if sphinx is new enough],[ac_cv_recent_sphinx],[
273
 
    
274
 
    ${SPHINXBUILD} -Q -C -b man -d conftest.d . . >/dev/null 2>&1
275
 
    AS_IF([test $? -eq 0],[ac_cv_recent_sphinx=yes],
276
 
          [ac_cv_recent_sphinx=no])
277
 
    rm -rf conftest.d
278
 
    ])
279
 
  ])
280
227
 
281
228
  AM_CONDITIONAL(HAVE_DPKG_GENSYMBOLS,[test "x${DPKG_GENSYMBOLS}" != "x:"])
282
 
  AM_CONDITIONAL(HAVE_SPHINX,[test "x${SPHINXBUILD}" != "x:"])
283
 
  AM_CONDITIONAL(HAVE_RECENT_SPHINX,[test "x${ac_cv_recent_sphinx}" = "xyes"])
284
229
 
285
230
  m4_if(m4_substr(m4_esyscmd(test -d po && echo 0),0,1),0, [
286
231
    AM_PO_SUBDIRS
368
313
#define get_socket_errno() errno
369
314
#endif
370
315
 
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
 
 
397
316
#endif /* __CONFIG_H__ */
398
317
  ])
399
318