• R/O
  • SSH
  • HTTPS

tsukurimashou: コミット


コミットメタ情報

リビジョン667 (tree)
日時2017-11-18 06:26:40
作者mskala

ログメッセージ

documentation, copyright, and M4 updates

変更サマリ

差分

--- trunk/idsgrep/m4/ax_count_cpus.m4 (revision 666)
+++ trunk/idsgrep/m4/ax_count_cpus.m4 (revision 667)
@@ -1,21 +1,24 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
2+# https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_COUNT_CPUS
7+# AX_COUNT_CPUS([ACTION-IF-DETECTED],[ACTION-IF-NOT-DETECTED])
88 #
99 # DESCRIPTION
1010 #
11-# Attempt to count the number of processors present on the machine. If the
12-# detection fails, then a value of 1 is assumed.
11+# Attempt to count the number of logical processor cores (including
12+# virtual and HT cores) currently available to use on the machine and
13+# place detected value in CPU_COUNT variable.
1314 #
14-# The value is placed in the CPU_COUNT variable.
15+# On successful detection, ACTION-IF-DETECTED is executed if present. If
16+# the detection fails, then ACTION-IF-NOT-DETECTED is triggered. The
17+# default ACTION-IF-NOT-DETECTED is to set CPU_COUNT to 1.
1518 #
1619 # LICENSE
1720 #
18-# Copyright (c) 2014 Karlson2k (Evgeny Grin) <k2k@narod.ru>
21+# Copyright (c) 2014,2016 Karlson2k (Evgeny Grin) <k2k@narod.ru>
1922 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
2023 # Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net>
2124 # Copyright (c) 2008 Christophe Tournayre <turn3r@users.sourceforge.net>
@@ -25,42 +28,74 @@
2528 # and this notice are preserved. This file is offered as-is, without any
2629 # warranty.
2730
28-#serial 11
31+#serial 22
2932
30- AC_DEFUN([AX_COUNT_CPUS],[
31- AC_REQUIRE([AC_CANONICAL_HOST])
32- AC_REQUIRE([AC_PROG_EGREP])
33+ AC_DEFUN([AX_COUNT_CPUS],[dnl
34+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
35+ AC_REQUIRE([AC_PROG_EGREP])dnl
3336 AC_MSG_CHECKING([the number of available CPUs])
3437 CPU_COUNT="0"
3538
36- AS_CASE([$host_os],[
37- *darwin*],[
38- AS_IF([test -x /usr/sbin/sysctl],[
39- sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu`
40- AS_IF([test sysctl_a],[
41- CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu`
42- ])
43- ])],[
44- *linux*],[
45- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
46- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
47- CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo`
48- ])
49- ])],[
50- *mingw*],[
51- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
52- CPU_COUNT="$NUMBER_OF_PROCESSORS"
53- ])],[
54- *cygwin*],[
55- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
56- CPU_COUNT="$NUMBER_OF_PROCESSORS"
57- ])
58- ])
39+ # Try generic methods
5940
60- AS_IF([test "x$CPU_COUNT" = "x0"],[
61- CPU_COUNT="1"
62- AC_MSG_RESULT( [unable to detect (assuming 1)] )
63- ],[
64- AC_MSG_RESULT( $CPU_COUNT )
65- ])
66- ])
41+ # 'getconf' is POSIX utility, but '_NPROCESSORS_ONLN' and
42+ # 'NPROCESSORS_ONLN' are platform-specific
43+ command -v getconf >/dev/null 2>&1 && \
44+ CPU_COUNT=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null` || CPU_COUNT="0"
45+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v nproc >/dev/null 2>&1]],[[: # empty]],[dnl
46+ # 'nproc' is part of GNU Coreutils and is widely available
47+ CPU_COUNT=`OMP_NUM_THREADS='' nproc 2>/dev/null` || CPU_COUNT=`nproc 2>/dev/null` || CPU_COUNT="0"
48+ ])dnl
49+
50+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
51+ # Try platform-specific preferred methods
52+ AS_CASE([[$host_os]],dnl
53+ [[*linux*]],[[CPU_COUNT=`lscpu -p 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+,' -c` || CPU_COUNT="0"]],dnl
54+ [[*darwin*]],[[CPU_COUNT=`sysctl -n hw.logicalcpu 2>/dev/null` || CPU_COUNT="0"]],dnl
55+ [[freebsd*]],[[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n kern.smp.cpus 2>/dev/null` || CPU_COUNT="0"]],dnl
56+ [[netbsd*]], [[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n hw.ncpuonline 2>/dev/null` || CPU_COUNT="0"]],dnl
57+ [[solaris*]],[[command -v psrinfo >/dev/null 2>&1 && CPU_COUNT=`psrinfo 2>/dev/null | $EGREP -e '^@<:@0-9@:>@.*on-line' -c 2>/dev/null` || CPU_COUNT="0"]],dnl
58+ [[mingw*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
59+ [[msys*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
60+ [[cygwin*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]]dnl
61+ )dnl
62+ ])dnl
63+
64+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v sysctl >/dev/null 2>&1]],[[: # empty]],[dnl
65+ # Try less preferred generic method
66+ # 'hw.ncpu' exist on many platforms, but not on GNU/Linux
67+ CPU_COUNT=`sysctl -n hw.ncpu 2>/dev/null` || CPU_COUNT="0"
68+ ])dnl
69+
70+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
71+ # Try platform-specific fallback methods
72+ # They can be less accurate and slower then preferred methods
73+ AS_CASE([[$host_os]],dnl
74+ [[*linux*]],[[CPU_COUNT=`$EGREP -e '^processor' -c /proc/cpuinfo 2>/dev/null` || CPU_COUNT="0"]],dnl
75+ [[*darwin*]],[[CPU_COUNT=`system_profiler SPHardwareDataType 2>/dev/null | $EGREP -i -e 'number of cores:'|cut -d : -f 2 -s|tr -d ' '` || CPU_COUNT="0"]],dnl
76+ [[freebsd*]],[[CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+: '|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
77+ [[netbsd*]], [[CPU_COUNT=`command -v cpuctl >/dev/null 2>&1 && cpuctl list 2>/dev/null| $EGREP -e '^@<:@0-9@:>@+ .* online ' -c` || \
78+ CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+ at'|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
79+ [[solaris*]],[[command -v kstat >/dev/null 2>&1 && CPU_COUNT=`kstat -m cpu_info -s state -p 2>/dev/null | $EGREP -c -e 'on-line'` || \
80+ CPU_COUNT=`kstat -m cpu_info 2>/dev/null | $EGREP -c -e 'module: cpu_info'` || CPU_COUNT="0"]],dnl
81+ [[mingw*]],[AS_IF([[CPU_COUNT=`reg query 'HKLM\\Hardware\\Description\\System\\CentralProcessor' 2>/dev/null | $EGREP -e '\\\\@<:@0-9@:>@+$' -c`]],dnl
82+ [[: # empty]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]])],dnl
83+ [[msys*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]],dnl
84+ [[cygwin*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]]dnl
85+ )dnl
86+ ])dnl
87+
88+ AS_IF([[test "x$CPU_COUNT" != "x0" && test "$CPU_COUNT" -gt 0 2>/dev/null]],[dnl
89+ AC_MSG_RESULT([[$CPU_COUNT]])
90+ m4_ifvaln([$1],[$1],)dnl
91+ ],[dnl
92+ m4_ifval([$2],[dnl
93+ AS_UNSET([[CPU_COUNT]])
94+ AC_MSG_RESULT([[unable to detect]])
95+ $2
96+ ], [dnl
97+ CPU_COUNT="1"
98+ AC_MSG_RESULT([[unable to detect (assuming 1)]])
99+ ])dnl
100+ ])dnl
101+ ])dnl
--- trunk/idsgrep/m4/ax_check_gnu_make.m4 (revision 666)
+++ trunk/idsgrep/m4/ax_check_gnu_make.m4 (revision 667)
@@ -1,10 +1,10 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
2+# https://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_CHECK_GNU_MAKE()
7+# AX_CHECK_GNU_MAKE([run-if-true],[run-if-false])
88 #
99 # DESCRIPTION
1010 #
@@ -13,6 +13,10 @@
1313 # * The makefile variable `ifGNUmake' is set to the empty string, otherwise
1414 # it is set to "#". This is useful for including a special features in a
1515 # Makefile, which cannot be handled by other versions of make.
16+# * The makefile variable `ifnGNUmake' is set to #, otherwise
17+# it is set to the empty string. This is useful for including a special
18+# features in a Makefile, which can be handled
19+# by other versions of make or to specify else like clause.
1620 # * The variable `_cv_gnu_make_command` is set to the command to invoke
1721 # GNU make if it exists, the empty string otherwise.
1822 # * The variable `ax_cv_gnu_make_command` is set to the command to invoke
@@ -20,6 +24,8 @@
2024 # * If GNU Make is found, its version is extracted from the output of
2125 # `make --version` as the last field of a record of space-separated
2226 # columns and saved into the variable `ax_check_gnu_make_version`.
27+# * Additionally if GNU Make is found, run shell code run-if-true
28+# else run shell code run-if-false.
2329 #
2430 # Here is an example of its use:
2531 #
@@ -31,6 +37,8 @@
3137 #
3238 # @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
3339 # @ifGNUmake@ include $(DEPEND)
40+# @ifGNUmake@ else
41+# fallback code
3442 # @ifGNUmake@ endif
3543 #
3644 # Then configure.in would normally contain:
@@ -61,7 +69,7 @@
6169 # and this notice are preserved. This file is offered as-is, without any
6270 # warranty.
6371
64-#serial 8
72+#serial 11
6573
6674 AC_DEFUN([AX_CHECK_GNU_MAKE],dnl
6775 [AC_PROG_AWK
@@ -79,6 +87,9 @@
7987 done ;])
8088 dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
8189 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifGNUmake], ["#"])], [AS_VAR_SET([ifGNUmake], [""])])
90+ AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifnGNUmake], [""])], [AS_VAR_SET([ifGNUmake], ["#"])])
8291 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_UNSET(ax_cv_gnu_make_command)], [AS_VAR_SET([ax_cv_gnu_make_command], [${_cv_gnu_make_command}])])
92+ AS_VAR_IF([_cv_gnu_make_command], [""],[$2],[$1])
8393 AC_SUBST([ifGNUmake])
94+ AC_SUBST([ifnGNUmake])
8495 ])
--- trunk/idsgrep/m4/ax_create_stdint_h.m4 (revision 666)
+++ trunk/idsgrep/m4/ax_create_stdint_h.m4 (revision 667)
@@ -1,5 +1,5 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html
2+# https://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
@@ -12,9 +12,9 @@
1212 # existence of an include file <stdint.h> that defines a set of typedefs,
1313 # especially uint8_t,int32_t,uintptr_t. Many older installations will not
1414 # provide this file, but some will have the very same definitions in
15-# <inttypes.h>. In other enviroments we can use the inet-types in
15+# <inttypes.h>. In other environments we can use the inet-types in
1616 # <sys/types.h> which would define the typedefs int8_t and u_int8_t
17-# respectivly.
17+# respectively.
1818 #
1919 # This macros will create a local "_stdint.h" or the headerfile given as
2020 # an argument. In many cases that file will just "#include <stdint.h>" or
@@ -39,7 +39,7 @@
3939 #
4040 # Remember, if the system already had a valid <stdint.h>, the generated
4141 # file will include it directly. No need for fuzzy HAVE_STDINT_H things...
42-# (oops, GCC 4.2.x has deliberatly disabled its stdint.h for non-c99
42+# (oops, GCC 4.2.x has deliberately disabled its stdint.h for non-c99
4343 # compilation and the c99-mode is not the default. Therefore this macro
4444 # will not use the compiler's stdint.h - please complain to the GCC
4545 # developers).
@@ -59,7 +59,7 @@
5959 # Public License for more details.
6060 #
6161 # You should have received a copy of the GNU General Public License along
62-# with this program. If not, see <http://www.gnu.org/licenses/>.
62+# with this program. If not, see <https://www.gnu.org/licenses/>.
6363 #
6464 # As a special exception, the respective Autoconf Macro's copyright owner
6565 # gives unlimited permission to copy, distribute and modify the configure
@@ -74,7 +74,7 @@
7474 # modified version of the Autoconf Macro, you may extend this special
7575 # exception to the GPL to apply to your modified version as well.
7676
77-#serial 10
77+#serial 19
7878
7979 AC_DEFUN([AX_CHECK_DATA_MODEL],[
8080 AC_CHECK_SIZEOF(char)
@@ -251,7 +251,7 @@
251251 AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
252252 AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>])
253253
254-fi # shortcircut to system "stdint.h"
254+fi # shortcircuit to system "stdint.h"
255255 # ------------------ PREPARE VARIABLES ------------------------------
256256 if test "$GCC" = "yes" ; then
257257 ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
@@ -370,7 +370,7 @@
370370 cat >>$ac_stdint <<STDINT_EOF
371371 /* .................... detections part ............................ */
372372
373-/* whether we need to define bitspecific types from compiler base types */
373+/* whether we need to define bit specific types from compiler base types */
374374 #ifndef _STDINT_HEADER_INTPTR
375375 #ifndef _STDINT_HEADER_UINT32
376376 #ifndef _STDINT_HEADER_U_INT32
@@ -467,7 +467,7 @@
467467 #endif
468468
469469 #ifdef _STDINT_NEED_INT_MODEL_T
470-/* we must guess all the basic types. Apart from byte-adressable system, */
470+/* we must guess all the basic types. Apart from byte-addressable system, */
471471 /* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
472472 /* (btw, those nibble-addressable systems are way off, or so we assume) */
473473
@@ -655,7 +655,7 @@
655655 #endif
656656 #endif
657657
658-/* These limits are merily those of a two complement byte-oriented system */
658+/* These limits are merrily those of a two complement byte-oriented system */
659659
660660 /* Minimum of signed integral types. */
661661 # define INT8_MIN (-128)
--- trunk/icemap/m4/ax_count_cpus.m4 (revision 666)
+++ trunk/icemap/m4/ax_count_cpus.m4 (revision 667)
@@ -1,21 +1,24 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
2+# https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_COUNT_CPUS
7+# AX_COUNT_CPUS([ACTION-IF-DETECTED],[ACTION-IF-NOT-DETECTED])
88 #
99 # DESCRIPTION
1010 #
11-# Attempt to count the number of processors present on the machine. If the
12-# detection fails, then a value of 1 is assumed.
11+# Attempt to count the number of logical processor cores (including
12+# virtual and HT cores) currently available to use on the machine and
13+# place detected value in CPU_COUNT variable.
1314 #
14-# The value is placed in the CPU_COUNT variable.
15+# On successful detection, ACTION-IF-DETECTED is executed if present. If
16+# the detection fails, then ACTION-IF-NOT-DETECTED is triggered. The
17+# default ACTION-IF-NOT-DETECTED is to set CPU_COUNT to 1.
1518 #
1619 # LICENSE
1720 #
18-# Copyright (c) 2014 Karlson2k (Evgeny Grin) <k2k@narod.ru>
21+# Copyright (c) 2014,2016 Karlson2k (Evgeny Grin) <k2k@narod.ru>
1922 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
2023 # Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net>
2124 # Copyright (c) 2008 Christophe Tournayre <turn3r@users.sourceforge.net>
@@ -25,42 +28,74 @@
2528 # and this notice are preserved. This file is offered as-is, without any
2629 # warranty.
2730
28-#serial 11
31+#serial 22
2932
30- AC_DEFUN([AX_COUNT_CPUS],[
31- AC_REQUIRE([AC_CANONICAL_HOST])
32- AC_REQUIRE([AC_PROG_EGREP])
33+ AC_DEFUN([AX_COUNT_CPUS],[dnl
34+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
35+ AC_REQUIRE([AC_PROG_EGREP])dnl
3336 AC_MSG_CHECKING([the number of available CPUs])
3437 CPU_COUNT="0"
3538
36- AS_CASE([$host_os],[
37- *darwin*],[
38- AS_IF([test -x /usr/sbin/sysctl],[
39- sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu`
40- AS_IF([test sysctl_a],[
41- CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu`
42- ])
43- ])],[
44- *linux*],[
45- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
46- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
47- CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo`
48- ])
49- ])],[
50- *mingw*],[
51- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
52- CPU_COUNT="$NUMBER_OF_PROCESSORS"
53- ])],[
54- *cygwin*],[
55- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
56- CPU_COUNT="$NUMBER_OF_PROCESSORS"
57- ])
58- ])
39+ # Try generic methods
5940
60- AS_IF([test "x$CPU_COUNT" = "x0"],[
61- CPU_COUNT="1"
62- AC_MSG_RESULT( [unable to detect (assuming 1)] )
63- ],[
64- AC_MSG_RESULT( $CPU_COUNT )
65- ])
66- ])
41+ # 'getconf' is POSIX utility, but '_NPROCESSORS_ONLN' and
42+ # 'NPROCESSORS_ONLN' are platform-specific
43+ command -v getconf >/dev/null 2>&1 && \
44+ CPU_COUNT=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null` || CPU_COUNT="0"
45+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v nproc >/dev/null 2>&1]],[[: # empty]],[dnl
46+ # 'nproc' is part of GNU Coreutils and is widely available
47+ CPU_COUNT=`OMP_NUM_THREADS='' nproc 2>/dev/null` || CPU_COUNT=`nproc 2>/dev/null` || CPU_COUNT="0"
48+ ])dnl
49+
50+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
51+ # Try platform-specific preferred methods
52+ AS_CASE([[$host_os]],dnl
53+ [[*linux*]],[[CPU_COUNT=`lscpu -p 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+,' -c` || CPU_COUNT="0"]],dnl
54+ [[*darwin*]],[[CPU_COUNT=`sysctl -n hw.logicalcpu 2>/dev/null` || CPU_COUNT="0"]],dnl
55+ [[freebsd*]],[[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n kern.smp.cpus 2>/dev/null` || CPU_COUNT="0"]],dnl
56+ [[netbsd*]], [[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n hw.ncpuonline 2>/dev/null` || CPU_COUNT="0"]],dnl
57+ [[solaris*]],[[command -v psrinfo >/dev/null 2>&1 && CPU_COUNT=`psrinfo 2>/dev/null | $EGREP -e '^@<:@0-9@:>@.*on-line' -c 2>/dev/null` || CPU_COUNT="0"]],dnl
58+ [[mingw*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
59+ [[msys*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
60+ [[cygwin*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]]dnl
61+ )dnl
62+ ])dnl
63+
64+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v sysctl >/dev/null 2>&1]],[[: # empty]],[dnl
65+ # Try less preferred generic method
66+ # 'hw.ncpu' exist on many platforms, but not on GNU/Linux
67+ CPU_COUNT=`sysctl -n hw.ncpu 2>/dev/null` || CPU_COUNT="0"
68+ ])dnl
69+
70+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
71+ # Try platform-specific fallback methods
72+ # They can be less accurate and slower then preferred methods
73+ AS_CASE([[$host_os]],dnl
74+ [[*linux*]],[[CPU_COUNT=`$EGREP -e '^processor' -c /proc/cpuinfo 2>/dev/null` || CPU_COUNT="0"]],dnl
75+ [[*darwin*]],[[CPU_COUNT=`system_profiler SPHardwareDataType 2>/dev/null | $EGREP -i -e 'number of cores:'|cut -d : -f 2 -s|tr -d ' '` || CPU_COUNT="0"]],dnl
76+ [[freebsd*]],[[CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+: '|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
77+ [[netbsd*]], [[CPU_COUNT=`command -v cpuctl >/dev/null 2>&1 && cpuctl list 2>/dev/null| $EGREP -e '^@<:@0-9@:>@+ .* online ' -c` || \
78+ CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+ at'|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
79+ [[solaris*]],[[command -v kstat >/dev/null 2>&1 && CPU_COUNT=`kstat -m cpu_info -s state -p 2>/dev/null | $EGREP -c -e 'on-line'` || \
80+ CPU_COUNT=`kstat -m cpu_info 2>/dev/null | $EGREP -c -e 'module: cpu_info'` || CPU_COUNT="0"]],dnl
81+ [[mingw*]],[AS_IF([[CPU_COUNT=`reg query 'HKLM\\Hardware\\Description\\System\\CentralProcessor' 2>/dev/null | $EGREP -e '\\\\@<:@0-9@:>@+$' -c`]],dnl
82+ [[: # empty]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]])],dnl
83+ [[msys*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]],dnl
84+ [[cygwin*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]]dnl
85+ )dnl
86+ ])dnl
87+
88+ AS_IF([[test "x$CPU_COUNT" != "x0" && test "$CPU_COUNT" -gt 0 2>/dev/null]],[dnl
89+ AC_MSG_RESULT([[$CPU_COUNT]])
90+ m4_ifvaln([$1],[$1],)dnl
91+ ],[dnl
92+ m4_ifval([$2],[dnl
93+ AS_UNSET([[CPU_COUNT]])
94+ AC_MSG_RESULT([[unable to detect]])
95+ $2
96+ ], [dnl
97+ CPU_COUNT="1"
98+ AC_MSG_RESULT([[unable to detect (assuming 1)]])
99+ ])dnl
100+ ])dnl
101+ ])dnl
--- trunk/icemap/m4/ax_check_gnu_make.m4 (revision 666)
+++ trunk/icemap/m4/ax_check_gnu_make.m4 (revision 667)
@@ -1,10 +1,10 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
2+# https://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_CHECK_GNU_MAKE()
7+# AX_CHECK_GNU_MAKE([run-if-true],[run-if-false])
88 #
99 # DESCRIPTION
1010 #
@@ -13,6 +13,10 @@
1313 # * The makefile variable `ifGNUmake' is set to the empty string, otherwise
1414 # it is set to "#". This is useful for including a special features in a
1515 # Makefile, which cannot be handled by other versions of make.
16+# * The makefile variable `ifnGNUmake' is set to #, otherwise
17+# it is set to the empty string. This is useful for including a special
18+# features in a Makefile, which can be handled
19+# by other versions of make or to specify else like clause.
1620 # * The variable `_cv_gnu_make_command` is set to the command to invoke
1721 # GNU make if it exists, the empty string otherwise.
1822 # * The variable `ax_cv_gnu_make_command` is set to the command to invoke
@@ -20,6 +24,8 @@
2024 # * If GNU Make is found, its version is extracted from the output of
2125 # `make --version` as the last field of a record of space-separated
2226 # columns and saved into the variable `ax_check_gnu_make_version`.
27+# * Additionally if GNU Make is found, run shell code run-if-true
28+# else run shell code run-if-false.
2329 #
2430 # Here is an example of its use:
2531 #
@@ -31,6 +37,8 @@
3137 #
3238 # @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
3339 # @ifGNUmake@ include $(DEPEND)
40+# @ifGNUmake@ else
41+# fallback code
3442 # @ifGNUmake@ endif
3543 #
3644 # Then configure.in would normally contain:
@@ -61,7 +69,7 @@
6169 # and this notice are preserved. This file is offered as-is, without any
6270 # warranty.
6371
64-#serial 8
72+#serial 11
6573
6674 AC_DEFUN([AX_CHECK_GNU_MAKE],dnl
6775 [AC_PROG_AWK
@@ -79,6 +87,9 @@
7987 done ;])
8088 dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
8189 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifGNUmake], ["#"])], [AS_VAR_SET([ifGNUmake], [""])])
90+ AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifnGNUmake], [""])], [AS_VAR_SET([ifGNUmake], ["#"])])
8291 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_UNSET(ax_cv_gnu_make_command)], [AS_VAR_SET([ax_cv_gnu_make_command], [${_cv_gnu_make_command}])])
92+ AS_VAR_IF([_cv_gnu_make_command], [""],[$2],[$1])
8393 AC_SUBST([ifGNUmake])
94+ AC_SUBST([ifnGNUmake])
8495 ])
--- trunk/icemap/m4/ax_create_stdint_h.m4 (revision 666)
+++ trunk/icemap/m4/ax_create_stdint_h.m4 (revision 667)
@@ -1,5 +1,5 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html
2+# https://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
@@ -12,9 +12,9 @@
1212 # existence of an include file <stdint.h> that defines a set of typedefs,
1313 # especially uint8_t,int32_t,uintptr_t. Many older installations will not
1414 # provide this file, but some will have the very same definitions in
15-# <inttypes.h>. In other enviroments we can use the inet-types in
15+# <inttypes.h>. In other environments we can use the inet-types in
1616 # <sys/types.h> which would define the typedefs int8_t and u_int8_t
17-# respectivly.
17+# respectively.
1818 #
1919 # This macros will create a local "_stdint.h" or the headerfile given as
2020 # an argument. In many cases that file will just "#include <stdint.h>" or
@@ -39,7 +39,7 @@
3939 #
4040 # Remember, if the system already had a valid <stdint.h>, the generated
4141 # file will include it directly. No need for fuzzy HAVE_STDINT_H things...
42-# (oops, GCC 4.2.x has deliberatly disabled its stdint.h for non-c99
42+# (oops, GCC 4.2.x has deliberately disabled its stdint.h for non-c99
4343 # compilation and the c99-mode is not the default. Therefore this macro
4444 # will not use the compiler's stdint.h - please complain to the GCC
4545 # developers).
@@ -59,7 +59,7 @@
5959 # Public License for more details.
6060 #
6161 # You should have received a copy of the GNU General Public License along
62-# with this program. If not, see <http://www.gnu.org/licenses/>.
62+# with this program. If not, see <https://www.gnu.org/licenses/>.
6363 #
6464 # As a special exception, the respective Autoconf Macro's copyright owner
6565 # gives unlimited permission to copy, distribute and modify the configure
@@ -74,7 +74,7 @@
7474 # modified version of the Autoconf Macro, you may extend this special
7575 # exception to the GPL to apply to your modified version as well.
7676
77-#serial 10
77+#serial 19
7878
7979 AC_DEFUN([AX_CHECK_DATA_MODEL],[
8080 AC_CHECK_SIZEOF(char)
@@ -251,7 +251,7 @@
251251 AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
252252 AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>])
253253
254-fi # shortcircut to system "stdint.h"
254+fi # shortcircuit to system "stdint.h"
255255 # ------------------ PREPARE VARIABLES ------------------------------
256256 if test "$GCC" = "yes" ; then
257257 ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
@@ -370,7 +370,7 @@
370370 cat >>$ac_stdint <<STDINT_EOF
371371 /* .................... detections part ............................ */
372372
373-/* whether we need to define bitspecific types from compiler base types */
373+/* whether we need to define bit specific types from compiler base types */
374374 #ifndef _STDINT_HEADER_INTPTR
375375 #ifndef _STDINT_HEADER_UINT32
376376 #ifndef _STDINT_HEADER_U_INT32
@@ -467,7 +467,7 @@
467467 #endif
468468
469469 #ifdef _STDINT_NEED_INT_MODEL_T
470-/* we must guess all the basic types. Apart from byte-adressable system, */
470+/* we must guess all the basic types. Apart from byte-addressable system, */
471471 /* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
472472 /* (btw, those nibble-addressable systems are way off, or so we assume) */
473473
@@ -655,7 +655,7 @@
655655 #endif
656656 #endif
657657
658-/* These limits are merily those of a two complement byte-oriented system */
658+/* These limits are merrily those of a two complement byte-oriented system */
659659
660660 /* Minimum of signed integral types. */
661661 # define INT8_MIN (-128)
--- trunk/beikaitoru/m4/ax_count_cpus.m4 (revision 666)
+++ trunk/beikaitoru/m4/ax_count_cpus.m4 (revision 667)
@@ -1,21 +1,24 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
2+# https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_COUNT_CPUS
7+# AX_COUNT_CPUS([ACTION-IF-DETECTED],[ACTION-IF-NOT-DETECTED])
88 #
99 # DESCRIPTION
1010 #
11-# Attempt to count the number of processors present on the machine. If the
12-# detection fails, then a value of 1 is assumed.
11+# Attempt to count the number of logical processor cores (including
12+# virtual and HT cores) currently available to use on the machine and
13+# place detected value in CPU_COUNT variable.
1314 #
14-# The value is placed in the CPU_COUNT variable.
15+# On successful detection, ACTION-IF-DETECTED is executed if present. If
16+# the detection fails, then ACTION-IF-NOT-DETECTED is triggered. The
17+# default ACTION-IF-NOT-DETECTED is to set CPU_COUNT to 1.
1518 #
1619 # LICENSE
1720 #
18-# Copyright (c) 2014 Karlson2k (Evgeny Grin) <k2k@narod.ru>
21+# Copyright (c) 2014,2016 Karlson2k (Evgeny Grin) <k2k@narod.ru>
1922 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
2023 # Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net>
2124 # Copyright (c) 2008 Christophe Tournayre <turn3r@users.sourceforge.net>
@@ -25,42 +28,74 @@
2528 # and this notice are preserved. This file is offered as-is, without any
2629 # warranty.
2730
28-#serial 11
31+#serial 22
2932
30- AC_DEFUN([AX_COUNT_CPUS],[
31- AC_REQUIRE([AC_CANONICAL_HOST])
32- AC_REQUIRE([AC_PROG_EGREP])
33+ AC_DEFUN([AX_COUNT_CPUS],[dnl
34+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
35+ AC_REQUIRE([AC_PROG_EGREP])dnl
3336 AC_MSG_CHECKING([the number of available CPUs])
3437 CPU_COUNT="0"
3538
36- AS_CASE([$host_os],[
37- *darwin*],[
38- AS_IF([test -x /usr/sbin/sysctl],[
39- sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu`
40- AS_IF([test sysctl_a],[
41- CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu`
42- ])
43- ])],[
44- *linux*],[
45- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
46- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
47- CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo`
48- ])
49- ])],[
50- *mingw*],[
51- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
52- CPU_COUNT="$NUMBER_OF_PROCESSORS"
53- ])],[
54- *cygwin*],[
55- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
56- CPU_COUNT="$NUMBER_OF_PROCESSORS"
57- ])
58- ])
39+ # Try generic methods
5940
60- AS_IF([test "x$CPU_COUNT" = "x0"],[
61- CPU_COUNT="1"
62- AC_MSG_RESULT( [unable to detect (assuming 1)] )
63- ],[
64- AC_MSG_RESULT( $CPU_COUNT )
65- ])
66- ])
41+ # 'getconf' is POSIX utility, but '_NPROCESSORS_ONLN' and
42+ # 'NPROCESSORS_ONLN' are platform-specific
43+ command -v getconf >/dev/null 2>&1 && \
44+ CPU_COUNT=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null` || CPU_COUNT="0"
45+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v nproc >/dev/null 2>&1]],[[: # empty]],[dnl
46+ # 'nproc' is part of GNU Coreutils and is widely available
47+ CPU_COUNT=`OMP_NUM_THREADS='' nproc 2>/dev/null` || CPU_COUNT=`nproc 2>/dev/null` || CPU_COUNT="0"
48+ ])dnl
49+
50+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
51+ # Try platform-specific preferred methods
52+ AS_CASE([[$host_os]],dnl
53+ [[*linux*]],[[CPU_COUNT=`lscpu -p 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+,' -c` || CPU_COUNT="0"]],dnl
54+ [[*darwin*]],[[CPU_COUNT=`sysctl -n hw.logicalcpu 2>/dev/null` || CPU_COUNT="0"]],dnl
55+ [[freebsd*]],[[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n kern.smp.cpus 2>/dev/null` || CPU_COUNT="0"]],dnl
56+ [[netbsd*]], [[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n hw.ncpuonline 2>/dev/null` || CPU_COUNT="0"]],dnl
57+ [[solaris*]],[[command -v psrinfo >/dev/null 2>&1 && CPU_COUNT=`psrinfo 2>/dev/null | $EGREP -e '^@<:@0-9@:>@.*on-line' -c 2>/dev/null` || CPU_COUNT="0"]],dnl
58+ [[mingw*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
59+ [[msys*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
60+ [[cygwin*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]]dnl
61+ )dnl
62+ ])dnl
63+
64+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v sysctl >/dev/null 2>&1]],[[: # empty]],[dnl
65+ # Try less preferred generic method
66+ # 'hw.ncpu' exist on many platforms, but not on GNU/Linux
67+ CPU_COUNT=`sysctl -n hw.ncpu 2>/dev/null` || CPU_COUNT="0"
68+ ])dnl
69+
70+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
71+ # Try platform-specific fallback methods
72+ # They can be less accurate and slower then preferred methods
73+ AS_CASE([[$host_os]],dnl
74+ [[*linux*]],[[CPU_COUNT=`$EGREP -e '^processor' -c /proc/cpuinfo 2>/dev/null` || CPU_COUNT="0"]],dnl
75+ [[*darwin*]],[[CPU_COUNT=`system_profiler SPHardwareDataType 2>/dev/null | $EGREP -i -e 'number of cores:'|cut -d : -f 2 -s|tr -d ' '` || CPU_COUNT="0"]],dnl
76+ [[freebsd*]],[[CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+: '|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
77+ [[netbsd*]], [[CPU_COUNT=`command -v cpuctl >/dev/null 2>&1 && cpuctl list 2>/dev/null| $EGREP -e '^@<:@0-9@:>@+ .* online ' -c` || \
78+ CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+ at'|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
79+ [[solaris*]],[[command -v kstat >/dev/null 2>&1 && CPU_COUNT=`kstat -m cpu_info -s state -p 2>/dev/null | $EGREP -c -e 'on-line'` || \
80+ CPU_COUNT=`kstat -m cpu_info 2>/dev/null | $EGREP -c -e 'module: cpu_info'` || CPU_COUNT="0"]],dnl
81+ [[mingw*]],[AS_IF([[CPU_COUNT=`reg query 'HKLM\\Hardware\\Description\\System\\CentralProcessor' 2>/dev/null | $EGREP -e '\\\\@<:@0-9@:>@+$' -c`]],dnl
82+ [[: # empty]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]])],dnl
83+ [[msys*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]],dnl
84+ [[cygwin*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]]dnl
85+ )dnl
86+ ])dnl
87+
88+ AS_IF([[test "x$CPU_COUNT" != "x0" && test "$CPU_COUNT" -gt 0 2>/dev/null]],[dnl
89+ AC_MSG_RESULT([[$CPU_COUNT]])
90+ m4_ifvaln([$1],[$1],)dnl
91+ ],[dnl
92+ m4_ifval([$2],[dnl
93+ AS_UNSET([[CPU_COUNT]])
94+ AC_MSG_RESULT([[unable to detect]])
95+ $2
96+ ], [dnl
97+ CPU_COUNT="1"
98+ AC_MSG_RESULT([[unable to detect (assuming 1)]])
99+ ])dnl
100+ ])dnl
101+ ])dnl
--- trunk/beikaitoru/m4/ax_check_gnu_make.m4 (revision 666)
+++ trunk/beikaitoru/m4/ax_check_gnu_make.m4 (revision 667)
@@ -1,10 +1,10 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
2+# https://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_CHECK_GNU_MAKE()
7+# AX_CHECK_GNU_MAKE([run-if-true],[run-if-false])
88 #
99 # DESCRIPTION
1010 #
@@ -13,6 +13,10 @@
1313 # * The makefile variable `ifGNUmake' is set to the empty string, otherwise
1414 # it is set to "#". This is useful for including a special features in a
1515 # Makefile, which cannot be handled by other versions of make.
16+# * The makefile variable `ifnGNUmake' is set to #, otherwise
17+# it is set to the empty string. This is useful for including a special
18+# features in a Makefile, which can be handled
19+# by other versions of make or to specify else like clause.
1620 # * The variable `_cv_gnu_make_command` is set to the command to invoke
1721 # GNU make if it exists, the empty string otherwise.
1822 # * The variable `ax_cv_gnu_make_command` is set to the command to invoke
@@ -20,6 +24,8 @@
2024 # * If GNU Make is found, its version is extracted from the output of
2125 # `make --version` as the last field of a record of space-separated
2226 # columns and saved into the variable `ax_check_gnu_make_version`.
27+# * Additionally if GNU Make is found, run shell code run-if-true
28+# else run shell code run-if-false.
2329 #
2430 # Here is an example of its use:
2531 #
@@ -31,6 +37,8 @@
3137 #
3238 # @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
3339 # @ifGNUmake@ include $(DEPEND)
40+# @ifGNUmake@ else
41+# fallback code
3442 # @ifGNUmake@ endif
3543 #
3644 # Then configure.in would normally contain:
@@ -61,7 +69,7 @@
6169 # and this notice are preserved. This file is offered as-is, without any
6270 # warranty.
6371
64-#serial 8
72+#serial 11
6573
6674 AC_DEFUN([AX_CHECK_GNU_MAKE],dnl
6775 [AC_PROG_AWK
@@ -79,6 +87,9 @@
7987 done ;])
8088 dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
8189 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifGNUmake], ["#"])], [AS_VAR_SET([ifGNUmake], [""])])
90+ AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifnGNUmake], [""])], [AS_VAR_SET([ifGNUmake], ["#"])])
8291 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_UNSET(ax_cv_gnu_make_command)], [AS_VAR_SET([ax_cv_gnu_make_command], [${_cv_gnu_make_command}])])
92+ AS_VAR_IF([_cv_gnu_make_command], [""],[$2],[$1])
8393 AC_SUBST([ifGNUmake])
94+ AC_SUBST([ifnGNUmake])
8495 ])
--- trunk/kleknev/m4/ax_create_stdint_h.m4 (revision 666)
+++ trunk/kleknev/m4/ax_create_stdint_h.m4 (revision 667)
@@ -1,5 +1,5 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html
2+# https://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
@@ -12,9 +12,9 @@
1212 # existence of an include file <stdint.h> that defines a set of typedefs,
1313 # especially uint8_t,int32_t,uintptr_t. Many older installations will not
1414 # provide this file, but some will have the very same definitions in
15-# <inttypes.h>. In other enviroments we can use the inet-types in
15+# <inttypes.h>. In other environments we can use the inet-types in
1616 # <sys/types.h> which would define the typedefs int8_t and u_int8_t
17-# respectivly.
17+# respectively.
1818 #
1919 # This macros will create a local "_stdint.h" or the headerfile given as
2020 # an argument. In many cases that file will just "#include <stdint.h>" or
@@ -39,7 +39,7 @@
3939 #
4040 # Remember, if the system already had a valid <stdint.h>, the generated
4141 # file will include it directly. No need for fuzzy HAVE_STDINT_H things...
42-# (oops, GCC 4.2.x has deliberatly disabled its stdint.h for non-c99
42+# (oops, GCC 4.2.x has deliberately disabled its stdint.h for non-c99
4343 # compilation and the c99-mode is not the default. Therefore this macro
4444 # will not use the compiler's stdint.h - please complain to the GCC
4545 # developers).
@@ -59,7 +59,7 @@
5959 # Public License for more details.
6060 #
6161 # You should have received a copy of the GNU General Public License along
62-# with this program. If not, see <http://www.gnu.org/licenses/>.
62+# with this program. If not, see <https://www.gnu.org/licenses/>.
6363 #
6464 # As a special exception, the respective Autoconf Macro's copyright owner
6565 # gives unlimited permission to copy, distribute and modify the configure
@@ -74,7 +74,7 @@
7474 # modified version of the Autoconf Macro, you may extend this special
7575 # exception to the GPL to apply to your modified version as well.
7676
77-#serial 10
77+#serial 19
7878
7979 AC_DEFUN([AX_CHECK_DATA_MODEL],[
8080 AC_CHECK_SIZEOF(char)
@@ -251,7 +251,7 @@
251251 AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
252252 AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>])
253253
254-fi # shortcircut to system "stdint.h"
254+fi # shortcircuit to system "stdint.h"
255255 # ------------------ PREPARE VARIABLES ------------------------------
256256 if test "$GCC" = "yes" ; then
257257 ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
@@ -370,7 +370,7 @@
370370 cat >>$ac_stdint <<STDINT_EOF
371371 /* .................... detections part ............................ */
372372
373-/* whether we need to define bitspecific types from compiler base types */
373+/* whether we need to define bit specific types from compiler base types */
374374 #ifndef _STDINT_HEADER_INTPTR
375375 #ifndef _STDINT_HEADER_UINT32
376376 #ifndef _STDINT_HEADER_U_INT32
@@ -467,7 +467,7 @@
467467 #endif
468468
469469 #ifdef _STDINT_NEED_INT_MODEL_T
470-/* we must guess all the basic types. Apart from byte-adressable system, */
470+/* we must guess all the basic types. Apart from byte-addressable system, */
471471 /* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
472472 /* (btw, those nibble-addressable systems are way off, or so we assume) */
473473
@@ -655,7 +655,7 @@
655655 #endif
656656 #endif
657657
658-/* These limits are merily those of a two complement byte-oriented system */
658+/* These limits are merrily those of a two complement byte-oriented system */
659659
660660 /* Minimum of signed integral types. */
661661 # define INT8_MIN (-128)
--- trunk/kleknev/m4/ax_count_cpus.m4 (revision 666)
+++ trunk/kleknev/m4/ax_count_cpus.m4 (revision 667)
@@ -1,21 +1,24 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
2+# https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_COUNT_CPUS
7+# AX_COUNT_CPUS([ACTION-IF-DETECTED],[ACTION-IF-NOT-DETECTED])
88 #
99 # DESCRIPTION
1010 #
11-# Attempt to count the number of processors present on the machine. If the
12-# detection fails, then a value of 1 is assumed.
11+# Attempt to count the number of logical processor cores (including
12+# virtual and HT cores) currently available to use on the machine and
13+# place detected value in CPU_COUNT variable.
1314 #
14-# The value is placed in the CPU_COUNT variable.
15+# On successful detection, ACTION-IF-DETECTED is executed if present. If
16+# the detection fails, then ACTION-IF-NOT-DETECTED is triggered. The
17+# default ACTION-IF-NOT-DETECTED is to set CPU_COUNT to 1.
1518 #
1619 # LICENSE
1720 #
18-# Copyright (c) 2014 Karlson2k (Evgeny Grin) <k2k@narod.ru>
21+# Copyright (c) 2014,2016 Karlson2k (Evgeny Grin) <k2k@narod.ru>
1922 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
2023 # Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net>
2124 # Copyright (c) 2008 Christophe Tournayre <turn3r@users.sourceforge.net>
@@ -25,42 +28,74 @@
2528 # and this notice are preserved. This file is offered as-is, without any
2629 # warranty.
2730
28-#serial 11
31+#serial 22
2932
30- AC_DEFUN([AX_COUNT_CPUS],[
31- AC_REQUIRE([AC_CANONICAL_HOST])
32- AC_REQUIRE([AC_PROG_EGREP])
33+ AC_DEFUN([AX_COUNT_CPUS],[dnl
34+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
35+ AC_REQUIRE([AC_PROG_EGREP])dnl
3336 AC_MSG_CHECKING([the number of available CPUs])
3437 CPU_COUNT="0"
3538
36- AS_CASE([$host_os],[
37- *darwin*],[
38- AS_IF([test -x /usr/sbin/sysctl],[
39- sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu`
40- AS_IF([test sysctl_a],[
41- CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu`
42- ])
43- ])],[
44- *linux*],[
45- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
46- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
47- CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo`
48- ])
49- ])],[
50- *mingw*],[
51- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
52- CPU_COUNT="$NUMBER_OF_PROCESSORS"
53- ])],[
54- *cygwin*],[
55- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
56- CPU_COUNT="$NUMBER_OF_PROCESSORS"
57- ])
58- ])
39+ # Try generic methods
5940
60- AS_IF([test "x$CPU_COUNT" = "x0"],[
61- CPU_COUNT="1"
62- AC_MSG_RESULT( [unable to detect (assuming 1)] )
63- ],[
64- AC_MSG_RESULT( $CPU_COUNT )
65- ])
66- ])
41+ # 'getconf' is POSIX utility, but '_NPROCESSORS_ONLN' and
42+ # 'NPROCESSORS_ONLN' are platform-specific
43+ command -v getconf >/dev/null 2>&1 && \
44+ CPU_COUNT=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null` || CPU_COUNT="0"
45+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v nproc >/dev/null 2>&1]],[[: # empty]],[dnl
46+ # 'nproc' is part of GNU Coreutils and is widely available
47+ CPU_COUNT=`OMP_NUM_THREADS='' nproc 2>/dev/null` || CPU_COUNT=`nproc 2>/dev/null` || CPU_COUNT="0"
48+ ])dnl
49+
50+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
51+ # Try platform-specific preferred methods
52+ AS_CASE([[$host_os]],dnl
53+ [[*linux*]],[[CPU_COUNT=`lscpu -p 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+,' -c` || CPU_COUNT="0"]],dnl
54+ [[*darwin*]],[[CPU_COUNT=`sysctl -n hw.logicalcpu 2>/dev/null` || CPU_COUNT="0"]],dnl
55+ [[freebsd*]],[[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n kern.smp.cpus 2>/dev/null` || CPU_COUNT="0"]],dnl
56+ [[netbsd*]], [[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n hw.ncpuonline 2>/dev/null` || CPU_COUNT="0"]],dnl
57+ [[solaris*]],[[command -v psrinfo >/dev/null 2>&1 && CPU_COUNT=`psrinfo 2>/dev/null | $EGREP -e '^@<:@0-9@:>@.*on-line' -c 2>/dev/null` || CPU_COUNT="0"]],dnl
58+ [[mingw*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
59+ [[msys*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
60+ [[cygwin*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]]dnl
61+ )dnl
62+ ])dnl
63+
64+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v sysctl >/dev/null 2>&1]],[[: # empty]],[dnl
65+ # Try less preferred generic method
66+ # 'hw.ncpu' exist on many platforms, but not on GNU/Linux
67+ CPU_COUNT=`sysctl -n hw.ncpu 2>/dev/null` || CPU_COUNT="0"
68+ ])dnl
69+
70+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
71+ # Try platform-specific fallback methods
72+ # They can be less accurate and slower then preferred methods
73+ AS_CASE([[$host_os]],dnl
74+ [[*linux*]],[[CPU_COUNT=`$EGREP -e '^processor' -c /proc/cpuinfo 2>/dev/null` || CPU_COUNT="0"]],dnl
75+ [[*darwin*]],[[CPU_COUNT=`system_profiler SPHardwareDataType 2>/dev/null | $EGREP -i -e 'number of cores:'|cut -d : -f 2 -s|tr -d ' '` || CPU_COUNT="0"]],dnl
76+ [[freebsd*]],[[CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+: '|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
77+ [[netbsd*]], [[CPU_COUNT=`command -v cpuctl >/dev/null 2>&1 && cpuctl list 2>/dev/null| $EGREP -e '^@<:@0-9@:>@+ .* online ' -c` || \
78+ CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+ at'|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
79+ [[solaris*]],[[command -v kstat >/dev/null 2>&1 && CPU_COUNT=`kstat -m cpu_info -s state -p 2>/dev/null | $EGREP -c -e 'on-line'` || \
80+ CPU_COUNT=`kstat -m cpu_info 2>/dev/null | $EGREP -c -e 'module: cpu_info'` || CPU_COUNT="0"]],dnl
81+ [[mingw*]],[AS_IF([[CPU_COUNT=`reg query 'HKLM\\Hardware\\Description\\System\\CentralProcessor' 2>/dev/null | $EGREP -e '\\\\@<:@0-9@:>@+$' -c`]],dnl
82+ [[: # empty]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]])],dnl
83+ [[msys*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]],dnl
84+ [[cygwin*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]]dnl
85+ )dnl
86+ ])dnl
87+
88+ AS_IF([[test "x$CPU_COUNT" != "x0" && test "$CPU_COUNT" -gt 0 2>/dev/null]],[dnl
89+ AC_MSG_RESULT([[$CPU_COUNT]])
90+ m4_ifvaln([$1],[$1],)dnl
91+ ],[dnl
92+ m4_ifval([$2],[dnl
93+ AS_UNSET([[CPU_COUNT]])
94+ AC_MSG_RESULT([[unable to detect]])
95+ $2
96+ ], [dnl
97+ CPU_COUNT="1"
98+ AC_MSG_RESULT([[unable to detect (assuming 1)]])
99+ ])dnl
100+ ])dnl
101+ ])dnl
--- trunk/kleknev/m4/ax_check_gnu_make.m4 (revision 666)
+++ trunk/kleknev/m4/ax_check_gnu_make.m4 (revision 667)
@@ -1,10 +1,10 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
2+# https://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_CHECK_GNU_MAKE()
7+# AX_CHECK_GNU_MAKE([run-if-true],[run-if-false])
88 #
99 # DESCRIPTION
1010 #
@@ -13,6 +13,10 @@
1313 # * The makefile variable `ifGNUmake' is set to the empty string, otherwise
1414 # it is set to "#". This is useful for including a special features in a
1515 # Makefile, which cannot be handled by other versions of make.
16+# * The makefile variable `ifnGNUmake' is set to #, otherwise
17+# it is set to the empty string. This is useful for including a special
18+# features in a Makefile, which can be handled
19+# by other versions of make or to specify else like clause.
1620 # * The variable `_cv_gnu_make_command` is set to the command to invoke
1721 # GNU make if it exists, the empty string otherwise.
1822 # * The variable `ax_cv_gnu_make_command` is set to the command to invoke
@@ -20,6 +24,8 @@
2024 # * If GNU Make is found, its version is extracted from the output of
2125 # `make --version` as the last field of a record of space-separated
2226 # columns and saved into the variable `ax_check_gnu_make_version`.
27+# * Additionally if GNU Make is found, run shell code run-if-true
28+# else run shell code run-if-false.
2329 #
2430 # Here is an example of its use:
2531 #
@@ -31,6 +37,8 @@
3137 #
3238 # @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
3339 # @ifGNUmake@ include $(DEPEND)
40+# @ifGNUmake@ else
41+# fallback code
3442 # @ifGNUmake@ endif
3543 #
3644 # Then configure.in would normally contain:
@@ -61,7 +69,7 @@
6169 # and this notice are preserved. This file is offered as-is, without any
6270 # warranty.
6371
64-#serial 8
72+#serial 11
6573
6674 AC_DEFUN([AX_CHECK_GNU_MAKE],dnl
6775 [AC_PROG_AWK
@@ -79,6 +87,9 @@
7987 done ;])
8088 dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
8189 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifGNUmake], ["#"])], [AS_VAR_SET([ifGNUmake], [""])])
90+ AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifnGNUmake], [""])], [AS_VAR_SET([ifGNUmake], ["#"])])
8291 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_UNSET(ax_cv_gnu_make_command)], [AS_VAR_SET([ax_cv_gnu_make_command], [${_cv_gnu_make_command}])])
92+ AS_VAR_IF([_cv_gnu_make_command], [""],[$2],[$1])
8393 AC_SUBST([ifGNUmake])
94+ AC_SUBST([ifnGNUmake])
8495 ])
--- trunk/fontanvil/m4/ax_count_cpus.m4 (revision 666)
+++ trunk/fontanvil/m4/ax_count_cpus.m4 (revision 667)
@@ -1,21 +1,24 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
2+# https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_COUNT_CPUS
7+# AX_COUNT_CPUS([ACTION-IF-DETECTED],[ACTION-IF-NOT-DETECTED])
88 #
99 # DESCRIPTION
1010 #
11-# Attempt to count the number of processors present on the machine. If the
12-# detection fails, then a value of 1 is assumed.
11+# Attempt to count the number of logical processor cores (including
12+# virtual and HT cores) currently available to use on the machine and
13+# place detected value in CPU_COUNT variable.
1314 #
14-# The value is placed in the CPU_COUNT variable.
15+# On successful detection, ACTION-IF-DETECTED is executed if present. If
16+# the detection fails, then ACTION-IF-NOT-DETECTED is triggered. The
17+# default ACTION-IF-NOT-DETECTED is to set CPU_COUNT to 1.
1518 #
1619 # LICENSE
1720 #
18-# Copyright (c) 2014 Karlson2k (Evgeny Grin) <k2k@narod.ru>
21+# Copyright (c) 2014,2016 Karlson2k (Evgeny Grin) <k2k@narod.ru>
1922 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
2023 # Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net>
2124 # Copyright (c) 2008 Christophe Tournayre <turn3r@users.sourceforge.net>
@@ -25,42 +28,74 @@
2528 # and this notice are preserved. This file is offered as-is, without any
2629 # warranty.
2730
28-#serial 11
31+#serial 22
2932
30- AC_DEFUN([AX_COUNT_CPUS],[
31- AC_REQUIRE([AC_CANONICAL_HOST])
32- AC_REQUIRE([AC_PROG_EGREP])
33+ AC_DEFUN([AX_COUNT_CPUS],[dnl
34+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
35+ AC_REQUIRE([AC_PROG_EGREP])dnl
3336 AC_MSG_CHECKING([the number of available CPUs])
3437 CPU_COUNT="0"
3538
36- AS_CASE([$host_os],[
37- *darwin*],[
38- AS_IF([test -x /usr/sbin/sysctl],[
39- sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu`
40- AS_IF([test sysctl_a],[
41- CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu`
42- ])
43- ])],[
44- *linux*],[
45- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
46- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
47- CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo`
48- ])
49- ])],[
50- *mingw*],[
51- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
52- CPU_COUNT="$NUMBER_OF_PROCESSORS"
53- ])],[
54- *cygwin*],[
55- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
56- CPU_COUNT="$NUMBER_OF_PROCESSORS"
57- ])
58- ])
39+ # Try generic methods
5940
60- AS_IF([test "x$CPU_COUNT" = "x0"],[
61- CPU_COUNT="1"
62- AC_MSG_RESULT( [unable to detect (assuming 1)] )
63- ],[
64- AC_MSG_RESULT( $CPU_COUNT )
65- ])
66- ])
41+ # 'getconf' is POSIX utility, but '_NPROCESSORS_ONLN' and
42+ # 'NPROCESSORS_ONLN' are platform-specific
43+ command -v getconf >/dev/null 2>&1 && \
44+ CPU_COUNT=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null` || CPU_COUNT="0"
45+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v nproc >/dev/null 2>&1]],[[: # empty]],[dnl
46+ # 'nproc' is part of GNU Coreutils and is widely available
47+ CPU_COUNT=`OMP_NUM_THREADS='' nproc 2>/dev/null` || CPU_COUNT=`nproc 2>/dev/null` || CPU_COUNT="0"
48+ ])dnl
49+
50+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
51+ # Try platform-specific preferred methods
52+ AS_CASE([[$host_os]],dnl
53+ [[*linux*]],[[CPU_COUNT=`lscpu -p 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+,' -c` || CPU_COUNT="0"]],dnl
54+ [[*darwin*]],[[CPU_COUNT=`sysctl -n hw.logicalcpu 2>/dev/null` || CPU_COUNT="0"]],dnl
55+ [[freebsd*]],[[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n kern.smp.cpus 2>/dev/null` || CPU_COUNT="0"]],dnl
56+ [[netbsd*]], [[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n hw.ncpuonline 2>/dev/null` || CPU_COUNT="0"]],dnl
57+ [[solaris*]],[[command -v psrinfo >/dev/null 2>&1 && CPU_COUNT=`psrinfo 2>/dev/null | $EGREP -e '^@<:@0-9@:>@.*on-line' -c 2>/dev/null` || CPU_COUNT="0"]],dnl
58+ [[mingw*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
59+ [[msys*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
60+ [[cygwin*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]]dnl
61+ )dnl
62+ ])dnl
63+
64+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v sysctl >/dev/null 2>&1]],[[: # empty]],[dnl
65+ # Try less preferred generic method
66+ # 'hw.ncpu' exist on many platforms, but not on GNU/Linux
67+ CPU_COUNT=`sysctl -n hw.ncpu 2>/dev/null` || CPU_COUNT="0"
68+ ])dnl
69+
70+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
71+ # Try platform-specific fallback methods
72+ # They can be less accurate and slower then preferred methods
73+ AS_CASE([[$host_os]],dnl
74+ [[*linux*]],[[CPU_COUNT=`$EGREP -e '^processor' -c /proc/cpuinfo 2>/dev/null` || CPU_COUNT="0"]],dnl
75+ [[*darwin*]],[[CPU_COUNT=`system_profiler SPHardwareDataType 2>/dev/null | $EGREP -i -e 'number of cores:'|cut -d : -f 2 -s|tr -d ' '` || CPU_COUNT="0"]],dnl
76+ [[freebsd*]],[[CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+: '|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
77+ [[netbsd*]], [[CPU_COUNT=`command -v cpuctl >/dev/null 2>&1 && cpuctl list 2>/dev/null| $EGREP -e '^@<:@0-9@:>@+ .* online ' -c` || \
78+ CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+ at'|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
79+ [[solaris*]],[[command -v kstat >/dev/null 2>&1 && CPU_COUNT=`kstat -m cpu_info -s state -p 2>/dev/null | $EGREP -c -e 'on-line'` || \
80+ CPU_COUNT=`kstat -m cpu_info 2>/dev/null | $EGREP -c -e 'module: cpu_info'` || CPU_COUNT="0"]],dnl
81+ [[mingw*]],[AS_IF([[CPU_COUNT=`reg query 'HKLM\\Hardware\\Description\\System\\CentralProcessor' 2>/dev/null | $EGREP -e '\\\\@<:@0-9@:>@+$' -c`]],dnl
82+ [[: # empty]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]])],dnl
83+ [[msys*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]],dnl
84+ [[cygwin*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]]dnl
85+ )dnl
86+ ])dnl
87+
88+ AS_IF([[test "x$CPU_COUNT" != "x0" && test "$CPU_COUNT" -gt 0 2>/dev/null]],[dnl
89+ AC_MSG_RESULT([[$CPU_COUNT]])
90+ m4_ifvaln([$1],[$1],)dnl
91+ ],[dnl
92+ m4_ifval([$2],[dnl
93+ AS_UNSET([[CPU_COUNT]])
94+ AC_MSG_RESULT([[unable to detect]])
95+ $2
96+ ], [dnl
97+ CPU_COUNT="1"
98+ AC_MSG_RESULT([[unable to detect (assuming 1)]])
99+ ])dnl
100+ ])dnl
101+ ])dnl
--- trunk/fontanvil/m4/ax_check_gnu_make.m4 (revision 666)
+++ trunk/fontanvil/m4/ax_check_gnu_make.m4 (revision 667)
@@ -1,10 +1,10 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
2+# https://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_CHECK_GNU_MAKE()
7+# AX_CHECK_GNU_MAKE([run-if-true],[run-if-false])
88 #
99 # DESCRIPTION
1010 #
@@ -13,6 +13,10 @@
1313 # * The makefile variable `ifGNUmake' is set to the empty string, otherwise
1414 # it is set to "#". This is useful for including a special features in a
1515 # Makefile, which cannot be handled by other versions of make.
16+# * The makefile variable `ifnGNUmake' is set to #, otherwise
17+# it is set to the empty string. This is useful for including a special
18+# features in a Makefile, which can be handled
19+# by other versions of make or to specify else like clause.
1620 # * The variable `_cv_gnu_make_command` is set to the command to invoke
1721 # GNU make if it exists, the empty string otherwise.
1822 # * The variable `ax_cv_gnu_make_command` is set to the command to invoke
@@ -20,6 +24,8 @@
2024 # * If GNU Make is found, its version is extracted from the output of
2125 # `make --version` as the last field of a record of space-separated
2226 # columns and saved into the variable `ax_check_gnu_make_version`.
27+# * Additionally if GNU Make is found, run shell code run-if-true
28+# else run shell code run-if-false.
2329 #
2430 # Here is an example of its use:
2531 #
@@ -31,6 +37,8 @@
3137 #
3238 # @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
3339 # @ifGNUmake@ include $(DEPEND)
40+# @ifGNUmake@ else
41+# fallback code
3442 # @ifGNUmake@ endif
3543 #
3644 # Then configure.in would normally contain:
@@ -61,7 +69,7 @@
6169 # and this notice are preserved. This file is offered as-is, without any
6270 # warranty.
6371
64-#serial 8
72+#serial 11
6573
6674 AC_DEFUN([AX_CHECK_GNU_MAKE],dnl
6775 [AC_PROG_AWK
@@ -79,6 +87,9 @@
7987 done ;])
8088 dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
8189 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifGNUmake], ["#"])], [AS_VAR_SET([ifGNUmake], [""])])
90+ AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifnGNUmake], [""])], [AS_VAR_SET([ifGNUmake], ["#"])])
8291 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_UNSET(ax_cv_gnu_make_command)], [AS_VAR_SET([ax_cv_gnu_make_command], [${_cv_gnu_make_command}])])
92+ AS_VAR_IF([_cv_gnu_make_command], [""],[$2],[$1])
8393 AC_SUBST([ifGNUmake])
94+ AC_SUBST([ifnGNUmake])
8495 ])
--- trunk/fontanvil/m4/ax_create_stdint_h.m4 (revision 666)
+++ trunk/fontanvil/m4/ax_create_stdint_h.m4 (revision 667)
@@ -1,5 +1,5 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html
2+# https://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
@@ -12,9 +12,9 @@
1212 # existence of an include file <stdint.h> that defines a set of typedefs,
1313 # especially uint8_t,int32_t,uintptr_t. Many older installations will not
1414 # provide this file, but some will have the very same definitions in
15-# <inttypes.h>. In other enviroments we can use the inet-types in
15+# <inttypes.h>. In other environments we can use the inet-types in
1616 # <sys/types.h> which would define the typedefs int8_t and u_int8_t
17-# respectivly.
17+# respectively.
1818 #
1919 # This macros will create a local "_stdint.h" or the headerfile given as
2020 # an argument. In many cases that file will just "#include <stdint.h>" or
@@ -39,7 +39,7 @@
3939 #
4040 # Remember, if the system already had a valid <stdint.h>, the generated
4141 # file will include it directly. No need for fuzzy HAVE_STDINT_H things...
42-# (oops, GCC 4.2.x has deliberatly disabled its stdint.h for non-c99
42+# (oops, GCC 4.2.x has deliberately disabled its stdint.h for non-c99
4343 # compilation and the c99-mode is not the default. Therefore this macro
4444 # will not use the compiler's stdint.h - please complain to the GCC
4545 # developers).
@@ -59,7 +59,7 @@
5959 # Public License for more details.
6060 #
6161 # You should have received a copy of the GNU General Public License along
62-# with this program. If not, see <http://www.gnu.org/licenses/>.
62+# with this program. If not, see <https://www.gnu.org/licenses/>.
6363 #
6464 # As a special exception, the respective Autoconf Macro's copyright owner
6565 # gives unlimited permission to copy, distribute and modify the configure
@@ -74,7 +74,7 @@
7474 # modified version of the Autoconf Macro, you may extend this special
7575 # exception to the GPL to apply to your modified version as well.
7676
77-#serial 10
77+#serial 19
7878
7979 AC_DEFUN([AX_CHECK_DATA_MODEL],[
8080 AC_CHECK_SIZEOF(char)
@@ -251,7 +251,7 @@
251251 AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
252252 AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>])
253253
254-fi # shortcircut to system "stdint.h"
254+fi # shortcircuit to system "stdint.h"
255255 # ------------------ PREPARE VARIABLES ------------------------------
256256 if test "$GCC" = "yes" ; then
257257 ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
@@ -370,7 +370,7 @@
370370 cat >>$ac_stdint <<STDINT_EOF
371371 /* .................... detections part ............................ */
372372
373-/* whether we need to define bitspecific types from compiler base types */
373+/* whether we need to define bit specific types from compiler base types */
374374 #ifndef _STDINT_HEADER_INTPTR
375375 #ifndef _STDINT_HEADER_UINT32
376376 #ifndef _STDINT_HEADER_U_INT32
@@ -467,7 +467,7 @@
467467 #endif
468468
469469 #ifdef _STDINT_NEED_INT_MODEL_T
470-/* we must guess all the basic types. Apart from byte-adressable system, */
470+/* we must guess all the basic types. Apart from byte-addressable system, */
471471 /* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
472472 /* (btw, those nibble-addressable systems are way off, or so we assume) */
473473
@@ -655,7 +655,7 @@
655655 #endif
656656 #endif
657657
658-/* These limits are merily those of a two complement byte-oriented system */
658+/* These limits are merrily those of a two complement byte-oriented system */
659659
660660 /* Minimum of signed integral types. */
661661 # define INT8_MIN (-128)
--- trunk/configure.ac (revision 666)
+++ trunk/configure.ac (revision 667)
@@ -2,7 +2,7 @@
22
33 #
44 # Configuration source for Tsukurimashou
5-# Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016 Matthew Skala
5+# Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Matthew Skala
66 #
77 # This program is free software: you can redistribute it and/or modify
88 # it under the terms of the GNU General Public License as published by
@@ -190,7 +190,7 @@
190190 # Autoconf initialization
191191 #
192192 AC_PREREQ([2.67])
193-AC_INIT([Tsukurimashou],[0.9],[mskala@ansuz.sooke.bc.ca],[tsukurimashou],
193+AC_INIT([Tsukurimashou],[0.10],[mskala@ansuz.sooke.bc.ca],[tsukurimashou],
194194 [[http://tsukurimashou.osdn.jp/]])
195195 AC_PRESERVE_HELP_ORDER
196196 AM_INIT_AUTOMAKE([foreign check-news color-tests dist-zip no-dist-gzip
@@ -199,9 +199,9 @@
199199 AC_CONFIG_SRCDIR([hamlog/hamlog])
200200 AC_CONFIG_HEADERS([config.h])
201201 AC_CONFIG_MACRO_DIR([m4])
202-AC_REVISION([$Id: configure.ac 5744 2017-11-16 21:51:08Z mskala $])
203-AC_COPYRIGHT([Copyright (C) 2011, 2012, 2013, 2014 Matthew Skala])
204-AC_SUBST([release_date],["August 17, 2014"])
202+AC_REVISION([$Id: configure.ac 5745 2017-11-17 03:12:50Z mskala $])
203+AC_COPYRIGHT([Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Matthew Skala])
204+AC_SUBST([release_date],["November 17, 2017"])
205205 AM_SILENT_RULES
206206 #
207207 ############################################################################
--- trunk/doc/shelf.tex (revision 666)
+++ trunk/doc/shelf.tex (revision 667)
@@ -1,6 +1,6 @@
11 \documentclass{article}
22
3-\usepackage[papersize={13in,13in},margin=0.75in]{geometry}
3+\usepackage[papersize={14in,13in},margin=0.75in]{geometry}
44 \usepackage{graphicx}
55
66 \begin{document}
@@ -21,4 +21,6 @@
2121 \includegraphics{spineXIII.pdf}%
2222 \includegraphics{spineXIV.pdf}%
2323 \includegraphics{spineXV.pdf}%
24+\includegraphics{spineXVI.pdf}%
25+\includegraphics{spineXVII.pdf}%
2426 \end{document}
--- trunk/doc/usermanual.tex (revision 666)
+++ trunk/doc/usermanual.tex (revision 667)
@@ -2,7 +2,7 @@
22
33 %
44 % User Manual for Tsukurimashou
5-% Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016 Matthew Skala
5+% Copyright (C) 2011, 2012, 2013, 2014, 2015, 2017 Matthew Skala
66 %
77 % This program is free software: you can redistribute it and/or modify
88 % it under the terms of the GNU General Public License as published by
@@ -150,7 +150,7 @@
150150 \vspace*{1in}
151151
152152 User manual for Tsukurimashou\\
153-Copyright © 2011, 2012, 2013, 2014, 2015\quad Matthew Skala
153+Copyright © 2011, 2012, 2013, 2014, 2015, 2017\quad Matthew Skala
154154
155155 This program is free software: you can redistribute it and/or modify
156156 it under the terms of the GNU General Public License as published by
@@ -401,116 +401,76 @@
401401 \blsubsection{\TsukurimashouVWide
402402 のニュース}{What's new in \TsukurimashouVersion?}
403403
404-Version 0.9 has been a long time coming. There are not all that many new
405-kanji. The current count is 1754 kanji, up from 1502 in version 0.8 roughly
406-a year ago. This includes all the elementary-school kanji through Grade
407-Four, and 100 of the 185 kanji in Grade Five. A lot of infrastructure work
408-has also been done. This version was prepared in a hurry, for reasons to be
409-described below.
404+I said in the version~0.9 ``what's new'' that the future of the project was
405+uncertain because of my career situation. That was a little over three
406+years ago. Subsequent to the 0.9 release, I went to Denmark for a couple of
407+years on a postdoctoral fellowship. I made some effort to work
408+Tsukurimashou into my academic work, including a couple of publications I
409+will cite below, but for the most part, work on this project was shelved as
410+I made it my top priority to find a long-term academic position.
410411
411-This version of Tsukurimashou introduces FontAnvil, a standalone interpreter
412-for FontForge's native scripting language (PE script). The decision to
413-bundle a more or less complete font editor, drastically increasing the
414-amount of code in the project and thus increasing the maintenance costs, was
415-not made lightly. The issue is that within the last two years or so I have
416-been involved in FontForge development, and it is clear that the strategic
417-direction of that project will present problems for the long-term use of
418-FontForge within Tsukurimashou. FontForge's development team is primarily
419-interested in end-user GUI features (even going so far as social networking)
420-and encourages Python for all new code; they have even seriously discussed,
421-though not yet committed to, removing PE script support entirely, which
422-would be fatal to Tsukurimashou if Tsukurimashou continued to rely on
423-FontForge. Especially given that Tsukurimashou already bundles its own
424-versions of several other critical tools (such as Metatype1 and t1asm), it
425-seems reasonable to bundle Tsukurimashou's own replacement for FontForge.
426-This is hoped to be of benefit to FontForge development as well, because it
427-may make it easier for them to stop supporting PE script should they want to
428-in the future; they can encourage PE script users to use FontAnvil instead
429-of leaving such users out in the cold.
412+My efforts were not successful, and in 2016, after 15 years in academic
413+research aiming for a professorship, I decided it was time to seek a
414+different career path. I moved back to Canada and went into the electronic
415+musical instruments business. Please visit North Coast Synthesis Ltd., at
416+\url{https://northcoastsynthesis.com/}, for high-quality Eurorack modules
417+and kits.
430418
431-FontForge has very recently made significant improvements to its
432-spline-geometry operations (remove overlaps, find intersections, add
433-extrema). I have been complaining about those bugs for \emph{years}; they
434-are critical to Tsukurimashou. Many thanks are due to Frank Trampe of the
435-FontForge team for his assiduous work on the spline geometry issues. The
436-latest changes to these features from FontForge were ported into FontAnvil
437-at the last minute before the Tsukurimashou 0.9 release, along with some
438-quick-and-dirty last-minute hacking on other stability issues (infinite
439-loops and segfaults) to just get the build working. I cannot vouch for
440-Tsukurimashou 0.9 to build properly with any font compiler except the
441-development FontAnvil bundled with it; and I cannot vouch for that version
442-of FontAnvil to do anything except build Tsukurimashou 0.9 more or less
443-correctly. However, that specific combination, on my specific desktop
444-computer, seems to work pretty well.
419+With November 2017, I was considering doing a NaNoWriMo project (``National
420+Novel Writing Month''---the idea is to write a 50,000-word work of fiction
421+in 30 days) but decided instead to aim for adding five new kanji to
422+Tsukurimashou each day and have them be the ones needed for the next
423+release, namely Grade Five kanji. That actually meant more than five
424+characters per day on average, as some of the Grade Fives entailed creating
425+other characters first to use as components. A few days ago I completed
426+the Grade Five set and have spent the time since, working on other issues
427+needed to prepare the 0.10 release.
445428
446-I presented Tsukurimashou at TUG 2013 in Tokyo. Slides from that talk are
447-at \url{https://tug.org/tug2013/slides/skala-slides.pdf}, and the associated
448-\emph{TUGboat} article is available to TUG members at
449-\url{https://www.tug.org/members/TUGboat/tb34-3/tb108skala.pdf}; it will
450-eventually become open-access. Most of the source code for the article
451-(maybe not including the absolute latest edits, made by the journal editors
452-instead of by me) is in the \texttt{tug2013/} subdirectory of
453-Tsukurimashou's version control system.
429+This version~0.10 is being pushed out in a bit of a rush, again, because
430+after three years with no releases I'd like to confirm that the project is
431+not dead, and get as much visible progress in this November push as
432+possible. My roadmap for future releases is to push 0.11 halfway through
433+Grade Six, 0.12 at the end of Grade Six, and then it'll be the big one:
434+Tsukurimashou~1.0, with no specific kanji promised beyond Grade Six but a
435+more polished release addressing issues that may still remain after the 0.12
436+release. It is my hope that version~1.0 will be usable enough that I can
437+sell precompiled binaries of it; I have no illusions of actually making any
438+real money that way, but maybe some people would like to have an official,
439+physical DVD of the Tsukurimashou fonts and support the project a little.
454440
455-In this version the Korean-language fonts have had their names changed to
456-``Mandeubsida''; from talking to some people at the TUG meeting, it appears
457-that this is a better translation of the name Tsukurimashou into Korean.
458-The GSUB features to support Korean glyph shaping have been redesigned to
459-better work with some shapers (in particular, recent versions of HarfBuzz).
460-Also in this version, build system support for an experimental font family
461-called Kazoemashou (``let's count!'') has been added; this is intended to
462-become a Unicode Math font based on Tsukurimashou, but as of this writing it
463-is very fragmentary and not usable.
441+My academic journal article about IDSgrep was published in the
442+International Journal of Asian Language Processing and you can read
443+it (open access) at
444+\url{http://colips.org/journals/volume23/23.2.4_idsgrep-article-final.pdf}.
445+I also presented a conference paper on algorithmic aspects at the 9th
446+International Conference on Similarity Search and Applications (SISAP 2016)
447+in Tokyo, and that one is online (behind a paywall) at
448+\url{https://link.springer.com/chapter/10.1007/978-3-319-46759-7_11}.
464449
465-An academic article about IDSgrep is currently in submission to \emph{ACM
466-Transactions on Asian Language Information Processing}. You can read a
467-preprint version at \url{http://arxiv.org/abs/1404.5585}.
450+This version contains significant revisions to FontAnvil and some of the
451+other associated software, but those are still too new and experimental for
452+detailed comment here. FontForge contained a lot of semi-hardcoded tables
453+of font information, with semi-automated software for generating the C code
454+to express those tables. I have introduced a new tool of my own called
455+Icemap for solving that problem in a more principled way, but I'm not up to
456+writing a detailed document for it yet. Dig around in the source code, and
457+consider it pre-alpha, if you want.
468458
469-Version 0.9 was prepared in a hurry, and there are some ongoing questions
470-about the future of Tsukurimashou as a result of my life and employment
471-situations. This release is a fair bit less polished than other releases
472-have been, and some parts of the documentation (especially in the parasite
473-packages) may not have been properly updated. I am releasing it as it
474-stands because after a year, we need a new version; the kanji planned for
475-inclusion in this version are complete at least; and it may be a long time
476-before I have another chance.
459+Without wanting to get too personal, the next couple of years are going to
460+be critical for me in the course of my life. I'm not making Tsukurimashou
461+for money but I do need money; academia didn't work out and it's not clear
462+electronics manufacturing will either; and any help and support you can give
463+me is welcome if it is in the form I need. The best thing you can do is buy
464+my synthesizer modules (that URL again is
465+\url{https://northcoastsynthesis.com/}); but I realize they are only of use
466+to a few people. Failing that anything that increases the profile of my
467+business or this project would be very welcome. Please, circulate that URL
468+and the URL of the Tsukurimashou home page
469+(\url{http://tsukurimashou.osdn.jp/}) in your social media, and talk and
470+write about Tsukurimashou! It is only
471+because of your continued support that I am able to continue working
472+on this project. よろしくお願いします。
477473
478-I mentioned in last version's release notes that I was unhappy about being
479-single and unemployed. It took me a year and a half to find an academic
480-job. During that time I lived mostly on savings, with occasional
481-short-term contracts. During that time my availability to work on
482-Tsukurimashou was limited and development was slow. I eventually obtained a
483-postdoctoral position at the IT University of Copenhagen, working for a
484-project called Scaleable Similarity Search. This project's subject matter
485-is a close match to the kind of thing I wrote about in my doctoral
486-dissertation, and I am excited about getting to do more work on it. As I
487-write this text (August 16, 2014) I am in the middle of packing to move from
488-Canada to Denmark. Now I am rushing to get the Tsukurimashou 0.9 release
489-out the door before I leave, because if I don't, it won't go out until much
490-later, if ever. Very soon I will be shutting down and packing my main
491-development computer so it can be shipped; and it will probably be at least
492-two months before I can use this computer again.
493-
494-Once I arrive in Copenhagen, I don't know if I will be spending a lot of
495-time trying to learn to speak Danish, and if so what that will do to my
496-Japanese studies. Despite strict Danish government regulations limiting
497-employment work hours, I don't know how much leisure time I will really have
498-to devote to Tsukurimashou; and I don't know to what extent I will be able
499-to fit continued Tsukurimashou development into my future career plans. I
500-am now six years post-PhD. My job in Copenhagen is to be at most two years
501-long, and given that it took me a year and a half to find this job, and next
502-time, if I am to have a real academic career at all then my next job had
503-better be at the faculty level, it appears that I should \emph{already} have
504-been searching for my next job since something like a year ago.
505-
506-This is an extremely stressful state to be in and it is destructive to my
507-ability to pursue side projects like Tsukurimashou. I am conscious that my
508-life outside of work is also far from what it should be, it is not
509-clear whether I will ever be able to have the life that I was promised and
510-have earned, and that too is destructive. The bottom line is that I can't
511-predict much about possible future development of Tsukurimashou.
512-バージョン0.9は、楽しんで下さい。
513-
514474 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
515475
516476 \blsubsection{外のプロジェクト}{Other similar projects}
@@ -669,7 +629,7 @@
669629 \blsubsection{デベロップメントロードマップ}{Development roadmap}
670630
671631 This version contains all the kyouiku kanji (the ones taught in Japanese
672-elementary school) through Grade 4. The current plan is
632+elementary school) through Grade 5. The current plan is
673633 to release a minor version after each grade level of kyouiku kanji and one
674634 halfway through each grade level, which will take us up to version 0.12 at
675635 the end of Grade 6. Version 1.0 will probably be a separate version
@@ -732,26 +692,27 @@
732692 % 0.7 20130307 2456358 1291 2770 48879
733693 % 0.8 20130826 2456530 1502 2981 52508
734694 % 0.9 20140817 2456887 1754 3234 56641
695+% 0.10 20171117 2458075 2353 3831 63345
735696
736697 \begin{figure}
737-\tikzset{horizontal axis/.style={xscale=0.09,xshift=1.5cm}}
698+\tikzset{horizontal axis/.style={xscale=0.045,xshift=1.5cm}}
738699 \tikzset{vertical axis/.style={yscale=0.2}}
739700 \centering
740701 \begin{tikzpicture}
741702 \begin{scope}[vertical axis]
742- \draw[arrows=-triangle 60] (0,-1) -- (0,32);
703+ \draw[arrows=-triangle 60] (0,-1) -- (0,42);
743704 \foreach \y/\ylbl in
744- {0/0,5/500,10/1000,15/1500,20/2000,25/2500,30/3000} {
705+ {0/0,10/1000,20/2000,30/3000,40/4000} {
745706 \draw (-0.2,\y) -- (0.2,\y);
746- \node[anchor=east] at (-0.2,\y) {\ylbl};
707+ \node[anchor=east] at (-0.2,\y) {\scriptsize\ylbl};
747708 }
748709 \node[rotate=90] at (-2,16) {glyphs};
749710 \end{scope}
750711 \begin{scope}[horizontal axis]
751- \draw[arrows=-triangle 60] (-2,0) -- (132.0,0);
712+ \draw[arrows=-triangle 60] (-2,0) -- (252.0,0);
752713 \foreach \x/\xlbl in
753714 {1.2/0.1,5.8/0.2,9.2/0.3,25.1/0.4,31.1/0.5,49.6/0.6,76.0/0.7,%
754- 93.0/0.8,128.7/0.9} {
715+ 93.0/0.8,128.7/0.9,247.5/0.10} {
755716 \draw (\x,-0.2) -- (\x,0.2);
756717 \node[anchor=north] at (\x,-0.2) {\scriptsize\xlbl};
757718 }
@@ -767,6 +728,7 @@
767728 \node (v7k) at (75.7,12.91) {漢};
768729 \node (v8k) at (93.0,15.02) {漢};
769730 \node (v9k) at (128.7,17.54) {漢};
731+ \node (v10k) at (247.5,23.53) {漢};
770732 \node (v1t) at (1.2,13.07) {\labelitemi};
771733 \node (v2t) at (5.8,16.46) {\labelitemi};
772734 \node (v3t) at (9.2,17.97) {\labelitemi};
@@ -775,13 +737,14 @@
775737 \node (v6t) at (49.6,25.86) {\labelitemi};
776738 \node (v7t) at (75.7,27.70) {\labelitemi};
777739 \node (v8t) at (93.0,29.81) {\labelitemi};
778- \node (v9t) at (128.7 ,32.34) {\labelitemi};
740+ \node (v9t) at (128.7,32.34) {\labelitemi};
741+ \node (v10t) at (247.5,38.31) {\labelitemi};
779742 \draw (v1k) -- (v2k) -- (v3k) -- (v4k)
780- -- (v5k) -- (v6k) -- (v7k) node[sloped,above,midway] {kanji};
781- \draw (v7k) -- (v8k) -- (v9k);
743+ -- (v5k) -- (v6k) -- (v7k) -- (v8k) -- (v9k)
744+ -- (v10k) node[sloped,above,midway] {kanji};
782745 \draw (v1t) -- (v2t) -- (v3t) -- (v4t)
783- -- (v5t) -- (v6t) -- (v7t) node[sloped,above,midway] {total};
784- \draw (v7t) -- (v8t) -- (v9t);
746+ -- (v5t) -- (v6t) -- (v7t) -- (v8t) -- (v9t)
747+ -- (v10t) node[sloped,above,midway] {total};
785748 \end{scope}
786749 \end{tikzpicture}
787750 \caption{Growth of glyph counts}
@@ -796,25 +759,25 @@
796759 Tsukurimashou family.
797760
798761 \begin{figure}
799-\tikzset{horizontal axis/.style={xscale=0.3}}
800-\tikzset{vertical axis/.style={yscale=0.18}}
762+\tikzset{horizontal axis/.style={xscale=0.25}}
763+\tikzset{vertical axis/.style={yscale=0.15}}
801764 \centering
802765 \begin{tikzpicture}
803766 \begin{scope}[vertical axis]
804- \draw[arrows=-triangle 60] (0,0) -- (0,62);
767+ \draw[arrows=-triangle 60] (0,0) -- (0,72);
805768 \foreach \y/\ylbl in
806- {0/0,10/10000,20/20000,30/30000,40/40000,50/50000,60/60000} {
769+ {0/0,10/10000,20/20000,30/30000,40/40000,50/50000,60/60000,70/70000} {
807770 \draw (-0.2,\y) -- (0.2,\y);
808- \node[anchor=east] at (-0.2,\y) {\ylbl};
771+ \node[anchor=east] at (-0.2,\y) {\scriptsize\ylbl};
809772 }
810773 \node[rotate=90] at (-2.2,25) {lines of code};
811774 \end{scope}
812775 \begin{scope}[horizontal axis]
813- \draw[arrows=-triangle 60] (0,0) -- (32,0);
776+ \draw[arrows=-triangle 60] (0,0) -- (42,0);
814777 \foreach \x/\xlbl in
815- {0/0,5/500,10/1000,15/1500,20/2000,25/2500,30/3000} {
778+ {0/0,10/1000,20/2000,30/3000,40/4000} {
816779 \draw (\x,-0.2) -- (\x,0.2);
817- \node[anchor=north] at (\x,-0.2) {\xlbl};
780+ \node[anchor=north] at (\x,-0.2) {\scriptsize\xlbl};
818781 }
819782 \node at (15,-1.3) {glyphs};
820783 \end{scope}
@@ -828,8 +791,9 @@
828791 \node (v7) at (27.70,48.879) {\labelitemi};
829792 \node (v8) at (29.81,52.508) {\labelitemi};
830793 \node (v9) at (32.34,56.641) {\labelitemi};
794+ \node (v10) at (38.31,63.345) {\labelitemi};
831795 \draw (v1) -- (v2) -- (v3) -- (v4) -- (v5) -- (v6) -- (v7)
832- -- (v8) -- (v9);
796+ -- (v8) -- (v9) -- (v10);
833797 \end{scope}
834798 \end{tikzpicture}
835799 \caption{Lines of code per glyph}
--- trunk/genjimon/m4/ax_count_cpus.m4 (revision 666)
+++ trunk/genjimon/m4/ax_count_cpus.m4 (revision 667)
@@ -1,21 +1,24 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
2+# https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_COUNT_CPUS
7+# AX_COUNT_CPUS([ACTION-IF-DETECTED],[ACTION-IF-NOT-DETECTED])
88 #
99 # DESCRIPTION
1010 #
11-# Attempt to count the number of processors present on the machine. If the
12-# detection fails, then a value of 1 is assumed.
11+# Attempt to count the number of logical processor cores (including
12+# virtual and HT cores) currently available to use on the machine and
13+# place detected value in CPU_COUNT variable.
1314 #
14-# The value is placed in the CPU_COUNT variable.
15+# On successful detection, ACTION-IF-DETECTED is executed if present. If
16+# the detection fails, then ACTION-IF-NOT-DETECTED is triggered. The
17+# default ACTION-IF-NOT-DETECTED is to set CPU_COUNT to 1.
1518 #
1619 # LICENSE
1720 #
18-# Copyright (c) 2014 Karlson2k (Evgeny Grin) <k2k@narod.ru>
21+# Copyright (c) 2014,2016 Karlson2k (Evgeny Grin) <k2k@narod.ru>
1922 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
2023 # Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net>
2124 # Copyright (c) 2008 Christophe Tournayre <turn3r@users.sourceforge.net>
@@ -25,42 +28,74 @@
2528 # and this notice are preserved. This file is offered as-is, without any
2629 # warranty.
2730
28-#serial 11
31+#serial 22
2932
30- AC_DEFUN([AX_COUNT_CPUS],[
31- AC_REQUIRE([AC_CANONICAL_HOST])
32- AC_REQUIRE([AC_PROG_EGREP])
33+ AC_DEFUN([AX_COUNT_CPUS],[dnl
34+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
35+ AC_REQUIRE([AC_PROG_EGREP])dnl
3336 AC_MSG_CHECKING([the number of available CPUs])
3437 CPU_COUNT="0"
3538
36- AS_CASE([$host_os],[
37- *darwin*],[
38- AS_IF([test -x /usr/sbin/sysctl],[
39- sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu`
40- AS_IF([test sysctl_a],[
41- CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu`
42- ])
43- ])],[
44- *linux*],[
45- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
46- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
47- CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo`
48- ])
49- ])],[
50- *mingw*],[
51- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
52- CPU_COUNT="$NUMBER_OF_PROCESSORS"
53- ])],[
54- *cygwin*],[
55- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
56- CPU_COUNT="$NUMBER_OF_PROCESSORS"
57- ])
58- ])
39+ # Try generic methods
5940
60- AS_IF([test "x$CPU_COUNT" = "x0"],[
61- CPU_COUNT="1"
62- AC_MSG_RESULT( [unable to detect (assuming 1)] )
63- ],[
64- AC_MSG_RESULT( $CPU_COUNT )
65- ])
66- ])
41+ # 'getconf' is POSIX utility, but '_NPROCESSORS_ONLN' and
42+ # 'NPROCESSORS_ONLN' are platform-specific
43+ command -v getconf >/dev/null 2>&1 && \
44+ CPU_COUNT=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null` || CPU_COUNT="0"
45+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v nproc >/dev/null 2>&1]],[[: # empty]],[dnl
46+ # 'nproc' is part of GNU Coreutils and is widely available
47+ CPU_COUNT=`OMP_NUM_THREADS='' nproc 2>/dev/null` || CPU_COUNT=`nproc 2>/dev/null` || CPU_COUNT="0"
48+ ])dnl
49+
50+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
51+ # Try platform-specific preferred methods
52+ AS_CASE([[$host_os]],dnl
53+ [[*linux*]],[[CPU_COUNT=`lscpu -p 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+,' -c` || CPU_COUNT="0"]],dnl
54+ [[*darwin*]],[[CPU_COUNT=`sysctl -n hw.logicalcpu 2>/dev/null` || CPU_COUNT="0"]],dnl
55+ [[freebsd*]],[[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n kern.smp.cpus 2>/dev/null` || CPU_COUNT="0"]],dnl
56+ [[netbsd*]], [[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n hw.ncpuonline 2>/dev/null` || CPU_COUNT="0"]],dnl
57+ [[solaris*]],[[command -v psrinfo >/dev/null 2>&1 && CPU_COUNT=`psrinfo 2>/dev/null | $EGREP -e '^@<:@0-9@:>@.*on-line' -c 2>/dev/null` || CPU_COUNT="0"]],dnl
58+ [[mingw*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
59+ [[msys*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
60+ [[cygwin*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]]dnl
61+ )dnl
62+ ])dnl
63+
64+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v sysctl >/dev/null 2>&1]],[[: # empty]],[dnl
65+ # Try less preferred generic method
66+ # 'hw.ncpu' exist on many platforms, but not on GNU/Linux
67+ CPU_COUNT=`sysctl -n hw.ncpu 2>/dev/null` || CPU_COUNT="0"
68+ ])dnl
69+
70+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
71+ # Try platform-specific fallback methods
72+ # They can be less accurate and slower then preferred methods
73+ AS_CASE([[$host_os]],dnl
74+ [[*linux*]],[[CPU_COUNT=`$EGREP -e '^processor' -c /proc/cpuinfo 2>/dev/null` || CPU_COUNT="0"]],dnl
75+ [[*darwin*]],[[CPU_COUNT=`system_profiler SPHardwareDataType 2>/dev/null | $EGREP -i -e 'number of cores:'|cut -d : -f 2 -s|tr -d ' '` || CPU_COUNT="0"]],dnl
76+ [[freebsd*]],[[CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+: '|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
77+ [[netbsd*]], [[CPU_COUNT=`command -v cpuctl >/dev/null 2>&1 && cpuctl list 2>/dev/null| $EGREP -e '^@<:@0-9@:>@+ .* online ' -c` || \
78+ CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+ at'|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
79+ [[solaris*]],[[command -v kstat >/dev/null 2>&1 && CPU_COUNT=`kstat -m cpu_info -s state -p 2>/dev/null | $EGREP -c -e 'on-line'` || \
80+ CPU_COUNT=`kstat -m cpu_info 2>/dev/null | $EGREP -c -e 'module: cpu_info'` || CPU_COUNT="0"]],dnl
81+ [[mingw*]],[AS_IF([[CPU_COUNT=`reg query 'HKLM\\Hardware\\Description\\System\\CentralProcessor' 2>/dev/null | $EGREP -e '\\\\@<:@0-9@:>@+$' -c`]],dnl
82+ [[: # empty]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]])],dnl
83+ [[msys*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]],dnl
84+ [[cygwin*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]]dnl
85+ )dnl
86+ ])dnl
87+
88+ AS_IF([[test "x$CPU_COUNT" != "x0" && test "$CPU_COUNT" -gt 0 2>/dev/null]],[dnl
89+ AC_MSG_RESULT([[$CPU_COUNT]])
90+ m4_ifvaln([$1],[$1],)dnl
91+ ],[dnl
92+ m4_ifval([$2],[dnl
93+ AS_UNSET([[CPU_COUNT]])
94+ AC_MSG_RESULT([[unable to detect]])
95+ $2
96+ ], [dnl
97+ CPU_COUNT="1"
98+ AC_MSG_RESULT([[unable to detect (assuming 1)]])
99+ ])dnl
100+ ])dnl
101+ ])dnl
--- trunk/genjimon/m4/ax_check_gnu_make.m4 (revision 666)
+++ trunk/genjimon/m4/ax_check_gnu_make.m4 (revision 667)
@@ -1,10 +1,10 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
2+# https://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_CHECK_GNU_MAKE()
7+# AX_CHECK_GNU_MAKE([run-if-true],[run-if-false])
88 #
99 # DESCRIPTION
1010 #
@@ -13,6 +13,10 @@
1313 # * The makefile variable `ifGNUmake' is set to the empty string, otherwise
1414 # it is set to "#". This is useful for including a special features in a
1515 # Makefile, which cannot be handled by other versions of make.
16+# * The makefile variable `ifnGNUmake' is set to #, otherwise
17+# it is set to the empty string. This is useful for including a special
18+# features in a Makefile, which can be handled
19+# by other versions of make or to specify else like clause.
1620 # * The variable `_cv_gnu_make_command` is set to the command to invoke
1721 # GNU make if it exists, the empty string otherwise.
1822 # * The variable `ax_cv_gnu_make_command` is set to the command to invoke
@@ -20,6 +24,8 @@
2024 # * If GNU Make is found, its version is extracted from the output of
2125 # `make --version` as the last field of a record of space-separated
2226 # columns and saved into the variable `ax_check_gnu_make_version`.
27+# * Additionally if GNU Make is found, run shell code run-if-true
28+# else run shell code run-if-false.
2329 #
2430 # Here is an example of its use:
2531 #
@@ -31,6 +37,8 @@
3137 #
3238 # @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
3339 # @ifGNUmake@ include $(DEPEND)
40+# @ifGNUmake@ else
41+# fallback code
3442 # @ifGNUmake@ endif
3543 #
3644 # Then configure.in would normally contain:
@@ -61,7 +69,7 @@
6169 # and this notice are preserved. This file is offered as-is, without any
6270 # warranty.
6371
64-#serial 8
72+#serial 11
6573
6674 AC_DEFUN([AX_CHECK_GNU_MAKE],dnl
6775 [AC_PROG_AWK
@@ -79,6 +87,9 @@
7987 done ;])
8088 dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
8189 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifGNUmake], ["#"])], [AS_VAR_SET([ifGNUmake], [""])])
90+ AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifnGNUmake], [""])], [AS_VAR_SET([ifGNUmake], ["#"])])
8291 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_UNSET(ax_cv_gnu_make_command)], [AS_VAR_SET([ax_cv_gnu_make_command], [${_cv_gnu_make_command}])])
92+ AS_VAR_IF([_cv_gnu_make_command], [""],[$2],[$1])
8393 AC_SUBST([ifGNUmake])
94+ AC_SUBST([ifnGNUmake])
8495 ])
--- trunk/Makefile.am (revision 666)
+++ trunk/Makefile.am (revision 667)
@@ -177,10 +177,10 @@
177177 KANJIDIC2=@with_kanjidic2@
178178 if COND_BOOKPROOFS
179179 MAYBE_BOOKPROOFS=$(foreach \
180- rn,I II III IV V VI VII VIII IX X XI XII XIII XIV XV, \
180+ rn,I II III IV V VI VII VIII IX X XI XII XIII XIV XV XVI XVII, \
181181 doc/book$(rn).pdf doc/cover$(rn).pdf doc/spine$(rn).pdf doc/shelf.pdf)
182182 SPINE_PDFS=$(foreach \
183- rn,I II III IV V VI VII VIII IX X XI XII XIII XIV XV, \
183+ rn,I II III IV V VI VII VIII IX X XI XII XIII XIV XV XVI XVII, \
184184 doc/spine$(rn).pdf)
185185 PROOF_ND_PASS=4
186186 else
--- trunk/m4/ax_create_stdint_h.m4 (revision 666)
+++ trunk/m4/ax_create_stdint_h.m4 (revision 667)
@@ -1,5 +1,5 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html
2+# https://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
@@ -12,9 +12,9 @@
1212 # existence of an include file <stdint.h> that defines a set of typedefs,
1313 # especially uint8_t,int32_t,uintptr_t. Many older installations will not
1414 # provide this file, but some will have the very same definitions in
15-# <inttypes.h>. In other enviroments we can use the inet-types in
15+# <inttypes.h>. In other environments we can use the inet-types in
1616 # <sys/types.h> which would define the typedefs int8_t and u_int8_t
17-# respectivly.
17+# respectively.
1818 #
1919 # This macros will create a local "_stdint.h" or the headerfile given as
2020 # an argument. In many cases that file will just "#include <stdint.h>" or
@@ -39,7 +39,7 @@
3939 #
4040 # Remember, if the system already had a valid <stdint.h>, the generated
4141 # file will include it directly. No need for fuzzy HAVE_STDINT_H things...
42-# (oops, GCC 4.2.x has deliberatly disabled its stdint.h for non-c99
42+# (oops, GCC 4.2.x has deliberately disabled its stdint.h for non-c99
4343 # compilation and the c99-mode is not the default. Therefore this macro
4444 # will not use the compiler's stdint.h - please complain to the GCC
4545 # developers).
@@ -59,7 +59,7 @@
5959 # Public License for more details.
6060 #
6161 # You should have received a copy of the GNU General Public License along
62-# with this program. If not, see <http://www.gnu.org/licenses/>.
62+# with this program. If not, see <https://www.gnu.org/licenses/>.
6363 #
6464 # As a special exception, the respective Autoconf Macro's copyright owner
6565 # gives unlimited permission to copy, distribute and modify the configure
@@ -74,7 +74,7 @@
7474 # modified version of the Autoconf Macro, you may extend this special
7575 # exception to the GPL to apply to your modified version as well.
7676
77-#serial 10
77+#serial 19
7878
7979 AC_DEFUN([AX_CHECK_DATA_MODEL],[
8080 AC_CHECK_SIZEOF(char)
@@ -251,7 +251,7 @@
251251 AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
252252 AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>])
253253
254-fi # shortcircut to system "stdint.h"
254+fi # shortcircuit to system "stdint.h"
255255 # ------------------ PREPARE VARIABLES ------------------------------
256256 if test "$GCC" = "yes" ; then
257257 ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
@@ -370,7 +370,7 @@
370370 cat >>$ac_stdint <<STDINT_EOF
371371 /* .................... detections part ............................ */
372372
373-/* whether we need to define bitspecific types from compiler base types */
373+/* whether we need to define bit specific types from compiler base types */
374374 #ifndef _STDINT_HEADER_INTPTR
375375 #ifndef _STDINT_HEADER_UINT32
376376 #ifndef _STDINT_HEADER_U_INT32
@@ -467,7 +467,7 @@
467467 #endif
468468
469469 #ifdef _STDINT_NEED_INT_MODEL_T
470-/* we must guess all the basic types. Apart from byte-adressable system, */
470+/* we must guess all the basic types. Apart from byte-addressable system, */
471471 /* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
472472 /* (btw, those nibble-addressable systems are way off, or so we assume) */
473473
@@ -655,7 +655,7 @@
655655 #endif
656656 #endif
657657
658-/* These limits are merily those of a two complement byte-oriented system */
658+/* These limits are merrily those of a two complement byte-oriented system */
659659
660660 /* Minimum of signed integral types. */
661661 # define INT8_MIN (-128)
--- trunk/m4/ax_count_cpus.m4 (revision 666)
+++ trunk/m4/ax_count_cpus.m4 (revision 667)
@@ -1,21 +1,24 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
2+# https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_COUNT_CPUS
7+# AX_COUNT_CPUS([ACTION-IF-DETECTED],[ACTION-IF-NOT-DETECTED])
88 #
99 # DESCRIPTION
1010 #
11-# Attempt to count the number of processors present on the machine. If the
12-# detection fails, then a value of 1 is assumed.
11+# Attempt to count the number of logical processor cores (including
12+# virtual and HT cores) currently available to use on the machine and
13+# place detected value in CPU_COUNT variable.
1314 #
14-# The value is placed in the CPU_COUNT variable.
15+# On successful detection, ACTION-IF-DETECTED is executed if present. If
16+# the detection fails, then ACTION-IF-NOT-DETECTED is triggered. The
17+# default ACTION-IF-NOT-DETECTED is to set CPU_COUNT to 1.
1518 #
1619 # LICENSE
1720 #
18-# Copyright (c) 2014 Karlson2k (Evgeny Grin) <k2k@narod.ru>
21+# Copyright (c) 2014,2016 Karlson2k (Evgeny Grin) <k2k@narod.ru>
1922 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
2023 # Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net>
2124 # Copyright (c) 2008 Christophe Tournayre <turn3r@users.sourceforge.net>
@@ -25,42 +28,74 @@
2528 # and this notice are preserved. This file is offered as-is, without any
2629 # warranty.
2730
28-#serial 11
31+#serial 22
2932
30- AC_DEFUN([AX_COUNT_CPUS],[
31- AC_REQUIRE([AC_CANONICAL_HOST])
32- AC_REQUIRE([AC_PROG_EGREP])
33+ AC_DEFUN([AX_COUNT_CPUS],[dnl
34+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
35+ AC_REQUIRE([AC_PROG_EGREP])dnl
3336 AC_MSG_CHECKING([the number of available CPUs])
3437 CPU_COUNT="0"
3538
36- AS_CASE([$host_os],[
37- *darwin*],[
38- AS_IF([test -x /usr/sbin/sysctl],[
39- sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu`
40- AS_IF([test sysctl_a],[
41- CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu`
42- ])
43- ])],[
44- *linux*],[
45- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
46- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
47- CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo`
48- ])
49- ])],[
50- *mingw*],[
51- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
52- CPU_COUNT="$NUMBER_OF_PROCESSORS"
53- ])],[
54- *cygwin*],[
55- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
56- CPU_COUNT="$NUMBER_OF_PROCESSORS"
57- ])
58- ])
39+ # Try generic methods
5940
60- AS_IF([test "x$CPU_COUNT" = "x0"],[
61- CPU_COUNT="1"
62- AC_MSG_RESULT( [unable to detect (assuming 1)] )
63- ],[
64- AC_MSG_RESULT( $CPU_COUNT )
65- ])
66- ])
41+ # 'getconf' is POSIX utility, but '_NPROCESSORS_ONLN' and
42+ # 'NPROCESSORS_ONLN' are platform-specific
43+ command -v getconf >/dev/null 2>&1 && \
44+ CPU_COUNT=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null` || CPU_COUNT="0"
45+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v nproc >/dev/null 2>&1]],[[: # empty]],[dnl
46+ # 'nproc' is part of GNU Coreutils and is widely available
47+ CPU_COUNT=`OMP_NUM_THREADS='' nproc 2>/dev/null` || CPU_COUNT=`nproc 2>/dev/null` || CPU_COUNT="0"
48+ ])dnl
49+
50+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
51+ # Try platform-specific preferred methods
52+ AS_CASE([[$host_os]],dnl
53+ [[*linux*]],[[CPU_COUNT=`lscpu -p 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+,' -c` || CPU_COUNT="0"]],dnl
54+ [[*darwin*]],[[CPU_COUNT=`sysctl -n hw.logicalcpu 2>/dev/null` || CPU_COUNT="0"]],dnl
55+ [[freebsd*]],[[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n kern.smp.cpus 2>/dev/null` || CPU_COUNT="0"]],dnl
56+ [[netbsd*]], [[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n hw.ncpuonline 2>/dev/null` || CPU_COUNT="0"]],dnl
57+ [[solaris*]],[[command -v psrinfo >/dev/null 2>&1 && CPU_COUNT=`psrinfo 2>/dev/null | $EGREP -e '^@<:@0-9@:>@.*on-line' -c 2>/dev/null` || CPU_COUNT="0"]],dnl
58+ [[mingw*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
59+ [[msys*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
60+ [[cygwin*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]]dnl
61+ )dnl
62+ ])dnl
63+
64+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v sysctl >/dev/null 2>&1]],[[: # empty]],[dnl
65+ # Try less preferred generic method
66+ # 'hw.ncpu' exist on many platforms, but not on GNU/Linux
67+ CPU_COUNT=`sysctl -n hw.ncpu 2>/dev/null` || CPU_COUNT="0"
68+ ])dnl
69+
70+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
71+ # Try platform-specific fallback methods
72+ # They can be less accurate and slower then preferred methods
73+ AS_CASE([[$host_os]],dnl
74+ [[*linux*]],[[CPU_COUNT=`$EGREP -e '^processor' -c /proc/cpuinfo 2>/dev/null` || CPU_COUNT="0"]],dnl
75+ [[*darwin*]],[[CPU_COUNT=`system_profiler SPHardwareDataType 2>/dev/null | $EGREP -i -e 'number of cores:'|cut -d : -f 2 -s|tr -d ' '` || CPU_COUNT="0"]],dnl
76+ [[freebsd*]],[[CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+: '|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
77+ [[netbsd*]], [[CPU_COUNT=`command -v cpuctl >/dev/null 2>&1 && cpuctl list 2>/dev/null| $EGREP -e '^@<:@0-9@:>@+ .* online ' -c` || \
78+ CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+ at'|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
79+ [[solaris*]],[[command -v kstat >/dev/null 2>&1 && CPU_COUNT=`kstat -m cpu_info -s state -p 2>/dev/null | $EGREP -c -e 'on-line'` || \
80+ CPU_COUNT=`kstat -m cpu_info 2>/dev/null | $EGREP -c -e 'module: cpu_info'` || CPU_COUNT="0"]],dnl
81+ [[mingw*]],[AS_IF([[CPU_COUNT=`reg query 'HKLM\\Hardware\\Description\\System\\CentralProcessor' 2>/dev/null | $EGREP -e '\\\\@<:@0-9@:>@+$' -c`]],dnl
82+ [[: # empty]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]])],dnl
83+ [[msys*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]],dnl
84+ [[cygwin*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]]dnl
85+ )dnl
86+ ])dnl
87+
88+ AS_IF([[test "x$CPU_COUNT" != "x0" && test "$CPU_COUNT" -gt 0 2>/dev/null]],[dnl
89+ AC_MSG_RESULT([[$CPU_COUNT]])
90+ m4_ifvaln([$1],[$1],)dnl
91+ ],[dnl
92+ m4_ifval([$2],[dnl
93+ AS_UNSET([[CPU_COUNT]])
94+ AC_MSG_RESULT([[unable to detect]])
95+ $2
96+ ], [dnl
97+ CPU_COUNT="1"
98+ AC_MSG_RESULT([[unable to detect (assuming 1)]])
99+ ])dnl
100+ ])dnl
101+ ])dnl
--- trunk/m4/ax_check_gnu_make.m4 (revision 666)
+++ trunk/m4/ax_check_gnu_make.m4 (revision 667)
@@ -1,10 +1,10 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
2+# https://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_CHECK_GNU_MAKE()
7+# AX_CHECK_GNU_MAKE([run-if-true],[run-if-false])
88 #
99 # DESCRIPTION
1010 #
@@ -13,6 +13,10 @@
1313 # * The makefile variable `ifGNUmake' is set to the empty string, otherwise
1414 # it is set to "#". This is useful for including a special features in a
1515 # Makefile, which cannot be handled by other versions of make.
16+# * The makefile variable `ifnGNUmake' is set to #, otherwise
17+# it is set to the empty string. This is useful for including a special
18+# features in a Makefile, which can be handled
19+# by other versions of make or to specify else like clause.
1620 # * The variable `_cv_gnu_make_command` is set to the command to invoke
1721 # GNU make if it exists, the empty string otherwise.
1822 # * The variable `ax_cv_gnu_make_command` is set to the command to invoke
@@ -20,6 +24,8 @@
2024 # * If GNU Make is found, its version is extracted from the output of
2125 # `make --version` as the last field of a record of space-separated
2226 # columns and saved into the variable `ax_check_gnu_make_version`.
27+# * Additionally if GNU Make is found, run shell code run-if-true
28+# else run shell code run-if-false.
2329 #
2430 # Here is an example of its use:
2531 #
@@ -31,6 +37,8 @@
3137 #
3238 # @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
3339 # @ifGNUmake@ include $(DEPEND)
40+# @ifGNUmake@ else
41+# fallback code
3442 # @ifGNUmake@ endif
3543 #
3644 # Then configure.in would normally contain:
@@ -61,7 +69,7 @@
6169 # and this notice are preserved. This file is offered as-is, without any
6270 # warranty.
6371
64-#serial 8
72+#serial 11
6573
6674 AC_DEFUN([AX_CHECK_GNU_MAKE],dnl
6775 [AC_PROG_AWK
@@ -79,6 +87,9 @@
7987 done ;])
8088 dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
8189 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifGNUmake], ["#"])], [AS_VAR_SET([ifGNUmake], [""])])
90+ AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifnGNUmake], [""])], [AS_VAR_SET([ifGNUmake], ["#"])])
8291 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_UNSET(ax_cv_gnu_make_command)], [AS_VAR_SET([ax_cv_gnu_make_command], [${_cv_gnu_make_command}])])
92+ AS_VAR_IF([_cv_gnu_make_command], [""],[$2],[$1])
8393 AC_SUBST([ifGNUmake])
94+ AC_SUBST([ifnGNUmake])
8495 ])
--- trunk/ocr/m4/ax_count_cpus.m4 (revision 666)
+++ trunk/ocr/m4/ax_count_cpus.m4 (revision 667)
@@ -1,21 +1,24 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
2+# https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_COUNT_CPUS
7+# AX_COUNT_CPUS([ACTION-IF-DETECTED],[ACTION-IF-NOT-DETECTED])
88 #
99 # DESCRIPTION
1010 #
11-# Attempt to count the number of processors present on the machine. If the
12-# detection fails, then a value of 1 is assumed.
11+# Attempt to count the number of logical processor cores (including
12+# virtual and HT cores) currently available to use on the machine and
13+# place detected value in CPU_COUNT variable.
1314 #
14-# The value is placed in the CPU_COUNT variable.
15+# On successful detection, ACTION-IF-DETECTED is executed if present. If
16+# the detection fails, then ACTION-IF-NOT-DETECTED is triggered. The
17+# default ACTION-IF-NOT-DETECTED is to set CPU_COUNT to 1.
1518 #
1619 # LICENSE
1720 #
18-# Copyright (c) 2014 Karlson2k (Evgeny Grin) <k2k@narod.ru>
21+# Copyright (c) 2014,2016 Karlson2k (Evgeny Grin) <k2k@narod.ru>
1922 # Copyright (c) 2012 Brian Aker <brian@tangent.org>
2023 # Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net>
2124 # Copyright (c) 2008 Christophe Tournayre <turn3r@users.sourceforge.net>
@@ -25,42 +28,74 @@
2528 # and this notice are preserved. This file is offered as-is, without any
2629 # warranty.
2730
28-#serial 11
31+#serial 22
2932
30- AC_DEFUN([AX_COUNT_CPUS],[
31- AC_REQUIRE([AC_CANONICAL_HOST])
32- AC_REQUIRE([AC_PROG_EGREP])
33+ AC_DEFUN([AX_COUNT_CPUS],[dnl
34+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
35+ AC_REQUIRE([AC_PROG_EGREP])dnl
3336 AC_MSG_CHECKING([the number of available CPUs])
3437 CPU_COUNT="0"
3538
36- AS_CASE([$host_os],[
37- *darwin*],[
38- AS_IF([test -x /usr/sbin/sysctl],[
39- sysctl_a=`/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.cpu`
40- AS_IF([test sysctl_a],[
41- CPU_COUNT=`/usr/sbin/sysctl -n hw.ncpu`
42- ])
43- ])],[
44- *linux*],[
45- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
46- AS_IF([test "x$CPU_COUNT" = "x0" -a -e /proc/cpuinfo],[
47- CPU_COUNT=`$EGREP -c '^processor' /proc/cpuinfo`
48- ])
49- ])],[
50- *mingw*],[
51- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
52- CPU_COUNT="$NUMBER_OF_PROCESSORS"
53- ])],[
54- *cygwin*],[
55- AS_IF([test -n "$NUMBER_OF_PROCESSORS"],[
56- CPU_COUNT="$NUMBER_OF_PROCESSORS"
57- ])
58- ])
39+ # Try generic methods
5940
60- AS_IF([test "x$CPU_COUNT" = "x0"],[
61- CPU_COUNT="1"
62- AC_MSG_RESULT( [unable to detect (assuming 1)] )
63- ],[
64- AC_MSG_RESULT( $CPU_COUNT )
65- ])
66- ])
41+ # 'getconf' is POSIX utility, but '_NPROCESSORS_ONLN' and
42+ # 'NPROCESSORS_ONLN' are platform-specific
43+ command -v getconf >/dev/null 2>&1 && \
44+ CPU_COUNT=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null` || CPU_COUNT="0"
45+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v nproc >/dev/null 2>&1]],[[: # empty]],[dnl
46+ # 'nproc' is part of GNU Coreutils and is widely available
47+ CPU_COUNT=`OMP_NUM_THREADS='' nproc 2>/dev/null` || CPU_COUNT=`nproc 2>/dev/null` || CPU_COUNT="0"
48+ ])dnl
49+
50+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
51+ # Try platform-specific preferred methods
52+ AS_CASE([[$host_os]],dnl
53+ [[*linux*]],[[CPU_COUNT=`lscpu -p 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+,' -c` || CPU_COUNT="0"]],dnl
54+ [[*darwin*]],[[CPU_COUNT=`sysctl -n hw.logicalcpu 2>/dev/null` || CPU_COUNT="0"]],dnl
55+ [[freebsd*]],[[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n kern.smp.cpus 2>/dev/null` || CPU_COUNT="0"]],dnl
56+ [[netbsd*]], [[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n hw.ncpuonline 2>/dev/null` || CPU_COUNT="0"]],dnl
57+ [[solaris*]],[[command -v psrinfo >/dev/null 2>&1 && CPU_COUNT=`psrinfo 2>/dev/null | $EGREP -e '^@<:@0-9@:>@.*on-line' -c 2>/dev/null` || CPU_COUNT="0"]],dnl
58+ [[mingw*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
59+ [[msys*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
60+ [[cygwin*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]]dnl
61+ )dnl
62+ ])dnl
63+
64+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v sysctl >/dev/null 2>&1]],[[: # empty]],[dnl
65+ # Try less preferred generic method
66+ # 'hw.ncpu' exist on many platforms, but not on GNU/Linux
67+ CPU_COUNT=`sysctl -n hw.ncpu 2>/dev/null` || CPU_COUNT="0"
68+ ])dnl
69+
70+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
71+ # Try platform-specific fallback methods
72+ # They can be less accurate and slower then preferred methods
73+ AS_CASE([[$host_os]],dnl
74+ [[*linux*]],[[CPU_COUNT=`$EGREP -e '^processor' -c /proc/cpuinfo 2>/dev/null` || CPU_COUNT="0"]],dnl
75+ [[*darwin*]],[[CPU_COUNT=`system_profiler SPHardwareDataType 2>/dev/null | $EGREP -i -e 'number of cores:'|cut -d : -f 2 -s|tr -d ' '` || CPU_COUNT="0"]],dnl
76+ [[freebsd*]],[[CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+: '|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
77+ [[netbsd*]], [[CPU_COUNT=`command -v cpuctl >/dev/null 2>&1 && cpuctl list 2>/dev/null| $EGREP -e '^@<:@0-9@:>@+ .* online ' -c` || \
78+ CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+ at'|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
79+ [[solaris*]],[[command -v kstat >/dev/null 2>&1 && CPU_COUNT=`kstat -m cpu_info -s state -p 2>/dev/null | $EGREP -c -e 'on-line'` || \
80+ CPU_COUNT=`kstat -m cpu_info 2>/dev/null | $EGREP -c -e 'module: cpu_info'` || CPU_COUNT="0"]],dnl
81+ [[mingw*]],[AS_IF([[CPU_COUNT=`reg query 'HKLM\\Hardware\\Description\\System\\CentralProcessor' 2>/dev/null | $EGREP -e '\\\\@<:@0-9@:>@+$' -c`]],dnl
82+ [[: # empty]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]])],dnl
83+ [[msys*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]],dnl
84+ [[cygwin*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]]dnl
85+ )dnl
86+ ])dnl
87+
88+ AS_IF([[test "x$CPU_COUNT" != "x0" && test "$CPU_COUNT" -gt 0 2>/dev/null]],[dnl
89+ AC_MSG_RESULT([[$CPU_COUNT]])
90+ m4_ifvaln([$1],[$1],)dnl
91+ ],[dnl
92+ m4_ifval([$2],[dnl
93+ AS_UNSET([[CPU_COUNT]])
94+ AC_MSG_RESULT([[unable to detect]])
95+ $2
96+ ], [dnl
97+ CPU_COUNT="1"
98+ AC_MSG_RESULT([[unable to detect (assuming 1)]])
99+ ])dnl
100+ ])dnl
101+ ])dnl
--- trunk/ocr/m4/ax_check_gnu_make.m4 (revision 666)
+++ trunk/ocr/m4/ax_check_gnu_make.m4 (revision 667)
@@ -1,10 +1,10 @@
11 # ===========================================================================
2-# http://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
2+# https://www.gnu.org/software/autoconf-archive/ax_check_gnu_make.html
33 # ===========================================================================
44 #
55 # SYNOPSIS
66 #
7-# AX_CHECK_GNU_MAKE()
7+# AX_CHECK_GNU_MAKE([run-if-true],[run-if-false])
88 #
99 # DESCRIPTION
1010 #
@@ -13,6 +13,10 @@
1313 # * The makefile variable `ifGNUmake' is set to the empty string, otherwise
1414 # it is set to "#". This is useful for including a special features in a
1515 # Makefile, which cannot be handled by other versions of make.
16+# * The makefile variable `ifnGNUmake' is set to #, otherwise
17+# it is set to the empty string. This is useful for including a special
18+# features in a Makefile, which can be handled
19+# by other versions of make or to specify else like clause.
1620 # * The variable `_cv_gnu_make_command` is set to the command to invoke
1721 # GNU make if it exists, the empty string otherwise.
1822 # * The variable `ax_cv_gnu_make_command` is set to the command to invoke
@@ -20,6 +24,8 @@
2024 # * If GNU Make is found, its version is extracted from the output of
2125 # `make --version` as the last field of a record of space-separated
2226 # columns and saved into the variable `ax_check_gnu_make_version`.
27+# * Additionally if GNU Make is found, run shell code run-if-true
28+# else run shell code run-if-false.
2329 #
2430 # Here is an example of its use:
2531 #
@@ -31,6 +37,8 @@
3137 #
3238 # @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
3339 # @ifGNUmake@ include $(DEPEND)
40+# @ifGNUmake@ else
41+# fallback code
3442 # @ifGNUmake@ endif
3543 #
3644 # Then configure.in would normally contain:
@@ -61,7 +69,7 @@
6169 # and this notice are preserved. This file is offered as-is, without any
6270 # warranty.
6371
64-#serial 8
72+#serial 11
6573
6674 AC_DEFUN([AX_CHECK_GNU_MAKE],dnl
6775 [AC_PROG_AWK
@@ -79,6 +87,9 @@
7987 done ;])
8088 dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, '#' otherwise
8189 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifGNUmake], ["#"])], [AS_VAR_SET([ifGNUmake], [""])])
90+ AS_VAR_IF([_cv_gnu_make_command], [""], [AS_VAR_SET([ifnGNUmake], [""])], [AS_VAR_SET([ifGNUmake], ["#"])])
8291 AS_VAR_IF([_cv_gnu_make_command], [""], [AS_UNSET(ax_cv_gnu_make_command)], [AS_VAR_SET([ax_cv_gnu_make_command], [${_cv_gnu_make_command}])])
92+ AS_VAR_IF([_cv_gnu_make_command], [""],[$2],[$1])
8393 AC_SUBST([ifGNUmake])
94+ AC_SUBST([ifnGNUmake])
8495 ])
旧リポジトリブラウザで表示