Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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