summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Delamarre <cedric.delamarre@scilab-enterprises.com>2017-02-09 14:08:26 +0100
committerClément DAVID <clement.david@scilab-enterprises.com>2017-02-17 16:47:17 +0100
commitd6bd60b1a940fa129621daff7d34ba4dc82658c5 (patch)
treefabce138c7f699cf4c0049d8ef1fd3621519f40d
parentc2527825156a9a8b35df10a4f3951a2d0a2756ab (diff)
downloadscilab-d6bd60b1a940fa129621daff7d34ba4dc82658c5.zip
scilab-d6bd60b1a940fa129621daff7d34ba4dc82658c5.tar.gz
Use automake 1.15, autoconf 2.69, libtool 2.4.6
aclocal 1.14 is no more supported in the last Ubuntu 16.04 LTS Change-Id: I6618ca34f7765bccf9cacda3a48c9927411903eb
-rw-r--r--scilab/Makefile.in88
-rw-r--r--scilab/aclocal.m4205
-rw-r--r--scilab/config/ltmain.sh5420
-rwxr-xr-xscilab/configure4402
-rw-r--r--scilab/contrib/Makefile.in25
-rw-r--r--scilab/desktop/Makefile.in25
-rw-r--r--scilab/desktop/images/icons/Makefile.in25
-rw-r--r--scilab/m4/libtool.m42552
-rw-r--r--scilab/m4/ltoptions.m4127
-rw-r--r--scilab/m4/ltsugar.m47
-rw-r--r--scilab/m4/ltversion.m412
-rw-r--r--scilab/m4/lt~obsolete.m47
-rw-r--r--scilab/modules/Makefile.in25
-rw-r--r--scilab/modules/action_binding/Makefile.in29
-rw-r--r--scilab/modules/api_scilab/Makefile.in31
-rw-r--r--scilab/modules/arnoldi/Makefile.in29
-rw-r--r--scilab/modules/ast/Makefile.in38
-rw-r--r--scilab/modules/atoms/Makefile.in27
-rw-r--r--scilab/modules/boolean/Makefile.in29
-rw-r--r--scilab/modules/cacsd/Makefile.in29
-rw-r--r--scilab/modules/call_scilab/Makefile.in31
-rw-r--r--scilab/modules/commons/Makefile.in29
-rw-r--r--scilab/modules/compatibility_functions/Makefile.in27
-rw-r--r--scilab/modules/completion/Makefile.in31
-rw-r--r--scilab/modules/console/Makefile.in31
-rw-r--r--scilab/modules/core/Makefile.in30
-rw-r--r--scilab/modules/core/includes/machine.h.in3
-rw-r--r--scilab/modules/coverage/Makefile.in29
-rw-r--r--scilab/modules/data_structures/Makefile.in29
-rw-r--r--scilab/modules/demo_tools/Makefile.in27
-rw-r--r--scilab/modules/development_tools/Makefile.in27
-rw-r--r--scilab/modules/development_tools/src/fake/Makefile.in25
-rw-r--r--scilab/modules/differential_equations/Makefile.in29
-rw-r--r--scilab/modules/dynamic_link/Makefile.in31
-rw-r--r--scilab/modules/dynamic_link/src/scripts/Makefile.in9
-rwxr-xr-xscilab/modules/dynamic_link/src/scripts/configure5212
-rw-r--r--scilab/modules/dynamic_link/src/scripts/ltmain.sh5420
-rw-r--r--scilab/modules/dynamic_link/src/scripts/m4/libtool.m42552
-rw-r--r--scilab/modules/dynamic_link/src/scripts/m4/ltoptions.m4127
-rw-r--r--scilab/modules/dynamic_link/src/scripts/m4/ltsugar.m47
-rw-r--r--scilab/modules/dynamic_link/src/scripts/m4/ltversion.m412
-rw-r--r--scilab/modules/dynamic_link/src/scripts/m4/lt~obsolete.m47
-rw-r--r--scilab/modules/elementary_functions/Makefile.in29
-rw-r--r--scilab/modules/external_objects/Makefile.in32
-rw-r--r--scilab/modules/external_objects_java/Makefile.in32
-rw-r--r--scilab/modules/fftw/Makefile.in29
-rw-r--r--scilab/modules/fileio/Makefile.in31
-rw-r--r--scilab/modules/functions/Makefile.in29
-rw-r--r--scilab/modules/functions_manager/Makefile.in32
-rw-r--r--scilab/modules/genetic_algorithms/Makefile.in27
-rw-r--r--scilab/modules/graph/Makefile.in27
-rw-r--r--scilab/modules/graphic_export/Makefile.in29
-rw-r--r--scilab/modules/graphic_objects/Makefile.in29
-rw-r--r--scilab/modules/graphics/Makefile.in29
-rw-r--r--scilab/modules/gui/Makefile.in30
-rw-r--r--scilab/modules/hdf5/Makefile.in29
-rw-r--r--scilab/modules/helptools/Makefile.in29
-rw-r--r--scilab/modules/history_browser/Makefile.in29
-rw-r--r--scilab/modules/history_manager/Makefile.in31
-rw-r--r--scilab/modules/integer/Makefile.in29
-rw-r--r--scilab/modules/interpolation/Makefile.in29
-rw-r--r--scilab/modules/io/Makefile.in29
-rw-r--r--scilab/modules/javasci/Makefile.in33
-rw-r--r--scilab/modules/jvm/Makefile.in30
-rw-r--r--scilab/modules/linear_algebra/Makefile.in29
-rw-r--r--scilab/modules/localization/Makefile.in31
-rw-r--r--scilab/modules/m2sci/Makefile.in27
-rw-r--r--scilab/modules/matio/Makefile.in29
-rw-r--r--scilab/modules/mexlib/Makefile.in30
-rw-r--r--scilab/modules/modules_manager/Makefile.in27
-rw-r--r--scilab/modules/mpi/Makefile.in32
-rw-r--r--scilab/modules/optimization/Makefile.in29
-rw-r--r--scilab/modules/output_stream/Makefile.in31
-rw-r--r--scilab/modules/overloading/Makefile.in27
-rw-r--r--scilab/modules/parallel/Makefile.in31
-rw-r--r--scilab/modules/parameters/Makefile.in29
-rw-r--r--scilab/modules/polynomials/Makefile.in29
-rw-r--r--scilab/modules/prebuildjava/Makefile.in27
-rw-r--r--scilab/modules/preferences/Makefile.in29
-rw-r--r--scilab/modules/randlib/Makefile.in29
-rw-r--r--scilab/modules/renderer/Makefile.in29
-rw-r--r--scilab/modules/scicos/Makefile.in34
-rw-r--r--scilab/modules/scicos_blocks/Makefile.in31
-rw-r--r--scilab/modules/scinotes/Makefile.in29
-rw-r--r--scilab/modules/signal_processing/Makefile.in29
-rw-r--r--scilab/modules/simulated_annealing/Makefile.in27
-rw-r--r--scilab/modules/slint/Makefile.in30
-rw-r--r--scilab/modules/sound/Makefile.in29
-rw-r--r--scilab/modules/sparse/Makefile.in29
-rw-r--r--scilab/modules/special_functions/Makefile.in29
-rw-r--r--scilab/modules/spreadsheet/Makefile.in29
-rw-r--r--scilab/modules/statistics/Makefile.in29
-rw-r--r--scilab/modules/string/Makefile.in31
-rw-r--r--scilab/modules/tclsci/Makefile.in29
-rw-r--r--scilab/modules/threads/Makefile.in31
-rw-r--r--scilab/modules/time/Makefile.in30
-rw-r--r--scilab/modules/types/Makefile.in29
-rw-r--r--scilab/modules/ui_data/Makefile.in29
-rw-r--r--scilab/modules/umfpack/Makefile.in29
-rw-r--r--scilab/modules/windows_tools/Makefile.in29
-rw-r--r--scilab/modules/xcos/Makefile.in29
-rw-r--r--scilab/modules/xml/Makefile.in29
102 files changed, 17664 insertions, 10961 deletions
diff --git a/scilab/Makefile.in b/scilab/Makefile.in
index fe31034..8cad7b7 100644
--- a/scilab/Makefile.in
+++ b/scilab/Makefile.in
@@ -1,7 +1,7 @@
1# Makefile.in generated by automake 1.14.1 from Makefile.am. 1# Makefile.in generated by automake 1.15 from Makefile.am.
2# @configure_input@ 2# @configure_input@
3 3
4# Copyright (C) 1994-2013 Free Software Foundation, Inc. 4# Copyright (C) 1994-2014 Free Software Foundation, Inc.
5 5
6# This Makefile.in is free software; the Free Software Foundation 6# This Makefile.in is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it, 7# gives unlimited permission to copy and/or distribute it,
@@ -46,7 +46,17 @@
46 46
47 47
48VPATH = @srcdir@ 48VPATH = @srcdir@
49am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' 49am__is_gnu_make = { \
50 if test -z '$(MAKELEVEL)'; then \
51 false; \
52 elif test -n '$(MAKE_HOST)'; then \
53 true; \
54 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
55 true; \
56 else \
57 false; \
58 fi; \
59}
50am__make_running_with_option = \ 60am__make_running_with_option = \
51 case $${target_option-} in \ 61 case $${target_option-} in \
52 ?) ;; \ 62 ?) ;; \
@@ -140,32 +150,6 @@ bin_PROGRAMS = scilab-bin$(EXEEXT) scilab-cli-bin$(EXEEXT)
140# The user wants to compile the localization files 150# The user wants to compile the localization files
141@GENERATE_LOCALIZATION_FILES_TRUE@am__append_13 = localization 151@GENERATE_LOCALIZATION_FILES_TRUE@am__append_13 = localization
142@COMPILATION_TESTS_TRUE@am__append_14 = check-java 152@COMPILATION_TESTS_TRUE@am__append_14 = check-java
143DIST_COMMON = $(top_srcdir)/Makefile.call_scilab.am \
144 $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
145 $(top_srcdir)/configure $(am__configure_deps) \
146 $(top_srcdir)/modules/core/includes/machine.h.in \
147 $(top_srcdir)/config/mkinstalldirs $(srcdir)/scilab.pc.in \
148 $(top_srcdir)/etc/modules.xml.in \
149 $(top_srcdir)/etc/classpath.xml.in \
150 $(top_srcdir)/etc/Info.plist.in \
151 $(top_srcdir)/etc/logging.properties.in \
152 $(srcdir)/scilab.properties.in \
153 $(srcdir)/scilab-lib.properties.in \
154 $(srcdir)/scilab-lib-doc.properties.in \
155 $(top_srcdir)/modules/helptools/etc/SciDocConf.xml.in \
156 $(top_srcdir)/modules/core/includes/version.h.in \
157 $(top_srcdir)/modules/atoms/etc/repositories.in \
158 $(top_srcdir)/modules/atoms/tests/unit_tests/repositories.orig.in \
159 $(top_srcdir)/config/depcomp COPYING config/ar-lib \
160 config/compile config/config.guess config/config.rpath \
161 config/config.sub config/depcomp config/install-sh \
162 config/missing config/mkinstalldirs config/ltmain.sh \
163 $(top_srcdir)/config/ar-lib $(top_srcdir)/config/compile \
164 $(top_srcdir)/config/config.guess \
165 $(top_srcdir)/config/config.rpath \
166 $(top_srcdir)/config/config.sub \
167 $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \
168 $(top_srcdir)/config/missing
169check_PROGRAMS = call_scilab_c_simple$(EXEEXT) call_scilab_c$(EXEEXT) \ 153check_PROGRAMS = call_scilab_c_simple$(EXEEXT) call_scilab_c$(EXEEXT) \
170 call_scilab_c_getlastjob$(EXEEXT) \ 154 call_scilab_c_getlastjob$(EXEEXT) \
171 call_scilab_c_DisableInteractiveMode$(EXEEXT) \ 155 call_scilab_c_DisableInteractiveMode$(EXEEXT) \
@@ -195,6 +179,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
195 $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac 179 $(top_srcdir)/m4/umfpack.m4 $(top_srcdir)/configure.ac
196am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 180am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
197 $(ACLOCAL_M4) 181 $(ACLOCAL_M4)
182DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
183 $(am__configure_deps) $(am__DIST_COMMON)
198am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ 184am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
199 configure.lineno config.status.lineno 185 configure.lineno config.status.lineno
200mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs 186mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@ -495,11 +481,11 @@ am__DIST_COMMON = $(srcdir)/Makefile.in \
495 $(top_srcdir)/modules/atoms/tests/unit_tests/repositories.orig.in \ 481 $(top_srcdir)/modules/atoms/tests/unit_tests/repositories.orig.in \
496 $(top_srcdir)/modules/core/includes/machine.h.in \ 482 $(top_srcdir)/modules/core/includes/machine.h.in \
497 $(top_srcdir)/modules/core/includes/version.h.in \ 483 $(top_srcdir)/modules/core/includes/version.h.in \
498 $(top_srcdir)/modules/helptools/etc/SciDocConf.xml.in COPYING \ 484 $(top_srcdir)/modules/helptools/etc/SciDocConf.xml.in \
499 config/ar-lib config/compile config/config.guess \ 485 ABOUT-NLS COPYING config/ar-lib config/compile \
500 config/config.rpath config/config.sub config/depcomp \ 486 config/config.guess config/config.rpath config/config.sub \
501 config/install-sh config/ltmain.sh config/missing \ 487 config/depcomp config/install-sh config/ltmain.sh \
502 config/mkinstalldirs 488 config/missing config/mkinstalldirs
503DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 489DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
504distdir = $(PACKAGE)-$(VERSION) 490distdir = $(PACKAGE)-$(VERSION)
505top_distdir = $(distdir) 491top_distdir = $(distdir)
@@ -672,6 +658,7 @@ LOOKS = @LOOKS@
672LTLIBICONV = @LTLIBICONV@ 658LTLIBICONV = @LTLIBICONV@
673LTLIBINTL = @LTLIBINTL@ 659LTLIBINTL = @LTLIBINTL@
674LTLIBOBJS = @LTLIBOBJS@ 660LTLIBOBJS = @LTLIBOBJS@
661LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
675LUCENE = @LUCENE@ 662LUCENE = @LUCENE@
676LUCENE_ANALYZER = @LUCENE_ANALYZER@ 663LUCENE_ANALYZER = @LUCENE_ANALYZER@
677LUCENE_PARSER = @LUCENE_PARSER@ 664LUCENE_PARSER = @LUCENE_PARSER@
@@ -1018,7 +1005,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
1018 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ 1005 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
1019 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ 1006 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
1020 esac; 1007 esac;
1021$(top_srcdir)/Makefile.call_scilab.am: 1008$(top_srcdir)/Makefile.call_scilab.am $(am__empty):
1022 1009
1023$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 1010$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
1024 $(SHELL) ./config.status --recheck 1011 $(SHELL) ./config.status --recheck
@@ -1855,7 +1842,7 @@ distdir: $(DISTFILES)
1855 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ 1842 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
1856 || chmod -R a+r "$(distdir)" 1843 || chmod -R a+r "$(distdir)"
1857dist-gzip: distdir 1844dist-gzip: distdir
1858 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz 1845 tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
1859 $(am__post_remove_distdir) 1846 $(am__post_remove_distdir)
1860dist-bzip2: distdir 1847dist-bzip2: distdir
1861 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 1848 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
@@ -1870,17 +1857,17 @@ dist-xz: distdir
1870 $(am__post_remove_distdir) 1857 $(am__post_remove_distdir)
1871 1858
1872dist-tarZ: distdir 1859dist-tarZ: distdir
1873 @echo WARNING: "Support for shar distribution archives is" \ 1860 @echo WARNING: "Support for distribution archives compressed with" \
1874 "deprecated." >&2 1861 "legacy program 'compress' is deprecated." >&2
1875 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 1862 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
1876 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z 1863 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
1877 $(am__post_remove_distdir) 1864 $(am__post_remove_distdir)
1878 1865
1879dist-shar: distdir 1866dist-shar: distdir
1880 @echo WARNING: "Support for distribution archives compressed with" \ 1867 @echo WARNING: "Support for shar distribution archives is" \
1881 "legacy program 'compress' is deprecated." >&2 1868 "deprecated." >&2
1882 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 1869 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
1883 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz 1870 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
1884 $(am__post_remove_distdir) 1871 $(am__post_remove_distdir)
1885dist-zip: distdir 1872dist-zip: distdir
1886 -rm -f $(distdir).zip 1873 -rm -f $(distdir).zip
@@ -1897,7 +1884,7 @@ dist dist-all:
1897distcheck: dist 1884distcheck: dist
1898 case '$(DIST_ARCHIVES)' in \ 1885 case '$(DIST_ARCHIVES)' in \
1899 *.tar.gz*) \ 1886 *.tar.gz*) \
1900 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ 1887 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
1901 *.tar.bz2*) \ 1888 *.tar.bz2*) \
1902 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ 1889 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
1903 *.tar.lz*) \ 1890 *.tar.lz*) \
@@ -1907,23 +1894,23 @@ distcheck: dist
1907 *.tar.Z*) \ 1894 *.tar.Z*) \
1908 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ 1895 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
1909 *.shar.gz*) \ 1896 *.shar.gz*) \
1910 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ 1897 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
1911 *.zip*) \ 1898 *.zip*) \
1912 unzip $(distdir).zip ;;\ 1899 unzip $(distdir).zip ;;\
1913 esac 1900 esac
1914 chmod -R a-w $(distdir) 1901 chmod -R a-w $(distdir)
1915 chmod u+w $(distdir) 1902 chmod u+w $(distdir)
1916 mkdir $(distdir)/_build $(distdir)/_inst 1903 mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
1917 chmod a-w $(distdir) 1904 chmod a-w $(distdir)
1918 test -d $(distdir)/_build || exit 0; \ 1905 test -d $(distdir)/_build || exit 0; \
1919 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ 1906 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
1920 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ 1907 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
1921 && am__cwd=`pwd` \ 1908 && am__cwd=`pwd` \
1922 && $(am__cd) $(distdir)/_build \ 1909 && $(am__cd) $(distdir)/_build/sub \
1923 && ../configure \ 1910 && ../../configure \
1924 $(AM_DISTCHECK_CONFIGURE_FLAGS) \ 1911 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
1925 $(DISTCHECK_CONFIGURE_FLAGS) \ 1912 $(DISTCHECK_CONFIGURE_FLAGS) \
1926 --srcdir=.. --prefix="$$dc_install_base" \ 1913 --srcdir=../.. --prefix="$$dc_install_base" \
1927 && $(MAKE) $(AM_MAKEFLAGS) \ 1914 && $(MAKE) $(AM_MAKEFLAGS) \
1928 && $(MAKE) $(AM_MAKEFLAGS) dvi \ 1915 && $(MAKE) $(AM_MAKEFLAGS) dvi \
1929 && $(MAKE) $(AM_MAKEFLAGS) check \ 1916 && $(MAKE) $(AM_MAKEFLAGS) check \
@@ -2126,6 +2113,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
2126 uninstall-infofilesDATA uninstall-pkgconfigDATA \ 2113 uninstall-infofilesDATA uninstall-pkgconfigDATA \
2127 uninstall-rootDATA uninstall-valgrindDATA 2114 uninstall-rootDATA uninstall-valgrindDATA
2128 2115
2116.PRECIOUS: Makefile
2117
2129 2118
2130# Don't do it for scilab_cli_bin. We want to be able to call it without 2119# Don't do it for scilab_cli_bin. We want to be able to call it without
2131# the java libs 2120# the java libs
@@ -2239,8 +2228,9 @@ doc-web: javadoc $(top_builddir)/scilab-bin $(top_builddir)/bin/scilab-adv-cli
2239@BUILD_HELP_TRUE@ done; \ 2228@BUILD_HELP_TRUE@ done; \
2240@BUILD_HELP_TRUE@ else \ 2229@BUILD_HELP_TRUE@ else \
2241@BUILD_HELP_TRUE@ echo "Cannot find Scilab-adv-cli binary"; \ 2230@BUILD_HELP_TRUE@ echo "Cannot find Scilab-adv-cli binary"; \
2242@BUILD_HELP_TRUE@ fi 2231@BUILD_HELP_TRUE@ fi \
2243@BUILD_HELP_FALSE@ @echo "Cannot buid help. Add --enable-build-help to the ./configure if you want to build it." 2232@BUILD_HELP_TRUE@else
2233@BUILD_HELP_TRUE@ @echo "Cannot buid help. Add --enable-build-help to the ./configure if you want to build it."
2244 2234
2245$(top_builddir)/modules/helptools/data/pages/CHANGES.html: $(top_builddir)/CHANGES.md 2235$(top_builddir)/modules/helptools/data/pages/CHANGES.html: $(top_builddir)/CHANGES.md
2246 sed -n '1,/html rendered CHANGES.md/{p;}' $@ >$@~ 2236 sed -n '1,/html rendered CHANGES.md/{p;}' $@ >$@~
diff --git a/scilab/aclocal.m4 b/scilab/aclocal.m4
index c5ead20..79aec35 100644
--- a/scilab/aclocal.m4
+++ b/scilab/aclocal.m4
@@ -1,6 +1,6 @@
1# generated automatically by aclocal 1.14.1 -*- Autoconf -*- 1# generated automatically by aclocal 1.15 -*- Autoconf -*-
2 2
3# Copyright (C) 1996-2013 Free Software Foundation, Inc. 3# Copyright (C) 1996-2014 Free Software Foundation, Inc.
4 4
5# This file is free software; the Free Software Foundation 5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it, 6# gives unlimited permission to copy and/or distribute it,
@@ -20,19 +20,19 @@ You have another version of autoconf. It may work, but is not guaranteed to.
20If you have problems, you may need to regenerate the build system entirely. 20If you have problems, you may need to regenerate the build system entirely.
21To do so, use the procedure documented by the package, typically 'autoreconf'.])]) 21To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22 22
23# gettext.m4 serial 66 (gettext-0.18.2) 23# gettext.m4 serial 68 (gettext-0.19.8)
24dnl Copyright (C) 1995-2013 Free Software Foundation, Inc. 24dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
25dnl This file is free software; the Free Software Foundation 25dnl This file is free software; the Free Software Foundation
26dnl gives unlimited permission to copy and/or distribute it, 26dnl gives unlimited permission to copy and/or distribute it,
27dnl with or without modifications, as long as this notice is preserved. 27dnl with or without modifications, as long as this notice is preserved.
28dnl 28dnl
29dnl This file can can be used in projects which are not available under 29dnl This file can be used in projects which are not available under
30dnl the GNU General Public License or the GNU Library General Public 30dnl the GNU General Public License or the GNU Library General Public
31dnl License but which still want to provide support for the GNU gettext 31dnl License but which still want to provide support for the GNU gettext
32dnl functionality. 32dnl functionality.
33dnl Please note that the actual code of the GNU gettext library is covered 33dnl Please note that the actual code of the GNU gettext library is covered
34dnl by the GNU Library General Public License, and the rest of the GNU 34dnl by the GNU Library General Public License, and the rest of the GNU
35dnl gettext package package is covered by the GNU General Public License. 35dnl gettext package is covered by the GNU General Public License.
36dnl They are *not* in the public domain. 36dnl They are *not* in the public domain.
37 37
38dnl Authors: 38dnl Authors:
@@ -183,13 +183,18 @@ changequote([,])dnl
183 [AC_LANG_PROGRAM( 183 [AC_LANG_PROGRAM(
184 [[ 184 [[
185#include <libintl.h> 185#include <libintl.h>
186$gt_revision_test_code 186#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
187extern int _nl_msg_cat_cntr; 187extern int _nl_msg_cat_cntr;
188extern int *_nl_domain_bindings; 188extern int *_nl_domain_bindings;
189#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
190#else
191#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
192#endif
193$gt_revision_test_code
189 ]], 194 ]],
190 [[ 195 [[
191bindtextdomain ("", ""); 196bindtextdomain ("", "");
192return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings 197return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
193 ]])], 198 ]])],
194 [eval "$gt_func_gnugettext_libc=yes"], 199 [eval "$gt_func_gnugettext_libc=yes"],
195 [eval "$gt_func_gnugettext_libc=no"])]) 200 [eval "$gt_func_gnugettext_libc=no"])])
@@ -215,17 +220,22 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_b
215 [AC_LANG_PROGRAM( 220 [AC_LANG_PROGRAM(
216 [[ 221 [[
217#include <libintl.h> 222#include <libintl.h>
218$gt_revision_test_code 223#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
219extern int _nl_msg_cat_cntr; 224extern int _nl_msg_cat_cntr;
220extern 225extern
221#ifdef __cplusplus 226#ifdef __cplusplus
222"C" 227"C"
223#endif 228#endif
224const char *_nl_expand_alias (const char *); 229const char *_nl_expand_alias (const char *);
230#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
231#else
232#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
233#endif
234$gt_revision_test_code
225 ]], 235 ]],
226 [[ 236 [[
227bindtextdomain ("", ""); 237bindtextdomain ("", "");
228return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") 238return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
229 ]])], 239 ]])],
230 [eval "$gt_func_gnugettext_libintl=yes"], 240 [eval "$gt_func_gnugettext_libintl=yes"],
231 [eval "$gt_func_gnugettext_libintl=no"]) 241 [eval "$gt_func_gnugettext_libintl=no"])
@@ -236,17 +246,22 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
236 [AC_LANG_PROGRAM( 246 [AC_LANG_PROGRAM(
237 [[ 247 [[
238#include <libintl.h> 248#include <libintl.h>
239$gt_revision_test_code 249#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
240extern int _nl_msg_cat_cntr; 250extern int _nl_msg_cat_cntr;
241extern 251extern
242#ifdef __cplusplus 252#ifdef __cplusplus
243"C" 253"C"
244#endif 254#endif
245const char *_nl_expand_alias (const char *); 255const char *_nl_expand_alias (const char *);
256#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
257#else
258#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
259#endif
260$gt_revision_test_code
246 ]], 261 ]],
247 [[ 262 [[
248bindtextdomain ("", ""); 263bindtextdomain ("", "");
249return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") 264return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
250 ]])], 265 ]])],
251 [LIBINTL="$LIBINTL $LIBICONV" 266 [LIBINTL="$LIBINTL $LIBICONV"
252 LTLIBINTL="$LTLIBINTL $LTLIBICONV" 267 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
@@ -422,8 +437,12 @@ AC_DEFUN([AM_GNU_GETTEXT_NEED],
422dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) 437dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
423AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) 438AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
424 439
425# iconv.m4 serial 18 (gettext-0.18.2) 440
426dnl Copyright (C) 2000-2002, 2007-2013 Free Software Foundation, Inc. 441dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
442AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
443
444# iconv.m4 serial 19 (gettext-0.18.2)
445dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc.
427dnl This file is free software; the Free Software Foundation 446dnl This file is free software; the Free Software Foundation
428dnl gives unlimited permission to copy and/or distribute it, 447dnl gives unlimited permission to copy and/or distribute it,
429dnl with or without modifications, as long as this notice is preserved. 448dnl with or without modifications, as long as this notice is preserved.
@@ -496,27 +515,33 @@ AC_DEFUN([AM_ICONV_LINK],
496 if test $am_cv_lib_iconv = yes; then 515 if test $am_cv_lib_iconv = yes; then
497 LIBS="$LIBS $LIBICONV" 516 LIBS="$LIBS $LIBICONV"
498 fi 517 fi
499 AC_RUN_IFELSE( 518 am_cv_func_iconv_works=no
500 [AC_LANG_SOURCE([[ 519 for ac_iconv_const in '' 'const'; do
520 AC_RUN_IFELSE(
521 [AC_LANG_PROGRAM(
522 [[
501#include <iconv.h> 523#include <iconv.h>
502#include <string.h> 524#include <string.h>
503int main () 525
504{ 526#ifndef ICONV_CONST
505 int result = 0; 527# define ICONV_CONST $ac_iconv_const
528#endif
529 ]],
530 [[int result = 0;
506 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful 531 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
507 returns. */ 532 returns. */
508 { 533 {
509 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); 534 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
510 if (cd_utf8_to_88591 != (iconv_t)(-1)) 535 if (cd_utf8_to_88591 != (iconv_t)(-1))
511 { 536 {
512 static const char input[] = "\342\202\254"; /* EURO SIGN */ 537 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
513 char buf[10]; 538 char buf[10];
514 const char *inptr = input; 539 ICONV_CONST char *inptr = input;
515 size_t inbytesleft = strlen (input); 540 size_t inbytesleft = strlen (input);
516 char *outptr = buf; 541 char *outptr = buf;
517 size_t outbytesleft = sizeof (buf); 542 size_t outbytesleft = sizeof (buf);
518 size_t res = iconv (cd_utf8_to_88591, 543 size_t res = iconv (cd_utf8_to_88591,
519 (char **) &inptr, &inbytesleft, 544 &inptr, &inbytesleft,
520 &outptr, &outbytesleft); 545 &outptr, &outbytesleft);
521 if (res == 0) 546 if (res == 0)
522 result |= 1; 547 result |= 1;
@@ -529,14 +554,14 @@ int main ()
529 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); 554 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
530 if (cd_ascii_to_88591 != (iconv_t)(-1)) 555 if (cd_ascii_to_88591 != (iconv_t)(-1))
531 { 556 {
532 static const char input[] = "\263"; 557 static ICONV_CONST char input[] = "\263";
533 char buf[10]; 558 char buf[10];
534 const char *inptr = input; 559 ICONV_CONST char *inptr = input;
535 size_t inbytesleft = strlen (input); 560 size_t inbytesleft = strlen (input);
536 char *outptr = buf; 561 char *outptr = buf;
537 size_t outbytesleft = sizeof (buf); 562 size_t outbytesleft = sizeof (buf);
538 size_t res = iconv (cd_ascii_to_88591, 563 size_t res = iconv (cd_ascii_to_88591,
539 (char **) &inptr, &inbytesleft, 564 &inptr, &inbytesleft,
540 &outptr, &outbytesleft); 565 &outptr, &outbytesleft);
541 if (res == 0) 566 if (res == 0)
542 result |= 2; 567 result |= 2;
@@ -548,14 +573,14 @@ int main ()
548 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); 573 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
549 if (cd_88591_to_utf8 != (iconv_t)(-1)) 574 if (cd_88591_to_utf8 != (iconv_t)(-1))
550 { 575 {
551 static const char input[] = "\304"; 576 static ICONV_CONST char input[] = "\304";
552 static char buf[2] = { (char)0xDE, (char)0xAD }; 577 static char buf[2] = { (char)0xDE, (char)0xAD };
553 const char *inptr = input; 578 ICONV_CONST char *inptr = input;
554 size_t inbytesleft = 1; 579 size_t inbytesleft = 1;
555 char *outptr = buf; 580 char *outptr = buf;
556 size_t outbytesleft = 1; 581 size_t outbytesleft = 1;
557 size_t res = iconv (cd_88591_to_utf8, 582 size_t res = iconv (cd_88591_to_utf8,
558 (char **) &inptr, &inbytesleft, 583 &inptr, &inbytesleft,
559 &outptr, &outbytesleft); 584 &outptr, &outbytesleft);
560 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) 585 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
561 result |= 4; 586 result |= 4;
@@ -568,14 +593,14 @@ int main ()
568 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); 593 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
569 if (cd_88591_to_utf8 != (iconv_t)(-1)) 594 if (cd_88591_to_utf8 != (iconv_t)(-1))
570 { 595 {
571 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; 596 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
572 char buf[50]; 597 char buf[50];
573 const char *inptr = input; 598 ICONV_CONST char *inptr = input;
574 size_t inbytesleft = strlen (input); 599 size_t inbytesleft = strlen (input);
575 char *outptr = buf; 600 char *outptr = buf;
576 size_t outbytesleft = sizeof (buf); 601 size_t outbytesleft = sizeof (buf);
577 size_t res = iconv (cd_88591_to_utf8, 602 size_t res = iconv (cd_88591_to_utf8,
578 (char **) &inptr, &inbytesleft, 603 &inptr, &inbytesleft,
579 &outptr, &outbytesleft); 604 &outptr, &outbytesleft);
580 if ((int)res > 0) 605 if ((int)res > 0)
581 result |= 8; 606 result |= 8;
@@ -595,17 +620,14 @@ int main ()
595 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) 620 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
596 result |= 16; 621 result |= 16;
597 return result; 622 return result;
598}]])], 623]])],
599 [am_cv_func_iconv_works=yes], 624 [am_cv_func_iconv_works=yes], ,
600 [am_cv_func_iconv_works=no], 625 [case "$host_os" in
601 [ 626 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
602changequote(,)dnl 627 *) am_cv_func_iconv_works="guessing yes" ;;
603 case "$host_os" in 628 esac])
604 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; 629 test "$am_cv_func_iconv_works" = no || break
605 *) am_cv_func_iconv_works="guessing yes" ;; 630 done
606 esac
607changequote([,])dnl
608 ])
609 LIBS="$am_save_LIBS" 631 LIBS="$am_save_LIBS"
610 ]) 632 ])
611 case "$am_cv_func_iconv_works" in 633 case "$am_cv_func_iconv_works" in
@@ -692,18 +714,18 @@ size_t iconv();
692]) 714])
693 715
694# intlmacosx.m4 serial 5 (gettext-0.18.2) 716# intlmacosx.m4 serial 5 (gettext-0.18.2)
695dnl Copyright (C) 2004-2013 Free Software Foundation, Inc. 717dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc.
696dnl This file is free software; the Free Software Foundation 718dnl This file is free software; the Free Software Foundation
697dnl gives unlimited permission to copy and/or distribute it, 719dnl gives unlimited permission to copy and/or distribute it,
698dnl with or without modifications, as long as this notice is preserved. 720dnl with or without modifications, as long as this notice is preserved.
699dnl 721dnl
700dnl This file can can be used in projects which are not available under 722dnl This file can be used in projects which are not available under
701dnl the GNU General Public License or the GNU Library General Public 723dnl the GNU General Public License or the GNU Library General Public
702dnl License but which still want to provide support for the GNU gettext 724dnl License but which still want to provide support for the GNU gettext
703dnl functionality. 725dnl functionality.
704dnl Please note that the actual code of the GNU gettext library is covered 726dnl Please note that the actual code of the GNU gettext library is covered
705dnl by the GNU Library General Public License, and the rest of the GNU 727dnl by the GNU Library General Public License, and the rest of the GNU
706dnl gettext package package is covered by the GNU General Public License. 728dnl gettext package is covered by the GNU General Public License.
707dnl They are *not* in the public domain. 729dnl They are *not* in the public domain.
708 730
709dnl Checks for special options needed on Mac OS X. 731dnl Checks for special options needed on Mac OS X.
@@ -749,7 +771,7 @@ AC_DEFUN([gt_INTL_MACOSX],
749]) 771])
750 772
751# lib-link.m4 serial 26 (gettext-0.18.2) 773# lib-link.m4 serial 26 (gettext-0.18.2)
752dnl Copyright (C) 2001-2013 Free Software Foundation, Inc. 774dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
753dnl This file is free software; the Free Software Foundation 775dnl This file is free software; the Free Software Foundation
754dnl gives unlimited permission to copy and/or distribute it, 776dnl gives unlimited permission to copy and/or distribute it,
755dnl with or without modifications, as long as this notice is preserved. 777dnl with or without modifications, as long as this notice is preserved.
@@ -1527,7 +1549,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1527]) 1549])
1528 1550
1529# lib-prefix.m4 serial 7 (gettext-0.18) 1551# lib-prefix.m4 serial 7 (gettext-0.18)
1530dnl Copyright (C) 2001-2005, 2008-2013 Free Software Foundation, Inc. 1552dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
1531dnl This file is free software; the Free Software Foundation 1553dnl This file is free software; the Free Software Foundation
1532dnl gives unlimited permission to copy and/or distribute it, 1554dnl gives unlimited permission to copy and/or distribute it,
1533dnl with or without modifications, as long as this notice is preserved. 1555dnl with or without modifications, as long as this notice is preserved.
@@ -1752,19 +1774,19 @@ sixtyfour bits
1752]) 1774])
1753 1775
1754# nls.m4 serial 5 (gettext-0.18) 1776# nls.m4 serial 5 (gettext-0.18)
1755dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation, 1777dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
1756dnl Inc. 1778dnl Foundation, Inc.
1757dnl This file is free software; the Free Software Foundation 1779dnl This file is free software; the Free Software Foundation
1758dnl gives unlimited permission to copy and/or distribute it, 1780dnl gives unlimited permission to copy and/or distribute it,
1759dnl with or without modifications, as long as this notice is preserved. 1781dnl with or without modifications, as long as this notice is preserved.
1760dnl 1782dnl
1761dnl This file can can be used in projects which are not available under 1783dnl This file can be used in projects which are not available under
1762dnl the GNU General Public License or the GNU Library General Public 1784dnl the GNU General Public License or the GNU Library General Public
1763dnl License but which still want to provide support for the GNU gettext 1785dnl License but which still want to provide support for the GNU gettext
1764dnl functionality. 1786dnl functionality.
1765dnl Please note that the actual code of the GNU gettext library is covered 1787dnl Please note that the actual code of the GNU gettext library is covered
1766dnl by the GNU Library General Public License, and the rest of the GNU 1788dnl by the GNU Library General Public License, and the rest of the GNU
1767dnl gettext package package is covered by the GNU General Public License. 1789dnl gettext package is covered by the GNU General Public License.
1768dnl They are *not* in the public domain. 1790dnl They are *not* in the public domain.
1769 1791
1770dnl Authors: 1792dnl Authors:
@@ -1784,19 +1806,19 @@ AC_DEFUN([AM_NLS],
1784 AC_SUBST([USE_NLS]) 1806 AC_SUBST([USE_NLS])
1785]) 1807])
1786 1808
1787# po.m4 serial 21 (gettext-0.18.3) 1809# po.m4 serial 24 (gettext-0.19)
1788dnl Copyright (C) 1995-2013 Free Software Foundation, Inc. 1810dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
1789dnl This file is free software; the Free Software Foundation 1811dnl This file is free software; the Free Software Foundation
1790dnl gives unlimited permission to copy and/or distribute it, 1812dnl gives unlimited permission to copy and/or distribute it,
1791dnl with or without modifications, as long as this notice is preserved. 1813dnl with or without modifications, as long as this notice is preserved.
1792dnl 1814dnl
1793dnl This file can can be used in projects which are not available under 1815dnl This file can be used in projects which are not available under
1794dnl the GNU General Public License or the GNU Library General Public 1816dnl the GNU General Public License or the GNU Library General Public
1795dnl License but which still want to provide support for the GNU gettext 1817dnl License but which still want to provide support for the GNU gettext
1796dnl functionality. 1818dnl functionality.
1797dnl Please note that the actual code of the GNU gettext library is covered 1819dnl Please note that the actual code of the GNU gettext library is covered
1798dnl by the GNU Library General Public License, and the rest of the GNU 1820dnl by the GNU Library General Public License, and the rest of the GNU
1799dnl gettext package package is covered by the GNU General Public License. 1821dnl gettext package is covered by the GNU General Public License.
1800dnl They are *not* in the public domain. 1822dnl They are *not* in the public domain.
1801 1823
1802dnl Authors: 1824dnl Authors:
@@ -1816,7 +1838,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
1816 1838
1817 dnl Release version of the gettext macros. This is used to ensure that 1839 dnl Release version of the gettext macros. This is used to ensure that
1818 dnl the gettext macros and po/Makefile.in.in are in sync. 1840 dnl the gettext macros and po/Makefile.in.in are in sync.
1819 AC_SUBST([GETTEXT_MACRO_VERSION], [0.18]) 1841 AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
1820 1842
1821 dnl Perform the following tests also if --disable-nls has been given, 1843 dnl Perform the following tests also if --disable-nls has been given,
1822 dnl because they are needed for "make dist" to work. 1844 dnl because they are needed for "make dist" to work.
@@ -2239,18 +2261,18 @@ AC_DEFUN([AM_XGETTEXT_OPTION],
2239]) 2261])
2240 2262
2241# progtest.m4 serial 7 (gettext-0.18.2) 2263# progtest.m4 serial 7 (gettext-0.18.2)
2242dnl Copyright (C) 1996-2003, 2005, 2008-2013 Free Software Foundation, Inc. 2264dnl Copyright (C) 1996-2003, 2005, 2008-2016 Free Software Foundation, Inc.
2243dnl This file is free software; the Free Software Foundation 2265dnl This file is free software; the Free Software Foundation
2244dnl gives unlimited permission to copy and/or distribute it, 2266dnl gives unlimited permission to copy and/or distribute it,
2245dnl with or without modifications, as long as this notice is preserved. 2267dnl with or without modifications, as long as this notice is preserved.
2246dnl 2268dnl
2247dnl This file can can be used in projects which are not available under 2269dnl This file can be used in projects which are not available under
2248dnl the GNU General Public License or the GNU Library General Public 2270dnl the GNU General Public License or the GNU Library General Public
2249dnl License but which still want to provide support for the GNU gettext 2271dnl License but which still want to provide support for the GNU gettext
2250dnl functionality. 2272dnl functionality.
2251dnl Please note that the actual code of the GNU gettext library is covered 2273dnl Please note that the actual code of the GNU gettext library is covered
2252dnl by the GNU Library General Public License, and the rest of the GNU 2274dnl by the GNU Library General Public License, and the rest of the GNU
2253dnl gettext package package is covered by the GNU General Public License. 2275dnl gettext package is covered by the GNU General Public License.
2254dnl They are *not* in the public domain. 2276dnl They are *not* in the public domain.
2255 2277
2256dnl Authors: 2278dnl Authors:
@@ -2330,7 +2352,7 @@ fi
2330AC_SUBST([$1])dnl 2352AC_SUBST([$1])dnl
2331]) 2353])
2332 2354
2333# Copyright (C) 2002-2013 Free Software Foundation, Inc. 2355# Copyright (C) 2002-2014 Free Software Foundation, Inc.
2334# 2356#
2335# This file is free software; the Free Software Foundation 2357# This file is free software; the Free Software Foundation
2336# gives unlimited permission to copy and/or distribute it, 2358# gives unlimited permission to copy and/or distribute it,
@@ -2342,10 +2364,10 @@ AC_SUBST([$1])dnl
2342# generated from the m4 files accompanying Automake X.Y. 2364# generated from the m4 files accompanying Automake X.Y.
2343# (This private macro should not be called outside this file.) 2365# (This private macro should not be called outside this file.)
2344AC_DEFUN([AM_AUTOMAKE_VERSION], 2366AC_DEFUN([AM_AUTOMAKE_VERSION],
2345[am__api_version='1.14' 2367[am__api_version='1.15'
2346dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 2368dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
2347dnl require some minimum version. Point them to the right macro. 2369dnl require some minimum version. Point them to the right macro.
2348m4_if([$1], [1.14.1], [], 2370m4_if([$1], [1.15], [],
2349 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 2371 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
2350]) 2372])
2351 2373
@@ -2361,12 +2383,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
2361# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 2383# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
2362# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 2384# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
2363AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 2385AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
2364[AM_AUTOMAKE_VERSION([1.14.1])dnl 2386[AM_AUTOMAKE_VERSION([1.15])dnl
2365m4_ifndef([AC_AUTOCONF_VERSION], 2387m4_ifndef([AC_AUTOCONF_VERSION],
2366 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 2388 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
2367_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 2389_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
2368 2390
2369# Copyright (C) 2011-2013 Free Software Foundation, Inc. 2391# Copyright (C) 2011-2014 Free Software Foundation, Inc.
2370# 2392#
2371# This file is free software; the Free Software Foundation 2393# This file is free software; the Free Software Foundation
2372# gives unlimited permission to copy and/or distribute it, 2394# gives unlimited permission to copy and/or distribute it,
@@ -2428,7 +2450,7 @@ AC_SUBST([AR])dnl
2428 2450
2429# AM_AUX_DIR_EXPAND -*- Autoconf -*- 2451# AM_AUX_DIR_EXPAND -*- Autoconf -*-
2430 2452
2431# Copyright (C) 2001-2013 Free Software Foundation, Inc. 2453# Copyright (C) 2001-2014 Free Software Foundation, Inc.
2432# 2454#
2433# This file is free software; the Free Software Foundation 2455# This file is free software; the Free Software Foundation
2434# gives unlimited permission to copy and/or distribute it, 2456# gives unlimited permission to copy and/or distribute it,
@@ -2473,15 +2495,14 @@ AC_SUBST([AR])dnl
2473# configured tree to be moved without reconfiguration. 2495# configured tree to be moved without reconfiguration.
2474 2496
2475AC_DEFUN([AM_AUX_DIR_EXPAND], 2497AC_DEFUN([AM_AUX_DIR_EXPAND],
2476[dnl Rely on autoconf to set up CDPATH properly. 2498[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2477AC_PREREQ([2.50])dnl 2499# Expand $ac_aux_dir to an absolute path.
2478# expand $ac_aux_dir to an absolute path 2500am_aux_dir=`cd "$ac_aux_dir" && pwd`
2479am_aux_dir=`cd $ac_aux_dir && pwd`
2480]) 2501])
2481 2502
2482# AM_CONDITIONAL -*- Autoconf -*- 2503# AM_CONDITIONAL -*- Autoconf -*-
2483 2504
2484# Copyright (C) 1997-2013 Free Software Foundation, Inc. 2505# Copyright (C) 1997-2014 Free Software Foundation, Inc.
2485# 2506#
2486# This file is free software; the Free Software Foundation 2507# This file is free software; the Free Software Foundation
2487# gives unlimited permission to copy and/or distribute it, 2508# gives unlimited permission to copy and/or distribute it,
@@ -2512,7 +2533,7 @@ AC_CONFIG_COMMANDS_PRE(
2512Usually this means the macro was only invoked conditionally.]]) 2533Usually this means the macro was only invoked conditionally.]])
2513fi])]) 2534fi])])
2514 2535
2515# Copyright (C) 1999-2013 Free Software Foundation, Inc. 2536# Copyright (C) 1999-2014 Free Software Foundation, Inc.
2516# 2537#
2517# This file is free software; the Free Software Foundation 2538# This file is free software; the Free Software Foundation
2518# gives unlimited permission to copy and/or distribute it, 2539# gives unlimited permission to copy and/or distribute it,
@@ -2703,7 +2724,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
2703 2724
2704# Generate code to set up dependency tracking. -*- Autoconf -*- 2725# Generate code to set up dependency tracking. -*- Autoconf -*-
2705 2726
2706# Copyright (C) 1999-2013 Free Software Foundation, Inc. 2727# Copyright (C) 1999-2014 Free Software Foundation, Inc.
2707# 2728#
2708# This file is free software; the Free Software Foundation 2729# This file is free software; the Free Software Foundation
2709# gives unlimited permission to copy and/or distribute it, 2730# gives unlimited permission to copy and/or distribute it,
@@ -2779,7 +2800,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2779 2800
2780# Do all the work for Automake. -*- Autoconf -*- 2801# Do all the work for Automake. -*- Autoconf -*-
2781 2802
2782# Copyright (C) 1996-2013 Free Software Foundation, Inc. 2803# Copyright (C) 1996-2014 Free Software Foundation, Inc.
2783# 2804#
2784# This file is free software; the Free Software Foundation 2805# This file is free software; the Free Software Foundation
2785# gives unlimited permission to copy and/or distribute it, 2806# gives unlimited permission to copy and/or distribute it,
@@ -2869,8 +2890,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
2869# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 2890# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
2870# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 2891# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
2871AC_SUBST([mkdir_p], ['$(MKDIR_P)']) 2892AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
2872# We need awk for the "check" target. The system "awk" is bad on 2893# We need awk for the "check" target (and possibly the TAP driver). The
2873# some platforms. 2894# system "awk" is bad on some platforms.
2874AC_REQUIRE([AC_PROG_AWK])dnl 2895AC_REQUIRE([AC_PROG_AWK])dnl
2875AC_REQUIRE([AC_PROG_MAKE_SET])dnl 2896AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2876AC_REQUIRE([AM_SET_LEADING_DOT])dnl 2897AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -2943,7 +2964,11 @@ to "yes", and re-run configure.
2943END 2964END
2944 AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 2965 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
2945 fi 2966 fi
2946fi]) 2967fi
2968dnl The trailing newline in this macro's definition is deliberate, for
2969dnl backward compatibility and to allow trailing 'dnl'-style comments
2970dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
2971])
2947 2972
2948dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 2973dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
2949dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 2974dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
@@ -2972,7 +2997,7 @@ for _am_header in $config_headers :; do
2972done 2997done
2973echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 2998echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
2974 2999
2975# Copyright (C) 2001-2013 Free Software Foundation, Inc. 3000# Copyright (C) 2001-2014 Free Software Foundation, Inc.
2976# 3001#
2977# This file is free software; the Free Software Foundation 3002# This file is free software; the Free Software Foundation
2978# gives unlimited permission to copy and/or distribute it, 3003# gives unlimited permission to copy and/or distribute it,
@@ -2983,7 +3008,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
2983# Define $install_sh. 3008# Define $install_sh.
2984AC_DEFUN([AM_PROG_INSTALL_SH], 3009AC_DEFUN([AM_PROG_INSTALL_SH],
2985[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 3010[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2986if test x"${install_sh}" != xset; then 3011if test x"${install_sh+set}" != xset; then
2987 case $am_aux_dir in 3012 case $am_aux_dir in
2988 *\ * | *\ *) 3013 *\ * | *\ *)
2989 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 3014 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -2993,7 +3018,7 @@ if test x"${install_sh}" != xset; then
2993fi 3018fi
2994AC_SUBST([install_sh])]) 3019AC_SUBST([install_sh])])
2995 3020
2996# Copyright (C) 2003-2013 Free Software Foundation, Inc. 3021# Copyright (C) 2003-2014 Free Software Foundation, Inc.
2997# 3022#
2998# This file is free software; the Free Software Foundation 3023# This file is free software; the Free Software Foundation
2999# gives unlimited permission to copy and/or distribute it, 3024# gives unlimited permission to copy and/or distribute it,
@@ -3015,7 +3040,7 @@ AC_SUBST([am__leading_dot])])
3015# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 3040# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
3016# From Jim Meyering 3041# From Jim Meyering
3017 3042
3018# Copyright (C) 1996-2013 Free Software Foundation, Inc. 3043# Copyright (C) 1996-2014 Free Software Foundation, Inc.
3019# 3044#
3020# This file is free software; the Free Software Foundation 3045# This file is free software; the Free Software Foundation
3021# gives unlimited permission to copy and/or distribute it, 3046# gives unlimited permission to copy and/or distribute it,
@@ -3050,7 +3075,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
3050 3075
3051# Check to see how 'make' treats includes. -*- Autoconf -*- 3076# Check to see how 'make' treats includes. -*- Autoconf -*-
3052 3077
3053# Copyright (C) 2001-2013 Free Software Foundation, Inc. 3078# Copyright (C) 2001-2014 Free Software Foundation, Inc.
3054# 3079#
3055# This file is free software; the Free Software Foundation 3080# This file is free software; the Free Software Foundation
3056# gives unlimited permission to copy and/or distribute it, 3081# gives unlimited permission to copy and/or distribute it,
@@ -3100,7 +3125,7 @@ rm -f confinc confmf
3100 3125
3101# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 3126# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
3102 3127
3103# Copyright (C) 1997-2013 Free Software Foundation, Inc. 3128# Copyright (C) 1997-2014 Free Software Foundation, Inc.
3104# 3129#
3105# This file is free software; the Free Software Foundation 3130# This file is free software; the Free Software Foundation
3106# gives unlimited permission to copy and/or distribute it, 3131# gives unlimited permission to copy and/or distribute it,
@@ -3139,7 +3164,7 @@ fi
3139 3164
3140# Helper functions for option handling. -*- Autoconf -*- 3165# Helper functions for option handling. -*- Autoconf -*-
3141 3166
3142# Copyright (C) 2001-2013 Free Software Foundation, Inc. 3167# Copyright (C) 2001-2014 Free Software Foundation, Inc.
3143# 3168#
3144# This file is free software; the Free Software Foundation 3169# This file is free software; the Free Software Foundation
3145# gives unlimited permission to copy and/or distribute it, 3170# gives unlimited permission to copy and/or distribute it,
@@ -3168,7 +3193,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
3168AC_DEFUN([_AM_IF_OPTION], 3193AC_DEFUN([_AM_IF_OPTION],
3169[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 3194[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
3170 3195
3171# Copyright (C) 1999-2013 Free Software Foundation, Inc. 3196# Copyright (C) 1999-2014 Free Software Foundation, Inc.
3172# 3197#
3173# This file is free software; the Free Software Foundation 3198# This file is free software; the Free Software Foundation
3174# gives unlimited permission to copy and/or distribute it, 3199# gives unlimited permission to copy and/or distribute it,
@@ -3215,7 +3240,7 @@ AC_LANG_POP([C])])
3215# For backward compatibility. 3240# For backward compatibility.
3216AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 3241AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
3217 3242
3218# Copyright (C) 2001-2013 Free Software Foundation, Inc. 3243# Copyright (C) 2001-2014 Free Software Foundation, Inc.
3219# 3244#
3220# This file is free software; the Free Software Foundation 3245# This file is free software; the Free Software Foundation
3221# gives unlimited permission to copy and/or distribute it, 3246# gives unlimited permission to copy and/or distribute it,
@@ -3234,7 +3259,7 @@ AC_DEFUN([AM_RUN_LOG],
3234 3259
3235# Check to make sure that the build environment is sane. -*- Autoconf -*- 3260# Check to make sure that the build environment is sane. -*- Autoconf -*-
3236 3261
3237# Copyright (C) 1996-2013 Free Software Foundation, Inc. 3262# Copyright (C) 1996-2014 Free Software Foundation, Inc.
3238# 3263#
3239# This file is free software; the Free Software Foundation 3264# This file is free software; the Free Software Foundation
3240# gives unlimited permission to copy and/or distribute it, 3265# gives unlimited permission to copy and/or distribute it,
@@ -3315,7 +3340,7 @@ AC_CONFIG_COMMANDS_PRE(
3315rm -f conftest.file 3340rm -f conftest.file
3316]) 3341])
3317 3342
3318# Copyright (C) 2009-2013 Free Software Foundation, Inc. 3343# Copyright (C) 2009-2014 Free Software Foundation, Inc.
3319# 3344#
3320# This file is free software; the Free Software Foundation 3345# This file is free software; the Free Software Foundation
3321# gives unlimited permission to copy and/or distribute it, 3346# gives unlimited permission to copy and/or distribute it,
@@ -3375,7 +3400,7 @@ AC_SUBST([AM_BACKSLASH])dnl
3375_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 3400_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
3376]) 3401])
3377 3402
3378# Copyright (C) 2001-2013 Free Software Foundation, Inc. 3403# Copyright (C) 2001-2014 Free Software Foundation, Inc.
3379# 3404#
3380# This file is free software; the Free Software Foundation 3405# This file is free software; the Free Software Foundation
3381# gives unlimited permission to copy and/or distribute it, 3406# gives unlimited permission to copy and/or distribute it,
@@ -3403,7 +3428,7 @@ fi
3403INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 3428INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3404AC_SUBST([INSTALL_STRIP_PROGRAM])]) 3429AC_SUBST([INSTALL_STRIP_PROGRAM])])
3405 3430
3406# Copyright (C) 2006-2013 Free Software Foundation, Inc. 3431# Copyright (C) 2006-2014 Free Software Foundation, Inc.
3407# 3432#
3408# This file is free software; the Free Software Foundation 3433# This file is free software; the Free Software Foundation
3409# gives unlimited permission to copy and/or distribute it, 3434# gives unlimited permission to copy and/or distribute it,
@@ -3422,7 +3447,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
3422 3447
3423# Check how to create a tarball. -*- Autoconf -*- 3448# Check how to create a tarball. -*- Autoconf -*-
3424 3449
3425# Copyright (C) 2004-2013 Free Software Foundation, Inc. 3450# Copyright (C) 2004-2014 Free Software Foundation, Inc.
3426# 3451#
3427# This file is free software; the Free Software Foundation 3452# This file is free software; the Free Software Foundation
3428# gives unlimited permission to copy and/or distribute it, 3453# gives unlimited permission to copy and/or distribute it,
diff --git a/scilab/config/ltmain.sh b/scilab/config/ltmain.sh
index 63ae69d..0f0a2da 100644
--- a/scilab/config/ltmain.sh
+++ b/scilab/config/ltmain.sh
@@ -1,9 +1,12 @@
1#! /bin/sh
2## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
3## by inline-source v2014-01-03.01
1 4
2# libtool (GNU libtool) 2.4.2 5# libtool (GNU libtool) 2.4.6
6# Provide generalized library-building support services.
3# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 7# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4 8
5# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 9# Copyright (C) 1996-2015 Free Software Foundation, Inc.
6# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
7# This is free software; see the source for copying conditions. There is NO 10# This is free software; see the source for copying conditions. There is NO
8# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9 12
@@ -23,881 +26,2112 @@
23# General Public License for more details. 26# General Public License for more details.
24# 27#
25# You should have received a copy of the GNU General Public License 28# You should have received a copy of the GNU General Public License
26# along with GNU Libtool; see the file COPYING. If not, a copy 29# along with this program. If not, see <http://www.gnu.org/licenses/>.
27# can be downloaded from http://www.gnu.org/licenses/gpl.html,
28# or obtained by writing to the Free Software Foundation, Inc.,
29# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30 30
31# Usage: $progname [OPTION]... [MODE-ARG]...
32#
33# Provide generalized library-building support services.
34#
35# --config show all configuration variables
36# --debug enable verbose shell tracing
37# -n, --dry-run display commands without modifying any files
38# --features display basic configuration information and exit
39# --mode=MODE use operation mode MODE
40# --preserve-dup-deps don't remove duplicate dependency libraries
41# --quiet, --silent don't print informational messages
42# --no-quiet, --no-silent
43# print informational messages (default)
44# --no-warn don't display warning messages
45# --tag=TAG use configuration variables from tag TAG
46# -v, --verbose print more informational messages than default
47# --no-verbose don't print the extra informational messages
48# --version print version information
49# -h, --help, --help-all print short, long, or detailed help message
50#
51# MODE must be one of the following:
52#
53# clean remove files from the build directory
54# compile compile a source file into a libtool object
55# execute automatically set library path, then run a program
56# finish complete the installation of libtool libraries
57# install install libraries or executables
58# link create a library or an executable
59# uninstall remove libraries from an installed directory
60#
61# MODE-ARGS vary depending on the MODE. When passed as first option,
62# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
63# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
64#
65# When reporting a bug, please describe a test case to reproduce it and
66# include the following information:
67#
68# host-triplet: $host
69# shell: $SHELL
70# compiler: $LTCC
71# compiler flags: $LTCFLAGS
72# linker: $LD (gnu? $with_gnu_ld)
73# $progname: (GNU libtool) 2.4.2
74# automake: $automake_version
75# autoconf: $autoconf_version
76#
77# Report bugs to <bug-libtool@gnu.org>.
78# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
79# General help using GNU software: <http://www.gnu.org/gethelp/>.
80 31
81PROGRAM=libtool 32PROGRAM=libtool
82PACKAGE=libtool 33PACKAGE=libtool
83VERSION=2.4.2 34VERSION=2.4.6
84TIMESTAMP="" 35package_revision=2.4.6
85package_revision=1.3337
86 36
87# Be Bourne compatible 37
88if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 38## ------ ##
39## Usage. ##
40## ------ ##
41
42# Run './libtool --help' for help with using this script from the
43# command line.
44
45
46## ------------------------------- ##
47## User overridable command paths. ##
48## ------------------------------- ##
49
50# After configure completes, it has a better idea of some of the
51# shell tools we need than the defaults used by the functions shared
52# with bootstrap, so set those here where they can still be over-
53# ridden by the user, but otherwise take precedence.
54
55: ${AUTOCONF="autoconf"}
56: ${AUTOMAKE="automake"}
57
58
59## -------------------------- ##
60## Source external libraries. ##
61## -------------------------- ##
62
63# Much of our low-level functionality needs to be sourced from external
64# libraries, which are installed to $pkgauxdir.
65
66# Set a version string for this script.
67scriptversion=2015-01-20.17; # UTC
68
69# General shell script boiler plate, and helper functions.
70# Written by Gary V. Vaughan, 2004
71
72# Copyright (C) 2004-2015 Free Software Foundation, Inc.
73# This is free software; see the source for copying conditions. There is NO
74# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
75
76# This program is free software; you can redistribute it and/or modify
77# it under the terms of the GNU General Public License as published by
78# the Free Software Foundation; either version 3 of the License, or
79# (at your option) any later version.
80
81# As a special exception to the GNU General Public License, if you distribute
82# this file as part of a program or library that is built using GNU Libtool,
83# you may include this file under the same distribution terms that you use
84# for the rest of that program.
85
86# This program is distributed in the hope that it will be useful,
87# but WITHOUT ANY WARRANTY; without even the implied warranty of
88# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
89# General Public License for more details.
90
91# You should have received a copy of the GNU General Public License
92# along with this program. If not, see <http://www.gnu.org/licenses/>.
93
94# Please report bugs or propose patches to gary@gnu.org.
95
96
97## ------ ##
98## Usage. ##
99## ------ ##
100
101# Evaluate this file near the top of your script to gain access to
102# the functions and variables defined here:
103#
104# . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
105#
106# If you need to override any of the default environment variable
107# settings, do that before evaluating this file.
108
109
110## -------------------- ##
111## Shell normalisation. ##
112## -------------------- ##
113
114# Some shells need a little help to be as Bourne compatible as possible.
115# Before doing anything else, make sure all that help has been provided!
116
117DUALCASE=1; export DUALCASE # for MKS sh
118if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
89 emulate sh 119 emulate sh
90 NULLCMD=: 120 NULLCMD=:
91 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 121 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
92 # is contrary to our usage. Disable this feature. 122 # is contrary to our usage. Disable this feature.
93 alias -g '${1+"$@"}'='"$@"' 123 alias -g '${1+"$@"}'='"$@"'
94 setopt NO_GLOB_SUBST 124 setopt NO_GLOB_SUBST
95else 125else
96 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac 126 case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
97fi 127fi
98BIN_SH=xpg4; export BIN_SH # for Tru64
99DUALCASE=1; export DUALCASE # for MKS sh
100 128
101# A function that is used when there is no print builtin or printf. 129# NLS nuisances: We save the old values in case they are required later.
102func_fallback_echo () 130_G_user_locale=
103{ 131_G_safe_locale=
104 eval 'cat <<_LTECHO_EOF 132for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
105$1
106_LTECHO_EOF'
107}
108
109# NLS nuisances: We save the old values to restore during execute mode.
110lt_user_locale=
111lt_safe_locale=
112for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
113do 133do
114 eval "if test \"\${$lt_var+set}\" = set; then 134 eval "if test set = \"\${$_G_var+set}\"; then
115 save_$lt_var=\$$lt_var 135 save_$_G_var=\$$_G_var
116 $lt_var=C 136 $_G_var=C
117 export $lt_var 137 export $_G_var
118 lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" 138 _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
119 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" 139 _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
120 fi" 140 fi"
121done 141done
122LC_ALL=C
123LANGUAGE=C
124export LANGUAGE LC_ALL
125 142
126$lt_unset CDPATH 143# CDPATH.
144(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
145
146# Make sure IFS has a sensible default
147sp=' '
148nl='
149'
150IFS="$sp $nl"
151
152# There are apparently some retarded systems that use ';' as a PATH separator!
153if test "${PATH_SEPARATOR+set}" != set; then
154 PATH_SEPARATOR=:
155 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
156 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
157 PATH_SEPARATOR=';'
158 }
159fi
160
127 161
128 162
129# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh 163## ------------------------- ##
130# is ksh but when the shell is invoked as "sh" and the current value of 164## Locate command utilities. ##
131# the _XPG environment variable is not equal to 1 (one), the special 165## ------------------------- ##
132# positional parameter $0, within a function call, is the name of the
133# function.
134progpath="$0"
135 166
136 167
168# func_executable_p FILE
169# ----------------------
170# Check that FILE is an executable regular file.
171func_executable_p ()
172{
173 test -f "$1" && test -x "$1"
174}
175
176
177# func_path_progs PROGS_LIST CHECK_FUNC [PATH]
178# --------------------------------------------
179# Search for either a program that responds to --version with output
180# containing "GNU", or else returned by CHECK_FUNC otherwise, by
181# trying all the directories in PATH with each of the elements of
182# PROGS_LIST.
183#
184# CHECK_FUNC should accept the path to a candidate program, and
185# set $func_check_prog_result if it truncates its output less than
186# $_G_path_prog_max characters.
187func_path_progs ()
188{
189 _G_progs_list=$1
190 _G_check_func=$2
191 _G_PATH=${3-"$PATH"}
192
193 _G_path_prog_max=0
194 _G_path_prog_found=false
195 _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
196 for _G_dir in $_G_PATH; do
197 IFS=$_G_save_IFS
198 test -z "$_G_dir" && _G_dir=.
199 for _G_prog_name in $_G_progs_list; do
200 for _exeext in '' .EXE; do
201 _G_path_prog=$_G_dir/$_G_prog_name$_exeext
202 func_executable_p "$_G_path_prog" || continue
203 case `"$_G_path_prog" --version 2>&1` in
204 *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
205 *) $_G_check_func $_G_path_prog
206 func_path_progs_result=$func_check_prog_result
207 ;;
208 esac
209 $_G_path_prog_found && break 3
210 done
211 done
212 done
213 IFS=$_G_save_IFS
214 test -z "$func_path_progs_result" && {
215 echo "no acceptable sed could be found in \$PATH" >&2
216 exit 1
217 }
218}
219
220
221# We want to be able to use the functions in this file before configure
222# has figured out where the best binaries are kept, which means we have
223# to search for them ourselves - except when the results are already set
224# where we skip the searches.
225
226# Unless the user overrides by setting SED, search the path for either GNU
227# sed, or the sed that truncates its output the least.
228test -z "$SED" && {
229 _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
230 for _G_i in 1 2 3 4 5 6 7; do
231 _G_sed_script=$_G_sed_script$nl$_G_sed_script
232 done
233 echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
234 _G_sed_script=
235
236 func_check_prog_sed ()
237 {
238 _G_path_prog=$1
239
240 _G_count=0
241 printf 0123456789 >conftest.in
242 while :
243 do
244 cat conftest.in conftest.in >conftest.tmp
245 mv conftest.tmp conftest.in
246 cp conftest.in conftest.nl
247 echo '' >> conftest.nl
248 "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
249 diff conftest.out conftest.nl >/dev/null 2>&1 || break
250 _G_count=`expr $_G_count + 1`
251 if test "$_G_count" -gt "$_G_path_prog_max"; then
252 # Best one so far, save it but keep looking for a better one
253 func_check_prog_result=$_G_path_prog
254 _G_path_prog_max=$_G_count
255 fi
256 # 10*(2^10) chars as input seems more than enough
257 test 10 -lt "$_G_count" && break
258 done
259 rm -f conftest.in conftest.tmp conftest.nl conftest.out
260 }
261
262 func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
263 rm -f conftest.sed
264 SED=$func_path_progs_result
265}
266
267
268# Unless the user overrides by setting GREP, search the path for either GNU
269# grep, or the grep that truncates its output the least.
270test -z "$GREP" && {
271 func_check_prog_grep ()
272 {
273 _G_path_prog=$1
274
275 _G_count=0
276 _G_path_prog_max=0
277 printf 0123456789 >conftest.in
278 while :
279 do
280 cat conftest.in conftest.in >conftest.tmp
281 mv conftest.tmp conftest.in
282 cp conftest.in conftest.nl
283 echo 'GREP' >> conftest.nl
284 "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
285 diff conftest.out conftest.nl >/dev/null 2>&1 || break
286 _G_count=`expr $_G_count + 1`
287 if test "$_G_count" -gt "$_G_path_prog_max"; then
288 # Best one so far, save it but keep looking for a better one
289 func_check_prog_result=$_G_path_prog
290 _G_path_prog_max=$_G_count
291 fi
292 # 10*(2^10) chars as input seems more than enough
293 test 10 -lt "$_G_count" && break
294 done
295 rm -f conftest.in conftest.tmp conftest.nl conftest.out
296 }
297
298 func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
299 GREP=$func_path_progs_result
300}
301
302
303## ------------------------------- ##
304## User overridable command paths. ##
305## ------------------------------- ##
306
307# All uppercase variable names are used for environment variables. These
308# variables can be overridden by the user before calling a script that
309# uses them if a suitable command of that name is not already available
310# in the command search PATH.
137 311
138: ${CP="cp -f"} 312: ${CP="cp -f"}
139test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} 313: ${ECHO="printf %s\n"}
314: ${EGREP="$GREP -E"}
315: ${FGREP="$GREP -F"}
316: ${LN_S="ln -s"}
140: ${MAKE="make"} 317: ${MAKE="make"}
141: ${MKDIR="mkdir"} 318: ${MKDIR="mkdir"}
142: ${MV="mv -f"} 319: ${MV="mv -f"}
143: ${RM="rm -f"} 320: ${RM="rm -f"}
144: ${SHELL="${CONFIG_SHELL-/bin/sh}"} 321: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
145: ${Xsed="$SED -e 1s/^X//"}
146 322
147# Global variables:
148EXIT_SUCCESS=0
149EXIT_FAILURE=1
150EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
151EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
152
153exit_status=$EXIT_SUCCESS
154 323
155# Make sure IFS has a sensible default 324## -------------------- ##
156lt_nl=' 325## Useful sed snippets. ##
157' 326## -------------------- ##
158IFS=" $lt_nl"
159 327
160dirname="s,/[^/]*$,," 328sed_dirname='s|/[^/]*$||'
161basename="s,^.*/,," 329sed_basename='s|^.*/||'
162 330
163# func_dirname file append nondir_replacement 331# Sed substitution that helps us do robust quoting. It backslashifies
164# Compute the dirname of FILE. If nonempty, add APPEND to the result, 332# metacharacters that are still active within double-quoted strings.
165# otherwise set result to NONDIR_REPLACEMENT. 333sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
166func_dirname ()
167{
168 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
169 if test "X$func_dirname_result" = "X${1}"; then
170 func_dirname_result="${3}"
171 else
172 func_dirname_result="$func_dirname_result${2}"
173 fi
174} # func_dirname may be replaced by extended shell implementation
175
176
177# func_basename file
178func_basename ()
179{
180 func_basename_result=`$ECHO "${1}" | $SED "$basename"`
181} # func_basename may be replaced by extended shell implementation
182 334
335# Same as above, but do not quote variable references.
336sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
183 337
184# func_dirname_and_basename file append nondir_replacement 338# Sed substitution that turns a string into a regex matching for the
185# perform func_basename and func_dirname in a single function 339# string literally.
186# call: 340sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
187# dirname: Compute the dirname of FILE. If nonempty,
188# add APPEND to the result, otherwise set result
189# to NONDIR_REPLACEMENT.
190# value returned in "$func_dirname_result"
191# basename: Compute filename of FILE.
192# value retuned in "$func_basename_result"
193# Implementation must be kept synchronized with func_dirname
194# and func_basename. For efficiency, we do not delegate to
195# those functions but instead duplicate the functionality here.
196func_dirname_and_basename ()
197{
198 # Extract subdirectory from the argument.
199 func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
200 if test "X$func_dirname_result" = "X${1}"; then
201 func_dirname_result="${3}"
202 else
203 func_dirname_result="$func_dirname_result${2}"
204 fi
205 func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
206} # func_dirname_and_basename may be replaced by extended shell implementation
207 341
342# Sed substitution that converts a w32 file name or path
343# that contains forward slashes, into one that contains
344# (escaped) backslashes. A very naive implementation.
345sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
346
347# Re-'\' parameter expansions in output of sed_double_quote_subst that
348# were '\'-ed in input to the same. If an odd number of '\' preceded a
349# '$' in input to sed_double_quote_subst, that '$' was protected from
350# expansion. Since each input '\' is now two '\'s, look for any number
351# of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
352_G_bs='\\'
353_G_bs2='\\\\'
354_G_bs4='\\\\\\\\'
355_G_dollar='\$'
356sed_double_backslash="\
357 s/$_G_bs4/&\\
358/g
359 s/^$_G_bs2$_G_dollar/$_G_bs&/
360 s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
361 s/\n//g"
208 362
209# func_stripname prefix suffix name
210# strip PREFIX and SUFFIX off of NAME.
211# PREFIX and SUFFIX must not contain globbing or regex special
212# characters, hashes, percent signs, but SUFFIX may contain a leading
213# dot (in which case that matches only a dot).
214# func_strip_suffix prefix name
215func_stripname ()
216{
217 case ${2} in
218 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
219 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
220 esac
221} # func_stripname may be replaced by extended shell implementation
222 363
364## ----------------- ##
365## Global variables. ##
366## ----------------- ##
223 367
224# These SED scripts presuppose an absolute path with a trailing slash. 368# Except for the global variables explicitly listed below, the following
225pathcar='s,^/\([^/]*\).*$,\1,' 369# functions in the '^func_' namespace, and the '^require_' namespace
226pathcdr='s,^/[^/]*,,' 370# variables initialised in the 'Resource management' section, sourcing
227removedotparts=':dotsl 371# this file will not pollute your global namespace with anything
228 s@/\./@/@g 372# else. There's no portable way to scope variables in Bourne shell
229 t dotsl 373# though, so actually running these functions will sometimes place
230 s,/\.$,/,' 374# results into a variable named after the function, and often use
231collapseslashes='s@/\{1,\}@/@g' 375# temporary variables in the '^_G_' namespace. If you are careful to
232finalslash='s,/*$,/,' 376# avoid using those namespaces casually in your sourcing script, things
377# should continue to work as you expect. And, of course, you can freely
378# overwrite any of the functions or variables defined here before
379# calling anything to customize them.
233 380
234# func_normal_abspath PATH 381EXIT_SUCCESS=0
235# Remove doubled-up and trailing slashes, "." path components, 382EXIT_FAILURE=1
236# and cancel out any ".." path components in PATH after making 383EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
237# it an absolute path. 384EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
238# value returned in "$func_normal_abspath_result"
239func_normal_abspath ()
240{
241 # Start from root dir and reassemble the path.
242 func_normal_abspath_result=
243 func_normal_abspath_tpath=$1
244 func_normal_abspath_altnamespace=
245 case $func_normal_abspath_tpath in
246 "")
247 # Empty path, that just means $cwd.
248 func_stripname '' '/' "`pwd`"
249 func_normal_abspath_result=$func_stripname_result
250 return
251 ;;
252 # The next three entries are used to spot a run of precisely
253 # two leading slashes without using negated character classes;
254 # we take advantage of case's first-match behaviour.
255 ///*)
256 # Unusual form of absolute path, do nothing.
257 ;;
258 //*)
259 # Not necessarily an ordinary path; POSIX reserves leading '//'
260 # and for example Cygwin uses it to access remote file shares
261 # over CIFS/SMB, so we conserve a leading double slash if found.
262 func_normal_abspath_altnamespace=/
263 ;;
264 /*)
265 # Absolute path, do nothing.
266 ;;
267 *)
268 # Relative path, prepend $cwd.
269 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
270 ;;
271 esac
272 # Cancel out all the simple stuff to save iterations. We also want
273 # the path to end with a slash for ease of parsing, so make sure
274 # there is one (and only one) here.
275 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
276 -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
277 while :; do
278 # Processed it all yet?
279 if test "$func_normal_abspath_tpath" = / ; then
280 # If we ascended to the root using ".." the result may be empty now.
281 if test -z "$func_normal_abspath_result" ; then
282 func_normal_abspath_result=/
283 fi
284 break
285 fi
286 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
287 -e "$pathcar"`
288 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
289 -e "$pathcdr"`
290 # Figure out what to do with it
291 case $func_normal_abspath_tcomponent in
292 "")
293 # Trailing empty path component, ignore it.
294 ;;
295 ..)
296 # Parent dir; strip last assembled component from result.
297 func_dirname "$func_normal_abspath_result"
298 func_normal_abspath_result=$func_dirname_result
299 ;;
300 *)
301 # Actual path component, append it.
302 func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
303 ;;
304 esac
305 done
306 # Restore leading double-slash if one was found on entry.
307 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
308}
309 385
310# func_relative_path SRCDIR DSTDIR 386# Allow overriding, eg assuming that you follow the convention of
311# generates a relative path from SRCDIR to DSTDIR, with a trailing 387# putting '$debug_cmd' at the start of all your functions, you can get
312# slash if non-empty, suitable for immediately appending a filename 388# bash to show function call trace with:
313# without needing to append a separator. 389#
314# value returned in "$func_relative_path_result" 390# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
315func_relative_path () 391debug_cmd=${debug_cmd-":"}
316{ 392exit_cmd=:
317 func_relative_path_result=
318 func_normal_abspath "$1"
319 func_relative_path_tlibdir=$func_normal_abspath_result
320 func_normal_abspath "$2"
321 func_relative_path_tbindir=$func_normal_abspath_result
322
323 # Ascend the tree starting from libdir
324 while :; do
325 # check if we have found a prefix of bindir
326 case $func_relative_path_tbindir in
327 $func_relative_path_tlibdir)
328 # found an exact match
329 func_relative_path_tcancelled=
330 break
331 ;;
332 $func_relative_path_tlibdir*)
333 # found a matching prefix
334 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
335 func_relative_path_tcancelled=$func_stripname_result
336 if test -z "$func_relative_path_result"; then
337 func_relative_path_result=.
338 fi
339 break
340 ;;
341 *)
342 func_dirname $func_relative_path_tlibdir
343 func_relative_path_tlibdir=${func_dirname_result}
344 if test "x$func_relative_path_tlibdir" = x ; then
345 # Have to descend all the way to the root!
346 func_relative_path_result=../$func_relative_path_result
347 func_relative_path_tcancelled=$func_relative_path_tbindir
348 break
349 fi
350 func_relative_path_result=../$func_relative_path_result
351 ;;
352 esac
353 done
354 393
355 # Now calculate path; take care to avoid doubling-up slashes. 394# By convention, finish your script with:
356 func_stripname '' '/' "$func_relative_path_result" 395#
357 func_relative_path_result=$func_stripname_result 396# exit $exit_status
358 func_stripname '/' '/' "$func_relative_path_tcancelled" 397#
359 if test "x$func_stripname_result" != x ; then 398# so that you can set exit_status to non-zero if you want to indicate
360 func_relative_path_result=${func_relative_path_result}/${func_stripname_result} 399# something went wrong during execution without actually bailing out at
361 fi 400# the point of failure.
401exit_status=$EXIT_SUCCESS
362 402
363 # Normalisation. If bindir is libdir, return empty string, 403# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
364 # else relative path ending with a slash; either way, target 404# is ksh but when the shell is invoked as "sh" and the current value of
365 # file name can be directly appended. 405# the _XPG environment variable is not equal to 1 (one), the special
366 if test ! -z "$func_relative_path_result"; then 406# positional parameter $0, within a function call, is the name of the
367 func_stripname './' '' "$func_relative_path_result/" 407# function.
368 func_relative_path_result=$func_stripname_result 408progpath=$0
369 fi
370}
371 409
372# The name of this program: 410# The name of this program.
373func_dirname_and_basename "$progpath" 411progname=`$ECHO "$progpath" |$SED "$sed_basename"`
374progname=$func_basename_result
375 412
376# Make sure we have an absolute path for reexecution: 413# Make sure we have an absolute progpath for reexecution:
377case $progpath in 414case $progpath in
378 [\\/]*|[A-Za-z]:\\*) ;; 415 [\\/]*|[A-Za-z]:\\*) ;;
379 *[\\/]*) 416 *[\\/]*)
380 progdir=$func_dirname_result 417 progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
381 progdir=`cd "$progdir" && pwd` 418 progdir=`cd "$progdir" && pwd`
382 progpath="$progdir/$progname" 419 progpath=$progdir/$progname
383 ;; 420 ;;
384 *) 421 *)
385 save_IFS="$IFS" 422 _G_IFS=$IFS
386 IFS=${PATH_SEPARATOR-:} 423 IFS=${PATH_SEPARATOR-:}
387 for progdir in $PATH; do 424 for progdir in $PATH; do
388 IFS="$save_IFS" 425 IFS=$_G_IFS
389 test -x "$progdir/$progname" && break 426 test -x "$progdir/$progname" && break
390 done 427 done
391 IFS="$save_IFS" 428 IFS=$_G_IFS
392 test -n "$progdir" || progdir=`pwd` 429 test -n "$progdir" || progdir=`pwd`
393 progpath="$progdir/$progname" 430 progpath=$progdir/$progname
394 ;; 431 ;;
395esac 432esac
396 433
397# Sed substitution that helps us do robust quoting. It backslashifies
398# metacharacters that are still active within double-quoted strings.
399Xsed="${SED}"' -e 1s/^X//'
400sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
401 434
402# Same as above, but do not quote variable references. 435## ----------------- ##
403double_quote_subst='s/\(["`\\]\)/\\\1/g' 436## Standard options. ##
437## ----------------- ##
404 438
405# Sed substitution that turns a string into a regex matching for the 439# The following options affect the operation of the functions defined
406# string literally. 440# below, and should be set appropriately depending on run-time para-
407sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' 441# meters passed on the command line.
408 442
409# Sed substitution that converts a w32 file name or path
410# which contains forward slashes, into one that contains
411# (escaped) backslashes. A very naive implementation.
412lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
413
414# Re-`\' parameter expansions in output of double_quote_subst that were
415# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
416# in input to double_quote_subst, that '$' was protected from expansion.
417# Since each input `\' is now two `\'s, look for any number of runs of
418# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
419bs='\\'
420bs2='\\\\'
421bs4='\\\\\\\\'
422dollar='\$'
423sed_double_backslash="\
424 s/$bs4/&\\
425/g
426 s/^$bs2$dollar/$bs&/
427 s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
428 s/\n//g"
429
430# Standard options:
431opt_dry_run=false 443opt_dry_run=false
432opt_help=false
433opt_quiet=false 444opt_quiet=false
434opt_verbose=false 445opt_verbose=false
435opt_warning=:
436 446
437# func_echo arg... 447# Categories 'all' and 'none' are always available. Append any others
438# Echo program name prefixed message, along with the current mode 448# you will pass as the first argument to func_warning from your own
439# name if it has been set yet. 449# code.
440func_echo () 450warning_categories=
451
452# By default, display warnings according to 'opt_warning_types'. Set
453# 'warning_func' to ':' to elide all warnings, or func_fatal_error to
454# treat the next displayed warning as a fatal error.
455warning_func=func_warn_and_continue
456
457# Set to 'all' to display all warnings, 'none' to suppress all
458# warnings, or a space delimited list of some subset of
459# 'warning_categories' to display only the listed warnings.
460opt_warning_types=all
461
462
463## -------------------- ##
464## Resource management. ##
465## -------------------- ##
466
467# This section contains definitions for functions that each ensure a
468# particular resource (a file, or a non-empty configuration variable for
469# example) is available, and if appropriate to extract default values
470# from pertinent package files. Call them using their associated
471# 'require_*' variable to ensure that they are executed, at most, once.
472#
473# It's entirely deliberate that calling these functions can set
474# variables that don't obey the namespace limitations obeyed by the rest
475# of this file, in order that that they be as useful as possible to
476# callers.
477
478
479# require_term_colors
480# -------------------
481# Allow display of bold text on terminals that support it.
482require_term_colors=func_require_term_colors
483func_require_term_colors ()
441{ 484{
442 $ECHO "$progname: ${opt_mode+$opt_mode: }$*" 485 $debug_cmd
486
487 test -t 1 && {
488 # COLORTERM and USE_ANSI_COLORS environment variables take
489 # precedence, because most terminfo databases neglect to describe
490 # whether color sequences are supported.
491 test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
492
493 if test 1 = "$USE_ANSI_COLORS"; then
494 # Standard ANSI escape sequences
495 tc_reset=''
496 tc_bold=''; tc_standout=''
497 tc_red=''; tc_green=''
498 tc_blue=''; tc_cyan=''
499 else
500 # Otherwise trust the terminfo database after all.
501 test -n "`tput sgr0 2>/dev/null`" && {
502 tc_reset=`tput sgr0`
503 test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
504 tc_standout=$tc_bold
505 test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
506 test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
507 test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
508 test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
509 test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
510 }
511 fi
512 }
513
514 require_term_colors=:
443} 515}
444 516
445# func_verbose arg... 517
446# Echo program name prefixed message in verbose mode only. 518## ----------------- ##
447func_verbose () 519## Function library. ##
520## ----------------- ##
521
522# This section contains a variety of useful functions to call in your
523# scripts. Take note of the portable wrappers for features provided by
524# some modern shells, which will fall back to slower equivalents on
525# less featureful shells.
526
527
528# func_append VAR VALUE
529# ---------------------
530# Append VALUE onto the existing contents of VAR.
531
532 # We should try to minimise forks, especially on Windows where they are
533 # unreasonably slow, so skip the feature probes when bash or zsh are
534 # being used:
535 if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
536 : ${_G_HAVE_ARITH_OP="yes"}
537 : ${_G_HAVE_XSI_OPS="yes"}
538 # The += operator was introduced in bash 3.1
539 case $BASH_VERSION in
540 [12].* | 3.0 | 3.0*) ;;
541 *)
542 : ${_G_HAVE_PLUSEQ_OP="yes"}
543 ;;
544 esac
545 fi
546
547 # _G_HAVE_PLUSEQ_OP
548 # Can be empty, in which case the shell is probed, "yes" if += is
549 # useable or anything else if it does not work.
550 test -z "$_G_HAVE_PLUSEQ_OP" \
551 && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
552 && _G_HAVE_PLUSEQ_OP=yes
553
554if test yes = "$_G_HAVE_PLUSEQ_OP"
555then
556 # This is an XSI compatible shell, allowing a faster implementation...
557 eval 'func_append ()
558 {
559 $debug_cmd
560
561 eval "$1+=\$2"
562 }'
563else
564 # ...otherwise fall back to using expr, which is often a shell builtin.
565 func_append ()
566 {
567 $debug_cmd
568
569 eval "$1=\$$1\$2"
570 }
571fi
572
573
574# func_append_quoted VAR VALUE
575# ----------------------------
576# Quote VALUE and append to the end of shell variable VAR, separated
577# by a space.
578if test yes = "$_G_HAVE_PLUSEQ_OP"; then
579 eval 'func_append_quoted ()
580 {
581 $debug_cmd
582
583 func_quote_for_eval "$2"
584 eval "$1+=\\ \$func_quote_for_eval_result"
585 }'
586else
587 func_append_quoted ()
588 {
589 $debug_cmd
590
591 func_quote_for_eval "$2"
592 eval "$1=\$$1\\ \$func_quote_for_eval_result"
593 }
594fi
595
596
597# func_append_uniq VAR VALUE
598# --------------------------
599# Append unique VALUE onto the existing contents of VAR, assuming
600# entries are delimited by the first character of VALUE. For example:
601#
602# func_append_uniq options " --another-option option-argument"
603#
604# will only append to $options if " --another-option option-argument "
605# is not already present somewhere in $options already (note spaces at
606# each end implied by leading space in second argument).
607func_append_uniq ()
448{ 608{
449 $opt_verbose && func_echo ${1+"$@"} 609 $debug_cmd
450 610
451 # A bug in bash halts the script if the last line of a function 611 eval _G_current_value='`$ECHO $'$1'`'
452 # fails when set -e is in force, so we need another command to 612 _G_delim=`expr "$2" : '\(.\)'`
453 # work around that: 613
454 : 614 case $_G_delim$_G_current_value$_G_delim in
615 *"$2$_G_delim"*) ;;
616 *) func_append "$@" ;;
617 esac
618}
619
620
621# func_arith TERM...
622# ------------------
623# Set func_arith_result to the result of evaluating TERMs.
624 test -z "$_G_HAVE_ARITH_OP" \
625 && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
626 && _G_HAVE_ARITH_OP=yes
627
628if test yes = "$_G_HAVE_ARITH_OP"; then
629 eval 'func_arith ()
630 {
631 $debug_cmd
632
633 func_arith_result=$(( $* ))
634 }'
635else
636 func_arith ()
637 {
638 $debug_cmd
639
640 func_arith_result=`expr "$@"`
641 }
642fi
643
644
645# func_basename FILE
646# ------------------
647# Set func_basename_result to FILE with everything up to and including
648# the last / stripped.
649if test yes = "$_G_HAVE_XSI_OPS"; then
650 # If this shell supports suffix pattern removal, then use it to avoid
651 # forking. Hide the definitions single quotes in case the shell chokes
652 # on unsupported syntax...
653 _b='func_basename_result=${1##*/}'
654 _d='case $1 in
655 */*) func_dirname_result=${1%/*}$2 ;;
656 * ) func_dirname_result=$3 ;;
657 esac'
658
659else
660 # ...otherwise fall back to using sed.
661 _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
662 _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
663 if test "X$func_dirname_result" = "X$1"; then
664 func_dirname_result=$3
665 else
666 func_append func_dirname_result "$2"
667 fi'
668fi
669
670eval 'func_basename ()
671{
672 $debug_cmd
673
674 '"$_b"'
675}'
676
677
678# func_dirname FILE APPEND NONDIR_REPLACEMENT
679# -------------------------------------------
680# Compute the dirname of FILE. If nonempty, add APPEND to the result,
681# otherwise set result to NONDIR_REPLACEMENT.
682eval 'func_dirname ()
683{
684 $debug_cmd
685
686 '"$_d"'
687}'
688
689
690# func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
691# --------------------------------------------------------
692# Perform func_basename and func_dirname in a single function
693# call:
694# dirname: Compute the dirname of FILE. If nonempty,
695# add APPEND to the result, otherwise set result
696# to NONDIR_REPLACEMENT.
697# value returned in "$func_dirname_result"
698# basename: Compute filename of FILE.
699# value retuned in "$func_basename_result"
700# For efficiency, we do not delegate to the functions above but instead
701# duplicate the functionality here.
702eval 'func_dirname_and_basename ()
703{
704 $debug_cmd
705
706 '"$_b"'
707 '"$_d"'
708}'
709
710
711# func_echo ARG...
712# ----------------
713# Echo program name prefixed message.
714func_echo ()
715{
716 $debug_cmd
717
718 _G_message=$*
719
720 func_echo_IFS=$IFS
721 IFS=$nl
722 for _G_line in $_G_message; do
723 IFS=$func_echo_IFS
724 $ECHO "$progname: $_G_line"
725 done
726 IFS=$func_echo_IFS
455} 727}
456 728
457# func_echo_all arg... 729
730# func_echo_all ARG...
731# --------------------
458# Invoke $ECHO with all args, space-separated. 732# Invoke $ECHO with all args, space-separated.
459func_echo_all () 733func_echo_all ()
460{ 734{
461 $ECHO "$*" 735 $ECHO "$*"
462} 736}
463 737
464# func_error arg... 738
465# Echo program name prefixed message to standard error. 739# func_echo_infix_1 INFIX ARG...
466func_error () 740# ------------------------------
741# Echo program name, followed by INFIX on the first line, with any
742# additional lines not showing INFIX.
743func_echo_infix_1 ()
467{ 744{
468 $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 745 $debug_cmd
746
747 $require_term_colors
748
749 _G_infix=$1; shift
750 _G_indent=$_G_infix
751 _G_prefix="$progname: $_G_infix: "
752 _G_message=$*
753
754 # Strip color escape sequences before counting printable length
755 for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
756 do
757 test -n "$_G_tc" && {
758 _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
759 _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
760 }
761 done
762 _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
763
764 func_echo_infix_1_IFS=$IFS
765 IFS=$nl
766 for _G_line in $_G_message; do
767 IFS=$func_echo_infix_1_IFS
768 $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
769 _G_prefix=$_G_indent
770 done
771 IFS=$func_echo_infix_1_IFS
469} 772}
470 773
471# func_warning arg... 774
472# Echo program name prefixed warning message to standard error. 775# func_error ARG...
473func_warning () 776# -----------------
777# Echo program name prefixed message to standard error.
778func_error ()
474{ 779{
475 $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 780 $debug_cmd
476 781
477 # bash bug again: 782 $require_term_colors
478 : 783
784 func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
479} 785}
480 786
481# func_fatal_error arg... 787
788# func_fatal_error ARG...
789# -----------------------
482# Echo program name prefixed message to standard error, and exit. 790# Echo program name prefixed message to standard error, and exit.
483func_fatal_error () 791func_fatal_error ()
484{ 792{
485 func_error ${1+"$@"} 793 $debug_cmd
486 exit $EXIT_FAILURE
487}
488 794
489# func_fatal_help arg... 795 func_error "$*"
490# Echo program name prefixed message to standard error, followed by 796 exit $EXIT_FAILURE
491# a help hint, and exit.
492func_fatal_help ()
493{
494 func_error ${1+"$@"}
495 func_fatal_error "$help"
496} 797}
497help="Try \`$progname --help' for more information." ## default
498 798
499 799
500# func_grep expression filename 800# func_grep EXPRESSION FILENAME
801# -----------------------------
501# Check whether EXPRESSION matches any line of FILENAME, without output. 802# Check whether EXPRESSION matches any line of FILENAME, without output.
502func_grep () 803func_grep ()
503{ 804{
805 $debug_cmd
806
504 $GREP "$1" "$2" >/dev/null 2>&1 807 $GREP "$1" "$2" >/dev/null 2>&1
505} 808}
506 809
507 810
508# func_mkdir_p directory-path 811# func_len STRING
812# ---------------
813# Set func_len_result to the length of STRING. STRING may not
814# start with a hyphen.
815 test -z "$_G_HAVE_XSI_OPS" \
816 && (eval 'x=a/b/c;
817 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
818 && _G_HAVE_XSI_OPS=yes
819
820if test yes = "$_G_HAVE_XSI_OPS"; then
821 eval 'func_len ()
822 {
823 $debug_cmd
824
825 func_len_result=${#1}
826 }'
827else
828 func_len ()
829 {
830 $debug_cmd
831
832 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
833 }
834fi
835
836
837# func_mkdir_p DIRECTORY-PATH
838# ---------------------------
509# Make sure the entire path to DIRECTORY-PATH is available. 839# Make sure the entire path to DIRECTORY-PATH is available.
510func_mkdir_p () 840func_mkdir_p ()
511{ 841{
512 my_directory_path="$1" 842 $debug_cmd
513 my_dir_list=
514 843
515 if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then 844 _G_directory_path=$1
845 _G_dir_list=
516 846
517 # Protect directory names starting with `-' 847 if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
518 case $my_directory_path in 848
519 -*) my_directory_path="./$my_directory_path" ;; 849 # Protect directory names starting with '-'
850 case $_G_directory_path in
851 -*) _G_directory_path=./$_G_directory_path ;;
520 esac 852 esac
521 853
522 # While some portion of DIR does not yet exist... 854 # While some portion of DIR does not yet exist...
523 while test ! -d "$my_directory_path"; do 855 while test ! -d "$_G_directory_path"; do
524 # ...make a list in topmost first order. Use a colon delimited 856 # ...make a list in topmost first order. Use a colon delimited
525 # list incase some portion of path contains whitespace. 857 # list incase some portion of path contains whitespace.
526 my_dir_list="$my_directory_path:$my_dir_list" 858 _G_dir_list=$_G_directory_path:$_G_dir_list
527 859
528 # If the last portion added has no slash in it, the list is done 860 # If the last portion added has no slash in it, the list is done
529 case $my_directory_path in */*) ;; *) break ;; esac 861 case $_G_directory_path in */*) ;; *) break ;; esac
530 862
531 # ...otherwise throw away the child directory and loop 863 # ...otherwise throw away the child directory and loop
532 my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` 864 _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
533 done 865 done
534 my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` 866 _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
535 867
536 save_mkdir_p_IFS="$IFS"; IFS=':' 868 func_mkdir_p_IFS=$IFS; IFS=:
537 for my_dir in $my_dir_list; do 869 for _G_dir in $_G_dir_list; do
538 IFS="$save_mkdir_p_IFS" 870 IFS=$func_mkdir_p_IFS
539 # mkdir can fail with a `File exist' error if two processes 871 # mkdir can fail with a 'File exist' error if two processes
540 # try to create one of the directories concurrently. Don't 872 # try to create one of the directories concurrently. Don't
541 # stop in that case! 873 # stop in that case!
542 $MKDIR "$my_dir" 2>/dev/null || : 874 $MKDIR "$_G_dir" 2>/dev/null || :
543 done 875 done
544 IFS="$save_mkdir_p_IFS" 876 IFS=$func_mkdir_p_IFS
545 877
546 # Bail out if we (or some other process) failed to create a directory. 878 # Bail out if we (or some other process) failed to create a directory.
547 test -d "$my_directory_path" || \ 879 test -d "$_G_directory_path" || \
548 func_fatal_error "Failed to create \`$1'" 880 func_fatal_error "Failed to create '$1'"
549 fi 881 fi
550} 882}
551 883
552 884
553# func_mktempdir [string] 885# func_mktempdir [BASENAME]
886# -------------------------
554# Make a temporary directory that won't clash with other running 887# Make a temporary directory that won't clash with other running
555# libtool processes, and avoids race conditions if possible. If 888# libtool processes, and avoids race conditions if possible. If
556# given, STRING is the basename for that directory. 889# given, BASENAME is the basename for that directory.
557func_mktempdir () 890func_mktempdir ()
558{ 891{
559 my_template="${TMPDIR-/tmp}/${1-$progname}" 892 $debug_cmd
893
894 _G_template=${TMPDIR-/tmp}/${1-$progname}
560 895
561 if test "$opt_dry_run" = ":"; then 896 if test : = "$opt_dry_run"; then
562 # Return a directory name, but don't create it in dry-run mode 897 # Return a directory name, but don't create it in dry-run mode
563 my_tmpdir="${my_template}-$$" 898 _G_tmpdir=$_G_template-$$
564 else 899 else
565 900
566 # If mktemp works, use that first and foremost 901 # If mktemp works, use that first and foremost
567 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` 902 _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
568 903
569 if test ! -d "$my_tmpdir"; then 904 if test ! -d "$_G_tmpdir"; then
570 # Failing that, at least try and use $RANDOM to avoid a race 905 # Failing that, at least try and use $RANDOM to avoid a race
571 my_tmpdir="${my_template}-${RANDOM-0}$$" 906 _G_tmpdir=$_G_template-${RANDOM-0}$$
572 907
573 save_mktempdir_umask=`umask` 908 func_mktempdir_umask=`umask`
574 umask 0077 909 umask 0077
575 $MKDIR "$my_tmpdir" 910 $MKDIR "$_G_tmpdir"
576 umask $save_mktempdir_umask 911 umask $func_mktempdir_umask
577 fi 912 fi
578 913
579 # If we're not in dry-run mode, bomb out on failure 914 # If we're not in dry-run mode, bomb out on failure
580 test -d "$my_tmpdir" || \ 915 test -d "$_G_tmpdir" || \
581 func_fatal_error "cannot create temporary directory \`$my_tmpdir'" 916 func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
582 fi 917 fi
583 918
584 $ECHO "$my_tmpdir" 919 $ECHO "$_G_tmpdir"
585} 920}
586 921
587 922
588# func_quote_for_eval arg 923# func_normal_abspath PATH
589# Aesthetically quote ARG to be evaled later. 924# ------------------------
590# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT 925# Remove doubled-up and trailing slashes, "." path components,
591# is double-quoted, suitable for a subsequent eval, whereas 926# and cancel out any ".." path components in PATH after making
592# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters 927# it an absolute path.
593# which are still active within double quotes backslashified. 928func_normal_abspath ()
594func_quote_for_eval ()
595{ 929{
596 case $1 in 930 $debug_cmd
597 *[\\\`\"\$]*)
598 func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
599 *)
600 func_quote_for_eval_unquoted_result="$1" ;;
601 esac
602 931
603 case $func_quote_for_eval_unquoted_result in 932 # These SED scripts presuppose an absolute path with a trailing slash.
604 # Double-quote args containing shell metacharacters to delay 933 _G_pathcar='s|^/\([^/]*\).*$|\1|'
605 # word splitting, command substitution and and variable 934 _G_pathcdr='s|^/[^/]*||'
606 # expansion for a subsequent eval. 935 _G_removedotparts=':dotsl
607 # Many Bourne shells cannot handle close brackets correctly 936 s|/\./|/|g
608 # in scan sets, so we specify it separately. 937 t dotsl
609 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 938 s|/\.$|/|'
610 func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" 939 _G_collapseslashes='s|/\{1,\}|/|g'
940 _G_finalslash='s|/*$|/|'
941
942 # Start from root dir and reassemble the path.
943 func_normal_abspath_result=
944 func_normal_abspath_tpath=$1
945 func_normal_abspath_altnamespace=
946 case $func_normal_abspath_tpath in
947 "")
948 # Empty path, that just means $cwd.
949 func_stripname '' '/' "`pwd`"
950 func_normal_abspath_result=$func_stripname_result
951 return
952 ;;
953 # The next three entries are used to spot a run of precisely
954 # two leading slashes without using negated character classes;
955 # we take advantage of case's first-match behaviour.
956 ///*)
957 # Unusual form of absolute path, do nothing.
958 ;;
959 //*)
960 # Not necessarily an ordinary path; POSIX reserves leading '//'
961 # and for example Cygwin uses it to access remote file shares
962 # over CIFS/SMB, so we conserve a leading double slash if found.
963 func_normal_abspath_altnamespace=/
964 ;;
965 /*)
966 # Absolute path, do nothing.
611 ;; 967 ;;
612 *) 968 *)
613 func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" 969 # Relative path, prepend $cwd.
970 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
971 ;;
614 esac 972 esac
973
974 # Cancel out all the simple stuff to save iterations. We also want
975 # the path to end with a slash for ease of parsing, so make sure
976 # there is one (and only one) here.
977 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
978 -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
979 while :; do
980 # Processed it all yet?
981 if test / = "$func_normal_abspath_tpath"; then
982 # If we ascended to the root using ".." the result may be empty now.
983 if test -z "$func_normal_abspath_result"; then
984 func_normal_abspath_result=/
985 fi
986 break
987 fi
988 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
989 -e "$_G_pathcar"`
990 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
991 -e "$_G_pathcdr"`
992 # Figure out what to do with it
993 case $func_normal_abspath_tcomponent in
994 "")
995 # Trailing empty path component, ignore it.
996 ;;
997 ..)
998 # Parent dir; strip last assembled component from result.
999 func_dirname "$func_normal_abspath_result"
1000 func_normal_abspath_result=$func_dirname_result
1001 ;;
1002 *)
1003 # Actual path component, append it.
1004 func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
1005 ;;
1006 esac
1007 done
1008 # Restore leading double-slash if one was found on entry.
1009 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
1010}
1011
1012
1013# func_notquiet ARG...
1014# --------------------
1015# Echo program name prefixed message only when not in quiet mode.
1016func_notquiet ()
1017{
1018 $debug_cmd
1019
1020 $opt_quiet || func_echo ${1+"$@"}
1021
1022 # A bug in bash halts the script if the last line of a function
1023 # fails when set -e is in force, so we need another command to
1024 # work around that:
1025 :
615} 1026}
616 1027
617 1028
618# func_quote_for_expand arg 1029# func_relative_path SRCDIR DSTDIR
1030# --------------------------------
1031# Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
1032func_relative_path ()
1033{
1034 $debug_cmd
1035
1036 func_relative_path_result=
1037 func_normal_abspath "$1"
1038 func_relative_path_tlibdir=$func_normal_abspath_result
1039 func_normal_abspath "$2"
1040 func_relative_path_tbindir=$func_normal_abspath_result
1041
1042 # Ascend the tree starting from libdir
1043 while :; do
1044 # check if we have found a prefix of bindir
1045 case $func_relative_path_tbindir in
1046 $func_relative_path_tlibdir)
1047 # found an exact match
1048 func_relative_path_tcancelled=
1049 break
1050 ;;
1051 $func_relative_path_tlibdir*)
1052 # found a matching prefix
1053 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
1054 func_relative_path_tcancelled=$func_stripname_result
1055 if test -z "$func_relative_path_result"; then
1056 func_relative_path_result=.
1057 fi
1058 break
1059 ;;
1060 *)
1061 func_dirname $func_relative_path_tlibdir
1062 func_relative_path_tlibdir=$func_dirname_result
1063 if test -z "$func_relative_path_tlibdir"; then
1064 # Have to descend all the way to the root!
1065 func_relative_path_result=../$func_relative_path_result
1066 func_relative_path_tcancelled=$func_relative_path_tbindir
1067 break
1068 fi
1069 func_relative_path_result=../$func_relative_path_result
1070 ;;
1071 esac
1072 done
1073
1074 # Now calculate path; take care to avoid doubling-up slashes.
1075 func_stripname '' '/' "$func_relative_path_result"
1076 func_relative_path_result=$func_stripname_result
1077 func_stripname '/' '/' "$func_relative_path_tcancelled"
1078 if test -n "$func_stripname_result"; then
1079 func_append func_relative_path_result "/$func_stripname_result"
1080 fi
1081
1082 # Normalisation. If bindir is libdir, return '.' else relative path.
1083 if test -n "$func_relative_path_result"; then
1084 func_stripname './' '' "$func_relative_path_result"
1085 func_relative_path_result=$func_stripname_result
1086 fi
1087
1088 test -n "$func_relative_path_result" || func_relative_path_result=.
1089
1090 :
1091}
1092
1093
1094# func_quote_for_eval ARG...
1095# --------------------------
1096# Aesthetically quote ARGs to be evaled later.
1097# This function returns two values:
1098# i) func_quote_for_eval_result
1099# double-quoted, suitable for a subsequent eval
1100# ii) func_quote_for_eval_unquoted_result
1101# has all characters that are still active within double
1102# quotes backslashified.
1103func_quote_for_eval ()
1104{
1105 $debug_cmd
1106
1107 func_quote_for_eval_unquoted_result=
1108 func_quote_for_eval_result=
1109 while test 0 -lt $#; do
1110 case $1 in
1111 *[\\\`\"\$]*)
1112 _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
1113 *)
1114 _G_unquoted_arg=$1 ;;
1115 esac
1116 if test -n "$func_quote_for_eval_unquoted_result"; then
1117 func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
1118 else
1119 func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
1120 fi
1121
1122 case $_G_unquoted_arg in
1123 # Double-quote args containing shell metacharacters to delay
1124 # word splitting, command substitution and variable expansion
1125 # for a subsequent eval.
1126 # Many Bourne shells cannot handle close brackets correctly
1127 # in scan sets, so we specify it separately.
1128 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1129 _G_quoted_arg=\"$_G_unquoted_arg\"
1130 ;;
1131 *)
1132 _G_quoted_arg=$_G_unquoted_arg
1133 ;;
1134 esac
1135
1136 if test -n "$func_quote_for_eval_result"; then
1137 func_append func_quote_for_eval_result " $_G_quoted_arg"
1138 else
1139 func_append func_quote_for_eval_result "$_G_quoted_arg"
1140 fi
1141 shift
1142 done
1143}
1144
1145
1146# func_quote_for_expand ARG
1147# -------------------------
619# Aesthetically quote ARG to be evaled later; same as above, 1148# Aesthetically quote ARG to be evaled later; same as above,
620# but do not quote variable references. 1149# but do not quote variable references.
621func_quote_for_expand () 1150func_quote_for_expand ()
622{ 1151{
1152 $debug_cmd
1153
623 case $1 in 1154 case $1 in
624 *[\\\`\"]*) 1155 *[\\\`\"]*)
625 my_arg=`$ECHO "$1" | $SED \ 1156 _G_arg=`$ECHO "$1" | $SED \
626 -e "$double_quote_subst" -e "$sed_double_backslash"` ;; 1157 -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
627 *) 1158 *)
628 my_arg="$1" ;; 1159 _G_arg=$1 ;;
629 esac 1160 esac
630 1161
631 case $my_arg in 1162 case $_G_arg in
632 # Double-quote args containing shell metacharacters to delay 1163 # Double-quote args containing shell metacharacters to delay
633 # word splitting and command substitution for a subsequent eval. 1164 # word splitting and command substitution for a subsequent eval.
634 # Many Bourne shells cannot handle close brackets correctly 1165 # Many Bourne shells cannot handle close brackets correctly
635 # in scan sets, so we specify it separately. 1166 # in scan sets, so we specify it separately.
636 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") 1167 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
637 my_arg="\"$my_arg\"" 1168 _G_arg=\"$_G_arg\"
638 ;; 1169 ;;
639 esac 1170 esac
640 1171
641 func_quote_for_expand_result="$my_arg" 1172 func_quote_for_expand_result=$_G_arg
642} 1173}
643 1174
644 1175
645# func_show_eval cmd [fail_exp] 1176# func_stripname PREFIX SUFFIX NAME
646# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is 1177# ---------------------------------
1178# strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
1179# PREFIX and SUFFIX must not contain globbing or regex special
1180# characters, hashes, percent signs, but SUFFIX may contain a leading
1181# dot (in which case that matches only a dot).
1182if test yes = "$_G_HAVE_XSI_OPS"; then
1183 eval 'func_stripname ()
1184 {
1185 $debug_cmd
1186
1187 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
1188 # positional parameters, so assign one to ordinary variable first.
1189 func_stripname_result=$3
1190 func_stripname_result=${func_stripname_result#"$1"}
1191 func_stripname_result=${func_stripname_result%"$2"}
1192 }'
1193else
1194 func_stripname ()
1195 {
1196 $debug_cmd
1197
1198 case $2 in
1199 .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
1200 *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
1201 esac
1202 }
1203fi
1204
1205
1206# func_show_eval CMD [FAIL_EXP]
1207# -----------------------------
1208# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
647# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP 1209# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
648# is given, then evaluate it. 1210# is given, then evaluate it.
649func_show_eval () 1211func_show_eval ()
650{ 1212{
651 my_cmd="$1" 1213 $debug_cmd
652 my_fail_exp="${2-:}"
653 1214
654 ${opt_silent-false} || { 1215 _G_cmd=$1
655 func_quote_for_expand "$my_cmd" 1216 _G_fail_exp=${2-':'}
656 eval "func_echo $func_quote_for_expand_result" 1217
657 } 1218 func_quote_for_expand "$_G_cmd"
1219 eval "func_notquiet $func_quote_for_expand_result"
658 1220
659 if ${opt_dry_run-false}; then :; else 1221 $opt_dry_run || {
660 eval "$my_cmd" 1222 eval "$_G_cmd"
661 my_status=$? 1223 _G_status=$?
662 if test "$my_status" -eq 0; then :; else 1224 if test 0 -ne "$_G_status"; then
663 eval "(exit $my_status); $my_fail_exp" 1225 eval "(exit $_G_status); $_G_fail_exp"
664 fi 1226 fi
665 fi 1227 }
666} 1228}
667 1229
668 1230
669# func_show_eval_locale cmd [fail_exp] 1231# func_show_eval_locale CMD [FAIL_EXP]
670# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is 1232# ------------------------------------
1233# Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
671# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP 1234# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
672# is given, then evaluate it. Use the saved locale for evaluation. 1235# is given, then evaluate it. Use the saved locale for evaluation.
673func_show_eval_locale () 1236func_show_eval_locale ()
674{ 1237{
675 my_cmd="$1" 1238 $debug_cmd
676 my_fail_exp="${2-:}" 1239
1240 _G_cmd=$1
1241 _G_fail_exp=${2-':'}
677 1242
678 ${opt_silent-false} || { 1243 $opt_quiet || {
679 func_quote_for_expand "$my_cmd" 1244 func_quote_for_expand "$_G_cmd"
680 eval "func_echo $func_quote_for_expand_result" 1245 eval "func_echo $func_quote_for_expand_result"
681 } 1246 }
682 1247
683 if ${opt_dry_run-false}; then :; else 1248 $opt_dry_run || {
684 eval "$lt_user_locale 1249 eval "$_G_user_locale
685 $my_cmd" 1250 $_G_cmd"
686 my_status=$? 1251 _G_status=$?
687 eval "$lt_safe_locale" 1252 eval "$_G_safe_locale"
688 if test "$my_status" -eq 0; then :; else 1253 if test 0 -ne "$_G_status"; then
689 eval "(exit $my_status); $my_fail_exp" 1254 eval "(exit $_G_status); $_G_fail_exp"
690 fi 1255 fi
691 fi 1256 }
692} 1257}
693 1258
1259
694# func_tr_sh 1260# func_tr_sh
1261# ----------
695# Turn $1 into a string suitable for a shell variable name. 1262# Turn $1 into a string suitable for a shell variable name.
696# Result is stored in $func_tr_sh_result. All characters 1263# Result is stored in $func_tr_sh_result. All characters
697# not in the set a-zA-Z0-9_ are replaced with '_'. Further, 1264# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
698# if $1 begins with a digit, a '_' is prepended as well. 1265# if $1 begins with a digit, a '_' is prepended as well.
699func_tr_sh () 1266func_tr_sh ()
700{ 1267{
701 case $1 in 1268 $debug_cmd
702 [0-9]* | *[!a-zA-Z0-9_]*) 1269
703 func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` 1270 case $1 in
704 ;; 1271 [0-9]* | *[!a-zA-Z0-9_]*)
705 * ) 1272 func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
706 func_tr_sh_result=$1 1273 ;;
707 ;; 1274 * )
708 esac 1275 func_tr_sh_result=$1
1276 ;;
1277 esac
709} 1278}
710 1279
711 1280
712# func_version 1281# func_verbose ARG...
713# Echo version message to standard output and exit. 1282# -------------------
714func_version () 1283# Echo program name prefixed message in verbose mode only.
1284func_verbose ()
715{ 1285{
716 $opt_debug 1286 $debug_cmd
717 1287
718 $SED -n '/(C)/!b go 1288 $opt_verbose && func_echo "$*"
719 :more 1289
720 /\./!{ 1290 :
721 N
722 s/\n# / /
723 b more
724 }
725 :go
726 /^# '$PROGRAM' (GNU /,/# warranty; / {
727 s/^# //
728 s/^# *$//
729 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
730 p
731 }' < "$progpath"
732 exit $?
733} 1291}
734 1292
735# func_usage 1293
736# Echo short help message to standard output and exit. 1294# func_warn_and_continue ARG...
737func_usage () 1295# -----------------------------
1296# Echo program name prefixed warning message to standard error.
1297func_warn_and_continue ()
738{ 1298{
739 $opt_debug 1299 $debug_cmd
740 1300
741 $SED -n '/^# Usage:/,/^# *.*--help/ { 1301 $require_term_colors
742 s/^# // 1302
743 s/^# *$// 1303 func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
744 s/\$progname/'$progname'/ 1304}
745 p 1305
746 }' < "$progpath" 1306
747 echo 1307# func_warning CATEGORY ARG...
748 $ECHO "run \`$progname --help | more' for full usage" 1308# ----------------------------
749 exit $? 1309# Echo program name prefixed warning message to standard error. Warning
1310# messages can be filtered according to CATEGORY, where this function
1311# elides messages where CATEGORY is not listed in the global variable
1312# 'opt_warning_types'.
1313func_warning ()
1314{
1315 $debug_cmd
1316
1317 # CATEGORY must be in the warning_categories list!
1318 case " $warning_categories " in
1319 *" $1 "*) ;;
1320 *) func_internal_error "invalid warning category '$1'" ;;
1321 esac
1322
1323 _G_category=$1
1324 shift
1325
1326 case " $opt_warning_types " in
1327 *" $_G_category "*) $warning_func ${1+"$@"} ;;
1328 esac
1329}
1330
1331
1332# func_sort_ver VER1 VER2
1333# -----------------------
1334# 'sort -V' is not generally available.
1335# Note this deviates from the version comparison in automake
1336# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
1337# but this should suffice as we won't be specifying old
1338# version formats or redundant trailing .0 in bootstrap.conf.
1339# If we did want full compatibility then we should probably
1340# use m4_version_compare from autoconf.
1341func_sort_ver ()
1342{
1343 $debug_cmd
1344
1345 printf '%s\n%s\n' "$1" "$2" \
1346 | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
1347}
1348
1349# func_lt_ver PREV CURR
1350# ---------------------
1351# Return true if PREV and CURR are in the correct order according to
1352# func_sort_ver, otherwise false. Use it like this:
1353#
1354# func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
1355func_lt_ver ()
1356{
1357 $debug_cmd
1358
1359 test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
750} 1360}
751 1361
752# func_help [NOEXIT] 1362
753# Echo long help message to standard output and exit, 1363# Local variables:
754# unless 'noexit' is passed as argument. 1364# mode: shell-script
1365# sh-indentation: 2
1366# eval: (add-hook 'before-save-hook 'time-stamp)
1367# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1368# time-stamp-time-zone: "UTC"
1369# End:
1370#! /bin/sh
1371
1372# Set a version string for this script.
1373scriptversion=2014-01-07.03; # UTC
1374
1375# A portable, pluggable option parser for Bourne shell.
1376# Written by Gary V. Vaughan, 2010
1377
1378# Copyright (C) 2010-2015 Free Software Foundation, Inc.
1379# This is free software; see the source for copying conditions. There is NO
1380# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1381
1382# This program is free software: you can redistribute it and/or modify
1383# it under the terms of the GNU General Public License as published by
1384# the Free Software Foundation, either version 3 of the License, or
1385# (at your option) any later version.
1386
1387# This program is distributed in the hope that it will be useful,
1388# but WITHOUT ANY WARRANTY; without even the implied warranty of
1389# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1390# GNU General Public License for more details.
1391
1392# You should have received a copy of the GNU General Public License
1393# along with this program. If not, see <http://www.gnu.org/licenses/>.
1394
1395# Please report bugs or propose patches to gary@gnu.org.
1396
1397
1398## ------ ##
1399## Usage. ##
1400## ------ ##
1401
1402# This file is a library for parsing options in your shell scripts along
1403# with assorted other useful supporting features that you can make use
1404# of too.
1405#
1406# For the simplest scripts you might need only:
1407#
1408# #!/bin/sh
1409# . relative/path/to/funclib.sh
1410# . relative/path/to/options-parser
1411# scriptversion=1.0
1412# func_options ${1+"$@"}
1413# eval set dummy "$func_options_result"; shift
1414# ...rest of your script...
1415#
1416# In order for the '--version' option to work, you will need to have a
1417# suitably formatted comment like the one at the top of this file
1418# starting with '# Written by ' and ending with '# warranty; '.
1419#
1420# For '-h' and '--help' to work, you will also need a one line
1421# description of your script's purpose in a comment directly above the
1422# '# Written by ' line, like the one at the top of this file.
1423#
1424# The default options also support '--debug', which will turn on shell
1425# execution tracing (see the comment above debug_cmd below for another
1426# use), and '--verbose' and the func_verbose function to allow your script
1427# to display verbose messages only when your user has specified
1428# '--verbose'.
1429#
1430# After sourcing this file, you can plug processing for additional
1431# options by amending the variables from the 'Configuration' section
1432# below, and following the instructions in the 'Option parsing'
1433# section further down.
1434
1435## -------------- ##
1436## Configuration. ##
1437## -------------- ##
1438
1439# You should override these variables in your script after sourcing this
1440# file so that they reflect the customisations you have added to the
1441# option parser.
1442
1443# The usage line for option parsing errors and the start of '-h' and
1444# '--help' output messages. You can embed shell variables for delayed
1445# expansion at the time the message is displayed, but you will need to
1446# quote other shell meta-characters carefully to prevent them being
1447# expanded when the contents are evaled.
1448usage='$progpath [OPTION]...'
1449
1450# Short help message in response to '-h' and '--help'. Add to this or
1451# override it after sourcing this library to reflect the full set of
1452# options your script accepts.
1453usage_message="\
1454 --debug enable verbose shell tracing
1455 -W, --warnings=CATEGORY
1456 report the warnings falling in CATEGORY [all]
1457 -v, --verbose verbosely report processing
1458 --version print version information and exit
1459 -h, --help print short or long help message and exit
1460"
1461
1462# Additional text appended to 'usage_message' in response to '--help'.
1463long_help_message="
1464Warning categories include:
1465 'all' show all warnings
1466 'none' turn off all the warnings
1467 'error' warnings are treated as fatal errors"
1468
1469# Help message printed before fatal option parsing errors.
1470fatal_help="Try '\$progname --help' for more information."
1471
1472
1473
1474## ------------------------- ##
1475## Hook function management. ##
1476## ------------------------- ##
1477
1478# This section contains functions for adding, removing, and running hooks
1479# to the main code. A hook is just a named list of of function, that can
1480# be run in order later on.
1481
1482# func_hookable FUNC_NAME
1483# -----------------------
1484# Declare that FUNC_NAME will run hooks added with
1485# 'func_add_hook FUNC_NAME ...'.
1486func_hookable ()
1487{
1488 $debug_cmd
1489
1490 func_append hookable_fns " $1"
1491}
1492
1493
1494# func_add_hook FUNC_NAME HOOK_FUNC
1495# ---------------------------------
1496# Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
1497# first have been declared "hookable" by a call to 'func_hookable'.
1498func_add_hook ()
1499{
1500 $debug_cmd
1501
1502 case " $hookable_fns " in
1503 *" $1 "*) ;;
1504 *) func_fatal_error "'$1' does not accept hook functions." ;;
1505 esac
1506
1507 eval func_append ${1}_hooks '" $2"'
1508}
1509
1510
1511# func_remove_hook FUNC_NAME HOOK_FUNC
1512# ------------------------------------
1513# Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
1514func_remove_hook ()
1515{
1516 $debug_cmd
1517
1518 eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
1519}
1520
1521
1522# func_run_hooks FUNC_NAME [ARG]...
1523# ---------------------------------
1524# Run all hook functions registered to FUNC_NAME.
1525# It is assumed that the list of hook functions contains nothing more
1526# than a whitespace-delimited list of legal shell function names, and
1527# no effort is wasted trying to catch shell meta-characters or preserve
1528# whitespace.
1529func_run_hooks ()
1530{
1531 $debug_cmd
1532
1533 case " $hookable_fns " in
1534 *" $1 "*) ;;
1535 *) func_fatal_error "'$1' does not support hook funcions.n" ;;
1536 esac
1537
1538 eval _G_hook_fns=\$$1_hooks; shift
1539
1540 for _G_hook in $_G_hook_fns; do
1541 eval $_G_hook '"$@"'
1542
1543 # store returned options list back into positional
1544 # parameters for next 'cmd' execution.
1545 eval _G_hook_result=\$${_G_hook}_result
1546 eval set dummy "$_G_hook_result"; shift
1547 done
1548
1549 func_quote_for_eval ${1+"$@"}
1550 func_run_hooks_result=$func_quote_for_eval_result
1551}
1552
1553
1554
1555## --------------- ##
1556## Option parsing. ##
1557## --------------- ##
1558
1559# In order to add your own option parsing hooks, you must accept the
1560# full positional parameter list in your hook function, remove any
1561# options that you action, and then pass back the remaining unprocessed
1562# options in '<hooked_function_name>_result', escaped suitably for
1563# 'eval'. Like this:
1564#
1565# my_options_prep ()
1566# {
1567# $debug_cmd
1568#
1569# # Extend the existing usage message.
1570# usage_message=$usage_message'
1571# -s, --silent don'\''t print informational messages
1572# '
1573#
1574# func_quote_for_eval ${1+"$@"}
1575# my_options_prep_result=$func_quote_for_eval_result
1576# }
1577# func_add_hook func_options_prep my_options_prep
1578#
1579#
1580# my_silent_option ()
1581# {
1582# $debug_cmd
1583#
1584# # Note that for efficiency, we parse as many options as we can
1585# # recognise in a loop before passing the remainder back to the
1586# # caller on the first unrecognised argument we encounter.
1587# while test $# -gt 0; do
1588# opt=$1; shift
1589# case $opt in
1590# --silent|-s) opt_silent=: ;;
1591# # Separate non-argument short options:
1592# -s*) func_split_short_opt "$_G_opt"
1593# set dummy "$func_split_short_opt_name" \
1594# "-$func_split_short_opt_arg" ${1+"$@"}
1595# shift
1596# ;;
1597# *) set dummy "$_G_opt" "$*"; shift; break ;;
1598# esac
1599# done
1600#
1601# func_quote_for_eval ${1+"$@"}
1602# my_silent_option_result=$func_quote_for_eval_result
1603# }
1604# func_add_hook func_parse_options my_silent_option
1605#
1606#
1607# my_option_validation ()
1608# {
1609# $debug_cmd
1610#
1611# $opt_silent && $opt_verbose && func_fatal_help "\
1612# '--silent' and '--verbose' options are mutually exclusive."
1613#
1614# func_quote_for_eval ${1+"$@"}
1615# my_option_validation_result=$func_quote_for_eval_result
1616# }
1617# func_add_hook func_validate_options my_option_validation
1618#
1619# You'll alse need to manually amend $usage_message to reflect the extra
1620# options you parse. It's preferable to append if you can, so that
1621# multiple option parsing hooks can be added safely.
1622
1623
1624# func_options [ARG]...
1625# ---------------------
1626# All the functions called inside func_options are hookable. See the
1627# individual implementations for details.
1628func_hookable func_options
1629func_options ()
1630{
1631 $debug_cmd
1632
1633 func_options_prep ${1+"$@"}
1634 eval func_parse_options \
1635 ${func_options_prep_result+"$func_options_prep_result"}
1636 eval func_validate_options \
1637 ${func_parse_options_result+"$func_parse_options_result"}
1638
1639 eval func_run_hooks func_options \
1640 ${func_validate_options_result+"$func_validate_options_result"}
1641
1642 # save modified positional parameters for caller
1643 func_options_result=$func_run_hooks_result
1644}
1645
1646
1647# func_options_prep [ARG]...
1648# --------------------------
1649# All initialisations required before starting the option parse loop.
1650# Note that when calling hook functions, we pass through the list of
1651# positional parameters. If a hook function modifies that list, and
1652# needs to propogate that back to rest of this script, then the complete
1653# modified list must be put in 'func_run_hooks_result' before
1654# returning.
1655func_hookable func_options_prep
1656func_options_prep ()
1657{
1658 $debug_cmd
1659
1660 # Option defaults:
1661 opt_verbose=false
1662 opt_warning_types=
1663
1664 func_run_hooks func_options_prep ${1+"$@"}
1665
1666 # save modified positional parameters for caller
1667 func_options_prep_result=$func_run_hooks_result
1668}
1669
1670
1671# func_parse_options [ARG]...
1672# ---------------------------
1673# The main option parsing loop.
1674func_hookable func_parse_options
1675func_parse_options ()
1676{
1677 $debug_cmd
1678
1679 func_parse_options_result=
1680
1681 # this just eases exit handling
1682 while test $# -gt 0; do
1683 # Defer to hook functions for initial option parsing, so they
1684 # get priority in the event of reusing an option name.
1685 func_run_hooks func_parse_options ${1+"$@"}
1686
1687 # Adjust func_parse_options positional parameters to match
1688 eval set dummy "$func_run_hooks_result"; shift
1689
1690 # Break out of the loop if we already parsed every option.
1691 test $# -gt 0 || break
1692
1693 _G_opt=$1
1694 shift
1695 case $_G_opt in
1696 --debug|-x) debug_cmd='set -x'
1697 func_echo "enabling shell trace mode"
1698 $debug_cmd
1699 ;;
1700
1701 --no-warnings|--no-warning|--no-warn)
1702 set dummy --warnings none ${1+"$@"}
1703 shift
1704 ;;
1705
1706 --warnings|--warning|-W)
1707 test $# = 0 && func_missing_arg $_G_opt && break
1708 case " $warning_categories $1" in
1709 *" $1 "*)
1710 # trailing space prevents matching last $1 above
1711 func_append_uniq opt_warning_types " $1"
1712 ;;
1713 *all)
1714 opt_warning_types=$warning_categories
1715 ;;
1716 *none)
1717 opt_warning_types=none
1718 warning_func=:
1719 ;;
1720 *error)
1721 opt_warning_types=$warning_categories
1722 warning_func=func_fatal_error
1723 ;;
1724 *)
1725 func_fatal_error \
1726 "unsupported warning category: '$1'"
1727 ;;
1728 esac
1729 shift
1730 ;;
1731
1732 --verbose|-v) opt_verbose=: ;;
1733 --version) func_version ;;
1734 -\?|-h) func_usage ;;
1735 --help) func_help ;;
1736
1737 # Separate optargs to long options (plugins may need this):
1738 --*=*) func_split_equals "$_G_opt"
1739 set dummy "$func_split_equals_lhs" \
1740 "$func_split_equals_rhs" ${1+"$@"}
1741 shift
1742 ;;
1743
1744 # Separate optargs to short options:
1745 -W*)
1746 func_split_short_opt "$_G_opt"
1747 set dummy "$func_split_short_opt_name" \
1748 "$func_split_short_opt_arg" ${1+"$@"}
1749 shift
1750 ;;
1751
1752 # Separate non-argument short options:
1753 -\?*|-h*|-v*|-x*)
1754 func_split_short_opt "$_G_opt"
1755 set dummy "$func_split_short_opt_name" \
1756 "-$func_split_short_opt_arg" ${1+"$@"}
1757 shift
1758 ;;
1759
1760 --) break ;;
1761 -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
1762 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1763 esac
1764 done
1765
1766 # save modified positional parameters for caller
1767 func_quote_for_eval ${1+"$@"}
1768 func_parse_options_result=$func_quote_for_eval_result
1769}
1770
1771
1772# func_validate_options [ARG]...
1773# ------------------------------
1774# Perform any sanity checks on option settings and/or unconsumed
1775# arguments.
1776func_hookable func_validate_options
1777func_validate_options ()
1778{
1779 $debug_cmd
1780
1781 # Display all warnings if -W was not given.
1782 test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
1783
1784 func_run_hooks func_validate_options ${1+"$@"}
1785
1786 # Bail if the options were screwed!
1787 $exit_cmd $EXIT_FAILURE
1788
1789 # save modified positional parameters for caller
1790 func_validate_options_result=$func_run_hooks_result
1791}
1792
1793
1794
1795## ----------------- ##
1796## Helper functions. ##
1797## ----------------- ##
1798
1799# This section contains the helper functions used by the rest of the
1800# hookable option parser framework in ascii-betical order.
1801
1802
1803# func_fatal_help ARG...
1804# ----------------------
1805# Echo program name prefixed message to standard error, followed by
1806# a help hint, and exit.
1807func_fatal_help ()
1808{
1809 $debug_cmd
1810
1811 eval \$ECHO \""Usage: $usage"\"
1812 eval \$ECHO \""$fatal_help"\"
1813 func_error ${1+"$@"}
1814 exit $EXIT_FAILURE
1815}
1816
1817
1818# func_help
1819# ---------
1820# Echo long help message to standard output and exit.
755func_help () 1821func_help ()
756{ 1822{
757 $opt_debug 1823 $debug_cmd
758 1824
759 $SED -n '/^# Usage:/,/# Report bugs to/ { 1825 func_usage_message
760 :print 1826 $ECHO "$long_help_message"
761 s/^# // 1827 exit 0
762 s/^# *$//
763 s*\$progname*'$progname'*
764 s*\$host*'"$host"'*
765 s*\$SHELL*'"$SHELL"'*
766 s*\$LTCC*'"$LTCC"'*
767 s*\$LTCFLAGS*'"$LTCFLAGS"'*
768 s*\$LD*'"$LD"'*
769 s/\$with_gnu_ld/'"$with_gnu_ld"'/
770 s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
771 s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
772 p
773 d
774 }
775 /^# .* home page:/b print
776 /^# General help using/b print
777 ' < "$progpath"
778 ret=$?
779 if test -z "$1"; then
780 exit $ret
781 fi
782} 1828}
783 1829
784# func_missing_arg argname 1830
1831# func_missing_arg ARGNAME
1832# ------------------------
785# Echo program name prefixed message to standard error and set global 1833# Echo program name prefixed message to standard error and set global
786# exit_cmd. 1834# exit_cmd.
787func_missing_arg () 1835func_missing_arg ()
788{ 1836{
789 $opt_debug 1837 $debug_cmd
790 1838
791 func_error "missing argument for $1." 1839 func_error "Missing argument for '$1'."
792 exit_cmd=exit 1840 exit_cmd=exit
793} 1841}
794 1842
795 1843
796# func_split_short_opt shortopt 1844# func_split_equals STRING
1845# ------------------------
1846# Set func_split_equals_lhs and func_split_equals_rhs shell variables after
1847# splitting STRING at the '=' sign.
1848test -z "$_G_HAVE_XSI_OPS" \
1849 && (eval 'x=a/b/c;
1850 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
1851 && _G_HAVE_XSI_OPS=yes
1852
1853if test yes = "$_G_HAVE_XSI_OPS"
1854then
1855 # This is an XSI compatible shell, allowing a faster implementation...
1856 eval 'func_split_equals ()
1857 {
1858 $debug_cmd
1859
1860 func_split_equals_lhs=${1%%=*}
1861 func_split_equals_rhs=${1#*=}
1862 test "x$func_split_equals_lhs" = "x$1" \
1863 && func_split_equals_rhs=
1864 }'
1865else
1866 # ...otherwise fall back to using expr, which is often a shell builtin.
1867 func_split_equals ()
1868 {
1869 $debug_cmd
1870
1871 func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
1872 func_split_equals_rhs=
1873 test "x$func_split_equals_lhs" = "x$1" \
1874 || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
1875 }
1876fi #func_split_equals
1877
1878
1879# func_split_short_opt SHORTOPT
1880# -----------------------------
797# Set func_split_short_opt_name and func_split_short_opt_arg shell 1881# Set func_split_short_opt_name and func_split_short_opt_arg shell
798# variables after splitting SHORTOPT after the 2nd character. 1882# variables after splitting SHORTOPT after the 2nd character.
799func_split_short_opt () 1883if test yes = "$_G_HAVE_XSI_OPS"
1884then
1885 # This is an XSI compatible shell, allowing a faster implementation...
1886 eval 'func_split_short_opt ()
1887 {
1888 $debug_cmd
1889
1890 func_split_short_opt_arg=${1#??}
1891 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
1892 }'
1893else
1894 # ...otherwise fall back to using expr, which is often a shell builtin.
1895 func_split_short_opt ()
1896 {
1897 $debug_cmd
1898
1899 func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
1900 func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
1901 }
1902fi #func_split_short_opt
1903
1904
1905# func_usage
1906# ----------
1907# Echo short help message to standard output and exit.
1908func_usage ()
800{ 1909{
801 my_sed_short_opt='1s/^\(..\).*$/\1/;q' 1910 $debug_cmd
802 my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
803 1911
804 func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` 1912 func_usage_message
805 func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` 1913 $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
806} # func_split_short_opt may be replaced by extended shell implementation 1914 exit 0
1915}
807 1916
808 1917
809# func_split_long_opt longopt 1918# func_usage_message
810# Set func_split_long_opt_name and func_split_long_opt_arg shell 1919# ------------------
811# variables after splitting LONGOPT at the `=' sign. 1920# Echo short help message to standard output.
812func_split_long_opt () 1921func_usage_message ()
813{ 1922{
814 my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' 1923 $debug_cmd
815 my_sed_long_arg='1s/^--[^=]*=//'
816 1924
817 func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` 1925 eval \$ECHO \""Usage: $usage"\"
818 func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` 1926 echo
819} # func_split_long_opt may be replaced by extended shell implementation 1927 $SED -n 's|^# ||
1928 /^Written by/{
1929 x;p;x
1930 }
1931 h
1932 /^Written by/q' < "$progpath"
1933 echo
1934 eval \$ECHO \""$usage_message"\"
1935}
820 1936
821exit_cmd=:
822 1937
1938# func_version
1939# ------------
1940# Echo version message to standard output and exit.
1941func_version ()
1942{
1943 $debug_cmd
823 1944
1945 printf '%s\n' "$progname $scriptversion"
1946 $SED -n '
1947 /(C)/!b go
1948 :more
1949 /\./!{
1950 N
1951 s|\n# | |
1952 b more
1953 }
1954 :go
1955 /^# Written by /,/# warranty; / {
1956 s|^# ||
1957 s|^# *$||
1958 s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
1959 p
1960 }
1961 /^# Written by / {
1962 s|^# ||
1963 p
1964 }
1965 /^warranty; /q' < "$progpath"
824 1966
1967 exit $?
1968}
825 1969
826 1970
827magic="%%%MAGIC variable%%%" 1971# Local variables:
828magic_exe="%%%MAGIC EXE variable%%%" 1972# mode: shell-script
1973# sh-indentation: 2
1974# eval: (add-hook 'before-save-hook 'time-stamp)
1975# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1976# time-stamp-time-zone: "UTC"
1977# End:
829 1978
830# Global variables. 1979# Set a version string.
831nonopt= 1980scriptversion='(GNU libtool) 2.4.6'
832preserve_args=
833lo2o="s/\\.lo\$/.${objext}/"
834o2lo="s/\\.${objext}\$/.lo/"
835extracted_archives=
836extracted_serial=0
837 1981
838# If this variable is set in any of the actions, the command in it
839# will be execed at the end. This prevents here-documents from being
840# left over by shells.
841exec_cmd=
842 1982
843# func_append var value 1983# func_echo ARG...
844# Append VALUE to the end of shell variable VAR. 1984# ----------------
845func_append () 1985# Libtool also displays the current mode in messages, so override
1986# funclib.sh func_echo with this custom definition.
1987func_echo ()
846{ 1988{
847 eval "${1}=\$${1}\${2}" 1989 $debug_cmd
848} # func_append may be replaced by extended shell implementation
849 1990
850# func_append_quoted var value 1991 _G_message=$*
851# Quote VALUE and append to the end of shell variable VAR, separated 1992
852# by a space. 1993 func_echo_IFS=$IFS
853func_append_quoted () 1994 IFS=$nl
854{ 1995 for _G_line in $_G_message; do
855 func_quote_for_eval "${2}" 1996 IFS=$func_echo_IFS
856 eval "${1}=\$${1}\\ \$func_quote_for_eval_result" 1997 $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
857} # func_append_quoted may be replaced by extended shell implementation 1998 done
1999 IFS=$func_echo_IFS
2000}
858 2001
859 2002
860# func_arith arithmetic-term... 2003# func_warning ARG...
861func_arith () 2004# -------------------
2005# Libtool warnings are not categorized, so override funclib.sh
2006# func_warning with this simpler definition.
2007func_warning ()
862{ 2008{
863 func_arith_result=`expr "${@}"` 2009 $debug_cmd
864} # func_arith may be replaced by extended shell implementation
865 2010
2011 $warning_func ${1+"$@"}
2012}
866 2013
867# func_len string
868# STRING may not start with a hyphen.
869func_len ()
870{
871 func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
872} # func_len may be replaced by extended shell implementation
873 2014
2015## ---------------- ##
2016## Options parsing. ##
2017## ---------------- ##
2018
2019# Hook in the functions to make sure our own options are parsed during
2020# the option parsing loop.
2021
2022usage='$progpath [OPTION]... [MODE-ARG]...'
2023
2024# Short help message in response to '-h'.
2025usage_message="Options:
2026 --config show all configuration variables
2027 --debug enable verbose shell tracing
2028 -n, --dry-run display commands without modifying any files
2029 --features display basic configuration information and exit
2030 --mode=MODE use operation mode MODE
2031 --no-warnings equivalent to '-Wnone'
2032 --preserve-dup-deps don't remove duplicate dependency libraries
2033 --quiet, --silent don't print informational messages
2034 --tag=TAG use configuration variables from tag TAG
2035 -v, --verbose print more informational messages than default
2036 --version print version information
2037 -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
2038 -h, --help, --help-all print short, long, or detailed help message
2039"
874 2040
875# func_lo2o object 2041# Additional text appended to 'usage_message' in response to '--help'.
876func_lo2o () 2042func_help ()
877{ 2043{
878 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` 2044 $debug_cmd
879} # func_lo2o may be replaced by extended shell implementation 2045
2046 func_usage_message
2047 $ECHO "$long_help_message
2048
2049MODE must be one of the following:
2050
2051 clean remove files from the build directory
2052 compile compile a source file into a libtool object
2053 execute automatically set library path, then run a program
2054 finish complete the installation of libtool libraries
2055 install install libraries or executables
2056 link create a library or an executable
2057 uninstall remove libraries from an installed directory
2058
2059MODE-ARGS vary depending on the MODE. When passed as first option,
2060'--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
2061Try '$progname --help --mode=MODE' for a more detailed description of MODE.
2062
2063When reporting a bug, please describe a test case to reproduce it and
2064include the following information:
2065
2066 host-triplet: $host
2067 shell: $SHELL
2068 compiler: $LTCC
2069 compiler flags: $LTCFLAGS
2070 linker: $LD (gnu? $with_gnu_ld)
2071 version: $progname (GNU libtool) 2.4.6
2072 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
2073 autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
2074
2075Report bugs to <bug-libtool@gnu.org>.
2076GNU libtool home page: <http://www.gnu.org/software/libtool/>.
2077General help using GNU software: <http://www.gnu.org/gethelp/>."
2078 exit 0
2079}
880 2080
881 2081
882# func_xform libobj-or-source 2082# func_lo2o OBJECT-NAME
883func_xform () 2083# ---------------------
884{ 2084# Transform OBJECT-NAME from a '.lo' suffix to the platform specific
885 func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` 2085# object suffix.
886} # func_xform may be replaced by extended shell implementation 2086
2087lo2o=s/\\.lo\$/.$objext/
2088o2lo=s/\\.$objext\$/.lo/
2089
2090if test yes = "$_G_HAVE_XSI_OPS"; then
2091 eval 'func_lo2o ()
2092 {
2093 case $1 in
2094 *.lo) func_lo2o_result=${1%.lo}.$objext ;;
2095 * ) func_lo2o_result=$1 ;;
2096 esac
2097 }'
2098
2099 # func_xform LIBOBJ-OR-SOURCE
2100 # ---------------------------
2101 # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
2102 # suffix to a '.lo' libtool-object suffix.
2103 eval 'func_xform ()
2104 {
2105 func_xform_result=${1%.*}.lo
2106 }'
2107else
2108 # ...otherwise fall back to using sed.
2109 func_lo2o ()
2110 {
2111 func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
2112 }
2113
2114 func_xform ()
2115 {
2116 func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
2117 }
2118fi
887 2119
888 2120
889# func_fatal_configuration arg... 2121# func_fatal_configuration ARG...
2122# -------------------------------
890# Echo program name prefixed message to standard error, followed by 2123# Echo program name prefixed message to standard error, followed by
891# a configuration failure hint, and exit. 2124# a configuration failure hint, and exit.
892func_fatal_configuration () 2125func_fatal_configuration ()
893{ 2126{
894 func_error ${1+"$@"} 2127 func__fatal_error ${1+"$@"} \
895 func_error "See the $PACKAGE documentation for more information." 2128 "See the $PACKAGE documentation for more information." \
896 func_fatal_error "Fatal configuration error." 2129 "Fatal configuration error."
897} 2130}
898 2131
899 2132
900# func_config 2133# func_config
2134# -----------
901# Display the configuration for all the tags in this script. 2135# Display the configuration for all the tags in this script.
902func_config () 2136func_config ()
903{ 2137{
@@ -915,17 +2149,19 @@ func_config ()
915 exit $? 2149 exit $?
916} 2150}
917 2151
2152
918# func_features 2153# func_features
2154# -------------
919# Display the features supported by this script. 2155# Display the features supported by this script.
920func_features () 2156func_features ()
921{ 2157{
922 echo "host: $host" 2158 echo "host: $host"
923 if test "$build_libtool_libs" = yes; then 2159 if test yes = "$build_libtool_libs"; then
924 echo "enable shared libraries" 2160 echo "enable shared libraries"
925 else 2161 else
926 echo "disable shared libraries" 2162 echo "disable shared libraries"
927 fi 2163 fi
928 if test "$build_old_libs" = yes; then 2164 if test yes = "$build_old_libs"; then
929 echo "enable static libraries" 2165 echo "enable static libraries"
930 else 2166 else
931 echo "disable static libraries" 2167 echo "disable static libraries"
@@ -934,289 +2170,297 @@ func_features ()
934 exit $? 2170 exit $?
935} 2171}
936 2172
937# func_enable_tag tagname 2173
2174# func_enable_tag TAGNAME
2175# -----------------------
938# Verify that TAGNAME is valid, and either flag an error and exit, or 2176# Verify that TAGNAME is valid, and either flag an error and exit, or
939# enable the TAGNAME tag. We also add TAGNAME to the global $taglist 2177# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
940# variable here. 2178# variable here.
941func_enable_tag () 2179func_enable_tag ()
942{ 2180{
943 # Global variable: 2181 # Global variable:
944 tagname="$1" 2182 tagname=$1
945 2183
946 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" 2184 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
947 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" 2185 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
948 sed_extractcf="/$re_begincf/,/$re_endcf/p" 2186 sed_extractcf=/$re_begincf/,/$re_endcf/p
949 2187
950 # Validate tagname. 2188 # Validate tagname.
951 case $tagname in 2189 case $tagname in
952 *[!-_A-Za-z0-9,/]*) 2190 *[!-_A-Za-z0-9,/]*)
953 func_fatal_error "invalid tag name: $tagname" 2191 func_fatal_error "invalid tag name: $tagname"
954 ;; 2192 ;;
955 esac 2193 esac
956 2194
957 # Don't test for the "default" C tag, as we know it's 2195 # Don't test for the "default" C tag, as we know it's
958 # there but not specially marked. 2196 # there but not specially marked.
959 case $tagname in 2197 case $tagname in
960 CC) ;; 2198 CC) ;;
961 *) 2199 *)
962 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then 2200 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
963 taglist="$taglist $tagname" 2201 taglist="$taglist $tagname"
964 2202
965 # Evaluate the configuration. Be careful to quote the path 2203 # Evaluate the configuration. Be careful to quote the path
966 # and the sed script, to avoid splitting on whitespace, but 2204 # and the sed script, to avoid splitting on whitespace, but
967 # also don't use non-portable quotes within backquotes within 2205 # also don't use non-portable quotes within backquotes within
968 # quotes we have to do it in 2 steps: 2206 # quotes we have to do it in 2 steps:
969 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` 2207 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
970 eval "$extractedcf" 2208 eval "$extractedcf"
971 else 2209 else
972 func_error "ignoring unknown tag $tagname" 2210 func_error "ignoring unknown tag $tagname"
973 fi 2211 fi
974 ;; 2212 ;;
975 esac 2213 esac
976} 2214}
977 2215
2216
978# func_check_version_match 2217# func_check_version_match
2218# ------------------------
979# Ensure that we are using m4 macros, and libtool script from the same 2219# Ensure that we are using m4 macros, and libtool script from the same
980# release of libtool. 2220# release of libtool.
981func_check_version_match () 2221func_check_version_match ()
982{ 2222{
983 if test "$package_revision" != "$macro_revision"; then 2223 if test "$package_revision" != "$macro_revision"; then
984 if test "$VERSION" != "$macro_version"; then 2224 if test "$VERSION" != "$macro_version"; then
985 if test -z "$macro_version"; then 2225 if test -z "$macro_version"; then
986 cat >&2 <<_LT_EOF 2226 cat >&2 <<_LT_EOF
987$progname: Version mismatch error. This is $PACKAGE $VERSION, but the 2227$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
988$progname: definition of this LT_INIT comes from an older release. 2228$progname: definition of this LT_INIT comes from an older release.
989$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION 2229$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
990$progname: and run autoconf again.