php-src/Zend/configure.ac

134 lines
2.7 KiB
Plaintext
Raw Normal View History

1999-04-08 02:10:10 +08:00
dnl $Id$
dnl Process this file with autoconf to produce a configure script.
AC_INIT(zend.c)
AM_INIT_AUTOMAKE(zend, 0.80A, nodefine)
1999-04-20 04:10:26 +08:00
AM_CONFIG_HEADER(zend_config.h)
1999-04-08 02:10:10 +08:00
AM_SANITY_CHECK
AM_MAINTAINER_MODE
1999-12-17 21:36:15 +08:00
AC_PROG_CC
AM_PROG_CC_STDC
1999-04-20 04:10:26 +08:00
ZEND_VERSION=$VERSION
AC_ZEND_C_BIGENDIAN
1999-04-08 02:10:10 +08:00
2011-05-16 08:14:47 +08:00
AH_TOP([
#if defined(__GNUC__) && __GNUC__ >= 4
# define ZEND_API __attribute__ ((visibility("default")))
# define ZEND_DLEXPORT __attribute__ ((visibility("default")))
#else
# define ZEND_API
# define ZEND_DLEXPORT
#endif
#define ZEND_DLIMPORT
#undef uint
#undef ulong
])
AH_BOTTOM([
#ifndef ZEND_ACCONFIG_H_NO_C_PROTOS
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifdef HAVE_IEEEFP_H
# include <ieeefp.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif
#if ZEND_BROKEN_SPRINTF
int zend_sprintf(char *buffer, const char *format, ...);
#else
# define zend_sprintf sprintf
#endif
#include <math.h>
#ifndef zend_isnan
2017-03-18 03:19:40 +08:00
#if HAVE_DECL_ISNAN
2011-05-16 08:14:47 +08:00
#define zend_isnan(a) isnan(a)
#elif defined(HAVE_FPCLASS)
#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN))
#else
2017-02-05 09:30:20 +08:00
#define zend_isnan(a) ((a) != (a))
2011-05-16 08:14:47 +08:00
#endif
#endif
2017-03-18 03:19:40 +08:00
#if HAVE_DECL_ISINF
2011-05-16 08:14:47 +08:00
#define zend_isinf(a) isinf(a)
#elif defined(INFINITY)
/* Might not work, but is required by ISO C99 */
#define zend_isinf(a) (((a)==INFINITY || (a)==-INFINITY)?1:0)
2011-05-16 08:14:47 +08:00
#elif defined(HAVE_FPCLASS)
#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF))
#else
#define zend_isinf(a) 0
#endif
2017-03-18 03:19:40 +08:00
#if HAVE_DECL_ISFINITE
2011-05-16 08:14:47 +08:00
#define zend_finite(a) isfinite(a)
#elif defined(HAVE_FINITE)
#define zend_finite(a) finite(a)
2011-05-16 08:14:47 +08:00
#elif defined(fpclassify)
#define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0)
#else
#define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1)
#endif
#endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */
])
1999-04-08 02:10:10 +08:00
dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
AC_CHECK_SIZEOF(long, 8)
AC_CHECK_SIZEOF(int, 4)
1999-12-20 05:02:54 +08:00
sinclude(Zend.m4)
1999-12-17 21:36:15 +08:00
LIBZEND_BASIC_CHECKS
2002-11-15 22:30:40 +08:00
LIBZEND_LIBDL_CHECKS
LIBZEND_DLSYM_CHECK
1999-04-08 02:10:10 +08:00
1999-10-04 23:20:12 +08:00
AM_PROG_LIBTOOL
if test "$enable_debug" != "yes"; then
AM_SET_LIBTOOL_VARIABLE([--silent])
fi
1999-04-08 02:10:10 +08:00
dnl
dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
dnl and source packages. This should be harmless on other OSs.
dnl
if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
CFLAGS="$CFLAGS -I/usr/pkg/include"
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
fi
1999-12-17 21:36:15 +08:00
LIBZEND_ENABLE_DEBUG
LIBZEND_OTHER_CHECKS
ZEND_EXTRA_LIBS="$LIBS"
1999-10-04 23:20:12 +08:00
LIBS=""
AC_SUBST(ZEND_EXTRA_LIBS)
1999-10-04 23:20:12 +08:00
AC_OUTPUT(Makefile)
1999-04-08 02:10:10 +08:00
# Local Variables:
# tab-width: 4
# End: