Skip to content
Newer
Older
100644 203 lines (170 sloc) 4.58 KB
9d9d39a Please welcome the new build system.
Sascha Schumann authored Mar 7, 2002
1 dnl This file becomes configure.in for self-contained extensions.
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
2
9622d00 Relax autoconf support from 2.60 to 2.59. This is the version availab…
Christopher Jones authored Jun 8, 2011
3 AC_PREREQ(2.59)
9d9d39a Please welcome the new build system.
Sascha Schumann authored Mar 7, 2002
4 AC_INIT(config.m4)
9622d00 Relax autoconf support from 2.60 to 2.59. This is the version availab…
Christopher Jones authored Jun 8, 2011
5 ifdef([AC_PRESERVE_HELP_ORDER], [AC_PRESERVE_HELP_ORDER], [])
9d9d39a Please welcome the new build system.
Sascha Schumann authored Mar 7, 2002
6
b74a5ea - Make sure EGREP and SED get set early enough.
foobar authored May 27, 2005
7 PHP_CONFIG_NICE(config.nice)
8
6b4b1e7 MFH: cleanup & sync
Jani Taskinen authored Jul 18, 2007
9 dnl
69eec3f MFB_4_3: Quote macro names in AC_DEFUN()
foobar authored Dec 30, 2004
10 AC_DEFUN([PHP_EXT_BUILDDIR],[.])dnl
11 AC_DEFUN([PHP_EXT_DIR],[""])dnl
12 AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir])dnl
13 AC_DEFUN([PHP_ALWAYS_SHARED],[
2ea99fe a bit of refactoring and making always_shared a nop in every day life
Sascha Schumann authored Mar 13, 2002
14 ext_output="yes, shared"
15 ext_shared=yes
16 test "[$]$1" = "no" && $1=yes
17 ])dnl
e10ca10 Provide context-specific functions which yield the directories
Sascha Schumann authored Mar 13, 2002
18 dnl
2b83029 @dsp Fix cc detection in phpize according to changes in configure.in
dsp authored Dec 3, 2008
19
20 test -z "$CFLAGS" && auto_cflags=1
21
3b9bcd7 Set abs_srcdir. Last example in README.S-C-EXTENSIONS works now.
Sascha Schumann authored May 2, 2000
22 abs_srcdir=`(cd $srcdir && pwd)`
9d9d39a Please welcome the new build system.
Sascha Schumann authored Mar 7, 2002
23 abs_builddir=`pwd`
3b9bcd7 Set abs_srcdir. Last example in README.S-C-EXTENSIONS works now.
Sascha Schumann authored May 2, 2000
24
2b83029 @dsp Fix cc detection in phpize according to changes in configure.in
dsp authored Dec 3, 2008
25 AC_PROG_CC([cc gcc])
87acbd2 MFH:- Detect whether debugging was enabled in PHP and drop optimizing…
Jani Taskinen authored Jul 30, 2008
26 PHP_DETECT_ICC
2b83029 @dsp Fix cc detection in phpize according to changes in configure.in
dsp authored Dec 3, 2008
27 PHP_DETECT_SUNCC
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
28 AC_PROG_CC_C_O
29
76906e0 - Add --with-libdir to phpized builds too
foobar authored Jan 20, 2005
30 dnl Support systems with system libraries in e.g. /usr/lib64
6b4b1e7 MFH: cleanup & sync
Jani Taskinen authored Jul 18, 2007
31 PHP_ARG_WITH(libdir, for system library directory,
32 [ --with-libdir=NAME Look for libraries in .../NAME rather than .../lib], lib, no)
76906e0 - Add --with-libdir to phpized builds too
foobar authored Jan 20, 2005
33
775a064 Fix some phpize problems.
foobar authored Oct 17, 2002
34 PHP_RUNPATH_SWITCH
276171f MFH: - Determine the shared/link lib suffixes in one macro.
foobar authored Apr 10, 2006
35 PHP_SHLIB_SUFFIX_NAMES
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
36
6b4b1e7 MFH: cleanup & sync
Jani Taskinen authored Jul 18, 2007
37 dnl Find php-config script
934b97d @tony2001 MFH
tony2001 authored Jul 25, 2007
38 PHP_ARG_WITH(php-config,,
6b4b1e7 MFH: cleanup & sync
Jani Taskinen authored Jul 18, 2007
39 [ --with-php-config=PATH Path to php-config [php-config]], php-config, no)
9d9d39a Please welcome the new build system.
Sascha Schumann authored Mar 7, 2002
40
e602885 MFH:- Fixed bug #42292 ($PHP_CONFIG not set for phpized builds)
Jani Taskinen authored Aug 14, 2007
41 dnl For BC
42 PHP_CONFIG=$PHP_PHP_CONFIG
43 prefix=`$PHP_CONFIG --prefix 2>/dev/null`
44 phpincludedir=`$PHP_CONFIG --include-dir 2>/dev/null`
45 INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
46 EXTENSION_DIR=`$PHP_CONFIG --extension-dir 2>/dev/null`
47 PHP_EXECUTABLE=`$PHP_CONFIG --php-binary 2>/dev/null`
6b4b1e7 MFH: cleanup & sync
Jani Taskinen authored Jul 18, 2007
48
49 if test -z "$prefix"; then
50 AC_MSG_ERROR([Cannot find php-config. Please use --with-php-config=PATH])
51 fi
52
53 php_shtool=$srcdir/build/shtool
54 PHP_INIT_BUILD_SYSTEM
55
56 AC_MSG_CHECKING([for PHP prefix])
57 AC_MSG_RESULT([$prefix])
58 AC_MSG_CHECKING([for PHP includes])
59 AC_MSG_RESULT([$INCLUDES])
60 AC_MSG_CHECKING([for PHP extension directory])
61 AC_MSG_RESULT([$EXTENSION_DIR])
62 AC_MSG_CHECKING([for PHP installed headers prefix])
63 AC_MSG_RESULT([$phpincludedir])
64
708cb0e MFH:- Applied the missing parts to phpize.m4 for zend extension builds
Jani Taskinen authored Jul 31, 2008
65 dnl Checks for PHP_DEBUG / ZEND_DEBUG / ZTS
87acbd2 MFH:- Detect whether debugging was enabled in PHP and drop optimizing…
Jani Taskinen authored Jul 30, 2008
66 AC_MSG_CHECKING([if debug is enabled])
67 old_CPPFLAGS=$CPPFLAGS
68 CPPFLAGS="-I$phpincludedir"
69 AC_EGREP_CPP(php_debug_is_enabled,[
70 #include <main/php_config.h>
71 #if ZEND_DEBUG
72 php_debug_is_enabled
73 #endif
74 ],[
75 PHP_DEBUG=yes
76 ],[
77 PHP_DEBUG=no
78 ])
d0ef930 MFH:- Fixed bug #48456 (CPPFLAGS not restored properly in phpize.m4)
Jani Taskinen authored Jun 2, 2009
79 CPPFLAGS=$old_CPPFLAGS
708cb0e MFH:- Applied the missing parts to phpize.m4 for zend extension builds
Jani Taskinen authored Jul 31, 2008
80 AC_MSG_RESULT([$PHP_DEBUG])
81
82 AC_MSG_CHECKING([if zts is enabled])
83 old_CPPFLAGS=$CPPFLAGS
84 CPPFLAGS="-I$phpincludedir"
85 AC_EGREP_CPP(php_zts_is_enabled,[
86 #include <main/php_config.h>
87 #if ZTS
88 php_zts_is_enabled
89 #endif
90 ],[
91 PHP_THREAD_SAFETY=yes
92 ],[
93 PHP_THREAD_SAFETY=no
94 ])
87acbd2 MFH:- Detect whether debugging was enabled in PHP and drop optimizing…
Jani Taskinen authored Jul 30, 2008
95 CPPFLAGS=$old_CPPFLAGS
96 AC_MSG_RESULT([$PHP_DEBUG])
97
708cb0e MFH:- Applied the missing parts to phpize.m4 for zend extension builds
Jani Taskinen authored Jul 31, 2008
98 dnl Support for building and testing Zend extensions
d29d244 - MFH: Get rid of the four different versions of zend_extension* and …
Derick Rethans authored May 18, 2009
99 ZEND_EXT_TYPE="zend_extension"
708cb0e MFH:- Applied the missing parts to phpize.m4 for zend extension builds
Jani Taskinen authored Jul 31, 2008
100 PHP_SUBST(ZEND_EXT_TYPE)
101
102 dnl Discard optimization flags when debugging is enabled
87acbd2 MFH:- Detect whether debugging was enabled in PHP and drop optimizing…
Jani Taskinen authored Jul 30, 2008
103 if test "$PHP_DEBUG" = "yes"; then
104 PHP_DEBUG=1
105 ZEND_DEBUG=yes
106 changequote({,})
107 CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
108 CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
109 changequote([,])
110 dnl add -O0 only if GCC or ICC is used
111 if test "$GCC" = "yes" || test "$ICC" = "yes"; then
112 CFLAGS="$CFLAGS -O0"
309a56f - Fixed -g adding for gcc and g++ (former got it twice, latter not at…
Jani Taskinen authored Nov 2, 2010
113 CXXFLAGS="$CXXFLAGS -g -O0"
87acbd2 MFH:- Detect whether debugging was enabled in PHP and drop optimizing…
Jani Taskinen authored Jul 30, 2008
114 fi
2b83029 @dsp Fix cc detection in phpize according to changes in configure.in
dsp authored Dec 3, 2008
115 if test "$SUNCC" = "yes"; then
116 if test -n "$auto_cflags"; then
117 CFLAGS="-g"
118 CXXFLAGS="-g"
119 else
120 CFLAGS="$CFLAGS -g"
121 CXXFLAGS="$CFLAGS -g"
122 fi
123 fi
87acbd2 MFH:- Detect whether debugging was enabled in PHP and drop optimizing…
Jani Taskinen authored Jul 30, 2008
124 else
125 PHP_DEBUG=0
126 ZEND_DEBUG=no
127 fi
128
6b4b1e7 MFH: cleanup & sync
Jani Taskinen authored Jul 18, 2007
129 dnl Always shared
130 PHP_BUILD_SHARED
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
131
6b4b1e7 MFH: cleanup & sync
Jani Taskinen authored Jul 18, 2007
132 dnl Required programs
7382178 enable re2c check for self-contained extensions
Sascha Schumann authored Sep 2, 2003
133 PHP_PROG_RE2C
2a6da0f - Restructured and added a few comments here and there.
foobar authored Feb 24, 2005
134 PHP_PROG_AWK
2af5002 ws
Jani Taskinen authored Jul 30, 2008
135
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
136 sinclude(config.m4)
137
138 enable_static=no
139 enable_shared=yes
140
395e75b MFH: Fixed a minor problem in not enabling c++/g++ when not needed.
Jani Taskinen authored Jul 25, 2008
141 dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by PHP_REQUIRE_CXX).
142 dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler.
143 AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
144 undefine([AC_PROG_CXX])
145 AC_DEFUN([AC_PROG_CXX], [])
146 undefine([AC_PROG_CXXCPP])
e4ad267 @dsp MFB: - Fixed the fix for not requiring C++ always
dsp authored Jul 27, 2008
147 AC_DEFUN([AC_PROG_CXXCPP], [php_prog_cxxcpp=disabled])
395e75b MFH: Fixed a minor problem in not enabling c++/g++ when not needed.
Jani Taskinen authored Jul 25, 2008
148 ])
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
149 AC_PROG_LIBTOOL
150
708cb0e MFH:- Applied the missing parts to phpize.m4 for zend extension builds
Jani Taskinen authored Jul 31, 2008
151 all_targets='$(PHP_MODULES) $(PHP_ZEND_EX)'
7243d31 MFH: - Fixed header installing under phpize builds
foobar authored Nov 21, 2005
152 install_targets="install-modules install-headers"
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
153 phplibdir="`pwd`/modules"
83b1883 @Define HAVE_CONFIG_H when building standalone DSO extensions (Stig)
Stig Bakken authored May 20, 2001
154 CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H"
a283caf centralize cflags
Sascha Schumann authored Sep 3, 2003
155 CFLAGS_CLEAN='$(CFLAGS)'
c1c44dd MFH: - Add missing CXXFLAGS_CLEAN variable.
foobar authored Jun 1, 2007
156 CXXFLAGS_CLEAN='$(CXXFLAGS)'
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
157
158 test "$prefix" = "NONE" && prefix="/usr/local"
159 test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
160
9d9d39a Please welcome the new build system.
Sascha Schumann authored Mar 7, 2002
161 PHP_SUBST(PHP_MODULES)
708cb0e MFH:- Applied the missing parts to phpize.m4 for zend extension builds
Jani Taskinen authored Jul 31, 2008
162 PHP_SUBST(PHP_ZEND_EX)
163
9d9d39a Please welcome the new build system.
Sascha Schumann authored Mar 7, 2002
164 PHP_SUBST(all_targets)
165 PHP_SUBST(install_targets)
166
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
167 PHP_SUBST(prefix)
168 PHP_SUBST(exec_prefix)
169 PHP_SUBST(libdir)
170 PHP_SUBST(prefix)
171 PHP_SUBST(phplibdir)
7243d31 MFH: - Fixed header installing under phpize builds
foobar authored Nov 21, 2005
172 PHP_SUBST(phpincludedir)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
173
174 PHP_SUBST(CC)
175 PHP_SUBST(CFLAGS)
e5b8617 CFLAGS_CLEAN was not properly defined
Sascha Schumann authored Dec 16, 2002
176 PHP_SUBST(CFLAGS_CLEAN)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
177 PHP_SUBST(CPP)
178 PHP_SUBST(CPPFLAGS)
179 PHP_SUBST(CXX)
e891278 Add missing subst
foobar authored Mar 4, 2005
180 PHP_SUBST(CXXFLAGS)
c1c44dd MFH: - Add missing CXXFLAGS_CLEAN variable.
foobar authored Jun 1, 2007
181 PHP_SUBST(CXXFLAGS_CLEAN)
5989ae5 Fix building external extensions.
Sascha Schumann authored May 2, 2000
182 PHP_SUBST(EXTENSION_DIR)
ee5fd96 - Made it possible to do "make test" for phpized extensions
foobar authored Aug 8, 2005
183 PHP_SUBST(PHP_EXECUTABLE)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
184 PHP_SUBST(EXTRA_LDFLAGS)
185 PHP_SUBST(EXTRA_LIBS)
186 PHP_SUBST(INCLUDES)
187 PHP_SUBST(LFLAGS)
4a0291d - Make it possible to build ext/openssl as shared extension
foobar authored Mar 20, 2002
188 PHP_SUBST(LDFLAGS)
5989ae5 Fix building external extensions.
Sascha Schumann authored May 2, 2000
189 PHP_SUBST(SHARED_LIBTOOL)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
190 PHP_SUBST(LIBTOOL)
191 PHP_SUBST(SHELL)
7243d31 MFH: - Fixed header installing under phpize builds
foobar authored Nov 21, 2005
192 PHP_SUBST(INSTALL_HEADERS)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
193
9d9d39a Please welcome the new build system.
Sascha Schumann authored Mar 7, 2002
194 PHP_GEN_BUILD_DIRS
195 PHP_GEN_GLOBAL_MAKEFILE
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
196
6262539 - Added PHP_INSTALL_HEADERS() macro
foobar authored May 7, 2005
197 test -d modules || $php_shtool mkdir modules
cae3b7d Pear Changes:
Sascha Schumann authored May 2, 2000
198 touch .deps
5989ae5 Fix building external extensions.
Sascha Schumann authored May 2, 2000
199
7a75900 HEADS UP: renamed config header file in "phpize"d extensions to
Stig Bakken authored Mar 12, 2001
200 AC_CONFIG_HEADER(config.h)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored Dec 30, 1999
201
202 AC_OUTPUT()
Something went wrong with that request. Please try again.