mirror of
https://github.com/php/php-src.git
synced 2024-10-07 01:36:14 +00:00
a736f99e2f
# TODO: The standalone lib needs it's own build stuff, pretty much same as # Zend has for standalone builds.
51 lines
967 B
Plaintext
51 lines
967 B
Plaintext
dnl
|
|
dnl $Id$
|
|
dnl
|
|
dnl
|
|
dnl TL_DEF_HAVE(what [, why])
|
|
dnl
|
|
dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [WHY])'
|
|
dnl
|
|
AC_DEFUN([TL_DEF_HAVE],[AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___),1,[ $2 ])])dnl
|
|
|
|
dnl
|
|
dnl TL_CHECK_INT_TYPE(type)
|
|
dnl
|
|
AC_DEFUN([TL_CHECK_INT_TYPE],[
|
|
AC_CACHE_CHECK([for $1], ac_cv_int_type_$1, [
|
|
AC_TRY_COMPILE([
|
|
#if HAVE_SYS_TYPES_H
|
|
# include <sys/types.h>
|
|
#endif
|
|
#if HAVE_INTTYPES_H
|
|
# include <inttypes.h>
|
|
#elif HAVE_STDINT_H
|
|
# include <stdint.h>
|
|
#endif],
|
|
[if (($1 *) 0)
|
|
return 0;
|
|
if (sizeof ($1))
|
|
return 0;
|
|
], [ac_cv_int_type_$1=yes], [ac_cv_int_type_$1=no])
|
|
])
|
|
if test "$ac_cv_int_type_$1" = "yes"; then
|
|
TL_DEF_HAVE($1, [Define if $1 type is present.])
|
|
fi
|
|
])dnl
|
|
|
|
dnl Check for types, sizes, etc. needed by timelib
|
|
AC_CHECK_SIZEOF(long, 8)
|
|
AC_CHECK_SIZEOF(int, 4)
|
|
TL_CHECK_INT_TYPE(int32_t)
|
|
TL_CHECK_INT_TYPE(uint32_t)
|
|
|
|
dnl Check for headers needed by timelib
|
|
AC_CHECK_HEADERS([ \
|
|
sys/types.h \
|
|
inttypes.h \
|
|
stdint.h \
|
|
string.h \
|
|
stdlib.h
|
|
])
|
|
|