summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in65
-rw-r--r--aclocal.m4441
-rwxr-xr-xbuild-aux/ar-lib33
-rwxr-xr-xbuild-aux/compile42
-rwxr-xr-xbuild-aux/config.guess129
-rwxr-xr-xbuild-aux/config.sub952
-rwxr-xr-xbuild-aux/depcomp19
-rwxr-xr-xbuild-aux/install-sh18
-rwxr-xr-xbuild-aux/ltmain.sh736
-rwxr-xr-xbuild-aux/missing79
-rwxr-xr-xbuild-aux/test-driver46
-rw-r--r--config.h.in54
-rwxr-xr-xconfigure4236
-rw-r--r--configure.ac7
-rw-r--r--debian/changelog36
-rw-r--r--debian/control13
-rw-r--r--debian/copyright139
-rw-r--r--debian/libhx32t64.lintian-overrides1
-rw-r--r--debian/libhx32t64.symbols159
-rw-r--r--debian/libhx43t64.dirs (renamed from debian/libhx32t64.dirs)0
-rw-r--r--debian/libhx43t64.install (renamed from debian/libhx32t64.install)0
-rw-r--r--debian/libhx43t64.symbols148
-rwxr-xr-xdebian/rules2
-rw-r--r--debian/symbols143
-rw-r--r--debian/watch6
-rw-r--r--doc/api.rst51
-rw-r--r--doc/changelog.rst93
-rw-r--r--doc/files_and_dirs.rst9
-rw-r--r--doc/helper_headers.rst1
-rw-r--r--doc/inline_clist.rst2
-rw-r--r--doc/inline_list.rst2
-rw-r--r--doc/macros.rst7
-rw-r--r--doc/misc_functions.rst2
-rw-r--r--doc/option_parsing.rst325
-rw-r--r--doc/scope.rst22
-rw-r--r--doc/string_ops.rst79
-rw-r--r--include/Makefile.am6
-rw-r--r--include/Makefile.in33
-rw-r--r--include/libHX/ctype_helper.h5
-rw-r--r--include/libHX/defs.h12
-rw-r--r--include/libHX/deque.h38
-rw-r--r--include/libHX/endian.h202
-rw-r--r--include/libHX/endian_float.h107
-rw-r--r--include/libHX/io.h3
-rw-r--r--include/libHX/list.h8
-rw-r--r--include/libHX/map.h4
-rw-r--r--include/libHX/misc.h12
-rw-r--r--include/libHX/option.h90
-rw-r--r--include/libHX/scope.hpp35
-rw-r--r--include/libHX/string.h22
-rw-r--r--m4/gcc4_visibility.m421
-rw-r--r--m4/libtool.m4461
-rw-r--r--m4/ltoptions.m4106
-rw-r--r--m4/ltsugar.m42
-rw-r--r--m4/ltversion.m412
-rw-r--r--m4/lt~obsolete.m42
-rw-r--r--src/Makefile.am8
-rw-r--r--src/Makefile.in156
-rw-r--r--src/deque.c52
-rw-r--r--src/format.c38
-rw-r--r--src/internal.h2
-rw-r--r--src/io.c88
-rw-r--r--src/libHX.map55
-rw-r--r--src/map_int.h3
-rw-r--r--src/misc.c14
-rw-r--r--src/opt.c299
-rw-r--r--src/string.c386
-rw-r--r--src/tc-compile.c2
-rw-r--r--src/tc-io.c12
-rw-r--r--src/tc-list.c2
-rw-r--r--src/tc-map.c22
-rw-r--r--src/tc-option.c207
-rw-r--r--src/tc-realpath.c62
-rw-r--r--src/tc-string.c78
-rw-r--r--src/tc-strquote.c5
-rw-r--r--src/tc-switchuser.c19
-rw-r--r--src/tc-time.c1
-rw-r--r--src/tx-compile.cpp1
-rw-r--r--src/tx-option.cpp21
81 files changed, 7136 insertions, 3678 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ff0378
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.metadata
diff --git a/Makefile.am b/Makefile.am
index 3d02bf3..f7e3483 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,6 +5,6 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = include src
pkgconfig_DATA = libHX.pc
-EXTRA_DIST = doc/api.rst doc/assorted.txt doc/bitmaps.rst doc/changelog.rst doc/const_cast.c doc/dirstamp.rst doc/files_and_dirs.rst doc/generator.cpp doc/helper_headers.rst doc/history.rst doc/init.rst doc/inline_clist.rst doc/inline_list.rst doc/install.rst doc/libHX_Documentation.rst doc/linked_list.rst doc/macros.rst doc/maps.rst doc/memory_container.rst doc/misc_functions.rst doc/option_parsing.rst doc/process_management.rst doc/random_numbers.rst doc/shconfig.rst doc/socket_functions.rst doc/string_formatter.rst doc/string_ops.rst doc/strlcpy-timing.rst doc/time_functions.rst doc/typecheck_casts.rst doc/ux-file.rst doc/ux-mmap.rst
+EXTRA_DIST = doc/api.rst doc/assorted.txt doc/bitmaps.rst doc/changelog.rst doc/const_cast.c doc/dirstamp.rst doc/files_and_dirs.rst doc/generator.cpp doc/helper_headers.rst doc/history.rst doc/init.rst doc/inline_clist.rst doc/inline_list.rst doc/install.rst doc/libHX_Documentation.rst doc/linked_list.rst doc/macros.rst doc/maps.rst doc/memory_container.rst doc/misc_functions.rst doc/option_parsing.rst doc/process_management.rst doc/random_numbers.rst doc/scope.rst doc/shconfig.rst doc/socket_functions.rst doc/string_formatter.rst doc/string_ops.rst doc/strlcpy-timing.rst doc/time_functions.rst doc/typecheck_casts.rst doc/ux-file.rst doc/ux-mmap.rst
${pkgconfig_DATA}: ${top_builddir}/config.status
diff --git a/Makefile.in b/Makefile.in
index 6d7c044..1e77c09 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2021 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,
@@ -72,6 +72,8 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+am__rm_f = rm -f $(am__rm_f_notfound)
+am__rm_rf = rm -rf $(am__rm_f_notfound)
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -155,10 +157,9 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
+ { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
}
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
DATA = $(pkgconfig_DATA)
@@ -205,8 +206,8 @@ distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
if test -d "$(distdir)"; then \
- find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -rf "$(distdir)" \
+ find "$(distdir)" -type d ! -perm -700 -exec chmod u+rwx {} ';' \
+ ; rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
@@ -236,14 +237,16 @@ am__relativize = \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
+GZIP_ENV = -9
DIST_TARGETS = dist-gzip
# Exists only to be overridden by the user if desired.
AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
-distcleancheck_listfiles = find . -type f -print
+distcleancheck_listfiles = \
+ find . \( -type f -a \! \
+ \( -name .nfs* -o -name .smb* -o -name .__afs* \) \) -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
@@ -325,8 +328,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__rm_f_notfound = @am__rm_f_notfound@
am__tar = @am__tar@
am__untar = @am__untar@
+am__xargs_n = @am__xargs_n@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@@ -379,7 +384,7 @@ top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = include src
pkgconfig_DATA = libHX.pc
-EXTRA_DIST = doc/api.rst doc/assorted.txt doc/bitmaps.rst doc/changelog.rst doc/const_cast.c doc/dirstamp.rst doc/files_and_dirs.rst doc/generator.cpp doc/helper_headers.rst doc/history.rst doc/init.rst doc/inline_clist.rst doc/inline_list.rst doc/install.rst doc/libHX_Documentation.rst doc/linked_list.rst doc/macros.rst doc/maps.rst doc/memory_container.rst doc/misc_functions.rst doc/option_parsing.rst doc/process_management.rst doc/random_numbers.rst doc/shconfig.rst doc/socket_functions.rst doc/string_formatter.rst doc/string_ops.rst doc/strlcpy-timing.rst doc/time_functions.rst doc/typecheck_casts.rst doc/ux-file.rst doc/ux-mmap.rst
+EXTRA_DIST = doc/api.rst doc/assorted.txt doc/bitmaps.rst doc/changelog.rst doc/const_cast.c doc/dirstamp.rst doc/files_and_dirs.rst doc/generator.cpp doc/helper_headers.rst doc/history.rst doc/init.rst doc/inline_clist.rst doc/inline_list.rst doc/install.rst doc/libHX_Documentation.rst doc/linked_list.rst doc/macros.rst doc/maps.rst doc/memory_container.rst doc/misc_functions.rst doc/option_parsing.rst doc/process_management.rst doc/random_numbers.rst doc/scope.rst doc/shconfig.rst doc/socket_functions.rst doc/string_formatter.rst doc/string_ops.rst doc/strlcpy-timing.rst doc/time_functions.rst doc/typecheck_casts.rst doc/ux-file.rst doc/ux-mmap.rst
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -423,12 +428,12 @@ config.h: stamp-h1
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status config.h
+ $(AM_V_at)rm -f stamp-h1
+ $(AM_V_GEN)cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
- ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
- rm -f stamp-h1
- touch $@
+ $(AM_V_GEN)($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ $(AM_V_at)rm -f stamp-h1
+ $(AM_V_at)touch $@
distclean-hdr:
-rm -f config.h stamp-h1
@@ -570,12 +575,13 @@ 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
distdir-am: $(DISTFILES)
$(am__remove_distdir)
- test -d "$(distdir)" || mkdir "$(distdir)"
+ $(AM_V_at)$(MKDIR_P) "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -645,6 +651,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)
@@ -686,9 +696,11 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
+ 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*) \
@@ -696,7 +708,7 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
+ eval GZIP= gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
*.tar.zst*) \
@@ -799,8 +811,8 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -$(am__rm_f) $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -880,8 +892,8 @@ uninstall-am: uninstall-pkgconfigDATA
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
clean-libtool 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 \
+ 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-hdr distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
@@ -903,3 +915,10 @@ ${pkgconfig_DATA}: ${top_builddir}/config.status
# 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:
+
+# Tell GNU make to disable its built-in pattern rules.
+%:: %,v
+%:: RCS/%,v
+%:: RCS/%
+%:: s.%
+%:: SCCS/s.%
diff --git a/aclocal.m4 b/aclocal.m4
index e724e66..63f7b9d 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.18.1 -*- Autoconf -*-
-# Copyright (C) 1996-2021 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.71],,
-[m4_warning([this file was generated for autoconf 2.71.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],,
+[m4_warning([this file was generated for autoconf 2.72.
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-2021 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.16'
+[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.16.5], [],
+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.16.5])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-2021 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,
@@ -70,16 +70,18 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
AC_DEFUN([AM_PROG_AR],
[AC_BEFORE([$0], [LT_INIT])dnl
AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
+AC_BEFORE([$0], [AC_PROG_AR])dnl
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([ar-lib])dnl
AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
: ${AR=ar}
+: ${ARFLAGS=cr}
AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
[AC_LANG_PUSH([C])
am_cv_ar_interface=ar
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
- [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
+ [am_ar_try='$AR $ARFLAGS libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
AC_TRY_EVAL([am_ar_try])
if test "$ac_status" -eq 0; then
am_cv_ar_interface=ar
@@ -118,7 +120,7 @@ AC_SUBST([AR])dnl
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2021 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,
@@ -170,7 +172,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2021 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,
@@ -201,7 +203,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2021 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,
@@ -333,7 +335,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # When given -MP, icc 7.0 and 7.1 complain thus:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
@@ -392,7 +394,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2021 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,
@@ -460,7 +462,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2021 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,
@@ -560,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])],
@@ -594,7 +597,8 @@ if test -z "$CSCOPE"; then
fi
AC_SUBST([CSCOPE])
-AC_REQUIRE([AM_SILENT_RULES])dnl
+AC_REQUIRE([_AM_SILENT_RULES])dnl
+AM_SILENT_RULES([yes])dnl
dnl The testsuite driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
@@ -602,48 +606,9 @@ AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes. So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
- cat >&2 <<'END'
-Oops!
-
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present. This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
-
-Please tell bug-automake@gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message. This
-can help us improve future automake versions.
+AC_REQUIRE([_AM_PROG_RM_F])
+AC_REQUIRE([_AM_PROG_XARGS_N])
-END
- if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
- echo 'Configuration will proceed anyway, since you have set the' >&2
- echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
- echo >&2
- else
- cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <https://www.gnu.org/software/coreutils/>.
-
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
-
-END
- AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
- fi
-fi
-AM_SILENT_RULES([yes])
dnl The trailing newline in this macro's definition is deliberate, for
dnl backward compatibility and to allow trailing 'dnl'-style comments
dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
@@ -676,7 +641,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-2021 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,
@@ -697,7 +662,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2021 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,
@@ -718,7 +683,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2021 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,
@@ -761,7 +726,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2021 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,
@@ -795,7 +760,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2021 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,
@@ -824,7 +789,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2021 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,
@@ -856,7 +821,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.
@@ -871,7 +839,23 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 2001-2021 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,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_RM_F
+# ---------------
+# Check whether 'rm -f' without any arguments works.
+# https://bugs.gnu.org/10828
+AC_DEFUN([_AM_PROG_RM_F],
+[am__rm_f_notfound=
+AS_IF([(rm -f && rm -fr && rm -rf) 2>/dev/null], [], [am__rm_f_notfound='""'])
+AC_SUBST(am__rm_f_notfound)
+])
+
+# 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,
@@ -890,26 +874,181 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2021 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,
# with or without modifications, as long as this notice is preserved.
+# _AM_SLEEP_FRACTIONAL_SECONDS
+# ----------------------------
+AC_DEFUN([_AM_SLEEP_FRACTIONAL_SECONDS], [dnl
+AC_CACHE_CHECK([whether sleep supports fractional seconds],
+ am_cv_sleep_fractional_seconds, [dnl
+AS_IF([sleep 0.001 2>/dev/null], [am_cv_sleep_fractional_seconds=yes],
+ [am_cv_sleep_fractional_seconds=no])
+])])
+
+# _AM_FILESYSTEM_TIMESTAMP_RESOLUTION
+# -----------------------------------
+# Determine the filesystem's resolution for file modification
+# timestamps. The coarsest we know of is FAT, with a resolution
+# of only two seconds, even with the most recent "exFAT" extensions.
+# The finest (e.g. ext4 with large inodes, XFS, ZFS) is one
+# nanosecond, matching clock_gettime. However, it is probably not
+# possible to delay execution of a shell script for less than one
+# millisecond, due to process creation overhead and scheduling
+# granularity, so we don't check for anything finer than that. (See below.)
+AC_DEFUN([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION], [dnl
+AC_REQUIRE([_AM_SLEEP_FRACTIONAL_SECONDS])
+AC_CACHE_CHECK([filesystem timestamp resolution],
+ am_cv_filesystem_timestamp_resolution, [dnl
+# Default to the worst case.
+am_cv_filesystem_timestamp_resolution=2
+
+# Only try to go finer than 1 sec if sleep can do it.
+# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work,
+# - 1 sec is not much of a win compared to 2 sec, and
+# - it takes 2 seconds to perform the test whether 1 sec works.
+#
+# Instead, just use the default 2s on platforms that have 1s resolution,
+# accept the extra 1s delay when using $sleep in the Automake tests, in
+# exchange for not incurring the 2s delay for running the test for all
+# packages.
+#
+am_try_resolutions=
+if test "$am_cv_sleep_fractional_seconds" = yes; then
+ # Even a millisecond often causes a bunch of false positives,
+ # so just try a hundredth of a second. The time saved between .001 and
+ # .01 is not terribly consequential.
+ am_try_resolutions="0.01 0.1 $am_try_resolutions"
+fi
+
+# In order to catch current-generation FAT out, we must *modify* files
+# that already exist; the *creation* timestamp is finer. Use names
+# that make ls -t sort them differently when they have equal
+# timestamps than when they have distinct timestamps, keeping
+# in mind that ls -t prints the *newest* file first.
+rm -f conftest.ts?
+: > conftest.ts1
+: > conftest.ts2
+: > conftest.ts3
+
+# Make sure ls -t actually works. Do 'set' in a subshell so we don't
+# clobber the current shell's arguments. (Outer-level square brackets
+# are removed by m4; they're present so that m4 does not expand
+# <dollar><star>; be careful, easy to get confused.)
+if (
+ set X `[ls -t conftest.ts[12]]` &&
+ {
+ test "$[]*" != "X conftest.ts1 conftest.ts2" ||
+ test "$[]*" != "X conftest.ts2 conftest.ts1";
+ }
+); then :; else
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ _AS_ECHO_UNQUOTED(
+ ["Bad output from ls -t: \"`[ls -t conftest.ts[12]]`\""],
+ [AS_MESSAGE_LOG_FD])
+ AC_MSG_FAILURE([ls -t produces unexpected output.
+Make sure there is not a broken ls alias in your environment.])
+fi
+
+for am_try_res in $am_try_resolutions; do
+ # Any one fine-grained sleep might happen to cross the boundary
+ # between two values of a coarser actual resolution, but if we do
+ # two fine-grained sleeps in a row, at least one of them will fall
+ # entirely within a coarse interval.
+ echo alpha > conftest.ts1
+ sleep $am_try_res
+ echo beta > conftest.ts2
+ sleep $am_try_res
+ echo gamma > conftest.ts3
+
+ # We assume that 'ls -t' will make use of high-resolution
+ # timestamps if the operating system supports them at all.
+ if (set X `ls -t conftest.ts?` &&
+ test "$[]2" = conftest.ts3 &&
+ test "$[]3" = conftest.ts2 &&
+ test "$[]4" = conftest.ts1); then
+ #
+ # Ok, ls -t worked. If we're at a resolution of 1 second, we're done,
+ # because we don't need to test make.
+ make_ok=true
+ if test $am_try_res != 1; then
+ # But if we've succeeded so far with a subsecond resolution, we
+ # have one more thing to check: make. It can happen that
+ # everything else supports the subsecond mtimes, but make doesn't;
+ # notably on macOS, which ships make 3.81 from 2006 (the last one
+ # released under GPLv2). https://bugs.gnu.org/68808
+ #
+ # We test $MAKE if it is defined in the environment, else "make".
+ # It might get overridden later, but our hope is that in practice
+ # it does not matter: it is the system "make" which is (by far)
+ # the most likely to be broken, whereas if the user overrides it,
+ # probably they did so with a better, or at least not worse, make.
+ # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html
+ #
+ # Create a Makefile (real tab character here):
+ rm -f conftest.mk
+ echo 'conftest.ts1: conftest.ts2' >conftest.mk
+ echo ' touch conftest.ts2' >>conftest.mk
+ #
+ # Now, running
+ # touch conftest.ts1; touch conftest.ts2; make
+ # should touch ts1 because ts2 is newer. This could happen by luck,
+ # but most often, it will fail if make's support is insufficient. So
+ # test for several consecutive successes.
+ #
+ # (We reuse conftest.ts[12] because we still want to modify existing
+ # files, not create new ones, per above.)
+ n=0
+ make=${MAKE-make}
+ until test $n -eq 3; do
+ echo one > conftest.ts1
+ sleep $am_try_res
+ echo two > conftest.ts2 # ts2 should now be newer than ts1
+ if $make -f conftest.mk | grep 'up to date' >/dev/null; then
+ make_ok=false
+ break # out of $n loop
+ fi
+ n=`expr $n + 1`
+ done
+ fi
+ #
+ if $make_ok; then
+ # Everything we know to check worked out, so call this resolution good.
+ am_cv_filesystem_timestamp_resolution=$am_try_res
+ break # out of $am_try_res loop
+ fi
+ # Otherwise, we'll go on to check the next resolution.
+ fi
+done
+rm -f conftest.ts?
+# (end _am_filesystem_timestamp_resolution)
+])])
+
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
+[AC_REQUIRE([_AM_FILESYSTEM_TIMESTAMP_RESOLUTION])
+# This check should not be cached, as it may vary across builds of
+# different projects.
+AC_MSG_CHECKING([whether build environment is sane])
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
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
@@ -918,49 +1057,40 @@ esac
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
-if (
- am_has_slept=no
- for am_try in 1 2; do
- echo "timestamp, slept: $am_has_slept" > conftest.file
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
- alias in your environment])
- fi
- if test "$[2]" = conftest.file || test $am_try -eq 2; then
- break
- fi
- # Just in case.
- sleep 1
- am_has_slept=yes
- done
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
+am_build_env_is_sane=no
+am_has_slept=no
+rm -f conftest.file
+for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[]*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ test "$[]2" = conftest.file
+ ); then
+ am_build_env_is_sane=yes
+ break
+ fi
+ # Just in case.
+ sleep "$am_cv_filesystem_timestamp_resolution"
+ am_has_slept=yes
+done
+
+AC_MSG_RESULT([$am_build_env_is_sane])
+if test "$am_build_env_is_sane" = no; then
+ AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-AC_MSG_RESULT([yes])
+
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
- ( sleep 1 ) &
+AS_IF([test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1],, [dnl
+ ( sleep "$am_cv_filesystem_timestamp_resolution" ) &
am_sleep_pid=$!
-fi
+])
AC_CONFIG_COMMANDS_PRE(
[AC_MSG_CHECKING([that generated files are newer than configure])
if test -n "$am_sleep_pid"; then
@@ -971,18 +1101,18 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2021 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,
# with or without modifications, as long as this notice is preserved.
-# AM_SILENT_RULES([DEFAULT])
-# --------------------------
-# Enable less verbose build rules; with the default set to DEFAULT
-# ("yes" being less verbose, "no" or empty being verbose).
-AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules], [dnl
+# _AM_SILENT_RULES
+# ----------------
+# Enable less verbose build rules support.
+AC_DEFUN([_AM_SILENT_RULES],
+[AM_DEFAULT_VERBOSITY=1
+AC_ARG_ENABLE([silent-rules], [dnl
AS_HELP_STRING(
[--enable-silent-rules],
[less verbose build output (undo: "make V=1")])
@@ -990,11 +1120,6 @@ AS_HELP_STRING(
[--disable-silent-rules],
[verbose build output (undo: "make V=0")])dnl
])
-case $enable_silent_rules in @%:@ (((
- yes) AM_DEFAULT_VERBOSITY=0;;
- no) AM_DEFAULT_VERBOSITY=1;;
- *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
-esac
dnl
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
dnl do not support nested variable expansions.
@@ -1013,14 +1138,6 @@ am__doit:
else
am_cv_make_support_nested_variables=no
fi])
-if test $am_cv_make_support_nested_variables = yes; then
- dnl Using '$V' instead of '$(V)' breaks IRIX make.
- AM_V='$(V)'
- AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
- AM_V=$AM_DEFAULT_VERBOSITY
- AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
AC_SUBST([AM_V])dnl
AM_SUBST_NOTMAKE([AM_V])dnl
AC_SUBST([AM_DEFAULT_V])dnl
@@ -1029,9 +1146,37 @@ AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\'
AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+dnl Delay evaluation of AM_DEFAULT_VERBOSITY to the end to allow multiple calls
+dnl to AM_SILENT_RULES to change the default value.
+AC_CONFIG_COMMANDS_PRE([dnl
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+esac
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+])dnl
])
-# Copyright (C) 2001-2021 Free Software Foundation, Inc.
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Set the default verbosity level to DEFAULT ("yes" being less verbose, "no" or
+# empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_REQUIRE([_AM_SILENT_RULES])
+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-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1059,7 +1204,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2021 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,
@@ -1078,7 +1223,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2021 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,
@@ -1124,15 +1269,19 @@ m4_if([$1], [v7],
am_uid=`id -u || echo unknown`
am_gid=`id -g || echo unknown`
AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
- if test $am_uid -le $am_max_uid; then
- AC_MSG_RESULT([yes])
+ if test x$am_uid = xunknown; then
+ AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work])
+ elif test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
else
- AC_MSG_RESULT([no])
- _am_tools=none
+ AC_MSG_RESULT([no])
+ _am_tools=none
fi
AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
- if test $am_gid -le $am_max_gid; then
- AC_MSG_RESULT([yes])
+ if test x$gm_gid = xunknown; then
+ AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work])
+ elif test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
_am_tools=none
@@ -1209,6 +1358,26 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+# 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,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_XARGS_N
+# ----------------
+# Check whether 'xargs -n' works. It should work everywhere, so the fallback
+# is not optimized at all as we never expect to use it.
+AC_DEFUN([_AM_PROG_XARGS_N],
+[AC_CACHE_CHECK([xargs -n works], am_cv_xargs_n_works, [dnl
+AS_IF([test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
+3"], [am_cv_xargs_n_works=yes], [am_cv_xargs_n_works=no])])
+AS_IF([test "$am_cv_xargs_n_works" = yes], [am__xargs_n='xargs -n'], [dnl
+ am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "$@" "$am__xargs_n_arg"; done; }'
+])dnl
+AC_SUBST(am__xargs_n)
+])
+
m4_include([m4/gcc4_visibility.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
diff --git a/build-aux/ar-lib b/build-aux/ar-lib
index c349042..d0a7b5c 100755
--- a/build-aux/ar-lib
+++ b/build-aux/ar-lib
@@ -2,9 +2,9 @@
# Wrapper for Microsoft lib.exe
me=ar-lib
-scriptversion=2019-07-04.01; # UTC
+scriptversion=2025-02-03.05; # UTC
-# Copyright (C) 2010-2021 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"`
@@ -105,11 +116,15 @@ case $1 in
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
Members may be specified in a file named with @FILE.
+
+Report bugs to <bug-automake@gnu.org>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF
exit $?
;;
-v | --v*)
- echo "$me, version $scriptversion"
+ echo "$me (GNU Automake) $scriptversion"
exit $?
;;
esac
@@ -135,6 +150,10 @@ do
AR="$AR $1"
shift
;;
+ -nologo | -NOLOGO)
+ # We always invoke AR with -nologo, so don't need to add it again.
+ shift
+ ;;
*)
action=$1
shift
diff --git a/build-aux/compile b/build-aux/compile
index df363c8..02ff093 100755
--- a/build-aux/compile
+++ b/build-aux/compile
@@ -1,9 +1,9 @@
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2025-06-18.21; # UTC
-# Copyright (C) 1999-2021 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"`
@@ -143,7 +156,7 @@ func_cl_wrapper ()
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
- *.o | *.[oO][bB][jJ])
+ *.o | *.lo | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
@@ -248,14 +261,17 @@ If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF
exit $?
;;
-v | --v*)
- echo "compile $scriptversion"
+ echo "compile (GNU Automake) $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
@@ -340,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:
diff --git a/build-aux/config.guess b/build-aux/config.guess
index 8fbd7fe..6116f18 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -1,14 +1,14 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2021 Free Software Foundation, Inc.
+# Copyright 1992-2024 Free Software Foundation, Inc.
# shellcheck disable=SC2006,SC2268 # see below for rationale
-timestamp='2021-06-03'
+timestamp='2024-07-27'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -47,7 +47,7 @@ me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION]
-Output the configuration name of the system \`$me' is run on.
+Output the configuration name of the system '$me' is run on.
Options:
-h, --help print this help, then exit
@@ -60,13 +60,13 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2021 Free Software Foundation, Inc.
+Copyright 1992-2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
-Try \`$me --help' for more information."
+Try '$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
@@ -102,8 +102,8 @@ GUESS=
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
+# Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still
+# use 'HOST_CC' if defined, but it is deprecated.
# Portable tmp directory creation inspired by the Autoconf team.
@@ -123,7 +123,7 @@ set_cc_for_build() {
dummy=$tmp/dummy
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
,,) echo "int x;" > "$dummy.c"
- for driver in cc gcc c89 c99 ; do
+ for driver in cc gcc c17 c99 c89 ; do
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD=$driver
break
@@ -155,6 +155,9 @@ Linux|GNU|GNU/*)
set_cc_for_build
cat <<-EOF > "$dummy.c"
+ #if defined(__ANDROID__)
+ LIBC=android
+ #else
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
@@ -162,6 +165,8 @@ Linux|GNU|GNU/*)
LIBC=dietlibc
#elif defined(__GLIBC__)
LIBC=gnu
+ #elif defined(__LLVM_LIBC__)
+ LIBC=llvm
#else
#include <stdarg.h>
/* First heuristic to detect musl libc. */
@@ -169,6 +174,7 @@ Linux|GNU|GNU/*)
LIBC=musl
#endif
#endif
+ #endif
EOF
cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
eval "$cc_set_libc"
@@ -448,7 +454,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
# This test works for both compilers.
if test "$CC_FOR_BUILD" != no_compiler_found; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH=x86_64
@@ -470,7 +476,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
UNAME_RELEASE=`uname -v`
;;
esac
- # Japanese Language versions have a version number like `4.1.3-JL'.
+ # Japanese Language versions have a version number like '4.1.3-JL'.
SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
GUESS=sparc-sun-sunos$SUN_REL
;;
@@ -639,7 +645,8 @@ EOF
sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
- main()
+ int
+ main ()
{
if (!__power_pc())
exit(1);
@@ -723,7 +730,8 @@ EOF
#include <stdlib.h>
#include <unistd.h>
- int main ()
+ int
+ main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
@@ -915,7 +923,7 @@ EOF
fi
;;
*:FreeBSD:*:*)
- UNAME_PROCESSOR=`/usr/bin/uname -p`
+ UNAME_PROCESSOR=`uname -p`
case $UNAME_PROCESSOR in
amd64)
UNAME_PROCESSOR=x86_64 ;;
@@ -940,6 +948,9 @@ EOF
i*:PW*:*)
GUESS=$UNAME_MACHINE-pc-pw32
;;
+ *:SerenityOS:*:*)
+ GUESS=$UNAME_MACHINE-pc-serenity
+ ;;
*:Interix*:*)
case $UNAME_MACHINE in
x86)
@@ -966,19 +977,45 @@ EOF
# the GNU system
GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
- GUESS=$GNU_ARCH-${VENDOR}-$LIBC$GNU_REL
+ GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
- GUESS=$UNAME_MACHINE-${VENDOR}-$GNU_SYS$GNU_REL-$LIBC
+ GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+ ;;
+ x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*)
+ GUESS="$UNAME_MACHINE-pc-managarm-mlibc"
+ ;;
+ *:[Mm]anagarm:*:*)
+ GUESS="$UNAME_MACHINE-${VENDOR}-managarm-mlibc"
;;
*:Minix:*:*)
GUESS=$UNAME_MACHINE-${VENDOR}-minix
;;
aarch64:Linux:*:*)
- GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
+ set_cc_for_build
+ CPU=$UNAME_MACHINE
+ LIBCABI=$LIBC
+ if test "$CC_FOR_BUILD" != no_compiler_found; then
+ ABI=64
+ sed 's/^ //' << EOF > "$dummy.c"
+ #ifdef __ARM_EABI__
+ #ifdef __ARM_PCS_VFP
+ ABI=eabihf
+ #else
+ ABI=eabi
+ #endif
+ #endif
+EOF
+ cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
+ eval "$cc_set_abi"
+ case $ABI in
+ eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;;
+ esac
+ fi
+ GUESS=$CPU-${VENDOR}-linux-$LIBCABI
;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
@@ -1036,7 +1073,7 @@ EOF
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
i*86:Linux:*:*)
- GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
+ GUESS=$UNAME_MACHINE-pc-linux-$LIBC
;;
ia64:Linux:*:*)
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
@@ -1044,7 +1081,16 @@ EOF
k1om:Linux:*:*)
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
- loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+ kvx:Linux:*:*)
+ GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
+ ;;
+ kvx:cos:*:*)
+ GUESS=$UNAME_MACHINE-${VENDOR}-cos
+ ;;
+ kvx:mbr:*:*)
+ GUESS=$UNAME_MACHINE-${VENDOR}-mbr
+ ;;
+ loongarch32:Linux:*:* | loongarch64:Linux:*:*)
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
;;
m32r*:Linux:*:*)
@@ -1099,7 +1145,7 @@ EOF
EOF
cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
eval "$cc_set_vars"
- test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-${VENDOR}-linux-$LIBCABI"; exit; }
+ test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
;;
mips64el:Linux:*:*)
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
@@ -1159,16 +1205,27 @@ EOF
;;
x86_64:Linux:*:*)
set_cc_for_build
+ CPU=$UNAME_MACHINE
LIBCABI=$LIBC
if test "$CC_FOR_BUILD" != no_compiler_found; then
- if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
- (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_X32 >/dev/null
- then
- LIBCABI=${LIBC}x32
- fi
+ ABI=64
+ sed 's/^ //' << EOF > "$dummy.c"
+ #ifdef __i386__
+ ABI=x86
+ #else
+ #ifdef __ILP32__
+ ABI=x32
+ #endif
+ #endif
+EOF
+ cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
+ eval "$cc_set_abi"
+ case $ABI in
+ x86) CPU=i686 ;;
+ x32) LIBCABI=${LIBC}x32 ;;
+ esac
fi
- GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBCABI
+ GUESS=$CPU-pc-linux-$LIBCABI
;;
xtensa*:Linux:*:*)
GUESS=$UNAME_MACHINE-${VENDOR}-linux-$LIBC
@@ -1188,7 +1245,7 @@ EOF
GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
;;
i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
+ # If we were able to find 'uname', then EMX Unix compatibility
# is probably installed.
GUESS=$UNAME_MACHINE-pc-os2-emx
;;
@@ -1329,7 +1386,7 @@ EOF
GUESS=ns32k-sni-sysv
fi
;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
GUESS=i586-unisys-sysv4
;;
@@ -1375,8 +1432,11 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
GUESS=i586-pc-haiku
;;
- x86_64:Haiku:*:*)
- GUESS=x86_64-${VENDOR}-haiku
+ ppc:Haiku:*:*) # Haiku running on Apple PowerPC
+ GUESS=powerpc-apple-haiku
+ ;;
+ *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
+ GUESS=$UNAME_MACHINE-${VENDOR}-haiku
;;
SX-4:SUPER-UX:*:*)
GUESS=sx4-nec-superux$UNAME_RELEASE
@@ -1533,6 +1593,9 @@ EOF
i*86:rdos:*:*)
GUESS=$UNAME_MACHINE-pc-rdos
;;
+ i*86:Fiwix:*:*)
+ GUESS=$UNAME_MACHINE-pc-fiwix
+ ;;
*:AROS:*:*)
GUESS=$UNAME_MACHINE-${VENDOR}-aros
;;
@@ -1545,6 +1608,9 @@ EOF
*:Unleashed:*:*)
GUESS=$UNAME_MACHINE-${VENDOR}-unleashed$UNAME_RELEASE
;;
+ *:Ironclad:*:*)
+ GUESS=$UNAME_MACHINE-${VENDOR}-ironclad
+ ;;
esac
# Do we have a guess based on uname results?
@@ -1568,6 +1634,7 @@ cat > "$dummy.c" <<EOF
#endif
#endif
#endif
+int
main ()
{
#if defined (sony)
diff --git a/build-aux/config.sub b/build-aux/config.sub
index d74fb6d..4aaae46 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -1,14 +1,14 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2021 Free Software Foundation, Inc.
+# Copyright 1992-2024 Free Software Foundation, Inc.
-# shellcheck disable=SC2006,SC2268 # see below for rationale
+# shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale
-timestamp='2021-08-14'
+timestamp='2024-05-27'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
+# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -76,13 +76,13 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2021 Free Software Foundation, Inc.
+Copyright 1992-2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
-Try \`$me --help' for more information."
+Try '$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
@@ -120,7 +120,6 @@ case $# in
esac
# Split fields of configuration type
-# shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read field1 field2 field3 field4 <<EOF
$1
@@ -130,7 +129,7 @@ IFS=$saved_IFS
# Separate into logical components for further validation
case $1 in
*-*-*-*-*)
- echo Invalid configuration \`"$1"\': more than four components >&2
+ echo "Invalid configuration '$1': more than four components" >&2
exit 1
;;
*-*-*-*)
@@ -142,10 +141,21 @@ case $1 in
# parts
maybe_os=$field2-$field3
case $maybe_os in
- nto-qnx* | linux-* | uclinux-uclibc* \
- | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
- | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
- | storm-chaos* | os2-emx* | rtmk-nova*)
+ cloudabi*-eabi* \
+ | kfreebsd*-gnu* \
+ | knetbsd*-gnu* \
+ | kopensolaris*-gnu* \
+ | linux-* \
+ | managarm-* \
+ | netbsd*-eabi* \
+ | netbsd*-gnu* \
+ | nto-qnx* \
+ | os2-emx* \
+ | rtmk-nova* \
+ | storm-chaos* \
+ | uclinux-gnu* \
+ | uclinux-uclibc* \
+ | windows-* )
basic_machine=$field1
basic_os=$maybe_os
;;
@@ -160,8 +170,12 @@ case $1 in
esac
;;
*-*)
- # A lone config we happen to match not fitting any pattern
case $field1-$field2 in
+ # Shorthands that happen to contain a single dash
+ convex-c[12] | convex-c3[248])
+ basic_machine=$field2-convex
+ basic_os=
+ ;;
decstation-3100)
basic_machine=mips-dec
basic_os=
@@ -169,28 +183,88 @@ case $1 in
*-*)
# Second component is usually, but not always the OS
case $field2 in
- # Prevent following clause from handling this valid os
+ # Do not treat sunos as a manufacturer
sun*os*)
basic_machine=$field1
basic_os=$field2
;;
- zephyr*)
- basic_machine=$field1-unknown
- basic_os=$field2
- ;;
# Manufacturers
- dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
- | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
- | unicom* | ibm* | next | hp | isi* | apollo | altos* \
- | convergent* | ncr* | news | 32* | 3600* | 3100* \
- | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
- | ultra | tti* | harris | dolphin | highlevel | gould \
- | cbm | ns | masscomp | apple | axis | knuth | cray \
- | microblaze* | sim | cisco \
- | oki | wec | wrs | winbond)
+ 3100* \
+ | 32* \
+ | 3300* \
+ | 3600* \
+ | 7300* \
+ | acorn \
+ | altos* \
+ | apollo \
+ | apple \
+ | atari \
+ | att* \
+ | axis \
+ | be \
+ | bull \
+ | cbm \
+ | ccur \
+ | cisco \
+ | commodore \
+ | convergent* \
+ | convex* \
+ | cray \
+ | crds \
+ | dec* \
+ | delta* \
+ | dg \
+ | digital \
+ | dolphin \
+ | encore* \
+ | gould \
+ | harris \
+ | highlevel \
+ | hitachi* \
+ | hp \
+ | ibm* \
+ | intergraph \
+ | isi* \
+ | knuth \
+ | masscomp \
+ | microblaze* \
+ | mips* \
+ | motorola* \
+ | ncr* \
+ | news \
+ | next \
+ | ns \
+ | oki \
+ | omron* \
+ | pc533* \
+ | rebel \
+ | rom68k \
+ | rombug \
+ | semi \
+ | sequent* \
+ | siemens \
+ | sgi* \
+ | siemens \
+ | sim \
+ | sni \
+ | sony* \
+ | stratus \
+ | sun \
+ | sun[234]* \
+ | tektronix \
+ | tti* \
+ | ultra \
+ | unicom* \
+ | wec \
+ | winbond \
+ | wrs)
basic_machine=$field1-$field2
basic_os=
;;
+ zephyr*)
+ basic_machine=$field1-unknown
+ basic_os=$field2
+ ;;
*)
basic_machine=$field1
basic_os=$field2
@@ -271,26 +345,6 @@ case $1 in
basic_machine=arm-unknown
basic_os=cegcc
;;
- convex-c1)
- basic_machine=c1-convex
- basic_os=bsd
- ;;
- convex-c2)
- basic_machine=c2-convex
- basic_os=bsd
- ;;
- convex-c32)
- basic_machine=c32-convex
- basic_os=bsd
- ;;
- convex-c34)
- basic_machine=c34-convex
- basic_os=bsd
- ;;
- convex-c38)
- basic_machine=c38-convex
- basic_os=bsd
- ;;
cray)
basic_machine=j90-cray
basic_os=unicos
@@ -713,15 +767,26 @@ case $basic_machine in
vendor=dec
basic_os=tops20
;;
- delta | 3300 | motorola-3300 | motorola-delta \
- | 3300-motorola | delta-motorola)
+ delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300)
cpu=m68k
vendor=motorola
;;
- dpx2*)
+ # This used to be dpx2*, but that gets the RS6000-based
+ # DPX/20 and the x86-based DPX/2-100 wrong. See
+ # https://oldskool.silicium.org/stations/bull_dpx20.htm
+ # https://www.feb-patrimoine.com/english/bull_dpx2.htm
+ # https://www.feb-patrimoine.com/english/unix_and_bull.htm
+ dpx2 | dpx2[23]00 | dpx2[23]xx)
cpu=m68k
vendor=bull
- basic_os=sysv3
+ ;;
+ dpx2100 | dpx21xx)
+ cpu=i386
+ vendor=bull
+ ;;
+ dpx20)
+ cpu=rs6000
+ vendor=bull
;;
encore | umax | mmax)
cpu=ns32k
@@ -836,18 +901,6 @@ case $basic_machine in
next | m*-next)
cpu=m68k
vendor=next
- case $basic_os in
- openstep*)
- ;;
- nextstep*)
- ;;
- ns2*)
- basic_os=nextstep2
- ;;
- *)
- basic_os=nextstep3
- ;;
- esac
;;
np1)
cpu=np1
@@ -936,14 +989,13 @@ case $basic_machine in
;;
*-*)
- # shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read cpu vendor <<EOF
$basic_machine
EOF
IFS=$saved_IFS
;;
- # We use `pc' rather than `unknown'
+ # We use 'pc' rather than 'unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i*86 | x86_64)
@@ -971,15 +1023,19 @@ unset -v basic_machine
# Decode basic machines in the full and proper CPU-Company form.
case $cpu-$vendor in
- # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
- # some cases the only manufacturer, in others, it is the most popular.
+ # Here we handle the default manufacturer of certain CPU types in canonical form.
+ # It is in some cases the only manufacturer, in others, it is the most popular.
+ c[12]-convex | c[12]-unknown | c3[248]-convex | c3[248]-unknown)
+ vendor=convex
+ basic_os=${basic_os:-bsd}
+ ;;
craynv-unknown)
vendor=cray
basic_os=${basic_os:-unicosmp}
;;
c90-unknown | c90-cray)
vendor=cray
- basic_os=${Basic_os:-unicos}
+ basic_os=${basic_os:-unicos}
;;
fx80-unknown)
vendor=alliant
@@ -1020,11 +1076,34 @@ case $cpu-$vendor in
;;
# Here we normalize CPU types with a missing or matching vendor
- dpx20-unknown | dpx20-bull)
- cpu=rs6000
- vendor=bull
+ armh-unknown | armh-alt)
+ cpu=armv7l
+ vendor=alt
+ basic_os=${basic_os:-linux-gnueabihf}
+ ;;
+
+ # Normalized CPU+vendor pairs that imply an OS, if not otherwise specified
+ m68k-isi)
+ basic_os=${basic_os:-sysv}
+ ;;
+ m68k-sony)
+ basic_os=${basic_os:-newsos}
+ ;;
+ m68k-tektronix)
+ basic_os=${basic_os:-bsd}
+ ;;
+ m88k-harris)
+ basic_os=${basic_os:-sysv3}
+ ;;
+ i386-bull | m68k-bull)
+ basic_os=${basic_os:-sysv3}
+ ;;
+ rs6000-bull)
basic_os=${basic_os:-bosx}
;;
+ mips-sni)
+ basic_os=${basic_os:-sysv4}
+ ;;
# Here we normalize CPU types irrespective of the vendor
amd64-*)
@@ -1032,7 +1111,7 @@ case $cpu-$vendor in
;;
blackfin-*)
cpu=bfin
- basic_os=linux
+ basic_os=${basic_os:-linux}
;;
c54x-*)
cpu=tic54x
@@ -1055,7 +1134,7 @@ case $cpu-$vendor in
;;
m68knommu-*)
cpu=m68k
- basic_os=linux
+ basic_os=${basic_os:-linux}
;;
m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
cpu=s12z
@@ -1065,12 +1144,12 @@ case $cpu-$vendor in
;;
parisc-*)
cpu=hppa
- basic_os=linux
+ basic_os=${basic_os:-linux}
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
cpu=i586
;;
- pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+ pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
cpu=i686
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
@@ -1079,9 +1158,6 @@ case $cpu-$vendor in
pentium4-*)
cpu=i786
;;
- pc98-*)
- cpu=i386
- ;;
ppc-* | ppcbe-*)
cpu=powerpc
;;
@@ -1115,13 +1191,10 @@ case $cpu-$vendor in
tx39el-*)
cpu=mipstx39el
;;
- x64-*)
- cpu=x86_64
- ;;
xscale-* | xscalee[bl]-*)
cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
;;
- arm64-*)
+ arm64-* | aarch64le-*)
cpu=aarch64
;;
@@ -1173,114 +1246,231 @@ case $cpu-$vendor in
# Recognize the canonical CPU types that are allowed with any
# company name.
case $cpu in
- 1750a | 580 \
+ 1750a \
+ | 580 \
+ | [cjt]90 \
| a29k \
- | aarch64 | aarch64_be \
+ | aarch64 \
+ | aarch64_be \
+ | aarch64c \
| abacus \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
- | alphapca5[67] | alpha64pca5[67] \
+ | alpha \
+ | alpha64 \
+ | alpha64ev56 \
+ | alpha64ev6[78] \
+ | alpha64ev[4-8] \
+ | alpha64pca5[67] \
+ | alphaev56 \
+ | alphaev6[78] \
+ | alphaev[4-8] \
+ | alphapca5[67] \
| am33_2.0 \
| amdgcn \
- | arc | arceb | arc32 | arc64 \
- | arm | arm[lb]e | arme[lb] | armv* \
- | avr | avr32 \
+ | arc \
+ | arc32 \
+ | arc64 \
+ | arceb \
+ | arm \
+ | arm64e \
+ | arm64ec \
+ | arm[lb]e \
+ | arme[lb] \
+ | armv* \
| asmjs \
+ | avr \
+ | avr32 \
| ba \
- | be32 | be64 \
- | bfin | bpf | bs2000 \
- | c[123]* | c30 | [cjt]90 | c4x \
- | c8051 | clipper | craynv | csky | cydra \
- | d10v | d30v | dlx | dsp16xx \
- | e2k | elxsi | epiphany \
- | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
- | h8300 | h8500 \
- | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | be32 \
+ | be64 \
+ | bfin \
+ | bpf \
+ | bs2000 \
+ | c30 \
+ | c4x \
+ | c8051 \
+ | c[123]* \
+ | clipper \
+ | craynv \
+ | csky \
+ | cydra \
+ | d10v \
+ | d30v \
+ | dlx \
+ | dsp16xx \
+ | e2k \
+ | elxsi \
+ | epiphany \
+ | f30[01] \
+ | f700 \
+ | fido \
+ | fr30 \
+ | frv \
+ | ft32 \
+ | fx80 \
+ | h8300 \
+ | h8500 \
| hexagon \
- | i370 | i*86 | i860 | i960 | ia16 | ia64 \
- | ip2k | iq2000 \
+ | hppa \
+ | hppa1.[01] \
+ | hppa2.0 \
+ | hppa2.0[nw] \
+ | hppa64 \
+ | i*86 \
+ | i370 \
+ | i860 \
+ | i960 \
+ | ia16 \
+ | ia64 \
+ | ip2k \
+ | iq2000 \
+ | javascript \
| k1om \
- | le32 | le64 \
+ | kvx \
+ | le32 \
+ | le64 \
| lm32 \
- | loongarch32 | loongarch64 | loongarchx32 \
- | m32c | m32r | m32rle \
- | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
- | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
- | m88110 | m88k | maxq | mb | mcore | mep | metag \
- | microblaze | microblazeel \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64eb | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa32r3 | mipsisa32r3el \
- | mipsisa32r5 | mipsisa32r5el \
- | mipsisa32r6 | mipsisa32r6el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64r3 | mipsisa64r3el \
- | mipsisa64r5 | mipsisa64r5el \
- | mipsisa64r6 | mipsisa64r6el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipsr5900 | mipsr5900el \
- | mipstx39 | mipstx39el \
+ | loongarch32 \
+ | loongarch64 \
+ | m32c \
+ | m32r \
+ | m32rle \
+ | m5200 \
+ | m68000 \
+ | m680[012346]0 \
+ | m6811 \
+ | m6812 \
+ | m68360 \
+ | m683?2 \
+ | m68hc11 \
+ | m68hc12 \
+ | m68hcs12x \
+ | m68k \
+ | m88110 \
+ | m88k \
+ | maxq \
+ | mb \
+ | mcore \
+ | mep \
+ | metag \
+ | microblaze \
+ | microblazeel \
+ | mips* \
| mmix \
- | mn10200 | mn10300 \
+ | mn10200 \
+ | mn10300 \
| moxie \
- | mt \
| msp430 \
- | nds32 | nds32le | nds32be \
+ | mt \
+ | nanomips* \
+ | nds32 \
+ | nds32be \
+ | nds32le \
| nfp \
- | nios | nios2 | nios2eb | nios2el \
- | none | np1 | ns16k | ns32k | nvptx \
+ | nios \
+ | nios2 \
+ | nios2eb \
+ | nios2el \
+ | none \
+ | np1 \
+ | ns16k \
+ | ns32k \
+ | nvptx \
| open8 \
| or1k* \
| or32 \
| orion \
+ | pdp10 \
+ | pdp11 \
| picochip \
- | pdp10 | pdp11 | pj | pjl | pn | power \
- | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+ | pj \
+ | pjl \
+ | pn \
+ | power \
+ | powerpc \
+ | powerpc64 \
+ | powerpc64le \
+ | powerpcle \
+ | powerpcspe \
| pru \
| pyramid \
- | riscv | riscv32 | riscv32be | riscv64 | riscv64be \
- | rl78 | romp | rs6000 | rx \
- | s390 | s390x \
+ | riscv \
+ | riscv32 \
+ | riscv32be \
+ | riscv64 \
+ | riscv64be \
+ | rl78 \
+ | romp \
+ | rs6000 \
+ | rx \
+ | s390 \
+ | s390x \
| score \
- | sh | shl \
- | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
- | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+ | sh \
+ | sh64 \
+ | sh64le \
+ | sh[12345][lb]e \
+ | sh[1234] \
+ | sh[1234]e[lb] \
+ | sh[23]e \
+ | sh[23]ele \
+ | sh[24]a \
+ | sh[24]ae[lb] \
+ | sh[lb]e \
+ | she[lb] \
+ | shl \
+ | sparc \
+ | sparc64 \
+ | sparc64b \
+ | sparc64v \
+ | sparc86x \
+ | sparclet \
| sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+ | sparcv8 \
+ | sparcv9 \
+ | sparcv9b \
+ | sparcv9v \
| spu \
+ | sv1 \
+ | sx* \
| tahoe \
| thumbv7* \
- | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+ | tic30 \
+ | tic4x \
+ | tic54x \
+ | tic55x \
+ | tic6x \
+ | tic80 \
| tron \
| ubicom32 \
- | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+ | v70 \
+ | v810 \
+ | v850 \
+ | v850e \
+ | v850e1 \
+ | v850e2 \
+ | v850e2v3 \
+ | v850es \
| vax \
+ | vc4 \
| visium \
| w65 \
- | wasm32 | wasm64 \
+ | wasm32 \
+ | wasm64 \
| we32k \
- | x86 | x86_64 | xc16x | xgate | xps100 \
- | xstormy16 | xtensa* \
+ | x86 \
+ | x86_64 \
+ | xc16x \
+ | xgate \
+ | xps100 \
+ | xstormy16 \
+ | xtensa* \
| ymp \
- | z8k | z80)
+ | z80 \
+ | z8k)
;;
*)
- echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+ echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2
exit 1
;;
esac
@@ -1301,11 +1491,12 @@ esac
# Decode manufacturer-specific aliases for certain operating systems.
-if test x$basic_os != x
+if test x"$basic_os" != x
then
-# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
# set os.
+obj=
case $basic_os in
gnu/linux*)
kernel=linux
@@ -1320,7 +1511,6 @@ case $basic_os in
os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
;;
*-*)
- # shellcheck disable=SC2162
saved_IFS=$IFS
IFS="-" read kernel os <<EOF
$basic_os
@@ -1336,6 +1526,10 @@ EOF
kernel=linux
os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
;;
+ managarm*)
+ kernel=managarm
+ os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'`
+ ;;
*)
kernel=
os=$basic_os
@@ -1363,6 +1557,23 @@ case $os in
unixware*)
os=sysv4.2uw
;;
+ # The marketing names for NeXT's operating systems were
+ # NeXTSTEP, NeXTSTEP 2, OpenSTEP 3, OpenSTEP 4. 'openstep' is
+ # mapped to 'openstep3', but 'openstep1' and 'openstep2' are
+ # mapped to 'nextstep' and 'nextstep2', consistent with the
+ # treatment of SunOS/Solaris.
+ ns | ns1 | nextstep | nextstep1 | openstep1)
+ os=nextstep
+ ;;
+ ns2 | nextstep2 | openstep2)
+ os=nextstep2
+ ;;
+ ns3 | nextstep3 | openstep | openstep3)
+ os=openstep3
+ ;;
+ ns4 | nextstep4 | openstep4)
+ os=openstep4
+ ;;
# es1800 is here to avoid being matched by es* (a different OS)
es1800*)
os=ose
@@ -1433,6 +1644,7 @@ case $os in
;;
utek*)
os=bsd
+ vendor=`echo "$vendor" | sed -e 's|^unknown$|tektronix|'`
;;
dynix*)
os=bsd
@@ -1449,21 +1661,25 @@ case $os in
386bsd)
os=bsd
;;
- ctix* | uts*)
+ ctix*)
os=sysv
+ vendor=`echo "$vendor" | sed -e 's|^unknown$|convergent|'`
;;
- nova*)
- os=rtmk-nova
+ uts*)
+ os=sysv
;;
- ns2)
- os=nextstep2
+ nova*)
+ kernel=rtmk
+ os=nova
;;
# Preserve the version number of sinix5.
sinix5.*)
os=`echo "$os" | sed -e 's|sinix|sysv|'`
+ vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
;;
sinix*)
os=sysv4
+ vendor=`echo "$vendor" | sed -e 's|^unknown$|sni|'`
;;
tpf*)
os=tpf
@@ -1501,10 +1717,16 @@ case $os in
os=eabi
;;
*)
- os=elf
+ os=
+ obj=elf
;;
esac
;;
+ aout* | coff* | elf* | pe*)
+ # These are machine code file formats, not OSes
+ obj=$os
+ os=
+ ;;
*)
# No normalization, but not necessarily accepted, that comes below.
;;
@@ -1523,12 +1745,15 @@ else
# system, and we'll never get to this point.
kernel=
+obj=
case $cpu-$vendor in
score-*)
- os=elf
+ os=
+ obj=elf
;;
spu-*)
- os=elf
+ os=
+ obj=elf
;;
*-acorn)
os=riscix1.2
@@ -1538,28 +1763,35 @@ case $cpu-$vendor in
os=gnu
;;
arm*-semi)
- os=aout
+ os=
+ obj=aout
;;
c4x-* | tic4x-*)
- os=coff
+ os=
+ obj=coff
;;
c8051-*)
- os=elf
+ os=
+ obj=elf
;;
clipper-intergraph)
os=clix
;;
hexagon-*)
- os=elf
+ os=
+ obj=elf
;;
tic54x-*)
- os=coff
+ os=
+ obj=coff
;;
tic55x-*)
- os=coff
+ os=
+ obj=coff
;;
tic6x-*)
- os=coff
+ os=
+ obj=coff
;;
# This must come before the *-dec entry.
pdp10-*)
@@ -1581,28 +1813,43 @@ case $cpu-$vendor in
os=sunos3
;;
m68*-cisco)
- os=aout
+ os=
+ obj=aout
;;
mep-*)
- os=elf
+ os=
+ obj=elf
+ ;;
+ # The -sgi and -siemens entries must be before the mips- entry
+ # or we get the wrong os.
+ *-sgi)
+ os=irix
+ ;;
+ *-siemens)
+ os=sysv4
;;
mips*-cisco)
- os=elf
+ os=
+ obj=elf
;;
- mips*-*)
- os=elf
+ mips*-*|nanomips*-*)
+ os=
+ obj=elf
;;
or32-*)
- os=coff
+ os=
+ obj=coff
;;
- *-tti) # must be before sparc entry or we get the wrong os.
+ # This must be before the sparc-* entry or we get the wrong os.
+ *-tti)
os=sysv3
;;
sparc-* | *-sun)
os=sunos4.1.1
;;
pru-*)
- os=elf
+ os=
+ obj=elf
;;
*-be)
os=beos
@@ -1626,7 +1873,7 @@ case $cpu-$vendor in
os=hpux
;;
*-hitachi)
- os=hiux
+ os=hiuxwe2
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=sysv
@@ -1670,12 +1917,6 @@ case $cpu-$vendor in
*-encore)
os=bsd
;;
- *-sgi)
- os=irix
- ;;
- *-siemens)
- os=sysv4
- ;;
*-masscomp)
os=rtu
;;
@@ -1683,10 +1924,12 @@ case $cpu-$vendor in
os=uxpv
;;
*-rom68k)
- os=coff
+ os=
+ obj=coff
;;
*-*bug)
- os=coff
+ os=
+ obj=coff
;;
*-apple)
os=macos
@@ -1704,10 +1947,11 @@ esac
fi
-# Now, validate our (potentially fixed-up) OS.
+# Now, validate our (potentially fixed-up) individual pieces (OS, OBJ).
+
case $os in
# Sometimes we do "kernel-libc", so those need to count as OSes.
- musl* | newlib* | relibc* | uclibc*)
+ llvm* | musl* | newlib* | relibc* | uclibc*)
;;
# Likewise for "kernel-abi"
eabi* | gnueabi*)
@@ -1715,82 +1959,308 @@ case $os in
# VxWorks passes extra cpu info in the 4th filed.
simlinux | simwindows | spe)
;;
+ # See `case $cpu-$os` validation below
+ ghcjs)
+ ;;
# Now accept the basic system types.
- # The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
- | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
- | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
- | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
- | hiux* | abug | nacl* | netware* | windows* \
- | os9* | macos* | osx* | ios* \
- | mpw* | magic* | mmixware* | mon960* | lnews* \
- | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
- | aos* | aros* | cloudabi* | sortix* | twizzler* \
- | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
- | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
- | mirbsd* | netbsd* | dicos* | openedition* | ose* \
- | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
- | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
- | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
- | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
- | udi* | lites* | ieee* | go32* | aux* | hcos* \
- | chorusrdb* | cegcc* | glidix* | serenity* \
- | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
- | midipix* | mingw32* | mingw64* | mint* \
- | uxpv* | beos* | mpeix* | udk* | moxiebox* \
- | interix* | uwin* | mks* | rhapsody* | darwin* \
- | openstep* | oskit* | conix* | pw32* | nonstopux* \
- | storm-chaos* | tops10* | tenex* | tops20* | its* \
- | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
- | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
- | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
- | skyos* | haiku* | rdos* | toppers* | drops* | es* \
- | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
- | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
- | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*)
+ abug \
+ | aix* \
+ | amdhsa* \
+ | amigados* \
+ | amigaos* \
+ | android* \
+ | aof* \
+ | aos* \
+ | aros* \
+ | atheos* \
+ | auroraux* \
+ | aux* \
+ | beos* \
+ | bitrig* \
+ | bme* \
+ | bosx* \
+ | bsd* \
+ | cegcc* \
+ | chorusos* \
+ | chorusrdb* \
+ | clix* \
+ | cloudabi* \
+ | cnk* \
+ | conix* \
+ | cos* \
+ | cxux* \
+ | cygwin* \
+ | darwin* \
+ | dgux* \
+ | dicos* \
+ | dnix* \
+ | domain* \
+ | dragonfly* \
+ | drops* \
+ | ebmon* \
+ | ecoff* \
+ | ekkobsd* \
+ | emscripten* \
+ | emx* \
+ | es* \
+ | fiwix* \
+ | freebsd* \
+ | fuchsia* \
+ | genix* \
+ | genode* \
+ | glidix* \
+ | gnu* \
+ | go32* \
+ | haiku* \
+ | hcos* \
+ | hiux* \
+ | hms* \
+ | hpux* \
+ | ieee* \
+ | interix* \
+ | ios* \
+ | iris* \
+ | irix* \
+ | ironclad* \
+ | isc* \
+ | its* \
+ | l4re* \
+ | libertybsd* \
+ | lites* \
+ | lnews* \
+ | luna* \
+ | lynxos* \
+ | mach* \
+ | macos* \
+ | magic* \
+ | mbr* \
+ | midipix* \
+ | midnightbsd* \
+ | mingw32* \
+ | mingw64* \
+ | minix* \
+ | mint* \
+ | mirbsd* \
+ | mks* \
+ | mlibc* \
+ | mmixware* \
+ | mon960* \
+ | morphos* \
+ | moss* \
+ | moxiebox* \
+ | mpeix* \
+ | mpw* \
+ | msdos* \
+ | msys* \
+ | mvs* \
+ | nacl* \
+ | netbsd* \
+ | netware* \
+ | newsos* \
+ | nextstep* \
+ | nindy* \
+ | nonstopux* \
+ | nova* \
+ | nsk* \
+ | nucleus* \
+ | nx6 \
+ | nx7 \
+ | oabi* \
+ | ohos* \
+ | onefs* \
+ | openbsd* \
+ | openedition* \
+ | openstep* \
+ | os108* \
+ | os2* \
+ | os400* \
+ | os68k* \
+ | os9* \
+ | ose* \
+ | osf* \
+ | oskit* \
+ | osx* \
+ | palmos* \
+ | phoenix* \
+ | plan9* \
+ | powermax* \
+ | powerunix* \
+ | proelf* \
+ | psos* \
+ | psp* \
+ | ptx* \
+ | pw32* \
+ | qnx* \
+ | rdos* \
+ | redox* \
+ | rhapsody* \
+ | riscix* \
+ | riscos* \
+ | rtems* \
+ | rtmk* \
+ | rtu* \
+ | scout* \
+ | secbsd* \
+ | sei* \
+ | serenity* \
+ | sim* \
+ | skyos* \
+ | solaris* \
+ | solidbsd* \
+ | sortix* \
+ | storm-chaos* \
+ | sunos \
+ | sunos[34]* \
+ | superux* \
+ | syllable* \
+ | sym* \
+ | sysv* \
+ | tenex* \
+ | tirtos* \
+ | toppers* \
+ | tops10* \
+ | tops20* \
+ | tpf* \
+ | tvos* \
+ | twizzler* \
+ | uclinux* \
+ | udi* \
+ | udk* \
+ | ultrix* \
+ | unicos* \
+ | uniplus* \
+ | unleashed* \
+ | unos* \
+ | uwin* \
+ | uxpv* \
+ | v88r* \
+ |*vms* \
+ | vos* \
+ | vsta* \
+ | vxsim* \
+ | vxworks* \
+ | wasi* \
+ | watchos* \
+ | wince* \
+ | windiss* \
+ | windows* \
+ | winnt* \
+ | xenix* \
+ | xray* \
+ | zephyr* \
+ | zvmoe* )
;;
# This one is extra strict with allowed versions
sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
;;
+ # This refers to builds using the UEFI calling convention
+ # (which depends on the architecture) and PE file format.
+ # Note that this is both a different calling convention and
+ # different file format than that of GNU-EFI
+ # (x86_64-w64-mingw32).
+ uefi)
+ ;;
none)
;;
+ kernel* | msvc* )
+ # Restricted further below
+ ;;
+ '')
+ if test x"$obj" = x
+ then
+ echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2
+ fi
+ ;;
+ *)
+ echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2
+ exit 1
+ ;;
+esac
+
+case $obj in
+ aout* | coff* | elf* | pe*)
+ ;;
+ '')
+ # empty is fine
+ ;;
*)
- echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+ echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we handle the constraint that a (synthetic) cpu and os are
+# valid only in combination with each other and nowhere else.
+case $cpu-$os in
+ # The "javascript-unknown-ghcjs" triple is used by GHC; we
+ # accept it here in order to tolerate that, but reject any
+ # variations.
+ javascript-ghcjs)
+ ;;
+ javascript-* | *-ghcjs)
+ echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2
exit 1
;;
esac
# As a final step for OS-related things, validate the OS-kernel combination
# (given a valid OS), if there is a kernel.
-case $kernel-$os in
- linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
- | linux-musl* | linux-relibc* | linux-uclibc* )
+case $kernel-$os-$obj in
+ linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \
+ | linux-mlibc*- | linux-musl*- | linux-newlib*- \
+ | linux-relibc*- | linux-uclibc*- | linux-ohos*- )
+ ;;
+ uclinux-uclibc*- | uclinux-gnu*- )
+ ;;
+ managarm-mlibc*- | managarm-kernel*- )
;;
- uclinux-uclibc* )
+ windows*-msvc*-)
;;
- -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+ -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \
+ | -uclibc*- )
# These are just libc implementations, not actual OSes, and thus
# require a kernel.
- echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+ echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2
exit 1
;;
- kfreebsd*-gnu* | kopensolaris*-gnu*)
+ -kernel*- )
+ echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2
+ exit 1
;;
- vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+ *-kernel*- )
+ echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2
+ exit 1
;;
- nto-qnx*)
+ *-msvc*- )
+ echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2
+ exit 1
;;
- os2-emx)
+ kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-)
+ ;;
+ vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-)
+ ;;
+ nto-qnx*-)
;;
- *-eabi* | *-gnueabi*)
+ os2-emx-)
;;
- -*)
+ rtmk-nova-)
+ ;;
+ *-eabi*- | *-gnueabi*-)
+ ;;
+ none--*)
+ # None (no kernel, i.e. freestanding / bare metal),
+ # can be paired with an machine code file format
+ ;;
+ -*-)
# Blank kernel with real OS is always fine.
;;
- *-*)
- echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+ --*)
+ # Blank kernel and OS with real machine code file format is always fine.
+ ;;
+ *-*-*)
+ echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2
exit 1
;;
esac
@@ -1803,7 +2273,7 @@ case $vendor in
*-riscix*)
vendor=acorn
;;
- *-sunos*)
+ *-sunos* | *-solaris*)
vendor=sun
;;
*-cnk* | *-aix*)
@@ -1873,7 +2343,7 @@ case $vendor in
;;
esac
-echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}"
exit
# Local variables:
diff --git a/build-aux/depcomp b/build-aux/depcomp
index 715e343..9f6725b 100755
--- a/build-aux/depcomp
+++ b/build-aux/depcomp
@@ -1,9 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2025-06-18.21; # UTC
-# Copyright (C) 1999-2021 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
@@ -47,11 +47,13 @@ Environment variables:
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>.
EOF
exit $?
;;
-v | --v*)
- echo "depcomp $scriptversion"
+ echo "depcomp (GNU Automake) $scriptversion"
exit $?
;;
esac
@@ -113,7 +115,6 @@ nl='
# These definitions help.
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
lower=abcdefghijklmnopqrstuvwxyz
-digits=0123456789
alpha=${upper}${lower}
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
@@ -128,7 +129,7 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
-# Avoid interferences from the environment.
+# Avoid interference from the environment.
gccflag= dashmflag=
# Some modes work just like other modes, but use different flags. We
@@ -198,8 +199,8 @@ gcc3)
;;
gcc)
-## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
-## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## Note that this doesn't just cater to obsolete pre-3.x GCC compilers.
+## but also to in-use compilers like IBM xlc/xlC and the HP C compiler.
## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
@@ -783,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:
diff --git a/build-aux/install-sh b/build-aux/install-sh
index ec298b5..1d8d966 100755
--- a/build-aux/install-sh
+++ b/build-aux/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2020-11-14.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
@@ -124,9 +124,9 @@ it's up to you to specify -f if you want it.
If -S is not specified, no backups are attempted.
-Email bug reports to bug-automake@gnu.org.
-Automake home page: https://www.gnu.org/software/automake/
-"
+Report bugs to <bug-automake@gnu.org>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>."
while test $# -ne 0; do
case $1 in
@@ -170,7 +170,7 @@ while test $# -ne 0; do
-T) is_target_a_directory=never;;
- --version) echo "$0 $scriptversion"; exit $?;;
+ --version) echo "$0 (GNU Automake) $scriptversion"; exit $?;;
--) shift
break;;
@@ -345,7 +345,7 @@ do
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
- # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directly in world-writable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
@@ -353,7 +353,7 @@ do
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
+ # Check for POSIX incompatibility with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
@@ -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:
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
index 2a50d7f..3e6a3db 100755
--- a/build-aux/ltmain.sh
+++ b/build-aux/ltmain.sh
@@ -2,11 +2,11 @@
## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
## by inline-source v2019-02-19.15
-# libtool (GNU libtool) 2.4.7
+# libtool (GNU libtool) 2.5.4
# Provide generalized library-building support services.
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc.
+# Copyright (C) 1996-2019, 2021-2024 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -31,8 +31,8 @@
PROGRAM=libtool
PACKAGE=libtool
-VERSION=2.4.7
-package_revision=2.4.7
+VERSION=2.5.4
+package_revision=2.5.4
## ------ ##
@@ -72,11 +72,11 @@ scriptversion=2019-02-19.15; # UTC
# This is free software. There is NO warranty; not even for
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# Copyright (C) 2004-2019, 2021 Bootstrap Authors
+# Copyright (C) 2004-2019, 2021, 2023-2024 Bootstrap Authors
#
# This file is dual licensed under the terms of the MIT license
-# <https://opensource.org/license/MIT>, and GPL version 2 or later
-# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
+# <https://opensource.org/licenses/MIT>, and GPL version 2 or later
+# <https://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
# these licenses when using or redistributing this software or any of
# the files within it. See the URLs above, or the file `LICENSE`
# included in the Bootstrap distribution for the full license texts.
@@ -143,7 +143,7 @@ nl='
'
IFS="$sp $nl"
-# There are apparently some retarded systems that use ';' as a PATH separator!
+# There are apparently some systems that use ';' as a PATH separator!
if test "${PATH_SEPARATOR+set}" != set; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
@@ -589,7 +589,7 @@ func_require_term_colors ()
# _G_HAVE_PLUSEQ_OP
# Can be empty, in which case the shell is probed, "yes" if += is
- # useable or anything else if it does not work.
+ # usable or anything else if it does not work.
test -z "$_G_HAVE_PLUSEQ_OP" \
&& (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
&& _G_HAVE_PLUSEQ_OP=yes
@@ -739,7 +739,7 @@ eval 'func_dirname ()
# to NONDIR_REPLACEMENT.
# value returned in "$func_dirname_result"
# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
+# value returned in "$func_basename_result"
# For efficiency, we do not delegate to the functions above but instead
# duplicate the functionality here.
eval 'func_dirname_and_basename ()
@@ -897,7 +897,7 @@ func_mkdir_p ()
# While some portion of DIR does not yet exist...
while test ! -d "$_G_directory_path"; do
# ...make a list in topmost first order. Use a colon delimited
- # list incase some portion of path contains whitespace.
+ # list in case some portion of path contains whitespace.
_G_dir_list=$_G_directory_path:$_G_dir_list
# If the last portion added has no slash in it, the list is done
@@ -1536,11 +1536,11 @@ func_lt_ver ()
# This is free software. There is NO warranty; not even for
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# Copyright (C) 2010-2019, 2021 Bootstrap Authors
+# Copyright (C) 2010-2019, 2021, 2023-2024 Bootstrap Authors
#
# This file is dual licensed under the terms of the MIT license
-# <https://opensource.org/license/MIT>, and GPL version 2 or later
-# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
+# <https://opensource.org/licenses/MIT>, and GPL version 2 or later
+# <https://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
# these licenses when using or redistributing this software or any of
# the files within it. See the URLs above, or the file `LICENSE`
# included in the Bootstrap distribution for the full license texts.
@@ -2215,7 +2215,30 @@ func_version ()
# End:
# Set a version string.
-scriptversion='(GNU libtool) 2.4.7'
+scriptversion='(GNU libtool) 2.5.4'
+
+# func_version
+# ------------
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $debug_cmd
+
+ year=`date +%Y`
+
+ cat <<EOF
+$progname $scriptversion
+Copyright (C) $year Free Software Foundation, Inc.
+License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Originally written by Gordon Matzigkeit, 1996
+(See AUTHORS for complete contributor listing)
+EOF
+
+ exit $?
+}
# func_echo ARG...
@@ -2238,18 +2261,6 @@ func_echo ()
}
-# func_warning ARG...
-# -------------------
-# Libtool warnings are not categorized, so override funclib.sh
-# func_warning with this simpler definition.
-func_warning ()
-{
- $debug_cmd
-
- $warning_func ${1+"$@"}
-}
-
-
## ---------------- ##
## Options parsing. ##
## ---------------- ##
@@ -2261,19 +2272,23 @@ usage='$progpath [OPTION]... [MODE-ARG]...'
# Short help message in response to '-h'.
usage_message="Options:
- --config show all configuration variables
- --debug enable verbose shell tracing
- -n, --dry-run display commands without modifying any files
- --features display basic configuration information and exit
- --mode=MODE use operation mode MODE
- --no-warnings equivalent to '-Wnone'
- --preserve-dup-deps don't remove duplicate dependency libraries
- --quiet, --silent don't print informational messages
- --tag=TAG use configuration variables from tag TAG
- -v, --verbose print more informational messages than default
- --version print version information
- -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
- -h, --help, --help-all print short, long, or detailed help message
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+ -n, --dry-run display commands without modifying any files
+ --features display basic configuration information
+ --finish use operation '--mode=finish'
+ --mode=MODE use operation mode MODE
+ --no-finish don't update shared library cache
+ --no-quiet, --no-silent print default informational messages
+ --no-warnings equivalent to '-Wnone'
+ --preserve-dup-deps don't remove duplicate dependency libraries
+ --quiet, --silent don't print informational messages
+ --reorder-cache=DIRS reorder shared library cache for preferred DIRS
+ --tag=TAG use configuration variables from tag TAG
+ -v, --verbose print more informational messages than default
+ --version print version information
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
+ -h, --help, --help-all print short, long, or detailed help message
"
# Additional text appended to 'usage_message' in response to '--help'.
@@ -2306,13 +2321,13 @@ include the following information:
compiler: $LTCC
compiler flags: $LTCFLAGS
linker: $LD (gnu? $with_gnu_ld)
- version: $progname (GNU libtool) 2.4.7
+ version: $progname $scriptversion
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
Report bugs to <bug-libtool@gnu.org>.
-GNU libtool home page: <http://www.gnu.org/software/libtool/>.
-General help using GNU software: <http://www.gnu.org/gethelp/>."
+GNU libtool home page: <https://www.gnu.org/software/libtool/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>."
exit 0
}
@@ -2502,8 +2517,11 @@ libtool_options_prep ()
opt_dry_run=false
opt_help=false
opt_mode=
+ opt_reorder_cache=false
opt_preserve_dup_deps=false
opt_quiet=false
+ opt_finishing=true
+ opt_warning=
nonopt=
preserve_args=
@@ -2593,14 +2611,18 @@ libtool_parse_options ()
clean|compile|execute|finish|install|link|relink|uninstall) ;;
# Catch anything else as an error
- *) func_error "invalid argument for $_G_opt"
+ *) func_error "invalid argument '$1' for $_G_opt"
exit_cmd=exit
- break
;;
esac
shift
;;
+ --no-finish)
+ opt_finishing=false
+ func_append preserve_args " $_G_opt"
+ ;;
+
--no-silent|--no-quiet)
opt_quiet=false
func_append preserve_args " $_G_opt"
@@ -2616,6 +2638,24 @@ libtool_parse_options ()
func_append preserve_args " $_G_opt"
;;
+ --reorder-cache)
+ opt_reorder_cache=true
+ shared_lib_dirs=$1
+ if test -n "$shared_lib_dirs"; then
+ case $1 in
+ # Must begin with /:
+ /*) ;;
+
+ # Catch anything else as an error (relative paths)
+ *) func_error "invalid argument '$1' for $_G_opt"
+ func_error "absolute paths are required for $_G_opt"
+ exit_cmd=exit
+ ;;
+ esac
+ fi
+ shift
+ ;;
+
--silent|--quiet)
opt_quiet=:
opt_verbose=false
@@ -2652,6 +2692,18 @@ libtool_parse_options ()
func_add_hook func_parse_options libtool_parse_options
+# func_warning ARG...
+# -------------------
+# Libtool warnings are not categorized, so override funclib.sh
+# func_warning with this simpler definition.
+func_warning ()
+{
+ if $opt_warning; then
+ $debug_cmd
+ $warning_func ${1+"$@"}
+ fi
+}
+
# libtool_validate_options [ARG]...
# ---------------------------------
@@ -2668,10 +2720,10 @@ libtool_validate_options ()
# preserve --debug
test : = "$debug_cmd" || func_append preserve_args " --debug"
- case $host in
+ case $host_os in
# Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
# see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+ cygwin* | mingw* | windows* | pw32* | cegcc* | solaris2* | os2*)
# don't eliminate duplications in $postdeps and $predeps
opt_duplicate_compiler_generated_deps=:
;;
@@ -3003,7 +3055,7 @@ EOF
# func_convert_core_file_wine_to_w32 ARG
# Helper function used by file name conversion functions when $build is *nix,
-# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# and $host is mingw, windows, cygwin, or some other w32 environment. Relies on a
# correctly configured wine environment available, with the winepath program
# in $build's $PATH.
#
@@ -3035,9 +3087,10 @@ func_convert_core_file_wine_to_w32 ()
# func_convert_core_path_wine_to_w32 ARG
# Helper function used by path conversion functions when $build is *nix, and
-# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
-# configured wine environment available, with the winepath program in $build's
-# $PATH. Assumes ARG has no leading or trailing path separator characters.
+# $host is mingw, windows, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH. Assumes ARG has no leading or trailing path separator
+# characters.
#
# ARG is path to be converted from $build format to win32.
# Result is available in $func_convert_core_path_wine_to_w32_result.
@@ -3180,6 +3233,15 @@ func_convert_path_front_back_pathsep ()
# end func_convert_path_front_back_pathsep
+# func_convert_delimited_path PATH ORIG_DELIMITER NEW_DELIMITER
+# Replaces a delimiter for a given path.
+func_convert_delimited_path ()
+{
+ converted_path=`$ECHO "$1" | $SED "s#$2#$3#g"`
+}
+# end func_convert_delimited_path
+
+
##################################################
# $build to $host FILE NAME CONVERSION FUNCTIONS #
##################################################
@@ -3514,6 +3576,65 @@ func_dll_def_p ()
}
+# func_reorder_shared_lib_cache DIRS
+# Reorder the shared library cache by unconfiguring previous shared library cache
+# and configuring preferred search directories before previous search directories.
+# Previous shared library cache: /usr/lib /usr/local/lib
+# Preferred search directories: /tmp/testing
+# Reordered shared library cache: /tmp/testing /usr/lib /usr/local/lib
+func_reorder_shared_lib_cache ()
+{
+ $debug_cmd
+
+ case $host_os in
+ openbsd*)
+ get_search_directories=`PATH="$PATH:/sbin" ldconfig -r | $GREP "search directories" | $SED "s#.*search directories:\ ##g"`
+ func_convert_delimited_path "$get_search_directories" ':' '\ '
+ save_search_directories=$converted_path
+ func_convert_delimited_path "$1" ':' '\ '
+
+ # Ensure directories exist
+ for dir in $converted_path; do
+ # Ensure each directory is an absolute path
+ case $dir in
+ /*) ;;
+ *) func_error "Directory '$dir' is not an absolute path"
+ exit $EXIT_FAILURE ;;
+ esac
+ # Ensure no trailing slashes
+ func_stripname '' '/' "$dir"
+ dir=$func_stripname_result
+ if test -d "$dir"; then
+ if test -n "$preferred_search_directories"; then
+ preferred_search_directories="$preferred_search_directories $dir"
+ else
+ preferred_search_directories=$dir
+ fi
+ else
+ func_error "Directory '$dir' does not exist"
+ exit $EXIT_FAILURE
+ fi
+ done
+
+ PATH="$PATH:/sbin" ldconfig -U $save_search_directories
+ PATH="$PATH:/sbin" ldconfig -m $preferred_search_directories $save_search_directories
+ get_search_directories=`PATH="$PATH:/sbin" ldconfig -r | $GREP "search directories" | $SED "s#.*search directories:\ ##g"`
+ func_convert_delimited_path "$get_search_directories" ':' '\ '
+ reordered_search_directories=$converted_path
+
+ $ECHO "Original: $save_search_directories"
+ $ECHO "Reordered: $reordered_search_directories"
+ exit $EXIT_SUCCESS
+ ;;
+ *)
+ func_error "--reorder-cache is not supported for host_os=$host_os."
+ exit $EXIT_FAILURE
+ ;;
+ esac
+}
+# end func_reorder_shared_lib_cache
+
+
# func_mode_compile arg...
func_mode_compile ()
{
@@ -3692,7 +3813,7 @@ func_mode_compile ()
# On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in
- cygwin* | mingw* | pw32* | os2* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | os2* | cegcc*)
pic_mode=default
;;
esac
@@ -4086,6 +4207,12 @@ if $opt_help; then
fi
+# If option '--reorder-cache', reorder the shared library cache and exit.
+if $opt_reorder_cache; then
+ func_reorder_shared_lib_cache $shared_lib_dirs
+fi
+
+
# func_mode_execute arg...
func_mode_execute ()
{
@@ -4270,7 +4397,7 @@ func_mode_finish ()
fi
fi
- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs" && $opt_finishing; then
for libdir in $libdirs; do
if test -n "$finish_cmds"; then
# Do each command in the finish commands.
@@ -4295,6 +4422,12 @@ func_mode_finish ()
for libdir in $libdirs; do
$ECHO " $libdir"
done
+ if test "false" = "$opt_finishing"; then
+ echo
+ echo "NOTE: finish_cmds were not executed during testing, so you must"
+ echo "manually run ldconfig to add a given test directory, LIBDIR, to"
+ echo "the search path for generated executables."
+ fi
echo
echo "If you ever happen to want to link against installed libraries"
echo "in a given directory, LIBDIR, you must either use libtool, and"
@@ -4531,8 +4664,15 @@ func_mode_install ()
func_append dir "$objdir"
if test -n "$relink_command"; then
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$libdir"
+ destlibdir=$func_stripname_result
+
+ func_stripname '' '/' "$destdir"
+ s_destdir=$func_stripname_result
+
# Determine the prefix the user has applied to our future dir.
- inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+ inst_prefix_dir=`$ECHO "X$s_destdir" | $Xsed -e "s%$destlibdir\$%%"`
# Don't allow the user to place us outside of our expected
# location b/c this prevents finding dependent libraries that
@@ -4569,7 +4709,7 @@ func_mode_install ()
'exit $?'
tstripme=$stripme
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
case $realname in
*.dll.a)
tstripme=
@@ -4682,7 +4822,7 @@ func_mode_install ()
# Do a test to see if this is really a libtool program.
case $host in
- *cygwin* | *mingw*)
+ *cygwin* | *mingw* | *windows*)
if func_ltwrapper_executable_p "$file"; then
func_ltwrapper_scriptname "$file"
wrapper=$func_ltwrapper_scriptname_result
@@ -4910,7 +5050,7 @@ extern \"C\" {
$RM $export_symbols
eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *mingw* | *windows* | *cegcc* )
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
;;
@@ -4922,7 +5062,7 @@ extern \"C\" {
eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
eval '$MV "$nlist"T "$nlist"'
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *mingw* | *windows* | *cegcc* )
eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
;;
@@ -4936,7 +5076,7 @@ extern \"C\" {
func_basename "$dlprefile"
name=$func_basename_result
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *mingw* | *windows* | *cegcc* )
# if an import library, we need to obtain dlname
if func_win32_import_lib_p "$dlprefile"; then
func_tr_sh "$dlprefile"
@@ -4962,8 +5102,16 @@ extern \"C\" {
eval '$ECHO ": $name " >> "$nlist"'
fi
func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
- eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
- $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ case $host in
+ i[3456]86-*-mingw32*)
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+ ;;
+ *)
+ eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+ $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/__nm_//' >> '$nlist'"
+ ;;
+ esac
}
else # not an import lib
$opt_dry_run || {
@@ -5111,7 +5259,7 @@ static const void *lt_preloaded_setup() {
# Transform the symbol file into the correct name.
symfileobj=$output_objdir/${my_outputname}S.$objext
case $host in
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *mingw* | *windows* | *cegcc* )
if test -f "$output_objdir/$my_outputname.def"; then
compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
@@ -5187,7 +5335,7 @@ func_win32_libid ()
*ar\ archive*) # could be an import, or static
# Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
- $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)' >/dev/null; then
case $nm_interface in
"MS dumpbin")
if func_cygming_ms_implib_p "$1" ||
@@ -5454,7 +5602,7 @@ func_extract_archives ()
#
# Emit a libtool wrapper script on stdout.
# Don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw
+# incorporate the script contents within a cygwin/mingw/windows
# wrapper executable. Must ONLY be called from within
# func_mode_link because it depends on a number of variables
# set therein.
@@ -5462,7 +5610,7 @@ func_extract_archives ()
# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
# variable will take. If 'yes', then the emitted script
# will assume that the directory where it is stored is
-# the $objdir directory. This is a cygwin/mingw-specific
+# the $objdir directory. This is a cygwin/mingw/windows-specific
# behavior.
func_emit_wrapper ()
{
@@ -5587,7 +5735,7 @@ func_exec_program_core ()
"
case $host in
# Backslashes separate directories on plain windows
- *-*-mingw | *-*-os2* | *-cegcc*)
+ *-*-mingw* | *-*-windows* | *-*-os2* | *-cegcc*)
$ECHO "\
if test -n \"\$lt_option_debug\"; then
\$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
@@ -5655,7 +5803,7 @@ func_exec_program ()
file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
done
- # Usually 'no', except on cygwin/mingw when embedded into
+ # Usually 'no', except on cygwin/mingw/windows when embedded into
# the cwrapper.
WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
@@ -5787,7 +5935,7 @@ EOF
#endif
#include <stdio.h>
#include <stdlib.h>
-#ifdef _MSC_VER
+#if defined _WIN32 && !defined __GNUC__
# include <direct.h>
# include <process.h>
# include <io.h>
@@ -5812,7 +5960,7 @@ EOF
/* declarations of non-ANSI functions */
#if defined __MINGW32__
# ifdef __STRICT_ANSI__
-int _putenv (const char *);
+_CRTIMP int __cdecl _putenv (const char *);
# endif
#elif defined __CYGWIN__
# ifdef __STRICT_ANSI__
@@ -6010,7 +6158,7 @@ main (int argc, char *argv[])
{
EOF
case $host in
- *mingw* | *cygwin* )
+ *mingw* | *windows* | *cygwin* )
# make stdout use "unix" line endings
echo " setmode(1,_O_BINARY);"
;;
@@ -6029,7 +6177,7 @@ EOF
{
/* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
namespace, but it is not one of the ones we know about and
- have already dealt with, above (inluding dump-script), then
+ have already dealt with, above (including dump-script), then
report an error. Otherwise, targets might begin to believe
they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
namespace. The first time any user complains about this, we'll
@@ -6113,7 +6261,7 @@ EOF
EOF
case $host_os in
- mingw*)
+ mingw* | windows*)
cat <<"EOF"
{
char* p;
@@ -6155,7 +6303,7 @@ EOF
EOF
case $host_os in
- mingw*)
+ mingw* | windows*)
cat <<"EOF"
/* execv doesn't actually work on mingw as expected on unix */
newargz = prepare_spawn (newargz);
@@ -6574,7 +6722,7 @@ lt_update_lib_path (const char *name, const char *value)
EOF
case $host_os in
- mingw*)
+ mingw* | windows*)
cat <<"EOF"
/* Prepares an argument vector before calling spawn().
@@ -6749,7 +6897,7 @@ func_mode_link ()
$debug_cmd
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
# It is impossible to link a dll without this setting, and
# we shouldn't force the makefile maintainer to figure out
# what system we are compiling for in order to pass an extra
@@ -6773,6 +6921,7 @@ func_mode_link ()
finalize_command=$nonopt
compile_rpath=
+ compile_rpath_tail=
finalize_rpath=
compile_shlibpath=
finalize_shlibpath=
@@ -6813,10 +6962,12 @@ func_mode_link ()
xrpath=
perm_rpath=
temp_rpath=
+ temp_rpath_tail=
thread_safe=no
vinfo=
vinfo_number=no
weak_libs=
+ rpath_arg=
single_module=$wl-single_module
func_infer_tag $base_compile
@@ -7079,7 +7230,7 @@ func_mode_link ()
case $arg in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
- func_fatal_error "only absolute run-paths are allowed"
+ func_fatal_error "argument to -rpath is not absolute: $arg"
;;
esac
if test rpath = "$prev"; then
@@ -7255,7 +7406,7 @@ func_mode_link ()
;;
esac
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
@@ -7275,7 +7426,7 @@ func_mode_link ()
-l*)
if test X-lc = "X$arg" || test X-lm = "X$arg"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
# These systems don't actually have a C or math library (as such)
continue
;;
@@ -7283,7 +7434,7 @@ func_mode_link ()
# These systems don't actually have a C library (as such)
test X-lc = "X$arg" && continue
;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
# Do not include libc due to us having libc/libc_r.
test X-lc = "X$arg" && continue
;;
@@ -7303,7 +7454,7 @@ func_mode_link ()
esac
elif test X-lc_r = "X$arg"; then
case $host in
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*)
# Do not include libc_r directly, use -pthread flag.
continue
;;
@@ -7326,7 +7477,8 @@ func_mode_link ()
# Tru64 UNIX uses -model [arg] to determine the layout of C++
# classes, name mangling, and exception handling.
# Darwin uses the -arch flag to determine output architecture.
- -model|-arch|-isysroot|--sysroot)
+ # -q <option> for IBM XL C/C++ compiler.
+ -model|-arch|-isysroot|--sysroot|-q)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
func_append finalize_command " $arg"
@@ -7347,7 +7499,7 @@ func_mode_link ()
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
- |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ |-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
func_append finalize_command " $arg"
@@ -7370,7 +7522,7 @@ func_mode_link ()
-no-install)
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
# The PATH hackery in wrapper scripts is required on Windows
# and Darwin in order for the loader to find any dlls it needs.
func_warning "'-no-install' is ignored for $host"
@@ -7430,7 +7582,7 @@ func_mode_link ()
dir=$lt_sysroot$func_stripname_result
;;
*)
- func_fatal_error "only absolute run-paths are allowed"
+ func_fatal_error "argument ($arg) to '-R' is not an absolute path: $dir"
;;
esac
case "$xrpath " in
@@ -7555,13 +7707,29 @@ func_mode_link ()
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
# -specs=* GCC specs files
# -stdlib=* select c++ std lib with clang
+ # -fdiagnostics-color* simply affects output
+ # -frecord-gcc-switches used to verify flags were respected
# -fsanitize=* Clang/GCC memory and address sanitizer
+ # -fno-sanitize* Clang/GCC memory and address sanitizer
+ # -shared-libsan Link with shared sanitizer runtimes (Clang)
+ # -static-libsan Link with static sanitizer runtimes (Clang)
+ # -no-canonical-prefixes Do not expand any symbolic links
# -fuse-ld=* Linker select flags for GCC
+ # -static-* direct GCC to link specific libraries statically
+ # -fcilkplus Cilk Plus language extension features for C/C++
+ # -rtlib=* select c runtime lib with clang
+ # --unwindlib=* select unwinder library with clang
+ # -f{file|debug|macro|profile}-prefix-map=* needed for lto linking
# -Wa,* Pass flags directly to the assembler
+ # -Werror, -Werror=* Report (specified) warnings as errors
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
- -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*)
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-no-canonical-prefixes| \
+ -stdlib=*|-rtlib=*|--unwindlib=*| \
+ -specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \
+ -ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*|-fprofile-prefix-map=*| \
+ -fdiagnostics-color*|-frecord-gcc-switches| \
+ -fuse-ld=*|-static-*|-fcilkplus|-Wa,*|-Werror|-Werror=*)
func_quote_arg pretty "$arg"
arg=$func_quote_arg_result
func_append compile_command " $arg"
@@ -7719,8 +7887,20 @@ func_mode_link ()
# Now actually substitute the argument into the commands.
if test -n "$arg"; then
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
+ if test -n "$rpath_arg"; then
+ func_append finalize_rpath " ${arg##*,}"
+ unset rpath_arg
+ else
+ case $arg in
+ -Wl,-rpath,*)
+ func_append finalize_rpath " ${arg##*,}";;
+ -Wl,-rpath)
+ rpath_arg=1;;
+ *)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ esac
+ fi
fi
done # argument parsing loop
@@ -7891,7 +8071,7 @@ func_mode_link ()
found=false
case $deplib in
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
- |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+ |-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
if test prog,link = "$linkmode,$pass"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
@@ -8068,18 +8248,15 @@ func_mode_link ()
;;
esac
if $valid_a_lib; then
- echo
- $ECHO "*** Warning: Linking the shared library $output against the"
- $ECHO "*** static library $deplib is not portable!"
+ func_warning "Linking the shared library $output against the static library $deplib is not portable!"
deplibs="$deplib $deplibs"
else
- echo
- $ECHO "*** Warning: Trying to link with static lib archive $deplib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have"
- echo "*** because the file extensions .$libext of this argument makes me believe"
- echo "*** that it is just a static archive that I should not use here."
+ func_warning "Trying to link with static lib archive $deplib."
+ func_warning "I have the capability to make that library automatically link in when"
+ func_warning "you link to this library. But I can only do this if you have a"
+ func_warning "shared version of the library, which you do not appear to have"
+ func_warning "because the file extensions .$libext of this argument makes me believe"
+ func_warning "that it is just a static archive that I should not use here."
fi
;;
esac
@@ -8274,7 +8451,7 @@ func_mode_link ()
fi
case $host in
# special handling for platforms with PE-DLLs.
- *cygwin* | *mingw* | *cegcc* )
+ *cygwin* | *mingw* | *windows* | *cegcc* )
# Linker will automatically link against shared library if both
# static and shared are present. Therefore, ensure we extract
# symbols from the import library if a shared library is present
@@ -8374,7 +8551,10 @@ func_mode_link ()
# Make sure the rpath contains only unique directories.
case $temp_rpath: in
*"$absdir:"*) ;;
- *) func_append temp_rpath "$absdir:" ;;
+ *) case $absdir in
+ "$progdir/"*) func_append temp_rpath "$absdir:" ;;
+ *) func_append temp_rpath_tail "$absdir:" ;;
+ esac
esac
fi
@@ -8384,9 +8564,12 @@ func_mode_link ()
case " $sys_lib_dlsearch_path " in
*" $absdir "*) ;;
*)
- case "$compile_rpath " in
+ case "$compile_rpath$compile_rpath_tail " in
*" $absdir "*) ;;
- *) func_append compile_rpath " $absdir" ;;
+ *) case $absdir in
+ "$progdir/"*) func_append compile_rpath " $absdir" ;;
+ *) func_append compile_rpath_tail " $absdir" ;;
+ esac
esac
;;
esac
@@ -8417,8 +8600,8 @@ func_mode_link ()
fi
if test -n "$library_names" &&
{ test no = "$use_static_libs" || test -z "$old_library"; }; then
- case $host in
- *cygwin* | *mingw* | *cegcc* | *os2*)
+ case $host_os in
+ cygwin* | mingw* | windows* | cegcc* | os2*)
# No point in relinking DLLs because paths are not encoded
func_append notinst_deplibs " $lib"
need_relink=no
@@ -8444,11 +8627,11 @@ func_mode_link ()
if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
echo
if test prog = "$linkmode"; then
- $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ func_warning "Linking the executable $output against the loadable module"
else
- $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ func_warning "Linking the shared library $output against the loadable module"
fi
- $ECHO "*** $linklib is not portable!"
+ func_warning "$linklib is not portable!"
fi
if test lib = "$linkmode" &&
test yes = "$hardcode_into_libs"; then
@@ -8458,9 +8641,12 @@ func_mode_link ()
case " $sys_lib_dlsearch_path " in
*" $absdir "*) ;;
*)
- case "$compile_rpath " in
+ case "$compile_rpath$compile_rpath_tail " in
*" $absdir "*) ;;
- *) func_append compile_rpath " $absdir" ;;
+ *) case $absdir in
+ "$progdir/"*) func_append compile_rpath " $absdir" ;;
+ *) func_append compile_rpath_tail " $absdir" ;;
+ esac
esac
;;
esac
@@ -8487,8 +8673,8 @@ func_mode_link ()
soname=$dlname
elif test -n "$soname_spec"; then
# bleh windows
- case $host in
- *cygwin* | mingw* | *cegcc* | *os2*)
+ case $host_os in
+ cygwin* | mingw* | windows* | cegcc* | os2*)
func_arith $current - $age
major=$func_arith_result
versuffix=-$major
@@ -8535,6 +8721,7 @@ func_mode_link ()
case $host in
*-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
*-*-sysv4*uw2*) add_dir=-L$dir ;;
+ *-*-emscripten*) add_dir=-L$dir ;;
*-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
*-*-unixware7*) add_dir=-L$dir ;;
*-*-darwin* )
@@ -8543,11 +8730,10 @@ func_mode_link ()
if /usr/bin/file -L $add 2> /dev/null |
$GREP ": [^:]* bundle" >/dev/null; then
if test "X$dlopenmodule" != "X$lib"; then
- $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ func_warning "lib $linklib is a module, not a shared library"
if test -z "$old_library"; then
- echo
- echo "*** And there doesn't seem to be a static archive available"
- echo "*** The link will probably fail, sorry"
+ func_warning "And there doesn't seem to be a static archive available"
+ func_warning "The link will probably fail, sorry"
else
add=$dir/$old_library
fi
@@ -8630,7 +8816,7 @@ func_mode_link ()
test no = "$hardcode_direct_absolute"; then
add=$libdir/$linklib
elif test yes = "$hardcode_minus_L"; then
- add_dir=-L$libdir
+ add_dir=-L$lt_sysroot$libdir
add=-l$name
elif test yes = "$hardcode_shlibpath_var"; then
case :$finalize_shlibpath: in
@@ -8647,7 +8833,7 @@ func_mode_link ()
fi
else
# We cannot seem to hardcode it, guess we'll fake it.
- add_dir=-L$libdir
+ add_dir=-L$lt_sysroot$libdir
# Try looking first in the location we're being installed to.
if test -n "$inst_prefix_dir"; then
case $libdir in
@@ -8687,21 +8873,19 @@ func_mode_link ()
# Just print a warning and add the library to dependency_libs so
# that the program can be linked against the static library.
- echo
- $ECHO "*** Warning: This system cannot link to static lib archive $lib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have."
+ func_warning "This system cannot link to static lib archive $lib."
+ func_warning "I have the capability to make that library automatically link in when"
+ func_warning "you link to this library. But I can only do this if you have a"
+ func_warning "shared version of the library, which you do not appear to have."
if test yes = "$module"; then
- echo "*** But as you try to build a module library, libtool will still create "
- echo "*** a static module, that should work as long as the dlopening application"
- echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ func_warning "But as you try to build a module library, libtool will still create "
+ func_warning "a static module, that should work as long as the dlopening application"
+ func_warning "is linked with the -dlopen flag to resolve symbols at runtime."
if test -z "$global_symbol_pipe"; then
- echo
- echo "*** However, this would only work if libtool was able to extract symbol"
- echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
- echo "*** not find such a program. So, this module is probably useless."
- echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ func_warning "However, this would only work if libtool was able to extract symbol"
+ func_warning "lists from a program, using 'nm' or equivalent, but libtool could"
+ func_warning "not find such a program. So, this module is probably useless."
+ func_warning "'nm' from GNU binutils and a full rebuild may help."
fi
if test no = "$build_old_libs"; then
build_libtool_libs=module
@@ -8824,6 +9008,10 @@ func_mode_link ()
fi # link_all_deplibs != no
fi # linkmode = lib
done # for deplib in $libs
+
+ func_append temp_rpath "$temp_rpath_tail"
+ func_append compile_rpath "$compile_rpath_tail"
+
if test link = "$pass"; then
if test prog = "$linkmode"; then
compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
@@ -8861,42 +9049,46 @@ func_mode_link ()
# Add libraries to $var in reverse order
eval tmp_libs=\"\$$var\"
new_libs=
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken: new_libs="$deplib $new_libs"
for deplib in $tmp_libs; do
- # FIXME: Pedantically, this is the right thing to do, so
- # that some nasty dependency loop isn't accidentally
- # broken:
- #new_libs="$deplib $new_libs"
- # Pragmatically, this seems to cause very few problems in
- # practice:
- case $deplib in
- -L*) new_libs="$deplib $new_libs" ;;
- -R*) ;;
- *)
- # And here is the reason: when a library appears more
- # than once as an explicit dependence of a library, or
- # is implicitly linked in more than once by the
- # compiler, it is considered special, and multiple
- # occurrences thereof are not removed. Compare this
- # with having the same library being listed as a
- # dependency of multiple other libraries: in this case,
- # we know (pedantically, we assume) the library does not
- # need to be listed more than once, so we keep only the
- # last copy. This is not always right, but it is rare
- # enough that we require users that really mean to play
- # such unportable linking tricks to link the library
- # using -Wl,-lname, so that libtool does not consider it
- # for duplicate removal.
- case " $specialdeplibs " in
- *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ if $opt_preserve_dup_deps; then
+ new_libs="$deplib $new_libs"
+ else
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$deplib $new_libs" ;;
- esac
- ;;
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal. And if not possible for portability
+ # reasons, then --preserve-dup-deps should be used.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
esac
- ;;
- esac
+ fi
done
tmp_libs=
for deplib in $new_libs; do
@@ -9028,9 +9220,7 @@ func_mode_link ()
if test pass_all != "$deplibs_check_method"; then
func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
else
- echo
- $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
- $ECHO "*** objects $objs is not portable!"
+ func_warning "Linking the shared library $output against the non-libtool objects $objs is not portable!"
func_append libobjs " $objs"
fi
fi
@@ -9091,13 +9281,13 @@ func_mode_link ()
#
case $version_type in
# correct linux to gnu/linux during the next big refactor
- darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none)
+ darwin|freebsd-elf|linux|midnightbsd-elf|osf|qnx|windows|none)
func_arith $number_major + $number_minor
current=$func_arith_result
age=$number_minor
revision=$number_revision
;;
- freebsd-aout|qnx|sunos)
+ freebsd-aout|sco|sunos)
current=$number_major
revision=$number_minor
age=0
@@ -9109,6 +9299,9 @@ func_mode_link ()
revision=$number_minor
lt_irix_increment=no
;;
+ *)
+ func_fatal_configuration "$modename: unknown library version type '$version_type'"
+ ;;
esac
;;
no)
@@ -9244,8 +9437,9 @@ func_mode_link ()
;;
qnx)
- major=.$current
- versuffix=.$current
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
;;
sco)
@@ -9398,7 +9592,7 @@ func_mode_link ()
if test yes = "$build_libtool_libs"; then
if test -n "$rpath"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
# these systems don't actually have a c library (as such)!
;;
*-*-rhapsody* | *-*-darwin1.[012])
@@ -9449,108 +9643,6 @@ func_mode_link ()
# implementing what was already the behavior.
newdeplibs=$deplibs
;;
- test_compile)
- # This code stresses the "libraries are programs" paradigm to its
- # limits. Maybe even breaks it. We compile a program, linking it
- # against the deplibs as a proxy for the library. Then we can check
- # whether they linked in statically or dynamically with ldd.
- $opt_dry_run || $RM conftest.c
- cat > conftest.c <<EOF
- int main() { return 0; }
-EOF
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
- ldd_output=`ldd conftest`
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
- case " $predeps $postdeps " in
- *" $i "*)
- func_append newdeplibs " $i"
- i=
- ;;
- esac
- fi
- if test -n "$i"; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
- func_append newdeplibs " $i"
- else
- droppeddeps=yes
- echo
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which I believe you do not have"
- echo "*** because a test_compile did reveal that the linker did not use it for"
- echo "*** its dynamic dependency list that programs get resolved with at runtime."
- fi
- fi
- ;;
- *)
- func_append newdeplibs " $i"
- ;;
- esac
- done
- else
- # Error occurred in the first compile. Let's try to salvage
- # the situation: Compile a separate program for each library.
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
- ldd_output=`ldd conftest`
- if test yes = "$allow_libtool_libs_with_static_runtimes"; then
- case " $predeps $postdeps " in
- *" $i "*)
- func_append newdeplibs " $i"
- i=
- ;;
- esac
- fi
- if test -n "$i"; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
- func_append newdeplibs " $i"
- else
- droppeddeps=yes
- echo
- $ECHO "*** Warning: dynamic linker does not accept needed library $i."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have"
- echo "*** because a test_compile did reveal that the linker did not use this one"
- echo "*** as a dynamic dependency that programs can get resolved with at runtime."
- fi
- fi
- else
- droppeddeps=yes
- echo
- $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
- echo "*** make it link in! You will probably need to install it or some"
- echo "*** library that it depends on before this library will be fully"
- echo "*** functional. Installing it before continuing would be even better."
- fi
- ;;
- *)
- func_append newdeplibs " $i"
- ;;
- esac
- done
- fi
- ;;
file_magic*)
set dummy $deplibs_check_method; shift
file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
@@ -9614,17 +9706,16 @@ EOF
fi
if test -n "$a_deplib"; then
droppeddeps=yes
- echo
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have"
- echo "*** because I did check the linker path looking for a file starting"
+ func_warning "Linker path does not have real file for library $a_deplib."
+ func_warning "I have the capability to make that library automatically link in when"
+ func_warning "you link to this library. But I can only do this if you have a"
+ func_warning "shared version of the library, which you do not appear to have"
+ func_warning "because I did check the linker path looking for a file starting"
if test -z "$potlib"; then
- $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ func_warning "with $libname but no candidates were found. (...for file magic test)"
else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a file magic. Last file checked: $potlib"
+ func_warning "with $libname and none of the candidates passed a file format test"
+ func_warning "using a file magic. Last file checked: $potlib"
fi
fi
;;
@@ -9668,17 +9759,16 @@ EOF
fi
if test -n "$a_deplib"; then
droppeddeps=yes
- echo
- $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have"
- echo "*** because I did check the linker path looking for a file starting"
+ func_warning "Linker path does not have real file for library $a_deplib."
+ func_warning "I have the capability to make that library automatically link in when"
+ func_warning "you link to this library. But I can only do this if you have a"
+ func_warning "shared version of the library, which you do not appear to have"
+ func_warning "because I did check the linker path looking for a file starting"
if test -z "$potlib"; then
- $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ func_warning "with $libname but no candidates were found. (...for regex pattern test)"
else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ func_warning "with $libname and none of the candidates passed a file format test"
+ func_warning "using a regex pattern. Last file checked: $potlib"
fi
fi
;;
@@ -9702,11 +9792,11 @@ EOF
*[!\ \ ]*)
echo
if test none = "$deplibs_check_method"; then
- echo "*** Warning: inter-library dependencies are not supported in this platform."
+ func_warning "Inter-library dependencies are not supported in this platform."
else
- echo "*** Warning: inter-library dependencies are not known to be supported."
+ func_warning "Inter-library dependencies are not known to be supported."
fi
- echo "*** All declared inter-library dependencies are being dropped."
+ func_warning "All declared inter-library dependencies are being dropped."
droppeddeps=yes
;;
esac
@@ -9727,17 +9817,15 @@ EOF
if test yes = "$droppeddeps"; then
if test yes = "$module"; then
- echo
- echo "*** Warning: libtool could not satisfy all declared inter-library"
- $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
- echo "*** a static module, that should work as long as the dlopening"
- echo "*** application is linked with the -dlopen flag."
+ func_warning "libtool could not satisfy all declared inter-library"
+ func_warning "dependencies of module $libname. Therefore, libtool will create"
+ func_warning "a static module, that should work as long as the dlopening"
+ func_warning "application is linked with the -dlopen flag."
if test -z "$global_symbol_pipe"; then
- echo
- echo "*** However, this would only work if libtool was able to extract symbol"
- echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
- echo "*** not find such a program. So, this module is probably useless."
- echo "*** 'nm' from GNU binutils and a full rebuild may help."
+ func_warning "However, this would only work if libtool was able to extract symbol"
+ func_warning "lists from a program, using 'nm' or equivalent, but libtool could"
+ func_warning "not find such a program. So, this module is probably useless."
+ func_warning "'nm' from GNU binutils and a full rebuild may help."
fi
if test no = "$build_old_libs"; then
oldlibs=$output_objdir/$libname.$libext
@@ -9912,7 +10000,7 @@ EOF
orig_export_symbols=
case $host_os in
- cygwin* | mingw* | cegcc*)
+ cygwin* | mingw* | windows* | cegcc*)
if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
# exporting using user supplied symfile
func_dll_def_p "$export_symbols" || {
@@ -10110,20 +10198,7 @@ EOF
last_robj=
k=1
- if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
- output=$output_objdir/$output_la.lnkscript
- func_verbose "creating GNU ld script: $output"
- echo 'INPUT (' > $output
- for obj in $save_libobjs
- do
- func_to_tool_file "$obj"
- $ECHO "$func_to_tool_file_result" >> $output
- done
- echo ')' >> $output
- func_append delfiles " $output"
- func_to_tool_file "$output"
- output=$func_to_tool_file_result
- elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+ if test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
output=$output_objdir/$output_la.lnk
func_verbose "creating linker input file list: $output"
: > $output
@@ -10142,6 +10217,19 @@ EOF
func_append delfiles " $output"
func_to_tool_file "$output"
output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+ elif test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+ output=$output_objdir/$output_la.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ echo 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ func_to_tool_file "$obj"
+ $ECHO "$func_to_tool_file_result" >> $output
+ done
+ echo ')' >> $output
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$func_to_tool_file_result
else
if test -n "$save_libobjs"; then
func_verbose "creating reloadable object files..."
@@ -10582,7 +10670,7 @@ EOF
esac
fi
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ *-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-cegcc*)
testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
@@ -10660,7 +10748,7 @@ EOF
# Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
wrappers_required=false
;;
- *cygwin* | *mingw* )
+ *cygwin* | *mingw* | *windows* )
test yes = "$build_libtool_libs" || wrappers_required=false
;;
*)
@@ -10814,7 +10902,7 @@ EOF
*) exeext= ;;
esac
case $host in
- *cygwin* | *mingw* )
+ *cygwin* | *mingw* | windows* )
func_dirname_and_basename "$output" "" "."
output_name=$func_basename_result
output_path=$func_dirname_result
@@ -11148,7 +11236,7 @@ EOF
# tests/bindir.at for full details.
tdlname=$dlname
case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *windows*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
# If a -bindir argument was supplied, place the dll there.
if test -n "$bindir"; then
func_relative_path "$install_libdir" "$bindir"
diff --git a/build-aux/missing b/build-aux/missing
index 1fe1611..5e450ba 100755
--- a/build-aux/missing
+++ b/build-aux/missing
@@ -1,9 +1,11 @@
#! /bin/sh
-# Common wrapper for a few potentially missing GNU programs.
+# Common wrapper for a few potentially missing GNU and other programs.
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2025-06-18.21; # UTC
-# Copyright (C) 1996-2021 Free Software Foundation, Inc.
+# shellcheck disable=SC2006,SC2268 # we must support pre-POSIX shells
+
+# 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
@@ -54,18 +56,20 @@ Options:
-v, --version output version information and exit
Supported PROGRAM values:
- aclocal autoconf autoheader autom4te automake makeinfo
- bison yacc flex lex help2man
+aclocal autoconf autogen autoheader autom4te automake autoreconf
+bison flex help2man lex makeinfo perl yacc
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
'g' are ignored when checking the name.
-Send bug reports to <bug-automake@gnu.org>."
+Report bugs to <bug-automake@gnu.org>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing $scriptversion (GNU Automake)"
+ echo "missing (GNU Automake) $scriptversion"
exit $?
;;
@@ -108,7 +112,7 @@ gnu_software_URL=https://www.gnu.org/software
program_details ()
{
case $1 in
- aclocal|automake)
+ aclocal|automake|autoreconf)
echo "The '$1' program is part of the GNU Automake package:"
echo "<$gnu_software_URL/automake>"
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
@@ -123,6 +127,9 @@ program_details ()
echo "<$gnu_software_URL/m4/>"
echo "<$perl_URL>"
;;
+ *)
+ :
+ ;;
esac
}
@@ -137,48 +144,55 @@ give_advice ()
printf '%s\n' "'$1' is $msg."
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ autoheader_deps="'acconfig.h'"
+ automake_deps="'Makefile.am'"
+ aclocal_deps="'acinclude.m4'"
case $normalized_program in
+ aclocal*)
+ echo "You should only need it if you modified $aclocal_deps or"
+ echo "$configure_deps."
+ ;;
autoconf*)
- echo "You should only need it if you modified 'configure.ac',"
- echo "or m4 files included by it."
- program_details 'autoconf'
+ echo "You should only need it if you modified $configure_deps."
+ ;;
+ autogen*)
+ echo "You should only need it if you modified a '.def' or '.tpl' file."
+ echo "You may want to install the GNU AutoGen package:"
+ echo "<$gnu_software_URL/autogen/>"
;;
autoheader*)
- echo "You should only need it if you modified 'acconfig.h' or"
+ echo "You should only need it if you modified $autoheader_deps or"
echo "$configure_deps."
- program_details 'autoheader'
;;
automake*)
- echo "You should only need it if you modified 'Makefile.am' or"
- echo "$configure_deps."
- program_details 'automake'
- ;;
- aclocal*)
- echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "You should only need it if you modified $automake_deps or"
echo "$configure_deps."
- program_details 'aclocal'
;;
- autom4te*)
+ autom4te*)
echo "You might have modified some maintainer files that require"
echo "the 'autom4te' program to be rebuilt."
- program_details 'autom4te'
+ ;;
+ autoreconf*)
+ echo "You should only need it if you modified $aclocal_deps or"
+ echo "$automake_deps or $autoheader_deps or $automake_deps or"
+ echo "$configure_deps."
;;
bison*|yacc*)
echo "You should only need it if you modified a '.y' file."
echo "You may want to install the GNU Bison package:"
echo "<$gnu_software_URL/bison/>"
;;
- lex*|flex*)
- echo "You should only need it if you modified a '.l' file."
- echo "You may want to install the Fast Lexical Analyzer package:"
- echo "<$flex_URL>"
- ;;
help2man*)
echo "You should only need it if you modified a dependency" \
"of a man page."
echo "You may want to install the GNU Help2man package:"
echo "<$gnu_software_URL/help2man/>"
;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
makeinfo*)
echo "You should only need it if you modified a '.texi' file, or"
echo "any other file indirectly affecting the aspect of the manual."
@@ -189,6 +203,12 @@ give_advice ()
echo "want to install GNU make:"
echo "<$gnu_software_URL/make/>"
;;
+ perl*)
+ echo "You should only need it to run GNU Autoconf, GNU Automake, "
+ echo " assorted other tools, or if you modified a Perl source file."
+ echo "You may want to install the Perl 5 language interpreter:"
+ echo "<$perl_URL>"
+ ;;
*)
echo "You might have modified some files without having the proper"
echo "tools for further handling them. Check the 'README' file, it"
@@ -197,6 +217,7 @@ give_advice ()
echo "case some other package contains this missing '$1' program."
;;
esac
+ program_details "$normalized_program"
}
give_advice "$1" | sed -e '1s/^/WARNING: /' \
@@ -207,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:
diff --git a/build-aux/test-driver b/build-aux/test-driver
index 0fa6395..d81fba7 100755
--- a/build-aux/test-driver
+++ b/build-aux/test-driver
@@ -1,9 +1,9 @@
#! /bin/sh
# test-driver - basic testsuite driver script.
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2025-06-18.21; # UTC
-# Copyright (C) 2011-2021 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
@@ -44,11 +44,16 @@ print_usage ()
Usage:
test-driver --test-name NAME --log-file PATH --trs-file PATH
[--expect-failure {yes|no}] [--color-tests {yes|no}]
+ [--collect-skipped-logs {yes|no}]
[--enable-hard-errors {yes|no}] [--]
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
See the GNU Automake documentation for information.
+
+Report bugs to <bug-automake@gnu.org>.
+GNU Automake home page: <https://www.gnu.org/software/automake/>.
+General help using GNU software: <https://www.gnu.org/gethelp/>.
END
}
@@ -57,27 +62,24 @@ log_file= # Where to save the output of the test script.
trs_file= # Where to save the metadata of the test run.
expect_failure=no
color_tests=no
+collect_skipped_logs=yes
enable_hard_errors=yes
-while test $# -gt 1; do
- arg=${1%=*}
- val=${1#*=}
- if [ $arg = $val ]; then
- val=$2
- shift
- fi
- case $arg in
+while test $# -gt 0; do
+ case $1 in
--help) print_usage; exit $?;;
- --version) echo "test-driver $scriptversion"; exit $?;;
- --test-name) test_name=$val;;
- --log-file) log_file=$val;;
- --trs-file) trs_file=$val;;
- --color-tests) color_tests=$val;;
- --expect-failure) expect_failure=$val;;
- --enable-hard-errors) enable_hard_errors=$val;;
- --) break;;
+ --version) echo "test-driver (GNU Automake) $scriptversion"; exit $?;;
+ --test-name) test_name=$2; shift;;
+ --log-file) log_file=$2; shift;;
+ --trs-file) trs_file=$2; shift;;
+ --color-tests) color_tests=$2; shift;;
+ --collect-skipped-logs) collect_skipped_logs=$2; shift;;
+ --expect-failure) expect_failure=$2; shift;;
+ --enable-hard-errors) enable_hard_errors=$2; shift;;
+ --) shift; break;;
-*) usage_error "invalid option: '$1'";;
+ *) break;;
esac
- [ $arg != $val ] && shift
+ shift
done
missing_opts=
@@ -126,7 +128,7 @@ fi
case $tweaked_estatus:$expect_failure in
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
0:*) col=$grn res=PASS recheck=no gcopy=no;;
- 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
+ 77:*) col=$blu res=SKIP recheck=no gcopy=$collect_skipped_logs;;
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
@@ -150,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:
diff --git a/config.h.in b/config.h.in
index bc311a2..c73ed53 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,45 +1,45 @@
/* config.h.in. Generated from configure.ac by autoheader. */
-/* Define to 1 if you have the `copy_file_range' function. */
+/* Define to 1 if you have the 'copy_file_range' function. */
#undef HAVE_COPY_FILE_RANGE
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
-/* Define to 1 if you have the `execv' function. */
+/* Define to 1 if you have the 'execv' function. */
#undef HAVE_EXECV
-/* Define to 1 if you have the `execvp' function. */
+/* Define to 1 if you have the 'execvp' function. */
#undef HAVE_EXECVP
-/* Define to 1 if you have the `fork' function. */
+/* Define to 1 if you have the 'fork' function. */
#undef HAVE_FORK
-/* Define to 1 if you have the `getegid' function. */
+/* Define to 1 if you have the 'getegid' function. */
#undef HAVE_GETEGID
-/* Define to 1 if you have the `geteuid' function. */
+/* Define to 1 if you have the 'geteuid' function. */
#undef HAVE_GETEUID
-/* Define to 1 if you have the `getpid' function. */
+/* Define to 1 if you have the 'getpid' function. */
#undef HAVE_GETPID
-/* Define to 1 if you have the `getppid' function. */
+/* Define to 1 if you have the 'getppid' function. */
#undef HAVE_GETPPID
-/* Define to 1 if you have the `initgroups' function. */
+/* Define to 1 if you have the 'initgroups' function. */
#undef HAVE_INITGROUPS
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define to 1 if you have the `pipe' function. */
+/* Define to 1 if you have the 'pipe' function. */
#undef HAVE_PIPE
-/* Define to 1 if you have the `posix_fadvise' function. */
+/* Define to 1 if you have the 'posix_fadvise' function. */
#undef HAVE_POSIX_FADVISE
-/* Define to 1 if you have the `setgid' function. */
+/* Define to 1 if you have the 'setgid' function. */
#undef HAVE_SETGID
/* Define to 1 if you have the <stdint.h> header file. */
@@ -57,34 +57,34 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
-/* Define to 1 if `st_mtim' is a member of `struct stat'. */
+/* Define to 1 if 'st_mtim' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_MTIM
-/* Define to 1 if `st_mtime' is a member of `struct stat'. */
+/* Define to 1 if 'st_mtime' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_MTIME
-/* Define to 1 if `st_mtimensec' is a member of `struct stat'. */
+/* Define to 1 if 'st_mtimensec' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_MTIMENSEC
-/* Define to 1 if `st_mtimespec' is a member of `struct stat'. */
+/* Define to 1 if 'st_mtimespec' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_MTIMESPEC
-/* Define to 1 if `st_otim' is a member of `struct stat'. */
+/* Define to 1 if 'st_otim' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_OTIM
-/* Define to 1 if `st_otime' is a member of `struct stat'. */
+/* Define to 1 if 'st_otime' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_OTIME
-/* Define to 1 if `st_otimensec' is a member of `struct stat'. */
+/* Define to 1 if 'st_otimensec' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_OTIMENSEC
-/* Define to 1 if `st_otimespec' is a member of `struct stat'. */
+/* Define to 1 if 'st_otimespec' is a member of 'struct stat'. */
#undef HAVE_STRUCT_STAT_ST_OTIMESPEC
-/* Define to 1 if `tv_nsec' is a member of `struct timespec'. */
+/* Define to 1 if 'tv_nsec' is a member of 'struct timespec'. */
#undef HAVE_STRUCT_TIMESPEC_TV_NSEC
-/* Define to 1 if `tv_usec' is a member of `struct timeval'. */
+/* Define to 1 if 'tv_usec' is a member of 'struct timeval'. */
#undef HAVE_STRUCT_TIMEVAL_TV_USEC
/* Define to 1 if you have the <sys/resource.h> header file. */
@@ -129,19 +129,19 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* The size of `char *', as computed by sizeof. */
+/* The size of 'char *', as computed by sizeof. */
#undef SIZEOF_CHAR_P
-/* The size of `struct x *', as computed by sizeof. */
+/* The size of 'struct x *', as computed by sizeof. */
#undef SIZEOF_STRUCT_X_P
-/* The size of `struct x **', as computed by sizeof. */
+/* The size of 'struct x **', as computed by sizeof. */
#undef SIZEOF_STRUCT_X_PP
-/* The size of `void *', as computed by sizeof. */
+/* The size of 'void *', as computed by sizeof. */
#undef SIZEOF_VOID_P
-/* Define to 1 if all of the C90 standard headers exist (not just the ones
+/* Define to 1 if all of the C89 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
diff --git a/configure b/configure
index 2e8727e..e73e86f 100755
--- a/configure
+++ b/configure
@@ -1,9 +1,9 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for libHX 4.23.
+# Generated by GNU Autoconf 2.72 for libHX 5.2.
#
#
-# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
+# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
# Inc.
#
#
@@ -15,7 +15,6 @@
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-as_nop=:
if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
emulate sh
@@ -24,12 +23,13 @@ then :
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else $as_nop
- case `(set -o) 2>/dev/null` in #(
+else case e in #(
+ e) case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
+esac ;;
esac
fi
@@ -101,7 +101,7 @@ IFS=$as_save_IFS
;;
esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
+# We did not find ourselves, most probably we were run as 'sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
@@ -131,15 +131,14 @@ case $- in # ((((
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
+# out after a failed 'exec'.
printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
# We don't want this to propagate to other subprocesses.
{ _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="as_nop=:
-if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
+ as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
emulate sh
NULLCMD=:
@@ -147,12 +146,13 @@ then :
# is contrary to our usage. Disable this feature.
alias -g '\${1+\"\$@\"}'='\"\$@\"'
setopt NO_GLOB_SUBST
-else \$as_nop
- case \`(set -o) 2>/dev/null\` in #(
+else case e in #(
+ e) case \`(set -o) 2>/dev/null\` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
+esac ;;
esac
fi
"
@@ -170,8 +170,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
if ( set x; as_fn_ret_success y && test x = \"\$1\" )
then :
-else \$as_nop
- exitcode=1; echo positional parameters were not saved.
+else case e in #(
+ e) exitcode=1; echo positional parameters were not saved. ;;
+esac
fi
test x\$exitcode = x0 || exit 1
blah=\$(echo \$(echo blah))
@@ -193,14 +194,15 @@ test \$(( 1 + 1 )) = 2 || exit 1"
if (eval "$as_required") 2>/dev/null
then :
as_have_required=yes
-else $as_nop
- as_have_required=no
+else case e in #(
+ e) as_have_required=no ;;
+esac
fi
if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
then :
-else $as_nop
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+else case e in #(
+ e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_found=false
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
@@ -233,12 +235,13 @@ IFS=$as_save_IFS
if $as_found
then :
-else $as_nop
- if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+else case e in #(
+ e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
then :
CONFIG_SHELL=$SHELL as_have_required=yes
-fi
+fi ;;
+esac
fi
@@ -260,7 +263,7 @@ case $- in # ((((
esac
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
+# out after a failed 'exec'.
printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
exit 255
fi
@@ -279,7 +282,8 @@ $0: message. Then install a modern shell, or manually run
$0: the script under such a shell if you do have one."
fi
exit 1
-fi
+fi ;;
+esac
fi
fi
SHELL=${CONFIG_SHELL-/bin/sh}
@@ -318,14 +322,6 @@ as_fn_exit ()
as_fn_set_status $1
exit $1
} # as_fn_exit
-# as_fn_nop
-# ---------
-# Do nothing but, unlike ":", preserve the value of $?.
-as_fn_nop ()
-{
- return $?
-}
-as_nop=as_fn_nop
# as_fn_mkdir_p
# -------------
@@ -394,11 +390,12 @@ then :
{
eval $1+=\$2
}'
-else $as_nop
- as_fn_append ()
+else case e in #(
+ e) as_fn_append ()
{
eval $1=\$$1\$2
- }
+ } ;;
+esac
fi # as_fn_append
# as_fn_arith ARG...
@@ -412,21 +409,14 @@ then :
{
as_val=$(( $* ))
}'
-else $as_nop
- as_fn_arith ()
+else case e in #(
+ e) as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
- }
+ } ;;
+esac
fi # as_fn_arith
-# as_fn_nop
-# ---------
-# Do nothing but, unlike ":", preserve the value of $?.
-as_fn_nop ()
-{
- return $?
-}
-as_nop=as_fn_nop
# as_fn_error STATUS ERROR [LINENO LOG_FD]
# ----------------------------------------
@@ -500,6 +490,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
/[$]LINENO/=
' <$as_myself |
sed '
+ t clear
+ :clear
s/[$]LINENO.*/&-/
t lineno
b
@@ -548,7 +540,6 @@ esac
as_echo='printf %s\n'
as_echo_n='printf %s'
-
rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
@@ -560,9 +551,9 @@ if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -pR'.
+ # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
+ # In both cases, we have to default to 'cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
@@ -587,10 +578,12 @@ as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed '$as_sed_sh'" # deprecated
SHELL=${CONFIG_SHELL-/bin/sh}
@@ -618,8 +611,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libHX'
PACKAGE_TARNAME='libhx'
-PACKAGE_VERSION='4.23'
-PACKAGE_STRING='libHX 4.23'
+PACKAGE_VERSION='5.2'
+PACKAGE_STRING='libHX 5.2'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -670,8 +663,8 @@ HAVE_DLFCN_H_FALSE
HAVE_DLFCN_H_TRUE
WITH_SUN_LD_FALSE
WITH_SUN_LD_TRUE
-WITH_GNU_LD_FALSE
-WITH_GNU_LD_TRUE
+WITH_LDSYM_FALSE
+WITH_LDSYM_TRUE
pkgconfigdir
MINGW32_FALSE
MINGW32_TRUE
@@ -731,6 +724,8 @@ CPPFLAGS
LDFLAGS
CFLAGS
CC
+am__xargs_n
+am__rm_f_notfound
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
@@ -808,8 +803,10 @@ enable_silent_rules
enable_dependency_tracking
enable_static
enable_shared
+enable_pic
with_pic
enable_fast_install
+enable_aix_soname
with_aix_soname
with_gnu_ld
with_sysroot
@@ -937,7 +934,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ as_fn_error $? "invalid feature name: '$ac_useropt'"
ac_useropt_orig=$ac_useropt
ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -963,7 +960,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid feature name: \`$ac_useropt'"
+ as_fn_error $? "invalid feature name: '$ac_useropt'"
ac_useropt_orig=$ac_useropt
ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1176,7 +1173,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: \`$ac_useropt'"
+ as_fn_error $? "invalid package name: '$ac_useropt'"
ac_useropt_orig=$ac_useropt
ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1192,7 +1189,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error $? "invalid package name: \`$ac_useropt'"
+ as_fn_error $? "invalid package name: '$ac_useropt'"
ac_useropt_orig=$ac_useropt
ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1222,8 +1219,8 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
+ -*) as_fn_error $? "unrecognized option: '$ac_option'
+Try '$0 --help' for more information"
;;
*=*)
@@ -1231,7 +1228,7 @@ Try \`$0 --help' for more information"
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1281,7 +1278,7 @@ do
as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
-# There might be people who depend on the old broken behavior: `$host'
+# There might be people who depend on the old broken behavior: '$host'
# used to hold the argument of --host etc.
# FIXME: To remove some day.
build=$build_alias
@@ -1349,7 +1346,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
ac_abs_confdir=`(
cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
@@ -1377,7 +1374,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libHX 4.23 to adapt to many kinds of systems.
+'configure' configures libHX 5.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1391,11 +1388,11 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking ...' messages
+ -q, --quiet, --silent do not print 'checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
- -C, --config-cache alias for \`--cache-file=config.cache'
+ -C, --config-cache alias for '--cache-file=config.cache'
-n, --no-create do not create output files
- --srcdir=DIR find the sources in DIR [configure dir or \`..']
+ --srcdir=DIR find the sources in DIR [configure dir or '..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -1403,10 +1400,10 @@ Installation directories:
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
+By default, 'make install' will install all the files in
+'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than '$ac_default_prefix' using '--prefix',
+for instance '--prefix=\$HOME'.
For better control, use the options below.
@@ -1448,7 +1445,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libHX 4.23:";;
+ short | recursive ) echo "Configuration of libHX 5.2:";;
esac
cat <<\_ACEOF
@@ -1464,18 +1461,18 @@ Optional Features:
speeds up one-time build
--enable-static[=PKGS] build static libraries [default=no]
--enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
+ both]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
+ --enable-aix-soname=aix|svr4|both
+ shared library versioning (aka "SONAME") variant to
+ provide on AIX, [default=aix].
--disable-libtool-lock avoid locking (might break parallel builds)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
- both]
- --with-aix-soname=aix|svr4|both
- shared library versioning (aka "SONAME") variant to
- provide on AIX, [default=aix].
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
@@ -1496,7 +1493,7 @@ Some influential environment variables:
User-defined run-time library search path.
CXXCPP C++ preprocessor
-Use these variables to override the choices made by `configure' or to help
+Use these variables to override the choices made by 'configure' or to help
it to find libraries and programs with nonstandard names/locations.
Report bugs to the package provider.
@@ -1563,10 +1560,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libHX configure 4.23
-generated by GNU Autoconf 2.71
+libHX configure 5.2
+generated by GNU Autoconf 2.72
-Copyright (C) 2021 Free Software Foundation, Inc.
+Copyright (C) 2023 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1605,11 +1602,12 @@ printf "%s\n" "$ac_try_echo"; } >&5
} && test -s conftest.$ac_objext
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1 ;;
+esac
fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
@@ -1644,11 +1642,12 @@ printf "%s\n" "$ac_try_echo"; } >&5
} && test -s conftest.$ac_objext
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1 ;;
+esac
fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
@@ -1686,11 +1685,12 @@ printf "%s\n" "$ac_try_echo"; } >&5
}
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1 ;;
+esac
fi
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
@@ -1714,8 +1714,8 @@ printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
#include <$2>
@@ -1723,10 +1723,12 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$3=yes"
-else $as_nop
- eval "$3=no"
+else case e in #(
+ e) eval "$3=no" ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
eval ac_res=\$$3
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -1746,15 +1748,15 @@ printf %s "checking for $2... " >&6; }
if eval test \${$3+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define $2 innocuous_$2
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); below. */
+ which can conflict with char $2 (void); below. */
#include <limits.h>
#undef $2
@@ -1765,7 +1767,7 @@ else $as_nop
#ifdef __cplusplus
extern "C"
#endif
-char $2 ();
+char $2 (void);
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
@@ -1784,11 +1786,13 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
eval "$3=yes"
-else $as_nop
- eval "$3=no"
+else case e in #(
+ e) eval "$3=no" ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
+ conftest$ac_exeext conftest.$ac_ext ;;
+esac
fi
eval ac_res=\$$3
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -1824,11 +1828,12 @@ printf "%s\n" "$ac_try_echo"; } >&5
}
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1 ;;
+esac
fi
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
@@ -1866,11 +1871,12 @@ printf "%s\n" "$ac_try_echo"; } >&5
}
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
+ ac_retval=1 ;;
+esac
fi
# Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
# created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
@@ -1912,12 +1918,13 @@ printf "%s\n" "$ac_try_echo"; } >&5
test $ac_status = 0; }; }
then :
ac_retval=0
-else $as_nop
- printf "%s\n" "$as_me: program exited with status $ac_status" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=$ac_status
+ ac_retval=$ac_status ;;
+esac
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
@@ -1970,18 +1977,19 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_hi=$ac_mid; break
-else $as_nop
- as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+else case e in #(
+ e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val
if test $ac_lo -le $ac_mid; then
ac_lo= ac_hi=
break
fi
- as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$4
int
@@ -2016,20 +2024,23 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_lo=$ac_mid; break
-else $as_nop
- as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+else case e in #(
+ e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
if test $ac_mid -le $ac_hi; then
ac_lo= ac_hi=
break
fi
- as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
-else $as_nop
- ac_lo= ac_hi=
+else case e in #(
+ e) ac_lo= ac_hi= ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
# Binary search between lo and hi bounds.
@@ -2052,8 +2063,9 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_hi=$ac_mid
-else $as_nop
- as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+else case e in #(
+ e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
done
@@ -2101,8 +2113,9 @@ _ACEOF
if ac_fn_c_try_run "$LINENO"
then :
echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else $as_nop
- ac_retval=1
+else case e in #(
+ e) ac_retval=1 ;;
+esac
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -2126,8 +2139,8 @@ printf %s "checking for $2.$3... " >&6; }
if eval test \${$4+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
@@ -2143,8 +2156,8 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$4=yes"
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$5
int
@@ -2160,12 +2173,15 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
eval "$4=yes"
-else $as_nop
- eval "$4=no"
+else case e in #(
+ e) eval "$4=no" ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
eval ac_res=\$$4
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -2197,8 +2213,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libHX $as_me 4.23, which was
-generated by GNU Autoconf 2.71. Invocation command line was
+It was created by libHX $as_me 5.2, which was
+generated by GNU Autoconf 2.72. Invocation command line was
$ $0$ac_configure_args_raw
@@ -2444,10 +2460,10 @@ esac
printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file" \
- || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
fi
done
@@ -2483,9 +2499,7 @@ struct stat;
/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
struct buf { int x; };
struct buf * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
+static char *e (char **p, int i)
{
return p[i];
}
@@ -2499,6 +2513,21 @@ static char *f (char * (*g) (char **, int), char **p, ...)
return s;
}
+/* C89 style stringification. */
+#define noexpand_stringify(a) #a
+const char *stringified = noexpand_stringify(arbitrary+token=sequence);
+
+/* C89 style token pasting. Exercises some of the corner cases that
+ e.g. old MSVC gets wrong, but not very hard. */
+#define noexpand_concat(a,b) a##b
+#define expand_concat(a,b) noexpand_concat(a,b)
+extern int vA;
+extern int vbee;
+#define aye A
+#define bee B
+int *pvA = &expand_concat(v,aye);
+int *pvbee = &noexpand_concat(v,bee);
+
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not \xHH hex character constants.
These do not provoke an error unfortunately, instead are silently treated
@@ -2526,16 +2555,19 @@ ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
# Test code for whether the C compiler supports C99 (global declarations)
ac_c_conftest_c99_globals='
-// Does the compiler advertise C99 conformance?
+/* Does the compiler advertise C99 conformance? */
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
# error "Compiler does not advertise C99 conformance"
#endif
+// See if C++-style comments work.
+
#include <stdbool.h>
extern int puts (const char *);
extern int printf (const char *, ...);
extern int dprintf (int, const char *, ...);
extern void *malloc (size_t);
+extern void free (void *);
// Check varargs macros. These examples are taken from C99 6.10.3.5.
// dprintf is used instead of fprintf to avoid needing to declare
@@ -2585,7 +2617,6 @@ typedef const char *ccp;
static inline int
test_restrict (ccp restrict text)
{
- // See if C++-style comments work.
// Iterate through items via the restricted pointer.
// Also check for declarations in for loops.
for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
@@ -2651,6 +2682,8 @@ ac_c_conftest_c99_main='
ia->datasize = 10;
for (int i = 0; i < ia->datasize; ++i)
ia->data[i] = i * 1.234;
+ // Work around memory leak warnings.
+ free (ia);
// Check named initializers.
struct named_init ni = {
@@ -2672,7 +2705,7 @@ ac_c_conftest_c99_main='
# Test code for whether the C compiler supports C11 (global declarations)
ac_c_conftest_c11_globals='
-// Does the compiler advertise C11 conformance?
+/* Does the compiler advertise C11 conformance? */
#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
# error "Compiler does not advertise C11 conformance"
#endif
@@ -3080,8 +3113,9 @@ IFS=$as_save_IFS
if $as_found
then :
-else $as_nop
- as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
+else case e in #(
+ e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;;
+esac
fi
@@ -3109,12 +3143,12 @@ for ac_var in $ac_precious_vars; do
eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
+printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
+printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
@@ -3123,18 +3157,18 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_old_val_w=`echo x $ac_old_val`
ac_new_val_w=`echo x $ac_new_val`
if test "$ac_old_val_w" != "$ac_new_val_w"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
+printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
ac_cache_corrupted=:
else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
+printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
eval $ac_var=\$ac_old_val
fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
-printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5
+printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5
+printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;}
fi;;
esac
# Pass precious variables to config.status.
@@ -3150,11 +3184,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
fi
done
if $ac_cache_corrupted; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
+ as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
and start over" "$LINENO" 5
fi
## -------------------- ##
@@ -3194,8 +3228,8 @@ if test -z "$INSTALL"; then
if test ${ac_cv_path_install+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+else case e in #(
+ e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
@@ -3249,7 +3283,8 @@ esac
IFS=$as_save_IFS
rm -rf conftest.one conftest.two conftest.dir
-
+ ;;
+esac
fi
if test ${ac_cv_path_install+y}; then
INSTALL=$ac_cv_path_install
@@ -3272,8 +3307,167 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-am__api_version='1.16'
+am__api_version='1.18'
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sleep supports fractional seconds" >&5
+printf %s "checking whether sleep supports fractional seconds... " >&6; }
+if test ${am_cv_sleep_fractional_seconds+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if sleep 0.001 2>/dev/null
+then :
+ am_cv_sleep_fractional_seconds=yes
+else case e in #(
+ e) am_cv_sleep_fractional_seconds=no ;;
+esac
+fi
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_sleep_fractional_seconds" >&5
+printf "%s\n" "$am_cv_sleep_fractional_seconds" >&6; }
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking filesystem timestamp resolution" >&5
+printf %s "checking filesystem timestamp resolution... " >&6; }
+if test ${am_cv_filesystem_timestamp_resolution+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) # Default to the worst case.
+am_cv_filesystem_timestamp_resolution=2
+
+# Only try to go finer than 1 sec if sleep can do it.
+# Don't try 1 sec, because if 0.01 sec and 0.1 sec don't work,
+# - 1 sec is not much of a win compared to 2 sec, and
+# - it takes 2 seconds to perform the test whether 1 sec works.
+#
+# Instead, just use the default 2s on platforms that have 1s resolution,
+# accept the extra 1s delay when using $sleep in the Automake tests, in
+# exchange for not incurring the 2s delay for running the test for all
+# packages.
+#
+am_try_resolutions=
+if test "$am_cv_sleep_fractional_seconds" = yes; then
+ # Even a millisecond often causes a bunch of false positives,
+ # so just try a hundredth of a second. The time saved between .001 and
+ # .01 is not terribly consequential.
+ am_try_resolutions="0.01 0.1 $am_try_resolutions"
+fi
+
+# In order to catch current-generation FAT out, we must *modify* files
+# that already exist; the *creation* timestamp is finer. Use names
+# that make ls -t sort them differently when they have equal
+# timestamps than when they have distinct timestamps, keeping
+# in mind that ls -t prints the *newest* file first.
+rm -f conftest.ts?
+: > conftest.ts1
+: > conftest.ts2
+: > conftest.ts3
+
+# Make sure ls -t actually works. Do 'set' in a subshell so we don't
+# clobber the current shell's arguments. (Outer-level square brackets
+# are removed by m4; they're present so that m4 does not expand
+# <dollar><star>; be careful, easy to get confused.)
+if (
+ set X `ls -t conftest.ts[12]` &&
+ {
+ test "$*" != "X conftest.ts1 conftest.ts2" ||
+ test "$*" != "X conftest.ts2 conftest.ts1";
+ }
+); then :; else
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ printf "%s\n" ""Bad output from ls -t: \"`ls -t conftest.ts[12]`\""" >&5
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
+as_fn_error $? "ls -t produces unexpected output.
+Make sure there is not a broken ls alias in your environment.
+See 'config.log' for more details" "$LINENO" 5; }
+fi
+
+for am_try_res in $am_try_resolutions; do
+ # Any one fine-grained sleep might happen to cross the boundary
+ # between two values of a coarser actual resolution, but if we do
+ # two fine-grained sleeps in a row, at least one of them will fall
+ # entirely within a coarse interval.
+ echo alpha > conftest.ts1
+ sleep $am_try_res
+ echo beta > conftest.ts2
+ sleep $am_try_res
+ echo gamma > conftest.ts3
+
+ # We assume that 'ls -t' will make use of high-resolution
+ # timestamps if the operating system supports them at all.
+ if (set X `ls -t conftest.ts?` &&
+ test "$2" = conftest.ts3 &&
+ test "$3" = conftest.ts2 &&
+ test "$4" = conftest.ts1); then
+ #
+ # Ok, ls -t worked. If we're at a resolution of 1 second, we're done,
+ # because we don't need to test make.
+ make_ok=true
+ if test $am_try_res != 1; then
+ # But if we've succeeded so far with a subsecond resolution, we
+ # have one more thing to check: make. It can happen that
+ # everything else supports the subsecond mtimes, but make doesn't;
+ # notably on macOS, which ships make 3.81 from 2006 (the last one
+ # released under GPLv2). https://bugs.gnu.org/68808
+ #
+ # We test $MAKE if it is defined in the environment, else "make".
+ # It might get overridden later, but our hope is that in practice
+ # it does not matter: it is the system "make" which is (by far)
+ # the most likely to be broken, whereas if the user overrides it,
+ # probably they did so with a better, or at least not worse, make.
+ # https://lists.gnu.org/archive/html/automake/2024-06/msg00051.html
+ #
+ # Create a Makefile (real tab character here):
+ rm -f conftest.mk
+ echo 'conftest.ts1: conftest.ts2' >conftest.mk
+ echo ' touch conftest.ts2' >>conftest.mk
+ #
+ # Now, running
+ # touch conftest.ts1; touch conftest.ts2; make
+ # should touch ts1 because ts2 is newer. This could happen by luck,
+ # but most often, it will fail if make's support is insufficient. So
+ # test for several consecutive successes.
+ #
+ # (We reuse conftest.ts[12] because we still want to modify existing
+ # files, not create new ones, per above.)
+ n=0
+ make=${MAKE-make}
+ until test $n -eq 3; do
+ echo one > conftest.ts1
+ sleep $am_try_res
+ echo two > conftest.ts2 # ts2 should now be newer than ts1
+ if $make -f conftest.mk | grep 'up to date' >/dev/null; then
+ make_ok=false
+ break # out of $n loop
+ fi
+ n=`expr $n + 1`
+ done
+ fi
+ #
+ if $make_ok; then
+ # Everything we know to check worked out, so call this resolution good.
+ am_cv_filesystem_timestamp_resolution=$am_try_res
+ break # out of $am_try_res loop
+ fi
+ # Otherwise, we'll go on to check the next resolution.
+ fi
+done
+rm -f conftest.ts?
+# (end _am_filesystem_timestamp_resolution)
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_filesystem_timestamp_resolution" >&5
+printf "%s\n" "$am_cv_filesystem_timestamp_resolution" >&6; }
+
+# This check should not be cached, as it may vary across builds of
+# different projects.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
printf %s "checking whether build environment is sane... " >&6; }
# Reject unsafe characters in $srcdir or the absolute working directory
@@ -3282,10 +3476,14 @@ am_lf='
'
case `pwd` in
*[\\\"\#\$\&\'\`$am_lf]*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
esac
@@ -3294,49 +3492,45 @@ esac
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
-if (
- am_has_slept=no
- for am_try in 1 2; do
- echo "timestamp, slept: $am_has_slept" > conftest.file
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
- alias in your environment" "$LINENO" 5
- fi
- if test "$2" = conftest.file || test $am_try -eq 2; then
- break
- fi
- # Just in case.
- sleep 1
- am_has_slept=yes
- done
- test "$2" = conftest.file
- )
-then
- # Ok.
- :
-else
- as_fn_error $? "newly created file is older than distributed files!
+am_build_env_is_sane=no
+am_has_slept=no
+rm -f conftest.file
+for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ test "$2" = conftest.file
+ ); then
+ am_build_env_is_sane=yes
+ break
+ fi
+ # Just in case.
+ sleep "$am_cv_filesystem_timestamp_resolution"
+ am_has_slept=yes
+done
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_build_env_is_sane" >&5
+printf "%s\n" "$am_build_env_is_sane" >&6; }
+if test "$am_build_env_is_sane" = no; then
+ as_fn_error $? "newly created file is older than distributed files!
Check your system clock" "$LINENO" 5
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
+
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
- ( sleep 1 ) &
+if test -e conftest.file || grep 'slept: no' conftest.file >/dev/null 2>&1
+then :
+
+else case e in #(
+ e) ( sleep "$am_cv_filesystem_timestamp_resolution" ) &
am_sleep_pid=$!
+ ;;
+esac
fi
rm -f conftest.file
@@ -3347,7 +3541,7 @@ test "$program_prefix" != NONE &&
test "$program_suffix" != NONE &&
program_transform_name="s&\$&$program_suffix&;$program_transform_name"
# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
+# By default was 's,x,x', remove it if useless.
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
@@ -3390,8 +3584,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_STRIP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$STRIP"; then
+else case e in #(
+ e) if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3413,7 +3607,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
@@ -3435,8 +3630,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_STRIP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_STRIP"; then
+else case e in #(
+ e) if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3458,7 +3653,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
@@ -3494,8 +3690,8 @@ if test -z "$MKDIR_P"; then
if test ${ac_cv_path_mkdir+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+else case e in #(
+ e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
do
IFS=$as_save_IFS
@@ -3509,7 +3705,7 @@ do
as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
'mkdir ('*'coreutils) '* | \
- 'BusyBox '* | \
+ *'BusyBox '* | \
'mkdir (fileutils) '4.1*)
ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
break 3;;
@@ -3518,18 +3714,17 @@ do
done
done
IFS=$as_save_IFS
-
+ ;;
+esac
fi
test -d ./--version && rmdir ./--version
if test ${ac_cv_path_mkdir+y}; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
- # As a last resort, use the slow shell script. Don't cache a
- # value for MKDIR_P within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the value is a relative name.
- MKDIR_P="$ac_install_sh -d"
+ # As a last resort, use plain mkdir -p,
+ # in the hope it doesn't have the bugs of ancient mkdir.
+ MKDIR_P='mkdir -p'
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
@@ -3544,8 +3739,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_AWK+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$AWK"; then
+else case e in #(
+ e) if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3567,7 +3762,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
@@ -3589,8 +3785,8 @@ ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
if eval test \${ac_cv_prog_make_${ac_make}_set+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat >conftest.make <<\_ACEOF
+else case e in #(
+ e) cat >conftest.make <<\_ACEOF
SHELL = /bin/sh
all:
@echo '@@@%%%=$(MAKE)=@@@%%%'
@@ -3602,7 +3798,8 @@ case `${MAKE-make} -f conftest.make 2>/dev/null` in
*)
eval ac_cv_prog_make_${ac_make}_set=no;;
esac
-rm -f conftest.make
+rm -f conftest.make ;;
+esac
fi
if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -3623,25 +3820,21 @@ else
fi
rmdir .tst 2>/dev/null
+AM_DEFAULT_VERBOSITY=1
# Check whether --enable-silent-rules was given.
if test ${enable_silent_rules+y}
then :
enableval=$enable_silent_rules;
fi
-case $enable_silent_rules in # (((
- yes) AM_DEFAULT_VERBOSITY=0;;
- no) AM_DEFAULT_VERBOSITY=1;;
- *) AM_DEFAULT_VERBOSITY=1;;
-esac
am_make=${MAKE-make}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
printf %s "checking whether $am_make supports nested variables... " >&6; }
if test ${am_cv_make_support_nested_variables+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if printf "%s\n" 'TRUE=$(BAR$(V))
+else case e in #(
+ e) if printf "%s\n" 'TRUE=$(BAR$(V))
BAR0=false
BAR1=true
V=1
@@ -3651,19 +3844,50 @@ am__doit:
am_cv_make_support_nested_variables=yes
else
am_cv_make_support_nested_variables=no
-fi
+fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
-if test $am_cv_make_support_nested_variables = yes; then
- AM_V='$(V)'
- AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
- AM_V=$AM_DEFAULT_VERBOSITY
- AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
AM_BACKSLASH='\'
+am__rm_f_notfound=
+if (rm -f && rm -fr && rm -rf) 2>/dev/null
+then :
+
+else case e in #(
+ e) am__rm_f_notfound='""' ;;
+esac
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking xargs -n works" >&5
+printf %s "checking xargs -n works... " >&6; }
+if test ${am_cv_xargs_n_works+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if test "`echo 1 2 3 | xargs -n2 echo`" = "1 2
+3"
+then :
+ am_cv_xargs_n_works=yes
+else case e in #(
+ e) am_cv_xargs_n_works=no ;;
+esac
+fi ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_xargs_n_works" >&5
+printf "%s\n" "$am_cv_xargs_n_works" >&6; }
+if test "$am_cv_xargs_n_works" = yes
+then :
+ am__xargs_n='xargs -n'
+else case e in #(
+ e) am__xargs_n='am__xargs_n () { shift; sed "s/ /\\n/g" | while read am__xargs_n_arg; do "" "$am__xargs_n_arg"; done; }'
+ ;;
+esac
+fi
+
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
@@ -3686,7 +3910,7 @@ fi
# Define the identity of the package.
PACKAGE='libhx'
- VERSION='4.23'
+ VERSION='5.2'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -3807,8 +4031,9 @@ printf %s "checking how to create a pax tar archive... " >&6; }
if test ${am_cv_prog_tar_pax+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- am_cv_prog_tar_pax=$_am_tool
+else case e in #(
+ e) am_cv_prog_tar_pax=$_am_tool ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5
@@ -3833,87 +4058,11 @@ fi
-# POSIX will say in a future version that running "rm -f" with no argument
-# is OK; and we want to be able to make that assumption in our Makefile
-# recipes. So use an aggressive probe to check that the usage we want is
-# actually supported "in the wild" to an acceptable degree.
-# See automake bug#10828.
-# To make any issue more visible, cause the running configure to be aborted
-# by default if the 'rm' program in use doesn't match our expectations; the
-# user can still override this though.
-if rm -f && rm -fr && rm -rf; then : OK; else
- cat >&2 <<'END'
-Oops!
-
-Your 'rm' program seems unable to run without file operands specified
-on the command line, even when the '-f' option is present. This is contrary
-to the behaviour of most rm programs out there, and not conforming with
-the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+AM_DEFAULT_VERBOSITY=0
-Please tell bug-automake@gnu.org about your system, including the value
-of your $PATH and any error possibly output before this message. This
-can help us improve future automake versions.
-
-END
- if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
- echo 'Configuration will proceed anyway, since you have set the' >&2
- echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
- echo >&2
- else
- cat >&2 <<'END'
-Aborting the configuration process, to ensure you take notice of the issue.
-You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <https://www.gnu.org/software/coreutils/>.
-If you want to complete the configuration process using your problematic
-'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
-to "yes", and re-run configure.
-END
- as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
- fi
-fi
-# Check whether --enable-silent-rules was given.
-if test ${enable_silent_rules+y}
-then :
- enableval=$enable_silent_rules;
-fi
-
-case $enable_silent_rules in # (((
- yes) AM_DEFAULT_VERBOSITY=0;;
- no) AM_DEFAULT_VERBOSITY=1;;
- *) AM_DEFAULT_VERBOSITY=0;;
-esac
-am_make=${MAKE-make}
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-printf %s "checking whether $am_make supports nested variables... " >&6; }
-if test ${am_cv_make_support_nested_variables+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if printf "%s\n" 'TRUE=$(BAR$(V))
-BAR0=false
-BAR1=true
-V=1
-am__doit:
- @$(TRUE)
-.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
- am_cv_make_support_nested_variables=yes
-else
- am_cv_make_support_nested_variables=no
-fi
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
-if test $am_cv_make_support_nested_variables = yes; then
- AM_V='$(V)'
- AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
- AM_V=$AM_DEFAULT_VERBOSITY
- AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
-AM_BACKSLASH='\'
@@ -3938,8 +4087,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3961,7 +4110,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -3983,8 +4133,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_CC"; then
+else case e in #(
+ e) if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4006,7 +4156,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
@@ -4041,8 +4192,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4064,7 +4215,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -4086,8 +4238,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
ac_prog_rejected=no
@@ -4126,7 +4278,8 @@ if test $ac_prog_rejected = yes; then
ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
fi
fi
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -4150,8 +4303,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4173,7 +4326,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -4199,8 +4353,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_CC"; then
+else case e in #(
+ e) if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4222,7 +4376,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
@@ -4260,8 +4415,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CC"; then
+else case e in #(
+ e) if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4283,7 +4438,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
@@ -4305,8 +4461,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CC+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_CC"; then
+else case e in #(
+ e) if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -4328,7 +4484,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
@@ -4357,10 +4514,10 @@ fi
fi
-test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -4432,8 +4589,8 @@ printf "%s\n" "$ac_try_echo"; } >&5
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
then :
- # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+ # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
+# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
# in a Makefile. We should not override ac_cv_exeext if it was cached,
# so that the user can short-circuit this test for compilers unknown to
# Autoconf.
@@ -4453,7 +4610,7 @@ do
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
fi
# We set ac_cv_exeext here because the later test for it is not
- # safe: cross compilers may not add the suffix if given an `-o'
+ # safe: cross compilers may not add the suffix if given an '-o'
# argument, so we may need to know it at that point already.
# Even if this section looks crufty: it has the advantage of
# actually working.
@@ -4464,8 +4621,9 @@ do
done
test "$ac_cv_exeext" = no && ac_cv_exeext=
-else $as_nop
- ac_file=''
+else case e in #(
+ e) ac_file='' ;;
+esac
fi
if test -z "$ac_file"
then :
@@ -4474,13 +4632,14 @@ printf "%s\n" "no" >&6; }
printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-printf "%s\n" "yes" >&6; }
+See 'config.log' for more details" "$LINENO" 5; }
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; } ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
printf %s "checking for C compiler default output file name... " >&6; }
@@ -4504,10 +4663,10 @@ printf "%s\n" "$ac_try_echo"; } >&5
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
then :
- # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
+ # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
+# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will
+# work properly (i.e., refer to 'conftest.exe'), while it won't with
+# 'rm'.
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
@@ -4517,11 +4676,12 @@ for ac_file in conftest.exe conftest conftest.*; do
* ) break;;
esac
done
-else $as_nop
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; } ;;
+esac
fi
rm -f conftest conftest$ac_cv_exeext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -4537,6 +4697,8 @@ int
main (void)
{
FILE *f = fopen ("conftest.out", "w");
+ if (!f)
+ return 1;
return ferror (f) || fclose (f) != 0;
;
@@ -4576,26 +4738,27 @@ printf "%s\n" "$ac_try_echo"; } >&5
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
+If you meant to cross compile, use '--host'.
+See 'config.log' for more details" "$LINENO" 5; }
fi
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
printf "%s\n" "$cross_compiling" >&6; }
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+rm -f conftest.$ac_ext conftest$ac_cv_exeext \
+ conftest.o conftest.obj conftest.out
ac_clean_files=$ac_clean_files_save
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
printf %s "checking for suffix of object files... " >&6; }
if test ${ac_cv_objext+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4627,16 +4790,18 @@ then :
break;;
esac
done
-else $as_nop
- printf "%s\n" "$as_me: failed program was:" >&5
+else case e in #(
+ e) printf "%s\n" "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; } ;;
+esac
fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
+rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
printf "%s\n" "$ac_cv_objext" >&6; }
@@ -4647,8 +4812,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; }
if test ${ac_cv_c_compiler_gnu+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4665,12 +4830,14 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_compiler_gnu=yes
-else $as_nop
- ac_compiler_gnu=no
+else case e in #(
+ e) ac_compiler_gnu=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
@@ -4688,8 +4855,8 @@ printf %s "checking whether $CC accepts -g... " >&6; }
if test ${ac_cv_prog_cc_g+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_save_c_werror_flag=$ac_c_werror_flag
+else case e in #(
+ e) ac_save_c_werror_flag=$ac_c_werror_flag
ac_c_werror_flag=yes
ac_cv_prog_cc_g=no
CFLAGS="-g"
@@ -4707,8 +4874,8 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_prog_cc_g=yes
-else $as_nop
- CFLAGS=""
+else case e in #(
+ e) CFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4723,8 +4890,8 @@ _ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
-else $as_nop
- ac_c_werror_flag=$ac_save_c_werror_flag
+else case e in #(
+ e) ac_c_werror_flag=$ac_save_c_werror_flag
CFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4741,12 +4908,15 @@ if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_prog_cc_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- ac_c_werror_flag=$ac_save_c_werror_flag
+ ac_c_werror_flag=$ac_save_c_werror_flag ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
@@ -4773,8 +4943,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; }
if test ${ac_cv_prog_cc_c11+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_prog_cc_c11=no
+else case e in #(
+ e) ac_cv_prog_cc_c11=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4791,25 +4961,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c11" != "xno" && break
done
rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
fi
if test "x$ac_cv_prog_cc_c11" = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
-else $as_nop
- if test "x$ac_cv_prog_cc_c11" = x
+else case e in #(
+ e) if test "x$ac_cv_prog_cc_c11" = x
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
- CC="$CC $ac_cv_prog_cc_c11"
+ CC="$CC $ac_cv_prog_cc_c11" ;;
+esac
fi
ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
- ac_prog_cc_stdc=c11
+ ac_prog_cc_stdc=c11 ;;
+esac
fi
fi
if test x$ac_prog_cc_stdc = xno
@@ -4819,8 +4992,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; }
if test ${ac_cv_prog_cc_c99+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_prog_cc_c99=no
+else case e in #(
+ e) ac_cv_prog_cc_c99=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4837,25 +5010,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c99" != "xno" && break
done
rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
fi
if test "x$ac_cv_prog_cc_c99" = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
-else $as_nop
- if test "x$ac_cv_prog_cc_c99" = x
+else case e in #(
+ e) if test "x$ac_cv_prog_cc_c99" = x
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
- CC="$CC $ac_cv_prog_cc_c99"
+ CC="$CC $ac_cv_prog_cc_c99" ;;
+esac
fi
ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
- ac_prog_cc_stdc=c99
+ ac_prog_cc_stdc=c99 ;;
+esac
fi
fi
if test x$ac_prog_cc_stdc = xno
@@ -4865,8 +5041,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; }
if test ${ac_cv_prog_cc_c89+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_prog_cc_c89=no
+else case e in #(
+ e) ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -4883,25 +5059,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cc_c89" != "xno" && break
done
rm -f conftest.$ac_ext
-CC=$ac_save_CC
+CC=$ac_save_CC ;;
+esac
fi
if test "x$ac_cv_prog_cc_c89" = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
-else $as_nop
- if test "x$ac_cv_prog_cc_c89" = x
+else case e in #(
+ e) if test "x$ac_cv_prog_cc_c89" = x
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
- CC="$CC $ac_cv_prog_cc_c89"
+ CC="$CC $ac_cv_prog_cc_c89" ;;
+esac
fi
ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
- ac_prog_cc_stdc=c89
+ ac_prog_cc_stdc=c89 ;;
+esac
fi
fi
@@ -4922,8 +5101,8 @@ printf %s "checking whether $CC understands -c and -o together... " >&6; }
if test ${am_cv_prog_cc_c_o+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -4952,8 +5131,12 @@ _ACEOF
break
fi
done
- rm -f core conftest*
- unset am_i
+ # 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 ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
@@ -5043,8 +5226,8 @@ printf %s "checking dependency style of $depcc... " >&6; }
if test ${am_cv_CC_dependencies_compiler_type+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+else case e in #(
+ e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
@@ -5131,7 +5314,7 @@ else $as_nop
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # When given -MP, icc 7.0 and 7.1 complain thus:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
@@ -5148,7 +5331,8 @@ else $as_nop
else
am_cv_CC_dependencies_compiler_type=none
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
@@ -5191,8 +5375,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$CXX"; then
+else case e in #(
+ e) if test -n "$CXX"; then
ac_cv_prog_CXX="$CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5214,7 +5398,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
CXX=$ac_cv_prog_CXX
if test -n "$CXX"; then
@@ -5240,8 +5425,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_CXX"; then
+else case e in #(
+ e) if test -n "$ac_ct_CXX"; then
ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5263,7 +5448,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
if test -n "$ac_ct_CXX"; then
@@ -5323,8 +5509,8 @@ printf %s "checking whether the compiler supports GNU C++... " >&6; }
if test ${ac_cv_cxx_compiler_gnu+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -5341,12 +5527,14 @@ _ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
ac_compiler_gnu=yes
-else $as_nop
- ac_compiler_gnu=no
+else case e in #(
+ e) ac_compiler_gnu=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
@@ -5364,8 +5552,8 @@ printf %s "checking whether $CXX accepts -g... " >&6; }
if test ${ac_cv_prog_cxx_g+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+else case e in #(
+ e) ac_save_cxx_werror_flag=$ac_cxx_werror_flag
ac_cxx_werror_flag=yes
ac_cv_prog_cxx_g=no
CXXFLAGS="-g"
@@ -5383,8 +5571,8 @@ _ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
ac_cv_prog_cxx_g=yes
-else $as_nop
- CXXFLAGS=""
+else case e in #(
+ e) CXXFLAGS=""
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5399,8 +5587,8 @@ _ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
-else $as_nop
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+else case e in #(
+ e) ac_cxx_werror_flag=$ac_save_cxx_werror_flag
CXXFLAGS="-g"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5417,12 +5605,15 @@ if ac_fn_cxx_try_compile "$LINENO"
then :
ac_cv_prog_cxx_g=yes
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
@@ -5446,11 +5637,11 @@ if test x$ac_prog_cxx_stdcxx = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
printf %s "checking for $CXX option to enable C++11 features... " >&6; }
-if test ${ac_cv_prog_cxx_11+y}
+if test ${ac_cv_prog_cxx_cxx11+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_prog_cxx_11=no
+else case e in #(
+ e) ac_cv_prog_cxx_cxx11=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5467,36 +5658,39 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
done
rm -f conftest.$ac_ext
-CXX=$ac_save_CXX
+CXX=$ac_save_CXX ;;
+esac
fi
if test "x$ac_cv_prog_cxx_cxx11" = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
-else $as_nop
- if test "x$ac_cv_prog_cxx_cxx11" = x
+else case e in #(
+ e) if test "x$ac_cv_prog_cxx_cxx11" = x
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
- CXX="$CXX $ac_cv_prog_cxx_cxx11"
+ CXX="$CXX $ac_cv_prog_cxx_cxx11" ;;
+esac
fi
ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
- ac_prog_cxx_stdcxx=cxx11
+ ac_prog_cxx_stdcxx=cxx11 ;;
+esac
fi
fi
if test x$ac_prog_cxx_stdcxx = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
printf %s "checking for $CXX option to enable C++98 features... " >&6; }
-if test ${ac_cv_prog_cxx_98+y}
+if test ${ac_cv_prog_cxx_cxx98+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_cv_prog_cxx_98=no
+else case e in #(
+ e) ac_cv_prog_cxx_cxx98=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5513,25 +5707,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam
test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
done
rm -f conftest.$ac_ext
-CXX=$ac_save_CXX
+CXX=$ac_save_CXX ;;
+esac
fi
if test "x$ac_cv_prog_cxx_cxx98" = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
-else $as_nop
- if test "x$ac_cv_prog_cxx_cxx98" = x
+else case e in #(
+ e) if test "x$ac_cv_prog_cxx_cxx98" = x
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
printf "%s\n" "none needed" >&6; }
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
- CXX="$CXX $ac_cv_prog_cxx_cxx98"
+ CXX="$CXX $ac_cv_prog_cxx_cxx98" ;;
+esac
fi
ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
- ac_prog_cxx_stdcxx=cxx98
+ ac_prog_cxx_stdcxx=cxx98 ;;
+esac
fi
fi
@@ -5548,8 +5745,8 @@ printf %s "checking dependency style of $depcc... " >&6; }
if test ${am_cv_CXX_dependencies_compiler_type+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+else case e in #(
+ e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
@@ -5636,7 +5833,7 @@ else $as_nop
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # When given -MP, icc 7.0 and 7.1 complain thus:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
@@ -5653,7 +5850,8 @@ else $as_nop
else
am_cv_CXX_dependencies_compiler_type=none
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; }
@@ -5670,46 +5868,9 @@ else
fi
-# Check whether --enable-silent-rules was given.
-if test ${enable_silent_rules+y}
-then :
- enableval=$enable_silent_rules;
-fi
-case $enable_silent_rules in # (((
- yes) AM_DEFAULT_VERBOSITY=0;;
- no) AM_DEFAULT_VERBOSITY=1;;
- *) AM_DEFAULT_VERBOSITY=0;;
-esac
-am_make=${MAKE-make}
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
-printf %s "checking whether $am_make supports nested variables... " >&6; }
-if test ${am_cv_make_support_nested_variables+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if printf "%s\n" 'TRUE=$(BAR$(V))
-BAR0=false
-BAR1=true
-V=1
-am__doit:
- @$(TRUE)
-.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
- am_cv_make_support_nested_variables=yes
-else
- am_cv_make_support_nested_variables=no
-fi
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
-printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
-if test $am_cv_make_support_nested_variables = yes; then
- AM_V='$(V)'
- AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
-else
- AM_V=$AM_DEFAULT_VERBOSITY
- AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
-fi
-AM_BACKSLASH='\'
+AM_DEFAULT_VERBOSITY=0
+
@@ -5723,8 +5884,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_AR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$AR"; then
+else case e in #(
+ e) if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5746,7 +5907,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
@@ -5772,8 +5934,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_AR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_AR"; then
+else case e in #(
+ e) if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5795,7 +5957,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
@@ -5824,14 +5987,15 @@ esac
fi
: ${AR=ar}
+: ${ARFLAGS=cr}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
printf %s "checking the archiver ($AR) interface... " >&6; }
if test ${am_cv_ar_interface+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_ext=c
+else case e in #(
+ e) ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -5844,7 +6008,7 @@ int some_variable = 0;
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
- am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
+ am_ar_try='$AR $ARFLAGS libconftest.a conftest.$ac_objext >&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
(eval $am_ar_try) 2>&5
ac_status=$?
@@ -5874,7 +6038,8 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
printf "%s\n" "$am_cv_ar_interface" >&6; }
@@ -5904,8 +6069,8 @@ esac
-macro_version='2.4.7'
-macro_revision='2.4.7'
+macro_version='2.5.4'
+macro_revision='2.5.4'
@@ -5933,15 +6098,16 @@ printf %s "checking build system type... " >&6; }
if test ${ac_cv_build+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_build_alias=$build_alias
+else case e in #(
+ e) ac_build_alias=$build_alias
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
test "x$ac_build_alias" = x &&
as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
printf "%s\n" "$ac_cv_build" >&6; }
@@ -5968,14 +6134,15 @@ printf %s "checking host system type... " >&6; }
if test ${ac_cv_host+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test "x$host_alias" = x; then
+else case e in #(
+ e) if test "x$host_alias" = x; then
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
printf "%s\n" "$ac_cv_host" >&6; }
@@ -6071,8 +6238,8 @@ printf %s "checking for a sed that does not truncate output... " >&6; }
if test ${ac_cv_path_SED+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+else case e in #(
+ e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
for ac_i in 1 2 3 4 5 6 7; do
ac_script="$ac_script$as_nl$ac_script"
done
@@ -6097,9 +6264,10 @@ do
as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
+case `"$ac_path_SED" --version 2>&1` in #(
*GNU*)
ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+#(
*)
ac_count=0
printf %s 0123456789 >"conftest.in"
@@ -6134,7 +6302,8 @@ IFS=$as_save_IFS
else
ac_cv_path_SED=$SED
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
printf "%s\n" "$ac_cv_path_SED" >&6; }
@@ -6159,8 +6328,8 @@ printf %s "checking for grep that handles long lines and -e... " >&6; }
if test ${ac_cv_path_GREP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -z "$GREP"; then
+else case e in #(
+ e) if test -z "$GREP"; then
ac_path_GREP_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -6179,9 +6348,10 @@ do
as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
+case `"$ac_path_GREP" --version 2>&1` in #(
*GNU*)
ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+#(
*)
ac_count=0
printf %s 0123456789 >"conftest.in"
@@ -6216,7 +6386,8 @@ IFS=$as_save_IFS
else
ac_cv_path_GREP=$GREP
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
printf "%s\n" "$ac_cv_path_GREP" >&6; }
@@ -6228,8 +6399,8 @@ printf %s "checking for egrep... " >&6; }
if test ${ac_cv_path_EGREP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+else case e in #(
+ e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
then ac_cv_path_EGREP="$GREP -E"
else
if test -z "$EGREP"; then
@@ -6251,9 +6422,10 @@ do
as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
+case `"$ac_path_EGREP" --version 2>&1` in #(
*GNU*)
ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+#(
*)
ac_count=0
printf %s 0123456789 >"conftest.in"
@@ -6289,20 +6461,23 @@ else
ac_cv_path_EGREP=$EGREP
fi
- fi
+ fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
printf "%s\n" "$ac_cv_path_EGREP" >&6; }
EGREP="$ac_cv_path_EGREP"
+ EGREP_TRADITIONAL=$EGREP
+ ac_cv_path_EGREP_TRADITIONAL=$EGREP
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
printf %s "checking for fgrep... " >&6; }
if test ${ac_cv_path_FGREP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+else case e in #(
+ e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
then ac_cv_path_FGREP="$GREP -F"
else
if test -z "$FGREP"; then
@@ -6324,9 +6499,10 @@ do
as_fn_executable_p "$ac_path_FGREP" || continue
# Check for GNU ac_path_FGREP and select it if it is found.
# Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
+case `"$ac_path_FGREP" --version 2>&1` in #(
*GNU*)
ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+#(
*)
ac_count=0
printf %s 0123456789 >"conftest.in"
@@ -6362,7 +6538,8 @@ else
ac_cv_path_FGREP=$FGREP
fi
- fi
+ fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
printf "%s\n" "$ac_cv_path_FGREP" >&6; }
@@ -6393,8 +6570,9 @@ test -z "$GREP" && GREP=grep
if test ${with_gnu_ld+y}
then :
withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
-else $as_nop
- with_gnu_ld=no
+else case e in #(
+ e) with_gnu_ld=no ;;
+esac
fi
ac_prog=ld
@@ -6403,7 +6581,7 @@ if test yes = "$GCC"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
printf %s "checking for ld used by $CC... " >&6; }
case $host in
- *-*-mingw*)
+ *-*-mingw* | *-*-windows*)
# gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
@@ -6439,8 +6617,8 @@ fi
if test ${lt_cv_path_LD+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -z "$LD"; then
+else case e in #(
+ e) if test -z "$LD"; then
lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
IFS=$lt_save_ifs
@@ -6463,7 +6641,8 @@ else $as_nop
IFS=$lt_save_ifs
else
lt_cv_path_LD=$LD # Let the user override the test with a path.
-fi
+fi ;;
+esac
fi
LD=$lt_cv_path_LD
@@ -6480,8 +6659,8 @@ printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
if test ${lt_cv_prog_gnu_ld+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
+else case e in #(
+ e) # I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes
@@ -6489,6 +6668,7 @@ case `$LD -v 2>&1 </dev/null` in
*)
lt_cv_prog_gnu_ld=no
;;
+esac ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
@@ -6508,8 +6688,8 @@ printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
if test ${lt_cv_path_NM+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$NM"; then
+else case e in #(
+ e) if test -n "$NM"; then
# Let the user override the test.
lt_cv_path_NM=$NM
else
@@ -6530,7 +6710,7 @@ else
# Tru64's nm complains that /dev/null is an invalid object file
# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
case $build_os in
- mingw*) lt_bad_file=conftest.nm/nofile ;;
+ mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
*) lt_bad_file=/dev/null ;;
esac
case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
@@ -6556,7 +6736,8 @@ else
IFS=$lt_save_ifs
done
: ${lt_cv_path_NM=no}
-fi
+fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
printf "%s\n" "$lt_cv_path_NM" >&6; }
@@ -6577,8 +6758,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_DUMPBIN+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$DUMPBIN"; then
+else case e in #(
+ e) if test -n "$DUMPBIN"; then
ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -6600,7 +6781,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
DUMPBIN=$ac_cv_prog_DUMPBIN
if test -n "$DUMPBIN"; then
@@ -6626,8 +6808,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_DUMPBIN"; then
+else case e in #(
+ e) if test -n "$ac_ct_DUMPBIN"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -6649,7 +6831,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
if test -n "$ac_ct_DUMPBIN"; then
@@ -6703,8 +6886,8 @@ printf %s "checking the name lister ($NM) interface... " >&6; }
if test ${lt_cv_nm_interface+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_nm_interface="BSD nm"
+else case e in #(
+ e) lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
@@ -6717,7 +6900,8 @@ else $as_nop
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
fi
- rm -f conftest*
+ rm -f conftest* ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
printf "%s\n" "$lt_cv_nm_interface" >&6; }
@@ -6739,8 +6923,8 @@ printf %s "checking the maximum length of command line arguments... " >&6; }
if test ${lt_cv_sys_max_cmd_len+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- i=0
+else case e in #(
+ e) i=0
teststring=ABCD
case $build_os in
@@ -6752,14 +6936,14 @@ else $as_nop
lt_cv_sys_max_cmd_len=12288; # 12K is about right
;;
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
+ gnu* | ironclad*)
+ # Under GNU Hurd and Ironclad, this test is not required because there
+ # is no limit to the length of command line arguments.
# Libtool will interpret -1 as no limit whatsoever
lt_cv_sys_max_cmd_len=-1;
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | mingw* | windows* | cegcc*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -6781,7 +6965,7 @@ else $as_nop
lt_cv_sys_max_cmd_len=8192;
;;
- bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
+ darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -6862,7 +7046,8 @@ else $as_nop
fi
;;
esac
-
+ ;;
+esac
fi
if test -n "$lt_cv_sys_max_cmd_len"; then
@@ -6919,11 +7104,11 @@ printf %s "checking how to convert $build file names to $host format... " >&6; }
if test ${lt_cv_to_host_file_cmd+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $host in
+else case e in #(
+ e) case $host in
*-*-mingw* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
;;
*-*-cygwin* )
@@ -6936,7 +7121,7 @@ else $as_nop
;;
*-*-cygwin* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
;;
*-*-cygwin* )
@@ -6951,7 +7136,8 @@ else $as_nop
lt_cv_to_host_file_cmd=func_convert_file_noop
;;
esac
-
+ ;;
+esac
fi
to_host_file_cmd=$lt_cv_to_host_file_cmd
@@ -6967,19 +7153,20 @@ printf %s "checking how to convert $build file names to toolchain format... " >&
if test ${lt_cv_to_tool_file_cmd+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- #assume ordinary cross tools, or native build.
+else case e in #(
+ e) #assume ordinary cross tools, or native build.
lt_cv_to_tool_file_cmd=func_convert_file_noop
case $host in
- *-*-mingw* )
+ *-*-mingw* | *-*-windows* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
;;
esac
;;
esac
-
+ ;;
+esac
fi
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
@@ -6995,8 +7182,9 @@ printf %s "checking for $LD option to reload object files... " >&6; }
if test ${lt_cv_ld_reload_flag+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_ld_reload_flag='-r'
+else case e in #(
+ e) lt_cv_ld_reload_flag='-r' ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
@@ -7007,7 +7195,7 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
if test yes != "$GCC"; then
reload_cmds=false
fi
@@ -7029,16 +7217,15 @@ esac
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args.
-set dummy ${ac_tool_prefix}file; ac_word=$2
+# Extract the first word of "file", so it can be a program name with args.
+set dummy file; ac_word=$2
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_FILECMD+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$FILECMD"; then
+else case e in #(
+ e) if test -n "$FILECMD"; then
ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7052,7 +7239,7 @@ do
esac
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
- ac_cv_prog_FILECMD="${ac_tool_prefix}file"
+ ac_cv_prog_FILECMD="file"
printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -7060,7 +7247,9 @@ done
done
IFS=$as_save_IFS
-fi
+ test -z "$ac_cv_prog_FILECMD" && ac_cv_prog_FILECMD=":"
+fi ;;
+esac
fi
FILECMD=$ac_cv_prog_FILECMD
if test -n "$FILECMD"; then
@@ -7072,65 +7261,6 @@ printf "%s\n" "no" >&6; }
fi
-fi
-if test -z "$ac_cv_prog_FILECMD"; then
- ac_ct_FILECMD=$FILECMD
- # Extract the first word of "file", so it can be a program name with args.
-set dummy file; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_prog_ac_ct_FILECMD+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_FILECMD"; then
- ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_FILECMD="file"
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD
-if test -n "$ac_ct_FILECMD"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5
-printf "%s\n" "$ac_ct_FILECMD" >&6; }
-else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
- if test "x$ac_ct_FILECMD" = x; then
- FILECMD=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- FILECMD=$ac_ct_FILECMD
- fi
-else
- FILECMD="$ac_cv_prog_FILECMD"
-fi
-
@@ -7145,8 +7275,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_OBJDUMP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$OBJDUMP"; then
+else case e in #(
+ e) if test -n "$OBJDUMP"; then
ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7168,7 +7298,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
OBJDUMP=$ac_cv_prog_OBJDUMP
if test -n "$OBJDUMP"; then
@@ -7190,8 +7321,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_OBJDUMP"; then
+else case e in #(
+ e) if test -n "$ac_ct_OBJDUMP"; then
ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7213,7 +7344,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
if test -n "$ac_ct_OBJDUMP"; then
@@ -7254,8 +7386,8 @@ printf %s "checking how to recognize dependent libraries... " >&6; }
if test ${lt_cv_deplibs_check_method+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_file_magic_cmd='$MAGIC_CMD'
+else case e in #(
+ e) lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
@@ -7263,7 +7395,6 @@ lt_cv_deplibs_check_method='unknown'
# 'none' -- dependencies not supported.
# 'unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
# that responds to the $file_magic_cmd with a given extended regex.
# If you have 'file' or equivalent on your system and you're not sure
@@ -7290,7 +7421,7 @@ cygwin*)
lt_cv_file_magic_cmd='func_win32_libid'
;;
-mingw* | pw32*)
+mingw* | windows* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
@@ -7299,7 +7430,7 @@ mingw* | pw32*)
lt_cv_file_magic_cmd='func_win32_libid'
else
# Keep this pattern in sync with the one in func_win32_libid.
- lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
@@ -7372,7 +7503,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-netbsd*)
+*-mlibc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
else
@@ -7390,7 +7525,7 @@ newos6*)
lt_cv_deplibs_check_method=pass_all
;;
-openbsd* | bitrig*)
+openbsd*)
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
else
@@ -7406,6 +7541,10 @@ rdos*)
lt_cv_deplibs_check_method=pass_all
;;
+serenity*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -7448,7 +7587,8 @@ os2*)
lt_cv_deplibs_check_method=pass_all
;;
esac
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
@@ -7457,7 +7597,7 @@ file_magic_glob=
want_nocaseglob=no
if test "$build" = "$host"; then
case $host_os in
- mingw* | pw32*)
+ mingw* | windows* | pw32*)
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
want_nocaseglob=yes
else
@@ -7500,8 +7640,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_DLLTOOL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$DLLTOOL"; then
+else case e in #(
+ e) if test -n "$DLLTOOL"; then
ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7523,7 +7663,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
DLLTOOL=$ac_cv_prog_DLLTOOL
if test -n "$DLLTOOL"; then
@@ -7545,8 +7686,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_DLLTOOL"; then
+else case e in #(
+ e) if test -n "$ac_ct_DLLTOOL"; then
ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7568,7 +7709,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
if test -n "$ac_ct_DLLTOOL"; then
@@ -7610,11 +7752,11 @@ printf %s "checking how to associate runtime and link libraries... " >&6; }
if test ${lt_cv_sharedlib_from_linklib_cmd+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_sharedlib_from_linklib_cmd='unknown'
+else case e in #(
+ e) lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
# two different shell functions defined in ltmain.sh;
# decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
@@ -7631,7 +7773,8 @@ cygwin* | mingw* | pw32* | cegcc*)
lt_cv_sharedlib_from_linklib_cmd=$ECHO
;;
esac
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
@@ -7645,6 +7788,110 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi ;;
+esac
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+printf "%s\n" "$RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_prog_ac_ct_RANLIB+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi ;;
+esac
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+printf "%s\n" "$ac_ct_RANLIB" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test -n "$ac_tool_prefix"; then
for ac_prog in ar
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
@@ -7654,8 +7901,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_AR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$AR"; then
+else case e in #(
+ e) if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7677,7 +7924,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
@@ -7703,8 +7951,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_AR+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_AR"; then
+else case e in #(
+ e) if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7726,7 +7974,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
@@ -7763,7 +8012,7 @@ fi
# Use ARFLAGS variable as AR's operation code to sync the variable naming with
# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
-# higher priority because thats what people were doing historically (setting
+# higher priority because that's what people were doing historically (setting
# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
# variable obsoleted/removed.
@@ -7788,8 +8037,8 @@ printf %s "checking for archiver @FILE support... " >&6; }
if test ${lt_cv_ar_at_file+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_ar_at_file=no
+else case e in #(
+ e) lt_cv_ar_at_file=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -7826,7 +8075,8 @@ then :
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
printf "%s\n" "$lt_cv_ar_at_file" >&6; }
@@ -7851,8 +8101,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_STRIP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$STRIP"; then
+else case e in #(
+ e) if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7874,7 +8124,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
@@ -7896,8 +8147,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_STRIP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_STRIP"; then
+else case e in #(
+ e) if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -7919,7 +8170,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
@@ -7952,107 +8204,6 @@ test -z "$STRIP" && STRIP=:
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_prog_RANLIB+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-printf "%s\n" "$RANLIB" >&6; }
-else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-printf %s "checking for $ac_word... " >&6; }
-if test ${ac_cv_prog_ac_ct_RANLIB+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- case $as_dir in #(((
- '') as_dir=./ ;;
- */) ;;
- *) as_dir=$as_dir/ ;;
- esac
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-printf "%s\n" "$ac_ct_RANLIB" >&6; }
-else
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
-printf "%s\n" "no" >&6; }
-fi
-
- if test "x$ac_ct_RANLIB" = x; then
- RANLIB=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- RANLIB=$ac_ct_RANLIB
- fi
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
test -z "$RANLIB" && RANLIB=:
@@ -8067,15 +8218,8 @@ old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
if test -n "$RANLIB"; then
- case $host_os in
- bitrig* | openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
- ;;
- esac
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
fi
case $host_os in
@@ -8139,8 +8283,8 @@ printf %s "checking command to parse $NM output from $compiler object... " >&6;
if test ${lt_cv_sys_global_symbol_pipe+y}
then :
printf %s "(cached) " >&6
-else $as_nop
-
+else case e in #(
+ e)
# These are sane defaults that work on at least a few old systems.
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
@@ -8155,7 +8299,7 @@ case $host_os in
aix*)
symcode='[BCDT]'
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
symcode='[ABCDGISTW]'
;;
hpux*)
@@ -8170,7 +8314,7 @@ osf*)
symcode='[BCDEGQRST]'
;;
solaris*)
- symcode='[BDRT]'
+ symcode='[BCDRT]'
;;
sco3.2v5*)
symcode='[DT]'
@@ -8234,7 +8378,7 @@ $lt_c_name_lib_hook\
# Handle CRLF in mingw tool chain
opt_cr=
case $build_os in
-mingw*)
+mingw* | windows*)
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
;;
esac
@@ -8285,7 +8429,7 @@ void nm_test_func(void){}
#ifdef __cplusplus
}
#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
+int main(void){nm_test_var='a';nm_test_func();return(0);}
_LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -8295,11 +8439,8 @@ _LT_EOF
test $ac_status = 0; }; then
# Now try to grab the symbols.
nlist=conftest.nm
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
- (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
- ac_status=$?
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s "$nlist"; then
+ $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
+ if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist"
@@ -8395,7 +8536,8 @@ _LT_EOF
lt_cv_sys_global_symbol_pipe=
fi
done
-
+ ;;
+esac
fi
if test -z "$lt_cv_sys_global_symbol_pipe"; then
@@ -8459,8 +8601,9 @@ printf %s "checking for sysroot... " >&6; }
if test ${with_sysroot+y}
then :
withval=$with_sysroot;
-else $as_nop
- with_sysroot=no
+else case e in #(
+ e) with_sysroot=no ;;
+esac
fi
@@ -8468,7 +8611,9 @@ lt_sysroot=
case $with_sysroot in #(
yes)
if test yes = "$GCC"; then
- lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ # Trim trailing / since we'll always append absolute paths and we want
+ # to avoid //, if only for less confusing output for the user.
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'`
fi
;; #(
/*)
@@ -8495,8 +8640,8 @@ printf %s "checking for a working dd... " >&6; }
if test ${ac_cv_path_lt_DD+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- printf 0123456789abcdef0123456789abcdef >conftest.i
+else case e in #(
+ e) printf 0123456789abcdef0123456789abcdef >conftest.i
cat conftest.i conftest.i >conftest2.i
: ${lt_DD:=$DD}
if test -z "$lt_DD"; then
@@ -8532,7 +8677,8 @@ else
ac_cv_path_lt_DD=$lt_DD
fi
-rm -f conftest.i conftest2.i conftest.out
+rm -f conftest.i conftest2.i conftest.out ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
@@ -8543,8 +8689,8 @@ printf %s "checking how to truncate binary pipes... " >&6; }
if test ${lt_cv_truncate_bin+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- printf 0123456789abcdef0123456789abcdef >conftest.i
+else case e in #(
+ e) printf 0123456789abcdef0123456789abcdef >conftest.i
cat conftest.i conftest.i >conftest2.i
lt_cv_truncate_bin=
if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
@@ -8552,7 +8698,8 @@ if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; the
&& lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
fi
rm -f conftest.i conftest2.i conftest.out
-test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
printf "%s\n" "$lt_cv_truncate_bin" >&6; }
@@ -8683,7 +8830,7 @@ mips64*-*linux*)
;;
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
# Find out what ABI is being produced by ac_compile, and set linker
# options accordingly. Note that the listed cases only cover the
# situations where additional linker options are needed (such as when
@@ -8702,7 +8849,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_i386_fbsd"
;;
- x86_64-*linux*)
+ x86_64-*linux*|x86_64-gnu*)
case `$FILECMD conftest.o` in
*x86-64*)
LD="${LD-ld} -m elf32_x86_64"
@@ -8731,7 +8878,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_x86_64_fbsd"
;;
- x86_64-*linux*)
+ x86_64-*linux*|x86_64-gnu*)
LD="${LD-ld} -m elf_x86_64"
;;
powerpcle-*linux*)
@@ -8762,8 +8909,8 @@ printf %s "checking whether the C compiler needs -belf... " >&6; }
if test ${lt_cv_cc_needs_belf+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_ext=c
+else case e in #(
+ e) ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -8783,8 +8930,9 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
lt_cv_cc_needs_belf=yes
-else $as_nop
- lt_cv_cc_needs_belf=no
+else case e in #(
+ e) lt_cv_cc_needs_belf=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
@@ -8793,7 +8941,8 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
@@ -8851,8 +9000,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_MANIFEST_TOOL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$MANIFEST_TOOL"; then
+else case e in #(
+ e) if test -n "$MANIFEST_TOOL"; then
ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -8874,7 +9023,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
if test -n "$MANIFEST_TOOL"; then
@@ -8896,8 +9046,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_MANIFEST_TOOL"; then
+else case e in #(
+ e) if test -n "$ac_ct_MANIFEST_TOOL"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -8919,7 +9069,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
if test -n "$ac_ct_MANIFEST_TOOL"; then
@@ -8948,22 +9099,23 @@ fi
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
-if test ${lt_cv_path_mainfest_tool+y}
+if test ${lt_cv_path_manifest_tool+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_path_mainfest_tool=no
+else case e in #(
+ e) lt_cv_path_manifest_tool=no
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
cat conftest.err >&5
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
- lt_cv_path_mainfest_tool=yes
+ lt_cv_path_manifest_tool=yes
fi
- rm -f conftest*
+ rm -f conftest* ;;
+esac
fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
-printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
-if test yes != "$lt_cv_path_mainfest_tool"; then
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_manifest_tool" >&5
+printf "%s\n" "$lt_cv_path_manifest_tool" >&6; }
+if test yes != "$lt_cv_path_manifest_tool"; then
MANIFEST_TOOL=:
fi
@@ -8982,8 +9134,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_DSYMUTIL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$DSYMUTIL"; then
+else case e in #(
+ e) if test -n "$DSYMUTIL"; then
ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9005,7 +9157,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
DSYMUTIL=$ac_cv_prog_DSYMUTIL
if test -n "$DSYMUTIL"; then
@@ -9027,8 +9180,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_DSYMUTIL"; then
+else case e in #(
+ e) if test -n "$ac_ct_DSYMUTIL"; then
ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9050,7 +9203,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
if test -n "$ac_ct_DSYMUTIL"; then
@@ -9084,8 +9238,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_NMEDIT+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$NMEDIT"; then
+else case e in #(
+ e) if test -n "$NMEDIT"; then
ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9107,7 +9261,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
NMEDIT=$ac_cv_prog_NMEDIT
if test -n "$NMEDIT"; then
@@ -9129,8 +9284,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_NMEDIT+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_NMEDIT"; then
+else case e in #(
+ e) if test -n "$ac_ct_NMEDIT"; then
ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9152,7 +9307,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
if test -n "$ac_ct_NMEDIT"; then
@@ -9186,8 +9342,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_LIPO+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$LIPO"; then
+else case e in #(
+ e) if test -n "$LIPO"; then
ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9209,7 +9365,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
LIPO=$ac_cv_prog_LIPO
if test -n "$LIPO"; then
@@ -9231,8 +9388,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_LIPO+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_LIPO"; then
+else case e in #(
+ e) if test -n "$ac_ct_LIPO"; then
ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9254,7 +9411,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
if test -n "$ac_ct_LIPO"; then
@@ -9288,8 +9446,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_OTOOL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$OTOOL"; then
+else case e in #(
+ e) if test -n "$OTOOL"; then
ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9311,7 +9469,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
OTOOL=$ac_cv_prog_OTOOL
if test -n "$OTOOL"; then
@@ -9333,8 +9492,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_OTOOL+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_OTOOL"; then
+else case e in #(
+ e) if test -n "$ac_ct_OTOOL"; then
ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9356,7 +9515,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
if test -n "$ac_ct_OTOOL"; then
@@ -9390,8 +9550,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_OTOOL64+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$OTOOL64"; then
+else case e in #(
+ e) if test -n "$OTOOL64"; then
ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9413,7 +9573,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
OTOOL64=$ac_cv_prog_OTOOL64
if test -n "$OTOOL64"; then
@@ -9435,8 +9596,8 @@ printf %s "checking for $ac_word... " >&6; }
if test ${ac_cv_prog_ac_ct_OTOOL64+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -n "$ac_ct_OTOOL64"; then
+else case e in #(
+ e) if test -n "$ac_ct_OTOOL64"; then
ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -9458,7 +9619,8 @@ done
done
IFS=$as_save_IFS
-fi
+fi ;;
+esac
fi
ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
if test -n "$ac_ct_OTOOL64"; then
@@ -9515,8 +9677,8 @@ printf %s "checking for -single_module linker flag... " >&6; }
if test ${lt_cv_apple_cc_single_mod+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_apple_cc_single_mod=no
+else case e in #(
+ e) lt_cv_apple_cc_single_mod=no
if test -z "$LT_MULTI_MODULE"; then
# By default we will add the -single_module flag. You can override
# by either setting the environment variable LT_MULTI_MODULE
@@ -9542,18 +9704,58 @@ else $as_nop
fi
rm -rf libconftest.dylib*
rm -f conftest.*
- fi
+ fi ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
+ # Feature test to disable chained fixups since it is not
+ # compatible with '-undefined dynamic_lookup'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -no_fixup_chains linker flag" >&5
+printf %s "checking for -no_fixup_chains linker flag... " >&6; }
+if test ${lt_cv_support_no_fixup_chains+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ lt_cv_support_no_fixup_chains=yes
+else case e in #(
+ e) lt_cv_support_no_fixup_chains=no
+ ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_support_no_fixup_chains" >&5
+printf "%s\n" "$lt_cv_support_no_fixup_chains" >&6; }
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
printf %s "checking for -exported_symbols_list linker flag... " >&6; }
if test ${lt_cv_ld_exported_symbols_list+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_ld_exported_symbols_list=no
+else case e in #(
+ e) lt_cv_ld_exported_symbols_list=no
save_LDFLAGS=$LDFLAGS
echo "_main" > conftest.sym
LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
@@ -9571,13 +9773,15 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
lt_cv_ld_exported_symbols_list=yes
-else $as_nop
- lt_cv_ld_exported_symbols_list=no
+else case e in #(
+ e) lt_cv_ld_exported_symbols_list=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
@@ -9587,8 +9791,8 @@ printf %s "checking for -force_load linker flag... " >&6; }
if test ${lt_cv_ld_force_load+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_ld_force_load=no
+else case e in #(
+ e) lt_cv_ld_force_load=no
cat > conftest.c << _LT_EOF
int forced_loaded() { return 2;}
_LT_EOF
@@ -9599,7 +9803,7 @@ _LT_EOF
echo "$RANLIB libconftest.a" >&5
$RANLIB libconftest.a 2>&5
cat > conftest.c << _LT_EOF
-int main() { return 0;}
+int main(void) { return 0;}
_LT_EOF
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
@@ -9613,7 +9817,8 @@ _LT_EOF
fi
rm -f conftest.err libconftest.a conftest conftest.c
rm -rf conftest.dSYM
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
printf "%s\n" "$lt_cv_ld_force_load" >&6; }
@@ -9627,13 +9832,32 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; }
10.[012],*|,*powerpc*-darwin[5-8]*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup'
+ if test yes = "$lt_cv_support_no_fixup_chains"; then
+ as_fn_append _lt_dar_allow_undefined ' $wl-no_fixup_chains'
+ fi
+ ;;
esac
;;
esac
if test yes = "$lt_cv_apple_cc_single_mod"; then
_lt_dar_single_mod='$single_module'
fi
+ _lt_dar_needs_single_mod=no
+ case $host_os in
+ rhapsody* | darwin1.*)
+ _lt_dar_needs_single_mod=yes ;;
+ darwin*)
+ # When targeting Mac OS X 10.4 (darwin 8) or later,
+ # -single_module is the default and -multi_module is unsupported.
+ # The toolchain on macOS 10.14 (darwin 18) and later cannot
+ # target any OS version that needs -single_module.
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*-darwin[567].*|10.[0-3],*-darwin[5-9].*|10.[0-3],*-darwin1[0-7].*)
+ _lt_dar_needs_single_mod=yes ;;
+ esac
+ ;;
+ esac
if test yes = "$lt_cv_ld_exported_symbols_list"; then
_lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
else
@@ -9755,8 +9979,9 @@ then :
IFS=$lt_save_ifs
;;
esac
-else $as_nop
- enable_static=no
+else case e in #(
+ e) enable_static=no ;;
+esac
fi
@@ -9794,8 +10019,9 @@ then :
IFS=$lt_save_ifs
;;
esac
-else $as_nop
- enable_shared=yes
+else case e in #(
+ e) enable_shared=yes ;;
+esac
fi
@@ -9807,28 +10033,52 @@ fi
-
-# Check whether --with-pic was given.
+ # Check whether --enable-pic was given.
+if test ${enable_pic+y}
+then :
+ enableval=$enable_pic; 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
+else case e in #(
+ e) # Check whether --with-pic was given.
if test ${with_pic+y}
then :
withval=$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
-else $as_nop
- pic_mode=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
+else case e in #(
+ e) pic_mode=default ;;
+esac
+fi
+
+ ;;
+esac
fi
@@ -9858,8 +10108,9 @@ then :
IFS=$lt_save_ifs
;;
esac
-else $as_nop
- enable_fast_install=yes
+else case e in #(
+ e) enable_fast_install=yes ;;
+esac
fi
@@ -9874,29 +10125,46 @@ case $host,$enable_shared in
power*-*-aix[5-9]*,yes)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
printf %s "checking which variant of shared library versioning to provide... " >&6; }
-
-# Check whether --with-aix-soname was given.
+ # Check whether --enable-aix-soname was given.
+if test ${enable_aix_soname+y}
+then :
+ enableval=$enable_aix_soname; case $enableval in
+ aix|svr4|both)
+ ;;
+ *)
+ as_fn_error $? "Unknown argument to --enable-aix-soname" "$LINENO" 5
+ ;;
+ esac
+ lt_cv_with_aix_soname=$enable_aix_soname
+else case e in #(
+ e) # Check whether --with-aix-soname was given.
if test ${with_aix_soname+y}
then :
withval=$with_aix_soname; case $withval in
- aix|svr4|both)
- ;;
- *)
- as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
- ;;
- esac
- lt_cv_with_aix_soname=$with_aix_soname
-else $as_nop
- if test ${lt_cv_with_aix_soname+y}
+ aix|svr4|both)
+ ;;
+ *)
+ as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname
+else case e in #(
+ e) if test ${lt_cv_with_aix_soname+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_with_aix_soname=aix
+else case e in #(
+ e) lt_cv_with_aix_soname=aix ;;
+esac
+fi
+ ;;
+esac
fi
- with_aix_soname=$lt_cv_with_aix_soname
+ enable_aix_soname=$lt_cv_with_aix_soname ;;
+esac
fi
+ with_aix_soname=$enable_aix_soname
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
printf "%s\n" "$with_aix_soname" >&6; }
if test aix != "$with_aix_soname"; then
@@ -9985,8 +10253,8 @@ printf %s "checking for objdir... " >&6; }
if test ${lt_cv_objdir+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- rm -f .libs 2>/dev/null
+else case e in #(
+ e) rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
lt_cv_objdir=.libs
@@ -9994,7 +10262,8 @@ else
# MS-DOS does not allow filenames that begin with a dot.
lt_cv_objdir=_libs
fi
-rmdir .libs 2>/dev/null
+rmdir .libs 2>/dev/null ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
printf "%s\n" "$lt_cv_objdir" >&6; }
@@ -10055,8 +10324,8 @@ printf %s "checking for ${ac_tool_prefix}file... " >&6; }
if test ${lt_cv_path_MAGIC_CMD+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $MAGIC_CMD in
+else case e in #(
+ e) case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
;;
@@ -10099,6 +10368,7 @@ _LT_EOF
IFS=$lt_save_ifs
MAGIC_CMD=$lt_save_MAGIC_CMD
;;
+esac ;;
esac
fi
@@ -10122,8 +10392,8 @@ printf %s "checking for file... " >&6; }
if test ${lt_cv_path_MAGIC_CMD+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- case $MAGIC_CMD in
+else case e in #(
+ e) case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
;;
@@ -10166,6 +10436,7 @@ _LT_EOF
IFS=$lt_save_ifs
MAGIC_CMD=$lt_save_MAGIC_CMD
;;
+esac ;;
esac
fi
@@ -10209,7 +10480,7 @@ objext=$objext
lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
+lt_simple_link_test_code='int main(void){return(0);}'
@@ -10265,8 +10536,8 @@ printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
if test ${lt_cv_prog_compiler_rtti_exceptions+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_rtti_exceptions=no
+else case e in #(
+ e) lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
@@ -10294,7 +10565,8 @@ else $as_nop
fi
fi
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
@@ -10350,7 +10622,7 @@ lt_prog_compiler_static=
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -10453,7 +10725,7 @@ lt_prog_compiler_static=
esac
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
@@ -10494,6 +10766,12 @@ lt_prog_compiler_static=
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-static'
;;
+ *flang* | ftn | f18* | f95*)
+ # Flang compiler.
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
# icc used to be incompatible with GCC.
# ICC 10 doesn't accept -KPIC any more.
icc* | ifort*)
@@ -10576,6 +10854,12 @@ lt_prog_compiler_static=
lt_prog_compiler_static='-Bstatic'
;;
+ *-mlibc)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+
*nto* | *qnx*)
# QNX uses GNU C++, but need to define -shared option too, otherwise
# it will coredump.
@@ -10592,6 +10876,9 @@ lt_prog_compiler_static=
lt_prog_compiler_static='-non_shared'
;;
+ serenity*)
+ ;;
+
solaris*)
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
@@ -10659,8 +10946,9 @@ printf %s "checking for $compiler option to produce PIC... " >&6; }
if test ${lt_cv_prog_compiler_pic+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
+else case e in #(
+ e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
@@ -10675,8 +10963,8 @@ printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6;
if test ${lt_cv_prog_compiler_pic_works+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_pic_works=no
+else case e in #(
+ e) lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
@@ -10704,7 +10992,8 @@ else $as_nop
fi
fi
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
@@ -10740,8 +11029,8 @@ printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6;
if test ${lt_cv_prog_compiler_static_works+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_static_works=no
+else case e in #(
+ e) lt_cv_prog_compiler_static_works=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
@@ -10762,7 +11051,8 @@ else $as_nop
fi
$RM -r conftest*
LDFLAGS=$save_LDFLAGS
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
@@ -10784,8 +11074,8 @@ printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test ${lt_cv_prog_compiler_c_o+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_c_o=no
+else case e in #(
+ e) lt_cv_prog_compiler_c_o=no
$RM -r conftest 2>/dev/null
mkdir conftest
cd conftest
@@ -10825,7 +11115,8 @@ else $as_nop
cd ..
$RM -r conftest
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
@@ -10840,8 +11131,8 @@ printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test ${lt_cv_prog_compiler_c_o+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_c_o=no
+else case e in #(
+ e) lt_cv_prog_compiler_c_o=no
$RM -r conftest 2>/dev/null
mkdir conftest
cd conftest
@@ -10881,7 +11172,8 @@ else $as_nop
cd ..
$RM -r conftest
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
@@ -10960,7 +11252,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
extract_expsyms_cmds=
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++ or Intel C++ Compiler.
@@ -10972,9 +11264,6 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
with_gnu_ld=yes
;;
- openbsd* | bitrig*)
- with_gnu_ld=no
- ;;
esac
ld_shlibs=yes
@@ -11075,7 +11364,7 @@ _LT_EOF
fi
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
@@ -11085,6 +11374,7 @@ _LT_EOF
enable_shared_with_static_runtimes=yes
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+ file_list_spec='@'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -11104,7 +11394,7 @@ _LT_EOF
haiku*)
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- link_all_deplibs=yes
+ link_all_deplibs=no
;;
os2*)
@@ -11131,7 +11421,7 @@ _LT_EOF
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
- old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
enable_shared_with_static_runtimes=yes
file_list_spec='@'
;;
@@ -11210,6 +11500,7 @@ _LT_EOF
case $cc_basename in
tcc*)
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
export_dynamic_flag_spec='-rdynamic'
;;
xlf* | bgf* | bgxlf* | mpixlf*)
@@ -11230,7 +11521,12 @@ _LT_EOF
fi
;;
- netbsd*)
+ *-mlibc)
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
@@ -11476,8 +11772,8 @@ else
if test ${lt_cv_aix_libpath_+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -11509,7 +11805,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
if test -z "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_=/usr/lib:/lib
fi
-
+ ;;
+esac
fi
aix_libpath=$lt_cv_aix_libpath_
@@ -11531,8 +11828,8 @@ else
if test ${lt_cv_aix_libpath_+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -11564,7 +11861,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
if test -z "$lt_cv_aix_libpath_"; then
lt_cv_aix_libpath_=/usr/lib:/lib
fi
-
+ ;;
+esac
fi
aix_libpath=$lt_cv_aix_libpath_
@@ -11620,7 +11918,7 @@ fi
export_dynamic_flag_spec=-rdynamic
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++ or Intel C++ Compiler.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -11637,14 +11935,14 @@ fi
# Tell ltmain to make .dll files, not .so files.
shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_cmds='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
cp "$export_symbols" "$output_objdir/$soname.def";
echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
else
$SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
@@ -11815,8 +12113,8 @@ printf %s "checking if $CC understands -b... " >&6; }
if test ${lt_cv_prog_compiler__b+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler__b=no
+else case e in #(
+ e) lt_cv_prog_compiler__b=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -b"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
@@ -11837,7 +12135,8 @@ else $as_nop
fi
$RM -r conftest*
LDFLAGS=$save_LDFLAGS
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
@@ -11885,8 +12184,8 @@ printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&
if test ${lt_cv_irix_exported_symbol+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- save_LDFLAGS=$LDFLAGS
+else case e in #(
+ e) save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -11895,12 +12194,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
lt_cv_irix_exported_symbol=yes
-else $as_nop
- lt_cv_irix_exported_symbol=no
+else case e in #(
+ e) lt_cv_irix_exported_symbol=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
+ LDFLAGS=$save_LDFLAGS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
@@ -11924,11 +12225,15 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
# Fabrice Bellard et al's Tiny C Compiler
ld_shlibs=yes
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
;;
esac
;;
- netbsd*)
+ *-mlibc)
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
@@ -11950,7 +12255,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
*nto* | *qnx*)
;;
- openbsd* | bitrig*)
+ openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
hardcode_shlibpath_var=no
@@ -11993,7 +12298,7 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
- old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
enable_shared_with_static_runtimes=yes
file_list_spec='@'
;;
@@ -12029,6 +12334,9 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
hardcode_libdir_separator=:
;;
+ serenity*)
+ ;;
+
solaris*)
no_undefined_flag=' -z defs'
if test yes = "$GCC"; then
@@ -12226,8 +12534,8 @@ printf %s "checking whether -lc should be explicitly linked in... " >&6; }
if test ${lt_cv_archive_cmds_need_lc+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- $RM conftest*
+else case e in #(
+ e) $RM conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -12263,7 +12571,8 @@ else $as_nop
cat conftest.err 1>&5
fi
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
@@ -12434,7 +12743,7 @@ if test yes = "$GCC"; then
*) lt_awk_arg='/^libraries:/' ;;
esac
case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+ mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
*) lt_sed_strip_eq='s|=/|/|g' ;;
esac
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
@@ -12492,7 +12801,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
# AWK program above erroneously prepends '/' to C:/dos/paths
# for these hosts.
case $host_os in
- mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
$SED 's|/\([A-Za-z]:\)|\1|g'` ;;
esac
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
@@ -12566,7 +12875,7 @@ aix[4-9]*)
# Unfortunately, runtime linking may impact performance, so we do
# not want this to be the default eventually. Also, we use the
# versioned .so libs for executables only if there is the -brtl
- # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only.
# To allow for filename-based versioning support, we need to create
# libNAME.so.V as an archive file, containing:
# *) an Import File, referring to the versioned filename of the
@@ -12660,7 +12969,7 @@ bsdi[45]*)
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
version_type=windows
shrext_cmds=.dll
need_version=no
@@ -12671,15 +12980,29 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
+ # If user builds GCC with multilib enabled,
+ # it should just install on $(libdir)
+ # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
+ if test xyes = x"$multilib"; then
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ $install_prog $dir/$dlname $destdir/$dlname~
+ chmod a+x $destdir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
+ fi'
+ else
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ fi
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$RM \$dlpath'
@@ -12692,7 +13015,7 @@ cygwin* | mingw* | pw32* | cegcc*)
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
;;
- mingw* | cegcc*)
+ mingw* | windows* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
@@ -12711,7 +13034,7 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='$libname.dll.lib'
case $build_os in
- mingw*)
+ mingw* | windows*)
sys_lib_search_path_spec=
lt_save_ifs=$IFS
IFS=';'
@@ -12818,7 +13141,28 @@ freebsd* | dragonfly* | midnightbsd*)
need_version=yes
;;
esac
+ case $host_cpu in
+ powerpc64)
+ # On FreeBSD bi-arch platforms, a different variable is used for 32-bit
+ # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int test_pointer_size[sizeof (void *) - 5];
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
shlibpath_var=LD_LIBRARY_PATH
+else case e in #(
+ e) shlibpath_var=LD_32_LIBRARY_PATH ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+ *)
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+ esac
case $host_os in
freebsd2.*)
shlibpath_overrides_runpath=yes
@@ -12848,8 +13192,9 @@ haiku*)
soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=no
- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
- hardcode_into_libs=yes
+ sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
+ sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
+ hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -12959,7 +13304,7 @@ linux*android*)
version_type=none # Android doesn't support versioned libraries.
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext'
+ library_names_spec='$libname$release$shared_ext $libname$shared_ext'
soname_spec='$libname$release$shared_ext'
finish_cmds=
shlibpath_var=LD_LIBRARY_PATH
@@ -12971,8 +13316,9 @@ linux*android*)
hardcode_into_libs=yes
dynamic_linker='Android linker'
- # Don't embed -rpath directories since the linker doesn't support them.
- hardcode_libdir_flag_spec='-L$libdir'
+ # -rpath works at least for libraries that are not overridden by
+ # libraries installed in system locations.
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
;;
# This must be glibc/ELF.
@@ -12990,8 +13336,8 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
if test ${lt_cv_shlibpath_overrides_runpath+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_shlibpath_overrides_runpath=no
+else case e in #(
+ e) lt_cv_shlibpath_overrides_runpath=no
save_LDFLAGS=$LDFLAGS
save_libdir=$libdir
eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
@@ -13018,7 +13364,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
libdir=$save_libdir
-
+ ;;
+esac
fi
shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
@@ -13028,7 +13375,7 @@ fi
# before this can be enabled.
hardcode_into_libs=yes
- # Ideally, we could use ldconfig to report *all* directores which are
+ # Ideally, we could use ldconfig to report *all* directories which are
# searched for libraries, however this is still not possible. Aside from not
# being certain /sbin/ldconfig is available, command
# 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
@@ -13048,6 +13395,18 @@ fi
dynamic_linker='GNU/Linux ld.so'
;;
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -13066,6 +13425,18 @@ netbsd*)
hardcode_into_libs=yes
;;
+*-mlibc)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='mlibc ld.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
@@ -13085,7 +13456,7 @@ newsos6)
dynamic_linker='ldqnx.so'
;;
-openbsd* | bitrig*)
+openbsd*)
version_type=sunos
sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
@@ -13145,6 +13516,17 @@ rdos*)
dynamic_linker=no
;;
+serenity*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ dynamic_linker='SerenityOS LibELF'
+ ;;
+
solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
@@ -13242,6 +13624,496 @@ uts4*)
shlibpath_var=LD_LIBRARY_PATH
;;
+emscripten*)
+ version_type=none
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ dynamic_linker="Emscripten linker"
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+ if test yes = "$GCC"; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ lt_prog_compiler_wl='-Xlinker '
+ if test -n "$lt_prog_compiler_pic"; then
+ lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='$wl-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ # old Intel for x86_64, which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *flang* | ftn | f18* | f95*)
+ # Flang compiler.
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | $SED 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Intel*\ [CF]*Compiler*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ *Portland\ Group*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *-mlibc)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ serenity*)
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
+lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_static_works"; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+='-fPIC'
+ archive_cmds='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib'
+ archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym'
+ archive_cmds_need_lc=no
+ no_undefined_flag=
+ ;;
+
*)
dynamic_linker=no
;;
@@ -13426,7 +14298,7 @@ else
lt_cv_dlopen_self=yes
;;
- mingw* | pw32* | cegcc*)
+ mingw* | windows* | pw32* | cegcc*)
lt_cv_dlopen=LoadLibrary
lt_cv_dlopen_libs=
;;
@@ -13443,16 +14315,22 @@ printf %s "checking for dlopen in -ldl... " >&6; }
if test ${ac_cv_lib_dl_dlopen+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char dlopen ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen (void);
int
main (void)
{
@@ -13464,24 +14342,27 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_dl_dlopen=yes
-else $as_nop
- ac_cv_lib_dl_dlopen=no
+else case e in #(
+ e) ac_cv_lib_dl_dlopen=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes
then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else $as_nop
-
+else case e in #(
+ e)
lt_cv_dlopen=dyld
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
-
+ ;;
+esac
fi
;;
@@ -13499,22 +14380,28 @@ fi
if test "x$ac_cv_func_shl_load" = xyes
then :
lt_cv_dlopen=shl_load
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
printf %s "checking for shl_load in -ldld... " >&6; }
if test ${ac_cv_lib_dld_shl_load+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char shl_load ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load (void);
int
main (void)
{
@@ -13526,39 +14413,47 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_dld_shl_load=yes
-else $as_nop
- ac_cv_lib_dld_shl_load=no
+else case e in #(
+ e) ac_cv_lib_dld_shl_load=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
if test "x$ac_cv_lib_dld_shl_load" = xyes
then :
lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
-else $as_nop
- ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+else case e in #(
+ e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
if test "x$ac_cv_func_dlopen" = xyes
then :
lt_cv_dlopen=dlopen
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
printf %s "checking for dlopen in -ldl... " >&6; }
if test ${ac_cv_lib_dl_dlopen+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char dlopen ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen (void);
int
main (void)
{
@@ -13570,34 +14465,42 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_dl_dlopen=yes
-else $as_nop
- ac_cv_lib_dl_dlopen=no
+else case e in #(
+ e) ac_cv_lib_dl_dlopen=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes
then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
printf %s "checking for dlopen in -lsvld... " >&6; }
if test ${ac_cv_lib_svld_dlopen+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-lsvld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char dlopen ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen (void);
int
main (void)
{
@@ -13609,34 +14512,42 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_svld_dlopen=yes
-else $as_nop
- ac_cv_lib_svld_dlopen=no
+else case e in #(
+ e) ac_cv_lib_svld_dlopen=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
if test "x$ac_cv_lib_svld_dlopen" = xyes
then :
lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
-else $as_nop
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+else case e in #(
+ e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
printf %s "checking for dld_link in -ldld... " >&6; }
if test ${ac_cv_lib_dld_dld_link+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_check_lib_save_LIBS=$LIBS
+else case e in #(
+ e) ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char dld_link ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link (void);
int
main (void)
{
@@ -13648,12 +14559,14 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_dld_dld_link=yes
-else $as_nop
- ac_cv_lib_dld_dld_link=no
+else case e in #(
+ e) ac_cv_lib_dld_dld_link=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+LIBS=$ac_check_lib_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
@@ -13662,19 +14575,24 @@ then :
lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
-
+ ;;
+esac
fi
;;
@@ -13702,8 +14620,8 @@ printf %s "checking whether a program can dlopen itself... " >&6; }
if test ${lt_cv_dlopen_self+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test yes = "$cross_compiling"; then :
+else case e in #(
+ e) if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -13753,11 +14671,11 @@ else
/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
+int fnord (void) __attribute__((visibility("default")));
#endif
-int fnord () { return 42; }
-int main ()
+int fnord (void) { return 42; }
+int main (void)
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
int status = $lt_dlunknown;
@@ -13797,7 +14715,8 @@ _LT_EOF
fi
rm -fr conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
printf "%s\n" "$lt_cv_dlopen_self" >&6; }
@@ -13809,8 +14728,8 @@ printf %s "checking whether a statically linked program can dlopen itself... " >
if test ${lt_cv_dlopen_self_static+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test yes = "$cross_compiling"; then :
+else case e in #(
+ e) if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self_static=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -13860,11 +14779,11 @@ else
/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
+int fnord (void) __attribute__((visibility("default")));
#endif
-int fnord () { return 42; }
-int main ()
+int fnord (void) { return 42; }
+int main (void)
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
int status = $lt_dlunknown;
@@ -13904,7 +14823,8 @@ _LT_EOF
fi
rm -fr conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
@@ -14062,8 +14982,8 @@ if test -z "$CXXCPP"; then
if test ${ac_cv_prog_CXXCPP+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- # Double quotes because $CXX needs to be expanded
+else case e in #(
+ e) # Double quotes because $CXX needs to be expanded
for CXXCPP in "$CXX -E" cpp /lib/cpp
do
ac_preproc_ok=false
@@ -14081,9 +15001,10 @@ _ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :
-else $as_nop
- # Broken: fails on valid input.
-continue
+else case e in #(
+ e) # Broken: fails on valid input.
+continue ;;
+esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext
@@ -14097,15 +15018,16 @@ if ac_fn_cxx_try_cpp "$LINENO"
then :
# Broken: success on invalid input.
continue
-else $as_nop
- # Passes both tests.
+else case e in #(
+ e) # Passes both tests.
ac_preproc_ok=:
-break
+break ;;
+esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext
done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :
@@ -14114,7 +15036,8 @@ fi
done
ac_cv_prog_CXXCPP=$CXXCPP
-
+ ;;
+esac
fi
CXXCPP=$ac_cv_prog_CXXCPP
else
@@ -14137,9 +15060,10 @@ _ACEOF
if ac_fn_cxx_try_cpp "$LINENO"
then :
-else $as_nop
- # Broken: fails on valid input.
-continue
+else case e in #(
+ e) # Broken: fails on valid input.
+continue ;;
+esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext
@@ -14153,24 +15077,26 @@ if ac_fn_cxx_try_cpp "$LINENO"
then :
# Broken: success on invalid input.
continue
-else $as_nop
- # Passes both tests.
+else case e in #(
+ e) # Passes both tests.
ac_preproc_ok=:
-break
+break ;;
+esac
fi
rm -f conftest.err conftest.i conftest.$ac_ext
done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok
then :
-else $as_nop
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; } ;;
+esac
fi
ac_ext=c
@@ -14307,8 +15233,9 @@ cc_basename=$func_cc_basename_result
if test ${with_gnu_ld+y}
then :
withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
-else $as_nop
- with_gnu_ld=no
+else case e in #(
+ e) with_gnu_ld=no ;;
+esac
fi
ac_prog=ld
@@ -14317,7 +15244,7 @@ if test yes = "$GCC"; then
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
printf %s "checking for ld used by $CC... " >&6; }
case $host in
- *-*-mingw*)
+ *-*-mingw* | *-*-windows*)
# gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
@@ -14353,8 +15280,8 @@ fi
if test ${lt_cv_path_LD+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if test -z "$LD"; then
+else case e in #(
+ e) if test -z "$LD"; then
lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
IFS=$lt_save_ifs
@@ -14377,7 +15304,8 @@ else $as_nop
IFS=$lt_save_ifs
else
lt_cv_path_LD=$LD # Let the user override the test with a path.
-fi
+fi ;;
+esac
fi
LD=$lt_cv_path_LD
@@ -14394,8 +15322,8 @@ printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
if test ${lt_cv_prog_gnu_ld+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
+else case e in #(
+ e) # I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes
@@ -14403,6 +15331,7 @@ case `$LD -v 2>&1 </dev/null` in
*)
lt_cv_prog_gnu_ld=no
;;
+esac ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
@@ -14430,8 +15359,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
wlarc='$wl'
# ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
else
whole_archive_flag_spec_CXX=
@@ -14451,7 +15379,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"'
else
GXX=no
@@ -14602,8 +15530,8 @@ else
if test ${lt_cv_aix_libpath__CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -14635,7 +15563,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
if test -z "$lt_cv_aix_libpath__CXX"; then
lt_cv_aix_libpath__CXX=/usr/lib:/lib
fi
-
+ ;;
+esac
fi
aix_libpath=$lt_cv_aix_libpath__CXX
@@ -14658,8 +15587,8 @@ else
if test ${lt_cv_aix_libpath__CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
@@ -14691,7 +15620,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
if test -z "$lt_cv_aix_libpath__CXX"; then
lt_cv_aix_libpath__CXX=/usr/lib:/lib
fi
-
+ ;;
+esac
fi
aix_libpath=$lt_cv_aix_libpath__CXX
@@ -14749,7 +15679,7 @@ fi
esac
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
case $GXX,$cc_basename in
,cl* | no,cl* | ,icl* | no,icl*)
# Native MSVC or ICC
@@ -14802,6 +15732,7 @@ fi
allow_undefined_flag_CXX=unsupported
always_export_symbols_CXX=no
enable_shared_with_static_runtimes_CXX=yes
+ file_list_spec_CXX='@'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -14845,7 +15776,7 @@ fi
module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
module_expsym_cmds_CXX="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
- if test yes != "$lt_cv_apple_cc_single_mod"; then
+ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then
archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
archive_expsym_cmds_CXX="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
fi
@@ -14880,7 +15811,7 @@ fi
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
- old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ old_archive_from_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
enable_shared_with_static_runtimes_CXX=yes
file_list_spec_CXX='@'
;;
@@ -14921,7 +15852,7 @@ fi
haiku*)
archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- link_all_deplibs_CXX=yes
+ link_all_deplibs_CXX=no
;;
hpux9*)
@@ -14948,7 +15879,7 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[-]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
if test yes = "$GXX"; then
@@ -15013,7 +15944,7 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " [-]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
if test yes = "$GXX"; then
@@ -15245,6 +16176,10 @@ fi
esac
;;
+ *-mlibc)
+ ld_shlibs_CXX=yes
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
@@ -15261,7 +16196,7 @@ fi
ld_shlibs_CXX=yes
;;
- openbsd* | bitrig*)
+ openbsd*)
if test -f /usr/libexec/ld.so; then
hardcode_direct_CXX=yes
hardcode_shlibpath_var_CXX=no
@@ -15352,7 +16287,7 @@ fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"'
else
# FIXME: insert proper C++ library support
@@ -15367,6 +16302,9 @@ fi
ld_shlibs_CXX=no
;;
+ serenity*)
+ ;;
+
sunos4*)
case $cc_basename in
CC*)
@@ -15436,7 +16374,7 @@ fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"'
else
# g++ 2.7 appears to require '-G' NOT '-shared' on this
# platform.
@@ -15447,7 +16385,7 @@ fi
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [-]L"'
fi
hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
@@ -15590,10 +16528,11 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
case $prev$p in
-L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
+ # Some compilers place space between "-{L,R,l}" and the path.
# Remove the space.
- if test x-L = "$p" ||
- test x-R = "$p"; then
+ if test x-L = x"$p" ||
+ test x-R = x"$p" ||
+ test x-l = x"$p"; then
prev=$p
continue
fi
@@ -15760,7 +16699,7 @@ lt_prog_compiler_static_CXX=
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -15835,7 +16774,7 @@ lt_prog_compiler_static_CXX=
;;
esac
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
@@ -15960,7 +16899,9 @@ lt_prog_compiler_static_CXX=
;;
esac
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *-mlibc)
;;
*qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -15990,6 +16931,8 @@ lt_prog_compiler_static_CXX=
;;
psos*)
;;
+ serenity*)
+ ;;
solaris*)
case $cc_basename in
CC* | sunCC*)
@@ -16063,8 +17006,9 @@ printf %s "checking for $compiler option to produce PIC... " >&6; }
if test ${lt_cv_prog_compiler_pic_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
+else case e in #(
+ e) lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; }
@@ -16079,8 +17023,8 @@ printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >
if test ${lt_cv_prog_compiler_pic_works_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_pic_works_CXX=no
+else case e in #(
+ e) lt_cv_prog_compiler_pic_works_CXX=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
@@ -16108,7 +17052,8 @@ else $as_nop
fi
fi
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
@@ -16138,8 +17083,8 @@ printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6;
if test ${lt_cv_prog_compiler_static_works_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_static_works_CXX=no
+else case e in #(
+ e) lt_cv_prog_compiler_static_works_CXX=no
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
@@ -16160,7 +17105,8 @@ else $as_nop
fi
$RM -r conftest*
LDFLAGS=$save_LDFLAGS
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; }
@@ -16179,8 +17125,8 @@ printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test ${lt_cv_prog_compiler_c_o_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_c_o_CXX=no
+else case e in #(
+ e) lt_cv_prog_compiler_c_o_CXX=no
$RM -r conftest 2>/dev/null
mkdir conftest
cd conftest
@@ -16220,7 +17166,8 @@ else $as_nop
cd ..
$RM -r conftest
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; }
@@ -16232,8 +17179,8 @@ printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
if test ${lt_cv_prog_compiler_c_o_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_prog_compiler_c_o_CXX=no
+else case e in #(
+ e) lt_cv_prog_compiler_c_o_CXX=no
$RM -r conftest 2>/dev/null
mkdir conftest
cd conftest
@@ -16273,7 +17220,8 @@ else $as_nop
cd ..
$RM -r conftest
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
printf "%s\n" "$lt_cv_prog_compiler_c_o_CXX" >&6; }
@@ -16329,7 +17277,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries
pw32*)
export_symbols_cmds_CXX=$ltdll_cmds
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | mingw* | windows* | cegcc*)
case $cc_basename in
cl* | icl*)
exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
@@ -16378,8 +17326,8 @@ printf %s "checking whether -lc should be explicitly linked in... " >&6; }
if test ${lt_cv_archive_cmds_need_lc_CXX+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- $RM conftest*
+else case e in #(
+ e) $RM conftest*
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
@@ -16415,7 +17363,8 @@ else $as_nop
cat conftest.err 1>&5
fi
$RM conftest*
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
printf "%s\n" "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
@@ -16557,7 +17506,7 @@ aix[4-9]*)
# Unfortunately, runtime linking may impact performance, so we do
# not want this to be the default eventually. Also, we use the
# versioned .so libs for executables only if there is the -brtl
- # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only.
# To allow for filename-based versioning support, we need to create
# libNAME.so.V as an archive file, containing:
# *) an Import File, referring to the versioned filename of the
@@ -16651,7 +17600,7 @@ bsdi[45]*)
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
version_type=windows
shrext_cmds=.dll
need_version=no
@@ -16662,15 +17611,29 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
+ # If user builds GCC with multilib enabled,
+ # it should just install on $(libdir)
+ # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
+ if test xyes = x"$multilib"; then
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ $install_prog $dir/$dlname $destdir/$dlname~
+ chmod a+x $destdir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
+ fi'
+ else
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ fi
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$RM \$dlpath'
@@ -16682,7 +17645,7 @@ cygwin* | mingw* | pw32* | cegcc*)
soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
- mingw* | cegcc*)
+ mingw* | windows* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
@@ -16701,7 +17664,7 @@ cygwin* | mingw* | pw32* | cegcc*)
library_names_spec='$libname.dll.lib'
case $build_os in
- mingw*)
+ mingw* | windows*)
sys_lib_search_path_spec=
lt_save_ifs=$IFS
IFS=';'
@@ -16807,7 +17770,28 @@ freebsd* | dragonfly* | midnightbsd*)
need_version=yes
;;
esac
+ case $host_cpu in
+ powerpc64)
+ # On FreeBSD bi-arch platforms, a different variable is used for 32-bit
+ # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int test_pointer_size[sizeof (void *) - 5];
+
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"
+then :
shlibpath_var=LD_LIBRARY_PATH
+else case e in #(
+ e) shlibpath_var=LD_32_LIBRARY_PATH ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+ ;;
+ *)
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+ esac
case $host_os in
freebsd2.*)
shlibpath_overrides_runpath=yes
@@ -16837,8 +17821,9 @@ haiku*)
soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=no
- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
- hardcode_into_libs=yes
+ sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
+ sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
+ hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -16948,7 +17933,7 @@ linux*android*)
version_type=none # Android doesn't support versioned libraries.
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext'
+ library_names_spec='$libname$release$shared_ext $libname$shared_ext'
soname_spec='$libname$release$shared_ext'
finish_cmds=
shlibpath_var=LD_LIBRARY_PATH
@@ -16960,8 +17945,9 @@ linux*android*)
hardcode_into_libs=yes
dynamic_linker='Android linker'
- # Don't embed -rpath directories since the linker doesn't support them.
- hardcode_libdir_flag_spec_CXX='-L$libdir'
+ # -rpath works at least for libraries that are not overridden by
+ # libraries installed in system locations.
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
;;
# This must be glibc/ELF.
@@ -16979,8 +17965,8 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
if test ${lt_cv_shlibpath_overrides_runpath+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- lt_cv_shlibpath_overrides_runpath=no
+else case e in #(
+ e) lt_cv_shlibpath_overrides_runpath=no
save_LDFLAGS=$LDFLAGS
save_libdir=$libdir
eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
@@ -17007,7 +17993,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$save_LDFLAGS
libdir=$save_libdir
-
+ ;;
+esac
fi
shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
@@ -17017,7 +18004,7 @@ fi
# before this can be enabled.
hardcode_into_libs=yes
- # Ideally, we could use ldconfig to report *all* directores which are
+ # Ideally, we could use ldconfig to report *all* directories which are
# searched for libraries, however this is still not possible. Aside from not
# being certain /sbin/ldconfig is available, command
# 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
@@ -17037,6 +18024,18 @@ fi
dynamic_linker='GNU/Linux ld.so'
;;
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -17055,6 +18054,18 @@ netbsd*)
hardcode_into_libs=yes
;;
+*-mlibc)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='mlibc ld.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
@@ -17074,7 +18085,7 @@ newsos6)
dynamic_linker='ldqnx.so'
;;
-openbsd* | bitrig*)
+openbsd*)
version_type=sunos
sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
@@ -17134,6 +18145,17 @@ rdos*)
dynamic_linker=no
;;
+serenity*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ dynamic_linker='SerenityOS LibELF'
+ ;;
+
solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
@@ -17231,6 +18253,479 @@ uts4*)
shlibpath_var=LD_LIBRARY_PATH
;;
+emscripten*)
+ version_type=none
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ dynamic_linker="Emscripten linker"
+ lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+
+ # C++ specific cases for pic, static, wl, etc.
+ if test yes = "$GXX"; then
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ fi
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static_CXX='$wl-static'
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_CXX='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ lt_prog_compiler_pic_CXX=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ lt_prog_compiler_static_CXX=
+ ;;
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_CXX=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[4-9]*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ else
+ lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly* | midnightbsd*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
+ if test ia64 != "$host_cpu"; then
+ lt_prog_compiler_pic_CXX='+Z'
+ fi
+ ;;
+ aCC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64, which still supported -KPIC.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fpic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-qpic'
+ lt_prog_compiler_static_CXX='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | $SED 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ lt_prog_compiler_pic_CXX='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *-mlibc)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ lt_prog_compiler_wl_CXX='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ serenity*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ lt_prog_compiler_pic_CXX='-pic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ lt_prog_compiler_can_build_shared_CXX=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic_CXX=
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+ ;;
+esac
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+printf %s "checking for $compiler option to produce PIC... " >&6; }
+if test ${lt_cv_prog_compiler_pic_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_CXX" >&6; }
+lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if test ${lt_cv_prog_compiler_pic_works_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) lt_cv_prog_compiler_pic_works_CXX=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works_CXX=yes
+ fi
+ fi
+ $RM conftest*
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+printf "%s\n" "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
+ case $lt_prog_compiler_pic_CXX in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+ esac
+else
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test ${lt_cv_prog_compiler_static_works_CXX+y}
+then :
+ printf %s "(cached) " >&6
+else case e in #(
+ e) lt_cv_prog_compiler_static_works_CXX=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+ ;;
+esac
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+printf "%s\n" "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
+ :
+else
+ lt_prog_compiler_static_CXX=
+fi
+
+
+
+='-fPIC'
+ archive_cmds_CXX='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib'
+ archive_expsym_cmds_CXX='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym'
+ archive_cmds_need_lc_CXX=no
+ no_undefined_flag_CXX=
+ ;;
+
*)
dynamic_linker=no
;;
@@ -17418,8 +18913,9 @@ _ACEOF
if ac_fn_cxx_try_compile "$LINENO"
then :
ac_cv_cxx=yes
-else $as_nop
- ac_cv_cxx=no
+else case e in #(
+ e) ac_cv_cxx=no ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking available C++ standard" >&5
@@ -17453,11 +18949,12 @@ then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cxxmode" >&5
printf "%s\n" "$cxxmode" >&6; }
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
printf "%s\n" "none" >&6; }
-
+ ;;
+esac
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -17497,10 +18994,11 @@ if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_mingw32=yes; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
printf "%s\n" "yes" >&6; }
-else $as_nop
- ac_cv_mingw32=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+else case e in #(
+ e) ac_cv_mingw32=no; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
ac_ext=c
@@ -17523,8 +19021,9 @@ fi
if test ${with_pkgconfigdir+y}
then :
withval=$with_pkgconfigdir; pkgconfigdir="$withval"
-else $as_nop
- pkgconfigdir='${libdir}/pkgconfig'
+else case e in #(
+ e) pkgconfigdir='${libdir}/pkgconfig' ;;
+esac
fi
@@ -17543,19 +19042,21 @@ printf %s "checking whether compiler accepts -fvisibility=hidden... " >&6; }
if test ${ac_cv_fvisibility_hidden+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else case e in #(
+ e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
_ACEOF
if ac_fn_c_try_compile "$LINENO"
then :
ac_cv_fvisibility_hidden=yes
-else $as_nop
- ac_cv_fvisibility_hidden=no
-
+else case e in #(
+ e) ac_cv_fvisibility_hidden=no
+ ;;
+esac
fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fvisibility_hidden" >&5
printf "%s\n" "$ac_cv_fvisibility_hidden" >&6; }
@@ -17573,21 +19074,43 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
- if test "$with_gnu_ld" = yes; then
- WITH_GNU_LD_TRUE=
- WITH_GNU_LD_FALSE='#'
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking linker support for symbol maps" >&5
+printf %s "checking linker support for symbol maps... " >&6; }
+ echo '{global:*;};' >conftest.map
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+ int main() { return 0; }
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ with_ldsym=yes
+else case e in #(
+ e) with_ldsym=no ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$saved_LDFLAGS"
+ rm conftest.map
+ if test "$with_ldsym" = yes; then
+ WITH_LDSYM_TRUE=
+ WITH_LDSYM_FALSE='#'
else
- WITH_GNU_LD_TRUE='#'
- WITH_GNU_LD_FALSE=
+ WITH_LDSYM_TRUE='#'
+ WITH_LDSYM_FALSE=
fi
-if test -n "$LD" && $LD -z help >/dev/null 2>/dev/null
+ if test -n "$LD" && $LD -z help >/dev/null 2>/dev/null
then :
with_sun_ld=yes
-else $as_nop
- with_sun_ld=no
+else case e in #(
+ e) with_sun_ld=no ;;
+esac
fi
- if test "$with_sun_ld" = yes; then
+ if test "$with_sun_ld" = yes; then
WITH_SUN_LD_TRUE=
WITH_SUN_LD_FALSE='#'
else
@@ -17595,6 +19118,25 @@ else
WITH_SUN_LD_FALSE=
fi
+ if test "$with_ldsym" = yes
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: -Wl,--version-script" >&5
+printf "%s\n" "-Wl,--version-script" >&6; }
+
+elif test "$with_sun_ld" = yes
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: -M" >&5
+printf "%s\n" "-M" >&6; }
+
+else case e in #(
+ e)
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ ;;
+esac
+fi
LIBS_system="$LIBS"
ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
@@ -17629,15 +19171,21 @@ printf %s "checking for library containing dlopen... " >&6; }
if test ${ac_cv_search_dlopen+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
+else case e in #(
+ e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char dlopen ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen (void);
int
main (void)
{
@@ -17668,11 +19216,13 @@ done
if test ${ac_cv_search_dlopen+y}
then :
-else $as_nop
- ac_cv_search_dlopen=no
+else case e in #(
+ e) ac_cv_search_dlopen=no ;;
+esac
fi
rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_func_search_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
printf "%s\n" "$ac_cv_search_dlopen" >&6; }
@@ -17690,15 +19240,21 @@ printf %s "checking for library containing clock_gettime... " >&6; }
if test ${ac_cv_search_clock_gettime+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
+else case e in #(
+ e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char clock_gettime ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime (void);
int
main (void)
{
@@ -17729,11 +19285,13 @@ done
if test ${ac_cv_search_clock_gettime+y}
then :
-else $as_nop
- ac_cv_search_clock_gettime=no
+else case e in #(
+ e) ac_cv_search_clock_gettime=no ;;
+esac
fi
rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_func_search_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
@@ -17750,15 +19308,21 @@ printf %s "checking for library containing pthread_mutex_lock... " >&6; }
if test ${ac_cv_search_pthread_mutex_lock+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
+else case e in #(
+ e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char pthread_mutex_lock ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_mutex_lock (void);
int
main (void)
{
@@ -17789,11 +19353,13 @@ done
if test ${ac_cv_search_pthread_mutex_lock+y}
then :
-else $as_nop
- ac_cv_search_pthread_mutex_lock=no
+else case e in #(
+ e) ac_cv_search_pthread_mutex_lock=no ;;
+esac
fi
rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_func_search_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_lock" >&5
printf "%s\n" "$ac_cv_search_pthread_mutex_lock" >&6; }
@@ -17812,15 +19378,21 @@ printf %s "checking for library containing getaddrinfo... " >&6; }
if test ${ac_cv_search_getaddrinfo+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- ac_func_search_save_LIBS=$LIBS
+else case e in #(
+ e) ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-char getaddrinfo ();
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getaddrinfo (void);
int
main (void)
{
@@ -17851,11 +19423,13 @@ done
if test ${ac_cv_search_getaddrinfo+y}
then :
-else $as_nop
- ac_cv_search_getaddrinfo=no
+else case e in #(
+ e) ac_cv_search_getaddrinfo=no ;;
+esac
fi
rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+LIBS=$ac_func_search_save_LIBS ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5
printf "%s\n" "$ac_cv_search_getaddrinfo" >&6; }
@@ -17885,11 +19459,12 @@ then :
printf "%s\n" "-lws2_32" >&6; }
libsocket_LIBS="$libsocket_LIBS $LIBS";
-else $as_nop
-
+else case e in #(
+ e)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
printf "%s\n" "no" >&6; }
-
+ ;;
+esac
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
@@ -17899,28 +19474,30 @@ fi;
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
printf %s "checking size of void *... " >&6; }
if test ${ac_cv_sizeof_void_p+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_void_p" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_void_p" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (void *)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_void_p=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
printf "%s\n" "$ac_cv_sizeof_void_p" >&6; }
@@ -17932,28 +19509,30 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
printf %s "checking size of char *... " >&6; }
if test ${ac_cv_sizeof_char_p+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_char_p" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_char_p" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (char *)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_char_p=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
printf "%s\n" "$ac_cv_sizeof_char_p" >&6; }
@@ -17965,28 +19544,30 @@ printf "%s\n" "#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of struct x *" >&5
printf %s "checking size of struct x *... " >&6; }
if test ${ac_cv_sizeof_struct_x_p+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct x *))" "ac_cv_sizeof_struct_x_p" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct x *))" "ac_cv_sizeof_struct_x_p" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_struct_x_p" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_struct_x_p" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (struct x *)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_struct_x_p=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_x_p" >&5
printf "%s\n" "$ac_cv_sizeof_struct_x_p" >&6; }
@@ -17998,28 +19579,30 @@ printf "%s\n" "#define SIZEOF_STRUCT_X_P $ac_cv_sizeof_struct_x_p" >>confdefs.h
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of struct x **" >&5
printf %s "checking size of struct x **... " >&6; }
if test ${ac_cv_sizeof_struct_x_pp+y}
then :
printf %s "(cached) " >&6
-else $as_nop
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct x **))" "ac_cv_sizeof_struct_x_pp" "$ac_includes_default"
+else case e in #(
+ e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (struct x **))" "ac_cv_sizeof_struct_x_pp" "$ac_includes_default"
then :
-else $as_nop
- if test "$ac_cv_type_struct_x_pp" = yes; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+else case e in #(
+ e) if test "$ac_cv_type_struct_x_pp" = yes; then
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (struct x **)
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
else
ac_cv_sizeof_struct_x_pp=0
- fi
+ fi ;;
+esac
fi
-
+ ;;
+esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_x_pp" >&5
printf "%s\n" "$ac_cv_sizeof_struct_x_pp" >&6; }
@@ -18258,8 +19841,8 @@ cat >confcache <<\_ACEOF
# config.status only pays attention to the cache file if you give it
# the --recheck option to rerun configure.
#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# 'ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* 'ac_cv_foo' will be assigned the
# following values.
_ACEOF
@@ -18289,14 +19872,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;}
(set) 2>&1 |
case $as_nl`(ac_space=' '; set) 2>&1` in #(
*${as_nl}ac_space=\ *)
- # `set' does not quote correctly, so add quotes: double-quote
+ # 'set' does not quote correctly, so add quotes: double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \.
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
;; #(
*)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
+ # 'set' quotes correctly as required by POSIX, so do not add quotes.
sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
esac |
@@ -18365,6 +19948,18 @@ printf %s "checking that generated files are newer than configure... " >&6; }
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
printf "%s\n" "done" >&6; }
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+esac
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
@@ -18393,8 +19988,8 @@ if test -z "${MINGW32_TRUE}" && test -z "${MINGW32_FALSE}"; then
as_fn_error $? "conditional \"MINGW32\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${WITH_GNU_LD_TRUE}" && test -z "${WITH_GNU_LD_FALSE}"; then
- as_fn_error $? "conditional \"WITH_GNU_LD\" was never defined.
+if test -z "${WITH_LDSYM_TRUE}" && test -z "${WITH_LDSYM_FALSE}"; then
+ as_fn_error $? "conditional \"WITH_LDSYM\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${WITH_SUN_LD_TRUE}" && test -z "${WITH_SUN_LD_FALSE}"; then
@@ -18434,7 +20029,6 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
-as_nop=:
if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
then :
emulate sh
@@ -18443,12 +20037,13 @@ then :
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
setopt NO_GLOB_SUBST
-else $as_nop
- case `(set -o) 2>/dev/null` in #(
+else case e in #(
+ e) case `(set -o) 2>/dev/null` in #(
*posix*) :
set -o posix ;; #(
*) :
;;
+esac ;;
esac
fi
@@ -18520,7 +20115,7 @@ IFS=$as_save_IFS
;;
esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
+# We did not find ourselves, most probably we were run as 'sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
@@ -18549,7 +20144,6 @@ as_fn_error ()
} # as_fn_error
-
# as_fn_set_status STATUS
# -----------------------
# Set $? to STATUS, without forking.
@@ -18589,11 +20183,12 @@ then :
{
eval $1+=\$2
}'
-else $as_nop
- as_fn_append ()
+else case e in #(
+ e) as_fn_append ()
{
eval $1=\$$1\$2
- }
+ } ;;
+esac
fi # as_fn_append
# as_fn_arith ARG...
@@ -18607,11 +20202,12 @@ then :
{
as_val=$(( $* ))
}'
-else $as_nop
- as_fn_arith ()
+else case e in #(
+ e) as_fn_arith ()
{
as_val=`expr "$@" || test $? -eq 1`
- }
+ } ;;
+esac
fi # as_fn_arith
@@ -18694,9 +20290,9 @@ if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
- # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
- # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -pR'.
+ # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
+ # In both cases, we have to default to 'cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
@@ -18777,10 +20373,12 @@ as_test_x='test -x'
as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed '$as_sed_sh'" # deprecated
exec 6>&1
@@ -18795,8 +20393,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libHX $as_me 4.23, which was
-generated by GNU Autoconf 2.71. Invocation command line was
+This file was extended by libHX $as_me 5.2, which was
+generated by GNU Autoconf 2.72. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -18828,7 +20426,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
+'$as_me' instantiates files and other configuration actions
from templates according to the current configuration. Unless the files
and actions are specified as TAGs, all are instantiated by default.
@@ -18863,11 +20461,11 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-libHX config.status 4.23
-configured by $0, generated by GNU Autoconf 2.71,
+libHX config.status 5.2
+configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2021 Free Software Foundation, Inc.
+Copyright (C) 2023 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -18929,8 +20527,8 @@ do
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- as_fn_error $? "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
+ as_fn_error $? "ambiguous option: '$1'
+Try '$0 --help' for more information.";;
--help | --hel | -h )
printf "%s\n" "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
@@ -18938,8 +20536,8 @@ Try \`$0 --help' for more information.";;
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
+ -*) as_fn_error $? "unrecognized option: '$1'
+Try '$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
ac_need_defaults=false ;;
@@ -19383,7 +20981,7 @@ do
"include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
"libHX.pc") CONFIG_FILES="$CONFIG_FILES libHX.pc" ;;
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -19403,7 +21001,7 @@ fi
# creating and moving files from /tmp can sometimes cause problems.
# Hook for its removal unless debugging.
# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
+# after its creation but before its name has been assigned to '$tmp'.
$debug ||
{
tmp= ac_tmp=
@@ -19427,7 +21025,7 @@ ac_tmp=$tmp
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
+# This happens for instance with './config.status config.h'.
if test -n "$CONFIG_FILES"; then
@@ -19585,13 +21183,13 @@ fi # test -n "$CONFIG_FILES"
# Set up the scripts for CONFIG_HEADERS section.
# No need to generate them if there are no CONFIG_HEADERS.
-# This happens for instance with `./config.status Makefile'.
+# This happens for instance with './config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF
-# Transform confdefs.h into an awk script `defines.awk', embedded as
+# Transform confdefs.h into an awk script 'defines.awk', embedded as
# here-document in config.status, that substitutes the proper values into
# config.h.in to produce config.h.
@@ -19701,7 +21299,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -19723,19 +21321,19 @@ do
-) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
- # because $ac_f cannot contain `:'.
+ # because $ac_f cannot contain ':'.
test -f "$ac_f" ||
case $ac_f in
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
done
- # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # Let's still pretend it is 'configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
configure_input='Generated from '`
@@ -19868,7 +21466,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
esac
_ACEOF
-# Neutralize VPATH when `$srcdir' = `.'.
+# Neutralize VPATH when '$srcdir' = '.'.
# Shell code in configure.ac might set extrasub.
# FIXME: do we really want to maintain this feature?
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
@@ -19899,9 +21497,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
"$ac_tmp/out"`; test -z "$ac_out"; } &&
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
-printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$ac_tmp/stdin"
@@ -20056,15 +21654,15 @@ printf "%s\n" X/"$am_mf" |
(exit $ac_status); } || am_rc=$?
done
if test $am_rc -ne 0; then
- { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
+printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
as_fn_error $? "Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. If GNU make was not used, consider
re-running the configure script with MAKE=\"gmake\" (or whatever is
necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
-See \`config.log' for more details" "$LINENO" 5; }
+See 'config.log' for more details" "$LINENO" 5; }
fi
{ am_dirpart=; unset am_dirpart;}
{ am_filepart=; unset am_filepart;}
@@ -20093,13 +21691,13 @@ See \`config.log' for more details" "$LINENO" 5; }
# Provide generalized library-building support services.
# Written by Gordon Matzigkeit, 1996
-# Copyright (C) 2014 Free Software Foundation, Inc.
+# Copyright (C) 2024 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# GNU Libtool is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of of the License, or
+# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# As a special exception to the GNU General Public License, if you
@@ -20480,7 +22078,7 @@ hardcode_direct=$hardcode_direct
# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# "absolute",i.e. impossible to change by setting \$shlibpath_var if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute
@@ -20723,7 +22321,7 @@ hardcode_direct=$hardcode_direct_CXX
# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \$shlibpath_var if the
+# "absolute",i.e. impossible to change by setting \$shlibpath_var if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute_CXX
diff --git a/configure.ac b/configure.ac
index fde64b7..8cbc9c3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([libHX], [4.23])
+AC_INIT([libHX], [5.2])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
@@ -60,10 +60,7 @@ AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
AC_SUBST([pkgconfigdir])
CHECK_GCC_FVISIBILITY
-AM_CONDITIONAL([WITH_GNU_LD], [test "$with_gnu_ld" = yes])
-AS_IF([test -n "$LD" && $LD -z help >/dev/null 2>/dev/null], [with_sun_ld=yes], [with_sun_ld=no])
-AM_CONDITIONAL([WITH_SUN_LD], [test "$with_sun_ld" = yes])
-
+CHECK_LD_SYMVERS
LIBS_system="$LIBS"
AC_CHECK_HEADERS([dlfcn.h sys/resource.h sys/un.h])
AM_CONDITIONAL([HAVE_DLFCN_H], [test "$ac_cv_header_dlfcn_h" = "yes"])
diff --git a/debian/changelog b/debian/changelog
index 5471467..024ad9a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,39 @@
+libhx (5.2-1~exp1) experimental; urgency=medium
+
+ * New upstream release (Closes: #1121030):
+ - Bump package name depending on the SONAME to libhx43.
+ - Refresh symbols file.
+ * debian/watch:
+ - change for tar.zx to tar.zst.
+ - Update to version 5.
+ * debian/control:
+ - Remove now redundant Rules-Requires-Root.
+ * debian/copyright:
+ - Refresh years and files.
+
+ -- Jörg Frings-Fürst <debian@jff.email> Sun, 23 Nov 2025 09:45:15 +0100
+
+libhx (4.27-1) unstable; urgency=medium
+
+ * New upstream release.
+ * debian/copyright:
+ - Fix old FSF address.
+
+ -- Jörg Frings-Fürst <debian@jff.email> Thu, 11 Sep 2025 17:48:09 +0200
+
+libhx (4.26-1) unstable; urgency=medium
+
+ * New upstream release.
+ * Declare compliance with Debian Policy 4.7.2 (No changes needed).
+ * debian/copyright:
+ - Add 2025 to myself.
+ - Rewrite to make lrc happy.
+ * debian/control:
+ - Change Vcs-Git from git: to https:.
+ * Remove useless libhx32t64.lintian-overrides.
+
+ -- Jörg Frings-Fürst <debian@jff.email> Sun, 16 Mar 2025 18:34:55 +0100
+
libhx (4.23-1) unstable; urgency=medium
* New upstream release (Closes: #1064734).
diff --git a/debian/control b/debian/control
index af2d9a2..807a61a 100644
--- a/debian/control
+++ b/debian/control
@@ -4,17 +4,16 @@ Maintainer: Jörg Frings-Fürst <debian@jff.email>
Build-Depends:
debhelper-compat (= 13),
dpkg-dev (>= 1.22.5)
-Standards-Version: 4.6.2.0
+Standards-Version: 4.7.2
Section: libs
-Rules-Requires-Root: no
Homepage: https://inai.de/projects/libhx/
-Vcs-Git: git://git.jff.email/libhx.git
+Vcs-Git: https://git.jff.email/cgit/libhx.git
Vcs-Browser: https://git.jff.email/cgit/libhx.git
-Package: libhx32t64
+Package: libhx43t64
Provides: ${t64:Provides}
-Replaces: libhx32
-Breaks: libhx32 (<< ${source:Version})
+Replaces: libhx32t64
+Breaks: libhx32t64 (<< ${source:Version})
Architecture: any
Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends}
@@ -34,7 +33,7 @@ Section: libdevel
Architecture: any
Pre-Depends: ${misc:Pre-Depends}
Depends:
- libhx32t64 (= ${binary:Version}),
+ libhx43t64 (= ${binary:Version}),
${shlibs:Depends},
${misc:Depends}
Description: Development files for libhx
diff --git a/debian/copyright b/debian/copyright
index 5e10518..388542e 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -4,12 +4,12 @@ Upstream-Contact: Jan Engelhardt <jengelh@inai.de>
Source: https://inai.de/projects/libhx/
Files: *
-Copyright: 1999-2014 Jan Engelhardt <jengelh@gmx.de>
+Copyright: 1999-2025 Jan Engelhardt <jengelh@gmx.de>
License: LGPL-2.1+
Files: debian/*
Copyright: 2007-2014 Bastian Kleineidam <calvin@debian.org>
- 2015-2024 Jörg Frings-Fürst <debian@jff.email>
+ 2015-2025 Jörg Frings-Fürst <debian@jff.email>
License: GPL-3+
Files: debian/patches/*
@@ -19,12 +19,42 @@ License: LGPL-2.1+
Files: build-aux/*
m4/*
-Copyright: 1992-2022 Free Software Foundation, Inc.
+Copyright: 1992-2025 Free Software Foundation, Inc.
License: GPL-2+
+Files: build-aux/install-sh
+Copyright: 1992-2022 Free Software Foundation, Inc.
+License: X11
+
+Files: build-aux/ltmain.sh
+Copyright: 1992-2022 Free Software Foundation, Inc.
+License: GPL-2+ with Libtool exception
+
+Files: aclocal.m4
+ m4/lt~obsolete.m4
+ m4/ltoptions.m4
+ m4/ltsugar.m4
+ m4/ltversion.m4
+Copyright: 1992-2025 Free Software Foundation, Inc.
+License: FSFULLR
+
+Files: configure
+Copyright: 1992-2022 Free Software Foundation, Inc.
+License: FSFUL
+
+Files: m4/libtool.m4
+Copyright: 1992-2022 Free Software Foundation, Inc.
+License: (FSFULLR and/or GPL-2) with Libtool exception
+
Files: src/tc-*.c
Copyright: 1992-2013 Jan Engelhardt <jengelh@gmx.de>
-License: WTFPL-2+
+License: Expat
+
+Files: include/Makefile.in
+ Makefile.in
+ src/Makefile.in
+Copyright: 1994-2025 Free Software Foundation, Inc.
+License: FSFULLR
License: LGPL-2.1+
This library is free software; you can redistribute it and/or
@@ -38,8 +68,7 @@ License: LGPL-2.1+
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ License along with this library; If not, see https://www.gnu.org/licenses/.
.
On Debian systems, the complete text of the GNU Lesser General Public License
version 2.1 can be found in "/usr/share/common-licenses/LGPL-2.1".
@@ -78,17 +107,95 @@ License: GPL-2+
The complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-2 file.
-License: WTFPL-2+
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
+License: FSFUL
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+
+License: X11
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to
+ deal in the Software without restriction, including without limitation the
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
.
- Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+ TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
+ Except as contained in this notice, the name of the X Consortium shall not
+ be used in advertising or otherwise to promote the sale, use or other deal-
+ ings in this Software without prior written authorization from the X Consor-
+ tium.
+
+License: gpl-2+ with libtool exception
+ GNU Libtool is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
.
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+ As a special exception to the GNU General Public License,
+ if you distribute this file as part of a program or library that
+ is built using GNU Libtool, you may include this file under the
+ same distribution terms that you use for the rest of that program.
.
- 0. You just DO WHAT THE FUCK YOU WANT TO.
+ GNU Libtool is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with GNU Libtool; see the file COPYING. If not, see
+ https://www.gnu.org/licenses/.
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+License: FSFULLR
+ This file is free software; the Free Software Foundation
+ gives unlimited permission to copy and/or distribute it,
+ with or without modifications, as long as this notice is preserved.
+
+License: fsfullr and/or gpl-2 with libtool exception
+ This is free software; see the source for copying conditions. There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ .
+ GNU Libtool is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of of the License, or
+ (at your option) any later version.
+ .
+ As a special exception to the GNU General Public License, if you
+ distribute this file as part of a program or library that is built
+ using GNU Libtool, you may include this file under the same
+ distribution terms that you use for the rest of that program.
+ .
+ GNU Libtool is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/debian/libhx32t64.lintian-overrides b/debian/libhx32t64.lintian-overrides
deleted file mode 100644
index e93c817..0000000
--- a/debian/libhx32t64.lintian-overrides
+++ /dev/null
@@ -1 +0,0 @@
-libhx32t64: package-name-doesnt-match-sonames libHX32
diff --git a/debian/libhx32t64.symbols b/debian/libhx32t64.symbols
deleted file mode 100644
index e66a253..0000000
--- a/debian/libhx32t64.symbols
+++ /dev/null
@@ -1,159 +0,0 @@
-libHX.so.32 libhx32t64 #MINVER#
-* Build-Depends-Package: libhx-dev
- HX_addrport_split@LIBHX_4.11 4.12
- HX_basename@LIBHX_3.25 3.25
- HX_basename_exact@LIBHX_3.25 3.25
- HX_chomp@LIBHX_3.25 3.25
- HX_copy_dir@LIBHX_3.25 3.25
- HX_copy_file@LIBHX_3.25 3.25
- HX_dirname@LIBHX_3.25 3.25
- HX_dlclose@LIBHX_3.25 3.25
- HX_dlerror@LIBHX_3.25 3.25
- HX_dlopen@LIBHX_3.25 3.25
- HX_dlsym@LIBHX_3.25 3.25
- HX_drand@LIBHX_3.25 3.25
- HX_exit@LIBHX_3.25 3.25
- HX_ffs@LIBHX_3.25 3.25
- HX_flpr@LIBHX_4.15 4.17
- HX_flprf@LIBHX_4.15 4.17
- HX_fls@LIBHX_3.25 3.25
- HX_getl@LIBHX_3.25 3.25
- HX_getopt5@LIBHX_4.18 4.19
- HX_getopt@LIBHX_3.25 3.25
- HX_getopt_help@LIBHX_3.25 3.25
- HX_getopt_help_cb@LIBHX_3.25 3.25
- HX_getopt_usage@LIBHX_3.25 3.25
- HX_getopt_usage_cb@LIBHX_3.25 3.25
- HX_hexdump@LIBHX_3.25 3.25
- HX_inet_connect@LIBHX_4.11 4.12
- HX_inet_listen@LIBHX_4.11 4.12
- HX_init@LIBHX_3.25 3.25
- HX_ipaddr_is_local@LIBHX_4.9 4.10
- HX_irand@LIBHX_3.25 3.25
- HX_local_listen@LIBHX_4.11 4.12
- HX_memmem@LIBHX_3.25 3.25
- HX_mkdir@LIBHX_3.25 3.25
- HX_rand@LIBHX_3.25 3.25
- HX_readlink@LIBHX_3.25 3.25
- HX_realpath@LIBHX_3.25 3.25
- HX_rrmdir@LIBHX_3.25 3.25
- HX_sendfile@LIBHX_4.3 4.7
- HX_shconfig@LIBHX_3.25 3.25
- HX_shconfig_free@LIBHX_3.25 3.25
- HX_shconfig_map@LIBHX_3.25 3.25
- HX_shconfig_pv@LIBHX_3.25 3.25
- HX_slurp_fd@LIBHX_3.27 4.7
- HX_slurp_file@LIBHX_3.27 4.7
- HX_sockaddr_is_local@LIBHX_4.9 4.10
- HX_socket_from_env@LIBHX_3.27 4.7
- HX_split@LIBHX_3.25 3.25
- HX_split_fixed@LIBHX_3.25 3.25
- HX_split_inplace@LIBHX_3.25 3.25
- HX_stpltrim@LIBHX_3.25 3.25
- HX_strbchr@LIBHX_3.25 3.25
- HX_strchr2@LIBHX_3.25 3.25
- HX_strclone@LIBHX_3.25 3.25
- HX_strdup@LIBHX_3.25 3.25
- HX_strlcat@LIBHX_3.25 3.25
- HX_strlcpy@LIBHX_3.25 3.25
- HX_strlncat@LIBHX_3.25 3.25
- HX_strlower@LIBHX_3.25 3.25
- HX_strltrim@LIBHX_3.25 3.25
- HX_strmid@LIBHX_3.25 3.25
- HX_strndup@LIBHX_3.25 3.25
- HX_strnlen@LIBHX_3.25 3.25
- HX_strquote@LIBHX_3.25 3.25
- HX_strrcspn@LIBHX_3.25 3.25
- HX_strrev@LIBHX_3.25 3.25
- HX_strrtrim@LIBHX_3.25 3.25
- HX_strsep2@LIBHX_3.25 3.25
- HX_strsep@LIBHX_3.25 3.25
- HX_strtod_unit@LIBHX_4.2 4.7
- HX_strtoull_nsec@LIBHX_4.16 4.17
- HX_strtoull_sec@LIBHX_4.3 4.7
- HX_strtoull_unit@LIBHX_4.2 4.7
- HX_strupper@LIBHX_3.25 3.25
- HX_time_compare@LIBHX_3.25 3.25
- HX_timespec_add@LIBHX_3.25 3.25
- HX_timespec_isneg@LIBHX_3.25 3.25
- HX_timespec_mul@LIBHX_3.25 3.25
- HX_timespec_mulf@LIBHX_3.25 3.25
- HX_timespec_neg@LIBHX_3.25 3.25
- HX_timespec_sub@LIBHX_3.25 3.25
- HX_timeval_sub@LIBHX_3.25 3.25
- HX_unit_seconds@LIBHX_4.3 4.7
- HX_unit_size@LIBHX_4.2 4.7
- HX_unit_size_cu@LIBHX_4.2 4.7
- HX_zvecfree@LIBHX_3.25 3.25
- HXdeque_del@LIBHX_3.25 3.25
- HXdeque_find@LIBHX_3.25 3.25
- HXdeque_free@LIBHX_3.25 3.25
- HXdeque_genocide2@LIBHX_3.25 3.25
- HXdeque_get@LIBHX_3.25 3.25
- HXdeque_init@LIBHX_3.25 3.25
- HXdeque_move@LIBHX_3.25 3.25
- HXdeque_pop@LIBHX_3.25 3.25
- HXdeque_push@LIBHX_3.25 3.25
- HXdeque_shift@LIBHX_3.25 3.25
- HXdeque_to_vec@LIBHX_3.25 3.25
- HXdeque_unshift@LIBHX_3.25 3.25
- HXdir_close@LIBHX_3.25 3.25
- HXdir_open@LIBHX_3.25 3.25
- HXdir_read@LIBHX_3.25 3.25
- HXformat3_aprintf@LIBHX_4.9 4.10
- HXformat3_fprintf@LIBHX_4.9 4.10
- HXformat3_sprintf@LIBHX_4.9 4.10
- HXformat_add@LIBHX_3.25 3.25
- HXformat_aprintf@LIBHX_3.25 3.25
- HXformat_fprintf@LIBHX_3.25 3.25
- HXformat_free@LIBHX_3.25 3.25
- HXformat_init@LIBHX_3.25 3.25
- HXformat_sprintf@LIBHX_3.25 3.25
- HXhash_djb2@LIBHX_3.25 3.25
- HXhash_jlookup3@LIBHX_3.25 3.25
- HXhash_jlookup3s@LIBHX_3.25 3.25
- HXhash_primes@LIBHX_3.25 3.25
- HXio_fullread@LIBHX_3.25 3.25
- HXio_fullwrite@LIBHX_3.25 3.25
- HXmap_add@LIBHX_3.25 3.25
- HXmap_del@LIBHX_3.25 3.25
- HXmap_find@LIBHX_3.25 3.25
- HXmap_free@LIBHX_3.25 3.25
- HXmap_get@LIBHX_3.25 3.25
- HXmap_init5@LIBHX_3.25 3.25
- HXmap_init@LIBHX_3.25 3.25
- HXmap_keysvalues@LIBHX_3.25 3.25
- HXmap_qfe@LIBHX_3.25 3.25
- HXmap_traverse@LIBHX_3.25 3.25
- HXmap_travfree@LIBHX_3.25 3.25
- HXmap_travinit@LIBHX_3.25 3.25
- HXmc_free@LIBHX_3.25 3.25
- HXmc_length@LIBHX_3.25 3.25
- HXmc_memcat@LIBHX_3.25 3.25
- HXmc_memcpy@LIBHX_3.25 3.25
- HXmc_memdel@LIBHX_3.25 3.25
- HXmc_meminit@LIBHX_3.25 3.25
- HXmc_memins@LIBHX_3.25 3.25
- HXmc_mempcat@LIBHX_3.25 3.25
- HXmc_setlen@LIBHX_3.25 3.25
- HXmc_strcat@LIBHX_3.25 3.25
- HXmc_strcpy@LIBHX_3.25 3.25
- HXmc_strinit@LIBHX_3.25 3.25
- HXmc_strins@LIBHX_3.25 3.25
- HXmc_strpcat@LIBHX_3.25 3.25
- HXmc_trunc@LIBHX_3.25 3.25
- HXmc_zvecfree@LIBHX_3.25 3.25
- HXproc_run_async@LIBHX_3.25 3.25
- HXproc_run_sync@LIBHX_3.25 3.25
- HXproc_switch_user@LIBHX_3.27 4.7
- HXproc_top_fd@LIBHX_3.27 4.7
- HXproc_wait@LIBHX_3.25 3.25
- LIBHX_3.25@LIBHX_3.25 3.25
- LIBHX_3.27@LIBHX_3.27 4.7
- LIBHX_4.11@LIBHX_4.11 4.12
- LIBHX_4.15@LIBHX_4.15 4.17
- LIBHX_4.16@LIBHX_4.16 4.17
- LIBHX_4.18@LIBHX_4.18 4.19
- LIBHX_4.2@LIBHX_4.2 4.7
- LIBHX_4.3@LIBHX_4.3 4.7
- LIBHX_4.9@LIBHX_4.9 4.10
diff --git a/debian/libhx32t64.dirs b/debian/libhx43t64.dirs
index 6845771..6845771 100644
--- a/debian/libhx32t64.dirs
+++ b/debian/libhx43t64.dirs
diff --git a/debian/libhx32t64.install b/debian/libhx43t64.install
index 3ddde58..3ddde58 100644
--- a/debian/libhx32t64.install
+++ b/debian/libhx43t64.install
diff --git a/debian/libhx43t64.symbols b/debian/libhx43t64.symbols
new file mode 100644
index 0000000..de19dcd
--- /dev/null
+++ b/debian/libhx43t64.symbols
@@ -0,0 +1,148 @@
+libHX.so.43 libhx43t64 #MINVER#
+* Build-Depends-Package: libhx-dev
+ HX_addrport_split@LIBHX_5.0 5.2
+ HX_basename@LIBHX_5.0 5.2
+ HX_basename_exact@LIBHX_5.0 5.2
+ HX_chomp@LIBHX_5.0 5.2
+ HX_copy_dir@LIBHX_5.0 5.2
+ HX_copy_file@LIBHX_5.0 5.2
+ HX_dirname@LIBHX_5.0 5.2
+ HX_dlclose@LIBHX_5.0 5.2
+ HX_dlerror@LIBHX_5.0 5.2
+ HX_dlopen@LIBHX_5.0 5.2
+ HX_dlsym@LIBHX_5.0 5.2
+ HX_drand@LIBHX_5.0 5.2
+ HX_exit@LIBHX_5.0 5.2
+ HX_ffs@LIBHX_5.0 5.2
+ HX_flpr@LIBHX_5.0 5.2
+ HX_flprf@LIBHX_5.0 5.2
+ HX_fls@LIBHX_5.0 5.2
+ HX_getcwd@LIBHX_5.0 5.2
+ HX_getl@LIBHX_5.0 5.2
+ HX_getopt6@LIBHX_5.0 5.2
+ HX_getopt6_clean@LIBHX_5.0 5.2
+ HX_getopt_help@LIBHX_5.0 5.2
+ HX_getopt_help_cb@LIBHX_5.0 5.2
+ HX_getopt_usage@LIBHX_5.0 5.2
+ HX_getopt_usage_cb@LIBHX_5.0 5.2
+ HX_hexdump@LIBHX_5.0 5.2
+ HX_inet_connect@LIBHX_5.0 5.2
+ HX_inet_listen@LIBHX_5.0 5.2
+ HX_init@LIBHX_5.0 5.2
+ HX_ipaddr_is_local@LIBHX_5.0 5.2
+ HX_irand@LIBHX_5.0 5.2
+ HX_local_listen@LIBHX_5.0 5.2
+ HX_memmem@LIBHX_5.0 5.2
+ HX_mkdir@LIBHX_5.0 5.2
+ HX_rand@LIBHX_5.0 5.2
+ HX_readlink@LIBHX_5.0 5.2
+ HX_realpath@LIBHX_5.0 5.2
+ HX_rrmdir@LIBHX_5.0 5.2
+ HX_sendfile@LIBHX_5.0 5.2
+ HX_shconfig@LIBHX_5.0 5.2
+ HX_shconfig_free@LIBHX_5.0 5.2
+ HX_shconfig_map@LIBHX_5.0 5.2
+ HX_shconfig_pv@LIBHX_5.0 5.2
+ HX_slurp_fd@LIBHX_5.0 5.2
+ HX_slurp_file@LIBHX_5.0 5.2
+ HX_sockaddr_is_local@LIBHX_5.0 5.2
+ HX_socket_from_env@LIBHX_5.0 5.2
+ HX_split@LIBHX_5.0 5.2
+ HX_split_fixed@LIBHX_5.0 5.2
+ HX_split_inplace@LIBHX_5.0 5.2
+ HX_strbchr@LIBHX_5.0 5.2
+ HX_strchr2@LIBHX_5.0 5.2
+ HX_strclone@LIBHX_5.0 5.2
+ HX_strdup@LIBHX_5.0 5.2
+ HX_strlcat@LIBHX_5.0 5.2
+ HX_strlcpy@LIBHX_5.0 5.2
+ HX_strlncat@LIBHX_5.0 5.2
+ HX_strlower@LIBHX_5.0 5.2
+ HX_strltrim@LIBHX_5.0 5.2
+ HX_strmid@LIBHX_5.0 5.2
+ HX_strndup@LIBHX_5.0 5.2
+ HX_strquote@LIBHX_5.0 5.2
+ HX_strrcspn@LIBHX_5.0 5.2
+ HX_strrev@LIBHX_5.0 5.2
+ HX_strrtrim@LIBHX_5.0 5.2
+ HX_strsep2@LIBHX_5.0 5.2
+ HX_strtod_unit@LIBHX_5.0 5.2
+ HX_strtoull8601p_sec@LIBHX_5.0 5.2
+ HX_strtoull_nsec@LIBHX_5.0 5.2
+ HX_strtoull_sec@LIBHX_5.0 5.2
+ HX_strtoull_unit@LIBHX_5.0 5.2
+ HX_strupper@LIBHX_5.0 5.2
+ HX_time_compare@LIBHX_5.0 5.2
+ HX_timespec_add@LIBHX_5.0 5.2
+ HX_timespec_isneg@LIBHX_5.0 5.2
+ HX_timespec_mul@LIBHX_5.0 5.2
+ HX_timespec_mulf@LIBHX_5.0 5.2
+ HX_timespec_neg@LIBHX_5.0 5.2
+ HX_timespec_sub@LIBHX_5.0 5.2
+ HX_timeval_sub@LIBHX_5.0 5.2
+ HX_unit_seconds@LIBHX_5.0 5.2
+ HX_unit_size@LIBHX_5.0 5.2
+ HX_unit_size_cu@LIBHX_5.0 5.2
+ HX_zvecfree@LIBHX_5.0 5.2
+ HXdeque_del@LIBHX_5.0 5.2
+ HXdeque_find@LIBHX_5.0 5.2
+ HXdeque_free@LIBHX_5.0 5.2
+ HXdeque_genocide2@LIBHX_5.0 5.2
+ HXdeque_get@LIBHX_5.0 5.2
+ HXdeque_init@LIBHX_5.0 5.2
+ HXdeque_move@LIBHX_5.0 5.2
+ HXdeque_pop@LIBHX_5.0 5.2
+ HXdeque_push@LIBHX_5.0 5.2
+ HXdeque_shift@LIBHX_5.0 5.2
+ HXdeque_to_vec@LIBHX_5.0 5.2
+ HXdeque_to_vecx@LIBHX_5.0 5.2
+ HXdeque_unshift@LIBHX_5.0 5.2
+ HXdir_close@LIBHX_5.0 5.2
+ HXdir_open@LIBHX_5.0 5.2
+ HXdir_read@LIBHX_5.0 5.2
+ HXformat_add@LIBHX_5.0 5.2
+ HXformat_aprintf@LIBHX_5.0 5.2
+ HXformat_fprintf@LIBHX_5.0 5.2
+ HXformat_free@LIBHX_5.0 5.2
+ HXformat_init@LIBHX_5.0 5.2
+ HXformat_sprintf@LIBHX_5.0 5.2
+ HXhash_djb2@LIBHX_5.0 5.2
+ HXhash_jlookup3@LIBHX_5.0 5.2
+ HXhash_jlookup3s@LIBHX_5.0 5.2
+ HXhash_primes@LIBHX_5.0 5.2
+ HXio_fullread@LIBHX_5.0 5.2
+ HXio_fullwrite@LIBHX_5.0 5.2
+ HXmap_add@LIBHX_5.0 5.2
+ HXmap_del@LIBHX_5.0 5.2
+ HXmap_find@LIBHX_5.0 5.2
+ HXmap_free@LIBHX_5.0 5.2
+ HXmap_get@LIBHX_5.0 5.2
+ HXmap_init5@LIBHX_5.0 5.2
+ HXmap_init@LIBHX_5.0 5.2
+ HXmap_keysvalues@LIBHX_5.0 5.2
+ HXmap_qfe@LIBHX_5.0 5.2
+ HXmap_traverse@LIBHX_5.0 5.2
+ HXmap_travfree@LIBHX_5.0 5.2
+ HXmap_travinit@LIBHX_5.0 5.2
+ HXmc_free@LIBHX_5.0 5.2
+ HXmc_length@LIBHX_5.0 5.2
+ HXmc_memcat@LIBHX_5.0 5.2
+ HXmc_memcpy@LIBHX_5.0 5.2
+ HXmc_memdel@LIBHX_5.0 5.2
+ HXmc_meminit@LIBHX_5.0 5.2
+ HXmc_memins@LIBHX_5.0 5.2
+ HXmc_mempcat@LIBHX_5.0 5.2
+ HXmc_setlen@LIBHX_5.0 5.2
+ HXmc_strcat@LIBHX_5.0 5.2
+ HXmc_strcpy@LIBHX_5.0 5.2
+ HXmc_strinit@LIBHX_5.0 5.2
+ HXmc_strins@LIBHX_5.0 5.2
+ HXmc_strpcat@LIBHX_5.0 5.2
+ HXmc_trunc@LIBHX_5.0 5.2
+ HXmc_zvecfree@LIBHX_5.0 5.2
+ HXproc_run_async@LIBHX_5.0 5.2
+ HXproc_run_sync@LIBHX_5.0 5.2
+ HXproc_switch_user@LIBHX_5.0 5.2
+ HXproc_top_fd@LIBHX_5.0 5.2
+ HXproc_wait@LIBHX_5.0 5.2
+ LIBHX_5.0@LIBHX_5.0 5.2
diff --git a/debian/rules b/debian/rules
index 97c42d7..615eb75 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,4 +22,4 @@ override_dh_makeshlibs:
override_dh_installdocs:
dh_installdocs -i -plibhx-doc --doc-main-package=libhx-doc
dh_installdocs -a -plibhx-dev
- dh_installdocs -a -plibhx32t64
+ dh_installdocs -a -plibhx43t64
diff --git a/debian/symbols b/debian/symbols
deleted file mode 100644
index 3bbd283..0000000
--- a/debian/symbols
+++ /dev/null
@@ -1,143 +0,0 @@
-libHX.so.28 libhx28 #MINVER#
- HX_basename@LIBHX_1.10.0 3.22
- HX_basename_exact@LIBHX_2.9 3.22
- HX_chomp@LIBHX_1.10.0 3.22
- HX_copy_dir@LIBHX_1.10.0 3.22
- HX_copy_file@LIBHX_1.10.0 3.22
- HX_diff_timespec@LIBHX_3.0 3.22
- HX_diff_timeval@LIBHX_3.0 3.22
- HX_dirname@LIBHX_1.10.0 3.22
- HX_dlclose@LIBHX_1.10.0 3.22
- HX_dlerror@LIBHX_1.10.0 3.22
- HX_dlopen@LIBHX_1.10.0 3.22
- HX_dlsym@LIBHX_1.10.0 3.22
- HX_drand@LIBHX_3.3 3.22
- HX_exit@LIBHX_3.4 3.22
- HX_ffs@LIBHX_1.10.0 3.22
- HX_fls@LIBHX_2.6 3.22
- HX_getl@LIBHX_1.25 3.22
- HX_getopt@LIBHX_1.10.0 3.22
- HX_getopt_help@LIBHX_1.10.0 3.22
- HX_getopt_help_cb@LIBHX_3.12 3.22
- HX_getopt_usage@LIBHX_1.10.0 3.22
- HX_getopt_usage_cb@LIBHX_3.12 3.22
- HX_hexdump@LIBHX_1.26 3.22
- HX_init@LIBHX_3.4 3.22
- HX_irand@LIBHX_1.10.0 3.22
- HX_memmem@LIBHX_3.4 3.22
- HX_mkdir@LIBHX_3.12 3.22
- HX_rand@LIBHX_1.10.0 3.22
- HX_readlink@LIBHX_3.10 3.22
- HX_realpath@LIBHX_3.10 3.22
- HX_rrmdir@LIBHX_1.10.0 3.22
- HX_shconfig@LIBHX_1.10.0 3.22
- HX_shconfig_free@LIBHX_1.10.0 3.22
- HX_shconfig_map@LIBHX_3.3 3.22
- HX_shconfig_pv@LIBHX_1.10.0 3.22
- HX_split4@LIBHX_2.2 3.22
- HX_split5@LIBHX_1.10.0 3.22
- HX_split@LIBHX_1.10.0 3.22
- HX_stpltrim@LIBHX_3.18 3.22
- HX_strbchr@LIBHX_1.10.0 3.22
- HX_strchr2@LIBHX_3.15 3.22
- HX_strclone@LIBHX_1.10.0 3.22
- HX_strdup@LIBHX_3.12 3.22
- HX_strlcat@LIBHX_3.12 3.22
- HX_strlcpy@LIBHX_3.12 3.22
- HX_strlncat@LIBHX_3.12 3.22
- HX_strlower@LIBHX_1.10.0 3.22
- HX_strltrim@LIBHX_1.10.0 3.22
- HX_strmid@LIBHX_1.10.0 3.22
- HX_strndup@LIBHX_3.12 3.22
- HX_strnlen@LIBHX_3.12 3.22
- HX_strquote@LIBHX_3.2 3.22
- HX_strrcspn@LIBHX_1.10.0 3.22
- HX_strrev@LIBHX_1.10.0 3.22
- HX_strrtrim@LIBHX_1.10.0 3.22
- HX_strsep2@LIBHX_1.10.0 3.22
- HX_strsep@LIBHX_1.10.0 3.22
- HX_strupper@LIBHX_1.10.0 3.22
- HX_time_compare@LIBHX_1.26 3.22
- HX_timespec_add@LIBHX_3.13 3.22
- HX_timespec_isneg@LIBHX_3.13 3.22
- HX_timespec_mul@LIBHX_3.13 3.22
- HX_timespec_mulf@LIBHX_3.13 3.22
- HX_timespec_neg@LIBHX_3.13 3.22
- HX_timespec_sub@LIBHX_3.13 3.22
- HX_timeval_sub@LIBHX_3.13 3.22
- HX_zvecfree@LIBHX_1.10.0 3.22
- HXdeque_del@LIBHX_1.10.0 3.22
- HXdeque_find@LIBHX_1.10.0 3.22
- HXdeque_free@LIBHX_1.10.0 3.22
- HXdeque_genocide2@LIBHX_3.3 3.22
- HXdeque_get@LIBHX_1.10.0 3.22
- HXdeque_init@LIBHX_1.10.0 3.22
- HXdeque_move@LIBHX_1.10.0 3.22
- HXdeque_pop@LIBHX_1.10.0 3.22
- HXdeque_push@LIBHX_1.10.0 3.22
- HXdeque_shift@LIBHX_1.10.0 3.22
- HXdeque_to_vec@LIBHX_1.10.0 3.22
- HXdeque_unshift@LIBHX_1.10.0 3.22
- HXdir_close@LIBHX_1.10.0 3.22
- HXdir_open@LIBHX_1.10.0 3.22
- HXdir_read@LIBHX_1.10.0 3.22
- HXformat_add@LIBHX_3.0 3.22
- HXformat_aprintf@LIBHX_3.12 3.22
- HXformat_fprintf@LIBHX_3.12 3.22
- HXformat_free@LIBHX_3.0 3.22
- HXformat_init@LIBHX_3.0 3.22
- HXformat_sprintf@LIBHX_3.12 3.22
- HXhash_djb2@LIBHX_3.0 3.22
- HXhash_jlookup3@LIBHX_3.0 3.22
- HXhash_jlookup3s@LIBHX_3.0 3.22
- HXhash_primes@LIBHX_3.0 3.22
- HXio_fullread@LIBHX_3.9 3.22
- HXio_fullwrite@LIBHX_3.9 3.22
- HXmap_add@LIBHX_3.0 3.22
- HXmap_del@LIBHX_3.0 3.22
- HXmap_find@LIBHX_3.0 3.22
- HXmap_free@LIBHX_3.0 3.22
- HXmap_get@LIBHX_3.0 3.22
- HXmap_init5@LIBHX_3.12 3.22
- HXmap_init@LIBHX_3.12 3.22
- HXmap_keysvalues@LIBHX_3.0 3.22
- HXmap_qfe@LIBHX_3.0 3.22
- HXmap_traverse@LIBHX_3.0 3.22
- HXmap_travfree@LIBHX_3.0 3.22
- HXmap_travinit@LIBHX_3.0 3.22
- HXmc_free@LIBHX_1.25 3.22
- HXmc_length@LIBHX_1.25 3.22
- HXmc_memcat@LIBHX_1.25 3.22
- HXmc_memcpy@LIBHX_1.25 3.22
- HXmc_memdel@LIBHX_1.25 3.22
- HXmc_meminit@LIBHX_1.25 3.22
- HXmc_memins@LIBHX_1.25 3.22
- HXmc_mempcat@LIBHX_1.25 3.22
- HXmc_setlen@LIBHX_2.0 3.22
- HXmc_strcat@LIBHX_1.25 3.22
- HXmc_strcpy@LIBHX_1.25 3.22
- HXmc_strinit@LIBHX_1.25 3.22
- HXmc_strins@LIBHX_1.25 3.22
- HXmc_strpcat@LIBHX_1.25 3.22
- HXmc_trunc@LIBHX_1.25 3.22
- HXmc_zvecfree@LIBHX_3.3 3.22
- HXproc_run_async@LIBHX_2.2 3.22
- HXproc_run_sync@LIBHX_2.2 3.22
- HXproc_wait@LIBHX_2.2 3.22
- LIBHX_1.10.0@LIBHX_1.10.0 3.22
- LIBHX_1.25@LIBHX_1.25 3.22
- LIBHX_1.26@LIBHX_1.26 3.22
- LIBHX_2.0@LIBHX_2.0 3.22
- LIBHX_2.2@LIBHX_2.2 3.22
- LIBHX_2.6@LIBHX_2.6 3.22
- LIBHX_2.9@LIBHX_2.9 3.22
- LIBHX_3.0@LIBHX_3.0 3.22
- LIBHX_3.10@LIBHX_3.10 3.22
- LIBHX_3.12@LIBHX_3.12 3.22
- LIBHX_3.13@LIBHX_3.13 3.22
- LIBHX_3.15@LIBHX_3.15 3.22
- LIBHX_3.18@LIBHX_3.18 3.22
- LIBHX_3.2@LIBHX_3.2 3.22
- LIBHX_3.3@LIBHX_3.3 3.22
- LIBHX_3.4@LIBHX_3.4 3.22
- LIBHX_3.9@LIBHX_3.9 3.22
diff --git a/debian/watch b/debian/watch
index b16de01..f812158 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,5 @@
+Version: 5
+
# watch control file for uscan
-version=4
-https://inai.de/files/libhx/libHX-(.*).tar.xz
+Source: https://inai.de/files/libhx/
+Matching-Pattern: libHX-(.*).tar.zst
diff --git a/doc/api.rst b/doc/api.rst
index 84feaa6..332fca9 100644
--- a/doc/api.rst
+++ b/doc/api.rst
@@ -4,12 +4,28 @@ Function reference
* R column: Recommend version number to use in ``PKG_CONFIG_CHECK`` in
projects using libHX. Includes important bugfixes.
* M column: Lowest possible version with the same ABI (minus cv qualification).
-* F column: First version that the function name was in use.
+* F column: First version that the symbol name was in use.
====== ====== ====== ========================================
RMV MinVer FirstA Name
====== ====== ====== ========================================
-4.18 4.18 4.18 HX_getopt5
+5.0 5.0 4.28 HXdeque_to_vecx
+5.2 4.28 4.28 HX_getopt6
+4.28 4.28 4.28 HX_getopt6_clean
+4.28 inline 4.28 HXOPT_CONST_INPUT
+4.28 inline 4.28 HXOPT_ITER_OPTS
+4.28 inline 4.28 HXOPT_ITER_ARGS
+4.28 inline 4.28 HXOPT_ITER_OA
+4.28 inline 4.28 HXOPT_DUP_ARGS
+4.28 4.28 4.28 HX_strtoull8601p_sec
+4.27 inline 4.27 float_cpu_to_{le,be}{32,64}p
+4.27 inline 4.27 float_{le,be}{32,64}p_to_cpu
+4.25 inline 4.25 HX_isascii
+4.25 inline 4.25 HX::make_scope_exit
+4.25 inline 4.25 cpu_to_le{16,32,64}p cpu_to_be{16,32,64}p
+4.25 inline 4.25 le{16,32,64}p_to_cpu be{16,32,64}p_to_cpu
+4.25 4.25 4.25 HXSIZEOF_UNITSEC64
+4.24 4.24 4.24 HX_getcwd
4.16 4.16 4.16 HX_strtoull_nsec
4.15 4.15 4.15 HX_flpr
4.15 4.15 4.15 HX_flprf
@@ -27,7 +43,6 @@ RMV MinVer FirstA Name
4.2 4.2 4.2 HX_unit_size_cu
4.2 4.2 4.2 HX_strtod_unit
4.2 4.2 4.2 HX_strtoull_unit
-3.27 3.27 3.27 HXOPT_KEEP_ARGV
3.27 3.27 3.27 HXproc_top_fd
3.27 3.27 3.27 HXproc_switch_user
3.27 3.27 3.27 HXPROC_SU_SUCCESS
@@ -41,10 +56,7 @@ RMV MinVer FirstA Name
3.27 3.27 3.27 HX_slurp_file
3.25 3.25 3.25 HX_split_fixed
3.25 3.25 3.25 HX_split_inplace
-3.22 3.22 3.22 HXQUOTE_SQLBQUOTE
3.21 3.21 3.21 xml_getnsprop
-3.19 3.19 3.19 HXQUOTE_SQLSQUOTE
-3.18 3.18 3.18 HX_stpltrim
3.17 3.17 3.17 HX_LONGLONG_FMT
3.17 3.17 3.17 HX_SIZET_FMT
3.16 3.16 3.16 container_of
@@ -67,7 +79,6 @@ RMV MinVer FirstA Name
3.13 3.13 3.13 HX_timeval_sub
3.12 3.12 1.10.0 HX_mkdir
3.12 3.12 3.12 HX_strndup
-3.12 3.12 3.12 HX_strnlen
3.12 3.0 3.0 HXMAP_CDATA
3.12 3.0 3.0 HXMAP_CKEY
3.12 3.0 3.0 HXMAP_SCDATA
@@ -79,9 +90,9 @@ RMV MinVer FirstA Name
3.12 3.12 3.12 HXOPT_ERR_SYS
3.12 3.12 3.12 HXOPTCB_BY_LONG
3.12 3.12 3.12 HXOPTCB_BY_SHORT
-3.12 3.0 1.10.0 HXformat_aprintf
-3.12 3.0 1.10.0 HXformat_fprintf
-3.12 3.0 1.10.0 HXformat_sprintf
+3.12 4.9 1.10.0 HXformat_aprintf / HXformat3_aprintf
+3.12 4.9 1.10.0 HXformat_fprintf / HXformat3_fprintf
+3.12 4.9 1.10.0 HXformat_sprintf / HXformat3_sprintf
3.11 3.11 3.11 HXQUOTE_BASE64
3.10 3.10 3.10 BUILD_BUG_ON_EXPR
3.10 3.10 3.10 HX_readlink
@@ -208,7 +219,7 @@ RMV MinVer FirstA Name
1.28 1.28 1.28 HXTYPE_UINT32
1.28 1.28 1.28 HXTYPE_UINT64
1.28 1.28 1.28 HXTYPE_UINT8
-1.26 1.26 1.26 HX_hexdump
+1.26 5.0 1.26 HX_hexdump
1.26 1.26 1.26 HX_time_compare
1.25 1.25 1.25 HX_getl
1.25 1.25 1.25 HXmc_free
@@ -258,7 +269,6 @@ RMV MinVer FirstA Name
1.10.0 1.10.0 1.10.0 HXOPT_AND
1.10.0 1.10.0 1.10.0 HXOPT_AUTOHELP
1.10.0 1.10.0 1.10.0 HXOPT_DEC
-1.10.0 1.10.0 1.10.0 HXOPT_DESTROY_OLD
1.10.0 1.10.0 1.10.0 HXOPT_ERR_MIS
1.10.0 1.10.0 1.10.0 HXOPT_ERR_UNKN
1.10.0 1.10.0 1.10.0 HXOPT_ERR_VOID
@@ -267,7 +277,6 @@ RMV MinVer FirstA Name
1.10.0 1.10.0 1.10.0 HXOPT_NOT
1.10.0 1.10.0 1.10.0 HXOPT_OPTIONAL
1.10.0 1.10.0 1.10.0 HXOPT_OR
-1.10.0 1.10.0 1.10.0 HXOPT_PTHRU
1.10.0 1.10.0 1.10.0 HXOPT_QUIET
1.10.0 1.10.0 1.10.0 HXOPT_TABLEEND
1.10.0 1.10.0 1.10.0 HXOPT_USAGEONERR
@@ -299,13 +308,10 @@ RMV MinVer FirstA Name
1.10.0 1.10.0 1.10.0 HX_dlerror
1.10.0 1.10.0 1.10.0 HX_dlopen
1.10.0 1.10.0 1.10.0 HX_dlsym
-1.10.0 1.10.0 1.10.0 HX_dlsym<>
-1.10.0 1.10.0 1.10.0 HX_getopt
1.10.0 1.10.0 1.10.0 HX_getopt_help
1.10.0 1.10.0 1.10.0 HX_getopt_usage
1.10.0 1.10.0 1.10.0 HX_irand
1.10.0 1.10.0 1.10.0 HX_memdup
-1.10.0 1.10.0 1.10.0 HX_memdup<>
1.10.0 1.10.0 1.10.0 HX_rand
1.10.0 1.10.0 1.10.0 HX_rrmdir
1.10.0 1.10.0 1.10.0 HX_shconfig_free
@@ -321,7 +327,6 @@ RMV MinVer FirstA Name
1.10.0 1.10.0 1.10.0 HX_strrcspn
1.10.0 1.10.0 1.10.0 HX_strrev
1.10.0 1.10.0 1.10.0 HX_strrtrim
-1.10.0 1.10.0 1.10.0 HX_strsep
1.10.0 1.10.0 1.10.0 HX_strsep2
1.10.0 1.10.0 1.10.0 HX_strupper
1.10.0 1.10.0 1.10.0 HX_zvecfree
@@ -334,8 +339,7 @@ RMV MinVer FirstA Name
1.10.0 1.10.0 1.10.0 HXdeque_pop
1.10.0 1.10.0 1.10.0 HXdeque_push
1.10.0 1.10.0 1.10.0 HXdeque_shift
-1.10.0 1.10.0 1.10.0 HXdeque_to_vec
-1.10.0 1.10.0 1.10.0 HXdeque_to_vec<>
+5.0 5.0 1.10.0 HXdeque_to_vec
1.10.0 1.10.0 1.10.0 HXdeque_unshift
1.10.0 1.10.0 1.10.0 SHCONF_ONE
====== ====== ====== ========================================
@@ -347,6 +351,7 @@ Struct reference
====== ====== ================================================
MinVer FirstA
====== ====== ================================================
+4.28 4.28 struct HXopt6_result
2.0 2.0 struct HXdeque_node.sptr
1.10.0 1.10.0 struct HXdeque_node
1.10.0 1.10.0 struct HXdeque
@@ -368,6 +373,12 @@ Header reference
====== ===================================
MinVer Name
====== ===================================
+4.27 endian_float.h
+4.25 endian.h
+4.25 scope.hpp
+4.18 cast.h
+4.0 socket.h
+3.25 intdiff.hpp
3.9 libHX/io.h
3.4 libHX/init.h
3.0 libHX/map.h
@@ -376,7 +387,7 @@ MinVer Name
2.0 libHX/ctype_helper.h
1.23 libHX/misc.h
1.23 libHX/defs.h
-1.22 libHX/xml_helper.h
+1.22 libHX/libxml_helper.h
1.15 libHX/string.h
1.15 libHX/option.h
1.15 libHX/list.h
diff --git a/doc/changelog.rst b/doc/changelog.rst
index f4bf0f1..6d399ae 100644
--- a/doc/changelog.rst
+++ b/doc/changelog.rst
@@ -1,3 +1,96 @@
+v5.2 (2025-10-19)
+=================
+
+Fixes:
+
+* Cure buffer overflows in HXdir_read, HX_getopt6 and a use-after-free
+ in conjunction with HX_getopt6's result struct.
+
+
+v5.1 (2025-10-11)
+=================
+
+Enhancements:
+
+* getopt6: ``HXTYPE_STRP`` can now be used for HXoption::type. This will
+ perform assignment without strdup.
+* io: handle undocumented return code from FreeBSD/OpenBSD mkdir("/")
+
+Fixes:
+
+* map: resolve corruption of HXmap::items field
+
+
+v5.0 (2025-10-01)
+=================
+
+Enhancements:
+
+* getopt6: new function set ``HX_getopt6`` which allows for parsing options
+ with an iterative style.
+* getopt6: the result set no longer forces strdup-ed results on the user.
+
+Changes:
+
+* Deleted functions ``HX_getopt``, ``HX_getopt5`` (use ``HX_getopt6`` instead),
+ ``HX_strnlen`` (use ``strnlen`` instead), ``HX_strsep`` (use ``strtok_r``
+ instead), ``HX_stpltrim`` (no replacement).
+* The struct members ``HXclist::items``, ``HXdeque::items``, ``HXmap::items``
+ have changed from ``unsigned int`` to ``size_t``. The function
+ ``HXdeque_to_vec`` has accordingly changed the result parameter type.
+
+
+v4.28 (2025-09-10)
+==================
+
+Enhancements:
+
+* string: make HX_strtoull_sec support some ISO 8601 periods
+* string: add function HX_strtoull8601p_sec
+* opt: new getopt API that facilitates iterating over options and non-options
+ and doing away with unnecessary memory allocations
+
+Changes:
+
+* opt: the implementation for the HXOPT_PTHRU flag was deleted (its use will
+ now be rejected by the parser)
+
+
+v4.27 (2025-03-17)
+==================
+
+Enhancements:
+
+* New header endian_float.h
+
+
+v4.26 (2025-03-08)
+==================
+
+Fixes:
+
+* Resolve integer truncation in HX_unit_seconds's output when the result
+ were to exceeded 2^32 years or months or weeks.
+
+
+v4.25 (2025-03-07)
+==================
+
+Enhancements:
+
+* New headers endian.h and scope.hpp
+* New define HXSIZEOF_UNITSEC64 for the maximum output size of HX_unit_seconds
+
+
+v4.24 (2024-07-17)
+==================
+
+Fixes:
+
+* io: resolve use-after-free and out-of-bounds writes in conjunction
+ with HX_realpath
+
+
v4.23 (2024-02-15)
==================
diff --git a/doc/files_and_dirs.rst b/doc/files_and_dirs.rst
index a18b5a4..a1d7090 100644
--- a/doc/files_and_dirs.rst
+++ b/doc/files_and_dirs.rst
@@ -57,9 +57,15 @@ Operation on directory entries
#include <libHX/io.h>
+ int HX_getcwd(hxmc_t **buf);
int HX_readlink(hxmc_t **buf, const char *path);
int HX_realpath(hxmc_t **buf, const char *path, unsigned int flags);
+``HX_getcwd`` is a length-agnostic version of getcwd. On error, a negative
+integer is returned indicating the errno; the contents of ``*buf`` are
+unspecified if that happens. On success, a non-zero positive integer is
+returned.
+
``HX_readlink`` calls through to readlink to read the target of a symbolic
link, and stores the result in the memory container referenced by ``*buf``
(similar to ``HX_getl`` semantics). If ``*buf`` is ``NULL``, a new container
@@ -91,7 +97,8 @@ actions:
The result is stored in a memory container whose pointer is returned through
``*buf``. The return value of the function will be negative to indicate a
-possible system error, or be positive non-zero for success.
+possible system error, or be positive non-zero for success. The contents of the
+buffer are unspecified in case HX_realpath returns an error.
Operations on directories
diff --git a/doc/helper_headers.rst b/doc/helper_headers.rst
index 7b4c083..05ded38 100644
--- a/doc/helper_headers.rst
+++ b/doc/helper_headers.rst
@@ -30,6 +30,7 @@ that there is a good reason to do so in the first place.
bool HX_isalnum(unsigned char c);
bool HX_isalpha(unsigned char c);
+ bool HX_isascii(unsigned char c);
bool HX_isdigit(unsigned char c);
bool HX_islower(unsigned char c);
bool HX_isprint(unsigned char c);
diff --git a/doc/inline_clist.rst b/doc/inline_clist.rst
index f7bf138..f0b7821 100644
--- a/doc/inline_clist.rst
+++ b/doc/inline_clist.rst
@@ -53,7 +53,7 @@ Synopsis
Removes the first node in the list and returns it.
``HXclist_del``
- Deletes the node from the list.
+ Unlinks the node from the list.
The list count in the clist head is updated whenever a modification is done on
the clist through these functions.
diff --git a/doc/inline_list.rst b/doc/inline_list.rst
index 3e4cb7c..a9dca65 100644
--- a/doc/inline_list.rst
+++ b/doc/inline_list.rst
@@ -80,7 +80,7 @@ Synopsis
Adds ``elem`` to the end of the list.
``HXlist_del``
- Deletes the given element from the list.
+ Unlinks the given element from the list.
``HXlist_empty``
Tests whether the list is empty. (Note: For clists, you could also use
diff --git a/doc/macros.rst b/doc/macros.rst
index 752f81e..efc5209 100644
--- a/doc/macros.rst
+++ b/doc/macros.rst
@@ -27,6 +27,13 @@ Expands to the size needed for a buffer (including ``\0``) to hold the base-10
string representation of 16‑, 32‑ or 64‑bit integer (either signed or
unsigned), respectively.
+.. code-block:: c
+
+ #define HXSIZEOF_UNITSEC64
+
+Expands to the size needed for a buffer (including ``\0``) to hold the largest
+result of ``HX_unit_seconds``.
+
Locators
========
diff --git a/doc/misc_functions.rst b/doc/misc_functions.rst
index c988f37..0d9e11e 100644
--- a/doc/misc_functions.rst
+++ b/doc/misc_functions.rst
@@ -36,7 +36,7 @@ Miscellaneous functions
.. code-block:: c
#include <libHX/io.h>
- void HX_hexdump(FILE *fp, const void *ptr, unsigned int len);
+ void HX_hexdump(FILE *fp, const void *ptr, size_t len);
``HX_hexdump``
Outputs a nice pretty-printed hex and ASCII dump to the filedescriptor
diff --git a/doc/option_parsing.rst b/doc/option_parsing.rst
index 2dced82..a824559 100644
--- a/doc/option_parsing.rst
+++ b/doc/option_parsing.rst
@@ -12,12 +12,11 @@ Characteristics:
* recognition of the double dash as option list terminator
* offers POSIX strictness where the option list terminates at the first
non-option argument
-* option passthrough
-* the parse function is one-shot; there is no context object (like popt),
- no global state (like getopt) and no ``while`` loop (either of the two others)
-* exclusively uses an option table
-* value storing is performed through pointers in the option table
-* or user-provided callbacks can be invoked per option
+* the parse function is one-shot; there is no state, just a result set
+* value storing is possible in different ways
+ * using pointers with type declarators in the option table
+ * with user-provided callbacks invoked per option
+ * by specifying the ITER_OPTS flag and iterating after HX_getopt6
Synopsis
@@ -37,7 +36,7 @@ Synopsis
const char *help, *htyp;
};
- int HX_getopt5(const struct HXoption *options_table, char **argv, int *new_argc, char ***new_argv, unsigned int flags);
+ int HX_getopt6(const struct HXoption *options_table, int argc, char **argv, struct HXopt6_result *result, unsigned int flags);
The various fields of ``struct HXoption`` are:
@@ -116,6 +115,29 @@ Type map
allocation so that subsequently modifying the original argument string
in any way will not falsely propagate.
+ HXTYPE_STRING is deprecated: When a user passes e.g. ``-S foo -S bar``
+ to HX_getopt, ptr would be assigned twice before control returns back
+ to the HX_getopt caller, thus leaking the memory for "foo" leaks. We
+ cannot retroactively make the assign routine call free(ptr) inbetween,
+ as some code might have assigned ptr a static buffer before the call to
+ HX_getopt, e.g.:
+
+ .. code-block:: c
+
+ char *p = "foo"; // default to foo
+ options_table[] = {
+ {0,'S',HXTYPE_STRING,&p,...},
+ };
+ HX_getopt(...);
+ // p is always valid, but may point to either static or allocated
+ // storage. [Also assumes a program that never frees these
+ // strings for brevity.]
+
+``HXTYPE_STRP``
+ The argument string pointer is stored in ``*(char **)ptr``.
+ No allocation occurs, but you are responsible for ensuring lifetime
+ adherence.
+
``HXTYPE_STRDQ``
The argument string is duplicated to a new memory region and the
resulting pointer is added to the given HXdeque. Note that you often
@@ -267,23 +289,23 @@ Invoking the parser
.. code-block:: c
- int HX_getopt5(const struct HXoption *options_table, char **argv, int *new_argc, char **new_argv, unsigned int flags);
- int HX_getopt(const struct HXoption *options_table, int *argc, char ***argv, unsigned int flags);
+ struct HXopt6_result {
+ int nargs;
+ const char **uarg;
+ char **dup_argv;
+ };
-``HX_getopt5`` is the central parsing function. ``options_table`` specifies
-the options that the parser will recognize. ``argv`` must be a NULL-terminated
-array of C strings.
+ int HX_getopt6(const struct HXoption *options_table, int argc, char **argv, struct HXopt6_result *result, unsigned int flags);
+ void HX_getopt6_clean(struct HXopt6_result *);
-If ``new_argv`` is non-NULL, the leftover arguments will be output as a new
-string vector on success. (That array can be freed with ``HX_zvecfree``). If
-``new_argc`` is non-NULL, the argument count for new_argv will be output too.
+``HX_getopt6`` is the central parsing function. ``options_table`` specifies the
+options that the parser will recognize. ``argv`` must be a vector of C strings,
+and ``argc`` be the count of strings that should be processed at most. ``argc``
+may be -1, in which case argc is auto-computed from ``argv``, and in this case,
+argv must be NULL-terminated.
The ``flags`` argument control the general behavior of ``HX_getopt``:
-``HXOPT_PTHRU``
- “Passthrough mode”. Any unknown options are passed through into
- ``new_argv``.
-
``HXOPT_QUIET``
Do not print any diagnostics when encountering errors in the user's
input.
@@ -298,12 +320,42 @@ The ``flags`` argument control the general behavior of ``HX_getopt``:
``HXOPT_RQ_ORDER``
Specifying this option terminates option processing when the first
non-option argument in argv is encountered. This behavior is also
- implicit when the environment variable ``POSIXLY_CORRECT`` is set.
-
-``HXOPT_KEEP_ARGV``
- Do not set ``*new_argc`` and ``*new_argv`` at all.
-
-The return value can be one of the following:
+ implicit when the environment variable ``POSIXLY_CORRECT`` is set
+ (and ``HXOPT_ANY_ORDER`` is not used).
+
+``HXOPT_ANY_ORDER``
+ Specifying this option allows mixing of options and non-options,
+ basically the opposite of the strict POSIX order.
+
+``HXOPT_CONST_INPUT``
+ Declaration by the user that elements in input argv must *not* be
+ reordered by the parser.
+
+``HXOPT_ITER_OPTS``
+ ``result->desc`` will be filled with pointers to the definitions of the
+ parsed options. ``result->oarg`` will be filled with pointers to the
+ option argument strings (potentially %nullptr if the option did not
+ take anything). ``result->nopts`` will be filled with the option count.
+
+``HXOPT_ITER_ARGS``
+ ``result->uarg`` will be filled with pointers to leftover arguments
+ (pointing into the memory regions of the original argv), and
+ ``result->nargs`` will contain the string count. uarg does *not*
+ contain NULL sentinel, so you cannot iterate with something like ``for
+ (const char **p = result.uarg; p != nullptr && *p != nullptr; ++p)``
+ but must use ``for (int uidx = 0; uidx < result.nargs; ++uidx)``.
+
+``HXOPT_ITER_OA``
+ Shortcut for ``HXOPT_ITER_OPTS | HXOPT_ITER_ARGS``.
+
+``HXOPT_DUP_ARGS``
+ ``result->dup_argv`` will be filled with copies of leftover arguments,
+ and ``result->nargs`` will contain the string count. dup_argv will
+ include the original argv[0]. dup_argv will also include a NULL
+ sentinel (not counted in nargs). You can move ``dup_argv`` out of the
+ result struct and free it yourself with ``HX_zvecfree`.
+
+The return value of HX_getopt6 can be one of the following:
``HXOPT_ERR_SUCCESS``
Parsing was successful.
@@ -324,17 +376,15 @@ The return value can be one of the following:
``HXOPT_ERR_AMBIG``
An abbreviation of a long option was ambiguous.
+``HXOPT_ERR_FLAGS``
+ HX_getopt6 was called with a ``flags`` value that contained illegal or
+ silly bit combinations.
+
negative non-zero
Failure on behalf of lower-level calls; errno.
-``HX_getopt`` is an older API where ``argv`` is both used for input and output.
-It recognizes additional flags/has additional behavior:
-
-``HXOPT_KEEP_ARGV``
- ``argc`` and ``argv`` is not updated.
-
-``HXOPT_DESTROY_OLD``
- Call ``HX_zvecfree`` on ``argv`` before updating it.
+Upon HXOPT_ERR_SUCCESS, ``HX_getopt6_clean`` must be called to release
+resources.
Pitfalls
@@ -357,11 +407,12 @@ The following is an example of a possible pitfall regarding ``HXTYPE_STRDQ``:
.help = "Add name"},
HXOPT_TABLEEND,
};
- if (HX_getopt5(options_table, *argv, &argc, &argv,
+ struct HXopt6_result result;
+ if (HX_getopt6(options_table, -1, *argv, &result,
HXOPT_USAGEONERR) != HXOPT_ERR_SUCCESS)
return EXIT_FAILURE;
/* ... */
- HX_zvecfree(argv);
+ HX_getopt6_clean(&result);
return EXIT_SUCCESS;
}
@@ -378,38 +429,32 @@ Limitations
The HX option parser has been influenced by both popt and Getopt::Long, but
eventually, there are differences:
-* Long options with a single dash (``-foo bar``). This unsupported
- syntax clashes easily with support for option bundling or squashing. In case
- of bundling, ``-foo`` might actually be ``-f -o -o``, or ``-f oo`` in case of
- squashing. It also introduces redundant ways to specify options, which is not
- in the spirit of the author.
+* Long options with a single dash (``-foo bar``) are not supported in HXopt.
+ This syntax clashes easily with support for option bundling or squashing. In
+ case of bundling, ``-foo`` might actually be ``-f -o -o``, or ``-f oo`` in
+ case of squashing. It also introduces redundant ways to specify options,
+ which is not in the spirit of the author.
-* Options using a ``+`` as a prefix, as in ``+foo``. Xterm for
- example uses it as a way to negate an option. In the author's opinion, using
- one character to specify options is enough — by GNU standards, a negator is
- named ``--no-foo``.
+* Options using a ``+`` as a prefix, as in ``+foo`` are not supported in HXopt.
+ Xterm for example uses it as a way to negate an option. In the author's
+ opinion, using one character to specify options is enough — by GNU standards,
+ a negator is named ``--no-foo``.
-* Table nesting like implemented in popt. HXopt has no provision for nested
- tables, as the need has not come up yet. It does however support chained
- processing. You cannot do nested tables even with callbacks, as the new argv
- array is only put in place shortly before ``HX_getopt`` returns.
+* Table nesting (like in popt) is not supported in HXopt. The need
+ has not come up yet. It does however support some forms of chained
+ processing, e.g. by using the option terminator, "--".
Examples
========
-Basic example
--------------
-
-The following code snippet should provide an equivalent of the
-GNU getopt sample.[#f5]
-
-.. [#f5] http://www.gnu.org/software/libtool/manual/libc/Example-of-Getopt.html\#Example-of-Getopt
+Storing through pointers
+------------------------
.. code-block:: c
#include <stdio.h>
- #include <stdilb.h>
+ #include <stdlib.h>
#include <libHX/option.h>
int main(int argc, char **argv)
@@ -417,7 +462,6 @@ GNU getopt sample.[#f5]
int aflag = 0;
int bflag = 0;
char *cflag = NULL;
-
struct HXoption options_table[] = {
{.sh = 'a', .type = HXTYPE_NONE, .ptr = &aflag},
{.sh = 'b', .type = HXTYPE_NONE, .ptr = &bflag},
@@ -426,20 +470,121 @@ GNU getopt sample.[#f5]
HXOPT_TABLEEND,
};
- if (HX_getopt5(options_table, argv, &argc, &argv,
- HXOPT_USAGEONERR) != HXOPT_ERR_SUCCESS)
+ if (HX_getopt6(options_table, argc, argv, nullptr,
+ HXOPT_USAGEONERR) != HXOPT_ERR_SUCCESS) {
+ free(cflag);
return EXIT_FAILURE;
+ }
printf("aflag = %d, bflag = %d, cvalue = %s\n",
- aflag, bflag, cvalue);
+ aflag, bflag, cflag != NULL ? cflag : "(null)");
+ free(cflag);
+ return EXIT_SUCCESS;
+ }
+
+Note how HXTYPE_STRING in conjunction with ``.ptr=&cflag`` will allocate a
+buffer that needs to be freed.
+
+Storing via iteration
+---------------------
+
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <libHX/option.h>
- while (*++argv != NULL)
- printf("Non-option argument %s\n", *argv);
+ int main(int argc, char **argv)
+ {
+ int aflag = 0;
+ int bflag = 0;
+ char *cflag = NULL;
+ struct HXoption options_table[] = {
+ {.sh = 'a', .type = HXTYPE_NONE},
+ {.sh = 'b', .type = HXTYPE_NONE},
+ {.sh = 'c', .type = HXTYPE_STRING},
+ HXOPT_AUTOHELP,
+ HXOPT_TABLEEND,
+ };
+
+ struct HXopt6_result result;
+ if (HX_getopt6(options_table, argc, argv, &result,
+ HXOPT_USAGEONERR | HXOPT_ITER_OPTS) != HXOPT_ERR_SUCCESS)
+ return EXIT_FAILURE;
+ for (int i = 1; i < result.nopts; ++i) {
+ switch (result.desc[i]->sh) {
+ case 'a':
+ aflag = 1;
+ break;
+ case 'b':
+ bflag = 1;
+ break;
+ case 'c':
+ cflag = result.oarg[i];
+ break;
+ }
+ }
+ printf("aflag = %d, bflag = %d, cvalue = %s\n",
+ aflag, bflag, cflag ? cflag : "(null)");
+ HX_getopt6_clean(&result);
+ return EXIT_SUCCESS;
+ }
+
+Note that the pointers in ``oarg`` point to the original argv and so should not
+be freed. Upon success of HX_getopt6, HX_getopt6_clean must be called.
+
+Obtaining non-option arguments
+------------------------------
+
+.. code-block:: c
+
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <libHX/option.h>
+
+ int main(int argc, char **argv)
+ {
+ int aflag = 0;
+ int bflag = 0;
+ char *cflag = NULL;
+ struct HXoption options_table[] = {
+ {.sh = 'a', .type = HXTYPE_NONE, .ptr = &aflag},
+ {.sh = 'b', .type = HXTYPE_NONE, .ptr = &bflag},
+ {.sh = 'c', .type = HXTYPE_STRING, .ptr = &cflag},
+ HXOPT_AUTOHELP,
+ HXOPT_TABLEEND,
+ };
- HX_zvecfree(argv);
+ struct HXopt6_result result;
+ if (HX_getopt6(options_table, argc, argv, &result,
+ HXOPT_USAGEONERR | HXOPT_ITER_ARGS) != HXOPT_ERR_SUCCESS) {
+ free(cflag);
+ return EXIT_FAILURE;
+ }
+ printf("aflag = %d, bflag = %d, cvalue = %s\n",
+ aflag, bflag, cflag);
+ for (int i = 1; i < result.nargs; ++i)
+ printf("Non-option argument %s\n", result.uarg[i]);
+ free(cflag);
+ HX_getopt6_clean(&result);
return EXIT_SUCCESS;
}
+C++ extension
+-------------
+
+.. code-block:: c++
+
+ {
+ struct HXopt6_auto_result result;
+ auto ret = HX_getopt6(&table, argc, argv, &result,
+ HXOPT_USAGEONERR | HXOPT_ITER_ARGS);
+ if (ret != HXOPT_ERR_SUCCESS)
+ return ret;
+ }
+
+
+For C++ mode, a struct "HXopt6_auto_result" is offered with a constructor for
+zero initialization and a destructor invoking HX_getopt6_clean.
+
Verbosity levels
----------------
@@ -503,8 +648,8 @@ Mask operations
What this options table does is ``cpu_mask &= ~x`` and ``net_mask |= y``, the
classic operations of clearing and setting bits.
-Support for non-standard actions
---------------------------------
+Callbacks
+---------
Supporting additional types or custom storage formats is easy, by simply using
``HXTYPE_STRING``, ``NULL`` as the data pointer (usually by not specifying it
@@ -538,53 +683,3 @@ the callback function in ``cb``.
.uptr = &number, .help = "Do this or that",
HXOPT_TABLEEND,
};
-
-Chained argument processing
----------------------------
-
-On the first run, only ``--cake`` and ``--fruit`` is considered, which is then
-used to select the next set of accepted options.
-
-.. code-block:: c
-
- static int get_cakes(int *argc, char ***argv)
- {
- struct HXoption cake_table[] = {
- ...
- };
- if (HX_getopt5(cake_table, *argv, &argc, &argv,
- HXOPT_USAGEONERR) != HXOPT_ERR_SUCCESS)
- return EXIT_FAILURE;
- /* ... */
- HX_zvecfree(argv);
- return EXIT_SUCCESS;
- }
-
- static int fruit_main(int argc, char **argv)
- {
- struct HXoption fruit_table[] = {
- ...
- };
- if (HX_getopt5(fruit_table, *argv, &argc, &argv,
- HXOPT_PTHRU) != HXOPT_ERR_SUCCESS)
- return EXIT_FAILURE;
- /* ... */
- HX_zvecfree(argv);
- return EXIT_SUCCESS;
- }
-
- int main(int argc, char **argv)
- {
- int cake = 0, fruit = 0;
- struct HXoption option_table[] = {
- {.ln = "cake", .type = HXTYPE_NONE, .ptr = &cake},
- {.ln = "fruit", .type = HXTYPE_NONE, .ptr = &fruit},
- HXOPT_TABLEEND,
- };
- if (HX_getopt5(option_table, *argv, &argc, &argv,
- HXOPT_PTHRU) != HXOPT_ERR_SUCCESS)
- return EXIT_FAILURE;
- int ret = cake ? cake_main(argc, argv) : fruit_main(argc, argv);
- HX_zvecfree(argv);
- return EXIT_FAILURE;
- }
diff --git a/doc/scope.rst b/doc/scope.rst
new file mode 100644
index 0000000..84ad69b
--- /dev/null
+++ b/doc/scope.rst
@@ -0,0 +1,22 @@
+============
+Scope guards
+============
+
+``scope_exit``
+==============
+
+scope_exit creates an object that runs a predefined function when a scope ends.
+This is useful for augmenting C APIs with something of a destructor without
+wrapping the stuff in an explicit class of its own. For instance,
+
+.. code-block:: c++
+
+ #include <libHX/option.h>
+ #include <libHX/scope.hpp>
+ int main() {
+ auto fa = HXformat_init();
+ if (fa == nullptr)
+ return 0;
+ auto cleanup_fa = HX::make_scope_exit([&]() { HXformat_free(fa); });
+ HXformat_add(fa, "foo", "bar", HXTYPE_STRING);
+ }
diff --git a/doc/string_ops.rst b/doc/string_ops.rst
index 91da2f6..ab7f19b 100644
--- a/doc/string_ops.rst
+++ b/doc/string_ops.rst
@@ -102,7 +102,6 @@ In-place transformations
char *HX_chomp(char *s);
size_t HX_strltrim(char *s);
- char *HX_stpltrim(const char *s);
char *HX_strlower(char *s);
char *HX_strrev(char *s);
size_t HX_strrtrim(char *s);
@@ -117,9 +116,6 @@ In-place transformations
on the left edge of the string. Returns the number of characters that
were stripped.
-``HX_stpltrim``
- Returns a pointer to the first non-whitespace character in ``s``.
-
``HX_strlower``
Transforms all characters in the string ``s`` into lowercase using
``tolower``(3). Returns the original argument.
@@ -184,18 +180,6 @@ Possible values for type:
``HXQUOTE_URIENC``
Escapes the string so that it becomes a valid part for an URI.
-``HXQUOTE_SQLSQUOTE``
- Escapes all single quotes in the string by double single-quotes, as
- required for using it in a single-quoted SQL string. No surrounding
- quotes will be generated to facilitate concatenating of HX_strquote
- results.
-
-``HXQUOTE_SQLBQUOTE``
- Escape all backticks in the string by double backticks, as required for
- using it in a backtick-quoted SQL string (used for table names and
- columns). No surrounding ticks will be generated to facilitate
- concatenation.
-
.. _RFC 4514: http://tools.ietf.org/html/rfc4514
.. _RFC 4515: http://tools.ietf.org/html/rfc4515
.. _RFC 4648: http://tools.ietf.org/html/rfc4648
@@ -246,7 +230,6 @@ Tokenizing
char **HX_split(const char *s, const char *delimiters, size_t *fields, int max);
char **HX_split_inplace(char *s, const char *delimiters, int *fields, int max);
int HX_split_fixed(char *s, const char *delimiters, int max, char **arr);
- char *HX_strsep(char **sp, const char *delimiters);
char *HX_strsep2(char **sp, const char *dstr);
``HX_split``
@@ -277,20 +260,15 @@ Tokenizing
.. [#fixfoot] An implementation may however decide to put ``NULL`` in the
unassigned fields, but this is implementation-dependent.
-``HX_strsep``
- Extract tokens from a string. This implementation of strsep has been
- added since the function is non-standard (according to the manpage,
- conforms to BSD4.4 only) and may not be available on every operating
- system. This function extracts tokens, separated by one of the
- characters in ``delimiters``. The string is modified in-place and thus
- must be mutable. The delimiters in the string are then overwritten with
- ``'\0'``, ``*sp`` is advanced to the character after the delimiter, and
- the original pointer is returned. After the final token, ``HX_strsep``
- will return ``NULL``.
-
``HX_strsep2``
- Like ``HX_strsep``, but ``dstr`` is not an array of delimiting
- characters, but an entire substring that acts as one delimiter.
+ strsep is a string tokenization function from BSD4.4; the POSIX
+ replacement is
+
+ strsep(&string, delim) <=>
+ strtok_r(nullptr, delim, &string).
+
+ Whereas strsep/strtok would split on any character in ``delim``,
+ our strsep2 splits only on the entire ``delim`` string.
Size-bounded string operations
@@ -303,7 +281,6 @@ Size-bounded string operations
char *HX_strlcat(char *dest, const char *src, size_t length);
char *HX_strlcpy(char *dest, const char *src, size_t length);
char *HX_strlncat(char *dest, const char *src, size_t dlen, size_t slen);
- size_t HX_strnlen(const char *src, size_t max);
``HX_strlcat`` and ``HX_strlcpy`` provide implementations of the
BSD-originating ``strlcat``(3) and ``strlcpy``(3) functions. ``strlcat`` and
@@ -312,10 +289,6 @@ they always take the length of the entire buffer specified by ``dest``, instead
of just the length that is to be written. The functions guarantee that the
buffer is ``'\0'``-terminated.
-``HX_strnlen`` will return the length of the input string or the upper bound
-given by ``max``, whichever is less. It will not attempt to access more than
-this many bytes in the input buffer.
-
Allocation-related
==================
@@ -462,7 +435,7 @@ Conversion from/to human-readable durations with units
unsigned int flags);
``HX_strtoull_sec`` and ``HX_strtoull_nsec`` convert a time duration with
-units, such as ``"15min30s"`` into an all-seconds and all-nanoseconds value,
+units, such as ``15min30s`` into an all-seconds and all-nanoseconds value,
respectively. The recognized unit strings are: ``years``, ``year``, ``y``,
``months``, ``month``, ``days``, ``day``, ``d``, ``hours``, ``hour``, ``h``,
``minutes``, ``minute``, ``min``, ``seconds``, ``second``, ``s``, the empty
@@ -471,14 +444,24 @@ string (to mean seconds), ``msec``, ``ms``, ``µsec``, ``µs``, ``nsec`` and
implementation-defined. When parsing stops at any point, ``*end`` is set to the
location, similar to how the ``strtoull`` C function would.
-One year is defined to be 365.25 days of 86400 seconds; one month is defined to
-be 1/12 such a year. This is consistent with the units employed by systemd.
+One day is defined as 86400 seconds. One year is defined to be 365.25 days of
+86400 seconds. One month is defined to be 1/12 such a year (30.4375 days). This
+is consistent with the units employed by systemd.
+
+In addition, HX_strtoull_sec recognizes the most common ISO 8601-style period
+syntax, e.g. ``PT15M30S``. Time lengths are applied as mentioned above, so
+``P1M`` is treated as 2629800 seconds, *not* as a "calendaric month" that would
+expand to 28—31 days relative to some start date. There is no function offered
+to return a ``struct tm``.
``HX_unit_seconds`` is the reverse and transforms the duration given by
``seconds`` into a string representation broken into days, hours, minutes, and
remaining seconds as appropriate. By default, only the d/h/min/s units are
emitted. The ``flags`` argument specifies if any other units should be emitted;
-``HXUNIT_YEARS``, ``HXUNIT_MONTHS`` and ``HXUNIT_WEEKS`` are available.
+``HXUNIT_YEARS``, ``HXUNIT_MONTHS`` and ``HXUNIT_WEEKS`` are available. The
+longest string HX_unit_seconds can emit on a contemporary 64-bit POSIX system
+with 1970 epoch is 40 characters (so a buffer should be no less than 41 bytes),
+cf. ``HXSIZEOF_UNITSEC64``.
Examples
@@ -552,21 +535,3 @@ full-fledged ``HX_split`` that allocates space for each substring.
callme(line);
HX_zvecfree(field);
}
-
-Using HX_strsep
----------------
-
-``HX_strsep`` provides for thread- and reentrant-safe tokenizing a string where
-strtok from the C standard would otherwise fail.
-
-.. code-block:: c
-
- #include <stdio.h>
- #include <libHX/string.h>
-
- char line[] = "root:x:0:0:root:/root:/bin/bash";
- char *wp, *p;
-
- wp = line;
- while ((p = HX_strsep(&wp, ":")) != NULL)
- printf("%s\n", p)
diff --git a/include/Makefile.am b/include/Makefile.am
index 62ad527..e3d3f86 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,7 +1,9 @@
# -*- Makefile -*-
nobase_include_HEADERS = libHX.h libHX/cast.h \
- libHX/ctype_helper.h libHX/defs.h libHX/deque.h libHX/init.h \
+ libHX/ctype_helper.h libHX/defs.h libHX/deque.h \
+ libHX/endian.h libHX/endian_float.h libHX/init.h \
libHX/intdiff.hpp libHX/io.h libHX/list.h \
- libHX/map.h libHX/misc.h libHX/option.h libHX/proc.h libHX/socket.h libHX/string.h \
+ libHX/map.h libHX/misc.h libHX/option.h libHX/proc.h \
+ libHX/scope.hpp libHX/socket.h libHX/string.h \
libHX/libxml_helper.h libHX/wx_helper.hpp
diff --git a/include/Makefile.in b/include/Makefile.in
index 8e02ba6..3f3227d 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2021 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,
@@ -72,6 +72,8 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+am__rm_f = rm -f $(am__rm_f_notfound)
+am__rm_rf = rm -rf $(am__rm_f_notfound)
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -145,10 +147,9 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
+ { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
}
am__installdirs = "$(DESTDIR)$(includedir)"
HEADERS = $(nobase_include_HEADERS)
@@ -252,8 +253,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__rm_f_notfound = @am__rm_f_notfound@
am__tar = @am__tar@
am__untar = @am__untar@
+am__xargs_n = @am__xargs_n@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@@ -304,9 +307,11 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
nobase_include_HEADERS = libHX.h libHX/cast.h \
- libHX/ctype_helper.h libHX/defs.h libHX/deque.h libHX/init.h \
+ libHX/ctype_helper.h libHX/defs.h libHX/deque.h \
+ libHX/endian.h libHX/endian_float.h libHX/init.h \
libHX/intdiff.hpp libHX/io.h libHX/list.h \
- libHX/map.h libHX/misc.h libHX/option.h libHX/proc.h libHX/socket.h libHX/string.h \
+ libHX/map.h libHX/misc.h libHX/option.h libHX/proc.h \
+ libHX/scope.hpp libHX/socket.h libHX/string.h \
libHX/libxml_helper.h libHX/wx_helper.hpp
all: all-am
@@ -423,6 +428,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
@@ -487,8 +493,8 @@ mostlyclean-generic:
clean-generic:
distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -$(am__rm_f) $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -581,3 +587,10 @@ uninstall-am: uninstall-nobase_includeHEADERS
# 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:
+
+# Tell GNU make to disable its built-in pattern rules.
+%:: %,v
+%:: RCS/%,v
+%:: RCS/%
+%:: s.%
+%:: SCCS/s.%
diff --git a/include/libHX/ctype_helper.h b/include/libHX/ctype_helper.h
index 2ba0a7a..0f42c4f 100644
--- a/include/libHX/ctype_helper.h
+++ b/include/libHX/ctype_helper.h
@@ -39,6 +39,11 @@ static __inline__ bool HX_isalpha(unsigned char c)
return isalpha(c);
}
+static __inline__ bool HX_isascii(unsigned char c)
+{
+ return isascii(c);
+}
+
static __inline__ bool HX_isdigit(unsigned char c)
{
return isdigit(c);
diff --git a/include/libHX/defs.h b/include/libHX/defs.h
index ba84b37..638ec15 100644
--- a/include/libHX/defs.h
+++ b/include/libHX/defs.h
@@ -12,7 +12,16 @@
# ifndef containerof
# include <cstddef>
# include <type_traits>
-# define containerof(var, T, member) reinterpret_cast<std::conditional<std::is_const<std::remove_pointer<decltype(var)>::type>::value, std::add_const<T>::type, T>::type *>(reinterpret_cast<std::conditional<std::is_const<std::remove_pointer<decltype(var)>::type>::value, const char, char>::type *>(var) - offsetof(T, member))
+namespace {
+template<typename Dst, typename Src> static inline auto containerof_cxx(Src *var, size_t ofs)
+{
+ using K = typename std::is_const<typename std::remove_pointer<Src>::type>;
+ using Ch = typename std::conditional<K::value, const char, char>::type;
+ using D2 = typename std::conditional<K::value, const Dst, Dst>::type;
+ return reinterpret_cast<D2 *>(reinterpret_cast<Ch *>(var) - ofs);
+}
+}
+# define containerof(var, D1, member) containerof_cxx<D1>(var, offsetof(D1, member))
# endif
#else
# define HXsizeof_member(type, member) sizeof(((type *)NULL)->member)
@@ -86,6 +95,7 @@
#define HXSIZEOF_Z32 sizeof("-4294967296")
/* 2^64 and -2^63 have same length */
#define HXSIZEOF_Z64 sizeof("18446744073709551616")
+#define HXSIZEOF_UNITSEC64 sizeof("584542046089y11months2weeks2d23h59min59s")
#define __HX_STRINGIFY_EXPAND(s) #s
#define HX_STRINGIFY(s) __HX_STRINGIFY_EXPAND(s)
diff --git a/include/libHX/deque.h b/include/libHX/deque.h
index f43def9..11fdd2a 100644
--- a/include/libHX/deque.h
+++ b/include/libHX/deque.h
@@ -25,7 +25,7 @@ struct HXdeque {
struct HXdeque_node *first;
void *ptr;
struct HXdeque_node *last;
- unsigned int items;
+ size_t items;
};
extern struct HXdeque *HXdeque_init(void);
@@ -39,7 +39,8 @@ extern void *HXdeque_get(struct HXdeque *, const void *);
extern void *HXdeque_del(struct HXdeque_node *);
extern void HXdeque_free(struct HXdeque *);
extern void HXdeque_genocide2(struct HXdeque *, void (*)(void *));
-extern void **HXdeque_to_vec(const struct HXdeque *, unsigned int *);
+extern void **HXdeque_to_vec(const struct HXdeque *, size_t *);
+extern void **HXdeque_to_vecx(const struct HXdeque *, size_t *);
static __inline__ void HXdeque_genocide(struct HXdeque *dq)
{
@@ -48,39 +49,6 @@ static __inline__ void HXdeque_genocide(struct HXdeque *dq)
#ifdef __cplusplus
} /* extern "C" */
-
-extern "C++" {
-
-template<typename type> static __inline__ type HXdeque_pop(struct HXdeque *dq)
-{
- return reinterpret_cast<type>(HXdeque_pop(dq));
-}
-
-template<typename type> static __inline__ type
-HXdeque_shift(struct HXdeque *dq)
-{
- return reinterpret_cast<type>(HXdeque_shift(dq));
-}
-
-template<typename type> static __inline__ type
-HXdeque_get(struct HXdeque *dq, const void *ptr)
-{
- return reinterpret_cast<type>(HXdeque_get(dq, ptr));
-}
-
-template<typename type> static __inline__ type
-HXdeque_del(struct HXdeque_node *nd)
-{
- return reinterpret_cast<type>(HXdeque_del(nd));
-}
-
-template<typename type> static __inline__ type *
-HXdeque_to_vec(struct HXdeque *dq, unsigned int *n)
-{
- return reinterpret_cast<type *>(HXdeque_to_vec(dq, n));
-}
-
-} /* extern "C++" */
#endif
#endif /* _LIBHX_DEQUE_H */
diff --git a/include/libHX/endian.h b/include/libHX/endian.h
new file mode 100644
index 0000000..b1a4b6a
--- /dev/null
+++ b/include/libHX/endian.h
@@ -0,0 +1,202 @@
+#ifndef _LIBHX_ENDIAN_H
+#define _LIBHX_ENDIAN_H 1
+/*
+ * See <https://commandcenter.blogspot.com/2012/04/byte-order-fallacy.html>.
+ *
+ * be16p_to_cpu not optimized on LE before gcc-10.
+ * le16p_to_cpu not optimized away on LE before gcc-10.
+ * cpu_to_be{16,32,64}p not optimized on LE before gcc-8.
+ * cpu_to_le{16,32,64}p not optimized away on LE before gcc-8.
+ * cpu_to_le{16,32,64} not optimized away on LE before gcc-8.
+ * cpu_to_be16 not optimized on LE before gcc-9.
+ * cpu_to_be{32,64} not optimized on LE before gcc-8.
+ * be64_to_cpu not optimized on LE before gcc-10.
+ */
+#include <stdint.h>
+#ifndef LIBHX_DBG_INLINE
+# define LIBHX_DBG_INLINE static inline
+#endif
+#if !defined(LIBHX_OPT_O2) && defined(__GNUC__) && !defined(__clang__) && !defined(__llvm__)
+# define LIBHX_OPT_O2 __attribute__((optimize("-O2")))
+#else
+# define LIBHX_OPT_O2
+#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+LIBHX_DBG_INLINE uint16_t LIBHX_OPT_O2 be16p_to_cpu(const void *p)
+{
+ const uint8_t *q = (const uint8_t *)p;
+ typedef uint16_t T;
+ return (T)q[1] | ((T)q[0] << 8);
+}
+
+LIBHX_DBG_INLINE uint16_t LIBHX_OPT_O2 le16p_to_cpu(const void *p)
+{
+ const uint8_t *q = (const uint8_t *)p;
+ typedef uint16_t T;
+ return (T)q[0] | ((T)q[1] << 8);
+}
+
+LIBHX_DBG_INLINE uint32_t LIBHX_OPT_O2 be32p_to_cpu(const void *p)
+{
+ const uint8_t *q = (const uint8_t *)p;
+ typedef uint32_t T;
+ return (T)q[3] | ((T)q[2] << 8) | ((T)q[1] << 16) | ((T)q[0] << 24);
+}
+
+LIBHX_DBG_INLINE uint32_t LIBHX_OPT_O2 le32p_to_cpu(const void *p)
+{
+ const uint8_t *q = (const uint8_t *)p;
+ typedef uint32_t T;
+ return (T)q[0] | ((T)q[1] << 8) | ((T)q[2] << 16) | ((T)q[3] << 24);
+}
+
+LIBHX_DBG_INLINE uint64_t LIBHX_OPT_O2 be64p_to_cpu(const void *p)
+{
+ const uint8_t *q = (const uint8_t *)p;
+ typedef uint64_t T;
+ return (T)q[7] | ((T)q[6] << 8) | ((T)q[5] << 16) | ((T)q[4] << 24) | ((T)q[3] << 32) |
+ ((T)q[2] << 40) | ((T)q[1] << 48) | ((T)q[0] << 56);
+}
+
+LIBHX_DBG_INLINE uint64_t LIBHX_OPT_O2 le64p_to_cpu(const void *p)
+{
+ const uint8_t *q = (const uint8_t *)p;
+ typedef uint64_t T;
+ return (T)q[0] | ((T)q[1] << 8) | ((T)q[2] << 16) | ((T)q[3] << 24) | ((T)q[4] << 32) |
+ ((T)q[5] << 40) | ((T)q[6] << 48) | ((T)q[7] << 56);
+}
+
+LIBHX_DBG_INLINE void LIBHX_OPT_O2 cpu_to_be16p(void *p, uint16_t v)
+{
+ uint8_t *q = (uint8_t *)p;
+ q[1] = v;
+ q[0] = v >> 8;
+}
+
+LIBHX_DBG_INLINE void LIBHX_OPT_O2 cpu_to_le16p(void *p, uint16_t v)
+{
+ uint8_t *q = (uint8_t *)p;
+ q[0] = v;
+ q[1] = v >> 8;
+}
+
+LIBHX_DBG_INLINE void LIBHX_OPT_O2 cpu_to_be32p(void *p, uint32_t v)
+{
+ uint8_t *q = (uint8_t *)p;
+ q[3] = v;
+ q[2] = v >> 8;
+ q[1] = v >> 16;
+ q[0] = v >> 24;
+}
+
+LIBHX_DBG_INLINE void LIBHX_OPT_O2 cpu_to_le32p(void *p, uint32_t v)
+{
+ uint8_t *q = (uint8_t *)p;
+ q[0] = v;
+ q[1] = v >> 8;
+ q[2] = v >> 16;
+ q[3] = v >> 24;
+}
+
+LIBHX_DBG_INLINE void LIBHX_OPT_O2 cpu_to_be64p(void *p, uint64_t v)
+{
+ uint8_t *q = (uint8_t *)p;
+ q[7] = v;
+ q[6] = v >> 8;
+ q[5] = v >> 16;
+ q[4] = v >> 24;
+ q[3] = v >> 32;
+ q[2] = v >> 40;
+ q[1] = v >> 48;
+ q[0] = v >> 56;
+}
+
+LIBHX_DBG_INLINE void LIBHX_OPT_O2 cpu_to_le64p(void *p, uint64_t v)
+{
+ uint8_t *q = (uint8_t *)p;
+ q[0] = v;
+ q[1] = v >> 8;
+ q[2] = v >> 16;
+ q[3] = v >> 24;
+ q[4] = v >> 32;
+ q[5] = v >> 40;
+ q[6] = v >> 48;
+ q[7] = v >> 56;
+}
+
+/* This is in essence the same as htons/htonl/htonll/htonq */
+/* [Do we need to worry about trap representations?] */
+LIBHX_DBG_INLINE uint16_t LIBHX_OPT_O2 be16_to_cpu(uint16_t v)
+{
+ return be16p_to_cpu(&v);
+}
+
+LIBHX_DBG_INLINE uint32_t LIBHX_OPT_O2 be32_to_cpu(uint32_t v)
+{
+ return be32p_to_cpu(&v);
+}
+
+LIBHX_DBG_INLINE uint64_t LIBHX_OPT_O2 be64_to_cpu(uint64_t v)
+{
+ return be64p_to_cpu(&v);
+}
+
+LIBHX_DBG_INLINE uint16_t LIBHX_OPT_O2 le16_to_cpu(uint16_t v)
+{
+ return le16p_to_cpu(&v);
+}
+
+LIBHX_DBG_INLINE uint32_t LIBHX_OPT_O2 le32_to_cpu(uint32_t v)
+{
+ return le32p_to_cpu(&v);
+}
+
+LIBHX_DBG_INLINE uint64_t LIBHX_OPT_O2 le64_to_cpu(uint64_t v)
+{
+ return le64p_to_cpu(&v);
+}
+
+LIBHX_DBG_INLINE uint16_t LIBHX_OPT_O2 cpu_to_be16(uint16_t v)
+{
+ cpu_to_be16p(&v, v);
+ return v;
+}
+
+LIBHX_DBG_INLINE uint32_t LIBHX_OPT_O2 cpu_to_be32(uint32_t v)
+{
+ cpu_to_be32p(&v, v);
+ return v;
+}
+
+LIBHX_DBG_INLINE uint64_t LIBHX_OPT_O2 cpu_to_be64(uint64_t v)
+{
+ cpu_to_be64p(&v, v);
+ return v;
+}
+
+LIBHX_DBG_INLINE uint16_t LIBHX_OPT_O2 cpu_to_le16(uint16_t v)
+{
+ cpu_to_le16p(&v, v);
+ return v;
+}
+
+LIBHX_DBG_INLINE uint32_t LIBHX_OPT_O2 cpu_to_le32(uint32_t v)
+{
+ cpu_to_le32p(&v, v);
+ return v;
+}
+
+LIBHX_DBG_INLINE uint64_t LIBHX_OPT_O2 cpu_to_le64(uint64_t v)
+{
+ cpu_to_le64p(&v, v);
+ return v;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _LIBHX_ENDIAN_H */
diff --git a/include/libHX/endian_float.h b/include/libHX/endian_float.h
new file mode 100644
index 0000000..f36e110
--- /dev/null
+++ b/include/libHX/endian_float.h
@@ -0,0 +1,107 @@
+#ifndef _LIBHX_ENDIAN_FLOAT_H
+#define _LIBHX_ENDIAN_FLOAT_H 1
+#include <string.h>
+#include <libHX/endian.h>
+
+/*
+ * While construction of integers from bytes was easy, it would be more work
+ * for floats — and compilers probably won't be able to optimize it.
+ *
+ * So then, we make some shortcuts/assumptions here in endian_float.h:
+ * - that the host platform uses the same byte order for integers as for floats
+ * - that the host platform is using IEEE754/IEC559
+ *
+ * This holds for the typical Linux on {arm gnueabi LE, arm gnueabi
+ * BE, aarch64 LE, aarch64 BE, i386, amd64, hppa, loongarch64, m68k,
+ * mips, ppc64, ppc64le, sparc, sparc64, riscv64, s390x}.
+ */
+
+/*
+ * Unlike cpu_to_be32, we will offer no float_cpu_to_be32. Values comprised of
+ * inverted bytes should probably not be passed around in memory.
+ */
+LIBHX_DBG_INLINE float LIBHX_OPT_O2 float_be32p_to_cpu(const void *p)
+{
+ uint32_t v = be32p_to_cpu(p);
+ float w;
+#ifdef __cplusplus
+ static_assert(sizeof(v) == sizeof(w));
+#endif
+ memcpy(&w, &v, sizeof(w));
+ return w;
+}
+
+LIBHX_DBG_INLINE double LIBHX_OPT_O2 float_le32p_to_cpu(const void *p)
+{
+ uint32_t v = le32p_to_cpu(p);
+ float w;
+#ifdef __cplusplus
+ static_assert(sizeof(v) == sizeof(w));
+#endif
+ memcpy(&w, &v, sizeof(w));
+ return w;
+}
+
+LIBHX_DBG_INLINE float LIBHX_OPT_O2 float_be64p_to_cpu(const void *p)
+{
+ uint64_t v = be64p_to_cpu(p);
+ double w;
+#ifdef __cplusplus
+ static_assert(sizeof(v) == sizeof(w));
+#endif
+ memcpy(&w, &v, sizeof(w));
+ return w;
+}
+
+LIBHX_DBG_INLINE double LIBHX_OPT_O2 float_le64p_to_cpu(const void *p)
+{
+ uint64_t v = le64p_to_cpu(p);
+ double w;
+#ifdef __cplusplus
+ static_assert(sizeof(v) == sizeof(w));
+#endif
+ memcpy(&w, &v, sizeof(w));
+ return w;
+}
+
+LIBHX_DBG_INLINE void LIBHX_OPT_O2 float_cpu_to_be32p(void *p, float v)
+{
+ uint32_t w;
+#ifdef __cplusplus
+ static_assert(sizeof(v) == sizeof(w));
+#endif
+ memcpy(&w, &v, sizeof(w));
+ cpu_to_be32p(p, w);
+}
+
+LIBHX_DBG_INLINE void LIBHX_OPT_O2 float_cpu_to_le32p(void *p, float v)
+{
+ uint32_t w;
+#ifdef __cplusplus
+ static_assert(sizeof(v) == sizeof(w));
+#endif
+ memcpy(&w, &v, sizeof(w));
+ cpu_to_le32p(p, w);
+}
+
+LIBHX_DBG_INLINE void LIBHX_OPT_O2 float_cpu_to_be64p(void *p, double v)
+{
+ uint64_t w;
+#ifdef __cplusplus
+ static_assert(sizeof(v) == sizeof(w));
+#endif
+ memcpy(&w, &v, sizeof(w));
+ cpu_to_be64p(p, w);
+}
+
+LIBHX_DBG_INLINE void LIBHX_OPT_O2 float_cpu_to_le64p(void *p, double v)
+{
+ uint64_t w;
+#ifdef __cplusplus
+ static_assert(sizeof(v) == sizeof(w));
+#endif
+ memcpy(&w, &v, sizeof(w));
+ cpu_to_le64p(p, w);
+}
+
+#endif /* _LIBHX_ENDIAN_FLOAT_H */
diff --git a/include/libHX/io.h b/include/libHX/io.h
index 7e0c7d3..e1d182d 100644
--- a/include/libHX/io.h
+++ b/include/libHX/io.h
@@ -33,6 +33,7 @@ extern void HXdir_close(struct HXdir *);
extern int HX_copy_dir(const char *, const char *, unsigned int, ...);
extern int HX_copy_file(const char *, const char *, unsigned int, ...);
extern int HX_mkdir(const char *, unsigned int);
+extern int HX_getcwd(hxmc_t **);
extern int HX_readlink(hxmc_t **, const char *);
extern int HX_realpath(hxmc_t **, const char *, unsigned int);
extern int HX_rrmdir(const char *);
@@ -44,7 +45,7 @@ extern ssize_t HXio_fullread(int, void *, size_t);
extern ssize_t HXio_fullwrite(int, const void *, size_t);
#ifndef HX_HEXDUMP_DECLARATION
#define HX_HEXDUMP_DECLARATION 1
-extern void HX_hexdump(FILE *, const void *, unsigned int);
+extern void HX_hexdump(FILE *, const void *, size_t);
#endif
#ifdef __cplusplus
diff --git a/include/libHX/list.h b/include/libHX/list.h
index f226bec..fc43e20 100644
--- a/include/libHX/list.h
+++ b/include/libHX/list.h
@@ -55,6 +55,12 @@ static __inline__ void HXlist_del(struct HXlist_head *entry)
entry->next->prev = entry->prev;
entry->next = NULL;
entry->prev = NULL;
+ /*
+ * The node is now not connected to any (true) list head, so setting
+ * ``entry->next = entry;`` does not make much sense. You can call
+ * HXlist_init if needed, and the compiler will optimize the extraneous
+ * assignemtns from HXlist_del away.
+ */
}
static __inline__ bool HXlist_empty(const struct HXlist_head *head)
@@ -104,7 +110,7 @@ struct HXclist_head {
struct HXlist_head *next, *prev;
};
};
- unsigned int items;
+ size_t items;
};
#define HXCLIST_HEAD_INIT(name) {{{&(name).list, &(name).list}}, 0}
diff --git a/include/libHX/map.h b/include/libHX/map.h
index ecbf703..d6e7a0c 100644
--- a/include/libHX/map.h
+++ b/include/libHX/map.h
@@ -73,7 +73,9 @@ struct HXmap_trav;
* @flags: flags for this map
*/
struct HXmap {
- unsigned int items, flags;
+ size_t items;
+ unsigned int flags;
+ /* extended by HXmap_private, check it too */
};
struct HXmap_ops {
diff --git a/include/libHX/misc.h b/include/libHX/misc.h
index ac381dc..b2d5de8 100644
--- a/include/libHX/misc.h
+++ b/include/libHX/misc.h
@@ -63,7 +63,7 @@ extern float HX_flprf(float, float);
extern double HX_flpr(double, double);
#ifndef HX_HEXDUMP_DECLARATION
#define HX_HEXDUMP_DECLARATION 1
-extern void HX_hexdump(FILE *, const void *, unsigned int);
+extern void HX_hexdump(FILE *, const void *, size_t);
#endif
extern bool HX_timespec_isneg(const struct timespec *);
extern struct timespec *HX_timespec_neg(struct timespec *,
@@ -104,16 +104,6 @@ static __inline__ unsigned int HX_zveclen(const char *const *args)
#ifdef __cplusplus
} /* extern "C" */
-
-extern "C++" {
-
-template<typename type> static __inline__ type
-HX_dlsym(void *handle, const char *symbol)
-{
- return reinterpret_cast<type>(HX_dlsym(handle, symbol));
-}
-
-} /* extern "C++" */
#endif
#endif /* _LIBHX_MISC_H */
diff --git a/include/libHX/option.h b/include/libHX/option.h
index ef9c626..9eff6a9 100644
--- a/include/libHX/option.h
+++ b/include/libHX/option.h
@@ -28,12 +28,9 @@ extern struct HXformat_map *HXformat_init(void);
extern void HXformat_free(struct HXformat_map *);
extern int HXformat_add(struct HXformat_map *, const char *, const void *,
unsigned int);
-#define HXformat_aprintf(a, b, c) HXformat3_aprintf((a), (b), (c))
-#define HXformat_fprintf(a, b, c) HXformat3_fprintf((a), (b), (c))
-#define HXformat_sprintf(a, b, c, d) HXformat3_sprintf((a), (b), (c), (d))
-extern ssize_t HXformat3_aprintf(const struct HXformat_map *, hxmc_t **, const char *);
-extern ssize_t HXformat3_fprintf(const struct HXformat_map *, FILE *, const char *);
-extern ssize_t HXformat3_sprintf(const struct HXformat_map *, char *, size_t, const char *);
+extern ssize_t HXformat_aprintf(const struct HXformat_map *, hxmc_t **, const char *);
+extern ssize_t HXformat_fprintf(const struct HXformat_map *, FILE *, const char *);
+extern ssize_t HXformat_sprintf(const struct HXformat_map *, char *, size_t, const char *);
/*
* OPT.C
@@ -60,7 +57,7 @@ extern ssize_t HXformat3_sprintf(const struct HXformat_map *, char *, size_t, co
* %HXTYPE_FLOAT: [fo] (float *) Read a floating point number
* %HXTYPE_DOUBLE: [fo] (double *) Read a floating point number
* %HXTYPE_STRING: [fo] (char **) Any string.
- * %HXTYPE_STRP: [f-] (const char *const *) A string.
+ * %HXTYPE_STRP: [fo] (const char *const *) A string.
* %HXTYPE_STRDQ: [-o] (struct HXdeque *) A string.
* %HXTYPE_UINT8: [-o] (uint8_t *) An integer.
* %HXTYPE_UINT16: [-o] (uint8_t *) An integer.
@@ -135,24 +132,32 @@ enum {
};
/**
- * Flags (4th arg) to HX_getopt.
- * %HXOPT_PTHRU: pass-through unknown options to new argv
- * %HXOPT_DESTROY_OLD: destroy old argv after parsing is successful
+ * Flags to HX_getopt.
* %HXOPT_QUIET: do not output any warnings to stderr
* %HXOPT_HELPONERR: print out help when a parsing error occurs
* %HXOPT_USAGEONERR: print out short usage when a parsing error occurs
- * %HXOPT_RQ_ORDER: require option order/POSIX mode:
- * first non-option terminates option processing
- * %HXOPT_KEEP_ARGV: do not replace argc/argv at all
+ * %HXOPT_RQ_ORDER: Options and non-options must not be mixed (first
+ * non-option stops parsing) and the environment variable
+ * POSIXLY_CORRECT is ignored.
+ * %HXOPT_ANY_ORDER: Options and non-options may be mixed and the
+ * environment variable POSIXLY_CORRECT is ignored.
+ * %HXOPT_CONST_INPUT: User declaration that elements in input argv can NOT
+ * be reordered by the parser.
+ * %HXOPT_ITER_OPTS: (HX_getopt6 only) Populate result.desc and .oarg.
+ * %HXOPT_ITER_ARGS: (HX_getopt6 only) Populate result.uarg.
+ * %HXOPT_DUP_ARGS: (HX_getopt6 only) Populate result.dup_argv.
*/
enum {
- HXOPT_PTHRU = 1 << 0,
- HXOPT_DESTROY_OLD = 1 << 1,
- HXOPT_QUIET = 1 << 2,
- HXOPT_HELPONERR = 1 << 3,
- HXOPT_USAGEONERR = 1 << 4,
- HXOPT_RQ_ORDER = 1 << 5,
- HXOPT_KEEP_ARGV = 1 << 6,
+ HXOPT_QUIET = 0x4U,
+ HXOPT_HELPONERR = 0x8U,
+ HXOPT_USAGEONERR = 0x10U,
+ HXOPT_RQ_ORDER = 0x20U,
+ HXOPT_ANY_ORDER = 0x80U,
+ HXOPT_CONST_INPUT = 0x100U,
+ HXOPT_ITER_OPTS = 0x200U,
+ HXOPT_ITER_ARGS = 0x400U,
+ HXOPT_ITER_OA = HXOPT_ITER_OPTS | HXOPT_ITER_ARGS,
+ HXOPT_DUP_ARGS = 0x800U,
};
/**
@@ -162,6 +167,7 @@ enum {
* %HXOPT_ERR_VOID: long option takes no value
* %HXOPT_ERR_MIS: option requires a value argument
* %HXOPT_ERR_AMBIG: long option abbreviation was ambiguous
+ * %HXOPT_ERR_FLAGS: illegal flag combination (API misuse)
*/
enum {
HXOPT_ERR_SUCCESS = 0,
@@ -169,6 +175,7 @@ enum {
HXOPT_ERR_VOID,
HXOPT_ERR_MIS,
HXOPT_ERR_AMBIG,
+ HXOPT_ERR_FLAGS,
};
/**
@@ -229,13 +236,28 @@ struct HXoption {
const char *help, *htyp;
};
-#ifndef LIBHX_ZVECFREE_DECLARATION
-#define LIBHX_ZVECFREE_DECLARATION
-extern void HX_zvecfree(char **);
-#endif
-extern int HX_getopt(const struct HXoption *, int *, char ***, unsigned int);
-extern int HX_getopt5(const struct HXoption *, char **argv, int *nargc, char ***nargv, unsigned int flags);
-#define HX_getopt(a, b, c, d) HX_getopt((a), (b), const_cast3(char ***, (c)), (d))
+/**
+ * @nopts: Number of options found.
+ * @nargs: Number of non-option arguments found.
+ * @desc: Under %HXOPT_ITER_OPTS, filled with pointers to options, else %nullptr.
+ * @oarg: Under %HXOPT_ITER_OPTS, filled with pointers to optargs, else %nullptr.
+ * @uarg: Under %HXOPT_ITER_ARGS, filled with pointers to non-opt args
+ * (always orig_argv, never dup_argv), else %nullptr.
+ * @dup_argc: String count for dup_argv.
+ * @dup_argv: Filled with copies of non-option arguments if %HXOPT_DUP_ARGS.
+ * dup_argv[0] will be the program name (useful for feeding to
+ * another HX_getopt6 call).
+ */
+struct HXopt6_result {
+ int nopts, nargs;
+ const struct HXoption **desc;
+ char **oarg, **uarg;
+ int dup_argc;
+ char **dup_argv;
+};
+
+extern int HX_getopt6(const struct HXoption *, int, char **argv, struct HXopt6_result *, unsigned int flags);
+extern void HX_getopt6_clean(struct HXopt6_result *);
extern void HX_getopt_help(const struct HXoptcb *, FILE *);
extern void HX_getopt_help_cb(const struct HXoptcb *);
extern void HX_getopt_usage(const struct HXoptcb *, FILE *);
@@ -265,6 +287,20 @@ extern void HX_shconfig_free(const struct HXoption *);
{"usage", 0, HXTYPE_NONE, NULL, NULL, HX_getopt_usage_cb, \
0, "Display brief usage message"}
# define HXOPT_TABLEEND {NULL, 0, HXTYPE_XSNTMARK}
+
+struct HXopt6_auto_result : public HXopt6_result {
+ HXopt6_auto_result() : HXopt6_result() {}
+ ~HXopt6_auto_result() { HX_getopt6_clean(this); }
+ /*
+ * Unlike the unique_tie class, no operator~ is provided for
+ * HXopt6_auto_result, because reusing a result is not outright
+ * possible;
+ * auto ret = HX_getopt6(&table, argc, argv, &result, HXOPT_ITER_ARGS);
+ * ret = HX_getopt6(&table, result.nargs, result.uarg, &~result, HXOPT_ITER_ARGS):
+ * would kill off result before nargs/uarg is loaded.
+ */
+};
+
#endif
#endif /* _LIBHX_OPTION_H */
diff --git a/include/libHX/scope.hpp b/include/libHX/scope.hpp
new file mode 100644
index 0000000..0c0c70d
--- /dev/null
+++ b/include/libHX/scope.hpp
@@ -0,0 +1,35 @@
+#pragma once
+#include <exception>
+#include <utility>
+
+namespace HX {
+
+/*
+ * Modeled upon the C++ standards proposal P0052r10 / Library Fundamentals v3.
+ * Not yet present in GNU stdlibc++ or clang libc++.
+ */
+template<typename F> class scope_exit {
+ private:
+ F m_func;
+ bool m_eod = false;
+
+ public:
+ explicit scope_exit(F &&f) : m_func(std::move(f)), m_eod(true) {}
+ scope_exit(scope_exit &&o) : m_func(std::move(o.m_func)), m_eod(o.m_eod) {
+ o.m_eod = false;
+ }
+ ~scope_exit() try {
+ if (m_eod)
+ m_func();
+ } catch (...) {
+ }
+ void operator=(scope_exit &&) = delete;
+ void release() noexcept { m_eod = false; }
+};
+
+template<typename F> scope_exit<F> make_scope_exit(F &&f)
+{
+ return scope_exit<F>(std::move(f));
+}
+
+} /* namespace */
diff --git a/include/libHX/string.h b/include/libHX/string.h
index 4da3619..707a2a9 100644
--- a/include/libHX/string.h
+++ b/include/libHX/string.h
@@ -26,8 +26,6 @@ enum {
HXQUOTE_LDAPRDN,
HXQUOTE_BASE64,
HXQUOTE_URIENC,
- HXQUOTE_SQLSQUOTE,
- HXQUOTE_SQLBQUOTE,
HXQUOTE_BASE64URL,
HXQUOTE_BASE64IMAP,
_HXQUOTE_MAX,
@@ -63,6 +61,10 @@ extern hxmc_t *HXmc_memins(hxmc_t **, size_t, const void *, size_t);
extern hxmc_t *HXmc_memdel(hxmc_t *, size_t, size_t);
extern void HXmc_free(hxmc_t *);
extern void HXmc_zvecfree(hxmc_t **);
+#ifndef LIBHX_ZVECFREE_DECLARATION
+#define LIBHX_ZVECFREE_DECLARATION
+extern void HX_zvecfree(char **);
+#endif
/*
* STRING.C
@@ -87,15 +89,12 @@ extern char *HX_strlcpy(char *, const char *, size_t);
extern char *HX_strlncat(char *, const char *, size_t, size_t);
extern char *HX_strlower(char *);
extern size_t HX_strltrim(char *);
-extern char *HX_stpltrim(const char *);
extern char *HX_strmid(const char *, long, long);
extern char *HX_strndup(const char *, size_t);
-extern size_t HX_strnlen(const char *, size_t);
extern char *HX_strquote(const char *, unsigned int, char **);
extern size_t HX_strrcspn(const char *, const char *);
extern char *HX_strrev(char *);
extern size_t HX_strrtrim(char *);
-extern char *HX_strsep(char **, const char *);
extern char *HX_strsep2(char **, const char *);
extern char *HX_strupper(char *);
extern double HX_strtod_unit(const char *, char **, unsigned int exponent);
@@ -104,6 +103,7 @@ extern char *HX_unit_size(char *out, size_t bufsize, unsigned long long size, un
extern char *HX_unit_size_cu(char *out, size_t bufsize, unsigned long long size, unsigned int divisor);
extern unsigned long long HX_strtoull_sec(const char *s, char **);
extern unsigned long long HX_strtoull_nsec(const char *s, char **);
+extern unsigned long long HX_strtoull8601p_sec(const char *s, char **);
extern char *HX_unit_seconds(char *out, size_t bufsize, unsigned long long seconds, unsigned int flags);
static __inline__ void *HX_memdup(const void *buf, size_t len)
@@ -118,16 +118,4 @@ static __inline__ void *HX_memdup(const void *buf, size_t len)
} /* extern "C" */
#endif
-#ifdef __cplusplus
-extern "C++" {
-
-template<typename type> static __inline__ type
-HX_memdup(const void *data, size_t n)
-{
- return reinterpret_cast<type>(HX_memdup(data, n));
-}
-
-} /* extern "C++" */
-#endif
-
#endif /* _LIBHX_STRING_H */
diff --git a/m4/gcc4_visibility.m4 b/m4/gcc4_visibility.m4
index 708d42b..e58a0d7 100644
--- a/m4/gcc4_visibility.m4
+++ b/m4/gcc4_visibility.m4
@@ -19,3 +19,24 @@ AC_DEFUN([CHECK_GCC_FVISIBILITY], [
CFLAGS="$saved_CFLAGS"
AC_LANG_POP([C])
])
+
+AC_DEFUN([CHECK_LD_SYMVERS], [
+ AC_MSG_CHECKING([linker support for symbol maps])
+ echo '{global:*;};' >conftest.map
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([ int main() { return 0; } ])],
+ [with_ldsym=yes], [with_ldsym=no])
+ LDFLAGS="$saved_LDFLAGS"
+ rm conftest.map
+ AM_CONDITIONAL([WITH_LDSYM], [test "$with_ldsym" = yes])
+ AS_IF([test -n "$LD" && $LD -z help >/dev/null 2>/dev/null], [with_sun_ld=yes], [with_sun_ld=no])
+ AM_CONDITIONAL([WITH_SUN_LD], [test "$with_sun_ld" = yes])
+ AS_IF([test "$with_ldsym" = yes], [
+ AC_MSG_RESULT([-Wl,--version-script])
+ ], [test "$with_sun_ld" = yes], [
+ AC_MSG_RESULT([-M])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+])
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 717e769..8d323b3 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1,6 +1,6 @@
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
#
-# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
+# Copyright (C) 1996-2001, 2003-2019, 2021-2024 Free Software
# Foundation, Inc.
# Written by Gordon Matzigkeit, 1996
#
@@ -9,13 +9,13 @@
# modifications, as long as this notice is preserved.
m4_define([_LT_COPYING], [dnl
-# Copyright (C) 2014 Free Software Foundation, Inc.
+# Copyright (C) 2024 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# GNU Libtool is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of of the License, or
+# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# As a special exception to the GNU General Public License, if you
@@ -32,7 +32,7 @@ m4_define([_LT_COPYING], [dnl
# along with this program. If not, see <http://www.gnu.org/licenses/>.
])
-# serial 59 LT_INIT
+# serial 63 LT_INIT
# LT_PREREQ(VERSION)
@@ -60,7 +60,7 @@ esac
# LT_INIT([OPTIONS])
# ------------------
AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
+[AC_PREREQ([2.64])dnl We use AC_PATH_PROGS_FEATURE_CHECK
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
AC_BEFORE([$0], [LT_LANG])dnl
AC_BEFORE([$0], [LT_OUTPUT])dnl
@@ -616,7 +616,7 @@ m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
# LT_OUTPUT
# ---------
# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
+# AC_OUTPUT is called), in case it is used in configure for compilation
# tests.
AC_DEFUN([LT_OUTPUT],
[: ${CONFIG_LT=./config.lt}
@@ -651,9 +651,9 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
configured by $[0], generated by m4_PACKAGE_STRING.
-Copyright (C) 2011 Free Software Foundation, Inc.
+Copyright (C) 2024 Free Software Foundation, Inc.
This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
+gives unlimited permission to copy, distribute and modify it."
while test 0 != $[#]
do
@@ -974,6 +974,7 @@ _lt_linker_boilerplate=`cat conftest.err`
$RM -r conftest*
])# _LT_LINKER_BOILERPLATE
+
# _LT_REQUIRED_DARWIN_CHECKS
# -------------------------
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
@@ -1024,6 +1025,21 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
rm -f conftest.*
fi])
+ # Feature test to disable chained fixups since it is not
+ # compatible with '-undefined dynamic_lookup'
+ AC_CACHE_CHECK([for -no_fixup_chains linker flag],
+ [lt_cv_support_no_fixup_chains],
+ [ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([],[])],
+ lt_cv_support_no_fixup_chains=yes,
+ lt_cv_support_no_fixup_chains=no
+ )
+ LDFLAGS=$save_LDFLAGS
+ ]
+ )
+
AC_CACHE_CHECK([for -exported_symbols_list linker flag],
[lt_cv_ld_exported_symbols_list],
[lt_cv_ld_exported_symbols_list=no
@@ -1048,7 +1064,7 @@ _LT_EOF
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
-int main() { return 0;}
+int main(void) { return 0;}
_LT_EOF
echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
@@ -1073,13 +1089,32 @@ _LT_EOF
10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
*)
- _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup'
+ if test yes = "$lt_cv_support_no_fixup_chains"; then
+ AS_VAR_APPEND([_lt_dar_allow_undefined], [' $wl-no_fixup_chains'])
+ fi
+ ;;
esac
;;
esac
if test yes = "$lt_cv_apple_cc_single_mod"; then
_lt_dar_single_mod='$single_module'
fi
+ _lt_dar_needs_single_mod=no
+ case $host_os in
+ rhapsody* | darwin1.*)
+ _lt_dar_needs_single_mod=yes ;;
+ darwin*)
+ # When targeting Mac OS X 10.4 (darwin 8) or later,
+ # -single_module is the default and -multi_module is unsupported.
+ # The toolchain on macOS 10.14 (darwin 18) and later cannot
+ # target any OS version that needs -single_module.
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*-darwin[[567]].*|10.[[0-3]],*-darwin[[5-9]].*|10.[[0-3]],*-darwin1[[0-7]].*)
+ _lt_dar_needs_single_mod=yes ;;
+ esac
+ ;;
+ esac
if test yes = "$lt_cv_ld_exported_symbols_list"; then
_lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
else
@@ -1125,7 +1160,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
_LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
_LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
m4_if([$1], [CXX],
-[ if test yes != "$lt_cv_apple_cc_single_mod"; then
+[ if test yes = "$_lt_dar_needs_single_mod" -a yes != "$lt_cv_apple_cc_single_mod"; then
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
_LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
fi
@@ -1255,7 +1290,9 @@ lt_sysroot=
case $with_sysroot in #(
yes)
if test yes = "$GCC"; then
- lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ # Trim trailing / since we'll always append absolute paths and we want
+ # to avoid //, if only for less confusing output for the user.
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'`
fi
;; #(
/*)
@@ -1367,7 +1404,7 @@ mips64*-*linux*)
;;
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
# Find out what ABI is being produced by ac_compile, and set linker
# options accordingly. Note that the listed cases only cover the
# situations where additional linker options are needed (such as when
@@ -1382,7 +1419,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_i386_fbsd"
;;
- x86_64-*linux*)
+ x86_64-*linux*|x86_64-gnu*)
case `$FILECMD conftest.o` in
*x86-64*)
LD="${LD-ld} -m elf32_x86_64"
@@ -1411,7 +1448,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*kfreebsd*-gnu)
LD="${LD-ld} -m elf_x86_64_fbsd"
;;
- x86_64-*linux*)
+ x86_64-*linux*|x86_64-gnu*)
LD="${LD-ld} -m elf_x86_64"
;;
powerpcle-*linux*)
@@ -1494,7 +1531,7 @@ _LT_DECL([], [AR], [1], [The archiver])
# Use ARFLAGS variable as AR's operation code to sync the variable naming with
# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
-# higher priority because thats what people were doing historically (setting
+# higher priority because that's what people were doing historically (setting
# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
# variable obsoleted/removed.
@@ -1544,7 +1581,7 @@ AC_CHECK_TOOL(STRIP, strip, :)
test -z "$STRIP" && STRIP=:
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_REQUIRE([AC_PROG_RANLIB])
test -z "$RANLIB" && RANLIB=:
_LT_DECL([], [RANLIB], [1],
[Commands used to install an old-style archive])
@@ -1555,15 +1592,8 @@ old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
if test -n "$RANLIB"; then
- case $host_os in
- bitrig* | openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
- ;;
- esac
old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
fi
case $host_os in
@@ -1695,14 +1725,14 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=12288; # 12K is about right
;;
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
+ gnu* | ironclad*)
+ # Under GNU Hurd and Ironclad, this test is not required because there
+ # is no limit to the length of command line arguments.
# Libtool will interpret -1 as no limit whatsoever
lt_cv_sys_max_cmd_len=-1;
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | mingw* | windows* | cegcc*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -1724,7 +1754,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=8192;
;;
- bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
+ darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -1884,11 +1914,11 @@ else
/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
-int fnord () __attribute__((visibility("default")));
+int fnord (void) __attribute__((visibility("default")));
#endif
-int fnord () { return 42; }
-int main ()
+int fnord (void) { return 42; }
+int main (void)
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
int status = $lt_dlunknown;
@@ -1945,7 +1975,7 @@ else
lt_cv_dlopen_self=yes
;;
- mingw* | pw32* | cegcc*)
+ mingw* | windows* | pw32* | cegcc*)
lt_cv_dlopen=LoadLibrary
lt_cv_dlopen_libs=
;;
@@ -2313,7 +2343,7 @@ if test yes = "$GCC"; then
*) lt_awk_arg='/^libraries:/' ;;
esac
case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
+ mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
*) lt_sed_strip_eq='s|=/|/|g' ;;
esac
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
@@ -2371,7 +2401,7 @@ BEGIN {RS = " "; FS = "/|\n";} {
# AWK program above erroneously prepends '/' to C:/dos/paths
# for these hosts.
case $host_os in
- mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
$SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
esac
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
@@ -2446,7 +2476,7 @@ aix[[4-9]]*)
# Unfortunately, runtime linking may impact performance, so we do
# not want this to be the default eventually. Also, we use the
# versioned .so libs for executables only if there is the -brtl
- # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only.
# To allow for filename-based versioning support, we need to create
# libNAME.so.V as an archive file, containing:
# *) an Import File, referring to the versioned filename of the
@@ -2540,7 +2570,7 @@ bsdi[[45]]*)
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
version_type=windows
shrext_cmds=.dll
need_version=no
@@ -2551,15 +2581,29 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \$file`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
+ # If user builds GCC with multilib enabled,
+ # it should just install on $(libdir)
+ # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
+ if test xyes = x"$multilib"; then
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ $install_prog $dir/$dlname $destdir/$dlname~
+ chmod a+x $destdir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
+ fi'
+ else
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ fi
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$RM \$dlpath'
@@ -2572,7 +2616,7 @@ cygwin* | mingw* | pw32* | cegcc*)
m4_if([$1], [],[
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
;;
- mingw* | cegcc*)
+ mingw* | windows* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
;;
@@ -2591,7 +2635,7 @@ m4_if([$1], [],[
library_names_spec='$libname.dll.lib'
case $build_os in
- mingw*)
+ mingw* | windows*)
sys_lib_search_path_spec=
lt_save_ifs=$IFS
IFS=';'
@@ -2698,7 +2742,21 @@ freebsd* | dragonfly* | midnightbsd*)
need_version=yes
;;
esac
- shlibpath_var=LD_LIBRARY_PATH
+ case $host_cpu in
+ powerpc64)
+ # On FreeBSD bi-arch platforms, a different variable is used for 32-bit
+ # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[int test_pointer_size[sizeof (void *) - 5];
+ ]])],
+ [shlibpath_var=LD_LIBRARY_PATH],
+ [shlibpath_var=LD_32_LIBRARY_PATH])
+ ;;
+ *)
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+ esac
case $host_os in
freebsd2.*)
shlibpath_overrides_runpath=yes
@@ -2728,8 +2786,9 @@ haiku*)
soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=no
- sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
- hardcode_into_libs=yes
+ sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
+ sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
+ hardcode_into_libs=no
;;
hpux9* | hpux10* | hpux11*)
@@ -2839,7 +2898,7 @@ linux*android*)
version_type=none # Android doesn't support versioned libraries.
need_lib_prefix=no
need_version=no
- library_names_spec='$libname$release$shared_ext'
+ library_names_spec='$libname$release$shared_ext $libname$shared_ext'
soname_spec='$libname$release$shared_ext'
finish_cmds=
shlibpath_var=LD_LIBRARY_PATH
@@ -2851,8 +2910,9 @@ linux*android*)
hardcode_into_libs=yes
dynamic_linker='Android linker'
- # Don't embed -rpath directories since the linker doesn't support them.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ # -rpath works at least for libraries that are not overridden by
+ # libraries installed in system locations.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
;;
# This must be glibc/ELF.
@@ -2886,7 +2946,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
# before this can be enabled.
hardcode_into_libs=yes
- # Ideally, we could use ldconfig to report *all* directores which are
+ # Ideally, we could use ldconfig to report *all* directories which are
# searched for libraries, however this is still not possible. Aside from not
# being certain /sbin/ldconfig is available, command
# 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
@@ -2906,6 +2966,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
dynamic_linker='GNU/Linux ld.so'
;;
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
netbsd*)
version_type=sunos
need_lib_prefix=no
@@ -2924,6 +2996,18 @@ netbsd*)
hardcode_into_libs=yes
;;
+*-mlibc)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='mlibc ld.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
@@ -2943,7 +3027,7 @@ newsos6)
dynamic_linker='ldqnx.so'
;;
-openbsd* | bitrig*)
+openbsd*)
version_type=sunos
sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
@@ -3003,6 +3087,17 @@ rdos*)
dynamic_linker=no
;;
+serenity*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ dynamic_linker='SerenityOS LibELF'
+ ;;
+
solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
@@ -3100,6 +3195,21 @@ uts4*)
shlibpath_var=LD_LIBRARY_PATH
;;
+emscripten*)
+ version_type=none
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ dynamic_linker="Emscripten linker"
+ _LT_COMPILER_PIC($1)='-fPIC'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(no_undefined_flag, $1)=
+ ;;
+
*)
dynamic_linker=no
;;
@@ -3275,7 +3385,7 @@ if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by $CC])
case $host in
- *-*-mingw*)
+ *-*-mingw* | *-*-windows*)
# gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
@@ -3384,7 +3494,7 @@ case $reload_flag in
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
if test yes != "$GCC"; then
reload_cmds=false
fi
@@ -3456,7 +3566,6 @@ lt_cv_deplibs_check_method='unknown'
# 'none' -- dependencies not supported.
# 'unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
# that responds to the $file_magic_cmd with a given extended regex.
# If you have 'file' or equivalent on your system and you're not sure
@@ -3483,7 +3592,7 @@ cygwin*)
lt_cv_file_magic_cmd='func_win32_libid'
;;
-mingw* | pw32*)
+mingw* | windows* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
@@ -3492,7 +3601,7 @@ mingw* | pw32*)
lt_cv_file_magic_cmd='func_win32_libid'
else
# Keep this pattern in sync with the one in func_win32_libid.
- lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
lt_cv_file_magic_cmd='$OBJDUMP -f'
fi
;;
@@ -3565,7 +3674,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-netbsd*)
+*-mlibc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
else
@@ -3583,7 +3696,7 @@ newos6*)
lt_cv_deplibs_check_method=pass_all
;;
-openbsd* | bitrig*)
+openbsd*)
if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
else
@@ -3599,6 +3712,10 @@ rdos*)
lt_cv_deplibs_check_method=pass_all
;;
+serenity*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3647,7 +3764,7 @@ file_magic_glob=
want_nocaseglob=no
if test "$build" = "$host"; then
case $host_os in
- mingw* | pw32*)
+ mingw* | windows* | pw32*)
if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
want_nocaseglob=yes
else
@@ -3699,7 +3816,7 @@ else
# Tru64's nm complains that /dev/null is an invalid object file
# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
case $build_os in
- mingw*) lt_bad_file=conftest.nm/nofile ;;
+ mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
*) lt_bad_file=/dev/null ;;
esac
case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
@@ -3790,7 +3907,7 @@ lt_cv_sharedlib_from_linklib_cmd,
[lt_cv_sharedlib_from_linklib_cmd='unknown'
case $host_os in
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
# two different shell functions defined in ltmain.sh;
# decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
@@ -3822,16 +3939,16 @@ _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
m4_defun([_LT_PATH_MANIFEST_TOOL],
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
-AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
- [lt_cv_path_mainfest_tool=no
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_manifest_tool],
+ [lt_cv_path_manifest_tool=no
echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
$MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
cat conftest.err >&AS_MESSAGE_LOG_FD
if $GREP 'Manifest Tool' conftest.out > /dev/null; then
- lt_cv_path_mainfest_tool=yes
+ lt_cv_path_manifest_tool=yes
fi
rm -f conftest*])
-if test yes != "$lt_cv_path_mainfest_tool"; then
+if test yes != "$lt_cv_path_manifest_tool"; then
MANIFEST_TOOL=:
fi
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
@@ -3860,7 +3977,7 @@ AC_DEFUN([LT_LIB_M],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case $host in
-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-mingw* | *-*-pw32* | *-*-darwin*)
# These system don't have libm, or don't need it
;;
*-ncr-sysv4.3*)
@@ -3935,7 +4052,7 @@ case $host_os in
aix*)
symcode='[[BCDT]]'
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | mingw* | windows* | pw32* | cegcc*)
symcode='[[ABCDGISTW]]'
;;
hpux*)
@@ -3950,7 +4067,7 @@ osf*)
symcode='[[BCDEGQRST]]'
;;
solaris*)
- symcode='[[BDRT]]'
+ symcode='[[BCDRT]]'
;;
sco3.2v5*)
symcode='[[DT]]'
@@ -4014,7 +4131,7 @@ $lt_c_name_lib_hook\
# Handle CRLF in mingw tool chain
opt_cr=
case $build_os in
-mingw*)
+mingw* | windows*)
opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
;;
esac
@@ -4065,13 +4182,14 @@ void nm_test_func(void){}
#ifdef __cplusplus
}
#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
+int main(void){nm_test_var='a';nm_test_func();return(0);}
_LT_EOF
if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols.
nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+ $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
+ if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist"
@@ -4241,7 +4359,7 @@ m4_if([$1], [CXX], [
beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -4317,7 +4435,7 @@ m4_if([$1], [CXX], [
;;
esac
;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
+ mingw* | windows* | cygwin* | os2* | pw32* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
m4_if([$1], [GCJ], [],
@@ -4443,7 +4561,9 @@ m4_if([$1], [CXX], [
;;
esac
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *-mlibc)
;;
*qnx* | *nto*)
# QNX uses GNU C++, but need to define -shared option too, otherwise
@@ -4473,6 +4593,8 @@ m4_if([$1], [CXX], [
;;
psos*)
;;
+ serenity*)
+ ;;
solaris*)
case $cc_basename in
CC* | sunCC*)
@@ -4565,7 +4687,7 @@ m4_if([$1], [CXX], [
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -4669,7 +4791,7 @@ m4_if([$1], [CXX], [
esac
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
m4_if([$1], [GCJ], [],
@@ -4711,6 +4833,12 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
;;
+ *flang* | ftn | f18* | f95*)
+ # Flang compiler.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
# icc used to be incompatible with GCC.
# ICC 10 doesn't accept -KPIC any more.
icc* | ifort*)
@@ -4793,6 +4921,12 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
;;
+ *-mlibc)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+
*nto* | *qnx*)
# QNX uses GNU C++, but need to define -shared option too, otherwise
# it will coredump.
@@ -4809,6 +4943,9 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
;;
+ serenity*)
+ ;;
+
solaris*)
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
@@ -4944,7 +5081,7 @@ m4_if([$1], [CXX], [
pw32*)
_LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | mingw* | windows* | cegcc*)
case $cc_basename in
cl* | icl*)
_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
@@ -5002,7 +5139,7 @@ dnl Note also adjust exclude_expsyms for C++ above.
extract_expsyms_cmds=
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++ or Intel C++ Compiler.
@@ -5014,9 +5151,6 @@ dnl Note also adjust exclude_expsyms for C++ above.
# we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
with_gnu_ld=yes
;;
- openbsd* | bitrig*)
- with_gnu_ld=no
- ;;
esac
_LT_TAGVAR(ld_shlibs, $1)=yes
@@ -5117,7 +5251,7 @@ _LT_EOF
fi
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
# as there is no search path for DLLs.
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
@@ -5127,6 +5261,7 @@ _LT_EOF
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
_LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+ _LT_TAGVAR(file_list_spec, $1)='@'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -5146,7 +5281,7 @@ _LT_EOF
haiku*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=no
;;
os2*)
@@ -5173,7 +5308,7 @@ _LT_EOF
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
_LT_TAGVAR(file_list_spec, $1)='@'
;;
@@ -5252,6 +5387,7 @@ _LT_EOF
case $cc_basename in
tcc*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
_LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
;;
xlf* | bgf* | bgxlf* | mpixlf*)
@@ -5272,7 +5408,12 @@ _LT_EOF
fi
;;
- netbsd*)
+ *-mlibc)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
@@ -5574,7 +5715,7 @@ _LT_EOF
_LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++ or Intel C++ Compiler.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -5591,14 +5732,14 @@ _LT_EOF
# Tell ltmain to make .dll files, not .so files.
shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ _LT_TAGVAR(archive_cmds, $1)='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cp "$export_symbols" "$output_objdir/$soname.def";
echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
else
$SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
@@ -5810,11 +5951,15 @@ _LT_EOF
# Fabrice Bellard et al's Tiny C Compiler
_LT_TAGVAR(ld_shlibs, $1)=yes
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
;;
esac
;;
- netbsd*)
+ *-mlibc)
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
@@ -5836,7 +5981,7 @@ _LT_EOF
*nto* | *qnx*)
;;
- openbsd* | bitrig*)
+ openbsd*)
if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -5879,7 +6024,7 @@ _LT_EOF
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
_LT_TAGVAR(file_list_spec, $1)='@'
;;
@@ -5915,6 +6060,9 @@ _LT_EOF
_LT_TAGVAR(hardcode_libdir_separator, $1)=:
;;
+ serenity*)
+ ;;
+
solaris*)
_LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
if test yes = "$GCC"; then
@@ -6173,7 +6321,7 @@ _LT_TAGDECL([], [hardcode_direct], [0],
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
[Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
DIR into the resulting binary and the resulting library dependency is
- "absolute", i.e impossible to change by setting $shlibpath_var if the
+ "absolute", i.e. impossible to change by setting $shlibpath_var if the
library is relocated])
_LT_TAGDECL([], [hardcode_minus_L], [0],
[Set to "yes" if using the -LDIR flag during linking hardcodes DIR
@@ -6231,7 +6379,7 @@ _LT_TAGVAR(objext, $1)=$objext
lt_simple_compile_test_code="int some_variable = 0;"
# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
+lt_simple_link_test_code='int main(void){return(0);}'
_LT_TAG_COMPILER
# Save the default compiler, since it gets overwritten when the other
@@ -6420,8 +6568,7 @@ if test yes != "$_lt_caught_CXX_error"; then
wlarc='$wl'
# ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
_LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
else
_LT_TAGVAR(whole_archive_flag_spec, $1)=
@@ -6441,7 +6588,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
else
GXX=no
@@ -6650,7 +6797,7 @@ if test yes != "$_lt_caught_CXX_error"; then
esac
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | mingw* | windows* | pw32* | cegcc*)
case $GXX,$cc_basename in
,cl* | no,cl* | ,icl* | no,icl*)
# Native MSVC or ICC
@@ -6703,6 +6850,7 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
_LT_TAGVAR(always_export_symbols, $1)=no
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
@@ -6749,7 +6897,7 @@ if test yes != "$_lt_caught_CXX_error"; then
cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
emximp -o $lib $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
_LT_TAGVAR(file_list_spec, $1)='@'
;;
@@ -6790,7 +6938,7 @@ if test yes != "$_lt_caught_CXX_error"; then
haiku*)
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=no
;;
hpux9*)
@@ -6817,7 +6965,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "[[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
if test yes = "$GXX"; then
@@ -6882,7 +7030,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " [[-]]L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
if test yes = "$GXX"; then
@@ -7114,6 +7262,10 @@ if test yes != "$_lt_caught_CXX_error"; then
esac
;;
+ *-mlibc)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
@@ -7130,7 +7282,7 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(ld_shlibs, $1)=yes
;;
- openbsd* | bitrig*)
+ openbsd*)
if test -f /usr/libexec/ld.so; then
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
@@ -7221,7 +7373,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
else
# FIXME: insert proper C++ library support
@@ -7236,6 +7388,9 @@ if test yes != "$_lt_caught_CXX_error"; then
_LT_TAGVAR(ld_shlibs, $1)=no
;;
+ serenity*)
+ ;;
+
sunos4*)
case $cc_basename in
CC*)
@@ -7305,7 +7460,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
else
# g++ 2.7 appears to require '-G' NOT '-shared' on this
# platform.
@@ -7316,7 +7471,7 @@ if test yes != "$_lt_caught_CXX_error"; then
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " [[-]]L"'
fi
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
@@ -7554,10 +7709,11 @@ if AC_TRY_EVAL(ac_compile); then
case $prev$p in
-L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
+ # Some compilers place space between "-{L,R,l}" and the path.
# Remove the space.
- if test x-L = "$p" ||
- test x-R = "$p"; then
+ if test x-L = x"$p" ||
+ test x-R = x"$p" ||
+ test x-l = x"$p"; then
prev=$p
continue
fi
@@ -8215,7 +8371,7 @@ AC_SUBST([DLLTOOL])
# ----------------
# Check for a file(cmd) program that can be used to detect file type and magic
m4_defun([_LT_DECL_FILECMD],
-[AC_CHECK_TOOL([FILECMD], [file], [:])
+[AC_CHECK_PROG([FILECMD], [file], [file], [:])
_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
])# _LD_DECL_FILECMD
@@ -8231,73 +8387,6 @@ _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
[Sed that helps us avoid accidentally triggering echo(1) options like -n])
])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-############################################################
-# NOTE: This macro has been submitted for inclusion into #
-# GNU Autoconf as AC_PROG_SED. When it is available in #
-# a released version of Autoconf we should remove this #
-# macro and use it instead. #
-############################################################
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f "$lt_ac_sed" && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test 10 -lt "$lt_ac_count" && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test "$lt_ac_count" -gt "$lt_ac_max"; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([LT_AC_PROG_SED], [])
@@ -8344,7 +8433,7 @@ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
[case $host in
*-*-mingw* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
;;
*-*-cygwin* )
@@ -8357,7 +8446,7 @@ AC_CACHE_VAL(lt_cv_to_host_file_cmd,
;;
*-*-cygwin* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
;;
*-*-cygwin* )
@@ -8383,9 +8472,9 @@ AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
[#assume ordinary cross tools, or native build.
lt_cv_to_tool_file_cmd=func_convert_file_noop
case $host in
- *-*-mingw* )
+ *-*-mingw* | *-*-windows* )
case $build in
- *-*-mingw* ) # actually msys
+ *-*-mingw* | *-*-windows* ) # actually msys
lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
;;
esac
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index b0b5e9c..25caa89 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -1,6 +1,6 @@
# Helper functions for option handling. -*- Autoconf -*-
#
-# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
+# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2024 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 8 ltoptions.m4
+# serial 10 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* | *-*-pw32* | *-*-cegcc*)
+*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
@@ -323,29 +323,39 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_AIX_SONAME([DEFAULT])
# ----------------------------------
-# 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'.
+# 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'.
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_WITH([aix-soname],
- [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+ AC_ARG_ENABLE([aix-soname],
+ [AS_HELP_STRING([--enable-aix-soname=aix|svr4|both],
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
- [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])
+ [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
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
@@ -376,30 +386,50 @@ LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
# _LT_WITH_PIC([MODE])
# --------------------
-# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
+# implement the --enable-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_WITH([pic],
- [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+[AC_ARG_ENABLE([pic],
+ [AS_HELP_STRING([--enable-pic@<:@=PKGS@:>@],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[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 $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])])]
+ )
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
index 902508b..5b5c80a 100644
--- a/m4/ltsugar.m4
+++ b/m4/ltsugar.m4
@@ -1,6 +1,6 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
+# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2024 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
index b155d0a..228df3f 100644
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@ -1,6 +1,6 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
-# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
+# Copyright (C) 2004, 2011-2019, 2021-2024 Free Software Foundation,
# Inc.
# Written by Scott James Remnant, 2004
#
@@ -10,15 +10,15 @@
# @configure_input@
-# serial 4245 ltversion.m4
+# serial 4441 ltversion.m4
# This file is part of GNU Libtool
-m4_define([LT_PACKAGE_VERSION], [2.4.7])
-m4_define([LT_PACKAGE_REVISION], [2.4.7])
+m4_define([LT_PACKAGE_VERSION], [2.5.4])
+m4_define([LT_PACKAGE_REVISION], [2.5.4])
AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.4.7'
-macro_revision='2.4.7'
+[macro_version='2.5.4'
+macro_revision='2.5.4'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
index 0f7a875..22b5346 100644
--- a/m4/lt~obsolete.m4
+++ b/m4/lt~obsolete.m4
@@ -1,6 +1,6 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
-# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
+# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2024 Free
# Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
diff --git a/src/Makefile.am b/src/Makefile.am
index 11a240e..2e26d7e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -9,8 +9,8 @@ libHX_la_SOURCES = deque.c dl.c format.c io.c map.c \
mc.c misc.c opt.c proc.c \
rand.c socket.c string.c time.c
libHX_la_LIBADD = ${libdl_LIBS} -lm ${libpthread_LIBS} ${librt_LIBS} ${libsocket_LIBS}
-libHX_la_LDFLAGS = -no-undefined -version-info 39:0:7
-if WITH_GNU_LD
+libHX_la_LDFLAGS = -no-undefined -version-info 43:0:0
+if WITH_LDSYM
libHX_la_LDFLAGS += -Wl,--version-script=${srcdir}/libHX.map
endif
if WITH_SUN_LD
@@ -60,7 +60,7 @@ if HAVE_CXX
check_PROGRAMS += tx-compile tx-cast tx-deque tx-dir \
tx-intdiff tx-list tx-list2 \
tx-misc tx-netio \
- tx-option tx-proc tx-rand tx-strchr2 tx-string \
+ tx-proc tx-rand tx-strchr2 tx-string \
tx-strquote tx-time
TESTS += tx-strchr2 tx-strquote
tx_cast_SOURCES = tx-cast.cpp
@@ -80,8 +80,6 @@ tx_misc_SOURCES = tx-misc.cpp
tx_misc_LDADD = libHX.la
tx_netio_SOURCES = tx-netio.cpp
tx_netio_LDADD = libHX.la ${libsocket_LIBS}
-tx_option_SOURCES = tx-option.cpp
-tx_option_LDADD = libHX.la
tx_proc_SOURCES = tx-proc.cpp
tx_proc_LDADD = libHX.la
tx_rand_SOURCES = tx-rand.cpp
diff --git a/src/Makefile.in b/src/Makefile.in
index 22766b5..9cbd614 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# Makefile.in generated by automake 1.18.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2021 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,
@@ -72,6 +72,8 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+am__rm_f = rm -f $(am__rm_f_notfound)
+am__rm_rf = rm -rf $(am__rm_f_notfound)
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -90,7 +92,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-@WITH_GNU_LD_TRUE@am__append_1 = -Wl,--version-script=${srcdir}/libHX.map
+@WITH_LDSYM_TRUE@am__append_1 = -Wl,--version-script=${srcdir}/libHX.map
@WITH_SUN_LD_TRUE@am__append_2 = -Wl,-M,${srcdir}/libHX.map
@MINGW32_TRUE@am__append_3 = ux-file.c ux-mmap.c
@MINGW32_TRUE@am__append_4 = -lws2_32
@@ -108,7 +110,7 @@ TESTS = tc-format$(EXEEXT) tc-option$(EXEEXT) tc-strchr2$(EXEEXT) \
@HAVE_CXX_TRUE@am__append_5 = tx-compile tx-cast tx-deque tx-dir \
@HAVE_CXX_TRUE@ tx-intdiff tx-list tx-list2 \
@HAVE_CXX_TRUE@ tx-misc tx-netio \
-@HAVE_CXX_TRUE@ tx-option tx-proc tx-rand tx-strchr2 tx-string \
+@HAVE_CXX_TRUE@ tx-proc tx-rand tx-strchr2 tx-string \
@HAVE_CXX_TRUE@ tx-strquote tx-time
@HAVE_CXX_TRUE@am__append_6 = tx-strchr2 tx-strquote
@@ -129,10 +131,10 @@ CONFIG_CLEAN_VPATH_FILES =
@HAVE_CXX_TRUE@ tx-deque$(EXEEXT) tx-dir$(EXEEXT) \
@HAVE_CXX_TRUE@ tx-intdiff$(EXEEXT) tx-list$(EXEEXT) \
@HAVE_CXX_TRUE@ tx-list2$(EXEEXT) tx-misc$(EXEEXT) \
-@HAVE_CXX_TRUE@ tx-netio$(EXEEXT) tx-option$(EXEEXT) \
-@HAVE_CXX_TRUE@ tx-proc$(EXEEXT) tx-rand$(EXEEXT) \
-@HAVE_CXX_TRUE@ tx-strchr2$(EXEEXT) tx-string$(EXEEXT) \
-@HAVE_CXX_TRUE@ tx-strquote$(EXEEXT) tx-time$(EXEEXT)
+@HAVE_CXX_TRUE@ tx-netio$(EXEEXT) tx-proc$(EXEEXT) \
+@HAVE_CXX_TRUE@ tx-rand$(EXEEXT) tx-strchr2$(EXEEXT) \
+@HAVE_CXX_TRUE@ tx-string$(EXEEXT) tx-strquote$(EXEEXT) \
+@HAVE_CXX_TRUE@ tx-time$(EXEEXT)
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -155,10 +157,9 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
- test -z "$$files" \
- || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
- || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
- $(am__cd) "$$dir" && rm -f $$files; }; \
+ { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && echo $$files | $(am__xargs_n) 40 $(am__rm_f); }; \
}
am__installdirs = "$(DESTDIR)$(libdir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
@@ -295,10 +296,6 @@ am__tx_netio_SOURCES_DIST = tx-netio.cpp
@HAVE_CXX_TRUE@am_tx_netio_OBJECTS = tx-netio.$(OBJEXT)
tx_netio_OBJECTS = $(am_tx_netio_OBJECTS)
@HAVE_CXX_TRUE@tx_netio_DEPENDENCIES = libHX.la $(am__DEPENDENCIES_1)
-am__tx_option_SOURCES_DIST = tx-option.cpp
-@HAVE_CXX_TRUE@am_tx_option_OBJECTS = tx-option.$(OBJEXT)
-tx_option_OBJECTS = $(am_tx_option_OBJECTS)
-@HAVE_CXX_TRUE@tx_option_DEPENDENCIES = libHX.la
am__tx_proc_SOURCES_DIST = tx-proc.cpp
@HAVE_CXX_TRUE@am_tx_proc_OBJECTS = tx-proc.$(OBJEXT)
tx_proc_OBJECTS = $(am_tx_proc_OBJECTS)
@@ -359,11 +356,11 @@ am__depfiles_remade = ./$(DEPDIR)/deque.Plo ./$(DEPDIR)/dl.Plo \
./$(DEPDIR)/tx-deque.Po ./$(DEPDIR)/tx-dir.Po \
./$(DEPDIR)/tx-intdiff.Po ./$(DEPDIR)/tx-list.Po \
./$(DEPDIR)/tx-misc.Po ./$(DEPDIR)/tx-netio.Po \
- ./$(DEPDIR)/tx-option.Po ./$(DEPDIR)/tx-proc.Po \
- ./$(DEPDIR)/tx-rand.Po ./$(DEPDIR)/tx-strchr2.Po \
- ./$(DEPDIR)/tx-string.Po ./$(DEPDIR)/tx-strquote.Po \
- ./$(DEPDIR)/tx-time.Po ./$(DEPDIR)/tx_list2-tx-list2.Po \
- ./$(DEPDIR)/ux-file.Plo ./$(DEPDIR)/ux-mmap.Plo
+ ./$(DEPDIR)/tx-proc.Po ./$(DEPDIR)/tx-rand.Po \
+ ./$(DEPDIR)/tx-strchr2.Po ./$(DEPDIR)/tx-string.Po \
+ ./$(DEPDIR)/tx-strquote.Po ./$(DEPDIR)/tx-time.Po \
+ ./$(DEPDIR)/tx_list2-tx-list2.Po ./$(DEPDIR)/ux-file.Plo \
+ ./$(DEPDIR)/ux-mmap.Plo
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -409,9 +406,8 @@ SOURCES = $(libHX_la_SOURCES) tc-cast.c tc-compile.c tc-deque.c \
$(tx_cast_SOURCES) $(tx_compile_SOURCES) $(tx_deque_SOURCES) \
$(tx_dir_SOURCES) $(tx_intdiff_SOURCES) $(tx_list_SOURCES) \
$(tx_list2_SOURCES) $(tx_misc_SOURCES) $(tx_netio_SOURCES) \
- $(tx_option_SOURCES) $(tx_proc_SOURCES) $(tx_rand_SOURCES) \
- $(tx_strchr2_SOURCES) $(tx_string_SOURCES) \
- $(tx_strquote_SOURCES) $(tx_time_SOURCES)
+ $(tx_proc_SOURCES) $(tx_rand_SOURCES) $(tx_strchr2_SOURCES) \
+ $(tx_string_SOURCES) $(tx_strquote_SOURCES) $(tx_time_SOURCES)
DIST_SOURCES = $(am__libHX_la_SOURCES_DIST) tc-cast.c tc-compile.c \
tc-deque.c tc-dir.c tc-format.c tc-io.c tc-list.c tc-list2.c \
tc-map.c tc-memmem.c tc-misc.c tc-netio.c tc-option.c \
@@ -422,10 +418,9 @@ DIST_SOURCES = $(am__libHX_la_SOURCES_DIST) tc-cast.c tc-compile.c \
$(am__tx_dir_SOURCES_DIST) $(am__tx_intdiff_SOURCES_DIST) \
$(am__tx_list_SOURCES_DIST) $(am__tx_list2_SOURCES_DIST) \
$(am__tx_misc_SOURCES_DIST) $(am__tx_netio_SOURCES_DIST) \
- $(am__tx_option_SOURCES_DIST) $(am__tx_proc_SOURCES_DIST) \
- $(am__tx_rand_SOURCES_DIST) $(am__tx_strchr2_SOURCES_DIST) \
- $(am__tx_string_SOURCES_DIST) $(am__tx_strquote_SOURCES_DIST) \
- $(am__tx_time_SOURCES_DIST)
+ $(am__tx_proc_SOURCES_DIST) $(am__tx_rand_SOURCES_DIST) \
+ $(am__tx_strchr2_SOURCES_DIST) $(am__tx_string_SOURCES_DIST) \
+ $(am__tx_strquote_SOURCES_DIST) $(am__tx_time_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -556,12 +551,13 @@ am__sh_e_setup = case $$- in *e*) set +e;; esac
# Default flags passed to test drivers.
am__common_driver_flags = \
--color-tests "$$am__color_tests" \
+ $$am__collect_skipped_logs \
--enable-hard-errors "$$am__enable_hard_errors" \
--expect-failure "$$am__expect_failure"
# 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).
@@ -580,6 +576,11 @@ if test -f "./$$f"; then dir=./; \
elif test -f "$$f"; then dir=; \
else dir="$(srcdir)/"; fi; \
tst=$$dir$$f; log='$@'; \
+if test -n '$(IGNORE_SKIPPED_LOGS)'; then \
+ am__collect_skipped_logs='--collect-skipped-logs no'; \
+else \
+ am__collect_skipped_logs=''; \
+fi; \
if test -n '$(DISABLE_HARD_ERRORS)'; then \
am__enable_hard_errors=no; \
else \
@@ -712,8 +713,10 @@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
+am__rm_f_notfound = @am__rm_f_notfound@
am__tar = @am__tar@
am__untar = @am__untar@
+am__xargs_n = @am__xargs_n@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@@ -771,7 +774,7 @@ libHX_la_SOURCES = deque.c dl.c format.c io.c map.c mc.c misc.c opt.c \
proc.c rand.c socket.c string.c time.c $(am__append_3)
libHX_la_LIBADD = ${libdl_LIBS} -lm ${libpthread_LIBS} ${librt_LIBS} \
${libsocket_LIBS} $(am__append_4)
-libHX_la_LDFLAGS = -no-undefined -version-info 39:0:7 $(am__append_1) \
+libHX_la_LDFLAGS = -no-undefined -version-info 43:0:0 $(am__append_1) \
$(am__append_2)
EXTRA_libHX_la_DEPENDENCIES = libHX.map
EXTRA_DIST = internal.h map_int.h libHX.map uxcompat.h analyze.sh
@@ -816,8 +819,6 @@ tc_time_LDADD = libHX.la
@HAVE_CXX_TRUE@tx_misc_LDADD = libHX.la
@HAVE_CXX_TRUE@tx_netio_SOURCES = tx-netio.cpp
@HAVE_CXX_TRUE@tx_netio_LDADD = libHX.la ${libsocket_LIBS}
-@HAVE_CXX_TRUE@tx_option_SOURCES = tx-option.cpp
-@HAVE_CXX_TRUE@tx_option_LDADD = libHX.la
@HAVE_CXX_TRUE@tx_proc_SOURCES = tx-proc.cpp
@HAVE_CXX_TRUE@tx_proc_LDADD = libHX.la
@HAVE_CXX_TRUE@tx_rand_SOURCES = tx-rand.cpp
@@ -865,13 +866,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
clean-checkPROGRAMS:
- @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
- echo " rm -f" $$list; \
- rm -f $$list || exit $$?; \
- test -n "$(EXEEXT)" || exit 0; \
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
+ $(am__rm_f) $(check_PROGRAMS)
+ test -z "$(EXEEXT)" || $(am__rm_f) $(check_PROGRAMS:$(EXEEXT)=)
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
@@ -898,15 +894,13 @@ uninstall-libLTLIBRARIES:
done
clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ -$(am__rm_f) $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
- test -z "$$locs" || { \
- echo rm -f $${locs}; \
- rm -f $${locs}; \
- }
+ echo rm -f $${locs}; \
+ $(am__rm_f) $${locs}
libHX.la: $(libHX_la_OBJECTS) $(libHX_la_DEPENDENCIES) $(EXTRA_libHX_la_DEPENDENCIES)
$(AM_V_CCLD)$(libHX_la_LINK) -rpath $(libdir) $(libHX_la_OBJECTS) $(libHX_la_LIBADD) $(LIBS)
@@ -1039,10 +1033,6 @@ tx-netio$(EXEEXT): $(tx_netio_OBJECTS) $(tx_netio_DEPENDENCIES) $(EXTRA_tx_netio
@rm -f tx-netio$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(tx_netio_OBJECTS) $(tx_netio_LDADD) $(LIBS)
-tx-option$(EXEEXT): $(tx_option_OBJECTS) $(tx_option_DEPENDENCIES) $(EXTRA_tx_option_DEPENDENCIES)
- @rm -f tx-option$(EXEEXT)
- $(AM_V_CXXLD)$(CXXLINK) $(tx_option_OBJECTS) $(tx_option_LDADD) $(LIBS)
-
tx-proc$(EXEEXT): $(tx_proc_OBJECTS) $(tx_proc_DEPENDENCIES) $(EXTRA_tx_proc_DEPENDENCIES)
@rm -f tx-proc$(EXEEXT)
$(AM_V_CXXLD)$(CXXLINK) $(tx_proc_OBJECTS) $(tx_proc_LDADD) $(LIBS)
@@ -1117,7 +1107,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tx-list.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tx-misc.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tx-netio.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tx-option.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tx-proc.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tx-rand.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tx-strchr2.Po@am__quote@ # am--include-marker
@@ -1130,7 +1119,7 @@ distclean-compile:
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
- @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+ @: >>$@
am--depfiles: $(am__depfiles_remade)
@@ -1295,7 +1284,6 @@ distclean-tags:
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
am--force-recheck:
@:
-
$(TEST_SUITE_LOG): $(TEST_LOGS)
@$(am__set_TESTS_bases); \
am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
@@ -1371,10 +1359,37 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
result_count $$1 "XPASS:" $$xpass "$$red"; \
result_count $$1 "ERROR:" $$error "$$mgn"; \
}; \
+ output_system_information () \
+ { \
+ echo; \
+ { uname -a | $(AWK) '{ \
+ printf "System information (uname -a):"; \
+ for (i = 1; i < NF; ++i) \
+ { \
+ if (i != 2) \
+ printf " %s", $$i; \
+ } \
+ printf "\n"; \
+}'; } 2>&1; \
+ if test -r /etc/os-release; then \
+ echo "Distribution information (/etc/os-release):"; \
+ sed 8q /etc/os-release; \
+ elif test -r /etc/issue; then \
+ echo "Distribution information (/etc/issue):"; \
+ cat /etc/issue; \
+ fi; \
+ }; \
+ please_report () \
+ { \
+echo "Some test(s) failed. Please report this to $(PACKAGE_BUGREPORT),"; \
+echo "together with the test-suite.log file (gzipped) and your system"; \
+echo "information. Thanks."; \
+ }; \
{ \
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
$(am__rst_title); \
create_testsuite_report --no-color; \
+ output_system_information; \
echo; \
echo ".. contents:: :depth: 2"; \
echo; \
@@ -1394,26 +1409,25 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
create_testsuite_report --maybe-color; \
echo "$$col$$br$$std"; \
if $$success; then :; else \
- echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG) for debugging.$${std}";\
if test -n "$(PACKAGE_BUGREPORT)"; then \
- echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
+ please_report | sed -e "s/^/$${col}/" -e s/'$$'/"$${std}"/; \
fi; \
echo "$$col$$br$$std"; \
fi; \
$$success || exit 1
check-TESTS: $(check_PROGRAMS)
- @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
- @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
- @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @$(am__rm_f) $(RECHECK_LOGS)
+ @$(am__rm_f) $(RECHECK_LOGS:.log=.trs)
+ @$(am__rm_f) $(TEST_SUITE_LOG)
@set +e; $(am__set_TESTS_bases); \
log_list=`for i in $$bases; do echo $$i.log; done`; \
- trs_list=`for i in $$bases; do echo $$i.trs; done`; \
- log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ log_list=`echo $$log_list`; \
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
exit $$?;
recheck: all $(check_PROGRAMS)
- @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @$(am__rm_f) $(TEST_SUITE_LOG)
@set +e; $(am__set_TESTS_bases); \
bases=`for i in $$bases; do echo $$i; done \
| $(am__list_recheck_tests)` || exit 1; \
@@ -1486,6 +1500,7 @@ tx-strquote.log: tx-strquote$(EXEEXT)
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
+
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
@@ -1550,15 +1565,15 @@ install-strip:
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
- -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
- -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
- -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ -$(am__rm_f) $(TEST_LOGS)
+ -$(am__rm_f) $(TEST_LOGS:.log=.trs)
+ -$(am__rm_f) $(TEST_SUITE_LOG)
clean-generic:
distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
- -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -$(am__rm_f) $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || $(am__rm_f) $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -1569,7 +1584,7 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \
clean-libtool mostlyclean-am
distclean: distclean-am
- -rm -f ./$(DEPDIR)/deque.Plo
+ -rm -f ./$(DEPDIR)/deque.Plo
-rm -f ./$(DEPDIR)/dl.Plo
-rm -f ./$(DEPDIR)/format.Plo
-rm -f ./$(DEPDIR)/io.Plo
@@ -1613,7 +1628,6 @@ distclean: distclean-am
-rm -f ./$(DEPDIR)/tx-list.Po
-rm -f ./$(DEPDIR)/tx-misc.Po
-rm -f ./$(DEPDIR)/tx-netio.Po
- -rm -f ./$(DEPDIR)/tx-option.Po
-rm -f ./$(DEPDIR)/tx-proc.Po
-rm -f ./$(DEPDIR)/tx-rand.Po
-rm -f ./$(DEPDIR)/tx-strchr2.Po
@@ -1668,7 +1682,7 @@ install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
- -rm -f ./$(DEPDIR)/deque.Plo
+ -rm -f ./$(DEPDIR)/deque.Plo
-rm -f ./$(DEPDIR)/dl.Plo
-rm -f ./$(DEPDIR)/format.Plo
-rm -f ./$(DEPDIR)/io.Plo
@@ -1712,7 +1726,6 @@ maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/tx-list.Po
-rm -f ./$(DEPDIR)/tx-misc.Po
-rm -f ./$(DEPDIR)/tx-netio.Po
- -rm -f ./$(DEPDIR)/tx-option.Po
-rm -f ./$(DEPDIR)/tx-proc.Po
-rm -f ./$(DEPDIR)/tx-rand.Po
-rm -f ./$(DEPDIR)/tx-strchr2.Po
@@ -1764,3 +1777,10 @@ uninstall-am: uninstall-libLTLIBRARIES
# 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:
+
+# Tell GNU make to disable its built-in pattern rules.
+%:: %,v
+%:: RCS/%,v
+%:: RCS/%
+%:: s.%
+%:: SCCS/s.%
diff --git a/src/deque.c b/src/deque.c
index bc39e0e..4124d1a 100644
--- a/src/deque.c
+++ b/src/deque.c
@@ -1,6 +1,6 @@
/*
* Double-ended queues
- * Copyright Jan Engelhardt, 2002-2008
+ * Copyright Jan Engelhardt, 2025
*
* This file is part of libHX. libHX is free software; you can
* redistribute it and/or modify it under the terms of the GNU Lesser
@@ -8,7 +8,9 @@
* either version 2.1 or (at your option) any later version.
*/
#include <errno.h>
+#include <limits.h>
#include <stdarg.h>
+#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <libHX/deque.h>
@@ -162,22 +164,62 @@ EXPORT_SYMBOL void HXdeque_genocide2(struct HXdeque *dq, void (*xfree)(void *))
free(dq);
}
-EXPORT_SYMBOL void **
-HXdeque_to_vec(const struct HXdeque *dq, unsigned int *num)
+static void **
+HXdeque_to_veci(const struct HXdeque *dq, size_t *num, bool sentinel)
{
const struct HXdeque_node *trav;
void **ret, **p;
- ret = malloc((dq->items + 1) * sizeof(void *));
+ ret = malloc((dq->items + sentinel) * sizeof(void *));
if (ret == NULL)
return NULL;
p = ret;
for (trav = dq->first; trav != NULL; trav = trav->next)
*p++ = trav->ptr;
- *p = NULL;
+ if (sentinel)
+ *p = NULL;
if (num != NULL)
*num = dq->items;
return ret;
}
+
+EXPORT_SYMBOL void **
+HXdeque_to_vec(const struct HXdeque *dq, size_t *num)
+{
+ return HXdeque_to_veci(dq, num, true);
+}
+
+EXPORT_SYMBOL void **
+HXdeque_to_vecx(const struct HXdeque *dq, size_t *num)
+{
+ return HXdeque_to_veci(dq, num, false);
+}
+
+char **HXdeque_to_vec_strdup(const struct HXdeque *dq, size_t *num)
+{
+ const struct HXdeque_node *iter;
+ char **ret, **p;
+ int se;
+
+ ret = malloc((dq->items + 1) * sizeof(char *));
+ if (ret == nullptr)
+ return nullptr;
+ p = ret;
+ for (iter = dq->first; iter != nullptr; ++p, iter = iter->next) {
+ *p = strdup(iter->ptr);
+ if (*p == nullptr)
+ goto out;
+ }
+ *p = nullptr;
+ if (num != nullptr)
+ *num = dq->items;
+ return ret;
+
+ out:
+ se = errno;
+ HX_zvecfree(ret);
+ errno = se;
+ return nullptr;
+}
diff --git a/src/format.c b/src/format.c
index e924c6a..985a527 100644
--- a/src/format.c
+++ b/src/format.c
@@ -20,9 +20,6 @@
#undef HXformat_aprintf
#undef HXformat_fprintf
#undef HXformat_sprintf
-extern int HXformat_aprintf(const struct HXformat_map *, hxmc_t **, const char *);
-extern int HXformat_sprintf(const struct HXformat_map *, char *, size_t, const char *);
-extern int HXformat_fprintf(const struct HXformat_map *, FILE *, const char *);
/* To make it easier on the highlighter */
#define C_OPEN '('
@@ -380,7 +377,7 @@ static hxmc_t *HXformat2_xcall(const char *name, const char **pptr,
hxmc_t *ret, *ret2, **argv;
struct HXdeque *dq;
const char *s, *delim;
- int err = 0;
+ ssize_t err = 0;
dq = HXdeque_init();
if (dq == NULL)
@@ -563,13 +560,13 @@ HXformat2_xany(const char **pptr, const struct HXformat_map *blk)
/* Closing parenthesis - variable */
const struct fmt_entry *entry;
hxmc_t *new_name = NULL;
- int eret;
+ ssize_t eret;
*pptr = ++s;
eret = HXformat_aprintf(blk, &new_name, name);
if (eret <= 0) {
ret = NULL;
- } else if (*new_name == '\0') {
+ } else if (new_name == nullptr || *new_name == '\0') {
ret = &HXformat2_nexp;
} else {
entry = HXmap_get(blk->vars, new_name);
@@ -630,14 +627,7 @@ EXPORT_SYMBOL struct HXformat_map *HXformat_init(void)
return NULL;
}
-EXPORT_SYMBOL int HXformat_aprintf(const struct HXformat_map *blk,
- hxmc_t **resultp, const char *fmt)
-{
- ssize_t ret = HXformat3_aprintf(blk, resultp, fmt);
- return ret > INT_MAX ? INT_MAX : ret;
-}
-
-EXPORT_SYMBOL ssize_t HXformat3_aprintf(const struct HXformat_map *blk,
+EXPORT_SYMBOL ssize_t HXformat_aprintf(const struct HXformat_map *blk,
hxmc_t **resultp, const char *fmt)
{
hxmc_t *ex, *ts, *out;
@@ -686,20 +676,13 @@ EXPORT_SYMBOL ssize_t HXformat3_aprintf(const struct HXformat_map *blk,
return ret;
}
-EXPORT_SYMBOL int HXformat_fprintf(const struct HXformat_map *ftable,
- FILE *filp, const char *fmt)
-{
- ssize_t ret = HXformat3_fprintf(ftable, filp, fmt);
- return ret > INT_MAX ? INT_MAX : ret;
-}
-
-EXPORT_SYMBOL ssize_t HXformat3_fprintf(const struct HXformat_map *ftable,
+EXPORT_SYMBOL ssize_t HXformat_fprintf(const struct HXformat_map *ftable,
FILE *filp, const char *fmt)
{
hxmc_t *str;
ssize_t ret;
- if ((ret = HXformat3_aprintf(ftable, &str, fmt)) <= 0)
+ if ((ret = HXformat_aprintf(ftable, &str, fmt)) <= 0)
return ret;
errno = 0;
if (fputs(str, filp) < 0)
@@ -708,14 +691,7 @@ EXPORT_SYMBOL ssize_t HXformat3_fprintf(const struct HXformat_map *ftable,
return ret;
}
-EXPORT_SYMBOL int HXformat_sprintf(const struct HXformat_map *ftable,
- char *dest, size_t size, const char *fmt)
-{
- ssize_t ret = HXformat3_sprintf(ftable, dest, size, fmt);
- return ret > INT_MAX ? INT_MAX : ret;
-}
-
-EXPORT_SYMBOL ssize_t HXformat3_sprintf(const struct HXformat_map *ftable,
+EXPORT_SYMBOL ssize_t HXformat_sprintf(const struct HXformat_map *ftable,
char *dest, size_t size, const char *fmt)
{
hxmc_t *str = nullptr;
diff --git a/src/internal.h b/src/internal.h
index f7d83d8..2f5aa8f 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -50,9 +50,11 @@ struct memcont {
char data[];
};
+struct HXdeque;
struct timespec;
struct timeval;
+extern char **HXdeque_to_vec_strdup(const struct HXdeque *, size_t *);
extern hxmc_t *HXparse_dequote_fmt(const char *, const char *, const char **);
extern size_t HX_substr_helper(size_t, long, long, size_t *);
diff --git a/src/io.c b/src/io.c
index 9199d03..ee47f5a 100644
--- a/src/io.c
+++ b/src/io.c
@@ -65,8 +65,14 @@ static int mkdir_gen(const char *d, unsigned int mode)
if (mkdir(d, mode) == 0) /* use umask() for permissions */
#endif
return 1;
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ /* Undocumented extra error codes */
+ if (errno != EEXIST && errno != EISDIR)
+ return -errno;
+#else
if (errno != EEXIST)
return -errno;
+#endif
if (stat(d, &sb) == 0) {
#if defined(_WIN32)
if (sb.st_mode & S_IFDIR)
@@ -98,7 +104,7 @@ EXPORT_SYMBOL struct HXdir *HXdir_open(const char *s)
* and bug-concealing "char d_name[256]", while on Solaris, it is a
* proper "char d_name[]".
*/
- size_t size = sizeof(*d);
+ size_t size = offsetof(struct dirent, d_name);
ssize_t name_max;
DIR *tmp_dh = opendir(s);
if (tmp_dh == NULL)
@@ -110,7 +116,6 @@ EXPORT_SYMBOL struct HXdir *HXdir_open(const char *s)
*/
name_max = fpathconf(dirfd(tmp_dh), _PC_NAME_MAX);
if (name_max > 0) {
- size -= sizeof(struct dirent) - offsetof(struct dirent, d_name);
size += name_max + 1;
} else {
#ifdef NAME_MAX
@@ -351,12 +356,17 @@ EXPORT_SYMBOL int HX_readlink(hxmc_t **target, const char *path)
size_t linkbuf_size;
if (allocate) {
- linkbuf_size = 32;
- *target = HXmc_meminit(NULL, 32);
+ linkbuf_size = 128;
+ *target = HXmc_meminit(nullptr, 128);
if (*target == NULL)
return -errno;
} else {
linkbuf_size = HXmc_length(*target);
+ if (linkbuf_size < 128) {
+ linkbuf_size = 128;
+ if (HXmc_setlen(target, 128) == nullptr)
+ return -errno;
+ }
}
while (true) {
ssize_t ret = readlink(path, *target, linkbuf_size);
@@ -373,6 +383,8 @@ EXPORT_SYMBOL int HX_readlink(hxmc_t **target, const char *path)
HXmc_setlen(target, ret); // \0 set here anyway
return ret;
}
+ if (linkbuf_size > SIZE_MAX / 2)
+ return -E2BIG;
linkbuf_size *= 2;
if (HXmc_setlen(target, linkbuf_size) == NULL) {
int saved_errno = errno;
@@ -453,6 +465,48 @@ HX_realpath_symres(struct HX_realpath_state *state, const char *path)
return 1;
}
+EXPORT_SYMBOL int HX_getcwd(hxmc_t **target)
+{
+ bool allocate = *target == nullptr;
+ size_t linkbuf_size;
+
+ if (allocate) {
+ linkbuf_size = 128;
+ *target = HXmc_meminit(nullptr, linkbuf_size);
+ if (*target == nullptr)
+ return -errno;
+ } else {
+ linkbuf_size = HXmc_length(*target);
+ if (linkbuf_size < 128) {
+ linkbuf_size = 128;
+ if (HXmc_setlen(target, linkbuf_size) == nullptr)
+ return -errno;
+ }
+ }
+ while (true) {
+ const char *ret = getcwd(*target, linkbuf_size);
+ if (ret != nullptr) {
+ HXmc_setlen(target, strlen(ret)); /* shrink to fit */
+ return 1;
+ }
+ if (errno == ERANGE) {
+ if (linkbuf_size > SIZE_MAX / 2)
+ return -E2BIG;
+ linkbuf_size *= 2;
+ if (HXmc_setlen(target, linkbuf_size) != nullptr)
+ continue;
+ /* errno already set by realloc, fall into next if block */
+ }
+ int saved_errno = errno;
+ if (allocate) {
+ HXmc_free(*target);
+ *target = nullptr;
+ }
+ return -(errno = saved_errno);
+ }
+ return -EINVAL;
+}
+
EXPORT_SYMBOL int HX_realpath(hxmc_t **dest_pptr, const char *path,
unsigned int flags)
{
@@ -462,7 +516,7 @@ EXPORT_SYMBOL int HX_realpath(hxmc_t **dest_pptr, const char *path,
int ret = 0;
if (dnull) {
- state.dest = HXmc_meminit(NULL, PATH_MAX);
+ state.dest = HXmc_meminit(NULL, 256);
if (state.dest == NULL)
goto err;
}
@@ -470,11 +524,9 @@ EXPORT_SYMBOL int HX_realpath(hxmc_t **dest_pptr, const char *path,
if (*path == '/') {
rq_slash = true;
} else if (flags & HX_REALPATH_ABSOLUTE) {
- if (getcwd(state.dest, PATH_MAX) == NULL)
+ if (HX_getcwd(&state.dest) < 0)
goto err;
rq_slash = true;
- if (HXmc_setlen(&state.dest, strlen(state.dest)) == NULL)
- goto err;
}
while (*path != '\0') {
@@ -541,6 +593,8 @@ EXPORT_SYMBOL int HX_realpath(hxmc_t **dest_pptr, const char *path,
/* If caller supplied a buffer, do not take it away. */
HXmc_free(state.dest);
*dest_pptr = NULL;
+ } else {
+ *dest_pptr = state.dest;
}
HXmc_free(state.link_target);
HXmc_free(state.new_path);
@@ -733,16 +787,18 @@ EXPORT_SYMBOL char *HX_slurp_fd(int fd, size_t *outsize)
char *buf = malloc(bufsize);
if (buf == nullptr)
return nullptr;
- ssize_t rdret;
- while ((rdret = read(fd, buf + offset, bufsize - 1 - offset)) > 0) {
+ do {
+ assert(offset < bufsize);
+ ssize_t rdret = read(fd, buf + offset, bufsize - 1 - offset);
+ if (rdret <= 0)
+ break;
offset += rdret;
- /*
- * Make it so that the next read call is not called
- * with an exceptionally small size.
- */
if (bufsize - offset >= 4095)
+ /* 4K room still, just continue reading. */
continue;
- if (bufsize > SSIZE_MAX)
+
+ /* Less than 4K room, enlarge now */
+ if (bufsize > SIZE_MAX / 2)
/* No more doubling */
break;
bufsize *= 2;
@@ -754,7 +810,7 @@ EXPORT_SYMBOL char *HX_slurp_fd(int fd, size_t *outsize)
return nullptr;
}
buf = nbuf;
- }
+ } while (true);
buf[offset] = '\0';
if (outsize != nullptr)
*outsize = offset;
diff --git a/src/libHX.map b/src/libHX.map
index 374a881..1154304 100644
--- a/src/libHX.map
+++ b/src/libHX.map
@@ -1,4 +1,4 @@
-LIBHX_3.25 {
+LIBHX_5.0 {
global:
HX_basename;
HX_basename_exact;
@@ -15,7 +15,6 @@ global:
HX_ffs;
HX_fls;
HX_getl;
- HX_getopt;
HX_getopt_help;
HX_getopt_help_cb;
HX_getopt_usage;
@@ -36,7 +35,6 @@ global:
HX_split;
HX_split_fixed;
HX_split_inplace;
- HX_stpltrim;
HX_strbchr;
HX_strchr2;
HX_strclone;
@@ -54,7 +52,6 @@ global:
HX_strrev;
HX_strrtrim;
HX_strsep2;
- HX_strsep;
HX_strupper;
HX_time_compare;
HX_timespec_add;
@@ -123,63 +120,35 @@ global:
HXproc_run_async;
HXproc_run_sync;
HXproc_wait;
-local:
- *;
-};
-
-LIBHX_3.27 {
-global:
HX_socket_from_env;
HX_slurp_fd;
HX_slurp_file;
HXproc_switch_user;
HXproc_top_fd;
-} LIBHX_3.25;
-
-LIBHX_4.2 {
-global:
HX_strtod_unit;
HX_strtoull_unit;
HX_unit_size;
HX_unit_size_cu;
-} LIBHX_3.27;
-
-LIBHX_4.3 {
-global:
HX_sendfile;
HX_unit_seconds;
HX_strtoull_sec;
-} LIBHX_4.2;
-
-LIBHX_4.9 {
-global:
- HXformat3_aprintf;
- HXformat3_fprintf;
- HXformat3_sprintf;
+ HXformat_aprintf;
+ HXformat_fprintf;
+ HXformat_sprintf;
HX_ipaddr_is_local;
HX_sockaddr_is_local;
-} LIBHX_4.3;
-
-LIBHX_4.11 {
-global:
HX_addrport_split;
HX_inet_connect;
HX_inet_listen;
HX_local_listen;
-} LIBHX_4.9;
-
-LIBHX_4.15 {
-global:
HX_flpr;
HX_flprf;
-} LIBHX_4.11;
-
-LIBHX_4.16 {
-global:
HX_strtoull_nsec;
-} LIBHX_4.15;
-
-LIBHX_4.18 {
-global:
- HX_getopt5;
-} LIBHX_4.16;
+ HX_getcwd;
+ HX_strtoull8601p_sec;
+ HX_getopt6;
+ HX_getopt6_clean;
+ HXdeque_to_vecx;
+local:
+ *;
+};
diff --git a/src/map_int.h b/src/map_int.h
index 6e95c69..b7d74f8 100644
--- a/src/map_int.h
+++ b/src/map_int.h
@@ -14,7 +14,8 @@ extern "C" {
*/
struct HXmap_private {
/* from struct HXmap */
- unsigned int items, flags;
+ size_t items;
+ unsigned int flags;
/* private: */
enum HXmap_type type;
diff --git a/src/misc.c b/src/misc.c
index c138f23..e0f39fd 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -51,24 +51,24 @@ static __inline__ void hexdump_ascii(FILE *fp, unsigned char c, bool tty)
fprintf(fp, ".");
}
-EXPORT_SYMBOL void HX_hexdump(FILE *fp, const void *vptr, unsigned int len)
+EXPORT_SYMBOL void HX_hexdump(FILE *fp, const void *vptr, size_t len)
{
const unsigned char *ptr = vptr;
- unsigned int i, j;
+ size_t i;
bool tty = isatty(fileno(fp));
- fprintf(fp, "Dumping %u bytes\n", len);
+ fprintf(fp, "Dumping %zu bytes\n", len);
for (i = 0; i < len / 16; ++i) {
- fprintf(fp, "%04x | ", i * 16);
- for (j = 0; j < 16; ++j)
+ fprintf(fp, "%04zx | ", i * 16);
+ for (unsigned int j = 0; j < 16; ++j)
fprintf(fp, "%02x%c", *ptr++, (j == 7) ? '-' : ' ');
ptr -= 16;
fprintf(fp, "| ");
- for (j = 0; j < 16; ++j)
+ for (unsigned int j = 0; j < 16; ++j)
hexdump_ascii(fp, *ptr++, tty);
fprintf(fp, "\n");
}
- fprintf(fp, "%04x | ", i * 16);
+ fprintf(fp, "%04zx | ", i * 16);
len -= i * 16;
for (i = 0; i < len; ++i)
fprintf(fp, "%02x%c", ptr[i], (i == 7) ? '-' : ' ');
diff --git a/src/opt.c b/src/opt.c
index ab482ad..118c159 100644
--- a/src/opt.c
+++ b/src/opt.c
@@ -1,6 +1,6 @@
/*
* libHX/opt.c
- * Copyright Jan Engelhardt, 2002-2011
+ * Copyright Jan Engelhardt, 2025
*
* This file is part of libHX. libHX is free software; you can
* redistribute it and/or modify it under the terms of the GNU Lesser
@@ -8,6 +8,7 @@
* either version 2.1 or (at your option) any later version.
*/
#include <errno.h>
+#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
@@ -119,13 +120,15 @@ enum {
/**
* struct HX_getopt_vars - option parser working variable set
* @arg0: saved program name
- * @remaining: list of extracted non-options
+ * @desc: list of extracted options
+ * @oarg: list of extracted options
+ * @uarg: list of extracted non-options
* @cbi: callback info
* @flags: flags setting the behavior for HX_getopt
*/
struct HX_getopt_vars {
const char *arg0;
- struct HXdeque *remaining;
+ struct HXdeque *desc, *oarg, *uarg;
struct HXoptcb cbi;
unsigned int flags;
};
@@ -218,6 +221,10 @@ static void do_assign(struct HXoptcb *cbi, const char *arg0)
if (opt->ptr != NULL)
*static_cast(char **, opt->ptr) = HX_strdup(cbi->data);
break;
+ case HXTYPE_STRP:
+ if (opt->ptr != nullptr)
+ *static_cast(const char **, opt->ptr) = cbi->data;
+ break;
case HXTYPE_STRDQ:
HXdeque_push(opt->ptr, HX_strdup(cbi->data));
break;
@@ -237,6 +244,15 @@ static void do_assign(struct HXoptcb *cbi, const char *arg0)
opt->cb(cbi);
}
+static int do_assign_front(struct HX_getopt_vars *par)
+{
+ if (HXdeque_push(par->desc, par->cbi.current) == nullptr ||
+ HXdeque_push(par->oarg, par->cbi.data) == nullptr)
+ return -errno;
+ do_assign(&par->cbi, par->arg0);
+ return 0;
+}
+
static __inline__ const struct HXoption *
lookup_short(const struct HXoption *table, char opt)
{
@@ -494,27 +510,14 @@ static int HX_getopt_error(int err, const char *key, unsigned int flags)
return HXOPT_I_ERROR;
}
-static int HX_getopt_twolong(const char *const *opt,
+static int HX_getopt_twolong(const char *key, const char *value,
struct HX_getopt_vars *par)
{
- const char *key = opt[0], *value = opt[1];
-
par->cbi.current = lookup_long_pfx(par->cbi.table, key + 2);
if (par->cbi.current == &HXopt_ambig_prefix)
return HX_getopt_error(HXOPT_E_AMBIG_PREFIX, key, par->flags);
- if (par->cbi.current == NULL) {
- if (par->flags & HXOPT_PTHRU) {
- char *tmp = HX_strdup(key);
- if (tmp == NULL)
- return -errno;
- if (HXdeque_push(par->remaining, tmp) == NULL) {
- free(tmp);
- return -errno;
- }
- return HXOPT_S_NORMAL | HXOPT_I_ADVARG;
- }
+ if (par->cbi.current == nullptr)
return HX_getopt_error(HXOPT_E_LONG_UNKNOWN, key, par->flags);
- }
par->cbi.flags = HXOPTCB_BY_LONG;
if (takes_void(par->cbi.current->type)) {
@@ -550,11 +553,21 @@ static int HX_getopt_long(const char *cur, struct HX_getopt_vars *par)
return -errno;
value = strchr(key, '=');
if (value == nullptr) {
- /* Cannot happen because state is always !S_TWOLONG */
+ /*
+ * Cannot happen because state is always !S_TWOLONG, but make
+ * static analyzers happy.
+ */
free(key);
return -EINVAL;
}
- *value++ = '\0';
+ *value = '\0';
+ value = strchr(cur, '=');
+ if (value == nullptr) {
+ /* Cannot happen either */
+ free(key);
+ return -EINVAL;
+ }
+ ++value;
par->cbi.current = lookup_long_pfx(par->cbi.table, key + 2);
if (par->cbi.current == &HXopt_ambig_prefix) {
ret = HX_getopt_error(HXOPT_E_AMBIG_PREFIX, key, par->flags);
@@ -562,15 +575,6 @@ static int HX_getopt_long(const char *cur, struct HX_getopt_vars *par)
return ret;
}
if (par->cbi.current == NULL) {
- if (par->flags & HXOPT_PTHRU) {
- /* Undo nuke of '=' and reuse alloc */
- value[-1] = '=';
- if (HXdeque_push(par->remaining, key) == NULL) {
- free(key);
- return -errno;
- }
- return HXOPT_S_NORMAL | HXOPT_I_ADVARG;
- }
ret = HX_getopt_error(HXOPT_E_LONG_UNKNOWN, key, par->flags);
free(key);
return ret;
@@ -585,58 +589,48 @@ static int HX_getopt_long(const char *cur, struct HX_getopt_vars *par)
return ret;
}
+ free(key);
par->cbi.flags = HXOPTCB_BY_LONG;
par->cbi.data = value;
- /* Not possible to use %HXOPT_I_ASSIGN due to transience of @key. */
- do_assign(&par->cbi, par->arg0);
- free(key);
+ /*
+ * Not possible to use %HXOPT_I_ASSIGN due to transience of @key. Thus
+ * manually call do_assign now rather than in the superordinate
+ * function.
+ */
+ ret = do_assign_front(par);
+ if (ret < 0)
+ return ret;
return HXOPT_S_NORMAL | HXOPT_I_ADVARG;
}
-static int HX_getopt_short(const char *const *opt, const char *cur,
+static int HX_getopt_short(const char *key, const char *value,
struct HX_getopt_vars *par)
{
- char op = *cur;
+ char op = *key;
if (op == '\0')
return HXOPT_S_NORMAL | HXOPT_I_ADVARG;
par->cbi.current = lookup_short(par->cbi.table, op);
- if (par->cbi.current == NULL) {
- if (par->flags & HXOPT_PTHRU) {
- /*
- * @cur-1 is always valid: it is either the previous
- * char, or it is '-'.
- */
- char *buf = HX_strdup(cur - 1);
- if (buf != NULL)
- *buf = '-';
- if (HXdeque_push(par->remaining, buf) == NULL) {
- free(buf);
- return -errno;
- }
- return HXOPT_S_NORMAL | HXOPT_I_ADVARG;
- }
+ if (par->cbi.current == nullptr)
return HX_getopt_error(HXOPT_E_SHORT_UNKNOWN, &op, par->flags);
- }
par->cbi.flags = HXOPTCB_BY_SHORT;
if (takes_void(par->cbi.current->type)) {
/* -A */
par->cbi.data = NULL;
return HXOPT_S_SHORT | HXOPT_I_ASSIGN | HXOPT_I_ADVCHAR;
- } else if (cur[1] != '\0') {
+ } else if (key[1] != '\0') {
/* -Avalue */
- par->cbi.data = cur + 1;
+ par->cbi.data = key + 1;
return HXOPT_S_NORMAL | HXOPT_I_ASSIGN | HXOPT_I_ADVARG;
}
- cur = *++opt;
if (par->cbi.current->type & HXOPT_OPTIONAL) {
- if (cur == NULL || *cur != '-' ||
- (cur[0] == '-' && cur[1] == '\0')) {
+ if (value == nullptr || *value != '-' ||
+ (value[0] == '-' && value[1] == '\0')) {
/* -f - -f bla */
- par->cbi.data = cur;
+ par->cbi.data = value;
return HXOPT_S_NORMAL | HXOPT_I_ASSIGN | HXOPT_I_ADVARG2;
} else {
/* -f -a-file --another --file -- endofoptions */
@@ -645,41 +639,28 @@ static int HX_getopt_short(const char *const *opt, const char *cur,
}
} else {
/* -A value */
- if (cur == NULL)
+ if (value == nullptr)
return HX_getopt_error(HXOPT_E_SHORT_MISSING, &op, par->flags);
- par->cbi.data = cur;
+ par->cbi.data = value;
return HXOPT_S_NORMAL | HXOPT_I_ASSIGN | HXOPT_I_ADVARG2;
}
}
static int HX_getopt_term(const char *cur, const struct HX_getopt_vars *par)
{
- char *tmp = HX_strdup(cur);
- if (tmp == NULL)
- return -errno;
- if (HXdeque_push(par->remaining, tmp) == NULL) {
- free(tmp);
+ if (HXdeque_push(par->uarg, cur) == nullptr)
return -errno;
- }
return HXOPT_S_TERMINATED | HXOPT_I_ADVARG;
}
static int HX_getopt_normal(const char *cur, const struct HX_getopt_vars *par)
{
if (cur[0] == '-' && cur[1] == '\0') {
- /* Note to popt developers: A single dash is NOT an option! */
- HXdeque_push(par->remaining, HX_strdup(cur));
+ HXdeque_push(par->uarg, cur);
return HXOPT_S_NORMAL | HXOPT_I_ADVARG;
}
- if (cur[0] == '-' && cur[1] == '-' && cur[2] == '\0') {
- /*
- * Double dash. If passthrough is on, "--" must be copied into
- * @remaining. This is done in the next round.
- */
- if (!(par->flags & HXOPT_PTHRU))
- return HXOPT_S_TERMINATED | HXOPT_I_ADVARG;
- return HXOPT_S_TERMINATED;
- }
+ if (cur[0] == '-' && cur[1] == '-' && cur[2] == '\0')
+ return HXOPT_S_TERMINATED | HXOPT_I_ADVARG;
if (cur[0] == '-' && cur[1] == '-') { /* long option */
if (strchr(cur + 2, '=') == NULL)
return HXOPT_S_TWOLONG;
@@ -692,62 +673,71 @@ static int HX_getopt_normal(const char *cur, const struct HX_getopt_vars *par)
if (par->flags & HXOPT_RQ_ORDER)
/* POSIX: first non-option implies option termination */
return HXOPT_S_TERMINATED;
- cur = HX_strdup(cur);
- if (cur == NULL || HXdeque_push(par->remaining, cur) == NULL)
+ if (HXdeque_push(par->uarg, cur) == nullptr)
return -errno;
return HXOPT_S_NORMAL | HXOPT_I_ADVARG;
}
-EXPORT_SYMBOL int HX_getopt5(const struct HXoption *table, char **orig_argv,
- int *new_argc, char ***new_argv, unsigned int flags)
+EXPORT_SYMBOL void HX_getopt6_clean(struct HXopt6_result *r)
+{
+ free(r->desc);
+ free(r->oarg);
+ free(r->uarg);
+ HX_zvecfree(r->dup_argv);
+ r->desc = nullptr;
+ r->oarg = nullptr;
+ r->uarg = nullptr;
+ r->dup_argv = nullptr;
+}
+
+EXPORT_SYMBOL int HX_getopt6(const struct HXoption *table, int argc,
+ char **argv, struct HXopt6_result *result, unsigned int flags)
{
struct HX_getopt_vars ps;
- const char **opt = const_cast(const char **, orig_argv);
+ const char **opt = const_cast(const char **, argv);
int state = HXOPT_S_NORMAL;
int ret = -ENOMEM;
- unsigned int argk = 0;
- if (new_argc != nullptr)
- *new_argc = 0;
- if (new_argv != nullptr)
- *new_argv = nullptr;
+ if ((flags & (HXOPT_RQ_ORDER | HXOPT_ANY_ORDER)) == (HXOPT_RQ_ORDER | HXOPT_ANY_ORDER))
+ return -EINVAL;
+ if (result == nullptr && flags & (HXOPT_ITER_OPTS | HXOPT_ITER_ARGS | HXOPT_DUP_ARGS))
+ return -EINVAL;
+ if (result != nullptr)
+ memset(result, 0, sizeof(*result));
memset(&ps, 0, sizeof(ps));
- ps.remaining = HXdeque_init();
- if (ps.remaining == NULL) {
+ ps.desc = HXdeque_init();
+ ps.oarg = HXdeque_init();
+ ps.uarg = HXdeque_init();
+ if (ps.desc == nullptr || ps.oarg == nullptr || ps.uarg == nullptr) {
ret = -errno;
goto out;
}
ps.flags = flags;
- ps.arg0 = *opt;
- ps.cbi.table = table;
-
- if (*opt != NULL) {
- /* put argv[0] back */
- char *arg = HX_strdup(*opt++);
- if (arg == NULL) {
- ret = -errno;
- goto out;
- }
- if (HXdeque_push(ps.remaining, arg) == NULL) {
- free(arg);
- ret = -errno;
- goto out;
- }
+ if (argc < 0) {
+ argc = 0;
+ for (const char **p = opt; *p != nullptr; ++p)
+ ++argc;
}
+ if (argc > 0) {
+ ps.arg0 = *opt++;
+ --argc;
+ }
+ ps.cbi.table = table;
- if (posix_me_harder())
+ if (!(ps.flags & HXOPT_ANY_ORDER) && posix_me_harder())
ps.flags |= HXOPT_RQ_ORDER;
- for (const char *cur = *opt; cur != NULL; ) {
+ const char *op0 = argc > 0 ? opt[0] : nullptr;
+ while (argc > 0) {
if (state == HXOPT_S_TWOLONG)
- state = HX_getopt_twolong(opt, &ps);
+ state = HX_getopt_twolong(op0, argc > 1 ? opt[1] : nullptr, &ps);
else if (state == HXOPT_S_LONG)
- state = HX_getopt_long(cur, &ps);
+ state = HX_getopt_long(op0, &ps);
else if (state == HXOPT_S_SHORT)
- state = HX_getopt_short(opt, cur, &ps);
+ state = HX_getopt_short(op0, argc > 1 ? opt[1] : nullptr, &ps);
else if (state == HXOPT_S_TERMINATED)
- state = HX_getopt_term(cur, &ps);
+ state = HX_getopt_term(op0, &ps);
else if (state == HXOPT_S_NORMAL)
- state = HX_getopt_normal(cur, &ps);
+ state = HX_getopt_normal(op0, &ps);
if (state < 0) {
ret = state;
@@ -757,31 +747,62 @@ EXPORT_SYMBOL int HX_getopt5(const struct HXoption *table, char **orig_argv,
ret = state & ~HXOPT_I_ERROR;
goto out;
}
- if (state & HXOPT_I_ASSIGN)
- do_assign(&ps.cbi, ps.arg0);
- if (state & HXOPT_I_ADVARG)
- cur = *++opt;
- else if (state & HXOPT_I_ADVARG2)
- cur = *(opt += 2);
- else if (state & HXOPT_I_ADVCHAR)
- ++cur;
+ if (state & HXOPT_I_ASSIGN) {
+ ret = do_assign_front(&ps);
+ if (ret < 0)
+ goto out;
+ }
+ if (state & HXOPT_I_ADVARG) {
+ --argc;
+ if (argc > 0)
+ op0 = *++opt;
+ } else if (state & HXOPT_I_ADVARG2) {
+ opt += 2;
+ argc -= 2;
+ if (argc > 0)
+ op0 = *opt;
+ } else if (state & HXOPT_I_ADVCHAR) {
+ ++op0;
+ }
state &= ~HXOPT_I_MASK;
}
- if (new_argv != nullptr) {
- *new_argv = reinterpret_cast(char **, HXdeque_to_vec(ps.remaining, &argk));
- if (*new_argv == nullptr) {
+ if (flags & HXOPT_ITER_OPTS) {
+ size_t nelem = 0;
+ result->desc = reinterpret_cast(const struct HXoption **, HXdeque_to_vec(ps.desc, &nelem));
+ result->oarg = reinterpret_cast(char **, HXdeque_to_vec(ps.oarg, &nelem));
+ if (result->desc == nullptr || result->oarg == nullptr) {
+ ret = -errno;
+ goto out;
+ }
+ result->nopts = nelem < INT_MAX ? nelem : INT_MAX;
+ }
+ if (flags & HXOPT_ITER_ARGS) {
+ size_t nelem = 0;
+ result->uarg = reinterpret_cast(char **, HXdeque_to_vecx(ps.uarg, &nelem));
+ if (result->uarg == nullptr) {
+ ret = -errno;
+ goto out;
+ }
+ result->nargs = nelem < INT_MAX ? nelem : INT_MAX;
+ }
+ if (flags & HXOPT_DUP_ARGS) {
+ if (ps.arg0 != nullptr && HXdeque_unshift(ps.uarg, ps.arg0) == nullptr) {
ret = -errno;
goto out;
}
- if (new_argc != nullptr)
- *new_argc = argk;
- /* pointers are owned by new_argv now, so free only the deque head */
- HXdeque_free(ps.remaining);
- ps.remaining = nullptr;
+ size_t nelem = 0;
+ result->dup_argv = HXdeque_to_vec_strdup(ps.uarg, &nelem);
+ if (result->dup_argv == nullptr) {
+ ret = -errno;
+ goto out;
+ }
+ result->dup_argc = nelem < INT_MAX ? nelem : INT_MAX;
}
ret = HXOPT_ERR_SUCCESS;
out:
+ if (ret != HXOPT_ERR_SUCCESS && result != nullptr)
+ HX_getopt6_clean(result);
if (ret == HXOPT_ERR_SUCCESS) {
} else if (ret < 0) {
if (!(ps.flags & HXOPT_QUIET))
@@ -793,28 +814,12 @@ EXPORT_SYMBOL int HX_getopt5(const struct HXoption *table, char **orig_argv,
else if (ps.flags & HXOPT_USAGEONERR)
HX_getopt_usage(&ps.cbi, stderr);
}
- if (ps.remaining != nullptr)
- HXdeque_genocide2(ps.remaining, free);
- return ret;
-}
-
-EXPORT_SYMBOL int HX_getopt(const struct HXoption *table, int *argc,
- char ***argv, unsigned int flags)
-{
- int new_argc = 0;
- char **new_argv = nullptr;
- int ret = HX_getopt5(table, *argv, &new_argc,
- flags & HXOPT_KEEP_ARGV ? nullptr : &new_argv, flags);
- if (ret != HXOPT_ERR_SUCCESS)
- return ret;
- if (flags & HXOPT_KEEP_ARGV)
- // NO_CREATE_NEW / DESTROY_NEW
- new_argv = *argv;
- else if (flags & HXOPT_DESTROY_OLD)
- HX_zvecfree(*argv);
- if (argc != nullptr)
- *argc = new_argc;
- *argv = new_argv;
+ if (ps.uarg != nullptr)
+ HXdeque_free(ps.uarg);
+ if (ps.oarg != nullptr)
+ HXdeque_free(ps.oarg);
+ if (ps.desc != nullptr)
+ HXdeque_free(ps.desc);
return ret;
}
diff --git a/src/string.c b/src/string.c
index e468063..e9c162d 100644
--- a/src/string.c
+++ b/src/string.c
@@ -41,7 +41,27 @@ struct HX_quote_rule {
const char *chars;
};
-static const char HX_hexenc[16] = "0123456789ABCDEF";
+/* years, months, weeks, days, hours, minutes, seconds, msecs, musecs, nsecs; */
+enum period_idx {
+ PERIDX_YEARS = 0,
+ PERIDX_MONTHS,
+ PERIDX_WEEKS,
+ PERIDX_DAYS,
+ PERIDX_HOURS,
+ PERIDX_MIN,
+ PERIDX_SEC,
+ PERIDX_MSEC,
+ PERIDX_MUSEC,
+ PERIDX_NSEC,
+ PERIDX_MAX,
+};
+
+struct HX_unit_desc {
+ const char name[8];
+ uint8_t len, pidx;
+};
+
+static const char HX_hexenc[] = "0123456789ABCDEF";
EXPORT_SYMBOL char *HX_basename(const char *s)
{
@@ -217,13 +237,11 @@ EXPORT_SYMBOL char **HX_split(const char *str, const char *delim,
ret[*cp] = NULL;
{
- char *seg, *wp = HX_strdup(str), *bg = wp;
+ char *wp = HX_strdup(str), *bg = wp;
size_t i = 0;
- while (--max > 0) {
- seg = HX_strsep(&wp, delim);
- ret[i++] = HX_strdup(seg);
- }
+ while (--max > 0)
+ ret[i++] = HX_strdup(strtok_r(nullptr, delim, &wp));
ret[i++] = HX_strdup(wp);
free(bg);
@@ -374,13 +392,6 @@ EXPORT_SYMBOL size_t HX_strltrim(char *expr)
return diff;
}
-EXPORT_SYMBOL char *HX_stpltrim(const char *p)
-{
- while (HX_isspace(*p))
- ++p;
- return const_cast1(char *, p);
-}
-
/**
* Helper for substr() function for dealing with negative off/len values
* @z: total length of string
@@ -442,14 +453,6 @@ EXPORT_SYMBOL char *HX_strndup(const char *src, size_t size)
return ret;
}
-EXPORT_SYMBOL size_t HX_strnlen(const char *src, size_t size)
-{
- const char *ptr = src;
- for (; *ptr != '\0' && size > 0; --size, ++ptr)
- ;
- return ptr - src;
-}
-
EXPORT_SYMBOL size_t HX_strrcspn(const char *s, const char *rej)
{
size_t n = strlen(s);
@@ -483,35 +486,6 @@ EXPORT_SYMBOL size_t HX_strrtrim(char *expr)
return s;
}
-EXPORT_SYMBOL char *HX_strsep(char **sp, const char *d)
-{
- char *begin, *end;
-
- if (*sp == NULL || **sp == '\0')
- return NULL;
- begin = *sp;
-
- if (d[0] == '\0' || d[1] == '\0') {
- if (*begin == *d)
- end = begin;
- else if (*begin == '\0')
- end = NULL;
- else
- end = strchr(begin + 1, *d);
- } else {
- end = strpbrk(begin, d);
- }
-
- if (end == NULL) {
- *sp = NULL;
- } else {
- *end++ = '\0';
- *sp = end;
- }
-
- return begin;
-}
-
EXPORT_SYMBOL char *HX_strsep2(char **wp, const char *str)
{
char *ptr, *ret;
@@ -534,8 +508,6 @@ static const struct HX_quote_rule HX_quote_rules[] = {
[HXQUOTE_LDAPFLT] = {HXQUOTE_REJECT, "\n*()\\"},
[HXQUOTE_LDAPRDN] = {HXQUOTE_REJECT, "\n \"#+,;<=>\\"},
[HXQUOTE_URIENC] = {HXQUOTE_ACCEPT, "-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"},
- [HXQUOTE_SQLSQUOTE] = {HXQUOTE_REJECT, "'"},
- [HXQUOTE_SQLBQUOTE] = {HXQUOTE_REJECT, "`"},
};
/**
@@ -605,30 +577,6 @@ static char *HX_quote_backslash(char *dest, const char *src, const char *qc)
return ret;
}
-static char *
-HX_quote_sqlbackslash(char *dest, const char *src, const char *trm)
-{
- char *ret = dest;
- size_t len;
-
- while (*src != '\0') {
- len = strcspn(src, trm);
- if (len > 0) {
- memcpy(dest, src, len);
- dest += len;
- src += len;
- if (*src == '\0')
- break;
- }
- *dest++ = *trm;
- *dest++ = *trm;
- ++src;
- }
-
- *dest = '\0';
- return ret;
-}
-
/**
* Encode @src into BASE-64 according to RFC 4648 and write result to @dest,
* which must be of appropriate size, plus one for a trailing NUL.
@@ -782,8 +730,6 @@ static size_t HX_quoted_size(const char *s, unsigned int type)
switch (type) {
case HXQUOTE_SQUOTE:
case HXQUOTE_DQUOTE:
- case HXQUOTE_SQLSQUOTE:
- case HXQUOTE_SQLBQUOTE:
return HX_qsize_bsr(s, HX_quote_rules[type].chars, 1);
case HXQUOTE_HTML:
return HX_qsize_html(s);
@@ -862,9 +808,6 @@ EXPORT_SYMBOL char *HX_strquote(const char *src, unsigned int type,
return HX_quote_base64(*free_me, src, '+', ',');
case HXQUOTE_URIENC:
return HX_quote_urlenc(*free_me, src);
- case HXQUOTE_SQLSQUOTE:
- case HXQUOTE_SQLBQUOTE:
- return HX_quote_sqlbackslash(*free_me, src, rule->chars);
}
return NULL;
}
@@ -1068,47 +1011,169 @@ EXPORT_SYMBOL unsigned long long HX_strtoull_unit(const char *s,
return neg ? -ipart : ipart;
}
+static const struct HX_unit_desc txtperiod_utab[] = {
+ {"seconds", 7, PERIDX_SEC},
+ {"second", 6, PERIDX_SEC},
+ {"sec", 3, PERIDX_SEC},
+ {"s", 1, PERIDX_SEC},
+ {"minutes", 7, PERIDX_MIN},
+ {"minute", 6, PERIDX_MIN},
+ {"min", 3, PERIDX_MIN},
+ {"hours", 5, PERIDX_HOURS},
+ {"hour", 4, PERIDX_HOURS},
+ {"h", 1, PERIDX_HOURS},
+ {"days", 4, PERIDX_DAYS},
+ {"day", 3, PERIDX_DAYS},
+ {"d", 1, PERIDX_DAYS},
+ {"weeks", 5, PERIDX_WEEKS},
+ {"week", 4, PERIDX_WEEKS},
+ {"months", 6, PERIDX_MONTHS},
+ {"month", 5, PERIDX_MONTHS},
+ {"years", 5, PERIDX_YEARS},
+ {"year", 4, PERIDX_YEARS},
+ {"y", 1, PERIDX_YEARS},
+ {"msec", 4, PERIDX_MSEC},
+ {"ms", 2, PERIDX_MSEC},
+ {"µsec", 5, PERIDX_MUSEC},
+ {"µs", 3, PERIDX_MUSEC},
+ {"nsec", 4, PERIDX_NSEC},
+ {"ns", 2, PERIDX_NSEC},
+};
+
+static const struct HX_unit_desc iso8601p_dtab[] = {
+ {"D", 1, PERIDX_DAYS},
+ {"M", 1, PERIDX_MONTHS},
+ {"Y", 1, PERIDX_YEARS},
+};
+
+static const struct HX_unit_desc iso8601p_ttab[] = {
+ {"S", 1, PERIDX_SEC},
+ {"M", 1, PERIDX_MIN},
+ {"H", 1, PERIDX_HOURS},
+};
+
/* Numbers also used by systemd — the focus is on longterm averages */
#define SECONDS_PER_YEAR 31557600 /* 365.25 days */
#define SECONDS_PER_MONTH 2629800 /* 1/12th of that year = 30.4375 days */
#define NSEC_PER_SECOND 1000000000ULL
-static const struct {
- const char name[8];
- unsigned int len;
- uint32_t s_mult;
- uint64_t ns_mult;
-} time_multiplier[] = {
- {"seconds", 7, 1, 1 * NSEC_PER_SECOND},
- {"second", 6, 1, 1 * NSEC_PER_SECOND},
- {"sec", 3, 1, 1 * NSEC_PER_SECOND},
- {"s", 1, 1, 1 * NSEC_PER_SECOND},
- {"minutes", 7, 60, 60 * NSEC_PER_SECOND},
- {"minute", 6, 60, 60 * NSEC_PER_SECOND},
- {"min", 3, 60, 60 * NSEC_PER_SECOND},
- {"hours", 5, 3600, 3600 * NSEC_PER_SECOND},
- {"hour", 4, 3600, 3600 * NSEC_PER_SECOND},
- {"h", 1, 3600, 3600 * NSEC_PER_SECOND},
- {"days", 4, 86400, 86400 * NSEC_PER_SECOND},
- {"day", 3, 86400, 86400 * NSEC_PER_SECOND},
- {"d", 1, 86400, 86400 * NSEC_PER_SECOND},
- {"weeks", 5, 604800, 604800 * NSEC_PER_SECOND},
- {"week", 4, 604800, 604800 * NSEC_PER_SECOND},
- {"months", 6, SECONDS_PER_MONTH, SECONDS_PER_MONTH * NSEC_PER_SECOND},
- {"month", 5, SECONDS_PER_MONTH, SECONDS_PER_MONTH * NSEC_PER_SECOND},
- {"years", 5, SECONDS_PER_YEAR, SECONDS_PER_YEAR * NSEC_PER_SECOND},
- {"year", 4, SECONDS_PER_YEAR, SECONDS_PER_YEAR * NSEC_PER_SECOND},
- {"y", 1, SECONDS_PER_YEAR, SECONDS_PER_YEAR * NSEC_PER_SECOND},
- {"msec", 4, 0, 1000000},
- {"ms", 2, 0, 1000000},
- {"µsec", 5, 0, 1000},
- {"µs", 3, 0, 1000},
- {"nsec", 4, 0, 1},
- {"ns", 2, 0, 1},
+static const uint64_t sec_mult[PERIDX_MAX] = {
+ [PERIDX_YEARS] = SECONDS_PER_YEAR,
+ [PERIDX_MONTHS] = SECONDS_PER_MONTH,
+ [PERIDX_WEEKS] = 604800,
+ [PERIDX_DAYS] = 86400,
+ [PERIDX_HOURS] = 3600,
+ [PERIDX_MIN] = 60,
+ [PERIDX_SEC] = 1,
+ [PERIDX_MSEC] = 0,
+ [PERIDX_MUSEC] = 0,
+ [PERIDX_NSEC] = 0,
+};
+
+static const uint64_t nsec_mult[PERIDX_MAX] = {
+ [PERIDX_YEARS] = NSEC_PER_SECOND * SECONDS_PER_YEAR,
+ [PERIDX_MONTHS] = NSEC_PER_SECOND * SECONDS_PER_MONTH,
+ [PERIDX_WEEKS] = NSEC_PER_SECOND * 604800,
+ [PERIDX_DAYS] = NSEC_PER_SECOND * 86400,
+ [PERIDX_HOURS] = NSEC_PER_SECOND * 3600,
+ [PERIDX_MIN] = NSEC_PER_SECOND * 60,
+ [PERIDX_SEC] = NSEC_PER_SECOND,
+ [PERIDX_MSEC] = 1000000,
+ [PERIDX_MUSEC] = 1000,
+ [PERIDX_NSEC] = 1,
};
-static unsigned long long HX_strtoull_time(const char *s, char **out_end, bool nsec)
+/**
+ * Take a textual period string ("1 minute 5 seconds") and break it down.
+ * @s: input string
+ * @utab: allowed unit suffixes
+ * @mtab: multiplication table
+ * @out_end: parsing stopping point
+ *
+ * Returns an errno.
+ */
+static unsigned long long HX_strtoull_period(const char *s,
+ const struct HX_unit_desc *utab, size_t usize, const uint64_t *mtab,
+ size_t msize, char **out_end)
+{
+ unsigned long long quant = 0;
+
+ while (*s != '\0') {
+ while (HX_isspace(*s))
+ ++s;
+ const char *numbegin = s;
+ if (*s == '-')
+ break;
+ char *end = nullptr;
+ unsigned long long num = strtoull(s, &end, 10);
+ if (num == ULLONG_MAX && errno == ERANGE)
+ return num;
+ double frac = 0;
+ bool have_frac = *end == '.';
+ if (have_frac)
+ frac = strtod(s, &end);
+ if (end == s)
+ break;
+ s = end;
+ while (HX_isspace(*s))
+ ++s;
+ unsigned int i;
+ for (i = 0; i < usize; ++i)
+ if (strncasecmp(s, utab[i].name, utab[i].len) == 0 &&
+ /* Ensure a word boundary is present */
+ !HX_isalpha(s[utab[i].len]))
+ break;
+ if (i == usize) {
+ if ((!have_frac && num == 0) || (have_frac && frac == 0))
+ /* 0 is the same no matter what unit, take it */
+ continue;
+ s = numbegin;
+ break;
+ }
+ unsigned long long mult = mtab[utab[i].pidx];
+ if (have_frac) {
+ double v = frac * mult;
+ if (v >= static_cast(double, ULLONG_MAX)) {
+ /*
+ * As ULLONG_MAX gets promoted to double, its
+ * value may _increase_, therefore here we use
+ * >= and not >.
+ */
+ if (out_end != nullptr)
+ *out_end = const_cast(char *, numbegin);
+ errno = ERANGE;
+ return ULLONG_MAX;
+ }
+ num = v;
+ } else {
+ if (mult > 0 && num > ULLONG_MAX / mult) {
+ if (out_end != nullptr)
+ *out_end = const_cast(char *, numbegin);
+ errno = ERANGE;
+ return ULLONG_MAX;
+ }
+ num *= mult;
+ }
+ if (num > ULLONG_MAX - quant) {
+ if (out_end != nullptr)
+ *out_end = const_cast(char *, numbegin);
+ errno = ERANGE;
+ return ULLONG_MAX;
+ }
+ quant += num;
+ s += utab[i].len;
+ }
+ if (out_end != nullptr)
+ *out_end = const_cast(char *, s);
+ errno = 0;
+ return quant;
+}
+
+static unsigned long long HX_strtoull_iso8601p_2(const char *s,
+ const uint64_t *mtab, size_t msize, char **out_end)
{
+ const struct HX_unit_desc *utab = iso8601p_dtab;
+ size_t usize = ARRAY_SIZE(iso8601p_dtab);
unsigned long long quant = 0;
while (*s != '\0') {
@@ -1117,6 +1182,14 @@ static unsigned long long HX_strtoull_time(const char *s, char **out_end, bool n
const char *numbegin = s;
if (*s == '-')
break;
+ if (HX_toupper(*s) == 'T') {
+ if (utab != iso8601p_dtab)
+ break;
+ utab = iso8601p_ttab;
+ usize = ARRAY_SIZE(iso8601p_ttab);
+ ++s;
+ continue;
+ }
char *end = nullptr;
unsigned long long num = strtoull(s, &end, 10);
if (num == ULLONG_MAX && errno == ERANGE)
@@ -1131,51 +1204,98 @@ static unsigned long long HX_strtoull_time(const char *s, char **out_end, bool n
while (HX_isspace(*s))
++s;
unsigned int i;
- for (i = 0; i < ARRAY_SIZE(time_multiplier); ++i)
- if (strncmp(s, time_multiplier[i].name,
- time_multiplier[i].len) == 0 &&
- !HX_isalpha(s[time_multiplier[i].len]))
+ /* No word boundary check for 8601 mode */
+ for (i = 0; i < usize; ++i)
+ if (strncmp(s, utab[i].name, utab[i].len) == 0)
break;
- if (i == ARRAY_SIZE(time_multiplier)) {
+ if (i == usize) {
if ((!have_frac && num == 0) || (have_frac && frac == 0))
/* 0 is the same no matter what unit, take it */
continue;
s = numbegin;
break;
}
- unsigned long long mult = nsec ? time_multiplier[i].ns_mult : time_multiplier[i].s_mult;
+ unsigned long long mult = mtab[utab[i].pidx];
if (have_frac) {
- quant += frac * mult;
+ double v = frac * mult;
+ if (v >= static_cast(double, ULLONG_MAX)) {
+ /*
+ * As ULLONG_MAX gets promoted to double, its
+ * value may _increase_, therefore here we use
+ * >= and not >.
+ */
+ if (out_end != nullptr)
+ *out_end = const_cast(char *, numbegin);
+ errno = ERANGE;
+ return ULLONG_MAX;
+ }
+ num = v;
} else {
- if (mult > 0 && num >= ULLONG_MAX / mult) {
+ if (mult > 0 && num > ULLONG_MAX / mult) {
if (out_end != nullptr)
*out_end = const_cast(char *, numbegin);
errno = ERANGE;
return ULLONG_MAX;
}
- quant += num * mult;
+ num *= mult;
}
- s += time_multiplier[i].len;
+ if (num > ULLONG_MAX - quant) {
+ if (out_end != nullptr)
+ *out_end = const_cast(char *, numbegin);
+ errno = ERANGE;
+ return ULLONG_MAX;
+ }
+ quant += num;
+ s += utab[i].len;
}
if (out_end != nullptr)
*out_end = const_cast(char *, s);
+ errno = 0;
return quant;
}
+static bool looks_like_iso8601(const char *s)
+{
+ if (s[0] != 'P')
+ return false;
+ if (HX_isdigit(s[1]))
+ return true;
+ if (s[1] == 'T' && HX_isdigit(s[2]))
+ return true;
+ return false;
+}
+
EXPORT_SYMBOL unsigned long long HX_strtoull_sec(const char *s, char **out_end)
{
- return HX_strtoull_time(s, out_end, false);
+ if (looks_like_iso8601(s))
+ return HX_strtoull_iso8601p_2(&s[1], sec_mult, ARRAY_SIZE(sec_mult), out_end);
+ return HX_strtoull_period(s,
+ txtperiod_utab, ARRAY_SIZE(txtperiod_utab),
+ sec_mult, ARRAY_SIZE(sec_mult), out_end);
}
EXPORT_SYMBOL unsigned long long HX_strtoull_nsec(const char *s, char **out_end)
{
- return HX_strtoull_time(s, out_end, true);
+ if (looks_like_iso8601(s))
+ return HX_strtoull_iso8601p_2(&s[1], nsec_mult, ARRAY_SIZE(nsec_mult), out_end);
+ return HX_strtoull_period(s,
+ txtperiod_utab, ARRAY_SIZE(txtperiod_utab),
+ nsec_mult, ARRAY_SIZE(nsec_mult), out_end);
+}
+
+EXPORT_SYMBOL unsigned long long HX_strtoull8601p_sec(const char *s, char **out_end)
+{
+ if (*s == 'P')
+ return HX_strtoull_iso8601p_2(&s[1], sec_mult, ARRAY_SIZE(sec_mult), out_end);
+ if (out_end != nullptr)
+ *out_end = const_cast(char *, s);
+ return 0;
}
EXPORT_SYMBOL char *HX_unit_seconds(char *out, size_t outsize,
unsigned long long secs, unsigned int flags)
{
- unsigned long years = 0, months = 0, weeks = 0, days, hours, mins;
+ unsigned long long years = 0, months = 0, weeks = 0, days, hours, mins;
char buf[HXSIZEOF_Z64+4];
if (flags & HXUNIT_YEARS) {
years = secs / SECONDS_PER_YEAR;
@@ -1197,31 +1317,31 @@ EXPORT_SYMBOL char *HX_unit_seconds(char *out, size_t outsize,
secs %= 60;
*out = '\0';
if (years > 0) {
- snprintf(buf, ARRAY_SIZE(buf), "%luy", years);
+ snprintf(buf, ARRAY_SIZE(buf), "%lluy", years);
HX_strlcat(out, buf, outsize);
}
if (months == 1) {
HX_strlcat(out, "1month", outsize);
} else if (months > 0) {
- snprintf(buf, ARRAY_SIZE(buf), "%lumonths", months);
+ snprintf(buf, ARRAY_SIZE(buf), "%llumonths", months);
HX_strlcat(out, buf, outsize);
}
if (weeks == 1) {
HX_strlcat(out, "1week", outsize);
} else if (weeks > 0) {
- snprintf(buf, ARRAY_SIZE(buf), "%luweeks", weeks);
+ snprintf(buf, ARRAY_SIZE(buf), "%lluweeks", weeks);
HX_strlcat(out, buf, outsize);
}
if (days > 0) {
- snprintf(buf, ARRAY_SIZE(buf), "%lud", days);
+ snprintf(buf, ARRAY_SIZE(buf), "%llud", days);
HX_strlcat(out, buf, outsize);
}
if (hours > 0) {
- snprintf(buf, ARRAY_SIZE(buf), "%luh", hours);
+ snprintf(buf, ARRAY_SIZE(buf), "%lluh", hours);
HX_strlcat(out, buf, outsize);
}
if (mins > 0) {
- snprintf(buf, ARRAY_SIZE(buf), "%lumin", mins);
+ snprintf(buf, ARRAY_SIZE(buf), "%llumin", mins);
HX_strlcat(out, buf, outsize);
}
if (secs > 0 ||
diff --git a/src/tc-compile.c b/src/tc-compile.c
index d60ff21..6aa38c4 100644
--- a/src/tc-compile.c
+++ b/src/tc-compile.c
@@ -5,6 +5,8 @@
# include <cstdlib>
#endif
#include <libHX.h>
+#include <libHX/endian.h>
+#include <libHX/endian_float.h>
#define ZZ 64
diff --git a/src/tc-io.c b/src/tc-io.c
index 77baf01..024a46a 100644
--- a/src/tc-io.c
+++ b/src/tc-io.c
@@ -28,6 +28,16 @@ static void sf(void)
close(src);
}
+static void t_getcwd(void)
+{
+ hxmc_t *s = nullptr;
+ if (HX_getcwd(&s) > 0)
+ printf("cwd1: >%s<\n", s);
+ HXmc_setlen(&s, 0);
+ if (HX_getcwd(&s) > 0)
+ printf("cwd2: >%s<\n", s);
+}
+
int main(void)
{
size_t z;
@@ -55,5 +65,7 @@ int main(void)
fprintf(stderr, "copy_file ok\n");
unlink("tciocopy.txt");
}
+
+ t_getcwd();
return 0;
}
diff --git a/src/tc-list.c b/src/tc-list.c
index d31a5c7..abb0944 100644
--- a/src/tc-list.c
+++ b/src/tc-list.c
@@ -81,7 +81,7 @@ static void l_dump(bool pop)
#endif
}
- printf("Remaining elements: %u\n", strings_ct.items);
+ printf("Remaining elements: %zu\n", strings_ct.items);
}
static void l_empty(void)
diff --git a/src/tc-map.c b/src/tc-map.c
index e9e896f..5ad7dfe 100644
--- a/src/tc-map.c
+++ b/src/tc-map.c
@@ -107,7 +107,7 @@ static void tmap_flush(struct HXmap *map, bool verbose)
const struct HXmap_node *node;
struct HXmap_trav *iter;
- tmap_printf("Flushing %u elements (with traversal)\n", map->items);
+ tmap_printf("Flushing %zu elements (with traversal)\n", map->items);
tmap_ipush();
while (map->items != 0) {
/* May need to reload traverser due to deletion */
@@ -141,7 +141,7 @@ static void tmap_add_speed(struct HXmap *map)
tmap_time(&stop);
HX_timespec_sub(&delta, &stop, &start);
} while (!(delta.tv_sec >= 1 || map->items >= 1000000));
- tmap_printf("%u elements in " HX_TIMESPEC_FMT
+ tmap_printf("%zu elements in " HX_TIMESPEC_FMT
" (plus time measurement overhead)\n",
map->items, HX_TIMESPEC_EXP(&delta));
threshold = map->items;
@@ -151,7 +151,7 @@ static void tmap_add_speed(struct HXmap *map)
tmap_add_rand(map, threshold);
tmap_time(&stop);
HX_timespec_sub(&delta, &stop, &start);
- tmap_printf("%u elements in " HX_TIMESPEC_FMT " (w/o overhead)\n",
+ tmap_printf("%zu elements in " HX_TIMESPEC_FMT " (w/o overhead)\n",
map->items, HX_TIMESPEC_EXP(&delta));
tmap_ipop();
}
@@ -176,14 +176,14 @@ static void tmap_trav_speed(struct HXmap *map)
tmap_time(&stop);
HX_timespec_sub(&delta, &stop, &start);
HXmap_travfree(iter);
- tmap_printf("Open traversal of %u nodes: " HX_TIMESPEC_FMT "s\n",
+ tmap_printf("Open traversal of %zu nodes: " HX_TIMESPEC_FMT "s\n",
map->items, HX_TIMESPEC_EXP(&delta));
tmap_time(&start);
HXmap_qfe(map, tmap_each_fn, NULL);
tmap_time(&stop);
HX_timespec_sub(&delta, &stop, &start);
- tmap_printf("QFE traversal of %u nodes: " HX_TIMESPEC_FMT "s\n",
+ tmap_printf("QFE traversal of %zu nodes: " HX_TIMESPEC_FMT "s\n",
map->items, HX_TIMESPEC_EXP(&delta));
tmap_ipop();
@@ -200,7 +200,7 @@ static void tmap_trav_speed(struct HXmap *map)
start = delta;
stop = delta2;
HX_timespec_sub(&delta, &stop, &start);
- tmap_printf("Lookup of %u nodes: " HX_TIMESPEC_FMT "s\n",
+ tmap_printf("Lookup of %zu nodes: " HX_TIMESPEC_FMT "s\n",
map->items, HX_TIMESPEC_EXP(&delta));
tmap_ipop();
}
@@ -210,7 +210,7 @@ static int tmap_flat(const struct HXmap *map)
struct HXmap_node *nodes;
unsigned int i;
- tmap_printf("Retrieving flattened list of %u elements:\n", map->items);
+ tmap_printf("Retrieving flattened list of %zu elements:\n", map->items);
tmap_ipush();
nodes = HXmap_keysvalues(map);
if (nodes == NULL) {
@@ -430,7 +430,7 @@ static void tmap_hmap_test_1a(const char *map_type,
u.map = HXmap_init5(HXMAPT_HASH, HXMAP_SCKEY,
&intstr_ops, 0, 0);
tmap_new_perfect_tree(u.map, power, 2);
- tmap_printf("%s, intstr, %u items/%u buckets, "
+ tmap_printf("%s, intstr, %zu items/%u buckets, "
"agglomeration: %.2f%%\n", map_type,
u.map->items, HXhash_primes[u.hmap->power],
hmap_agg_index(u.hmap, false));
@@ -441,13 +441,13 @@ static void tmap_hmap_test_1a(const char *map_type,
while (u.map->items < 1 << max_power) {
/* Fill up just right up to the maximum load */
tmap_add_rand(u.map, u.hmap->max_load - u.map->items);
- tmap_printf("%s, words, %u items/%u buckets, "
+ tmap_printf("%s, words, %zu items/%u buckets, "
"agglomeration: %.2f%%\n", map_type,
u.map->items, HXhash_primes[u.hmap->power],
hmap_agg_index(u.hmap, false));
/* trigger resize */
tmap_add_rand(u.map, 1);
- tmap_printf("%s, words, %u items/%u buckets, "
+ tmap_printf("%s, words, %zu items/%u buckets, "
"agglomeration: %.2f%%\n", map_type,
u.map->items, HXhash_primes[u.hmap->power],
hmap_agg_index(u.hmap, false));
@@ -535,7 +535,7 @@ static void rbt_height_check(const struct HXrbtree *tree)
max = 2 * log(tree->super.items + 1) / log(2);
avg = log((pow(2, min) + pow(2, max)) / 2) / log(2);
tmap_ipush();
- tmap_printf("%u items; height %u; min/avg/max %.2f/%.2f/%.2f\n",
+ tmap_printf("%zu items; height %u; min/avg/max %.2f/%.2f/%.2f\n",
tree->super.items, rbt_tree_height(tree->root),
min, avg, max);
tmap_ipop();
diff --git a/src/tc-option.c b/src/tc-option.c
index 8e99b19..860f9d2 100644
--- a/src/tc-option.c
+++ b/src/tc-option.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
-// SPDX-FileCopyrightText: 2022 Jan Engelhardt
+// SPDX-FileCopyrightText: 2025 Jan Engelhardt
/*
* option parser test program
*/
@@ -14,17 +14,22 @@
#include "internal.h"
static int opt_v = 0, opt_mask = 0;
-static char *opt_kstr = NULL;
+static char *opt_kstr, *opt_strp;
static long opt_klong = 0;
static double opt_kdbl = 0;
static int opt_kflag = 0, opt_kint = 0;
static int opt_dst = 0;
static hxmc_t *opt_mcstr = NULL;
+static inline const char *znul(const char *s)
+{
+ return s != nullptr ? s : "(null)";
+}
+
static void opt_cbf(const struct HXoptcb *cbi)
{
printf("cbf was called... with \"%s\"/'%c'\n",
- cbi->current->ln, cbi->current->sh);
+ znul(cbi->current->ln), cbi->current->sh);
}
static const char *opt_eitheror[] = {"neither", "either", "or"};
@@ -59,83 +64,159 @@ static struct HXoption table[] = {
.cb = opt_cbf, .help = "XOR mask test", .htyp = "value"},
{.sh = 'G', .type = HXTYPE_NONE, .help = "Just a flag", .cb = opt_cbf},
{.sh = 'H', .type = HXTYPE_NONE, .help = "Just a flag", .cb = opt_cbf},
- {.sh = 'I', .type = HXTYPE_NONE, .help = "Just a flag", .cb = opt_cbf},
+ {.sh = 'I', .type = HXTYPE_NONE, .ptr = nullptr, .help = "Just a flag", .cb = opt_cbf},
HXOPT_AUTOHELP,
{.sh = 'J', .type = HXTYPE_NONE, .help = "Just a flag", .cb = opt_cbf},
+ {.ln = "strp", .sh = 'Z', .type = HXTYPE_STRP, .ptr = &opt_strp,
+ .help = "String pointer", .cb = opt_cbf},
HXOPT_TABLEEND,
};
-static void dump_argv(char **v)
+static int t_empty_argv(void)
{
- while (*v != NULL)
- printf("[%s] ", *v++);
- printf("\n");
-}
+ char *zero_argv[] = {nullptr};
+ struct HXopt6_result result;
-static int t_pthru(void)
-{
- const char *argv[] = {
- "ARGV0", "-Zomg", "-GZfoo", "bar",
- "--unknown-f=13.37", "--unknown-a",
- "foo", "bar", NULL
- };
- char **nargv = nullptr;
- int nargc = 0;
-
- printf("PTHRU test:\n");
- if (HX_getopt5(table, const_cast(char **, argv), &nargc, &nargv,
- HXOPT_USAGEONERR | HXOPT_PTHRU) != HXOPT_ERR_SUCCESS)
+ printf("...with argv={NULL}\n");
+ if (HX_getopt6(table, 0, zero_argv, &result,
+ HXOPT_USAGEONERR | HXOPT_ITER_OA | HXOPT_DUP_ARGS) != HXOPT_ERR_SUCCESS)
return EXIT_FAILURE;
- printf("argc = %d\n", nargc);
- dump_argv(nargv);
- printf("\n");
- HX_zvecfree(nargv);
- return EXIT_SUCCESS;
+ bool ok = result.nopts == 0 && result.nargs == 0 && result.dup_argc == 0;
+ HX_getopt6_clean(&result);
+ free(opt_kstr);
+ opt_kstr = nullptr;
+ return ok ? EXIT_SUCCESS : EXIT_FAILURE;
}
-static int t_empty_argv(void)
+static int runner(int argc, char **argv)
{
- char *zero_argv[] = {nullptr};
- char **new_argv = nullptr;
+ printf("== HX_getopt6 ==\n");
+ int ret = HX_getopt6(table, argc, argv, nullptr, HXOPT_USAGEONERR);
+ printf("Return value of HX_getopt: %d\n", ret);
+ printf("Either-or is: %s\n", opt_eitheror[opt_dst]);
+ printf("values: D=%lf I=%d L=%ld S=%p/%s strp=%p/%s\n",
+ opt_kdbl, opt_kint, opt_klong,
+ opt_kstr, znul(opt_kstr), opt_strp, znul(opt_strp));
+ printf("Verbosity level: %d\n", opt_v);
+ printf("Mask: 0x%08X\n", opt_mask);
+ printf("mcstr: >%s<\n", znul(opt_mcstr));
+ free(opt_kstr);
+ opt_kstr = nullptr;
- printf("Testing argv={NULL}\n");
- if (HX_getopt5(table, zero_argv, nullptr, &new_argv,
- HXOPT_USAGEONERR) != HXOPT_ERR_SUCCESS)
- return EXIT_FAILURE;
- HX_zvecfree(new_argv);
+ ret = t_empty_argv();
+ if (ret != EXIT_SUCCESS)
+ return ret;
return EXIT_SUCCESS;
}
-static int t_keep_argv(void)
+static int t_getopt6_aflags(int unused_argc, char **unused_argv)
{
- static const char *const one_argv[] = {"what", nullptr};
- const char **argv = const_cast2(const char **, one_argv);
- if (HX_getopt(table, nullptr, &argv, HXOPT_KEEP_ARGV) != HXOPT_ERR_SUCCESS)
+ struct HXopt6_result result;
+ char *argv[] = {"./prog", "-q", "foo", "-qS", "quux", "bar", "--NIL", nullptr};
+
+ printf("== ANY_ORDER ==\n");
+ int ret = HX_getopt6(table, 6, argv, &result, HXOPT_ANY_ORDER);
+ if (ret != HXOPT_ERR_SUCCESS ||
+ result.uarg != nullptr || result.dup_argv != nullptr)
+ return EXIT_FAILURE;
+ HX_getopt6_clean(&result);
+ free(opt_kstr);
+ opt_kstr = nullptr;
+
+ /* T: Asking for DUP should produce data */
+ /* T: Limit strings -- NIL must not be processed */
+ printf("== ANY_ORDER/DUP_ARGS ==\n");
+ ret = HX_getopt6(table, 6, argv, &result, HXOPT_ANY_ORDER | HXOPT_DUP_ARGS);
+ if (ret != HXOPT_ERR_SUCCESS ||
+ result.uarg != nullptr ||
+ result.dup_argv == nullptr || result.dup_argc != 3)
+ return EXIT_FAILURE;
+ if (strcmp(result.dup_argv[0], argv[0]) != 0 ||
+ strcmp(result.dup_argv[1], argv[2]) != 0 ||
+ strcmp(result.dup_argv[2], argv[5]) != 0)
+ return EXIT_FAILURE;
+ for (int i = 0; i < result.dup_argc; ++i)
+ printf(" %s", result.dup_argv[i]);
+ printf("\n");
+ HX_getopt6_clean(&result);
+ free(opt_kstr);
+ opt_kstr = nullptr;
+
+ /* T: POSIX order */
+ printf("== RQ_ORDER/DUP_ARGS ==\n");
+ ret = HX_getopt6(table, 6, argv, &result, HXOPT_RQ_ORDER | HXOPT_DUP_ARGS);
+ if (ret != HXOPT_ERR_SUCCESS ||
+ result.uarg != nullptr ||
+ result.dup_argv == nullptr || result.dup_argc != 5)
+ return EXIT_FAILURE;
+ if (strcmp(result.dup_argv[0], argv[0]) != 0 ||
+ strcmp(result.dup_argv[1], argv[2]) != 0 ||
+ strcmp(result.dup_argv[2], argv[3]) != 0 ||
+ strcmp(result.dup_argv[3], argv[4]) != 0 ||
+ strcmp(result.dup_argv[4], argv[5]) != 0)
return EXIT_FAILURE;
- return argv == one_argv ? EXIT_SUCCESS : EXIT_FAILURE;
+ for (int i = 0; i < result.dup_argc; ++i)
+ printf(" %s", result.dup_argv[i]);
+ printf("\n");
+ HX_getopt6_clean(&result);
+ free(opt_kstr);
+ opt_kstr = nullptr;
+
+ /* T: Asking for ITER should produce data */
+ printf("== ANY_ORDER/ITER_ARGS ==\n");
+ ret = HX_getopt6(table, 6, argv, &result, HXOPT_ANY_ORDER | HXOPT_ITER_ARGS);
+ if (ret != HXOPT_ERR_SUCCESS || result.dup_argv != nullptr ||
+ result.nargs != 2 || result.uarg == nullptr)
+ return EXIT_FAILURE;
+ if (strcmp(result.uarg[0], argv[2]) != 0 ||
+ strcmp(result.uarg[1], argv[5]) != 0)
+ return EXIT_FAILURE;
+ for (int i = 0; i < result.nargs; ++i)
+ printf(" %s", result.uarg[i]);
+ printf("\n");
+ HX_getopt6_clean(&result);
+ free(opt_kstr);
+ opt_kstr = nullptr;
+
+ /* T: Asking for ITER should produce data */
+ printf("== ANY_ORDER/ITER_OPTS ==\n");
+ ret = HX_getopt6(table, 6, argv, &result, HXOPT_ANY_ORDER | HXOPT_ITER_OPTS);
+ if (ret != HXOPT_ERR_SUCCESS || result.nopts != 3 ||
+ result.desc == nullptr || result.oarg == nullptr)
+ return EXIT_FAILURE;
+ if (result.desc[0]->sh != 'q' || result.oarg[0] != nullptr ||
+ result.desc[1]->sh != 'q' || result.oarg[1] != nullptr ||
+ result.desc[2]->sh != 'S' || result.oarg[2] == nullptr ||
+ strcmp(result.oarg[2], argv[4]) != 0)
+ return EXIT_FAILURE;
+ printf(" %s", argv[0]);
+ for (int i = 0; i < result.nopts; ++i) {
+ printf(" -%c", result.desc[i]->sh);
+ if (result.oarg[i] != nullptr)
+ printf(" %s", result.oarg[i]);
+ }
+ printf("\n");
+ HX_getopt6_clean(&result);
+ free(opt_kstr);
+ opt_kstr = nullptr;
+ return EXIT_SUCCESS;
}
-static int runner(int argc, char **argv)
+static int t_getopt6_eq(void)
{
- char **nargv = nullptr;
- int ret = HX_getopt5(table, argv, &argc, &nargv, HXOPT_USAGEONERR);
- printf("Return value of HX_getopt: %d\n", ret);
- if (ret == EXIT_SUCCESS)
- HX_zvecfree(nargv);
- ret = t_empty_argv();
- if (ret != EXIT_SUCCESS)
- return ret;
- ret = t_keep_argv();
- if (ret != EXIT_SUCCESS)
- return ret;
-
- printf("Either-or is: %s\n", opt_eitheror[opt_dst]);
- printf("values: D=%lf I=%d L=%ld S=%s\n",
- opt_kdbl, opt_kint, opt_klong, opt_kstr);
- printf("Verbosity level: %d\n", opt_v);
- printf("Mask: 0x%08X\n", opt_mask);
- printf("mcstr: >%s<\n", opt_mcstr);
- return t_pthru();
+ printf("== getopt6_eq ==\n");
+ char *argv[] = {"./prog", "--strp", "bar", "--strp=bar"};
+ struct HXopt6_result result;
+ int ret = HX_getopt6(table, ARRAY_SIZE(argv), argv, &result,
+ HXOPT_ITER_OPTS | HXOPT_USAGEONERR);
+ if (ret != HXOPT_ERR_SUCCESS || result.nopts != 2)
+ return EXIT_FAILURE;
+ if (strcmp(result.oarg[0], result.oarg[1]) != 0)
+ return EXIT_FAILURE;
+ HX_getopt6_clean(&result);
+ free(opt_kstr);
+ opt_kstr = nullptr;
+ return EXIT_SUCCESS;
}
int main(int argc, char **argv)
@@ -145,6 +226,12 @@ int main(int argc, char **argv)
int ret = runner(argc, argv);
if (ret != EXIT_SUCCESS)
printf("FAILED\n");
+ ret = t_getopt6_aflags(argc, argv);
+ if (ret != EXIT_SUCCESS)
+ printf("FAILED\n");
+ ret = t_getopt6_eq();
+ if (ret != EXIT_SUCCESS)
+ printf("FAILED\n");
HX_exit();
return ret;
}
diff --git a/src/tc-realpath.c b/src/tc-realpath.c
index b71c127..e4933a5 100644
--- a/src/tc-realpath.c
+++ b/src/tc-realpath.c
@@ -10,36 +10,14 @@
#include <libHX/string.h>
#include "internal.h"
-static unsigned int rp_flags;
-static unsigned int rp_absolute;
-static unsigned int rp_no_parent, rp_no_self;
-
static const struct HXoption rp_option_table[] = {
- {.sh = 'a', .type = HXTYPE_NONE, .ptr = &rp_absolute,
- .help = "Produce an absolute path"},
- {.sh = 'p', .type = HXTYPE_NONE, .ptr = &rp_no_parent,
- .help = "Deactivate resolution of \"..\" entries"},
- {.sh = 's', .type = HXTYPE_NONE, .ptr = &rp_no_self,
- .help = "Deactivate resolution of \".\" entries"},
+ {.sh = 'a', .type = HXTYPE_NONE, .help = "Produce an absolute path"},
+ {.sh = 'p', .type = HXTYPE_NONE, .help = "Deactivate resolution of \"..\" entries"},
+ {.sh = 's', .type = HXTYPE_NONE, .help = "Deactivate resolution of \".\" entries"},
HXOPT_AUTOHELP,
HXOPT_TABLEEND,
};
-static bool rp_get_options(char **oargv, int *argc, char ***argv)
-{
- if (HX_getopt5(rp_option_table, oargv, argc, argv, HXOPT_USAGEONERR) !=
- HXOPT_ERR_SUCCESS)
- return false;
- rp_flags = HX_REALPATH_DEFAULT;
- if (rp_absolute)
- rp_flags |= HX_REALPATH_ABSOLUTE;
- if (rp_no_parent)
- rp_flags &= ~HX_REALPATH_PARENT;
- if (rp_no_self)
- rp_flags &= ~HX_REALPATH_SELF;
- return true;
-}
-
static void t_1(void)
{
hxmc_t *tmp = HXmc_strinit("");
@@ -48,19 +26,37 @@ static void t_1(void)
HXmc_free(tmp);
}
-int main(int argc, char **oargv)
+static void t_2(void)
+{
+ hxmc_t *tmp = HXmc_strinit("");
+ int ret = HX_realpath(&tmp, "../../../../dev/tty", HX_REALPATH_ABSOLUTE | HX_REALPATH_DEFAULT);
+ if (ret > 0)
+ printf("t_2: %s\n", tmp);
+ HXmc_free(tmp);
+}
+
+int main(int argc, char **argv)
{
- char **argv = nullptr;
hxmc_t *res;
int ret;
-
- if (!rp_get_options(oargv, &argc, &argv))
- return EXIT_FAILURE;
+ struct HXopt6_result result;
+ if (HX_getopt6(rp_option_table, argc, argv, &result,
+ HXOPT_USAGEONERR | HXOPT_ITER_OA) != HXOPT_ERR_SUCCESS)
+ return false;
+ unsigned int rp_flags = HX_REALPATH_DEFAULT;
+ for (int i = 0; i < result.nopts; ++i) {
+ switch (result.desc[i]->sh) {
+ case 'a': rp_flags |= HX_REALPATH_ABSOLUTE; break;
+ case 'p': rp_flags &= ~HX_REALPATH_PARENT; break;
+ case 's': rp_flags &= ~HX_REALPATH_SELF; break;
+ }
+ }
t_1();
+ t_2();
res = NULL;
- for (int i = 1; i < argc; ++i) {
- ret = HX_realpath(&res, argv[argc], rp_flags);
+ for (int i = 0; i < result.nargs; ++i) {
+ ret = HX_realpath(&res, result.uarg[i], rp_flags);
if (ret < 0) {
perror("HX_realpath");
printf("\n");
@@ -68,6 +64,6 @@ int main(int argc, char **oargv)
printf("%s\n", res);
}
}
- HX_zvecfree(argv);
+ HX_getopt6_clean(&result);
return EXIT_SUCCESS;
}
diff --git a/src/tc-string.c b/src/tc-string.c
index e7f90c2..1c67ede 100644
--- a/src/tc-string.c
+++ b/src/tc-string.c
@@ -108,23 +108,22 @@ static void t_strncat(void)
printf("String: >%s<\n", data);
}
-static void t_strnlen(void)
-{
- static const char s[] = "Hello world";
- printf("# strnlen: %" HX_SIZET_FMT "u %" HX_SIZET_FMT "u "
- "%" HX_SIZET_FMT "u %" HX_SIZET_FMT "u %" HX_SIZET_FMT "u\n",
- HX_strnlen(s, -1), HX_strnlen(s, 0), HX_strnlen(s, 1),
- HX_strnlen(s, strlen(s)), HX_strnlen(s, 999));
-}
-
static void t_strsep(void)
{
- char b[] = "jengelh:x:1500:100:Jan Engelhardt:/home/jengelh:/bin/bash";
+ char orig[] = "jengelh:x:1500:100:Jan Engelhardt:/home/jengelh:/bin/bash";
+ char b[sizeof(orig)];
char *wp = b, *ret;
printf("# strsep\n");
+ memcpy(b, orig, sizeof(orig));
while ((ret = HX_strsep2(&wp, ":")) != NULL)
printf("%s\n", ret);
+
+ printf("# strtok_r\n");
+ memcpy(b, orig, sizeof(orig));
+ wp = b;
+ while ((ret = strtok_r(nullptr, ":", &wp)) != nullptr)
+ printf("%s\n", ret);
}
static void t_strtrim(void)
@@ -132,11 +131,6 @@ static void t_strtrim(void)
char a[] = " a and b ", aexp[] = "a and b ";
char b[] = " a and b ", bexp[] = " a and b";
char c[] = "a&b", cexp[] = "a&b";
- const char *r;
-
- r = HX_stpltrim(a);
- printf("HX_stpltrim(\"%s\") = \"%s\"\n", a, r);
- assert(strcmp(r, aexp) == 0);
printf("HX_strltrim(\"%s\") = ", a);
printf("\"%s\"\n", (HX_strltrim(a), a));
@@ -146,7 +140,6 @@ static void t_strtrim(void)
printf("\"%s\"\n", (HX_strrtrim(b), b));
assert(strcmp(b, bexp) == 0);
- assert(strcmp(cexp, HX_stpltrim(c)) == 0);
assert(strcmp(cexp, (HX_strltrim(c), c)) == 0);
assert(strcmp(cexp, (HX_strrtrim(c), c)) == 0);
}
@@ -355,8 +348,16 @@ static int t_time_units(void)
static const struct {
unsigned long long input;
unsigned int flags;
- const char expect_out[24];
+ const char expect_out[41];
} vt[] = {
+#define SECONDS_PER_YEAR 31557600 /* 365.25 days */
+#define SECONDS_PER_MONTH 2629800 /* 1/12th of that year = 30.4375 days */
+ {18446744073709551615ULL, 0, "213503982334601d7h15s"},
+ {18446744073709526399ULL, 0, "213503982334600d23h59min59s"},
+ {18446744073709180799ULL, HXUNIT_WEEKS, "30500568904942weeks2d23h59min59s"},
+ {18446744073708451799ULL, HXUNIT_MONTHS, "7014504553087months2d23h59min59s"},
+ {18446744073707636399ULL, HXUNIT_MONTHS | HXUNIT_WEEKS, "7014504553086months3weeks2d23h59min59s"},
+ {18446744073688622999ULL, HXUNIT_YEARS | HXUNIT_MONTHS | HXUNIT_WEEKS, "584542046089y11months2weeks2d23h59min59s"},
{31536000, 0, "365d"},
{31622400, 0, "366d"},
{34819200, HXUNIT_WEEKS, "57weeks4d"},
@@ -391,14 +392,19 @@ static int t_time_units(void)
static int t_time_strto(void)
{
#define NS_PER_S 1000000000ULL
+ #define S_PER_Y 31557600
+ enum {
+ NO_NSEC = 0x2U,
+ };
static const struct {
const char *input;
unsigned long long expect_s, expect_ns;
const char expect_rem[16];
+ unsigned int flags;
} vt[] = {
{"29µs", 0, 29000, ""},
- {"1y", 31557600, NS_PER_S * 31557600, ""},
- {"1y1month1week1d1h1min1s ", 31557600+2629800+86400*8+3600+60+1, NS_PER_S * (31557600+2629800+86400*8+3600+60+1), ""},
+ {"1y", S_PER_Y, NS_PER_S * S_PER_Y, ""},
+ {"1y1month1week1d1h1min1s ", S_PER_Y+2629800+86400*8+3600+60+1, NS_PER_S * (S_PER_Y+2629800+86400*8+3600+60+1), ""},
{" -1d", 0, 0, "-1d"},
{"1 -", 0, 0, "1 -"},
{"12.5 hours .5 hours 240 minutes 25200 seconds", 86400, NS_PER_S * 86400, ""},
@@ -410,23 +416,42 @@ static int t_time_strto(void)
{"1s0.0", 1, NS_PER_S, ""},
{"1s1s", 2, 2 * NS_PER_S, ""},
{"1s1", 1, 1 * NS_PER_S, "1"},
+ {"584542046090y", 584542046090ULL * S_PER_Y, ULLONG_MAX, "", NO_NSEC},
+ {"584542046090y19767615s", ULLONG_MAX, ULLONG_MAX, "", NO_NSEC},
+ {"584542046090y19767616s", ULLONG_MAX, ULLONG_MAX, "19767616s", NO_NSEC},
+ {"584542046090y", 584542046090ULL * S_PER_Y, ULLONG_MAX, "", NO_NSEC},
{"584542046091y", ULLONG_MAX, ULLONG_MAX, "584542046091y"},
+ {"584542046091.0y", ULLONG_MAX, ULLONG_MAX, "584542046091.0y"},
+ {"P1M", S_PER_Y / 12, S_PER_Y / 12 * NS_PER_S, ""},
+ {"p1m", 0, 0, "p1m"},
+ {"PT1M", 60, 60 * NS_PER_S, ""},
+ {"P584542046090Y", 584542046090ULL * S_PER_Y, ULLONG_MAX, "", NO_NSEC},
+ {"P0DT0H0M0.0S", 0, 0},
+ {"P0DT12H45M0.0S", 12 * 3600 + 45 * 60, (12 * 3600 + 45 * 60) * NS_PER_S},
+ {"P1D", 86400, 86400 * NS_PER_S},
};
- char *end;
printf("===== t_time_strto\n");
for (size_t i = 0; i < ARRAY_SIZE(vt); ++i) {
+ char *end, *end_ns;
unsigned long long q = HX_strtoull_sec(vt[i].input, &end);
- unsigned long long qn = HX_strtoull_nsec(vt[i].input, &end);
- printf("Observed: \"%s\" => %llus [%lluns] + \"%s\"\n", vt[i].input, q, qn, end);
- if (q != vt[i].expect_s || qn != vt[i].expect_ns) {
- printf("Expected: %llus [%lluns]\n", vt[i].expect_s, vt[i].expect_ns);
+ unsigned long long qn = HX_strtoull_nsec(vt[i].input, &end_ns);
+ printf("Observed: \"%s\" => %llus + \"%s\" [%lluns + \"%s\"]\n",
+ vt[i].input, q, end, qn, end_ns);
+ if (q != vt[i].expect_s || strcmp(end, vt[i].expect_rem) != 0) {
+ printf("-!- Expected: %llus + \"%s\"\n", vt[i].expect_s, vt[i].expect_rem);
return EXIT_FAILURE;
}
- if (strcmp(end, vt[i].expect_rem) != 0) {
- printf("Expected: remainder \"%s\"\n", vt[i].expect_rem);
+ if (vt[i].flags & NO_NSEC)
+ continue;
+ if (qn != vt[i].expect_ns || strcmp(end_ns, vt[i].expect_rem) != 0) {
+ printf("-!- Expected: %llus + \"%s\"\n", vt[i].expect_ns, vt[i].expect_rem);
return EXIT_FAILURE;
}
}
+ if (HX_strtoull8601p_sec("P1D", nullptr) != 86400) {
+ printf("8601p_sec failed\n");
+ return EXIT_FAILURE;
+ }
return EXIT_SUCCESS;
}
@@ -488,7 +513,6 @@ static int runner(int argc, char **argv)
if (ret != EXIT_SUCCESS)
return EXIT_FAILURE;
t_strncat();
- t_strnlen();
t_strdup();
t_strsep();
t_strtrim();
diff --git a/src/tc-strquote.c b/src/tc-strquote.c
index ef357d1..c96aa19 100644
--- a/src/tc-strquote.c
+++ b/src/tc-strquote.c
@@ -10,7 +10,6 @@
static const char input1[] = "\"Good\" ol' \\'escaped\\' strings";
static const char output1a[] = "\"Good\" ol\\' \\\\\\'escaped\\\\\\' strings";
static const char output1b[] = "\\\"Good\\\" ol' \\\\'escaped\\\\' strings";
-static const char output1c[] = "\"Good\" ol'' \\''escaped\\'' strings";
static const char input2[] = "<p style=\"height: 1;\">Foo &amp; \"bar\"</p>";
static const char output2[] =
"&lt;p style=&quot;height: 1;&quot;&gt;Foo &amp;amp; &quot;bar&quot;&lt;/p&gt;";
@@ -20,8 +19,6 @@ static const char output3b[] = "\\20\\23o\\3Dfoo(*)\\2Cba\\5Cr\\20";
static const char output3c[] = "ICNvPWZvbygqKSxiYVxyIA==";
static const char input4[] = "http://user:pass@host.de/~path/file(msvc);stuff.php?query[phpindex]=value&another=one;stuff";
static const char output4[] = "http%3A%2F%2Fuser%3Apass%40host.de%2F~path%2Ffile%28msvc%29%3Bstuff.php%3Fquery%5Bphpindex%5D%3Dvalue%26another%3Done%3Bstuff";
-static const char input5[] = "echo hello `echo world`";
-static const char output5[] = "echo hello ``echo world``";
static const char input6[] = "\xfb\xef\xff";
static const char output6[] = "++//";
static const char input7[] = "\xfb\xef\xff";
@@ -58,13 +55,11 @@ int main(void)
return EXIT_FAILURE;
tst(input1, HXQUOTE_SQUOTE, output1a);
tst(input1, HXQUOTE_DQUOTE, output1b);
- tst(input1, HXQUOTE_SQLSQUOTE, output1c);
tst(input2, HXQUOTE_HTML, output2);
tst(input3, HXQUOTE_LDAPFLT, output3a);
tst(input3, HXQUOTE_LDAPRDN, output3b);
tst(input3, HXQUOTE_BASE64, output3c);
tst(input4, HXQUOTE_URIENC, output4);
- tst(input5, HXQUOTE_SQLBQUOTE, output5);
tst(input6, HXQUOTE_BASE64, output6);
tst(input7, HXQUOTE_BASE64URL, output7);
return 0;
diff --git a/src/tc-switchuser.c b/src/tc-switchuser.c
index e5d2c25..379dfff 100644
--- a/src/tc-switchuser.c
+++ b/src/tc-switchuser.c
@@ -10,19 +10,28 @@
#include <libHX/defs.h>
#include <libHX/option.h>
#include <libHX/proc.h>
+#include "internal.h"
#if defined(HAVE_INITGROUPS)
-static char *user_name, *group_name;
static const struct HXoption options_table[] = {
- {.sh = 'u', .type = HXTYPE_STRING, .ptr = &user_name},
- {.sh = 'g', .type = HXTYPE_STRING, .ptr= &group_name},
+ {.sh = 'u', .type = HXTYPE_STRING},
+ {.sh = 'g', .type = HXTYPE_STRING},
HXOPT_TABLEEND,
};
static int runner(int argc, char **argv)
{
- if (HX_getopt(options_table, &argc, &argv, HXOPT_USAGEONERR) != HXOPT_ERR_SUCCESS)
+ char *user_name = nullptr, *group_name = nullptr;
+ struct HXopt6_result result;
+
+ if (HX_getopt6(options_table, argc, argv, &result,
+ HXOPT_USAGEONERR | HXOPT_ITER_OPTS) != HXOPT_ERR_SUCCESS)
return EXIT_FAILURE;
+ for (int i = 0; i < result.nopts; ++i) {
+ if (result.desc[i]->sh == 'u') user_name = result.oarg[i];
+ if (result.desc[i]->sh == 'g') group_name = result.oarg[i];
+ }
+
const char *user = user_name != NULL ? user_name : "-";
const char *group = group_name != NULL ? group_name : "-";
switch (HXproc_switch_user(user_name, group_name)) {
@@ -63,7 +72,7 @@ static int runner(int argc, char **argv)
break;
}
}
- HX_zvecfree(argv);
+ HX_getopt6_clean(&result);
return EXIT_SUCCESS;
}
diff --git a/src/tc-time.c b/src/tc-time.c
index e810233..e1ec12b 100644
--- a/src/tc-time.c
+++ b/src/tc-time.c
@@ -5,6 +5,7 @@
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
+#include <sys/time.h>
#include <libHX/defs.h>
#include <libHX/init.h>
#include <libHX/misc.h>
diff --git a/src/tx-compile.cpp b/src/tx-compile.cpp
index 2c21e3b..2bcdb1e 100644
--- a/src/tx-compile.cpp
+++ b/src/tx-compile.cpp
@@ -1 +1,2 @@
#include "tc-compile.c"
+#include <libHX/scope.hpp>
diff --git a/src/tx-option.cpp b/src/tx-option.cpp
deleted file mode 100644
index 248ab7c..0000000
--- a/src/tx-option.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef __cplusplus
-# include <stdlib.h>
-#else
-# include <cstdlib>
-#endif
-#include <libHX/option.h>
-
-static unsigned int g_verbose;
-static const struct HXoption t[] = {
- {nullptr, 'v', HXTYPE_NONE | HXOPT_INC, &g_verbose},
- HXOPT_AUTOHELP,
- HXOPT_TABLEEND,
-};
-
-int main(int argc, char **argv)
-{
- if (HX_getopt(t, &argc, &argv, HXOPT_USAGEONERR) != HXOPT_ERR_SUCCESS)
- return EXIT_FAILURE;
- HX_zvecfree(argv);
- return EXIT_SUCCESS;
-}