$NetBSD$ 1. = preferred instead of == as the latter breaks compatibility on some platforms and former is more portable. 2. As of NetBSD 9.2 pthread_*_setpshared aren't supported, hence the check is skipped for NetBSD Upstream: https://github.com/utwente-fmt/ltsmin/issues/203 3. $(( doesn't work on sh, changed to $( ( --- configure.orig 2018-07-03 19:29:06.000000000 +0000 +++ configure @@ -198,7 +198,7 @@ test -x / || exit 1" as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 +test \$( ( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' @@ -398,10 +398,10 @@ 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=$(( $* )) + as_val=$( ( $* ) ) }' else as_fn_arith () @@ -7536,7 +7536,7 @@ xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ + && eval 'test $( ( 1 + 1 ) ) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 @@ -17303,7 +17303,7 @@ ac_try='"$LEX" --stdout conftest.lex >/d eval ac_try_echo="\":$LINENO: $ac_try\"" echo "$ac_try_echo" >&5 (eval "$ac_try") 2>&5 -if test $? == 0; then +if test $? = 0; then ax_cv_check_flex_compat=yes else ax_cv_check_flex_compat=no @@ -17358,7 +17358,8 @@ $as_echo "no" >&6; } fi - +if [ `uname` != NetBSD ] +then ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -17410,6 +17411,8 @@ rm -f core *.core core.conftest.* gmon.o conftest.$ac_objext conftest.beam conftest.$ac_ext fi +fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -19938,10 +19941,10 @@ 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=$(( $* )) + as_val=$( ( $* ) ) }' else as_fn_arith () @@ -21135,7 +21138,7 @@ test 0 -eq $? || _lt_function_replace_fa sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ - func_arith_result=$(( $* ))\ + func_arith_result=$( ( $* ) )\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") @@ -21373,7 +21376,7 @@ $as_echo_n "checking whether -export-dyn if ${acx_cv_cc_export_dynamic+:} false; then : $as_echo_n "(cached) " >&6 else - acx_cv_cc_export_dynamic="$((./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh)" + acx_cv_cc_export_dynamic="$( (./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh)" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_cc_export_dynamic" >&5 @@ -28956,7 +28959,7 @@ as_fn_error $? "no acceptable atomic ope See \`config.log' for more details" "$LINENO" 5; } fi -if test "x$have_libspg" == xyes; then +if test "x$have_libspg" = xyes; then $as_echo "#define HAVE_LIBSPG /**/" >>confdefs.h @@ -31434,10 +31437,10 @@ 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=$(( $* )) + as_val=$( ( $* ) ) }' else as_fn_arith () @@ -33543,7 +33548,7 @@ test 0 -eq $? || _lt_function_replace_fa sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ - func_arith_result=$(( $* ))\ + func_arith_result=$( ( $* ) )\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")