1dnl $Id$ 2dnl Process this file with autoconf to produce a configure script. 3 4AC_INIT(zend.c) 5AM_INIT_AUTOMAKE(zend, 0.80A, nodefine) 6AM_CONFIG_HEADER(zend_config.h) 7AM_SANITY_CHECK 8AM_MAINTAINER_MODE 9AC_PROG_CC 10AM_PROG_CC_STDC 11ZEND_VERSION=$VERSION 12AC_ZEND_C_BIGENDIAN 13 14AH_TOP([ 15#if defined(__GNUC__) && __GNUC__ >= 4 16# define ZEND_API __attribute__ ((visibility("default"))) 17# define ZEND_DLEXPORT __attribute__ ((visibility("default"))) 18#else 19# define ZEND_API 20# define ZEND_DLEXPORT 21#endif 22 23#define ZEND_DLIMPORT 24 25#undef uint 26#undef ulong 27 28/* Define if you want to enable memory limit support */ 29#define MEMORY_LIMIT 0 30]) 31 32AH_BOTTOM([ 33#ifndef ZEND_ACCONFIG_H_NO_C_PROTOS 34 35#ifdef HAVE_STDLIB_H 36# include <stdlib.h> 37#endif 38 39#ifdef HAVE_SYS_TYPES_H 40# include <sys/types.h> 41#endif 42 43#ifdef HAVE_SYS_SELECT_H 44#include <sys/select.h> 45#endif 46 47#ifdef HAVE_IEEEFP_H 48# include <ieeefp.h> 49#endif 50 51#ifdef HAVE_STRING_H 52# include <string.h> 53#else 54# include <strings.h> 55#endif 56 57#if ZEND_BROKEN_SPRINTF 58int zend_sprintf(char *buffer, const char *format, ...); 59#else 60# define zend_sprintf sprintf 61#endif 62 63#include <math.h> 64 65/* To enable the is_nan, is_infinite and is_finite PHP functions */ 66#ifdef NETWARE 67 #define HAVE_DECL_ISNAN 1 68 #define HAVE_DECL_ISINF 1 69 #define HAVE_DECL_ISFINITE 1 70#endif 71 72#ifndef zend_isnan 73#if HAVE_DECL_ISNAN 74#define zend_isnan(a) isnan(a) 75#elif defined(HAVE_FPCLASS) 76#define zend_isnan(a) ((fpclass(a) == FP_SNAN) || (fpclass(a) == FP_QNAN)) 77#else 78#define zend_isnan(a) ((a) != (a)) 79#endif 80#endif 81 82#if HAVE_DECL_ISINF 83#define zend_isinf(a) isinf(a) 84#elif defined(INFINITY) 85/* Might not work, but is required by ISO C99 */ 86#define zend_isinf(a) (((a)==INFINITY || (a)==-INFINITY)?1:0) 87#elif defined(HAVE_FPCLASS) 88#define zend_isinf(a) ((fpclass(a) == FP_PINF) || (fpclass(a) == FP_NINF)) 89#else 90#define zend_isinf(a) 0 91#endif 92 93#if HAVE_DECL_ISFINITE 94#define zend_finite(a) isfinite(a) 95#elif defined(HAVE_FINITE) 96#define zend_finite(a) finite(a) 97#elif defined(fpclassify) 98#define zend_finite(a) ((fpclassify((a))!=FP_INFINITE&&fpclassify((a))!=FP_NAN)?1:0) 99#else 100#define zend_finite(a) (zend_isnan(a) ? 0 : zend_isinf(a) ? 0 : 1) 101#endif 102 103#endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */ 104 105#ifdef NETWARE 106#ifdef USE_WINSOCK 107#/*This detection against winsock is of no use*/ undef HAVE_SOCKLEN_T 108#/*This detection against winsock is of no use*/ undef HAVE_SYS_SOCKET_H 109#endif 110#endif 111]) 112 113dnl We want this one before the checks, so the checks can modify CFLAGS. 114test -z "$CFLAGS" && auto_cflags=1 115 116AC_CHECK_SIZEOF(long, 8) 117AC_CHECK_SIZEOF(int, 4) 118 119sinclude(Zend.m4) 120 121LIBZEND_BASIC_CHECKS 122LIBZEND_LIBDL_CHECKS 123LIBZEND_DLSYM_CHECK 124 125AM_PROG_LIBTOOL 126if test "$enable_debug" != "yes"; then 127 AM_SET_LIBTOOL_VARIABLE([--silent]) 128fi 129 130dnl 131dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary 132dnl and source packages. This should be harmless on other OSs. 133dnl 134if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then 135 CFLAGS="$CFLAGS -I/usr/pkg/include" 136 LDFLAGS="$LDFLAGS -L/usr/pkg/lib" 137fi 138 139LIBZEND_ENABLE_DEBUG 140LIBZEND_OTHER_CHECKS 141 142ZEND_EXTRA_LIBS="$LIBS" 143LIBS="" 144AC_SUBST(ZEND_EXTRA_LIBS) 145AC_OUTPUT(Makefile) 146 147# Local Variables: 148# tab-width: 4 149# End: 150