Skip to content
Newer
Older
100644 122 lines (95 sloc) 2.42 KB
9d9d39a Please welcome the new build system.
Sascha Schumann authored
1 dnl This file becomes configure.in for self-contained extensions.
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
2
c28f59a - Proper fix for phpize when dealing with PECL
foobar authored
3 divert(1)
4
5 AC_PREREQ(2.13)
9d9d39a Please welcome the new build system.
Sascha Schumann authored
6 AC_INIT(config.m4)
7
b74a5ea - Make sure EGREP and SED get set early enough.
foobar authored
8 PHP_CONFIG_NICE(config.nice)
9
69eec3f MFB_4_3: Quote macro names in AC_DEFUN()
foobar authored
10 AC_DEFUN([PHP_WITH_PHP_CONFIG],[
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
11 AC_ARG_WITH(php-config,
83b1883 @Define HAVE_CONFIG_H when building standalone DSO extensions (Stig)
Stig Bakken authored
12 [ --with-php-config=PATH],[
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
13 PHP_CONFIG=$withval
14 ],[
15 PHP_CONFIG=php-config
16 ])
17
18 prefix=`$PHP_CONFIG --prefix 2>/dev/null`
19 INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
cae3b7d Pear Changes:
Sascha Schumann authored
20 EXTENSION_DIR=`$PHP_CONFIG --extension-dir`
ee5fd96 - Made it possible to do "make test" for phpized extensions
foobar authored
21 PHP_EXECUTABLE=`$PHP_CONFIG --php-binary`
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
22
23 if test -z "$prefix"; then
ea6985a PATH is not optional (we print that message, because php-config isn't…
Sascha Schumann authored
24 AC_MSG_ERROR(Cannot find php-config. Please use --with-php-config=PATH)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
25 fi
6262539 - Added PHP_INSTALL_HEADERS() macro
foobar authored
26
27 php_shtool=$srcdir/build/shtool
28 PHP_INIT_BUILD_SYSTEM
29
cae3b7d Pear Changes:
Sascha Schumann authored
30 AC_MSG_CHECKING(for PHP prefix)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
31 AC_MSG_RESULT($prefix)
cae3b7d Pear Changes:
Sascha Schumann authored
32 AC_MSG_CHECKING(for PHP includes)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
33 AC_MSG_RESULT($INCLUDES)
cae3b7d Pear Changes:
Sascha Schumann authored
34 AC_MSG_CHECKING(for PHP extension directory)
35 AC_MSG_RESULT($EXTENSION_DIR)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
36 ])
e10ca10 Provide context-specific functions which yield the directories
Sascha Schumann authored
37 dnl
69eec3f MFB_4_3: Quote macro names in AC_DEFUN()
foobar authored
38 AC_DEFUN([PHP_EXT_BUILDDIR],[.])dnl
39 AC_DEFUN([PHP_EXT_DIR],[""])dnl
40 AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir])dnl
41 AC_DEFUN([PHP_ALWAYS_SHARED],[
2ea99fe a bit of refactoring and making always_shared a nop in every day life
Sascha Schumann authored
42 ext_output="yes, shared"
43 ext_shared=yes
44 test "[$]$1" = "no" && $1=yes
45 ])dnl
e10ca10 Provide context-specific functions which yield the directories
Sascha Schumann authored
46 dnl
3b9bcd7 Set abs_srcdir. Last example in README.S-C-EXTENSIONS works now.
Sascha Schumann authored
47 abs_srcdir=`(cd $srcdir && pwd)`
9d9d39a Please welcome the new build system.
Sascha Schumann authored
48 abs_builddir=`pwd`
3b9bcd7 Set abs_srcdir. Last example in README.S-C-EXTENSIONS works now.
Sascha Schumann authored
49
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
50 AC_PROG_CC
51 AC_PROG_CC_C_O
52
76906e0 - Add --with-libdir to phpized builds too
foobar authored
53 dnl Support systems with system libraries in e.g. /usr/lib64
54 AC_ARG_WITH(libdir,
55 [ --with-libdir=NAME Look for libraries in .../NAME rather than .../lib],
56 [PHP_LIBDIR=$withval], [PHP_LIBDIR=lib])
57
775a064 Fix some phpize problems.
foobar authored
58 PHP_RUNPATH_SWITCH
4a0291d - Make it possible to build ext/openssl as shared extension
foobar authored
59 PHP_SHLIB_SUFFIX_NAME
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
60 PHP_WITH_PHP_CONFIG
61
9d9d39a Please welcome the new build system.
Sascha Schumann authored
62 PHP_BUILD_SHARED
63
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
64 AC_PREFIX_DEFAULT()
65
7382178 enable re2c check for self-contained extensions
Sascha Schumann authored
66 PHP_PROG_RE2C
2a6da0f - Restructured and added a few comments here and there.
foobar authored
67 PHP_PROG_AWK
4a0291d - Make it possible to build ext/openssl as shared extension
foobar authored
68
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
69 sinclude(config.m4)
70
71 enable_static=no
72 enable_shared=yes
73
74 AC_PROG_LIBTOOL
75
4a5cb37 - Revert that patch, this was not optional at all.
Derick Rethans authored
76 all_targets='$(PHP_MODULES)'
77 install_targets=install-modules
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
78 phplibdir="`pwd`/modules"
83b1883 @Define HAVE_CONFIG_H when building standalone DSO extensions (Stig)
Stig Bakken authored
79 CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H"
a283caf centralize cflags
Sascha Schumann authored
80 CFLAGS_CLEAN='$(CFLAGS)'
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
81
82 test "$prefix" = "NONE" && prefix="/usr/local"
83 test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
84
9d9d39a Please welcome the new build system.
Sascha Schumann authored
85 PHP_SUBST(PHP_MODULES)
86 PHP_SUBST(all_targets)
87 PHP_SUBST(install_targets)
88
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
89 PHP_SUBST(prefix)
90 PHP_SUBST(exec_prefix)
91 PHP_SUBST(libdir)
92 PHP_SUBST(prefix)
93 PHP_SUBST(phplibdir)
94
95 PHP_SUBST(CC)
96 PHP_SUBST(CFLAGS)
e5b8617 CFLAGS_CLEAN was not properly defined
Sascha Schumann authored
97 PHP_SUBST(CFLAGS_CLEAN)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
98 PHP_SUBST(CPP)
99 PHP_SUBST(CPPFLAGS)
100 PHP_SUBST(CXX)
e891278 Add missing subst
foobar authored
101 PHP_SUBST(CXXFLAGS)
5989ae5 Fix building external extensions.
Sascha Schumann authored
102 PHP_SUBST(EXTENSION_DIR)
ee5fd96 - Made it possible to do "make test" for phpized extensions
foobar authored
103 PHP_SUBST(PHP_EXECUTABLE)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
104 PHP_SUBST(EXTRA_LDFLAGS)
105 PHP_SUBST(EXTRA_LIBS)
106 PHP_SUBST(INCLUDES)
107 PHP_SUBST(LFLAGS)
4a0291d - Make it possible to build ext/openssl as shared extension
foobar authored
108 PHP_SUBST(LDFLAGS)
5989ae5 Fix building external extensions.
Sascha Schumann authored
109 PHP_SUBST(SHARED_LIBTOOL)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
110 PHP_SUBST(LIBTOOL)
111 PHP_SUBST(SHELL)
112
9d9d39a Please welcome the new build system.
Sascha Schumann authored
113 PHP_GEN_BUILD_DIRS
114 PHP_GEN_GLOBAL_MAKEFILE
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
115
6262539 - Added PHP_INSTALL_HEADERS() macro
foobar authored
116 test -d modules || $php_shtool mkdir modules
cae3b7d Pear Changes:
Sascha Schumann authored
117 touch .deps
5989ae5 Fix building external extensions.
Sascha Schumann authored
118
7a75900 HEADS UP: renamed config header file in "phpize"d extensions to
Stig Bakken authored
119 AC_CONFIG_HEADER(config.h)
f2f8d38 Integration of -ng changes. Changes:
Sascha Schumann authored
120
121 AC_OUTPUT()
Something went wrong with that request. Please try again.