Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 150 lines (121 sloc) 3.152 kb
573b460 andigutmans Zend Library
andigutmans authored
1 dnl $Id$
2 dnl Process this file with autoconf to produce a configure script.
3
4 AC_INIT(zend.c)
af97475 Use the hardly-documented third parameter of AM_INIT_AUTOMAKE to suppres...
Sascha Schumann authored
5 AM_INIT_AUTOMAKE(zend, 0.80A, nodefine)
b227e38 convert to automake
Stig S. Bakken authored
6 AM_CONFIG_HEADER(zend_config.h)
573b460 andigutmans Zend Library
andigutmans authored
7 AM_SANITY_CHECK
b9fb0b8 Zeev Suraski If a require() dies, we must bail out (since it corrupts an existing op_...
zsuraski authored
8 AM_MAINTAINER_MODE
91549cf Move config code into separate file
Sascha Schumann authored
9 AC_PROG_CC
10 AM_PROG_CC_STDC
b227e38 convert to automake
Stig S. Bakken authored
11 ZEND_VERSION=$VERSION
4589cef - Added AC_ZEND_C_BIGENDIAN macro (as requested by Andi)
foobar authored
12 AC_ZEND_C_BIGENDIAN
573b460 andigutmans Zend Library
andigutmans authored
13
353077d Rasmus Lerdorf Get rid of autoconf warnings
rlerdorf authored
14 AH_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
32 AH_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
58 int 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_ISNAN 1
68 #define HAVE_ISINF 1
69 #define HAVE_ISFINITE 1
70 #endif
71
72 #ifndef zend_isnan
73 #ifdef HAVE_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) 0
79 #endif
80 #endif
81
82 #ifdef HAVE_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)?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 #ifdef HAVE_FINITE
94 #define zend_finite(a) finite(a)
95 #elif defined(HAVE_ISFINITE) || defined(isfinite)
96 #define zend_finite(a) isfinite(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
573b460 andigutmans Zend Library
andigutmans authored
113 dnl We want this one before the checks, so the checks can modify CFLAGS.
114 test -z "$CFLAGS" && auto_cflags=1
115
af1f60e - Compile fix for systems without uint32_t typedef
foobar authored
116 AC_CHECK_SIZEOF(long, 8)
117 AC_CHECK_SIZEOF(int, 4)
118
4d2b071 Zeev Suraski libzend -> Zend
zsuraski authored
119 sinclude(Zend.m4)
91549cf Move config code into separate file
Sascha Schumann authored
120
121 LIBZEND_BASIC_CHECKS
5c12ee2 andigutmans - MFZE1
andigutmans authored
122 LIBZEND_LIBDL_CHECKS
123 LIBZEND_DLSYM_CHECK
573b460 andigutmans Zend Library
andigutmans authored
124
8ae3f4b Use libtool to build.
Sascha Schumann authored
125 AM_PROG_LIBTOOL
126 if test "$enable_debug" != "yes"; then
127 AM_SET_LIBTOOL_VARIABLE([--silent])
128 fi
573b460 andigutmans Zend Library
andigutmans authored
129
130 dnl
131 dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
132 dnl and source packages. This should be harmless on other OSs.
133 dnl
134 if 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"
137 fi
138
91549cf Move config code into separate file
Sascha Schumann authored
139 LIBZEND_ENABLE_DEBUG
140 LIBZEND_OTHER_CHECKS
0ac169b Build communication channel and add checks for C++ library
Sascha Schumann authored
141
4935636 Zend config sets ZEND_EXTRA_LIBS. Bugs 14452, 14602, 14616, 14824
Adam Dickmeiss authored
142 ZEND_EXTRA_LIBS="$LIBS"
8ae3f4b Use libtool to build.
Sascha Schumann authored
143 LIBS=""
4935636 Zend config sets ZEND_EXTRA_LIBS. Bugs 14452, 14602, 14616, 14824
Adam Dickmeiss authored
144 AC_SUBST(ZEND_EXTRA_LIBS)
8ae3f4b Use libtool to build.
Sascha Schumann authored
145 AC_OUTPUT(Makefile)
573b460 andigutmans Zend Library
andigutmans authored
146
147 # Local Variables:
148 # tab-width: 4
149 # End:
Something went wrong with that request. Please try again.