~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/misc.m4

  • Committer: Monty Taylor
  • Date: 2008-11-02 03:17:55 UTC
  • mto: (520.4.45 devel)
  • mto: This revision was merged to the branch mainline in revision 573.
  • Revision ID: monty@inaugust.com-20081102031755-cpzp7dlqoa7rcs1v
Removed a bunch of unusued tests and defines from autoconf.
Fixed the way we were doing cmath - and moved it out of global.h. Still probably
isn't right for Sun Studio, but we're getting closer I think.

Show diffs side-by-side

added added

removed removed

Lines of Context:
317
317
fi
318
318
])
319
319
 
320
 
AC_DEFUN([DRIZZLE_HAVE_FIONREAD],
321
 
[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
322
 
AC_CACHE_VAL(mysql_cv_fionread_in_ioctl,
323
 
[AC_TRY_COMPILE([#include <sys/types.h>
324
 
#include <sys/ioctl.h>], [int x = FIONREAD;],
325
 
  mysql_cv_fionread_in_ioctl=yes,mysql_cv_fionread_in_ioctl=no)])
326
 
AC_MSG_RESULT($mysql_cv_fionread_in_ioctl)
327
 
if test "$mysql_cv_fionread_in_ioctl" = "yes"; then   
328
 
AC_DEFINE([FIONREAD_IN_SYS_IOCTL], [1], [Do we have FIONREAD])
329
 
fi
330
 
])
331
 
 
332
320
AC_DEFUN([DRIZZLE_HAVE_TIOCSTAT],
333
321
[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h)
334
322
AC_CACHE_VAL(mysql_cv_tiocstat_in_ioctl,
342
330
fi
343
331
])
344
332
 
345
 
AC_DEFUN([DRIZZLE_STRUCT_DIRENT_D_INO],
346
 
[AC_REQUIRE([AC_HEADER_DIRENT])
347
 
AC_MSG_CHECKING(if struct dirent has a d_ino member)
348
 
AC_CACHE_VAL(mysql_cv_dirent_has_dino,
349
 
[AC_TRY_COMPILE([
350
 
#include <stdio.h>
351
 
#include <sys/types.h>
352
 
#ifdef HAVE_UNISTD_H
353
 
# include <unistd.h>
354
 
#endif /* HAVE_UNISTD_H */
355
 
#if defined(HAVE_DIRENT_H)
356
 
# include <dirent.h>
357
 
#else
358
 
# define dirent direct
359
 
# ifdef HAVE_SYS_NDIR_H
360
 
#  include <sys/ndir.h>
361
 
# endif /* SYSNDIR */
362
 
# ifdef HAVE_SYS_DIR_H
363
 
#  include <sys/dir.h>
364
 
# endif /* SYSDIR */
365
 
# ifdef HAVE_NDIR_H
366
 
#  include <ndir.h>
367
 
# endif
368
 
#endif /* HAVE_DIRENT_H */
369
 
],[
370
 
struct dirent d; int z; z = d.d_ino;
371
 
], mysql_cv_dirent_has_dino=yes, mysql_cv_dirent_has_dino=no)])
372
 
AC_MSG_RESULT($mysql_cv_dirent_has_dino)
373
 
if test "$mysql_cv_dirent_has_dino" = "yes"; then
374
 
AC_DEFINE(STRUCT_DIRENT_HAS_D_INO, [1],
375
 
          [d_ino member present in struct dirent])
376
 
fi
377
 
])
378
 
 
379
 
AC_DEFUN([DRIZZLE_STRUCT_DIRENT_D_NAMLEN],
380
 
[AC_REQUIRE([AC_HEADER_DIRENT])
381
 
AC_MSG_CHECKING(if struct dirent has a d_namlen member)
382
 
AC_CACHE_VAL(mysql_cv_dirent_has_dnamlen,
383
 
[AC_TRY_COMPILE([
384
 
#include <stdio.h>
385
 
#include <sys/types.h>
386
 
#ifdef HAVE_UNISTD_H
387
 
# include <unistd.h>
388
 
#endif /* HAVE_UNISTD_H */
389
 
#if defined(HAVE_DIRENT_H)
390
 
# include <dirent.h>
391
 
#else
392
 
# define dirent direct
393
 
# ifdef HAVE_SYS_NDIR_H
394
 
#  include <sys/ndir.h>
395
 
# endif /* SYSNDIR */
396
 
# ifdef HAVE_SYS_DIR_H
397
 
#  include <sys/dir.h>
398
 
# endif /* SYSDIR */
399
 
# ifdef HAVE_NDIR_H
400
 
#  include <ndir.h>
401
 
# endif
402
 
#endif /* HAVE_DIRENT_H */
403
 
],[
404
 
struct dirent d; int z; z = (int)d.d_namlen;
405
 
], mysql_cv_dirent_has_dnamlen=yes, mysql_cv_dirent_has_dnamlen=no)])
406
 
AC_MSG_RESULT($mysql_cv_dirent_has_dnamlen)
407
 
if test "$mysql_cv_dirent_has_dnamlen" = "yes"; then
408
 
AC_DEFINE(STRUCT_DIRENT_HAS_D_NAMLEN, [1],
409
 
          [d_namlen member present in struct dirent])
410
 
fi
411
 
])
412
 
 
413
 
 
414
333
AC_DEFUN([DRIZZLE_TYPE_SIGHANDLER],
415
334
[AC_MSG_CHECKING([whether signal handlers are of type void])
416
335
AC_CACHE_VAL(mysql_cv_void_sighandler,
430
349
fi
431
350
])
432
351
 
433
 
AC_DEFUN([DRIZZLE_CXX_BOOL],
434
 
[
435
 
AC_REQUIRE([AC_PROG_CXX])
436
 
AC_MSG_CHECKING(if ${CXX} supports bool types)
437
 
AC_CACHE_VAL(mysql_cv_have_bool,
438
 
[
439
 
AC_LANG_SAVE
440
 
AC_LANG_CPLUSPLUS
441
 
AC_TRY_COMPILE(,[bool b = true;],
442
 
mysql_cv_have_bool=yes,
443
 
mysql_cv_have_bool=no)
444
 
AC_LANG_RESTORE
445
 
])
446
 
AC_MSG_RESULT($mysql_cv_have_bool)
447
 
if test "$mysql_cv_have_bool" = yes; then
448
 
AC_DEFINE([HAVE_BOOL], [1], [bool is not defined by all C++ compilators])
449
 
fi
450
 
])dnl
451
 
 
452
352
AC_DEFUN([DRIZZLE_STACK_DIRECTION],
453
353
 [AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
454
354
 [AC_TRY_RUN([#include <stdlib.h>