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