Changeset aef58ba6ff1f23f0533a4c896a3f71ac64fff84d
- Timestamp:
- 05/10/10 17:03:24 (2 years ago)
- Author:
- Philip Herron <redbrain@…>
- Parents:
- 2d482ecb0a2abf82199a1f7c2350125d362c000f
- Children:
- d375779d1d4dfca413cc875bbe88abbdbf171a17
- git-committer:
- Philip Herron <redbrain@alpha.(none)> / 2010-05-10T17:03:24Z+0100
- Message:
-
cleanup added autoconf check for libpcre3-dev for perl compatible regex semantics
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1eb77a5
|
raef58ba
|
|
| 19 | 19 | Debian/Ubuntu: |
| 20 | 20 | % aptitude install build-essential bison flex autoconf \ |
| 21 | | automake libtool libgmp3-dev libmpfr-dev libreadline5-dev |
| | 21 | automake libtool libgmp3-dev libmpfr-dev libreadline5-dev \ |
| | 22 | libpcre3-dev |
| 22 | 23 | |
| 23 | 24 | openSuse: |
| 24 | | % yast -i gcc bison flex mpfr-devel gmp-devel |
| | 25 | % yast -i gcc bison flex mpfr-devel gmp-devel pcre-devel |
| 25 | 26 | #autoconf stuff too |
| 26 | 27 | |
-
|
r10c72b9
|
raef58ba
|
|
| 80 | 80 | AC_CANONICAL_HOST |
| 81 | 81 | |
| 82 | | AC_ARG_WITH(include, |
| 83 | | [AS_HELP_STRING([--with-include=<inc dir>], |
| 84 | | [external include dir for headers, default null!])], |
| 85 | | [xinclude="$withval"]) |
| 86 | | if test "x$xinclude" != "x"; then |
| 87 | | CFLAGS="$CFLAGS -I$xinclude" |
| 88 | | else |
| 89 | | xinclude="none" |
| 90 | | fi |
| 91 | | |
| 92 | | AC_ARG_WITH(lib, |
| 93 | | [AS_HELP_STRING([--with-lib=<lib dir>], |
| 94 | | [external lib dir for libraries, default null!])], |
| 95 | | [xlib="$withval"]) |
| 96 | | if test "x$xlib" != "x"; then |
| 97 | | LDFLAGS="$LDFLAGS -L$xlib" |
| 98 | | else |
| 99 | | xlib="none" |
| 100 | | fi |
| 101 | | |
| 102 | | CFLAGS_save="$CFLAGS" |
| 103 | | CFLAGS="" |
| | 82 | |
| | 83 | # CFLAGS_save="$CFLAGS" |
| | 84 | # CFLAGS="$" |
| 104 | 85 | |
| 105 | 86 | xpkgs="" |
| … |
… |
|
| 160 | 141 | [AC_MSG_ERROR([MPFR not found, see http://www.mpfr.org/])]) |
| 161 | 142 | AC_CHECK_SIZEOF(mp_limb_t, , [#include <gmp.h>]) |
| | 143 | |
| | 144 | AC_CHECK_LIB([pcre], [pcre_compile], , |
| | 145 | [AC_MSG_ERROR([Libpcre3 - Perl Regex not found. \ |
| | 146 | On Debfian can be found via libpcre3-dev])]) |
| 162 | 147 | |
| 163 | 148 | VL_LIB_READLINE |
| … |
… |
|
| 226 | 211 | AC_CHECK_SIZEOF(long long) |
| 227 | 212 | AC_CHECK_SIZEOF(crl_symbol_obj, , \ |
| 228 | | [#include "crules/symbols.h"]) |
| | 213 | [#include "include/crules/symbols.h"]) |
| 229 | 214 | |
| 230 | 215 | # Checks for header files. |
| … |
… |
|
| 235 | 220 | stdint.h stdio.h getopt.h \ |
| 236 | 221 | assert.h sys/types.h signal.h \ |
| 237 | | fcntl.h pthread.h sys/wait.h]) |
| | 222 | fcntl.h pthread.h sys/wait.h \ |
| | 223 | gmp.h mpfr.h pcre.h]) |
| 238 | 224 | |
| 239 | 225 | # Checks for typedefs, structures, and compiler characteristics. |
| … |
… |
|
| 269 | 255 | echo " * LEX version: $LEX" |
| 270 | 256 | echo " * Perl support: $XPERL" |
| 271 | | echo " * External include dir: $xinclude" |
| 272 | | echo " * External lib dir $xlib" |
| 273 | | echo " * Multi-Precision: yes" |
| | 257 | echo " * GMP & MPFR support: yes" |
| | 258 | echo " * Perl Regex Support: yes" |
| 274 | 259 | echo " * POSIX pthreads: $pthread" |
| 275 | 260 | echo " * DEBUG Symbols: $debug" |
-
|
r43f0e16
|
raef58ba
|
|
| 265 | 265 | crl_error("problem assigning '%s'!\n", functor->identifier ); |
| 266 | 266 | retval = false; |
| 267 | | } |
| | 267 | } |
| 268 | 268 | } |
| 269 | 269 | else |
-
|
r2d482ec
|
raef58ba
|
|
| 979 | 979 | unsigned int idx= 0; |
| 980 | 980 | |
| 981 | | crl_symbol_obj *arg_idx= NULL; char *param_idx= NULL; |
| | 981 | crl_symbol_obj *arg_idx= NULL; |
| | 982 | crl_symbol_obj *param_idx= NULL; |
| 982 | 983 | while( idx < n_parameters ) |
| 983 | 984 | { |
| 984 | | arg_idx= (crl_symbol_obj *) args[ idx ]; |
| 985 | | param_idx= (char *) params[ idx ]; idx++; |
| 986 | | |
| 987 | | crl_debug("assigning parameter <%s>!\n", param_idx ); |
| | 985 | arg_idx = (crl_symbol_obj*) args[ idx ]; |
| | 986 | param_idx = (crl_symbol_obj*) params[ idx ]; |
| | 987 | idx++; |
| | 988 | |
| | 989 | crl_debug("assigning parameter <%s>!\n", param_idx->op_a.string ); |
| 988 | 990 | crl_symbol_obj* o= crl_runtime_evaluate_expression( arg_idx, arg_ctx ); |
| 989 | 991 | crl_assert( o->type == SYMBOL_PRIMARY ); |
| 990 | 992 | |
| 991 | | crl_symbol_obj** s= crl_dd_hash_insert( crl_dd_hash_hash( param_idx ) , |
| | 993 | if( param_idx->op_b_t != TYPE_SYMBOL_NIL ) |
| | 994 | { |
| | 995 | crl_assert( o->op_a_t == TYPE_OBJECT ); |
| | 996 | struct crl_obj_state_t * os = o->op_a.object_state; |
| | 997 | printf("os->identifier = <%s>!\n", os->identifier); |
| | 998 | |
| | 999 | switch( param_idx->op_b_t ) |
| | 1000 | { |
| | 1001 | case TYPE_OBJECT: |
| | 1002 | // already passed the assertion! |
| | 1003 | break; |
| | 1004 | |
| | 1005 | case TYPE_INTEGER: |
| | 1006 | if( strcmp( "Int", os->identifier ) ) |
| | 1007 | { |
| | 1008 | crl_fatal("parameter '%s' is of type <Int> but argument is <%s>!\n", |
| | 1009 | param_idx->op_a.string, os->identifier ); |
| | 1010 | } |
| | 1011 | break; |
| | 1012 | |
| | 1013 | case TYPE_FLOAT: |
| | 1014 | if( strcmp( "Float", os->identifier ) ) |
| | 1015 | { |
| | 1016 | crl_fatal("parameter '%s' is of type <Float> but argument is <%s>!\n", |
| | 1017 | param_idx->op_a.string, os->identifier ); |
| | 1018 | } |
| | 1019 | break; |
| | 1020 | |
| | 1021 | default: |
| | 1022 | crl_fatal("unhandled opcode <0x%X>!\n", param_idx->op_b_t ); |
| | 1023 | break; |
| | 1024 | } |
| | 1025 | } |
| | 1026 | |
| | 1027 | crl_symbol_obj** s= crl_dd_hash_insert( crl_dd_hash_hash( param_idx->op_a.string ) , |
| 992 | 1028 | o , function_ctx->curr->symbol_table ); |
| 993 | 1029 | if( s ) |