Compare commits

...

2 Commits

Author SHA1 Message Date
04e068daab updated build files to produce hakgo under bin
All checks were successful
continuous-integration/drone Build is passing
2025-11-01 19:39:14 +09:00
75687acaef moved main.go to bin and updated build files accordingly 2025-11-01 17:04:52 +09:00
30 changed files with 2825 additions and 4112 deletions

View File

@@ -16,61 +16,7 @@ DIST_SUBDIRS = $(SUBDIRS) pas
distclean-local:
@rm -rf $(top_srcdir)/autom4te.cache
clean-local:
rm -rf $(builddir)/go.mod $(builddir)/go.sum
go clean -C $(srcdir) -x -modfile $(abs_builddir)/go.mod -cache
if ENABLE_HAKGO
## the attempt to compose a proper procedure using a regular compiler failed.
## e.g ./configure GOC=opt/go/pkg/tool/linux_amd64/
## while go.m4 is included in autoconf 2.71, the support for the go language
## is very limited and the go language itself is pursuing the module based builder.
##
## the following is to trick autoconf/automake as if it's building go files with
## a real compiler whereas the actual building is done thru `go build`
bin_PROGRAMS = hakgo
hakgo_SOURCES = \
go/hak.go \
go/cb.go \
go/inst.go \
main.go \
go.mod
hakgo_DEPENDENCIES = hakgo.bin
## let the linker to move hakgo.bin to the actual target
hakgo_LINK = cp -pf hakgo.bin hakgo$(EXEEXT) || echo "FAILED TO LINK"
if ENABLE_STATIC
CGO_CFLAGS_EXTRA="-static"
CGO_LDFLAGS_EXTRA="-static"
else
CGO_CFLAGS_EXTRA=""
CGO_LDFLAGS_EXTRA=""
endif
hakgo.bin: lib/libhak.la $(hakgo_OBJECTS)
cp -pf $(srcdir)/go.mod $(builddir)/go.mod >/dev/null 2>&1 || true
chmod u+w $(builddir)/go.mod ## with `make distcheck`, the echo's redirection to the file fails without this permission change
[ -f $(srcdir)/go.sum ] && cp -pf $(srcdir)/go.sum $(builddir)/go.sum >/dev/null 2>&1 || true
## ---------------------------------------------------------------
CC=$(CC) \
CGO_CFLAGS="-I$(abs_srcdir)/lib -I$(abs_builddir)/lib $(CFLAGS) $(CGO_CFLAGS_EXTRA)" \
CGO_LDFLAGS="-L$(abs_builddir)/lib -L$(abs_builddir)/lib/.libs -lhak -ldl $(LIBM) $(CGO_LDFLAGS_EXTRA)" \
go build -C $(srcdir) -ldflags "-X 'main.BINDIR=$(bindir)' -X 'main.SBINDIR=$(sbindir)' -X 'main.LIBDIR=$(libdir)' -X 'main.SYSCONFDIR=$(sysconfdir)'" -x -o $(abs_builddir)/hakgo.bin -modfile $(abs_builddir)/go.mod
## ---------------------------------------------------------------
go clean -C $(srcdir) -x -modfile $(abs_builddir)/go.mod
## the go to o recipe is fake to deceive make
.go.o:
echo $< > $@
.mod.o:
echo $< > $@
endif

View File

