Commit c46b7cb5 authored by Lev Walkin's avatar Lev Walkin

*** empty log message ***

parent 5af1a699
...@@ -47,6 +47,7 @@ buf2_fill(const void *buffer, size_t size, void *app_key) { ...@@ -47,6 +47,7 @@ buf2_fill(const void *buffer, size_t size, void *app_key) {
static void static void
check(int is_ok, uint8_t *buf, int size, size_t consumed) { check(int is_ok, uint8_t *buf, int size, size_t consumed) {
T1_t t, *tp; T1_t t, *tp;
void *tpp = &tp;
asn_dec_rval_t rval; asn_dec_rval_t rval;
asn_enc_rval_t erval; asn_enc_rval_t erval;
int ret; int ret;
...@@ -55,7 +56,7 @@ check(int is_ok, uint8_t *buf, int size, size_t consumed) { ...@@ -55,7 +56,7 @@ check(int is_ok, uint8_t *buf, int size, size_t consumed) {
tp = memset(&t, 0, sizeof(t)); tp = memset(&t, 0, sizeof(t));
fprintf(stderr, "Buf %p\n", buf); fprintf(stderr, "Buf %p\n", buf);
rval = ber_decode(0, &asn_DEF_T1, (void **)&tp, buf, size); rval = ber_decode(0, &asn_DEF_T1, (void **)tpp, buf, size);
fprintf(stderr, "Returned code %d, consumed %d\n", fprintf(stderr, "Returned code %d, consumed %d\n",
(int)rval.code, (int)rval.consumed); (int)rval.code, (int)rval.consumed);
......
...@@ -18,7 +18,6 @@ main(int ac, char **av) { ...@@ -18,7 +18,6 @@ main(int ac, char **av) {
asn_enc_rval_t erv; asn_enc_rval_t erv;
asn_dec_rval_t drv; asn_dec_rval_t drv;
char buf[128]; char buf[128];
size_t bufsize = sizeof(buf);
(void)ac; /* Unused argument */ (void)ac; /* Unused argument */
(void)av; /* Unused argument */ (void)av; /* Unused argument */
...@@ -44,35 +43,36 @@ main(int ac, char **av) { ...@@ -44,35 +43,36 @@ main(int ac, char **av) {
* Encode the sequence. * Encode the sequence.
*/ */
erv = der_encode_to_buffer(&asn_DEF_SeqWithMandatory, erv = der_encode_to_buffer(&asn_DEF_SeqWithMandatory,
&swm, buf, &bufsize); &swm, buf, sizeof buf);
assert(erv.encoded == bufsize); assert(erv.encoded > 0);
buf[erv.encoded] = '\0';
/* /*
* Try to decode it using a compatible type. * Try to decode it using a compatible type.
*/ */
drv = ber_decode(0, &asn_DEF_SeqWithOptional, (void **)&swo, drv = ber_decode(0, &asn_DEF_SeqWithOptional, (void **)&swo,
buf, bufsize); buf, erv.encoded);
assert(drv.code == RC_OK); assert(drv.code == RC_OK);
assert(drv.consumed == bufsize); assert(drv.consumed == erv.encoded);
assert(swo->seqOfOpt != 0); assert(swo->seqOfOpt != 0);
xer_fprint(stderr, &asn_DEF_SeqWithOptional, swo); xer_fprint(stderr, &asn_DEF_SeqWithOptional, swo);
swo->seqOfOpt = 0; swo->seqOfOpt = 0;
bufsize = sizeof(buf);
erv = der_encode_to_buffer(&asn_DEF_SeqWithOptional, erv = der_encode_to_buffer(&asn_DEF_SeqWithOptional,
swo, buf, &bufsize); swo, buf, sizeof buf);
assert(erv.encoded == bufsize); assert(erv.encoded > 0);
buf[erv.encoded] = '\0';
swo = 0; swo = 0;
drv = ber_decode(0, &asn_DEF_SeqWithMandatory, (void **)&swo, drv = ber_decode(0, &asn_DEF_SeqWithMandatory, (void **)&swo,
buf, bufsize); buf, erv.encoded);
assert(drv.code != RC_OK); assert(drv.code != RC_OK);
swo = 0; swo = 0;
drv = ber_decode(0, &asn_DEF_SeqWithOptional, (void **)&swo, drv = ber_decode(0, &asn_DEF_SeqWithOptional, (void **)&swo,
buf, bufsize); buf, erv.encoded);
assert(drv.code == RC_OK); assert(drv.code == RC_OK);
assert(drv.consumed == bufsize); assert(drv.consumed == erv.encoded);
assert(swo->seqOfOpt == 0); assert(swo->seqOfOpt == 0);
xer_fprint(stderr, &asn_DEF_SeqWithOptional, swo); xer_fprint(stderr, &asn_DEF_SeqWithOptional, swo);
......
...@@ -463,7 +463,7 @@ ac_includes_default="\ ...@@ -463,7 +463,7 @@ ac_includes_default="\
# include <unistd.h> # include <unistd.h>
#endif" #endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL CONFIGURE_DEPENDS CPLUSPLUS_FOUND_TRUE CPLUSPLUS_FOUND_FALSE YACC LEX LEXLIB LEX_OUTPUT_ROOT ADD_CFLAGS LIBOBJS LTLIBOBJS' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL CONFIGURE_DEPENDS YACC LEX LEXLIB LEX_OUTPUT_ROOT ADD_CFLAGS LIBOBJS LTLIBOBJS'
ac_subst_files='' ac_subst_files=''
# Initialize some variables set by options. # Initialize some variables set by options.
...@@ -1607,7 +1607,7 @@ test -n "$target_alias" && ...@@ -1607,7 +1607,7 @@ test -n "$target_alias" &&
NONENONEs,x,x, && NONENONEs,x,x, &&
program_prefix=${target_alias}- program_prefix=${target_alias}-
am__api_version="1.8" am__api_version="1.9"
# Find a good install program. We prefer a C program (faster), # Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or # so one script is as good as another. But avoid the broken or
# incompatible versions: # incompatible versions:
...@@ -1759,13 +1759,21 @@ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} ...@@ -1759,13 +1759,21 @@ echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi fi
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
# Keeping the `.' argument allows $(mkdir_p) to be used without # We used to keeping the `.' as first argument, in order to
# argument. Indeed, we sometimes output rules like # allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir) # $(mkdir_p) $(somedir)
# where $(somedir) is conditionally defined. # where $(somedir) is conditionally defined. However this is wrong
# (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more # for two reasons:
# expensive solution, as it forces Make to start a sub-shell.) # 1. if the package is installed by a user who cannot write `.'
mkdir_p='mkdir -p -- .' # make install will fail,
# 2. the above comment should most certainly read
# $(mkdir_p) $(DESTDIR)$(somedir)
# so it does not work when $(somedir) is undefined and
# $(DESTDIR) is not.
# To support the latter case, we have to write
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
# so the `.' trick is pointless.
mkdir_p='mkdir -p --'
else else
# On NextStep and OpenStep, the `mkdir' command does not # On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as # recognize any option. It will interpret all options as
...@@ -1909,9 +1917,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} ...@@ -1909,9 +1917,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
AMTAR=${AMTAR-"${am_missing_run}tar"}
install_sh=${install_sh-"$am_aux_dir/install-sh"} install_sh=${install_sh-"$am_aux_dir/install-sh"}
# Installed binaries are usually stripped using `strip' when the user # Installed binaries are usually stripped using `strip' when the user
...@@ -2004,6 +2009,13 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" ...@@ -2004,6 +2009,13 @@ INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
# We need awk for the "check" target. The system "awk" is bad on # We need awk for the "check" target. The system "awk" is bad on
# some platforms. # some platforms.
# Always define AMTAR for backward compatibility.
AMTAR=${AMTAR-"${am_missing_run}tar"}
am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
...@@ -3691,7 +3703,7 @@ ia64-*-hpux*) ...@@ -3691,7 +3703,7 @@ ia64-*-hpux*)
;; ;;
*-*-irix6*) *-*-irix6*)
# Find out which ABI we are using. # Find out which ABI we are using.
echo '#line 3694 "configure"' > conftest.$ac_ext echo '#line 3706 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5 (eval $ac_compile) 2>&5
ac_status=$? ac_status=$?
...@@ -5263,7 +5275,7 @@ fi ...@@ -5263,7 +5275,7 @@ fi
# Provide some information about the compiler. # Provide some information about the compiler.
echo "$as_me:5266:" \ echo "$as_me:5278:" \
"checking for Fortran 77 compiler version" >&5 "checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2` ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
...@@ -6297,11 +6309,11 @@ else ...@@ -6297,11 +6309,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6300: $lt_compile\"" >&5) (eval echo "\"\$as_me:6312: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:6304: \$? = $ac_status" >&5 echo "$as_me:6316: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -6530,11 +6542,11 @@ else ...@@ -6530,11 +6542,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6533: $lt_compile\"" >&5) (eval echo "\"\$as_me:6545: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:6537: \$? = $ac_status" >&5 echo "$as_me:6549: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -6590,11 +6602,11 @@ else ...@@ -6590,11 +6602,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6593: $lt_compile\"" >&5) (eval echo "\"\$as_me:6605: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:6597: \$? = $ac_status" >&5 echo "$as_me:6609: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
...@@ -8774,7 +8786,7 @@ else ...@@ -8774,7 +8786,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8777 "configure" #line 8789 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -8872,7 +8884,7 @@ else ...@@ -8872,7 +8884,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 8875 "configure" #line 8887 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -11051,11 +11063,11 @@ else ...@@ -11051,11 +11063,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11054: $lt_compile\"" >&5) (eval echo "\"\$as_me:11066: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:11058: \$? = $ac_status" >&5 echo "$as_me:11070: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -11111,11 +11123,11 @@ else ...@@ -11111,11 +11123,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11114: $lt_compile\"" >&5) (eval echo "\"\$as_me:11126: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:11118: \$? = $ac_status" >&5 echo "$as_me:11130: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
...@@ -12472,7 +12484,7 @@ else ...@@ -12472,7 +12484,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 12475 "configure" #line 12487 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -12570,7 +12582,7 @@ else ...@@ -12570,7 +12582,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 12573 "configure" #line 12585 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -13397,11 +13409,11 @@ else ...@@ -13397,11 +13409,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13400: $lt_compile\"" >&5) (eval echo "\"\$as_me:13412: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:13404: \$? = $ac_status" >&5 echo "$as_me:13416: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -13457,11 +13469,11 @@ else ...@@ -13457,11 +13469,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13460: $lt_compile\"" >&5) (eval echo "\"\$as_me:13472: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:13464: \$? = $ac_status" >&5 echo "$as_me:13476: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
...@@ -15491,11 +15503,11 @@ else ...@@ -15491,11 +15503,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15494: $lt_compile\"" >&5) (eval echo "\"\$as_me:15506: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:15498: \$? = $ac_status" >&5 echo "$as_me:15510: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -15724,11 +15736,11 @@ else ...@@ -15724,11 +15736,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15727: $lt_compile\"" >&5) (eval echo "\"\$as_me:15739: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err) (eval "$lt_compile" 2>conftest.err)
ac_status=$? ac_status=$?
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:15731: \$? = $ac_status" >&5 echo "$as_me:15743: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings # So say no if there are warnings
...@@ -15784,11 +15796,11 @@ else ...@@ -15784,11 +15796,11 @@ else
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'` -e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15787: $lt_compile\"" >&5) (eval echo "\"\$as_me:15799: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err) (eval "$lt_compile" 2>out/conftest.err)
ac_status=$? ac_status=$?
cat out/conftest.err >&5 cat out/conftest.err >&5
echo "$as_me:15791: \$? = $ac_status" >&5 echo "$as_me:15803: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext if (exit $ac_status) && test -s out/conftest2.$ac_objext
then then
# The compiler can only warn and ignore the option if not recognized # The compiler can only warn and ignore the option if not recognized
...@@ -17968,7 +17980,7 @@ else ...@@ -17968,7 +17980,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 17971 "configure" #line 17983 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -18066,7 +18078,7 @@ else ...@@ -18066,7 +18078,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 18069 "configure" #line 18081 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -20248,23 +20260,136 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ...@@ -20248,23 +20260,136 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=cc # Find a good install program. We prefer a C program (faster),
ac_cpp='$CXXCPP $CPPFLAGS' # so one script is as good as another. But avoid the broken or
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' # incompatible versions:
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' # SysV /etc/install, /usr/sbin/install
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # SunOS /usr/etc/install
if test -n "$ac_tool_prefix"; then # IRIX /sbin/install
for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC # AIX /bin/install
do # AmigaOS /C/install, which installs bootblocks on floppy discs
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
set dummy $ac_tool_prefix$ac_prog; ac_word=$2 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
# Account for people who put trailing slashes in PATH elements.
case $as_dir/ in
./ | .// | /cC/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
/usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
# Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
break 3
fi
fi
done
done
;;
esac
done
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
INSTALL=$ac_install_sh
fi
fi
echo "$as_me:$LINENO: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo "$as_me:$LINENO: checking whether ln -s works" >&5
echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me:$LINENO: result: no, using $LN_S" >&5
echo "${ECHO_T}no, using $LN_S" >&6
fi
echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.make <<\_ACEOF
all:
@echo 'ac_maketemp="$(MAKE)"'
_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
SET_MAKE=
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
for ac_prog in 'bison -y' byacc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5 echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CXX+set}" = set; then if test "${ac_cv_prog_YACC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
if test -n "$CXX"; then if test -n "$YACC"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test. ac_cv_prog_YACC="$YACC" # Let the user override the test.
else else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH for as_dir in $PATH
...@@ -20273,7 +20398,7 @@ do ...@@ -20273,7 +20398,7 @@ do
test -z "$as_dir" && as_dir=. test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" ac_cv_prog_YACC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2 break 2
fi fi
...@@ -20282,31 +20407,30 @@ done ...@@ -20282,31 +20407,30 @@ done
fi fi
fi fi
CXX=$ac_cv_prog_CXX YACC=$ac_cv_prog_YACC
if test -n "$CXX"; then if test -n "$YACC"; then
echo "$as_me:$LINENO: result: $CXX" >&5 echo "$as_me:$LINENO: result: $YACC" >&5
echo "${ECHO_T}$CXX" >&6 echo "${ECHO_T}$YACC" >&6
else else
echo "$as_me:$LINENO: result: no" >&5 echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6 echo "${ECHO_T}no" >&6
fi fi
test -n "$CXX" && break test -n "$YACC" && break
done done
fi test -n "$YACC" || YACC="yacc"
if test -z "$CXX"; then
ac_ct_CXX=$CXX for ac_prog in flex lex
for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5 echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then if test "${ac_cv_prog_LEX+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
if test -n "$ac_ct_CXX"; then if test -n "$LEX"; then
ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. ac_cv_prog_LEX="$LEX" # Let the user override the test.
else else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH for as_dir in $PATH
...@@ -20315,7 +20439,7 @@ do ...@@ -20315,7 +20439,7 @@ do
test -z "$as_dir" && as_dir=. test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog" ac_cv_prog_LEX="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2 break 2
fi fi
...@@ -20324,898 +20448,82 @@ done ...@@ -20324,898 +20448,82 @@ done
fi fi
fi fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX LEX=$ac_cv_prog_LEX
if test -n "$ac_ct_CXX"; then if test -n "$LEX"; then
echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "$as_me:$LINENO: result: $LEX" >&5
echo "${ECHO_T}$ac_ct_CXX" >&6 echo "${ECHO_T}$LEX" >&6
else else
echo "$as_me:$LINENO: result: no" >&5 echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6 echo "${ECHO_T}no" >&6
fi fi
test -n "$ac_ct_CXX" && break test -n "$LEX" && break
done done
test -n "$ac_ct_CXX" || ac_ct_CXX="g++" test -n "$LEX" || LEX=":"
CXX=$ac_ct_CXX
fi
# Provide some information about the compiler.
echo "$as_me:$LINENO:" \
"checking for C++ compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
(eval $ac_compiler --version </dev/null >&5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
(eval $ac_compiler -v </dev/null >&5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
(eval $ac_compiler -V </dev/null >&5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 if test -z "$LEXLIB"
echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 then
if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
if test "${ac_cv_lib_fl_yywrap+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6 echo $ECHO_N "(cached) $ECHO_C" >&6
else else
cat >conftest.$ac_ext <<_ACEOF ac_check_lib_save_LIBS=$LIBS
LIBS="-lfl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */ /* confdefs.h. */
_ACEOF _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char yywrap ();
int int
main () main ()
{ {
#ifndef __GNUC__ yywrap ();
choke me
#endif
; ;
return 0; return 0;
} }
_ACEOF _ACEOF
rm -f conftest.$ac_objext rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_compile) 2>conftest.er1 (eval $ac_link) 2>conftest.er1
ac_status=$? ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1 rm -f conftest.er1
cat conftest.err >&5 cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && (exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag" { ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err' || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } && (exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext' { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5 (eval $ac_try) 2>&5
ac_status=$? ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then (exit $ac_status); }; }; then
ac_compiler_gnu=yes ac_cv_lib_fl_yywrap=yes
else else
echo "$as_me: failed program was:" >&5 echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5 sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no ac_cv_lib_fl_yywrap=no
fi fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext rm -f conftest.err conftest.$ac_objext \
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
GXX=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-g"
echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cxx_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cxx_g=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cxx_g=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then
CXXFLAGS="-g -O2"
else
CXXFLAGS="-g"
fi
else
if test "$GXX" = yes; then
CXXFLAGS="-O2"
else
CXXFLAGS=
fi
fi
for ac_declaration in \
'' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
'extern "C" void exit (int);' \
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_declaration
#include <stdlib.h>
int
main ()
{
exit (42);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
continue
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_declaration
int
main ()
{
exit (42);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_cxx_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
echo '#ifdef __cplusplus' >>confdefs.h
echo $ac_declaration >>confdefs.h
echo '#endif' >>confdefs.h
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
depcc="$CXX" am_compiler_list=
echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_CXX_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CXX_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_CXX_dependencies_compiler_type=none
fi
fi
echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
if
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
am__fastdepCXX_TRUE=
am__fastdepCXX_FALSE='#'
else
am__fastdepCXX_TRUE='#'
am__fastdepCXX_FALSE=
fi
ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
if test -z "$CXXCPP"; then
if test "${ac_cv_prog_CXXCPP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
# Double quotes because CXXCPP needs to be expanded
for CXXCPP in "$CXX -E" "/lib/cpp"
do
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_cxx_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_cxx_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
# Broken: success on invalid input.
continue
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
break
fi
done
ac_cv_prog_CXXCPP=$CXXCPP
fi
CXXCPP=$ac_cv_prog_CXXCPP
else
ac_cv_prog_CXXCPP=$CXXCPP
fi
echo "$as_me:$LINENO: result: $CXXCPP" >&5
echo "${ECHO_T}$CXXCPP" >&6
ac_preproc_ok=false
for ac_cxx_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
# <limits.h> exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_cxx_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_cxx_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
# Broken: success on invalid input.
continue
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
{ { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&5
echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_ct_CXX"; then
CPLUSPLUS_FOUND_TRUE=
CPLUSPLUS_FOUND_FALSE='#'
else
CPLUSPLUS_FOUND_TRUE='#'
CPLUSPLUS_FOUND_FALSE=
fi
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
# Account for people who put trailing slashes in PATH elements.
case $as_dir/ in
./ | .// | /cC/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
/usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
# Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
break 3
fi
fi
done
done
;;
esac
done
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
INSTALL=$ac_install_sh
fi
fi
echo "$as_me:$LINENO: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo "$as_me:$LINENO: checking whether ln -s works" >&5
echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me:$LINENO: result: no, using $LN_S" >&5
echo "${ECHO_T}no, using $LN_S" >&6
fi
echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.make <<\_ACEOF
all:
@echo 'ac_maketemp="$(MAKE)"'
_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
SET_MAKE=
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
for ac_prog in 'bison -y' byacc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_YACC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_YACC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
YACC=$ac_cv_prog_YACC
if test -n "$YACC"; then
echo "$as_me:$LINENO: result: $YACC" >&5
echo "${ECHO_T}$YACC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"
for ac_prog in flex lex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_LEX+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$LEX"; then
ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_LEX="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
LEX=$ac_cv_prog_LEX
if test -n "$LEX"; then
echo "$as_me:$LINENO: result: $LEX" >&5
echo "${ECHO_T}$LEX" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$LEX" && break
done
test -n "$LEX" || LEX=":"
if test -z "$LEXLIB"
then
echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
if test "${ac_cv_lib_fl_yywrap+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char yywrap ();
int
main ()
{
yywrap ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_fl_yywrap=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_fl_yywrap=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi fi
echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5 echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6 echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
...@@ -22609,20 +21917,6 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. ...@@ -22609,20 +21917,6 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;} Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; } { (exit 1); exit 1; }; }
fi fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
if test -z "${CPLUSPLUS_FOUND_TRUE}" && test -z "${CPLUSPLUS_FOUND_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"CPLUSPLUS_FOUND\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
echo "$as_me: error: conditional \"CPLUSPLUS_FOUND\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
: ${CONFIG_STATUS=./config.status} : ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files ac_clean_files_save=$ac_clean_files
...@@ -23192,7 +22486,6 @@ s,@AUTOCONF@,$AUTOCONF,;t t ...@@ -23192,7 +22486,6 @@ s,@AUTOCONF@,$AUTOCONF,;t t
s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t
s,@AUTOHEADER@,$AUTOHEADER,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t
s,@MAKEINFO@,$MAKEINFO,;t t s,@MAKEINFO@,$MAKEINFO,;t t
s,@AMTAR@,$AMTAR,;t t
s,@install_sh@,$install_sh,;t t s,@install_sh@,$install_sh,;t t
s,@STRIP@,$STRIP,;t t s,@STRIP@,$STRIP,;t t
s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
...@@ -23201,6 +22494,9 @@ s,@mkdir_p@,$mkdir_p,;t t ...@@ -23201,6 +22494,9 @@ s,@mkdir_p@,$mkdir_p,;t t
s,@AWK@,$AWK,;t t s,@AWK@,$AWK,;t t
s,@SET_MAKE@,$SET_MAKE,;t t s,@SET_MAKE@,$SET_MAKE,;t t
s,@am__leading_dot@,$am__leading_dot,;t t s,@am__leading_dot@,$am__leading_dot,;t t
s,@AMTAR@,$AMTAR,;t t
s,@am__tar@,$am__tar,;t t
s,@am__untar@,$am__untar,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t s,@MAINT@,$MAINT,;t t
...@@ -23240,8 +22536,6 @@ s,@FFLAGS@,$FFLAGS,;t t ...@@ -23240,8 +22536,6 @@ s,@FFLAGS@,$FFLAGS,;t t
s,@ac_ct_F77@,$ac_ct_F77,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t
s,@LIBTOOL@,$LIBTOOL,;t t s,@LIBTOOL@,$LIBTOOL,;t t
s,@CONFIGURE_DEPENDS@,$CONFIGURE_DEPENDS,;t t s,@CONFIGURE_DEPENDS@,$CONFIGURE_DEPENDS,;t t
s,@CPLUSPLUS_FOUND_TRUE@,$CPLUSPLUS_FOUND_TRUE,;t t
s,@CPLUSPLUS_FOUND_FALSE@,$CPLUSPLUS_FOUND_FALSE,;t t
s,@YACC@,$YACC,;t t s,@YACC@,$YACC,;t t
s,@LEX@,$LEX,;t t s,@LEX@,$LEX,;t t
s,@LEXLIB@,$LEXLIB,;t t s,@LEXLIB@,$LEXLIB,;t t
...@@ -23871,27 +23165,21 @@ echo X"$mf" | ...@@ -23871,27 +23165,21 @@ echo X"$mf" |
else else
continue continue
fi fi
grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEPDIR, am__include, and am__quote
# Extract the definition of DEP_FILES from the Makefile without # from the Makefile without running `make'.
# running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it # When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"` U=`sed -n 's/^U = //p' < "$mf"`
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # Find all dependency output files, they are included files with
# We invoke sed twice because it is the simplest approach to # $(DEPDIR) in their names. We invoke sed twice because it is the
# changing $(DEPDIR) to its actual value in the expansion. # simplest approach to changing $(DEPDIR) to its actual value in the
for file in `sed -n ' # expansion.
/^DEP_FILES = .*\\\\$/ { for file in `sed -n "
s/^DEP_FILES = // s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
:loop
s/\\\\$//
p
n
/\\\\$/ b loop
p
}
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists. # Make sure the directory exists.
test -f "$dirpart/$file" && continue test -f "$dirpart/$file" && continue
......
...@@ -26,9 +26,6 @@ AC_SUBST(CONFIGURE_DEPENDS) ...@@ -26,9 +26,6 @@ AC_SUBST(CONFIGURE_DEPENDS)
dnl Checks for programs. dnl Checks for programs.
AC_PROG_CC AC_PROG_CC
AC_PROG_CPP AC_PROG_CPP
AC_PROG_CXX
AC_PROG_CXXCPP
AM_CONDITIONAL(CPLUSPLUS_FOUND, test -n "$ac_ct_CXX")
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
AC_PROG_MAKE_SET AC_PROG_MAKE_SET
......
...@@ -1784,7 +1784,8 @@ emit_single_member_PER_constraint(arg_t *arg, asn1cnst_range_t *range, char *typ ...@@ -1784,7 +1784,8 @@ emit_single_member_PER_constraint(arg_t *arg, asn1cnst_range_t *range, char *typ
asn1c_integer_t cover = 1; asn1c_integer_t cover = 1;
asn1c_integer_t r = 1 + range->right.value asn1c_integer_t r = 1 + range->right.value
- range->left.value; - range->left.value;
int rbits, ebits; size_t rbits; /* Value range bits */
ssize_t ebits; /* Value effective range bits */
if(range->empty_constraint) if(range->empty_constraint)
r = 0; r = 0;
......
...@@ -32,7 +32,7 @@ asn1c_open_file(const char *name, const char *ext, char **opt_tmpname) { ...@@ -32,7 +32,7 @@ asn1c_open_file(const char *name, const char *ext, char **opt_tmpname) {
fname = alloca(len); fname = alloca(len);
ret = snprintf(fname, len, "%s%s%s", name, ext, ret = snprintf(fname, len, "%s%s%s", name, ext,
opt_tmpname ? ".XXXXXX" : ""); opt_tmpname ? ".XXXXXX" : "");
assert(ret > 0 && ret < len); assert(ret > 0 && ret < (ssize_t)len);
if(opt_tmpname) { if(opt_tmpname) {
/* /*
......
...@@ -20,7 +20,7 @@ static char *res_kwd[] = { ...@@ -20,7 +20,7 @@ static char *res_kwd[] = {
}; };
static int static int
reserved_keyword(const char *str) { reserved_keyword(const char *str) {
int i; size_t i;
for(i = 0 ; i < sizeof(res_kwd)/sizeof(res_kwd[0]); i++) { for(i = 0 ; i < sizeof(res_kwd)/sizeof(res_kwd[0]); i++) {
if(strcmp(str, res_kwd[i]) == 0) if(strcmp(str, res_kwd[i]) == 0)
return 1; return 1;
...@@ -42,7 +42,7 @@ asn1c_make_identifier(enum ami_flags_e flags, asn1p_expr_t *expr, ...) { ...@@ -42,7 +42,7 @@ asn1c_make_identifier(enum ami_flags_e flags, asn1p_expr_t *expr, ...) {
char *nextstr; char *nextstr;
char *first = 0; char *first = 0;
char *second = 0; char *second = 0;
size_t size; ssize_t size;
char *p; char *p;
if(expr) { if(expr) {
......
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
#include "asn1c_save.h" #include "asn1c_save.h"
#include "asn1c_out.h" #include "asn1c_out.h"
static int asn1c_dump_streams(arg_t *arg, asn1c_fdeps_t *, int, int, char **); static int asn1c_dump_streams(arg_t *arg, asn1c_fdeps_t *, int, char **);
static int asn1c_print_streams(arg_t *arg); static int asn1c_print_streams(arg_t *arg);
static int asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *, int, int, char **); static int asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *, int, char **);
static int asn1c_copy_over(arg_t *arg, char *path); static int asn1c_copy_over(arg_t *arg, char *path);
static int identical_files(const char *fname1, const char *fname2); static int identical_files(const char *fname1, const char *fname2);
static int generate_pdu_collection_file(arg_t *arg); static int generate_pdu_collection_file(arg_t *arg);
static int generate_preamble(arg_t *, FILE *, int argc, int optc, char **argv); static int generate_preamble(arg_t *, FILE *, int optc, char **argv);
int int
asn1c_save_compiled_output(arg_t *arg, const char *datadir, asn1c_save_compiled_output(arg_t *arg, const char *datadir,
...@@ -33,8 +33,7 @@ asn1c_save_compiled_output(arg_t *arg, const char *datadir, ...@@ -33,8 +33,7 @@ asn1c_save_compiled_output(arg_t *arg, const char *datadir,
TQ_FOR(arg->expr, &(mod->members), next) { TQ_FOR(arg->expr, &(mod->members), next) {
if(asn1_lang_map[arg->expr->meta_type] if(asn1_lang_map[arg->expr->meta_type]
[arg->expr->expr_type].type_cb) { [arg->expr->expr_type].type_cb) {
if(asn1c_dump_streams(arg, deps, if(asn1c_dump_streams(arg, deps, optc, argv))
argc, optc, argv))
return -1; return -1;
} }
} }
...@@ -155,11 +154,11 @@ asn1c_save_compiled_output(arg_t *arg, const char *datadir, ...@@ -155,11 +154,11 @@ asn1c_save_compiled_output(arg_t *arg, const char *datadir,
* Dump the streams. * Dump the streams.
*/ */
static int static int
asn1c_dump_streams(arg_t *arg, asn1c_fdeps_t *deps, int argc, int optc, char **argv) { asn1c_dump_streams(arg_t *arg, asn1c_fdeps_t *deps, int optc, char **argv) {
if(arg->flags & A1C_PRINT_COMPILED) { if(arg->flags & A1C_PRINT_COMPILED) {
return asn1c_print_streams(arg); return asn1c_print_streams(arg);
} else { } else {
return asn1c_save_streams(arg, deps, argc, optc, argv); return asn1c_save_streams(arg, deps, optc, argv);
} }
} }
...@@ -187,7 +186,7 @@ asn1c_print_streams(arg_t *arg) { ...@@ -187,7 +186,7 @@ asn1c_print_streams(arg_t *arg) {
} }
static int static int
asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps, int argc, int optc, char **argv) { asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps, int optc, char **argv) {
asn1p_expr_t *expr = arg->expr; asn1p_expr_t *expr = arg->expr;
compiler_streams_t *cs = expr->data; compiler_streams_t *cs = expr->data;
out_chunk_t *ot; out_chunk_t *ot;
...@@ -212,8 +211,8 @@ asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps, int argc, int optc, char **a ...@@ -212,8 +211,8 @@ asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps, int argc, int optc, char **a
return -1; return -1;
} }
generate_preamble(arg, fp_c, argc, optc, argv); generate_preamble(arg, fp_c, optc, argv);
generate_preamble(arg, fp_h, argc, optc, argv); generate_preamble(arg, fp_h, optc, argv);
header_id = asn1c_make_identifier(0, expr, NULL); header_id = asn1c_make_identifier(0, expr, NULL);
fprintf(fp_h, fprintf(fp_h,
...@@ -303,7 +302,7 @@ asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps, int argc, int optc, char **a ...@@ -303,7 +302,7 @@ asn1c_save_streams(arg_t *arg, asn1c_fdeps_t *deps, int argc, int optc, char **a
} }
static int static int
generate_preamble(arg_t *arg, FILE *fp, int argc, int optc, char **argv) { generate_preamble(arg_t *arg, FILE *fp, int optc, char **argv) {
fprintf(fp, fprintf(fp,
"/*\n" "/*\n"
" * Generated by asn1c-" VERSION " (http://lionet.info/asn1c)\n" " * Generated by asn1c-" VERSION " (http://lionet.info/asn1c)\n"
......
...@@ -169,6 +169,7 @@ _asn1f_assign_cell_value(arg_t *arg, struct asn1p_ioc_row_s *row, struct asn1p_i ...@@ -169,6 +169,7 @@ _asn1f_assign_cell_value(arg_t *arg, struct asn1p_ioc_row_s *row, struct asn1p_i
uint8_t *buf, const uint8_t *bend) { uint8_t *buf, const uint8_t *bend) {
asn1p_expr_t *expr; asn1p_expr_t *expr;
asn1p_ref_t *ref; asn1p_ref_t *ref;
int idLength;
char *p; char *p;
if((bend - buf) <= 0) { if((bend - buf) <= 0) {
...@@ -220,8 +221,9 @@ _asn1f_assign_cell_value(arg_t *arg, struct asn1p_ioc_row_s *row, struct asn1p_i ...@@ -220,8 +221,9 @@ _asn1f_assign_cell_value(arg_t *arg, struct asn1p_ioc_row_s *row, struct asn1p_i
cell->value = expr; cell->value = expr;
if(row->max_identifier_length < strlen(expr->Identifier)) idLength = strlen(expr->Identifier);
row->max_identifier_length = strlen(expr->Identifier); if(row->max_identifier_length < idLength)
row->max_identifier_length = idLength;
return 0; return 0;
} }
......
...@@ -154,19 +154,19 @@ asn1p_wsyntx_clone(asn1p_wsyntx_t *wx) { ...@@ -154,19 +154,19 @@ asn1p_wsyntx_clone(asn1p_wsyntx_t *wx) {
} }
asn1p_wsyntx_chunk_t * asn1p_wsyntx_chunk_t *
asn1p_wsyntx_chunk_frombuf(char *buf, int len, int do_copy) { asn1p_wsyntx_chunk_fromstring(char *token, int do_copy) {
asn1p_wsyntx_chunk_t *wc; asn1p_wsyntx_chunk_t *wc;
if(do_copy) { if(do_copy) {
static asn1p_wsyntx_chunk_t tmp; static asn1p_wsyntx_chunk_t tmp;
tmp.type = WC_LITERAL; tmp.type = WC_LITERAL;
tmp.content.token = buf; tmp.content.token = token;
wc = asn1p_wsyntx_chunk_clone(&tmp); wc = asn1p_wsyntx_chunk_clone(&tmp);
} else { } else {
wc = asn1p_wsyntx_chunk_new(); wc = asn1p_wsyntx_chunk_new();
if(wc) { if(wc) {
wc->type = WC_LITERAL; wc->type = WC_LITERAL;
wc->content.token = buf; wc->content.token = token;
} }
} }
......
...@@ -69,7 +69,7 @@ asn1p_wsyntx_t *asn1p_wsyntx_clone(asn1p_wsyntx_t *); ...@@ -69,7 +69,7 @@ asn1p_wsyntx_t *asn1p_wsyntx_clone(asn1p_wsyntx_t *);
* 0: Component has been added * 0: Component has been added
* -1: Failure to add component (refer to errno) * -1: Failure to add component (refer to errno)
*/ */
asn1p_wsyntx_chunk_t *asn1p_wsyntx_chunk_frombuf(char *buf, int len, int _copy); asn1p_wsyntx_chunk_t *asn1p_wsyntx_chunk_fromstring(char *token, int _copy);
asn1p_wsyntx_chunk_t *asn1p_wsyntx_chunk_fromsyntax(asn1p_wsyntx_t *syntax); asn1p_wsyntx_chunk_t *asn1p_wsyntx_chunk_fromsyntax(asn1p_wsyntx_t *syntax);
......
...@@ -2785,7 +2785,7 @@ yyreduce: ...@@ -2785,7 +2785,7 @@ yyreduce:
case 109: case 109:
#line 1125 "asn1p_y.y" #line 1125 "asn1p_y.y"
{ {
yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_opaque.buf, yyvsp[0].tv_opaque.len, 0); yyval.a_wchunk = asn1p_wsyntx_chunk_fromstring(yyvsp[0].tv_opaque.buf, 0);
yyval.a_wchunk->type = WC_WHITESPACE; yyval.a_wchunk->type = WC_WHITESPACE;
} }
break; break;
...@@ -2793,14 +2793,14 @@ yyreduce: ...@@ -2793,14 +2793,14 @@ yyreduce:
case 110: case 110:
#line 1129 "asn1p_y.y" #line 1129 "asn1p_y.y"
{ {
yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].tv_str, strlen(yyvsp[0].tv_str), 0); yyval.a_wchunk = asn1p_wsyntx_chunk_fromstring(yyvsp[0].tv_str, 0);
} }
break; break;
case 111: case 111:
#line 1132 "asn1p_y.y" #line 1132 "asn1p_y.y"
{ {
yyval.a_wchunk = asn1p_wsyntx_chunk_frombuf(yyvsp[0].a_refcomp.name, strlen(yyvsp[0].a_refcomp.name), 0); yyval.a_wchunk = asn1p_wsyntx_chunk_fromstring(yyvsp[0].a_refcomp.name, 0);
yyval.a_wchunk->type = WC_FIELD; yyval.a_wchunk->type = WC_FIELD;
} }
break; break;
......
...@@ -278,7 +278,7 @@ typedef union { ...@@ -278,7 +278,7 @@ typedef union {
} tv_nametag; } tv_nametag;
} yystype; } yystype;
/* Line 1281 of /usr/local/share/bison/yacc.c. */ /* Line 1281 of /usr/local/share/bison/yacc.c. */
#line 282 "y.tab.h" #line 282 "asn1p_y.h"
# define YYSTYPE yystype # define YYSTYPE yystype
#endif #endif
......
...@@ -1123,14 +1123,14 @@ WithSyntaxList: ...@@ -1123,14 +1123,14 @@ WithSyntaxList:
WithSyntaxToken: WithSyntaxToken:
TOK_whitespace { TOK_whitespace {
$$ = asn1p_wsyntx_chunk_frombuf($1.buf, $1.len, 0); $$ = asn1p_wsyntx_chunk_fromstring($1.buf, 0);
$$->type = WC_WHITESPACE; $$->type = WC_WHITESPACE;
} }
| TOK_Literal { | TOK_Literal {
$$ = asn1p_wsyntx_chunk_frombuf($1, strlen($1), 0); $$ = asn1p_wsyntx_chunk_fromstring($1, 0);
} }
| PrimitiveFieldReference { | PrimitiveFieldReference {
$$ = asn1p_wsyntx_chunk_frombuf($1.name, strlen($1.name), 0); $$ = asn1p_wsyntx_chunk_fromstring($1.name, 0);
$$->type = WC_FIELD; $$->type = WC_FIELD;
} }
| '[' WithSyntaxList ']' { | '[' WithSyntaxList ']' {
......
...@@ -1180,12 +1180,14 @@ SEQUENCE_encode_uper(asn_TYPE_descriptor_t *td, ...@@ -1180,12 +1180,14 @@ SEQUENCE_encode_uper(asn_TYPE_descriptor_t *td,
/* Encode a presence bitmap */ /* Encode a presence bitmap */
for(i = 0; i < specs->roms_count; i++) { for(i = 0; i < specs->roms_count; i++) {
asn_TYPE_member_t *elm;
void *memb_ptr; /* Pointer to the member */ void *memb_ptr; /* Pointer to the member */
void **memb_ptr2; /* Pointer to that pointer */ void **memb_ptr2; /* Pointer to that pointer */
edx = specs->oms[i];
asn_TYPE_member_t *elm = &td->elements[edx];
int present; int present;
edx = specs->oms[i];
elm = &td->elements[edx];
/* Fetch the pointer to this member */ /* Fetch the pointer to this member */
if(elm->flags & ATF_POINTER) { if(elm->flags & ATF_POINTER) {
memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); memb_ptr2 = (void **)((char *)sptr + elm->memb_offset);
......
...@@ -25,27 +25,6 @@ asn_dec_rval_t uper_decode(struct asn_codec_ctx_s *opt_codec_ctx, ...@@ -25,27 +25,6 @@ asn_dec_rval_t uper_decode(struct asn_codec_ctx_s *opt_codec_ctx,
); );
/*
* Pre-computed PER constraints.
*/
enum asn_per_constraint_flags {
APC_UNCONSTRAINED = 0x0, /* No PER visible constraints */
APC_SEMI_CONSTRAINED = 0x1, /* Constrained at "lb" */
APC_CONSTRAINED = 0x2, /* Fully constrained */
APC_EXTENSIBLE = 0x4 /* May have extension */
};
typedef struct asn_per_constraint_s {
enum asn_per_constraint_flags flags;
int range_bits; /* Full number of bits in the range */
int effective_bits; /* Effective bits */
long lower_bound; /* "lb" value */
long upper_bound; /* "ub" value */
} asn_per_constraint_t;
typedef struct asn_per_constraints_s {
asn_per_constraint_t value;
asn_per_constraint_t size;
} asn_per_constraints_t;
/* /*
* Type of the type-specific PER decoder function. * Type of the type-specific PER decoder function.
*/ */
......
/* /*
* Copyright (c) 2005 Lev Walkin <vlm@lionet.info>. All rights reserved. * Copyright (c) 2005, 2006 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license. * Redistribution and modifications are permitted subject to BSD license.
*/ */
#ifndef _PER_SUPPORT_H_ #ifndef _PER_SUPPORT_H_
...@@ -11,6 +11,26 @@ ...@@ -11,6 +11,26 @@
extern "C" { extern "C" {
#endif #endif
/*
* Pre-computed PER constraints.
*/
typedef struct asn_per_constraint_s {
enum asn_per_constraint_flags {
APC_UNCONSTRAINED = 0x0, /* No PER visible constraints */
APC_SEMI_CONSTRAINED = 0x1, /* Constrained at "lb" */
APC_CONSTRAINED = 0x2, /* Fully constrained */
APC_EXTENSIBLE = 0x4 /* May have extension */
} flags;
int range_bits; /* Full number of bits in the range */
int effective_bits; /* Effective bits */
long lower_bound; /* "lb" value */
long upper_bound; /* "ub" value */
} asn_per_constraint_t;
typedef struct asn_per_constraints_s {
asn_per_constraint_t value;
asn_per_constraint_t size;
} asn_per_constraints_t;
/* /*
* This structure describes a position inside an incoming PER bit stream. * This structure describes a position inside an incoming PER bit stream.
*/ */
...@@ -20,18 +40,6 @@ typedef struct asn_per_data_s { ...@@ -20,18 +40,6 @@ typedef struct asn_per_data_s {
size_t nbits; /* Number of bits in the stream */ size_t nbits; /* Number of bits in the stream */
} asn_per_data_t; } asn_per_data_t;
/*
* This structure supports forming PER output.
*/
typedef struct asn_per_outp_s {
uint8_t *buffer; /* Pointer into the (tmpspace) */
size_t nboff; /* Bit offset to the meaningful bit */
size_t nbits; /* Number of bits left in (tmpspace) */
uint8_t tmpspace[32]; /* Preliminary storage to hold data */
int (*outper)(const void *data, size_t size, void *op_key);
void *op_key;
} asn_per_outp_t;
/* /*
* Extract a small number of bits (<= 31) from the specified PER data pointer. * Extract a small number of bits (<= 31) from the specified PER data pointer.
* This function returns -1 if the specified number of bits could not be * This function returns -1 if the specified number of bits could not be
...@@ -39,9 +47,6 @@ typedef struct asn_per_outp_s { ...@@ -39,9 +47,6 @@ typedef struct asn_per_outp_s {
*/ */
int32_t per_get_few_bits(asn_per_data_t *per_data, int get_nbits); int32_t per_get_few_bits(asn_per_data_t *per_data, int get_nbits);
/* Output a small number of bits (<= 31) */
int per_put_few_bits(asn_per_outp_t *per_data, uint32_t bits, int obits);
/* /*
* Extract a large number of bits from the specified PER data pointer. * Extract a large number of bits from the specified PER data pointer.
* This function returns -1 if the specified number of bits could not be * This function returns -1 if the specified number of bits could not be
...@@ -50,9 +55,6 @@ int per_put_few_bits(asn_per_outp_t *per_data, uint32_t bits, int obits); ...@@ -50,9 +55,6 @@ int per_put_few_bits(asn_per_outp_t *per_data, uint32_t bits, int obits);
int per_get_many_bits(asn_per_data_t *pd, uint8_t *dst, int right_align, int per_get_many_bits(asn_per_data_t *pd, uint8_t *dst, int right_align,
int get_nbits); int get_nbits);
/* Output a large number of bits */
int per_put_many_bits(asn_per_outp_t *po, const uint8_t *src, int put_nbits);
/* /*
* Get the length "n" from the Unaligned PER stream. * Get the length "n" from the Unaligned PER stream.
*/ */
...@@ -60,6 +62,29 @@ ssize_t uper_get_length(asn_per_data_t *pd, ...@@ -60,6 +62,29 @@ ssize_t uper_get_length(asn_per_data_t *pd,
int effective_bound_bits, int effective_bound_bits,
int *repeat); int *repeat);
/*
* Get the normally small non-negative whole number.
*/
ssize_t uper_get_nsnnwn(asn_per_data_t *pd);
/*
* This structure supports forming PER output.
*/
typedef struct asn_per_outp_s {
uint8_t *buffer; /* Pointer into the (tmpspace) */
size_t nboff; /* Bit offset to the meaningful bit */
size_t nbits; /* Number of bits left in (tmpspace) */
uint8_t tmpspace[32]; /* Preliminary storage to hold data */
int (*outper)(const void *data, size_t size, void *op_key);
void *op_key;
} asn_per_outp_t;
/* Output a small number of bits (<= 31) */
int per_put_few_bits(asn_per_outp_t *per_data, uint32_t bits, int obits);
/* Output a large number of bits */
int per_put_many_bits(asn_per_outp_t *po, const uint8_t *src, int put_nbits);
/* /*
* Put the length "n" to the Unaligned PER stream. * Put the length "n" to the Unaligned PER stream.
* This function returns the number of units which may be flushed * This function returns the number of units which may be flushed
...@@ -67,11 +92,6 @@ ssize_t uper_get_length(asn_per_data_t *pd, ...@@ -67,11 +92,6 @@ ssize_t uper_get_length(asn_per_data_t *pd,
*/ */
ssize_t uper_put_length(asn_per_outp_t *po, size_t whole_length); ssize_t uper_put_length(asn_per_outp_t *po, size_t whole_length);
/*
* Get the normally small non-negative whole number.
*/
ssize_t uper_get_nsnnwn(asn_per_data_t *pd);
/* /*
* Put the normally small non-negative whole number. * Put the normally small non-negative whole number.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment