diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 314d9ad5..4170ecc3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -110,7 +110,7 @@ jobs: - name: Download ROM & CC:T run: | sudo git clone https://github.com/MCJack123/craftos2-rom /usr/local/share/craftos - git clone --branch v1.20.1-1.109.2 https://github.com/cc-tweaked/CC-Tweaked ../CC-Tweaked + git clone --branch v1.20.1-1.110.2 https://github.com/cc-tweaked/CC-Tweaked ../CC-Tweaked patch -p1 -d ../CC-Tweaked < resources/CCT-Tests.patch - name: Install dependencies run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13e48a2f..f31202db 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -164,6 +164,7 @@ jobs: run: | git config --global user.name "GitHub Actions" git config --global user.email "<>" + git add . git commit -m $GITHUB_REF git push origin master diff --git a/.vscode/settings.json b/.vscode/settings.json index 4a73dea9..7b2e59a1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -90,7 +90,7 @@ "valarray": "cpp", "csetjmp": "cpp" }, - "C_Cpp.default.cppStandard": "c++14", + "C_Cpp.default.cppStandard": "c++17", "C_Cpp.default.cStandard": "c11", "lldb.displayFormat": "auto", "lldb.showDisassembly": "auto", diff --git a/api/generic_peripheral/inventory.hpp b/api/generic_peripheral/inventory.hpp index 054f83e9..ccab8e6c 100644 --- a/api/generic_peripheral/inventory.hpp +++ b/api/generic_peripheral/inventory.hpp @@ -68,7 +68,7 @@ class inventory : public peripheral { else src = p, dest = this; if (fromSlot < 1 || fromSlot > src->size()) return luaL_error(L, "From slot out of range (between 1 and %d)", src->size()); - if (!lua_isnil(L, 4) && (toSlot < 1 || toSlot > dest->size())) return luaL_error(L, "To slot out of range (between 1 and %d)", dest->size()); + if (!lua_isnoneornil(L, 4) && (toSlot < 1 || toSlot > dest->size())) return luaL_error(L, "To slot out of range (between 1 and %d)", dest->size()); if (limit <= 0) { lua_pushinteger(L, 0); return 1; @@ -103,4 +103,4 @@ class inventory : public peripheral { } }; -#endif \ No newline at end of file +#endif diff --git a/configure b/configure index f32e6bc0..9590f022 100755 --- a/configure +++ b/configure @@ -3,8 +3,7 @@ # Generated by GNU Autoconf 2.71 for CraftOS-PC Accelerated 2.6. # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -15,16 +14,14 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (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 # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -34,46 +31,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +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 +# 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 + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -82,6 +79,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -90,12 +94,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -107,10 +107,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# 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='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# 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. @@ -132,22 +152,20 @@ 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'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 +$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 - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : + 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_nop +else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -167,52 +185,42 @@ 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 ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -else \$as_nop +else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 -blah=\$(echo \$(echo blah)) -test x\"\$blah\" = xblah || 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" - if (eval "$as_required") 2>/dev/null -then : + 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 $as_nop +else as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -else $as_nop +else 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 - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base + as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : + { $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_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi @@ -220,21 +228,14 @@ fi esac as_found=false done -IFS=$as_save_IFS -if $as_found -then : - -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null -then : +$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 -fi +fi; } +IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x -then : + 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 @@ -252,19 +253,18 @@ 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'. -printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno -then : - printf "%s\n" "$0: This script requires a shell more modern than all" - printf "%s\n" "$0: the shells that I found on your system." - if test ${ZSH_VERSION+y} ; then - printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" - printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + 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 - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, + $as_echo "$0: Please tell bug-autoconf@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." @@ -291,7 +291,6 @@ as_fn_unset () } as_unset=as_fn_unset - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -309,14 +308,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -331,7 +322,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -340,7 +331,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -379,13 +370,12 @@ as_fn_executable_p () # 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 : +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_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -397,27 +387,18 @@ fi # as_fn_append # 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 : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -429,9 +410,9 @@ 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 - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -458,7 +439,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -502,7 +483,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_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 @@ -516,10 +497,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -533,13 +510,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -615,41 +585,48 @@ PACKAGE_URL='' ac_unique_file="src/main.cpp" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include #endif -#ifdef HAVE_STDLIB_H +#ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif #ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif #ifdef HAVE_UNISTD_H # include #endif" -ac_header_cxx_list= ac_subst_vars='LTLIBOBJS LIBOBJS OBJS HTTP_TARGET OUT_TARGET +EGREP +GREP +CXXCPP ac_ct_CXX CXXFLAGS CXX @@ -724,7 +701,8 @@ LIBS CPPFLAGS CXX CXXFLAGS -CCC' +CCC +CXXCPP' # Initialize some variables set by options. @@ -793,6 +771,8 @@ do *) ac_optarg=yes ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -833,9 +813,9 @@ do 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_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -859,9 +839,9 @@ do 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_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1072,9 +1052,9 @@ do 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_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1088,9 +1068,9 @@ do 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_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1134,9 +1114,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1152,7 +1132,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1216,7 +1196,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_myself" | +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1375,6 +1355,7 @@ Some influential environment variables: you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags + CXXCPP 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. @@ -1395,9 +1376,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1425,8 +1406,7 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for configure.gnu first; this name is used for a wrapper for - # Metaconfig's "Configure" on case-insensitive file systems. + # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1434,7 +1414,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1446,7 +1426,7 @@ if $ac_init_version; then CraftOS-PC Accelerated configure 2.6 generated by GNU Autoconf 2.71 -Copyright (C) 2021 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 @@ -1463,14 +1443,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + 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\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1478,15 +1458,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $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 : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1502,14 +1481,14 @@ fi ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam + 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\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1517,15 +1496,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1541,14 +1519,14 @@ fi ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + 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\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1556,18 +1534,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1582,6 +1559,172 @@ fi } # ac_fn_cxx_try_link +# ac_fn_cxx_try_cpp LINENO +# ------------------------ +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_cxx_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_cxx_preproc_warn_flag$ac_cxx_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_cxx_try_cpp + +# ac_fn_cxx_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_cxx_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_cxx_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_cxx_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_cxx_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_cxx_check_header_mongrel + +# ac_fn_cxx_try_run LINENO +# ------------------------ +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_cxx_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_cxx_try_run + # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -1589,51 +1732,29 @@ fi ac_fn_cxx_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $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_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } + { $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_cxx_check_header_compile -ac_configure_args_raw= -for ac_arg -do - case $ac_arg in - *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append ac_configure_args_raw " '$ac_arg'" -done - -case $ac_configure_args_raw in - *$as_nl*) - ac_safe_unquote= ;; - *) - ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. - ac_unsafe_a="$ac_unsafe_z#~" - ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" - ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; -esac - cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -1641,7 +1762,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by CraftOS-PC Accelerated $as_me 2.6, which was generated by GNU Autoconf 2.71. Invocation command line was - $ $0$ac_configure_args_raw + $ $0 $@ _ACEOF exec 5>>config.log @@ -1674,12 +1795,8 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - printf "%s\n" "PATH: $as_dir" + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -1714,7 +1831,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -1749,13 +1866,11 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? - # Sanitize IFS. - IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - printf "%s\n" "## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -1766,8 +1881,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$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) ;; #( @@ -1791,7 +1906,7 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ) echo - printf "%s\n" "## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -1799,14 +1914,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -1814,15 +1929,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - printf "%s\n" "## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -1830,8 +1945,8 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} echo fi test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1845,48 +1960,63 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -printf "%s\n" "/* confdefs.h */" > confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +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_files="$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_files="$prefix/share/config.site $prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - -for ac_site_file in $ac_site_files +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - case $ac_site_file in #( - */*) : - ;; #( - *) : - ac_site_file=./$ac_site_file ;; -esac - if test -f "$ac_site_file" && test -r "$ac_site_file"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + 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" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { $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 @@ -1896,726 +2026,177 @@ if test -r "$cache_file"; then # 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 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -printf "%s\n" "$as_me: loading cache $cache_file" >&6;} + { $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";; *) . "./$cache_file";; esac fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Test code for whether the C compiler supports C89 (global declarations) -ac_c_conftest_c89_globals=' -/* Does the compiler advertise C89 conformance? - Do not test the value of __STDC__, because some compilers set it to 0 - while being otherwise adequately conformant. */ -#if !defined __STDC__ -# error "Compiler does not advertise C89 conformance" -#endif +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $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:${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=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + 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:${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:${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:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $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 + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $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_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ -struct buf { int x; }; -struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not \xHH hex character constants. - These do not provoke an error unfortunately, instead are silently treated - as an "x". The following induces an error, until -std is added to get - proper ANSI mode. Curiously \x00 != x always comes out true, for an - array size at least. It is necessary to write \x00 == 0 to get something - that is true only with -std. */ -int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) '\''x'\'' -int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), - int, int);' -# Test code for whether the C compiler supports C89 (body of main). -ac_c_conftest_c89_main=' -ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); -' -# Test code for whether the C compiler supports C99 (global declarations) -ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L -# error "Compiler does not advertise C99 conformance" -#endif - -#include -extern int puts (const char *); -extern int printf (const char *, ...); -extern int dprintf (int, const char *, ...); -extern void *malloc (size_t); - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -// dprintf is used instead of fprintf to avoid needing to declare -// FILE and stderr. -#define debug(...) dprintf (2, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - #error "your preprocessor is broken" -#endif -#if BIG_OK -#else - #error "your preprocessor is broken" -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case '\''s'\'': // string - str = va_arg (args_copy, const char *); - break; - case '\''d'\'': // int - number = va_arg (args_copy, int); - break; - case '\''f'\'': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -} -' - -# Test code for whether the C compiler supports C99 (body of main). -ac_c_conftest_c99_main=' - // Check bool. - _Bool success = false; - success |= (argc != 0); - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[0] = argv[0][0]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' - || dynamic_array[ni.number - 1] != 543); -' - -# Test code for whether the C compiler supports C11 (global declarations) -ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? -#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L -# error "Compiler does not advertise C11 conformance" -#endif - -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -' - -# Test code for whether the C compiler supports C11 (body of main). -ac_c_conftest_c11_main=' - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - v1.i = 2; - v1.w.k = 5; - ok |= v1.i != 5; -' - -# Test code for whether the C compiler supports C11 (complete). -ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} -${ac_c_conftest_c11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - ${ac_c_conftest_c11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C99 (complete). -ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} -${ac_c_conftest_c99_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - ${ac_c_conftest_c99_main} - return ok; -} -" - -# Test code for whether the C compiler supports C89 (complete). -ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_c_conftest_c89_main} - return ok; -} -" - -# Test code for whether the C++ compiler supports C++98 (global declarations) -ac_cxx_conftest_cxx98_globals=' -// Does the compiler advertise C++98 conformance? -#if !defined __cplusplus || __cplusplus < 199711L -# error "Compiler does not advertise C++98 conformance" -#endif - -// These inclusions are to reject old compilers that -// lack the unsuffixed header files. -#include -#include - -// and are *not* freestanding headers in C++98. -extern void assert (int); -namespace std { - extern int strcmp (const char *, const char *); -} - -// Namespaces, exceptions, and templates were all added after "C++ 2.0". -using std::exception; -using std::strcmp; - -namespace { - -void test_exception_syntax() -{ - try { - throw "test"; - } catch (const char *s) { - // Extra parentheses suppress a warning when building autoconf itself, - // due to lint rules shared with more typical C programs. - assert (!(strcmp) (s, "test")); - } -} - -template struct test_template -{ - T const val; - explicit test_template(T t) : val(t) {} - template T add(U u) { return static_cast(u) + val; } -}; - -} // anonymous namespace -' - -# Test code for whether the C++ compiler supports C++98 (body of main) -ac_cxx_conftest_cxx98_main=' - assert (argc); - assert (! argv[0]); -{ - test_exception_syntax (); - test_template tt (2.0); - assert (tt.add (4) == 6.0); - assert (true && !false); -} -' - -# Test code for whether the C++ compiler supports C++11 (global declarations) -ac_cxx_conftest_cxx11_globals=' -// Does the compiler advertise C++ 2011 conformance? -#if !defined __cplusplus || __cplusplus < 201103L -# error "Compiler does not advertise C++11 conformance" -#endif - -namespace cxx11test -{ - constexpr int get_val() { return 20; } - - struct testinit - { - int i; - double d; - }; - - class delegate - { - public: - delegate(int n) : n(n) {} - delegate(): delegate(2354) {} - - virtual int getval() { return this->n; }; - protected: - int n; - }; - - class overridden : public delegate - { - public: - overridden(int n): delegate(n) {} - virtual int getval() override final { return this->n * 2; } - }; - - class nocopy - { - public: - nocopy(int i): i(i) {} - nocopy() = default; - nocopy(const nocopy&) = delete; - nocopy & operator=(const nocopy&) = delete; - private: - int i; - }; - - // for testing lambda expressions - template Ret eval(Fn f, Ret v) - { - return f(v); - } - - // for testing variadic templates and trailing return types - template auto sum(V first) -> V - { - return first; - } - template auto sum(V first, Args... rest) -> V - { - return first + sum(rest...); - } -} -' - -# Test code for whether the C++ compiler supports C++11 (body of main) -ac_cxx_conftest_cxx11_main=' -{ - // Test auto and decltype - auto a1 = 6538; - auto a2 = 48573953.4; - auto a3 = "String literal"; - - int total = 0; - for (auto i = a3; *i; ++i) { total += *i; } - - decltype(a2) a4 = 34895.034; -} -{ - // Test constexpr - short sa[cxx11test::get_val()] = { 0 }; -} -{ - // Test initializer lists - cxx11test::testinit il = { 4323, 435234.23544 }; -} -{ - // Test range-based for - int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, - 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; - for (auto &x : array) { x += 23; } -} -{ - // Test lambda expressions - using cxx11test::eval; - assert (eval ([](int x) { return x*2; }, 21) == 42); - double d = 2.0; - assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0); - assert (d == 5.0); - assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0); - assert (d == 5.0); -} -{ - // Test use of variadic templates - using cxx11test::sum; - auto a = sum(1); - auto b = sum(1, 2); - auto c = sum(1.0, 2.0, 3.0); -} -{ - // Test constructor delegation - cxx11test::delegate d1; - cxx11test::delegate d2(); - cxx11test::delegate d3(45); -} -{ - // Test override and final - cxx11test::overridden o1(55464); -} -{ - // Test nullptr - char *c = nullptr; -} -{ - // Test template brackets - test_template<::test_template> v(test_template(12)); -} -{ - // Unicode literals - char const *utf8 = u8"UTF-8 string \u2500"; - char16_t const *utf16 = u"UTF-8 string \u2500"; - char32_t const *utf32 = U"UTF-32 string \u2500"; -} -' - -# Test code for whether the C compiler supports C++11 (complete). -ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals} -${ac_cxx_conftest_cxx11_globals} - -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_cxx_conftest_cxx98_main} - ${ac_cxx_conftest_cxx11_main} - return ok; -} -" - -# Test code for whether the C compiler supports C++98 (complete). -ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals} -int -main (int argc, char **argv) -{ - int ok = 0; - ${ac_cxx_conftest_cxx98_main} - return ok; -} -" - -as_fn_append ac_header_cxx_list " stdio.h stdio_h HAVE_STDIO_H" -as_fn_append ac_header_cxx_list " stdlib.h stdlib_h HAVE_STDLIB_H" -as_fn_append ac_header_cxx_list " string.h string_h HAVE_STRING_H" -as_fn_append ac_header_cxx_list " inttypes.h inttypes_h HAVE_INTTYPES_H" -as_fn_append ac_header_cxx_list " stdint.h stdint_h HAVE_STDINT_H" -as_fn_append ac_header_cxx_list " strings.h strings_h HAVE_STRINGS_H" -as_fn_append ac_header_cxx_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" -as_fn_append ac_header_cxx_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" -as_fn_append ac_header_cxx_list " unistd.h unistd_h HAVE_UNISTD_H" -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - 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 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-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' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - -# Options +# Options # Check whether --with-png was given. -if test ${with_png+y} -then : +if test "${with_png+set}" = set; then : withval=$with_png; fi # Check whether --with-png was given. -if test ${with_png+y} -then : +if test "${with_png+set}" = set; then : withval=$with_png; fi # Check whether --with-webp was given. -if test ${with_webp+y} -then : +if test "${with_webp+set}" = set; then : withval=$with_webp; fi # Check whether --with-webp was given. -if test ${with_webp+y} -then : +if test "${with_webp+set}" = set; then : withval=$with_webp; fi # Check whether --with-ncurses was given. -if test ${with_ncurses+y} -then : +if test "${with_ncurses+set}" = set; then : withval=$with_ncurses; fi # Check whether --with-ncurses was given. -if test ${with_ncurses+y} -then : +if test "${with_ncurses+set}" = set; then : withval=$with_ncurses; fi # Check whether --with-sdl_mixer was given. -if test ${with_sdl_mixer+y} -then : +if test "${with_sdl_mixer+set}" = set; then : withval=$with_sdl_mixer; fi # Check whether --with-sdl_mixer was given. -if test ${with_sdl_mixer+y} -then : +if test "${with_sdl_mixer+set}" = set; then : withval=$with_sdl_mixer; fi # Check whether --with-hpdf was given. -if test ${with_hpdf+y} -then : +if test "${with_hpdf+set}" = set; then : withval=$with_hpdf; fi # Check whether --with-html was given. -if test ${with_html+y} -then : +if test "${with_html+set}" = set; then : withval=$with_html; fi # Check whether --with-txt was given. -if test ${with_txt+y} -then : +if test "${with_txt+set}" = set; then : withval=$with_txt; fi # Check whether --with-standalone_rom was given. -if test ${with_standalone_rom+y} -then : +if test "${with_standalone_rom+set}" = set; then : withval=$with_standalone_rom; fi # Check whether --enable-wasm was given. -if test ${enable_wasm+y} -then : +if test "${enable_wasm+set}" = set; then : enableval=$enable_wasm; fi # Check whether --with-wasm_poco was given. -if test ${with_wasm_poco+y} -then : +if test "${with_wasm_poco+set}" = set; then : withval=$with_wasm_poco; fi # Check whether --with-wasm_rom was given. -if test ${with_wasm_rom+y} -then : +if test "${with_wasm_rom+set}" = set; then : withval=$with_wasm_rom; fi @@ -2626,15 +2207,13 @@ if test "x$CXX" = "xem++"; then enable_wasm=yes; fi if test "x$with_hpdf" = "xyes"; then PRINT_TYPE=0; fi if test "x$with_hpdf" = "xno"; then PRINT_TYPE=1; fi if test "x$with_html" = "xyes"; then - if test "x$PRINT_TYPE" != "x" -then : + if test "x$PRINT_TYPE" != "x"; then : as_fn_error $? "Only one print type can be specified." "$LINENO" 5 fi PRINT_TYPE=1 fi if test "x$with_txt" = "xyes"; then - if test "x$PRINT_TYPE" != "x" -then : + if test "x$PRINT_TYPE" != "x"; then : as_fn_error $? "Only one print type can be specified." "$LINENO" 5 fi PRINT_TYPE=2 @@ -2642,12 +2221,10 @@ fi if test "x$enable_wasm" = "xyes"; then # Set up compiler for emcc/em++ - if test "x$with_wasm_poco" = "x" -then : + if test "x$with_wasm_poco" = "x"; then : as_fn_error $? "--with-wasm-poco must be specified when building for WASM." "$LINENO" 5 fi - if test "x$with_wasm_rom" = "x" -then : + if test "x$with_wasm_rom" = "x"; then : as_fn_error $? "--with-wasm-rom must be specified when building for WASM." "$LINENO" 5 fi SQBROP=[ @@ -2655,7 +2232,7 @@ fi CC=emcc CXX=em++ CPPFLAGS="$CPPFLAGS -I$with_wasm_poco/include -Icraftos2-lua/include -Iapi -DNO_CLI -DNO_PNG -DNO_WEBP -DPRINT_TYPE=1" - CXXFLAGS="$CXXFLAGS -std=c++11 -s USE_SDL=2 -s USE_PTHREADS=1 -s USE_SDL_MIXER=2 -Wno-implicit-const-int-float-conversion -Wno-pthreads-mem-growth" + CXXFLAGS="$CXXFLAGS -std=c++17 -s USE_SDL=2 -s USE_PTHREADS=1 -s USE_SDL_MIXER=2 -Wno-implicit-const-int-float-conversion -Wno-pthreads-mem-growth" LDFLAGS="$LDFLAGS -L$with_wasm_poco/lib -lidbfs.js -s USE_SDL=2 -s USE_SDL_MIXER=2 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s TOTAL_MEMORY=33554432 -s DISABLE_EXCEPTION_CATCHING=0 -s FETCH=1 -s DEMANGLE_SUPPORT=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=$SQBROP\"ccall\",\"cwrap\"$SQBRCL -s ASYNCIFY -s ALLOW_MEMORY_GROWTH=1 --no-heap-copy -Wno-pthreads-mem-growth" fi @@ -2677,12 +2254,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu 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 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2690,15 +2266,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - printf "%s\n" "$as_me:${as_lineno-$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 @@ -2709,11 +2281,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2722,12 +2294,11 @@ if test -z "$ac_cv_prog_CC"; then 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 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -2735,15 +2306,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - printf "%s\n" "$as_me:${as_lineno-$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 @@ -2754,11 +2321,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2766,8 +2333,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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 @@ -2780,12 +2347,11 @@ if test -z "$CC"; then 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 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2793,15 +2359,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - printf "%s\n" "$as_me:${as_lineno-$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 @@ -2812,11 +2374,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2825,12 +2387,11 @@ fi 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 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2839,19 +2400,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. 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 + 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" - printf "%s\n" "$as_me:${as_lineno-$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 @@ -2867,18 +2424,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2889,12 +2446,11 @@ if test -z "$CC"; then 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 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2902,15 +2458,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$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 @@ -2921,11 +2473,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2938,12 +2490,11 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -2951,15 +2502,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$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 @@ -2970,11 +2517,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2986,8 +2533,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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 @@ -2995,129 +2542,25 @@ esac fi fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - 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}clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -printf "%s\n" "$CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CC+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - 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="clang" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -printf "%s\n" "$ac_ct_CC" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -fi - - -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +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. -printf "%s\n" "$as_me:${as_lineno-$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 -for ac_option in --version -v -V -qversion -version; do +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:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -3127,7 +2570,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -3135,7 +2578,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -3147,9 +2590,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # 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. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -printf %s "checking whether the C compiler works... " >&6; } -ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ $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: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -3170,12 +2613,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -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, @@ -3192,7 +2634,7 @@ do # certainly right. break;; *.* ) - if test ${ac_cv_exeext+y} && 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 @@ -3208,46 +2650,44 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop +else ac_file='' fi -if test -z "$ac_file" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -printf "%s\n" "$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 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $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_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -printf %s "checking for C compiler default output file name... " >&6; } -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -printf "%s\n" "$ac_file" >&6; } +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 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } +{ $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" 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\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -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 @@ -3261,15 +2701,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } +{ $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 @@ -3278,7 +2718,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -3290,8 +2730,8 @@ _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. -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -printf %s "checking whether we are cross compiling... " >&6; } +{ $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 @@ -3299,10 +2739,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $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 @@ -3310,40 +2750,39 @@ printf "%s\n" "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $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 - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "cannot run C compiled programs. + { { $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 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } +{ $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 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -printf %s "checking for suffix of object files... " >&6; } -if test ${ac_cv_objext+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $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 ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -3357,12 +2796,11 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -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 @@ -3371,32 +2809,31 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $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 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } +{ $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 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 -printf %s "checking whether the compiler supports GNU C... " >&6; } -if test ${ac_cv_c_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $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 ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -3406,33 +2843,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $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 else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -printf %s "checking whether $CC accepts -g... " >&6; } -if test ${ac_cv_prog_cc_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +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 @@ -3441,60 +2874,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -printf "%s\n" "$ac_cv_prog_cc_g" >&6; } -if test $ac_test_CFLAGS; then +{ $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 elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -3509,144 +2939,94 @@ else CFLAGS= fi fi -ac_prog_cc_stdc=no -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -printf %s "checking for $CC option to enable C11 features... " >&6; } -if test ${ac_cv_prog_cc_c11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c11_program -_ACEOF -for ac_arg in '' -std=gnu11 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c11" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi - -if test "x$ac_cv_prog_cc_c11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -printf %s "checking for $CC option to enable C99 features... " >&6; } -if test ${ac_cv_prog_cc_c99+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no +{ $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 ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c99_program -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -fi +#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); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} -if test "x$ac_cv_prog_cc_c99" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 -fi -fi -if test x$ac_prog_cc_stdc = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -printf %s "checking for $CC option to enable C89 features... " >&6; } -if test ${ac_cv_prog_cc_c89+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_c_conftest_c89_program +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO" -then : + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext conftest.beam +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -if test "x$ac_cv_prog_cc_c89" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" -fi - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $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:${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=cpp @@ -3655,12 +3035,6 @@ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - - - - - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3671,16 +3045,15 @@ if test -z "$CXX"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else @@ -3688,15 +3061,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$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 @@ -3707,11 +3076,11 @@ fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -printf "%s\n" "$CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3720,16 +3089,15 @@ fi fi if test -z "$CXX"; then ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++ + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_CXX+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else @@ -3737,15 +3105,11 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$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 @@ -3756,11 +3120,11 @@ fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -printf "%s\n" "$ac_ct_CXX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3772,8 +3136,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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 CXX=$ac_ct_CXX @@ -3783,7 +3147,7 @@ fi fi fi # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$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 for ac_option in --version -v -V -qversion; do @@ -3793,7 +3157,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -3803,21 +3167,20 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5 -printf %s "checking whether the compiler supports GNU C++... " >&6; } -if test ${ac_cv_cxx_compiler_gnu+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $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 ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -3827,33 +3190,29 @@ main (void) return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi -ac_test_CXXFLAGS=${CXXFLAGS+y} +ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -printf %s "checking whether $CXX accepts -g... " >&6; } -if test ${ac_cv_prog_cxx_g+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no @@ -3862,60 +3221,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes -else $as_nop +else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : -else $as_nop +else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } -if test $ac_test_CXXFLAGS; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then @@ -3930,100 +3286,6 @@ else CXXFLAGS= fi fi -ac_prog_cxx_stdcxx=no -if test x$ac_prog_cxx_stdcxx = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 -printf %s "checking for $CXX option to enable C++11 features... " >&6; } -if test ${ac_cv_prog_cxx_11+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_11=no -ac_save_CXX=$CXX -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_cxx_conftest_cxx11_program -_ACEOF -for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA -do - CXX="$ac_save_CXX $ac_arg" - if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_prog_cxx_cxx11=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cxx_cxx11" != "xno" && break -done -rm -f conftest.$ac_ext -CXX=$ac_save_CXX -fi - -if test "x$ac_cv_prog_cxx_cxx11" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx11" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 -printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx11" -fi - ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 - ac_prog_cxx_stdcxx=cxx11 -fi -fi -if test x$ac_prog_cxx_stdcxx = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 -printf %s "checking for $CXX option to enable C++98 features... " >&6; } -if test ${ac_cv_prog_cxx_98+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cxx_98=no -ac_save_CXX=$CXX -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_cxx_conftest_cxx98_program -_ACEOF -for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA -do - CXX="$ac_save_CXX $ac_arg" - if ac_fn_cxx_try_compile "$LINENO" -then : - ac_cv_prog_cxx_cxx98=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam - test "x$ac_cv_prog_cxx_cxx98" != "xno" && break -done -rm -f conftest.$ac_ext -CXX=$ac_save_CXX -fi - -if test "x$ac_cv_prog_cxx_cxx98" = xno -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cxx_cxx98" = x -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 -printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } - CXX="$CXX $ac_cv_prog_cxx_cxx98" -fi - ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 - ac_prog_cxx_stdcxx=cxx98 -fi -fi - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4031,12 +3293,11 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++17" >&5 -printf %s "checking whether C++ compiler accepts -std=c++17... " >&6; } -if test ${ax_cv_check_cxxflags___std_cpp14+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++17" >&5 +$as_echo_n "checking whether C++ compiler accepts -std=c++17... " >&6; } +if ${ax_cv_check_cxxflags___std_cpp17+:} false; then : + $as_echo_n "(cached) " >&6 +else ax_check_save_flags=$CXXFLAGS CXXFLAGS="$CXXFLAGS -std=c++17" @@ -4044,28 +3305,26 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : - ax_cv_check_cxxflags___std_cpp14=yes -else $as_nop - ax_cv_check_cxxflags___std_cpp14=no +if ac_fn_cxx_try_compile "$LINENO"; then : + ax_cv_check_cxxflags___std_cpp17=yes +else + ax_cv_check_cxxflags___std_cpp17=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS=$ax_check_save_flags fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags___std_cpp14" >&5 -printf "%s\n" "$ax_cv_check_cxxflags___std_cpp14" >&6; } -if test "x$ax_cv_check_cxxflags___std_cpp14" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags___std_cpp17" >&5 +$as_echo "$ax_cv_check_cxxflags___std_cpp17" >&6; } +if test "x$ax_cv_check_cxxflags___std_cpp17" = xyes; then : : -else $as_nop +else as_fn_error $? "C++ compiler does not support -std=c++17." "$LINENO" 5 fi @@ -4073,446 +3332,818 @@ fi # Find required libraries if test "x$enable_wasm" != "xyes"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5 -printf %s "checking for library containing pthread_create... " >&6; } -if test ${ac_cv_search_pthread_create+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5 +$as_echo_n "checking for library containing pthread_create... " >&6; } +if ${ac_cv_search_pthread_create+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int pthread_create (); -} +/* 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 pthread_create (); int -main (void) +main () { -return conftest::pthread_create (); +return pthread_create (); ; return 0; } _ACEOF -for ac_lib in '' pthread -do +for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_pthread_create=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_pthread_create+y} -then : + if ${ac_cv_search_pthread_create+:} false; then : break fi done -if test ${ac_cv_search_pthread_create+y} -then : +if ${ac_cv_search_pthread_create+:} false; then : -else $as_nop +else ac_cv_search_pthread_create=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_create" >&5 -printf "%s\n" "$ac_cv_search_pthread_create" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_create" >&5 +$as_echo "$ac_cv_search_pthread_create" >&6; } ac_res=$ac_cv_search_pthread_create -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else $as_nop +else as_fn_error $? "Could not find pthread library." "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 -printf %s "checking for library containing dlopen... " >&6; } -if test ${ac_cv_search_dlopen+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 +$as_echo_n "checking for library containing dlopen... " >&6; } +if ${ac_cv_search_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int dlopen (); -} +/* 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 dlopen (); int -main (void) +main () { -return conftest::dlopen (); +return dlopen (); ; return 0; } _ACEOF -for ac_lib in '' dl -do +for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_dlopen+y} -then : + if ${ac_cv_search_dlopen+:} false; then : break fi done -if test ${ac_cv_search_dlopen+y} -then : +if ${ac_cv_search_dlopen+:} false; then : -else $as_nop +else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 -printf "%s\n" "$ac_cv_search_dlopen" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 +$as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else $as_nop +else as_fn_error $? "Could not find dl library." "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing SDL_Init" >&5 -printf %s "checking for library containing SDL_Init... " >&6; } -if test ${ac_cv_search_SDL_Init+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SDL_Init" >&5 +$as_echo_n "checking for library containing SDL_Init... " >&6; } +if ${ac_cv_search_SDL_Init+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int SDL_Init (); -} +/* 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 SDL_Init (); int -main (void) +main () { -return conftest::SDL_Init (); +return SDL_Init (); ; return 0; } _ACEOF -for ac_lib in '' SDL2 -do +for ac_lib in '' SDL2; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_SDL_Init=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_SDL_Init+y} -then : + if ${ac_cv_search_SDL_Init+:} false; then : break fi done -if test ${ac_cv_search_SDL_Init+y} -then : +if ${ac_cv_search_SDL_Init+:} false; then : -else $as_nop +else ac_cv_search_SDL_Init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SDL_Init" >&5 -printf "%s\n" "$ac_cv_search_SDL_Init" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SDL_Init" >&5 +$as_echo "$ac_cv_search_SDL_Init" >&6; } ac_res=$ac_cv_search_SDL_Init -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else $as_nop +else as_fn_error $? "Could not find SDL2 library." "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5 -printf %s "checking for library containing SSL_new... " >&6; } -if test ${ac_cv_search_SSL_new+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5 +$as_echo_n "checking for library containing SSL_new... " >&6; } +if ${ac_cv_search_SSL_new+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int SSL_new (); -} +/* 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 SSL_new (); int -main (void) +main () { -return conftest::SSL_new (); +return SSL_new (); ; return 0; } _ACEOF -for ac_lib in '' ssl -do +for ac_lib in '' ssl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_SSL_new=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_SSL_new+y} -then : + if ${ac_cv_search_SSL_new+:} false; then : break fi done -if test ${ac_cv_search_SSL_new+y} -then : +if ${ac_cv_search_SSL_new+:} false; then : -else $as_nop +else ac_cv_search_SSL_new=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5 -printf "%s\n" "$ac_cv_search_SSL_new" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5 +$as_echo "$ac_cv_search_SSL_new" >&6; } ac_res=$ac_cv_search_SSL_new -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else $as_nop +else as_fn_error $? "Could not find OpenSSL library." "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing RSA_new" >&5 -printf %s "checking for library containing RSA_new... " >&6; } -if test ${ac_cv_search_RSA_new+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing RSA_new" >&5 +$as_echo_n "checking for library containing RSA_new... " >&6; } +if ${ac_cv_search_RSA_new+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int RSA_new (); -} +/* 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 RSA_new (); int -main (void) +main () { -return conftest::RSA_new (); +return RSA_new (); ; return 0; } _ACEOF -for ac_lib in '' crypto -do +for ac_lib in '' crypto; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_RSA_new=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_RSA_new+y} -then : + if ${ac_cv_search_RSA_new+:} false; then : break fi done -if test ${ac_cv_search_RSA_new+y} -then : +if ${ac_cv_search_RSA_new+:} false; then : -else $as_nop +else ac_cv_search_RSA_new=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RSA_new" >&5 -printf "%s\n" "$ac_cv_search_RSA_new" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RSA_new" >&5 +$as_echo "$ac_cv_search_RSA_new" >&6; } ac_res=$ac_cv_search_RSA_new -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else $as_nop +else as_fn_error $? "Could not find OpenSSL crypto library." "$LINENO" 5 fi fi -ac_header= ac_cache= -for ac_item in $ac_header_cxx_list +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $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; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +{ $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 ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + 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" + 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 +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $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 + 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" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + 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:${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:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do - if test $ac_cache; then - ac_fn_cxx_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" - if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then - printf "%s\n" "#define $ac_item 1" >> confdefs.h + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + 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" + 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 +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $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 + 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" + ac_path_EGREP_max=$ac_count fi - ac_header= ac_cache= - elif test $ac_header; then - ac_cache=$ac_item - else - ac_header=$ac_item + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi -done +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $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:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + 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 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 : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + 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 : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* +fi +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 : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_cxx_try_run "$LINENO"; then : +else + ac_cv_header_stdc=no +fi +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:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then +$as_echo "#define STDC_HEADERS 1" >>confdefs.h -if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes -then : +fi -printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h +# 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` +ac_fn_cxx_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 fi - for ac_header in SDL2/SDL.h + +done + + +for ac_header in SDL2/SDL.h do : - ac_fn_cxx_check_header_compile "$LINENO" "SDL2/SDL.h" "ac_cv_header_SDL2_SDL_h" "$ac_includes_default" -if test "x$ac_cv_header_SDL2_SDL_h" = xyes -then : - printf "%s\n" "#define HAVE_SDL2_SDL_H 1" >>confdefs.h + ac_fn_cxx_check_header_mongrel "$LINENO" "SDL2/SDL.h" "ac_cv_header_SDL2_SDL_h" "$ac_includes_default" +if test "x$ac_cv_header_SDL2_SDL_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SDL2_SDL_H 1 +_ACEOF -else $as_nop +else as_fn_error $? "Could not find SDL2 header." "$LINENO" 5 fi done - for ac_header in openssl/opensslv.h + +for ac_header in openssl/opensslv.h do : - ac_fn_cxx_check_header_compile "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default" -if test "x$ac_cv_header_openssl_opensslv_h" = xyes -then : - printf "%s\n" "#define HAVE_OPENSSL_OPENSSLV_H 1" >>confdefs.h + ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default" +if test "x$ac_cv_header_openssl_opensslv_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENSSL_OPENSSLV_H 1 +_ACEOF -else $as_nop +else as_fn_error $? "Could not find OpenSSL headers." "$LINENO" 5 fi done - for ac_header in Poco/Foundation.h + +for ac_header in Poco/Foundation.h do : - ac_fn_cxx_check_header_compile "$LINENO" "Poco/Foundation.h" "ac_cv_header_Poco_Foundation_h" "$ac_includes_default" -if test "x$ac_cv_header_Poco_Foundation_h" = xyes -then : - printf "%s\n" "#define HAVE_POCO_FOUNDATION_H 1" >>confdefs.h + ac_fn_cxx_check_header_mongrel "$LINENO" "Poco/Foundation.h" "ac_cv_header_Poco_Foundation_h" "$ac_includes_default" +if test "x$ac_cv_header_Poco_Foundation_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POCO_FOUNDATION_H 1 +_ACEOF -else $as_nop +else as_fn_error $? "Could not find Poco Foundation headers." "$LINENO" 5 fi done - for ac_header in Poco/Util/Util.h + +for ac_header in Poco/Util/Util.h do : - ac_fn_cxx_check_header_compile "$LINENO" "Poco/Util/Util.h" "ac_cv_header_Poco_Util_Util_h" "$ac_includes_default" -if test "x$ac_cv_header_Poco_Util_Util_h" = xyes -then : - printf "%s\n" "#define HAVE_POCO_UTIL_UTIL_H 1" >>confdefs.h + ac_fn_cxx_check_header_mongrel "$LINENO" "Poco/Util/Util.h" "ac_cv_header_Poco_Util_Util_h" "$ac_includes_default" +if test "x$ac_cv_header_Poco_Util_Util_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POCO_UTIL_UTIL_H 1 +_ACEOF -else $as_nop +else as_fn_error $? "Could not find Poco Util headers." "$LINENO" 5 fi done - for ac_header in Poco/XML/XML.h + +for ac_header in Poco/XML/XML.h do : - ac_fn_cxx_check_header_compile "$LINENO" "Poco/XML/XML.h" "ac_cv_header_Poco_XML_XML_h" "$ac_includes_default" -if test "x$ac_cv_header_Poco_XML_XML_h" = xyes -then : - printf "%s\n" "#define HAVE_POCO_XML_XML_H 1" >>confdefs.h + ac_fn_cxx_check_header_mongrel "$LINENO" "Poco/XML/XML.h" "ac_cv_header_Poco_XML_XML_h" "$ac_includes_default" +if test "x$ac_cv_header_Poco_XML_XML_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POCO_XML_XML_H 1 +_ACEOF -else $as_nop +else as_fn_error $? "Could not find Poco XML headers." "$LINENO" 5 fi done - for ac_header in Poco/JSON/JSON.h + +for ac_header in Poco/JSON/JSON.h do : - ac_fn_cxx_check_header_compile "$LINENO" "Poco/JSON/JSON.h" "ac_cv_header_Poco_JSON_JSON_h" "$ac_includes_default" -if test "x$ac_cv_header_Poco_JSON_JSON_h" = xyes -then : - printf "%s\n" "#define HAVE_POCO_JSON_JSON_H 1" >>confdefs.h + ac_fn_cxx_check_header_mongrel "$LINENO" "Poco/JSON/JSON.h" "ac_cv_header_Poco_JSON_JSON_h" "$ac_includes_default" +if test "x$ac_cv_header_Poco_JSON_JSON_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POCO_JSON_JSON_H 1 +_ACEOF -else $as_nop +else as_fn_error $? "Could not find Poco JSON headers." "$LINENO" 5 fi done - for ac_header in Poco/Crypto/Crypto.h + +for ac_header in Poco/Crypto/Crypto.h do : - ac_fn_cxx_check_header_compile "$LINENO" "Poco/Crypto/Crypto.h" "ac_cv_header_Poco_Crypto_Crypto_h" "$ac_includes_default" -if test "x$ac_cv_header_Poco_Crypto_Crypto_h" = xyes -then : - printf "%s\n" "#define HAVE_POCO_CRYPTO_CRYPTO_H 1" >>confdefs.h + ac_fn_cxx_check_header_mongrel "$LINENO" "Poco/Crypto/Crypto.h" "ac_cv_header_Poco_Crypto_Crypto_h" "$ac_includes_default" +if test "x$ac_cv_header_Poco_Crypto_Crypto_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POCO_CRYPTO_CRYPTO_H 1 +_ACEOF -else $as_nop +else as_fn_error $? "Could not find Poco Crypto headers." "$LINENO" 5 fi done - for ac_header in Poco/Net/Net.h + +for ac_header in Poco/Net/Net.h do : - ac_fn_cxx_check_header_compile "$LINENO" "Poco/Net/Net.h" "ac_cv_header_Poco_Net_Net_h" "$ac_includes_default" -if test "x$ac_cv_header_Poco_Net_Net_h" = xyes -then : - printf "%s\n" "#define HAVE_POCO_NET_NET_H 1" >>confdefs.h + ac_fn_cxx_check_header_mongrel "$LINENO" "Poco/Net/Net.h" "ac_cv_header_Poco_Net_Net_h" "$ac_includes_default" +if test "x$ac_cv_header_Poco_Net_Net_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POCO_NET_NET_H 1 +_ACEOF -else $as_nop +else as_fn_error $? "Could not find Poco Net headers." "$LINENO" 5 fi done - for ac_header in Poco/Net/NetSSL.h + +for ac_header in Poco/Net/NetSSL.h do : - ac_fn_cxx_check_header_compile "$LINENO" "Poco/Net/NetSSL.h" "ac_cv_header_Poco_Net_NetSSL_h" "$ac_includes_default" -if test "x$ac_cv_header_Poco_Net_NetSSL_h" = xyes -then : - printf "%s\n" "#define HAVE_POCO_NET_NETSSL_H 1" >>confdefs.h + ac_fn_cxx_check_header_mongrel "$LINENO" "Poco/Net/NetSSL.h" "ac_cv_header_Poco_Net_NetSSL_h" "$ac_includes_default" +if test "x$ac_cv_header_Poco_Net_NetSSL_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POCO_NET_NETSSL_H 1 +_ACEOF -else $as_nop +else as_fn_error $? "Could not find Poco NetSSL headers." "$LINENO" 5 fi done + if test "x$enable_wasm" = "xyes"; then LDFLAGS="$LDFLAGS -s USE_PTHREADS=1 --embed-file $with_wasm_rom@/craftos --shared-memory" LIBS="$LIBS -lPocoJSON -lPocoUtil -lPocoFoundation" @@ -4521,12 +4152,11 @@ if test "x$enable_wasm" = "xyes"; then HTTP_TARGET="apis_http_emscripten.o" else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Poco::ASCIIEncoding in -lPocoFoundation" >&5 -printf %s "checking for Poco::ASCIIEncoding in -lPocoFoundation... " >&6; } -if test ${ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Poco::ASCIIEncoding in -lPocoFoundation" >&5 +$as_echo_n "checking for Poco::ASCIIEncoding in -lPocoFoundation... " >&6; } +if ${ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lPocoFoundation $LIBS" case "Poco::ASCIIEncoding" @@ -4541,20 +4171,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { `echo "Poco::ASCIIEncoding" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding=yes -else $as_nop +else ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4569,20 +4198,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::ASCIIEncoding() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding=yes -else $as_nop +else ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*\(*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4593,20 +4221,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext }; int -main (void) +main () { `echo "Poco::ASCIIEncoding" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding=yes -else $as_nop +else ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4619,64 +4246,66 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::ASCIIEncoding() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding=yes -else $as_nop +else ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int Poco::ASCIIEncoding (); -} +/* 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 Poco::ASCIIEncoding (); int -main (void) +main () { -return conftest::Poco::ASCIIEncoding (); +return Poco::ASCIIEncoding (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding=yes -else $as_nop +else ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; esac LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding" >&5 -printf "%s\n" "$ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding" >&6; } -if test $ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding = yes -then : - printf "%s\n" "#define HAVE_LIBPOCOFOUNDATION 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding" >&5 +$as_echo "$ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding" >&6; } +if test $ac_cv_lib_PocoFoundation_Poco__ASCIIEncoding = yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPOCOFOUNDATION 1 +_ACEOF LIBS="-lPocoFoundation $LIBS" -else $as_nop +else as_fn_error $? "Could not find Poco Foundation library." "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Poco::Util::Timer in -lPocoUtil" >&5 -printf %s "checking for Poco::Util::Timer in -lPocoUtil... " >&6; } -if test ${ac_cv_lib_PocoUtil_Poco__Util__Timer+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Poco::Util::Timer in -lPocoUtil" >&5 +$as_echo_n "checking for Poco::Util::Timer in -lPocoUtil... " >&6; } +if ${ac_cv_lib_PocoUtil_Poco__Util__Timer+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lPocoUtil $LIBS" case "Poco::Util::Timer" @@ -4691,20 +4320,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { `echo "Poco::Util::Timer" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoUtil_Poco__Util__Timer=yes -else $as_nop +else ac_cv_lib_PocoUtil_Poco__Util__Timer=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4719,20 +4347,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::Util::Timer() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoUtil_Poco__Util__Timer=yes -else $as_nop +else ac_cv_lib_PocoUtil_Poco__Util__Timer=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*\(*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4743,20 +4370,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext }; int -main (void) +main () { `echo "Poco::Util::Timer" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoUtil_Poco__Util__Timer=yes -else $as_nop +else ac_cv_lib_PocoUtil_Poco__Util__Timer=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4769,64 +4395,66 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::Util::Timer() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoUtil_Poco__Util__Timer=yes -else $as_nop +else ac_cv_lib_PocoUtil_Poco__Util__Timer=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int Poco::Util::Timer (); -} +/* 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 Poco::Util::Timer (); int -main (void) +main () { -return conftest::Poco::Util::Timer (); +return Poco::Util::Timer (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoUtil_Poco__Util__Timer=yes -else $as_nop +else ac_cv_lib_PocoUtil_Poco__Util__Timer=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; esac LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoUtil_Poco__Util__Timer" >&5 -printf "%s\n" "$ac_cv_lib_PocoUtil_Poco__Util__Timer" >&6; } -if test $ac_cv_lib_PocoUtil_Poco__Util__Timer = yes -then : - printf "%s\n" "#define HAVE_LIBPOCOUTIL 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoUtil_Poco__Util__Timer" >&5 +$as_echo "$ac_cv_lib_PocoUtil_Poco__Util__Timer" >&6; } +if test $ac_cv_lib_PocoUtil_Poco__Util__Timer = yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPOCOUTIL 1 +_ACEOF LIBS="-lPocoUtil $LIBS" -else $as_nop +else as_fn_error $? "Could not find Poco Util library." "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Poco::XML::Name in -lPocoXML" >&5 -printf %s "checking for Poco::XML::Name in -lPocoXML... " >&6; } -if test ${ac_cv_lib_PocoXML_Poco__XML__Name+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Poco::XML::Name in -lPocoXML" >&5 +$as_echo_n "checking for Poco::XML::Name in -lPocoXML... " >&6; } +if ${ac_cv_lib_PocoXML_Poco__XML__Name+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lPocoXML $LIBS" case "Poco::XML::Name" @@ -4841,20 +4469,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { `echo "Poco::XML::Name" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoXML_Poco__XML__Name=yes -else $as_nop +else ac_cv_lib_PocoXML_Poco__XML__Name=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4869,20 +4496,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::XML::Name() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoXML_Poco__XML__Name=yes -else $as_nop +else ac_cv_lib_PocoXML_Poco__XML__Name=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*\(*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4893,20 +4519,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext }; int -main (void) +main () { `echo "Poco::XML::Name" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoXML_Poco__XML__Name=yes -else $as_nop +else ac_cv_lib_PocoXML_Poco__XML__Name=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4919,64 +4544,66 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::XML::Name() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoXML_Poco__XML__Name=yes -else $as_nop +else ac_cv_lib_PocoXML_Poco__XML__Name=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int Poco::XML::Name (); -} +/* 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 Poco::XML::Name (); int -main (void) +main () { -return conftest::Poco::XML::Name (); +return Poco::XML::Name (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoXML_Poco__XML__Name=yes -else $as_nop +else ac_cv_lib_PocoXML_Poco__XML__Name=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; esac LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoXML_Poco__XML__Name" >&5 -printf "%s\n" "$ac_cv_lib_PocoXML_Poco__XML__Name" >&6; } -if test $ac_cv_lib_PocoXML_Poco__XML__Name = yes -then : - printf "%s\n" "#define HAVE_LIBPOCOXML 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoXML_Poco__XML__Name" >&5 +$as_echo "$ac_cv_lib_PocoXML_Poco__XML__Name" >&6; } +if test $ac_cv_lib_PocoXML_Poco__XML__Name = yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPOCOXML 1 +_ACEOF LIBS="-lPocoXML $LIBS" -else $as_nop +else as_fn_error $? "Could not find Poco XML library." "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Poco::JSON::Template in -lPocoJSON" >&5 -printf %s "checking for Poco::JSON::Template in -lPocoJSON... " >&6; } -if test ${ac_cv_lib_PocoJSON_Poco__JSON__Template+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Poco::JSON::Template in -lPocoJSON" >&5 +$as_echo_n "checking for Poco::JSON::Template in -lPocoJSON... " >&6; } +if ${ac_cv_lib_PocoJSON_Poco__JSON__Template+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lPocoJSON $LIBS" case "Poco::JSON::Template" @@ -4991,20 +4618,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { `echo "Poco::JSON::Template" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoJSON_Poco__JSON__Template=yes -else $as_nop +else ac_cv_lib_PocoJSON_Poco__JSON__Template=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5019,20 +4645,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::JSON::Template() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoJSON_Poco__JSON__Template=yes -else $as_nop +else ac_cv_lib_PocoJSON_Poco__JSON__Template=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*\(*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5043,20 +4668,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext }; int -main (void) +main () { `echo "Poco::JSON::Template" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoJSON_Poco__JSON__Template=yes -else $as_nop +else ac_cv_lib_PocoJSON_Poco__JSON__Template=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5069,64 +4693,66 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::JSON::Template() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoJSON_Poco__JSON__Template=yes -else $as_nop +else ac_cv_lib_PocoJSON_Poco__JSON__Template=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int Poco::JSON::Template (); -} +/* 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 Poco::JSON::Template (); int -main (void) +main () { -return conftest::Poco::JSON::Template (); +return Poco::JSON::Template (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoJSON_Poco__JSON__Template=yes -else $as_nop +else ac_cv_lib_PocoJSON_Poco__JSON__Template=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; esac LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoJSON_Poco__JSON__Template" >&5 -printf "%s\n" "$ac_cv_lib_PocoJSON_Poco__JSON__Template" >&6; } -if test $ac_cv_lib_PocoJSON_Poco__JSON__Template = yes -then : - printf "%s\n" "#define HAVE_LIBPOCOJSON 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoJSON_Poco__JSON__Template" >&5 +$as_echo "$ac_cv_lib_PocoJSON_Poco__JSON__Template" >&6; } +if test $ac_cv_lib_PocoJSON_Poco__JSON__Template = yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPOCOJSON 1 +_ACEOF LIBS="-lPocoJSON $LIBS" -else $as_nop +else as_fn_error $? "Could not find Poco JSON library." "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Poco::Crypto::CipherFactory in -lPocoCrypto" >&5 -printf %s "checking for Poco::Crypto::CipherFactory in -lPocoCrypto... " >&6; } -if test ${ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Poco::Crypto::CipherFactory in -lPocoCrypto" >&5 +$as_echo_n "checking for Poco::Crypto::CipherFactory in -lPocoCrypto... " >&6; } +if ${ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lPocoCrypto $LIBS" case "Poco::Crypto::CipherFactory" @@ -5141,20 +4767,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { `echo "Poco::Crypto::CipherFactory" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory=yes -else $as_nop +else ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5169,20 +4794,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::Crypto::CipherFactory() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory=yes -else $as_nop +else ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*\(*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5193,20 +4817,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext }; int -main (void) +main () { `echo "Poco::Crypto::CipherFactory" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory=yes -else $as_nop +else ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5219,64 +4842,66 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::Crypto::CipherFactory() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory=yes -else $as_nop +else ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int Poco::Crypto::CipherFactory (); -} +/* 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 Poco::Crypto::CipherFactory (); int -main (void) +main () { -return conftest::Poco::Crypto::CipherFactory (); +return Poco::Crypto::CipherFactory (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory=yes -else $as_nop +else ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; esac LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory" >&5 -printf "%s\n" "$ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory" >&6; } -if test $ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory = yes -then : - printf "%s\n" "#define HAVE_LIBPOCOCRYPTO 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory" >&5 +$as_echo "$ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory" >&6; } +if test $ac_cv_lib_PocoCrypto_Poco__Crypto__CipherFactory = yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPOCOCRYPTO 1 +_ACEOF LIBS="-lPocoCrypto $LIBS" -else $as_nop +else as_fn_error $? "Could not find Poco Crypto library." "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Poco::Net::HTTPRequest in -lPocoNet" >&5 -printf %s "checking for Poco::Net::HTTPRequest in -lPocoNet... " >&6; } -if test ${ac_cv_lib_PocoNet_Poco__Net__HTTPRequest+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Poco::Net::HTTPRequest in -lPocoNet" >&5 +$as_echo_n "checking for Poco::Net::HTTPRequest in -lPocoNet... " >&6; } +if ${ac_cv_lib_PocoNet_Poco__Net__HTTPRequest+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lPocoNet $LIBS" case "Poco::Net::HTTPRequest" @@ -5291,20 +4916,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { `echo "Poco::Net::HTTPRequest" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoNet_Poco__Net__HTTPRequest=yes -else $as_nop +else ac_cv_lib_PocoNet_Poco__Net__HTTPRequest=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5319,20 +4943,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::Net::HTTPRequest() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoNet_Poco__Net__HTTPRequest=yes -else $as_nop +else ac_cv_lib_PocoNet_Poco__Net__HTTPRequest=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*\(*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5343,20 +4966,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext }; int -main (void) +main () { `echo "Poco::Net::HTTPRequest" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoNet_Poco__Net__HTTPRequest=yes -else $as_nop +else ac_cv_lib_PocoNet_Poco__Net__HTTPRequest=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5369,64 +4991,66 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::Net::HTTPRequest() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoNet_Poco__Net__HTTPRequest=yes -else $as_nop +else ac_cv_lib_PocoNet_Poco__Net__HTTPRequest=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int Poco::Net::HTTPRequest (); -} +/* 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 Poco::Net::HTTPRequest (); int -main (void) +main () { -return conftest::Poco::Net::HTTPRequest (); +return Poco::Net::HTTPRequest (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoNet_Poco__Net__HTTPRequest=yes -else $as_nop +else ac_cv_lib_PocoNet_Poco__Net__HTTPRequest=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; esac LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoNet_Poco__Net__HTTPRequest" >&5 -printf "%s\n" "$ac_cv_lib_PocoNet_Poco__Net__HTTPRequest" >&6; } -if test $ac_cv_lib_PocoNet_Poco__Net__HTTPRequest = yes -then : - printf "%s\n" "#define HAVE_LIBPOCONET 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoNet_Poco__Net__HTTPRequest" >&5 +$as_echo "$ac_cv_lib_PocoNet_Poco__Net__HTTPRequest" >&6; } +if test $ac_cv_lib_PocoNet_Poco__Net__HTTPRequest = yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPOCONET 1 +_ACEOF LIBS="-lPocoNet $LIBS" -else $as_nop +else as_fn_error $? "Could not find Poco Net library." "$LINENO" 5 fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Poco::Net::HTTPSClientSession in -lPocoNetSSL" >&5 -printf %s "checking for Poco::Net::HTTPSClientSession in -lPocoNetSSL... " >&6; } -if test ${ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Poco::Net::HTTPSClientSession in -lPocoNetSSL" >&5 +$as_echo_n "checking for Poco::Net::HTTPSClientSession in -lPocoNetSSL... " >&6; } +if ${ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lPocoNetSSL $LIBS" case "Poco::Net::HTTPSClientSession" @@ -5441,20 +5065,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { `echo "Poco::Net::HTTPSClientSession" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession=yes -else $as_nop +else ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5469,20 +5092,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::Net::HTTPSClientSession() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession=yes -else $as_nop +else ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*\(*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5493,20 +5115,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext }; int -main (void) +main () { `echo "Poco::Net::HTTPSClientSession" | sed -e "s/(.*//" -e "s/\\(.*\\)::\\(.*\\)/((\\1*)(0))->\\2/g"`() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession=yes -else $as_nop +else ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *::*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5519,56 +5140,59 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext } int -main (void) +main () { new Poco::Net::HTTPSClientSession() ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession=yes -else $as_nop +else ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; *) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int Poco::Net::HTTPSClientSession (); -} +/* 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 Poco::Net::HTTPSClientSession (); int -main (void) +main () { -return conftest::Poco::Net::HTTPSClientSession (); +return Poco::Net::HTTPSClientSession (); ; return 0; } _ACEOF -if ac_fn_cxx_try_link "$LINENO" -then : +if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession=yes -else $as_nop +else ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ;; esac LIBS=$ac_check_lib_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession" >&5 -printf "%s\n" "$ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession" >&6; } -if test $ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession = yes -then : - printf "%s\n" "#define HAVE_LIBPOCONETSSL 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession" >&5 +$as_echo "$ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession" >&6; } +if test $ac_cv_lib_PocoNetSSL_Poco__Net__HTTPSClientSession = yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBPOCONETSSL 1 +_ACEOF LIBS="-lPocoNetSSL $LIBS" -else $as_nop +else as_fn_error $? "Could not find Poco NetSSL library." "$LINENO" 5 fi OUT_TARGET=craftos @@ -5593,692 +5217,667 @@ fi if test "x$enable_wasm" != "xyes"; then - if test "x$with_png" != "xno" -then : + if test "x$with_png" != "xno"; then : - for ac_header in png++/png.hpp + for ac_header in png++/png.hpp do : - ac_fn_cxx_check_header_compile "$LINENO" "png++/png.hpp" "ac_cv_header_pngpp_png_hpp" "$ac_includes_default" -if test "x$ac_cv_header_pngpp_png_hpp" = xyes -then : - printf "%s\n" "#define HAVE_PNG___PNG_HPP 1" >>confdefs.h - -else $as_nop - if test "x$with_png" = "xyes" -then : + ac_fn_cxx_check_header_mongrel "$LINENO" "png++/png.hpp" "ac_cv_header_pngpp_png_hpp" "$ac_includes_default" +if test "x$ac_cv_header_pngpp_png_hpp" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PNG___PNG_HPP 1 +_ACEOF + +else + if test "x$with_png" = "xyes"; then : as_fn_error $? "Could not find png++ header." "$LINENO" 5 -else $as_nop +else NO_PNG=1 fi fi done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing png_init_io" >&5 -printf %s "checking for library containing png_init_io... " >&6; } -if test ${ac_cv_search_png_init_io+y} -then : - printf %s "(cached) " >&6 -else $as_nop + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing png_init_io" >&5 +$as_echo_n "checking for library containing png_init_io... " >&6; } +if ${ac_cv_search_png_init_io+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int png_init_io (); -} +/* 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 png_init_io (); int -main (void) +main () { -return conftest::png_init_io (); +return png_init_io (); ; return 0; } _ACEOF -for ac_lib in '' png -do +for ac_lib in '' png; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_png_init_io=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_png_init_io+y} -then : + if ${ac_cv_search_png_init_io+:} false; then : break fi done -if test ${ac_cv_search_png_init_io+y} -then : +if ${ac_cv_search_png_init_io+:} false; then : -else $as_nop +else ac_cv_search_png_init_io=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_png_init_io" >&5 -printf "%s\n" "$ac_cv_search_png_init_io" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_png_init_io" >&5 +$as_echo "$ac_cv_search_png_init_io" >&6; } ac_res=$ac_cv_search_png_init_io -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else $as_nop - if test "x$with_png" = "xyes" -then : +else + if test "x$with_png" = "xyes"; then : as_fn_error $? "Could not find libpng library." "$LINENO" 5 -else $as_nop +else NO_PNG=1 fi fi -else $as_nop +else NO_PNG=1 fi - if test "x$with_webp" != "xno" -then : + if test "x$with_webp" != "xno"; then : - for ac_header in webp/mux.h + for ac_header in webp/mux.h do : - ac_fn_cxx_check_header_compile "$LINENO" "webp/mux.h" "ac_cv_header_webp_mux_h" "$ac_includes_default" -if test "x$ac_cv_header_webp_mux_h" = xyes -then : - printf "%s\n" "#define HAVE_WEBP_MUX_H 1" >>confdefs.h - -else $as_nop - if test "x$with_webp" = "xyes" -then : + ac_fn_cxx_check_header_mongrel "$LINENO" "webp/mux.h" "ac_cv_header_webp_mux_h" "$ac_includes_default" +if test "x$ac_cv_header_webp_mux_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WEBP_MUX_H 1 +_ACEOF + +else + if test "x$with_webp" = "xyes"; then : as_fn_error $? "Could not find webp header." "$LINENO" 5 -else $as_nop +else NO_WEBP=1 fi fi done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing WebPEncodeRGB" >&5 -printf %s "checking for library containing WebPEncodeRGB... " >&6; } -if test ${ac_cv_search_WebPEncodeRGB+y} -then : - printf %s "(cached) " >&6 -else $as_nop + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing WebPEncodeRGB" >&5 +$as_echo_n "checking for library containing WebPEncodeRGB... " >&6; } +if ${ac_cv_search_WebPEncodeRGB+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int WebPEncodeRGB (); -} +/* 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 WebPEncodeRGB (); int -main (void) +main () { -return conftest::WebPEncodeRGB (); +return WebPEncodeRGB (); ; return 0; } _ACEOF -for ac_lib in '' webp -do +for ac_lib in '' webp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_WebPEncodeRGB=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_WebPEncodeRGB+y} -then : + if ${ac_cv_search_WebPEncodeRGB+:} false; then : break fi done -if test ${ac_cv_search_WebPEncodeRGB+y} -then : +if ${ac_cv_search_WebPEncodeRGB+:} false; then : -else $as_nop +else ac_cv_search_WebPEncodeRGB=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_WebPEncodeRGB" >&5 -printf "%s\n" "$ac_cv_search_WebPEncodeRGB" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_WebPEncodeRGB" >&5 +$as_echo "$ac_cv_search_WebPEncodeRGB" >&6; } ac_res=$ac_cv_search_WebPEncodeRGB -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else $as_nop - if test "x$with_webp" = "xyes" -then : +else + if test "x$with_webp" = "xyes"; then : as_fn_error $? "Could not find libwebp library." "$LINENO" 5 -else $as_nop +else NO_WEBP=1 fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing WebPAnimEncoderNewInternal" >&5 -printf %s "checking for library containing WebPAnimEncoderNewInternal... " >&6; } -if test ${ac_cv_search_WebPAnimEncoderNewInternal+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing WebPAnimEncoderNewInternal" >&5 +$as_echo_n "checking for library containing WebPAnimEncoderNewInternal... " >&6; } +if ${ac_cv_search_WebPAnimEncoderNewInternal+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int WebPAnimEncoderNewInternal (); -} +/* 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 WebPAnimEncoderNewInternal (); int -main (void) +main () { -return conftest::WebPAnimEncoderNewInternal (); +return WebPAnimEncoderNewInternal (); ; return 0; } _ACEOF -for ac_lib in '' webpmux -do +for ac_lib in '' webpmux; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_WebPAnimEncoderNewInternal=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_WebPAnimEncoderNewInternal+y} -then : + if ${ac_cv_search_WebPAnimEncoderNewInternal+:} false; then : break fi done -if test ${ac_cv_search_WebPAnimEncoderNewInternal+y} -then : +if ${ac_cv_search_WebPAnimEncoderNewInternal+:} false; then : -else $as_nop +else ac_cv_search_WebPAnimEncoderNewInternal=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_WebPAnimEncoderNewInternal" >&5 -printf "%s\n" "$ac_cv_search_WebPAnimEncoderNewInternal" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_WebPAnimEncoderNewInternal" >&5 +$as_echo "$ac_cv_search_WebPAnimEncoderNewInternal" >&6; } ac_res=$ac_cv_search_WebPAnimEncoderNewInternal -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else $as_nop - if test "x$with_webp" = "xyes" -then : +else + if test "x$with_webp" = "xyes"; then : as_fn_error $? "Could not find libwebp library." "$LINENO" 5 -else $as_nop +else NO_WEBP=1 fi fi -else $as_nop +else NO_WEBP=1 fi - if test "x$with_ncurses" != "xno" -then : + if test "x$with_ncurses" != "xno"; then : - for ac_header in ncurses.h + for ac_header in ncurses.h do : - ac_fn_cxx_check_header_compile "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default" -if test "x$ac_cv_header_ncurses_h" = xyes -then : - printf "%s\n" "#define HAVE_NCURSES_H 1" >>confdefs.h - -else $as_nop - if test "x$with_ncurses" = "xyes" -then : + ac_fn_cxx_check_header_mongrel "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default" +if test "x$ac_cv_header_ncurses_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_NCURSES_H 1 +_ACEOF + +else + if test "x$with_ncurses" = "xyes"; then : as_fn_error $? "Could not find ncurses header." "$LINENO" 5 -else $as_nop +else NO_CLI=1 fi fi done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 -printf %s "checking for library containing initscr... " >&6; } -if test ${ac_cv_search_initscr+y} -then : - printf %s "(cached) " >&6 -else $as_nop + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 +$as_echo_n "checking for library containing initscr... " >&6; } +if ${ac_cv_search_initscr+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int initscr (); -} +/* 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 initscr (); int -main (void) +main () { -return conftest::initscr (); +return initscr (); ; return 0; } _ACEOF -for ac_lib in '' ncursesw ncurses -do +for ac_lib in '' ncursesw ncurses; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_initscr=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_initscr+y} -then : + if ${ac_cv_search_initscr+:} false; then : break fi done -if test ${ac_cv_search_initscr+y} -then : +if ${ac_cv_search_initscr+:} false; then : -else $as_nop +else ac_cv_search_initscr=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_initscr" >&5 -printf "%s\n" "$ac_cv_search_initscr" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_initscr" >&5 +$as_echo "$ac_cv_search_initscr" >&6; } ac_res=$ac_cv_search_initscr -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else $as_nop - if test "x$with_ncurses" = "xyes" -then : +else + if test "x$with_ncurses" = "xyes"; then : as_fn_error $? "Could not find ncurses library." "$LINENO" 5 -else $as_nop +else NO_CLI=1 fi fi -else $as_nop +else NO_CLI=1 fi - if test "x$with_sdl_mixer" != "xno" -then : + if test "x$with_sdl_mixer" != "xno"; then : - for ac_header in SDL2/SDL_mixer.h + for ac_header in SDL2/SDL_mixer.h do : - ac_fn_cxx_check_header_compile "$LINENO" "SDL2/SDL_mixer.h" "ac_cv_header_SDL2_SDL_mixer_h" "$ac_includes_default" -if test "x$ac_cv_header_SDL2_SDL_mixer_h" = xyes -then : - printf "%s\n" "#define HAVE_SDL2_SDL_MIXER_H 1" >>confdefs.h - -else $as_nop - if test "x$with_sdl_mixer" = "xyes" -then : + ac_fn_cxx_check_header_mongrel "$LINENO" "SDL2/SDL_mixer.h" "ac_cv_header_SDL2_SDL_mixer_h" "$ac_includes_default" +if test "x$ac_cv_header_SDL2_SDL_mixer_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SDL2_SDL_MIXER_H 1 +_ACEOF + +else + if test "x$with_sdl_mixer" = "xyes"; then : as_fn_error $? "Could not find SDL2_mixer header." "$LINENO" 5 -else $as_nop +else NO_MIXER=1 fi fi done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing Mix_Init" >&5 -printf %s "checking for library containing Mix_Init... " >&6; } -if test ${ac_cv_search_Mix_Init+y} -then : - printf %s "(cached) " >&6 -else $as_nop + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing Mix_Init" >&5 +$as_echo_n "checking for library containing Mix_Init... " >&6; } +if ${ac_cv_search_Mix_Init+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int Mix_Init (); -} +/* 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 Mix_Init (); int -main (void) +main () { -return conftest::Mix_Init (); +return Mix_Init (); ; return 0; } _ACEOF -for ac_lib in '' SDL2_mixer -do +for ac_lib in '' SDL2_mixer; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_Mix_Init=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_Mix_Init+y} -then : + if ${ac_cv_search_Mix_Init+:} false; then : break fi done -if test ${ac_cv_search_Mix_Init+y} -then : +if ${ac_cv_search_Mix_Init+:} false; then : -else $as_nop +else ac_cv_search_Mix_Init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_Mix_Init" >&5 -printf "%s\n" "$ac_cv_search_Mix_Init" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_Mix_Init" >&5 +$as_echo "$ac_cv_search_Mix_Init" >&6; } ac_res=$ac_cv_search_Mix_Init -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else $as_nop - if test "x$with_sdl_mixer" = "xyes" -then : +else + if test "x$with_sdl_mixer" = "xyes"; then : as_fn_error $? "Could not find SDL2_mixer library." "$LINENO" 5 -else $as_nop +else NO_MIXER=1 fi fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing mpg123_init" >&5 -printf %s "checking for library containing mpg123_init... " >&6; } -if test ${ac_cv_search_mpg123_init+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing mpg123_init" >&5 +$as_echo_n "checking for library containing mpg123_init... " >&6; } +if ${ac_cv_search_mpg123_init+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int mpg123_init (); -} +/* 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 mpg123_init (); int -main (void) +main () { -return conftest::mpg123_init (); +return mpg123_init (); ; return 0; } _ACEOF -for ac_lib in '' mpg123 -do +for ac_lib in '' mpg123; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_mpg123_init=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_mpg123_init+y} -then : + if ${ac_cv_search_mpg123_init+:} false; then : break fi done -if test ${ac_cv_search_mpg123_init+y} -then : +if ${ac_cv_search_mpg123_init+:} false; then : -else $as_nop +else ac_cv_search_mpg123_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_mpg123_init" >&5 -printf "%s\n" "$ac_cv_search_mpg123_init" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_mpg123_init" >&5 +$as_echo "$ac_cv_search_mpg123_init" >&6; } ac_res=$ac_cv_search_mpg123_init -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing FLAC__stream_decoder_new" >&5 -printf %s "checking for library containing FLAC__stream_decoder_new... " >&6; } -if test ${ac_cv_search_FLAC__stream_decoder_new+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing FLAC__stream_decoder_new" >&5 +$as_echo_n "checking for library containing FLAC__stream_decoder_new... " >&6; } +if ${ac_cv_search_FLAC__stream_decoder_new+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int FLAC__stream_decoder_new (); -} +/* 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 FLAC__stream_decoder_new (); int -main (void) +main () { -return conftest::FLAC__stream_decoder_new (); +return FLAC__stream_decoder_new (); ; return 0; } _ACEOF -for ac_lib in '' flac -do +for ac_lib in '' flac; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_FLAC__stream_decoder_new=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_FLAC__stream_decoder_new+y} -then : + if ${ac_cv_search_FLAC__stream_decoder_new+:} false; then : break fi done -if test ${ac_cv_search_FLAC__stream_decoder_new+y} -then : +if ${ac_cv_search_FLAC__stream_decoder_new+:} false; then : -else $as_nop +else ac_cv_search_FLAC__stream_decoder_new=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_FLAC__stream_decoder_new" >&5 -printf "%s\n" "$ac_cv_search_FLAC__stream_decoder_new" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_FLAC__stream_decoder_new" >&5 +$as_echo "$ac_cv_search_FLAC__stream_decoder_new" >&6; } ac_res=$ac_cv_search_FLAC__stream_decoder_new -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing new_fluid_synth" >&5 -printf %s "checking for library containing new_fluid_synth... " >&6; } -if test ${ac_cv_search_new_fluid_synth+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing new_fluid_synth" >&5 +$as_echo_n "checking for library containing new_fluid_synth... " >&6; } +if ${ac_cv_search_new_fluid_synth+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int new_fluid_synth (); -} +/* 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 new_fluid_synth (); int -main (void) +main () { -return conftest::new_fluid_synth (); +return new_fluid_synth (); ; return 0; } _ACEOF -for ac_lib in '' fluidsynth -do +for ac_lib in '' fluidsynth; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_new_fluid_synth=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_new_fluid_synth+y} -then : + if ${ac_cv_search_new_fluid_synth+:} false; then : break fi done -if test ${ac_cv_search_new_fluid_synth+y} -then : +if ${ac_cv_search_new_fluid_synth+:} false; then : -else $as_nop +else ac_cv_search_new_fluid_synth=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_new_fluid_synth" >&5 -printf "%s\n" "$ac_cv_search_new_fluid_synth" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_new_fluid_synth" >&5 +$as_echo "$ac_cv_search_new_fluid_synth" >&6; } ac_res=$ac_cv_search_new_fluid_synth -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else $as_nop - if test "x$with_sdl_mixer" = "xyes" -then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Could not find FluidSynth library. Soundfont support will be limited or non-existent." >&5 -printf "%s\n" "$as_me: WARNING: Could not find FluidSynth library. Soundfont support will be limited or non-existent." >&2;} +else + if test "x$with_sdl_mixer" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find FluidSynth library. Soundfont support will be limited or non-existent." >&5 +$as_echo "$as_me: WARNING: Could not find FluidSynth library. Soundfont support will be limited or non-existent." >&2;} fi fi -else $as_nop +else NO_MIXER=1 fi - if test "x$PRINT_TYPE" = "x" || test "x$PRINT_TYPE" = "x0" -then : + if test "x$PRINT_TYPE" = "x" || test "x$PRINT_TYPE" = "x0"; then : - for ac_header in hpdf.h + for ac_header in hpdf.h do : - ac_fn_cxx_check_header_compile "$LINENO" "hpdf.h" "ac_cv_header_hpdf_h" "$ac_includes_default" -if test "x$ac_cv_header_hpdf_h" = xyes -then : - printf "%s\n" "#define HAVE_HPDF_H 1" >>confdefs.h - -else $as_nop - if test "x$PRINT_TYPE" = "x0" -then : + ac_fn_cxx_check_header_mongrel "$LINENO" "hpdf.h" "ac_cv_header_hpdf_h" "$ac_includes_default" +if test "x$ac_cv_header_hpdf_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_HPDF_H 1 +_ACEOF + +else + if test "x$PRINT_TYPE" = "x0"; then : as_fn_error $? "Could not find hpdf header." "$LINENO" 5 -else $as_nop +else PRINT_TYPE=1 fi fi done - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing HPDF_New" >&5 -printf %s "checking for library containing HPDF_New... " >&6; } -if test ${ac_cv_search_HPDF_New+y} -then : - printf %s "(cached) " >&6 -else $as_nop + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing HPDF_New" >&5 +$as_echo_n "checking for library containing HPDF_New... " >&6; } +if ${ac_cv_search_HPDF_New+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -namespace conftest { - extern "C" int HPDF_New (); -} +/* 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 HPDF_New (); int -main (void) +main () { -return conftest::HPDF_New (); +return HPDF_New (); ; return 0; } _ACEOF -for ac_lib in '' hpdf -do +for ac_lib in '' hpdf; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_cxx_try_link "$LINENO" -then : + if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_HPDF_New=$ac_res fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if test ${ac_cv_search_HPDF_New+y} -then : + if ${ac_cv_search_HPDF_New+:} false; then : break fi done -if test ${ac_cv_search_HPDF_New+y} -then : +if ${ac_cv_search_HPDF_New+:} false; then : -else $as_nop +else ac_cv_search_HPDF_New=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_HPDF_New" >&5 -printf "%s\n" "$ac_cv_search_HPDF_New" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_HPDF_New" >&5 +$as_echo "$ac_cv_search_HPDF_New" >&6; } ac_res=$ac_cv_search_HPDF_New -if test "$ac_res" != no -then : +if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" -else $as_nop - if test "x$PRINT_TYPE" = "x0" -then : +else + if test "x$PRINT_TYPE" = "x0"; then : as_fn_error $? "Could not find hpdf library." "$LINENO" 5 -else $as_nop +else PRINT_TYPE=1 fi fi @@ -6286,6 +5885,63 @@ fi fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5 +$as_echo_n "checking for library containing backtrace... " >&6; } +if ${ac_cv_search_backtrace+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* 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 backtrace (); +int +main () +{ +return backtrace (); + ; + return 0; +} +_ACEOF +for ac_lib in '' execinfo; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_cxx_try_link "$LINENO"; then : + ac_cv_search_backtrace=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_backtrace+:} false; then : + break +fi +done +if ${ac_cv_search_backtrace+:} false; then : + +else + ac_cv_search_backtrace=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5 +$as_echo "$ac_cv_search_backtrace" >&6; } +ac_res=$ac_cv_search_backtrace +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + # for musl libc on Linux + if test "x$NO_PNG" = "x1"; then CPPFLAGS="$CPPFLAGS -DNO_PNG"; fi if test "x$NO_WEBP" = "x1"; then CPPFLAGS="$CPPFLAGS -DNO_WEBP"; fi if test "x$NO_CLI" = "x1"; then CPPFLAGS="$CPPFLAGS -DNO_CLI"; fi @@ -6323,8 +5979,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -printf "%s\n" "$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) ;; #( @@ -6354,15 +6010,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -6376,8 +6032,8 @@ printf "%s\n" "$as_me: updating cache $cache_file" >&6;} fi fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} + { $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 rm -f confcache @@ -6430,7 +6086,7 @@ 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=`printf "%s\n" "$ac_i" | sed "$ac_script"` + 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. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -6446,8 +6102,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -6470,16 +6126,14 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: -if test ${ZSH_VERSION+y} && (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 # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -6489,46 +6143,46 @@ esac fi - -# Reset variables that may have inherited troublesome values from -# the environment. - -# IFS needs to be set, to space, tab, and newline, in precisely that order. -# (If _AS_PATH_WALK were called with IFS unset, it would have the -# side effect of setting IFS to empty, thus disabling word splitting.) -# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -IFS=" "" $as_nl" - -PS1='$ ' -PS2='> ' -PS4='+ ' - -# Ensure predictable behavior from utilities with locale-dependent output. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# We cannot yet rely on "unset" to work, but we need these variables -# to be unset--not just set to an empty or harmless value--now, to -# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct -# also avoids known problems related to "unset" and subshell syntax -# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). -for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH -do eval test \${$as_var+y} \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done - -# Ensure that fds 0, 1, and 2 are open. -if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi -if (exec 3>&2) ; then :; else exec 2>/dev/null; fi +# Printing a long string crashes Solaris 7 /usr/bin/printf. +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 +# 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 + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -6537,6 +6191,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -6545,12 +6206,8 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - test -r "$as_dir$0" && as_myself=$as_dir$0 && break + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -6562,10 +6219,30 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# 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='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -6578,14 +6255,13 @@ 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 - printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $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. @@ -6612,20 +6288,18 @@ 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 : +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_nop +else as_fn_append () { eval $1=\$$1\$2 @@ -6637,13 +6311,12 @@ fi # as_fn_append # 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 : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -6674,7 +6347,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -6696,10 +6369,6 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits - -# Determine whether it's possible to make 'echo' print without a newline. -# These variables are no longer used directly by Autoconf, but are AC_SUBSTed -# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -6713,12 +6382,6 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac -# For backward compatibility with old third-party macros, we provide -# the shell variables $as_echo and $as_echo_n. New code should use -# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. -as_echo='printf %s\n' -as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -6760,7 +6423,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -6769,7 +6432,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$as_dir" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -6881,16 +6544,14 @@ $config_files Report bugs to the package provider." _ACEOF -ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` -ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config='$ac_cs_config_escaped' +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ CraftOS-PC Accelerated config.status 2.6 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 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." @@ -6927,21 +6588,21 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - printf "%s\n" "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; + $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=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -6969,7 +6630,7 @@ 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 shift - \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -6983,7 +6644,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - printf "%s\n" "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF @@ -7008,7 +6669,7 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree @@ -7236,7 +6897,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -7244,17 +6905,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -printf "%s\n" "$as_me: creating $ac_file" >&6;} + { $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. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | + ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -7271,7 +6932,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -7295,9 +6956,9 @@ printf "%s\n" X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -7350,8 +7011,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $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 ac_datarootdir_hack=' @@ -7393,9 +7054,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { 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"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { $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 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -7442,8 +7103,7 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -printf "%s\n" "$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 - diff --git a/configure.ac b/configure.ac index 59aaf80c..9ddfe923 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # Initialize -AC_INIT([CraftOS-PC Accelerated], [2.6]) +AC_INIT([CraftOS-PC Accelerated], [2.8]) AC_CONFIG_SRCDIR([src/main.cpp]) AC_CONFIG_MACRO_DIRS([m4]) @@ -137,6 +137,8 @@ if test "x$enable_wasm" != "xyes"; then AC_SEARCH_LIBS(HPDF_New, hpdf, [], [AS_IF([test "x$PRINT_TYPE" = "x0"], [AC_MSG_ERROR([Could not find hpdf library.])], [PRINT_TYPE=1])]) ], []) + AC_SEARCH_LIBS(backtrace, execinfo, [], []) # for musl libc on Linux + if test "x$NO_PNG" = "x1"; then CPPFLAGS="$CPPFLAGS -DNO_PNG"; fi if test "x$NO_WEBP" = "x1"; then CPPFLAGS="$CPPFLAGS -DNO_WEBP"; fi if test "x$NO_CLI" = "x1"; then CPPFLAGS="$CPPFLAGS -DNO_CLI"; fi diff --git a/examples/ccemux.cpp b/examples/ccemux.cpp index 917b3d40..003be580 100644 --- a/examples/ccemux.cpp +++ b/examples/ccemux.cpp @@ -248,7 +248,7 @@ static struct luaL_Reg M[] = { {NULL, NULL} }; -static PluginInfo info("ccemux", 3); +static PluginInfo info("ccemux", 0); extern "C" { DLLEXPORT int luaopen_ccemux(lua_State *L) { diff --git a/resources/CraftOS-PC.exe.manifest b/resources/CraftOS-PC.exe.manifest index d6caf141..56c3d92d 100644 --- a/resources/CraftOS-PC.exe.manifest +++ b/resources/CraftOS-PC.exe.manifest @@ -3,7 +3,7 @@ Advanced ComputerCraft Emulator diff --git a/resources/Info.plist b/resources/Info.plist index 164726c1..a46ae55e 100644 --- a/resources/Info.plist +++ b/resources/Info.plist @@ -21,13 +21,13 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.8 + 2.8.2 CFBundleSignature ???? LSApplicationCategoryType Unknown CFBundleVersion - 2.8 + 2.8.2 NSHumanReadableCopyright Copyright (C) 2019-2024 JackMacWindows. NSHighResolutionCapable diff --git a/src/Computer.cpp b/src/Computer.cpp index 3c6d36c8..b0b01210 100644 --- a/src/Computer.cpp +++ b/src/Computer.cpp @@ -290,14 +290,6 @@ void runComputer(Computer * self, const path_t& bios_name, const std::string& bi lua_setmetatable(L, -2); lua_setfield(L, LUA_REGISTRYINDEX, "_coroutine_stack"); - // Disable luaL_register using package.loaded by making it a dummy table - lua_newtable(L); - lua_createtable(L, 0, 1); - lua_pushcfunction(L, doNothing); - lua_setfield(L, -2, "__newindex"); - lua_setmetatable(L, -2); - lua_setfield(L, LUA_REGISTRYINDEX, "_LOADED"); - // Load libraries const luaL_Reg *lib = lualibs; /* call open functions from 'loadedlibs' and set results to global table */ @@ -336,6 +328,12 @@ void runComputer(Computer * self, const path_t& bios_name, const std::string& bi lua_setglobal(L, "ffi"); } + // Replace `os` in `_LOADED` with CC's `os` + lua_getfield(L, LUA_REGISTRYINDEX, "_LOADED"); + lua_getglobal(L, "os"); + lua_setfield(L, -2, "os"); + lua_pop(L, 1); + // Load any plugins available if (!config.vanilla) { if (!globalPluginErrors.empty()) { @@ -529,7 +527,7 @@ void runComputer(Computer * self, const path_t& bios_name, const std::string& bi while (status == LUA_YIELD && self->running == 1) { status = lua_resume(self->coro, narg); if (status == LUA_YIELD) { - if (lua_gettop(self->coro) && lua_isstring(self->coro, -1)) narg = getNextEvent(self->coro, std::string(lua_tostring(self->coro, -1), lua_objlen(self->coro, -1))); + if (lua_gettop(self->coro) && lua_isstring(self->coro, -1)) narg = getNextEvent(self->coro, tostring(self->coro, -1)); else narg = getNextEvent(self->coro, ""); } else if (status != 0 && self->running == 1) { // Catch runtime error diff --git a/src/apis/config.cpp b/src/apis/config.cpp index 5e559310..0784a10e 100644 --- a/src/apis/config.cpp +++ b/src/apis/config.cpp @@ -137,7 +137,7 @@ static int config_set(lua_State *L) { // trying to deallocate unallocated/invalid memory. The only workaround I've found is to make the static variables // dynamic, thus telling MSVC to keep its grubby hands off allocation/deallocation. It's an unfortunate situation, // but there's really no way around it. - std::string * message = new std::string("A script is attempting to change the default mount mode to " + (lua_isnumber(L, 2) ? std::to_string(lua_tointeger(L, 2)) : std::string(lua_tostring(L, 2))) + ". This will allow any script to access any part of your REAL computer that is not blacklisted. Do you want to allow this change?"); + std::string * message = new std::string("A script is attempting to change the default mount mode to " + (lua_isnumber(L, 2) ? std::to_string(lua_tointeger(L, 2)) : tostring(L, 2)) + ". This will allow any script to access any part of your REAL computer that is not blacklisted. Do you want to allow this change?"); data.message = message->c_str(); data.numbuttons = 2; SDL_MessageBoxButtonData buttons[2]; @@ -165,7 +165,7 @@ static int config_set(lua_State *L) { } else luaL_error(L, "Configuration option 'mount_mode' is protected"); } setConfigSetting(disable_lua51_features, boolean); else if (strcmp(name, "default_computer_settings") == 0) - config.default_computer_settings = std::string(luaL_checkstring(L, 2), lua_objlen(L, 2)); + config.default_computer_settings = checkstring(L, 2); setConfigSetting(logErrors, boolean); setConfigSettingI(computerSpaceLimit); setConfigSettingI(maximumFilesOpen); @@ -204,7 +204,7 @@ static int config_set(lua_State *L) { setConfigSetting(standardsMode, boolean); setConfigSetting(useHardwareRenderer, boolean); else if (strcmp(name, "preferredHardwareDriver") == 0) - config.preferredHardwareDriver = std::string(luaL_checkstring(L, 2), lua_objlen(L, 2)); + config.preferredHardwareDriver = checkstring(L, 2); setConfigSetting(useVsync, boolean); setConfigSetting(http_websocket_enabled, boolean); setConfigSettingI(http_max_websockets); @@ -245,7 +245,7 @@ static int config_set(lua_State *L) { switch (std::get<0>(userConfig[name])) { case 0: config.pluginData[name] = lua_toboolean(L, 2) ? "true" : "false"; break; case 1: config.pluginData[name] = std::to_string(luaL_checkinteger(L, 2)); break; - case 2: config.pluginData[name] = std::string(luaL_checkstring(L, 2), lua_objlen(L, 2)); break; + case 2: config.pluginData[name] = checkstring(L, 2); break; case 3: return luaL_error(L, "Invalid type"); // maybe fix this later? } if (std::get<1>(userConfig[name]) != nullptr) { diff --git a/src/apis/handles/http_handle.cpp b/src/apis/handles/http_handle.cpp index a5b88875..96d4b050 100644 --- a/src/apis/handles/http_handle.cpp +++ b/src/apis/handles/http_handle.cpp @@ -28,6 +28,7 @@ int http_handle_free(lua_State *L) { lastCFunction = __func__; http_handle_t** handle = (http_handle_t**)lua_touserdata(L, 1); if (*handle != NULL) { + if (config.standardsMode) delete (std::stringstream*)(*handle)->stream; delete (*handle)->handle; delete (*handle)->session; delete *handle; @@ -40,6 +41,7 @@ int http_handle_close(lua_State *L) { lastCFunction = __func__; http_handle_t** handle = (http_handle_t**)lua_touserdata(L, lua_upvalueindex(1)); if (*handle == NULL) return 0; + if (config.standardsMode) delete (std::stringstream*)(*handle)->stream; delete (*handle)->handle; delete (*handle)->session; delete *handle; diff --git a/src/apis/http.cpp b/src/apis/http.cpp index f73e9a8a..e70859bd 100644 --- a/src/apis/http.cpp +++ b/src/apis/http.cpp @@ -324,7 +324,17 @@ static void downloadThread(void* arg) { } http_handle_t * handle; try { - handle = new http_handle_t(&session->receiveResponse(*response)); + if (config.standardsMode) { + // Fix seeking by reading the entire data into a stringstream + std::istream& instream = session->receiveResponse(*response); + std::stringstream * ss = new std::stringstream; + while (!instream.eof()) { + char buf[4096]; + instream.read(buf, 4096); + ss->write(buf, instream.gcount()); + } + handle = new http_handle_t(ss); + } else handle = new http_handle_t(&session->receiveResponse(*response)); } catch (Poco::TimeoutException &e) { http_handle_t * err = new http_handle_t(NULL); err->url = param->url; @@ -348,6 +358,8 @@ static void downloadThread(void* arg) { err->url = param->url; err->failureReason = "Response is too large"; queueEvent(param->comp, http_failure, err); + if (config.standardsMode) delete (std::stringstream*)handle->stream; + delete handle; delete response; delete session; goto downloadThread_finish; @@ -361,6 +373,7 @@ static void downloadThread(void* arg) { if (location[0] == '/') location = uri.getScheme() + "://" + uri.getHost() + location; else location = uri.getScheme() + "://" + uri.getHost() + path.substr(0, path.find('?')) + "/" + location; } + if (config.standardsMode) delete (std::stringstream*)handle->stream; delete handle->handle; delete handle->session; delete handle; @@ -478,18 +491,19 @@ static int http_request(lua_State *L) { if (lua_istable(L, 1)) { lua_getfield(L, 1, "url"); if (!lua_isstring(L, -1)) {delete param; return luaL_error(L, "bad field 'url' (string expected, got %s)", lua_typename(L, lua_type(L, -1)));} - param->url = lua_tostring(L, -1); + param->url = tostring(L, -1); param->old_url = param->url; lua_pop(L, 1); lua_getfield(L, 1, "body"); if (!lua_isnil(L, -1) && !lua_isstring(L, -1)) {delete param; return luaL_error(L, "bad field 'body' (string expected, got %s)", lua_typename(L, lua_type(L, -1)));} - else if (lua_isstring(L, -1)) param->postData = std::string(lua_tostring(L, -1), lua_objlen(L, -1)); + else if (lua_isstring(L, -1)) param->postData = tostring(L, -1); lua_pop(L, 1); lua_getfield(L, 1, "method"); if (!lua_isnil(L, -1) && !lua_isstring(L, -1)) {delete param; return luaL_error(L, "bad field 'method' (string expected, got %s)", lua_typename(L, lua_type(L, -1)));} - else if (lua_isstring(L, -1)) param->method = lua_tostring(L, -1); + else if (lua_isstring(L, -1)) param->method = tostring(L, -1); lua_pop(L, 1); lua_getfield(L, 1, "redirect"); + param->redirect = true; if (!lua_isnil(L, -1) && !lua_isboolean(L, -1)) {delete param; return luaL_error(L, "bad field 'redirect' (boolean expected, got %s)", lua_typename(L, lua_type(L, -1)));} else if (lua_isboolean(L, -1)) param->redirect = lua_toboolean(L, -1); lua_pop(L, 1); @@ -511,9 +525,10 @@ static int http_request(lua_State *L) { else param->timeout = 0; lua_pop(L, 1); } else { - param->url = lua_tostring(L, 1); + param->url = checkstring(L, 1); param->old_url = param->url; - if (lua_isstring(L, 2)) param->postData = std::string(lua_tostring(L, 2), lua_objlen(L, 2)); + if (!lua_isnoneornil(L, 2)) param->postData = checkstring(L, 2); + else param->postData = ""; if (lua_istable(L, 3)) { lua_pushvalue(L, 3); lua_pushnil(L); @@ -525,7 +540,7 @@ static int http_request(lua_State *L) { } lua_pop(L, 1); } - if (lua_isstring(L, 5)) param->method = lua_tostring(L, 5); + param->method = luaL_optstring(L, 5, ""); param->redirect = !lua_isboolean(L, 6) || lua_toboolean(L, 6); param->timeout = 0; } @@ -1321,7 +1336,9 @@ static const char websocket_server_listen[] = "local _port, _isOpen = ...\n" */ static int websocket_server_close(lua_State *L) { lastCFunction = __func__; + Computer * comp = get_comp(L); websocket_server::Factory * f = *(websocket_server::Factory**)lua_touserdata(L, lua_upvalueindex(1)); + comp->openWebsocketServers.erase(f->srv->port()); if (f == NULL) return 0; f->srv->stop(); delete f->srv; @@ -1337,7 +1354,9 @@ static int websocket_server_isOpen(lua_State *L) { static int websocket_server_free(lua_State *L) { lastCFunction = __func__; + Computer * comp = get_comp(L); websocket_server::Factory * f = *(websocket_server::Factory**)lua_touserdata(L, 1); + comp->openWebsocketServers.erase(f->srv->port()); if (f == NULL) return 0; f->srv->stop(); delete f->srv; diff --git a/src/apis/http_emscripten.cpp b/src/apis/http_emscripten.cpp index 4c5c4561..9cc4dc39 100644 --- a/src/apis/http_emscripten.cpp +++ b/src/apis/http_emscripten.cpp @@ -281,7 +281,7 @@ int http_checkURL(lua_State *L) { luaL_checkstring(L, 1); http_param_t * param = new http_param_t; param->comp = get_comp(L); - param->url = std::string(lua_tostring(L, 1), lua_objlen(L, 1)); + param->url = tostring(L, 1); std::thread th(checkThread, param); setThreadName(th, "HTTP Check Thread"); th.detach(); diff --git a/src/apis/os.cpp b/src/apis/os.cpp index 693586ff..34e50810 100644 --- a/src/apis/os.cpp +++ b/src/apis/os.cpp @@ -26,7 +26,7 @@ static int os_getComputerLabel(lua_State *L) { static int os_setComputerLabel(lua_State *L) { lastCFunction = __func__; Computer * comp = get_comp(L); - comp->config->label = std::string(luaL_optstring(L, 1, ""), lua_isstring(L, 1) ? lua_objlen(L, 1) : 0); + comp->config->label = tostring(L, 1, ""); if (comp->term != NULL) comp->term->setLabel(comp->config->label.empty() ? "CraftOS Terminal: " + std::string(comp->isDebugger ? "Debugger" : "Computer") + " " + std::to_string(comp->id) : "CraftOS Terminal: " + asciify(comp->config->label)); return 0; } @@ -34,7 +34,7 @@ static int os_setComputerLabel(lua_State *L) { static int os_queueEvent(lua_State *L) { lastCFunction = __func__; Computer * computer = get_comp(L); - const std::string name = std::string(luaL_checkstring(L, 1), lua_objlen(L, 1)); + const std::string name = checkstring(L, 1); if (!lua_checkstack(computer->paramQueue, 1)) luaL_error(L, "Could not allocate space for event"); lua_State *param = lua_newthread(computer->paramQueue); lua_remove(L, 1); @@ -126,27 +126,30 @@ static Uint32 notifyEvent(Uint32 interval, void* param) { int os_startTimer(lua_State *L) { lastCFunction = __func__; Computer * computer = get_comp(L); - if (luaL_checknumber(L, 1) < 0.001 && !config.standardsMode) { - queueEvent(computer, [](lua_State *L, void*)->std::string {lua_pushinteger(L, 1); return "timer"; }, NULL); - lua_pushinteger(L, 1); - return 1; - } struct timer_data_t * data = new struct timer_data_t; data->comp = computer; data->lock = new std::mutex; data->isAlarm = false; - queueTask([L](void*a)->void* { + lua_Number _time = luaL_checknumber(L, 1); + if (_time < 0.001) _time = 0.001; + queueTask([_time](void*a)->void* { struct timer_data_t * data = (timer_data_t*)a; - Uint32 time = (Uint32)(lua_tonumber(L, 1) * 1000); + Uint32 time = (Uint32)(_time * 1000); + if (time == 0) time = 1; if (config.standardsMode) { if (time < 50) time = 50; else time = (Uint32)ceil(time / 50.0) * 50; } LockGuard lock(runningTimerData); data->timer = SDL_AddTimer(time, notifyEvent, data); - runningTimerData->insert(std::make_pair(data->timer, data)); + if (data->timer) runningTimerData->insert(std::make_pair(data->timer, data)); return NULL; }, data); + if (!data->timer) { + delete data->lock; + delete data; + return luaL_error(L, "Error occurred while creating timer: ", SDL_GetError()); + } lua_pushinteger(L, data->timer); std::lock_guard lock(computer->timerIDsMutex); computer->timerIDs.insert(data->timer); diff --git a/src/apis/peripheral.cpp b/src/apis/peripheral.cpp index 4a6ca7c0..4fc2e292 100644 --- a/src/apis/peripheral.cpp +++ b/src/apis/peripheral.cpp @@ -17,7 +17,7 @@ static int peripheral_isPresent(lua_State *L) { luaL_checkstring(L, 1); Computer * computer = get_comp(L); std::lock_guard lock(computer->peripherals_mutex); - lua_pushboolean(L, computer->peripherals.find(std::string(lua_tostring(L, -1))) != computer->peripherals.end()); + lua_pushboolean(L, computer->peripherals.find(tostring(L, -1)) != computer->peripherals.end()); return 1; } diff --git a/src/configuration.cpp b/src/configuration.cpp index 1996fd92..ff3e198c 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -440,9 +440,13 @@ void config_save() { root["pluginData"] = pluginRoot; for (const auto& opt : unknownOptions) root[opt.first] = opt.second; std::ofstream out(getBasePath() / "config"/"global.json"); - out << root; - out.close(); + if (out.is_open()) { + out << root; + out.close(); #ifdef __EMSCRIPTEN__ - queueTask([](void*)->void* {syncfs(); return NULL; }, NULL, true); + queueTask([](void*)->void* {syncfs(); return NULL; }, NULL, true); #endif + } else { + showMessage("An error occurred while writing the global configuration file. The current session's config will not be saved."); + } } diff --git a/src/main.cpp b/src/main.cpp index e962e439..d4d018e1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -266,6 +266,8 @@ static void update_thread() { return; } } + } catch (Poco::Exception &e) { + fprintf(stderr, "Could not check for updates: %s\n", e.message().c_str()); } catch (std::exception &e) { fprintf(stderr, "Could not check for updates: %s\n", e.what()); } @@ -546,8 +548,14 @@ int parseArguments(const std::vector& argv) { else if (arg == "--assets-dir" || arg == "-a") setROMPath(path_t(argv[++i])/"assets"/"computercraft"/"lua"); else if (arg.substr(0, 3) == "-a=") setROMPath(path_t(arg.substr(3))/"assets"/"computercraft"/"lua"); else if (arg == "--mc-save") computerDir = getMCSavePath() / argv[++i] / "computer"; - else if (arg == "-i" || arg == "--id") { manualID = true; id = std::stoi(argv[++i]); } - else if (arg == "--migrate") forceMigrate = true; + else if (arg == "-i" || arg == "--id") { + manualID = true; + try {id = std::stoi(argv[++i]);} + catch (std::out_of_range &e) { + std::cerr << "Error: Computer ID is out of range\n"; + return 1; + } + } else if (arg == "--migrate") forceMigrate = true; else if (arg == "--mount" || arg == "--mount-ro" || arg == "--mount-rw") { std::string mount_path = argv[++i]; if (mount_path.find('=') == std::string::npos) { diff --git a/src/peripheral/chest.cpp b/src/peripheral/chest.cpp index dde4a15d..5460e518 100644 --- a/src/peripheral/chest.cpp +++ b/src/peripheral/chest.cpp @@ -17,6 +17,7 @@ int chest::size() { void chest::getItemDetail(lua_State *L, int slot) { if (slot < 1 || slot > (isDouble ? 54 : 27)) {lua_pushnil(L); return;} + if (items[slot-1].count == 0) {lua_pushnil(L); return;} lua_createtable(L, 0, 2); lua_pushlstring(L, items[slot-1].name.c_str(), items[slot-1].name.size()); lua_setfield(L, -2, "name"); diff --git a/src/peripheral/computer_p.cpp b/src/peripheral/computer_p.cpp index 111fe06c..d8e6b5df 100644 --- a/src/peripheral/computer_p.cpp +++ b/src/peripheral/computer_p.cpp @@ -54,7 +54,7 @@ computer::computer(lua_State *L, const char * side) { throw std::runtime_error("Computers are not available when using the Linux framebuffer"); if (strlen(side) < 10 || std::string(side).substr(0, 9) != "computer_" || (strlen(side) > 9 && !std::all_of(side + 9, side + strlen(side), ::isdigit))) throw std::invalid_argument("\"side\" parameter must be a number (the computer's ID)"); - int id = atoi(&side[9]); + int id = std::stoi(std::string(&side[9])); comp = NULL; { LockGuard lock(computers); diff --git a/src/peripheral/debug_adapter.cpp b/src/peripheral/debug_adapter.cpp index a71fe3fd..32c98e29 100644 --- a/src/peripheral/debug_adapter.cpp +++ b/src/peripheral/debug_adapter.cpp @@ -22,6 +22,7 @@ static void forwardInput(); #endif static debug_adapter * stdio_debugger = NULL; +static std::mutex stdio_debugger_lock; static std::thread * inputThread = NULL; static std::string dap_input(lua_State *L, void* arg) { @@ -49,6 +50,7 @@ static void forwardInput() { } std::cerr << sz << "\n"; for (int i = 0; i < sz; i++) data += std::cin.get(); + std::lock_guard lock(stdio_debugger_lock); if (stdio_debugger != NULL) { std::string * str = new std::string(data); queueEvent(stdio_debugger->monitor, dap_input, str); diff --git a/src/peripheral/debugger.cpp b/src/peripheral/debugger.cpp index 7ab8105c..a92c04e5 100644 --- a/src/peripheral/debugger.cpp +++ b/src/peripheral/debugger.cpp @@ -597,11 +597,12 @@ static int debugger_lib_catch(lua_State *L) { lastCFunction = __func__; lua_getfield(L, LUA_REGISTRYINDEX, "_debugger"); debugger * dbg = (debugger*)lua_touserdata(L, -1); - if (std::string(lua_tostring(L, 1)) == "error") dbg->breakMask |= DEBUGGER_BREAK_FUNC_ERROR; - else if (std::string(lua_tostring(L, 1)) == "load") dbg->breakMask |= DEBUGGER_BREAK_FUNC_LOAD; - else if (std::string(lua_tostring(L, 1)) == "run") dbg->breakMask |= DEBUGGER_BREAK_FUNC_RUN; - else if (std::string(lua_tostring(L, 1)) == "resume") dbg->breakMask |= DEBUGGER_BREAK_FUNC_RESUME; - else if (std::string(lua_tostring(L, 1)) == "yield") dbg->breakMask |= DEBUGGER_BREAK_FUNC_YIELD; + std::string opt = tostring(L, 1); + if (opt == "error") dbg->breakMask |= DEBUGGER_BREAK_FUNC_ERROR; + else if (opt == "load") dbg->breakMask |= DEBUGGER_BREAK_FUNC_LOAD; + else if (opt == "run") dbg->breakMask |= DEBUGGER_BREAK_FUNC_RUN; + else if (opt == "resume") dbg->breakMask |= DEBUGGER_BREAK_FUNC_RESUME; + else if (opt == "yield") dbg->breakMask |= DEBUGGER_BREAK_FUNC_YIELD; return 0; } @@ -609,11 +610,12 @@ static int debugger_lib_uncatch(lua_State *L) { lastCFunction = __func__; lua_getfield(L, LUA_REGISTRYINDEX, "_debugger"); debugger * dbg = (debugger*)lua_touserdata(L, -1); - if (std::string(lua_tostring(L, 1)) == "error") dbg->breakMask &= ~DEBUGGER_BREAK_FUNC_ERROR; - else if (std::string(lua_tostring(L, 1)) == "load") dbg->breakMask &= ~DEBUGGER_BREAK_FUNC_LOAD; - else if (std::string(lua_tostring(L, 1)) == "run") dbg->breakMask &= ~DEBUGGER_BREAK_FUNC_RUN; - else if (std::string(lua_tostring(L, 1)) == "resume") dbg->breakMask &= ~DEBUGGER_BREAK_FUNC_RESUME; - else if (std::string(lua_tostring(L, 1)) == "yield") dbg->breakMask &= ~DEBUGGER_BREAK_FUNC_YIELD; + std::string opt = tostring(L, 1); + if (opt == "error") dbg->breakMask &= ~DEBUGGER_BREAK_FUNC_ERROR; + else if (opt == "load") dbg->breakMask &= ~DEBUGGER_BREAK_FUNC_LOAD; + else if (opt == "run") dbg->breakMask &= ~DEBUGGER_BREAK_FUNC_RUN; + else if (opt == "resume") dbg->breakMask &= ~DEBUGGER_BREAK_FUNC_RESUME; + else if (opt == "yield") dbg->breakMask &= ~DEBUGGER_BREAK_FUNC_YIELD; return 0; } diff --git a/src/peripheral/drive.cpp b/src/peripheral/drive.cpp index f5889a2f..bdccccfc 100644 --- a/src/peripheral/drive.cpp +++ b/src/peripheral/drive.cpp @@ -90,6 +90,16 @@ int drive::stopAudio(lua_State *L) { return 0; } +static const char * disk_event(lua_State *L, void* arg) { + lua_pushstring(L, (const char*)arg); + return "disk"; +} + +static const char * disk_eject(lua_State *L, void* arg) { + lua_pushstring(L, (const char*)arg); + return "disk_eject"; +} + int drive::ejectDisk(lua_State *L) { lastCFunction = __func__; if (diskType == disk_type::DISK_TYPE_NONE) return 0; @@ -108,6 +118,7 @@ int drive::ejectDisk(lua_State *L) { } } } + queueEvent(get_comp(L), disk_eject, (void*)side.c_str()); diskType = disk_type::DISK_TYPE_NONE; return 0; } @@ -226,6 +237,7 @@ int drive::insertDisk(lua_State *L, bool init) { if (init) throw std::invalid_argument("bad argument (expected string or number)"); else luaL_error(L, "bad argument #%d (expected string or number, got %s)", arg, lua_typename(L, lua_type(L, arg))); } + queueEvent(comp, disk_event, (void*)side.c_str()); return 0; // This dirty hack is because Windows randomly attempts to deallocate a std::wstring // in the stack that doesn't exist. (???) The only way to fix it is to make it jump @@ -255,6 +267,7 @@ void driveQuit() { drive::drive(lua_State *L, const char * side) { if (lua_isstring(L, 3) || lua_isnumber(L, 3)) insertDisk(L, true); + this->side = side; } drive::~drive() { diff --git a/src/peripheral/drive.hpp b/src/peripheral/drive.hpp index 2ad93e72..25724814 100644 --- a/src/peripheral/drive.hpp +++ b/src/peripheral/drive.hpp @@ -35,6 +35,7 @@ class drive: public peripheral { void* music = NULL; #endif int id = 0; + std::string side; int isDiskPresent(lua_State *L); int getDiskLabel(lua_State *L); int setDiskLabel(lua_State *L); diff --git a/src/peripheral/printer.cpp b/src/peripheral/printer.cpp index 8a542026..7d8d2396 100644 --- a/src/peripheral/printer.cpp +++ b/src/peripheral/printer.cpp @@ -268,7 +268,7 @@ int printer::getInkLevel(lua_State *L) { int printer::setPageTitle(lua_State *L) { lastCFunction = __func__; - title = std::string(luaL_checkstring(L, 1), lua_objlen(L, 1)); + title = checkstring(L, 1); return 0; } diff --git a/src/peripheral/speaker.cpp b/src/peripheral/speaker.cpp index 4b4f1820..6a7e32d4 100644 --- a/src/peripheral/speaker.cpp +++ b/src/peripheral/speaker.cpp @@ -807,6 +807,9 @@ speaker::speaker(lua_State *L, const char * side) { Mix_GroupChannel(next, channelGroup); } Mix_RegisterEffect(audioChannel, audioEffect, NULL, this); + Computer * comp = this->comp; + const char * _side = this->side.c_str(); + channelFinishCallbacks[audioChannel] = [comp, _side](int c){queueEvent(comp, speaker_audio_empty, (void*)_side);}; Mix_PlayChannel(audioChannel, empty_chunk, -1); } diff --git a/src/platform/CraftOS-PC 2.rc b/src/platform/CraftOS-PC 2.rc index f37e1299..da3f0cc2 100644 --- a/src/platform/CraftOS-PC 2.rc +++ b/src/platform/CraftOS-PC 2.rc @@ -60,8 +60,8 @@ MANIFEST RT_MANIFEST "..\\..\\resources\\CraftOS-PC.e // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,8,0,0 - PRODUCTVERSION 2,8,0,0 + FILEVERSION 2,8,2,0 + PRODUCTVERSION 2,8,2,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -77,12 +77,12 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "CraftOS-PC Accelerated" - VALUE "FileVersion", "2.8.0.0" + VALUE "FileVersion", "2.8.2.0" VALUE "InternalName", "CraftOS-PC.exe" VALUE "LegalCopyright", "Copyright (C) 2019-2024 JackMacWindows." VALUE "OriginalFilename", "CraftOS-PC.exe" VALUE "ProductName", "CraftOS-PC Accelerated" - VALUE "ProductVersion", "2.8.0.0" + VALUE "ProductVersion", "2.8.2.0" END END BLOCK "VarFileInfo" diff --git a/src/platform/linux.cpp b/src/platform/linux.cpp index 49f610e0..83431702 100644 --- a/src/platform/linux.cpp +++ b/src/platform/linux.cpp @@ -38,6 +38,9 @@ extern "C" { #include #include #endif +#ifndef __USE_GNU +#include +#endif #include "../platform.hpp" #include "../util.hpp" @@ -656,4 +659,4 @@ void unblockInput() { close(STDIN_FILENO); } -#endif // __INTELLISENSE__ \ No newline at end of file +#endif // __INTELLISENSE__ diff --git a/src/runtime.cpp b/src/runtime.cpp index 0b8ee16d..92fd6a5e 100644 --- a/src/runtime.cpp +++ b/src/runtime.cpp @@ -197,6 +197,7 @@ int getNextEvent(lua_State *L, const std::string& filter) { std::string ev; computer->getting_event = true; lua_State *param; + if (computer->eventQueue.size() > QUEUE_LIMIT) fprintf(stderr, "Warning: Queue overflow on computer %d!\n", computer->id); do { if (!lua_checkstack(computer->paramQueue, 1)) luaL_error(L, "Could not allocate space for event"); param = lua_newthread(computer->paramQueue); @@ -372,7 +373,7 @@ bool addVirtualMount(Computer * comp, const FileEntry& vfs, const std::string& c else if (!std::isdigit(c)) {end = -1; break;} end++; } - if (end > 0 && std::get<0>(v) == pathc && *comp->virtualMounts[std::stoi(path.native().substr(0, end))] == vfs) return false; + if (end > 0 && std::get<0>(v) == pathc && comp->virtualMounts[std::stoi(path.native().substr(0, end))] != NULL && *comp->virtualMounts[std::stoi(path.native().substr(0, end))] == vfs) return false; } comp->virtualMounts[idx] = &vfs; comp->mounts.push_back(std::make_tuple(std::list(pathc), path_t(std::to_string(idx) + ":", path_t::format::generic_format), true)); diff --git a/src/terminal/RawTerminal.cpp b/src/terminal/RawTerminal.cpp index f3523d71..2c148ea9 100644 --- a/src/terminal/RawTerminal.cpp +++ b/src/terminal/RawTerminal.cpp @@ -724,7 +724,7 @@ static void rawInputLoop() { lua_getfield(comp->rawFileStack, -1, "readAll"); lua_call(comp->rawFileStack, 0, 1); if (lua_isnil(comp->rawFileStack, -1)) data = ""; // shouldn't happen - else data = std::string(lua_tostring(comp->rawFileStack, -1), lua_objlen(comp->rawFileStack, -1)); + else data = tostring(comp->rawFileStack, -1); lua_pop(comp->rawFileStack, 1); lua_getfield(comp->rawFileStack, -1, "close"); lua_call(comp->rawFileStack, 0, 0); diff --git a/src/termsupport.cpp b/src/termsupport.cpp index a8c6abbb..222dee1d 100644 --- a/src/termsupport.cpp +++ b/src/termsupport.cpp @@ -402,7 +402,7 @@ static void noDebuggerBreak(lua_State *L, Computer * computer, lua_Debug * ar) { int status = lua_resume(coro, 2); int narg; while (status == LUA_YIELD) { - if (lua_isstring(coro, -1)) narg = getNextEvent(coro, std::string(lua_tostring(coro, -1), lua_objlen(coro, -1))); + if (lua_isstring(coro, -1)) narg = getNextEvent(coro, tostring(coro, -1)); else narg = getNextEvent(coro, ""); status = lua_resume(coro, narg); } diff --git a/src/util.hpp b/src/util.hpp index ad6ae7e3..31d402fb 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -26,8 +26,8 @@ extern "C" { #include #include -#define CRAFTOSPC_VERSION "v2.8-luajit" -#define CRAFTOSPC_CC_VERSION "1.109.2" +#define CRAFTOSPC_VERSION "v2.8.2-luajit" +#define CRAFTOSPC_CC_VERSION "1.110.2" #define CRAFTOSPC_INDEV false using path_t = std::filesystem::path;