source: trunk/config.m4 @ 990

Last change on this file since 990 was 990, checked in by moo, 21 months ago

split trace

  • Property svn:eol-style set to native
File size: 4.3 KB
RevLine 
[1]1dnl vim:ts=2:sw=2:expandtab
2
[982]3AC_DEFUN([XCACHE_MODULE], [
[11]4  PHP_ARG_ENABLE(xcache-$1, for XCache $1,
5  [  --enable-xcache-$2    XCache: $4], no, no)
6  if test "$PHP_$3" != "no"; then
[982]7    xcache_sources="$xcache_sources submodules/xc_$1.c"
[26]8    XCACHE_MODULES="$XCACHE_MODULES $1"
[8]9    HAVE_$3=1
[11]10    AC_DEFINE([HAVE_$3], 1, [Define for XCache: $4])
[8]11  else
12    HAVE_$3=
[1]13  fi
14])dnl
15
[11]16PHP_ARG_ENABLE(xcache, for XCache support,
17[  --enable-xcache         Include XCache support.])
[1]18
19if test "$PHP_XCACHE" != "no"; then
[982]20  PHP_ARG_ENABLE(xcache-constant, for XCache handle of compile time constant,
[95]21  [  --enable-xcache-constant        XCache: Handle new constants made by php compiler (e.g.: for __halt_compiler)], yes, no)
[982]22  if test "$PHP_XCACHE_CONSTANT" != "no"; then
23    AC_DEFINE([HAVE_XCACHE_CONSTANT], 1, [Define to enable XCache handling of compile time constants])
24  fi
[95]25
[982]26  xcache_sources="
27                  util/xc_stack.c \
[990]28                  util/xc_trace.c \
[1]29                  xcache.c \
[987]30                  xcache/xc_const_string.c \
31                  xcache/xc_lock.c \
32                  xcache/xc_mem.c \
33                  xcache/xc_opcode_spec.c \
34                  xcache/xc_processor.c \
35                  xcache/xc_sandbox.c \
36                  xcache/xc_shm.c \
37                  xcache/xc_shm_mmap.c \
38                  xcache/xc_utils.c \
[1]39                  "
[26]40  XCACHE_MODULES="cacher"
[982]41  XCACHE_MODULE([optimizer],    [optimizer   ], [XCACHE_OPTIMIZER],    [(N/A)])
42  XCACHE_MODULE([coverager],    [coverager   ], [XCACHE_COVERAGER],    [Enable code coverage dumper, useful for testing php scripts])
43  XCACHE_MODULE([assembler],    [assembler   ], [XCACHE_ASSEMBLER],    [(N/A)])
44  XCACHE_MODULE([disassembler], [disassembler], [XCACHE_DISASSEMBLER], [Enable opcode to php variable dumper, NOT for production server])
45  XCACHE_MODULE([encoder],      [encoder     ], [XCACHE_ENCODER],      [(N/A)])
46  XCACHE_MODULE([decoder],      [decoder     ], [XCACHE_DECODER],      [(N/A)])
[26]47  AC_DEFINE_UNQUOTED([XCACHE_MODULES], "$XCACHE_MODULES", [Define what modules is built with XCache])
[1]48
[11]49  PHP_ARG_ENABLE(xcache-test, for XCache self test,
50  [  --enable-xcache-test            XCache: Enable self test - FOR DEVELOPERS ONLY!!], no, no)
51  if test "$PHP_XCACHE_TEST" != "no"; then
[1]52    XCACHE_ENABLE_TEST=-DXCACHE_ENABLE_TEST
[987]53    xcache_sources="$xcache_sources xcache/xc_malloc.c"
[11]54    AC_DEFINE([HAVE_XCACHE_TEST], 1, [Define to enable XCache self test])
[1]55  else
56    XCACHE_ENABLE_TEST=
57  fi
58  PHP_SUBST([XCACHE_ENABLE_TEST])
59
[230]60  PHP_ARG_ENABLE(xcache-dprint, for XCache self test,
61  [  --enable-xcache-dprint          XCache: Enable debug print functions - FOR DEVELOPERS ONLY!!], no, no)
62  if test "$PHP_XCACHE_DPRINT" != "no"; then
63    AC_DEFINE([HAVE_XCACHE_DPRINT], 1, [Define to enable XCache debug print functions])
64  fi
65
[478]66  PHP_NEW_EXTENSION(xcache, $xcache_sources, $ext_shared)
67  PHP_ADD_MAKEFILE_FRAGMENT()
68
[355]69  AC_PATH_PROGS([XCACHE_AWK], [gawk awk])
[169]70  dnl clean locale for gawk 3.1.5 assertion bug
[355]71  if echo | LANG=C "$XCACHE_AWK" -- '' > /dev/null 2>&1 ; then
72    XCACHE_AWK="LANG=C $XCACHE_AWK"
[169]73  else
[355]74    if echo | /usr/bin/env - "$XCACHE_AWK" -- '' > /dev/null 2>&1 ; then
75      XCACHE_AWK="/usr/bin/env - $XCACHE_AWK"
[169]76    fi
77  fi
[355]78  PHP_SUBST([XCACHE_AWK])
[11]79  AC_PATH_PROGS([M4], [m4])
[410]80  if test "$PHP_XCACHE_TEST" != "no"; then
81    if echo | "$M4" -E > /dev/null 2>&1 ; then
82      M4="$M4 -E"
83    fi
[186]84  fi
[292]85   dnl fix for solaris m4: size of the push-back and argument
86  if echo | "$M4" -B 102400 > /dev/null 2>&1 ; then
87    M4="$M4 -B 102400"
88  fi
[22]89  PHP_SUBST([M4])
[694]90  XCACHE_BACKTICK="'"'`'"'"
91  PHP_SUBST([XCACHE_BACKTICK])
[11]92  AC_PATH_PROGS([GREP], [grep])
[22]93  PHP_SUBST([GREP])
[11]94  AC_PATH_PROGS([SED], [sed])
[22]95  PHP_SUBST([SED])
[11]96
97  AC_PATH_PROGS([INDENT], [indent cat])
[87]98  XCACHE_INDENT=cat
[1]99  case $INDENT in
100  */indent[)]
[842]101    XCACHE_INDENT="$INDENT"
102    opts="-kr --use-tabs --tab-size 4"
[36]103    if echo | $INDENT $opts > /dev/null 2>&1 ; then
[842]104      XCACHE_INDENT="$XCACHE_INDENT $opts"
[36]105    fi
[842]106    opts="-sob -nce"
107    if echo | $INDENT $opts > /dev/null 2>&1 ; then
108      XCACHE_INDENT="$XCACHE_INDENT $opts"
109    fi
110    opts="-l 160"
111    if echo | $INDENT $opts > /dev/null 2>&1 ; then
112      XCACHE_INDENT="$XCACHE_INDENT $opts"
113    fi
[1]114    ;;
115  esac
116  PHP_SUBST([XCACHE_INDENT])
117
[8]118  dnl $ac_srcdir etc require PHP_NEW_EXTENSION
[1]119  XCACHE_PROC_SOURCES=`ls $ac_srcdir/processor/*.m4`
120  PHP_SUBST([XCACHE_PROC_SOURCES])
121fi
Note: See TracBrowser for help on using the repository browser.