3 # Copyright (C) 2024 Mikulas Patocka
5 # This file is part of Ajla.
7 # Ajla is free software: you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation, either version 3 of the License, or (at your option) any later
12 # Ajla is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along with
17 # Ajla. If not, see <https://www.gnu.org/licenses/>.
21 #cp /usr/share/automake-1.1*/COPYING /usr/share/automake-1.1*/INSTALL /usr/share/automake-1.1*/depcomp /usr/share/automake-1.1*/install-sh /usr/share/automake-1.1*/missing .
26 * A table of numbers, generated by a script, is supposedly not copyrightable.
30 sed -n 's/AC_INIT(ajla, \(.*\))/\#define AJLA_VERSION "\1"/p' <configure.ac
>>version.h
32 FILES_INSTALL
="`echo builtin.pcd terminfo stdlib/*.ajla stdlib/*/*.ajla stdlib/*/*/*.ajla charsets/*.c8`"
33 FILES_DIST
="`echo newlib/*.ajla newlib/*/*.ajla newlib/*/*/*.ajla scripts/*.* scripts/*/*.* programs/test/*.ajla programs/acmd/*.ajla texts/tutorial.html texts/*.dia texts/*.svg`"
34 cat Makefile.t |
sed "s=FILES_INSTALL=$FILES_INSTALL=g" |
sed "s=FILES_DIST=$FILES_DIST=g" >Makefile.am
41 if [ -z "${CFLAGS+set}" ]; then
42 CFLAGS
="-O2 -g -Wall -Wextra -Wmissing-prototypes -Wno-strict-aliasing -fdiagnostics-color=always"
43 # "-fdiagnostics-color=always"
44 # CFLAGS="$CFLAGS -std=c89"
48 if [ "`uname -s`" = NetBSD
]; then
49 CFLAGS
="$CFLAGS -I/usr/pkg/include -L/usr/pkg/lib"
54 .
/configure
"$ARGS" "$@"
55 if which gmake
>/dev
/null
2>/dev
/null
; then
60 if [ -z "$MAKEFLAGS" ]; then
61 N
=`ls -1d /sys/devices/system/cpu/cpu[0-9]* 2>/dev/null|wc -l|sed 's/ //g'`
62 if test "$N" = 0 -o "$N" = ""; then
63 N
="`grep -c ^processor /proc/cpuinfo 2>/dev/null || true`"
65 if test "$N" = 0 -o "$N" = ""; then
66 N
="`sysctl hw.activecpu 2>/dev/null|sed 's/[^0-9]*//'`"
68 if test "$N" = 0 -o "$N" = ""; then
69 N
="`sysctl hw.ncpu 2>/dev/null|sed 's/[^0-9]*//'`"
71 if test "$N" = 0 -o "$N" = ""; then
72 N
="`sysinfo 2>/dev/null|grep ^CPU|wc -l|sed 's/[^0-9]*//'`"
74 if test "$N" = 0 -o "$N" = ""; then
75 if test "`uname -s`" = HP-UX
; then
79 if test "$N" = 0 -o "$N" = ""; then
82 if test "$N" != 1; then