~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/misc.m4

  • Committer: Monty Taylor
  • Date: 2009-01-09 19:40:29 UTC
  • mto: (779.1.4 devel)
  • mto: This revision was merged to the branch mainline in revision 784.
  • Revision ID: mordred@inaugust.com-20090109194029-vcic3m30e4uj0smj
General build cleanup - removed cruft, removed depreated checks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
[ac_save_CXXFLAGS="$CXXFLAGS"
6
6
AC_CACHE_CHECK([base type of last arg to accept], mysql_cv_btype_last_arg_accept,
7
7
AC_LANG_PUSH(C++)
8
 
if test "$ac_cv_prog_gxx" = "yes"
 
8
if test "$GXX" = "yes"
9
9
then
10
10
  # Add -Werror, remove -fbranch-probabilities (Bug #268)
11
11
  CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
41
41
])
42
42
#---END:
43
43
 
44
 
dnl Find type of qsort
45
 
AC_DEFUN([DRIZZLE_TYPE_QSORT],
46
 
[AC_CACHE_CHECK([return type of qsort], mysql_cv_type_qsort,
47
 
[AC_TRY_COMPILE([#include <stdlib.h>
48
 
#ifdef __cplusplus
49
 
extern "C"
50
 
#endif
51
 
void qsort(void *base, size_t nel, size_t width,
52
 
 int (*compar) (const void *, const void *));
53
 
],
54
 
[int i;], mysql_cv_type_qsort=void, mysql_cv_type_qsort=int)])
55
 
AC_DEFINE_UNQUOTED([RETQSORTTYPE], [$mysql_cv_type_qsort],
56
 
                   [The return type of qsort (int or void).])
57
 
if test "$mysql_cv_type_qsort" = "void"
58
 
then
59
 
 AC_DEFINE_UNQUOTED([QSORT_TYPE_IS_VOID], [1], [qsort returns void])
60
 
fi
61
 
])
62
44
 
63
45
#---START: Figure out whether to use 'struct rlimit' or 'struct rlimit64'
64
46
AC_DEFUN([DRIZZLE_TYPE_STRUCT_RLIMIT],
65
47
[ac_save_CXXFLAGS="$CXXFLAGS"
66
48
AC_CACHE_CHECK([struct type to use with setrlimit], mysql_cv_btype_struct_rlimit,
67
49
AC_LANG_PUSH(C++)
68
 
if test "$ac_cv_prog_gxx" = "yes"
 
50
if test "$GXX" = "yes"
69
51
then
70
52
  # Add -Werror, remove -fbranch-probabilities (Bug #268)
71
53
  CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-Wcheck//'`
247
229
    [
248
230
      AC_TRY_LINK([
249
231
        #include <signal.h>
250
 
        RETSIGTYPE foo() { }], [
 
232
        void foo() { }], [
251
233
                int mask = sigmask(SIGINT);
252
234
                sigset(SIGINT, foo); sigrelse(SIGINT);
253
235
                sighold(SIGINT); sigpause(SIGINT);
306
288
fi
307
289
])
308
290
 
309
 
AC_DEFUN([DRIZZLE_TYPE_SIGHANDLER],
310
 
[AC_MSG_CHECKING([whether signal handlers are of type void])
311
 
AC_CACHE_VAL(mysql_cv_void_sighandler,
312
 
[AC_TRY_COMPILE([#include <sys/types.h>
313
 
#include <signal.h>
314
 
#ifdef signal
315
 
#undef signal
316
 
#endif
317
 
#ifdef __cplusplus
318
 
extern "C"
319
 
#endif
320
 
void (*signal ()) ();],
321
 
[int i;], mysql_cv_void_sighandler=yes, mysql_cv_void_sighandler=no)])dnl
322
 
AC_MSG_RESULT($mysql_cv_void_sighandler)
323
 
if test "$mysql_cv_void_sighandler" = "yes"; then
324
 
AC_DEFINE(VOID_SIGHANDLER, [1], [sighandler type is void (*signal ()) ();])
325
 
fi
326
 
])
327
291
 
328
292
AC_DEFUN([DRIZZLE_STACK_DIRECTION],
329
293
 [AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,