From 4a5ba359371e997e9159291bbcf9b358336dc15f Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Thu, 17 Feb 2011 00:57:49 +0000 Subject: [PATCH] assembly fixes more support for readline, including getting more stuff from read. --- C/absmi.c | 10 +- C/tracer.c | 4 + H/trim_trail.h | 2 - config.h.in | 6 +- configure | 524 ++++++++++---------- configure.in | 6 +- packages/PLStream/pl-ctype.c | 30 -- packages/PLStream/pl-incl.h | 19 +- packages/PLStream/pl-read.c | 934 ++++++++++++++++++++++++++++++++++- packages/PLStream/pl-rl.c | 14 +- packages/PLStream/pl-umap.c | 2 +- pl/init.yap | 2 +- 12 files changed, 1236 insertions(+), 317 deletions(-) diff --git a/C/absmi.c b/C/absmi.c index 67d2f292b..e0be9d238 100755 --- a/C/absmi.c +++ b/C/absmi.c @@ -1667,7 +1667,7 @@ Yap_absmi(int inp) #ifdef DEPTH_LIMIT YENV[E_DEPTH] = DEPTH; #endif /* DEPTH_LIMIT */ - SET_ASP(YREG, E_CB*sizeof(CELL)); + SET_ASP(YREG, PREG->u.Osbpi.s); saveregs(); if (!Yap_gcl(sz, arity, YENV, PREG)) { Yap_Error(OUT_OF_STACK_ERROR,TermNil,Yap_ErrorMessage); @@ -7469,7 +7469,7 @@ Yap_absmi(int inp) else ASP = (CELL *)(((char *)YREG) + PREG->u.Osbpp.s); } #else - SET_ASP(YREG, 0); + SET_ASP(YREG, PREG->u.Osbpp.s); /* for slots to work */ #endif /* FROZEN_STACKS */ #ifdef LOW_LEVEL_TRACER @@ -7513,7 +7513,7 @@ Yap_absmi(int inp) else ASP = YREG+E_CB; } #else - SET_ASP(YREG, 0); + SET_ASP(YREG, E_CB*sizeof(CELL)); /* for slots to work */ #endif /* FROZEN_STACKS */ pt0 = PREG->u.pp.p; @@ -7600,7 +7600,7 @@ Yap_absmi(int inp) else ASP = (CELL *)(((char *)YREG) + PREG->u.Osbpp.s); } #else - SET_ASP(YREG, 0); + SET_ASP(YREG, PREG->u.Osbpp.s); /* for slots to work */ #endif /* FROZEN_STACKS */ { @@ -7833,7 +7833,7 @@ Yap_absmi(int inp) ENDCACHE_Y(); Yap_PrologMode = UserCCallMode; - SET_ASP(YREG, 0); + SET_ASP(YREG, E_CB*sizeof(CELL)); /* for slots to work */ Yap_StartSlots(); saveregs(); diff --git a/C/tracer.c b/C/tracer.c index bf05d1bc5..7f9aa73c0 100755 --- a/C/tracer.c +++ b/C/tracer.c @@ -172,6 +172,10 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args) LOCK(Yap_heap_regs->low_level_trace_lock); sc = Yap_heap_regs; vsc_count++; + if (vsc_count == 471321) + jmp_deb(1); + if (vsc_count < 471300) + return; #ifdef THREADS MY_ThreadHandle.thread_inst_count++; #endif diff --git a/H/trim_trail.h b/H/trim_trail.h index 098752751..016d61efe 100644 --- a/H/trim_trail.h +++ b/H/trim_trail.h @@ -148,12 +148,10 @@ if (erase) { /* at this point, we are the only ones accessing the clause, hence we don't need to have a lock it */ - saveregs(); if (cl->ClFlags & ErasedMask) Yap_ErLogUpdIndex(cl); else Yap_CleanUpIndex(cl); - setregs(); } UNLOCK(ap->PELock); } else { diff --git a/config.h.in b/config.h.in index a87382447..258cfc386 100755 --- a/config.h.in +++ b/config.h.in @@ -229,6 +229,10 @@ #undef HAVE_REGEXEC #undef HAVE_RENAME #undef HAVE_RINT +#undef HAVE_RL_CLEAR_PENDING_INPUT +#undef HAVE_RL_COMPLETION_MATCHES +#undef HAVE_RL_FILENAME_COMPLETION_FUNCTION +#undef HAVE_RL_INSERT_CLOSE #undef HAVE_RL_SET_PROMPT #undef HAVE_SBRK #undef HAVE_SELECT @@ -281,8 +285,6 @@ #define TYPE_SELECT_ #define MYTYPE(X) MYTYPE1#X -#undef HAVE_DECL_RL_CATCH_SIGNALS - /* define how to pass the address of a function */ #define FunAdr(Fn) Fn diff --git a/configure b/configure index c06f51e8d..62bbc55e2 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67. +# Generated by GNU Autoconf 2.68. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -89,6 +89,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -214,11 +215,18 @@ IFS=$as_save_IFS # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -801,6 +809,9 @@ LIBS CPPFLAGS CXX CXXFLAGS +LDFLAGS +LIBS +CPPFLAGS CCC CPP' @@ -1207,7 +1218,7 @@ Try \`$0 --help' for more information" $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1543,7 +1554,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.67 +generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation @@ -1589,7 +1600,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1627,7 +1638,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile @@ -1673,7 +1684,7 @@ fi # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -1710,7 +1721,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1723,10 +1734,10 @@ fi ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval "test \"\${$3+set}\"" = set; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1789,7 +1800,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -1798,7 +1809,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -1839,7 +1850,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1853,7 +1864,7 @@ ac_fn_c_check_header_compile () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1871,7 +1882,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1883,7 +1894,7 @@ ac_fn_c_check_func () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1938,56 +1949,10 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func -# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES -# --------------------------------------------- -# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR -# accordingly. -ac_fn_c_check_decl () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - as_decl_name=`echo $2|sed 's/ *(.*//'` - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - -} # ac_fn_c_check_decl - # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes @@ -2161,7 +2126,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -2175,7 +2140,7 @@ ac_fn_c_check_type () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if eval "test \"\${$3+set}\"" = set; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2216,7 +2181,7 @@ fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2229,7 +2194,7 @@ ac_fn_c_check_member () as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if eval "test \"\${$4+set}\"" = set; then : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2273,7 +2238,7 @@ fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member cat >config.log <<_ACEOF @@ -2281,7 +2246,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2539,7 +2504,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;} || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -2643,7 +2608,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2683,7 +2648,7 @@ if test -z "$ac_cv_prog_CC"; then set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2736,7 +2701,7 @@ if test -z "$CC"; then set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2776,7 +2741,7 @@ if test -z "$CC"; then set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2835,7 +2800,7 @@ if test -z "$CC"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2879,7 +2844,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2934,7 +2899,7 @@ fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -3049,7 +3014,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -3092,7 +3057,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -3151,7 +3116,7 @@ $as_echo "$ac_try_echo"; } >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -3162,7 +3127,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3203,7 +3168,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -3213,7 +3178,7 @@ OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3250,7 +3215,7 @@ ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -3328,7 +3293,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -3439,7 +3404,7 @@ if test -z "$CXX"; then set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -3483,7 +3448,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -3561,7 +3526,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3598,7 +3563,7 @@ ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -3686,7 +3651,7 @@ do set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -4249,7 +4214,7 @@ $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias @@ -4265,7 +4230,7 @@ fi $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -4283,7 +4248,7 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then @@ -4298,7 +4263,7 @@ fi $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -4316,7 +4281,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } -if test "${ac_cv_target+set}" = set; then : +if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then @@ -4331,7 +4296,7 @@ fi $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; -*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' @@ -4560,7 +4525,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4641,7 +4606,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -4681,7 +4646,7 @@ if test -z "$ac_cv_prog_RANLIB"; then set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -4733,7 +4698,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}indent; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_INDENT+set}" = set; then : +if ${ac_cv_prog_INDENT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$INDENT"; then @@ -4773,7 +4738,7 @@ if test -z "$ac_cv_prog_INDENT"; then set dummy indent; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_INDENT+set}" = set; then : +if ${ac_cv_prog_ac_ct_INDENT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_INDENT"; then @@ -4825,7 +4790,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -4865,7 +4830,7 @@ if test -z "$ac_cv_prog_AR"; then set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -4917,7 +4882,7 @@ if test -n "$ac_tool_prefix"; then set dummy ${ac_tool_prefix}mpicc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MPI_CC+set}" = set; then : +if ${ac_cv_prog_MPI_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MPI_CC"; then @@ -4957,7 +4922,7 @@ if test -z "$ac_cv_prog_MPI_CC"; then set dummy mpicc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_MPI_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_MPI_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MPI_CC"; then @@ -5008,7 +4973,7 @@ fi set dummy install-info; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_INSTALL_INFO+set}" = set; then : +if ${ac_cv_path_INSTALL_INFO+:} false; then : $as_echo_n "(cached) " >&6 else case $INSTALL_INFO in @@ -5050,7 +5015,7 @@ fi set dummy sh; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_SHELL+set}" = set; then : +if ${ac_cv_path_SHELL+:} false; then : $as_echo_n "(cached) " >&6 else case $SHELL in @@ -5097,7 +5062,7 @@ then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 $as_echo_n "checking for main in -lws2_32... " >&6; } -if test "${ac_cv_lib_ws2_32_main+set}" = set; then : +if ${ac_cv_lib_ws2_32_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5125,7 +5090,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 $as_echo "$ac_cv_lib_ws2_32_main" >&6; } -if test "x$ac_cv_lib_ws2_32_main" = x""yes; then : +if test "x$ac_cv_lib_ws2_32_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBWS2_32 1 _ACEOF @@ -5141,7 +5106,7 @@ fi CXX="${CXX} -mno-cygwin" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lwsock32" >&5 $as_echo_n "checking for main in -lwsock32... " >&6; } -if test "${ac_cv_lib_wsock32_main+set}" = set; then : +if ${ac_cv_lib_wsock32_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5169,7 +5134,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wsock32_main" >&5 $as_echo "$ac_cv_lib_wsock32_main" >&6; } -if test "x$ac_cv_lib_wsock32_main" = x""yes; then : +if test "x$ac_cv_lib_wsock32_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBWSOCK32 1 _ACEOF @@ -5182,7 +5147,7 @@ fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lwsock32" >&5 $as_echo_n "checking for main in -lwsock32... " >&6; } -if test "${ac_cv_lib_wsock32_main+set}" = set; then : +if ${ac_cv_lib_wsock32_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5210,7 +5175,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wsock32_main" >&5 $as_echo "$ac_cv_lib_wsock32_main" >&6; } -if test "x$ac_cv_lib_wsock32_main" = x""yes; then : +if test "x$ac_cv_lib_wsock32_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBWSOCK32 1 _ACEOF @@ -5223,7 +5188,7 @@ fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpsapi" >&5 $as_echo_n "checking for main in -lpsapi... " >&6; } -if test "${ac_cv_lib_psapi_main+set}" = set; then : +if ${ac_cv_lib_psapi_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5251,7 +5216,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_psapi_main" >&5 $as_echo "$ac_cv_lib_psapi_main" >&6; } -if test "x$ac_cv_lib_psapi_main" = x""yes; then : +if test "x$ac_cv_lib_psapi_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPSAPI 1 _ACEOF @@ -5287,7 +5252,7 @@ else ENABLE_WINCONSOLE="#" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 $as_echo_n "checking for sin in -lm... " >&6; } -if test "${ac_cv_lib_m_sin+set}" = set; then : +if ${ac_cv_lib_m_sin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5321,7 +5286,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } -if test "x$ac_cv_lib_m_sin" = x""yes; then : +if test "x$ac_cv_lib_m_sin" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -5332,7 +5297,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_socket+set}" = set; then : +if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5366,7 +5331,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = x""yes; then : +if test "x$ac_cv_lib_socket_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF @@ -5377,7 +5342,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getsockname in -lxnet" >&5 $as_echo_n "checking for getsockname in -lxnet... " >&6; } -if test "${ac_cv_lib_xnet_getsockname+set}" = set; then : +if ${ac_cv_lib_xnet_getsockname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5411,7 +5376,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_getsockname" >&5 $as_echo "$ac_cv_lib_xnet_getsockname" >&6; } -if test "x$ac_cv_lib_xnet_getsockname" = x""yes; then : +if test "x$ac_cv_lib_xnet_getsockname" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXNET 1 _ACEOF @@ -5422,7 +5387,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lstdc++" >&5 $as_echo_n "checking for main in -lstdc++... " >&6; } -if test "${ac_cv_lib_stdcpp_main+set}" = set; then : +if ${ac_cv_lib_stdcpp_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5450,7 +5415,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdcpp_main" >&5 $as_echo "$ac_cv_lib_stdcpp_main" >&6; } -if test "x$ac_cv_lib_stdcpp_main" = x""yes; then : +if test "x$ac_cv_lib_stdcpp_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSTDC__ 1 _ACEOF @@ -5461,7 +5426,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5 $as_echo_n "checking for main in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_main+set}" = set; then : +if ${ac_cv_lib_nsl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5489,7 +5454,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5 $as_echo "$ac_cv_lib_nsl_main" >&6; } -if test "x$ac_cv_lib_nsl_main" = x""yes; then : +if test "x$ac_cv_lib_nsl_main" = xyes; then : have_nsl=yes else @@ -5498,7 +5463,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcrypt" >&5 $as_echo_n "checking for main in -lcrypt... " >&6; } -if test "${ac_cv_lib_crypt_main+set}" = set; then : +if ${ac_cv_lib_crypt_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5526,7 +5491,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_main" >&5 $as_echo "$ac_cv_lib_crypt_main" >&6; } -if test "x$ac_cv_lib_crypt_main" = x""yes; then : +if test "x$ac_cv_lib_crypt_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPT 1 _ACEOF @@ -5537,7 +5502,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnss_files" >&5 $as_echo_n "checking for main in -lnss_files... " >&6; } -if test "${ac_cv_lib_nss_files_main+set}" = set; then : +if ${ac_cv_lib_nss_files_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5565,7 +5530,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss_files_main" >&5 $as_echo "$ac_cv_lib_nss_files_main" >&6; } -if test "x$ac_cv_lib_nss_files_main" = x""yes; then : +if test "x$ac_cv_lib_nss_files_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSS_FILES 1 _ACEOF @@ -5576,7 +5541,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnss_dns" >&5 $as_echo_n "checking for main in -lnss_dns... " >&6; } -if test "${ac_cv_lib_nss_dns_main+set}" = set; then : +if ${ac_cv_lib_nss_dns_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5604,7 +5569,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss_dns_main" >&5 $as_echo "$ac_cv_lib_nss_dns_main" >&6; } -if test "x$ac_cv_lib_nss_dns_main" = x""yes; then : +if test "x$ac_cv_lib_nss_dns_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSS_DNS 1 _ACEOF @@ -5615,7 +5580,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lresolv" >&5 $as_echo_n "checking for main in -lresolv... " >&6; } -if test "${ac_cv_lib_resolv_main+set}" = set; then : +if ${ac_cv_lib_resolv_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5643,7 +5608,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_main" >&5 $as_echo "$ac_cv_lib_resolv_main" >&6; } -if test "x$ac_cv_lib_resolv_main" = x""yes; then : +if test "x$ac_cv_lib_resolv_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRESOLV 1 _ACEOF @@ -5658,7 +5623,7 @@ if test "$yap_cv_readline" != "no" then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lreadline" >&5 $as_echo_n "checking for main in -lreadline... " >&6; } -if test "${ac_cv_lib_readline_main+set}" = set; then : +if ${ac_cv_lib_readline_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5686,7 +5651,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_main" >&5 $as_echo "$ac_cv_lib_readline_main" >&6; } -if test "x$ac_cv_lib_readline_main" = x""yes; then : +if test "x$ac_cv_lib_readline_main" = xyes; then : $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h @@ -5698,7 +5663,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "--with-readline was given, but test for readline failed -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi fi @@ -5708,7 +5673,7 @@ if test "$yap_cv_gmp" != "no" then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgmp" >&5 $as_echo_n "checking for main in -lgmp... " >&6; } -if test "${ac_cv_lib_gmp_main+set}" = set; then : +if ${ac_cv_lib_gmp_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5736,7 +5701,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp_main" >&5 $as_echo "$ac_cv_lib_gmp_main" >&6; } -if test "x$ac_cv_lib_gmp_main" = x""yes; then : +if test "x$ac_cv_lib_gmp_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGMP 1 _ACEOF @@ -5750,7 +5715,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5 $as_echo_n "checking for zlibVersion in -lz... " >&6; } -if test "${ac_cv_lib_z_zlibVersion+set}" = set; then : +if ${ac_cv_lib_z_zlibVersion+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5784,7 +5749,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5 $as_echo "$ac_cv_lib_z_zlibVersion" >&6; } -if test "x$ac_cv_lib_z_zlibVersion" = x""yes; then : +if test "x$ac_cv_lib_z_zlibVersion" = xyes; then : ZLIBS="-lz" ZLIB=yes else @@ -5800,7 +5765,7 @@ if test "$yap_cv_myddas" != "no" then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmysqlclient" >&5 $as_echo_n "checking for main in -lmysqlclient... " >&6; } - if test "${yap_cv_mysql+set}" = set; then : + if ${yap_cv_mysql+:} false; then : $as_echo_n "(cached) " >&6 else @@ -5837,7 +5802,7 @@ $as_echo "$yap_cv_mysql" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lodbc" >&5 $as_echo_n "checking for main in -lodbc... " >&6; } - if test "${yap_cv_odbc+set}" = set; then : + if ${yap_cv_odbc+:} false; then : $as_echo_n "(cached) " >&6 else @@ -5898,7 +5863,7 @@ then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then : +if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -5932,7 +5897,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } -if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then : +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF @@ -5953,7 +5918,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -6069,7 +6034,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -6081,7 +6046,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -6144,7 +6109,7 @@ $as_echo "$ac_cv_path_GREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -6211,7 +6176,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6341,7 +6306,7 @@ done for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = x""yes; then : +if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF @@ -6462,7 +6427,7 @@ then CC=${MPI_CC} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpi" >&5 $as_echo_n "checking for MPI_Init in -lmpi... " >&6; } -if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then : +if ${ac_cv_lib_mpi_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -6496,7 +6461,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpi_MPI_Init" >&5 $as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then : +if test "x$ac_cv_lib_mpi_MPI_Init" = xyes; then : $as_echo "#define HAVE_LIBMPI 1" >>confdefs.h else @@ -6511,7 +6476,7 @@ fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPI_Init in -lmpich" >&5 $as_echo_n "checking for MPI_Init in -lmpich... " >&6; } -if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then : +if ${ac_cv_lib_mpich_MPI_Init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -6545,7 +6510,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpich_MPI_Init" >&5 $as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; } -if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then : +if test "x$ac_cv_lib_mpich_MPI_Init" = xyes; then : $as_echo "#define HAVE_LIBMPICH 1" >>confdefs.h else @@ -6576,7 +6541,7 @@ then CC=${MPI_CC} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MPE_Init_log in -lmpe" >&5 $as_echo_n "checking for MPE_Init_log in -lmpe... " >&6; } -if test "${ac_cv_lib_mpe_MPE_Init_log+set}" = set; then : +if ${ac_cv_lib_mpe_MPE_Init_log+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -6610,7 +6575,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpe_MPE_Init_log" >&5 $as_echo "$ac_cv_lib_mpe_MPE_Init_log" >&6; } -if test "x$ac_cv_lib_mpe_MPE_Init_log" = x""yes; then : +if test "x$ac_cv_lib_mpe_MPE_Init_log" = xyes; then : $as_echo "#define HAVE_LIBMPE 1" >>confdefs.h else @@ -6638,7 +6603,7 @@ if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -6754,7 +6719,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -6770,7 +6735,7 @@ then else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : +if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6811,14 +6776,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for restartable system calls" >&5 $as_echo_n "checking for restartable system calls... " >&6; } -if test "${ac_cv_sys_restartable_syscalls+set}" = set; then : +if ${ac_cv_sys_restartable_syscalls+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6900,7 +6865,7 @@ case "$target_os" in then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -6934,7 +6899,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : have_dl=yes else @@ -7066,7 +7031,7 @@ fi then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7100,7 +7065,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : have_dl=yes else @@ -7138,7 +7103,7 @@ fi then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7172,7 +7137,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : have_dl=yes else @@ -7289,7 +7254,7 @@ fi *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7323,7 +7288,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : have_dl=yes else @@ -7484,7 +7449,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5 $as_echo_n "checking for zlibVersion in -lz... " >&6; } -if test "${ac_cv_lib_z_zlibVersion+set}" = set; then : +if ${ac_cv_lib_z_zlibVersion+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7518,7 +7483,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5 $as_echo "$ac_cv_lib_z_zlibVersion" >&6; } -if test "x$ac_cv_lib_z_zlibVersion" = x""yes; then : +if test "x$ac_cv_lib_z_zlibVersion" = xyes; then : ZLIBS="-lz" ZLIB=yes else @@ -7554,7 +7519,7 @@ OLD_CC=${CC} CC=${LAM_MPI_CC} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llam" >&5 $as_echo_n "checking for main in -llam... " >&6; } -if test "${ac_cv_lib_lam_main+set}" = set; then : +if ${ac_cv_lib_lam_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7582,7 +7547,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lam_main" >&5 $as_echo "$ac_cv_lib_lam_main" >&6; } -if test "x$ac_cv_lib_lam_main" = x""yes; then : +if test "x$ac_cv_lib_lam_main" = xyes; then : LAMOBJS=yap_mpi."$SO" else LAMOBJS=no @@ -7592,7 +7557,7 @@ CC=${OLD_CC} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7704,7 +7669,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then : +if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7941,7 +7906,7 @@ done for ac_header in mach-o/dyld.h do : ac_fn_c_check_header_mongrel "$LINENO" "mach-o/dyld.h" "ac_cv_header_mach_o_dyld_h" "$ac_includes_default" -if test "x$ac_cv_header_mach_o_dyld_h" = x""yes; then : +if test "x$ac_cv_header_mach_o_dyld_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MACH_O_DYLD_H 1 _ACEOF @@ -7955,7 +7920,7 @@ then for ac_header in gmp.h do : ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default" -if test "x$ac_cv_header_gmp_h" = x""yes; then : +if test "x$ac_cv_header_gmp_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GMP_H 1 _ACEOF @@ -7970,7 +7935,7 @@ then for ac_header in cudd.h do : ac_fn_c_check_header_mongrel "$LINENO" "cudd.h" "ac_cv_header_cudd_h" "$ac_includes_default" -if test "x$ac_cv_header_cudd_h" = x""yes; then : +if test "x$ac_cv_header_cudd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CUDD_H 1 _ACEOF @@ -7985,7 +7950,7 @@ then for ac_header in mysql/mysql.h do : ac_fn_c_check_header_mongrel "$LINENO" "mysql/mysql.h" "ac_cv_header_mysql_mysql_h" "$ac_includes_default" -if test "x$ac_cv_header_mysql_mysql_h" = x""yes; then : +if test "x$ac_cv_header_mysql_mysql_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MYSQL_MYSQL_H 1 _ACEOF @@ -8000,7 +7965,7 @@ then for ac_header in readline/readline.h do : ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_readline_h" = x""yes; then : +if test "x$ac_cv_header_readline_readline_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_READLINE_READLINE_H 1 _ACEOF @@ -8012,7 +7977,7 @@ done for ac_header in readline/history.h do : ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_history_h" = x""yes; then : +if test "x$ac_cv_header_readline_history_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_READLINE_HISTORY_H 1 _ACEOF @@ -8021,8 +7986,28 @@ fi done - ac_fn_c_check_decl "$LINENO" "rl_catch_signals " "ac_cv_have_decl_rl_catch_signals_" "$ac_includes_default" -if test "x$ac_cv_have_decl_rl_catch_signals_" = x""yes; then : + ac_fn_c_check_func "$LINENO" "rl_completion_matches " "ac_cv_func_rl_completion_matches_" +if test "x$ac_cv_func_rl_completion_matches_" = xyes; then : + +fi + + ac_fn_c_check_func "$LINENO" "rl_insert_close " "ac_cv_func_rl_insert_close_" +if test "x$ac_cv_func_rl_insert_close_" = xyes; then : + +fi + + ac_fn_c_check_func "$LINENO" "rl_filename_completion_function " "ac_cv_func_rl_filename_completion_function_" +if test "x$ac_cv_func_rl_filename_completion_function_" = xyes; then : + +fi + + ac_fn_c_check_func "$LINENO" "rl_set_prompt " "ac_cv_func_rl_set_prompt_" +if test "x$ac_cv_func_rl_set_prompt_" = xyes; then : + +fi + + ac_fn_c_check_func "$LINENO" "rl_clear_pending_input " "ac_cv_func_rl_clear_pending_input_" +if test "x$ac_cv_func_rl_clear_pending_input_" = xyes; then : fi @@ -8030,7 +8015,7 @@ fi for ac_header in mpi.h do : ac_fn_c_check_header_mongrel "$LINENO" "mpi.h" "ac_cv_header_mpi_h" "$ac_includes_default" -if test "x$ac_cv_header_mpi_h" = x""yes; then : +if test "x$ac_cv_header_mpi_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MPI_H 1 _ACEOF @@ -8042,7 +8027,7 @@ done for ac_header in mpe.h do : ac_fn_c_check_header_mongrel "$LINENO" "mpe.h" "ac_cv_header_mpe_h" "$ac_includes_default" -if test "x$ac_cv_header_mpe_h" = x""yes; then : +if test "x$ac_cv_header_mpe_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MPE_H 1 _ACEOF @@ -8054,7 +8039,7 @@ done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : +if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no @@ -8096,7 +8081,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } -if test "${ac_cv_struct_tm+set}" = set; then : +if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8135,7 +8120,7 @@ fi # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5 $as_echo_n "checking size of int *... " >&6; } -if test "${ac_cv_sizeof_int_p+set}" = set; then : +if ${ac_cv_sizeof_int_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then : @@ -8145,7 +8130,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int *) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int_p=0 fi @@ -8168,7 +8153,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5 $as_echo_n "checking size of short int... " >&6; } -if test "${ac_cv_sizeof_short_int+set}" = set; then : +if ${ac_cv_sizeof_short_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int" "$ac_includes_default"; then : @@ -8178,7 +8163,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short int) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short_int=0 fi @@ -8201,7 +8186,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } -if test "${ac_cv_sizeof_int+set}" = set; then : +if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : @@ -8211,7 +8196,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi @@ -8234,7 +8219,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5 $as_echo_n "checking size of long int... " >&6; } -if test "${ac_cv_sizeof_long_int+set}" = set; then : +if ${ac_cv_sizeof_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then : @@ -8244,7 +8229,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long int) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_int=0 fi @@ -8267,7 +8252,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5 $as_echo_n "checking size of long long int... " >&6; } -if test "${ac_cv_sizeof_long_long_int+set}" = set; then : +if ${ac_cv_sizeof_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then : @@ -8277,7 +8262,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long int) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long_int=0 fi @@ -8300,7 +8285,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 $as_echo_n "checking size of float... " >&6; } -if test "${ac_cv_sizeof_float+set}" = set; then : +if ${ac_cv_sizeof_float+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then : @@ -8310,7 +8295,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (float) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_float=0 fi @@ -8333,7 +8318,7 @@ _ACEOF # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 $as_echo_n "checking size of double... " >&6; } -if test "${ac_cv_sizeof_double+set}" = set; then : +if ${ac_cv_sizeof_double+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then : @@ -8343,7 +8328,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (double) -See \`config.log' for more details" "$LINENO" 5 ; } +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_double=0 fi @@ -8363,7 +8348,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for type of malloc" >&5 $as_echo_n "checking for type of malloc... " >&6; } -if test "${yap_cv_malloct+set}" = set; then : +if ${yap_cv_malloct+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8403,7 +8388,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc inline" >&5 $as_echo_n "checking for gcc inline... " >&6; } -if test "${yap_cv_gcc+set}" = set; then : +if ${yap_cv_gcc+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8511,7 +8496,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc threaded code" >&5 $as_echo_n "checking for gcc threaded code... " >&6; } -if test "${yap_cv_threaded_code+set}" = set; then : +if ${yap_cv_threaded_code+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8556,7 +8541,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IEEE floats" >&5 $as_echo_n "checking for IEEE floats... " >&6; } -if test "${yap_cv_ffieee+set}" = set; then : +if ${yap_cv_ffieee+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8597,7 +8582,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 $as_echo_n "checking for sigsetjmp... " >&6; } -if test "${yap_cv_sigsetjmp+set}" = set; then : +if ${yap_cv_sigsetjmp+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8637,7 +8622,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsegv" >&5 $as_echo_n "checking for sigsegv... " >&6; } -if test "${yap_cv_sigsegv+set}" = set; then : +if ${yap_cv_sigsegv+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8676,7 +8661,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigprof" >&5 $as_echo_n "checking for sigprof... " >&6; } -if test "${yap_cv_sigprof+set}" = set; then : +if ${yap_cv_sigprof+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8715,7 +8700,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for siginfo" >&5 $as_echo_n "checking for siginfo... " >&6; } -if test "${yap_cv_siginfo+set}" = set; then : +if ${yap_cv_siginfo+:} false; then : $as_echo_n "(cached) " >&6 else @@ -8816,7 +8801,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8958,7 +8943,7 @@ done for ac_func in mbsnrtowcs do : ac_fn_c_check_func "$LINENO" "mbsnrtowcs" "ac_cv_func_mbsnrtowcs" -if test "x$ac_cv_func_mbsnrtowcs" = x""yes; then : +if test "x$ac_cv_func_mbsnrtowcs" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MBSNRTOWCS 1 _ACEOF @@ -9076,7 +9061,7 @@ done ac_fn_c_check_func "$LINENO" "regexec" "ac_cv_func_regexec" -if test "x$ac_cv_func_regexec" = x""yes; then : +if test "x$ac_cv_func_regexec" = xyes; then : NO_BUILTIN_REGEXP="#" else NO_BUILTIN_REGEXP="" @@ -9086,7 +9071,7 @@ fi for ac_func in NSLinkModule do : ac_fn_c_check_func "$LINENO" "NSLinkModule" "ac_cv_func_NSLinkModule" -if test "x$ac_cv_func_NSLinkModule" = x""yes; then : +if test "x$ac_cv_func_NSLinkModule" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NSLINKMODULE 1 _ACEOF @@ -9129,7 +9114,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpz_xor" >&5 $as_echo_n "checking for mpz_xor... " >&6; } -if test "${yap_cv_mpz_xor+set}" = set; then : +if ${yap_cv_mpz_xor+:} false; then : $as_echo_n "(cached) " >&6 else @@ -9175,7 +9160,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fflush(NULL) clobbers input pipes" >&5 $as_echo_n "checking if fflush(NULL) clobbers input pipes... " >&6; } -if test "${yap_cv_broken_fflush_null+set}" = set; then : +if ${yap_cv_broken_fflush_null+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <&5 $as_echo_n "checking for socket in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_socket+set}" = set; then : +if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9326,7 +9311,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } -if test "x$ac_cv_lib_socket_socket" = x""yes; then : +if test "x$ac_cv_lib_socket_socket" = xyes; then : CLIB_NETLIBS="$CLIB_NETLIBS -lsocket" $as_echo "#define HAVE_LIBSOCKET 1" >>confdefs.h @@ -9336,13 +9321,13 @@ fi fi ac_fn_c_check_func "$LINENO" "gethostent" "ac_cv_func_gethostent" -if test "x$ac_cv_func_gethostent" = x""yes; then : +if test "x$ac_cv_func_gethostent" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostent in -lnsl" >&5 $as_echo_n "checking for gethostent in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostent+set}" = set; then : +if ${ac_cv_lib_nsl_gethostent+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9376,7 +9361,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostent" >&5 $as_echo "$ac_cv_lib_nsl_gethostent" >&6; } -if test "x$ac_cv_lib_nsl_gethostent" = x""yes; then : +if test "x$ac_cv_lib_nsl_gethostent" = xyes; then : CLIB_NETLIBS="$CLIB_NETLIBS -lnsl" $as_echo "#define HAVE_LIBNSL 1" >>confdefs.h @@ -9389,7 +9374,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } -if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then : +if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9423,7 +9408,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } -if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then : +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : CLIB_PTHREADS="-lpthread" else CLIB_PTHREADS="" @@ -9433,7 +9418,7 @@ fi oldlibs="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 $as_echo_n "checking for crypt in -lcrypt... " >&6; } -if test "${ac_cv_lib_crypt_crypt+set}" = set; then : +if ${ac_cv_lib_crypt_crypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -9467,7 +9452,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 $as_echo "$ac_cv_lib_crypt_crypt" >&6; } -if test "x$ac_cv_lib_crypt_crypt" = x""yes; then : +if test "x$ac_cv_lib_crypt_crypt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPT 1 _ACEOF @@ -9480,7 +9465,7 @@ CLIB_CRYPTLIBS="$LIBS" for ac_func in crypt do : ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt" -if test "x$ac_cv_func_crypt" = x""yes; then : +if test "x$ac_cv_func_crypt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CRYPT 1 _ACEOF @@ -9501,7 +9486,7 @@ ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " #include " -if test "x$ac_cv_type_socklen_t" = x""yes; then : +if test "x$ac_cv_type_socklen_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SOCKLEN_T 1 @@ -9515,7 +9500,7 @@ ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" " #include " -if test "x$ac_cv_type_ssize_t" = x""yes; then : +if test "x$ac_cv_type_ssize_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SSIZE_T 1 @@ -9570,7 +9555,7 @@ fi ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include " -if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then : +if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : $as_echo "#define HAVE_STRUCT_TIME_TM_GMTOFF /**/" >>confdefs.h @@ -9822,10 +9807,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -9857,7 +9853,7 @@ LTLIBOBJS=$ac_ltlibobjs -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -9958,6 +9954,7 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -10265,7 +10262,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.67. Invocation command line was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -10327,7 +10324,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.67, +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. @@ -10493,7 +10490,7 @@ do "packages/swi-minisat2/Makefile") CONFIG_FILES="$CONFIG_FILES packages/swi-minisat2/Makefile" ;; "packages/swi-minisat2/C/Makefile") CONFIG_FILES="$CONFIG_FILES packages/swi-minisat2/C/Makefile" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -10515,9 +10512,10 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -10525,12 +10523,13 @@ $debug || { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -10552,7 +10551,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -10580,7 +10579,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -10628,7 +10627,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -10660,7 +10659,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF @@ -10694,7 +10693,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -10706,8 +10705,8 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 @@ -10808,7 +10807,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -10827,7 +10826,7 @@ do for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -10836,7 +10835,7 @@ do [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -10862,8 +10861,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -10993,21 +10992,22 @@ s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; @@ -11018,20 +11018,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ + mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; diff --git a/configure.in b/configure.in index 78493e113..6286c3403 100755 --- a/configure.in +++ b/configure.in @@ -1380,7 +1380,11 @@ if test "$yap_cv_readline" != "no" then AC_CHECK_HEADERS( readline/readline.h) AC_CHECK_HEADERS( readline/history.h) - AC_CHECK_DECL( rl_catch_signals ) + AC_CHECK_FUNC( rl_completion_matches ) + AC_CHECK_FUNC( rl_insert_close ) + AC_CHECK_FUNC( rl_filename_completion_function ) + AC_CHECK_FUNC( rl_set_prompt ) + AC_CHECK_FUNC( rl_clear_pending_input ) fi AC_CHECK_HEADERS(mpi.h) AC_CHECK_HEADERS(mpe.h) diff --git a/packages/PLStream/pl-ctype.c b/packages/PLStream/pl-ctype.c index 9498bf74a..934ce10dd 100644 --- a/packages/PLStream/pl-ctype.c +++ b/packages/PLStream/pl-ctype.c @@ -26,36 +26,6 @@ #include #include "pl-ctype.h" -#if __YAP_PROLOG__ - -/* support for blank space handling, stolen from pl-read.c */ - -#include - - /******************************* - * UNICODE CLASSIFIERS * - *******************************/ - -#define CharTypeW(c, t, w) \ - ((unsigned)(c) <= 0xff ? (_PL_char_types[(unsigned)(c)] t) \ - : (uflagsW(c) & w)) - -#define PlBlankW(c) CharTypeW(c, <= SP, U_SEPARATOR) -#define PlUpperW(c) CharTypeW(c, == UC, U_UPPERCASE) -#define PlIdStartW(c) (c <= 0xff ? (isLower(c)||isUpper(c)||c=='_') \ - : uflagsW(c) & U_ID_START) -#define PlIdContW(c) CharTypeW(c, >= UC, U_ID_CONTINUE) -#define PlSymbolW(c) CharTypeW(c, == SY, 0) -#define PlPunctW(c) CharTypeW(c, == PU, 0) -#define PlSoloW(c) CharTypeW(c, == SO, 0) - -static int -unicode_separator(pl_wchar_t c) -{ return PlBlankW(c); -} - -#endif - /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This module defines: diff --git a/packages/PLStream/pl-incl.h b/packages/PLStream/pl-incl.h index b9c799205..acd616129 100755 --- a/packages/PLStream/pl-incl.h +++ b/packages/PLStream/pl-incl.h @@ -191,6 +191,10 @@ typedef struct word culprit; /* for CVT_nocode/CVT_nochar */ } CVT_result; +#define MAXNEWLINES 5 /* maximum # of newlines in atom */ + +#define LONGATOM_CHECK 0x01 /* read/1: error on intptr_t atoms */ + /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Operator types. NOTE: if you change OP_*, check operatorTypeToAtom()! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ @@ -686,7 +690,8 @@ extern PL_local_data_t lds; #define source_line_no (LD->read_source.line) #define source_file_name (LD->read_source.file) - +#define source_line_pos (LD->read_source.linepos) +#define source_char_no (LD->read_source.character) /* Support PL_LOCK in the interface */ #if THREADS @@ -982,7 +987,9 @@ word pl_noprotocol(void); IOSTREAM *PL_current_input(void); IOSTREAM *PL_current_output(void); -int reportStreamError(IOSTREAM *s); +extern int reportStreamError(IOSTREAM *s); + +extern int digitValue(int b, int c); PL_EXPORT(int) PL_unify_stream(term_t t, IOSTREAM *s); PL_EXPORT(int) PL_unify_stream_or_alias(term_t t, IOSTREAM *s); @@ -990,6 +997,7 @@ PL_EXPORT(int) PL_get_stream_handle(term_t t, IOSTREAM **s); PL_EXPORT(void) PL_write_prompt(int); PL_EXPORT(int) PL_release_stream(IOSTREAM *s); + COMMON(atom_t) fileNameStream(IOSTREAM *s); COMMON(int) streamStatus(IOSTREAM *s); @@ -1005,6 +1013,11 @@ COMMON(atom_t) encoding_to_atom(IOENC enc); COMMON(int) pl_see(term_t f); COMMON(int) pl_seen(void); +COMMON(int) unicode_separator(pl_wchar_t c); +COMMON(word) pl_raw_read(term_t term); +COMMON(word) pl_raw_read2(term_t stream, term_t term); + + /**** stuff from pl-error.c ****/ extern void outOfCore(void); extern void fatalError(const char *fm, ...); @@ -1102,8 +1115,6 @@ COMMON(int) numberVars(term_t t, nv_options *opts, int n ARG_LD); COMMON(Buffer) codes_or_chars_to_buffer(term_t l, unsigned int flags, int wide, CVT_result *status); -COMMON(int) uflagsW(int code); - static inline word setBoolean(int *flag, term_t old, term_t new) { if ( !PL_unify_bool_ex(old, *flag) || diff --git a/packages/PLStream/pl-read.c b/packages/PLStream/pl-read.c index e6aa266ca..4f0c9b7ba 100644 --- a/packages/PLStream/pl-read.c +++ b/packages/PLStream/pl-read.c @@ -1,18 +1,74 @@ #include "pl-incl.h" +#include "pl-ctype.h" +#include "pl-utf8.h" +#include "pl-dtoa.h" +#include "pl-umap.c" /* Unicode map */ + +typedef unsigned char * ucharp; +typedef const unsigned char * cucharp; + +#define utf8_get_uchar(s, chr) (ucharp)utf8_get_char((char *)(s), chr) + +#define FASTBUFFERSIZE 256 /* read quickly upto this size */ + +struct read_buffer +{ int size; /* current size of read buffer */ + unsigned char *base; /* base of read buffer */ + unsigned char *here; /* current position in read buffer */ + unsigned char *end; /* end of the valid buffer */ + + IOSTREAM *stream; /* stream we are reading from */ + unsigned char fast[FASTBUFFERSIZE]; /* Quick internal buffer */ +}; + typedef struct -{ - term_t varnames; /* Report variables+names */ +{ unsigned char *here; /* current character */ + unsigned char *base; /* base of clause */ + unsigned char *end; /* end of the clause */ + unsigned char *token_start; /* start of most recent read token */ IOSTREAM *stream; int has_exception; /* exception is raised */ + unsigned char *posp; /* position pointer */ + size_t posi; /* position number */ + + unsigned int flags; /* Module syntax flags */ + int styleCheck; /* style-checking mask */ + bool backquoted_string; /* Read `hello` as string */ + int *char_conversion_table; /* active conversion table */ + term_t exception; /* raised exception */ + term_t varnames; /* Report variables+names */ + int strictness; /* Strictness level */ + + term_t comments; /* Report comments */ + + struct read_buffer _rb; /* keep read characters here */ } read_data, *ReadData; +#define rdhere (_PL_rd->here) +#define rdbase (_PL_rd->base) +#define rdend (_PL_rd->end) +#define last_token_start (_PL_rd->token_start) +#define rb (_PL_rd->_rb) + +#define DO_CHARESCAPE true(_PL_rd, CHARESCAPE) + +extern IOFUNCTIONS Sstringfunctions; + +static bool +isStringStream(IOSTREAM *s) +{ return s->functions == &Sstringfunctions; +} + + + static void init_read_data(ReadData _PL_rd, IOSTREAM *in ARG_LD) -{ +{ memset(_PL_rd, 0, sizeof(*_PL_rd)); /* optimise! */ + _PL_rd->varnames = 0; _PL_rd->stream = in; _PL_rd->has_exception = 0; @@ -31,6 +87,878 @@ read_term(term_t t, ReadData rd ARG_LD) } +static void addUTF8Buffer(Buffer b, int c); + +static void +addUTF8Buffer(Buffer b, int c) +{ if ( c >= 0x80 ) + { char buf[6]; + char *p, *end; + + end = utf8_put_char(buf, c); + for(p=buf; p= UC, U_ID_CONTINUE) +#define PlSymbolW(c) CharTypeW(c, == SY, 0) +#define PlPunctW(c) CharTypeW(c, == PU, 0) +#define PlSoloW(c) CharTypeW(c, == SO, 0) + +int +unicode_separator(pl_wchar_t c) +{ return PlBlankW(c); +} + + /******************************** + * RAW READING * + *********************************/ + + +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Scan the input, give prompts when necessary and return a char * holding +a stripped version of the next term. Contiguous white space is mapped +on a single space, block and % ... \n comment is deleted. Memory is +claimed automatically en enlarged if necessary. + +(char *) NULL is returned on a syntax error. +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ + +#define syntaxError(what, rd) { errorWarning(what, 0, rd); fail; } + +static term_t +makeErrorTerm(const char *id_str, term_t id_term, ReadData _PL_rd) +{ GET_LD + term_t ex, loc=0; /* keep compiler happy */ + unsigned char const *s, *ll = NULL; + int rc = TRUE; + + if ( !(ex = PL_new_term_ref()) || + !(loc = PL_new_term_ref()) ) + rc = FALSE; + + if ( rc && !id_term ) + { if ( !(id_term=PL_new_term_ref()) || + !PL_put_atom_chars(id_term, id_str) ) + rc = FALSE; + } + + if ( rc ) + rc = PL_unify_term(ex, + PL_FUNCTOR, FUNCTOR_error2, + PL_FUNCTOR, FUNCTOR_syntax_error1, + PL_TERM, id_term, + PL_TERM, loc); + + source_char_no += last_token_start - rdbase; + for(s=rdbase; s 0 ) lp--; + break; + case '\t': + lp |= 7; + default: + lp++; + } + } + + source_line_pos = lp; + } + + if ( rc ) + { if ( ReadingSource ) /* reading a file */ + { rc = PL_unify_term(loc, + PL_FUNCTOR, FUNCTOR_file4, + PL_ATOM, source_file_name, + PL_INT, source_line_no, + PL_INT, source_line_pos, + PL_INT64, source_char_no); + } else if ( isStringStream(rb.stream) ) + { size_t pos; + + pos = utf8_strlen((char *)rdbase, last_token_start-rdbase); + + rc = PL_unify_term(loc, + PL_FUNCTOR, FUNCTOR_string2, + PL_UTF8_STRING, rdbase, + PL_INT, (int)pos); + } else /* any stream */ + { term_t stream; + + if ( !(stream=PL_new_term_ref()) || + !PL_unify_stream_or_alias(stream, rb.stream) || + !PL_unify_term(loc, + PL_FUNCTOR, FUNCTOR_stream4, + PL_TERM, stream, + PL_INT, source_line_no, + PL_INT, source_line_pos, + PL_INT64, source_char_no) ) + rc = FALSE; + } + } + + return (rc ? ex : (term_t)0); +} + + + +static bool +errorWarning(const char *id_str, term_t id_term, ReadData _PL_rd) +{ GET_LD + term_t ex; + + LD->exception.processing = TRUE; /* allow using spare stack */ + + ex = makeErrorTerm(id_str, id_term, _PL_rd); + + if ( _PL_rd ) + { _PL_rd->has_exception = TRUE; + if ( ex ) + PL_put_term(_PL_rd->exception, ex); + else + PL_put_term(_PL_rd->exception, exception_term); + } else + { if ( ex ) + PL_raise_exception(ex); + } + + fail; +} + + + +static void +clearBuffer(ReadData _PL_rd) +{ if (rb.size == 0) + { rb.base = rb.fast; + rb.size = sizeof(rb.fast); + } + rb.end = rb.base + rb.size; + rdbase = rb.here = rb.base; + + _PL_rd->posp = rdbase; + _PL_rd->posi = 0; +} + + +static void +growToBuffer(int c, ReadData _PL_rd) +{ if ( rb.base == rb.fast ) /* intptr_t clause: jump to use malloc() */ + { rb.base = PL_malloc(FASTBUFFERSIZE * 2); + memcpy(rb.base, rb.fast, FASTBUFFERSIZE); + } else + rb.base = PL_realloc(rb.base, rb.size*2); + + DEBUG(8, Sdprintf("Reallocated read buffer at %ld\n", (intptr_t) rb.base)); + _PL_rd->posp = rdbase = rb.base; + rb.here = rb.base + rb.size; + rb.size *= 2; + rb.end = rb.base + rb.size; + _PL_rd->posi = 0; + + *rb.here++ = c; +} + + +static inline void +addByteToBuffer(int c, ReadData _PL_rd) +{ c &= 0xff; + + if ( rb.here >= rb.end ) + growToBuffer(c, _PL_rd); + else + *rb.here++ = c; +} + + +static void +addToBuffer(int c, ReadData _PL_rd) +{ if ( c <= 0x7f ) + { addByteToBuffer(c, _PL_rd); + } else + { char buf[10]; + char *s, *e; + + e = utf8_put_char(buf, c); + for(s=buf; sposition ) + { source_line_no = s->position->lineno; + source_line_pos = s->position->linepos - 1; /* char just read! */ + source_char_no = s->position->charno - 1; /* char just read! */ + } else + { source_line_no = -1; + source_line_pos = -1; + source_char_no = 0; + } + + if ( (a = fileNameStream(s)) ) + source_file_name = a; + else + source_file_name = NULL_ATOM; +} + + +static inline int +getchr__(ReadData _PL_rd) +{ int c = Sgetcode(rb.stream); + + if ( !_PL_rd->char_conversion_table || c < 0 || c >= 256 ) + return c; + + return _PL_rd->char_conversion_table[c]; +} + + +#define getchr() getchr__(_PL_rd) +#define getchrq() Sgetcode(rb.stream) + +#define ensure_space(c) { if ( something_read && \ + (c == '\n' || !isBlank(rb.here[-1])) ) \ + addToBuffer(c, _PL_rd); \ + } +#define set_start_line { if ( !something_read ) \ + { setCurrentSourceLocation(rb.stream PASS_LD); \ + something_read++; \ + } \ + } + +#define rawSyntaxError(what) { addToBuffer(EOS, _PL_rd); \ + rdbase = rb.base, last_token_start = rb.here-1; \ + syntaxError(what, _PL_rd); \ + } + +static int +raw_read_quoted(int q, ReadData _PL_rd) +{ int newlines = 0; + int c; + + addToBuffer(q, _PL_rd); + while((c=getchrq()) != EOF && c != q) + { if ( c == '\\' && DO_CHARESCAPE ) + { int base; + + addToBuffer(c, _PL_rd); + + switch( (c=getchrq()) ) + { case EOF: + goto eofinstr; + case 'u': /* \uXXXX */ + case 'U': /* \UXXXXXXXX */ + addToBuffer(c, _PL_rd); + continue; + case 'x': /* \xNN\ */ + addToBuffer(c, _PL_rd); + c = getchrq(); + if ( c == EOF ) + goto eofinstr; + if ( digitValue(16, c) >= 0 ) + { base = 16; + addToBuffer(c, _PL_rd); + + xdigits: + c = getchrq(); + while( digitValue(base, c) >= 0 ) + { addToBuffer(c, _PL_rd); + c = getchrq(); + } + } + if ( c == EOF ) + goto eofinstr; + addToBuffer(c, _PL_rd); + if ( c == q ) + return TRUE; + continue; + default: + addToBuffer(c, _PL_rd); + if ( digitValue(8, c) >= 0 ) /* \NNN\ */ + { base = 8; + goto xdigits; + } else if ( c == '\n' ) /* \ */ + { c = getchrq(); + if ( c == EOF ) + goto eofinstr; + addToBuffer(c, _PL_rd); + if ( c == q ) + return TRUE; + } + continue; /* \symbolic-control-char */ + } + } else if (c == '\n' && + newlines++ > MAXNEWLINES && + (_PL_rd->styleCheck & LONGATOM_CHECK)) + { rawSyntaxError("long_string"); + } + addToBuffer(c, _PL_rd); + } + if (c == EOF) + { eofinstr: + rawSyntaxError("end_of_file_in_string"); + } + addToBuffer(c, _PL_rd); + + return TRUE; +} + + +static int +add_comment(Buffer b, IOPOS *pos, ReadData _PL_rd ARG_LD) +{ term_t head = PL_new_term_ref(); + + assert(_PL_rd->comments); + if ( !PL_unify_list(_PL_rd->comments, head, _PL_rd->comments) ) + return FALSE; + if ( pos ) + { if ( !PL_unify_term(head, + PL_FUNCTOR, FUNCTOR_minus2, + PL_FUNCTOR, FUNCTOR_stream_position4, + PL_INT64, pos->charno, + PL_INT, pos->lineno, + PL_INT, pos->linepos, + PL_INT, 0, + PL_UTF8_STRING, baseBuffer(b, char)) ) + return FALSE; + } else + { if ( !PL_unify_term(head, + PL_FUNCTOR, FUNCTOR_minus2, + ATOM_minus, + PL_UTF8_STRING, baseBuffer(b, char)) ) + return FALSE; + } + + PL_reset_term_refs(head); + return TRUE; +} + + +static void +setErrorLocation(IOPOS *pos, ReadData _PL_rd) +{ if ( pos ) + { GET_LD + + source_char_no = pos->charno; + source_line_pos = pos->linepos; + source_line_no = pos->lineno; + } + rb.here = rb.base+1; /* see rawSyntaxError() */ +} + + +static unsigned char * +raw_read2(ReadData _PL_rd ARG_LD) +{ int c; + bool something_read = FALSE; + bool dotseen = FALSE; + IOPOS pbuf; /* comment start */ + IOPOS *pos; + + clearBuffer(_PL_rd); /* clear input buffer */ + _PL_rd->strictness = truePrologFlag(PLFLAG_ISO); + source_line_no = -1; + + for(;;) + { c = getchr(); + + handle_c: + switch(c) + { case EOF: + if ( isStringStream(rb.stream) ) /* do not require '. ' when */ + { addToBuffer(' ', _PL_rd); /* reading from a string */ + addToBuffer('.', _PL_rd); + addToBuffer(' ', _PL_rd); + addToBuffer(EOS, _PL_rd); + return rb.base; + } + if (something_read) + { if ( dotseen ) /* term. */ + { if ( rb.here - rb.base == 1 ) + rawSyntaxError("end_of_clause"); + ensure_space(' '); + addToBuffer(EOS, _PL_rd); + return rb.base; + } + rawSyntaxError("end_of_file"); + } + if ( Sfpasteof(rb.stream) ) + { term_t stream; + + LD->exception.processing = TRUE; + stream = PL_new_term_ref(); + PL_unify_stream_or_alias(stream, rb.stream); + PL_error(NULL, 0, NULL, ERR_PERMISSION, + ATOM_input, ATOM_past_end_of_stream, stream); + return NULL; + } + set_start_line; + strcpy((char *)rb.base, "end_of_file. "); + rb.here = rb.base + 14; + return rb.base; + case '/': if ( rb.stream->position ) + { pbuf = *rb.stream->position; + pbuf.charno--; + pbuf.linepos--; + pos = &pbuf; + } else + pos = NULL; + + c = getchr(); + if ( c == '*' ) + { int last; + int level = 1; + tmp_buffer ctmpbuf; + Buffer cbuf; + + if ( _PL_rd->comments ) + { initBuffer(&ctmpbuf); + cbuf = (Buffer)&ctmpbuf; + addUTF8Buffer(cbuf, '/'); + addUTF8Buffer(cbuf, '*'); + } else + { cbuf = NULL; + } + + if ((last = getchr()) == EOF) + { if ( cbuf ) + discardBuffer(cbuf); + setErrorLocation(pos, _PL_rd); + rawSyntaxError("end_of_file_in_block_comment"); + } + if ( cbuf ) + addUTF8Buffer(cbuf, last); + + if ( something_read ) + { addToBuffer(' ', _PL_rd); /* positions */ + addToBuffer(' ', _PL_rd); + addToBuffer(last == '\n' ? last : ' ', _PL_rd); + } + + for(;;) + { c = getchr(); + + if ( cbuf ) + addUTF8Buffer(cbuf, c); + + switch( c ) + { case EOF: + if ( cbuf ) + discardBuffer(cbuf); + setErrorLocation(pos, _PL_rd); + rawSyntaxError("end_of_file_in_block_comment"); + case '*': + if ( last == '/' ) + level++; + break; + case '/': + if ( last == '*' && + (--level == 0 || _PL_rd->strictness) ) + { if ( cbuf ) + { addUTF8Buffer(cbuf, EOS); + if ( !add_comment(cbuf, pos, _PL_rd PASS_LD) ) + { discardBuffer(cbuf); + return FALSE; + } + discardBuffer(cbuf); + } + c = ' '; + goto handle_c; + } + break; + } + if ( something_read ) + addToBuffer(c == '\n' ? c : ' ', _PL_rd); + last = c; + } + } else + { set_start_line; + addToBuffer('/', _PL_rd); + if ( isSymbolW(c) ) + { while( c != EOF && isSymbolW(c) && + !(c == '`' && _PL_rd->backquoted_string) ) + { addToBuffer(c, _PL_rd); + c = getchr(); + } + } + dotseen = FALSE; + goto handle_c; + } + case '%': if ( something_read ) + addToBuffer(' ', _PL_rd); + if ( _PL_rd->comments ) + { tmp_buffer ctmpbuf; + Buffer cbuf; + + if ( rb.stream->position ) + { pbuf = *rb.stream->position; + pbuf.charno--; + pbuf.linepos--; + pos = &pbuf; + } else + pos = NULL; + + initBuffer(&ctmpbuf); + cbuf = (Buffer)&ctmpbuf; + addUTF8Buffer(cbuf, '%'); + + for(;;) + { while((c=getchr()) != EOF && c != '\n') + { addUTF8Buffer(cbuf, c); + if ( something_read ) /* record positions */ + addToBuffer(' ', _PL_rd); + } + if ( c == '\n' ) + { int c2 = Speekcode(rb.stream); + + if ( c2 == '%' ) + { if ( something_read ) + { addToBuffer(c, _PL_rd); + addToBuffer(' ', _PL_rd); + } + addUTF8Buffer(cbuf, c); + c = Sgetcode(rb.stream); + assert(c==c2); + addUTF8Buffer(cbuf, c); + continue; + } + } + break; + } + addUTF8Buffer(cbuf, EOS); + if ( !add_comment(cbuf, pos, _PL_rd PASS_LD) ) + { discardBuffer(cbuf); + return FALSE; + } + discardBuffer(cbuf); + } else + { while((c=getchr()) != EOF && c != '\n') + { if ( something_read ) /* record positions */ + addToBuffer(' ', _PL_rd); + } + } + goto handle_c; /* is the newline */ + case '\'': if ( rb.here > rb.base && isDigit(rb.here[-1]) ) + { cucharp bs = &rb.here[-1]; + + if ( bs > rb.base && isDigit(bs[-1]) ) + bs--; + if ( bs > rb.base && isSign(bs[-1]) ) + bs--; + + if ( bs == rb.base || !PlIdContW(bs[-1]) ) + { int base; + + if ( isSign(bs[0]) ) + bs++; + base = atoi((char*)bs); + + if ( base <= 36 ) + { if ( base == 0 ) /* 0' */ + { addToBuffer(c, _PL_rd); + { if ( (c=getchr()) != EOF ) + { addToBuffer(c, _PL_rd); + if ( c == '\\' ) /* 0'\ */ + { if ( (c=getchr()) != EOF ) + addToBuffer(c, _PL_rd); + } else if ( c == '\'' ) /* 0'' */ + { if ( (c=getchr()) != EOF ) + { if ( c == '\'' ) + addToBuffer(c, _PL_rd); + else + goto handle_c; + } + } + break; + } + rawSyntaxError("end_of_file"); + } + } else + { int c2 = Speekcode(rb.stream); + + if ( c2 != EOF ) + { if ( digitValue(base, c2) >= 0 ) + { addToBuffer(c, _PL_rd); + c = Sgetcode(rb.stream); + addToBuffer(c, _PL_rd); + dotseen = FALSE; + break; + } + goto sqatom; + } + rawSyntaxError("end_of_file"); + } + } + } + } + + sqatom: + set_start_line; + if ( !raw_read_quoted(c, _PL_rd) ) + fail; + dotseen = FALSE; + break; + case '"': set_start_line; + if ( !raw_read_quoted(c, _PL_rd) ) + fail; + dotseen = FALSE; + break; + case '.': addToBuffer(c, _PL_rd); + set_start_line; + dotseen++; + c = getchr(); + if ( isSymbolW(c) ) + { while( c != EOF && isSymbolW(c) && + !(c == '`' && _PL_rd->backquoted_string) ) + { addToBuffer(c, _PL_rd); + c = getchr(); + } + dotseen = FALSE; + } + goto handle_c; + case '`': if ( _PL_rd->backquoted_string ) + { set_start_line; + if ( !raw_read_quoted(c, _PL_rd) ) + fail; + dotseen = FALSE; + break; + } + /*FALLTHROUGH*/ + default: if ( c < 0xff ) + { switch(_PL_char_types[c]) + { case SP: + case CT: + blank: + if ( dotseen ) + { if ( rb.here - rb.base == 1 ) + rawSyntaxError("end_of_clause"); + ensure_space(c); + addToBuffer(EOS, _PL_rd); + return rb.base; + } + do + { if ( something_read ) /* positions, \0 --> ' ' */ + addToBuffer(c ? c : ' ', _PL_rd); + else + ensure_space(c); + c = getchr(); + } while( c != EOF && PlBlankW(c) ); + goto handle_c; + case SY: + set_start_line; + do + { addToBuffer(c, _PL_rd); + c = getchr(); + if ( c == '`' && _PL_rd->backquoted_string ) + break; + } while( c != EOF && c <= 0xff && isSymbol(c) ); + /* TBD: wide symbols? */ + dotseen = FALSE; + goto handle_c; + case LC: + case UC: + set_start_line; + do + { addToBuffer(c, _PL_rd); + c = getchr(); + } while( c != EOF && PlIdContW(c) ); + dotseen = FALSE; + goto handle_c; + default: + addToBuffer(c, _PL_rd); + dotseen = FALSE; + set_start_line; + } + } else /* > 255 */ + { if ( PlIdStartW(c) ) + { set_start_line; + do + { addToBuffer(c, _PL_rd); + c = getchr(); + } while( c != EOF && PlIdContW(c) ); + dotseen = FALSE; + goto handle_c; + } else if ( PlBlankW(c) ) + { goto blank; + } else + { addToBuffer(c, _PL_rd); + dotseen = FALSE; + set_start_line; + } + } + } + } +} + + +/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +Raw reading returns a string in UTF-8 notation of the a Prolog term. +Comment inside the term is replaced by spaces or newline to ensure +proper reconstruction of source locations. Comment before the term is +skipped. +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ + +static unsigned char * +raw_read(ReadData _PL_rd, unsigned char **endp ARG_LD) +{ unsigned char *s; + + if ( (rb.stream->flags & SIO_ISATTY) && Sfileno(rb.stream) >= 0 ) + { ttybuf tab; + + PushTty(rb.stream, &tab, TTY_SAVE); /* make sure tty is sane */ + PopTty(rb.stream, &ttytab, FALSE); + s = raw_read2(_PL_rd PASS_LD); + PopTty(rb.stream, &tab, TRUE); + } else + { s = raw_read2(_PL_rd PASS_LD); + } + + if ( endp ) + *endp = _PL_rd->_rb.here; + + return s; +} + + + /******************************** + * PROLOG CONNECTION * + *********************************/ + +static unsigned char * +backSkipUTF8(unsigned const char *start, unsigned const char *end, int *chr) +{ const unsigned char *s; + + for(s=end-1 ; s>start && *s&0x80; s--) + ; + utf8_get_char((char*)s, chr); + + return (unsigned char *)s; +} + + +static unsigned char * +backSkipBlanks(const unsigned char *start, const unsigned char *end) +{ const unsigned char *s; + + for( ; end > start; end = s) + { unsigned char *e; + int chr; + + for(s=end-1 ; s>start && ISUTF8_CB(*s); s--) + ; + e = (unsigned char*)utf8_get_char((char*)s, &chr); + assert(e == end); + if ( !PlBlankW(chr) ) + return (unsigned char*)end; + } + + return (unsigned char *)start; +} + +static inline ucharp +skipSpaces(cucharp in) +{ int chr; + ucharp s; + + for( ; *in; in=s) + { s = utf8_get_uchar(in, &chr); + + if ( !PlBlankW(chr) ) + return (ucharp)in; + } + + return (ucharp)in; +} + + + +word +pl_raw_read2(term_t from, term_t term) +{ GET_LD + unsigned char *s, *e, *t2, *top; + read_data rd; + word rval; + IOSTREAM *in; + int chr; + PL_chars_t txt; + + if ( !getInputStream(from, &in) ) + fail; + + init_read_data(&rd, in PASS_LD); + if ( !(s = raw_read(&rd, &e PASS_LD)) ) + { rval = PL_raise_exception(rd.exception); + goto out; + } + + /* strip the input from blanks */ + top = backSkipBlanks(s, e-1); + t2 = backSkipUTF8(s, top, &chr); + if ( chr == '.' ) + top = backSkipBlanks(s, t2); + /* watch for "0' ." */ + if ( top < e && top-2 >= s && top[-1] == '\'' && top[-2] == '0' ) + top++; + *top = EOS; + s = skipSpaces(s); + + txt.text.t = (char*)s; + txt.length = top-s; + txt.storage = PL_CHARS_HEAP; + txt.encoding = ENC_UTF8; + txt.canonical = FALSE; + + rval = PL_unify_text(term, 0, &txt, PL_ATOM); + +out: + free_read_data(&rd); + if ( Sferror(in) ) + return streamStatus(in); + else + PL_release_stream(in); + + return rval; +} + + +word +pl_raw_read(term_t term) +{ return pl_raw_read2(0, term); +} + + /******************************* * TERM <->ATOM * *******************************/ diff --git a/packages/PLStream/pl-rl.c b/packages/PLStream/pl-rl.c index be1091d44..6eeab6abe 100644 --- a/packages/PLStream/pl-rl.c +++ b/packages/PLStream/pl-rl.c @@ -78,6 +78,9 @@ SWI-Prolog.h and SWI-Stream.h #endif #undef ESC /* will be redefined ... */ +#ifdef META +#undef META /* conflict with macports readline */ +#endif #include /* readline needs it */ #include #define savestring(x) /* avoid definition there */ @@ -86,7 +89,7 @@ extern int rl_done; /* should be in readline.h, but */ /* isn't in some versions ... */ #ifdef HAVE_READLINE_HISTORY_H #include -#elif !defined(__APPLE__) +#else extern void add_history(char *); /* should be in readline.h */ #endif /* missing prototypes in older */ @@ -94,6 +97,7 @@ extern void add_history(char *); /* should be in readline.h */ extern int rl_begin_undo_group(void); /* delete when conflict arrises! */ extern int rl_end_undo_group(void); extern Function *rl_event_hook; + #ifndef HAVE_RL_FILENAME_COMPLETION_FUNCTION #define rl_filename_completion_function filename_completion_function extern char *filename_completion_function(const char *, int); @@ -335,7 +339,7 @@ rl_sighandler(int sig) DEBUG(3, Sdprintf("Resetting after signal\n")); prepare_signals(); -#ifndef __APPLE__ +#ifdef HAVE_RL_RESET_AFTER_SIGNAL rl_reset_after_signal (); #endif } @@ -361,7 +365,7 @@ reentrant access is tried. #ifdef HAVE_RL_EVENT_HOOK static int -event_hook() +event_hook(void) { if ( Sinput->position ) { int64_t c0 = Sinput->position->charno; @@ -469,7 +473,7 @@ Sread_readline(void *handle, char *buf, size_t size) { int state = rl_readline_state; rl_clear_pending_input(); -#ifndef __APPLE__ +#ifdef HAVE_RL_DISCARD_ARGUMENT rl_discard_argument(); #endif rl_deprep_terminal(); @@ -516,7 +520,6 @@ Sread_readline(void *handle, char *buf, size_t size) static int prolog_complete(int ignore, int key) { -#ifndef __APPLE__ if ( rl_point > 0 && rl_line_buffer[rl_point-1] != ' ' ) { rl_begin_undo_group(); rl_complete(ignore, key); @@ -532,7 +535,6 @@ prolog_complete(int ignore, int key) rl_end_undo_group(); } else rl_complete(ignore, key); -#endif return 0; } diff --git a/packages/PLStream/pl-umap.c b/packages/PLStream/pl-umap.c index b422a8537..4e2e0ef30 100644 --- a/packages/PLStream/pl-umap.c +++ b/packages/PLStream/pl-umap.c @@ -1622,7 +1622,7 @@ static const char* const uflags_map[UNICODE_MAP_SIZE] = F(0), F(3), ucp0xfa, ucp0xfb, F(3), ucp0xfd, ucp0xfe, ucp0xff }; -int +static int uflagsW(int code) { int cp = (unsigned)code / 256; diff --git a/pl/init.yap b/pl/init.yap index 8dc12fe2a..fdb32373f 100644 --- a/pl/init.yap +++ b/pl/init.yap @@ -52,7 +52,6 @@ otherwise. :- compile_expressions. - :- [ % lists is often used. 'lists.yap', @@ -207,3 +206,4 @@ file_search_path(system, Dir) :- file_search_path(foreign, yap('lib/Yap')). :- yap_flag(unknown,error). +