Changeset 8 in svn


Ignore:
Timestamp:
2006-05-13T05:19:43+02:00 (9 years ago)
Author:
Xuefer
Message:

make opcode_spec_def.h optional

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/config.m4

    r1 r8  
    88  if test "$PHP_$3" = "yes"; then
    99    xcache_sources="$xcache_sources $1.c"
     10    HAVE_$3=1
    1011    AC_DEFINE([HAVE_$3], 1, [Define for XCACHE: $4])
     12  else
     13    HAVE_$3=
    1114  fi
    1215])dnl
     
    5760  PHP_SUBST([XCACHE_INDENT])
    5861
     62  dnl $ac_srcdir etc require PHP_NEW_EXTENSION
    5963  XCACHE_PROC_SOURCES=`ls $ac_srcdir/processor/*.m4`
    6064  PHP_SUBST([XCACHE_PROC_SOURCES])
     65
     66  AC_MSG_CHECKING(if you have opcode_spec_def.h for xcache)
     67  if test -e "$ac_srcdir/opcode_spec_def.h" ; then
     68    AC_DEFINE([HAVE_XCACHE_OPCODE_SPEC_DEF], 1, [Define if you have opcode_spec_def.h for xcache])
     69    AC_MSG_RESULT(yes)
     70  else
     71    dnl check for features depend on opcode_spec_def.h
     72    AC_MSG_RESULT(no)
     73    define([ERROR], [
     74      AC_MSG_ERROR([cannot build with $1, $ac_srcdir/opcode_spec_def.h required])
     75    ])
     76    if test "$HAVE_XCACHE_DISASSEMBLER" = "1" ; then
     77      ERROR(disassembler)
     78    fi
     79    undefine([ERROR])
     80  fi
    6181fi
  • trunk/disassembler.c

    r1 r8  
    66#define return_value dst
    77
     8#ifndef HAVE_XCACHE_OPCODE_SPEC_DEF
     9#error disassembler cannot be built without xcache/opcode_spec_def.h
     10#endif
    811static void xc_dasm(zval *dst, zend_op_array *op_array TSRMLS_DC) /* {{{ */
    912{
  • trunk/opcode_spec.c

    r1 r8  
    33#include "const_string.h"
    44
     5#ifdef HAVE_XCACHE_OPCODE_SPEC_DEF
    56/* {{{ opcode_spec */
    67#define OPSPEC(ext, op1, op2, res) { OPSPEC_##ext, OPSPEC_##op1, OPSPEC_##op2, OPSPEC_##res },
     
    2425}
    2526/* }}} */
     27#endif
    2628/* {{{ op_spec */
    2729
  • trunk/utils.c

    r1 r8  
    198198/* }}} */
    199199
     200#ifdef HAVE_XCACHE_OPCODE_SPEC_DEF
    200201static void xc_fix_opcode_ex_znode(int tofix, xc_op_spec_t spec, znode *znode, int type TSRMLS_DC) /* {{{ */
    201202{
     
    262263}
    263264/* }}} */
     265#endif
    264266
    265267void xc_install_function(char *filename, zend_function *func, zend_uchar type, char *key, uint len TSRMLS_DC) /* {{{ */
  • trunk/xcache.c

    r1 r8  
    15061506}
    15071507/* }}} */
     1508#ifdef HAVE_XCACHE_OPCODE_SPEC_DEF
    15081509/* {{{ proto string xcache_get_opcode_spec(int opcode) */
    15091510PHP_FUNCTION(xcache_get_opcode_spec)
     
    15291530}
    15301531/* }}} */
     1532#endif
    15311533/* {{{ proto mixed xcache_get_special_value(zval value) */
    15321534PHP_FUNCTION(xcache_get_special_value)
     
    16011603    PHP_FE(xcache_get_data_type,     NULL)
    16021604    PHP_FE(xcache_get_opcode,        NULL)
     1605#ifdef HAVE_XCACHE_OPCODE_SPEC_DEF
    16031606    PHP_FE(xcache_get_opcode_spec,   NULL)
     1607#endif
    16041608    PHP_FE(xcache_is_autoglobal,     NULL)
    16051609    PHP_FE(xcache_inc,               NULL)
Note: See TracChangeset for help on using the changeset viewer.