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