Changeset aef58ba6ff1f23f0533a4c896a3f71ac64fff84d

Show
Ignore:
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:
4 modified

Legend:

Unmodified
Added
Removed
  • README

    r1eb77a5 raef58ba  
    1919Debian/Ubuntu: 
    2020 % 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 
    2223 
    2324openSuse: 
    24  % yast -i gcc bison flex mpfr-devel gmp-devel  
     25 % yast -i gcc bison flex mpfr-devel gmp-devel pcre-devel 
    2526 #autoconf stuff too 
    2627 
  • configure.ac

    r10c72b9 raef58ba  
    8080AC_CANONICAL_HOST 
    8181 
    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="$" 
    10485 
    10586xpkgs="" 
     
    160141  [AC_MSG_ERROR([MPFR not found, see http://www.mpfr.org/])]) 
    161142AC_CHECK_SIZEOF(mp_limb_t, , [#include <gmp.h>]) 
     143 
     144AC_CHECK_LIB([pcre], [pcre_compile], , 
     145  [AC_MSG_ERROR([Libpcre3 - Perl Regex not found. \ 
     146On Debfian can be found via libpcre3-dev])]) 
    162147 
    163148VL_LIB_READLINE 
     
    226211AC_CHECK_SIZEOF(long long) 
    227212AC_CHECK_SIZEOF(crl_symbol_obj, , \ 
    228   [#include "crules/symbols.h"]) 
     213  [#include "include/crules/symbols.h"]) 
    229214 
    230215# Checks for header files. 
     
    235220                  stdint.h stdio.h getopt.h \ 
    236221                  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]) 
    238224 
    239225# Checks for typedefs, structures, and compiler characteristics. 
     
    269255echo "   * LEX version:               $LEX" 
    270256echo "   * Perl support:              $XPERL" 
    271 echo "   * External include dir:      $xinclude" 
    272 echo "   * External lib dir           $xlib" 
    273 echo "   * Multi-Precision:           yes" 
     257echo "   * GMP & MPFR support:        yes" 
     258echo "   * Perl Regex Support:        yes" 
    274259echo "   * POSIX pthreads:            $pthread" 
    275260echo "   * DEBUG Symbols:             $debug" 
  • src/rr_context.c

    r43f0e16 raef58ba  
    265265          crl_error("problem assigning '%s'!\n", functor->identifier ); 
    266266          retval = false; 
    267         }  
     267        } 
    268268    } 
    269269  else 
  • src/rr_runtime.c

    r2d482ec raef58ba  
    979979              unsigned int idx= 0; 
    980980 
    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; 
    982983              while( idx < n_parameters ) 
    983984                { 
    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 ); 
    988990                  crl_symbol_obj* o= crl_runtime_evaluate_expression( arg_idx, arg_ctx ); 
    989991                  crl_assert( o->type == SYMBOL_PRIMARY ); 
    990992 
    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 ) , 
    9921028                                                          o , function_ctx->curr->symbol_table ); 
    9931029                  if( s )