Skip to content
Newer
Older
100644 155 lines (132 sloc) 4.38 KB
573b460 @andigutmans Zend Library
andigutmans authored Apr 7, 1999
1 dnl $Id$
2 dnl Process this file with autoconf to produce a configure script.
3
4 AC_INIT(zend.c)
b227e38 convert to automake
Stig S. Bakken authored Apr 19, 1999
5 AM_INIT_AUTOMAKE(zend, 0.80A)
6 AM_CONFIG_HEADER(zend_config.h)
573b460 @andigutmans Zend Library
andigutmans authored Apr 7, 1999
7 AM_SANITY_CHECK
b9fb0b8 @zsuraski If a require() dies, we must bail out (since it corrupts an existing …
zsuraski authored May 14, 1999
8 AM_MAINTAINER_MODE
b227e38 convert to automake
Stig S. Bakken authored Apr 19, 1999
9 ZEND_VERSION=$VERSION
573b460 @andigutmans Zend Library
andigutmans authored Apr 7, 1999
10
11 dnl We want this one before the checks, so the checks can modify CFLAGS.
12 test -z "$CFLAGS" && auto_cflags=1
13
14 dnl Checks for programs.
15 AC_PROG_YACC
16 if test "$YACC" != "bison -y"; then
b227e38 convert to automake
Stig S. Bakken authored Apr 19, 1999
17 AC_MSG_WARN(You will need bison if you want to regenerate the Zend parser.)
573b460 @andigutmans Zend Library
andigutmans authored Apr 7, 1999
18 else
19 AC_MSG_CHECKING(bison version)
20 set `bison --version| sed -e 's/^GNU Bison version //' -e 's/\./ /'`
21 if test "$1" = "1" -a "$2" -lt "25"; then
b227e38 convert to automake
Stig S. Bakken authored Apr 19, 1999
22 AC_MSG_WARN(You will need bison 1.25 if you want to regenerate the Zend parser (found $1.$2).)
573b460 @andigutmans Zend Library
andigutmans authored Apr 7, 1999
23 fi
24 AC_MSG_RESULT($1.$2 (ok))
25 fi
26 AC_PROG_CC
27 AC_PROG_RANLIB
28 AC_PROG_CC_C_O
b227e38 convert to automake
Stig S. Bakken authored Apr 19, 1999
29 AM_PROG_LEX
573b460 @andigutmans Zend Library
andigutmans authored Apr 7, 1999
30
7bbd454 add usual rhapsody hack
Sascha Schumann authored Jul 3, 1999
31 dnl Hack to work around a Mac OS X cpp problem
32 dnl Known versions needing this workaround are 5.3 and 5.4
33 if test "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then
34 CPPFLAGS="$CPPFLAGS -traditional-cpp"
35 fi
36
573b460 @andigutmans Zend Library
andigutmans authored Apr 7, 1999
37 dnl Ugly hack to get around a problem with gcc on AIX.
38 if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
39 "`uname -sv`" = "AIX 4"; then
40 CFLAGS=`echo $CFLAGS | sed -e 's/-g//'`
41 fi
42
43 dnl
44 dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary
45 dnl and source packages. This should be harmless on other OSs.
46 dnl
47 if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then
48 CFLAGS="$CFLAGS -I/usr/pkg/include"
49 LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
50 fi
51
52 AC_CHECK_LIB(c, dlopen, [
53 # fake it
54 AC_DEFINE(HAVE_LIBDL) ], [
55 AC_CHECK_LIB(dl, dlopen, [
56 LIBS="-ldl $LIBS"
57 AC_DEFINE(HAVE_LIBDL) ], []) ])
58
59 dnl The sin may be in a library which need not be specifed
60 dnl as well as res_search resides in libsocket
61 AC_CHECK_LIB(c, sin, [:], [
62 AC_CHECK_LIB(m, sin) ])
63
64 dnl Checks for header files.
65 AC_HEADER_STDC
66
67 dnl In QNX opendir resides in libc but dirent.h is still required
68 if test "`uname -s 2>/dev/null`" != "QNX"; then
69 AC_HEADER_DIRENT
70 else
71 AC_CHECK_HEADERS(dirent.h)
72 fi
73 dnl QNX requires unix.h to allow functions in libunix to work properly
74 AC_CHECK_HEADERS(fcntl.h unistd.h crypt.h sys/file.h memory.h pwd.h grp.h sys/socket.h sys/wait.h syslog.h string.h sys/varargs.h stdarg.h sys/resource.h sys/time.h signal.h netinet/in.h dlfcn.h limits.h sys/types.h sys/statvfs.h sys/statfs.h unix.h db.h ndbm.h)
75
76 dnl Checks for types
77 AC_TYPE_SIZE_T
78
79 dnl This is required for QNX and may be some BSD derived systems
80 AC_CHECK_TYPE( uint, unsigned int )
81 AC_CHECK_TYPE( ulong, unsigned long )
2a44f45 workaround for 64-bit platforms
Sascha Schumann authored Jul 2, 1999
82
f6164db use void * instead of long for 64-bit test
Sascha Schumann authored Jul 5, 1999
83 AC_CHECK_SIZEOF(void *, 4)
573b460 @andigutmans Zend Library
andigutmans authored Apr 7, 1999
84
85 dnl Checks for library functions.
86 AC_FUNC_VPRINTF
cdce334 @zsuraski *** empty log message ***
zsuraski authored Jul 9, 1999
87 AC_CHECK_FUNCS(memcpy memmove strdup strerror strcasecmp strstr flock lockf putenv tempnam usleep setlocale gettimeofday setvbuf srand48 lrand48 srandom random link symlink regcomp getlogin cuserid vsnprintf snprintf gcvt utime crypt setitimer rint unsetenv strftime setsockopt tzset statvfs statfs inet_aton getpid kill)
573b460 @andigutmans Zend Library
andigutmans authored Apr 7, 1999
88 AC_FUNC_UTIME_NULL
89 AC_FUNC_ALLOCA
90 AC_BROKEN_SPRINTF
91 AC_REPLACE_FUNCS(getopt)
92
93 AC_MSG_CHECKING(whether to include debugging symbols)
94 AC_ARG_ENABLE(debug,
101e1f4 @zsuraski Debug on by default
zsuraski authored Jul 17, 1999
95 [ --disable-debug Compile without debugging symbols],
573b460 @andigutmans Zend Library
andigutmans authored Apr 7, 1999
96 [
97 if test "$enableval" = "yes"; then
98 AC_MSG_RESULT(yes)
99 AC_DEFINE(ZEND_DEBUG,1)
100 DEBUG_CFLAGS="-g"
101 test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
102 test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
103 DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
104 else
105 AC_MSG_RESULT(no)
106 AC_DEFINE(ZEND_DEBUG,0)
107 DEBUG_CFLAGS=""
108 fi
109 ],[
101e1f4 @zsuraski Debug on by default
zsuraski authored Jul 17, 1999
110 AC_MSG_RESULT(yes)
111 AC_DEFINE(ZEND_DEBUG,1)
112 DEBUG_CFLAGS="-g"
573b460 @andigutmans Zend Library
andigutmans authored Apr 7, 1999
113 ])
114 AC_SUBST(DEBUG_CFLAGS)
8def188 @zsuraski *** empty log message ***
zsuraski authored Jun 19, 1999
115 CFLAGS="$CFLAGS $DEBUG_CFLAGS"
573b460 @andigutmans Zend Library
andigutmans authored Apr 7, 1999
116
117 AC_MSG_CHECKING(whether to enable a memory limit)
118 AC_ARG_ENABLE(memory-limit,
119 [ --enable-memory-limit Compile with memory limit support. ],
120 [
121 if test "$enableval" = "yes"; then
122 AC_DEFINE(MEMORY_LIMIT, 1)
123 AC_MSG_RESULT(yes)
124 else
125 AC_DEFINE(MEMORY_LIMIT, 0)
126 AC_MSG_RESULT(no)
127 fi
128 ],[
129 AC_DEFINE(MEMORY_LIMIT, 0)
130 AC_MSG_RESULT(no)
131 ])
132
133
97ea66a add --enable-thread-safety option
Stig S. Bakken authored May 12, 1999
134 AC_MSG_CHECKING(whether to build Zend thread-safe)
135 AC_ARG_ENABLE(thread-safety,
136 [ --enable-thread-safety Whether to build Zend thread-safe.],[
137 AC_DEFINE(ZTS)
138 AC_MSG_RESULT(yes)
139 ],[
140 AC_MSG_RESULT(no)
141 ])
142 AC_SUBST(TSRM_DIR)
143 AC_SUBST(TSRM_LIB)
144
573b460 @andigutmans Zend Library
andigutmans authored Apr 7, 1999
145 AC_SUBST(CFLAGS_SHLIB)
146 AC_SUBST(LDFLAGS_SHLIB)
147 AC_SUBST(LDFLAGS_SHLIB_EXPORT)
148
149 AC_OUTPUT(Makefile, [], [])
150
151
152 # Local Variables:
153 # tab-width: 4
154 # End:
Something went wrong with that request. Please try again.