From jschultz at spread.org Mon Aug 20 16:06:36 2018 From: jschultz at spread.org (jschultz at spread.org) Date: Mon, 20 Aug 2018 16:06:36 -0400 Subject: [Spread-cvs] commit: r904 - libspreadutil/tags Message-ID: Author: jschultz Date: 2018-08-20 16:06:35 -0400 (Mon, 20 Aug 2018) New Revision: 904 Added: libspreadutil/tags/5.0.1/ Log: Tagging libspread-util 5.0.1 from Spread 5.0.1 From jschultz at spread.org Mon Aug 20 16:40:04 2018 From: jschultz at spread.org (jschultz at spread.org) Date: Mon, 20 Aug 2018 16:40:04 -0400 Subject: [Spread-cvs] commit: r905 - libspreadutil/tags/5.0.1/include Message-ID: Author: jschultz Date: 2018-08-20 16:40:04 -0400 (Mon, 20 Aug 2018) New Revision: 905 Modified: libspreadutil/tags/5.0.1/include/spu_objects_local.h Log: Backing out changes to spu_objects_local.h from Spread Modified: libspreadutil/tags/5.0.1/include/spu_objects_local.h =================================================================== --- libspreadutil/tags/5.0.1/include/spu_objects_local.h 2018-08-20 20:06:35 UTC (rev 904) +++ libspreadutil/tags/5.0.1/include/spu_objects_local.h 2018-08-20 20:40:04 UTC (rev 905) @@ -53,65 +53,7 @@ #define MY_FIRST_OBJ = first_val */ -/* Note this assumes FIRST_APPLICATION_OBJECT_TYPE = 2 */ -#define PACK_HEAD_OBJ 2 /* net_objs.h */ -#define MESSAGE_OBJ 3 /* prot_objs.h */ -#define MSG_FRAG_OBJ 4 /* prot_objs.h */ -#define RET_REQ_OBJ 5 /* net_objs.h */ -#define LINK_ACK_OBJ 6 /* net_objs.h */ -#define ARU_UPDATE_OBJ 7 /* prot_objs.h */ -#define TOKEN_HEAD_OBJ 8 /* net_objs.h */ -#define TOKEN_BODY_OBJ 9 /* net_objs.h */ -#define ALIVE_OBJ 10 /* memb_objs.h */ -#define JOIN_OBJ 11 /* memb_objs.h */ -#define REFER_OBJ 12 /* memb_objs.h */ -#define STATETRANS_OBJ 13 /* memb_objs.h */ -/* Non-Transmitted objects */ -#define SCATTER 20 -#define QUEUE_ELEMENT 21 -#define QUEUE 22 -#define RETRANS_ENTRY 23 -#define RING_LINK_OBJ 24 -#define HOP_LINK_OBJ 25 -#define MESSAGE_LINK 26 -#define DOWN_LINK 27 -#define TREE_NODE 28 -#define MESSAGE_FRAG_LIST 29 -#define LBUCKET 30 -#define GROUP 31 -#define MEMBER 32 -#define MSG_LIST_ENTRY 33 -#define SESS_SEQ_ENTRY 34 -#define QUEUE_LINK 35 - -#define ROUTE_WEIGHTS 36 -#define PROF_FUNCT 37 -#define QUEUE_SET 38 -#define MQUEUE_ELEMENT 39 -#define TCP_LINK_OBJ 40 -#define MESSAGE_META_OBJ 41 - -#define PROC_RECORD 42 -#define SYS_SCATTER 43 -#define STAT_RECORD 44 -#define STAT_GROUP 45 -#define STAT_REFRECORD 46 - -#define MEMB_MISSING_SEQENTRY 47 -#define MEMB_MISSING_DAEMON 48 -#define MEMB_DEPEND_MESSL 49 -#define PACKET_BODY 50 - -#define SESSION_AUTH_INFO 51 - -#define GROUPS_BUF_LINK 52 -#define GROUPS_MESSAGE_LINK 53 -#define DAEMON_MEMBERS 54 - - /* Highest valid object number is defined in objects.h as UNKNOWN_OBJ */ #endif /* OBJECTS_LOCAL_H */ - - From jschultz at spread.org Mon Aug 20 17:16:48 2018 From: jschultz at spread.org (jschultz at spread.org) Date: Mon, 20 Aug 2018 17:16:48 -0400 Subject: [Spread-cvs] commit: r906 - in libspreadutil/trunk: . buildtools docs include src Message-ID: Author: jschultz Date: 2018-08-20 17:16:48 -0400 (Mon, 20 Aug 2018) New Revision: 906 Added: libspreadutil/trunk/include/spu_addr.h libspreadutil/trunk/src/spu_addr.c Removed: libspreadutil/trunk/include/spu_compatibility.h Modified: libspreadutil/trunk/Changelog libspreadutil/trunk/buildtools/fixpaths libspreadutil/trunk/configure libspreadutil/trunk/configure.in libspreadutil/trunk/docs/Readme.txt libspreadutil/trunk/docs/license.txt libspreadutil/trunk/include/spu_alarm.h libspreadutil/trunk/include/spu_alarm_types.h libspreadutil/trunk/include/spu_data_link.h libspreadutil/trunk/include/spu_events.h libspreadutil/trunk/include/spu_memory.h libspreadutil/trunk/include/spu_objects.h libspreadutil/trunk/include/spu_objects_local.h libspreadutil/trunk/include/spu_scatter.h libspreadutil/trunk/include/spu_system_defs.h libspreadutil/trunk/include/spu_system_defs_autoconf.h libspreadutil/trunk/include/spu_system_defs_windows.h libspreadutil/trunk/src/Makefile.in libspreadutil/trunk/src/alarm.c libspreadutil/trunk/src/arch.c libspreadutil/trunk/src/arch.h libspreadutil/trunk/src/config.h.in libspreadutil/trunk/src/data_link.c libspreadutil/trunk/src/defines.h libspreadutil/trunk/src/events.c libspreadutil/trunk/src/memory.c Log: Merging changes from 4.4.0 to 5.0.1 into trunk Modified: libspreadutil/trunk/Changelog =================================================================== --- libspreadutil/trunk/Changelog 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/Changelog 2018-08-20 21:16:48 UTC (rev 906) @@ -1,3 +1,29 @@ +February 1, 2017 v5.0.0 +----------------------- + +No changes versus v5.0.0 RC2. + +January 23, 2017 v5.0.0 RC2 +--------------------------- + +Exported E_get_time_monotonic to events API +Reworked time functions + +November 22, 2016 v5.0.0 RC1 +---------------------------- + +Major rewrite of data_link.c to support IPv6. +Addition of spu_addr.[ch] to support handling multiple kinds of sockaddr addresses. +Added DL_*_gen functions to work with spu_addr's. +On Windows, use winsock2.h (and associated library) rather than winsock.h. +Exported alarm mask types used by library itself: EXIT, DATA_LINK, MEMORY, EVENTS. +Changed the values of alarm mask types. +Swapped the values of SPLOG_PRINT and SPLOG_FATAL. +Changed the semantics of SPLOG_PRINT: program will now always print regardless of mask on event type. +Changed the semantics of SPLOG_FATAL: program will now always print when exiting (or aborting). +Added ALARMP_NEEDED macro which will return if a given (priority, mask) will currently print or not. This can be used to avoid needless calls to Alarmp (e.g. - for very common events). +Changed all usages of Alarm to Alarmp within library at the SP_INFO priority level. + Wed Mar 27 23:27:08 2013 Jonathan Stanton * configure.in: Change test for clock_gettime(CLOCK_MONOTONIC) to runtime test from compile test. Modified: libspreadutil/trunk/buildtools/fixpaths =================================================================== --- libspreadutil/trunk/buildtools/fixpaths 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/buildtools/fixpaths 2018-08-20 21:16:48 UTC (rev 906) @@ -5,7 +5,7 @@ $usage = "Usage: $0 [-Dstring=replacement] [[infile] ...]\n"; -if (!defined(@ARGV)) { die ("$usage"); } +if (! @ARGV) { die ("$usage"); } # read in the command line and get some definitions while ($_=$ARGV[0], /^-/) { @@ -23,7 +23,7 @@ } } # while parsing arguments -if (!defined(%def)) { +if (! %def) { die ("$0: nothing to do - no substitutions listed!\n"); } Modified: libspreadutil/trunk/configure =================================================================== --- libspreadutil/trunk/configure 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/configure 2018-08-20 21:16:48 UTC (rev 906) @@ -1,18 +1,20 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62 for Spread_Util 4.3.0. +# Generated by GNU Autoconf 2.69 for Spread_Util 5.0.0. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -20,23 +22,15 @@ alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -44,7 +38,13 @@ as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -55,7 +55,7 @@ as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -78,14 +78,7 @@ } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. @@ -94,15 +87,16 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -114,12 +108,16 @@ fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -131,330 +129,344 @@ LANGUAGE=C export LANGUAGE -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - # CDPATH. -$as_unset CDPATH +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # 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 +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+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : else - exitcode=1 - echo as_func_ret_success failed. + exitcode=1; echo positional parameters were not saved. fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # 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 +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+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf at gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit -test $exitcode = 0) || { (exit 1); exit 1; } +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -_ASEOF -}; then - break -fi -fi +} # as_fn_mkdir_p - done +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_success failed. + as_expr=false fi -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename else - exitcode=1 - echo as_func_ret_success failed. + as_basename=false fi -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf at gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -471,9 +483,12 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -482,29 +497,18 @@ exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -519,49 +523,29 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -570,11 +554,11 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +test -n "$DJDIR" || exec 7<&0 &1 -exec 7<&0 &1 - # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -589,14 +573,14 @@ subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='Spread_Util' PACKAGE_TARNAME='spread_util' -PACKAGE_VERSION='4.3.0' -PACKAGE_STRING='Spread_Util 4.3.0' +PACKAGE_VERSION='5.0.0' +PACKAGE_STRING='Spread_Util 5.0.0' PACKAGE_BUGREPORT='' +PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ @@ -634,87 +618,88 @@ # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -CPP -GREP -EGREP -RANLIB -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -LN_S -AR -PERL -LD -THLDFLAGS -THLIBS -NROFF -MANTYPE -mansubdir -SHCC -SHCFLAGS -SHCPPFLAGS -SHLD -SHLDFLAGS -SHLIBS -LIBSPSO -SHLDOPTION -SHLDNAME -SHLDCONVERTSTATIC -SHLDCONVERTSTATICEND +ac_subst_vars='LTLIBOBJS LIBOBJS -LTLIBOBJS' +SHLDCONVERTSTATICEND +SHLDCONVERTSTATIC +SHLDNAME +SHLDOPTION +LIBSPSO +SHLIBS +SHLDFLAGS +SHLD +SHCPPFLAGS +SHCFLAGS +SHCC +mansubdir +MANTYPE +NROFF +THLIBS +THLDFLAGS +LD +PERL +AR +LN_S +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +RANLIB +EGREP +GREP +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -798,8 +783,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -844,8 +830,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -871,8 +856,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1076,8 +1060,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1093,8 +1076,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1124,17 +1106,17 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1143,7 +1125,7 @@ $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 @@ -1151,16 +1133,14 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1182,8 +1162,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1197,8 +1176,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1213,11 +1190,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1256,13 +1231,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1288,7 +1261,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Spread_Util 4.3.0 to adapt to many kinds of systems. +\`configure' configures Spread_Util 5.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1302,7 +1275,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1353,7 +1326,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Spread_Util 4.3.0:";; + short | recursive ) echo "Configuration of Spread_Util 5.0.0:";; esac cat <<\_ACEOF @@ -1382,13 +1355,14 @@ LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF ac_status=$? fi @@ -1451,22 +1425,556 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Spread_Util configure 4.3.0 -generated by GNU Autoconf 2.62 +Spread_Util configure 5.0.0 +generated by GNU Autoconf 2.69 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +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 \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_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; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # 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; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +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 \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext 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; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + 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 \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$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 \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +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; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES +# -------------------------------------------- +# Tries to find the compile-time value of EXPR in a program that includes +# INCLUDES, setting VAR accordingly. Returns whether the value could be +# computed +ac_fn_c_compute_int () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=0 ac_mid=0 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid; break +else + as_fn_arith $ac_mid + 1 && ac_lo=$as_val + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) < 0)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=-1 ac_mid=-1 + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) >= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_lo=$ac_mid; break +else + as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + ac_lo= ac_hi= +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +static int test_array [1 - 2 * !(($2) <= $ac_mid)]; +test_array [0] = 0; +return test_array [0]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_hi=$ac_mid +else + as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in #(( +?*) eval "$3=\$ac_lo"; ac_retval=0 ;; +'') ac_retval=1 ;; +esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +static long int longval () { return $2; } +static unsigned long int ulongval () { return $2; } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (($2) < 0) + { + long int i = longval (); + if (i != ($2)) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ($2)) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + echo >>conftest.val; read $3 config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Spread_Util $as_me 4.3.0, which was -generated by GNU Autoconf 2.62. Invocation command line was +It was created by Spread_Util $as_me 5.0.0, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1502,8 +2010,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -1540,9 +2048,9 @@ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1558,13 +2066,13 @@ -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1576,11 +2084,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1589,13 +2095,13 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1614,11 +2120,9 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1631,11 +2135,9 @@ echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -1649,11 +2151,9 @@ fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -1667,46 +2167,53 @@ exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -1717,19 +2224,23 @@ for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $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; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; @@ -1737,7 +2248,7 @@ esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1752,11 +2263,11 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; @@ -1766,17 +2277,17 @@ ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac @@ -1788,42 +2299,21 @@ esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## - - - - - - - - - - - - - - - - - - - - - - - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -1849,9 +2339,7 @@ fi done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in buildtools \"$srcdir\"/buildtools" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in buildtools \"$srcdir\"/buildtools" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find install-sh, install.sh, or shtool in buildtools \"$srcdir\"/buildtools" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -1868,35 +2356,27 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +{ $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 test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -1912,28 +2392,24 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +{ $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 ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -1965,9 +2441,9 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 @@ -1978,24 +2454,24 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2005,9 +2481,9 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 @@ -2018,24 +2494,24 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2044,12 +2520,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf at gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf at gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2062,9 +2534,9 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 @@ -2075,24 +2547,24 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2102,9 +2574,9 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 @@ -2116,18 +2588,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -2146,10 +2618,10 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2161,9 +2633,9 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 @@ -2174,24 +2646,24 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2205,9 +2677,9 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 @@ -2218,24 +2690,24 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2248,12 +2720,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf at gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf at gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2263,55 +2731,37 @@ fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +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; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2327,8 +2777,8 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -2344,17 +2794,17 @@ done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -2371,7 +2821,7 @@ # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -2390,80 +2840,41 @@ else ac_file='' fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } +{ { $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; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2478,30 +2889,83 @@ esac done else - { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $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; } fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + 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 run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2513,17 +2977,17 @@ } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -2536,29 +3000,23 @@ $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +{ { $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; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +{ $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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2572,37 +3030,16 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes @@ -2611,20 +3048,16 @@ fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +{ $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 ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2635,35 +3068,11 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2674,36 +3083,12 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2714,42 +3099,17 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -2766,23 +3126,18 @@ CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +{ $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 ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -2834,32 +3189,9 @@ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -2870,17 +3202,19 @@ # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2894,14 +3228,14 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. 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 @@ -2916,11 +3250,7 @@ # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -2929,78 +3259,34 @@ #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi +rm -f conftest.err conftest.i conftest.$ac_ext -rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi +rm -f conftest.err conftest.i conftest.$ac_ext -rm -f conftest.err conftest.$ac_ext - done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -3012,7 +3298,7 @@ else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -3023,11 +3309,7 @@ # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3036,85 +3318,40 @@ #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi +rm -f conftest.err conftest.i conftest.$ac_ext -rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi +rm -f conftest.err conftest.i conftest.$ac_ext -rm -f conftest.err conftest.$ac_ext - done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $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; } fi ac_ext=c @@ -3124,9 +3361,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +{ $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 @@ -3137,10 +3374,10 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3157,7 +3394,7 @@ $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -3172,26 +3409,24 @@ $ac_path_GREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +{ $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 @@ -3205,10 +3440,10 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -3225,7 +3460,7 @@ $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -3240,12 +3475,10 @@ $ac_path_EGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -3253,21 +3486,17 @@ fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +{ $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 >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3282,48 +3511,23 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3333,18 +3537,14 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3354,14 +3554,10 @@ if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3388,117 +3584,33 @@ return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_run "$LINENO"; then : -( exit $ac_status ) -ac_cv_header_stdc=no +else + ac_cv_header_stdc=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test `eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` = yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -3508,60 +3620,49 @@ done - - { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown - # See if __BIG_ENDIAN__ or __LITTLE_ENDIAN__ is defined. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + # See if we're dealing with a universal compiler. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#if ! (defined __BIG_ENDIAN__ || defined __LITTLE_ENDIAN__) - neither is defined; +#ifndef __APPLE_CC__ + not a universal capable compiler #endif typedef int dummy; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_bigendian=universal -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - + # Check for potential -arch flags. It is not universal unless + # there are at least two -arch flags with different values. + ac_arch= + ac_prev= + for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do + if test -n "$ac_prev"; then + case $ac_word in + i?86 | x86_64 | ppc | ppc64) + if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then + ac_arch=$ac_word + else + ac_cv_c_bigendian=universal + break + fi + ;; + esac + ac_prev= + elif test "x$ac_word" = "x-arch"; then + ac_prev=arch + fi + done fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3579,30 +3680,9 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3618,49 +3698,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -3675,30 +3724,9 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -3713,51 +3741,20 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_bigendian=no + ac_cv_c_bigendian=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; @@ -3783,24 +3780,7 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi @@ -3812,20 +3792,10 @@ ac_cv_c_bigendian=unknown fi fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -3845,62 +3815,33 @@ return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_c_bigendian=yes + ac_cv_c_bigendian=yes fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) - cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF + $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) - ;; #( + +$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h + + ;; #( *) - { { $as_echo "$as_me:$LINENO: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -$as_echo "$as_me: error: unknown endianness - presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} - { (exit 1); exit 1; }; } ;; + as_fn_error $? "unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac @@ -3910,14 +3851,14 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. 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 @@ -3932,11 +3873,7 @@ # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3945,78 +3882,34 @@ #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi +rm -f conftest.err conftest.i conftest.$ac_ext -rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi +rm -f conftest.err conftest.i conftest.$ac_ext -rm -f conftest.err conftest.$ac_ext - done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -4028,7 +3921,7 @@ else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -4039,11 +3932,7 @@ # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -4052,85 +3941,40 @@ #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi +rm -f conftest.err conftest.i conftest.$ac_ext -rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi +rm -f conftest.err conftest.i conftest.$ac_ext -rm -f conftest.err conftest.$ac_ext - done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $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; } fi ac_ext=c @@ -4142,9 +3986,9 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 @@ -4155,24 +3999,24 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4182,9 +4026,9 @@ ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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 @@ -4195,24 +4039,24 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4221,12 +4065,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf at gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf at gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -4249,10 +4089,10 @@ # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +{ $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 @@ -4260,11 +4100,11 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -4272,7 +4112,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -4301,7 +4141,7 @@ ;; esac -done + done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir @@ -4317,7 +4157,7 @@ INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -4328,22 +4168,22 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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_AR+set}" = set; then +if ${ac_cv_path_AR+:} false; then : $as_echo_n "(cached) " >&6 else case $AR in @@ -4356,14 +4196,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -4371,10 +4211,10 @@ fi AR=$ac_cv_path_AR if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4383,9 +4223,9 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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_PERL+set}" = set; then +if ${ac_cv_path_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $PERL in @@ -4398,14 +4238,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -4413,10 +4253,10 @@ fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then - { $as_echo "$as_me:$LINENO: result: $PERL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4427,9 +4267,7 @@ if test -z "$AR" ; then - { { $as_echo "$as_me:$LINENO: error: *** 'ar' missing, please install or fix your \$PATH ***" >&5 -$as_echo "$as_me: error: *** 'ar' missing, please install or fix your \$PATH ***" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "*** 'ar' missing, please install or fix your \$PATH ***" "$LINENO" 5 fi if test -z "$LD" ; then @@ -4438,18 +4276,14 @@ # C Compiler features -{ $as_echo "$as_me:$LINENO: checking for inline" >&5 +{ $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 for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; @@ -4458,41 +4292,17 @@ #endif _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } - case $ac_cv_c_inline in inline | yes) ;; *) @@ -4515,7 +4325,7 @@ # Allow user to specify flags # Check whether --with-cflags was given. -if test "${with_cflags+set}" = set; then +if test "${with_cflags+set}" = set; then : withval=$with_cflags; if test "x$withval" != "xno" ; then CFLAGS="$CFLAGS $withval" @@ -4526,7 +4336,7 @@ # Check whether --with-cppflags was given. -if test "${with_cppflags+set}" = set; then +if test "${with_cppflags+set}" = set; then : withval=$with_cppflags; if test "x$withval" != "xno"; then CPPFLAGS="$CPPFLAGS $withval" @@ -4537,7 +4347,7 @@ # Check whether --with-ldflags was given. -if test "${with_ldflags+set}" = set; then +if test "${with_ldflags+set}" = set; then : withval=$with_ldflags; if test "x$withval" != "xno" ; then LDFLAGS="$LDFLAGS $withval" @@ -4548,7 +4358,7 @@ # Check whether --with-libs was given. -if test "${with_libs+set}" = set; then +if test "${with_libs+set}" = set; then : withval=$with_libs; if test "x$withval" != "xno" ; then LIBS="$LIBS $withval" @@ -4561,18 +4371,14 @@ # Checks for libraries. OLDLDFLAGS=$LDFLAGS LDFLAGS= -{ $as_echo "$as_me:$LINENO: checking if we need -pthread for threads" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need -pthread for threads" >&5 $as_echo_n "checking if we need -pthread for threads... " >&6; } - if test "${ac_cv_ldflag_pthread+set}" = set; then + if ${ac_cv_ldflag_pthread+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_LDFLAGS="$LDFLAGS" LDFLAGS="-pthread $LDFLAGS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ char pthread_create(); int @@ -4583,47 +4389,22 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : eval "ac_cv_ldflag_pthread=yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "ac_cv_ldflag_pthread=no" + eval "ac_cv_ldflag_pthread=no" fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext, +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext, LDFLAGS="$ac_save_LDFLAGS" fi if eval "test \"`echo $ac_cv_ldflag_pthread`\" = yes"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4633,19 +4414,14 @@ OLDLIBS=$LIBS LIBS= - -{ $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 +{ $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 LIBS="-lpthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -4663,43 +4439,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_pthread_pthread_create=no + ac_cv_lib_pthread_pthread_create=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 +{ $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 $ac_cv_lib_pthread_pthread_create = yes; then +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF @@ -4708,19 +4459,14 @@ fi - -{ $as_echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5 $as_echo_n "checking for thr_create in -lthread... " >&6; } -if test "${ac_cv_lib_thread_thr_create+set}" = set; then +if ${ac_cv_lib_thread_thr_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lthread $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -4738,43 +4484,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_thread_thr_create=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_thread_thr_create=no + ac_cv_lib_thread_thr_create=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5 $as_echo "$ac_cv_lib_thread_thr_create" >&6; } -if test $ac_cv_lib_thread_thr_create = yes; then +if test "x$ac_cv_lib_thread_thr_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBTHREAD 1 _ACEOF @@ -4783,19 +4504,14 @@ fi - -{ $as_echo "$as_me:$LINENO: checking for sem_wait in -lposix4" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_wait in -lposix4" >&5 $as_echo_n "checking for sem_wait in -lposix4... " >&6; } -if test "${ac_cv_lib_posix4_sem_wait+set}" = set; then +if ${ac_cv_lib_posix4_sem_wait+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix4 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -4813,43 +4529,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix4_sem_wait=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_posix4_sem_wait=no + ac_cv_lib_posix4_sem_wait=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix4_sem_wait" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sem_wait" >&5 $as_echo "$ac_cv_lib_posix4_sem_wait" >&6; } -if test $ac_cv_lib_posix4_sem_wait = yes; then +if test "x$ac_cv_lib_posix4_sem_wait" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPOSIX4 1 _ACEOF @@ -4860,101 +4551,12 @@ THLIBS=$LIBS - for ac_func in pthread_atfork -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test `eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` = yes; then +do : + ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork" +if test "x$ac_cv_func_pthread_atfork" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_PTHREAD_ATFORK 1 _ACEOF fi @@ -4962,19 +4564,14 @@ LIBS=$OLDLIBS - -{ $as_echo "$as_me:$LINENO: checking for gethostbyaddr in -lnsl" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr in -lnsl" >&5 $as_echo_n "checking for gethostbyaddr in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyaddr+set}" = set; then +if ${ac_cv_lib_nsl_gethostbyaddr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -4992,43 +4589,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyaddr=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_nsl_gethostbyaddr=no + ac_cv_lib_nsl_gethostbyaddr=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyaddr" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyaddr" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyaddr" >&6; } -if test $ac_cv_lib_nsl_gethostbyaddr = yes; then +if test "x$ac_cv_lib_nsl_gethostbyaddr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF @@ -5037,19 +4609,14 @@ fi - -{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 +{ $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 LIBS="-lsocket $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5067,43 +4634,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_socket_socket=no + ac_cv_lib_socket_socket=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } -if test $ac_cv_lib_socket_socket = yes; then +if test "x$ac_cv_lib_socket_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF @@ -5112,17 +4654,13 @@ fi -{ $as_echo "$as_me:$LINENO: checking for library containing shm_open" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5 $as_echo_n "checking for library containing shm_open... " >&6; } -if test "${ac_cv_search_shm_open+set}" = set; then +if ${ac_cv_search_shm_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5147,69 +4685,38 @@ ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_shm_open=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_shm_open+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_shm_open+:} false; then : break fi done -if test "${ac_cv_search_shm_open+set}" = set; then - : +if ${ac_cv_search_shm_open+:} false; then : + else ac_cv_search_shm_open=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_shm_open" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5 $as_echo "$ac_cv_search_shm_open" >&6; } ac_res=$ac_cv_search_shm_open -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi -{ $as_echo "$as_me:$LINENO: checking for library containing nanosleep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5 $as_echo_n "checking for library containing nanosleep... " >&6; } -if test "${ac_cv_search_nanosleep+set}" = set; then +if ${ac_cv_search_nanosleep+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5234,71 +4741,39 @@ ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_nanosleep=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_nanosleep+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_nanosleep+:} false; then : break fi done -if test "${ac_cv_search_nanosleep+set}" = set; then - : +if ${ac_cv_search_nanosleep+:} false; then : + else ac_cv_search_nanosleep=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5 $as_echo "$ac_cv_search_nanosleep" >&6; } ac_res=$ac_cv_search_nanosleep -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi - -{ $as_echo "$as_me:$LINENO: checking for sqrt in -lm" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 $as_echo_n "checking for sqrt in -lm... " >&6; } -if test "${ac_cv_lib_m_sqrt+set}" = set; then +if ${ac_cv_lib_m_sqrt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5316,43 +4791,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sqrt=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_m_sqrt=no + ac_cv_lib_m_sqrt=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 $as_echo "$ac_cv_lib_m_sqrt" >&6; } -if test $ac_cv_lib_m_sqrt = yes; then +if test "x$ac_cv_lib_m_sqrt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -5362,117 +4812,24 @@ fi - for ac_func in strftime -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test `eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` = yes; then +do : + ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" +if test "x$ac_cv_func_strftime" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_STRFTIME 1 _ACEOF else # strftime is in -lintl on SCO UNIX. -{ $as_echo "$as_me:$LINENO: checking for strftime in -lintl" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5 $as_echo_n "checking for strftime in -lintl... " >&6; } -if test "${ac_cv_lib_intl_strftime+set}" = set; then +if ${ac_cv_lib_intl_strftime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -5490,46 +4847,19 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_strftime=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_intl_strftime=no + ac_cv_lib_intl_strftime=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5 $as_echo "$ac_cv_lib_intl_strftime" >&6; } -if test $ac_cv_lib_intl_strftime = yes; then - cat >>confdefs.h <<\_ACEOF -#define HAVE_STRFTIME 1 -_ACEOF +if test "x$ac_cv_lib_intl_strftime" = xyes; then : + $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h LIBS="-lintl $LIBS" fi @@ -5539,174 +4869,11 @@ # Checks for header files. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -for ac_header in arpa/inet.h assert.h errno.h grp.h limits.h netdb.h netinet/in.h netinet/tcp.h process.h pthread.h pwd.h signal.h stdarg.h stdint.h stdio.h stdlib.h string.h sys/inttypes.h sys/ioctl.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/timeb.h sys/types.h sys/uio.h sys/un.h sys/filio.h time.h unistd.h windows.h winsock.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -if test `eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` = yes; then +for ac_header in arpa/inet.h assert.h errno.h grp.h limits.h netdb.h netinet/in.h netinet/tcp.h process.h pthread.h pwd.h signal.h stdarg.h stdint.h stdio.h stdlib.h string.h sys/inttypes.h sys/ioctl.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/timeb.h sys/types.h sys/uio.h sys/un.h sys/filio.h time.h unistd.h winsock2.h ws2tcpip.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -5716,107 +4883,11 @@ done - - - - - - - - - for ac_func in bcopy inet_aton inet_ntoa inet_ntop memmove setsid snprintf strerror lrand48 -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test `eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` = yes; then +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -5824,100 +4895,11 @@ fi done - - for ac_func in gettimeofday time -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test `eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` = yes; then +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -5927,89 +4909,51 @@ # Check for clock_gettime(CLOCK_MONOTONIC, ...) -{ $as_echo "$as_me:$LINENO: checking for clock_gettime(CLOCK_MONOTONIC)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC)" >&5 $as_echo_n "checking for clock_gettime(CLOCK_MONOTONIC)... " >&6; } -if test "${ac_cv_clock_gettime_monotonic+set}" = set; then +if ${ac_cv_clock_gettime_monotonic+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + 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; } else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main() { struct timespec t; return clock_gettime(CLOCK_MONOTONIC, &t); } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : ac_cv_clock_gettime_monotonic="yes" else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_clock_gettime_monotonic="no" -( exit $ac_status ) - ac_cv_clock_gettime_monotonic="no" - fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_clock_gettime_monotonic" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_clock_gettime_monotonic" >&5 $as_echo "$ac_cv_clock_gettime_monotonic" >&6; } if test "x$ac_cv_clock_gettime_monotonic" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_CLOCK_GETTIME_CLOCK_MONOTONIC 1 -_ACEOF +$as_echo "#define HAVE_CLOCK_GETTIME_CLOCK_MONOTONIC 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for library containing dladdr" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dladdr" >&5 $as_echo_n "checking for library containing dladdr... " >&6; } -if test "${ac_cv_search_dladdr+set}" = set; then +if ${ac_cv_search_dladdr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -6034,76 +4978,43 @@ ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then + if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dladdr=$ac_res -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext - if test "${ac_cv_search_dladdr+set}" = set; then +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_dladdr+:} false; then : break fi done -if test "${ac_cv_search_dladdr+set}" = set; then - : +if ${ac_cv_search_dladdr+:} false; then : + else ac_cv_search_dladdr=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_dladdr" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dladdr" >&5 $as_echo "$ac_cv_search_dladdr" >&6; } ac_res=$ac_cv_search_dladdr -if test "$ac_res" != no; then +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else - { { $as_echo "$as_me:$LINENO: error: unable to find the dladdr() function" >&5 -$as_echo "$as_me: error: unable to find the dladdr() function" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "unable to find the dladdr() function" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: checking for dladdr" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dladdr" >&5 $as_echo_n "checking for dladdr... " >&6; } -if test "${ac_cv_have_dladdr+set}" = set; then +if ${ac_cv_have_dladdr+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 @@ -6118,117 +5029,60 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_dladdr="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_dladdr="no" - ac_cv_have_dladdr="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_dladdr" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_dladdr" >&5 $as_echo "$ac_cv_have_dladdr" >&6; } if test "x$ac_cv_have_dladdr" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_DLADDR 1 -_ACEOF +$as_echo "#define HAVE_DLADDR 1" >>confdefs.h fi # Check for broken snprintf if test "x$ac_cv_func_snprintf" = "xyes" ; then - { $as_echo "$as_me:$LINENO: checking whether snprintf correctly terminates long strings" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf correctly terminates long strings" >&5 $as_echo_n "checking whether snprintf correctly terminates long strings... " >&6; } - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + 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; } else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main(void){char b[5];snprintf(b,5,"123456789");return(b[4]!='\0');} _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 +if ac_fn_c_try_run "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } -cat >>confdefs.h <<\_ACEOF -#define BROKEN_SNPRINTF 1 -_ACEOF +$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h - { $as_echo "$as_me:$LINENO: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5 $as_echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;} fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi # Cheap hack to ensure NEWS-OS libraries are arranged right. @@ -6241,348 +5095,26 @@ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of char" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 $as_echo_n "checking size of char... " >&6; } -if test "${ac_cv_sizeof_char+set}" = set; then +if ${ac_cv_sizeof_char+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (char))) >= 0)]; -test_array [0] = 0 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (char))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (char))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (char))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (char))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_char=$ac_lo;; -'') if test "$ac_cv_type_char" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (char) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + if test "$ac_cv_type_char" = 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 77 "cannot compute sizeof (char) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_char=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (char)); } -static unsigned long int ulongval () { return (long int) (sizeof (char)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (char))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (char)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (char)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_char=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_char" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (char) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_char=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 $as_echo "$ac_cv_sizeof_char" >&6; } @@ -6596,348 +5128,26 @@ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of short int" >&5 +{ $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 test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short int))) >= 0)]; -test_array [0] = 0 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int" "$ac_includes_default"; then : - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short int))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short int))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (short int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_short_int=$ac_lo;; -'') if test "$ac_cv_type_short_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (short int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + if test "$ac_cv_type_short_int" = 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 77 "cannot compute sizeof (short int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short_int=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (short int)); } -static unsigned long int ulongval () { return (long int) (sizeof (short int)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (short int))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (short int)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (short int)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_short_int=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_short_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (short int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_short_int=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short_int" >&5 $as_echo "$ac_cv_sizeof_short_int" >&6; } @@ -6951,348 +5161,26 @@ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of int" >&5 +{ $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 test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)]; -test_array [0] = 0 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_int=$ac_lo;; -'') if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + if test "$ac_cv_type_int" = 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 77 "cannot compute sizeof (int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (int)); } -static unsigned long int ulongval () { return (long int) (sizeof (int)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (int))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (int)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (int)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_int=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_int=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } @@ -7306,348 +5194,26 @@ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of long int" >&5 +{ $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 test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long int))) >= 0)]; -test_array [0] = 0 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then : - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long int))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long int))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long_int=$ac_lo;; -'') if test "$ac_cv_type_long_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + if test "$ac_cv_type_long_int" = 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 77 "cannot compute sizeof (long int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_int=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (long int)); } -static unsigned long int ulongval () { return (long int) (sizeof (long int)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (long int))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (long int)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long int)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long_int=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_long_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_long_int=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5 $as_echo "$ac_cv_sizeof_long_int" >&6; } @@ -7661,348 +5227,26 @@ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. -{ $as_echo "$as_me:$LINENO: checking size of long long int" >&5 +{ $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 test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long int))) >= 0)]; -test_array [0] = 0 + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then : - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid; break else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long int))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long int))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_lo=$ac_mid; break -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo= ac_hi= -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long int) (sizeof (long long int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_hi=$ac_mid -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_lo=`expr '(' $ac_mid ')' + 1` -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long_long_int=$ac_lo;; -'') if test "$ac_cv_type_long_long_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long long int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + if test "$ac_cv_type_long_long_int" = 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 77 "cannot compute sizeof (long long int) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long_int=0 - fi ;; -esac -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -static long int longval () { return (long int) (sizeof (long long int)); } -static unsigned long int ulongval () { return (long int) (sizeof (long long int)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (((long int) (sizeof (long long int))) < 0) - { - long int i = longval (); - if (i != ((long int) (sizeof (long long int)))) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ((long int) (sizeof (long long int)))) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long_long_int=`cat conftest.val` -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -if test "$ac_cv_type_long_long_int" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long int) -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute sizeof (long long int) -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } - else - ac_cv_sizeof_long_long_int=0 fi fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi -rm -f conftest.val -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5 $as_echo "$ac_cv_sizeof_long_long_int" >&6; } @@ -8014,17 +5258,13 @@ # More checks for data types -{ $as_echo "$as_me:$LINENO: checking for windows arch" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for windows arch" >&5 $as_echo_n "checking for windows arch... " >&6; } -if test "${ac_cv_arch_win+set}" = set; then +if ${ac_cv_arch_win+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -8035,57 +5275,30 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_arch_win="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_arch_win="no" - ac_cv_arch_win="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_arch_win" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_arch_win" >&5 $as_echo "$ac_cv_arch_win" >&6; } if test "x$ac_cv_arch_win" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define ARCH_PC_WIN95 1 -_ACEOF +$as_echo "#define ARCH_PC_WIN95 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for struct timezone type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timezone type" >&5 $as_echo_n "checking for struct timezone type... " >&6; } -if test "${ac_cv_have_struct_timezone+set}" = set; then +if ${ac_cv_have_struct_timezone+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -8098,57 +5311,30 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_struct_timezone="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_struct_timezone="no" - ac_cv_have_struct_timezone="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_timezone" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_timezone" >&5 $as_echo "$ac_cv_have_struct_timezone" >&6; } if test "x$ac_cv_have_struct_timezone" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_TIMEZONE 1 -_ACEOF +$as_echo "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for struct sockopt_len_t type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockopt_len_t type" >&5 $as_echo_n "checking for struct sockopt_len_t type... " >&6; } -if test "${ac_cv_have_sockopt_len_t+set}" = set; then +if ${ac_cv_have_sockopt_len_t+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -8160,119 +5346,65 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_sockopt_len_t="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_sockopt_len_t="no" - ac_cv_have_sockopt_len_t="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_sockopt_len_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sockopt_len_t" >&5 $as_echo "$ac_cv_have_sockopt_len_t" >&6; } if test "x$ac_cv_have_sockopt_len_t" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SOCKOPT_LEN_T 1 -_ACEOF +$as_echo "#define HAVE_SOCKOPT_LEN_T 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for struct msghdr type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct msghdr type" >&5 $as_echo_n "checking for struct msghdr type... " >&6; } -if test "${ac_cv_have_struct_msghdr+set}" = set; then +if ${ac_cv_have_struct_msghdr+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { - static struct msghdr msg; msg.msg_namelen = 1; + static struct msghdr msg; msg.msg_name = 0; msg.msg_namelen = 1; msg.msg_iov = 0; msg.msg_iovlen = 0; ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_struct_msghdr="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_struct_msghdr="no" - ac_cv_have_struct_msghdr="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_msghdr" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_msghdr" >&5 $as_echo "$ac_cv_have_struct_msghdr" >&6; } if test "x$ac_cv_have_struct_msghdr" = "xno" ; then -cat >>confdefs.h <<\_ACEOF -#define ARCH_SCATTER_NONE 1 -_ACEOF +$as_echo "#define ARCH_SCATTER_NONE 1" >>confdefs.h else have_scatter="no" - { $as_echo "$as_me:$LINENO: checking for struct msghdr accrights" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct msghdr accrights" >&5 $as_echo_n "checking for struct msghdr accrights... " >&6; } -if test "${ac_cv_have_struct_msghdr_acc+set}" = set; then +if ${ac_cv_have_struct_msghdr_acc+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -8284,58 +5416,31 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_struct_msghdr_acc="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_struct_msghdr_acc="no" - ac_cv_have_struct_msghdr_acc="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_msghdr_acc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_msghdr_acc" >&5 $as_echo "$ac_cv_have_struct_msghdr_acc" >&6; } if test "x$ac_cv_have_struct_msghdr_acc" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define ARCH_SCATTER_ACCRIGHTS 1 -_ACEOF +$as_echo "#define ARCH_SCATTER_ACCRIGHTS 1" >>confdefs.h have_scatter="yes" fi if test "x$have_scatter" = "xno" ; then - { $as_echo "$as_me:$LINENO: checking for struct msghdr control" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct msghdr control" >&5 $as_echo_n "checking for struct msghdr control... " >&6; } -if test "${ac_cv_have_struct_msghdr_ctl+set}" = set; then +if ${ac_cv_have_struct_msghdr_ctl+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -8347,65 +5452,36 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_struct_msghdr_ctl="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_struct_msghdr_ctl="no" - ac_cv_have_struct_msghdr_ctl="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_msghdr_ctl" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_msghdr_ctl" >&5 $as_echo "$ac_cv_have_struct_msghdr_ctl" >&6; } if test "x$ac_cv_have_struct_msghdr_ctl" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define ARCH_SCATTER_CONTROL 1 -_ACEOF +$as_echo "#define ARCH_SCATTER_CONTROL 1" >>confdefs.h have_scatter="yes" fi fi if test "x$have_scatter" = "xno" ; then - { { $as_echo "$as_me:$LINENO: error: *** cannot determine which scatter type to use ***" >&5 -$as_echo "$as_me: error: *** cannot determine which scatter type to use ***" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "*** cannot determine which scatter type to use ***" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: checking for u_int type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5 $as_echo_n "checking for u_int type... " >&6; } -if test "${ac_cv_have_u_int+set}" = set; then +if ${ac_cv_have_u_int+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -8416,58 +5492,31 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_u_int="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_u_int="no" - ac_cv_have_u_int="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_u_int" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int" >&5 $as_echo "$ac_cv_have_u_int" >&6; } if test "x$ac_cv_have_u_int" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_U_INT 1 -_ACEOF +$as_echo "#define HAVE_U_INT 1" >>confdefs.h have_u_int=1 fi -{ $as_echo "$as_me:$LINENO: checking for intXX_t types" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types" >&5 $as_echo_n "checking for intXX_t types... " >&6; } -if test "${ac_cv_have_intxx_t+set}" = set; then +if ${ac_cv_have_intxx_t+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -8478,58 +5527,31 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_intxx_t="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_intxx_t="no" - ac_cv_have_intxx_t="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_intxx_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_intxx_t" >&5 $as_echo "$ac_cv_have_intxx_t" >&6; } if test "x$ac_cv_have_intxx_t" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_INTXX_T 1 -_ACEOF +$as_echo "#define HAVE_INTXX_T 1" >>confdefs.h have_intxx_t=1 fi -{ $as_echo "$as_me:$LINENO: checking for int64_t type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t type" >&5 $as_echo_n "checking for int64_t type... " >&6; } -if test "${ac_cv_have_int64_t+set}" = set; then +if ${ac_cv_have_int64_t+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -8540,58 +5562,31 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_int64_t="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_int64_t="no" - ac_cv_have_int64_t="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_int64_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_int64_t" >&5 $as_echo "$ac_cv_have_int64_t" >&6; } if test "x$ac_cv_have_int64_t" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_INT64_T 1 -_ACEOF +$as_echo "#define HAVE_INT64_T 1" >>confdefs.h have_int64_t=1 fi -{ $as_echo "$as_me:$LINENO: checking for u_intXX_t types" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types" >&5 $as_echo_n "checking for u_intXX_t types... " >&6; } -if test "${ac_cv_have_u_intxx_t+set}" = set; then +if ${ac_cv_have_u_intxx_t+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -8602,58 +5597,31 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_u_intxx_t="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_u_intxx_t="no" - ac_cv_have_u_intxx_t="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_u_intxx_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_intxx_t" >&5 $as_echo "$ac_cv_have_u_intxx_t" >&6; } if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_U_INTXX_T 1 -_ACEOF +$as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h have_u_intxx_t=1 fi -{ $as_echo "$as_me:$LINENO: checking for u_int64_t types" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t types" >&5 $as_echo_n "checking for u_int64_t types... " >&6; } -if test "${ac_cv_have_u_int64_t+set}" = set; then +if ${ac_cv_have_u_int64_t+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -8664,43 +5632,20 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_u_int64_t="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_u_int64_t="no" - ac_cv_have_u_int64_t="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_u_int64_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int64_t" >&5 $as_echo "$ac_cv_have_u_int64_t" >&6; } if test "x$ac_cv_have_u_int64_t" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_U_INT64_T 1 -_ACEOF +$as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h have_u_int64_t=1 fi @@ -8708,13 +5653,9 @@ if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ test "x$ac_cv_header_sys_bitypes_h" = "xyes") then - { $as_echo "$as_me:$LINENO: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5 $as_echo_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8731,60 +5672,31 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : - cat >>confdefs.h <<\_ACEOF -#define HAVE_U_INTXX_T 1 -_ACEOF + $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h - cat >>confdefs.h <<\_ACEOF -#define HAVE_INTXX_T 1 -_ACEOF + $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test -z "$have_u_intxx_t" ; then - { $as_echo "$as_me:$LINENO: checking for uintXX_t types" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types" >&5 $as_echo_n "checking for uintXX_t types... " >&6; } -if test "${ac_cv_have_uintxx_t+set}" = set; then +if ${ac_cv_have_uintxx_t+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8797,58 +5709,31 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_uintxx_t="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_uintxx_t="no" - ac_cv_have_uintxx_t="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_uintxx_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_uintxx_t" >&5 $as_echo "$ac_cv_have_uintxx_t" >&6; } if test "x$ac_cv_have_uintxx_t" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_UINTXX_T 1 -_ACEOF +$as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h fi fi -{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 $as_echo_n "checking for socklen_t... " >&6; } -if test "${ac_cv_have_socklen_t+set}" = set; then +if ${ac_cv_have_socklen_t+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8862,57 +5747,30 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_socklen_t="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_socklen_t="no" - ac_cv_have_socklen_t="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_socklen_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_socklen_t" >&5 $as_echo "$ac_cv_have_socklen_t" >&6; } if test "x$ac_cv_have_socklen_t" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SOCKLEN_T 1 -_ACEOF +$as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size_t" >&5 $as_echo_n "checking for size_t... " >&6; } -if test "${ac_cv_have_size_t+set}" = set; then +if ${ac_cv_have_size_t+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8925,57 +5783,30 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_size_t="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_size_t="no" - ac_cv_have_size_t="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_size_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t" >&5 $as_echo "$ac_cv_have_size_t" >&6; } if test "x$ac_cv_have_size_t" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SIZE_T 1 -_ACEOF +$as_echo "#define HAVE_SIZE_T 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 $as_echo_n "checking for ssize_t... " >&6; } -if test "${ac_cv_have_ssize_t+set}" = set; then +if ${ac_cv_have_ssize_t+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -8988,57 +5819,30 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_ssize_t="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_ssize_t="no" - ac_cv_have_ssize_t="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_ssize_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ssize_t" >&5 $as_echo "$ac_cv_have_ssize_t" >&6; } if test "x$ac_cv_have_ssize_t" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SSIZE_T 1 -_ACEOF +$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for clock_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5 $as_echo_n "checking for clock_t... " >&6; } -if test "${ac_cv_have_clock_t+set}" = set; then +if ${ac_cv_have_clock_t+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9051,57 +5855,30 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_clock_t="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_clock_t="no" - ac_cv_have_clock_t="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_clock_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_clock_t" >&5 $as_echo "$ac_cv_have_clock_t" >&6; } if test "x$ac_cv_have_clock_t" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_CLOCK_T 1 -_ACEOF +$as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for sa_family_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5 $as_echo_n "checking for sa_family_t... " >&6; } -if test "${ac_cv_have_sa_family_t+set}" = set; then +if ${ac_cv_have_sa_family_t+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9115,34 +5892,10 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_sa_family_t="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9157,62 +5910,34 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_sa_family_t="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_sa_family_t="no" - ac_cv_have_sa_family_t="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_sa_family_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sa_family_t" >&5 $as_echo "$ac_cv_have_sa_family_t" >&6; } if test "x$ac_cv_have_sa_family_t" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SA_FAMILY_T 1 -_ACEOF +$as_echo "#define HAVE_SA_FAMILY_T 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5 $as_echo_n "checking for struct sockaddr_storage... " >&6; } -if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then +if ${ac_cv_have_struct_sockaddr_storage+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9226,57 +5951,30 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_struct_sockaddr_storage="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_struct_sockaddr_storage="no" - ac_cv_have_struct_sockaddr_storage="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_storage" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_storage" >&5 $as_echo "$ac_cv_have_struct_sockaddr_storage" >&6; } if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 -_ACEOF +$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5 $as_echo_n "checking for struct sockaddr_in6... " >&6; } -if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then +if ${ac_cv_have_struct_sockaddr_in6+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9290,57 +5988,30 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_struct_sockaddr_in6="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_struct_sockaddr_in6="no" - ac_cv_have_struct_sockaddr_in6="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_in6" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_in6" >&5 $as_echo "$ac_cv_have_struct_sockaddr_in6" >&6; } if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_SOCKADDR_IN6 1 -_ACEOF +$as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for struct in6_addr" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct in6_addr" >&5 $as_echo_n "checking for struct in6_addr... " >&6; } -if test "${ac_cv_have_struct_in6_addr+set}" = set; then +if ${ac_cv_have_struct_in6_addr+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9354,57 +6025,30 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_struct_in6_addr="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_struct_in6_addr="no" - ac_cv_have_struct_in6_addr="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_in6_addr" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_in6_addr" >&5 $as_echo "$ac_cv_have_struct_in6_addr" >&6; } if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_IN6_ADDR 1 -_ACEOF +$as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for struct addrinfo" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5 $as_echo_n "checking for struct addrinfo... " >&6; } -if test "${ac_cv_have_struct_addrinfo+set}" = set; then +if ${ac_cv_have_struct_addrinfo+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9419,57 +6063,30 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_struct_addrinfo="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_struct_addrinfo="no" - ac_cv_have_struct_addrinfo="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_addrinfo" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_addrinfo" >&5 $as_echo "$ac_cv_have_struct_addrinfo" >&6; } if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_ADDRINFO 1 -_ACEOF +$as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for struct timeval" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 $as_echo_n "checking for struct timeval... " >&6; } -if test "${ac_cv_have_struct_timeval+set}" = set; then +if ${ac_cv_have_struct_timeval+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -9480,58 +6097,31 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_struct_timeval="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_struct_timeval="no" - ac_cv_have_struct_timeval="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_struct_timeval" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_timeval" >&5 $as_echo "$ac_cv_have_struct_timeval" >&6; } if test "x$ac_cv_have_struct_timeval" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_TIMEVAL 1 -_ACEOF +$as_echo "#define HAVE_STRUCT_TIMEVAL 1" >>confdefs.h have_struct_timeval=1 fi -{ $as_echo "$as_me:$LINENO: checking for sun_len field in struct sockaddr_un" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sun_len field in struct sockaddr_un" >&5 $as_echo_n "checking for sun_len field in struct sockaddr_un... " >&6; } -if test "${ac_cv_have_sun_len_in_struct_sockaddr_un+set}" = set; then +if ${ac_cv_have_sun_len_in_struct_sockaddr_un+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9545,56 +6135,29 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_sun_len_in_struct_sockaddr_un="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_sun_len_in_struct_sockaddr_un="no" + ac_cv_have_sun_len_in_struct_sockaddr_un="no" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_sun_len_in_struct_sockaddr_un" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sun_len_in_struct_sockaddr_un" >&5 $as_echo "$ac_cv_have_sun_len_in_struct_sockaddr_un" >&6; } if test "x$ac_cv_have_sun_len_in_struct_sockaddr_un" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SUN_LEN_IN_SOCKADDR_UN 1 -_ACEOF +$as_echo "#define HAVE_SUN_LEN_IN_SOCKADDR_UN 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for sin_len field in sockaddr_in" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin_len field in sockaddr_in" >&5 $as_echo_n "checking for sin_len field in sockaddr_in... " >&6; } -if test "${ac_cv_have_sin_len_in_struct_sockaddr_in+set}" = set; then +if ${ac_cv_have_sin_len_in_struct_sockaddr_in+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9609,56 +6172,29 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_sin_len_in_struct_sockaddr_in="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_sin_len_in_struct_sockaddr_in="no" + ac_cv_have_sin_len_in_struct_sockaddr_in="no" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_sin_len_in_struct_sockaddr_in" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sin_len_in_struct_sockaddr_in" >&5 $as_echo "$ac_cv_have_sin_len_in_struct_sockaddr_in" >&6; } if test x"$ac_cv_have_sin_len_in_struct_sockaddr_in" = "xyes"; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SIN_LEN_IN_SOCKADDR_IN 1 -_ACEOF +$as_echo "#define HAVE_SIN_LEN_IN_SOCKADDR_IN 1 " >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for ss_family field in struct sockaddr_storage" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ss_family field in struct sockaddr_storage" >&5 $as_echo_n "checking for ss_family field in struct sockaddr_storage... " >&6; } -if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then +if ${ac_cv_have_ss_family_in_struct_ss+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9672,56 +6208,29 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_ss_family_in_struct_ss="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_ss_family_in_struct_ss="no" + ac_cv_have_ss_family_in_struct_ss="no" fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_ss_family_in_struct_ss" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ss_family_in_struct_ss" >&5 $as_echo "$ac_cv_have_ss_family_in_struct_ss" >&6; } if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SS_FAMILY_IN_SS 1 -_ACEOF +$as_echo "#define HAVE_SS_FAMILY_IN_SS 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for __ss_family field in struct sockaddr_storage" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __ss_family field in struct sockaddr_storage" >&5 $as_echo_n "checking for __ss_family field in struct sockaddr_storage... " >&6; } -if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then +if ${ac_cv_have___ss_family_in_struct_ss+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9735,57 +6244,30 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have___ss_family_in_struct_ss="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have___ss_family_in_struct_ss="no" - ac_cv_have___ss_family_in_struct_ss="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have___ss_family_in_struct_ss" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___ss_family_in_struct_ss" >&5 $as_echo "$ac_cv_have___ss_family_in_struct_ss" >&6; } if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE___SS_FAMILY_IN_SS 1 -_ACEOF +$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pid_t" >&5 $as_echo_n "checking for pid_t... " >&6; } -if test "${ac_cv_have_pid_t+set}" = set; then +if ${ac_cv_have_pid_t+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -9798,57 +6280,30 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_have_pid_t="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_have_pid_t="no" - ac_cv_have_pid_t="no" - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_pid_t" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pid_t" >&5 $as_echo "$ac_cv_have_pid_t" >&6; } if test "x$ac_cv_have_pid_t" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_PID_T 1 -_ACEOF +$as_echo "#define HAVE_PID_T 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking if libc defines __progname" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines __progname" >&5 $as_echo_n "checking if libc defines __progname... " >&6; } -if test "${ac_cv_libc_defines___progname+set}" = set; then +if ${ac_cv_libc_defines___progname+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9859,63 +6314,32 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_libc_defines___progname="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_libc_defines___progname="no" - ac_cv_libc_defines___progname="no" - fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_libc_defines___progname" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines___progname" >&5 $as_echo "$ac_cv_libc_defines___progname" >&6; } if test "x$ac_cv_libc_defines___progname" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE___PROGNAME 1 -_ACEOF +$as_echo "#define HAVE___PROGNAME 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking if libc defines sys_errlist" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_errlist" >&5 $as_echo_n "checking if libc defines sys_errlist... " >&6; } -if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then +if ${ac_cv_libc_defines_sys_errlist+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9926,63 +6350,32 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_libc_defines_sys_errlist="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_libc_defines_sys_errlist="no" - ac_cv_libc_defines_sys_errlist="no" - fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_errlist" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_errlist" >&5 $as_echo "$ac_cv_libc_defines_sys_errlist" >&6; } if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_ERRLIST 1 -_ACEOF +$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h fi -{ $as_echo "$as_me:$LINENO: checking if libc defines sys_nerr" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_nerr" >&5 $as_echo_n "checking if libc defines sys_nerr... " >&6; } -if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then +if ${ac_cv_libc_defines_sys_nerr+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9993,48 +6386,21 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_libc_defines_sys_nerr="yes" else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_libc_defines_sys_nerr="no" - ac_cv_libc_defines_sys_nerr="no" - fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_nerr" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_nerr" >&5 $as_echo "$ac_cv_libc_defines_sys_nerr" >&6; } if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_NERR 1 -_ACEOF +$as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h fi @@ -10042,16 +6408,14 @@ # Check whether --with-catman was given. -if test "${with_catman+set}" = set; then +if test "${with_catman+set}" = set; then : withval=$with_catman; case "$withval" in man|cat|doc) MANTYPE=$withval ;; *) - { { $as_echo "$as_me:$LINENO: error: invalid man type: $withval" >&5 -$as_echo "$as_me: error: invalid man type: $withval" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "invalid man type: $withval" "$LINENO" 5 ;; esac @@ -10063,9 +6427,9 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $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_NROFF+set}" = set; then +if ${ac_cv_path_NROFF+:} false; then : $as_echo_n "(cached) " >&6 else case $NROFF in @@ -10079,14 +6443,14 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -10094,10 +6458,10 @@ fi NROFF=$ac_cv_path_NROFF if test -n "$NROFF"; then - { $as_echo "$as_me:$LINENO: result: $NROFF" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5 $as_echo "$NROFF" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -10125,7 +6489,7 @@ # autoconf does not have docdir option, so add one # Check whether --with-docdir was given. -if test "${with_docdir+set}" = set; then +if test "${with_docdir+set}" = set; then : withval=$with_docdir; if test "x$withval" = xyes || test "x$withval" = xno; then docdir='${datadir}/doc/libspread-util' @@ -10144,31 +6508,27 @@ # feature enable to turn on threaded alarm processing # Check whether --enable-threaded-alarm was given. -if test "${enable_threaded_alarm+set}" = set; then +if test "${enable_threaded_alarm+set}" = set; then : enableval=$enable_threaded_alarm; fi if test "x$enable_threaded_alarm" = "xyes" ; then -cat >>confdefs.h <<\_ACEOF -#define USE_THREADED_ALARM 1 -_ACEOF +$as_echo "#define USE_THREADED_ALARM 1" >>confdefs.h fi # control whether dladdr is used to lookup function names. Default is to use it. # Check whether --enable-function-name-lookup was given. -if test "${enable_function_name_lookup+set}" = set; then +if test "${enable_function_name_lookup+set}" = set; then : enableval=$enable_function_name_lookup; fi if test "x$enable_function_name_lookup" = "xno" ; then -cat >>confdefs.h <<\_ACEOF -#define DISABLE_FUNCTION_NAME_LOOKUP 1 -_ACEOF +$as_echo "#define DISABLE_FUNCTION_NAME_LOOKUP 1" >>confdefs.h fi @@ -10179,8 +6539,6 @@ - - LIBSPSO=none case "$host" in *-*-darwin*) @@ -10268,13 +6626,13 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -10282,8 +6640,8 @@ (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -10305,12 +6663,23 @@ :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" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 + 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:$LINENO: not updating unwritable cache $cache_file" >&5 + { $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;} fi fi @@ -10324,14 +6693,15 @@ ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -10339,13 +6709,15 @@ -: ${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" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -10355,17 +6727,18 @@ debug=false ac_cs_recheck=false ac_cs_silent=false + SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -10373,23 +6746,15 @@ alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -10397,7 +6762,13 @@ as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -10408,7 +6779,7 @@ as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -10431,14 +6802,7 @@ } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. @@ -10447,15 +6811,16 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -10467,12 +6832,16 @@ fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -10484,7 +6853,89 @@ LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -10498,8 +6949,12 @@ as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -10519,76 +6974,25 @@ } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -10603,50 +7007,86 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -10655,13 +7095,19 @@ exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Spread_Util $as_me 4.3.0, which was -generated by GNU Autoconf 2.62. Invocation command line was +This file was extended by Spread_Util $as_me 5.0.0, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -10674,6 +7120,15 @@ _ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" @@ -10683,19 +7138,22 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] + --file=FILE[:TEMPLATE] instantiate the configuration file FILE - --header=FILE[:TEMPLATE] + --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: @@ -10704,16 +7162,17 @@ Configuration headers: $config_headers -Report bugs to ." +Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -Spread_Util config.status 4.3.0 -configured by $0, generated by GNU Autoconf 2.62, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +Spread_Util config.status 5.0.0 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -10729,11 +7188,16 @@ while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -10747,27 +7211,29 @@ ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -10775,11 +7241,10 @@ ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -10796,7 +7261,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -10831,9 +7296,7 @@ "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -10855,26 +7318,24 @@ # 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 '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { 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_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || 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. @@ -10882,8 +7343,13 @@ if test -n "$CONFIG_FILES"; then -ac_cr=' -' +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' @@ -10891,7 +7357,7 @@ ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -10900,23 +7366,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -10924,7 +7385,7 @@ 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 @@ -10938,7 +7399,7 @@ t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -10952,7 +7413,7 @@ t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -10972,7 +7433,7 @@ 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 = "" @@ -11004,23 +7465,29 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -11032,7 +7499,7 @@ # 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 @@ -11044,13 +7511,11 @@ # 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_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -11116,9 +7581,9 @@ } split(mac1, mac2, "(") #) macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". - prefix = substr(line, 1, index(line, defundef) - 1) print prefix "define", macro P[macro] D[macro] next } else { @@ -11126,7 +7591,7 @@ # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { - print "/*", line, "*/" + print "/*", prefix defundef, macro, "*/" next } } @@ -11135,9 +7600,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -11150,9 +7613,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -11171,7 +7632,7 @@ 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 `:'. @@ -11180,12 +7641,10 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + 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 - ac_file_inputs="$ac_file_inputs '$ac_f'" + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -11196,7 +7655,7 @@ `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. @@ -11208,10 +7667,8 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -11239,47 +7696,7 @@ q } s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in @@ -11331,7 +7748,6 @@ # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - ac_sed_dataroot=' /datarootdir/ { p @@ -11341,12 +7757,11 @@ /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' +/@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -11356,7 +7771,7 @@ s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -11383,27 +7798,24 @@ 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_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } +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"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 + { 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;} +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_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -11412,27 +7824,21 @@ if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 + && 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" "$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" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + 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" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; @@ -11442,15 +7848,12 @@ done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -11471,11 +7874,11 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi Modified: libspreadutil/trunk/configure.in =================================================================== --- libspreadutil/trunk/configure.in 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/configure.in 2018-08-20 21:16:48 UTC (rev 906) @@ -1,4 +1,4 @@ -AC_INIT(Spread_Util, 4.3.0) +AC_INIT(Spread_Util, 5.0.0) AC_CONFIG_AUX_DIR(buildtools) AC_CONFIG_HEADERS(src/config.h) @@ -101,7 +101,7 @@ AC_FUNC_STRFTIME # Checks for header files. -AC_CHECK_HEADERS(arpa/inet.h assert.h errno.h grp.h limits.h netdb.h netinet/in.h netinet/tcp.h process.h pthread.h pwd.h signal.h stdarg.h stdint.h stdio.h stdlib.h string.h sys/inttypes.h sys/ioctl.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/timeb.h sys/types.h sys/uio.h sys/un.h sys/filio.h time.h unistd.h windows.h winsock.h) +AC_CHECK_HEADERS(arpa/inet.h assert.h errno.h grp.h limits.h netdb.h netinet/in.h netinet/tcp.h process.h pthread.h pwd.h signal.h stdarg.h stdint.h stdio.h stdlib.h string.h sys/inttypes.h sys/ioctl.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/timeb.h sys/types.h sys/uio.h sys/un.h sys/filio.h time.h unistd.h winsock2.h ws2tcpip.h) dnl Checks for library functions. AC_CHECK_FUNCS(bcopy inet_aton inet_ntoa inet_ntop memmove setsid snprintf strerror lrand48) @@ -218,7 +218,7 @@ AC_TRY_COMPILE( [ #include #include ], - [ static struct msghdr msg; msg.msg_namelen = 1; ], + [ static struct msghdr msg; msg.msg_name = 0; msg.msg_namelen = 1; msg.msg_iov = 0; msg.msg_iovlen = 0; ], [ ac_cv_have_struct_msghdr="yes" ], [ ac_cv_have_struct_msghdr="no" ] ) Modified: libspreadutil/trunk/docs/Readme.txt =================================================================== --- libspreadutil/trunk/docs/Readme.txt 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/docs/Readme.txt 2018-08-20 21:16:48 UTC (rev 906) @@ -3,7 +3,7 @@ /===========================================================================\ | The Spread Group Communication Toolkit Utility Library | -| Copyright (c) 1993-2012 Spread Concepts LLC | +| Copyright (c) 1993-2016 Spread Concepts LLC | | All rights reserved. | | | | The Spread package is licensed under the Spread Open-Source License. | @@ -48,9 +48,27 @@ | WWW : http://www.spread.org and http://www.spreadconcepts.com | | Contact: info at spreadconcepts.com | | | -| Version 4.2.0 built 05/March/2012 | +| Version 5.0.0 built 1/Feb/2017 | \===========================================================================/ +February 1, 2017 Ver 5.0.0 +-------------------------- + +No changes versus 5.0.0 RC2. + +January 23, 2017 Ver 5.0.0 RC2 +------------------------------ + +Exported E_get_time_monotonic(). + +November 22, 2016 Ver 5.0.0 RC1 +------------------------------- + +This version adds IPv6 support to the library. The main changes are +data_link.c and the addition of spu_addr.[ch], which is a variadic +structure (union) that is a wrapper around the various sockaddr types. +Its purpose is to make handling different kinds of addresses easier. + March 05, 2012 Ver 4.2.0 ----------------------------- This is the first release of the Spread Utility Library which consists of Modified: libspreadutil/trunk/docs/license.txt =================================================================== --- libspreadutil/trunk/docs/license.txt 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/docs/license.txt 2018-08-20 21:16:48 UTC (rev 906) @@ -1,6 +1,6 @@ Spread Open-Source License -- Version 1.0 ----------------------------------------- -Copyright (c) 1993-2006 Spread Concepts LLC. All rights reserved. +Copyright (c) 1993-2016 Spread Concepts LLC. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are Copied: libspreadutil/trunk/include/spu_addr.h (from rev 905, libspreadutil/tags/5.0.1/include/spu_addr.h) =================================================================== --- libspreadutil/trunk/include/spu_addr.h (rev 0) +++ libspreadutil/trunk/include/spu_addr.h 2018-08-20 21:16:48 UTC (rev 906) @@ -0,0 +1,107 @@ +/* + * The Spread Toolkit. + * + * The contents of this file are subject to the Spread Open-Source + * License, Version 1.0 (the ``License''); you may not use + * this file except in compliance with the License. You may obtain a + * copy of the License at: + * + * http://www.spread.org/license/ + * + * or in the file ``license.txt'' found in this distribution. + * + * Software distributed under the License is distributed on an AS IS basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Creators of Spread are: + * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. + * + * Copyright (C) 1993-2016 Spread Concepts LLC + * + * All Rights Reserved. + * + * Major Contributor(s): + * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. + * Ryan Caudy rcaudy at gmail.com - contributions to process groups. + * Claudiu Danilov claudiu at acm.org - scalable wide area support. + * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. + * Theo Schlossnagle jesus at omniti.com - Perl, autoconf, old skiplist. + * Dan Schoenblum dansch at cnds.jhu.edu - Java interface. + * + */ + +#ifndef INC_SPU_ADDR_H +#define INC_SPU_ADDR_H + +#include "spu_system.h" + +#include + +#ifdef SPU_ARCH_PC_WIN95 +# include +# include +#else +# include +# include +# include +# include +#endif + +#define SPU_ADDR_STRSIZE 256 +#define SPU_ADDR_IP_STRSIZE 46 + +/* NOTE: these macros return the same global buffer, so you typically can't call this fcn multiple times in a single statement (e.g. - in a fcn parameter list) */ + +#define SPU_ADDR_NTOP(a) (spu_addr_ntop_r((a), Spu_addr_ntop_buf, SPU_ADDR_STRSIZE) ? "address conversion failed" : Spu_addr_ntop_buf) +#define SPU_ADDR_NTOP_CANON(a) (spu_addr_ntop_canon_r((a), Spu_addr_ntop_buf, SPU_ADDR_STRSIZE) ? "address conversion failed" : Spu_addr_ntop_buf) + +extern char Spu_addr_ntop_buf[SPU_ADDR_STRSIZE]; + +typedef union +{ + int dmy_init; /* NOTE: Only use this for static initialization! It *DOES NOT* map to sa_family, sin_family, etc.! */ + struct sockaddr addr; + struct sockaddr_in ipv4; + struct sockaddr_in6 ipv6; + struct sockaddr_storage storage; + +#ifndef SPU_ARCH_PC_WIN95 + struct sockaddr_un un; +#endif + +} spu_addr; + +int spu_addr_from_sockaddr(spu_addr *a, const struct sockaddr *sa, socklen_t sa_len); +int spu_addr_from_str(spu_addr *a, const char *str, int pfamily, int is_numeric); + +int spu_addr_family(const spu_addr *a); + +int spu_addr_ntop_r(const spu_addr *a, char *str, size_t n); +int spu_addr_ntop_canon_r(const spu_addr *a, char *str, size_t n); + +/* NOTE: the following functions are only valid for families: AF_UNSPEC (0), AF_INET, AF_INET6 and AF_UNIX; will exit on other types */ + +int spu_addr_from_sockaddr_known(spu_addr *a, const struct sockaddr *sa); +socklen_t spu_addr_len(const spu_addr *a); +const char *spu_addr_family_str(const spu_addr *a); + +const char *spu_af_str(int afamily); + +/* NOTE: the following functions are only valid for AF_INET and AF_INET6; will exit on other types */ + +int spu_addr_ip_cmp(const spu_addr *l, const spu_addr *r, int include_port); /* NOTE: only compares address + optionally port */ +int spu_addr_ip_is_unspecified(const spu_addr *a); +int spu_addr_ip_is_loopback(const spu_addr *a); +int spu_addr_ip_is_multicast(const spu_addr *a); +int spu_addr_ip_is_linklocal(const spu_addr *a); +int spu_addr_ip_is_sitelocal(const spu_addr *a); + +void spu_addr_ip_set_unspecified(spu_addr *a); /* sets address to be unspecified (e.g. - INADDR_ANY); no other fields (e.g. - port) are affected */ + +int16u spu_addr_ip_get_port(const spu_addr *a); /* NOTE: host byte order */ +void spu_addr_ip_set_port(spu_addr *a, int16u port); /* NOTE: host byte order */ + +#endif Modified: libspreadutil/trunk/include/spu_alarm.h =================================================================== --- libspreadutil/trunk/include/spu_alarm.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/include/spu_alarm.h 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2013 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. @@ -32,24 +33,51 @@ * */ - #ifndef INC_ALARM #define INC_ALARM #include #include "spu_system.h" +/* SPCLAMP can be useful with snprintfs: + { + char msg[10], *c = msg, *e = msg + sizeof(msg); + + c += snprintf(c, SPCLAMP(c, e), "hello world!\n"); + c += snprintf(c, SPCLAMP(c, e), "neato!\n"); + c += snprintf(c, SPCLAMP(c, e), "how many we doing?!\n"); + and so on ... + + when done, if you care, check if you overfilled (but not + overran!) your nul terminated buffer (termination guaranteed so + long as c < e initially): + + if (c > e) + do stuff; + + (c - msg) is how many characters you tried to write + } + + Note, this isn't 100% standards compliant bc pointer arithmetic and + comparison beyond the end of an array isn't guaranteed to be + meaningful and valid, but it will work on most sane architectures. + */ +#define SPCLAMP(x, y) ((x) < (y) ? (y) - (x) : 0) + /* Type for Alarm realtime handler functions */ typedef int (alarm_realtime_handler)( int16, int32, char *, size_t, char *, size_t); +/* These are always defined for any project using this library */ +#define ALL 0xffffffff +#define EXIT 0x00000001 /* Program will print then exit() or abort() */ +#define DATA_LINK 0x00000002 +#define MEMORY 0x00000004 +#define EVENTS 0x00000008 +#define NONE 0x00000000 /* This includes the custom types for each project */ #include "spu_alarm_types.h" -/* These are always defined for any project using Alarm */ -#define ALL 0xffffffff -#define NONE 0x00000000 - /* Priority levels */ #define SPLOG_DEBUG 0x0001 /* Program information that is only useful for debugging. Will normally be turned off in operation. */ @@ -60,9 +88,9 @@ #define SPLOG_ERROR 0x0004 /* Program encountered an error that can be recovered from. */ #define SPLOG_CRITICAL 0x0005 /* Program will not exit, but has only temporarily recovered and without help may soon fail. */ -#define SPLOG_FATAL 0x0006 /* Program will exit() or abort(). */ +#define SPLOG_PRINT 0x0006 /* Program will always print, regardless of mask */ +#define SPLOG_FATAL 0x0007 /* Program will always print, regardless of mask, then exit() or abort(). */ -#define SPLOG_PRINT 0x0007 /* Program should always print this information */ #define SPLOG_PRIORITY_FIELDS 0x000f @@ -72,31 +100,36 @@ This is used for alerts you want sent now and not just logged (they are also logged). */ #define SPLOG_PRIORITY_FLAGS 0x00f0 -#ifdef HAVE_GOOD_VARGS -void Alarmp( int16 priority, int32 type, char *message, ...); -void Alarm( int32 type, char *message, ...); +/* Can be used to conditionally skip calls to Alarmp (e.g. - expensive parameter evaluation, repeatedly called, etc.) */ -#else -void Alarm(); -#endif +#define ALARMP_NEEDED(p, m) ( \ + ( (m) & EXIT ) || \ + ( ( (p) & SPLOG_PRIORITY_FIELDS ) >= SPLOG_PRINT ) || \ + ( ( (p) & SPLOG_PRIORITY_FIELDS ) >= Alarm_cur_priority && ( (m) & Alarm_type_mask ) ) ) -void Alarm_set_output(char *filename); +extern int32u Alarm_type_mask; +extern int16u Alarm_cur_priority; -void Alarm_enable_timestamp(const char *format); -void Alarm_enable_timestamp_high_res(const char *format); -void Alarm_disable_timestamp(void); +void Alarmp(int16 priority, int32 type, char *message, ...); +void Alarm(int32 type, char *message, ...); -void Alarm_set_types(int32 mask); -void Alarm_clear_types(int32 mask); +void Alarm_set_output(char *filename); + +void Alarm_enable_timestamp(const char *format); +void Alarm_enable_timestamp_high_res(const char *format); +void Alarm_disable_timestamp(void); + +void Alarm_set_types(int32 mask); +void Alarm_clear_types(int32 mask); int32 Alarm_get_types(void); -void Alarm_set_priority(int16 priority); +void Alarm_set_priority(int16 priority); int16 Alarm_get_priority(void); -void Alarm_set_realtime_print_handler( alarm_realtime_handler *output_message_function ); +void Alarm_set_realtime_print_handler( alarm_realtime_handler *output_message_function ); -void Alarm_set_interactive(void); -int Alarm_get_interactive(void); +void Alarm_set_interactive(void); +int Alarm_get_interactive(void); #define IPF "%d.%d.%d.%d" Modified: libspreadutil/trunk/include/spu_alarm_types.h =================================================================== --- libspreadutil/trunk/include/spu_alarm_types.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/include/spu_alarm_types.h 2018-08-20 21:16:48 UTC (rev 906) @@ -18,26 +18,19 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2006 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. + * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. * Theo Schlossnagle jesus at omniti.com - Perl, autoconf, old skiplist. * Dan Schoenblum dansch at cnds.jhu.edu - Java interface. * - * - * This file is also licensed by Spread Concepts LLC under the Spines - * Open-Source License, version 1.0. You may obtain a copy of the - * Spines Open-Source License, version 1.0 at: - * - * http://www.spines.org/LICENSE.txt - * - * or in the file ``LICENSE.txt'' found in this distribution. - * */ @@ -49,13 +42,9 @@ * The defines must be consistent amoung all code that will be compiled together, * but can be different for different executables */ -#define DEBUG 0x00000001 -#define EXIT 0x00000002 -#define PRINT 0x00000004 -/* new type to replace general prints */ -#define SYSTEM 0x00000004 +#define PRINT 0x00000010 +#define SYSTEM 0x00000010 /* NOTE: same as PRINT */ -#define DATA_LINK 0x00000010 #define NETWORK 0x00000020 #define PROTOCOL 0x00000040 #define SESSION 0x00000080 @@ -63,12 +52,11 @@ #define MEMB 0x00000200 #define FLOW_CONTROL 0x00000400 #define STATUS 0x00000800 -#define EVENTS 0x00001000 +#define DEBUG 0x00001000 #define GROUPS 0x00002000 #define HOP 0x00004000 #define OBJ_HANDLER 0x00008000 -#define MEMORY 0x00010000 #define ROUTE 0x00020000 #define QOS 0x00040000 #define RING 0x00080000 Deleted: libspreadutil/trunk/include/spu_compatibility.h =================================================================== --- libspreadutil/trunk/include/spu_compatibility.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/include/spu_compatibility.h 2018-08-20 21:16:48 UTC (rev 906) @@ -1,58 +0,0 @@ -/* - * The Spread Toolkit. - * - * The contents of this file are subject to the Spread Open-Source - * License, Version 1.0 (the ``License''); you may not use - * this file except in compliance with the License. You may obtain a - * copy of the License at: - * - * http://www.spread.org/license/ - * - * or in the file ``license.txt'' found in this distribution. - * - * Software distributed under the License is distributed on an AS IS basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Creators of Spread are: - * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. - * - * Copyright (C) 1993-2013 Spread Concepts LLC - * - * All Rights Reserved. - * - * Major Contributor(s): - * --------------- - * Ryan Caudy rcaudy at gmail.com - contributions to process groups. - * Claudiu Danilov claudiu at acm.org - scalable wide area support. - * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. - * Theo Schlossnagle jesus at omniti.com - Perl, autoconf, old skiplist. - * Dan Schoenblum dansch at cnds.jhu.edu - Java interface. - * - */ - - -/* spu_compatibility.h - * backwards compatible declarations of API functions - * Copyright 2012 Jonathan Stanton - * - */ - -#ifndef SPU_COMPATIBILITY_H -#define SPU_COMPATIBILITY_H - - -/* If we need the old API for these sets of functions - * enable this and the old API names will work and map to the new functions - */ -#ifdef SPU_ENABLE_OLD_API - -#define Alarm SPU_Alarm -#define Alarmp SPU_Alarmp - -#endif - -#endif /* SPU_COMPATIBILITY_H */ - - Modified: libspreadutil/trunk/include/spu_data_link.h =================================================================== --- libspreadutil/trunk/include/spu_data_link.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/include/spu_data_link.h 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2013 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. @@ -38,8 +39,9 @@ #include "spu_system.h" #include "spu_scatter.h" +#include "spu_addr.h" -#define MAX_PACKET_SIZE 1472 /*1472 = 1536-64 (of udp)*/ +#define MAX_PACKET_SIZE 1472 /* 1472 = 1536 - 64 (of typical udp/ip/eth headers) */ #define SEND_CHANNEL 0x00000001 #define RECV_CHANNEL 0x00000002 @@ -47,13 +49,21 @@ #define REUSE_ADDR 0x00000008 #define DL_BIND_ALL 0x00000010 -#define IS_MCAST_ADDR(addr) ( ( (addr) & 0xF0000000 ) == 0xE0000000 ) -#define IS_MCAST_ADDR_NET(addr) ( ( (unsigned char*) &(addr) )[0] == 0xE0 ) +#define IS_MCAST_ADDR(addr32) ( ( (addr32) & 0xF0000000 ) == 0xE0000000 ) /* host byte order */ +#define IS_MCAST_ADDR_NET(addr32) ( ( (unsigned char*) &(addr32) )[0] == 0xE0 ) /* network byte order */ +void DL_close_channel(channel chan); + channel DL_init_channel( int32 channel_type, int16 port, int32 mcast_address, int32 interface_address ); -void DL_close_channel(channel chan); -int DL_send( channel chan, int32 address, int16 port, sys_scatter *scat ); +int DL_send( channel chan, int32 address, int16 port, const sys_scatter *scat ); int DL_recv( channel chan, sys_scatter *scat ); int DL_recvfrom( channel chan, sys_scatter *scat, int *src_address, unsigned short *src_port ); -#endif /* INC_DATA_LINK */ +channel DL_init_channel_gen(int32 channel_type, const spu_addr *mcast_address, const spu_addr *interface_address); +int DL_join_multicast_gen(channel chan, const spu_addr *mcast_addr, const spu_addr *if_addr); +int DL_send_gen(channel chan, const sys_scatter *scat); +int DL_recv_gen(channel chan, sys_scatter *scat); +int DL_sendto_gen(channel chan, const sys_scatter *scat, const spu_addr *dst); +int DL_recvfrom_gen(channel chan, sys_scatter *scat, spu_addr *src); + +#endif Modified: libspreadutil/trunk/include/spu_events.h =================================================================== --- libspreadutil/trunk/include/spu_events.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/include/spu_events.h 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2013 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. @@ -32,11 +33,15 @@ * */ - - #ifndef INC_SP_EVENTS #define INC_SP_EVENTS +#include + +#ifndef NULL +# define NULL ((void*) 0) +#endif + /* Raise this number AND RECOMPILE events.c to handle more active FD's. * This number limits the number of connections that * can be handled. @@ -61,20 +66,22 @@ long usec; } sp_time; -#ifndef NULL -#define NULL (void *)0 -#endif - /* Event routines */ int E_init(void); + sp_time E_get_time(void); +sp_time E_get_time_monotonic(void); + +sp_time E_neg_time( sp_time t ); +sp_time E_add_time( sp_time t, sp_time delta_t ); sp_time E_sub_time( sp_time t, sp_time delta_t ); -sp_time E_add_time( sp_time t, sp_time delta_t ); + /* if t1 > t2 then returns 1; if t1 < t2 then returns -1; if t1 == t2 then returns 0; */ int E_compare_time( sp_time t1, sp_time t2 ); + int E_queue( void (* func)( int code, void *data ), int code, void *data, sp_time delta_time ); int E_in_queue( void (* func)( int code, void *data ), int code, @@ -83,6 +90,7 @@ *data pointer */ int E_dequeue( void (* func)( int code, void *data ), int code, void *data ); + void E_delay( sp_time t ); int E_attach_fd( int fd, int fd_type, Modified: libspreadutil/trunk/include/spu_memory.h =================================================================== --- libspreadutil/trunk/include/spu_memory.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/include/spu_memory.h 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2013 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. Modified: libspreadutil/trunk/include/spu_objects.h =================================================================== --- libspreadutil/trunk/include/spu_objects.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/include/spu_objects.h 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2013 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. Modified: libspreadutil/trunk/include/spu_objects_local.h =================================================================== --- libspreadutil/trunk/include/spu_objects_local.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/include/spu_objects_local.h 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2009 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. @@ -56,5 +57,3 @@ /* Highest valid object number is defined in objects.h as UNKNOWN_OBJ */ #endif /* OBJECTS_LOCAL_H */ - - Modified: libspreadutil/trunk/include/spu_scatter.h =================================================================== --- libspreadutil/trunk/include/spu_scatter.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/include/spu_scatter.h 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2013 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. Modified: libspreadutil/trunk/include/spu_system_defs.h =================================================================== --- libspreadutil/trunk/include/spu_system_defs.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/include/spu_system_defs.h 2018-08-20 21:16:48 UTC (rev 906) @@ -1,3 +1,37 @@ +/* + * The Spread Toolkit. + * + * The contents of this file are subject to the Spread Open-Source + * License, Version 1.0 (the ``License''); you may not use + * this file except in compliance with the License. You may obtain a + * copy of the License at: + * + * http://www.spread.org/license/ + * + * or in the file ``license.txt'' found in this distribution. + * + * Software distributed under the License is distributed on an AS IS basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Creators of Spread are: + * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. + * + * Copyright (C) 1993-2016 Spread Concepts LLC + * + * All Rights Reserved. + * + * Major Contributor(s): + * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. + * Ryan Caudy rcaudy at gmail.com - contributions to process groups. + * Claudiu Danilov claudiu at acm.org - scalable wide area support. + * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. + * Theo Schlossnagle jesus at omniti.com - Perl, autoconf, old skiplist. + * Dan Schoenblum dansch at cnds.jhu.edu - Java interface. + * + */ #ifndef SYSTEM_DEFS_H #define SYSTEM_DEFS_H Modified: libspreadutil/trunk/include/spu_system_defs_autoconf.h =================================================================== --- libspreadutil/trunk/include/spu_system_defs_autoconf.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/include/spu_system_defs_autoconf.h 2018-08-20 21:16:48 UTC (rev 906) @@ -1,3 +1,38 @@ +/* + * The Spread Toolkit. + * + * The contents of this file are subject to the Spread Open-Source + * License, Version 1.0 (the ``License''); you may not use + * this file except in compliance with the License. You may obtain a + * copy of the License at: + * + * http://www.spread.org/license/ + * + * or in the file ``license.txt'' found in this distribution. + * + * Software distributed under the License is distributed on an AS IS basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Creators of Spread are: + * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. + * + * Copyright (C) 1993-2016 Spread Concepts LLC + * + * All Rights Reserved. + * + * Major Contributor(s): + * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. + * Ryan Caudy rcaudy at gmail.com - contributions to process groups. + * Claudiu Danilov claudiu at acm.org - scalable wide area support. + * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. + * Theo Schlossnagle jesus at omniti.com - Perl, autoconf, old skiplist. + * Dan Schoenblum dansch at cnds.jhu.edu - Java interface. + * + */ + #ifndef SYSTEM_DEFS_AUTOCONF_H #define SYSTEM_DEFS_AUTOCONF_H Modified: libspreadutil/trunk/include/spu_system_defs_windows.h =================================================================== --- libspreadutil/trunk/include/spu_system_defs_windows.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/include/spu_system_defs_windows.h 2018-08-20 21:16:48 UTC (rev 906) @@ -1,3 +1,38 @@ +/* + * The Spread Toolkit. + * + * The contents of this file are subject to the Spread Open-Source + * License, Version 1.0 (the ``License''); you may not use + * this file except in compliance with the License. You may obtain a + * copy of the License at: + * + * http://www.spread.org/license/ + * + * or in the file ``license.txt'' found in this distribution. + * + * Software distributed under the License is distributed on an AS IS basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Creators of Spread are: + * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. + * + * Copyright (C) 1993-2016 Spread Concepts LLC + * + * All Rights Reserved. + * + * Major Contributor(s): + * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. + * Ryan Caudy rcaudy at gmail.com - contributions to process groups. + * Claudiu Danilov claudiu at acm.org - scalable wide area support. + * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. + * Theo Schlossnagle jesus at omniti.com - Perl, autoconf, old skiplist. + * Dan Schoenblum dansch at cnds.jhu.edu - Java interface. + * + */ + #ifndef SYSTEM_DEFS_WINDOWS_H #define SYSTEM_DEFS_WINDOWS_H Modified: libspreadutil/trunk/src/Makefile.in =================================================================== --- libspreadutil/trunk/src/Makefile.in 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/src/Makefile.in 2018-08-20 21:16:48 UTC (rev 906) @@ -23,9 +23,9 @@ # : minor -- inc for backwards compatible change (add new api, but not break or remove old one) # : bugfix -- inc for bugfix that is fully compatible -LIBFULLVERSION=4.2.0 -LIBCOMPATVERSION=4.0 -LIBVERSION=4 +LIBFULLVERSION=5.0.0 +LIBCOMPATVERSION=5.0 +LIBVERSION=5 PATHS=-I. -I$(top_srcdir)/src -I../include -I$(top_srcdir)/include @@ -62,11 +62,11 @@ TARGETS=libspread-util.a libspread-util.sa @LIBSPSO@ -LIB_OBJS=alarm.o events.o memory.o data_link.o +LIB_OBJS=alarm.o events.o memory.o data_link.o spu_addr.o LIB_SHOBJS=$(LIB_OBJS:.o=.lo) -all: $(TARGETS) +all: $(TARGETS) binrelease .c.o: $(CC) $(CFLAGS) $(CPPFLAGS) -D_REENTRANT -c $< Modified: libspreadutil/trunk/src/alarm.c =================================================================== --- libspreadutil/trunk/src/alarm.c 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/src/alarm.c 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2013 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. @@ -33,33 +34,34 @@ */ #include "arch.h" -#include -#include -#include -#include -#include -/* undef redefined variables under windows */ +/* NOTE: undef redefined errno values under windows in arch.h */ #ifdef ARCH_PC_WIN95 +# undef EINVAL # undef EINTR # undef EAGAIN # undef EWOULDBLOCK # undef EINPROGRESS # undef EALREADY +# undef EIO +# undef ENOMEM # ifndef va_copy # define va_copy(d,s) ((d) = (s)) # endif #endif #include -#ifdef HAVE_GOOD_VARGS -# include -#endif +#include +#include +#include +#include +#include +#include #include "spu_alarm.h" #include "spu_events.h" -#define MAX_ALARM_MESSAGE_BUF 256 +#define MAX_ALARM_MESSAGE_BUF 512 static const char Alarm_Warning_High_Res[] = "*** WARNING *** Alarmp: High precision timestamp output failed!\n"; static const char Alarm_Warning_Timestamp[] = "*** WARNING *** Alarmp: Timestamp didn't fit in default size buffer!\n"; @@ -72,8 +74,8 @@ static void Threaded_Alarm_Exit(void); #endif -static int32 Alarm_type_mask = PRINT | EXIT ; -static int16 Alarm_cur_priority = SPLOG_DEBUG ; +int32u Alarm_type_mask = (PRINT | EXIT); +int16u Alarm_cur_priority = SPLOG_DEBUG; static alarm_realtime_handler *Alarm_realtime_print_handler = NULL; @@ -85,23 +87,6 @@ static int AlarmInteractiveProgram = FALSE; -/* priority_level_active returns true if the priority level is active (i.e. should be printed) - * given the currently allowed priority levels. - */ -static bool priority_level_active( int16 priority ) -{ - return( Alarm_cur_priority <= ( priority & SPLOG_PRIORITY_FIELDS ) ); -} - -/* is_priority_set() checks whether the specific priority_to_check value is set - * in the 'priority' variable passed in. - * If value is set, then it returns true, otherwise it returns false. - */ -static bool is_priority_set( int16 priority, int16 priority_to_check ) -{ - return( (priority & SPLOG_PRIORITY_FIELDS) == priority_to_check ); -} - /* is_priority_flag_active() checks whether the specific priority_flag is set * in the 'priority' variable passed in. * If flag is set, then it returns true, otherwise it returns false. @@ -120,14 +105,12 @@ #endif } -#ifdef HAVE_GOOD_VARGS - static void Internal_Alarmp(int16 priority, int32 mask, char *message, va_list ap) { - /* log event if in mask and of higher priority, or if FATAL event, always log */ - - if (((Alarm_type_mask & mask) != 0 && priority_level_active(priority)) || is_priority_set(priority, SPLOG_FATAL)) { - + if ( ALARMP_NEEDED( priority, mask ) ) + { + int will_exit = ( ( mask & EXIT ) || ( priority & SPLOG_PRIORITY_FIELDS ) == SPLOG_FATAL ); + char buf[MAX_ALARM_MESSAGE_BUF]; char *alloc_buf = NULL; char *tot_ptr = buf; @@ -138,73 +121,81 @@ int msg_len = 0; int tmp; time_t time_now; - struct tm tm_now; + struct tm tm_now, *tm_ptr; va_list ap_copy; sp_time t; - if (Alarm_timestamp_format != NULL && !is_priority_flag_active(priority, SPLOG_NODATE)) { - + if (Alarm_timestamp_format != NULL && !is_priority_flag_active(priority, SPLOG_NODATE)) + { t = E_get_time(); time_now = t.sec; -#ifdef HAVE_LOCALTIME_R - localtime_r(&tm_now, &time_now); +#ifndef HAVE_LOCALTIME_R + tm_ptr = localtime(&time_now); /* NOTE: not thread safe; but hopefully worst case is we get an incorrect timestamp */ #else - tm_now = *localtime(&time_now); /* NOTE: not thread safe; but worst case is we get an incorrect timestamp */ + tm_ptr = localtime_r(&tm_now, &time_now); #endif - ts_len = (int) strftime(ts_ptr, MAX_ALARM_MESSAGE_BUF - 1, Alarm_timestamp_format, &tm_now); /* reserve 1 char for space appended below */ + if (tm_ptr != NULL) + { +#ifndef HAVE_LOCALTIME_R + tm_now = *tm_ptr; +#endif + ts_len = (int) strftime(ts_ptr, MAX_ALARM_MESSAGE_BUF - 1, Alarm_timestamp_format, &tm_now); /* reserve 1 char for space appended below */ + } + else /* on localtime failure just print secs since epoch */ + ts_len = (int) snprintf(ts_ptr, MAX_ALARM_MESSAGE_BUF - 1, "%ld", (long) t.sec); /* reserve 1 char for space appended below */ /* ensure ts_len in half open range [0, MAX_ALARM_MESSAGE_BUF - 1) */ - if (ts_len >= MAX_ALARM_MESSAGE_BUF - 1) { + if (ts_len >= MAX_ALARM_MESSAGE_BUF - 1) ts_len = MAX_ALARM_MESSAGE_BUF - 2; - } - if (ts_len < 0) { + if (ts_len < 0) ts_len = 0; - } ts_ptr[ts_len] = '\0'; - if (ts_len != 0) { /* strftime output successfully fit into ts_ptr; optionally append sub-second precision */ + if (ts_len != 0) /* strftime output (possibly truncated) successfully fit into ts_ptr; optionally append sub-second precision */ + { + if ( Alarm_timestamp_high_res ) + { + tmp = snprintf(ts_ptr + ts_len, MAX_ALARM_MESSAGE_BUF - 1 - ts_len, ".%06lu", t.usec); /* always nul terminates bc size param >= 1 */ - if ( Alarm_timestamp_high_res ) { - - tmp = snprintf(ts_ptr + ts_len, MAX_ALARM_MESSAGE_BUF - 1 - ts_len, ".%06lu", t.usec); /* always nul terminates */ - - if (tmp != 7) { + if (tmp != 7) + { Output_Msg(Alarm_Warning_High_Res, sizeof(Alarm_Warning_High_Res) - 1); tmp = 0; } - if ((ts_len += tmp) >= MAX_ALARM_MESSAGE_BUF - 1) { + if ((ts_len += tmp) >= MAX_ALARM_MESSAGE_BUF - 1) + { Output_Msg(Alarm_Warning_Timestamp, sizeof(Alarm_Warning_Timestamp) - 1); ts_len = MAX_ALARM_MESSAGE_BUF - 2; /* adjust ts_len to reflect snprintf truncation */ } } - ts_ptr[ts_len] = ' '; /* append space for single alarm string */ + ts_ptr[ts_len] = ' '; /* append space for single alarm string; NOTE: above always ensures space for these writes */ ts_ptr[++ts_len] = '\0'; msg_ptr = ts_ptr + ts_len; tot_len = ts_len; - - } else { - Output_Msg(Alarm_Warning_Timestamp, sizeof(Alarm_Warning_Timestamp) - 1); } + else + Output_Msg(Alarm_Warning_Timestamp, sizeof(Alarm_Warning_Timestamp) - 1); } - va_copy(ap_copy, ap); /* make a copy of param list in case of vsnprintf truncation */ - if ((msg_len = vsnprintf(msg_ptr, MAX_ALARM_MESSAGE_BUF - tot_len, message, ap)) < 0) { /* failure; on Windows can be buffer too small */ - msg_len = 4 * MAX_ALARM_MESSAGE_BUF; - } - tot_len += msg_len; + va_copy(ap_copy, ap); /* make a copy of param list in case of vsnprintf truncation */ + + if ((msg_len = vsnprintf(msg_ptr, MAX_ALARM_MESSAGE_BUF - tot_len, message, ap)) < 0) /* failure; on Windows can be buffer too small */ + msg_len = 4 * MAX_ALARM_MESSAGE_BUF; + + tot_len += msg_len; - if (tot_len >= MAX_ALARM_MESSAGE_BUF) { /* failure; try dynamically allocating a bigger buffer */ - - if ((alloc_buf = (char*) malloc(sizeof(Alarm_Warning_Alloc) - 1 + tot_len + 1)) != NULL) { - + if (tot_len >= MAX_ALARM_MESSAGE_BUF) /* failure; try dynamically allocating a bigger buffer */ + { + if ((alloc_buf = (char*) malloc(sizeof(Alarm_Warning_Alloc) - 1 + tot_len + 1)) != NULL) + { tot_ptr = alloc_buf; tot_len = sizeof(Alarm_Warning_Alloc) - 1; memcpy(tot_ptr, Alarm_Warning_Alloc, tot_len); /* prepend dynamic allocation warning string */ @@ -214,14 +205,15 @@ tot_len += ts_len; msg_ptr = ts_ptr + ts_len; - if ((tmp = vsnprintf(msg_ptr, msg_len + 1, message, ap_copy)) < 0) { /* write msg after timestamp */ - tmp = msg_len; - } + + if ((tmp = vsnprintf(msg_ptr, msg_len + 1, message, ap_copy)) < 0) /* write msg after timestamp */ + tmp = msg_len; + msg_len = tmp; tot_len += msg_len; - - } else { /* dynamic alloc failed; overwrite warning + truncate msg in buf */ - + } + else /* dynamic alloc failed; overwrite warning + truncate msg in buf */ + { memcpy(tot_ptr + MAX_ALARM_MESSAGE_BUF - sizeof(Alarm_Warning_Truncate), Alarm_Warning_Truncate, sizeof(Alarm_Warning_Truncate)); msg_len = MAX_ALARM_MESSAGE_BUF - ts_len - 1; tot_len = MAX_ALARM_MESSAGE_BUF - 1; @@ -233,38 +225,33 @@ Output_Msg(tot_ptr, tot_len); - if (ts_len != 0) { + if (ts_len != 0) ts_ptr[--ts_len] = '\0'; /* overwrite appended space between timestamp and msg with nul terminator */ - } - if (Alarm_realtime_print_handler != NULL && - (is_priority_flag_active(priority, SPLOG_REALTIME) || is_priority_set(priority, SPLOG_FATAL))) { - + if (Alarm_realtime_print_handler != NULL && (will_exit || is_priority_flag_active(priority, SPLOG_REALTIME))) + { tmp = Alarm_realtime_print_handler(priority, mask, ts_ptr, ts_len, msg_ptr, msg_len); - if (tmp) { + if (tmp) Output_Msg(Alarm_Warning_Realtime, sizeof(Alarm_Warning_Realtime) - 1); - } } - if (alloc_buf != NULL) { /* clean up any dynamically allocated buffer */ + if (alloc_buf != NULL) /* clean up any dynamically allocated buffer */ free(alloc_buf); - } - } - - if ((EXIT & mask) != 0 || is_priority_set(priority, SPLOG_FATAL)) { - + + if (will_exit) + { #ifndef USE_THREADED_ALARM - fprintf(stdout, "Exit caused by Alarm(EXIT)\n"); + fprintf(stdout, "Exit caused by Alarm!\n"); # ifndef ARCH_PC_WIN95 - abort(); + abort(); # else - exit(1); + exit(1); # endif #else - Threaded_Alarm_Exit(); + Threaded_Alarm_Exit(); #endif - + } } } @@ -290,62 +277,6 @@ va_end(ap); } -#else - -void Alarm( int32 mask, char *message, - void *ptr1, void *ptr2, void *ptr3, void *ptr4, - void *ptr5, void *ptr6, void *ptr7, void *ptr8, - void *ptr9, void *ptr10, void*ptr11, void *ptr12, - void *ptr13, void *ptr14, void *ptr15, void *ptr16, - void *ptr17, void *ptr18, void *ptr19, void *ptr20) -{ - if ( ( Alarm_type_mask & mask ) && priority_level_active(SPLOG_WARNING) ) - { - if ( Alarm_timestamp_format != NULL ) - { - char timestamp[42]; - struct tm *tm_now; - time_t time_now; - size_t length; - size_t length2; - sp_time t = E_get_time(); - - time_now = t.sec; - tm_now = localtime(&time_now); - length = strftime(timestamp, sizeof(timestamp) - 1, Alarm_timestamp_format, tm_now); /* -1 reserves a char for appended ' ' below */ - - if (length != 0) { - - if ( Alarm_timestamp_high_res && length <= sizeof(timestamp) - 1 ) { - - if ((length2 = snprintf(timestamp + length, sizeof(timestamp) - 1 - length, ".%06lu", t.usec)) < sizeof(timestamp) - 1 - length) { - length += length2; - } - /* else attempted print will be overwritten immediately below by appending ' ' */ - } - - timestamp[length] = ' '; - timestamp[++length] = '\0'; - fwrite(timestamp, sizeof(char), length, stdout); - timestamp[--length] = '\0'; - } - } - printf(message, ptr1, ptr2, ptr3, ptr4, ptr5, ptr6, ptr7, ptr8, ptr9, ptr10, ptr11, ptr12, ptr13, ptr14, ptr15, ptr16, ptr17, ptr18, ptr19, ptr20 ); - - } - if ( EXIT & mask ) - { - printf("Exit caused by Alarm(EXIT)\n"); -#ifndef ARCH_PC_WIN95 - abort(); -#else - exit( 1 ); -#endif - } -} - -#endif /* HAVE_GOOD_VARGS */ - void Alarm_set_interactive(void) { AlarmInteractiveProgram = TRUE; @@ -710,7 +641,7 @@ } } - fprintf(stdout, "Exit caused by Alarm(EXIT)\n"); + fprintf(stdout, "Exit caused by Alarm!\n"); #ifndef ARCH_PC_WIN95 abort(); #else Modified: libspreadutil/trunk/src/arch.c =================================================================== --- libspreadutil/trunk/src/arch.c 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/src/arch.c 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2006 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. @@ -32,13 +33,13 @@ * */ - #include "arch.h" + #include #include #ifdef ARCH_PC_WIN95 -# include +# include #endif #ifndef HAVE_STRERROR @@ -58,52 +59,38 @@ #endif #ifdef ARCH_PC_WIN95 -/* return value only valid until next call to sock_strerror */ -char *sock_strerror( int err ) +char *sock_strerror(int err) { - switch( err ) { - case WSANOTINITIALISED: - return "WSANOTINITIALISED: A successful WSAStartup() must occur before using this function."; - case WSAENETDOWN: - return "WSAENETDOWN: The network subsystem has failed."; - case WSAEACCES: - return "WSAEACCES: The requested address is a broadcast address. Call setsockopt with the SO_BROADCAST parameter to allow the use of the broadcast address."; - case WSAEINTR: - return "WSAEINTR: A blocking Windows Sockets call was canceled through WSACancelBlockingCall."; - case WSAEINPROGRESS: - return "WSAEINPROGRESS: A blocking Windows Sockets call is in progress, or the service provider is still processing a callback function."; - case WSAEFAULT: - return "WSAEFAULT: The buf parameter is not completely contained in a valid part of the user address space." ; - case WSAENETRESET: - return "WSAENETRESET: The connection has been broken due to the keep-alive activity detecting a failure while the operation was in progress."; - case WSAENOBUFS: - return "WSAENOBUFS: No buffer space is available."; - case WSAENOTCONN: - return "WSAENOTCONN: The socket is not connected."; - case WSAENOTSOCK: - return "WSAENOTSOCK: The descriptor is not a socket."; - case WSAEOPNOTSUPP: - return "WSAEOPNOTSUPP: Operation not supported."; - case WSAESHUTDOWN: - return "WSAESHUTDOWN The socket has been shut down; it is not possible to send on a socket after shutdown has been invoked with how set to SD_SEND or SD_BOTH."; - case WSAEWOULDBLOCK: - return "WSAEWOULDBLOCK: The socket is marked as nonblocking and the requested operation would block."; - case WSAEMSGSIZE: - return "WSAEMSGSIZE: The socket is message oriented, and the message is larger than the maximum supported by the underlying transport."; - case WSAEHOSTUNREACH: - return "WSAEHOSTUNREACH: The remote host cannot be reached from this host at this time."; - case WSAEINVAL: - return "WSAEINVAL: The socket has not been bound with bind, or an unknown flag was specified, or MSG_OOB was specified for a socket with SO_OOBINLINE enabled."; - case WSAECONNABORTED: - return "WSAECONNABORTED: The virtual circuit was terminated due to a time-out or other failure. The application should close the socket as it is no longer usable."; - case WSAECONNRESET: - return "WSAECONNRESET: The connection was reset by the remote side executing a hard or abortive close. For a UDP socket, the remote host responded with a Port Unreachable ICMP packet."; - case WSAETIMEDOUT: - return "WSAETIMEDOUT: The connection has been dropped, because of a network failure or because the system on the other end went down without notice."; - default: - return "Unknown WSA error!"; - } + const char *ret = "Unknown WSA error!"; + + switch (err) + { + case WSANOTINITIALISED: ret = "WSANOTINITIALISED: A successful WSAStartup() must occur before using this function."; + case WSAENETDOWN: ret = "WSAENETDOWN: The network subsystem has failed."; + case WSAEACCES: ret = "WSAEACCES: The requested address is a broadcast address. Call setsockopt with the SO_BROADCAST parameter to allow the use of the broadcast address."; + case WSAEINTR: ret = "WSAEINTR: A blocking Windows Sockets call was canceled through WSACancelBlockingCall."; + case WSAEINPROGRESS: ret = "WSAEINPROGRESS: A blocking Windows Sockets call is in progress, or the service provider is still processing a callback function."; + case WSAEFAULT: ret = "WSAEFAULT: The buf parameter is not completely contained in a valid part of the user address space." ; + case WSAENETRESET: ret = "WSAENETRESET: The connection has been broken due to the keep-alive activity detecting a failure while the operation was in progress."; + case WSAENOBUFS: ret = "WSAENOBUFS: No buffer space is available."; + case WSAENOTCONN: ret = "WSAENOTCONN: The socket is not connected."; + case WSAENOTSOCK: ret = "WSAENOTSOCK: The descriptor is not a socket."; + case WSAEOPNOTSUPP: ret = "WSAEOPNOTSUPP: Operation not supported."; + case WSAESHUTDOWN: ret = "WSAESHUTDOWN The socket has been shut down; it is not possible to send on a socket after shutdown has been invoked with how set to SD_SEND or SD_BOTH."; + case WSAEWOULDBLOCK: ret = "WSAEWOULDBLOCK: The socket is marked as nonblocking and the requested operation would block."; + case WSAEMSGSIZE: ret = "WSAEMSGSIZE: The socket is message oriented, and the message is larger than the maximum supported by the underlying transport."; + case WSAEHOSTUNREACH: ret = "WSAEHOSTUNREACH: The remote host cannot be reached from this host at this time."; + case WSAEINVAL: ret = "WSAEINVAL: The socket has not been bound with bind, or an unknown flag was specified, or MSG_OOB was specified for a socket with SO_OOBINLINE enabled."; + case WSAECONNABORTED: ret = "WSAECONNABORTED: The virtual circuit was terminated due to a time-out or other failure. The application should close the socket as it is no longer usable."; + case WSAETIMEDOUT: ret = "WSAETIMEDOUT: The connection has been dropped, because of a network failure or because the system on the other end went down without notice."; + case WSASYSCALLFAILURE: ret = "WSASYSCALLFAILURE: A system call unexpectedly failed."; + case WSA_NOT_ENOUGH_MEMORY: ret = "WSA_NOT_ENOUGH_MEMORY: Out of memory."; + case WSAECONNRESET: ret = ("WSAECONNRESET: The connection was reset by the remote side executing a hard or abortive close. " + "For a UDP socket, the remote host responded with a Port Unreachable ICMP packet."); + } + + return (char*) ret; } #endif Modified: libspreadutil/trunk/src/arch.h =================================================================== --- libspreadutil/trunk/src/arch.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/src/arch.h 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2013 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. @@ -115,9 +116,25 @@ # ifndef int32u # define int32u u_int32_t # endif + +# ifndef INVALID_SOCKET +# define INVALID_SOCKET (-1) +# elif INVALID_SOCKET != -1 +# error "INVALID_SOCKET must be -1!" +# endif #else /* We are using windows... */ + +/* Windows defines a default FD_SETSIZE of 64. However, the size of + * fd_set array for select can be raised by defining a larger constant + * before including windows headers + */ +# define FD_SETSIZE 1024 + +# include +# include /* NOTE: after definition of FD_SETSIZE! */ + # define INTSIZE32 # define ARCH_SCATTER_NONE # define ARCH_ENDIAN 0x80000080 @@ -132,30 +149,16 @@ # define ARCH_SCATTER_SIZE 64 # define ERR_TIMEDOUT EAGAIN # define sock_errno WSAGetLastError() -# define sock_set_errno WSASetLastError +# define sock_set_errno(e) WSASetLastError(e) # define MAXPATHLEN _MAX_PATH -# define snprintf _snprintf # define alloca _alloca /* Sockets are not file descriptors on windows so they need a special close function. */ # define close closesocket -/* Windows defines a default size of 64. However, the size of fd_set array for select - * can be raised by defining a larger constant before including windows.h winsock.h - */ -# define FD_SETSIZE 1024 - -# include /* after definition of FD_SETSIZE! */ - # define HAVE_SOCKLEN_T 1 typedef int sockopt_len_t; - -#include /* after definition of FD_SETSIZE! */ - -#define HAVE_SOCKLEN_T 1 -typedef int sockopt_len_t; - /* System location of spread.conf file */ # define SPREAD_ETCDIR "/etc" @@ -165,6 +168,10 @@ * number. Right now we don't need the E versions for windows so we just * use the WSA versions. */ + +# undef EINVAL +# define EINVAL WSAEINVAL + # undef EINTR # define EINTR WSAEINTR @@ -180,6 +187,12 @@ # undef EALREADY # define EALREADY WSAEALREADY +# undef EIO +# define EIO WSASYSCALLFAILURE + +# undef ENOMEM +# define ENOMEM WSA_NOT_ENOUGH_MEMORY + /* Windows does not define MAXHOSTNAMELEN, so we define it here to a reasonable host name limit */ #define MAXHOSTNAMELEN 256 @@ -282,7 +295,7 @@ * work around bad/different bool definitions in system headers * #undef bool */ -typedef short bool; +typedef int bool; #endif #ifndef TRUE Modified: libspreadutil/trunk/src/config.h.in =================================================================== --- libspreadutil/trunk/src/config.h.in 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/src/config.h.in 2018-08-20 21:16:48 UTC (rev 906) @@ -256,11 +256,11 @@ /* various unsigned intxx_t types */ #undef HAVE_U_INTXX_T -/* Define to 1 if you have the header file. */ -#undef HAVE_WINDOWS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_WINSOCK2_H -/* Define to 1 if you have the header file. */ -#undef HAVE_WINSOCK_H +/* Define to 1 if you have the header file. */ +#undef HAVE_WS2TCPIP_H /* Define if libc defines __progname */ #undef HAVE___PROGNAME Modified: libspreadutil/trunk/src/data_link.c =================================================================== --- libspreadutil/trunk/src/data_link.c 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/src/data_link.c 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2013 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. @@ -32,13 +33,12 @@ * */ - #include #include #include #include -#include "arch.h" +#include "arch.h" /* NOTE: must come after #include on Windows bc we redef error defines */ #ifndef ARCH_PC_WIN95 # include @@ -49,369 +49,589 @@ # include # include #else -# include +# include #endif #include "spu_data_link.h" #include "spu_alarm.h" -#include "spu_events.h" /* for sp_time */ +#include "spu_events.h" -#define DL_MAX_NUM_SEND_RETRIES 1 +/******************************************************************************** + ********************************************************************************/ -channel DL_init_channel( int32 channel_type, int16 port, int32 mcast_address, int32 interface_address ) +void DL_close_channel(channel chan) { - channel chan; - struct sockaddr_in soc_addr; - int on=1, off=0; -#ifdef IP_MULTICAST_TTL - unsigned char ttl_val; -#endif + int ret = close(chan); /* NOTE: on windows, arch.h defines close to be closesocket (ick!) /*/ + + if (ret) + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_close_channel: error closing channel %d: %d %d %s\n", (int) chan, ret, sock_errno, sock_strerror(sock_errno)); +} - if((chan = socket(AF_INET, SOCK_DGRAM, 0)) == -1) - Alarm( EXIT, "DL_init_channel: socket error for port %d\n", port ); +/******************************************************************************** + ********************************************************************************/ - if ( channel_type & SEND_CHANNEL ) - { - if (setsockopt(chan, SOL_SOCKET, SO_BROADCAST, (char *)&on, - sizeof(on)) < 0) - Alarm( EXIT, "DL_init_channel: setsockopt error for port %d\n",port); - Alarm( DATA_LINK, "DL_init_channel: setsockopt for send and broadcast went ok\n"); +channel DL_init_channel(int32 channel_type, int16 port, int32 mcast_address, int32 interface_address) +{ + spu_addr mcast = { 0 }; + spu_addr inter = { 0 }; -#ifdef IP_MULTICAST_TTL - /* ### Isn't this for sending??? */ - ttl_val = 1; - if (setsockopt(chan, IPPROTO_IP, IP_MULTICAST_TTL, (void *)&ttl_val, - sizeof(ttl_val)) < 0) - { - Alarm( DATA_LINK, "DL_init_channel: problem in setsockopt of multicast ttl %d - ignore in WinNT or Win95\n", ttl_val ); - } - Alarm( DATA_LINK, "DL_init_channel: setting Mcast TTL to %d\n",ttl_val); -#endif - } + mcast.ipv4.sin_family = AF_INET; + mcast.ipv4.sin_port = htons(port); + mcast.ipv4.sin_addr.s_addr = htonl(mcast_address); + + inter.ipv4.sin_family = AF_INET; + inter.ipv4.sin_port = htons(port); + inter.ipv4.sin_addr.s_addr = htonl(interface_address); + + return DL_init_channel_gen(channel_type, &mcast, &inter); +} - if ( channel_type & RECV_CHANNEL ) - { - memset(&soc_addr, 0, sizeof(soc_addr)); - soc_addr.sin_family = AF_INET; - soc_addr.sin_port = htons(port); - memset(&soc_addr.sin_zero, 0, sizeof(soc_addr.sin_zero)); -#ifdef HAVE_SIN_LEN_IN_STRUCT_SOCKADDR_IN - soc_addr.sin_len = sizeof(soc_addr); -#endif +/******************************************************************************** + ********************************************************************************/ - /* If mcast channel, the interface means the interface to - receive mcast packets on, and not interface to bind. - Must bind multicast address instead */ - if (mcast_address != 0 && IS_MCAST_ADDR(mcast_address) && !(channel_type & DL_BIND_ALL) ) - soc_addr.sin_addr.s_addr= htonl(mcast_address); - else if (interface_address != 0) - soc_addr.sin_addr.s_addr= htonl(interface_address); - else - soc_addr.sin_addr.s_addr= INADDR_ANY; +int DL_send(channel chan, int32 address, int16 port, const sys_scatter *scat) +{ + spu_addr dst = { 0 }; - /* Older Version - if (interface_address == 0) - soc_addr.sin_addr.s_addr= INADDR_ANY; - else - soc_addr.sin_addr.s_addr= htonl(interface_address); - */ - - if ( channel_type & REUSE_ADDR ) - { - if(setsockopt(chan, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on))) - { - Alarm( EXIT, "DL_init_channel: Failed to set socket option REUSEADDR, errno: %d\n", errno); - } - } + dst.ipv4.sin_family = AF_INET; + dst.ipv4.sin_port = htons(port); + dst.ipv4.sin_addr.s_addr = htonl(address); + return DL_sendto_gen(chan, scat, &dst); +} - if(bind( chan, (struct sockaddr *) &soc_addr, - sizeof(soc_addr)) == -1) - { - Alarm( EXIT, "DL_init_channel: bind error (%d): %s for port %d, with sockaddr (" IPF ": %d) probably already running\n", sock_errno, sock_strerror(sock_errno), port, IP_NET(soc_addr.sin_addr.s_addr), ntohs(soc_addr.sin_port)); - } - Alarm( DATA_LINK, "DL_init_channel: bind for recv_channel for " IPF " port %d with chan %d ok\n", - IP_NET(soc_addr.sin_addr.s_addr), port, chan); +/******************************************************************************** + ********************************************************************************/ - if( IS_MCAST_ADDR(mcast_address) ) - { -#ifdef IP_MULTICAST_TTL - struct ip_mreq mreq; +int DL_recv(channel chan, sys_scatter *scat) +{ + return DL_recvfrom_gen(chan, scat, NULL); +} - mreq.imr_multiaddr.s_addr = htonl( mcast_address ); +/******************************************************************************** + ********************************************************************************/ - /* the interface could be changed to a specific interface if needed */ - /* WAS: mreq.imr_interface.s_addr = INADDR_ANY; - * If specified, then want to route through it instead of - * based on routing decisions at the kernel */ - /* IP_ADD_MEMBERSHIP requires that the imr_interface be an actual physical interface - * or INADDR_ANY. So if this is the special case of binding to multicast or broadcast, - * switch the join to use INADDR_ANY. In the case when the passed in interface - * is a regular physical interface, then join only on that one. - */ - if ( IS_MCAST_ADDR(interface_address) ) - mreq.imr_interface.s_addr = htonl( INADDR_ANY ); - else - mreq.imr_interface.s_addr = htonl( interface_address ); +int DL_recvfrom(channel chan, sys_scatter *scat, int *src_address, unsigned short *src_port) +{ + spu_addr src = { 0 }; + int ret = DL_recvfrom_gen(chan, scat, &src); + if (ret >= 0) + { + if (src_address) + { + if (src.addr.sa_family == AF_INET) + *src_address = (int) ntohl(src.ipv4.sin_addr.s_addr); + + else + *src_address = 0; + } + + if (src_port) + { + if (src.addr.sa_family == AF_INET || src.addr.sa_family == AF_INET6) + *src_port = (unsigned short) spu_addr_ip_get_port(&src); + + else + *src_port = 0; + } + } + + return ret; +} - if (setsockopt(chan, IPPROTO_IP, IP_ADD_MEMBERSHIP, (void *)&mreq, - sizeof(mreq)) < 0) - { - Alarm( EXIT, "DL_init_channel: problem (errno %d:%s) in setsockopt to multicast address " IPF "\n", sock_errno, sock_strerror(sock_errno), IP(mcast_address) ); - } +/******************************************************************************** + * Creates a broad/multicast IP datagram socket with options. Exits on failures. + * + * create a SOCK_DGRAM socket in protocol family of if_addr + * + * if SEND_CHANNEL is set: + * if if_addr is IPv4: enable SO_BROADCAST + * set multicast hops = 1 + * if NO_LOOP is set: disable multicast loopback + * + * if RECV_CHANNEL is set: + * if if_addr is IPv4: enable SO_BROADCAST + * if REUSE_ADDR is set: enable SO_REUSEADDR + * + * if mcast_addr is a multicast address and DL_BIND_ALL not set: + * bind to mcast_addr + * else: + * bind to if_addr + * + * if mcast_addr is a multicast address: + * call DL_join_multicast(socket, mcast_addr, if_addr) + * + * return socket + * + * TODO: check on sizeof setsockopt types across platforms (i.e. - Sun: char vs. int) + ********************************************************************************/ - if ( channel_type & NO_LOOP ) - { - if (setsockopt(chan, IPPROTO_IP, IP_MULTICAST_LOOP, - (void *)&off, 1) < 0) - { - Alarm( EXIT, "DL_init_channel: problem (errno %d:%s) in setsockopt loop setting " IPF "\n", sock_errno, sock_strerror(sock_errno), IP(mcast_address)); - } - } - - Alarm( DATA_LINK, "DL_init_channel: Joining multicast address " IPF " went ok\n", IP(mcast_address) ); -#else /* no multicast support */ - Alarm( EXIT, "DL_init_channel: Old SunOS architecture does not support IP multicast: " IPF "\n", IP(mcast_address)); -#endif - } else { - if (setsockopt(chan, SOL_SOCKET, SO_BROADCAST, (char *)&on, - sizeof(on)) < 0) - Alarm( EXIT, "DL_init_channel: setsockopt SO_BROADCAST error for port %d, socket %d\n",port,chan); - Alarm( DATA_LINK, "DL_init_channel: setsockopt for recv and broadcast went ok\n"); - } - } - - Alarm( DATA_LINK, "DL_init_channel: went ok on channel %d\n",chan); - return ( chan ); -} - -void DL_close_channel(channel chan) +channel DL_init_channel_gen(int32 channel_type, const spu_addr *mcast_addr, const spu_addr *if_addr) { + int family = spu_addr_family(if_addr); + channel chan; + int tmp_int; + unsigned char tmp_uchar; - if( -1 == close(chan)) - { - Alarm(EXIT, "DL_close_channel: error closing channel %d\n", chan); - } + Alarmp(SPLOG_INFO, DATA_LINK, "DL_init_channel_gen: creating a SOCK_DGRAM socket of family %d\n", family); -} + if (family != AF_INET && family != AF_INET6) + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_init_channel_gen: bad family(%d); only AF_INET (%d) and AF_INET6 (%d) are currently supported!\n", family, AF_INET, AF_INET6); -int DL_send( channel chan, int32 address, int16 port, sys_scatter *scat ) -{ -#ifndef ARCH_SCATTER_NONE - struct msghdr msg; -#else - char pseudo_scat[MAX_PACKET_SIZE]; -#endif - - struct sockaddr_in soc_addr; - struct timeval select_delay; - int ret; - int total_len; - int i; - int num_try; + if (mcast_addr != NULL) + { + if (family != spu_addr_family(mcast_addr)) + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_init_channel_gen: mcast family (%d) didn't match interface family (%d)!\n", spu_addr_family(mcast_addr), family); + + if (spu_addr_ip_get_port(if_addr) != spu_addr_ip_get_port(mcast_addr)) + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_init_channel_gen: mcast port (%u) didn't match interface port (%u)!\n", + (unsigned) spu_addr_ip_get_port(mcast_addr), (unsigned) spu_addr_ip_get_port(if_addr)); + } - /* Check that the scatter passed is small enough to be a valid system scatter */ + if ((chan = socket((family == AF_INET ? PF_INET : PF_INET6), SOCK_DGRAM, 0)) == INVALID_SOCKET) + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_init_channel_gen: socket error (%d: %s)!\n", sock_errno, sock_strerror(sock_errno)); - if( scat->num_elements > ARCH_SCATTER_SIZE ) { - Alarmp( SPLOG_FATAL, DATA_LINK, "DL_send: illegal scat->num_elements (%d) > ARCH_SCATTER_SIZE (%d)\n", - (int) scat->num_elements, (int) ARCH_SCATTER_SIZE ); - } + if (channel_type & SEND_CHANNEL) + { + if (family == AF_INET) + { + Alarmp(SPLOG_INFO, DATA_LINK, "DL_init_channel_gen: turning SO_BROADCAST on for send IPv4 channel\n"); + + if (setsockopt(chan, SOL_SOCKET, SO_BROADCAST, (tmp_int = 1, &tmp_int), sizeof(tmp_int))) + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_init_channel_gen: setsockopt(SOL_SOCKET, SO_BROADCAST, 1) error (%d: %s)!\n", sock_errno, sock_strerror(sock_errno)); + + Alarmp(SPLOG_INFO, DATA_LINK, "DL_init_channel_gen: setting IPv4 multicast TTL to 1 for send channel\n"); + + if (setsockopt(chan, IPPROTO_IP, IP_MULTICAST_TTL, (tmp_uchar = 1, &tmp_uchar), sizeof(tmp_uchar))) + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_init_channel_gen: problem (%d: %s) in setsockopt of multicast ttl = 1; ignore on Windows\n", + sock_errno, sock_strerror(sock_errno)); - memset( &soc_addr, 0, sizeof( soc_addr ) ); - soc_addr.sin_family = AF_INET; - soc_addr.sin_addr.s_addr = htonl( address ); - soc_addr.sin_port = htons( port ); + if (channel_type & NO_LOOP) + { + Alarmp(SPLOG_INFO, DATA_LINK, "DL_init_channel_gen: Disabling IPv4 multicast loopback\n"); + + if (setsockopt(chan, IPPROTO_IP, IP_MULTICAST_LOOP, (tmp_uchar = 0, &tmp_uchar), sizeof(tmp_uchar))) + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_init_channel_gen: error (%d: %s) in disabling ipv4 loopback!\n", sock_errno, sock_strerror(sock_errno)); + } + } + else + { + Alarmp(SPLOG_INFO, DATA_LINK, "DL_init_channel_gen: setting IPv6 mulitcast hops to 1 for send channel\n"); + + if (setsockopt(chan, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, (tmp_int = 1, &tmp_int), sizeof(tmp_int))) + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_init_channel_gen: problem (%d: %s) in setsockopt of multicast hops = 1; ignore on Windows\n", + sock_errno, sock_strerror(sock_errno)); -#ifdef HAVE_SIN_LEN_IN_STRUCT_SOCKADDR_IN - soc_addr.sin_len = sizeof( soc_addr ); -#endif + if (channel_type & NO_LOOP) + { + Alarmp(SPLOG_INFO, DATA_LINK, "DL_init_channel_gen: Disabling IPv6 multicast loopback\n"); -#ifdef ARCH_PC_HOME - soc_addr.sin_addr.s_addr = htonl( -1073741814 ); /* WTF? */ -#endif +#ifdef __sun + if (setsockopt(chan, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, (tmp_uchar = 0, &tmp_uchar), sizeof(tmp_uchar))) +#else + if (setsockopt(chan, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, (tmp_int = 0, &tmp_int), sizeof(tmp_int))) +#endif + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_init_channel_gen: error (%d: %s) in disabling ipv6 loopback!\n", sock_errno, sock_strerror(sock_errno)); + } + } + } -#ifndef ARCH_SCATTER_NONE - memset( &msg, 0, sizeof( msg ) ); - msg.msg_name = (caddr_t) &soc_addr; - msg.msg_namelen = sizeof( soc_addr ); - msg.msg_iov = (struct iovec *) scat->elements; - msg.msg_iovlen = scat->num_elements; -#endif + if (channel_type & RECV_CHANNEL) + { + spu_addr bind_addr = *if_addr; - for( i = 0, total_len = 0; i < (int) scat->num_elements; ++i ) { + if (family == AF_INET) + { + Alarmp(SPLOG_INFO, DATA_LINK, "DL_init_channel_gen: turning SO_BROADCAST on for recv IPv4 channel\n"); + + if (setsockopt(chan, SOL_SOCKET, SO_BROADCAST, (tmp_int = 1, &tmp_int), sizeof(tmp_int))) + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_init_channel_gen: setsockopt(SOL_SOCKET, SO_BROADCAST, 1) error (%d: %s)!\n", sock_errno, sock_strerror(sock_errno)); + } + + if (!(channel_type & DL_BIND_ALL) && mcast_addr != NULL && spu_addr_ip_is_multicast(mcast_addr)) + bind_addr = *mcast_addr; -#ifdef ARCH_SCATTER_NONE - memcpy( &pseudo_scat[total_len], scat->elements[i].buf, scat->elements[i].len ); -#endif - total_len += scat->elements[i].len; - } + if (channel_type & REUSE_ADDR) + { + Alarmp(SPLOG_INFO, DATA_LINK, "DL_init_channel_gen: turning SO_REUSEADDR on for recv channel\n"); + + if (setsockopt(chan, SOL_SOCKET, SO_REUSEADDR, (tmp_int = 1, &tmp_int), sizeof(tmp_int))) + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_init_channel_gen: Failed to set socket option REUSEADDR, errno: (%d: %s)!\n", sock_errno, sock_strerror(sock_errno)); + } - for( num_try = 1;; ++num_try ) { + Alarmp(SPLOG_INFO, DATA_LINK, "DL_init_channel_gen: binding recv channel to [%s]:%u\n", SPU_ADDR_NTOP(&bind_addr), (unsigned) spu_addr_ip_get_port(&bind_addr)); -#ifndef ARCH_SCATTER_NONE - ret = sendmsg( chan, &msg, 0 ); -#else - ret = sendto( chan, pseudo_scat, total_len, 0, (struct sockaddr *) &soc_addr, sizeof( soc_addr ) ); -#endif + if (bind(chan, (struct sockaddr *) &bind_addr, spu_addr_len(&bind_addr))) + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_init_channel_gen: bind error (%d: %s) for [%s]:%u; probably already running!\n", + sock_errno, sock_strerror(sock_errno), SPU_ADDR_NTOP(&bind_addr), (unsigned) spu_addr_ip_get_port(&bind_addr)); - if( ret >= 0 || num_try > DL_MAX_NUM_SEND_RETRIES ) { break; } /* success or give up */ + if (mcast_addr != NULL && spu_addr_ip_is_multicast(mcast_addr) && (tmp_int = DL_join_multicast_gen(chan, mcast_addr, if_addr))) + Alarmp(SPLOG_FATAL, DATA_LINK, "DL_init_channel_gen: DL_join_multicast failed! %d %d %s\n", tmp_int, sock_errno, sock_strerror(sock_errno)); + } - /* delay for a short while */ + Alarmp(SPLOG_INFO, DATA_LINK, "DL_init_channel_gen: success; chan = %d\n", (int) chan); + + return chan; +} - select_delay.tv_sec = 0; - select_delay.tv_usec = 100; +/******************************************************************************** + * Joins the group mcast_addr on a socket. Returns zero on success, non-zero on failure. + * + * if mcast_addr is IPv4: + * if if_addr != NULL: join mcast_addr on interface if_addr + * else: join mcast_addr on interface INADDR_ANY + * + * else: + * if mcast_addr's scope_id is non-zero: join mcast_addr on mcast_addr's scope_id + * elif if_addr != NULL: join mcast_addr on if_addr's scope_id + * else: join mcast_addr on scope_id 0 (most likely fails) + * + ********************************************************************************/ - Alarmp( SPLOG_WARNING, DATA_LINK, "DL_send: delaying for %ld.%06lds after failed send to (" IPF ":%d): %d %d '%s'\n", - select_delay.tv_sec, select_delay.tv_usec, IP(address), port, ret, sock_errno, sock_strerror(sock_errno) ); +int DL_join_multicast_gen(channel chan, const spu_addr *mcast_addr, const spu_addr *if_addr) +{ + int ret = -1; + int family; - select( 0, NULL, NULL, NULL, &select_delay ); + if (mcast_addr == NULL) + { + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_join_multicast_gen: called with NULL mcast_addr?!\n"); + sock_set_errno(EINVAL); + goto END; + } + + family = spu_addr_family(mcast_addr); - Alarmp( SPLOG_WARNING, DATA_LINK, "DL_send: woke up; about to attempt send retry #%d\n", num_try ); - } + if (family != AF_INET && family != AF_INET6) + { + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_join_multicast_gen: called with non-IP mcast_addr?!\n"); + sock_set_errno(EINVAL); + goto END; + } + + if (family == AF_INET) + { + struct ip_mreq mreq; - if( ret < 0 ) { + memset(&mreq, 0, sizeof(mreq)); + mreq.imr_multiaddr = mcast_addr->ipv4.sin_addr; - Alarmp( SPLOG_WARNING, DATA_LINK, "DL_send: error: %d %d '%s'\n", ret, sock_errno, sock_strerror(sock_errno) ); + if (if_addr != NULL && !spu_addr_ip_is_multicast(if_addr)) + mreq.imr_interface = if_addr->ipv4.sin_addr; + + Alarmp(SPLOG_INFO, DATA_LINK, "DL_join_multicast_gen: Joining ipv4 multicast address " IPF " on interface " IPF "\n", + IP_NET(mreq.imr_multiaddr.s_addr), IP_NET(mreq.imr_interface.s_addr)); + + if (setsockopt(chan, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq))) + { + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_join_multicast_gen: error (%d: %s) on ipv4 join!\n", sock_errno, sock_strerror(sock_errno)); + goto END; + } + } + else + { + struct ipv6_mreq mreq; - for( i = 0; i < (int) scat->num_elements; ++i ) { - Alarmp( SPLOG_WARNING, DATA_LINK, "DL_send: element[%d]: %d bytes\n", i, (int) scat->elements[i].len ); - } + memset(&mreq, 0, sizeof(mreq)); + mreq.ipv6mr_multiaddr = mcast_addr->ipv6.sin6_addr; + mreq.ipv6mr_interface = mcast_addr->ipv6.sin6_scope_id; - } else if( ret < total_len ) { + if (mreq.ipv6mr_interface == 0 && if_addr != NULL) + mreq.ipv6mr_interface = if_addr->ipv6.sin6_scope_id; + + Alarmp(SPLOG_INFO, DATA_LINK, "DL_join_multicast_gen: Joining ipv6 multicast address %s on interface %u\n", SPU_ADDR_NTOP(mcast_addr), (unsigned) mreq.ipv6mr_interface); + + if (setsockopt(chan, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq, sizeof(mreq))) + { + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_join_multicast_gen: error (%d: %s) on ipv6 join!\n", sock_errno, sock_strerror(sock_errno)); + goto END; + } + } - Alarmp( SPLOG_WARNING, DATA_LINK, "DL_send: partial sending %d out of %d\n", ret, total_len ); + ret = 0; - } else if( ret != total_len ) { +END: + Alarmp(SPLOG_INFO, DATA_LINK, "DL_join_multicast_gen: ret = %d\n", ret); + + return ret; +} - Alarmp( SPLOG_WARNING, DATA_LINK, "DL_send: unexpected return (%d) > total_len (%d)?!\n", ret, total_len ); - } +/******************************************************************************** + ********************************************************************************/ - Alarmp( SPLOG_INFO, DATA_LINK, "DL_send: ret = %d, sending a message of %d bytes to (" IPF ":%d) on channel %d\n", - ret, total_len, IP(address), port, chan ); - - return( ret ); +int DL_send_gen(channel chan, const sys_scatter *scat) +{ + return DL_sendto_gen(chan, scat, NULL); } -int DL_recv( channel chan, sys_scatter *scat ) +/******************************************************************************** + ********************************************************************************/ + +int DL_recv_gen(channel chan, sys_scatter *scat) { - return( DL_recvfrom( chan, scat, NULL, NULL ) ); + return DL_recvfrom_gen(chan, scat, NULL); } -int DL_recvfrom( channel chan, sys_scatter *scat, int *src_address, unsigned short *src_port ) +/******************************************************************************** + ********************************************************************************/ + +int DL_sendto_gen(channel chan, const sys_scatter *scat, const spu_addr *dst) { -#ifndef ARCH_SCATTER_NONE -static struct msghdr msg; + int ret = -1; + socklen_t dst_len = (dst != NULL ? spu_addr_len(dst) : 0); + size_t tot_len = 0; + size_t new_len; + size_t i; +#ifdef ARCH_SCATTER_NONE + char sendto_buf[1500]; /* big enough for any fast ethernet packet */ + char *sendto_ptr = sendto_buf; #else -static char pseudo_scat[MAX_PACKET_SIZE]; - int bytes_to_copy; - int total_len; - int start; - int i; + struct msghdr msg = { 0 }; + + msg.msg_name = (caddr_t) dst; + msg.msg_namelen = dst_len; + msg.msg_iov = (struct iovec*) scat->elements; + msg.msg_iovlen = (int) scat->num_elements; #endif + if (scat->num_elements > ARCH_SCATTER_SIZE) + { + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_sendto_gen: illegal scat->num_elements (%lu) > ARCH_SCATTER_SIZE (%lu)\n", + (unsigned long) scat->num_elements, (unsigned long) ARCH_SCATTER_SIZE); + sock_set_errno(EINVAL); + goto END; + } +#ifdef ARCH_SCATTER_NONE + else if (scat->num_elements == 1) + { + sendto_ptr = scat->elements[0].buf; /* NOTE: avoid unnecessary memcpy */ + tot_len = scat->elements[0].len; + } +#endif + else + { + for (i = 0, tot_len = 0; i < scat->num_elements; ++i, tot_len = new_len) + { + new_len = tot_len + scat->elements[i].len; - struct sockaddr_in source_address; - int sip; - unsigned short sport; - socklen_t sa_len; - int ret; + if (new_len < tot_len) /* rollover */ + { + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_sendto_gen: scat so big it caused rollover (%lu + %lu -> %lu) > max allowed (%lu)\n", + (unsigned long) tot_len, (unsigned long) scat->elements[i].len, (unsigned long) new_len, (unsigned long) (size_t) -1); + sock_set_errno(EINVAL); + goto END; + } + } + +#ifdef ARCH_SCATTER_NONE + + if (tot_len > sizeof(sendto_buf) && NULL == (sendto_ptr = (char*) malloc(tot_len))) + { + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_sendto_gen: malloc(%lu) failed\n", (unsigned long) tot_len); + sock_set_errno(ENOMEM); + goto END; + } - /* check the scat is small enough to be a sys_scatter */ - - if( scat->num_elements > ARCH_SCATTER_SIZE ) { - Alarmp( SPLOG_FATAL, DATA_LINK, "DL_recvfrom: illegal scat->num_elements (%d) > ARCH_SCATTER_SIZE (%d)\n", - (int) scat->num_elements, (int) ARCH_SCATTER_SIZE ); + for (i = 0, new_len = 0; i < scat->num_elements && new_len < tot_len; new_len += scat->elements[i++].len) + memcpy(&sendto_ptr[new_len], scat->elements[i].buf, scat->elements[i].len); +#endif } -#ifndef ARCH_SCATTER_NONE - memset( &msg, 0, sizeof( msg ) ); - msg.msg_name = (caddr_t) &source_address; - msg.msg_namelen = sizeof( source_address ); - msg.msg_iov = (struct iovec *) scat->elements; - msg.msg_iovlen = scat->num_elements; +#ifdef ARCH_SCATTER_NONE + ret = sendto(chan, sendto_ptr, tot_len, 0, (struct sockaddr *) dst, dst_len); +#else + ret = sendmsg(chan, &msg, 0); #endif -#ifndef ARCH_SCATTER_NONE - ret = recvmsg( chan, &msg, 0 ); - sa_len = msg.msg_namelen; -#else + if (ret < 0) /* rare */ + { + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_sendto_gen: error: %d %d '%s' sending on channel %d\n", ret, sock_errno, sock_strerror(sock_errno), (int) chan); + goto END; + } + else if ((size_t) ret < tot_len) /* can commonly occur on TCP channels; shouldn't happen on UDP */ + { + if (ALARMP_NEEDED(SPLOG_INFO, DATA_LINK)) + Alarmp(SPLOG_INFO, DATA_LINK, "DL_sendto_gen: partial send: %d out of %lu bytes sent on channel %d\n", ret, (unsigned long) tot_len, (int) chan); + } + else if ((size_t) ret != tot_len) /* shouldn't happen */ + { + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_sendto_gen: sent more bytes (%d) than requested (%lu) on channel %d?!\n", ret, (unsigned long) tot_len, (int) chan); + sock_set_errno(EIO); + ret = -1; + goto END; + } + /* else: ret == tot_len: success! */ + +END: - total_len = 0; - for( i=0; i < (int) scat->num_elements; ++i ) - total_len += scat->elements[i].len; - - if( total_len > MAX_PACKET_SIZE ) /* this is for TCP, to not receive more than one packet */ - total_len = MAX_PACKET_SIZE; +#ifdef ARCH_SCATTER_NONE + if (sendto_ptr != sendto_buf && sendto_ptr != NULL && scat->num_elements != 1) + free(sendto_ptr); +#endif - sa_len = sizeof(source_address); - ret = recvfrom( chan, pseudo_scat, total_len, 0, (struct sockaddr *) &source_address, &sa_len); + /* NOTE: it is uncommon for (SPLOG_DEBUG, DATA_LINK) to be active; so conditionally skip needless calls to Alarmp */ - for( i=0, total_len = ret, start =0; total_len > 0; i++) + if (ALARMP_NEEDED(SPLOG_DEBUG, DATA_LINK)) { - bytes_to_copy = scat->elements[i].len; - if( bytes_to_copy > total_len ) bytes_to_copy = total_len; - memcpy( scat->elements[i].buf, &pseudo_scat[start], - bytes_to_copy ); - total_len-= scat->elements[i].len; - start += scat->elements[i].len; + char alarm_msg[256], *c = alarm_msg, *e = alarm_msg + sizeof(alarm_msg); + + c += snprintf(c, SPCLAMP(c, e), "DL_sendto_gen: ret = %d, tried to send a message of %lu bytes on channel %d", ret, (unsigned long) tot_len, (int) chan); + + if (dst != NULL) + { + c += snprintf(c, SPCLAMP(c, e), "; dst family: %d; dst addr: '%s'", dst->addr.sa_family, SPU_ADDR_NTOP(dst)); + + if (dst->addr.sa_family == AF_INET || dst->addr.sa_family == AF_INET6) + c += snprintf(c, SPCLAMP(c, e), "; dst port: %u", (unsigned) spu_addr_ip_get_port(dst)); + } + + if (c < e) + *(c++) = '\n'; + + if (c < e) + *(c++) = '\0'; + + alarm_msg[sizeof(alarm_msg) - 1] = '\0'; + + Alarmp(SPLOG_DEBUG, DATA_LINK, "%s", alarm_msg); } -#endif /* ARCH_SCATTER_NONE */ - if (ret < 0) + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +int DL_recvfrom_gen(channel chan, sys_scatter *scat, spu_addr *src) +{ + int ret = -1; + socklen_t src_len = (src != NULL ? sizeof(*src) : 0); + size_t tot_len = 0; + size_t new_len; + size_t i; +#ifdef ARCH_SCATTER_NONE + char recvfrom_buf[1500]; /* big enough for any fast ethernet packet */ + char *recvfrom_ptr = recvfrom_buf; + size_t start; +#else + struct msghdr msg = { 0 }; + + msg.msg_name = (caddr_t) src; + msg.msg_namelen = src_len; + msg.msg_iov = (struct iovec *) scat->elements; + msg.msg_iovlen = (int) scat->num_elements; +#endif + if (scat->num_elements > ARCH_SCATTER_SIZE) { - Alarm( DATA_LINK, "DL_recv: error %d receiving on channel %d\n", ret, chan ); - return( -1 ); + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_recvfrom_gen: illegal scat->num_elements (%lu) > ARCH_SCATTER_SIZE (%lu)\n", + (unsigned long) scat->num_elements, (unsigned long) ARCH_SCATTER_SIZE); + + sock_set_errno(EINVAL); + goto END; + } +#ifdef ARCH_SCATTER_NONE + else if (scat->num_elements == 1) + { + recvfrom_ptr = scat->elements[0].buf; /* NOTE: avoid unnecessary memcpy */ + tot_len = scat->elements[0].len; + } +#endif + else + { + for (i = 0, tot_len = 0; i < scat->num_elements; ++i, tot_len = new_len) + { + new_len = tot_len + scat->elements[i].len; + + if (new_len < tot_len) /* rollover */ + { + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_recvfrom_gen: scat so big it caused rollover (%lu + %lu -> %lu) > max allowed (%lu)\n", + (unsigned long) tot_len, (unsigned long) scat->elements[i].len, (unsigned long) new_len, (unsigned long) -1); + sock_set_errno(EINVAL); + goto END; + } + } + +#ifdef ARCH_SCATTER_NONE + + if (tot_len > sizeof(recvfrom_buf) && NULL == (recvfrom_ptr = (char*) malloc(tot_len))) + { + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_recvfrom_gen: malloc(%lu) failed\n", (unsigned long) tot_len); + sock_set_errno(ENOMEM); + goto END; + } +#endif + } + +#ifdef ARCH_SCATTER_NONE + ret = recvfrom(chan, recvfrom_ptr, tot_len, 0, (struct sockaddr *) src, &src_len); +#else + ret = recvmsg(chan, &msg, 0); + src_len = msg.msg_namelen; +#endif + + if (ret < 0) /* rare */ + { + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_recvfrom_gen: error: %d %d '%s' receiving on channel %d\n", ret, sock_errno, sock_strerror(sock_errno), (int) chan); + goto END; } -#ifdef ARCH_SCATTER_CONTROL - else if (ret == 0) + else if ((size_t) ret > tot_len) /* shouldn't happen */ { - char *sptr; - unsigned short port; - Alarm( DATA_LINK, "DL_recv: received zero length packet on channel %d flags 0x%x msg_len %d\n", chan, msg.msg_flags, msg.msg_namelen); - if (msg.msg_namelen >= sizeof(struct sockaddr_in) ) { - sptr = (char *) inet_ntoa(source_address.sin_addr); - port = Flip_int16(source_address.sin_port); - Alarm( DATA_LINK, "\tfrom %s with family %d port %d\n", sptr, source_address.sin_family, port ); - } -#ifdef MSG_BCAST - if ( msg.msg_flags & MSG_BCAST ) - { - Alarm( DATA_LINK, "\t(BROADCAST)"); - } + Alarmp(SPLOG_ERROR, DATA_LINK, "DL_recvfrom_gen: received more bytes (%d) than requested (%lu) on channel %d?!\n", ret, (unsigned long) tot_len, (int) chan); + sock_set_errno(EIO); + ret = -1; + goto END; + } + +#ifdef ARCH_SCATTER_NONE + + if (scat->num_elements != 1) + { + size_t next_start; + + for (i = 0, start = 0, new_len = (size_t) ret; i < scat->num_elements && (next_start = start + scat->elements[i].len) < new_len; ++i, start = next_start) + memcpy(scat->elements[i].buf, &recvfrom_ptr[start], scat->elements[i].len); + + if (i < scat->num_elements) + memcpy(scat->elements[i].buf, &recvfrom_ptr[start], new_len - start); + } #endif -#ifdef MSG_MCAST - if ( msg.msg_flags & MSG_MCAST ) - { - Alarm( DATA_LINK, "\t(MULTICAST)"); - } + +END: + +#ifdef ARCH_SCATTER_NONE + if (recvfrom_ptr != recvfrom_buf && recvfrom_ptr != NULL && scat->num_elements != 1) + free(recvfrom_ptr); #endif -#ifdef MSG_TRUNC - if ( msg.msg_flags & MSG_TRUNC ) - { - Alarm( DATA_LINK, "\t(Data TRUNCATED)"); - } -#endif -#ifdef MSG_CTRUNC - if ( msg.msg_flags & MSG_CTRUNC ) - { - Alarm( DATA_LINK, "\t(Control TRUNCATED)"); - } -#endif - Alarm( DATA_LINK, "\n"); + + /* NOTE: it is uncommon for (SPLOG_DEBUG, DATA_LINK) to be active; conditionally skip needless calls to Alarmp */ + + if (ALARMP_NEEDED(SPLOG_DEBUG, DATA_LINK)) + { + char alarm_msg[256], *c = alarm_msg, *e = alarm_msg + sizeof(alarm_msg); + + c += snprintf(c, SPCLAMP(c, e), "DL_recvfrom_gen: ret = %d; tried to recv up to %lu bytes on channel %d", ret, (unsigned long) tot_len, (int) chan); + + if (ret >= 0 && src != NULL && src_len > 0) + { + c += snprintf(c, SPCLAMP(c, e), "; src family: %d; src addr: '%s'", src->addr.sa_family, SPU_ADDR_NTOP(src)); + + if (src->addr.sa_family == AF_INET || src->addr.sa_family == AF_INET6) + c += snprintf(c, SPCLAMP(c, e), "; src port: %u", (unsigned) spu_addr_ip_get_port(src)); + } + + if (c < e) + *(c++) = '\n'; + + if (c < e) + *(c++) = '\0'; + + alarm_msg[sizeof(alarm_msg) - 1] = '\0'; + + Alarmp(SPLOG_DEBUG, DATA_LINK, "%s", alarm_msg); } -#endif - /* Report the source address and port if requested by caller */ - if (sa_len >= sizeof(struct sockaddr_in) ) { - memcpy(&sip, &source_address.sin_addr, sizeof(int32) ); - sip = Flip_int32(sip); - if (src_address != NULL) - *src_address = sip; - sport = Flip_int16(source_address.sin_port); - if (src_port != NULL) - *src_port = sport; - Alarm( DATA_LINK, "\tfrom (" IPF ") with family %d port %d\n", IP(sip), source_address.sin_family, sport ); - } - Alarm( DATA_LINK, "DL_recv: received %d bytes on channel %d\n", - ret, chan ); - return(ret); + return ret; } + +/******************************************************************************** + ********************************************************************************/ Modified: libspreadutil/trunk/src/defines.h =================================================================== --- libspreadutil/trunk/src/defines.h 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/src/defines.h 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2013 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. Modified: libspreadutil/trunk/src/events.c =================================================================== --- libspreadutil/trunk/src/events.c 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/src/events.c 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2013 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. @@ -38,15 +39,17 @@ #include "arch.h" -/* undef redefined variables under windows */ +/* NOTE: undef redefined errno values under windows in arch.h */ #ifdef ARCH_PC_WIN95 -#undef EINTR -#undef EAGAIN -#undef EWOULDBLOCK -#undef EINPROGRESS -#undef EALREADY +# undef EINVAL +# undef EINTR +# undef EAGAIN +# undef EWOULDBLOCK +# undef EINPROGRESS +# undef EALREADY +# undef EIO +# undef ENOMEM #endif - #include #ifndef ARCH_PC_WIN95 @@ -58,7 +61,7 @@ #include #else /* ARCH_PC_WIN95 */ -#include +#include #include #endif /* ARCH_PC_WIN95 */ @@ -95,8 +98,6 @@ fd_event events[MAX_FD_EVENTS]; } fd_queue; -static sp_time E_get_time_monotonic(void); - static time_event *Time_queue; static sp_time Now; @@ -134,7 +135,7 @@ ret = Mem_init_object(TIME_EVENT, "time_event", sizeof(time_event), 100,0); if (ret < 0) { - Alarm(EXIT, "E_Init: Failure to Initialize TIME_EVENT memory objects\n"); + Alarmp(SPLOG_FATAL, EVENTS, "E_Init: Failure to Initialize TIME_EVENT memory objects\n"); } for ( i=0; i < NUM_PRIORITY; i++ ) @@ -150,33 +151,27 @@ E_get_time_monotonic(); - Alarm( EVENTS, "E_init: went ok\n"); + Alarmp( SPLOG_INFO, EVENTS, "E_init: went ok\n"); return( 0 ); } sp_time E_get_time(void) +#ifndef ARCH_PC_WIN95 { - sp_time t; + struct timeval read_time; + sp_time t; -#ifndef ARCH_PC_WIN95 - struct timeval read_time; - -#if HAVE_STRUCT_TIMEZONE - struct timezone dummy_tz; -#else - sp_time dummy_tz; -#endif - int ret; - - ret = gettimeofday( &read_time, &dummy_tz ); - if ( ret < 0 ) Alarm( EXIT, "E_get_time: gettimeofday problems.\n" ); + gettimeofday( &read_time, NULL ); t.sec = read_time.tv_sec; t.usec = read_time.tv_usec; + return t; +} #else /* ARCH_PC_WIN95 */ - +{ struct _timeb timebuffer; + sp_time t; _ftime( &timebuffer ); @@ -184,71 +179,102 @@ t.usec = (long) timebuffer.millitm; t.usec *= 1000; + return t; +} #endif /* ARCH_PC_WIN95 */ -#if 0 - Alarm( EVENTS, "E_get_time: time is (%d, %d)\n", t.sec, t.usec); -#endif - return ( t ); -} -static sp_time E_get_time_monotonic(void) +/* TODO: add a monotonic clock for Windows (QueryPerformanceCounter, QueryPerformanceFrequency), OSX too */ +/* TODO: implement division as 64b multiplication by a fixed point reciprocal: http://homepage.divms.uiowa.edu/~jones/bcd/divide.html */ + +sp_time E_get_time_monotonic(void) #ifdef HAVE_CLOCK_GETTIME_CLOCK_MONOTONIC { - struct timespec t; + struct timespec t; - if (clock_gettime(CLOCK_MONOTONIC, &t) != 0) { - Alarm( EXIT, "E_get_time_monotonic: clock_gettime problems: %d '%s'\n", errno, strerror(errno) ); - } + clock_gettime( CLOCK_MONOTONIC, &t ); + Now.sec = (long) t.tv_sec; + Now.usec = (long) ( ( t.tv_nsec + 500 ) / 1000 ); - Now.sec = t.tv_sec; - Now.usec = (t.tv_nsec + 500) / 1000; - - return Now; + return Now; } #else { - Now = E_get_time(); + Now = E_get_time(); - return Now; + return Now; } #endif -sp_time E_sub_time( sp_time t, sp_time delta_t ) +sp_time E_neg_time( sp_time t ) { - sp_time res; + t.sec = -t.sec; + t.usec = -t.usec; - res.sec = t.sec - delta_t.sec; - res.usec = t.usec - delta_t.usec; - if ( res.usec < 0 ) - { - res.usec = res.usec + 1000000; - res.sec--; - } - if ( res.sec < 0 ) Alarm( EVENTS, "E_sub_time: negative time result.\n"); - return ( res ); + return t; } sp_time E_add_time( sp_time t, sp_time delta_t ) { - sp_time res; + /* we assume that .usec is in open range (-1000000, +1000000) */ + + t.sec += delta_t.sec; + t.usec += delta_t.usec; - res.sec = t.sec + delta_t.sec; - res.usec = t.usec + delta_t.usec; - if ( res.usec > 1000000 ) + /* force .usec to be back in open range (-1000000, +1000000) */ + + if ( t.usec >= 1000000 ) { - res.usec = res.usec - 1000000; - res.sec++; + t.usec -= 1000000; + ++t.sec; } - return ( res ); + else if ( t.usec <= -1000000 ) + { + t.usec += 1000000; + --t.sec; + } + + /* enforce that .sec and .usec have same sign */ + + if ( t.sec > 0 ) + { + if ( t.usec < 0 ) + { + t.usec += 1000000; + --t.sec; + } + } + else if ( t.sec < 0 ) + { + if ( t.usec > 0 ) + { + t.usec -= 1000000; + ++t.sec; + } + } + + return t; } +sp_time E_sub_time( sp_time t, sp_time delta_t ) +{ + return E_add_time( t, E_neg_time( delta_t ) ); +} + int E_compare_time( sp_time t1, sp_time t2 ) { - if ( t1.sec > t2.sec ) return ( 1 ); - else if ( t1.sec < t2.sec ) return ( -1 ); - else if ( t1.usec > t2.usec ) return ( 1 ); - else if ( t1.usec < t2.usec ) return ( -1 ); - else return ( 0 ); + if ( t1.sec > t2.sec ) + return 1; + + if ( t1.sec < t2.sec ) + return -1; + + if ( t1.usec > t2.usec ) + return 1; + + if ( t1.usec < t2.usec ) + return -1; + + return 0; } int E_queue( void (* func)( int code, void *data ), int code, void *data, @@ -280,14 +306,14 @@ Time_queue = Time_queue->next; dispose( t_pre ); deleted = 1; - Alarm( EVENTS, "E_queue: dequeued a (first) simillar event\n" ); + Alarmp( SPLOG_INFO, EVENTS, "E_queue: dequeued a (first) simillar event\n" ); } } if( Time_queue == NULL ) { t_e->next = NULL; Time_queue = t_e; - Alarm( EVENTS, "E_queue: (only) event queued func 0x%x code %d data 0x%x in future (%u:%u)\n",t_e->func,t_e->code, t_e->data, delta_time.sec, delta_time.usec ); + Alarmp( SPLOG_INFO, EVENTS, "E_queue: (only) event queued func 0x%x code %d data 0x%x in future (%u:%u)\n",t_e->func,t_e->code, t_e->data, delta_time.sec, delta_time.usec ); return( 0 ); }else{ compare = E_compare_time ( t_e->t, Time_queue->t ); @@ -296,7 +322,7 @@ t_e->next = Time_queue; Time_queue = t_e; inserted = 1; - Alarm( EVENTS, "E_queue: (first) event queued func 0x%x code %d data 0x%x in future (%u:%u)\n",t_e->func,t_e->code, t_e->data, delta_time.sec,delta_time.usec ); + Alarmp( SPLOG_INFO, EVENTS, "E_queue: (first) event queued func 0x%x code %d data 0x%x in future (%u:%u)\n",t_e->func,t_e->code, t_e->data, delta_time.sec,delta_time.usec ); } } t_pre = Time_queue ; @@ -311,7 +337,7 @@ dispose( t_post ); t_post = t_pre->next; deleted = 1; - Alarm( EVENTS, "E_queue: dequeued a simillar event\n" ); + Alarmp( SPLOG_INFO, EVENTS, "E_queue: dequeued a simillar event\n" ); continue; } @@ -323,7 +349,7 @@ t_pre->next = t_e; t_e->next = t_post; inserted = 1; - Alarm( EVENTS, "E_queue: event queued for func 0x%x code %d data 0x%x in future (%u:%u)\n",t_e->func,t_e->code, t_e->data, delta_time.sec, delta_time.usec ); + Alarmp( SPLOG_INFO, EVENTS, "E_queue: event queued for func 0x%x code %d data 0x%x in future (%u:%u)\n",t_e->func,t_e->code, t_e->data, delta_time.sec, delta_time.usec ); } } @@ -335,7 +361,7 @@ { t_pre->next = t_e; t_e->next = NULL; - Alarm( EVENTS, "E_queue: (last) event queued func 0x%x code %d data 0x%x in future (%u:%u)\n",t_e->func,t_e->code, t_e->data, delta_time.sec,delta_time.usec ); + Alarmp( SPLOG_INFO, EVENTS, "E_queue: (last) event queued func 0x%x code %d data 0x%x in future (%u:%u)\n",t_e->func,t_e->code, t_e->data, delta_time.sec,delta_time.usec ); } return( 0 ); @@ -349,7 +375,7 @@ if( Time_queue == NULL ) { - Alarm( EVENTS, "E_dequeue: no such event\n" ); + Alarmp( SPLOG_INFO, EVENTS, "E_dequeue: no such event\n" ); return( -1 ); } @@ -360,7 +386,7 @@ t_ptr = Time_queue; Time_queue = Time_queue->next; dispose( t_ptr ); - Alarm( EVENTS, "E_dequeue: first event dequeued func 0x%x code %d data 0x%x\n",func,code, data); + Alarmp( SPLOG_INFO, EVENTS, "E_dequeue: first event dequeued func 0x%x code %d data 0x%x\n",func,code, data); return( 0 ); } @@ -374,13 +400,13 @@ { t_pre->next = t_ptr->next; dispose( t_ptr ); - Alarm( EVENTS, "E_dequeue: event dequeued func 0x%x code %d data 0x%x\n",func,code, data); + Alarmp( SPLOG_INFO, EVENTS, "E_dequeue: event dequeued func 0x%x code %d data 0x%x\n",func,code, data); return( 0 ); } t_pre = t_ptr; } - Alarm( EVENTS, "E_dequeue: no such event\n" ); + Alarmp( SPLOG_INFO, EVENTS, "E_dequeue: no such event\n" ); return( -1 ); } @@ -392,7 +418,7 @@ if( Time_queue == NULL ) { - Alarm( EVENTS, "E_in_queue: no such event\n" ); + Alarmp( SPLOG_INFO, EVENTS, "E_in_queue: no such event\n" ); return( 0 ); } @@ -400,7 +426,7 @@ Time_queue->data == data && Time_queue->code == code ) { - Alarm( EVENTS, "E_in_queue: found event in queue func 0x%x code %d data 0x%x\n",func,code, data); + Alarmp( SPLOG_INFO, EVENTS, "E_in_queue: found event in queue func 0x%x code %d data 0x%x\n",func,code, data); return( 1 ); } @@ -412,13 +438,13 @@ t_ptr->data == data && t_ptr->code == code ) { - Alarm( EVENTS, "E_in_queue: found event in queue func 0x%x code %d data 0x%x\n",func,code, data); + Alarmp( SPLOG_INFO, EVENTS, "E_in_queue: found event in queue func 0x%x code %d data 0x%x\n",func,code, data); return(1); } t_pre = t_ptr; } - Alarm( EVENTS, "E_in_queue: no such event\n" ); + Alarmp( SPLOG_INFO, EVENTS, "E_in_queue: no such event\n" ); return( 0 ); } @@ -433,7 +459,7 @@ #ifndef ARCH_PC_WIN95 if (select(0, NULL, NULL, NULL, &tmp_t ) < 0) { - Alarm( EVENTS, "E_delay: select delay returned error: %s\n", strerror(errno)); + Alarmp( SPLOG_INFO, EVENTS, "E_delay: select delay returned error: %s\n", strerror(errno)); } #else /* ARCH_PC_WIN95 */ SleepEx( tmp_t.tv_sec*1000+tmp_t.tv_usec/1000, 0 ); @@ -509,7 +535,7 @@ if ( (fev != NULL && tev != NULL) || (fev == NULL && tev == NULL) ) { - Alarm( EXIT, "E_time_events: Bug! called with invalid fev (0x%x) and tev (0x%x) pointers. Exactly one must be non NULL\n", fev, tev); + Alarmp( SPLOG_FATAL, EVENTS, "E_time_events: Bug! called with invalid fev (0x%x) and tev (0x%x) pointers. Exactly one must be non NULL\n", fev, tev); } ev_dur = E_sub_time( stop, start ); @@ -561,14 +587,14 @@ int num_fds; int j; - if( priority < 0 || priority > NUM_PRIORITY ) + if( priority < 0 || priority >= NUM_PRIORITY ) { - Alarm( PRINT, "E_attach_fd: invalid priority %d for fd %d with fd_type %d\n", priority, fd, fd_type ); + Alarmp( SPLOG_PRINT, EVENTS, "E_attach_fd: invalid priority %d for fd %d with fd_type %d\n", priority, fd, fd_type ); return( -1 ); } - if( fd_type < 0 || fd_type > NUM_FDTYPES ) + if( fd_type < 0 || fd_type >= NUM_FDTYPES ) { - Alarm( PRINT, "E_attach_fd: invalid fd_type %d for fd %d with priority %d\n", fd_type, fd, priority ); + Alarmp( SPLOG_PRINT, EVENTS, "E_attach_fd: invalid fd_type %d for fd %d with priority %d\n", fd_type, fd, priority ); return( -1 ); } #ifndef ARCH_PC_WIN95 @@ -577,7 +603,7 @@ */ if( fd < 0 || fd > FD_SETSIZE ) { - Alarm( PRINT, "E_attach_fd: invalid fd %d (max %d) with fd_type %d with priority %d\n", fd, FD_SETSIZE, fd_type, priority ); + Alarmp( SPLOG_PRINT, EVENTS, "E_attach_fd: invalid fd %d (max %d) with fd_type %d with priority %d\n", fd, FD_SETSIZE, fd_type, priority ); return( -1 ); } #endif @@ -591,7 +617,7 @@ if ( !(Fd_queue[priority].events[j].active) ) Fd_queue[priority].num_active_fds++; Fd_queue[priority].events[j].active = TRUE; - Alarm( EVENTS, + Alarmp( SPLOG_INFO, EVENTS, "E_attach_fd: fd %d with type %d exists & replaced & activated\n", fd, fd_type ); return( 1 ); } @@ -599,7 +625,7 @@ num_fds = Fd_queue[priority].num_fds; if ( num_fds == MAX_FD_EVENTS ) { - Alarm( PRINT, "E_attach_fd: Reached Maximum number of events. Recompile with larger MAX_FD_EVENTS\n"); + Alarmp( SPLOG_PRINT, EVENTS, "E_attach_fd: Reached Maximum number of events. Recompile with larger MAX_FD_EVENTS\n"); return( -1 ); } Fd_queue[priority].events[num_fds].fd = fd; @@ -612,7 +638,7 @@ Fd_queue[priority].num_active_fds++; if( Active_priority <= priority ) FD_SET( fd, &Fd_mask[fd_type] ); - Alarm( EVENTS, "E_attach_fd: fd %d, fd_type %d, code %d, data 0x%x, priority %d Active_priority %d\n", + Alarmp( SPLOG_INFO, EVENTS, "E_attach_fd: fd %d, fd_type %d, code %d, data 0x%x, priority %d Active_priority %d\n", fd, fd_type, code, data, priority, Active_priority ); return( 0 ); @@ -623,9 +649,9 @@ int i; int found; - if( fd_type < 0 || fd_type > NUM_FDTYPES ) + if( fd_type < 0 || fd_type >= NUM_FDTYPES ) { - Alarm( PRINT, "E_detach_fd: invalid fd_type %d for fd %d\n", fd_type, fd ); + Alarmp( SPLOG_PRINT, EVENTS, "E_detach_fd: invalid fd_type %d for fd %d\n", fd_type, fd ); return( -1 ); } @@ -648,9 +674,9 @@ int i; int found; - if( fd_type < 0 || fd_type > NUM_FDTYPES ) + if( fd_type < 0 || fd_type >= NUM_FDTYPES ) { - Alarm( PRINT, "E_detach_fd: invalid fd_type %d for fd %d\n", fd_type, fd ); + Alarmp( SPLOG_PRINT, EVENTS, "E_detach_fd: invalid fd_type %d for fd %d\n", fd_type, fd ); return( -1 ); } @@ -681,9 +707,9 @@ int i,j; int found; - if( fd_type < 0 || fd_type > NUM_FDTYPES ) + if( fd_type < 0 || fd_type >= NUM_FDTYPES ) { - Alarm( PRINT, "E_deactivate_fd: invalid fd_type %d for fd %d\n", fd_type, fd ); + Alarmp( SPLOG_PRINT, EVENTS, "E_deactivate_fd: invalid fd_type %d for fd %d\n", fd_type, fd ); return( -1 ); } @@ -713,9 +739,9 @@ int i,j; int found; - if( fd_type < 0 || fd_type > NUM_FDTYPES ) + if( fd_type < 0 || fd_type >= NUM_FDTYPES ) { - Alarm( PRINT, "E_activate_fd: invalid fd_type %d for fd %d\n", fd_type, fd ); + Alarmp( SPLOG_PRINT, EVENTS, "E_activate_fd: invalid fd_type %d for fd %d\n", fd_type, fd ); return( -1 ); } @@ -745,9 +771,9 @@ int fd_type; int i,j; - if( priority < 0 || priority > NUM_PRIORITY ) + if( priority < 0 || priority >= NUM_PRIORITY ) { - Alarm( PRINT, "E_set_active_threshold: invalid priority %d\n", priority ); + Alarmp( SPLOG_PRINT, EVENTS, "E_set_active_threshold: invalid priority %d\n", priority ); return( -1 ); } @@ -767,16 +793,16 @@ FD_SET( Fd_queue[i].events[j].fd, &Fd_mask[fd_type] ); } - Alarm( EVENTS, "E_set_active_threshold: changed to %d\n",Active_priority); + Alarmp( SPLOG_INFO, EVENTS, "E_set_active_threshold: changed to %d\n",Active_priority); return( priority ); } int E_num_active( int priority ) { - if( priority < 0 || priority > NUM_PRIORITY ) + if( priority < 0 || priority >= NUM_PRIORITY ) { - Alarm( PRINT, "E_num_active: invalid priority %d\n", priority ); + Alarmp( SPLOG_PRINT, EVENTS, "E_num_active: invalid priority %d\n", priority ); return( -1 ); } return( Fd_queue[priority].num_active_fds ); @@ -810,7 +836,7 @@ #endif for( Exit_events = 0 ; !Exit_events ; ) { - Alarm( EVENTS, "E_handle_events: next event \n"); + Alarmp( SPLOG_INFO, EVENTS, "E_handle_events: next event \n"); /* Handle time events */ timeout = long_timeout; @@ -835,9 +861,9 @@ #endif temp_ptr = Time_queue; Time_queue = Time_queue->next; - Alarm( EVENTS, "E_handle_events: exec time event \n"); + Alarmp( SPLOG_INFO, EVENTS, "E_handle_events: exec time event \n"); #ifdef TESTTIME - Alarm( DEBUG, "Events: TimeEv is %d %d late\n",tmp_late.sec, tmp_late.usec); + Alarmp( SPLOG_DEBUG, EVENTS, "Events: TimeEv is %d %d late\n",tmp_late.sec, tmp_late.usec); #endif ev_start = Now; temp_ptr->func( temp_ptr->code, temp_ptr->data ); @@ -861,14 +887,14 @@ #ifdef TESTTIME stop = E_get_time_monotonic(); tmp_late = E_sub_time(stop, start); - Alarm(DEBUG, "Events: TimeEv's took %d %d to handle\n", tmp_late.sec, tmp_late.usec); + Alarmp( SPLOG_DEBUG, EVENTS, "Events: TimeEv's took %d %d to handle\n", tmp_late.sec, tmp_late.usec); #endif /* Handle fd events */ for( i=0; i < NUM_FDTYPES; i++ ) { current_mask[i] = Fd_mask[i]; } - Alarm( EVENTS, "E_handle_events: poll select\n"); + Alarmp( SPLOG_INFO, EVENTS, "E_handle_events: poll select\n"); #ifdef TESTTIME req_time = zero_sec; #endif @@ -885,7 +911,7 @@ { current_mask[i] = Fd_mask[i]; } - Alarm( EVENTS, "E_handle_events: select with timeout (%d, %d)\n", + Alarmp( SPLOG_INFO, EVENTS, "E_handle_events: select with timeout (%d, %d)\n", timeout.sec,timeout.usec ); #ifdef TESTTIME req_time = E_add_time(req_time, timeout); @@ -898,7 +924,7 @@ #ifdef TESTTIME start = E_get_time_monotonic(); tmp_late = E_sub_time(start, stop); - Alarm( DEBUG, "Events: Waiting for fd or timout took %d %d asked for %d %d\n", tmp_late.sec, tmp_late.usec, req_time.sec, req_time.usec); + Alarmp( SPLOG_DEBUG, EVENTS, "Events: Waiting for fd or timout took %d %d asked for %d %d\n", tmp_late.sec, tmp_late.usec, req_time.sec, req_time.usec); #endif /* Handle all high and medium priority fd events */ for( i=NUM_PRIORITY-1,treated=0; @@ -911,7 +937,7 @@ fd_type = Fd_queue[i].events[j].fd_type; if( FD_ISSET( fd, ¤t_mask[fd_type] ) ) { - Alarm( EVENTS, "E_handle_events: exec handler for fd %d, fd_type %d, priority %d\n", + Alarmp( SPLOG_INFO, EVENTS, "E_handle_events: exec handler for fd %d, fd_type %d, priority %d\n", fd, fd_type, i ); #ifdef BADCLOCK Now = E_add_time( Now, mili_sec ); @@ -950,7 +976,7 @@ #ifdef TESTTIME stop = E_get_time_monotonic(); tmp_late = E_sub_time(stop, start); - Alarm(DEBUG, "Events: High & Med took %d %d time to handle\n", tmp_late.sec, tmp_late.usec); + Alarmp(SPLOG_DEBUG, EVENTS, "Events: High & Med took %d %d time to handle\n", tmp_late.sec, tmp_late.usec); #endif /* Handle one low priority fd event. However, verify that Active_priority still allows LOW_PRIORITY events. @@ -968,7 +994,7 @@ { Round_robin = ( j + 1 ) % Fd_queue[LOW_PRIORITY].num_fds; - Alarm( EVENTS , "E_handle_events: exec ext fd event \n"); + Alarmp( SPLOG_INFO, EVENTS , "E_handle_events: exec ext fd event \n"); #ifdef BADCLOCK Now = E_add_time( Now, mili_sec ); clock_sync++; @@ -997,7 +1023,7 @@ #ifdef TESTTIME start = E_get_time_monotonic(); tmp_late = E_sub_time(start, stop); - Alarm(DEBUG, "Events: Low priority took %d %d to handle\n", tmp_late.sec, tmp_late.usec); + Alarmp(SPLOG_DEBUG, EVENTS, "Events: Low priority took %d %d to handle\n", tmp_late.sec, tmp_late.usec); #endif } end_handler: @@ -1009,14 +1035,14 @@ */ if (Exit_events == SPU_EVENTS_EXIT_ASYNC_SAFE) - Alarm(EVENTS, "E_handle_events: exiting due to call to E_exit_events_async_safe() (e.g. - signal handler)\n"); + Alarmp(SPLOG_INFO, EVENTS, "E_handle_events: exiting due to call to E_exit_events_async_safe() (e.g. - signal handler)\n"); return; } void E_exit_events(void) { - Alarm( EVENTS, "E_exit_events:\n"); + Alarmp( SPLOG_INFO, EVENTS, "E_exit_events:\n"); Exit_events = SPU_EVENTS_EXIT_NORMAL; } Modified: libspreadutil/trunk/src/memory.c =================================================================== --- libspreadutil/trunk/src/memory.c 2018-08-20 20:40:04 UTC (rev 905) +++ libspreadutil/trunk/src/memory.c 2018-08-20 21:16:48 UTC (rev 906) @@ -18,12 +18,13 @@ * The Creators of Spread are: * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. * - * Copyright (C) 1993-2013 Spread Concepts LLC + * Copyright (C) 1993-2016 Spread Concepts LLC * * All Rights Reserved. * * Major Contributor(s): * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. * Ryan Caudy rcaudy at gmail.com - contributions to process groups. * Claudiu Danilov claudiu at acm.org - scalable wide area support. * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. @@ -202,7 +203,7 @@ ret = Mem_init_object( obj_type, obj_name, size, threshold, initial ); if (ret < 0 ) { - Alarm( EXIT, "Mem_init_object_abort: Failed to initialize a/an %s object\n", obj_name); + Alarmp( SPLOG_FATAL, MEMORY, "Mem_init_object_abort: Failed to initialize a/an %s object\n", obj_name); } } /* Input: valid object type, name of object, threshold/watermark value for this object, initial objects to create @@ -276,7 +277,7 @@ head_ptr = (mem_header *) calloc(1, sizeof(mem_header) + sizeobj(obj_type) ); if (head_ptr == NULL) { - Alarm(MEMORY, "mem_init_object: Failure to calloc an initial object. Returning with existant buffers\n"); + Alarmp(SPLOG_INFO, MEMORY, "mem_init_object: Failure to calloc an initial object. Returning with existant buffers\n"); mem_error = 1; break; } @@ -352,7 +353,7 @@ head_ptr = (mem_header *) calloc(1, sizeof(mem_header) + sizeobj(obj_type) ); if (head_ptr == NULL) { - Alarm(MEMORY, "mem_alloc_object: Failure to calloc an object. Returning NULL object\n"); + Alarmp(SPLOG_INFO, MEMORY, "mem_alloc_object: Failure to calloc an object. Returning NULL object\n"); return(NULL); } head_ptr->obj_type = obj_type; @@ -411,7 +412,7 @@ printf("alloc:objtype = %u:\n", head_ptr->obj_type); printf("alloc:blocklen = %u:\n", head_ptr->block_len); #endif - Alarm(MEMORY, "new: creating pointer 0x%x to object type %d named %s\n", head_ptr + 1, obj_type, Objnum_to_String(obj_type)); + Alarmp(SPLOG_INFO, MEMORY, "new: creating pointer 0x%x to object type %d named %s\n", head_ptr + 1, obj_type, Objnum_to_String(obj_type)); return((void *) (head_ptr + 1)); } else @@ -448,7 +449,7 @@ printf("pool:objtype = %u:\n", mem_header_ptr((void *) body_ptr)->obj_type); printf("pool:blocklen = %u:\n", mem_header_ptr((void *) body_ptr)->block_len); #endif - Alarm(MEMORY, "new: reusing pointer 0x%x to object type %d named %s\n", body_ptr, obj_type, Objnum_to_String(obj_type)); + Alarmp(SPLOG_INFO, MEMORY, "new: reusing pointer 0x%x to object type %d named %s\n", body_ptr, obj_type, Objnum_to_String(obj_type)); return((void *) (body_ptr)); } @@ -475,7 +476,7 @@ head_ptr = (mem_header *) calloc(1, sizeof(mem_header) + length); if (head_ptr == NULL) { - Alarm(MEMORY, "mem_alloc: Failure to calloc a block. Returning NULL block\n"); + Alarmp(SPLOG_INFO, MEMORY, "mem_alloc: Failure to calloc a block. Returning NULL block\n"); return(NULL); } head_ptr->obj_type = BLOCK_OBJECT; @@ -565,7 +566,7 @@ assert(Mem_Obj_Allocated > 0); assert(Mem_Bytes_Allocated >= (mem_header_ptr(object)->block_len + sizeof(mem_header))); - Alarm(MEMORY, "dispose: disposing pointer 0x%x to object type %d named %s\n", object, obj_type, Objnum_to_String(obj_type)); + Alarmp(SPLOG_INFO, MEMORY, "dispose: disposing pointer 0x%x to object type %d named %s\n", object, obj_type, Objnum_to_String(obj_type)); Mem[obj_type].num_obj_inuse--; Mem_Obj_Inuse--; Copied: libspreadutil/trunk/src/spu_addr.c (from rev 905, libspreadutil/tags/5.0.1/src/spu_addr.c) =================================================================== --- libspreadutil/trunk/src/spu_addr.c (rev 0) +++ libspreadutil/trunk/src/spu_addr.c 2018-08-20 21:16:48 UTC (rev 906) @@ -0,0 +1,569 @@ +/* + * The Spread Toolkit. + * + * The contents of this file are subject to the Spread Open-Source + * License, Version 1.0 (the ``License''); you may not use + * this file except in compliance with the License. You may obtain a + * copy of the License at: + * + * http://www.spread.org/license/ + * + * or in the file ``license.txt'' found in this distribution. + * + * Software distributed under the License is distributed on an AS IS basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Creators of Spread are: + * Yair Amir, Michal Miskin-Amir, Jonathan Stanton, John Schultz. + * + * Copyright (C) 1993-2016 Spread Concepts LLC + * + * All Rights Reserved. + * + * Major Contributor(s): + * --------------- + * Amy Babay babay at cs.jhu.edu - accelerated ring protocol. + * Ryan Caudy rcaudy at gmail.com - contributions to process groups. + * Claudiu Danilov claudiu at acm.org - scalable wide area support. + * Cristina Nita-Rotaru crisn at cs.purdue.edu - group communication security. + * Theo Schlossnagle jesus at omniti.com - Perl, autoconf, old skiplist. + * Dan Schoenblum dansch at cnds.jhu.edu - Java interface. + * + */ + +#include +#include +#include +#include + +#ifndef SPU_ARCH_PC_WIN95 +# include +#endif + +#include "arch.h" +#include "spu_alarm.h" +#include "spu_addr.h" + +#ifndef GAI_STRERROR +# ifndef SPU_ARCH_PC_WIN95 +# define GAI_STRERROR(e) gai_strerror(e) +# else +# define GAI_STRERROR(e) sock_strerror(e) +# endif +#endif + +#ifndef EOVERFLOW +# ifndef SPU_ARCH_PC_WIN95 +# define EOVERFLOW EINVAL +# else +# define EOVERFLOW WSA_INVALID_PARAMETER +# endif +#endif + +/******************************************************************************** + ********************************************************************************/ + +char Spu_addr_ntop_buf[SPU_ADDR_STRSIZE]; + +/******************************************************************************** + ********************************************************************************/ + +#if !defined(AF_UNSPEC) || AF_UNSPEC != 0 +# error AF_UNSPEC is not defined or is non-zero?! +#endif + +static socklen_t spu_addr_len_low(const spu_addr *a) +{ + socklen_t ret = 0; /* return a length of 0 on unrecognized family to indicate error */ + + switch (a->addr.sa_family) + { + case AF_UNSPEC: + ret = sizeof(*a); + break; + + case AF_INET: + ret = sizeof(a->ipv4); + break; + + case AF_INET6: + ret = sizeof(a->ipv6); + break; + +#ifndef ARCH_PC_WIN95 + case AF_UNIX: + ret = sizeof(a->un); + break; +#endif + } + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +int spu_addr_from_sockaddr(spu_addr *a, const struct sockaddr *sa, socklen_t sa_len) +{ + if (sa_len > sizeof(*a)) + { + errno = EINVAL; + return -1; + } + + memmove(a, sa, sa_len); + memset((char*) a + sa_len, 0, sizeof(*a) - sa_len); + + return 0; +} + +/******************************************************************************** + * Simple wrapper around getaddrinfo that uses first returned address. + ********************************************************************************/ + +int spu_addr_from_str(spu_addr *a, const char *str, int pfamily, int is_numeric) +{ + struct addrinfo hint = { 0 }; + struct addrinfo *rslt = NULL; + int ret; + + hint.ai_family = pfamily; + hint.ai_flags = (is_numeric ? AI_NUMERICHOST : 0); + + if ((ret = getaddrinfo(str, NULL, &hint, &rslt))) + { + Alarmp(SPLOG_ERROR, DATA_LINK, "spu_addr_from_str: lookup on ('%s', %d, %d) failed: %d '%s'!\n", str, pfamily, is_numeric, ret, GAI_STRERROR(ret)); + goto FAIL; + } + + if (rslt == NULL) + { + Alarmp(SPLOG_ERROR, DATA_LINK, "spu_addr_from_str: BUG? Successful lookup on ('%s', %d, %d) returned no address!\n", str, pfamily, is_numeric); + ret = EAI_FAIL; + goto FAIL; + } + + if (rslt->ai_addr == NULL) + { + Alarmp(SPLOG_ERROR, DATA_LINK, "spu_addr_from_str: BUG? Successful lookup on ('%s', %d, %d) returned no address 2!\n", str, pfamily, is_numeric); + ret = EAI_FAIL; + goto FAIL_RSLT; + } + + if (spu_addr_from_sockaddr(a, rslt->ai_addr, rslt->ai_addrlen)) + { + Alarmp(SPLOG_ERROR, DATA_LINK, "spu_addr_from_str: BUG? spu_addr_from_sockaddr failed?!\n", str); + ret = EAI_FAIL; + goto FAIL_RSLT; + } + +FAIL_RSLT: + freeaddrinfo(rslt); + +FAIL: + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +int spu_addr_family(const spu_addr *a) +{ + return a->addr.sa_family; +} + +/******************************************************************************** + ********************************************************************************/ + +int spu_addr_ntop_r(const spu_addr *a, char *str, size_t n) +{ + socklen_t len = spu_addr_len_low(a); + int ret = getnameinfo(&a->addr, (len ? len : sizeof(*a)), str, n, NULL, 0, NI_NUMERICHOST); + + if (ret) + Alarmp(SPLOG_ERROR, DATA_LINK, "spu_addr_ntop_r: getnameinfo failed %d '%s'\n", ret, GAI_STRERROR(ret)); + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +int spu_addr_ntop_canon_r(const spu_addr *a, char *str, size_t n) +{ + int ret; + + if (a->addr.sa_family == AF_INET) + { + ret = snprintf(str, n, "%u.%u.%u.%u", + ((unsigned char*) &a->ipv4.sin_addr.s_addr)[0], + ((unsigned char*) &a->ipv4.sin_addr.s_addr)[1], + ((unsigned char*) &a->ipv4.sin_addr.s_addr)[2], + ((unsigned char*) &a->ipv4.sin_addr.s_addr)[3]); + + if (ret >= 0) + ret = ((size_t) ret < n ? 0 : EOVERFLOW); + } + else if (a->addr.sa_family == AF_INET6) + { + ret = snprintf(str, n, "%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x", + a->ipv6.sin6_addr.s6_addr[0], a->ipv6.sin6_addr.s6_addr[1], a->ipv6.sin6_addr.s6_addr[2], a->ipv6.sin6_addr.s6_addr[3], + a->ipv6.sin6_addr.s6_addr[4], a->ipv6.sin6_addr.s6_addr[5], a->ipv6.sin6_addr.s6_addr[6], a->ipv6.sin6_addr.s6_addr[7], + a->ipv6.sin6_addr.s6_addr[8], a->ipv6.sin6_addr.s6_addr[9], a->ipv6.sin6_addr.s6_addr[10], a->ipv6.sin6_addr.s6_addr[11], + a->ipv6.sin6_addr.s6_addr[12], a->ipv6.sin6_addr.s6_addr[13], a->ipv6.sin6_addr.s6_addr[14], a->ipv6.sin6_addr.s6_addr[15]); + + if (ret >= 0) + ret = ((size_t) ret < n ? 0 : EOVERFLOW); + } + else + ret = spu_addr_ntop_r(a, str, n); + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +int spu_addr_from_sockaddr_known(spu_addr *a, const struct sockaddr *sa) +{ + int ret = 0; + size_t zero = 0; + + switch (sa->sa_family) + { + case AF_UNSPEC: + zero = sizeof(*a); + break; + + case AF_INET: + a->ipv4 = *(struct sockaddr_in*) sa; + zero = sizeof(*a) - sizeof(a->ipv4); + break; + + case AF_INET6: + a->ipv6 = *(struct sockaddr_in6*) sa; + zero = sizeof(*a) - sizeof(a->ipv6); + break; + +#ifndef ARCH_PC_WIN95 + case AF_UNIX: + a->un = *(struct sockaddr_un*) sa; + zero = sizeof(*a) - sizeof(a->un); + break; +#endif + + default: + Alarmp(SPLOG_FATAL, NONE, "spu_addr_from_sockaddr_known: unexpected address family: %d\n", sa->sa_family); + break; + } + + memset((char*) (a + 1) - zero, 0, zero); + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +socklen_t spu_addr_len(const spu_addr *a) +{ + socklen_t ret = spu_addr_len_low(a); + + if (!ret) + Alarmp(SPLOG_FATAL, NONE, "spu_addr_len: unrecognized address family: %d\n", a->addr.sa_family); + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +const char *spu_addr_family_str(const spu_addr *a) +{ + return spu_af_str(a->addr.sa_family); +} + +/******************************************************************************** + ********************************************************************************/ + +const char *spu_af_str(int family) +{ + const char *ret = NULL; + + switch (family) + { + case AF_UNSPEC: + ret = "AF_UNSPEC"; + break; + + case AF_INET: + ret = "AF_INET"; + break; + + case AF_INET6: + ret = "AF_INET6"; + break; + +#ifndef ARCH_PC_WIN95 + case AF_UNIX: + ret = "AF_UNIX"; + break; +#endif + + default: + Alarmp(SPLOG_FATAL, NONE, "spu_af_str: unexpected address family: %d\n", family); + break; + } + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +int spu_addr_ip_cmp(const spu_addr *l, const spu_addr *r, int include_port) +{ + int ret; + + if ((l->addr.sa_family != AF_INET && l->addr.sa_family != AF_INET6) || + (r->addr.sa_family != AF_INET && r->addr.sa_family != AF_INET6)) + Alarmp(SPLOG_FATAL, NONE, "spu_addr_ip_cmp: unrecognized address families %d %d; AF_INET = %d, AF_INET6 = %d\n", + l->addr.sa_family, r->addr.sa_family, AF_INET, AF_INET6); + + if (l->addr.sa_family == r->addr.sa_family) + { + switch(l->addr.sa_family) + { + case AF_INET: + if ((ret = memcmp(&l->ipv4.sin_addr.s_addr, &r->ipv4.sin_addr.s_addr, 4)) == 0 && include_port) + { + if (ntohs(l->ipv4.sin_port) < ntohs(r->ipv4.sin_port)) + ret = -1; + + else if (l->ipv4.sin_port != r->ipv4.sin_port) + ret = 1; + } + break; + + case AF_INET6: + if ((ret = memcmp(l->ipv6.sin6_addr.s6_addr, r->ipv6.sin6_addr.s6_addr, 16)) == 0 && include_port) + { + if (ntohs(l->ipv6.sin6_port) < ntohs(r->ipv6.sin6_port)) + ret = -1; + + else if (l->ipv6.sin6_port != r->ipv6.sin6_port) + ret = 1; + } + break; + } + } + else if (l->addr.sa_family == AF_INET) + ret = -1; + + else + ret = 1; + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +int spu_addr_ip_is_unspecified(const spu_addr *a) +{ + int ret = 0; + + switch (a->addr.sa_family) + { + case AF_INET: + ret = (a->ipv4.sin_addr.s_addr == INADDR_ANY); + break; + + case AF_INET6: + ret = IN6_IS_ADDR_UNSPECIFIED(&a->ipv6.sin6_addr); + break; + + default: + Alarmp(SPLOG_FATAL, NONE, "spu_addr_ip_is_unspecified: unexpected address family: %d\n", a->addr.sa_family); + break; + } + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +int spu_addr_ip_is_loopback(const spu_addr *a) +{ + int ret = 0; + + switch (a->addr.sa_family) + { + case AF_INET: + ret = (((char*) &a->ipv4.sin_addr.s_addr)[0] == 127); + break; + + case AF_INET6: + ret = IN6_IS_ADDR_LOOPBACK(&a->ipv6.sin6_addr); + break; + + default: + Alarmp(SPLOG_FATAL, NONE, "spu_addr_ip_is_loopback: unexpected address family: %d\n", a->addr.sa_family); + break; + } + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +int spu_addr_ip_is_multicast(const spu_addr *a) +{ + int ret = 0; + unsigned char *ipv4 = (unsigned char*) &a->ipv4.sin_addr.s_addr; + + switch (a->addr.sa_family) + { + case AF_INET: + ret = ((ipv4[0] & 0xF0) == 224); /* 224.0.0.0/4 */ + break; + + case AF_INET6: + ret = IN6_IS_ADDR_MULTICAST(&a->ipv6.sin6_addr); + break; + + default: + Alarmp(SPLOG_FATAL, NONE, "spu_addr_ip_is_multicast: unexpected address family: %d\n", a->addr.sa_family); + break; + } + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +int spu_addr_ip_is_linklocal(const spu_addr *a) +{ + int ret = 0; + unsigned char *ipv4 = (unsigned char*) &a->ipv4.sin_addr.s_addr; + + switch (a->addr.sa_family) + { + case AF_INET: + ret = (ipv4[0] == 169 && ipv4[1] == 254); /* 169.254.0.0/16 */ + break; + + case AF_INET6: + ret = IN6_IS_ADDR_LINKLOCAL(&a->ipv6.sin6_addr); + break; + + default: + Alarmp(SPLOG_FATAL, NONE, "spu_addr_ip_is_linklocal: unexpected address family: %d\n", a->addr.sa_family); + break; + } + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +int spu_addr_ip_is_sitelocal(const spu_addr *a) +{ + int ret = 0; + unsigned char *ipv4 = (unsigned char*) &a->ipv4.sin_addr.s_addr; + + switch (a->addr.sa_family) + { + case AF_INET: + ret = (ipv4[0] == 10 || /* 10.0.0.0/24 */ + (ipv4[0] == 172 && ((ipv4[1] & 0xF0) == 16)) || /* 172.16.0.0/20 */ + (ipv4[0] == 192 && ipv4[1] == 168)); /* 192.168.0.0/16 */ + break; + + case AF_INET6: + ret = IN6_IS_ADDR_SITELOCAL(&a->ipv6.sin6_addr); + break; + + default: + Alarmp(SPLOG_FATAL, NONE, "spu_addr_ip_is_sitelocal: unexpected address family: %d\n", a->addr.sa_family); + break; + } + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +void spu_addr_ip_set_unspecified(spu_addr *a) +{ + switch (a->addr.sa_family) + { + case AF_INET: + a->ipv4.sin_addr.s_addr = htonl(INADDR_ANY); + break; + + case AF_INET6: + a->ipv6.sin6_addr = in6addr_any; + break; + + default: + Alarmp(SPLOG_FATAL, NONE, "spu_addr_ip_inaddrany: unexpected address family: %d\n", a->addr.sa_family); + break; + } +} + +/******************************************************************************** + ********************************************************************************/ + +int16u spu_addr_ip_get_port(const spu_addr *a) +{ + int16u ret = 0; + + switch (a->addr.sa_family) + { + case AF_INET: + ret = ntohs(a->ipv4.sin_port); + break; + + case AF_INET6: + ret = ntohs(a->ipv6.sin6_port); + break; + + default: + Alarmp(SPLOG_FATAL, NONE, "spu_addr_ip_get_port: unexpected address family: %d\n", a->addr.sa_family); + break; + } + + return ret; +} + +/******************************************************************************** + ********************************************************************************/ + +void spu_addr_ip_set_port(spu_addr *a, int16u port) +{ + switch (a->addr.sa_family) + { + case AF_INET: + a->ipv4.sin_port = htons(port); + break; + + case AF_INET6: + a->ipv6.sin6_port = htons(port); + break; + + default: + Alarmp(SPLOG_FATAL, NONE, "spu_addr_ip_set_port: unexpected address family: %d\n", a->addr.sa_family); + break; + } +} + +/******************************************************************************** + ********************************************************************************/ From jschultz at spread.org Mon Aug 20 17:38:12 2018 From: jschultz at spread.org (jschultz at spread.org) Date: Mon, 20 Aug 2018 17:38:12 -0400 Subject: [Spread-cvs] commit: r907 - libspreadutil/trunk/src Message-ID: Author: jschultz Date: 2018-08-20 17:38:12 -0400 (Mon, 20 Aug 2018) New Revision: 907 Modified: libspreadutil/trunk/src/alarm.c libspreadutil/trunk/src/events.c Log: Increased default / static Alarm print length Changed events back to exit if gettimeofday or clock_gettime fail Modified: libspreadutil/trunk/src/alarm.c =================================================================== --- libspreadutil/trunk/src/alarm.c 2018-08-20 21:16:48 UTC (rev 906) +++ libspreadutil/trunk/src/alarm.c 2018-08-20 21:38:12 UTC (rev 907) @@ -61,7 +61,7 @@ #include "spu_alarm.h" #include "spu_events.h" -#define MAX_ALARM_MESSAGE_BUF 512 +#define MAX_ALARM_MESSAGE_BUF 1024 static const char Alarm_Warning_High_Res[] = "*** WARNING *** Alarmp: High precision timestamp output failed!\n"; static const char Alarm_Warning_Timestamp[] = "*** WARNING *** Alarmp: Timestamp didn't fit in default size buffer!\n"; Modified: libspreadutil/trunk/src/events.c =================================================================== --- libspreadutil/trunk/src/events.c 2018-08-20 21:16:48 UTC (rev 906) +++ libspreadutil/trunk/src/events.c 2018-08-20 21:38:12 UTC (rev 907) @@ -162,7 +162,9 @@ struct timeval read_time; sp_time t; - gettimeofday( &read_time, NULL ); + if ( gettimeofday( &read_time, NULL ) ) + Alarmp( SPLOG_FATAL, EVENTS, "E_get_time: gettimeofday failed with %d '%s'\n", errno, strerror( errno ) ); + t.sec = read_time.tv_sec; t.usec = read_time.tv_usec; @@ -191,7 +193,9 @@ { struct timespec t; - clock_gettime( CLOCK_MONOTONIC, &t ); + if ( clock_gettime( CLOCK_MONOTONIC, &t ) ) + Alarmp( SPLOG_FATAL, EVENTS, "E_get_time_monotonic: clock_gettime failed with %d '%s'\n", errno, strerror( errno ) ); + Now.sec = (long) t.tv_sec; Now.usec = (long) ( ( t.tv_nsec + 500 ) / 1000 ); @@ -306,7 +310,7 @@ Time_queue = Time_queue->next; dispose( t_pre ); deleted = 1; - Alarmp( SPLOG_INFO, EVENTS, "E_queue: dequeued a (first) simillar event\n" ); + Alarmp( SPLOG_INFO, EVENTS, "E_queue: dequeued a (first) similar event\n" ); } } if( Time_queue == NULL ) @@ -601,9 +605,9 @@ /* Windows bug: Reports FD_SETSIZE of 64 but select works on all * fd's even ones with numbers greater then 64. */ - if( fd < 0 || fd > FD_SETSIZE ) + if( fd < 0 || fd >= FD_SETSIZE ) { - Alarmp( SPLOG_PRINT, EVENTS, "E_attach_fd: invalid fd %d (max %d) with fd_type %d with priority %d\n", fd, FD_SETSIZE, fd_type, priority ); + Alarmp( SPLOG_PRINT, EVENTS, "E_attach_fd: invalid fd %d (max %d) with fd_type %d with priority %d\n", fd, FD_SETSIZE - 1, fd_type, priority ); return( -1 ); } #endif