@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.17 from Makefile.am.
# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2024 Free Software Foundation, Inc.
# Copyright (C) 1994-2025 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -13,7 +13,6 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
@@ -92,7 +91,6 @@ build_triplet = @build@
host_triplet = @host@
@ENABLE_STATIC_MODULE_TRUE@am__append_1 = mod lib bin t
@ENABLE_STATIC_MODULE_FALSE@am__append_2 = lib mod bin t
@ENABLE_HAKGO_TRUE@bin_PROGRAMS = hakgo$(EXEEXT)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \
@@ -110,15 +108,6 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/lib/hak-cfg.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am__hakgo_SOURCES_DIST = go/hak.go go/cb.go go/inst.go main.go go.mod
am__dirstamp = $(am__leading_dot)dirstamp
@ENABLE_HAKGO_TRUE@am_hakgo_OBJECTS = go/hak.$(OBJEXT) go/cb.$(OBJEXT) \
@ENABLE_HAKGO_TRUE@ go/inst.$(OBJEXT) main.$(OBJEXT) \
@ENABLE_HAKGO_TRUE@ go.$(OBJEXT)
hakgo_OBJECTS = $(am_hakgo_OBJECTS)
hakgo_LDADD = $(LDADD)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -131,9 +120,8 @@ AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/lib
SOURCES = $(hakgo_SOURCES)
DIST_SOURCES = $(am__hakgo_SOURCES_DIST)
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
ctags-recursive dvi-recursive html-recursive info-recursive \
install-data-recursive install-dvi-recursive \
@@ -370,23 +358,9 @@ ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = t t/test-bi.hak
SUBDIRS = $(am__append_1) $(am__append_2)
DIST_SUBDIRS = $(SUBDIRS) pas
@ENABLE_HAKGO_TRUE@hakgo_SOURCES = \
@ENABLE_HAKGO_TRUE@ go/hak.go \
@ENABLE_HAKGO_TRUE@ go/cb.go \
@ENABLE_HAKGO_TRUE@ go/inst.go \
@ENABLE_HAKGO_TRUE@ main.go \
@ENABLE_HAKGO_TRUE@ go.mod
@ENABLE_HAKGO_TRUE@hakgo_DEPENDENCIES = hakgo.bin
@ENABLE_HAKGO_TRUE@hakgo_LINK = cp -pf hakgo.bin hakgo$(EXEEXT) || echo "FAILED TO LINK"
@ENABLE_HAKGO_TRUE@@ENABLE_STATIC_FALSE@CGO_CFLAGS_EXTRA = ""
@ENABLE_HAKGO_TRUE@@ENABLE_STATIC_TRUE@CGO_CFLAGS_EXTRA = "-static"
@ENABLE_HAKGO_TRUE@@ENABLE_STATIC_FALSE@CGO_LDFLAGS_EXTRA = ""
@ENABLE_HAKGO_TRUE@@ENABLE_STATIC_TRUE@CGO_LDFLAGS_EXTRA = "-static"
all: all-recursive
.SUFFIXES:
.SUFFIXES: .go .mod .o
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@@ -420,70 +394,6 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p \
|| test -f $$p1 \
; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' \
-e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' \
`; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && $(am__rm_f) $$files
clean-binPROGRAMS:
$(am__rm_f) $(bin_PROGRAMS)
test -z "$(EXEEXT)" || $(am__rm_f) $(bin_PROGRAMS:$(EXEEXT)=)
go/$(am__dirstamp):
@$(MKDIR_P) go
@: >>go/$(am__dirstamp)
go/$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) go/$(DEPDIR)
@: >>go/$(DEPDIR)/$(am__dirstamp)
go/hak.$(OBJEXT): go/$(am__dirstamp) go/$(DEPDIR)/$(am__dirstamp)
go/cb.$(OBJEXT): go/$(am__dirstamp) go/$(DEPDIR)/$(am__dirstamp)
go/inst.$(OBJEXT): go/$(am__dirstamp) go/$(DEPDIR)/$(am__dirstamp)
hakgo$(EXEEXT): $(hakgo_OBJECTS) $(hakgo_DEPENDENCIES) $(EXTRA_hakgo_DEPENDENCIES)
@rm -f hakgo$(EXEEXT)
$(AM_V_GEN)$(hakgo_LINK) $(hakgo_OBJECTS) $(hakgo_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
-rm -f go/*.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
mostlyclean-libtool:
-rm -f *.lo
@@ -599,6 +509,7 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
@@ -674,6 +585,10 @@ dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
dist-bzip3: distdir
tardir=$(distdir) && $(am__tar) | bzip3 -c >$(distdir).tar.bz3
$(am__post_remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
@@ -718,6 +633,8 @@ distcheck: dist
eval GZIP= gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.bz3*) \
bzip3 -dc $(distdir).tar.bz3 | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
@@ -798,12 +715,9 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile $(PROGRAMS)
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
@@ -830,22 +744,19 @@ clean-generic:
distclean-generic:
-$(am__rm_f) $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
-$(am__rm_f) go/$(DEPDIR)/$(am__dirstamp)
-$(am__rm_f) go/$(am__dirstamp)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-binPROGRAMS clean-generic clean-libtool clean-local \
mostlyclean-am
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-libtool distclean-local distclean-tags
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-local distclean-tags
dvi: dvi-recursive
@@ -865,7 +776,7 @@ install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am: install-binPROGRAMS
install-exec-am:
install-html: install-html-recursive
@@ -895,8 +806,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
@@ -906,28 +816,26 @@ ps: ps-recursive
ps-am:
uninstall-am: uninstall-binPROGRAMS
uninstall-am:
.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-binPROGRAMS \
clean-cscope clean-generic clean-libtool clean-local cscope \
cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
dist-zstd distcheck distclean distclean-compile \
distclean-generic distclean-libtool distclean-local \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool clean-local cscope cscopelist-am ctags ctags-am \
dist dist-all dist-bzip2 dist-bzip3 dist-gzip dist-lzip \
dist-shar dist-tarZ dist-xz dist-zip dist-zstd distcheck \
distclean distclean-generic distclean-libtool distclean-local \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-binPROGRAMS install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-binPROGRAMS
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am
.PRECIOUS: Makefile
@@ -939,22 +847,6 @@ clean-local:
rm -rf $(builddir)/go.mod $(builddir)/go.sum
go clean -C $(srcdir) -x -modfile $(abs_builddir)/go.mod -cache
@ENABLE_HAKGO_TRUE@hakgo.bin: lib/libhak.la $(hakgo_OBJECTS)
@ENABLE_HAKGO_TRUE@ cp -pf $(srcdir)/go.mod $(builddir)/go.mod >/dev/null 2>&1 || true
@ENABLE_HAKGO_TRUE@ chmod u+w $(builddir)/go.mod ## with `make distcheck`, the echo's redirection to the file fails without this permission change
@ENABLE_HAKGO_TRUE@ [ -f $(srcdir)/go.sum ] && cp -pf $(srcdir)/go.sum $(builddir)/go.sum >/dev/null 2>&1 || true
@ENABLE_HAKGO_TRUE@ CC=$(CC) \
@ENABLE_HAKGO_TRUE@ CGO_CFLAGS="-I$(abs_srcdir)/lib -I$(abs_builddir)/lib $(CFLAGS) $(CGO_CFLAGS_EXTRA)" \
@ENABLE_HAKGO_TRUE@ CGO_LDFLAGS="-L$(abs_builddir)/lib -L$(abs_builddir)/lib/.libs -lhak -ldl $(LIBM) $(CGO_LDFLAGS_EXTRA)" \
@ENABLE_HAKGO_TRUE@ go build -C $(srcdir) -ldflags "-X 'main.BINDIR=$(bindir)' -X 'main.SBINDIR=$(sbindir)' -X 'main.LIBDIR=$(libdir)' -X 'main.SYSCONFDIR=$(sysconfdir)'" -x -o $(abs_builddir)/hakgo.bin -modfile $(abs_builddir)/go.mod
@ENABLE_HAKGO_TRUE@ go clean -C $(srcdir) -x -modfile $(abs_builddir)/go.mod
@ENABLE_HAKGO_TRUE@.go.o:
@ENABLE_HAKGO_TRUE@ echo $< > $@
@ENABLE_HAKGO_TRUE@.mod.o:
@ENABLE_HAKGO_TRUE@ echo $< > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -2,9 +2,9 @@
# Wrapper for Microsoft lib.exe
me=ar-lib
scriptversion=2024-06-19.01; # UTC
scriptversion=2025-02-03.05; # UTC
# Copyright (C) 2010-2024 Free Software Foundation, Inc.
# Copyright (C) 2010-2025 Free Software Foundation, Inc.
# Written by Peter Rosin <peda@lysator.liu.se>.
#
# This program is free software; you can redistribute it and/or modify
@@ -51,9 +51,20 @@ func_file_conv ()
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then
# MSYS2 environment.
file_conv=cygwin
else
# Original MinGW environment.
file_conv=mingw
fi
;;
CYGWIN* | MSYS*)
MSYS*)
# Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell.
file_conv=cygwin
;;
CYGWIN*)
# Cygwin environment.
file_conv=cygwin
;;
*)
@@ -65,8 +76,8 @@ func_file_conv ()
mingw)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin | msys)
file=`cygpath -m "$file" || echo "$file"`
cygwin)
file=`cygpath -w "$file" || echo "$file"`
;;
wine)
file=`winepath -w "$file" || echo "$file"`

View File

@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2024-06-19.01; # UTC
scriptversion=2025-06-18.21; # UTC
# Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -37,11 +37,11 @@ IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# func_file_conv build_file unneeded_conversions
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
# type is listed in (the comma separated) UNNEEDED_CONVERSIONS, no
# conversion will take place.
func_file_conv ()
{
file=$1
@@ -51,9 +51,20 @@ func_file_conv ()
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
if test -n "$MSYSTEM" && (cygpath --version) >/dev/null 2>&1; then
# MSYS2 environment.
file_conv=cygwin
else
# Original MinGW environment.
file_conv=mingw
fi
;;
CYGWIN* | MSYS*)
MSYS*)
# Old MSYS environment, or MSYS2 with 32-bit MSYS2 shell.
file_conv=cygwin
;;
CYGWIN*)
# Cygwin environment.
file_conv=cygwin
;;
*)
@@ -63,12 +74,14 @@ func_file_conv ()
fi
case $file_conv/,$2, in
*,$file_conv,*)
# This is the optimization mentioned above:
# If UNNEEDED_CONVERSIONS contains $file_conv, don't convert.
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"`
cygwin/*)
file=`cygpath -w "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
@@ -343,9 +356,9 @@ exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-format: "%Y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

191
ac/config.guess vendored
View File

@@ -1,4 +1,4 @@
#!/usr/bin/sh
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2024 Free Software Foundation, Inc.
@@ -194,6 +194,17 @@ Linux|GNU|GNU/*)
;;
esac
case "${UNAME_MACHINE}" in
i?86)
test -z "$VENDOR" && VENDOR=pc
;;
*)
test -z "$VENDOR" && VENDOR=unknown
;;
esac
test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse
test -f /etc/os-release && grep -q suse /etc/os-release && VENDOR=suse
# Note: order is significant - the case branches are not exclusive.
case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
@@ -275,46 +286,46 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
GUESS=$UNAME_MACHINE_ARCH-${VENDOR}-bitrig$UNAME_RELEASE
;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
GUESS=$UNAME_MACHINE_ARCH-${VENDOR}-openbsd$UNAME_RELEASE
;;
*:SecBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
GUESS=$UNAME_MACHINE_ARCH-${VENDOR}-secbsd$UNAME_RELEASE
;;
*:LibertyBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
GUESS=$UNAME_MACHINE_ARCH-${VENDOR}-libertybsd$UNAME_RELEASE
;;
*:MidnightBSD:*:*)
GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
GUESS=$UNAME_MACHINE-${VENDOR}-midnightbsd$UNAME_RELEASE
;;
*:ekkoBSD:*:*)
GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
GUESS=$UNAME_MACHINE-${VENDOR}-ekkobsd$UNAME_RELEASE
;;
*:SolidBSD:*:*)
GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
GUESS=$UNAME_MACHINE-${VENDOR}-solidbsd$UNAME_RELEASE
;;
*:OS108:*:*)
GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
GUESS=$UNAME_MACHINE-${VENDOR}-os108_$UNAME_RELEASE
;;
macppc:MirBSD:*:*)
GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
GUESS=powerpc-${VENDOR}-mirbsd$UNAME_RELEASE
;;
*:MirBSD:*:*)
GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
GUESS=$UNAME_MACHINE-${VENDOR}-mirbsd$UNAME_RELEASE
;;
*:Sortix:*:*)
GUESS=$UNAME_MACHINE-unknown-sortix
GUESS=$UNAME_MACHINE-${VENDOR}-sortix
;;
*:Twizzler:*:*)
GUESS=$UNAME_MACHINE-unknown-twizzler
GUESS=$UNAME_MACHINE-${VENDOR}-twizzler
;;
*:Redox:*:*)
GUESS=$UNAME_MACHINE-unknown-redox
GUESS=$UNAME_MACHINE-${VENDOR}-redox
;;
mips:OSF1:*.*)
GUESS=mips-dec-osf1
@@ -376,13 +387,13 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
;;
Amiga*:UNIX_System_V:4.0:*)
GUESS=m68k-unknown-sysv4
GUESS=m68k-${VENDOR}-sysv4
;;
*:[Aa]miga[Oo][Ss]:*:*)
GUESS=$UNAME_MACHINE-unknown-amigaos
GUESS=$UNAME_MACHINE-${VENDOR}-amigaos
;;
*:[Mm]orph[Oo][Ss]:*:*)
GUESS=$UNAME_MACHINE-unknown-morphos
GUESS=$UNAME_MACHINE-${VENDOR}-morphos
;;
*:OS/390:*:*)
GUESS=i370-ibm-openedition
@@ -397,7 +408,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
GUESS=arm-acorn-riscix$UNAME_RELEASE
;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
GUESS=arm-unknown-riscos
GUESS=arm-${VENDOR}-riscos
;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
GUESS=hppa1.1-hitachi-hiuxmpp
@@ -511,7 +522,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
GUESS=m68k-hades-mint$UNAME_RELEASE
;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
GUESS=m68k-unknown-mint$UNAME_RELEASE
GUESS=m68k-${VENDOR}-mint$UNAME_RELEASE
;;
m68k:machten:*:*)
GUESS=m68k-apple-machten$UNAME_RELEASE
@@ -826,9 +837,9 @@ EOF
;;
i*86:OSF1:*:*)
if test -x /usr/sbin/sysversion ; then
GUESS=$UNAME_MACHINE-unknown-osf1mk
GUESS=$UNAME_MACHINE-${VENDOR}-osf1mk
else
GUESS=$UNAME_MACHINE-unknown-osf1
GUESS=$UNAME_MACHINE-${VENDOR}-osf1
fi
;;
parisc*:Lites*:*:*)
@@ -893,10 +904,10 @@ EOF
GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
;;
sparc*:BSD/OS:*:*)
GUESS=sparc-unknown-bsdi$UNAME_RELEASE
GUESS=sparc-${VENDOR}-bsdi$UNAME_RELEASE
;;
*:BSD/OS:*:*)
GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
GUESS=$UNAME_MACHINE-${VENDOR}-bsdi$UNAME_RELEASE
;;
arm:FreeBSD:*:*)
UNAME_PROCESSOR=`uname -p`
@@ -905,10 +916,10 @@ EOF
| grep -q __ARM_PCS_VFP
then
FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
GUESS=$UNAME_PROCESSOR-${VENDOR}-freebsd$FREEBSD_REL-gnueabi
else
FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
GUESS=$UNAME_PROCESSOR-${VENDOR}-freebsd$FREEBSD_REL-gnueabihf
fi
;;
*:FreeBSD:*:*)
@@ -920,7 +931,7 @@ EOF
UNAME_PROCESSOR=i586 ;;
esac
FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
GUESS=$UNAME_PROCESSOR-${VENDOR}-freebsd$FREEBSD_REL
;;
i*:CYGWIN*:*)
GUESS=$UNAME_MACHINE-pc-cygwin
@@ -946,10 +957,10 @@ EOF
GUESS=i586-pc-interix$UNAME_RELEASE
;;
authenticamd | genuineintel | EM64T)
GUESS=x86_64-unknown-interix$UNAME_RELEASE
GUESS=x86_64-${VENDOR}-interix$UNAME_RELEASE
;;
IA64)
GUESS=ia64-unknown-interix$UNAME_RELEASE
GUESS=ia64-${VENDOR}-interix$UNAME_RELEASE
;;
esac ;;
i*:UWIN*:*)
@@ -960,7 +971,7 @@ EOF
;;
prep*:SunOS:5.*:*)
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
GUESS=powerpcle-unknown-solaris2$SUN_REL
GUESS=powerpcle-${VENDOR}-solaris2$SUN_REL
;;
*:GNU:*:*)
# the GNU system
@@ -978,10 +989,10 @@ EOF
GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
;;
*:[Mm]anagarm:*:*)
GUESS="$UNAME_MACHINE-unknown-managarm-mlibc"
GUESS="$UNAME_MACHINE-${VENDOR}-managarm-mlibc"
;;
*:Minix:*:*)
GUESS=$UNAME_MACHINE-unknown-minix
GUESS=$UNAME_MACHINE-${VENDOR}-minix
;;
aarch64:Linux:*:*)
set_cc_for_build
@@ -1004,11 +1015,11 @@ EOF
eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
esac
fi
GUESS=$CPU-unknown-linux-$LIBCABI
GUESS=$CPU-${VENDOR}-linux-$LIBCABI
;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
@@ -1022,29 +1033,29 @@ EOF
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
arm*:Linux:*:*)
set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
GUESS=$UNAME_MACHINE-${VENDOR}-linux-${LIBC}eabi
else
GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
GUESS=$UNAME_MACHINE-${VENDOR}-linux-${LIBC}eabihf
fi
fi
;;
avr32*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
cris:Linux:*:*)
GUESS=$UNAME_MACHINE-axis-linux-$LIBC
@@ -1053,40 +1064,40 @@ EOF
GUESS=$UNAME_MACHINE-axis-linux-$LIBC
;;
e2k:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
frv:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
hexagon:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
i*86:Linux:*:*)
GUESS=$UNAME_MACHINE-pc-linux-$LIBC
;;
ia64:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
k1om:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
kvx:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
kvx:cos:*:*)
GUESS=$UNAME_MACHINE-unknown-cos
GUESS=$UNAME_MACHINE-${VENDOR}-cos
;;
kvx:mbr:*:*)
GUESS=$UNAME_MACHINE-unknown-mbr
GUESS=$UNAME_MACHINE-${VENDOR}-mbr
;;
loongarch32:Linux:*:* | loongarch64:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
m32r*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
m68*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
mips:Linux:*:* | mips64:Linux:*:*)
set_cc_for_build
@@ -1137,57 +1148,57 @@ EOF
test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
;;
mips64el:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
openrisc*:Linux:*:*)
GUESS=or1k-unknown-linux-$LIBC
GUESS=or1k-${VENDOR}-linux-$LIBC
;;
or32:Linux:*:* | or1k*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
padre:Linux:*:*)
GUESS=sparc-unknown-linux-$LIBC
GUESS=sparc-${VENDOR}-linux-$LIBC
;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
GUESS=hppa64-unknown-linux-$LIBC
GUESS=hppa64-${VENDOR}-linux-$LIBC
;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
*) GUESS=hppa-unknown-linux-$LIBC ;;
PA7*) GUESS=hppa1.1-${VENDOR}-linux-$LIBC ;;
PA8*) GUESS=hppa2.0-${VENDOR}-linux-$LIBC ;;
*) GUESS=hppa-${VENDOR}-linux-$LIBC ;;
esac
;;
ppc64:Linux:*:*)
GUESS=powerpc64-unknown-linux-$LIBC
GUESS=powerpc64-${VENDOR}-linux-$LIBC
;;
ppc:Linux:*:*)
GUESS=powerpc-unknown-linux-$LIBC
GUESS=powerpc-${VENDOR}-linux-$LIBC
;;
ppc64le:Linux:*:*)
GUESS=powerpc64le-unknown-linux-$LIBC
GUESS=powerpc64le-${VENDOR}-linux-$LIBC
;;
ppcle:Linux:*:*)
GUESS=powerpcle-unknown-linux-$LIBC
GUESS=powerpcle-${VENDOR}-linux-$LIBC
;;
riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
s390:Linux:*:* | s390x:Linux:*:*)
GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
;;
sh64*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
sh*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
sparc:Linux:*:* | sparc64:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
tile*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
vax:Linux:*:*)
GUESS=$UNAME_MACHINE-dec-linux-$LIBC
@@ -1217,7 +1228,7 @@ EOF
GUESS=$CPU-pc-linux-$LIBCABI
;;
xtensa*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1239,16 +1250,16 @@ EOF
GUESS=$UNAME_MACHINE-pc-os2-emx
;;
i*86:XTS-300:*:STOP)
GUESS=$UNAME_MACHINE-unknown-stop
GUESS=$UNAME_MACHINE-${VENDOR}-stop
;;
i*86:atheos:*:*)
GUESS=$UNAME_MACHINE-unknown-atheos
GUESS=$UNAME_MACHINE-${VENDOR}-atheos
;;
i*86:syllable:*:*)
GUESS=$UNAME_MACHINE-pc-syllable
;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
GUESS=i386-unknown-lynxos$UNAME_RELEASE
GUESS=i386-${VENDOR}-lynxos$UNAME_RELEASE
;;
i*86:*DOS:*:*)
GUESS=$UNAME_MACHINE-pc-msdosdjgpp
@@ -1268,7 +1279,7 @@ EOF
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
GUESS=$UNAME_MACHINE-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
@@ -1307,7 +1318,7 @@ EOF
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4
GUESS=i860-${VENDOR}-sysv$UNAME_RELEASE # Unknown i860-SVR4
fi
;;
mini*:CTIX:SYS*5:*)
@@ -1344,19 +1355,19 @@ EOF
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
GUESS=m68k-unknown-lynxos$UNAME_RELEASE
GUESS=m68k-${VENDOR}-lynxos$UNAME_RELEASE
;;
mc68030:UNIX_System_V:4.*:*)
GUESS=m68k-atari-sysv4
;;
TSUNAMI:LynxOS:2.*:*)
GUESS=sparc-unknown-lynxos$UNAME_RELEASE
GUESS=sparc-${VENDOR}-lynxos$UNAME_RELEASE
;;
rs6000:LynxOS:2.*:*)
GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
GUESS=rs6000-${VENDOR}-lynxos$UNAME_RELEASE
;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
GUESS=powerpc-${VENDOR}-lynxos$UNAME_RELEASE
;;
SM[BE]S:UNIX_SV:*:*)
GUESS=mips-dde-sysv$UNAME_RELEASE
@@ -1406,7 +1417,7 @@ EOF
if test -d /usr/nec; then
GUESS=mips-nec-sysv$UNAME_RELEASE
else
GUESS=mips-unknown-sysv$UNAME_RELEASE
GUESS=mips-${VENDOR}-sysv$UNAME_RELEASE
fi
;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
@@ -1425,7 +1436,7 @@ EOF
GUESS=powerpc-apple-haiku
;;
*:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
GUESS=$UNAME_MACHINE-unknown-haiku
GUESS=$UNAME_MACHINE-${VENDOR}-haiku
;;
SX-4:SUPER-UX:*:*)
GUESS=sx4-nec-superux$UNAME_RELEASE
@@ -1538,13 +1549,13 @@ EOF
elif test "x${cputype-}" != x; then
UNAME_MACHINE=$cputype
fi
GUESS=$UNAME_MACHINE-unknown-plan9
GUESS=$UNAME_MACHINE-${VENDOR}-plan9
;;
*:TOPS-10:*:*)
GUESS=pdp10-unknown-tops10
GUESS=pdp10-${VENDOR}-tops10
;;
*:TENEX:*:*)
GUESS=pdp10-unknown-tenex
GUESS=pdp10-${VENDOR}-tenex
;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
GUESS=pdp10-dec-tops20
@@ -1553,17 +1564,17 @@ EOF
GUESS=pdp10-xkl-tops20
;;
*:TOPS-20:*:*)
GUESS=pdp10-unknown-tops20
GUESS=pdp10-${VENDOR}-tops20
;;
*:ITS:*:*)
GUESS=pdp10-unknown-its
GUESS=pdp10-${VENDOR}-its
;;
SEI:*:*:SEIUX)
GUESS=mips-sei-seiux$UNAME_RELEASE
;;
*:DragonFly:*:*)
DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
GUESS=$UNAME_MACHINE-${VENDOR}-dragonfly$DRAGONFLY_REL
;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1586,19 +1597,19 @@ EOF
GUESS=$UNAME_MACHINE-pc-fiwix
;;
*:AROS:*:*)
GUESS=$UNAME_MACHINE-unknown-aros
GUESS=$UNAME_MACHINE-${VENDOR}-aros
;;
x86_64:VMkernel:*:*)
GUESS=$UNAME_MACHINE-unknown-esx
GUESS=$UNAME_MACHINE-${VENDOR}-esx
;;
amd64:Isilon\ OneFS:*:*)
GUESS=x86_64-unknown-onefs
GUESS=x86_64-${VENDOR}-onefs
;;
*:Unleashed:*:*)
GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
GUESS=$UNAME_MACHINE-${VENDOR}-unleashed$UNAME_RELEASE
;;
*:Ironclad:*:*)
GUESS=$UNAME_MACHINE-unknown-ironclad
GUESS=$UNAME_MACHINE-${VENDOR}-ironclad
;;
esac

2
ac/config.sub vendored
View File

@@ -1,4 +1,4 @@
#!/usr/bin/sh
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2024 Free Software Foundation, Inc.

View File

@@ -1,9 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2024-06-19.01; # UTC
scriptversion=2025-06-18.21; # UTC
# Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -784,9 +784,9 @@ exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-format: "%Y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2024-06-19.01; # UTC
scriptversion=2025-06-18.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -533,9 +533,9 @@ do
done
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-format: "%Y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

747
ac/ltmain.sh Normal file → Executable file

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,11 @@
#! /bin/sh
# Common wrapper for a few potentially missing GNU and other programs.
scriptversion=2024-06-07.14; # UTC
scriptversion=2025-06-18.21; # UTC
# shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells
# Copyright (C) 1996-2024 Free Software Foundation, Inc.
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -228,9 +228,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
exit $st
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-format: "%Y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

View File

@@ -1,9 +1,9 @@
#! /bin/sh
# test-driver - basic testsuite driver script.
scriptversion=2024-06-19.01; # UTC
scriptversion=2025-06-18.21; # UTC
# Copyright (C) 2011-2024 Free Software Foundation, Inc.
# Copyright (C) 2011-2025 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -152,9 +152,9 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-format: "%Y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:

74
aclocal.m4 vendored
View File

@@ -1,6 +1,6 @@
# generated automatically by aclocal 1.17 -*- Autoconf -*-
# generated automatically by aclocal 1.18.1 -*- Autoconf -*-
# Copyright (C) 1996-2024 Free Software Foundation, Inc.
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,13 +14,13 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],,
[m4_warning([this file was generated for autoconf 2.72.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.71.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# Copyright (C) 2002-2024 Free Software Foundation, Inc.
# Copyright (C) 2002-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.17'
[am__api_version='1.18'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.17], [],
m4_if([$1], [1.18.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -51,12 +51,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.17])dnl
[AM_AUTOMAKE_VERSION([1.18.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# Copyright (C) 2011-2024 Free Software Foundation, Inc.
# Copyright (C) 2011-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -120,7 +120,7 @@ AC_SUBST([AR])dnl
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2024 Free Software Foundation, Inc.
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -172,7 +172,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2024 Free Software Foundation, Inc.
# Copyright (C) 1997-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -203,7 +203,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -394,7 +394,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -462,7 +462,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2024 Free Software Foundation, Inc.
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -562,8 +562,9 @@ AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_IF_OPTION([tar-v7], [_AM_PROG_TAR([v7])],
[_AM_PROG_TAR([ustar])])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES([CC])],
@@ -639,7 +640,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2024 Free Software Foundation, Inc.
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -660,7 +661,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
# Copyright (C) 2003-2024 Free Software Foundation, Inc.
# Copyright (C) 2003-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -681,7 +682,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2024 Free Software Foundation, Inc.
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -724,7 +725,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2024 Free Software Foundation, Inc.
# Copyright (C) 1997-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -758,7 +759,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2024 Free Software Foundation, Inc.
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -787,7 +788,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2024 Free Software Foundation, Inc.
# Copyright (C) 1999-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -819,7 +820,10 @@ AC_CACHE_CHECK(
break
fi
done
rm -f core conftest*
# aligned with autoconf, so not including core; see bug#72225.
rm -f -r a.out a.exe b.out conftest.$ac_ext conftest.$ac_objext \
conftest.dSYM conftest1.$ac_ext conftest1.$ac_objext conftest1.dSYM \
conftest2.$ac_ext conftest2.$ac_objext conftest2.dSYM
unset am_i])
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
@@ -834,7 +838,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2022-2024 Free Software Foundation, Inc.
# Copyright (C) 2022-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -850,7 +854,7 @@ AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""'])
AC_SUBST(am__rm_f_notfound)
])
# Copyright (C) 2001-2024 Free Software Foundation, Inc.
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -869,7 +873,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2024 Free Software Foundation, Inc.
# Copyright (C) 1996-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1038,10 +1042,12 @@ am_lf='
'
case `pwd` in
*[[\\\"\#\$\&\'\`$am_lf]]*)
AC_MSG_RESULT([no])
AC_MSG_ERROR([unsafe absolute working directory name]);;
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
AC_MSG_RESULT([no])
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
esac
@@ -1094,7 +1100,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
# Copyright (C) 2009-2024 Free Software Foundation, Inc.
# Copyright (C) 2009-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1163,9 +1169,13 @@ fi
# empty being verbose).
AC_DEFUN([AM_SILENT_RULES],
[AC_REQUIRE([_AM_SILENT_RULES])
AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])])
AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1])m4_newline
dnl We intentionally force a newline after the assignment, since a) nothing
dnl good can come of more text following, and b) that was the behavior
dnl before 1.17. See https://bugs.gnu.org/72267.
])
# Copyright (C) 2001-2024 Free Software Foundation, Inc.
# Copyright (C) 2001-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1193,7 +1203,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2024 Free Software Foundation, Inc.
# Copyright (C) 2006-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1212,7 +1222,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2024 Free Software Foundation, Inc.
# Copyright (C) 2004-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1347,7 +1357,7 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
# Copyright (C) 2022-2024 Free Software Foundation, Inc.
# Copyright (C) 2022-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,

View File

@@ -70,10 +70,12 @@ hak_SOURCES = hak.c
hak_CPPFLAGS = $(CPPFLAGS_COMMON)
hak_LDFLAGS = $(LDFLAGS_COMMON)
hak_LDADD = ../lib/libhak.la $(LIBADD_COMMON)
hak_DEPENDENCIES = ../lib/libhak.la
if ENABLE_ISOCLINE
hak_CPPFLAGS += -I$(srcdir)/isocline/include -DHAVE_ISOCLINE_H -DHAVE_ISOCLINE_LIB
hak_LDADD += ./libisocline.a
hak_DEPENDENCIES += ./libisocline.a
endif
if ENABLE_HAKX
@@ -83,5 +85,60 @@ hakx_SOURCES = hakx.c
hakx_CPPFLAGS = $(CPPFLAGS_COMMON)
hakx_LDFLAGS = $(LDFLAGS_COMMON)
hakx_LDADD = ../lib/libhakx.la $(LIBADD_COMMON)
hakx_DEPENDENCIES = ../lib/libhakx.la
endif
if ENABLE_HAKGO
## the attempt to compose a proper procedure using a regular compiler failed.
## e.g ./configure GOC=opt/go/pkg/tool/linux_amd64/
## while go.m4 is included in autoconf 2.71, the support for the go language
## is very limited and the go language itself is pursuing the module based builder.
##
## the following is to trick autoconf/automake as if it's building go files with
## a real compiler whereas the actual building is done thru `go build`
bin_PROGRAMS += hakgo
hakgo_SOURCES = \
../go.mod \
../hak.go \
../hak-cb.go \
../hak-inst.go \
main.go
##hakgo_DEPENDENCIES =
## let the linker to move hakgo.bin to the actual target
##hakgo_LINK = mv -f hakgo.bin hakgo$(EXEEXT) || echo "FAILED TO LINK"
hakgo_LINK =
if ENABLE_STATIC
CGO_CFLAGS_EXTRA="-static"
CGO_LDFLAGS_EXTRA="-static"
else
CGO_CFLAGS_EXTRA=""
CGO_LDFLAGS_EXTRA=""
endif
hakgo$(EXEEXT): ../lib/libhak.la $(hakgo_OBJECTS)
cp -pf $(top_srcdir)/go.mod $(builddir)/go.mod >/dev/null 2>&1 || true
chmod u+w $(builddir)/go.mod ## with `make distcheck`, the echo's redirection to the file fails without this permission change
[ -f $(srcdir)/go.sum ] && cp -pf $(srcdir)/go.sum $(builddir)/go.sum >/dev/null 2>&1 || true
## ---------------------------------------------------------------
CC=$(CC) \
CGO_CFLAGS="-I$(abs_top_srcdir)/lib -I$(abs_top_builddir)/lib $(CFLAGS) $(CGO_CFLAGS_EXTRA)" \
CGO_LDFLAGS="-L$(abs_top_builddir)/lib -L$(abs_top_builddir)/lib/.libs -lhak -ldl $(LIBM) $(CGO_LDFLAGS_EXTRA)" \
go build -C $(srcdir) -ldflags "-X 'main.BINDIR=$(bindir)' -X 'main.SBINDIR=$(sbindir)' -X 'main.LIBDIR=$(libdir)' -X 'main.SYSCONFDIR=$(sysconfdir)'" -x -o $(abs_builddir)/$@ -modfile $(abs_builddir)/go.mod $(abs_srcdir)/main.go
## ---------------------------------------------------------------
go clean -C $(srcdir) -x -modfile $(abs_builddir)/go.mod
## the go to o recipe is fake to deceive make
.go.o:
echo $< > $@
.mod.o:
echo $< > $@
endif

View File

@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.17 from Makefile.am.
# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2024 Free Software Foundation, Inc.
# Copyright (C) 1994-2025 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -98,10 +98,12 @@ host_triplet = @host@
##################################################
@ENABLE_LIBLTDL_TRUE@am__append_1 = $(LTDL_LIBS)
@ENABLE_LIBLTDL_FALSE@am__append_2 = $(DL_LIBS)
bin_PROGRAMS = hak$(EXEEXT) $(am__EXEEXT_1)
bin_PROGRAMS = hak$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2)
@ENABLE_ISOCLINE_TRUE@am__append_3 = -I$(srcdir)/isocline/include -DHAVE_ISOCLINE_H -DHAVE_ISOCLINE_LIB
@ENABLE_ISOCLINE_TRUE@am__append_4 = ./libisocline.a
@ENABLE_HAKX_TRUE@am__append_5 = hakx
@ENABLE_ISOCLINE_TRUE@am__append_5 = ./libisocline.a
@ENABLE_HAKX_TRUE@am__append_6 = hakx
@ENABLE_HAKGO_TRUE@am__append_7 = hakgo
subdir = bin
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \
@@ -118,6 +120,7 @@ CONFIG_HEADER = $(top_builddir)/lib/hak-cfg.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
@ENABLE_HAKX_TRUE@am__EXEEXT_1 = hakx$(EXEEXT)
@ENABLE_HAKGO_TRUE@am__EXEEXT_2 = hakgo$(EXEEXT)
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
LIBRARIES = $(noinst_LIBRARIES)
@@ -162,8 +165,6 @@ am__DEPENDENCIES_1 =
@ENABLE_LIBLTDL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
@ENABLE_LIBLTDL_FALSE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1)
am__DEPENDENCIES_4 = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3)
hak_DEPENDENCIES = ../lib/libhak.la $(am__DEPENDENCIES_4) \
$(am__append_4)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
@@ -171,11 +172,16 @@ am__v_lt_1 =
hak_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(hak_LDFLAGS) $(LDFLAGS) -o $@
am__hakgo_SOURCES_DIST = ../go.mod ../hak.go ../hak-cb.go \
../hak-inst.go main.go
@ENABLE_HAKGO_TRUE@am_hakgo_OBJECTS = ../go.$(OBJEXT) ../hak.$(OBJEXT) \
@ENABLE_HAKGO_TRUE@ ../hak-cb.$(OBJEXT) ../hak-inst.$(OBJEXT) \
@ENABLE_HAKGO_TRUE@ main.$(OBJEXT)
hakgo_OBJECTS = $(am_hakgo_OBJECTS)
hakgo_LDADD = $(LDADD)
am__hakx_SOURCES_DIST = hakx.c
@ENABLE_HAKX_TRUE@am_hakx_OBJECTS = hakx-hakx.$(OBJEXT)
hakx_OBJECTS = $(am_hakx_OBJECTS)
@ENABLE_HAKX_TRUE@hakx_DEPENDENCIES = ../lib/libhakx.la \
@ENABLE_HAKX_TRUE@ $(am__DEPENDENCIES_4)
hakx_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(hakx_LDFLAGS) $(LDFLAGS) -o $@
@@ -229,9 +235,10 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libisocline_a_SOURCES) $(hak_SOURCES) $(hakx_SOURCES)
SOURCES = $(libisocline_a_SOURCES) $(hak_SOURCES) $(hakgo_SOURCES) \
$(hakx_SOURCES)
DIST_SOURCES = $(am__libisocline_a_SOURCES_DIST) $(hak_SOURCES) \
$(am__hakx_SOURCES_DIST)
$(am__hakgo_SOURCES_DIST) $(am__hakx_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -465,14 +472,28 @@ hak_SOURCES = hak.c
hak_CPPFLAGS = $(CPPFLAGS_COMMON) $(am__append_3)
hak_LDFLAGS = $(LDFLAGS_COMMON)
hak_LDADD = ../lib/libhak.la $(LIBADD_COMMON) $(am__append_4)
hak_DEPENDENCIES = ../lib/libhak.la $(am__append_5)
@ENABLE_HAKX_TRUE@hakx_SOURCES = hakx.c
@ENABLE_HAKX_TRUE@hakx_CPPFLAGS = $(CPPFLAGS_COMMON)
@ENABLE_HAKX_TRUE@hakx_LDFLAGS = $(LDFLAGS_COMMON)
@ENABLE_HAKX_TRUE@hakx_LDADD = ../lib/libhakx.la $(LIBADD_COMMON)
@ENABLE_HAKX_TRUE@hakx_DEPENDENCIES = ../lib/libhakx.la
@ENABLE_HAKGO_TRUE@hakgo_SOURCES = \
@ENABLE_HAKGO_TRUE@ ../go.mod \
@ENABLE_HAKGO_TRUE@ ../hak.go \
@ENABLE_HAKGO_TRUE@ ../hak-cb.go \
@ENABLE_HAKGO_TRUE@ ../hak-inst.go \
@ENABLE_HAKGO_TRUE@ main.go
@ENABLE_HAKGO_TRUE@hakgo_LINK =
@ENABLE_HAKGO_TRUE@@ENABLE_STATIC_FALSE@CGO_CFLAGS_EXTRA = ""
@ENABLE_HAKGO_TRUE@@ENABLE_STATIC_TRUE@CGO_CFLAGS_EXTRA = "-static"
@ENABLE_HAKGO_TRUE@@ENABLE_STATIC_FALSE@CGO_LDFLAGS_EXTRA = ""
@ENABLE_HAKGO_TRUE@@ENABLE_STATIC_TRUE@CGO_LDFLAGS_EXTRA = "-static"
all: all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
.SUFFIXES: .c .go .lo .mod .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -596,6 +617,20 @@ libisocline.a: $(libisocline_a_OBJECTS) $(libisocline_a_DEPENDENCIES) $(EXTRA_li
hak$(EXEEXT): $(hak_OBJECTS) $(hak_DEPENDENCIES) $(EXTRA_hak_DEPENDENCIES)
@rm -f hak$(EXEEXT)
$(AM_V_CCLD)$(hak_LINK) $(hak_OBJECTS) $(hak_LDADD) $(LIBS)
../$(am__dirstamp):
@$(MKDIR_P) ..
@: >>../$(am__dirstamp)
../$(DEPDIR)/$(am__dirstamp):
@$(MKDIR_P) ../$(DEPDIR)
@: >>../$(DEPDIR)/$(am__dirstamp)
../go.$(OBJEXT): ../$(am__dirstamp) ../$(DEPDIR)/$(am__dirstamp)
../hak.$(OBJEXT): ../$(am__dirstamp) ../$(DEPDIR)/$(am__dirstamp)
../hak-cb.$(OBJEXT): ../$(am__dirstamp) ../$(DEPDIR)/$(am__dirstamp)
../hak-inst.$(OBJEXT): ../$(am__dirstamp) ../$(DEPDIR)/$(am__dirstamp)
@ENABLE_HAKGO_FALSE@hakgo$(EXEEXT): $(hakgo_OBJECTS) $(hakgo_DEPENDENCIES) $(EXTRA_hakgo_DEPENDENCIES)
@ENABLE_HAKGO_FALSE@ @rm -f hakgo$(EXEEXT)
@ENABLE_HAKGO_FALSE@ $(AM_V_GEN)$(hakgo_LINK) $(hakgo_OBJECTS) $(hakgo_LDADD) $(LIBS)
hakx$(EXEEXT): $(hakx_OBJECTS) $(hakx_DEPENDENCIES) $(EXTRA_hakx_DEPENDENCIES)
@rm -f hakx$(EXEEXT)
@@ -603,6 +638,7 @@ hakx$(EXEEXT): $(hakx_OBJECTS) $(hakx_DEPENDENCIES) $(EXTRA_hakx_DEPENDENCIES)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
-rm -f ../*.$(OBJEXT)
-rm -f isocline/src/*.$(OBJEXT)
distclean-compile:
@@ -742,6 +778,7 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
@@ -808,6 +845,8 @@ clean-generic:
distclean-generic:
-$(am__rm_f) $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
-$(am__rm_f) ../$(DEPDIR)/$(am__dirstamp)
-$(am__rm_f) ../$(am__dirstamp)
-$(am__rm_f) isocline/src/$(DEPDIR)/$(am__dirstamp)
-$(am__rm_f) isocline/src/$(am__dirstamp)
@@ -939,6 +978,22 @@ uninstall-am: uninstall-binPROGRAMS
.PRECIOUS: Makefile
@ENABLE_HAKGO_TRUE@hakgo$(EXEEXT): ../lib/libhak.la $(hakgo_OBJECTS)
@ENABLE_HAKGO_TRUE@ cp -pf $(top_srcdir)/go.mod $(builddir)/go.mod >/dev/null 2>&1 || true
@ENABLE_HAKGO_TRUE@ chmod u+w $(builddir)/go.mod ## with `make distcheck`, the echo's redirection to the file fails without this permission change
@ENABLE_HAKGO_TRUE@ [ -f $(srcdir)/go.sum ] && cp -pf $(srcdir)/go.sum $(builddir)/go.sum >/dev/null 2>&1 || true
@ENABLE_HAKGO_TRUE@ CC=$(CC) \
@ENABLE_HAKGO_TRUE@ CGO_CFLAGS="-I$(abs_top_srcdir)/lib -I$(abs_top_builddir)/lib $(CFLAGS) $(CGO_CFLAGS_EXTRA)" \
@ENABLE_HAKGO_TRUE@ CGO_LDFLAGS="-L$(abs_top_builddir)/lib -L$(abs_top_builddir)/lib/.libs -lhak -ldl $(LIBM) $(CGO_LDFLAGS_EXTRA)" \
@ENABLE_HAKGO_TRUE@ go build -C $(srcdir) -ldflags "-X 'main.BINDIR=$(bindir)' -X 'main.SBINDIR=$(sbindir)' -X 'main.LIBDIR=$(libdir)' -X 'main.SYSCONFDIR=$(sysconfdir)'" -x -o $(abs_builddir)/$@ -modfile $(abs_builddir)/go.mod $(abs_srcdir)/main.go
@ENABLE_HAKGO_TRUE@ go clean -C $(srcdir) -x -modfile $(abs_builddir)/go.mod
@ENABLE_HAKGO_TRUE@.go.o:
@ENABLE_HAKGO_TRUE@ echo $< > $@
@ENABLE_HAKGO_TRUE@.mod.o:
@ENABLE_HAKGO_TRUE@ echo $< > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -3,9 +3,9 @@ package main
import (
"flag"
"fmt"
"hak"
"os"
//"strings"
"code.miflux.com/hyung-hwan/hak/go"
)
/*

4660
configure vendored

File diff suppressed because it is too large Load Diff

2
go.mod
View File

@@ -1,3 +1,3 @@
module code.miflux.com/hyung-hwan/hak
module hak
go 1.20

View File

View File

@@ -4,13 +4,12 @@ package hak
#include <hak.h>
*/
import "C"
import (
"sync"
)
import "sync"
import "weak"
type Instance struct {
c *C.hak_t // c object
g *Hak // go object
g weak.Pointer[Hak] // go object as a weak pointer
}
type InstanceTable struct {
@@ -19,6 +18,8 @@ type InstanceTable struct {
free_slots []int
}
var inst_table InstanceTable
func (itab *InstanceTable) add_instance(c *C.hak_t, g *Hak) int {
itab.mtx.Lock()
defer itab.mtx.Unlock()
@@ -26,7 +27,7 @@ func (itab *InstanceTable) add_instance(c *C.hak_t, g *Hak) int {
var n int = len(itab.free_slots)
if n <= 0 { // no free slots
itab.insts = append(itab.insts, Instance{c: c, g: g})
itab.insts = append(itab.insts, Instance{c: c, g: weak.Make(g)})
return len(itab.insts) - 1
} else {
var slot int
@@ -39,17 +40,15 @@ func (itab *InstanceTable) add_instance(c *C.hak_t, g *Hak) int {
}
func (itab *InstanceTable) delete_instance(slot int) Instance {
var (
h Instance
n int
)
var h Instance
var n int
itab.mtx.Lock()
defer itab.mtx.Unlock()
h = itab.insts[slot]
itab.insts[slot].c = nil
itab.insts[slot].g = nil
itab.insts[slot].g = weak.Make((*Hak)(nil))
n = len(itab.insts)
if slot == n-1 {

View File

@@ -76,8 +76,6 @@ type BitMask C.hak_bitmask_t
const TRAIT_LANG_ENABLE_EOL BitMask = C.HAK_TRAIT_LANG_ENABLE_EOL
var inst_table InstanceTable
func deregister_instance(g *Hak) {
if g.inst_no >= 0 {
inst_table.delete_instance(g.inst_no)
@@ -466,7 +464,7 @@ func c_to_go(c *C.hak_t) *Hak {
ext = (*Ext)(unsafe.Pointer(C.hak_getxtn(c)))
inst = inst_table.slot_to_instance(ext.inst_no)
return inst.g
return inst.g.Value()
}
// -----------------------------------------------------------

View File

@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.17 from Makefile.am.
# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2024 Free Software Foundation, Inc.
# Copyright (C) 1994-2025 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -999,6 +999,7 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am

View File

@@ -165,43 +165,43 @@
/* Wide-character type size */
#undef HAK_WIDE_CHAR_SIZE
/* Define to 1 if you have the 'accept4' function. */
/* Define to 1 if you have the `accept4' function. */
#undef HAVE_ACCEPT4
/* Define to 1 if you have the 'acosq' function. */
/* Define to 1 if you have the `acosq' function. */
#undef HAVE_ACOSQ
/* Define to 1 if you have the 'asinq' function. */
/* Define to 1 if you have the `asinq' function. */
#undef HAVE_ASINQ
/* Define to 1 if you have the 'atan2q' function. */
/* Define to 1 if you have the `atan2q' function. */
#undef HAVE_ATAN2Q
/* Define to 1 if you have the 'atanq' function. */
/* Define to 1 if you have the `atanq' function. */
#undef HAVE_ATANQ
/* Define to 1 if you have the 'backtrace' function. */
/* Define to 1 if you have the `backtrace' function. */
#undef HAVE_BACKTRACE
/* Define to 1 if you have the 'backtrace_symbols' function. */
/* Define to 1 if you have the `backtrace_symbols' function. */
#undef HAVE_BACKTRACE_SYMBOLS
/* Define to 1 if you have the 'ceilq' function. */
/* Define to 1 if you have the `ceilq' function. */
#undef HAVE_CEILQ
/* Define to 1 if you have the 'clock_gettime' function. */
/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME
/* Define to 1 if you have the 'clock_nanosleep' function. */
/* Define to 1 if you have the `clock_nanosleep' function. */
#undef HAVE_CLOCK_NANOSLEEP
/* Define to 1 if you have the 'clock_settime' function. */
/* Define to 1 if you have the `clock_settime' function. */
#undef HAVE_CLOCK_SETTIME
/* Define to 1 if you have the 'coshq' function. */
/* Define to 1 if you have the `coshq' function. */
#undef HAVE_COSHQ
/* Define to 1 if you have the 'cosq' function. */
/* Define to 1 if you have the `cosq' function. */
#undef HAVE_COSQ
/* Define to 1 if you have the <dirent.h> header file. */
@@ -210,10 +210,10 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the 'epoll_create' function. */
/* Define to 1 if you have the `epoll_create' function. */
#undef HAVE_EPOLL_CREATE
/* Define to 1 if you have the 'epoll_create1' function. */
/* Define to 1 if you have the `epoll_create1' function. */
#undef HAVE_EPOLL_CREATE1
/* Define to 1 if you have the <errno.h> header file. */
@@ -222,79 +222,79 @@
/* Define to 1 if you have the <execinfo.h> header file. */
#undef HAVE_EXECINFO_H
/* Define to 1 if you have the 'expq' function. */
/* Define to 1 if you have the `expq' function. */
#undef HAVE_EXPQ
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the 'floorq' function. */
/* Define to 1 if you have the `floorq' function. */
#undef HAVE_FLOORQ
/* Define to 1 if you have the 'fmodq' function. */
/* Define to 1 if you have the `fmodq' function. */
#undef HAVE_FMODQ
/* Define to 1 if you have the 'getcontext' function. */
/* Define to 1 if you have the `getcontext' function. */
#undef HAVE_GETCONTEXT
/* Define to 1 if you have the 'getitimer' function. */
/* Define to 1 if you have the `getitimer' function. */
#undef HAVE_GETITIMER
/* Define to 1 if you have the 'gettimeofday' function. */
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
/* Define to 1 if you have the 'gmtime_r' function. */
/* Define to 1 if you have the `gmtime_r' function. */
#undef HAVE_GMTIME_R
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the 'isatty' function. */
/* Define to 1 if you have the `isatty' function. */
#undef HAVE_ISATTY
/* Define to 1 if you have the 'kqueue' function. */
/* Define to 1 if you have the `kqueue' function. */
#undef HAVE_KQUEUE
/* Define to 1 if you have the 'kqueue1' function. */
/* Define to 1 if you have the `kqueue1' function. */
#undef HAVE_KQUEUE1
/* Define to 1 if you have the <libunwind.h> header file. */
#undef HAVE_LIBUNWIND_H
/* Define to 1 if you have the 'localtime_r' function. */
/* Define to 1 if you have the `localtime_r' function. */
#undef HAVE_LOCALTIME_R
/* Define to 1 if you have the 'log10q' function. */
/* Define to 1 if you have the `log10q' function. */
#undef HAVE_LOG10Q
/* Define to 1 if you have the 'logq' function. */
/* Define to 1 if you have the `logq' function. */
#undef HAVE_LOGQ
/* Define to 1 if you have the <ltdl.h> header file. */
#undef HAVE_LTDL_H
/* Define to 1 if you have the 'makecontext' function. */
/* Define to 1 if you have the `makecontext' function. */
#undef HAVE_MAKECONTEXT
/* Define to 1 if you have the 'mmap' function. */
/* Define to 1 if you have the `mmap' function. */
#undef HAVE_MMAP
/* Define to 1 if you have the 'munmap' function. */
/* Define to 1 if you have the `munmap' function. */
#undef HAVE_MUNMAP
/* Define to 1 if you have the 'nanosleep' function. */
/* Define to 1 if you have the `nanosleep' function. */
#undef HAVE_NANOSLEEP
/* Define to 1 if you have the <net/if.h> header file. */
#undef HAVE_NET_IF_H
/* Define to 1 if you have the 'pipe2' function. */
/* Define to 1 if you have the `pipe2' function. */
#undef HAVE_PIPE2
/* Define to 1 if you have the <poll.h> header file. */
#undef HAVE_POLL_H
/* Define to 1 if you have the 'powq' function. */
/* Define to 1 if you have the `powq' function. */
#undef HAVE_POWQ
/* Define if you have POSIX threads libraries and header files. */
@@ -306,43 +306,43 @@
/* Define to 1 if you have the <quadmath.h> header file. */
#undef HAVE_QUADMATH_H
/* Define to 1 if you have the 'quadmath_snprintf' function. */
/* Define to 1 if you have the `quadmath_snprintf' function. */
#undef HAVE_QUADMATH_SNPRINTF
/* Define to 1 if you have the 'roundq' function. */
/* Define to 1 if you have the `roundq' function. */
#undef HAVE_ROUNDQ
/* Define to 1 if you have the 'setcontext' function. */
/* Define to 1 if you have the `setcontext' function. */
#undef HAVE_SETCONTEXT
/* Define to 1 if you have the 'setitimer' function. */
/* Define to 1 if you have the `setitimer' function. */
#undef HAVE_SETITIMER
/* Define to 1 if you have the 'settimeofday' function. */
/* Define to 1 if you have the `settimeofday' function. */
#undef HAVE_SETTIMEOFDAY
/* Define to 1 if you have the 'sigaction' function. */
/* Define to 1 if you have the `sigaction' function. */
#undef HAVE_SIGACTION
/* Define to 1 if you have the 'signal' function. */
/* Define to 1 if you have the `signal' function. */
#undef HAVE_SIGNAL
/* Define to 1 if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
/* Define to 1 if you have the 'sinhq' function. */
/* Define to 1 if you have the `sinhq' function. */
#undef HAVE_SINHQ
/* Define to 1 if you have the 'sinq' function. */
/* Define to 1 if you have the `sinq' function. */
#undef HAVE_SINQ
/* Define to 1 if you have the 'snprintf' function. */
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the <spawn.h> header file. */
#undef HAVE_SPAWN_H
/* Define to 1 if you have the 'sqrtq' function. */
/* Define to 1 if you have the `sqrtq' function. */
#undef HAVE_SQRTQ
/* Define to 1 if you have the <stddef.h> header file. */
@@ -357,7 +357,7 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the 'strerror_r' function. */
/* Define to 1 if you have the `strerror_r' function. */
#undef HAVE_STRERROR_R
/* strftime supports %z */
@@ -369,16 +369,16 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the 'strtoflt128' function. */
/* Define to 1 if you have the `strtoflt128' function. */
#undef HAVE_STRTOFLT128
/* Define to 1 if 'ifr_ifindex' is a member of 'struct ifreq'. */
/* Define to 1 if `ifr_ifindex' is a member of `struct ifreq'. */
#undef HAVE_STRUCT_IFREQ_IFR_IFINDEX
/* Define to 1 if 'ifr_mtu' is a member of 'struct ifreq'. */
/* Define to 1 if `ifr_mtu' is a member of `struct ifreq'. */
#undef HAVE_STRUCT_IFREQ_IFR_MTU
/* Define to 1 if you have the 'swapcontext' function. */
/* Define to 1 if you have the `swapcontext' function. */
#undef HAVE_SWAPCONTEXT
/* Define to 1 if you have the <sys/devpoll.h> header file. */
@@ -405,10 +405,10 @@
/* Define to 1 if you have the <sys/uio.h> header file. */
#undef HAVE_SYS_UIO_H
/* Define to 1 if you have the 'tanhq' function. */
/* Define to 1 if you have the `tanhq' function. */
#undef HAVE_TANHQ
/* Define to 1 if you have the 'tanq' function. */
/* Define to 1 if you have the `tanq' function. */
#undef HAVE_TANQ
/* Define to 1 if you have the <time.h> header file. */
@@ -423,7 +423,7 @@
/* libunwind is available */
#undef HAVE_UNWIND_LIB
/* Define to 1 if you have the 'usleep' function. */
/* Define to 1 if you have the `usleep' function. */
#undef HAVE_USLEEP
/* Define to 1 if you have the <utime.h> header file. */
@@ -438,10 +438,10 @@
/* Define to 1 if you have the <wctype.h> header file. */
#undef HAVE_WCTYPE_H
/* Define to 1 if you have the '_vsnprintf' function. */
/* Define to 1 if you have the `_vsnprintf' function. */
#undef HAVE__VSNPRINTF
/* Define to 1 if you have the '_vsnwprintf' function. */
/* Define to 1 if you have the `_vsnwprintf' function. */
#undef HAVE__VSNWPRINTF
/* __builtin_memcmp */
@@ -493,109 +493,109 @@
your system. */
#undef PTHREAD_CREATE_JOINABLE
/* The size of 'char', as computed by sizeof. */
/* The size of `char', as computed by sizeof. */
#undef SIZEOF_CHAR
/* The size of 'char16_t', as computed by sizeof. */
/* The size of `char16_t', as computed by sizeof. */
#undef SIZEOF_CHAR16_T
/* The size of 'char32_t', as computed by sizeof. */
/* The size of `char32_t', as computed by sizeof. */
#undef SIZEOF_CHAR32_T
/* The size of 'double', as computed by sizeof. */
/* The size of `double', as computed by sizeof. */
#undef SIZEOF_DOUBLE
/* The size of 'float', as computed by sizeof. */
/* The size of `float', as computed by sizeof. */
#undef SIZEOF_FLOAT
/* The size of 'int', as computed by sizeof. */
/* The size of `int', as computed by sizeof. */
#undef SIZEOF_INT
/* The size of 'long', as computed by sizeof. */
/* The size of `long', as computed by sizeof. */
#undef SIZEOF_LONG
/* The size of 'long double', as computed by sizeof. */
/* The size of `long double', as computed by sizeof. */
#undef SIZEOF_LONG_DOUBLE
/* The size of 'long long', as computed by sizeof. */
/* The size of `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
/* The size of 'mbstate_t', as computed by sizeof. */
/* The size of `mbstate_t', as computed by sizeof. */
#undef SIZEOF_MBSTATE_T
/* The size of 'off64_t', as computed by sizeof. */
/* The size of `off64_t', as computed by sizeof. */
#undef SIZEOF_OFF64_T
/* The size of 'off_t', as computed by sizeof. */
/* The size of `off_t', as computed by sizeof. */
#undef SIZEOF_OFF_T
/* The size of 'sa_family_t', as computed by sizeof. */
/* The size of `sa_family_t', as computed by sizeof. */
#undef SIZEOF_SA_FAMILY_T
/* The size of 'short', as computed by sizeof. */
/* The size of `short', as computed by sizeof. */
#undef SIZEOF_SHORT
/* The size of 'socklen_t', as computed by sizeof. */
/* The size of `socklen_t', as computed by sizeof. */
#undef SIZEOF_SOCKLEN_T
/* The size of 'struct sockaddr_dl', as computed by sizeof. */
/* The size of `struct sockaddr_dl', as computed by sizeof. */
#undef SIZEOF_STRUCT_SOCKADDR_DL
/* The size of 'struct sockaddr_in', as computed by sizeof. */
/* The size of `struct sockaddr_in', as computed by sizeof. */
#undef SIZEOF_STRUCT_SOCKADDR_IN
/* The size of 'struct sockaddr_in6', as computed by sizeof. */
/* The size of `struct sockaddr_in6', as computed by sizeof. */
#undef SIZEOF_STRUCT_SOCKADDR_IN6
/* The size of 'struct sockaddr_ll', as computed by sizeof. */
/* The size of `struct sockaddr_ll', as computed by sizeof. */
#undef SIZEOF_STRUCT_SOCKADDR_LL
/* The size of 'struct sockaddr_un', as computed by sizeof. */
/* The size of `struct sockaddr_un', as computed by sizeof. */
#undef SIZEOF_STRUCT_SOCKADDR_UN
/* The size of 'void *', as computed by sizeof. */
/* The size of `void *', as computed by sizeof. */
#undef SIZEOF_VOID_P
/* The size of 'wchar_t', as computed by sizeof. */
/* The size of `wchar_t', as computed by sizeof. */
#undef SIZEOF_WCHAR_T
/* The size of '__float128', as computed by sizeof. */
/* The size of `__float128', as computed by sizeof. */
#undef SIZEOF___FLOAT128
/* The size of '__int128', as computed by sizeof. */
/* The size of `__int128', as computed by sizeof. */
#undef SIZEOF___INT128
/* The size of '__int128_t', as computed by sizeof. */
/* The size of `__int128_t', as computed by sizeof. */
#undef SIZEOF___INT128_T
/* The size of '__int16', as computed by sizeof. */
/* The size of `__int16', as computed by sizeof. */
#undef SIZEOF___INT16
/* The size of '__int16_t', as computed by sizeof. */
/* The size of `__int16_t', as computed by sizeof. */
#undef SIZEOF___INT16_T
/* The size of '__int32', as computed by sizeof. */
/* The size of `__int32', as computed by sizeof. */
#undef SIZEOF___INT32
/* The size of '__int32_t', as computed by sizeof. */
/* The size of `__int32_t', as computed by sizeof. */
#undef SIZEOF___INT32_T
/* The size of '__int64', as computed by sizeof. */
/* The size of `__int64', as computed by sizeof. */
#undef SIZEOF___INT64
/* The size of '__int64_t', as computed by sizeof. */
/* The size of `__int64_t', as computed by sizeof. */
#undef SIZEOF___INT64_T
/* The size of '__int8', as computed by sizeof. */
/* The size of `__int8', as computed by sizeof. */
#undef SIZEOF___INT8
/* The size of '__int8_t', as computed by sizeof. */
/* The size of `__int8_t', as computed by sizeof. */
#undef SIZEOF___INT8_T
/* The size of '__uint128_t', as computed by sizeof. */
/* The size of `__uint128_t', as computed by sizeof. */
#undef SIZEOF___UINT128_T
/* Define to 1 if all of the C89 standard headers exist (not just the ones
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#undef STDC_HEADERS

466
m4/libtool.m4 vendored

File diff suppressed because it is too large Load Diff

106
m4/ltoptions.m4 vendored
View File

@@ -1,6 +1,6 @@
# Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2024 Free
# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
# Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
@@ -8,7 +8,7 @@
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 10 ltoptions.m4
# serial 8 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -128,7 +128,7 @@ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*)
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
@@ -323,39 +323,29 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_AIX_SONAME([DEFAULT])
# ----------------------------------
# implement the --enable-aix-soname configure option, and support the
# `aix-soname=aix' and `aix-soname=both' and `aix-soname=svr4' LT_INIT options.
# DEFAULT is either `aix', `both', or `svr4'. If omitted, it defaults to `aix'.
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
m4_define([_LT_WITH_AIX_SONAME],
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
shared_archive_member_spec=
case $host,$enable_shared in
power*-*-aix[[5-9]]*,yes)
AC_MSG_CHECKING([which variant of shared library versioning to provide])
AC_ARG_ENABLE([aix-soname],
[AS_HELP_STRING([--enable-aix-soname=aix|svr4|both],
AC_ARG_WITH([aix-soname],
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
[case $enableval in
aix|svr4|both)
;;
*)
AC_MSG_ERROR([Unknown argument to --enable-aix-soname])
;;
esac
lt_cv_with_aix_soname=$enable_aix_soname],
[_AC_ENABLE_IF([with], [aix-soname],
[case $withval in
aix|svr4|both)
;;
*)
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
;;
esac
lt_cv_with_aix_soname=$with_aix_soname],
[AC_CACHE_VAL([lt_cv_with_aix_soname],
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)])
enable_aix_soname=$lt_cv_with_aix_soname])
with_aix_soname=$enable_aix_soname
[case $withval in
aix|svr4|both)
;;
*)
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
;;
esac
lt_cv_with_aix_soname=$with_aix_soname],
[AC_CACHE_VAL([lt_cv_with_aix_soname],
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
with_aix_soname=$lt_cv_with_aix_soname])
AC_MSG_RESULT([$with_aix_soname])
if test aix != "$with_aix_soname"; then
# For the AIX way of multilib, we name the shared archive member
@@ -386,50 +376,30 @@ LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
# _LT_WITH_PIC([MODE])
# --------------------
# implement the --enable-pic flag, and support the 'pic-only' and 'no-pic'
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
# LT_INIT options.
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_ENABLE([pic],
[AS_HELP_STRING([--enable-pic@<:@=PKGS@:>@],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[lt_p=${PACKAGE-default}
case $enableval in
yes|no) pic_mode=$enableval ;;
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for lt_pkg in $enableval; do
IFS=$lt_save_ifs
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
IFS=$lt_save_ifs
;;
esac],
[dnl Continue to support --with-pic and --without-pic, for backward
dnl compatibility.
_AC_ENABLE_IF([with], [pic],
[lt_p=${PACKAGE-default}
case $withval in
yes|no) pic_mode=$withval ;;
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for lt_pkg in $withval; do
IFS=$lt_save_ifs
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
IFS=$lt_save_ifs
;;
esac],
[pic_mode=m4_default([$1], [default])])]
)
case $withval in
yes|no) pic_mode=$withval ;;
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for lt_pkg in $withval; do
IFS=$lt_save_ifs
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
IFS=$lt_save_ifs
;;
esac],
[pic_mode=m4_default([$1], [default])])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC

2
m4/ltsugar.m4 vendored
View File

@@ -1,6 +1,6 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2024 Free Software
# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#

12
m4/ltversion.m4 vendored
View File

@@ -1,6 +1,6 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004, 2011-2019, 2021-2024 Free Software Foundation,
# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
# Inc.
# Written by Scott James Remnant, 2004
#
@@ -10,15 +10,15 @@
# @configure_input@
# serial 4441 ltversion.m4
# serial 4245 ltversion.m4
# This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.5.4])
m4_define([LT_PACKAGE_REVISION], [2.5.4])
m4_define([LT_PACKAGE_VERSION], [2.4.7])
m4_define([LT_PACKAGE_REVISION], [2.4.7])
AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.5.4'
macro_revision='2.5.4'
[macro_version='2.4.7'
macro_revision='2.4.7'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])

2
m4/lt~obsolete.m4 vendored
View File

@@ -1,6 +1,6 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2024 Free
# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
# Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#

View File

@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.17 from Makefile.am.
# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2024 Free Software Foundation, Inc.
# Copyright (C) 1994-2025 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -615,6 +615,7 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am

View File

@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.17 from Makefile.am.
# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2024 Free Software Foundation, Inc.
# Copyright (C) 1994-2025 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -464,6 +464,7 @@ cscopelist-am: $(am__tagged_files)
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am

View File

@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.17 from Makefile.am.
# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2024 Free Software Foundation, Inc.
# Copyright (C) 1994-2025 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -311,7 +311,7 @@ am__common_driver_flags = \
# To be inserted before the command running the test. Creates the
# directory for the log if needed. Stores in $dir the directory
# containing $f, in $tst the test, in $log the log. Executes the
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
# developer-defined test setup AM_TESTS_ENVIRONMENT (if any), and
# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
# will run the test scripts (or their associated LOG_COMPILER, if
# thy have one).
@@ -908,6 +908,7 @@ t-001.log: t-001$(EXEEXT)
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_ERR_LOG_DRIVER_FLAGS) $(ERR_LOG_DRIVER_FLAGS) -- $(ERR_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am