My favorites | Sign in
Project Logo
phc
                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
dnl phc -- the open source PHP compiler
dnl See doc/license/README.license for licensing information
dnl
dnl Process this file using autoconf to produce configure

# Running aclocal, automake and autoconf can produce errors. These are avoided by running aclocal:
# $ aclocal -I /usr/share/autoconf-archive -I libltdl
# which adds the macros needed for libtool, boost, etc.

dnl Autoconf requirements
AC_INIT([phc],[0.2.0],[phc-general@phpcompiler.org])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])
AC_PREREQ(2.63) # 2.61 adds a warning. Pre-2.61 just doesnt work.


dnl configure automake
AM_INIT_AUTOMAKE([foreign -Wall -Werror 1.10]) # 1.10 changed a lot of things.
AM_MAINTAINER_MODE


dnl checks for programs
AC_PROG_CC
AC_PROG_CXX

dnl Configure libtool and libltdl
LT_INIT([dlopen])
LT_CONFIG_LTDL_DIR([libltdl])
LTDL_INIT([convenience])


dnl check for other programs
AC_PATH_PROG([gengetopt], [gengetopt])
AC_PATH_PROG([gperf], [gperf])
AC_PATH_PROG([flex], [flex])
AC_PATH_PROG([bison], [bison])
AC_PATH_PROG([patch], [patch])
AC_PATH_PROG([diff], [diff])
AC_PATH_PROG([valgrind], [valgrind])
AC_PATH_PROG([dot], [dot])
AC_PATH_PROG([graphviz_gc], [gc])
AX_BOOST_BASE([1.35.0])

AC_ARG_WITH([maketea],
AS_HELP_STRING([--with-maketea], [path to maketea (if installed)]),
[AC_PATH_PROG([maketea], [maketea], [], [${withval}:${withval}/bin])],
[AC_PATH_PROG([maketea], [maketea])]
)

dnl This seems like more of a --enable/disable option, but the maketea and php options both use --with/without
dnl AC_CHECK_LIB_XERCES
AC_ARG_WITH([xerces],
[AS_HELP_STRING([--with-xerces], [support XML input @<:@default=check@:>@])],
[], # with_xerces is set to true false anyway
[with_xerces=check]
)

# check PHP path
AC_ARG_WITH([php],
AS_HELP_STRING([--with-php=PATH], [PHP installation path (defaults to /usr/local)]),
[
AS_IF([test "x$with_php" != xno],
[AC_CHECK_PHP([$withval])], [AS_VAR_SET([found_embed_sapi], [no])])
],
[
AC_CHECK_PHP([/usr/local])
])


dnl Package information
AC_ARG_ENABLE([gc],
[AS_HELP_STRING([--disable-gc], [Link to the Boehm garbage collector @<:@default=enabled@:>@])])


dnl checks for libraries
AC_LANG([C++])
AC_CHECK_COVARIANCE
AC_CHECK_LIB_CRUN

dnl check xerces unless disabled
AS_IF([test "x$with_xerces" != xno], [AC_CHECK_LIB_XERCES], [])

# USE GC unless disabled
# libgccpp overrides ::new, which is required to collect the Boost Graph Library.
AS_IF([test "x$enable_gc" != xno],
[
AC_CHECK_HEADER([gc/gc_cpp.h], [], [AC_MSG_FAILURE(libgc required)])
AC_CHECK_LIB([gc], [main], [], [AC_MSG_FAILURE(libgc required)])
AC_CHECK_LIB([gccpp], [main], [], [AC_MSG_FAILURE(libgccpp required)])
AC_SUBST([gc_lib], ["-lgc -lgccpp"])
],
[AC_DEFINE(DISABLE_GC, 1)])


# Finishing
# phc_compile_plugin and test/scripts/lib/autovars.php are created using their
# own Make rules, as it's not possible to expand directory prefixes using this
# mechanism. See the autoconf manual, section "Installation Directory
# Variables".
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

# Warn if libphp5 wasn't found
AS_IF(
[test AS_VAR_GET([found_embed_sapi]) = no],
[AC_MSG_WARN(
[
*******************************************************************************
* It seems the PHP embed SAPI has not been installed. *
* *
* You will be able to compile and run phc, but you will not be able to *
* compile PHP scripts with phc. *
* *
* To install the PHP embed SAPI, follow the PHP installation instructions, *
* but make sure to pass the --enable-embed option to the PHP configure *
* script. *
*******************************************************************************]
)])
Show details Hide details

Change log

r3114 by paul.biggar on Jul 04, 2009   Diff
We no longer use the Boost Regex library.
Go to: 
Sign in to write a code review

Older revisions

r2600 by paul.biggar on May 16, 2009   Diff
Merge from trunk. Log:

Merged revisions 2465-2466,2472,2475,2
483,2487,2493-2495,2498-2515,2528,2555
-2556,2558-2566,2583-2585 via svnmerge
...
r2577 by paul.biggar on Apr 20, 2009   Diff
There is a lot of renaming of storage
nodes involved in going from context-
sensitive to context-insensitive. This
does most of it. It uses boost::regex,
which is why the autotools files have
...
r2373 by paul.biggar on Feb 03, 2009   Diff
Merge from trunk. Merge log:

Merged revisions 2311,2317,2324-2325,2
333,2338,2346,2351-2353,2359,2363,2372
via svnmerge from
...
All revisions of this file

File info

Size: 3984 bytes, 119 lines
Hosted by Google Code