Codebase list daisy-player / e049bda
New upstream version 10.6 Paul Gevers 6 years ago
191 changed file(s) with 52724 addition(s) and 14074 deletion(s). Raw diff Collapse all Expand all
0 AUTOMAKE_OPTIONS = foreign
1 SUBDIRS = man doc po src
0 AUTOMAKE_OPTIONS = foreign
1 SUBDIRS = man doc po src
22
33 ACLOCAL_AMFLAGS = -I m4
44
66 doc/Changelog doc/License doc/Readme doc/daisy-player.* \
77 man/daisy-player.1 icons/daisy-player.svg \
88 icons/48x48/daisy-player.png icons/72x72/daisy-player.png \
9 ltmain.sh
10
9 ltmain.sh \
10 src/madplay/ABOUT-NLS src/madplay/aclocal.m4 src/madplay/am \
11 src/madplay/ar-lib src/madplay/CHANGES src/madplay/compile \
12 src/madplay/config.guess src/madplay/config.h \
13 src/madplay/config.h.in src/madplay/config.status \
14 src/madplay/config.sub src/madplay/configure \
15 src/madplay/configure.ac src/madplay/configure.scan \
16 src/madplay/COPYING src/madplay/COPYRIGHT src/madplay/CREDITS \
17 src/madplay/depcomp src/madplay/INSTALL src/madplay/install-sh \
18 src/madplay/.libs src/madplay/m4 src/madplay/m4/ChangeLog \
19 src/madplay/m4/codeset.m4 src/madplay/m4/gettext.m4 \
20 src/madplay/m4/glibc21.m4 src/madplay/m4/iconv.m4 \
21 src/madplay/m4/intdiv0.m4 src/madplay/m4/intmax.m4 \
22 src/madplay/m4/inttypes_h.m4 src/madplay/m4/inttypes.m4 \
23 src/madplay/m4/inttypes-pri.m4 src/madplay/m4/isc-posix.m4 \
24 src/madplay/m4/lcmessage.m4 src/madplay/m4/lib-ld.m4 \
25 src/madplay/m4/lib-link.m4 src/madplay/m4/lib-prefix.m4 \
26 src/madplay/m4/longdouble.m4 src/madplay/m4/longlong.m4 \
27 src/madplay/m4/Makefile.am src/madplay/m4/Makefile.in \
28 src/madplay/m4/nls.m4 src/madplay/m4/po.m4 \
29 src/madplay/m4/printf-posix.m4 src/madplay/m4/progtest.m4 \
30 src/madplay/m4/signed.m4 src/madplay/m4/size_max.m4 \
31 src/madplay/m4/stdint_h.m4 src/madplay/m4/uintmax_t.m4 \
32 src/madplay/m4/ulonglong.m4 src/madplay/m4/wchar_t.m4 \
33 src/madplay/m4/wint_t.m4 src/madplay/m4/xsize.m4 \
34 src/madplay/madtest.c \
35 src/madplay/Makefile.am src/madplay/Makefile.in \
36 src/madplay/mdate-sh src/madplay/missing \
37 src/madplay/mkinstalldirs src/madplay/py-compile \
38 src/madplay/README src/madplay/stamp-h1 \
39 src/madplay/tap-driver.sh src/madplay/test-driver \
40 src/madplay/texinfo.tex src/madplay/TODO src/madplay/VERSION \
41 src/madplay/ylwrap
1142
1243 check-gettext:
1344 @if test x$(USE_NLS) != "xyes" ; then \
8888 host_triplet = @host@
8989 subdir = .
9090 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
91 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
92 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
93 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
94 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
95 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
96 $(top_srcdir)/configure.ac
91 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
9792 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
9893 $(ACLOCAL_M4)
9994 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
165160 $(top_srcdir)/m4/Makefile.in ABOUT-NLS COPYING ChangeLog \
166161 INSTALL ar-lib compile config.guess config.rpath config.sub \
167162 depcomp install-sh ltmain.sh mdate-sh missing mkinstalldirs \
168 py-compile texinfo.tex ylwrap
163 py-compile ylwrap
169164 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
170165 distdir = $(PACKAGE)-$(VERSION)
171166 top_distdir = $(distdir)
209204 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
210205 distcleancheck_listfiles = find . -type f -print
211206 ACLOCAL = @ACLOCAL@
207 ALLOCA = @ALLOCA@
212208 AMTAR = @AMTAR@
213209 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
214210 AUTOCONF = @AUTOCONF@
289285 XGETTEXT = @XGETTEXT@
290286 XGETTEXT_015 = @XGETTEXT_015@
291287 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
288 YACC = @YACC@
289 YFLAGS = @YFLAGS@
292290 abs_builddir = @abs_builddir@
293291 abs_srcdir = @abs_srcdir@
294292 abs_top_builddir = @abs_top_builddir@
312310 builddir = @builddir@
313311 datadir = @datadir@
314312 datarootdir = @datarootdir@
313 depend_audio = @depend_audio@
315314 docdir = @docdir@
316315 dvidir = @dvidir@
317316 exec_prefix = @exec_prefix@
324323 includedir = @includedir@
325324 infodir = @infodir@
326325 install_sh = @install_sh@
326 ldadd_audio = @ldadd_audio@
327327 libdir = @libdir@
328328 libexecdir = @libexecdir@
329329 localedir = @localedir@
344344 top_build_prefix = @top_build_prefix@
345345 top_builddir = @top_builddir@
346346 top_srcdir = @top_srcdir@
347 AUTOMAKE_OPTIONS = foreign
348 SUBDIRS = man doc po src
347 AUTOMAKE_OPTIONS = foreign
348 SUBDIRS = man doc po src
349349 ACLOCAL_AMFLAGS = -I m4
350350 EXTRA_DIST = config.rpath m4/Makefile.in src/gettext.h doc/COMPILE \
351351 doc/Changelog doc/License doc/Readme doc/daisy-player.* \
352352 man/daisy-player.1 icons/daisy-player.svg \
353353 icons/48x48/daisy-player.png icons/72x72/daisy-player.png \
354 ltmain.sh
354 ltmain.sh \
355 src/madplay/ABOUT-NLS src/madplay/aclocal.m4 src/madplay/am \
356 src/madplay/ar-lib src/madplay/CHANGES src/madplay/compile \
357 src/madplay/config.guess src/madplay/config.h \
358 src/madplay/config.h.in src/madplay/config.status \
359 src/madplay/config.sub src/madplay/configure \
360 src/madplay/configure.ac src/madplay/configure.scan \
361 src/madplay/COPYING src/madplay/COPYRIGHT src/madplay/CREDITS \
362 src/madplay/depcomp src/madplay/INSTALL src/madplay/install-sh \
363 src/madplay/.libs src/madplay/m4 src/madplay/m4/ChangeLog \
364 src/madplay/m4/codeset.m4 src/madplay/m4/gettext.m4 \
365 src/madplay/m4/glibc21.m4 src/madplay/m4/iconv.m4 \
366 src/madplay/m4/intdiv0.m4 src/madplay/m4/intmax.m4 \
367 src/madplay/m4/inttypes_h.m4 src/madplay/m4/inttypes.m4 \
368 src/madplay/m4/inttypes-pri.m4 src/madplay/m4/isc-posix.m4 \
369 src/madplay/m4/lcmessage.m4 src/madplay/m4/lib-ld.m4 \
370 src/madplay/m4/lib-link.m4 src/madplay/m4/lib-prefix.m4 \
371 src/madplay/m4/longdouble.m4 src/madplay/m4/longlong.m4 \
372 src/madplay/m4/Makefile.am src/madplay/m4/Makefile.in \
373 src/madplay/m4/nls.m4 src/madplay/m4/po.m4 \
374 src/madplay/m4/printf-posix.m4 src/madplay/m4/progtest.m4 \
375 src/madplay/m4/signed.m4 src/madplay/m4/size_max.m4 \
376 src/madplay/m4/stdint_h.m4 src/madplay/m4/uintmax_t.m4 \
377 src/madplay/m4/ulonglong.m4 src/madplay/m4/wchar_t.m4 \
378 src/madplay/m4/wint_t.m4 src/madplay/m4/xsize.m4 \
379 src/madplay/madtest.c \
380 src/madplay/Makefile.am src/madplay/Makefile.in \
381 src/madplay/mdate-sh src/madplay/missing \
382 src/madplay/mkinstalldirs src/madplay/py-compile \
383 src/madplay/README src/madplay/stamp-h1 \
384 src/madplay/tap-driver.sh src/madplay/test-driver \
385 src/madplay/texinfo.tex src/madplay/TODO src/madplay/VERSION \
386 src/madplay/ylwrap
355387
356388 all: config.h
357389 $(MAKE) $(AM_MAKEFLAGS) all-recursive
1818 You have another version of autoconf. It may work, but is not guaranteed to.
1919 If you have problems, you may need to regenerate the build system entirely.
2020 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
21
22 # gettext.m4 serial 68 (gettext-0.19.8)
23 dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
24 dnl This file is free software; the Free Software Foundation
25 dnl gives unlimited permission to copy and/or distribute it,
26 dnl with or without modifications, as long as this notice is preserved.
27 dnl
28 dnl This file can be used in projects which are not available under
29 dnl the GNU General Public License or the GNU Library General Public
30 dnl License but which still want to provide support for the GNU gettext
31 dnl functionality.
32 dnl Please note that the actual code of the GNU gettext library is covered
33 dnl by the GNU Library General Public License, and the rest of the GNU
34 dnl gettext package is covered by the GNU General Public License.
35 dnl They are *not* in the public domain.
36
37 dnl Authors:
38 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
39 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
40
41 dnl Macro to add for using GNU gettext.
42
43 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
44 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
45 dnl default (if it is not specified or empty) is 'no-libtool'.
46 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
47 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
48 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
49 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
50 dnl depending on --{enable,disable}-{shared,static} and on the presence of
51 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
52 dnl $(top_builddir)/intl/libintl.a will be created.
53 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
54 dnl implementations (in libc or libintl) without the ngettext() function
55 dnl will be ignored. If NEEDSYMBOL is specified and is
56 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
57 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
58 dnl INTLDIR is used to find the intl libraries. If empty,
59 dnl the value '$(top_builddir)/intl/' is used.
60 dnl
61 dnl The result of the configuration is one of three cases:
62 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
63 dnl and used.
64 dnl Catalog format: GNU --> install in $(datadir)
65 dnl Catalog extension: .mo after installation, .gmo in source tree
66 dnl 2) GNU gettext has been found in the system's C library.
67 dnl Catalog format: GNU --> install in $(datadir)
68 dnl Catalog extension: .mo after installation, .gmo in source tree
69 dnl 3) No internationalization, always use English msgid.
70 dnl Catalog format: none
71 dnl Catalog extension: none
72 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
73 dnl The use of .gmo is historical (it was needed to avoid overwriting the
74 dnl GNU format catalogs when building on a platform with an X/Open gettext),
75 dnl but we keep it in order not to force irrelevant filename changes on the
76 dnl maintainers.
77 dnl
78 AC_DEFUN([AM_GNU_GETTEXT],
79 [
80 dnl Argument checking.
81 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
82 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
83 ])])])])])
84 ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
85 [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
86 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
87 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
88 ])])])])
89 define([gt_included_intl],
90 ifelse([$1], [external],
91 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
92 [yes]))
93 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
94 gt_NEEDS_INIT
95 AM_GNU_GETTEXT_NEED([$2])
96
97 AC_REQUIRE([AM_PO_SUBDIRS])dnl
98 ifelse(gt_included_intl, yes, [
99 AC_REQUIRE([AM_INTL_SUBDIR])dnl
100 ])
101
102 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
103 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
104 AC_REQUIRE([AC_LIB_RPATH])
105
106 dnl Sometimes libintl requires libiconv, so first search for libiconv.
107 dnl Ideally we would do this search only after the
108 dnl if test "$USE_NLS" = "yes"; then
109 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
110 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
111 dnl the configure script would need to contain the same shell code
112 dnl again, outside any 'if'. There are two solutions:
113 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
114 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
115 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
116 dnl documented, we avoid it.
117 ifelse(gt_included_intl, yes, , [
118 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
119 ])
120
121 dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
122 gt_INTL_MACOSX
123
124 dnl Set USE_NLS.
125 AC_REQUIRE([AM_NLS])
126
127 ifelse(gt_included_intl, yes, [
128 BUILD_INCLUDED_LIBINTL=no
129 USE_INCLUDED_LIBINTL=no
130 ])
131 LIBINTL=
132 LTLIBINTL=
133 POSUB=
134
135 dnl Add a version number to the cache macros.
136 case " $gt_needs " in
137 *" need-formatstring-macros "*) gt_api_version=3 ;;
138 *" need-ngettext "*) gt_api_version=2 ;;
139 *) gt_api_version=1 ;;
140 esac
141 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
142 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
143
144 dnl If we use NLS figure out what method
145 if test "$USE_NLS" = "yes"; then
146 gt_use_preinstalled_gnugettext=no
147 ifelse(gt_included_intl, yes, [
148 AC_MSG_CHECKING([whether included gettext is requested])
149 AC_ARG_WITH([included-gettext],
150 [ --with-included-gettext use the GNU gettext library included here],
151 nls_cv_force_use_gnu_gettext=$withval,
152 nls_cv_force_use_gnu_gettext=no)
153 AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
154
155 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
156 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
157 ])
158 dnl User does not insist on using GNU NLS library. Figure out what
159 dnl to use. If GNU gettext is available we use this. Else we have
160 dnl to fall back to GNU NLS library.
161
162 if test $gt_api_version -ge 3; then
163 gt_revision_test_code='
164 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
165 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
166 #endif
167 changequote(,)dnl
168 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
169 changequote([,])dnl
170 '
171 else
172 gt_revision_test_code=
173 fi
174 if test $gt_api_version -ge 2; then
175 gt_expression_test_code=' + * ngettext ("", "", 0)'
176 else
177 gt_expression_test_code=
178 fi
179
180 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
181 [AC_LINK_IFELSE(
182 [AC_LANG_PROGRAM(
183 [[
184 #include <libintl.h>
185 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
186 extern int _nl_msg_cat_cntr;
187 extern int *_nl_domain_bindings;
188 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
189 #else
190 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
191 #endif
192 $gt_revision_test_code
193 ]],
194 [[
195 bindtextdomain ("", "");
196 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
197 ]])],
198 [eval "$gt_func_gnugettext_libc=yes"],
199 [eval "$gt_func_gnugettext_libc=no"])])
200
201 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
202 dnl Sometimes libintl requires libiconv, so first search for libiconv.
203 ifelse(gt_included_intl, yes, , [
204 AM_ICONV_LINK
205 ])
206 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
207 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
208 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
209 dnl even if libiconv doesn't exist.
210 AC_LIB_LINKFLAGS_BODY([intl])
211 AC_CACHE_CHECK([for GNU gettext in libintl],
212 [$gt_func_gnugettext_libintl],
213 [gt_save_CPPFLAGS="$CPPFLAGS"
214 CPPFLAGS="$CPPFLAGS $INCINTL"
215 gt_save_LIBS="$LIBS"
216 LIBS="$LIBS $LIBINTL"
217 dnl Now see whether libintl exists and does not depend on libiconv.
218 AC_LINK_IFELSE(
219 [AC_LANG_PROGRAM(
220 [[
221 #include <libintl.h>
222 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
223 extern int _nl_msg_cat_cntr;
224 extern
225 #ifdef __cplusplus
226 "C"
227 #endif
228 const char *_nl_expand_alias (const char *);
229 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
230 #else
231 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
232 #endif
233 $gt_revision_test_code
234 ]],
235 [[
236 bindtextdomain ("", "");
237 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
238 ]])],
239 [eval "$gt_func_gnugettext_libintl=yes"],
240 [eval "$gt_func_gnugettext_libintl=no"])
241 dnl Now see whether libintl exists and depends on libiconv.
242 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
243 LIBS="$LIBS $LIBICONV"
244 AC_LINK_IFELSE(
245 [AC_LANG_PROGRAM(
246 [[
247 #include <libintl.h>
248 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
249 extern int _nl_msg_cat_cntr;
250 extern
251 #ifdef __cplusplus
252 "C"
253 #endif
254 const char *_nl_expand_alias (const char *);
255 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
256 #else
257 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
258 #endif
259 $gt_revision_test_code
260 ]],
261 [[
262 bindtextdomain ("", "");
263 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
264 ]])],
265 [LIBINTL="$LIBINTL $LIBICONV"
266 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
267 eval "$gt_func_gnugettext_libintl=yes"
268 ])
269 fi
270 CPPFLAGS="$gt_save_CPPFLAGS"
271 LIBS="$gt_save_LIBS"])
272 fi
273
274 dnl If an already present or preinstalled GNU gettext() is found,
275 dnl use it. But if this macro is used in GNU gettext, and GNU
276 dnl gettext is already preinstalled in libintl, we update this
277 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
278 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
279 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
280 && test "$PACKAGE" != gettext-runtime \
281 && test "$PACKAGE" != gettext-tools; }; then
282 gt_use_preinstalled_gnugettext=yes
283 else
284 dnl Reset the values set by searching for libintl.
285 LIBINTL=
286 LTLIBINTL=
287 INCINTL=
288 fi
289
290 ifelse(gt_included_intl, yes, [
291 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
292 dnl GNU gettext is not found in the C library.
293 dnl Fall back on included GNU gettext library.
294 nls_cv_use_gnu_gettext=yes
295 fi
296 fi
297
298 if test "$nls_cv_use_gnu_gettext" = "yes"; then
299 dnl Mark actions used to generate GNU NLS library.
300 BUILD_INCLUDED_LIBINTL=yes
301 USE_INCLUDED_LIBINTL=yes
302 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
303 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
304 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
305 fi
306
307 CATOBJEXT=
308 if test "$gt_use_preinstalled_gnugettext" = "yes" \
309 || test "$nls_cv_use_gnu_gettext" = "yes"; then
310 dnl Mark actions to use GNU gettext tools.
311 CATOBJEXT=.gmo
312 fi
313 ])
314
315 if test -n "$INTL_MACOSX_LIBS"; then
316 if test "$gt_use_preinstalled_gnugettext" = "yes" \
317 || test "$nls_cv_use_gnu_gettext" = "yes"; then
318 dnl Some extra flags are needed during linking.
319 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
320 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
321 fi
322 fi
323
324 if test "$gt_use_preinstalled_gnugettext" = "yes" \
325 || test "$nls_cv_use_gnu_gettext" = "yes"; then
326 AC_DEFINE([ENABLE_NLS], [1],
327 [Define to 1 if translation of program messages to the user's native language
328 is requested.])
329 else
330 USE_NLS=no
331 fi
332 fi
333
334 AC_MSG_CHECKING([whether to use NLS])
335 AC_MSG_RESULT([$USE_NLS])
336 if test "$USE_NLS" = "yes"; then
337 AC_MSG_CHECKING([where the gettext function comes from])
338 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
339 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
340 gt_source="external libintl"
341 else
342 gt_source="libc"
343 fi
344 else
345 gt_source="included intl directory"
346 fi
347 AC_MSG_RESULT([$gt_source])
348 fi
349
350 if test "$USE_NLS" = "yes"; then
351
352 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
353 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
354 AC_MSG_CHECKING([how to link with libintl])
355 AC_MSG_RESULT([$LIBINTL])
356 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
357 fi
358
359 dnl For backward compatibility. Some packages may be using this.
360 AC_DEFINE([HAVE_GETTEXT], [1],
361 [Define if the GNU gettext() function is already present or preinstalled.])
362 AC_DEFINE([HAVE_DCGETTEXT], [1],
363 [Define if the GNU dcgettext() function is already present or preinstalled.])
364 fi
365
366 dnl We need to process the po/ directory.
367 POSUB=po
368 fi
369
370 ifelse(gt_included_intl, yes, [
371 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
372 dnl to 'yes' because some of the testsuite requires it.
373 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
374 BUILD_INCLUDED_LIBINTL=yes
375 fi
376
377 dnl Make all variables we use known to autoconf.
378 AC_SUBST([BUILD_INCLUDED_LIBINTL])
379 AC_SUBST([USE_INCLUDED_LIBINTL])
380 AC_SUBST([CATOBJEXT])
381
382 dnl For backward compatibility. Some configure.ins may be using this.
383 nls_cv_header_intl=
384 nls_cv_header_libgt=
385
386 dnl For backward compatibility. Some Makefiles may be using this.
387 DATADIRNAME=share
388 AC_SUBST([DATADIRNAME])
389
390 dnl For backward compatibility. Some Makefiles may be using this.
391 INSTOBJEXT=.mo
392 AC_SUBST([INSTOBJEXT])
393
394 dnl For backward compatibility. Some Makefiles may be using this.
395 GENCAT=gencat
396 AC_SUBST([GENCAT])
397
398 dnl For backward compatibility. Some Makefiles may be using this.
399 INTLOBJS=
400 if test "$USE_INCLUDED_LIBINTL" = yes; then
401 INTLOBJS="\$(GETTOBJS)"
402 fi
403 AC_SUBST([INTLOBJS])
404
405 dnl Enable libtool support if the surrounding package wishes it.
406 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
407 AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
408 ])
409
410 dnl For backward compatibility. Some Makefiles may be using this.
411 INTLLIBS="$LIBINTL"
412 AC_SUBST([INTLLIBS])
413
414 dnl Make all documented variables known to autoconf.
415 AC_SUBST([LIBINTL])
416 AC_SUBST([LTLIBINTL])
417 AC_SUBST([POSUB])
418 ])
419
420
421 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
422 m4_define([gt_NEEDS_INIT],
423 [
424 m4_divert_text([DEFAULTS], [gt_needs=])
425 m4_define([gt_NEEDS_INIT], [])
426 ])
427
428
429 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
430 AC_DEFUN([AM_GNU_GETTEXT_NEED],
431 [
432 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
433 ])
434
435
436 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
437 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
438
439
440 dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
441 AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
442
443 # iconv.m4 serial 19 (gettext-0.18.2)
444 dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc.
445 dnl This file is free software; the Free Software Foundation
446 dnl gives unlimited permission to copy and/or distribute it,
447 dnl with or without modifications, as long as this notice is preserved.
448
449 dnl From Bruno Haible.
450
451 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
452 [
453 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
454 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
455 AC_REQUIRE([AC_LIB_RPATH])
456
457 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
458 dnl accordingly.
459 AC_LIB_LINKFLAGS_BODY([iconv])
460 ])
461
462 AC_DEFUN([AM_ICONV_LINK],
463 [
464 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
465 dnl those with the standalone portable GNU libiconv installed).
466 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
467
468 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
469 dnl accordingly.
470 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
471
472 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
473 dnl because if the user has installed libiconv and not disabled its use
474 dnl via --without-libiconv-prefix, he wants to use it. The first
475 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
476 am_save_CPPFLAGS="$CPPFLAGS"
477 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
478
479 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
480 am_cv_func_iconv="no, consider installing GNU libiconv"
481 am_cv_lib_iconv=no
482 AC_LINK_IFELSE(
483 [AC_LANG_PROGRAM(
484 [[
485 #include <stdlib.h>
486 #include <iconv.h>
487 ]],
488 [[iconv_t cd = iconv_open("","");
489 iconv(cd,NULL,NULL,NULL,NULL);
490 iconv_close(cd);]])],
491 [am_cv_func_iconv=yes])
492 if test "$am_cv_func_iconv" != yes; then
493 am_save_LIBS="$LIBS"
494 LIBS="$LIBS $LIBICONV"
495 AC_LINK_IFELSE(
496 [AC_LANG_PROGRAM(
497 [[
498 #include <stdlib.h>
499 #include <iconv.h>
500 ]],
501 [[iconv_t cd = iconv_open("","");
502 iconv(cd,NULL,NULL,NULL,NULL);
503 iconv_close(cd);]])],
504 [am_cv_lib_iconv=yes]
505 [am_cv_func_iconv=yes])
506 LIBS="$am_save_LIBS"
507 fi
508 ])
509 if test "$am_cv_func_iconv" = yes; then
510 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
511 dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
512 dnl Solaris 10.
513 am_save_LIBS="$LIBS"
514 if test $am_cv_lib_iconv = yes; then
515 LIBS="$LIBS $LIBICONV"
516 fi
517 am_cv_func_iconv_works=no
518 for ac_iconv_const in '' 'const'; do
519 AC_RUN_IFELSE(
520 [AC_LANG_PROGRAM(
521 [[
522 #include <iconv.h>
523 #include <string.h>
524
525 #ifndef ICONV_CONST
526 # define ICONV_CONST $ac_iconv_const
527 #endif
528 ]],
529 [[int result = 0;
530 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
531 returns. */
532 {
533 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
534 if (cd_utf8_to_88591 != (iconv_t)(-1))
535 {
536 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
537 char buf[10];
538 ICONV_CONST char *inptr = input;
539 size_t inbytesleft = strlen (input);
540 char *outptr = buf;
541 size_t outbytesleft = sizeof (buf);
542 size_t res = iconv (cd_utf8_to_88591,
543 &inptr, &inbytesleft,
544 &outptr, &outbytesleft);
545 if (res == 0)
546 result |= 1;
547 iconv_close (cd_utf8_to_88591);
548 }
549 }
550 /* Test against Solaris 10 bug: Failures are not distinguishable from
551 successful returns. */
552 {
553 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
554 if (cd_ascii_to_88591 != (iconv_t)(-1))
555 {
556 static ICONV_CONST char input[] = "\263";
557 char buf[10];
558 ICONV_CONST char *inptr = input;
559 size_t inbytesleft = strlen (input);
560 char *outptr = buf;
561 size_t outbytesleft = sizeof (buf);
562 size_t res = iconv (cd_ascii_to_88591,
563 &inptr, &inbytesleft,
564 &outptr, &outbytesleft);
565 if (res == 0)
566 result |= 2;
567 iconv_close (cd_ascii_to_88591);
568 }
569 }
570 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
571 {
572 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
573 if (cd_88591_to_utf8 != (iconv_t)(-1))
574 {
575 static ICONV_CONST char input[] = "\304";
576 static char buf[2] = { (char)0xDE, (char)0xAD };
577 ICONV_CONST char *inptr = input;
578 size_t inbytesleft = 1;
579 char *outptr = buf;
580 size_t outbytesleft = 1;
581 size_t res = iconv (cd_88591_to_utf8,
582 &inptr, &inbytesleft,
583 &outptr, &outbytesleft);
584 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
585 result |= 4;
586 iconv_close (cd_88591_to_utf8);
587 }
588 }
589 #if 0 /* This bug could be worked around by the caller. */
590 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
591 {
592 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
593 if (cd_88591_to_utf8 != (iconv_t)(-1))
594 {
595 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
596 char buf[50];
597 ICONV_CONST char *inptr = input;
598 size_t inbytesleft = strlen (input);
599 char *outptr = buf;
600 size_t outbytesleft = sizeof (buf);
601 size_t res = iconv (cd_88591_to_utf8,
602 &inptr, &inbytesleft,
603 &outptr, &outbytesleft);
604 if ((int)res > 0)
605 result |= 8;
606 iconv_close (cd_88591_to_utf8);
607 }
608 }
609 #endif
610 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
611 provided. */
612 if (/* Try standardized names. */
613 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
614 /* Try IRIX, OSF/1 names. */
615 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
616 /* Try AIX names. */
617 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
618 /* Try HP-UX names. */
619 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
620 result |= 16;
621 return result;
622 ]])],
623 [am_cv_func_iconv_works=yes], ,
624 [case "$host_os" in
625 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
626 *) am_cv_func_iconv_works="guessing yes" ;;
627 esac])
628 test "$am_cv_func_iconv_works" = no || break
629 done
630 LIBS="$am_save_LIBS"
631 ])
632 case "$am_cv_func_iconv_works" in
633 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
634 *) am_func_iconv=yes ;;
635 esac
636 else
637 am_func_iconv=no am_cv_lib_iconv=no
638 fi
639 if test "$am_func_iconv" = yes; then
640 AC_DEFINE([HAVE_ICONV], [1],
641 [Define if you have the iconv() function and it works.])
642 fi
643 if test "$am_cv_lib_iconv" = yes; then
644 AC_MSG_CHECKING([how to link with libiconv])
645 AC_MSG_RESULT([$LIBICONV])
646 else
647 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
648 dnl either.
649 CPPFLAGS="$am_save_CPPFLAGS"
650 LIBICONV=
651 LTLIBICONV=
652 fi
653 AC_SUBST([LIBICONV])
654 AC_SUBST([LTLIBICONV])
655 ])
656
657 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
658 dnl avoid warnings like
659 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
660 dnl This is tricky because of the way 'aclocal' is implemented:
661 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
662 dnl Otherwise aclocal's initial scan pass would miss the macro definition.
663 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
664 dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
665 dnl warnings.
666 m4_define([gl_iconv_AC_DEFUN],
667 m4_version_prereq([2.64],
668 [[AC_DEFUN_ONCE(
669 [$1], [$2])]],
670 [m4_ifdef([gl_00GNULIB],
671 [[AC_DEFUN_ONCE(
672 [$1], [$2])]],
673 [[AC_DEFUN(
674 [$1], [$2])]])]))
675 gl_iconv_AC_DEFUN([AM_ICONV],
676 [
677 AM_ICONV_LINK
678 if test "$am_cv_func_iconv" = yes; then
679 AC_MSG_CHECKING([for iconv declaration])
680 AC_CACHE_VAL([am_cv_proto_iconv], [
681 AC_COMPILE_IFELSE(
682 [AC_LANG_PROGRAM(
683 [[
684 #include <stdlib.h>
685 #include <iconv.h>
686 extern
687 #ifdef __cplusplus
688 "C"
689 #endif
690 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
691 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
692 #else
693 size_t iconv();
694 #endif
695 ]],
696 [[]])],
697 [am_cv_proto_iconv_arg1=""],
698 [am_cv_proto_iconv_arg1="const"])
699 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
700 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
701 AC_MSG_RESULT([
702 $am_cv_proto_iconv])
703 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
704 [Define as const if the declaration of iconv() needs const.])
705 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
706 m4_ifdef([gl_ICONV_H_DEFAULTS],
707 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
708 if test -n "$am_cv_proto_iconv_arg1"; then
709 ICONV_CONST="const"
710 fi
711 ])
712 fi
713 ])
714
715 # intlmacosx.m4 serial 5 (gettext-0.18.2)
716 dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc.
717 dnl This file is free software; the Free Software Foundation
718 dnl gives unlimited permission to copy and/or distribute it,
719 dnl with or without modifications, as long as this notice is preserved.
720 dnl
721 dnl This file can be used in projects which are not available under
722 dnl the GNU General Public License or the GNU Library General Public
723 dnl License but which still want to provide support for the GNU gettext
724 dnl functionality.
725 dnl Please note that the actual code of the GNU gettext library is covered
726 dnl by the GNU Library General Public License, and the rest of the GNU
727 dnl gettext package is covered by the GNU General Public License.
728 dnl They are *not* in the public domain.
729
730 dnl Checks for special options needed on Mac OS X.
731 dnl Defines INTL_MACOSX_LIBS.
732 AC_DEFUN([gt_INTL_MACOSX],
733 [
734 dnl Check for API introduced in Mac OS X 10.2.
735 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
736 [gt_cv_func_CFPreferencesCopyAppValue],
737 [gt_save_LIBS="$LIBS"
738 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
739 AC_LINK_IFELSE(
740 [AC_LANG_PROGRAM(
741 [[#include <CoreFoundation/CFPreferences.h>]],
742 [[CFPreferencesCopyAppValue(NULL, NULL)]])],
743 [gt_cv_func_CFPreferencesCopyAppValue=yes],
744 [gt_cv_func_CFPreferencesCopyAppValue=no])
745 LIBS="$gt_save_LIBS"])
746 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
747 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
748 [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
749 fi
750 dnl Check for API introduced in Mac OS X 10.3.
751 AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
752 [gt_save_LIBS="$LIBS"
753 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
754 AC_LINK_IFELSE(
755 [AC_LANG_PROGRAM(
756 [[#include <CoreFoundation/CFLocale.h>]],
757 [[CFLocaleCopyCurrent();]])],
758 [gt_cv_func_CFLocaleCopyCurrent=yes],
759 [gt_cv_func_CFLocaleCopyCurrent=no])
760 LIBS="$gt_save_LIBS"])
761 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
762 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
763 [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
764 fi
765 INTL_MACOSX_LIBS=
766 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
767 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
768 fi
769 AC_SUBST([INTL_MACOSX_LIBS])
770 ])
771
772 # lib-ld.m4 serial 6
773 dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc.
774 dnl This file is free software; the Free Software Foundation
775 dnl gives unlimited permission to copy and/or distribute it,
776 dnl with or without modifications, as long as this notice is preserved.
777
778 dnl Subroutines of libtool.m4,
779 dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
780 dnl collision with libtool.m4.
781
782 dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
783 AC_DEFUN([AC_LIB_PROG_LD_GNU],
784 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
785 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
786 case `$LD -v 2>&1 </dev/null` in
787 *GNU* | *'with BFD'*)
788 acl_cv_prog_gnu_ld=yes
789 ;;
790 *)
791 acl_cv_prog_gnu_ld=no
792 ;;
793 esac])
794 with_gnu_ld=$acl_cv_prog_gnu_ld
795 ])
796
797 dnl From libtool-2.4. Sets the variable LD.
798 AC_DEFUN([AC_LIB_PROG_LD],
799 [AC_REQUIRE([AC_PROG_CC])dnl
800 AC_REQUIRE([AC_CANONICAL_HOST])dnl
801
802 AC_ARG_WITH([gnu-ld],
803 [AS_HELP_STRING([--with-gnu-ld],
804 [assume the C compiler uses GNU ld [default=no]])],
805 [test "$withval" = no || with_gnu_ld=yes],
806 [with_gnu_ld=no])dnl
807
808 # Prepare PATH_SEPARATOR.
809 # The user is always right.
810 if test "${PATH_SEPARATOR+set}" != set; then
811 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
812 # contains only /bin. Note that ksh looks also at the FPATH variable,
813 # so we have to set that as well for the test.
814 PATH_SEPARATOR=:
815 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
816 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
817 || PATH_SEPARATOR=';'
818 }
819 fi
820
821 ac_prog=ld
822 if test "$GCC" = yes; then
823 # Check if gcc -print-prog-name=ld gives a path.
824 AC_MSG_CHECKING([for ld used by $CC])
825 case $host in
826 *-*-mingw*)
827 # gcc leaves a trailing carriage return which upsets mingw
828 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
829 *)
830 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
831 esac
832 case $ac_prog in
833 # Accept absolute paths.
834 [[\\/]]* | ?:[[\\/]]*)
835 re_direlt='/[[^/]][[^/]]*/\.\./'
836 # Canonicalize the pathname of ld
837 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
838 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
839 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
840 done
841 test -z "$LD" && LD="$ac_prog"
842 ;;
843 "")
844 # If it fails, then pretend we aren't using GCC.
845 ac_prog=ld
846 ;;
847 *)
848 # If it is relative, then search for the first ld in PATH.
849 with_gnu_ld=unknown
850 ;;
851 esac
852 elif test "$with_gnu_ld" = yes; then
853 AC_MSG_CHECKING([for GNU ld])
854 else
855 AC_MSG_CHECKING([for non-GNU ld])
856 fi
857 AC_CACHE_VAL([acl_cv_path_LD],
858 [if test -z "$LD"; then
859 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
860 for ac_dir in $PATH; do
861 IFS="$acl_save_ifs"
862 test -z "$ac_dir" && ac_dir=.
863 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
864 acl_cv_path_LD="$ac_dir/$ac_prog"
865 # Check to see if the program is GNU ld. I'd rather use --version,
866 # but apparently some variants of GNU ld only accept -v.
867 # Break only if it was the GNU/non-GNU ld that we prefer.
868 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
869 *GNU* | *'with BFD'*)
870 test "$with_gnu_ld" != no && break
871 ;;
872 *)
873 test "$with_gnu_ld" != yes && break
874 ;;
875 esac
876 fi
877 done
878 IFS="$acl_save_ifs"
879 else
880 acl_cv_path_LD="$LD" # Let the user override the test with a path.
881 fi])
882 LD="$acl_cv_path_LD"
883 if test -n "$LD"; then
884 AC_MSG_RESULT([$LD])
885 else
886 AC_MSG_RESULT([no])
887 fi
888 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
889 AC_LIB_PROG_LD_GNU
890 ])
891
892 # lib-link.m4 serial 26 (gettext-0.18.2)
893 dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
894 dnl This file is free software; the Free Software Foundation
895 dnl gives unlimited permission to copy and/or distribute it,
896 dnl with or without modifications, as long as this notice is preserved.
897
898 dnl From Bruno Haible.
899
900 AC_PREREQ([2.54])
901
902 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
903 dnl the libraries corresponding to explicit and implicit dependencies.
904 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
905 dnl augments the CPPFLAGS variable.
906 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
907 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
908 AC_DEFUN([AC_LIB_LINKFLAGS],
909 [
910 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
911 AC_REQUIRE([AC_LIB_RPATH])
912 pushdef([Name],[m4_translit([$1],[./+-], [____])])
913 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
914 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
915 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
916 AC_LIB_LINKFLAGS_BODY([$1], [$2])
917 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
918 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
919 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
920 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
921 ])
922 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
923 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
924 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
925 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
926 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
927 AC_SUBST([LIB]NAME)
928 AC_SUBST([LTLIB]NAME)
929 AC_SUBST([LIB]NAME[_PREFIX])
930 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
931 dnl results of this search when this library appears as a dependency.
932 HAVE_LIB[]NAME=yes
933 popdef([NAME])
934 popdef([Name])
935 ])
936
937 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
938 dnl searches for libname and the libraries corresponding to explicit and
939 dnl implicit dependencies, together with the specified include files and
940 dnl the ability to compile and link the specified testcode. The missing-message
941 dnl defaults to 'no' and may contain additional hints for the user.
942 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
943 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
944 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
945 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
946 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
947 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
948 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
949 [
950 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
951 AC_REQUIRE([AC_LIB_RPATH])
952 pushdef([Name],[m4_translit([$1],[./+-], [____])])
953 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
954 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
955
956 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
957 dnl accordingly.
958 AC_LIB_LINKFLAGS_BODY([$1], [$2])
959
960 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
961 dnl because if the user has installed lib[]Name and not disabled its use
962 dnl via --without-lib[]Name-prefix, he wants to use it.
963 ac_save_CPPFLAGS="$CPPFLAGS"
964 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
965
966 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
967 ac_save_LIBS="$LIBS"
968 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
969 dnl because these -l options might require -L options that are present in
970 dnl LIBS. -l options benefit only from the -L options listed before it.
971 dnl Otherwise, add it to the front of LIBS, because it may be a static
972 dnl library that depends on another static library that is present in LIBS.
973 dnl Static libraries benefit only from the static libraries listed after
974 dnl it.
975 case " $LIB[]NAME" in
976 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
977 *) LIBS="$LIB[]NAME $LIBS" ;;
978 esac
979 AC_LINK_IFELSE(
980 [AC_LANG_PROGRAM([[$3]], [[$4]])],
981 [ac_cv_lib[]Name=yes],
982 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
983 LIBS="$ac_save_LIBS"
984 ])
985 if test "$ac_cv_lib[]Name" = yes; then
986 HAVE_LIB[]NAME=yes
987 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
988 AC_MSG_CHECKING([how to link with lib[]$1])
989 AC_MSG_RESULT([$LIB[]NAME])
990 else
991 HAVE_LIB[]NAME=no
992 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
993 dnl $INC[]NAME either.
994 CPPFLAGS="$ac_save_CPPFLAGS"
995 LIB[]NAME=
996 LTLIB[]NAME=
997 LIB[]NAME[]_PREFIX=
998 fi
999 AC_SUBST([HAVE_LIB]NAME)
1000 AC_SUBST([LIB]NAME)
1001 AC_SUBST([LTLIB]NAME)
1002 AC_SUBST([LIB]NAME[_PREFIX])
1003 popdef([NAME])
1004 popdef([Name])
1005 ])
1006
1007 dnl Determine the platform dependent parameters needed to use rpath:
1008 dnl acl_libext,
1009 dnl acl_shlibext,
1010 dnl acl_libname_spec,
1011 dnl acl_library_names_spec,
1012 dnl acl_hardcode_libdir_flag_spec,
1013 dnl acl_hardcode_libdir_separator,
1014 dnl acl_hardcode_direct,
1015 dnl acl_hardcode_minus_L.
1016 AC_DEFUN([AC_LIB_RPATH],
1017 [
1018 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1019 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1020 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1021 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1022 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1023 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1024 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
1025 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1026 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1027 . ./conftest.sh
1028 rm -f ./conftest.sh
1029 acl_cv_rpath=done
1030 ])
1031 wl="$acl_cv_wl"
1032 acl_libext="$acl_cv_libext"
1033 acl_shlibext="$acl_cv_shlibext"
1034 acl_libname_spec="$acl_cv_libname_spec"
1035 acl_library_names_spec="$acl_cv_library_names_spec"
1036 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1037 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1038 acl_hardcode_direct="$acl_cv_hardcode_direct"
1039 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
1040 dnl Determine whether the user wants rpath handling at all.
1041 AC_ARG_ENABLE([rpath],
1042 [ --disable-rpath do not hardcode runtime library paths],
1043 :, enable_rpath=yes)
1044 ])
1045
1046 dnl AC_LIB_FROMPACKAGE(name, package)
1047 dnl declares that libname comes from the given package. The configure file
1048 dnl will then not have a --with-libname-prefix option but a
1049 dnl --with-package-prefix option. Several libraries can come from the same
1050 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
1051 dnl macro call that searches for libname.
1052 AC_DEFUN([AC_LIB_FROMPACKAGE],
1053 [
1054 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1055 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1056 define([acl_frompackage_]NAME, [$2])
1057 popdef([NAME])
1058 pushdef([PACK],[$2])
1059 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1060 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1061 define([acl_libsinpackage_]PACKUP,
1062 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
1063 popdef([PACKUP])
1064 popdef([PACK])
1065 ])
1066
1067 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1068 dnl the libraries corresponding to explicit and implicit dependencies.
1069 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1070 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
1071 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
1072 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1073 [
1074 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1075 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
1076 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1077 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
1078 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
1079 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
1080 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
1081 dnl Autoconf >= 2.61 supports dots in --with options.
1082 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
1083 dnl By default, look in $includedir and $libdir.
1084 use_additional=yes
1085 AC_LIB_WITH_FINAL_PREFIX([
1086 eval additional_includedir=\"$includedir\"
1087 eval additional_libdir=\"$libdir\"
1088 ])
1089 AC_ARG_WITH(P_A_C_K[-prefix],
1090 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
1091 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
1092 [
1093 if test "X$withval" = "Xno"; then
1094 use_additional=no
1095 else
1096 if test "X$withval" = "X"; then
1097 AC_LIB_WITH_FINAL_PREFIX([
1098 eval additional_includedir=\"$includedir\"
1099 eval additional_libdir=\"$libdir\"
1100 ])
1101 else
1102 additional_includedir="$withval/include"
1103 additional_libdir="$withval/$acl_libdirstem"
1104 if test "$acl_libdirstem2" != "$acl_libdirstem" \
1105 && ! test -d "$withval/$acl_libdirstem"; then
1106 additional_libdir="$withval/$acl_libdirstem2"
1107 fi
1108 fi
1109 fi
1110 ])
1111 dnl Search the library and its dependencies in $additional_libdir and
1112 dnl $LDFLAGS. Using breadth-first-seach.
1113 LIB[]NAME=
1114 LTLIB[]NAME=
1115 INC[]NAME=
1116 LIB[]NAME[]_PREFIX=
1117 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
1118 dnl computed. So it has to be reset here.
1119 HAVE_LIB[]NAME=
1120 rpathdirs=
1121 ltrpathdirs=
1122 names_already_handled=
1123 names_next_round='$1 $2'
1124 while test -n "$names_next_round"; do
1125 names_this_round="$names_next_round"
1126 names_next_round=
1127 for name in $names_this_round; do
1128 already_handled=
1129 for n in $names_already_handled; do
1130 if test "$n" = "$name"; then
1131 already_handled=yes
1132 break
1133 fi
1134 done
1135 if test -z "$already_handled"; then
1136 names_already_handled="$names_already_handled $name"
1137 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1138 dnl or AC_LIB_HAVE_LINKFLAGS call.
1139 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
1140 eval value=\"\$HAVE_LIB$uppername\"
1141 if test -n "$value"; then
1142 if test "$value" = yes; then
1143 eval value=\"\$LIB$uppername\"
1144 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1145 eval value=\"\$LTLIB$uppername\"
1146 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1147 else
1148 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1149 dnl that this library doesn't exist. So just drop it.
1150 :
1151 fi
1152 else
1153 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1154 dnl and the already constructed $LIBNAME/$LTLIBNAME.
1155 found_dir=
1156 found_la=
1157 found_so=
1158 found_a=
1159 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
1160 if test -n "$acl_shlibext"; then
1161 shrext=".$acl_shlibext" # typically: shrext=.so
1162 else
1163 shrext=
1164 fi
1165 if test $use_additional = yes; then
1166 dir="$additional_libdir"
1167 dnl The same code as in the loop below:
1168 dnl First look for a shared library.
1169 if test -n "$acl_shlibext"; then
1170 if test -f "$dir/$libname$shrext"; then
1171 found_dir="$dir"
1172 found_so="$dir/$libname$shrext"
1173 else
1174 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1175 ver=`(cd "$dir" && \
1176 for f in "$libname$shrext".*; do echo "$f"; done \
1177 | sed -e "s,^$libname$shrext\\\\.,," \
1178 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1179 | sed 1q ) 2>/dev/null`
1180 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1181 found_dir="$dir"
1182 found_so="$dir/$libname$shrext.$ver"
1183 fi
1184 else
1185 eval library_names=\"$acl_library_names_spec\"
1186 for f in $library_names; do
1187 if test -f "$dir/$f"; then
1188 found_dir="$dir"
1189 found_so="$dir/$f"
1190 break
1191 fi
1192 done
1193 fi
1194 fi
1195 fi
1196 dnl Then look for a static library.
1197 if test "X$found_dir" = "X"; then
1198 if test -f "$dir/$libname.$acl_libext"; then
1199 found_dir="$dir"
1200 found_a="$dir/$libname.$acl_libext"
1201 fi
1202 fi
1203 if test "X$found_dir" != "X"; then
1204 if test -f "$dir/$libname.la"; then
1205 found_la="$dir/$libname.la"
1206 fi
1207 fi
1208 fi
1209 if test "X$found_dir" = "X"; then
1210 for x in $LDFLAGS $LTLIB[]NAME; do
1211 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1212 case "$x" in
1213 -L*)
1214 dir=`echo "X$x" | sed -e 's/^X-L//'`
1215 dnl First look for a shared library.
1216 if test -n "$acl_shlibext"; then
1217 if test -f "$dir/$libname$shrext"; then
1218 found_dir="$dir"
1219 found_so="$dir/$libname$shrext"
1220 else
1221 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1222 ver=`(cd "$dir" && \
1223 for f in "$libname$shrext".*; do echo "$f"; done \
1224 | sed -e "s,^$libname$shrext\\\\.,," \
1225 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1226 | sed 1q ) 2>/dev/null`
1227 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1228 found_dir="$dir"
1229 found_so="$dir/$libname$shrext.$ver"
1230 fi
1231 else
1232 eval library_names=\"$acl_library_names_spec\"
1233 for f in $library_names; do
1234 if test -f "$dir/$f"; then
1235 found_dir="$dir"
1236 found_so="$dir/$f"
1237 break
1238 fi
1239 done
1240 fi
1241 fi
1242 fi
1243 dnl Then look for a static library.
1244 if test "X$found_dir" = "X"; then
1245 if test -f "$dir/$libname.$acl_libext"; then
1246 found_dir="$dir"
1247 found_a="$dir/$libname.$acl_libext"
1248 fi
1249 fi
1250 if test "X$found_dir" != "X"; then
1251 if test -f "$dir/$libname.la"; then
1252 found_la="$dir/$libname.la"
1253 fi
1254 fi
1255 ;;
1256 esac
1257 if test "X$found_dir" != "X"; then
1258 break
1259 fi
1260 done
1261 fi
1262 if test "X$found_dir" != "X"; then
1263 dnl Found the library.
1264 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1265 if test "X$found_so" != "X"; then
1266 dnl Linking with a shared library. We attempt to hardcode its
1267 dnl directory into the executable's runpath, unless it's the
1268 dnl standard /usr/lib.
1269 if test "$enable_rpath" = no \
1270 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
1271 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
1272 dnl No hardcoding is needed.
1273 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1274 else
1275 dnl Use an explicit option to hardcode DIR into the resulting
1276 dnl binary.
1277 dnl Potentially add DIR to ltrpathdirs.
1278 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1279 haveit=
1280 for x in $ltrpathdirs; do
1281 if test "X$x" = "X$found_dir"; then
1282 haveit=yes
1283 break
1284 fi
1285 done
1286 if test -z "$haveit"; then
1287 ltrpathdirs="$ltrpathdirs $found_dir"
1288 fi
1289 dnl The hardcoding into $LIBNAME is system dependent.
1290 if test "$acl_hardcode_direct" = yes; then
1291 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1292 dnl resulting binary.
1293 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1294 else
1295 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1296 dnl Use an explicit option to hardcode DIR into the resulting
1297 dnl binary.
1298 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1299 dnl Potentially add DIR to rpathdirs.
1300 dnl The rpathdirs will be appended to $LIBNAME at the end.
1301 haveit=
1302 for x in $rpathdirs; do
1303 if test "X$x" = "X$found_dir"; then
1304 haveit=yes
1305 break
1306 fi
1307 done
1308 if test -z "$haveit"; then
1309 rpathdirs="$rpathdirs $found_dir"
1310 fi
1311 else
1312 dnl Rely on "-L$found_dir".
1313 dnl But don't add it if it's already contained in the LDFLAGS
1314 dnl or the already constructed $LIBNAME
1315 haveit=
1316 for x in $LDFLAGS $LIB[]NAME; do
1317 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1318 if test "X$x" = "X-L$found_dir"; then
1319 haveit=yes
1320 break
1321 fi
1322 done
1323 if test -z "$haveit"; then
1324 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1325 fi
1326 if test "$acl_hardcode_minus_L" != no; then
1327 dnl FIXME: Not sure whether we should use
1328 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1329 dnl here.
1330 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1331 else
1332 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1333 dnl here, because this doesn't fit in flags passed to the
1334 dnl compiler. So give up. No hardcoding. This affects only
1335 dnl very old systems.
1336 dnl FIXME: Not sure whether we should use
1337 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1338 dnl here.
1339 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1340 fi
1341 fi
1342 fi
1343 fi
1344 else
1345 if test "X$found_a" != "X"; then
1346 dnl Linking with a static library.
1347 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1348 else
1349 dnl We shouldn't come here, but anyway it's good to have a
1350 dnl fallback.
1351 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1352 fi
1353 fi
1354 dnl Assume the include files are nearby.
1355 additional_includedir=
1356 case "$found_dir" in
1357 */$acl_libdirstem | */$acl_libdirstem/)
1358 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1359 if test "$name" = '$1'; then
1360 LIB[]NAME[]_PREFIX="$basedir"
1361 fi
1362 additional_includedir="$basedir/include"
1363 ;;
1364 */$acl_libdirstem2 | */$acl_libdirstem2/)
1365 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
1366 if test "$name" = '$1'; then
1367 LIB[]NAME[]_PREFIX="$basedir"
1368 fi
1369 additional_includedir="$basedir/include"
1370 ;;
1371 esac
1372 if test "X$additional_includedir" != "X"; then
1373 dnl Potentially add $additional_includedir to $INCNAME.
1374 dnl But don't add it
1375 dnl 1. if it's the standard /usr/include,
1376 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1377 dnl 3. if it's already present in $CPPFLAGS or the already
1378 dnl constructed $INCNAME,
1379 dnl 4. if it doesn't exist as a directory.
1380 if test "X$additional_includedir" != "X/usr/include"; then
1381 haveit=
1382 if test "X$additional_includedir" = "X/usr/local/include"; then
1383 if test -n "$GCC"; then
1384 case $host_os in
1385 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1386 esac
1387 fi
1388 fi
1389 if test -z "$haveit"; then
1390 for x in $CPPFLAGS $INC[]NAME; do
1391 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1392 if test "X$x" = "X-I$additional_includedir"; then
1393 haveit=yes
1394 break
1395 fi
1396 done
1397 if test -z "$haveit"; then
1398 if test -d "$additional_includedir"; then
1399 dnl Really add $additional_includedir to $INCNAME.
1400 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1401 fi
1402 fi
1403 fi
1404 fi
1405 fi
1406 dnl Look for dependencies.
1407 if test -n "$found_la"; then
1408 dnl Read the .la file. It defines the variables
1409 dnl dlname, library_names, old_library, dependency_libs, current,
1410 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1411 save_libdir="$libdir"
1412 case "$found_la" in
1413 */* | *\\*) . "$found_la" ;;
1414 *) . "./$found_la" ;;
1415 esac
1416 libdir="$save_libdir"
1417 dnl We use only dependency_libs.
1418 for dep in $dependency_libs; do
1419 case "$dep" in
1420 -L*)
1421 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1422 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1423 dnl But don't add it
1424 dnl 1. if it's the standard /usr/lib,
1425 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1426 dnl 3. if it's already present in $LDFLAGS or the already
1427 dnl constructed $LIBNAME,
1428 dnl 4. if it doesn't exist as a directory.
1429 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
1430 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
1431 haveit=
1432 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
1433 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
1434 if test -n "$GCC"; then
1435 case $host_os in
1436 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1437 esac
1438 fi
1439 fi
1440 if test -z "$haveit"; then
1441 haveit=
1442 for x in $LDFLAGS $LIB[]NAME; do
1443 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1444 if test "X$x" = "X-L$additional_libdir"; then
1445 haveit=yes
1446 break
1447 fi
1448 done
1449 if test -z "$haveit"; then
1450 if test -d "$additional_libdir"; then
1451 dnl Really add $additional_libdir to $LIBNAME.
1452 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1453 fi
1454 fi
1455 haveit=
1456 for x in $LDFLAGS $LTLIB[]NAME; do
1457 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1458 if test "X$x" = "X-L$additional_libdir"; then
1459 haveit=yes
1460 break
1461 fi
1462 done
1463 if test -z "$haveit"; then
1464 if test -d "$additional_libdir"; then
1465 dnl Really add $additional_libdir to $LTLIBNAME.
1466 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1467 fi
1468 fi
1469 fi
1470 fi
1471 ;;
1472 -R*)
1473 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1474 if test "$enable_rpath" != no; then
1475 dnl Potentially add DIR to rpathdirs.
1476 dnl The rpathdirs will be appended to $LIBNAME at the end.
1477 haveit=
1478 for x in $rpathdirs; do
1479 if test "X$x" = "X$dir"; then
1480 haveit=yes
1481 break
1482 fi
1483 done
1484 if test -z "$haveit"; then
1485 rpathdirs="$rpathdirs $dir"
1486 fi
1487 dnl Potentially add DIR to ltrpathdirs.
1488 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1489 haveit=
1490 for x in $ltrpathdirs; do
1491 if test "X$x" = "X$dir"; then
1492 haveit=yes
1493 break
1494 fi
1495 done
1496 if test -z "$haveit"; then
1497 ltrpathdirs="$ltrpathdirs $dir"
1498 fi
1499 fi
1500 ;;
1501 -l*)
1502 dnl Handle this in the next round.
1503 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1504 ;;
1505 *.la)
1506 dnl Handle this in the next round. Throw away the .la's
1507 dnl directory; it is already contained in a preceding -L
1508 dnl option.
1509 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1510 ;;
1511 *)
1512 dnl Most likely an immediate library name.
1513 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1514 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1515 ;;
1516 esac
1517 done
1518 fi
1519 else
1520 dnl Didn't find the library; assume it is in the system directories
1521 dnl known to the linker and runtime loader. (All the system
1522 dnl directories known to the linker should also be known to the
1523 dnl runtime loader, otherwise the system is severely misconfigured.)
1524 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1525 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1526 fi
1527 fi
1528 fi
1529 done
1530 done
1531 if test "X$rpathdirs" != "X"; then
1532 if test -n "$acl_hardcode_libdir_separator"; then
1533 dnl Weird platform: only the last -rpath option counts, the user must
1534 dnl pass all path elements in one option. We can arrange that for a
1535 dnl single library, but not when more than one $LIBNAMEs are used.
1536 alldirs=
1537 for found_dir in $rpathdirs; do
1538 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1539 done
1540 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1541 acl_save_libdir="$libdir"
1542 libdir="$alldirs"
1543 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1544 libdir="$acl_save_libdir"
1545 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1546 else
1547 dnl The -rpath options are cumulative.
1548 for found_dir in $rpathdirs; do
1549 acl_save_libdir="$libdir"
1550 libdir="$found_dir"
1551 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1552 libdir="$acl_save_libdir"
1553 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1554 done
1555 fi
1556 fi
1557 if test "X$ltrpathdirs" != "X"; then
1558 dnl When using libtool, the option that works for both libraries and
1559 dnl executables is -R. The -R options are cumulative.
1560 for found_dir in $ltrpathdirs; do
1561 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1562 done
1563 fi
1564 popdef([P_A_C_K])
1565 popdef([PACKLIBS])
1566 popdef([PACKUP])
1567 popdef([PACK])
1568 popdef([NAME])
1569 ])
1570
1571 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1572 dnl unless already present in VAR.
1573 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1574 dnl contains two or three consecutive elements that belong together.
1575 AC_DEFUN([AC_LIB_APPENDTOVAR],
1576 [
1577 for element in [$2]; do
1578 haveit=
1579 for x in $[$1]; do
1580 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1581 if test "X$x" = "X$element"; then
1582 haveit=yes
1583 break
1584 fi
1585 done
1586 if test -z "$haveit"; then
1587 [$1]="${[$1]}${[$1]:+ }$element"
1588 fi
1589 done
1590 ])
1591
1592 dnl For those cases where a variable contains several -L and -l options
1593 dnl referring to unknown libraries and directories, this macro determines the
1594 dnl necessary additional linker options for the runtime path.
1595 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1596 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1597 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1598 dnl otherwise linking without libtool is assumed.
1599 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1600 [
1601 AC_REQUIRE([AC_LIB_RPATH])
1602 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1603 $1=
1604 if test "$enable_rpath" != no; then
1605 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1606 dnl Use an explicit option to hardcode directories into the resulting
1607 dnl binary.
1608 rpathdirs=
1609 next=
1610 for opt in $2; do
1611 if test -n "$next"; then
1612 dir="$next"
1613 dnl No need to hardcode the standard /usr/lib.
1614 if test "X$dir" != "X/usr/$acl_libdirstem" \
1615 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1616 rpathdirs="$rpathdirs $dir"
1617 fi
1618 next=
1619 else
1620 case $opt in
1621 -L) next=yes ;;
1622 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1623 dnl No need to hardcode the standard /usr/lib.
1624 if test "X$dir" != "X/usr/$acl_libdirstem" \
1625 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1626 rpathdirs="$rpathdirs $dir"
1627 fi
1628 next= ;;
1629 *) next= ;;
1630 esac
1631 fi
1632 done
1633 if test "X$rpathdirs" != "X"; then
1634 if test -n ""$3""; then
1635 dnl libtool is used for linking. Use -R options.
1636 for dir in $rpathdirs; do
1637 $1="${$1}${$1:+ }-R$dir"
1638 done
1639 else
1640 dnl The linker is used for linking directly.
1641 if test -n "$acl_hardcode_libdir_separator"; then
1642 dnl Weird platform: only the last -rpath option counts, the user
1643 dnl must pass all path elements in one option.
1644 alldirs=
1645 for dir in $rpathdirs; do
1646 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1647 done
1648 acl_save_libdir="$libdir"
1649 libdir="$alldirs"
1650 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1651 libdir="$acl_save_libdir"
1652 $1="$flag"
1653 else
1654 dnl The -rpath options are cumulative.
1655 for dir in $rpathdirs; do
1656 acl_save_libdir="$libdir"
1657 libdir="$dir"
1658 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1659 libdir="$acl_save_libdir"
1660 $1="${$1}${$1:+ }$flag"
1661 done
1662 fi
1663 fi
1664 fi
1665 fi
1666 fi
1667 AC_SUBST([$1])
1668 ])
1669
1670 # lib-prefix.m4 serial 7 (gettext-0.18)
1671 dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
1672 dnl This file is free software; the Free Software Foundation
1673 dnl gives unlimited permission to copy and/or distribute it,
1674 dnl with or without modifications, as long as this notice is preserved.
1675
1676 dnl From Bruno Haible.
1677
1678 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1679 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1680 dnl require excessive bracketing.
1681 ifdef([AC_HELP_STRING],
1682 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1683 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1684
1685 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1686 dnl to access previously installed libraries. The basic assumption is that
1687 dnl a user will want packages to use other packages he previously installed
1688 dnl with the same --prefix option.
1689 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1690 dnl libraries, but is otherwise very convenient.
1691 AC_DEFUN([AC_LIB_PREFIX],
1692 [
1693 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1694 AC_REQUIRE([AC_PROG_CC])
1695 AC_REQUIRE([AC_CANONICAL_HOST])
1696 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1697 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1698 dnl By default, look in $includedir and $libdir.
1699 use_additional=yes
1700 AC_LIB_WITH_FINAL_PREFIX([
1701 eval additional_includedir=\"$includedir\"
1702 eval additional_libdir=\"$libdir\"
1703 ])
1704 AC_LIB_ARG_WITH([lib-prefix],
1705 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1706 --without-lib-prefix don't search for libraries in includedir and libdir],
1707 [
1708 if test "X$withval" = "Xno"; then
1709 use_additional=no
1710 else
1711 if test "X$withval" = "X"; then
1712 AC_LIB_WITH_FINAL_PREFIX([
1713 eval additional_includedir=\"$includedir\"
1714 eval additional_libdir=\"$libdir\"
1715 ])
1716 else
1717 additional_includedir="$withval/include"
1718 additional_libdir="$withval/$acl_libdirstem"
1719 fi
1720 fi
1721 ])
1722 if test $use_additional = yes; then
1723 dnl Potentially add $additional_includedir to $CPPFLAGS.
1724 dnl But don't add it
1725 dnl 1. if it's the standard /usr/include,
1726 dnl 2. if it's already present in $CPPFLAGS,
1727 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1728 dnl 4. if it doesn't exist as a directory.
1729 if test "X$additional_includedir" != "X/usr/include"; then
1730 haveit=
1731 for x in $CPPFLAGS; do
1732 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1733 if test "X$x" = "X-I$additional_includedir"; then
1734 haveit=yes
1735 break
1736 fi
1737 done
1738 if test -z "$haveit"; then
1739 if test "X$additional_includedir" = "X/usr/local/include"; then
1740 if test -n "$GCC"; then
1741 case $host_os in
1742 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1743 esac
1744 fi
1745 fi
1746 if test -z "$haveit"; then
1747 if test -d "$additional_includedir"; then
1748 dnl Really add $additional_includedir to $CPPFLAGS.
1749 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1750 fi
1751 fi
1752 fi
1753 fi
1754 dnl Potentially add $additional_libdir to $LDFLAGS.
1755 dnl But don't add it
1756 dnl 1. if it's the standard /usr/lib,
1757 dnl 2. if it's already present in $LDFLAGS,
1758 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1759 dnl 4. if it doesn't exist as a directory.
1760 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1761 haveit=
1762 for x in $LDFLAGS; do
1763 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1764 if test "X$x" = "X-L$additional_libdir"; then
1765 haveit=yes
1766 break
1767 fi
1768 done
1769 if test -z "$haveit"; then
1770 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1771 if test -n "$GCC"; then
1772 case $host_os in
1773 linux*) haveit=yes;;
1774 esac
1775 fi
1776 fi
1777 if test -z "$haveit"; then
1778 if test -d "$additional_libdir"; then
1779 dnl Really add $additional_libdir to $LDFLAGS.
1780 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1781 fi
1782 fi
1783 fi
1784 fi
1785 fi
1786 ])
1787
1788 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1789 dnl acl_final_exec_prefix, containing the values to which $prefix and
1790 dnl $exec_prefix will expand at the end of the configure script.
1791 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1792 [
1793 dnl Unfortunately, prefix and exec_prefix get only finally determined
1794 dnl at the end of configure.
1795 if test "X$prefix" = "XNONE"; then
1796 acl_final_prefix="$ac_default_prefix"
1797 else
1798 acl_final_prefix="$prefix"
1799 fi
1800 if test "X$exec_prefix" = "XNONE"; then
1801 acl_final_exec_prefix='${prefix}'
1802 else
1803 acl_final_exec_prefix="$exec_prefix"
1804 fi
1805 acl_save_prefix="$prefix"
1806 prefix="$acl_final_prefix"
1807 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1808 prefix="$acl_save_prefix"
1809 ])
1810
1811 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1812 dnl variables prefix and exec_prefix bound to the values they will have
1813 dnl at the end of the configure script.
1814 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1815 [
1816 acl_save_prefix="$prefix"
1817 prefix="$acl_final_prefix"
1818 acl_save_exec_prefix="$exec_prefix"
1819 exec_prefix="$acl_final_exec_prefix"
1820 $1
1821 exec_prefix="$acl_save_exec_prefix"
1822 prefix="$acl_save_prefix"
1823 ])
1824
1825 dnl AC_LIB_PREPARE_MULTILIB creates
1826 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1827 dnl "lib" or "lib64" or "lib/64",
1828 dnl - a variable acl_libdirstem2, as a secondary possible value for
1829 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1830 dnl "lib/amd64".
1831 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1832 [
1833 dnl There is no formal standard regarding lib and lib64.
1834 dnl On glibc systems, the current practice is that on a system supporting
1835 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1836 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1837 dnl the compiler's default mode by looking at the compiler's library search
1838 dnl path. If at least one of its elements ends in /lib64 or points to a
1839 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1840 dnl Otherwise we use the default, namely "lib".
1841 dnl On Solaris systems, the current practice is that on a system supporting
1842 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1843 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1844 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1845 AC_REQUIRE([AC_CANONICAL_HOST])
1846 acl_libdirstem=lib
1847 acl_libdirstem2=
1848 case "$host_os" in
1849 solaris*)
1850 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1851 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1852 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1853 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1854 dnl symlink is missing, so we set acl_libdirstem2 too.
1855 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1856 [AC_EGREP_CPP([sixtyfour bits], [
1857 #ifdef _LP64
1858 sixtyfour bits
1859 #endif
1860 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1861 ])
1862 if test $gl_cv_solaris_64bit = yes; then
1863 acl_libdirstem=lib/64
1864 case "$host_cpu" in
1865 sparc*) acl_libdirstem2=lib/sparcv9 ;;
1866 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1867 esac
1868 fi
1869 ;;
1870 *)
1871 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1872 if test -n "$searchpath"; then
1873 acl_save_IFS="${IFS= }"; IFS=":"
1874 for searchdir in $searchpath; do
1875 if test -d "$searchdir"; then
1876 case "$searchdir" in
1877 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1878 */../ | */.. )
1879 # Better ignore directories of this form. They are misleading.
1880 ;;
1881 *) searchdir=`cd "$searchdir" && pwd`
1882 case "$searchdir" in
1883 */lib64 ) acl_libdirstem=lib64 ;;
1884 esac ;;
1885 esac
1886 fi
1887 done
1888 IFS="$acl_save_IFS"
1889 fi
1890 ;;
1891 esac
1892 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1893 ])
1894
1895 # nls.m4 serial 5 (gettext-0.18)
1896 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
1897 dnl Foundation, Inc.
1898 dnl This file is free software; the Free Software Foundation
1899 dnl gives unlimited permission to copy and/or distribute it,
1900 dnl with or without modifications, as long as this notice is preserved.
1901 dnl
1902 dnl This file can be used in projects which are not available under
1903 dnl the GNU General Public License or the GNU Library General Public
1904 dnl License but which still want to provide support for the GNU gettext
1905 dnl functionality.
1906 dnl Please note that the actual code of the GNU gettext library is covered
1907 dnl by the GNU Library General Public License, and the rest of the GNU
1908 dnl gettext package is covered by the GNU General Public License.
1909 dnl They are *not* in the public domain.
1910
1911 dnl Authors:
1912 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1913 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1914
1915 AC_PREREQ([2.50])
1916
1917 AC_DEFUN([AM_NLS],
1918 [
1919 AC_MSG_CHECKING([whether NLS is requested])
1920 dnl Default is enabled NLS
1921 AC_ARG_ENABLE([nls],
1922 [ --disable-nls do not use Native Language Support],
1923 USE_NLS=$enableval, USE_NLS=yes)
1924 AC_MSG_RESULT([$USE_NLS])
1925 AC_SUBST([USE_NLS])
1926 ])
1927
1928 # po.m4 serial 24 (gettext-0.19)
1929 dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
1930 dnl This file is free software; the Free Software Foundation
1931 dnl gives unlimited permission to copy and/or distribute it,
1932 dnl with or without modifications, as long as this notice is preserved.
1933 dnl
1934 dnl This file can be used in projects which are not available under
1935 dnl the GNU General Public License or the GNU Library General Public
1936 dnl License but which still want to provide support for the GNU gettext
1937 dnl functionality.
1938 dnl Please note that the actual code of the GNU gettext library is covered
1939 dnl by the GNU Library General Public License, and the rest of the GNU
1940 dnl gettext package is covered by the GNU General Public License.
1941 dnl They are *not* in the public domain.
1942
1943 dnl Authors:
1944 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1945 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1946
1947 AC_PREREQ([2.60])
1948
1949 dnl Checks for all prerequisites of the po subdirectory.
1950 AC_DEFUN([AM_PO_SUBDIRS],
1951 [
1952 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1953 AC_REQUIRE([AC_PROG_INSTALL])dnl
1954 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1955 AC_REQUIRE([AC_PROG_SED])dnl
1956 AC_REQUIRE([AM_NLS])dnl
1957
1958 dnl Release version of the gettext macros. This is used to ensure that
1959 dnl the gettext macros and po/Makefile.in.in are in sync.
1960 AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
1961
1962 dnl Perform the following tests also if --disable-nls has been given,
1963 dnl because they are needed for "make dist" to work.
1964
1965 dnl Search for GNU msgfmt in the PATH.
1966 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1967 dnl The second test excludes FreeBSD msgfmt.
1968 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1969 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
1970 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1971 :)
1972 AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
1973
1974 dnl Test whether it is GNU msgfmt >= 0.15.
1975 changequote(,)dnl
1976 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
1977 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
1978 *) MSGFMT_015=$MSGFMT ;;
1979 esac
1980 changequote([,])dnl
1981 AC_SUBST([MSGFMT_015])
1982 changequote(,)dnl
1983 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
1984 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
1985 *) GMSGFMT_015=$GMSGFMT ;;
1986 esac
1987 changequote([,])dnl
1988 AC_SUBST([GMSGFMT_015])
1989
1990 dnl Search for GNU xgettext 0.12 or newer in the PATH.
1991 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1992 dnl The second test excludes FreeBSD xgettext.
1993 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1994 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
1995 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1996 :)
1997 dnl Remove leftover from FreeBSD xgettext call.
1998 rm -f messages.po
1999
2000 dnl Test whether it is GNU xgettext >= 0.15.
2001 changequote(,)dnl
2002 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
2003 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
2004 *) XGETTEXT_015=$XGETTEXT ;;
2005 esac
2006 changequote([,])dnl
2007 AC_SUBST([XGETTEXT_015])
2008
2009 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
2010 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
2011 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
2012
2013 dnl Installation directories.
2014 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
2015 dnl have to define it here, so that it can be used in po/Makefile.
2016 test -n "$localedir" || localedir='${datadir}/locale'
2017 AC_SUBST([localedir])
2018
2019 dnl Support for AM_XGETTEXT_OPTION.
2020 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
2021 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
2022
2023 AC_CONFIG_COMMANDS([po-directories], [[
2024 for ac_file in $CONFIG_FILES; do
2025 # Support "outfile[:infile[:infile...]]"
2026 case "$ac_file" in
2027 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2028 esac
2029 # PO directories have a Makefile.in generated from Makefile.in.in.
2030 case "$ac_file" in */Makefile.in)
2031 # Adjust a relative srcdir.
2032 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2033 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
2034 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2035 # In autoconf-2.13 it is called $ac_given_srcdir.
2036 # In autoconf-2.50 it is called $srcdir.
2037 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2038 case "$ac_given_srcdir" in
2039 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2040 /*) top_srcdir="$ac_given_srcdir" ;;
2041 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2042 esac
2043 # Treat a directory as a PO directory if and only if it has a
2044 # POTFILES.in file. This allows packages to have multiple PO
2045 # directories under different names or in different locations.
2046 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
2047 rm -f "$ac_dir/POTFILES"
2048 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
2049 gt_tab=`printf '\t'`
2050 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
2051 POMAKEFILEDEPS="POTFILES.in"
2052 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
2053 # on $ac_dir but don't depend on user-specified configuration
2054 # parameters.
2055 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2056 # The LINGUAS file contains the set of available languages.
2057 if test -n "$OBSOLETE_ALL_LINGUAS"; then
2058 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2059 fi
2060 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2061 # Hide the ALL_LINGUAS assignment from automake < 1.5.
2062 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2063 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2064 else
2065 # The set of available languages was given in configure.in.
2066 # Hide the ALL_LINGUAS assignment from automake < 1.5.
2067 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
2068 fi
2069 # Compute POFILES
2070 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2071 # Compute UPDATEPOFILES
2072 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2073 # Compute DUMMYPOFILES
2074 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2075 # Compute GMOFILES
2076 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2077 case "$ac_given_srcdir" in
2078 .) srcdirpre= ;;
2079 *) srcdirpre='$(srcdir)/' ;;
2080 esac
2081 POFILES=
2082 UPDATEPOFILES=
2083 DUMMYPOFILES=
2084 GMOFILES=
2085 for lang in $ALL_LINGUAS; do
2086 POFILES="$POFILES $srcdirpre$lang.po"
2087 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2088 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2089 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2090 done
2091 # CATALOGS depends on both $ac_dir and the user's LINGUAS
2092 # environment variable.
2093 INST_LINGUAS=
2094 if test -n "$ALL_LINGUAS"; then
2095 for presentlang in $ALL_LINGUAS; do
2096 useit=no
2097 if test "%UNSET%" != "$LINGUAS"; then
2098 desiredlanguages="$LINGUAS"
2099 else
2100 desiredlanguages="$ALL_LINGUAS"
2101 fi
2102 for desiredlang in $desiredlanguages; do
2103 # Use the presentlang catalog if desiredlang is
2104 # a. equal to presentlang, or
2105 # b. a variant of presentlang (because in this case,
2106 # presentlang can be used as a fallback for messages
2107 # which are not translated in the desiredlang catalog).
2108 case "$desiredlang" in
2109 "$presentlang"*) useit=yes;;
2110 esac
2111 done
2112 if test $useit = yes; then
2113 INST_LINGUAS="$INST_LINGUAS $presentlang"
2114 fi
2115 done
2116 fi
2117 CATALOGS=
2118 if test -n "$INST_LINGUAS"; then
2119 for lang in $INST_LINGUAS; do
2120 CATALOGS="$CATALOGS $lang.gmo"
2121 done
2122 fi
2123 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
2124 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
2125 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
2126 if test -f "$f"; then
2127 case "$f" in
2128 *.orig | *.bak | *~) ;;
2129 *) cat "$f" >> "$ac_dir/Makefile" ;;
2130 esac
2131 fi
2132 done
2133 fi
2134 ;;
2135 esac
2136 done]],
2137 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
2138 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
2139 # from automake < 1.5.
2140 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
2141 # Capture the value of LINGUAS because we need it to compute CATALOGS.
2142 LINGUAS="${LINGUAS-%UNSET%}"
2143 ])
2144 ])
2145
2146 dnl Postprocesses a Makefile in a directory containing PO files.
2147 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
2148 [
2149 # When this code is run, in config.status, two variables have already been
2150 # set:
2151 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
2152 # - LINGUAS is the value of the environment variable LINGUAS at configure
2153 # time.
2154
2155 changequote(,)dnl
2156 # Adjust a relative srcdir.
2157 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2158 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
2159 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2160 # In autoconf-2.13 it is called $ac_given_srcdir.
2161 # In autoconf-2.50 it is called $srcdir.
2162 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2163 case "$ac_given_srcdir" in
2164 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2165 /*) top_srcdir="$ac_given_srcdir" ;;
2166 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2167 esac
2168
2169 # Find a way to echo strings without interpreting backslash.
2170 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
2171 gt_echo='echo'
2172 else
2173 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
2174 gt_echo='printf %s\n'
2175 else
2176 echo_func () {
2177 cat <<EOT
2178 $*
2179 EOT
2180 }
2181 gt_echo='echo_func'
2182 fi
2183 fi
2184
2185 # A sed script that extracts the value of VARIABLE from a Makefile.
2186 tab=`printf '\t'`
2187 sed_x_variable='
2188 # Test if the hold space is empty.
2189 x
2190 s/P/P/
2191 x
2192 ta
2193 # Yes it was empty. Look if we have the expected variable definition.
2194 /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
2195 # Seen the first line of the variable definition.
2196 s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
2197 ba
2198 }
2199 bd
2200 :a
2201 # Here we are processing a line from the variable definition.
2202 # Remove comment, more precisely replace it with a space.
2203 s/#.*$/ /
2204 # See if the line ends in a backslash.
2205 tb
2206 :b
2207 s/\\$//
2208 # Print the line, without the trailing backslash.
2209 p
2210 tc
2211 # There was no trailing backslash. The end of the variable definition is
2212 # reached. Clear the hold space.
2213 s/^.*$//
2214 x
2215 bd
2216 :c
2217 # A trailing backslash means that the variable definition continues in the
2218 # next line. Put a nonempty string into the hold space to indicate this.
2219 s/^.*$/P/
2220 x
2221 :d
2222 '
2223 changequote([,])dnl
2224
2225 # Set POTFILES to the value of the Makefile variable POTFILES.
2226 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
2227 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
2228 # Compute POTFILES_DEPS as
2229 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
2230 POTFILES_DEPS=
2231 for file in $POTFILES; do
2232 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
2233 done
2234 POMAKEFILEDEPS=""
2235
2236 if test -n "$OBSOLETE_ALL_LINGUAS"; then
2237 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
2238 fi
2239 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
2240 # The LINGUAS file contains the set of available languages.
2241 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
2242 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
2243 else
2244 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
2245 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
2246 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
2247 fi
2248 # Hide the ALL_LINGUAS assignment from automake < 1.5.
2249 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
2250 # Compute POFILES
2251 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
2252 # Compute UPDATEPOFILES
2253 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
2254 # Compute DUMMYPOFILES
2255 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
2256 # Compute GMOFILES
2257 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
2258 # Compute PROPERTIESFILES
2259 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
2260 # Compute CLASSFILES
2261 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
2262 # Compute QMFILES
2263 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
2264 # Compute MSGFILES
2265 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
2266 # Compute RESOURCESDLLFILES
2267 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
2268 case "$ac_given_srcdir" in
2269 .) srcdirpre= ;;
2270 *) srcdirpre='$(srcdir)/' ;;
2271 esac
2272 POFILES=
2273 UPDATEPOFILES=
2274 DUMMYPOFILES=
2275 GMOFILES=
2276 PROPERTIESFILES=
2277 CLASSFILES=
2278 QMFILES=
2279 MSGFILES=
2280 RESOURCESDLLFILES=
2281 for lang in $ALL_LINGUAS; do
2282 POFILES="$POFILES $srcdirpre$lang.po"
2283 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2284 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2285 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2286 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
2287 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
2288 QMFILES="$QMFILES $srcdirpre$lang.qm"
2289 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2290 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
2291 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2292 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
2293 done
2294 # CATALOGS depends on both $ac_dir and the user's LINGUAS
2295 # environment variable.
2296 INST_LINGUAS=
2297 if test -n "$ALL_LINGUAS"; then
2298 for presentlang in $ALL_LINGUAS; do
2299 useit=no
2300 if test "%UNSET%" != "$LINGUAS"; then
2301 desiredlanguages="$LINGUAS"
2302 else
2303 desiredlanguages="$ALL_LINGUAS"
2304 fi
2305 for desiredlang in $desiredlanguages; do
2306 # Use the presentlang catalog if desiredlang is
2307 # a. equal to presentlang, or
2308 # b. a variant of presentlang (because in this case,
2309 # presentlang can be used as a fallback for messages
2310 # which are not translated in the desiredlang catalog).
2311 case "$desiredlang" in
2312 "$presentlang"*) useit=yes;;
2313 esac
2314 done
2315 if test $useit = yes; then
2316 INST_LINGUAS="$INST_LINGUAS $presentlang"
2317 fi
2318 done
2319 fi
2320 CATALOGS=
2321 JAVACATALOGS=
2322 QTCATALOGS=
2323 TCLCATALOGS=
2324 CSHARPCATALOGS=
2325 if test -n "$INST_LINGUAS"; then
2326 for lang in $INST_LINGUAS; do
2327 CATALOGS="$CATALOGS $lang.gmo"
2328 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
2329 QTCATALOGS="$QTCATALOGS $lang.qm"
2330 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2331 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
2332 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2333 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
2334 done
2335 fi
2336
2337 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
2338 tab=`printf '\t'`
2339 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
2340 # Add dependencies that cannot be formulated as a simple suffix rule.
2341 for lang in $ALL_LINGUAS; do
2342 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2343 cat >> "$ac_file.tmp" <<EOF
2344 $frobbedlang.msg: $lang.po
2345 ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
2346 ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2347 EOF
2348 done
2349 fi
2350 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
2351 # Add dependencies that cannot be formulated as a simple suffix rule.
2352 for lang in $ALL_LINGUAS; do
2353 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2354 cat >> "$ac_file.tmp" <<EOF
2355 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
2356 ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
2357 ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2358 EOF
2359 done
2360 fi
2361 if test -n "$POMAKEFILEDEPS"; then
2362 cat >> "$ac_file.tmp" <<EOF
2363 Makefile: $POMAKEFILEDEPS
2364 EOF
2365 fi
2366 mv "$ac_file.tmp" "$ac_file"
2367 ])
2368
2369 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
2370 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
2371 [
2372 XGETTEXT_EXTRA_OPTIONS=
2373 ])
2374
2375 dnl Registers an option to be passed to xgettext in the po subdirectory.
2376 AC_DEFUN([AM_XGETTEXT_OPTION],
2377 [
2378 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
2379 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
2380 ])
2381
2382 # progtest.m4 serial 7 (gettext-0.18.2)
2383 dnl Copyright (C) 1996-2003, 2005, 2008-2016 Free Software Foundation, Inc.
2384 dnl This file is free software; the Free Software Foundation
2385 dnl gives unlimited permission to copy and/or distribute it,
2386 dnl with or without modifications, as long as this notice is preserved.
2387 dnl
2388 dnl This file can be used in projects which are not available under
2389 dnl the GNU General Public License or the GNU Library General Public
2390 dnl License but which still want to provide support for the GNU gettext
2391 dnl functionality.
2392 dnl Please note that the actual code of the GNU gettext library is covered
2393 dnl by the GNU Library General Public License, and the rest of the GNU
2394 dnl gettext package is covered by the GNU General Public License.
2395 dnl They are *not* in the public domain.
2396
2397 dnl Authors:
2398 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2399
2400 AC_PREREQ([2.50])
2401
2402 # Search path for a program which passes the given test.
2403
2404 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2405 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2406 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2407 [
2408 # Prepare PATH_SEPARATOR.
2409 # The user is always right.
2410 if test "${PATH_SEPARATOR+set}" != set; then
2411 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
2412 # contains only /bin. Note that ksh looks also at the FPATH variable,
2413 # so we have to set that as well for the test.
2414 PATH_SEPARATOR=:
2415 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
2416 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
2417 || PATH_SEPARATOR=';'
2418 }
2419 fi
2420
2421 # Find out how to test for executable files. Don't use a zero-byte file,
2422 # as systems may use methods other than mode bits to determine executability.
2423 cat >conf$$.file <<_ASEOF
2424 #! /bin/sh
2425 exit 0
2426 _ASEOF
2427 chmod +x conf$$.file
2428 if test -x conf$$.file >/dev/null 2>&1; then
2429 ac_executable_p="test -x"
2430 else
2431 ac_executable_p="test -f"
2432 fi
2433 rm -f conf$$.file
2434
2435 # Extract the first word of "$2", so it can be a program name with args.
2436 set dummy $2; ac_word=[$]2
2437 AC_MSG_CHECKING([for $ac_word])
2438 AC_CACHE_VAL([ac_cv_path_$1],
2439 [case "[$]$1" in
2440 [[\\/]]* | ?:[[\\/]]*)
2441 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2442 ;;
2443 *)
2444 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2445 for ac_dir in ifelse([$5], , $PATH, [$5]); do
2446 IFS="$ac_save_IFS"
2447 test -z "$ac_dir" && ac_dir=.
2448 for ac_exec_ext in '' $ac_executable_extensions; do
2449 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2450 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
2451 if [$3]; then
2452 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
2453 break 2
2454 fi
2455 fi
2456 done
2457 done
2458 IFS="$ac_save_IFS"
2459 dnl If no 4th arg is given, leave the cache variable unset,
2460 dnl so AC_PATH_PROGS will keep looking.
2461 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2462 ])dnl
2463 ;;
2464 esac])dnl
2465 $1="$ac_cv_path_$1"
2466 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2467 AC_MSG_RESULT([$][$1])
2468 else
2469 AC_MSG_RESULT([no])
2470 fi
2471 AC_SUBST([$1])dnl
2472 ])
212473
222474 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
232475 #
11883640 AC_SUBST([am__untar])
11893641 ]) # _AM_PROG_TAR
11903642
1191 m4_include([m4/gettext.m4])
1192 m4_include([m4/iconv.m4])
1193 m4_include([m4/intlmacosx.m4])
1194 m4_include([m4/lib-ld.m4])
1195 m4_include([m4/lib-link.m4])
1196 m4_include([m4/lib-prefix.m4])
1197 m4_include([m4/nls.m4])
1198 m4_include([m4/po.m4])
1199 m4_include([m4/progtest.m4])
00 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define if building universal (internal helper macro) */
3 #undef AC_APPLE_UNIVERSAL_BUILD
4
5 /* audio_wav */
6 #undef AUDIO_DEFAULT
7
8 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
9 systems. This function is required for `alloca.c' support on those systems.
10 */
11 #undef CRAY_STACKSEG_END
12
13 /* Define to 1 if using `alloca.c'. */
14 #undef C_ALLOCA
15
16 /* Define to enable diagnostic debugging support. */
17 #undef DEBUG
118
219 /* Define to 1 if translation of program messages to the user's native
320 language is requested. */
421 #undef ENABLE_NLS
522
23 /* Define to enable experimental code. */
24 #undef EXPERIMENTAL
25
26 /* Define to 1 if you have `alloca', as a function or macro. */
27 #undef HAVE_ALLOCA
28
29 /* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
30 */
31 #undef HAVE_ALLOCA_H
32
33 /* Define to 1 if you have the <argz.h> header file. */
34 #undef HAVE_ARGZ_H
35
636 /* Define to 1 if you have the `atexit' function. */
737 #undef HAVE_ATEXIT
838
1848 */
1949 #undef HAVE_DCGETTEXT
2050
51 /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
52 #undef HAVE_DOPRNT
53
2154 /* Define to 1 if you have the <fcntl.h> header file. */
2255 #undef HAVE_FCNTL_H
2356
57 /* Define to 1 if you have the <float.h> header file. */
58 #undef HAVE_FLOAT_H
59
2460 /* Define to 1 if you have the `fork' function. */
2561 #undef HAVE_FORK
2662
2763 /* Define to 1 if you have the `ftruncate' function. */
2864 #undef HAVE_FTRUNCATE
2965
66 /* Define to 1 if you have the `getcwd' function. */
67 #undef HAVE_GETCWD
68
69 /* Define to 1 if you have the `getpagesize' function. */
70 #undef HAVE_GETPAGESIZE
71
3072 /* Define if the GNU gettext() function is already present or preinstalled. */
3173 #undef HAVE_GETTEXT
3274
3981 /* Define to 1 if you have the `isascii' function. */
4082 #undef HAVE_ISASCII
4183
84 /* Define to 1 if you have the <langinfo.h> header file. */
85 #undef HAVE_LANGINFO_H
86
87 /* Define to 1 if you have the `asound' library (-lasound). */
88 #undef HAVE_LIBASOUND
89
4290 /* Define to 1 if you have the `cdio' library (-lcdio). */
4391 #undef HAVE_LIBCDIO
4492
4896 /* Define to 1 if you have the `cdio_paranoia' library (-lcdio_paranoia). */
4997 #undef HAVE_LIBCDIO_PARANOIA
5098
99 /* Define to 1 if you have the `efence' library (-lefence). */
100 #undef HAVE_LIBEFENCE
101
102 /* Define to 1 if you have the `id3' library (-lid3). */
103 #undef HAVE_LIBID3
104
105 /* Define to 1 if you have the `id3tag' library (-lid3tag). */
106 #undef HAVE_LIBID3TAG
107
51108 /* Define to 1 if you have the <libintl.h> header file. */
52109 #undef HAVE_LIBINTL_H
53110
111 /* Define to 1 if you have the `mad' library (-lmad). */
112 #undef HAVE_LIBMAD
113
54114 /* Define to 1 if you have the `magic' library (-lmagic). */
55115 #undef HAVE_LIBMAGIC
56116
63123 /* Define to 1 if you have the `xml2' library (-lxml2). */
64124 #undef HAVE_LIBXML2
65125
126 /* Define to 1 if you have the <limits.h> header file. */
127 #undef HAVE_LIMITS_H
128
129 /* Define to 1 if you have the `localeconv' function. */
130 #undef HAVE_LOCALECONV
131
66132 /* Define to 1 if you have the <locale.h> header file. */
67133 #undef HAVE_LOCALE_H
134
135 /* Define to 1 if you have the `madvise' function. */
136 #undef HAVE_MADVISE
68137
69138 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
70139 to 0 otherwise. */
71140 #undef HAVE_MALLOC
72141
142 /* Define to 1 if you have the <malloc.h> header file. */
143 #undef HAVE_MALLOC_H
144
145 /* Define to 1 if you have the `memmove' function. */
146 #undef HAVE_MEMMOVE
147
73148 /* Define to 1 if you have the <memory.h> header file. */
74149 #undef HAVE_MEMORY_H
75150
151 /* Define to 1 if you have the `mempcpy' function. */
152 #undef HAVE_MEMPCPY
153
154 /* Define to 1 if you have the `memset' function. */
155 #undef HAVE_MEMSET
156
76157 /* Define to 1 if you have the `mkdir' function. */
77158 #undef HAVE_MKDIR
159
160 /* Define to 1 if you have a working `mmap' system call. */
161 #undef HAVE_MMAP
162
163 /* Define to 1 if you have the `munmap' function. */
164 #undef HAVE_MUNMAP
165
166 /* Define to 1 if you have the `nl_langinfo' function. */
167 #undef HAVE_NL_LANGINFO
168
169 /* Define to 1 if you have the `pow' function. */
170 #undef HAVE_POW
171
172 /* Define to 1 if the system has the type `ptrdiff_t'. */
173 #undef HAVE_PTRDIFF_T
78174
79175 /* Define to 1 if your system has a GNU libc compatible `realloc' function,
80176 and to 0 otherwise. */
89185 /* Define to 1 if you have the `setlocale' function. */
90186 #undef HAVE_SETLOCALE
91187
188 /* Define to 1 if you have the <stddef.h> header file. */
189 #undef HAVE_STDDEF_H
190
92191 /* Define to 1 if you have the <stdint.h> header file. */
93192 #undef HAVE_STDINT_H
94193
194 /* Define to 1 if you have the <stdio_ext.h> header file. */
195 #undef HAVE_STDIO_EXT_H
196
95197 /* Define to 1 if you have the <stdlib.h> header file. */
96198 #undef HAVE_STDLIB_H
97199
200 /* Define to 1 if you have the `stpcpy' function. */
201 #undef HAVE_STPCPY
202
98203 /* Define to 1 if you have the `strcasecmp' function. */
99204 #undef HAVE_STRCASECMP
100205
101206 /* Define to 1 if you have the `strchr' function. */
102207 #undef HAVE_STRCHR
103208
209 /* Define to 1 if you have the `strcspn' function. */
210 #undef HAVE_STRCSPN
211
104212 /* Define to 1 if you have the `strdup' function. */
105213 #undef HAVE_STRDUP
106214
113221 /* Define to 1 if you have the <string.h> header file. */
114222 #undef HAVE_STRING_H
115223
224 /* Define to 1 if you have the `strncasecmp' function. */
225 #undef HAVE_STRNCASECMP
226
116227 /* Define to 1 if you have the `strrchr' function. */
117228 #undef HAVE_STRRCHR
118229
119230 /* Define to 1 if you have the `strstr' function. */
120231 #undef HAVE_STRSTR
121232
233 /* Define to 1 if you have the `strtol' function. */
234 #undef HAVE_STRTOL
235
236 /* Define to 1 if you have the `strtoul' function. */
237 #undef HAVE_STRTOUL
238
122239 /* Define to 1 if you have the <sys/ioctl.h> header file. */
123240 #undef HAVE_SYS_IOCTL_H
124241
242 /* Define to 1 if you have the <sys/param.h> header file. */
243 #undef HAVE_SYS_PARAM_H
244
125245 /* Define to 1 if you have the <sys/stat.h> header file. */
126246 #undef HAVE_SYS_STAT_H
127247
128248 /* Define to 1 if you have the <sys/types.h> header file. */
129249 #undef HAVE_SYS_TYPES_H
130250
251 /* Define to 1 if you have the <termios.h> header file. */
252 #undef HAVE_TERMIOS_H
253
131254 /* Define to 1 if you have the <unistd.h> header file. */
132255 #undef HAVE_UNISTD_H
133256
137260 /* Define to 1 if you have the <vfork.h> header file. */
138261 #undef HAVE_VFORK_H
139262
263 /* Define to 1 if you have the `vprintf' function. */
264 #undef HAVE_VPRINTF
265
266 /* Define to 1 if you have the <wchar.h> header file. */
267 #undef HAVE_WCHAR_H
268
140269 /* Define to 1 if `fork' works. */
141270 #undef HAVE_WORKING_FORK
142271
143272 /* Define to 1 if `vfork' works. */
144273 #undef HAVE_WORKING_VFORK
145274
275 /* Define to 1 if the system has the type `_Bool'. */
276 #undef HAVE__BOOL
277
278 /* Define to 1 if you have the `__argz_count' function. */
279 #undef HAVE___ARGZ_COUNT
280
281 /* Define to 1 if you have the `__argz_next' function. */
282 #undef HAVE___ARGZ_NEXT
283
284 /* Define to 1 if you have the `__argz_stringify' function. */
285 #undef HAVE___ARGZ_STRINGIFY
286
287 /* Define to disable debugging assertions. */
288 #undef NDEBUG
289
146290 /* Name of package */
147291 #undef PACKAGE
148292
164308 /* Define to the version of this package. */
165309 #undef PACKAGE_VERSION
166310
311 /* If using the C implementation of alloca, define if you know the
312 direction of stack growth for your system; otherwise it will be
313 automatically deduced at runtime.
314 STACK_DIRECTION > 0 => grows toward higher addresses
315 STACK_DIRECTION < 0 => grows toward lower addresses
316 STACK_DIRECTION = 0 => direction of growth unknown */
317 #undef STACK_DIRECTION
318
167319 /* Define to 1 if you have the ANSI C header files. */
168320 #undef STDC_HEADERS
169321
170322 /* Version number of package */
171323 #undef VERSION
324
325 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
326 significant byte first (like Motorola and SPARC, unlike Intel). */
327 #if defined AC_APPLE_UNIVERSAL_BUILD
328 # if defined __BIG_ENDIAN__
329 # define WORDS_BIGENDIAN 1
330 # endif
331 #else
332 # ifndef WORDS_BIGENDIAN
333 # undef WORDS_BIGENDIAN
334 # endif
335 #endif
336
337 /* Define to empty if `const' does not conform to ANSI C. */
338 #undef const
172339
173340 /* Define to `__inline__' or `__inline' if that's what the C compiler
174341 calls it, or to nothing if 'inline' is not supported under any name. */
192359 /* Define to `unsigned int' if <sys/types.h> does not define. */
193360 #undef size_t
194361
362 /* Define to `int' if <sys/types.h> does not define. */
363 #undef ssize_t
364
195365 /* Define as `fork' if `vfork' does not work. */
196366 #undef vfork
+4317
-123
configure less more
00 #! /bin/sh
1 # From configure.ac Id: configure.ac,v 1.17 2004/02/23 21:34:53 rob Exp .
12 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for daisy-player 10.5.2.
3 # Generated by GNU Autoconf 2.69 for daisy-player 10.6.
34 #
45 # Report bugs to <jos@jlemmens.nl>.
56 #
579580 # Identity of this package.
580581 PACKAGE_NAME='daisy-player'
581582 PACKAGE_TARNAME='daisy-player'
582 PACKAGE_VERSION='10.5.2'
583 PACKAGE_STRING='daisy-player 10.5.2'
583 PACKAGE_VERSION='10.6'
584 PACKAGE_STRING='daisy-player 10.6'
584585 PACKAGE_BUGREPORT='jos@jlemmens.nl'
585586 PACKAGE_URL='www.jlemmens.nl'
586587
622623 #endif"
623624
624625 gt_needs=
626 ac_header_list=
627 ac_unique_file="src/madplay"
625628 ac_subst_vars='am__EXEEXT_FALSE
626629 am__EXEEXT_TRUE
627630 LTLIBOBJS
631 ldadd_audio
632 depend_audio
633 ALLOCA
634 YFLAGS
635 YACC
628636 POW_LIB
629637 LIBOBJS
630638 POSUB
780788 enable_rpath
781789 with_libiconv_prefix
782790 with_libintl_prefix
791 enable_profiling
792 enable_debugging
793 enable_experimental
783794 '
784795 ac_precious_vars='build_alias
785796 host_alias
798809 OBJCXX
799810 OBJCXXFLAGS
800811 CCAS
801 CCASFLAGS'
812 CCASFLAGS
813 YACC
814 YFLAGS'
802815
803816
804817 # Initialize some variables set by options.
13491362 # Omit some internal or obsolete options to make the list less imposing.
13501363 # This message is too long to be a string in the A/UX 3.1 sh.
13511364 cat <<_ACEOF
1352 \`configure' configures daisy-player 10.5.2 to adapt to many kinds of systems.
1365 \`configure' configures daisy-player 10.6 to adapt to many kinds of systems.
13531366
13541367 Usage: $0 [OPTION]... [VAR=VALUE]...
13551368
14201433
14211434 if test -n "$ac_init_help"; then
14221435 case $ac_init_help in
1423 short | recursive ) echo "Configuration of daisy-player 10.5.2:";;
1436 short | recursive ) echo "Configuration of daisy-player 10.6:";;
14241437 esac
14251438 cat <<\_ACEOF
14261439
14361449 speeds up one-time build
14371450 --disable-nls do not use Native Language Support
14381451 --disable-rpath do not hardcode runtime library paths
1452 --enable-profiling generate profiling code
1453 --enable-debugging enable diagnostic debugging support
1454 --disable-debugging do not enable debugging and use more optimization
1455 --enable-experimental enable experimental code
14391456
14401457 Optional Packages:
14411458 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
14631480 OBJCXXFLAGS Objective C++ compiler flags
14641481 CCAS assembler compiler command (defaults to CC)
14651482 CCASFLAGS assembler compiler flags (defaults to CFLAGS)
1483 YACC The `Yet Another Compiler Compiler' implementation to use.
1484 Defaults to the first program found out of: `bison -y', `byacc',
1485 `yacc'.
1486 YFLAGS The list of arguments that will be passed by default to $YACC.
1487 This script will default YFLAGS to the empty string to avoid a
1488 default value of `-d' given by some make applications.
14661489
14671490 Use these variables to override the choices made by `configure' or to help
14681491 it to find libraries and programs with nonstandard names/locations.
15311554 test -n "$ac_init_help" && exit $ac_status
15321555 if $ac_init_version; then
15331556 cat <<\_ACEOF
1534 daisy-player configure 10.5.2
1557 daisy-player configure 10.6
15351558 generated by GNU Autoconf 2.69
15361559
15371560 Copyright (C) 2012 Free Software Foundation, Inc.
21442167 This file contains any messages produced by compilers while
21452168 running configure, to aid debugging if configure makes a mistake.
21462169
2147 It was created by daisy-player $as_me 10.5.2, which was
2170 It was created by daisy-player $as_me 10.6, which was
21482171 generated by GNU Autoconf 2.69. Invocation command line was
21492172
21502173 $ $0 $@
24252448 fi
24262449
24272450 gt_needs="$gt_needs "
2451 as_fn_append ac_header_list " stdlib.h"
2452 as_fn_append ac_header_list " unistd.h"
2453 as_fn_append ac_header_list " sys/param.h"
24282454 gt_needs="$gt_needs "
24292455 # Check that the precious variables saved in the cache have kept the same
24302456 # value.
24942520 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24952521
24962522
2497 am__api_version='1.15'
2523 am__api_version='1.15'
24982524
24992525 ac_aux_dir=
25002526 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
30093035
30103036 # Define the identity of the package.
30113037 PACKAGE='daisy-player'
3012 VERSION='10.5.2'
3038 VERSION='10.6'
30133039
30143040
30153041 cat >>confdefs.h <<_ACEOF
59665992
59675993
59685994
5969 #AM_PROG_UPC
59705995
59715996 # Checks for libraries.
59725997 # FIXME: Replace `main' with a function in `-lcdio':
60106035
60116036 fi
60126037
6013 # FIXME: Replace `main' with a function in `-lcdio_cdda':
6014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcdio_cdda" >&5
6015 $as_echo_n "checking for main in -lcdio_cdda... " >&6; }
6016 if ${ac_cv_lib_cdio_cdda_main+:} false; then :
6038 # FIXME: Replace `main' with a function in `-lid3':
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lid3" >&5
6040 $as_echo_n "checking for main in -lid3... " >&6; }
6041 if ${ac_cv_lib_id3_main+:} false; then :
60176042 $as_echo_n "(cached) " >&6
60186043 else
60196044 ac_check_lib_save_LIBS=$LIBS
6020 LIBS="-lcdio_cdda $LIBS"
6045 LIBS="-lid3 $LIBS"
60216046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60226047 /* end confdefs.h. */
60236048
60316056 }
60326057 _ACEOF
60336058 if ac_fn_c_try_link "$LINENO"; then :
6034 ac_cv_lib_cdio_cdda_main=yes
6035 else
6036 ac_cv_lib_cdio_cdda_main=no
6059 ac_cv_lib_id3_main=yes
6060 else
6061 ac_cv_lib_id3_main=no
60376062 fi
60386063 rm -f core conftest.err conftest.$ac_objext \
60396064 conftest$ac_exeext conftest.$ac_ext
60406065 LIBS=$ac_check_lib_save_LIBS
60416066 fi
6042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdio_cdda_main" >&5
6043 $as_echo "$ac_cv_lib_cdio_cdda_main" >&6; }
6044 if test "x$ac_cv_lib_cdio_cdda_main" = xyes; then :
6067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_id3_main" >&5
6068 $as_echo "$ac_cv_lib_id3_main" >&6; }
6069 if test "x$ac_cv_lib_id3_main" = xyes; then :
60456070 cat >>confdefs.h <<_ACEOF
6046 #define HAVE_LIBCDIO_CDDA 1
6047 _ACEOF
6048
6049 LIBS="-lcdio_cdda $LIBS"
6050
6051 fi
6052
6053 # FIXME: Replace `main' with a function in `-lcdio_paranoia':
6054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcdio_paranoia" >&5
6055 $as_echo_n "checking for main in -lcdio_paranoia... " >&6; }
6056 if ${ac_cv_lib_cdio_paranoia_main+:} false; then :
6071 #define HAVE_LIBID3 1
6072 _ACEOF
6073
6074 LIBS="-lid3 $LIBS"
6075
6076 fi
6077
6078 # FIXME: Replace `main' with a function in `-lid3tag':
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lid3tag" >&5
6080 $as_echo_n "checking for main in -lid3tag... " >&6; }
6081 if ${ac_cv_lib_id3tag_main+:} false; then :
60576082 $as_echo_n "(cached) " >&6
60586083 else
60596084 ac_check_lib_save_LIBS=$LIBS
6060 LIBS="-lcdio_paranoia $LIBS"
6085 LIBS="-lid3tag $LIBS"
60616086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60626087 /* end confdefs.h. */
60636088
60716096 }
60726097 _ACEOF
60736098 if ac_fn_c_try_link "$LINENO"; then :
6074 ac_cv_lib_cdio_paranoia_main=yes
6075 else
6076 ac_cv_lib_cdio_paranoia_main=no
6099 ac_cv_lib_id3tag_main=yes
6100 else
6101 ac_cv_lib_id3tag_main=no
60776102 fi
60786103 rm -f core conftest.err conftest.$ac_objext \
60796104 conftest$ac_exeext conftest.$ac_ext
60806105 LIBS=$ac_check_lib_save_LIBS
60816106 fi
6082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdio_paranoia_main" >&5
6083 $as_echo "$ac_cv_lib_cdio_paranoia_main" >&6; }
6084 if test "x$ac_cv_lib_cdio_paranoia_main" = xyes; then :
6107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_id3tag_main" >&5
6108 $as_echo "$ac_cv_lib_id3tag_main" >&6; }
6109 if test "x$ac_cv_lib_id3tag_main" = xyes; then :
60856110 cat >>confdefs.h <<_ACEOF
6086 #define HAVE_LIBCDIO_PARANOIA 1
6087 _ACEOF
6088
6089 LIBS="-lcdio_paranoia $LIBS"
6090
6091 fi
6092
6093 # FIXME: Replace `main' with a function in `-lmagic':
6094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmagic" >&5
6095 $as_echo_n "checking for main in -lmagic... " >&6; }
6096 if ${ac_cv_lib_magic_main+:} false; then :
6111 #define HAVE_LIBID3TAG 1
6112 _ACEOF
6113
6114 LIBS="-lid3tag $LIBS"
6115
6116 fi
6117
6118 # FIXME: Replace `main' with a function in `-lcdio_cdda':
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcdio_cdda" >&5
6120 $as_echo_n "checking for main in -lcdio_cdda... " >&6; }
6121 if ${ac_cv_lib_cdio_cdda_main+:} false; then :
60976122 $as_echo_n "(cached) " >&6
60986123 else
60996124 ac_check_lib_save_LIBS=$LIBS
6100 LIBS="-lmagic $LIBS"
6125 LIBS="-lcdio_cdda $LIBS"
61016126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61026127 /* end confdefs.h. */
61036128
61116136 }
61126137 _ACEOF
61136138 if ac_fn_c_try_link "$LINENO"; then :
6114 ac_cv_lib_magic_main=yes
6115 else
6116 ac_cv_lib_magic_main=no
6139 ac_cv_lib_cdio_cdda_main=yes
6140 else
6141 ac_cv_lib_cdio_cdda_main=no
61176142 fi
61186143 rm -f core conftest.err conftest.$ac_objext \
61196144 conftest$ac_exeext conftest.$ac_ext
61206145 LIBS=$ac_check_lib_save_LIBS
61216146 fi
6122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_main" >&5
6123 $as_echo "$ac_cv_lib_magic_main" >&6; }
6124 if test "x$ac_cv_lib_magic_main" = xyes; then :
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdio_cdda_main" >&5
6148 $as_echo "$ac_cv_lib_cdio_cdda_main" >&6; }
6149 if test "x$ac_cv_lib_cdio_cdda_main" = xyes; then :
61256150 cat >>confdefs.h <<_ACEOF
6126 #define HAVE_LIBMAGIC 1
6127 _ACEOF
6128
6129 LIBS="-lmagic $LIBS"
6130
6131 fi
6132
6133 # FIXME: Replace `main' with a function in `-lncursesw':
6134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lncursesw" >&5
6135 $as_echo_n "checking for main in -lncursesw... " >&6; }
6136 if ${ac_cv_lib_ncursesw_main+:} false; then :
6151 #define HAVE_LIBCDIO_CDDA 1
6152 _ACEOF
6153
6154 LIBS="-lcdio_cdda $LIBS"
6155
6156 fi
6157
6158 # FIXME: Replace `main' with a function in `-lcdio_paranoia':
6159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcdio_paranoia" >&5
6160 $as_echo_n "checking for main in -lcdio_paranoia... " >&6; }
6161 if ${ac_cv_lib_cdio_paranoia_main+:} false; then :
61376162 $as_echo_n "(cached) " >&6
61386163 else
61396164 ac_check_lib_save_LIBS=$LIBS
6140 LIBS="-lncursesw $LIBS"
6165 LIBS="-lcdio_paranoia $LIBS"
61416166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61426167 /* end confdefs.h. */
61436168
61516176 }
61526177 _ACEOF
61536178 if ac_fn_c_try_link "$LINENO"; then :
6154 ac_cv_lib_ncursesw_main=yes
6155 else
6156 ac_cv_lib_ncursesw_main=no
6179 ac_cv_lib_cdio_paranoia_main=yes
6180 else
6181 ac_cv_lib_cdio_paranoia_main=no
61576182 fi
61586183 rm -f core conftest.err conftest.$ac_objext \
61596184 conftest$ac_exeext conftest.$ac_ext
61606185 LIBS=$ac_check_lib_save_LIBS
61616186 fi
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_main" >&5
6163 $as_echo "$ac_cv_lib_ncursesw_main" >&6; }
6164 if test "x$ac_cv_lib_ncursesw_main" = xyes; then :
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdio_paranoia_main" >&5
6188 $as_echo "$ac_cv_lib_cdio_paranoia_main" >&6; }
6189 if test "x$ac_cv_lib_cdio_paranoia_main" = xyes; then :
61656190 cat >>confdefs.h <<_ACEOF
6166 #define HAVE_LIBNCURSESW 1
6167 _ACEOF
6168
6169 LIBS="-lncursesw $LIBS"
6170
6171 fi
6172
6173 # FIXME: Replace `main' with a function in `-lsox':
6174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsox" >&5
6175 $as_echo_n "checking for main in -lsox... " >&6; }
6176 if ${ac_cv_lib_sox_main+:} false; then :
6191 #define HAVE_LIBCDIO_PARANOIA 1
6192 _ACEOF
6193
6194 LIBS="-lcdio_paranoia $LIBS"
6195
6196 fi
6197
6198 # FIXME: Replace `main' with a function in `-lmagic':
6199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmagic" >&5
6200 $as_echo_n "checking for main in -lmagic... " >&6; }
6201 if ${ac_cv_lib_magic_main+:} false; then :
61776202 $as_echo_n "(cached) " >&6
61786203 else
61796204 ac_check_lib_save_LIBS=$LIBS
6180 LIBS="-lsox $LIBS"
6205 LIBS="-lmagic $LIBS"
61816206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
61826207 /* end confdefs.h. */
61836208
61916216 }
61926217 _ACEOF
61936218 if ac_fn_c_try_link "$LINENO"; then :
6194 ac_cv_lib_sox_main=yes
6195 else
6196 ac_cv_lib_sox_main=no
6219 ac_cv_lib_magic_main=yes
6220 else
6221 ac_cv_lib_magic_main=no
61976222 fi
61986223 rm -f core conftest.err conftest.$ac_objext \
61996224 conftest$ac_exeext conftest.$ac_ext
62006225 LIBS=$ac_check_lib_save_LIBS
62016226 fi
6202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sox_main" >&5
6203 $as_echo "$ac_cv_lib_sox_main" >&6; }
6204 if test "x$ac_cv_lib_sox_main" = xyes; then :
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_main" >&5
6228 $as_echo "$ac_cv_lib_magic_main" >&6; }
6229 if test "x$ac_cv_lib_magic_main" = xyes; then :
62056230 cat >>confdefs.h <<_ACEOF
6206 #define HAVE_LIBSOX 1
6207 _ACEOF
6208
6209 LIBS="-lsox $LIBS"
6210
6211 fi
6212
6213 # FIXME: Replace `main' with a function in `-lxml2':
6214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lxml2" >&5
6215 $as_echo_n "checking for main in -lxml2... " >&6; }
6216 if ${ac_cv_lib_xml2_main+:} false; then :
6231 #define HAVE_LIBMAGIC 1
6232 _ACEOF
6233
6234 LIBS="-lmagic $LIBS"
6235
6236 fi
6237
6238 # FIXME: Replace `main' with a function in `-lncursesw':
6239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lncursesw" >&5
6240 $as_echo_n "checking for main in -lncursesw... " >&6; }
6241 if ${ac_cv_lib_ncursesw_main+:} false; then :
62176242 $as_echo_n "(cached) " >&6
62186243 else
62196244 ac_check_lib_save_LIBS=$LIBS
6220 LIBS="-lxml2 $LIBS"
6245 LIBS="-lncursesw $LIBS"
62216246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62226247 /* end confdefs.h. */
62236248
62316256 }
62326257 _ACEOF
62336258 if ac_fn_c_try_link "$LINENO"; then :
6259 ac_cv_lib_ncursesw_main=yes
6260 else
6261 ac_cv_lib_ncursesw_main=no
6262 fi
6263 rm -f core conftest.err conftest.$ac_objext \
6264 conftest$ac_exeext conftest.$ac_ext
6265 LIBS=$ac_check_lib_save_LIBS
6266 fi
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_main" >&5
6268 $as_echo "$ac_cv_lib_ncursesw_main" >&6; }
6269 if test "x$ac_cv_lib_ncursesw_main" = xyes; then :
6270 cat >>confdefs.h <<_ACEOF
6271 #define HAVE_LIBNCURSESW 1
6272 _ACEOF
6273
6274 LIBS="-lncursesw $LIBS"
6275
6276 fi
6277
6278 # FIXME: Replace `main' with a function in `-lsox':
6279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsox" >&5
6280 $as_echo_n "checking for main in -lsox... " >&6; }
6281 if ${ac_cv_lib_sox_main+:} false; then :
6282 $as_echo_n "(cached) " >&6
6283 else
6284 ac_check_lib_save_LIBS=$LIBS
6285 LIBS="-lsox $LIBS"
6286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6287 /* end confdefs.h. */
6288
6289
6290 int
6291 main ()
6292 {
6293 return main ();
6294 ;
6295 return 0;
6296 }
6297 _ACEOF
6298 if ac_fn_c_try_link "$LINENO"; then :
6299 ac_cv_lib_sox_main=yes
6300 else
6301 ac_cv_lib_sox_main=no
6302 fi
6303 rm -f core conftest.err conftest.$ac_objext \
6304 conftest$ac_exeext conftest.$ac_ext
6305 LIBS=$ac_check_lib_save_LIBS
6306 fi
6307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sox_main" >&5
6308 $as_echo "$ac_cv_lib_sox_main" >&6; }
6309 if test "x$ac_cv_lib_sox_main" = xyes; then :
6310 cat >>confdefs.h <<_ACEOF
6311 #define HAVE_LIBSOX 1
6312 _ACEOF
6313
6314 LIBS="-lsox $LIBS"
6315
6316 fi
6317
6318 # FIXME: Replace `main' with a function in `-lxml2':
6319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lxml2" >&5
6320 $as_echo_n "checking for main in -lxml2... " >&6; }
6321 if ${ac_cv_lib_xml2_main+:} false; then :
6322 $as_echo_n "(cached) " >&6
6323 else
6324 ac_check_lib_save_LIBS=$LIBS
6325 LIBS="-lxml2 $LIBS"
6326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6327 /* end confdefs.h. */
6328
6329
6330 int
6331 main ()
6332 {
6333 return main ();
6334 ;
6335 return 0;
6336 }
6337 _ACEOF
6338 if ac_fn_c_try_link "$LINENO"; then :
62346339 ac_cv_lib_xml2_main=yes
62356340 else
62366341 ac_cv_lib_xml2_main=no
62476352 _ACEOF
62486353
62496354 LIBS="-lxml2 $LIBS"
6355
6356 fi
6357
6358 # FIXME: Replace `main' with a function in `-lasound':
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lasound" >&5
6360 $as_echo_n "checking for main in -lasound... " >&6; }
6361 if ${ac_cv_lib_asound_main+:} false; then :
6362 $as_echo_n "(cached) " >&6
6363 else
6364 ac_check_lib_save_LIBS=$LIBS
6365 LIBS="-lasound $LIBS"
6366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6367 /* end confdefs.h. */
6368
6369
6370 int
6371 main ()
6372 {
6373 return main ();
6374 ;
6375 return 0;
6376 }
6377 _ACEOF
6378 if ac_fn_c_try_link "$LINENO"; then :
6379 ac_cv_lib_asound_main=yes
6380 else
6381 ac_cv_lib_asound_main=no
6382 fi
6383 rm -f core conftest.err conftest.$ac_objext \
6384 conftest$ac_exeext conftest.$ac_ext
6385 LIBS=$ac_check_lib_save_LIBS
6386 fi
6387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_main" >&5
6388 $as_echo "$ac_cv_lib_asound_main" >&6; }
6389 if test "x$ac_cv_lib_asound_main" = xyes; then :
6390 cat >>confdefs.h <<_ACEOF
6391 #define HAVE_LIBASOUND 1
6392 _ACEOF
6393
6394 LIBS="-lasound $LIBS"
6395
6396 fi
6397
6398 # FIXME: Replace `main' with a function in `-lmad':
6399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for id3_tag_parse in -lid3tag" >&5
6400 $as_echo_n "checking for id3_tag_parse in -lid3tag... " >&6; }
6401 if ${ac_cv_lib_id3tag_id3_tag_parse+:} false; then :
6402 $as_echo_n "(cached) " >&6
6403 else
6404 ac_check_lib_save_LIBS=$LIBS
6405 LIBS="-lid3tag -lz $LIBS"
6406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6407 /* end confdefs.h. */
6408
6409 /* Override any GCC internal prototype to avoid an error.
6410 Use char because int might match the return type of a GCC
6411 builtin and then its argument prototype would still apply. */
6412 #ifdef __cplusplus
6413 extern "C"
6414 #endif
6415 char id3_tag_parse ();
6416 int
6417 main ()
6418 {
6419 return id3_tag_parse ();
6420 ;
6421 return 0;
6422 }
6423 _ACEOF
6424 if ac_fn_c_try_link "$LINENO"; then :
6425 ac_cv_lib_id3tag_id3_tag_parse=yes
6426 else
6427 ac_cv_lib_id3tag_id3_tag_parse=no
6428 fi
6429 rm -f core conftest.err conftest.$ac_objext \
6430 conftest$ac_exeext conftest.$ac_ext
6431 LIBS=$ac_check_lib_save_LIBS
6432 fi
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_id3tag_id3_tag_parse" >&5
6434 $as_echo "$ac_cv_lib_id3tag_id3_tag_parse" >&6; }
6435 if test "x$ac_cv_lib_id3tag_id3_tag_parse" = xyes; then :
6436 :
6437 else
6438
6439 as_fn_error $? "libid3tag was not found
6440 *** You must first install libid3tag before you can build this package.
6441 *** If libid3tag is already installed, you may need to use the LDFLAGS
6442 *** environment variable to specify its installed location, e.g. -L<dir>." "$LINENO" 5
6443
6444 fi
6445
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmad" >&5
6447 $as_echo_n "checking for main in -lmad... " >&6; }
6448 if ${ac_cv_lib_mad_main+:} false; then :
6449 $as_echo_n "(cached) " >&6
6450 else
6451 ac_check_lib_save_LIBS=$LIBS
6452 LIBS="-lmad $LIBS"
6453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6454 /* end confdefs.h. */
6455
6456
6457 int
6458 main ()
6459 {
6460 return main ();
6461 ;
6462 return 0;
6463 }
6464 _ACEOF
6465 if ac_fn_c_try_link "$LINENO"; then :
6466 ac_cv_lib_mad_main=yes
6467 else
6468 ac_cv_lib_mad_main=no
6469 fi
6470 rm -f core conftest.err conftest.$ac_objext \
6471 conftest$ac_exeext conftest.$ac_ext
6472 LIBS=$ac_check_lib_save_LIBS
6473 fi
6474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mad_main" >&5
6475 $as_echo "$ac_cv_lib_mad_main" >&6; }
6476 if test "x$ac_cv_lib_mad_main" = xyes; then :
6477 cat >>confdefs.h <<_ACEOF
6478 #define HAVE_LIBMAD 1
6479 _ACEOF
6480
6481 LIBS="-lmad $LIBS"
62506482
62516483 fi
62526484
78838115 /* end confdefs.h. */
78848116
78858117 #include <libintl.h>
7886 $gt_revision_test_code
8118 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
78878119 extern int _nl_msg_cat_cntr;
78888120 extern int *_nl_domain_bindings;
8121 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
8122 #else
8123 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
8124 #endif
8125 $gt_revision_test_code
78898126
78908127 int
78918128 main ()
78928129 {
78938130
78948131 bindtextdomain ("", "");
7895 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
8132 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
78968133
78978134 ;
78988135 return 0;
86458882 /* end confdefs.h. */
86468883
86478884 #include <libintl.h>
8648 $gt_revision_test_code
8885 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
86498886 extern int _nl_msg_cat_cntr;
86508887 extern
86518888 #ifdef __cplusplus
86528889 "C"
86538890 #endif
86548891 const char *_nl_expand_alias (const char *);
8892 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
8893 #else
8894 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
8895 #endif
8896 $gt_revision_test_code
86558897
86568898 int
86578899 main ()
86588900 {
86598901
86608902 bindtextdomain ("", "");
8661 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
8903 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
86628904
86638905 ;
86648906 return 0;
86778919 /* end confdefs.h. */
86788920
86798921 #include <libintl.h>
8680 $gt_revision_test_code
8922 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
86818923 extern int _nl_msg_cat_cntr;
86828924 extern
86838925 #ifdef __cplusplus
86848926 "C"
86858927 #endif
86868928 const char *_nl_expand_alias (const char *);
8929 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
8930 #else
8931 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
8932 #endif
8933 $gt_revision_test_code
86878934
86888935 int
86898936 main ()
86908937 {
86918938
86928939 bindtextdomain ("", "");
8693 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
8940 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
86948941
86958942 ;
86968943 return 0;
93129559 fi
93139560 done
93149561
9315
9316 ac_config_files="$ac_config_files Makefile doc/Makefile m4/Makefile man/Makefile po/Makefile.in src/Makefile"
9562 for ac_func in memmove
9563 do :
9564 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
9565 if test "x$ac_cv_func_memmove" = xyes; then :
9566 cat >>confdefs.h <<_ACEOF
9567 #define HAVE_MEMMOVE 1
9568 _ACEOF
9569
9570 fi
9571 done
9572
9573 for ac_func in memset
9574 do :
9575 ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
9576 if test "x$ac_cv_func_memset" = xyes; then :
9577 cat >>confdefs.h <<_ACEOF
9578 #define HAVE_MEMSET 1
9579 _ACEOF
9580
9581 fi
9582 done
9583
9584 for ac_func in munmap
9585 do :
9586 ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap"
9587 if test "x$ac_cv_func_munmap" = xyes; then :
9588 cat >>confdefs.h <<_ACEOF
9589 #define HAVE_MUNMAP 1
9590 _ACEOF
9591
9592 fi
9593 done
9594
9595 for ac_func in pow
9596 do :
9597 ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
9598 if test "x$ac_cv_func_pow" = xyes; then :
9599 cat >>confdefs.h <<_ACEOF
9600 #define HAVE_POW 1
9601 _ACEOF
9602
9603 fi
9604 done
9605
9606 for ac_func in strncasecmp
9607 do :
9608 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
9609 if test "x$ac_cv_func_strncasecmp" = xyes; then :
9610 cat >>confdefs.h <<_ACEOF
9611 #define HAVE_STRNCASECMP 1
9612 _ACEOF
9613
9614 fi
9615 done
9616
9617 for ac_func in strtol
9618 do :
9619 ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
9620 if test "x$ac_cv_func_strtol" = xyes; then :
9621 cat >>confdefs.h <<_ACEOF
9622 #define HAVE_STRTOL 1
9623 _ACEOF
9624
9625 fi
9626 done
9627
9628 for ac_header in termios.h
9629 do :
9630 ac_fn_c_check_header_mongrel "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
9631 if test "x$ac_cv_header_termios_h" = xyes; then :
9632 cat >>confdefs.h <<_ACEOF
9633 #define HAVE_TERMIOS_H 1
9634 _ACEOF
9635
9636 fi
9637
9638 done
9639
9640 for ac_header in wchar.h
9641 do :
9642 ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
9643 if test "x$ac_cv_header_wchar_h" = xyes; then :
9644 cat >>confdefs.h <<_ACEOF
9645 #define HAVE_WCHAR_H 1
9646 _ACEOF
9647
9648 fi
9649
9650 done
9651
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
9653 $as_echo_n "checking for error_at_line... " >&6; }
9654 if ${ac_cv_lib_error_at_line+:} false; then :
9655 $as_echo_n "(cached) " >&6
9656 else
9657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9658 /* end confdefs.h. */
9659 #include <error.h>
9660 int
9661 main ()
9662 {
9663 error_at_line (0, 0, "", 0, "an error occurred");
9664 ;
9665 return 0;
9666 }
9667 _ACEOF
9668 if ac_fn_c_try_link "$LINENO"; then :
9669 ac_cv_lib_error_at_line=yes
9670 else
9671 ac_cv_lib_error_at_line=no
9672 fi
9673 rm -f core conftest.err conftest.$ac_objext \
9674 conftest$ac_exeext conftest.$ac_ext
9675 fi
9676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
9677 $as_echo "$ac_cv_lib_error_at_line" >&6; }
9678 if test $ac_cv_lib_error_at_line = no; then
9679 case " $LIBOBJS " in
9680 *" error.$ac_objext "* ) ;;
9681 *) LIBOBJS="$LIBOBJS error.$ac_objext"
9682 ;;
9683 esac
9684
9685 fi
9686
9687
9688
9689
9690 for ac_header in $ac_header_list
9691 do :
9692 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9693 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9694 "
9695 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9696 cat >>confdefs.h <<_ACEOF
9697 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9698 _ACEOF
9699
9700 fi
9701
9702 done
9703
9704
9705
9706
9707
9708
9709
9710
9711 for ac_func in getpagesize
9712 do :
9713 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
9714 if test "x$ac_cv_func_getpagesize" = xyes; then :
9715 cat >>confdefs.h <<_ACEOF
9716 #define HAVE_GETPAGESIZE 1
9717 _ACEOF
9718
9719 fi
9720 done
9721
9722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
9723 $as_echo_n "checking for working mmap... " >&6; }
9724 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
9725 $as_echo_n "(cached) " >&6
9726 else
9727 if test "$cross_compiling" = yes; then :
9728 ac_cv_func_mmap_fixed_mapped=no
9729 else
9730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9731 /* end confdefs.h. */
9732 $ac_includes_default
9733 /* malloc might have been renamed as rpl_malloc. */
9734 #undef malloc
9735
9736 /* Thanks to Mike Haertel and Jim Avera for this test.
9737 Here is a matrix of mmap possibilities:
9738 mmap private not fixed
9739 mmap private fixed at somewhere currently unmapped
9740 mmap private fixed at somewhere already mapped
9741 mmap shared not fixed
9742 mmap shared fixed at somewhere currently unmapped
9743 mmap shared fixed at somewhere already mapped
9744 For private mappings, we should verify that changes cannot be read()
9745 back from the file, nor mmap's back from the file at a different
9746 address. (There have been systems where private was not correctly
9747 implemented like the infamous i386 svr4.0, and systems where the
9748 VM page cache was not coherent with the file system buffer cache
9749 like early versions of FreeBSD and possibly contemporary NetBSD.)
9750 For shared mappings, we should conversely verify that changes get
9751 propagated back to all the places they're supposed to be.
9752
9753 Grep wants private fixed already mapped.
9754 The main things grep needs to know about mmap are:
9755 * does it exist and is it safe to write into the mmap'd area
9756 * how to use it (BSD variants) */
9757
9758 #include <fcntl.h>
9759 #include <sys/mman.h>
9760
9761 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
9762 char *malloc ();
9763 #endif
9764
9765 /* This mess was copied from the GNU getpagesize.h. */
9766 #ifndef HAVE_GETPAGESIZE
9767 # ifdef _SC_PAGESIZE
9768 # define getpagesize() sysconf(_SC_PAGESIZE)
9769 # else /* no _SC_PAGESIZE */
9770 # ifdef HAVE_SYS_PARAM_H
9771 # include <sys/param.h>
9772 # ifdef EXEC_PAGESIZE
9773 # define getpagesize() EXEC_PAGESIZE
9774 # else /* no EXEC_PAGESIZE */
9775 # ifdef NBPG
9776 # define getpagesize() NBPG * CLSIZE
9777 # ifndef CLSIZE
9778 # define CLSIZE 1
9779 # endif /* no CLSIZE */
9780 # else /* no NBPG */
9781 # ifdef NBPC
9782 # define getpagesize() NBPC
9783 # else /* no NBPC */
9784 # ifdef PAGESIZE
9785 # define getpagesize() PAGESIZE
9786 # endif /* PAGESIZE */
9787 # endif /* no NBPC */
9788 # endif /* no NBPG */
9789 # endif /* no EXEC_PAGESIZE */
9790 # else /* no HAVE_SYS_PARAM_H */
9791 # define getpagesize() 8192 /* punt totally */
9792 # endif /* no HAVE_SYS_PARAM_H */
9793 # endif /* no _SC_PAGESIZE */
9794
9795 #endif /* no HAVE_GETPAGESIZE */
9796
9797 int
9798 main ()
9799 {
9800 char *data, *data2, *data3;
9801 const char *cdata2;
9802 int i, pagesize;
9803 int fd, fd2;
9804
9805 pagesize = getpagesize ();
9806
9807 /* First, make a file with some known garbage in it. */
9808 data = (char *) malloc (pagesize);
9809 if (!data)
9810 return 1;
9811 for (i = 0; i < pagesize; ++i)
9812 *(data + i) = rand ();
9813 umask (0);
9814 fd = creat ("conftest.mmap", 0600);
9815 if (fd < 0)
9816 return 2;
9817 if (write (fd, data, pagesize) != pagesize)
9818 return 3;
9819 close (fd);
9820
9821 /* Next, check that the tail of a page is zero-filled. File must have
9822 non-zero length, otherwise we risk SIGBUS for entire page. */
9823 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
9824 if (fd2 < 0)
9825 return 4;
9826 cdata2 = "";
9827 if (write (fd2, cdata2, 1) != 1)
9828 return 5;
9829 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
9830 if (data2 == MAP_FAILED)
9831 return 6;
9832 for (i = 0; i < pagesize; ++i)
9833 if (*(data2 + i))
9834 return 7;
9835 close (fd2);
9836 if (munmap (data2, pagesize))
9837 return 8;
9838
9839 /* Next, try to mmap the file at a fixed address which already has
9840 something else allocated at it. If we can, also make sure that
9841 we see the same garbage. */
9842 fd = open ("conftest.mmap", O_RDWR);
9843 if (fd < 0)
9844 return 9;
9845 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
9846 MAP_PRIVATE | MAP_FIXED, fd, 0L))
9847 return 10;
9848 for (i = 0; i < pagesize; ++i)
9849 if (*(data + i) != *(data2 + i))
9850 return 11;
9851
9852 /* Finally, make sure that changes to the mapped area do not
9853 percolate back to the file as seen by read(). (This is a bug on
9854 some variants of i386 svr4.0.) */
9855 for (i = 0; i < pagesize; ++i)
9856 *(data2 + i) = *(data2 + i) + 1;
9857 data3 = (char *) malloc (pagesize);
9858 if (!data3)
9859 return 12;
9860 if (read (fd, data3, pagesize) != pagesize)
9861 return 13;
9862 for (i = 0; i < pagesize; ++i)
9863 if (*(data + i) != *(data3 + i))
9864 return 14;
9865 close (fd);
9866 return 0;
9867 }
9868 _ACEOF
9869 if ac_fn_c_try_run "$LINENO"; then :
9870 ac_cv_func_mmap_fixed_mapped=yes
9871 else
9872 ac_cv_func_mmap_fixed_mapped=no
9873 fi
9874 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9875 conftest.$ac_objext conftest.beam conftest.$ac_ext
9876 fi
9877
9878 fi
9879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
9880 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
9881 if test $ac_cv_func_mmap_fixed_mapped = yes; then
9882
9883 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
9884
9885 fi
9886 rm -f conftest.mmap conftest.txt
9887
9888 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
9889 if test "x$ac_cv_type_ssize_t" = xyes; then :
9890
9891 else
9892
9893 cat >>confdefs.h <<_ACEOF
9894 #define ssize_t int
9895 _ACEOF
9896
9897 fi
9898
9899
9900 ac_config_files="$ac_config_files Makefile doc/Makefile m4/Makefile man/Makefile po/Makefile.in src//Makefile"
93179901
93189902
93199903
945510039 /* end confdefs.h. */
945610040
945710041 #include <libintl.h>
9458 $gt_revision_test_code
10042 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
945910043 extern int _nl_msg_cat_cntr;
946010044 extern int *_nl_domain_bindings;
10045 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
10046 #else
10047 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
10048 #endif
10049 $gt_revision_test_code
946110050
946210051 int
946310052 main ()
946410053 {
946510054
946610055 bindtextdomain ("", "");
9467 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
10056 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
946810057
946910058 ;
947010059 return 0;
1021710806 /* end confdefs.h. */
1021810807
1021910808 #include <libintl.h>
10220 $gt_revision_test_code
10809 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1022110810 extern int _nl_msg_cat_cntr;
1022210811 extern
1022310812 #ifdef __cplusplus
1022410813 "C"
1022510814 #endif
1022610815 const char *_nl_expand_alias (const char *);
10816 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
10817 #else
10818 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
10819 #endif
10820 $gt_revision_test_code
1022710821
1022810822 int
1022910823 main ()
1023010824 {
1023110825
1023210826 bindtextdomain ("", "");
10233 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
10827 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
1023410828
1023510829 ;
1023610830 return 0;
1024910843 /* end confdefs.h. */
1025010844
1025110845 #include <libintl.h>
10252 $gt_revision_test_code
10846 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
1025310847 extern int _nl_msg_cat_cntr;
1025410848 extern
1025510849 #ifdef __cplusplus
1025610850 "C"
1025710851 #endif
1025810852 const char *_nl_expand_alias (const char *);
10853 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
10854 #else
10855 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
10856 #endif
10857 $gt_revision_test_code
1025910858
1026010859 int
1026110860 main ()
1026210861 {
1026310862
1026410863 bindtextdomain ("", "");
10265 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
10864 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
1026610865
1026710866 ;
1026810867 return 0;
1040010999 $as_echo "no, using $LN_S" >&6; }
1040111000 fi
1040211001
11002
11003
11004
11005
11006 #AC_INIT([MPEG audio decoder and player],[0.15.2b],[rob@mars.org],[madplay])
11007
11008
11009
11010
11011 if test "`cd $srcdir && pwd`" != "`pwd`"; then
11012 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
11013 # is not polluted with repeated "-I."
11014 am__isrc=' -I$(srcdir)'
11015 # test to see if srcdir already configured
11016 if test -f $srcdir/config.status; then
11017 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
11018 fi
11019 fi
11020
11021 # test whether we have cygpath
11022 if test -z "$CYGPATH_W"; then
11023 if (cygpath --version) >/dev/null 2>/dev/null; then
11024 CYGPATH_W='cygpath -w'
11025 else
11026 CYGPATH_W=echo
11027 fi
11028 fi
11029
11030
11031 # Define the identity of the package.
11032 PACKAGE='daisy-player'
11033 VERSION='10.6'
11034
11035
11036 cat >>confdefs.h <<_ACEOF
11037 #define PACKAGE "$PACKAGE"
11038 _ACEOF
11039
11040
11041 cat >>confdefs.h <<_ACEOF
11042 #define VERSION "$VERSION"
11043 _ACEOF
11044
11045 # Some tools Automake needs.
11046
11047 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
11048
11049
11050 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
11051
11052
11053 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
11054
11055
11056 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
11057
11058
11059 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
11060
11061 # For better backward compatibility. To be removed once Automake 1.9.x
11062 # dies out for good. For more background, see:
11063 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
11064 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
11065 mkdir_p='$(MKDIR_P)'
11066
11067 # We need awk for the "check" target (and possibly the TAP driver). The
11068 # system "awk" is bad on some platforms.
11069 # Always define AMTAR for backward compatibility. Yes, it's still used
11070 # in the wild :-( We should find a proper way to deprecate it ...
11071 AMTAR='$${TAR-tar}'
11072
11073
11074 # We'll loop over all known methods to create a tar archive until one works.
11075 _am_tools='gnutar pax cpio none'
11076
11077 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
11078
11079
11080
11081
11082
11083 depcc="$CC" am_compiler_list=
11084
11085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
11086 $as_echo_n "checking dependency style of $depcc... " >&6; }
11087 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
11088 $as_echo_n "(cached) " >&6
11089 else
11090 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
11091 # We make a subdir and do the tests there. Otherwise we can end up
11092 # making bogus files that we don't know about and never remove. For
11093 # instance it was reported that on HP-UX the gcc test will end up
11094 # making a dummy file named 'D' -- because '-MD' means "put the output
11095 # in D".
11096 rm -rf conftest.dir
11097 mkdir conftest.dir
11098 # Copy depcomp to subdir because otherwise we won't find it if we're
11099 # using a relative directory.
11100 cp "$am_depcomp" conftest.dir
11101 cd conftest.dir
11102 # We will build objects and dependencies in a subdirectory because
11103 # it helps to detect inapplicable dependency modes. For instance
11104 # both Tru64's cc and ICC support -MD to output dependencies as a
11105 # side effect of compilation, but ICC will put the dependencies in
11106 # the current directory while Tru64 will put them in the object
11107 # directory.
11108 mkdir sub
11109
11110 am_cv_CC_dependencies_compiler_type=none
11111 if test "$am_compiler_list" = ""; then
11112 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
11113 fi
11114 am__universal=false
11115 case " $depcc " in #(
11116 *\ -arch\ *\ -arch\ *) am__universal=true ;;
11117 esac
11118
11119 for depmode in $am_compiler_list; do
11120 # Setup a source with many dependencies, because some compilers
11121 # like to wrap large dependency lists on column 80 (with \), and
11122 # we should not choose a depcomp mode which is confused by this.
11123 #
11124 # We need to recreate these files for each test, as the compiler may
11125 # overwrite some of them when testing with obscure command lines.
11126 # This happens at least with the AIX C compiler.
11127 : > sub/conftest.c
11128 for i in 1 2 3 4 5 6; do
11129 echo '#include "conftst'$i'.h"' >> sub/conftest.c
11130 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
11131 # Solaris 10 /bin/sh.
11132 echo '/* dummy */' > sub/conftst$i.h
11133 done
11134 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
11135
11136 # We check with '-c' and '-o' for the sake of the "dashmstdout"
11137 # mode. It turns out that the SunPro C++ compiler does not properly
11138 # handle '-M -o', and we need to detect this. Also, some Intel
11139 # versions had trouble with output in subdirs.
11140 am__obj=sub/conftest.${OBJEXT-o}
11141 am__minus_obj="-o $am__obj"
11142 case $depmode in
11143 gcc)
11144 # This depmode causes a compiler race in universal mode.
11145 test "$am__universal" = false || continue
11146 ;;
11147 nosideeffect)
11148 # After this tag, mechanisms are not by side-effect, so they'll
11149 # only be used when explicitly requested.
11150 if test "x$enable_dependency_tracking" = xyes; then
11151 continue
11152 else
11153 break
11154 fi
11155 ;;
11156 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
11157 # This compiler won't grok '-c -o', but also, the minuso test has
11158 # not run yet. These depmodes are late enough in the game, and
11159 # so weak that their functioning should not be impacted.
11160 am__obj=conftest.${OBJEXT-o}
11161 am__minus_obj=
11162 ;;
11163 none) break ;;
11164 esac
11165 if depmode=$depmode \
11166 source=sub/conftest.c object=$am__obj \
11167 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
11168 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
11169 >/dev/null 2>conftest.err &&
11170 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
11171 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
11172 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
11173 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
11174 # icc doesn't choke on unknown options, it will just issue warnings
11175 # or remarks (even with -Werror). So we grep stderr for any message
11176 # that says an option was ignored or not supported.
11177 # When given -MP, icc 7.0 and 7.1 complain thusly:
11178 # icc: Command line warning: ignoring option '-M'; no argument required
11179 # The diagnosis changed in icc 8.0:
11180 # icc: Command line remark: option '-MP' not supported
11181 if (grep 'ignoring option' conftest.err ||
11182 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
11183 am_cv_CC_dependencies_compiler_type=$depmode
11184 break
11185 fi
11186 fi
11187 done
11188
11189 cd ..
11190 rm -rf conftest.dir
11191 else
11192 am_cv_CC_dependencies_compiler_type=none
11193 fi
11194
11195 fi
11196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
11197 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
11198 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
11199
11200 if
11201 test "x$enable_dependency_tracking" != xno \
11202 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
11203 am__fastdepCC_TRUE=
11204 am__fastdepCC_FALSE='#'
11205 else
11206 am__fastdepCC_TRUE='#'
11207 am__fastdepCC_FALSE=
11208 fi
11209
11210
11211 depcc="$CXX" am_compiler_list=
11212
11213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
11214 $as_echo_n "checking dependency style of $depcc... " >&6; }
11215 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
11216 $as_echo_n "(cached) " >&6
11217 else
11218 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
11219 # We make a subdir and do the tests there. Otherwise we can end up
11220 # making bogus files that we don't know about and never remove. For
11221 # instance it was reported that on HP-UX the gcc test will end up
11222 # making a dummy file named 'D' -- because '-MD' means "put the output
11223 # in D".
11224 rm -rf conftest.dir
11225 mkdir conftest.dir
11226 # Copy depcomp to subdir because otherwise we won't find it if we're
11227 # using a relative directory.
11228 cp "$am_depcomp" conftest.dir
11229 cd conftest.dir
11230 # We will build objects and dependencies in a subdirectory because
11231 # it helps to detect inapplicable dependency modes. For instance
11232 # both Tru64's cc and ICC support -MD to output dependencies as a
11233 # side effect of compilation, but ICC will put the dependencies in
11234 # the current directory while Tru64 will put them in the object
11235 # directory.
11236 mkdir sub
11237
11238 am_cv_CXX_dependencies_compiler_type=none
11239 if test "$am_compiler_list" = ""; then
11240 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
11241 fi
11242 am__universal=false
11243 case " $depcc " in #(
11244 *\ -arch\ *\ -arch\ *) am__universal=true ;;
11245 esac
11246
11247 for depmode in $am_compiler_list; do
11248 # Setup a source with many dependencies, because some compilers
11249 # like to wrap large dependency lists on column 80 (with \), and
11250 # we should not choose a depcomp mode which is confused by this.
11251 #
11252 # We need to recreate these files for each test, as the compiler may
11253 # overwrite some of them when testing with obscure command lines.
11254 # This happens at least with the AIX C compiler.
11255 : > sub/conftest.c
11256 for i in 1 2 3 4 5 6; do
11257 echo '#include "conftst'$i'.h"' >> sub/conftest.c
11258 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
11259 # Solaris 10 /bin/sh.
11260 echo '/* dummy */' > sub/conftst$i.h
11261 done
11262 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
11263
11264 # We check with '-c' and '-o' for the sake of the "dashmstdout"
11265 # mode. It turns out that the SunPro C++ compiler does not properly
11266 # handle '-M -o', and we need to detect this. Also, some Intel
11267 # versions had trouble with output in subdirs.
11268 am__obj=sub/conftest.${OBJEXT-o}
11269 am__minus_obj="-o $am__obj"
11270 case $depmode in
11271 gcc)
11272 # This depmode causes a compiler race in universal mode.
11273 test "$am__universal" = false || continue
11274 ;;
11275 nosideeffect)
11276 # After this tag, mechanisms are not by side-effect, so they'll
11277 # only be used when explicitly requested.
11278 if test "x$enable_dependency_tracking" = xyes; then
11279 continue
11280 else
11281 break
11282 fi
11283 ;;
11284 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
11285 # This compiler won't grok '-c -o', but also, the minuso test has
11286 # not run yet. These depmodes are late enough in the game, and
11287 # so weak that their functioning should not be impacted.
11288 am__obj=conftest.${OBJEXT-o}
11289 am__minus_obj=
11290 ;;
11291 none) break ;;
11292 esac
11293 if depmode=$depmode \
11294 source=sub/conftest.c object=$am__obj \
11295 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
11296 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
11297 >/dev/null 2>conftest.err &&
11298 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
11299 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
11300 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
11301 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
11302 # icc doesn't choke on unknown options, it will just issue warnings
11303 # or remarks (even with -Werror). So we grep stderr for any message
11304 # that says an option was ignored or not supported.
11305 # When given -MP, icc 7.0 and 7.1 complain thusly:
11306 # icc: Command line warning: ignoring option '-M'; no argument required
11307 # The diagnosis changed in icc 8.0:
11308 # icc: Command line remark: option '-MP' not supported
11309 if (grep 'ignoring option' conftest.err ||
11310 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
11311 am_cv_CXX_dependencies_compiler_type=$depmode
11312 break
11313 fi
11314 fi
11315 done
11316
11317 cd ..
11318 rm -rf conftest.dir
11319 else
11320 am_cv_CXX_dependencies_compiler_type=none
11321 fi
11322
11323 fi
11324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
11325 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
11326 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
11327
11328 if
11329 test "x$enable_dependency_tracking" != xno \
11330 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
11331 am__fastdepCXX_TRUE=
11332 am__fastdepCXX_FALSE='#'
11333 else
11334 am__fastdepCXX_TRUE='#'
11335 am__fastdepCXX_FALSE=
11336 fi
11337
11338
11339 depcc="$OBJC" am_compiler_list='gcc3 gcc'
11340
11341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
11342 $as_echo_n "checking dependency style of $depcc... " >&6; }
11343 if ${am_cv_OBJC_dependencies_compiler_type+:} false; then :
11344 $as_echo_n "(cached) " >&6
11345 else
11346 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
11347 # We make a subdir and do the tests there. Otherwise we can end up
11348 # making bogus files that we don't know about and never remove. For
11349 # instance it was reported that on HP-UX the gcc test will end up
11350 # making a dummy file named 'D' -- because '-MD' means "put the output
11351 # in D".
11352 rm -rf conftest.dir
11353 mkdir conftest.dir
11354 # Copy depcomp to subdir because otherwise we won't find it if we're
11355 # using a relative directory.
11356 cp "$am_depcomp" conftest.dir
11357 cd conftest.dir
11358 # We will build objects and dependencies in a subdirectory because
11359 # it helps to detect inapplicable dependency modes. For instance
11360 # both Tru64's cc and ICC support -MD to output dependencies as a
11361 # side effect of compilation, but ICC will put the dependencies in
11362 # the current directory while Tru64 will put them in the object
11363 # directory.
11364 mkdir sub
11365
11366 am_cv_OBJC_dependencies_compiler_type=none
11367 if test "$am_compiler_list" = ""; then
11368 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
11369 fi
11370 am__universal=false
11371
11372
11373 for depmode in $am_compiler_list; do
11374 # Setup a source with many dependencies, because some compilers
11375 # like to wrap large dependency lists on column 80 (with \), and
11376 # we should not choose a depcomp mode which is confused by this.
11377 #
11378 # We need to recreate these files for each test, as the compiler may
11379 # overwrite some of them when testing with obscure command lines.
11380 # This happens at least with the AIX C compiler.
11381 : > sub/conftest.c
11382 for i in 1 2 3 4 5 6; do
11383 echo '#include "conftst'$i'.h"' >> sub/conftest.c
11384 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
11385 # Solaris 10 /bin/sh.
11386 echo '/* dummy */' > sub/conftst$i.h
11387 done
11388 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
11389
11390 # We check with '-c' and '-o' for the sake of the "dashmstdout"
11391 # mode. It turns out that the SunPro C++ compiler does not properly
11392 # handle '-M -o', and we need to detect this. Also, some Intel
11393 # versions had trouble with output in subdirs.
11394 am__obj=sub/conftest.${OBJEXT-o}
11395 am__minus_obj="-o $am__obj"
11396 case $depmode in
11397 gcc)
11398 # This depmode causes a compiler race in universal mode.
11399 test "$am__universal" = false || continue
11400 ;;
11401 nosideeffect)
11402 # After this tag, mechanisms are not by side-effect, so they'll
11403 # only be used when explicitly requested.
11404 if test "x$enable_dependency_tracking" = xyes; then
11405 continue
11406 else
11407 break
11408 fi
11409 ;;
11410 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
11411 # This compiler won't grok '-c -o', but also, the minuso test has
11412 # not run yet. These depmodes are late enough in the game, and
11413 # so weak that their functioning should not be impacted.
11414 am__obj=conftest.${OBJEXT-o}
11415 am__minus_obj=
11416 ;;
11417 none) break ;;
11418 esac
11419 if depmode=$depmode \
11420 source=sub/conftest.c object=$am__obj \
11421 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
11422 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
11423 >/dev/null 2>conftest.err &&
11424 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
11425 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
11426 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
11427 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
11428 # icc doesn't choke on unknown options, it will just issue warnings
11429 # or remarks (even with -Werror). So we grep stderr for any message
11430 # that says an option was ignored or not supported.
11431 # When given -MP, icc 7.0 and 7.1 complain thusly:
11432 # icc: Command line warning: ignoring option '-M'; no argument required
11433 # The diagnosis changed in icc 8.0:
11434 # icc: Command line remark: option '-MP' not supported
11435 if (grep 'ignoring option' conftest.err ||
11436 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
11437 am_cv_OBJC_dependencies_compiler_type=$depmode
11438 break
11439 fi
11440 fi
11441 done
11442
11443 cd ..
11444 rm -rf conftest.dir
11445 else
11446 am_cv_OBJC_dependencies_compiler_type=none
11447 fi
11448
11449 fi
11450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_OBJC_dependencies_compiler_type" >&5
11451 $as_echo "$am_cv_OBJC_dependencies_compiler_type" >&6; }
11452 OBJCDEPMODE=depmode=$am_cv_OBJC_dependencies_compiler_type
11453
11454 if
11455 test "x$enable_dependency_tracking" != xno \
11456 && test "$am_cv_OBJC_dependencies_compiler_type" = gcc3; then
11457 am__fastdepOBJC_TRUE=
11458 am__fastdepOBJC_FALSE='#'
11459 else
11460 am__fastdepOBJC_TRUE='#'
11461 am__fastdepOBJC_FALSE=
11462 fi
11463
11464
11465 depcc="$OBJCXX" am_compiler_list='gcc3 gcc'
11466
11467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
11468 $as_echo_n "checking dependency style of $depcc... " >&6; }
11469 if ${am_cv_OBJCXX_dependencies_compiler_type+:} false; then :
11470 $as_echo_n "(cached) " >&6
11471 else
11472 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
11473 # We make a subdir and do the tests there. Otherwise we can end up
11474 # making bogus files that we don't know about and never remove. For
11475 # instance it was reported that on HP-UX the gcc test will end up
11476 # making a dummy file named 'D' -- because '-MD' means "put the output
11477 # in D".
11478 rm -rf conftest.dir
11479 mkdir conftest.dir
11480 # Copy depcomp to subdir because otherwise we won't find it if we're
11481 # using a relative directory.
11482 cp "$am_depcomp" conftest.dir
11483 cd conftest.dir
11484 # We will build objects and dependencies in a subdirectory because
11485 # it helps to detect inapplicable dependency modes. For instance
11486 # both Tru64's cc and ICC support -MD to output dependencies as a
11487 # side effect of compilation, but ICC will put the dependencies in
11488 # the current directory while Tru64 will put them in the object
11489 # directory.
11490 mkdir sub
11491
11492 am_cv_OBJCXX_dependencies_compiler_type=none
11493 if test "$am_compiler_list" = ""; then
11494 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
11495 fi
11496 am__universal=false
11497
11498
11499 for depmode in $am_compiler_list; do
11500 # Setup a source with many dependencies, because some compilers
11501 # like to wrap large dependency lists on column 80 (with \), and
11502 # we should not choose a depcomp mode which is confused by this.
11503 #
11504 # We need to recreate these files for each test, as the compiler may
11505 # overwrite some of them when testing with obscure command lines.
11506 # This happens at least with the AIX C compiler.
11507 : > sub/conftest.c
11508 for i in 1 2 3 4 5 6; do
11509 echo '#include "conftst'$i'.h"' >> sub/conftest.c
11510 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
11511 # Solaris 10 /bin/sh.
11512 echo '/* dummy */' > sub/conftst$i.h
11513 done
11514 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
11515
11516 # We check with '-c' and '-o' for the sake of the "dashmstdout"
11517 # mode. It turns out that the SunPro C++ compiler does not properly
11518 # handle '-M -o', and we need to detect this. Also, some Intel
11519 # versions had trouble with output in subdirs.
11520 am__obj=sub/conftest.${OBJEXT-o}
11521 am__minus_obj="-o $am__obj"
11522 case $depmode in
11523 gcc)
11524 # This depmode causes a compiler race in universal mode.
11525 test "$am__universal" = false || continue
11526 ;;
11527 nosideeffect)
11528 # After this tag, mechanisms are not by side-effect, so they'll
11529 # only be used when explicitly requested.
11530 if test "x$enable_dependency_tracking" = xyes; then
11531 continue
11532 else
11533 break
11534 fi
11535 ;;
11536 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
11537 # This compiler won't grok '-c -o', but also, the minuso test has
11538 # not run yet. These depmodes are late enough in the game, and
11539 # so weak that their functioning should not be impacted.
11540 am__obj=conftest.${OBJEXT-o}
11541 am__minus_obj=
11542 ;;
11543 none) break ;;
11544 esac
11545 if depmode=$depmode \
11546 source=sub/conftest.c object=$am__obj \
11547 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
11548 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
11549 >/dev/null 2>conftest.err &&
11550 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
11551 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
11552 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
11553 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
11554 # icc doesn't choke on unknown options, it will just issue warnings
11555 # or remarks (even with -Werror). So we grep stderr for any message
11556 # that says an option was ignored or not supported.
11557 # When given -MP, icc 7.0 and 7.1 complain thusly:
11558 # icc: Command line warning: ignoring option '-M'; no argument required
11559 # The diagnosis changed in icc 8.0:
11560 # icc: Command line remark: option '-MP' not supported
11561 if (grep 'ignoring option' conftest.err ||
11562 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
11563 am_cv_OBJCXX_dependencies_compiler_type=$depmode
11564 break
11565 fi
11566 fi
11567 done
11568
11569 cd ..
11570 rm -rf conftest.dir
11571 else
11572 am_cv_OBJCXX_dependencies_compiler_type=none
11573 fi
11574
11575 fi
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_OBJCXX_dependencies_compiler_type" >&5
11577 $as_echo "$am_cv_OBJCXX_dependencies_compiler_type" >&6; }
11578 OBJCXXDEPMODE=depmode=$am_cv_OBJCXX_dependencies_compiler_type
11579
11580 if
11581 test "x$enable_dependency_tracking" != xno \
11582 && test "$am_cv_OBJCXX_dependencies_compiler_type" = gcc3; then
11583 am__fastdepOBJCXX_TRUE=
11584 am__fastdepOBJCXX_FALSE='#'
11585 else
11586 am__fastdepOBJCXX_TRUE='#'
11587 am__fastdepOBJCXX_FALSE=
11588 fi
11589
11590
11591
11592 # POSIX will say in a future version that running "rm -f" with no argument
11593 # is OK; and we want to be able to make that assumption in our Makefile
11594 # recipes. So use an aggressive probe to check that the usage we want is
11595 # actually supported "in the wild" to an acceptable degree.
11596 # See automake bug#10828.
11597 # To make any issue more visible, cause the running configure to be aborted
11598 # by default if the 'rm' program in use doesn't match our expectations; the
11599 # user can still override this though.
11600 if rm -f && rm -fr && rm -rf; then : OK; else
11601 cat >&2 <<'END'
11602 Oops!
11603
11604 Your 'rm' program seems unable to run without file operands specified
11605 on the command line, even when the '-f' option is present. This is contrary
11606 to the behaviour of most rm programs out there, and not conforming with
11607 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
11608
11609 Please tell bug-automake@gnu.org about your system, including the value
11610 of your $PATH and any error possibly output before this message. This
11611 can help us improve future automake versions.
11612
11613 END
11614 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
11615 echo 'Configuration will proceed anyway, since you have set the' >&2
11616 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
11617 echo >&2
11618 else
11619 cat >&2 <<'END'
11620 Aborting the configuration process, to ensure you take notice of the issue.
11621
11622 You can download and install GNU coreutils to get an 'rm' implementation
11623 that behaves properly: <http://www.gnu.org/software/coreutils/>.
11624
11625 If you want to complete the configuration process using your problematic
11626 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
11627 to "yes", and re-run configure.
11628
11629 END
11630 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
11631 fi
11632 fi
11633
11634
11635
11636
11637
11638
11639
11640 ac_ext=c
11641 ac_cpp='$CPP $CPPFLAGS'
11642 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11643 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11644 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11645 if test -n "$ac_tool_prefix"; then
11646 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
11647 set dummy ${ac_tool_prefix}gcc; ac_word=$2
11648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11649 $as_echo_n "checking for $ac_word... " >&6; }
11650 if ${ac_cv_prog_CC+:} false; then :
11651 $as_echo_n "(cached) " >&6
11652 else
11653 if test -n "$CC"; then
11654 ac_cv_prog_CC="$CC" # Let the user override the test.
11655 else
11656 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11657 for as_dir in $PATH
11658 do
11659 IFS=$as_save_IFS
11660 test -z "$as_dir" && as_dir=.
11661 for ac_exec_ext in '' $ac_executable_extensions; do
11662 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11663 ac_cv_prog_CC="${ac_tool_prefix}gcc"
11664 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11665 break 2
11666 fi
11667 done
11668 done
11669 IFS=$as_save_IFS
11670
11671 fi
11672 fi
11673 CC=$ac_cv_prog_CC
11674 if test -n "$CC"; then
11675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
11676 $as_echo "$CC" >&6; }
11677 else
11678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11679 $as_echo "no" >&6; }
11680 fi
11681
11682
11683 fi
11684 if test -z "$ac_cv_prog_CC"; then
11685 ac_ct_CC=$CC
11686 # Extract the first word of "gcc", so it can be a program name with args.
11687 set dummy gcc; ac_word=$2
11688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11689 $as_echo_n "checking for $ac_word... " >&6; }
11690 if ${ac_cv_prog_ac_ct_CC+:} false; then :
11691 $as_echo_n "(cached) " >&6
11692 else
11693 if test -n "$ac_ct_CC"; then
11694 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
11695 else
11696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11697 for as_dir in $PATH
11698 do
11699 IFS=$as_save_IFS
11700 test -z "$as_dir" && as_dir=.
11701 for ac_exec_ext in '' $ac_executable_extensions; do
11702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11703 ac_cv_prog_ac_ct_CC="gcc"
11704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11705 break 2
11706 fi
11707 done
11708 done
11709 IFS=$as_save_IFS
11710
11711 fi
11712 fi
11713 ac_ct_CC=$ac_cv_prog_ac_ct_CC
11714 if test -n "$ac_ct_CC"; then
11715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
11716 $as_echo "$ac_ct_CC" >&6; }
11717 else
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11719 $as_echo "no" >&6; }
11720 fi
11721
11722 if test "x$ac_ct_CC" = x; then
11723 CC=""
11724 else
11725 case $cross_compiling:$ac_tool_warned in
11726 yes:)
11727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11728 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11729 ac_tool_warned=yes ;;
11730 esac
11731 CC=$ac_ct_CC
11732 fi
11733 else
11734 CC="$ac_cv_prog_CC"
11735 fi
11736
11737 if test -z "$CC"; then
11738 if test -n "$ac_tool_prefix"; then
11739 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
11740 set dummy ${ac_tool_prefix}cc; ac_word=$2
11741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11742 $as_echo_n "checking for $ac_word... " >&6; }
11743 if ${ac_cv_prog_CC+:} false; then :
11744 $as_echo_n "(cached) " >&6
11745 else
11746 if test -n "$CC"; then
11747 ac_cv_prog_CC="$CC" # Let the user override the test.
11748 else
11749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11750 for as_dir in $PATH
11751 do
11752 IFS=$as_save_IFS
11753 test -z "$as_dir" && as_dir=.
11754 for ac_exec_ext in '' $ac_executable_extensions; do
11755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11756 ac_cv_prog_CC="${ac_tool_prefix}cc"
11757 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11758 break 2
11759 fi
11760 done
11761 done
11762 IFS=$as_save_IFS
11763
11764 fi
11765 fi
11766 CC=$ac_cv_prog_CC
11767 if test -n "$CC"; then
11768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
11769 $as_echo "$CC" >&6; }
11770 else
11771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11772 $as_echo "no" >&6; }
11773 fi
11774
11775
11776 fi
11777 fi
11778 if test -z "$CC"; then
11779 # Extract the first word of "cc", so it can be a program name with args.
11780 set dummy cc; ac_word=$2
11781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11782 $as_echo_n "checking for $ac_word... " >&6; }
11783 if ${ac_cv_prog_CC+:} false; then :
11784 $as_echo_n "(cached) " >&6
11785 else
11786 if test -n "$CC"; then
11787 ac_cv_prog_CC="$CC" # Let the user override the test.
11788 else
11789 ac_prog_rejected=no
11790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11791 for as_dir in $PATH
11792 do
11793 IFS=$as_save_IFS
11794 test -z "$as_dir" && as_dir=.
11795 for ac_exec_ext in '' $ac_executable_extensions; do
11796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11797 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
11798 ac_prog_rejected=yes
11799 continue
11800 fi
11801 ac_cv_prog_CC="cc"
11802 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11803 break 2
11804 fi
11805 done
11806 done
11807 IFS=$as_save_IFS
11808
11809 if test $ac_prog_rejected = yes; then
11810 # We found a bogon in the path, so make sure we never use it.
11811 set dummy $ac_cv_prog_CC
11812 shift
11813 if test $# != 0; then
11814 # We chose a different compiler from the bogus one.
11815 # However, it has the same basename, so the bogon will be chosen
11816 # first if we set CC to just the basename; use the full file name.
11817 shift
11818 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
11819 fi
11820 fi
11821 fi
11822 fi
11823 CC=$ac_cv_prog_CC
11824 if test -n "$CC"; then
11825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
11826 $as_echo "$CC" >&6; }
11827 else
11828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11829 $as_echo "no" >&6; }
11830 fi
11831
11832
11833 fi
11834 if test -z "$CC"; then
11835 if test -n "$ac_tool_prefix"; then
11836 for ac_prog in cl.exe
11837 do
11838 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11839 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11841 $as_echo_n "checking for $ac_word... " >&6; }
11842 if ${ac_cv_prog_CC+:} false; then :
11843 $as_echo_n "(cached) " >&6
11844 else
11845 if test -n "$CC"; then
11846 ac_cv_prog_CC="$CC" # Let the user override the test.
11847 else
11848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11849 for as_dir in $PATH
11850 do
11851 IFS=$as_save_IFS
11852 test -z "$as_dir" && as_dir=.
11853 for ac_exec_ext in '' $ac_executable_extensions; do
11854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11855 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
11856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11857 break 2
11858 fi
11859 done
11860 done
11861 IFS=$as_save_IFS
11862
11863 fi
11864 fi
11865 CC=$ac_cv_prog_CC
11866 if test -n "$CC"; then
11867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
11868 $as_echo "$CC" >&6; }
11869 else
11870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11871 $as_echo "no" >&6; }
11872 fi
11873
11874
11875 test -n "$CC" && break
11876 done
11877 fi
11878 if test -z "$CC"; then
11879 ac_ct_CC=$CC
11880 for ac_prog in cl.exe
11881 do
11882 # Extract the first word of "$ac_prog", so it can be a program name with args.
11883 set dummy $ac_prog; ac_word=$2
11884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11885 $as_echo_n "checking for $ac_word... " >&6; }
11886 if ${ac_cv_prog_ac_ct_CC+:} false; then :
11887 $as_echo_n "(cached) " >&6
11888 else
11889 if test -n "$ac_ct_CC"; then
11890 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
11891 else
11892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11893 for as_dir in $PATH
11894 do
11895 IFS=$as_save_IFS
11896 test -z "$as_dir" && as_dir=.
11897 for ac_exec_ext in '' $ac_executable_extensions; do
11898 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11899 ac_cv_prog_ac_ct_CC="$ac_prog"
11900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11901 break 2
11902 fi
11903 done
11904 done
11905 IFS=$as_save_IFS
11906
11907 fi
11908 fi
11909 ac_ct_CC=$ac_cv_prog_ac_ct_CC
11910 if test -n "$ac_ct_CC"; then
11911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
11912 $as_echo "$ac_ct_CC" >&6; }
11913 else
11914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11915 $as_echo "no" >&6; }
11916 fi
11917
11918
11919 test -n "$ac_ct_CC" && break
11920 done
11921
11922 if test "x$ac_ct_CC" = x; then
11923 CC=""
11924 else
11925 case $cross_compiling:$ac_tool_warned in
11926 yes:)
11927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
11928 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
11929 ac_tool_warned=yes ;;
11930 esac
11931 CC=$ac_ct_CC
11932 fi
11933 fi
11934
11935 fi
11936
11937
11938 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11939 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11940 as_fn_error $? "no acceptable C compiler found in \$PATH
11941 See \`config.log' for more details" "$LINENO" 5; }
11942
11943 # Provide some information about the compiler.
11944 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
11945 set X $ac_compile
11946 ac_compiler=$2
11947 for ac_option in --version -v -V -qversion; do
11948 { { ac_try="$ac_compiler $ac_option >&5"
11949 case "(($ac_try" in
11950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11951 *) ac_try_echo=$ac_try;;
11952 esac
11953 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
11954 $as_echo "$ac_try_echo"; } >&5
11955 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
11956 ac_status=$?
11957 if test -s conftest.err; then
11958 sed '10a\
11959 ... rest of stderr output deleted ...
11960 10q' conftest.err >conftest.er1
11961 cat conftest.er1 >&5
11962 fi
11963 rm -f conftest.er1 conftest.err
11964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11965 test $ac_status = 0; }
11966 done
11967
11968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
11969 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
11970 if ${ac_cv_c_compiler_gnu+:} false; then :
11971 $as_echo_n "(cached) " >&6
11972 else
11973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11974 /* end confdefs.h. */
11975
11976 int
11977 main ()
11978 {
11979 #ifndef __GNUC__
11980 choke me
11981 #endif
11982
11983 ;
11984 return 0;
11985 }
11986 _ACEOF
11987 if ac_fn_c_try_compile "$LINENO"; then :
11988 ac_compiler_gnu=yes
11989 else
11990 ac_compiler_gnu=no
11991 fi
11992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11993 ac_cv_c_compiler_gnu=$ac_compiler_gnu
11994
11995 fi
11996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
11997 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
11998 if test $ac_compiler_gnu = yes; then
11999 GCC=yes
12000 else
12001 GCC=
12002 fi
12003 ac_test_CFLAGS=${CFLAGS+set}
12004 ac_save_CFLAGS=$CFLAGS
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
12006 $as_echo_n "checking whether $CC accepts -g... " >&6; }
12007 if ${ac_cv_prog_cc_g+:} false; then :
12008 $as_echo_n "(cached) " >&6
12009 else
12010 ac_save_c_werror_flag=$ac_c_werror_flag
12011 ac_c_werror_flag=yes
12012 ac_cv_prog_cc_g=no
12013 CFLAGS="-g"
12014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12015 /* end confdefs.h. */
12016
12017 int
12018 main ()
12019 {
12020
12021 ;
12022 return 0;
12023 }
12024 _ACEOF
12025 if ac_fn_c_try_compile "$LINENO"; then :
12026 ac_cv_prog_cc_g=yes
12027 else
12028 CFLAGS=""
12029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12030 /* end confdefs.h. */
12031
12032 int
12033 main ()
12034 {
12035
12036 ;
12037 return 0;
12038 }
12039 _ACEOF
12040 if ac_fn_c_try_compile "$LINENO"; then :
12041
12042 else
12043 ac_c_werror_flag=$ac_save_c_werror_flag
12044 CFLAGS="-g"
12045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12046 /* end confdefs.h. */
12047
12048 int
12049 main ()
12050 {
12051
12052 ;
12053 return 0;
12054 }
12055 _ACEOF
12056 if ac_fn_c_try_compile "$LINENO"; then :
12057 ac_cv_prog_cc_g=yes
12058 fi
12059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12060 fi
12061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12062 fi
12063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12064 ac_c_werror_flag=$ac_save_c_werror_flag
12065 fi
12066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
12067 $as_echo "$ac_cv_prog_cc_g" >&6; }
12068 if test "$ac_test_CFLAGS" = set; then
12069 CFLAGS=$ac_save_CFLAGS
12070 elif test $ac_cv_prog_cc_g = yes; then
12071 if test "$GCC" = yes; then
12072 CFLAGS="-g -O2"
12073 else
12074 CFLAGS="-g"
12075 fi
12076 else
12077 if test "$GCC" = yes; then
12078 CFLAGS="-O2"
12079 else
12080 CFLAGS=
12081 fi
12082 fi
12083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
12084 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
12085 if ${ac_cv_prog_cc_c89+:} false; then :
12086 $as_echo_n "(cached) " >&6
12087 else
12088 ac_cv_prog_cc_c89=no
12089 ac_save_CC=$CC
12090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12091 /* end confdefs.h. */
12092 #include <stdarg.h>
12093 #include <stdio.h>
12094 struct stat;
12095 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
12096 struct buf { int x; };
12097 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12098 static char *e (p, i)
12099 char **p;
12100 int i;
12101 {
12102 return p[i];
12103 }
12104 static char *f (char * (*g) (char **, int), char **p, ...)
12105 {
12106 char *s;
12107 va_list v;
12108 va_start (v,p);
12109 s = g (p, va_arg (v,int));
12110 va_end (v);
12111 return s;
12112 }
12113
12114 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
12115 function prototypes and stuff, but not '\xHH' hex character constants.
12116 These don't provoke an error unfortunately, instead are silently treated
12117 as 'x'. The following induces an error, until -std is added to get
12118 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
12119 array size at least. It's necessary to write '\x00'==0 to get something
12120 that's true only with -std. */
12121 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12122
12123 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
12124 inside strings and character constants. */
12125 #define FOO(x) 'x'
12126 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
12127
12128 int test (int i, double x);
12129 struct s1 {int (*f) (int a);};
12130 struct s2 {int (*f) (double a);};
12131 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12132 int argc;
12133 char **argv;
12134 int
12135 main ()
12136 {
12137 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
12138 ;
12139 return 0;
12140 }
12141 _ACEOF
12142 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
12143 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12144 do
12145 CC="$ac_save_CC $ac_arg"
12146 if ac_fn_c_try_compile "$LINENO"; then :
12147 ac_cv_prog_cc_c89=$ac_arg
12148 fi
12149 rm -f core conftest.err conftest.$ac_objext
12150 test "x$ac_cv_prog_cc_c89" != "xno" && break
12151 done
12152 rm -f conftest.$ac_ext
12153 CC=$ac_save_CC
12154
12155 fi
12156 # AC_CACHE_VAL
12157 case "x$ac_cv_prog_cc_c89" in
12158 x)
12159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
12160 $as_echo "none needed" >&6; } ;;
12161 xno)
12162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
12163 $as_echo "unsupported" >&6; } ;;
12164 *)
12165 CC="$CC $ac_cv_prog_cc_c89"
12166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
12167 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
12168 esac
12169 if test "x$ac_cv_prog_cc_c89" != xno; then :
12170
12171 fi
12172
12173 ac_ext=c
12174 ac_cpp='$CPP $CPPFLAGS'
12175 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12176 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12177 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12178
12179 ac_ext=c
12180 ac_cpp='$CPP $CPPFLAGS'
12181 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12182 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12183 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
12185 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
12186 if ${am_cv_prog_cc_c_o+:} false; then :
12187 $as_echo_n "(cached) " >&6
12188 else
12189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12190 /* end confdefs.h. */
12191
12192 int
12193 main ()
12194 {
12195
12196 ;
12197 return 0;
12198 }
12199 _ACEOF
12200 # Make sure it works both with $CC and with simple cc.
12201 # Following AC_PROG_CC_C_O, we do the test twice because some
12202 # compilers refuse to overwrite an existing .o file with -o,
12203 # though they will create one.
12204 am_cv_prog_cc_c_o=yes
12205 for am_i in 1 2; do
12206 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
12207 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
12208 ac_status=$?
12209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12210 (exit $ac_status); } \
12211 && test -f conftest2.$ac_objext; then
12212 : OK
12213 else
12214 am_cv_prog_cc_c_o=no
12215 break
12216 fi
12217 done
12218 rm -f core conftest*
12219 unset am_i
12220 fi
12221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
12222 $as_echo "$am_cv_prog_cc_c_o" >&6; }
12223 if test "$am_cv_prog_cc_c_o" != yes; then
12224 # Losing compiler, so override with the script.
12225 # FIXME: It is wrong to rewrite CC.
12226 # But if we don't then we get into trouble of one sort or another.
12227 # A longer-term fix would be to have automake use am__CC in this case,
12228 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
12229 CC="$am_aux_dir/compile $CC"
12230 fi
12231 ac_ext=c
12232 ac_cpp='$CPP $CPPFLAGS'
12233 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12234 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12235 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12236
12237
12238 depcc="$CC" am_compiler_list=
12239
12240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
12241 $as_echo_n "checking dependency style of $depcc... " >&6; }
12242 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
12243 $as_echo_n "(cached) " >&6
12244 else
12245 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12246 # We make a subdir and do the tests there. Otherwise we can end up
12247 # making bogus files that we don't know about and never remove. For
12248 # instance it was reported that on HP-UX the gcc test will end up
12249 # making a dummy file named 'D' -- because '-MD' means "put the output
12250 # in D".
12251 rm -rf conftest.dir
12252 mkdir conftest.dir
12253 # Copy depcomp to subdir because otherwise we won't find it if we're
12254 # using a relative directory.
12255 cp "$am_depcomp" conftest.dir
12256 cd conftest.dir
12257 # We will build objects and dependencies in a subdirectory because
12258 # it helps to detect inapplicable dependency modes. For instance
12259 # both Tru64's cc and ICC support -MD to output dependencies as a
12260 # side effect of compilation, but ICC will put the dependencies in
12261 # the current directory while Tru64 will put them in the object
12262 # directory.
12263 mkdir sub
12264
12265 am_cv_CC_dependencies_compiler_type=none
12266 if test "$am_compiler_list" = ""; then
12267 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12268 fi
12269 am__universal=false
12270 case " $depcc " in #(
12271 *\ -arch\ *\ -arch\ *) am__universal=true ;;
12272 esac
12273
12274 for depmode in $am_compiler_list; do
12275 # Setup a source with many dependencies, because some compilers
12276 # like to wrap large dependency lists on column 80 (with \), and
12277 # we should not choose a depcomp mode which is confused by this.
12278 #
12279 # We need to recreate these files for each test, as the compiler may
12280 # overwrite some of them when testing with obscure command lines.
12281 # This happens at least with the AIX C compiler.
12282 : > sub/conftest.c
12283 for i in 1 2 3 4 5 6; do
12284 echo '#include "conftst'$i'.h"' >> sub/conftest.c
12285 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
12286 # Solaris 10 /bin/sh.
12287 echo '/* dummy */' > sub/conftst$i.h
12288 done
12289 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12290
12291 # We check with '-c' and '-o' for the sake of the "dashmstdout"
12292 # mode. It turns out that the SunPro C++ compiler does not properly
12293 # handle '-M -o', and we need to detect this. Also, some Intel
12294 # versions had trouble with output in subdirs.
12295 am__obj=sub/conftest.${OBJEXT-o}
12296 am__minus_obj="-o $am__obj"
12297 case $depmode in
12298 gcc)
12299 # This depmode causes a compiler race in universal mode.
12300 test "$am__universal" = false || continue
12301 ;;
12302 nosideeffect)
12303 # After this tag, mechanisms are not by side-effect, so they'll
12304 # only be used when explicitly requested.
12305 if test "x$enable_dependency_tracking" = xyes; then
12306 continue
12307 else
12308 break
12309 fi
12310 ;;
12311 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
12312 # This compiler won't grok '-c -o', but also, the minuso test has
12313 # not run yet. These depmodes are late enough in the game, and
12314 # so weak that their functioning should not be impacted.
12315 am__obj=conftest.${OBJEXT-o}
12316 am__minus_obj=
12317 ;;
12318 none) break ;;
12319 esac
12320 if depmode=$depmode \
12321 source=sub/conftest.c object=$am__obj \
12322 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12323 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
12324 >/dev/null 2>conftest.err &&
12325 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
12326 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12327 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
12328 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12329 # icc doesn't choke on unknown options, it will just issue warnings
12330 # or remarks (even with -Werror). So we grep stderr for any message
12331 # that says an option was ignored or not supported.
12332 # When given -MP, icc 7.0 and 7.1 complain thusly:
12333 # icc: Command line warning: ignoring option '-M'; no argument required
12334 # The diagnosis changed in icc 8.0:
12335 # icc: Command line remark: option '-MP' not supported
12336 if (grep 'ignoring option' conftest.err ||
12337 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12338 am_cv_CC_dependencies_compiler_type=$depmode
12339 break
12340 fi
12341 fi
12342 done
12343
12344 cd ..
12345 rm -rf conftest.dir
12346 else
12347 am_cv_CC_dependencies_compiler_type=none
12348 fi
12349
12350 fi
12351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
12352 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
12353 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
12354
12355 if
12356 test "x$enable_dependency_tracking" != xno \
12357 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
12358 am__fastdepCC_TRUE=
12359 am__fastdepCC_FALSE='#'
12360 else
12361 am__fastdepCC_TRUE='#'
12362 am__fastdepCC_FALSE=
12363 fi
12364
12365
12366
12367
12368
12369
12370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12371 $as_echo_n "checking for ANSI C header files... " >&6; }
12372 if ${ac_cv_header_stdc+:} false; then :
12373 $as_echo_n "(cached) " >&6
12374 else
12375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12376 /* end confdefs.h. */
12377 #include <stdlib.h>
12378 #include <stdarg.h>
12379 #include <string.h>
12380 #include <float.h>
12381
12382 int
12383 main ()
12384 {
12385
12386 ;
12387 return 0;
12388 }
12389 _ACEOF
12390 if ac_fn_c_try_compile "$LINENO"; then :
12391 ac_cv_header_stdc=yes
12392 else
12393 ac_cv_header_stdc=no
12394 fi
12395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12396
12397 if test $ac_cv_header_stdc = yes; then
12398 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12400 /* end confdefs.h. */
12401 #include <string.h>
12402
12403 _ACEOF
12404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12405 $EGREP "memchr" >/dev/null 2>&1; then :
12406
12407 else
12408 ac_cv_header_stdc=no
12409 fi
12410 rm -f conftest*
12411
12412 fi
12413
12414 if test $ac_cv_header_stdc = yes; then
12415 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12417 /* end confdefs.h. */
12418 #include <stdlib.h>
12419
12420 _ACEOF
12421 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12422 $EGREP "free" >/dev/null 2>&1; then :
12423
12424 else
12425 ac_cv_header_stdc=no
12426 fi
12427 rm -f conftest*
12428
12429 fi
12430
12431 if test $ac_cv_header_stdc = yes; then
12432 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12433 if test "$cross_compiling" = yes; then :
12434 :
12435 else
12436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12437 /* end confdefs.h. */
12438 #include <ctype.h>
12439 #include <stdlib.h>
12440 #if ((' ' & 0x0FF) == 0x020)
12441 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12442 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12443 #else
12444 # define ISLOWER(c) \
12445 (('a' <= (c) && (c) <= 'i') \
12446 || ('j' <= (c) && (c) <= 'r') \
12447 || ('s' <= (c) && (c) <= 'z'))
12448 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12449 #endif
12450
12451 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12452 int
12453 main ()
12454 {
12455 int i;
12456 for (i = 0; i < 256; i++)
12457 if (XOR (islower (i), ISLOWER (i))
12458 || toupper (i) != TOUPPER (i))
12459 return 2;
12460 return 0;
12461 }
12462 _ACEOF
12463 if ac_fn_c_try_run "$LINENO"; then :
12464
12465 else
12466 ac_cv_header_stdc=no
12467 fi
12468 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12469 conftest.$ac_objext conftest.beam conftest.$ac_ext
12470 fi
12471
12472 fi
12473 fi
12474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12475 $as_echo "$ac_cv_header_stdc" >&6; }
12476 if test $ac_cv_header_stdc = yes; then
12477
12478 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12479
12480 fi
12481
12482
12483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12484 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12485 if ${ac_cv_c_const+:} false; then :
12486 $as_echo_n "(cached) " >&6
12487 else
12488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12489 /* end confdefs.h. */
12490
12491 int
12492 main ()
12493 {
12494
12495 #ifndef __cplusplus
12496 /* Ultrix mips cc rejects this sort of thing. */
12497 typedef int charset[2];
12498 const charset cs = { 0, 0 };
12499 /* SunOS 4.1.1 cc rejects this. */
12500 char const *const *pcpcc;
12501 char **ppc;
12502 /* NEC SVR4.0.2 mips cc rejects this. */
12503 struct point {int x, y;};
12504 static struct point const zero = {0,0};
12505 /* AIX XL C 1.02.0.0 rejects this.
12506 It does not let you subtract one const X* pointer from another in
12507 an arm of an if-expression whose if-part is not a constant
12508 expression */
12509 const char *g = "string";
12510 pcpcc = &g + (g ? g-g : 0);
12511 /* HPUX 7.0 cc rejects these. */
12512 ++pcpcc;
12513 ppc = (char**) pcpcc;
12514 pcpcc = (char const *const *) ppc;
12515 { /* SCO 3.2v4 cc rejects this sort of thing. */
12516 char tx;
12517 char *t = &tx;
12518 char const *s = 0 ? (char *) 0 : (char const *) 0;
12519
12520 *t++ = 0;
12521 if (s) return 0;
12522 }
12523 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12524 int x[] = {25, 17};
12525 const int *foo = &x[0];
12526 ++foo;
12527 }
12528 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12529 typedef const int *iptr;
12530 iptr p = 0;
12531 ++p;
12532 }
12533 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12534 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12535 struct s { int j; const int *ap[3]; } bx;
12536 struct s *b = &bx; b->j = 5;
12537 }
12538 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12539 const int foo = 10;
12540 if (!foo) return 0;
12541 }
12542 return !cs[0] && !zero.x;
12543 #endif
12544
12545 ;
12546 return 0;
12547 }
12548 _ACEOF
12549 if ac_fn_c_try_compile "$LINENO"; then :
12550 ac_cv_c_const=yes
12551 else
12552 ac_cv_c_const=no
12553 fi
12554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12555 fi
12556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12557 $as_echo "$ac_cv_c_const" >&6; }
12558 if test $ac_cv_c_const = no; then
12559
12560 $as_echo "#define const /**/" >>confdefs.h
12561
12562 fi
12563
12564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12565 $as_echo_n "checking for inline... " >&6; }
12566 if ${ac_cv_c_inline+:} false; then :
12567 $as_echo_n "(cached) " >&6
12568 else
12569 ac_cv_c_inline=no
12570 for ac_kw in inline __inline__ __inline; do
12571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12572 /* end confdefs.h. */
12573 #ifndef __cplusplus
12574 typedef int foo_t;
12575 static $ac_kw foo_t static_foo () {return 0; }
12576 $ac_kw foo_t foo () {return 0; }
12577 #endif
12578
12579 _ACEOF
12580 if ac_fn_c_try_compile "$LINENO"; then :
12581 ac_cv_c_inline=$ac_kw
12582 fi
12583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12584 test "$ac_cv_c_inline" != no && break
12585 done
12586
12587 fi
12588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12589 $as_echo "$ac_cv_c_inline" >&6; }
12590
12591 case $ac_cv_c_inline in
12592 inline | yes) ;;
12593 *)
12594 case $ac_cv_c_inline in
12595 no) ac_val=;;
12596 *) ac_val=$ac_cv_c_inline;;
12597 esac
12598 cat >>confdefs.h <<_ACEOF
12599 #ifndef __cplusplus
12600 #define inline $ac_val
12601 #endif
12602 _ACEOF
12603 ;;
12604 esac
12605
12606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12607 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12608 if ${ac_cv_c_bigendian+:} false; then :
12609 $as_echo_n "(cached) " >&6
12610 else
12611 ac_cv_c_bigendian=unknown
12612 # See if we're dealing with a universal compiler.
12613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12614 /* end confdefs.h. */
12615 #ifndef __APPLE_CC__
12616 not a universal capable compiler
12617 #endif
12618 typedef int dummy;
12619
12620 _ACEOF
12621 if ac_fn_c_try_compile "$LINENO"; then :
12622
12623 # Check for potential -arch flags. It is not universal unless
12624 # there are at least two -arch flags with different values.
12625 ac_arch=
12626 ac_prev=
12627 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12628 if test -n "$ac_prev"; then
12629 case $ac_word in
12630 i?86 | x86_64 | ppc | ppc64)
12631 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12632 ac_arch=$ac_word
12633 else
12634 ac_cv_c_bigendian=universal
12635 break
12636 fi
12637 ;;
12638 esac
12639 ac_prev=
12640 elif test "x$ac_word" = "x-arch"; then
12641 ac_prev=arch
12642 fi
12643 done
12644 fi
12645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12646 if test $ac_cv_c_bigendian = unknown; then
12647 # See if sys/param.h defines the BYTE_ORDER macro.
12648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12649 /* end confdefs.h. */
12650 #include <sys/types.h>
12651 #include <sys/param.h>
12652
12653 int
12654 main ()
12655 {
12656 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12657 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12658 && LITTLE_ENDIAN)
12659 bogus endian macros
12660 #endif
12661
12662 ;
12663 return 0;
12664 }
12665 _ACEOF
12666 if ac_fn_c_try_compile "$LINENO"; then :
12667 # It does; now see whether it defined to BIG_ENDIAN or not.
12668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12669 /* end confdefs.h. */
12670 #include <sys/types.h>
12671 #include <sys/param.h>
12672
12673 int
12674 main ()
12675 {
12676 #if BYTE_ORDER != BIG_ENDIAN
12677 not big endian
12678 #endif
12679
12680 ;
12681 return 0;
12682 }
12683 _ACEOF
12684 if ac_fn_c_try_compile "$LINENO"; then :
12685 ac_cv_c_bigendian=yes
12686 else
12687 ac_cv_c_bigendian=no
12688 fi
12689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12690 fi
12691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12692 fi
12693 if test $ac_cv_c_bigendian = unknown; then
12694 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12696 /* end confdefs.h. */
12697 #include <limits.h>
12698
12699 int
12700 main ()
12701 {
12702 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12703 bogus endian macros
12704 #endif
12705
12706 ;
12707 return 0;
12708 }
12709 _ACEOF
12710 if ac_fn_c_try_compile "$LINENO"; then :
12711 # It does; now see whether it defined to _BIG_ENDIAN or not.
12712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12713 /* end confdefs.h. */
12714 #include <limits.h>
12715
12716 int
12717 main ()
12718 {
12719 #ifndef _BIG_ENDIAN
12720 not big endian
12721 #endif
12722
12723 ;
12724 return 0;
12725 }
12726 _ACEOF
12727 if ac_fn_c_try_compile "$LINENO"; then :
12728 ac_cv_c_bigendian=yes
12729 else
12730 ac_cv_c_bigendian=no
12731 fi
12732 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12733 fi
12734 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12735 fi
12736 if test $ac_cv_c_bigendian = unknown; then
12737 # Compile a test program.
12738 if test "$cross_compiling" = yes; then :
12739 # Try to guess by grepping values from an object file.
12740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12741 /* end confdefs.h. */
12742 short int ascii_mm[] =
12743 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12744 short int ascii_ii[] =
12745 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12746 int use_ascii (int i) {
12747 return ascii_mm[i] + ascii_ii[i];
12748 }
12749 short int ebcdic_ii[] =
12750 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12751 short int ebcdic_mm[] =
12752 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12753 int use_ebcdic (int i) {
12754 return ebcdic_mm[i] + ebcdic_ii[i];
12755 }
12756 extern int foo;
12757
12758 int
12759 main ()
12760 {
12761 return use_ascii (foo) == use_ebcdic (foo);
12762 ;
12763 return 0;
12764 }
12765 _ACEOF
12766 if ac_fn_c_try_compile "$LINENO"; then :
12767 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12768 ac_cv_c_bigendian=yes
12769 fi
12770 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12771 if test "$ac_cv_c_bigendian" = unknown; then
12772 ac_cv_c_bigendian=no
12773 else
12774 # finding both strings is unlikely to happen, but who knows?
12775 ac_cv_c_bigendian=unknown
12776 fi
12777 fi
12778 fi
12779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12780 else
12781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12782 /* end confdefs.h. */
12783 $ac_includes_default
12784 int
12785 main ()
12786 {
12787
12788 /* Are we little or big endian? From Harbison&Steele. */
12789 union
12790 {
12791 long int l;
12792 char c[sizeof (long int)];
12793 } u;
12794 u.l = 1;
12795 return u.c[sizeof (long int) - 1] == 1;
12796
12797 ;
12798 return 0;
12799 }
12800 _ACEOF
12801 if ac_fn_c_try_run "$LINENO"; then :
12802 ac_cv_c_bigendian=no
12803 else
12804 ac_cv_c_bigendian=yes
12805 fi
12806 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12807 conftest.$ac_objext conftest.beam conftest.$ac_ext
12808 fi
12809
12810 fi
12811 fi
12812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12813 $as_echo "$ac_cv_c_bigendian" >&6; }
12814 case $ac_cv_c_bigendian in #(
12815 yes)
12816 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12817 ;; #(
12818 no)
12819 ;; #(
12820 universal)
12821
12822 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12823
12824 ;; #(
12825 *)
12826 as_fn_error $? "unknown endianness
12827 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12828 esac
12829
12830
12831
12832 for ac_func in vprintf
12833 do :
12834 ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
12835 if test "x$ac_cv_func_vprintf" = xyes; then :
12836 cat >>confdefs.h <<_ACEOF
12837 #define HAVE_VPRINTF 1
12838 _ACEOF
12839
12840 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
12841 if test "x$ac_cv_func__doprnt" = xyes; then :
12842
12843 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
12844
12845 fi
12846
12847 fi
12848 done
12849
12850
12851 for ac_func in madvise localeconv
12852 do :
12853 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12854 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12855 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12856 cat >>confdefs.h <<_ACEOF
12857 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12858 _ACEOF
12859
12860 fi
12861 done
12862
12863 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
12864 if test "x$ac_cv_func_strcasecmp" = xyes; then :
12865 $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h
12866
12867 else
12868 case " $LIBOBJS " in
12869 *" strcasecmp.$ac_objext "* ) ;;
12870 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext"
12871 ;;
12872 esac
12873
12874 fi
12875
12876 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
12877 if test "x$ac_cv_func_strncasecmp" = xyes; then :
12878 $as_echo "#define HAVE_STRNCASECMP 1" >>confdefs.h
12879
12880 else
12881 case " $LIBOBJS " in
12882 *" strncasecmp.$ac_objext "* ) ;;
12883 *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext"
12884 ;;
12885 esac
12886
12887 fi
12888
12889
12890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pow" >&5
12891 $as_echo_n "checking for library containing pow... " >&6; }
12892 if ${ac_cv_search_pow+:} false; then :
12893 $as_echo_n "(cached) " >&6
12894 else
12895 ac_func_search_save_LIBS=$LIBS
12896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12897 /* end confdefs.h. */
12898
12899 /* Override any GCC internal prototype to avoid an error.
12900 Use char because int might match the return type of a GCC
12901 builtin and then its argument prototype would still apply. */
12902 #ifdef __cplusplus
12903 extern "C"
12904 #endif
12905 char pow ();
12906 int
12907 main ()
12908 {
12909 return pow ();
12910 ;
12911 return 0;
12912 }
12913 _ACEOF
12914 for ac_lib in '' m; do
12915 if test -z "$ac_lib"; then
12916 ac_res="none required"
12917 else
12918 ac_res=-l$ac_lib
12919 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12920 fi
12921 if ac_fn_c_try_link "$LINENO"; then :
12922 ac_cv_search_pow=$ac_res
12923 fi
12924 rm -f core conftest.err conftest.$ac_objext \
12925 conftest$ac_exeext
12926 if ${ac_cv_search_pow+:} false; then :
12927 break
12928 fi
12929 done
12930 if ${ac_cv_search_pow+:} false; then :
12931
12932 else
12933 ac_cv_search_pow=no
12934 fi
12935 rm conftest.$ac_ext
12936 LIBS=$ac_func_search_save_LIBS
12937 fi
12938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pow" >&5
12939 $as_echo "$ac_cv_search_pow" >&6; }
12940 ac_res=$ac_cv_search_pow
12941 if test "$ac_res" != no; then :
12942 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12943
12944 fi
12945
12946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing log10" >&5
12947 $as_echo_n "checking for library containing log10... " >&6; }
12948 if ${ac_cv_search_log10+:} false; then :
12949 $as_echo_n "(cached) " >&6
12950 else
12951 ac_func_search_save_LIBS=$LIBS
12952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12953 /* end confdefs.h. */
12954
12955 /* Override any GCC internal prototype to avoid an error.
12956 Use char because int might match the return type of a GCC
12957 builtin and then its argument prototype would still apply. */
12958 #ifdef __cplusplus
12959 extern "C"
12960 #endif
12961 char log10 ();
12962 int
12963 main ()
12964 {
12965 return log10 ();
12966 ;
12967 return 0;
12968 }
12969 _ACEOF
12970 for ac_lib in '' m; do
12971 if test -z "$ac_lib"; then
12972 ac_res="none required"
12973 else
12974 ac_res=-l$ac_lib
12975 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12976 fi
12977 if ac_fn_c_try_link "$LINENO"; then :
12978 ac_cv_search_log10=$ac_res
12979 fi
12980 rm -f core conftest.err conftest.$ac_objext \
12981 conftest$ac_exeext
12982 if ${ac_cv_search_log10+:} false; then :
12983 break
12984 fi
12985 done
12986 if ${ac_cv_search_log10+:} false; then :
12987
12988 else
12989 ac_cv_search_log10=no
12990 fi
12991 rm conftest.$ac_ext
12992 LIBS=$ac_func_search_save_LIBS
12993 fi
12994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_log10" >&5
12995 $as_echo "$ac_cv_search_log10" >&6; }
12996 ac_res=$ac_cv_search_log10
12997 if test "$ac_res" != no; then :
12998 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12999
13000 fi
13001
13002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use mmap" >&5
13003 $as_echo_n "checking whether to use mmap... " >&6; }
1040313004 cat >confcache <<\_ACEOF
1040413005 # This file is a shell script that caches the results of configure
1040513006 # tests run on this system so they can be shared between configure
1048613087 fi
1048713088 rm -f confcache
1048813089
13090
13091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable profiling" >&5
13092 $as_echo_n "checking whether to enable profiling... " >&6; }
13093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_profiling-no}" >&5
13094 $as_echo "${enable_profiling-no}" >&6; }
13095
13096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debugging" >&5
13097 $as_echo_n "checking whether to enable debugging... " >&6; }
13098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_experimental-no}" >&5
13099 $as_echo "${enable_experimental-no}" >&6; }
13100
13101
13102 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
13103 if test "x$ac_cv_type_ssize_t" = xyes; then :
13104
13105 else
13106
13107 cat >>confdefs.h <<_ACEOF
13108 #define ssize_t int
13109 _ACEOF
13110
13111 fi
13112
13113 for ac_prog in 'bison -y' byacc
13114 do
13115 # Extract the first word of "$ac_prog", so it can be a program name with args.
13116 set dummy $ac_prog; ac_word=$2
13117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13118 $as_echo_n "checking for $ac_word... " >&6; }
13119 if ${ac_cv_prog_YACC+:} false; then :
13120 $as_echo_n "(cached) " >&6
13121 else
13122 if test -n "$YACC"; then
13123 ac_cv_prog_YACC="$YACC" # Let the user override the test.
13124 else
13125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13126 for as_dir in $PATH
13127 do
13128 IFS=$as_save_IFS
13129 test -z "$as_dir" && as_dir=.
13130 for ac_exec_ext in '' $ac_executable_extensions; do
13131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13132 ac_cv_prog_YACC="$ac_prog"
13133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13134 break 2
13135 fi
13136 done
13137 done
13138 IFS=$as_save_IFS
13139
13140 fi
13141 fi
13142 YACC=$ac_cv_prog_YACC
13143 if test -n "$YACC"; then
13144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
13145 $as_echo "$YACC" >&6; }
13146 else
13147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13148 $as_echo "no" >&6; }
13149 fi
13150
13151
13152 test -n "$YACC" && break
13153 done
13154 test -n "$YACC" || YACC="yacc"
13155
13156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
13157 $as_echo_n "checking whether ln -s works... " >&6; }
13158 LN_S=$as_ln_s
13159 if test "$LN_S" = "ln -s"; then
13160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13161 $as_echo "yes" >&6; }
13162 else
13163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
13164 $as_echo "no, using $LN_S" >&6; }
13165 fi
13166
13167 for ac_func in __argz_count
13168 do :
13169 ac_fn_c_check_func "$LINENO" "__argz_count" "ac_cv_func___argz_count"
13170 if test "x$ac_cv_func___argz_count" = xyes; then :
13171 cat >>confdefs.h <<_ACEOF
13172 #define HAVE___ARGZ_COUNT 1
13173 _ACEOF
13174
13175 fi
13176 done
13177
13178 for ac_func in __argz_next
13179 do :
13180 ac_fn_c_check_func "$LINENO" "__argz_next" "ac_cv_func___argz_next"
13181 if test "x$ac_cv_func___argz_next" = xyes; then :
13182 cat >>confdefs.h <<_ACEOF
13183 #define HAVE___ARGZ_NEXT 1
13184 _ACEOF
13185
13186 fi
13187 done
13188
13189 for ac_func in __argz_stringify
13190 do :
13191 ac_fn_c_check_func "$LINENO" "__argz_stringify" "ac_cv_func___argz_stringify"
13192 if test "x$ac_cv_func___argz_stringify" = xyes; then :
13193 cat >>confdefs.h <<_ACEOF
13194 #define HAVE___ARGZ_STRINGIFY 1
13195 _ACEOF
13196
13197 fi
13198 done
13199
13200 for ac_func in memmove
13201 do :
13202 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
13203 if test "x$ac_cv_func_memmove" = xyes; then :
13204 cat >>confdefs.h <<_ACEOF
13205 #define HAVE_MEMMOVE 1
13206 _ACEOF
13207
13208 fi
13209 done
13210
13211 for ac_func in memset
13212 do :
13213 ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
13214 if test "x$ac_cv_func_memset" = xyes; then :
13215 cat >>confdefs.h <<_ACEOF
13216 #define HAVE_MEMSET 1
13217 _ACEOF
13218
13219 fi
13220 done
13221
13222 for ac_func in nl_langinfo
13223 do :
13224 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
13225 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
13226 cat >>confdefs.h <<_ACEOF
13227 #define HAVE_NL_LANGINFO 1
13228 _ACEOF
13229
13230 fi
13231 done
13232
13233 for ac_func in pow
13234 do :
13235 ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
13236 if test "x$ac_cv_func_pow" = xyes; then :
13237 cat >>confdefs.h <<_ACEOF
13238 #define HAVE_POW 1
13239 _ACEOF
13240
13241 fi
13242 done
13243
13244 for ac_func in strchr
13245 do :
13246 ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
13247 if test "x$ac_cv_func_strchr" = xyes; then :
13248 cat >>confdefs.h <<_ACEOF
13249 #define HAVE_STRCHR 1
13250 _ACEOF
13251
13252 fi
13253 done
13254
13255 for ac_func in strcspn
13256 do :
13257 ac_fn_c_check_func "$LINENO" "strcspn" "ac_cv_func_strcspn"
13258 if test "x$ac_cv_func_strcspn" = xyes; then :
13259 cat >>confdefs.h <<_ACEOF
13260 #define HAVE_STRCSPN 1
13261 _ACEOF
13262
13263 fi
13264 done
13265
13266 for ac_func in strncasecmp
13267 do :
13268 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
13269 if test "x$ac_cv_func_strncasecmp" = xyes; then :
13270 cat >>confdefs.h <<_ACEOF
13271 #define HAVE_STRNCASECMP 1
13272 _ACEOF
13273
13274 fi
13275 done
13276
13277 for ac_func in strrchr
13278 do :
13279 ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr"
13280 if test "x$ac_cv_func_strrchr" = xyes; then :
13281 cat >>confdefs.h <<_ACEOF
13282 #define HAVE_STRRCHR 1
13283 _ACEOF
13284
13285 fi
13286 done
13287
13288 for ac_func in strstr
13289 do :
13290 ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
13291 if test "x$ac_cv_func_strstr" = xyes; then :
13292 cat >>confdefs.h <<_ACEOF
13293 #define HAVE_STRSTR 1
13294 _ACEOF
13295
13296 fi
13297 done
13298
13299 for ac_func in strtol
13300 do :
13301 ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
13302 if test "x$ac_cv_func_strtol" = xyes; then :
13303 cat >>confdefs.h <<_ACEOF
13304 #define HAVE_STRTOL 1
13305 _ACEOF
13306
13307 fi
13308 done
13309
13310 for ac_header in float.h
13311 do :
13312 ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default"
13313 if test "x$ac_cv_header_float_h" = xyes; then :
13314 cat >>confdefs.h <<_ACEOF
13315 #define HAVE_FLOAT_H 1
13316 _ACEOF
13317
13318 fi
13319
13320 done
13321
13322 for ac_header in langinfo.h
13323 do :
13324 ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
13325 if test "x$ac_cv_header_langinfo_h" = xyes; then :
13326 cat >>confdefs.h <<_ACEOF
13327 #define HAVE_LANGINFO_H 1
13328 _ACEOF
13329
13330 fi
13331
13332 done
13333
13334 for ac_header in libintl.h
13335 do :
13336 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
13337 if test "x$ac_cv_header_libintl_h" = xyes; then :
13338 cat >>confdefs.h <<_ACEOF
13339 #define HAVE_LIBINTL_H 1
13340 _ACEOF
13341
13342 fi
13343
13344 done
13345
13346 for ac_header in locale.h
13347 do :
13348 ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
13349 if test "x$ac_cv_header_locale_h" = xyes; then :
13350 cat >>confdefs.h <<_ACEOF
13351 #define HAVE_LOCALE_H 1
13352 _ACEOF
13353
13354 fi
13355
13356 done
13357
13358 for ac_header in malloc.h
13359 do :
13360 ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default"
13361 if test "x$ac_cv_header_malloc_h" = xyes; then :
13362 cat >>confdefs.h <<_ACEOF
13363 #define HAVE_MALLOC_H 1
13364 _ACEOF
13365
13366 fi
13367
13368 done
13369
13370 for ac_header in stdio_ext.h
13371 do :
13372 ac_fn_c_check_header_mongrel "$LINENO" "stdio_ext.h" "ac_cv_header_stdio_ext_h" "$ac_includes_default"
13373 if test "x$ac_cv_header_stdio_ext_h" = xyes; then :
13374 cat >>confdefs.h <<_ACEOF
13375 #define HAVE_STDIO_EXT_H 1
13376 _ACEOF
13377
13378 fi
13379
13380 done
13381
13382 for ac_header in wchar.h
13383 do :
13384 ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
13385 if test "x$ac_cv_header_wchar_h" = xyes; then :
13386 cat >>confdefs.h <<_ACEOF
13387 #define HAVE_WCHAR_H 1
13388 _ACEOF
13389
13390 fi
13391
13392 done
13393
13394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13395 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13396 if ${ac_cv_header_stdbool_h+:} false; then :
13397 $as_echo_n "(cached) " >&6
13398 else
13399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13400 /* end confdefs.h. */
13401
13402 #include <stdbool.h>
13403 #ifndef bool
13404 "error: bool is not defined"
13405 #endif
13406 #ifndef false
13407 "error: false is not defined"
13408 #endif
13409 #if false
13410 "error: false is not 0"
13411 #endif
13412 #ifndef true
13413 "error: true is not defined"
13414 #endif
13415 #if true != 1
13416 "error: true is not 1"
13417 #endif
13418 #ifndef __bool_true_false_are_defined
13419 "error: __bool_true_false_are_defined is not defined"
13420 #endif
13421
13422 struct s { _Bool s: 1; _Bool t; } s;
13423
13424 char a[true == 1 ? 1 : -1];
13425 char b[false == 0 ? 1 : -1];
13426 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13427 char d[(bool) 0.5 == true ? 1 : -1];
13428 /* See body of main program for 'e'. */
13429 char f[(_Bool) 0.0 == false ? 1 : -1];
13430 char g[true];
13431 char h[sizeof (_Bool)];
13432 char i[sizeof s.t];
13433 enum { j = false, k = true, l = false * true, m = true * 256 };
13434 /* The following fails for
13435 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13436 _Bool n[m];
13437 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13438 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13439 /* Catch a bug in an HP-UX C compiler. See
13440 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13441 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13442 */
13443 _Bool q = true;
13444 _Bool *pq = &q;
13445
13446 int
13447 main ()
13448 {
13449
13450 bool e = &s;
13451 *pq |= q;
13452 *pq |= ! q;
13453 /* Refer to every declared value, to avoid compiler optimizations. */
13454 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13455 + !m + !n + !o + !p + !q + !pq);
13456
13457 ;
13458 return 0;
13459 }
13460 _ACEOF
13461 if ac_fn_c_try_compile "$LINENO"; then :
13462 ac_cv_header_stdbool_h=yes
13463 else
13464 ac_cv_header_stdbool_h=no
13465 fi
13466 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13467 fi
13468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13469 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13470 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13471 if test "x$ac_cv_type__Bool" = xyes; then :
13472
13473 cat >>confdefs.h <<_ACEOF
13474 #define HAVE__BOOL 1
13475 _ACEOF
13476
13477
13478 fi
13479
13480
13481 ac_fn_c_check_header_mongrel "$LINENO" "id3tag.h" "ac_cv_header_id3tag_h" "$ac_includes_default"
13482 if test "x$ac_cv_header_id3tag_h" = xyes; then :
13483
13484 else
13485
13486 as_fn_error $? "id3tag.h was not found
13487 *** You must first install libid3tag before you can build this package.
13488 *** If libid3tag is already installed, you may need to use the CPPFLAGS
13489 *** environment variable to specify its installed location, e.g. -I<dir>." "$LINENO" 5
13490
13491 fi
13492
13493
13494 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
13495 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
13496
13497 cat >>confdefs.h <<_ACEOF
13498 #define HAVE_PTRDIFF_T 1
13499 _ACEOF
13500
13501
13502 fi
13503
13504 for ac_func in getcwd
13505 do :
13506 ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
13507 if test "x$ac_cv_func_getcwd" = xyes; then :
13508 cat >>confdefs.h <<_ACEOF
13509 #define HAVE_GETCWD 1
13510 _ACEOF
13511
13512 fi
13513 done
13514
13515 for ac_func in mempcpy
13516 do :
13517 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
13518 if test "x$ac_cv_func_mempcpy" = xyes; then :
13519 cat >>confdefs.h <<_ACEOF
13520 #define HAVE_MEMPCPY 1
13521 _ACEOF
13522
13523 fi
13524 done
13525
13526 for ac_func in stpcpy
13527 do :
13528 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
13529 if test "x$ac_cv_func_stpcpy" = xyes; then :
13530 cat >>confdefs.h <<_ACEOF
13531 #define HAVE_STPCPY 1
13532 _ACEOF
13533
13534 fi
13535 done
13536
13537 for ac_func in strtoul
13538 do :
13539 ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
13540 if test "x$ac_cv_func_strtoul" = xyes; then :
13541 cat >>confdefs.h <<_ACEOF
13542 #define HAVE_STRTOUL 1
13543 _ACEOF
13544
13545 fi
13546 done
13547
13548 for ac_header in argz.h
13549 do :
13550 ac_fn_c_check_header_mongrel "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default"
13551 if test "x$ac_cv_header_argz_h" = xyes; then :
13552 cat >>confdefs.h <<_ACEOF
13553 #define HAVE_ARGZ_H 1
13554 _ACEOF
13555
13556 fi
13557
13558 done
13559
13560 for ac_header in limits.h
13561 do :
13562 ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
13563 if test "x$ac_cv_header_limits_h" = xyes; then :
13564 cat >>confdefs.h <<_ACEOF
13565 #define HAVE_LIMITS_H 1
13566 _ACEOF
13567
13568 fi
13569
13570 done
13571
13572 for ac_header in stddef.h
13573 do :
13574 ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
13575 if test "x$ac_cv_header_stddef_h" = xyes; then :
13576 cat >>confdefs.h <<_ACEOF
13577 #define HAVE_STDDEF_H 1
13578 _ACEOF
13579
13580 fi
13581
13582 done
13583
13584 for ac_header in sys/param.h
13585 do :
13586 ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
13587 if test "x$ac_cv_header_sys_param_h" = xyes; then :
13588 cat >>confdefs.h <<_ACEOF
13589 #define HAVE_SYS_PARAM_H 1
13590 _ACEOF
13591
13592 fi
13593
13594 done
13595
13596 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13597 # for constant arguments. Useless!
13598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13599 $as_echo_n "checking for working alloca.h... " >&6; }
13600 if ${ac_cv_working_alloca_h+:} false; then :
13601 $as_echo_n "(cached) " >&6
13602 else
13603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13604 /* end confdefs.h. */
13605 #include <alloca.h>
13606 int
13607 main ()
13608 {
13609 char *p = (char *) alloca (2 * sizeof (int));
13610 if (p) return 0;
13611 ;
13612 return 0;
13613 }
13614 _ACEOF
13615 if ac_fn_c_try_link "$LINENO"; then :
13616 ac_cv_working_alloca_h=yes
13617 else
13618 ac_cv_working_alloca_h=no
13619 fi
13620 rm -f core conftest.err conftest.$ac_objext \
13621 conftest$ac_exeext conftest.$ac_ext
13622 fi
13623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13624 $as_echo "$ac_cv_working_alloca_h" >&6; }
13625 if test $ac_cv_working_alloca_h = yes; then
13626
13627 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13628
13629 fi
13630
13631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13632 $as_echo_n "checking for alloca... " >&6; }
13633 if ${ac_cv_func_alloca_works+:} false; then :
13634 $as_echo_n "(cached) " >&6
13635 else
13636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13637 /* end confdefs.h. */
13638 #ifdef __GNUC__
13639 # define alloca __builtin_alloca
13640 #else
13641 # ifdef _MSC_VER
13642 # include <malloc.h>
13643 # define alloca _alloca
13644 # else
13645 # ifdef HAVE_ALLOCA_H
13646 # include <alloca.h>
13647 # else
13648 # ifdef _AIX
13649 #pragma alloca
13650 # else
13651 # ifndef alloca /* predefined by HP cc +Olibcalls */
13652 void *alloca (size_t);
13653 # endif
13654 # endif
13655 # endif
13656 # endif
13657 #endif
13658
13659 int
13660 main ()
13661 {
13662 char *p = (char *) alloca (1);
13663 if (p) return 0;
13664 ;
13665 return 0;
13666 }
13667 _ACEOF
13668 if ac_fn_c_try_link "$LINENO"; then :
13669 ac_cv_func_alloca_works=yes
13670 else
13671 ac_cv_func_alloca_works=no
13672 fi
13673 rm -f core conftest.err conftest.$ac_objext \
13674 conftest$ac_exeext conftest.$ac_ext
13675 fi
13676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13677 $as_echo "$ac_cv_func_alloca_works" >&6; }
13678
13679 if test $ac_cv_func_alloca_works = yes; then
13680
13681 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13682
13683 else
13684 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13685 # that cause trouble. Some versions do not even contain alloca or
13686 # contain a buggy version. If you still want to use their alloca,
13687 # use ar to extract alloca.o from them instead of compiling alloca.c.
13688
13689 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13690
13691 $as_echo "#define C_ALLOCA 1" >>confdefs.h
13692
13693
13694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13695 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13696 if ${ac_cv_os_cray+:} false; then :
13697 $as_echo_n "(cached) " >&6
13698 else
13699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13700 /* end confdefs.h. */
13701 #if defined CRAY && ! defined CRAY2
13702 webecray
13703 #else
13704 wenotbecray
13705 #endif
13706
13707 _ACEOF
13708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13709 $EGREP "webecray" >/dev/null 2>&1; then :
13710 ac_cv_os_cray=yes
13711 else
13712 ac_cv_os_cray=no
13713 fi
13714 rm -f conftest*
13715
13716 fi
13717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13718 $as_echo "$ac_cv_os_cray" >&6; }
13719 if test $ac_cv_os_cray = yes; then
13720 for ac_func in _getb67 GETB67 getb67; do
13721 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13722 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13723 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13724
13725 cat >>confdefs.h <<_ACEOF
13726 #define CRAY_STACKSEG_END $ac_func
13727 _ACEOF
13728
13729 break
13730 fi
13731
13732 done
13733 fi
13734
13735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13736 $as_echo_n "checking stack direction for C alloca... " >&6; }
13737 if ${ac_cv_c_stack_direction+:} false; then :
13738 $as_echo_n "(cached) " >&6
13739 else
13740 if test "$cross_compiling" = yes; then :
13741 ac_cv_c_stack_direction=0
13742 else
13743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13744 /* end confdefs.h. */
13745 $ac_includes_default
13746 int
13747 find_stack_direction (int *addr, int depth)
13748 {
13749 int dir, dummy = 0;
13750 if (! addr)
13751 addr = &dummy;
13752 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13753 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13754 return dir + dummy;
13755 }
13756
13757 int
13758 main (int argc, char **argv)
13759 {
13760 return find_stack_direction (0, argc + !argv + 20) < 0;
13761 }
13762 _ACEOF
13763 if ac_fn_c_try_run "$LINENO"; then :
13764 ac_cv_c_stack_direction=1
13765 else
13766 ac_cv_c_stack_direction=-1
13767 fi
13768 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13769 conftest.$ac_objext conftest.beam conftest.$ac_ext
13770 fi
13771
13772 fi
13773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13774 $as_echo "$ac_cv_c_stack_direction" >&6; }
13775 cat >>confdefs.h <<_ACEOF
13776 #define STACK_DIRECTION $ac_cv_c_stack_direction
13777 _ACEOF
13778
13779
13780 fi
13781
13782 for ac_header in stdlib.h
13783 do :
13784 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
13785 if test "x$ac_cv_header_stdlib_h" = xyes; then :
13786 cat >>confdefs.h <<_ACEOF
13787 #define HAVE_STDLIB_H 1
13788 _ACEOF
13789
13790 fi
13791
13792 done
13793
13794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
13795 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
13796 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
13797 $as_echo_n "(cached) " >&6
13798 else
13799 if test "$cross_compiling" = yes; then :
13800 ac_cv_func_malloc_0_nonnull=no
13801 else
13802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13803 /* end confdefs.h. */
13804 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
13805 # include <stdlib.h>
13806 #else
13807 char *malloc ();
13808 #endif
13809
13810 int
13811 main ()
13812 {
13813 return ! malloc (0);
13814 ;
13815 return 0;
13816 }
13817 _ACEOF
13818 if ac_fn_c_try_run "$LINENO"; then :
13819 ac_cv_func_malloc_0_nonnull=yes
13820 else
13821 ac_cv_func_malloc_0_nonnull=no
13822 fi
13823 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13824 conftest.$ac_objext conftest.beam conftest.$ac_ext
13825 fi
13826
13827 fi
13828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
13829 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
13830 if test $ac_cv_func_malloc_0_nonnull = yes; then :
13831
13832 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
13833
13834 else
13835 $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
13836
13837 case " $LIBOBJS " in
13838 *" malloc.$ac_objext "* ) ;;
13839 *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
13840 ;;
13841 esac
13842
13843
13844 $as_echo "#define malloc rpl_malloc" >>confdefs.h
13845
13846 fi
13847
13848
13849 for ac_header in stdlib.h
13850 do :
13851 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
13852 if test "x$ac_cv_header_stdlib_h" = xyes; then :
13853 cat >>confdefs.h <<_ACEOF
13854 #define HAVE_STDLIB_H 1
13855 _ACEOF
13856
13857 fi
13858
13859 done
13860
13861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
13862 $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
13863 if ${ac_cv_func_realloc_0_nonnull+:} false; then :
13864 $as_echo_n "(cached) " >&6
13865 else
13866 if test "$cross_compiling" = yes; then :
13867 ac_cv_func_realloc_0_nonnull=no
13868 else
13869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13870 /* end confdefs.h. */
13871 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
13872 # include <stdlib.h>
13873 #else
13874 char *realloc ();
13875 #endif
13876
13877 int
13878 main ()
13879 {
13880 return ! realloc (0, 0);
13881 ;
13882 return 0;
13883 }
13884 _ACEOF
13885 if ac_fn_c_try_run "$LINENO"; then :
13886 ac_cv_func_realloc_0_nonnull=yes
13887 else
13888 ac_cv_func_realloc_0_nonnull=no
13889 fi
13890 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13891 conftest.$ac_objext conftest.beam conftest.$ac_ext
13892 fi
13893
13894 fi
13895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
13896 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
13897 if test $ac_cv_func_realloc_0_nonnull = yes; then :
13898
13899 $as_echo "#define HAVE_REALLOC 1" >>confdefs.h
13900
13901 else
13902 $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
13903
13904 case " $LIBOBJS " in
13905 *" realloc.$ac_objext "* ) ;;
13906 *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
13907 ;;
13908 esac
13909
13910
13911 $as_echo "#define realloc rpl_realloc" >>confdefs.h
13912
13913 fi
13914
13915
13916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
13917 $as_echo_n "checking for working strtod... " >&6; }
13918 if ${ac_cv_func_strtod+:} false; then :
13919 $as_echo_n "(cached) " >&6
13920 else
13921 if test "$cross_compiling" = yes; then :
13922 ac_cv_func_strtod=no
13923 else
13924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13925 /* end confdefs.h. */
13926
13927 $ac_includes_default
13928 #ifndef strtod
13929 double strtod ();
13930 #endif
13931 int
13932 main()
13933 {
13934 {
13935 /* Some versions of Linux strtod mis-parse strings with leading '+'. */
13936 char *string = " +69";
13937 char *term;
13938 double value;
13939 value = strtod (string, &term);
13940 if (value != 69 || term != (string + 4))
13941 return 1;
13942 }
13943
13944 {
13945 /* Under Solaris 2.4, strtod returns the wrong value for the
13946 terminating character under some conditions. */
13947 char *string = "NaN";
13948 char *term;
13949 strtod (string, &term);
13950 if (term != string && *(term - 1) == 0)
13951 return 1;
13952 }
13953 return 0;
13954 }
13955
13956 _ACEOF
13957 if ac_fn_c_try_run "$LINENO"; then :
13958 ac_cv_func_strtod=yes
13959 else
13960 ac_cv_func_strtod=no
13961 fi
13962 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13963 conftest.$ac_objext conftest.beam conftest.$ac_ext
13964 fi
13965
13966 fi
13967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
13968 $as_echo "$ac_cv_func_strtod" >&6; }
13969 if test $ac_cv_func_strtod = no; then
13970 case " $LIBOBJS " in
13971 *" strtod.$ac_objext "* ) ;;
13972 *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
13973 ;;
13974 esac
13975
13976 ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
13977 if test "x$ac_cv_func_pow" = xyes; then :
13978
13979 fi
13980
13981 if test $ac_cv_func_pow = no; then
13982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
13983 $as_echo_n "checking for pow in -lm... " >&6; }
13984 if ${ac_cv_lib_m_pow+:} false; then :
13985 $as_echo_n "(cached) " >&6
13986 else
13987 ac_check_lib_save_LIBS=$LIBS
13988 LIBS="-lm $LIBS"
13989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13990 /* end confdefs.h. */
13991
13992 /* Override any GCC internal prototype to avoid an error.
13993 Use char because int might match the return type of a GCC
13994 builtin and then its argument prototype would still apply. */
13995 #ifdef __cplusplus
13996 extern "C"
13997 #endif
13998 char pow ();
13999 int
14000 main ()
14001 {
14002 return pow ();
14003 ;
14004 return 0;
14005 }
14006 _ACEOF
14007 if ac_fn_c_try_link "$LINENO"; then :
14008 ac_cv_lib_m_pow=yes
14009 else
14010 ac_cv_lib_m_pow=no
14011 fi
14012 rm -f core conftest.err conftest.$ac_objext \
14013 conftest$ac_exeext conftest.$ac_ext
14014 LIBS=$ac_check_lib_save_LIBS
14015 fi
14016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
14017 $as_echo "$ac_cv_lib_m_pow" >&6; }
14018 if test "x$ac_cv_lib_m_pow" = xyes; then :
14019 POW_LIB=-lm
14020 else
14021 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
14022 $as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
14023 fi
14024
14025 fi
14026
14027 fi
14028
14029 ac_ext=cpp
14030 ac_cpp='$CXXCPP $CPPFLAGS'
14031 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14032 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14033 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14034 if test -z "$CXX"; then
14035 if test -n "$CCC"; then
14036 CXX=$CCC
14037 else
14038 if test -n "$ac_tool_prefix"; then
14039 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
14040 do
14041 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14042 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14044 $as_echo_n "checking for $ac_word... " >&6; }
14045 if ${ac_cv_prog_CXX+:} false; then :
14046 $as_echo_n "(cached) " >&6
14047 else
14048 if test -n "$CXX"; then
14049 ac_cv_prog_CXX="$CXX" # Let the user override the test.
14050 else
14051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14052 for as_dir in $PATH
14053 do
14054 IFS=$as_save_IFS
14055 test -z "$as_dir" && as_dir=.
14056 for ac_exec_ext in '' $ac_executable_extensions; do
14057 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14058 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
14059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14060 break 2
14061 fi
14062 done
14063 done
14064 IFS=$as_save_IFS
14065
14066 fi
14067 fi
14068 CXX=$ac_cv_prog_CXX
14069 if test -n "$CXX"; then
14070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
14071 $as_echo "$CXX" >&6; }
14072 else
14073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14074 $as_echo "no" >&6; }
14075 fi
14076
14077
14078 test -n "$CXX" && break
14079 done
14080 fi
14081 if test -z "$CXX"; then
14082 ac_ct_CXX=$CXX
14083 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
14084 do
14085 # Extract the first word of "$ac_prog", so it can be a program name with args.
14086 set dummy $ac_prog; ac_word=$2
14087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14088 $as_echo_n "checking for $ac_word... " >&6; }
14089 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
14090 $as_echo_n "(cached) " >&6
14091 else
14092 if test -n "$ac_ct_CXX"; then
14093 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
14094 else
14095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14096 for as_dir in $PATH
14097 do
14098 IFS=$as_save_IFS
14099 test -z "$as_dir" && as_dir=.
14100 for ac_exec_ext in '' $ac_executable_extensions; do
14101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14102 ac_cv_prog_ac_ct_CXX="$ac_prog"
14103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14104 break 2
14105 fi
14106 done
14107 done
14108 IFS=$as_save_IFS
14109
14110 fi
14111 fi
14112 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
14113 if test -n "$ac_ct_CXX"; then
14114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
14115 $as_echo "$ac_ct_CXX" >&6; }
14116 else
14117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14118 $as_echo "no" >&6; }
14119 fi
14120
14121
14122 test -n "$ac_ct_CXX" && break
14123 done
14124
14125 if test "x$ac_ct_CXX" = x; then
14126 CXX="g++"
14127 else
14128 case $cross_compiling:$ac_tool_warned in
14129 yes:)
14130 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14131 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14132 ac_tool_warned=yes ;;
14133 esac
14134 CXX=$ac_ct_CXX
14135 fi
14136 fi
14137
14138 fi
14139 fi
14140 # Provide some information about the compiler.
14141 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
14142 set X $ac_compile
14143 ac_compiler=$2
14144 for ac_option in --version -v -V -qversion; do
14145 { { ac_try="$ac_compiler $ac_option >&5"
14146 case "(($ac_try" in
14147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14148 *) ac_try_echo=$ac_try;;
14149 esac
14150 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
14151 $as_echo "$ac_try_echo"; } >&5
14152 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
14153 ac_status=$?
14154 if test -s conftest.err; then
14155 sed '10a\
14156 ... rest of stderr output deleted ...
14157 10q' conftest.err >conftest.er1
14158 cat conftest.er1 >&5
14159 fi
14160 rm -f conftest.er1 conftest.err
14161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14162 test $ac_status = 0; }
14163 done
14164
14165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
14166 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
14167 if ${ac_cv_cxx_compiler_gnu+:} false; then :
14168 $as_echo_n "(cached) " >&6
14169 else
14170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14171 /* end confdefs.h. */
14172
14173 int
14174 main ()
14175 {
14176 #ifndef __GNUC__
14177 choke me
14178 #endif
14179
14180 ;
14181 return 0;
14182 }
14183 _ACEOF
14184 if ac_fn_cxx_try_compile "$LINENO"; then :
14185 ac_compiler_gnu=yes
14186 else
14187 ac_compiler_gnu=no
14188 fi
14189 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14190 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
14191
14192 fi
14193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
14194 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
14195 if test $ac_compiler_gnu = yes; then
14196 GXX=yes
14197 else
14198 GXX=
14199 fi
14200 ac_test_CXXFLAGS=${CXXFLAGS+set}
14201 ac_save_CXXFLAGS=$CXXFLAGS
14202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
14203 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
14204 if ${ac_cv_prog_cxx_g+:} false; then :
14205 $as_echo_n "(cached) " >&6
14206 else
14207 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
14208 ac_cxx_werror_flag=yes
14209 ac_cv_prog_cxx_g=no
14210 CXXFLAGS="-g"
14211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14212 /* end confdefs.h. */
14213
14214 int
14215 main ()
14216 {
14217
14218 ;
14219 return 0;
14220 }
14221 _ACEOF
14222 if ac_fn_cxx_try_compile "$LINENO"; then :
14223 ac_cv_prog_cxx_g=yes
14224 else
14225 CXXFLAGS=""
14226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14227 /* end confdefs.h. */
14228
14229 int
14230 main ()
14231 {
14232
14233 ;
14234 return 0;
14235 }
14236 _ACEOF
14237 if ac_fn_cxx_try_compile "$LINENO"; then :
14238
14239 else
14240 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
14241 CXXFLAGS="-g"
14242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14243 /* end confdefs.h. */
14244
14245 int
14246 main ()
14247 {
14248
14249 ;
14250 return 0;
14251 }
14252 _ACEOF
14253 if ac_fn_cxx_try_compile "$LINENO"; then :
14254 ac_cv_prog_cxx_g=yes
14255 fi
14256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14257 fi
14258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14259 fi
14260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14261 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
14262 fi
14263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
14264 $as_echo "$ac_cv_prog_cxx_g" >&6; }
14265 if test "$ac_test_CXXFLAGS" = set; then
14266 CXXFLAGS=$ac_save_CXXFLAGS
14267 elif test $ac_cv_prog_cxx_g = yes; then
14268 if test "$GXX" = yes; then
14269 CXXFLAGS="-g -O2"
14270 else
14271 CXXFLAGS="-g"
14272 fi
14273 else
14274 if test "$GXX" = yes; then
14275 CXXFLAGS="-O2"
14276 else
14277 CXXFLAGS=
14278 fi
14279 fi
14280 ac_ext=c
14281 ac_cpp='$CPP $CPPFLAGS'
14282 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14283 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14284 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14285
14286 depcc="$CXX" am_compiler_list=
14287
14288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
14289 $as_echo_n "checking dependency style of $depcc... " >&6; }
14290 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
14291 $as_echo_n "(cached) " >&6
14292 else
14293 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
14294 # We make a subdir and do the tests there. Otherwise we can end up
14295 # making bogus files that we don't know about and never remove. For
14296 # instance it was reported that on HP-UX the gcc test will end up
14297 # making a dummy file named 'D' -- because '-MD' means "put the output
14298 # in D".
14299 rm -rf conftest.dir
14300 mkdir conftest.dir
14301 # Copy depcomp to subdir because otherwise we won't find it if we're
14302 # using a relative directory.
14303 cp "$am_depcomp" conftest.dir
14304 cd conftest.dir
14305 # We will build objects and dependencies in a subdirectory because
14306 # it helps to detect inapplicable dependency modes. For instance
14307 # both Tru64's cc and ICC support -MD to output dependencies as a
14308 # side effect of compilation, but ICC will put the dependencies in
14309 # the current directory while Tru64 will put them in the object
14310 # directory.
14311 mkdir sub
14312
14313 am_cv_CXX_dependencies_compiler_type=none
14314 if test "$am_compiler_list" = ""; then
14315 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
14316 fi
14317 am__universal=false
14318 case " $depcc " in #(
14319 *\ -arch\ *\ -arch\ *) am__universal=true ;;
14320 esac
14321
14322 for depmode in $am_compiler_list; do
14323 # Setup a source with many dependencies, because some compilers
14324 # like to wrap large dependency lists on column 80 (with \), and
14325 # we should not choose a depcomp mode which is confused by this.
14326 #
14327 # We need to recreate these files for each test, as the compiler may
14328 # overwrite some of them when testing with obscure command lines.
14329 # This happens at least with the AIX C compiler.
14330 : > sub/conftest.c
14331 for i in 1 2 3 4 5 6; do
14332 echo '#include "conftst'$i'.h"' >> sub/conftest.c
14333 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
14334 # Solaris 10 /bin/sh.
14335 echo '/* dummy */' > sub/conftst$i.h
14336 done
14337 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
14338
14339 # We check with '-c' and '-o' for the sake of the "dashmstdout"
14340 # mode. It turns out that the SunPro C++ compiler does not properly
14341 # handle '-M -o', and we need to detect this. Also, some Intel
14342 # versions had trouble with output in subdirs.
14343 am__obj=sub/conftest.${OBJEXT-o}
14344 am__minus_obj="-o $am__obj"
14345 case $depmode in
14346 gcc)
14347 # This depmode causes a compiler race in universal mode.
14348 test "$am__universal" = false || continue
14349 ;;
14350 nosideeffect)
14351 # After this tag, mechanisms are not by side-effect, so they'll
14352 # only be used when explicitly requested.
14353 if test "x$enable_dependency_tracking" = xyes; then
14354 continue
14355 else
14356 break
14357 fi
14358 ;;
14359 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
14360 # This compiler won't grok '-c -o', but also, the minuso test has
14361 # not run yet. These depmodes are late enough in the game, and
14362 # so weak that their functioning should not be impacted.
14363 am__obj=conftest.${OBJEXT-o}
14364 am__minus_obj=
14365 ;;
14366 none) break ;;
14367 esac
14368 if depmode=$depmode \
14369 source=sub/conftest.c object=$am__obj \
14370 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
14371 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
14372 >/dev/null 2>conftest.err &&
14373 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
14374 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
14375 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
14376 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
14377 # icc doesn't choke on unknown options, it will just issue warnings
14378 # or remarks (even with -Werror). So we grep stderr for any message
14379 # that says an option was ignored or not supported.
14380 # When given -MP, icc 7.0 and 7.1 complain thusly:
14381 # icc: Command line warning: ignoring option '-M'; no argument required
14382 # The diagnosis changed in icc 8.0:
14383 # icc: Command line remark: option '-MP' not supported
14384 if (grep 'ignoring option' conftest.err ||
14385 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
14386 am_cv_CXX_dependencies_compiler_type=$depmode
14387 break
14388 fi
14389 fi
14390 done
14391
14392 cd ..
14393 rm -rf conftest.dir
14394 else
14395 am_cv_CXX_dependencies_compiler_type=none
14396 fi
14397
14398 fi
14399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
14400 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
14401 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
14402
14403 if
14404 test "x$enable_dependency_tracking" != xno \
14405 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
14406 am__fastdepCXX_TRUE=
14407 am__fastdepCXX_FALSE='#'
14408 else
14409 am__fastdepCXX_TRUE='#'
14410 am__fastdepCXX_FALSE=
14411 fi
14412
14413
14414
14415
14416 depend_audio=""
14417 ldadd_audio=""
14418
14419
14420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for audio support" >&5
14421 $as_echo_n "checking for audio support... " >&6; }
14422
14423 if test "$audio" = unknown
14424 then
14425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14426 /* end confdefs.h. */
14427
14428 # include <mmsystem.h>
14429
14430 _ACEOF
14431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14432 $EGREP "waveOutOpen" >/dev/null 2>&1; then :
14433 audio="win32"; ldadd_audio="$ldadd_audio -lwinmm"
14434 fi
14435 rm -f conftest*
14436
14437 fi
14438
14439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $audio" >&5
14440 $as_echo "$audio" >&6; }
14441
14442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable profiling" >&5
14443 $as_echo_n "checking whether to enable profiling... " >&6; }
14444 # Check whether --enable-profiling was given.
14445 if test "${enable_profiling+set}" = set; then :
14446 enableval=$enable_profiling;
14447 case "$enableval" in
14448 yes) profile="-pg" ;;
14449 esac
14450
14451 fi
14452
14453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_profiling-no}" >&5
14454 $as_echo "${enable_profiling-no}" >&6; }
14455
14456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debugging" >&5
14457 $as_echo_n "checking whether to enable debugging... " >&6; }
14458 # Check whether --enable-debugging was given.
14459 if test "${enable_debugging+set}" = set; then :
14460 enableval=$enable_debugging;
14461 case "$enableval" in
14462 yes)
14463
14464 $as_echo "#define DEBUG 1" >>confdefs.h
14465
14466 optimize=""
14467 ;;
14468 no)
14469 if test -n "$profile"
14470 then
14471 as_fn_error $? "--enable-profiling and --disable-debugging are incompatible" "$LINENO" 5
14472 fi
14473
14474
14475 $as_echo "#define NDEBUG 1" >>confdefs.h
14476
14477 debug=""
14478 if test "$GCC" = yes
14479 then
14480 optimize="$optimize -fomit-frame-pointer"
14481 fi
14482 ;;
14483 esac
14484
14485 fi
14486
14487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_debugging-default}" >&5
14488 $as_echo "${enable_debugging-default}" >&6; }
14489
14490 case "$enable_debugging" in
14491 yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -lefence" >&5
14492 $as_echo_n "checking for malloc in -lefence... " >&6; }
14493 if ${ac_cv_lib_efence_malloc+:} false; then :
14494 $as_echo_n "(cached) " >&6
14495 else
14496 ac_check_lib_save_LIBS=$LIBS
14497 LIBS="-lefence $LIBS"
14498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14499 /* end confdefs.h. */
14500
14501 /* Override any GCC internal prototype to avoid an error.
14502 Use char because int might match the return type of a GCC
14503 builtin and then its argument prototype would still apply. */
14504 #ifdef __cplusplus
14505 extern "C"
14506 #endif
14507 char malloc ();
14508 int
14509 main ()
14510 {
14511 return malloc ();
14512 ;
14513 return 0;
14514 }
14515 _ACEOF
14516 if ac_fn_c_try_link "$LINENO"; then :
14517 ac_cv_lib_efence_malloc=yes
14518 else
14519 ac_cv_lib_efence_malloc=no
14520 fi
14521 rm -f core conftest.err conftest.$ac_objext \
14522 conftest$ac_exeext conftest.$ac_ext
14523 LIBS=$ac_check_lib_save_LIBS
14524 fi
14525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_efence_malloc" >&5
14526 $as_echo "$ac_cv_lib_efence_malloc" >&6; }
14527 if test "x$ac_cv_lib_efence_malloc" = xyes; then :
14528 cat >>confdefs.h <<_ACEOF
14529 #define HAVE_LIBEFENCE 1
14530 _ACEOF
14531
14532 LIBS="-lefence $LIBS"
14533
14534 fi
14535 ;;
14536 esac
14537
14538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable experimental code" >&5
14539 $as_echo_n "checking whether to enable experimental code... " >&6; }
14540 # Check whether --enable-experimental was given.
14541 if test "${enable_experimental+set}" = set; then :
14542 enableval=$enable_experimental;
14543 case "$enableval" in
14544 yes)
14545
14546 $as_echo "#define EXPERIMENTAL 1" >>confdefs.h
14547
14548 ;;
14549 esac
14550
14551 fi
14552
14553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_experimental-no}" >&5
14554 $as_echo "${enable_experimental-no}" >&6; }
14555
14556
14557 test -n "$arch" && CFLAGS="$CFLAGS $arch"
14558 test -n "$debug" && CFLAGS="$CFLAGS $debug"
14559 test -n "$optimize" && CFLAGS="$CFLAGS $optimize"
14560 test -n "$profile" && CFLAGS="$CFLAGS $profile" LDFLAGS="$LDFLAGS $profile"
14561
14562 $as_echo "#define AUDIO_DEFAULT /**/" >>confdefs.h
14563
14564 cat >confcache <<\_ACEOF
14565 # This file is a shell script that caches the results of configure
14566 # tests run on this system so they can be shared between configure
14567 # scripts and configure runs, see configure's option --config-cache.
14568 # It is not useful on other systems. If it contains results you don't
14569 # want to keep, you may remove or edit it.
14570 #
14571 # config.status only pays attention to the cache file if you give it
14572 # the --recheck option to rerun configure.
14573 #
14574 # `ac_cv_env_foo' variables (set or unset) will be overridden when
14575 # loading this file, other *unset* `ac_cv_foo' will be assigned the
14576 # following values.
14577
14578 _ACEOF
14579
14580 # The following way of writing the cache mishandles newlines in values,
14581 # but we know of no workaround that is simple, portable, and efficient.
14582 # So, we kill variables containing newlines.
14583 # Ultrix sh set writes to stderr and can't be redirected directly,
14584 # and sets the high bit in the cache file unless we assign to the vars.
14585 (
14586 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14587 eval ac_val=\$$ac_var
14588 case $ac_val in #(
14589 *${as_nl}*)
14590 case $ac_var in #(
14591 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14592 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
14593 esac
14594 case $ac_var in #(
14595 _ | IFS | as_nl) ;; #(
14596 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14597 *) { eval $ac_var=; unset $ac_var;} ;;
14598 esac ;;
14599 esac
14600 done
14601
14602 (set) 2>&1 |
14603 case $as_nl`(ac_space=' '; set) 2>&1` in #(
14604 *${as_nl}ac_space=\ *)
14605 # `set' does not quote correctly, so add quotes: double-quote
14606 # substitution turns \\\\ into \\, and sed turns \\ into \.
14607 sed -n \
14608 "s/'/'\\\\''/g;
14609 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14610 ;; #(
14611 *)
14612 # `set' quotes correctly as required by POSIX, so do not add quotes.
14613 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
14614 ;;
14615 esac |
14616 sort
14617 ) |
14618 sed '
14619 /^ac_cv_env_/b end
14620 t clear
14621 :clear
14622 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14623 t end
14624 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14625 :end' >>confcache
14626 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
14627 if test -w "$cache_file"; then
14628 if test "x$cache_file" != "x/dev/null"; then
14629 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
14630 $as_echo "$as_me: updating cache $cache_file" >&6;}
14631 if test ! -f "$cache_file" || test -h "$cache_file"; then
14632 cat confcache >"$cache_file"
14633 else
14634 case $cache_file in #(
14635 */* | ?:*)
14636 mv -f confcache "$cache_file"$$ &&
14637 mv -f "$cache_file"$$ "$cache_file" ;; #(
14638 *)
14639 mv -f confcache "$cache_file" ;;
14640 esac
14641 fi
14642 fi
14643 else
14644 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14645 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14646 fi
14647 fi
14648 rm -f confcache
14649
1048914650 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1049014651 # Let make expand exec_prefix.
1049114652 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1055114712 fi
1055214713 if test -z "${am__fastdepGCJ_TRUE}" && test -z "${am__fastdepGCJ_FALSE}"; then
1055314714 as_fn_error $? "conditional \"am__fastdepGCJ\" was never defined.
14715 Usually this means the macro was only invoked conditionally." "$LINENO" 5
14716 fi
14717 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
14718 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
14719 Usually this means the macro was only invoked conditionally." "$LINENO" 5
14720 fi
14721 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
14722 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
14723 Usually this means the macro was only invoked conditionally." "$LINENO" 5
14724 fi
14725 if test -z "${am__fastdepOBJC_TRUE}" && test -z "${am__fastdepOBJC_FALSE}"; then
14726 as_fn_error $? "conditional \"am__fastdepOBJC\" was never defined.
14727 Usually this means the macro was only invoked conditionally." "$LINENO" 5
14728 fi
14729 if test -z "${am__fastdepOBJCXX_TRUE}" && test -z "${am__fastdepOBJCXX_FALSE}"; then
14730 as_fn_error $? "conditional \"am__fastdepOBJCXX\" was never defined.
14731 Usually this means the macro was only invoked conditionally." "$LINENO" 5
14732 fi
14733 if test -n "$EXEEXT"; then
14734 am__EXEEXT_TRUE=
14735 am__EXEEXT_FALSE='#'
14736 else
14737 am__EXEEXT_TRUE='#'
14738 am__EXEEXT_FALSE=
14739 fi
14740
14741 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
14742 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
14743 Usually this means the macro was only invoked conditionally." "$LINENO" 5
14744 fi
14745
14746 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
14747 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
1055414748 Usually this means the macro was only invoked conditionally." "$LINENO" 5
1055514749 fi
1055614750
1095015144 # report actual input values of CONFIG_FILES etc. instead of their
1095115145 # values after options handling.
1095215146 ac_log="
10953 This file was extended by daisy-player $as_me 10.5.2, which was
15147 This file was extended by daisy-player $as_me 10.6, which was
1095415148 generated by GNU Autoconf 2.69. Invocation command line was
1095515149
1095615150 CONFIG_FILES = $CONFIG_FILES
1101715211 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1101815212 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1101915213 ac_cs_version="\\
11020 daisy-player config.status 10.5.2
15214 daisy-player config.status 10.6
1102115215 configured by $0, generated by GNU Autoconf 2.69,
1102215216 with options \\"\$ac_cs_config\\"
1102315217
1116115355 "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
1116215356 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
1116315357 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
11164 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
15358 "src//Makefile") CONFIG_FILES="$CONFIG_FILES src//Makefile" ;;
1116515359
1116615360 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
1116715361 esac
11 # Process this file with autoconf to produce a configure script.
22
33 AC_PREREQ([2.69])
4 AC_INIT([daisy-player], [10.5.2], [jos@jlemmens.nl], [], [www.jlemmens.nl])
5 AM_INIT_AUTOMAKE([foreign])
4 AC_INIT([daisy-player],[10.6],[jos@jlemmens.nl],[],[www.jlemmens.nl])
5 AM_INIT_AUTOMAKE([subdir-objects])
66 AC_CONFIG_SRCDIR([config.h.in])
77 AC_CONFIG_HEADERS([config.h])
88
2020 AC_PROG_MKDIR_P
2121 AM_PROG_AS
2222 AM_PROG_GCJ
23 #AM_PROG_UPC
2423
2524 # Checks for libraries.
2625 # FIXME: Replace `main' with a function in `-lcdio':
2726 AC_CHECK_LIB([cdio], [main])
27 # FIXME: Replace `main' with a function in `-lid3':
28 AC_CHECK_LIB([id3], [main])
29 # FIXME: Replace `main' with a function in `-lid3tag':
30 AC_CHECK_LIB([id3tag], [main])
2831 # FIXME: Replace `main' with a function in `-lcdio_cdda':
2932 AC_CHECK_LIB([cdio_cdda], [main])
3033 # FIXME: Replace `main' with a function in `-lcdio_paranoia':
3740 AC_CHECK_LIB([sox], [main])
3841 # FIXME: Replace `main' with a function in `-lxml2':
3942 AC_CHECK_LIB([xml2], [main])
43 # FIXME: Replace `main' with a function in `-lasound':
44 AC_CHECK_LIB([asound], [main])
45 # FIXME: Replace `main' with a function in `-lmad':
46 AC_CHECK_LIB(id3tag, id3_tag_parse, :, [
47 AC_MSG_ERROR([libid3tag was not found
48 *** You must first install libid3tag before you can build this package.
49 *** If libid3tag is already installed, you may need to use the LDFLAGS
50 *** environment variable to specify its installed location, e.g. -L<dir>.])
51 ], [-lz])
52 AC_CHECK_LIB([mad], [main])
4053
4154 # Checks for header files.
4255 AC_CHECK_HEADERS([fcntl.h libintl.h locale.h stdlib.h string.h strings.h \
5770 AC_FUNC_STRTOD
5871 AC_CHECK_FUNCS([atexit ftruncate mkdir select setlocale strcasecmp strchr strdup strerror strrchr strstr])
5972 AC_CHECK_FUNCS([isascii])
60 AC_CHECK_FUNCS([rmdir])
73 AC_CHECK_FUNCS([rmdir])
74 AC_CHECK_FUNCS([memmove])
75 AC_CHECK_FUNCS([memset])
76 AC_CHECK_FUNCS([munmap])
77 AC_CHECK_FUNCS([pow])
78 AC_CHECK_FUNCS([strncasecmp])
79 AC_CHECK_FUNCS([strtol])
80 AC_CHECK_HEADERS([termios.h])
81 AC_CHECK_HEADERS([wchar.h])
82 AC_FUNC_ERROR_AT_LINE
83 AC_FUNC_MMAP
84 AC_TYPE_SSIZE_T
6185
6286 AC_CONFIG_FILES([Makefile
6387 doc/Makefile
6488 m4/Makefile
6589 man/Makefile
6690 po/Makefile.in
67 src/Makefile])
91 src//Makefile])
6892 AM_GNU_GETTEXT([external])
6993 AC_PROG_LN_S
94
95 dnl madplay stuff
96
97 dnl -*- m4 -*-
98 dnl
99 dnl madplay - MPEG audio decoder and player
100 dnl Copyright (C) 2000-2004 Robert Leslie
101 dnl
102 dnl This program is free software; you can redistribute it and/or modify
103 dnl it under the terms of the GNU General Public License as published by
104 dnl the Free Software Foundation; either version 2 of the License, or
105 dnl (at your option) any later version.
106 dnl
107 dnl This program is distributed in the hope that it will be useful,
108 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
109 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
110 dnl GNU General Public License for more details.
111 dnl
112 dnl You should have received a copy of the GNU General Public License
113 dnl along with this program; if not, write to the Free Software
114 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
115 dnl
116 AC_REVISION([$Id: configure.ac,v 1.17 2004/02/23 21:34:53 rob Exp $])dnl
117
118 dnl Process this file with autoconf to produce a configure script.
119
120 #AC_INIT([MPEG audio decoder and player],[0.15.2b],[rob@mars.org],[madplay])
121 AC_PREREQ([2.69])
122
123 AC_CONFIG_SRCDIR([src/madplay])
124
125 AM_INIT_AUTOMAKE
126
127
128 dnl System type.
129
130 AC_CANONICAL_HOST
131
132 dnl Checks for programs.
133
134 AC_PROG_CC
135
136 dnl Support for libtool.
137
138 dnl Compiler options.
139
140 dnl Checks for header files.
141
142 AC_HEADER_STDC
143 dnl Checks for typedefs, structures, and compiler characteristics.
144
145 AC_C_CONST
146 AC_C_INLINE
147 AC_C_BIGENDIAN
148
149 dnl Checks for library functions.
150
151 AC_FUNC_VPRINTF
152 AC_CHECK_FUNCS(madvise localeconv)
153 AC_REPLACE_FUNCS(strcasecmp strncasecmp)
154 AC_SEARCH_LIBS(pow, m)
155 AC_SEARCH_LIBS(log10, m)
156 AC_MSG_CHECKING([whether to use mmap])
157 AC_CACHE_SAVE
158
159 dnl madplay options...
160
161 AC_MSG_CHECKING([whether to enable profiling])
162 AC_MSG_RESULT(${enable_profiling-no})
163
164 AC_MSG_CHECKING([whether to enable debugging])
165 AC_MSG_RESULT(${enable_experimental-no})
166
167 dnl Create output files.
168
169 AC_TYPE_SSIZE_T
170 AC_PROG_YACC
171 AC_PROG_LN_S
172 AC_CHECK_FUNCS([__argz_count])
173 AC_CHECK_FUNCS([__argz_next])
174 AC_CHECK_FUNCS([__argz_stringify])
175 AC_CHECK_FUNCS([memmove])
176 AC_CHECK_FUNCS([memset])
177 AC_CHECK_FUNCS([nl_langinfo])
178 AC_CHECK_FUNCS([pow])
179 AC_CHECK_FUNCS([strchr])
180 AC_CHECK_FUNCS([strcspn])
181 AC_CHECK_FUNCS([strncasecmp])
182 AC_CHECK_FUNCS([strrchr])
183 AC_CHECK_FUNCS([strstr])
184 AC_CHECK_FUNCS([strtol])
185 AC_CHECK_HEADERS([float.h])
186 AC_CHECK_HEADERS([langinfo.h])
187 AC_CHECK_HEADERS([libintl.h])
188 AC_CHECK_HEADERS([locale.h])
189 AC_CHECK_HEADERS([malloc.h])
190 AC_CHECK_HEADERS([stdio_ext.h])
191 AC_CHECK_HEADERS([wchar.h])
192 AC_CHECK_HEADER_STDBOOL
193 AC_CHECK_HEADER(id3tag.h, [], [
194 AC_MSG_ERROR([id3tag.h was not found
195 *** You must first install libid3tag before you can build this package.
196 *** If libid3tag is already installed, you may need to use the CPPFLAGS
197 *** environment variable to specify its installed location, e.g. -I<dir>.])
198 ])
199 AC_CHECK_TYPES([ptrdiff_t])
200 AC_CHECK_FUNCS([getcwd])
201 AC_CHECK_FUNCS([mempcpy])
202 AC_CHECK_FUNCS([stpcpy])
203 AC_CHECK_FUNCS([strtoul])
204 AC_CHECK_HEADERS([argz.h])
205 AC_CHECK_HEADERS([limits.h])
206 AC_CHECK_HEADERS([stddef.h])
207 AC_CHECK_HEADERS([sys/param.h])
208 AC_FUNC_ALLOCA
209 AC_FUNC_MALLOC
210 AC_FUNC_REALLOC
211 AC_FUNC_STRTOD
212 AC_PROG_CXX
213
214 dnl Select an audio system.
215
216 depend_audio=""
217 ldadd_audio=""
218 AC_SUBST(depend_audio)
219 AC_SUBST(ldadd_audio)
220 AC_MSG_CHECKING([for audio support])
221
222 if test "$audio" = unknown
223 then
224 AC_EGREP_CPP(waveOutOpen, [
225 # include <mmsystem.h>
226 ], [audio="win32"; ldadd_audio="$ldadd_audio -lwinmm"])
227 fi
228
229 AC_MSG_RESULT($audio)
230
231 AC_MSG_CHECKING([whether to enable profiling])
232 AC_ARG_ENABLE(profiling, AS_HELP_STRING([--enable-profiling],[generate profiling code]),
233 [
234 case "$enableval" in
235 yes) profile="-pg" ;;
236 esac
237 ])
238 AC_MSG_RESULT(${enable_profiling-no})
239
240 AC_MSG_CHECKING([whether to enable debugging])
241 AC_ARG_ENABLE(debugging, AS_HELP_STRING([--enable-debugging],[enable diagnostic debugging support])
242 AS_HELP_STRING([--disable-debugging],[do not enable debugging and use more optimization]),
243 [
244 case "$enableval" in
245 yes)
246 AC_DEFINE(DEBUG, 1,
247 [Define to enable diagnostic debugging support.])
248 optimize=""
249 ;;
250 no)
251 if test -n "$profile"
252 then
253 AC_MSG_ERROR([--enable-profiling and --disable-debugging are incompatible])
254 fi
255
256 AC_DEFINE(NDEBUG, 1,
257 [Define to disable debugging assertions.])
258 debug=""
259 if test "$GCC" = yes
260 then
261 optimize="$optimize -fomit-frame-pointer"
262 fi
263 ;;
264 esac
265 ])
266 AC_MSG_RESULT(${enable_debugging-default})
267
268 case "$enable_debugging" in
269 yes) AC_CHECK_LIB(efence, malloc) ;;
270 esac
271
272 AC_MSG_CHECKING([whether to enable experimental code])
273 AC_ARG_ENABLE(experimental, AS_HELP_STRING([--enable-experimental],[enable experimental code]),
274 [
275 case "$enableval" in
276 yes)
277 AC_DEFINE(EXPERIMENTAL, 1, [Define to enable experimental code.])
278 ;;
279 esac
280 ])
281 AC_MSG_RESULT(${enable_experimental-no})
282
283 dnl Create output files.
284
285 test -n "$arch" && CFLAGS="$CFLAGS $arch"
286 test -n "$debug" && CFLAGS="$CFLAGS $debug"
287 test -n "$optimize" && CFLAGS="$CFLAGS $optimize"
288 test -n "$profile" && CFLAGS="$CFLAGS $profile" LDFLAGS="$LDFLAGS $profile"
289 AC_DEFINE([AUDIO_DEFAULT], [], [audio_wav])
70290 AC_OUTPUT
254254 10.5.1 htmlParseFile gave some strange errors in the function load_xml(),
255255 so it is replaced by xmlRecoverFile.
256256 10.5.2 When playback is paused, wait for playback is really stopped.
257 10.6 Alter playback volume with ALSA instead off altering the volume
258 of the soundfile itself with sox.
259 The external madplay application is no longer needed.
260 "store current item to disk" now takes in account the current level.
00 docdir = $(datadir)/doc/@PACKAGE@
1 doc_DATA = ABOUT-NLS COMPILE COPYING Changelog License Readme TODO \
2 daisy-player.desktop daisy-player.menu daisy-player.png \
3 daisy-player.txt
1 doc_DATA = ABOUT-NLS Changelog COMPILE COPYING daisy-player.description \
2 daisy-player.desktop daisy-player.html daisy-player.menu \
3 daisy-player.png daisy-player.txt License Makefile.am \
4 Makefile.in Readme TODO
5
46 dist_html_DATA = daisy-player.html
8989 host_triplet = @host@
9090 subdir = doc
9191 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
92 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
93 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
94 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
95 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
96 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
97 $(top_srcdir)/configure.ac
92 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
9893 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
9994 $(ACLOCAL_M4)
10095 DIST_COMMON = $(srcdir)/Makefile.am $(dist_html_DATA) \
156151 ABOUT-NLS COPYING TODO
157152 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
158153 ACLOCAL = @ACLOCAL@
154 ALLOCA = @ALLOCA@
159155 AMTAR = @AMTAR@
160156 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
161157 AUTOCONF = @AUTOCONF@
236232 XGETTEXT = @XGETTEXT@
237233 XGETTEXT_015 = @XGETTEXT_015@
238234 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
235 YACC = @YACC@
236 YFLAGS = @YFLAGS@
239237 abs_builddir = @abs_builddir@
240238 abs_srcdir = @abs_srcdir@
241239 abs_top_builddir = @abs_top_builddir@
259257 builddir = @builddir@
260258 datadir = @datadir@
261259 datarootdir = @datarootdir@
260 depend_audio = @depend_audio@
262261 docdir = $(datadir)/doc/@PACKAGE@
263262 dvidir = @dvidir@
264263 exec_prefix = @exec_prefix@
271270 includedir = @includedir@
272271 infodir = @infodir@
273272 install_sh = @install_sh@
273 ldadd_audio = @ldadd_audio@
274274 libdir = @libdir@
275275 libexecdir = @libexecdir@
276276 localedir = @localedir@
291291 top_build_prefix = @top_build_prefix@
292292 top_builddir = @top_builddir@
293293 top_srcdir = @top_srcdir@
294 doc_DATA = ABOUT-NLS COMPILE COPYING Changelog License Readme TODO \
295 daisy-player.desktop daisy-player.menu daisy-player.png \
296 daisy-player.txt
294 doc_DATA = ABOUT-NLS Changelog COMPILE COPYING daisy-player.description \
295 daisy-player.desktop daisy-player.html daisy-player.menu \
296 daisy-player.png daisy-player.txt License Makefile.am \
297 Makefile.in Readme TODO
297298
298299 dist_html_DATA = daisy-player.html
299300 all: all-am
308309 exit 1;; \
309310 esac; \
310311 done; \
311 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
312 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
312313 $(am__cd) $(top_srcdir) && \
313 $(AUTOMAKE) --foreign doc/Makefile
314 $(AUTOMAKE) --gnu doc/Makefile
314315 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
315316 @case '$?' in \
316317 *config.status*) \
1212 libsox2
1313 libxml2
1414 libmagic1
15 madplay
15 libmad0
1616 gettext
1717 udisks2
1818 language-pack-af
6565
6666 daisy-player is multilingual. The following languages are currently
6767 supported:
68 dutch, english, french, german, hungarian, norwegian, polish, Portuguese,
69 slovenian, south-african, spanish, Swedish.
68 dutch, english, finish, french, german, hungarian, norwegian, polish,
69 portuguese, slovenian, south-african, spanish, Swedish.
7070
7171 Enjoy
7272
0 - time-viewing starts on 00:00 when next page starts in daisy 3 files
1 - command d - take into account the current level
2 - alter playback volume with ALSA instead off altering the volume
3 of the soundfile itself with sox.
0 - time-viewing starts on 00:00 when next page starts in daisy 3 files.
1 - Audio-CD: after write wav ('d'), the file is not correctly closed.
4040 the smil_file and the anchor which points to the start of this
4141 item in the audio-file. The audio-file is played with the sox library.
4242 The sox library is too slow for finding the startpoint in the audio-file. So
43 the utilityh madplay is used for cutting out the clip and it is written
43 the mad library is used for cutting out the clip and it is written
4444 to a temporary WAV-file. Playing itself is done by sox.
11 <HTML><HEAD><TITLE>Man page of daisy-player</TITLE>
22 </HEAD><BODY>
33 <H1>daisy-player</H1>
4 Section: Linux Reference Manual (1)<BR>Updated: 10 July 2017<BR><A HREF="#index">Index</A>
4 Section: Linux Reference Manual (1)<BR>Updated: 06 August 2017<BR><A HREF="#index">Index</A>
55 <A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
66
77 <A NAME="lbAB">&nbsp;</A>
107107 <DT><B>enter</B>
108108
109109 <DD>
110 Start playing
110 Start playing
111111 <DT><B>space,0</B>
112112
113113 <DD>
123123 <DT><B>d</B>
124124
125125 <DD>
126 store current item to disk
126 store current item to disk (Take into account the selected level)
127127 <DT><B>D,-</B>
128128
129129 <DD>
266266 This document was created by
267267 <A HREF="/cgi-bin/man/man2html">man2html</A>,
268268 using the manual pages.<BR>
269 Time: 14:04:04 GMT, July 10, 2017
269 Time: 17:56:05 GMT, August 06, 2017
270270 </BODY>
271271 </HTML>
3737 cursor left,4 skip to previous phrase
3838 page-down,3 view next screen
3939 page-up,9 view previous screen
40 enter Start playing
40 enter Start playing
4141 space,0 pause/resume playing
4242 home,* play on normal speed
4343 / search for a label
44 d store current item to disk
44 d store current item to disk (Take into account the selected level)
4545 D,- decrease playing speed
4646 e,. stop playing and eject
4747 f find the currently playing item and place the cursor there
+0
-405
m4/gettext.m4 less more
0 # gettext.m4 serial 67 (gettext-0.19.6)
1 dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5 dnl
6 dnl This file can be used in projects which are not available under
7 dnl the GNU General Public License or the GNU Library General Public
8 dnl License but which still want to provide support for the GNU gettext
9 dnl functionality.
10 dnl Please note that the actual code of the GNU gettext library is covered
11 dnl by the GNU Library General Public License, and the rest of the GNU
12 dnl gettext package is covered by the GNU General Public License.
13 dnl They are *not* in the public domain.
14
15 dnl Authors:
16 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
17 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
18
19 dnl Macro to add for using GNU gettext.
20
21 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
22 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
23 dnl default (if it is not specified or empty) is 'no-libtool'.
24 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
25 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
26 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
27 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
28 dnl depending on --{enable,disable}-{shared,static} and on the presence of
29 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
30 dnl $(top_builddir)/intl/libintl.a will be created.
31 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
32 dnl implementations (in libc or libintl) without the ngettext() function
33 dnl will be ignored. If NEEDSYMBOL is specified and is
34 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
35 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
36 dnl INTLDIR is used to find the intl libraries. If empty,
37 dnl the value '$(top_builddir)/intl/' is used.
38 dnl
39 dnl The result of the configuration is one of three cases:
40 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
41 dnl and used.
42 dnl Catalog format: GNU --> install in $(datadir)
43 dnl Catalog extension: .mo after installation, .gmo in source tree
44 dnl 2) GNU gettext has been found in the system's C library.
45 dnl Catalog format: GNU --> install in $(datadir)
46 dnl Catalog extension: .mo after installation, .gmo in source tree
47 dnl 3) No internationalization, always use English msgid.
48 dnl Catalog format: none
49 dnl Catalog extension: none
50 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
51 dnl The use of .gmo is historical (it was needed to avoid overwriting the
52 dnl GNU format catalogs when building on a platform with an X/Open gettext),
53 dnl but we keep it in order not to force irrelevant filename changes on the
54 dnl maintainers.
55 dnl
56 AC_DEFUN([AM_GNU_GETTEXT],
57 [
58 dnl Argument checking.
59 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
60 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
61 ])])])])])
62 ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
63 [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
64 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
65 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
66 ])])])])
67 define([gt_included_intl],
68 ifelse([$1], [external],
69 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
70 [yes]))
71 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
72 gt_NEEDS_INIT
73 AM_GNU_GETTEXT_NEED([$2])
74
75 AC_REQUIRE([AM_PO_SUBDIRS])dnl
76 ifelse(gt_included_intl, yes, [
77 AC_REQUIRE([AM_INTL_SUBDIR])dnl
78 ])
79
80 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
81 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
82 AC_REQUIRE([AC_LIB_RPATH])
83
84 dnl Sometimes libintl requires libiconv, so first search for libiconv.
85 dnl Ideally we would do this search only after the
86 dnl if test "$USE_NLS" = "yes"; then
87 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
88 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
89 dnl the configure script would need to contain the same shell code
90 dnl again, outside any 'if'. There are two solutions:
91 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
92 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
93 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
94 dnl documented, we avoid it.
95 ifelse(gt_included_intl, yes, , [
96 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
97 ])
98
99 dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
100 gt_INTL_MACOSX
101
102 dnl Set USE_NLS.
103 AC_REQUIRE([AM_NLS])
104
105 ifelse(gt_included_intl, yes, [
106 BUILD_INCLUDED_LIBINTL=no
107 USE_INCLUDED_LIBINTL=no
108 ])
109 LIBINTL=
110 LTLIBINTL=
111 POSUB=
112
113 dnl Add a version number to the cache macros.
114 case " $gt_needs " in
115 *" need-formatstring-macros "*) gt_api_version=3 ;;
116 *" need-ngettext "*) gt_api_version=2 ;;
117 *) gt_api_version=1 ;;
118 esac
119 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
120 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
121
122 dnl If we use NLS figure out what method
123 if test "$USE_NLS" = "yes"; then
124 gt_use_preinstalled_gnugettext=no
125 ifelse(gt_included_intl, yes, [
126 AC_MSG_CHECKING([whether included gettext is requested])
127 AC_ARG_WITH([included-gettext],
128 [ --with-included-gettext use the GNU gettext library included here],
129 nls_cv_force_use_gnu_gettext=$withval,
130 nls_cv_force_use_gnu_gettext=no)
131 AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
132
133 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
134 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
135 ])
136 dnl User does not insist on using GNU NLS library. Figure out what
137 dnl to use. If GNU gettext is available we use this. Else we have
138 dnl to fall back to GNU NLS library.
139
140 if test $gt_api_version -ge 3; then
141 gt_revision_test_code='
142 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
143 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
144 #endif
145 changequote(,)dnl
146 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
147 changequote([,])dnl
148 '
149 else
150 gt_revision_test_code=
151 fi
152 if test $gt_api_version -ge 2; then
153 gt_expression_test_code=' + * ngettext ("", "", 0)'
154 else
155 gt_expression_test_code=
156 fi
157
158 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
159 [AC_LINK_IFELSE(
160 [AC_LANG_PROGRAM(
161 [[
162 #include <libintl.h>
163 $gt_revision_test_code
164 extern int _nl_msg_cat_cntr;
165 extern int *_nl_domain_bindings;
166 ]],
167 [[
168 bindtextdomain ("", "");
169 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
170 ]])],
171 [eval "$gt_func_gnugettext_libc=yes"],
172 [eval "$gt_func_gnugettext_libc=no"])])
173
174 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
175 dnl Sometimes libintl requires libiconv, so first search for libiconv.
176 ifelse(gt_included_intl, yes, , [
177 AM_ICONV_LINK
178 ])
179 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
180 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
181 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
182 dnl even if libiconv doesn't exist.
183 AC_LIB_LINKFLAGS_BODY([intl])
184 AC_CACHE_CHECK([for GNU gettext in libintl],
185 [$gt_func_gnugettext_libintl],
186 [gt_save_CPPFLAGS="$CPPFLAGS"
187 CPPFLAGS="$CPPFLAGS $INCINTL"
188 gt_save_LIBS="$LIBS"
189 LIBS="$LIBS $LIBINTL"
190 dnl Now see whether libintl exists and does not depend on libiconv.
191 AC_LINK_IFELSE(
192 [AC_LANG_PROGRAM(
193 [[
194 #include <libintl.h>
195 $gt_revision_test_code
196 extern int _nl_msg_cat_cntr;
197 extern
198 #ifdef __cplusplus
199 "C"
200 #endif
201 const char *_nl_expand_alias (const char *);
202 ]],
203 [[
204 bindtextdomain ("", "");
205 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
206 ]])],
207 [eval "$gt_func_gnugettext_libintl=yes"],
208 [eval "$gt_func_gnugettext_libintl=no"])
209 dnl Now see whether libintl exists and depends on libiconv.
210 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
211 LIBS="$LIBS $LIBICONV"
212 AC_LINK_IFELSE(
213 [AC_LANG_PROGRAM(
214 [[
215 #include <libintl.h>
216 $gt_revision_test_code
217 extern int _nl_msg_cat_cntr;
218 extern
219 #ifdef __cplusplus
220 "C"
221 #endif
222 const char *_nl_expand_alias (const char *);
223 ]],
224 [[
225 bindtextdomain ("", "");
226 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
227 ]])],
228 [LIBINTL="$LIBINTL $LIBICONV"
229 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
230 eval "$gt_func_gnugettext_libintl=yes"
231 ])
232 fi
233 CPPFLAGS="$gt_save_CPPFLAGS"
234 LIBS="$gt_save_LIBS"])
235 fi
236
237 dnl If an already present or preinstalled GNU gettext() is found,
238 dnl use it. But if this macro is used in GNU gettext, and GNU
239 dnl gettext is already preinstalled in libintl, we update this
240 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
241 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
242 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
243 && test "$PACKAGE" != gettext-runtime \
244 && test "$PACKAGE" != gettext-tools; }; then
245 gt_use_preinstalled_gnugettext=yes
246 else
247 dnl Reset the values set by searching for libintl.
248 LIBINTL=
249 LTLIBINTL=
250 INCINTL=
251 fi
252
253 ifelse(gt_included_intl, yes, [
254 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
255 dnl GNU gettext is not found in the C library.
256 dnl Fall back on included GNU gettext library.
257 nls_cv_use_gnu_gettext=yes
258 fi
259 fi
260
261 if test "$nls_cv_use_gnu_gettext" = "yes"; then
262 dnl Mark actions used to generate GNU NLS library.
263 BUILD_INCLUDED_LIBINTL=yes
264 USE_INCLUDED_LIBINTL=yes
265 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
266 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
267 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
268 fi
269
270 CATOBJEXT=
271 if test "$gt_use_preinstalled_gnugettext" = "yes" \
272 || test "$nls_cv_use_gnu_gettext" = "yes"; then
273 dnl Mark actions to use GNU gettext tools.
274 CATOBJEXT=.gmo
275 fi
276 ])
277
278 if test -n "$INTL_MACOSX_LIBS"; then
279 if test "$gt_use_preinstalled_gnugettext" = "yes" \
280 || test "$nls_cv_use_gnu_gettext" = "yes"; then
281 dnl Some extra flags are needed during linking.
282 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
283 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
284 fi
285 fi
286
287 if test "$gt_use_preinstalled_gnugettext" = "yes" \
288 || test "$nls_cv_use_gnu_gettext" = "yes"; then
289 AC_DEFINE([ENABLE_NLS], [1],
290 [Define to 1 if translation of program messages to the user's native language
291 is requested.])
292 else
293 USE_NLS=no
294 fi
295 fi
296
297 AC_MSG_CHECKING([whether to use NLS])
298 AC_MSG_RESULT([$USE_NLS])
299 if test "$USE_NLS" = "yes"; then
300 AC_MSG_CHECKING([where the gettext function comes from])
301 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
302 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
303 gt_source="external libintl"
304 else
305 gt_source="libc"
306 fi
307 else
308 gt_source="included intl directory"
309 fi
310 AC_MSG_RESULT([$gt_source])
311 fi
312
313 if test "$USE_NLS" = "yes"; then
314
315 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
316 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
317 AC_MSG_CHECKING([how to link with libintl])
318 AC_MSG_RESULT([$LIBINTL])
319 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
320 fi
321
322 dnl For backward compatibility. Some packages may be using this.
323 AC_DEFINE([HAVE_GETTEXT], [1],
324 [Define if the GNU gettext() function is already present or preinstalled.])
325 AC_DEFINE([HAVE_DCGETTEXT], [1],
326 [Define if the GNU dcgettext() function is already present or preinstalled.])
327 fi
328
329 dnl We need to process the po/ directory.
330 POSUB=po
331 fi
332
333 ifelse(gt_included_intl, yes, [
334 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
335 dnl to 'yes' because some of the testsuite requires it.
336 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
337 BUILD_INCLUDED_LIBINTL=yes
338 fi
339
340 dnl Make all variables we use known to autoconf.
341 AC_SUBST([BUILD_INCLUDED_LIBINTL])
342 AC_SUBST([USE_INCLUDED_LIBINTL])
343 AC_SUBST([CATOBJEXT])
344
345 dnl For backward compatibility. Some configure.ins may be using this.
346 nls_cv_header_intl=
347 nls_cv_header_libgt=
348
349 dnl For backward compatibility. Some Makefiles may be using this.
350 DATADIRNAME=share
351 AC_SUBST([DATADIRNAME])
352
353 dnl For backward compatibility. Some Makefiles may be using this.
354 INSTOBJEXT=.mo
355 AC_SUBST([INSTOBJEXT])
356
357 dnl For backward compatibility. Some Makefiles may be using this.
358 GENCAT=gencat
359 AC_SUBST([GENCAT])
360
361 dnl For backward compatibility. Some Makefiles may be using this.
362 INTLOBJS=
363 if test "$USE_INCLUDED_LIBINTL" = yes; then
364 INTLOBJS="\$(GETTOBJS)"
365 fi
366 AC_SUBST([INTLOBJS])
367
368 dnl Enable libtool support if the surrounding package wishes it.
369 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
370 AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
371 ])
372
373 dnl For backward compatibility. Some Makefiles may be using this.
374 INTLLIBS="$LIBINTL"
375 AC_SUBST([INTLLIBS])
376
377 dnl Make all documented variables known to autoconf.
378 AC_SUBST([LIBINTL])
379 AC_SUBST([LTLIBINTL])
380 AC_SUBST([POSUB])
381 ])
382
383
384 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
385 m4_define([gt_NEEDS_INIT],
386 [
387 m4_divert_text([DEFAULTS], [gt_needs=])
388 m4_define([gt_NEEDS_INIT], [])
389 ])
390
391
392 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
393 AC_DEFUN([AM_GNU_GETTEXT_NEED],
394 [
395 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
396 ])
397
398
399 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
400 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
401
402
403 dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
404 AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
+0
-271
m4/iconv.m4 less more
0 # iconv.m4 serial 19 (gettext-0.18.2)
1 dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Bruno Haible.
7
8 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
9 [
10 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
11 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
12 AC_REQUIRE([AC_LIB_RPATH])
13
14 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
15 dnl accordingly.
16 AC_LIB_LINKFLAGS_BODY([iconv])
17 ])
18
19 AC_DEFUN([AM_ICONV_LINK],
20 [
21 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
22 dnl those with the standalone portable GNU libiconv installed).
23 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
24
25 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
26 dnl accordingly.
27 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
28
29 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
30 dnl because if the user has installed libiconv and not disabled its use
31 dnl via --without-libiconv-prefix, he wants to use it. The first
32 dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
33 am_save_CPPFLAGS="$CPPFLAGS"
34 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
35
36 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
37 am_cv_func_iconv="no, consider installing GNU libiconv"
38 am_cv_lib_iconv=no
39 AC_LINK_IFELSE(
40 [AC_LANG_PROGRAM(
41 [[
42 #include <stdlib.h>
43 #include <iconv.h>
44 ]],
45 [[iconv_t cd = iconv_open("","");
46 iconv(cd,NULL,NULL,NULL,NULL);
47 iconv_close(cd);]])],
48 [am_cv_func_iconv=yes])
49 if test "$am_cv_func_iconv" != yes; then
50 am_save_LIBS="$LIBS"
51 LIBS="$LIBS $LIBICONV"
52 AC_LINK_IFELSE(
53 [AC_LANG_PROGRAM(
54 [[
55 #include <stdlib.h>
56 #include <iconv.h>
57 ]],
58 [[iconv_t cd = iconv_open("","");
59 iconv(cd,NULL,NULL,NULL,NULL);
60 iconv_close(cd);]])],
61 [am_cv_lib_iconv=yes]
62 [am_cv_func_iconv=yes])
63 LIBS="$am_save_LIBS"
64 fi
65 ])
66 if test "$am_cv_func_iconv" = yes; then
67 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
68 dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
69 dnl Solaris 10.
70 am_save_LIBS="$LIBS"
71 if test $am_cv_lib_iconv = yes; then
72 LIBS="$LIBS $LIBICONV"
73 fi
74 am_cv_func_iconv_works=no
75 for ac_iconv_const in '' 'const'; do
76 AC_RUN_IFELSE(
77 [AC_LANG_PROGRAM(
78 [[
79 #include <iconv.h>
80 #include <string.h>
81
82 #ifndef ICONV_CONST
83 # define ICONV_CONST $ac_iconv_const
84 #endif
85 ]],
86 [[int result = 0;
87 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
88 returns. */
89 {
90 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
91 if (cd_utf8_to_88591 != (iconv_t)(-1))
92 {
93 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
94 char buf[10];
95 ICONV_CONST char *inptr = input;
96 size_t inbytesleft = strlen (input);
97 char *outptr = buf;
98 size_t outbytesleft = sizeof (buf);
99 size_t res = iconv (cd_utf8_to_88591,
100 &inptr, &inbytesleft,
101 &outptr, &outbytesleft);
102 if (res == 0)
103 result |= 1;
104 iconv_close (cd_utf8_to_88591);
105 }
106 }
107 /* Test against Solaris 10 bug: Failures are not distinguishable from
108 successful returns. */
109 {
110 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
111 if (cd_ascii_to_88591 != (iconv_t)(-1))
112 {
113 static ICONV_CONST char input[] = "\263";
114 char buf[10];
115 ICONV_CONST char *inptr = input;
116 size_t inbytesleft = strlen (input);
117 char *outptr = buf;
118 size_t outbytesleft = sizeof (buf);
119 size_t res = iconv (cd_ascii_to_88591,
120 &inptr, &inbytesleft,
121 &outptr, &outbytesleft);
122 if (res == 0)
123 result |= 2;
124 iconv_close (cd_ascii_to_88591);
125 }
126 }
127 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
128 {
129 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
130 if (cd_88591_to_utf8 != (iconv_t)(-1))
131 {
132 static ICONV_CONST char input[] = "\304";
133 static char buf[2] = { (char)0xDE, (char)0xAD };
134 ICONV_CONST char *inptr = input;
135 size_t inbytesleft = 1;
136 char *outptr = buf;
137 size_t outbytesleft = 1;
138 size_t res = iconv (cd_88591_to_utf8,
139 &inptr, &inbytesleft,
140 &outptr, &outbytesleft);
141 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
142 result |= 4;
143 iconv_close (cd_88591_to_utf8);
144 }
145 }
146 #if 0 /* This bug could be worked around by the caller. */
147 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
148 {
149 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
150 if (cd_88591_to_utf8 != (iconv_t)(-1))
151 {
152 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
153 char buf[50];
154 ICONV_CONST char *inptr = input;
155 size_t inbytesleft = strlen (input);
156 char *outptr = buf;
157 size_t outbytesleft = sizeof (buf);
158 size_t res = iconv (cd_88591_to_utf8,
159 &inptr, &inbytesleft,
160 &outptr, &outbytesleft);
161 if ((int)res > 0)
162 result |= 8;
163 iconv_close (cd_88591_to_utf8);
164 }
165 }
166 #endif
167 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
168 provided. */
169 if (/* Try standardized names. */
170 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
171 /* Try IRIX, OSF/1 names. */
172 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
173 /* Try AIX names. */
174 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
175 /* Try HP-UX names. */
176 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
177 result |= 16;
178 return result;
179 ]])],
180 [am_cv_func_iconv_works=yes], ,
181 [case "$host_os" in
182 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
183 *) am_cv_func_iconv_works="guessing yes" ;;
184 esac])
185 test "$am_cv_func_iconv_works" = no || break
186 done
187 LIBS="$am_save_LIBS"
188 ])
189 case "$am_cv_func_iconv_works" in
190 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
191 *) am_func_iconv=yes ;;
192 esac
193 else
194 am_func_iconv=no am_cv_lib_iconv=no
195 fi
196 if test "$am_func_iconv" = yes; then
197 AC_DEFINE([HAVE_ICONV], [1],
198 [Define if you have the iconv() function and it works.])
199 fi
200 if test "$am_cv_lib_iconv" = yes; then
201 AC_MSG_CHECKING([how to link with libiconv])
202 AC_MSG_RESULT([$LIBICONV])
203 else
204 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
205 dnl either.
206 CPPFLAGS="$am_save_CPPFLAGS"
207 LIBICONV=
208 LTLIBICONV=
209 fi
210 AC_SUBST([LIBICONV])
211 AC_SUBST([LTLIBICONV])
212 ])
213
214 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
215 dnl avoid warnings like
216 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
217 dnl This is tricky because of the way 'aclocal' is implemented:
218 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
219 dnl Otherwise aclocal's initial scan pass would miss the macro definition.
220 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
221 dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
222 dnl warnings.
223 m4_define([gl_iconv_AC_DEFUN],
224 m4_version_prereq([2.64],
225 [[AC_DEFUN_ONCE(
226 [$1], [$2])]],
227 [m4_ifdef([gl_00GNULIB],
228 [[AC_DEFUN_ONCE(
229 [$1], [$2])]],
230 [[AC_DEFUN(
231 [$1], [$2])]])]))
232 gl_iconv_AC_DEFUN([AM_ICONV],
233 [
234 AM_ICONV_LINK
235 if test "$am_cv_func_iconv" = yes; then
236 AC_MSG_CHECKING([for iconv declaration])
237 AC_CACHE_VAL([am_cv_proto_iconv], [
238 AC_COMPILE_IFELSE(
239 [AC_LANG_PROGRAM(
240 [[
241 #include <stdlib.h>
242 #include <iconv.h>
243 extern
244 #ifdef __cplusplus
245 "C"
246 #endif
247 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
248 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
249 #else
250 size_t iconv();
251 #endif
252 ]],
253 [[]])],
254 [am_cv_proto_iconv_arg1=""],
255 [am_cv_proto_iconv_arg1="const"])
256 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
257 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
258 AC_MSG_RESULT([
259 $am_cv_proto_iconv])
260 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
261 [Define as const if the declaration of iconv() needs const.])
262 dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
263 m4_ifdef([gl_ICONV_H_DEFAULTS],
264 [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
265 if test -n "$am_cv_proto_iconv_arg1"; then
266 ICONV_CONST="const"
267 fi
268 ])
269 fi
270 ])
+0
-56
m4/intlmacosx.m4 less more
0 # intlmacosx.m4 serial 5 (gettext-0.18.2)
1 dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5 dnl
6 dnl This file can can be used in projects which are not available under
7 dnl the GNU General Public License or the GNU Library General Public
8 dnl License but which still want to provide support for the GNU gettext
9 dnl functionality.
10 dnl Please note that the actual code of the GNU gettext library is covered
11 dnl by the GNU Library General Public License, and the rest of the GNU
12 dnl gettext package package is covered by the GNU General Public License.
13 dnl They are *not* in the public domain.
14
15 dnl Checks for special options needed on Mac OS X.
16 dnl Defines INTL_MACOSX_LIBS.
17 AC_DEFUN([gt_INTL_MACOSX],
18 [
19 dnl Check for API introduced in Mac OS X 10.2.
20 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
21 [gt_cv_func_CFPreferencesCopyAppValue],
22 [gt_save_LIBS="$LIBS"
23 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
24 AC_LINK_IFELSE(
25 [AC_LANG_PROGRAM(
26 [[#include <CoreFoundation/CFPreferences.h>]],
27 [[CFPreferencesCopyAppValue(NULL, NULL)]])],
28 [gt_cv_func_CFPreferencesCopyAppValue=yes],
29 [gt_cv_func_CFPreferencesCopyAppValue=no])
30 LIBS="$gt_save_LIBS"])
31 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
32 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
33 [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
34 fi
35 dnl Check for API introduced in Mac OS X 10.3.
36 AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
37 [gt_save_LIBS="$LIBS"
38 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
39 AC_LINK_IFELSE(
40 [AC_LANG_PROGRAM(
41 [[#include <CoreFoundation/CFLocale.h>]],
42 [[CFLocaleCopyCurrent();]])],
43 [gt_cv_func_CFLocaleCopyCurrent=yes],
44 [gt_cv_func_CFLocaleCopyCurrent=no])
45 LIBS="$gt_save_LIBS"])
46 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
47 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
48 [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
49 fi
50 INTL_MACOSX_LIBS=
51 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
52 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
53 fi
54 AC_SUBST([INTL_MACOSX_LIBS])
55 ])
+0
-119
m4/lib-ld.m4 less more
0 # lib-ld.m4 serial 6
1 dnl Copyright (C) 1996-2003, 2009-2015 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl Subroutines of libtool.m4,
7 dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
8 dnl collision with libtool.m4.
9
10 dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
11 AC_DEFUN([AC_LIB_PROG_LD_GNU],
12 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
13 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
14 case `$LD -v 2>&1 </dev/null` in
15 *GNU* | *'with BFD'*)
16 acl_cv_prog_gnu_ld=yes
17 ;;
18 *)
19 acl_cv_prog_gnu_ld=no
20 ;;
21 esac])
22 with_gnu_ld=$acl_cv_prog_gnu_ld
23 ])
24
25 dnl From libtool-2.4. Sets the variable LD.
26 AC_DEFUN([AC_LIB_PROG_LD],
27 [AC_REQUIRE([AC_PROG_CC])dnl
28 AC_REQUIRE([AC_CANONICAL_HOST])dnl
29
30 AC_ARG_WITH([gnu-ld],
31 [AS_HELP_STRING([--with-gnu-ld],
32 [assume the C compiler uses GNU ld [default=no]])],
33 [test "$withval" = no || with_gnu_ld=yes],
34 [with_gnu_ld=no])dnl
35
36 # Prepare PATH_SEPARATOR.
37 # The user is always right.
38 if test "${PATH_SEPARATOR+set}" != set; then
39 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
40 # contains only /bin. Note that ksh looks also at the FPATH variable,
41 # so we have to set that as well for the test.
42 PATH_SEPARATOR=:
43 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
44 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
45 || PATH_SEPARATOR=';'
46 }
47 fi
48
49 ac_prog=ld
50 if test "$GCC" = yes; then
51 # Check if gcc -print-prog-name=ld gives a path.
52 AC_MSG_CHECKING([for ld used by $CC])
53 case $host in
54 *-*-mingw*)
55 # gcc leaves a trailing carriage return which upsets mingw
56 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
57 *)
58 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
59 esac
60 case $ac_prog in
61 # Accept absolute paths.
62 [[\\/]]* | ?:[[\\/]]*)
63 re_direlt='/[[^/]][[^/]]*/\.\./'
64 # Canonicalize the pathname of ld
65 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
66 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
67 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
68 done
69 test -z "$LD" && LD="$ac_prog"
70 ;;
71 "")
72 # If it fails, then pretend we aren't using GCC.
73 ac_prog=ld
74 ;;
75 *)
76 # If it is relative, then search for the first ld in PATH.
77 with_gnu_ld=unknown
78 ;;
79 esac
80 elif test "$with_gnu_ld" = yes; then
81 AC_MSG_CHECKING([for GNU ld])
82 else
83 AC_MSG_CHECKING([for non-GNU ld])
84 fi
85 AC_CACHE_VAL([acl_cv_path_LD],
86 [if test -z "$LD"; then
87 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
88 for ac_dir in $PATH; do
89 IFS="$acl_save_ifs"
90 test -z "$ac_dir" && ac_dir=.
91 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
92 acl_cv_path_LD="$ac_dir/$ac_prog"
93 # Check to see if the program is GNU ld. I'd rather use --version,
94 # but apparently some variants of GNU ld only accept -v.
95 # Break only if it was the GNU/non-GNU ld that we prefer.
96 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
97 *GNU* | *'with BFD'*)
98 test "$with_gnu_ld" != no && break
99 ;;
100 *)
101 test "$with_gnu_ld" != yes && break
102 ;;
103 esac
104 fi
105 done
106 IFS="$acl_save_ifs"
107 else
108 acl_cv_path_LD="$LD" # Let the user override the test with a path.
109 fi])
110 LD="$acl_cv_path_LD"
111 if test -n "$LD"; then
112 AC_MSG_RESULT([$LD])
113 else
114 AC_MSG_RESULT([no])
115 fi
116 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
117 AC_LIB_PROG_LD_GNU
118 ])
+0
-777
m4/lib-link.m4 less more
0 # lib-link.m4 serial 26 (gettext-0.18.2)
1 dnl Copyright (C) 2001-2015 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Bruno Haible.
7
8 AC_PREREQ([2.54])
9
10 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
11 dnl the libraries corresponding to explicit and implicit dependencies.
12 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
13 dnl augments the CPPFLAGS variable.
14 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
15 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
16 AC_DEFUN([AC_LIB_LINKFLAGS],
17 [
18 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
19 AC_REQUIRE([AC_LIB_RPATH])
20 pushdef([Name],[m4_translit([$1],[./+-], [____])])
21 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
22 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
23 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
24 AC_LIB_LINKFLAGS_BODY([$1], [$2])
25 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
26 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
27 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
28 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
29 ])
30 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
31 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
32 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
33 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
34 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
35 AC_SUBST([LIB]NAME)
36 AC_SUBST([LTLIB]NAME)
37 AC_SUBST([LIB]NAME[_PREFIX])
38 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
39 dnl results of this search when this library appears as a dependency.
40 HAVE_LIB[]NAME=yes
41 popdef([NAME])
42 popdef([Name])
43 ])
44
45 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
46 dnl searches for libname and the libraries corresponding to explicit and
47 dnl implicit dependencies, together with the specified include files and
48 dnl the ability to compile and link the specified testcode. The missing-message
49 dnl defaults to 'no' and may contain additional hints for the user.
50 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
51 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
52 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
53 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
54 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
55 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
56 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
57 [
58 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
59 AC_REQUIRE([AC_LIB_RPATH])
60 pushdef([Name],[m4_translit([$1],[./+-], [____])])
61 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
62 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
63
64 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
65 dnl accordingly.
66 AC_LIB_LINKFLAGS_BODY([$1], [$2])
67
68 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
69 dnl because if the user has installed lib[]Name and not disabled its use
70 dnl via --without-lib[]Name-prefix, he wants to use it.
71 ac_save_CPPFLAGS="$CPPFLAGS"
72 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
73
74 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
75 ac_save_LIBS="$LIBS"
76 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
77 dnl because these -l options might require -L options that are present in
78 dnl LIBS. -l options benefit only from the -L options listed before it.
79 dnl Otherwise, add it to the front of LIBS, because it may be a static
80 dnl library that depends on another static library that is present in LIBS.
81 dnl Static libraries benefit only from the static libraries listed after
82 dnl it.
83 case " $LIB[]NAME" in
84 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
85 *) LIBS="$LIB[]NAME $LIBS" ;;
86 esac
87 AC_LINK_IFELSE(
88 [AC_LANG_PROGRAM([[$3]], [[$4]])],
89 [ac_cv_lib[]Name=yes],
90 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
91 LIBS="$ac_save_LIBS"
92 ])
93 if test "$ac_cv_lib[]Name" = yes; then
94 HAVE_LIB[]NAME=yes
95 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
96 AC_MSG_CHECKING([how to link with lib[]$1])
97 AC_MSG_RESULT([$LIB[]NAME])
98 else
99 HAVE_LIB[]NAME=no
100 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
101 dnl $INC[]NAME either.
102 CPPFLAGS="$ac_save_CPPFLAGS"
103 LIB[]NAME=
104 LTLIB[]NAME=
105 LIB[]NAME[]_PREFIX=
106 fi
107 AC_SUBST([HAVE_LIB]NAME)
108 AC_SUBST([LIB]NAME)
109 AC_SUBST([LTLIB]NAME)
110 AC_SUBST([LIB]NAME[_PREFIX])
111 popdef([NAME])
112 popdef([Name])
113 ])
114
115 dnl Determine the platform dependent parameters needed to use rpath:
116 dnl acl_libext,
117 dnl acl_shlibext,
118 dnl acl_libname_spec,
119 dnl acl_library_names_spec,
120 dnl acl_hardcode_libdir_flag_spec,
121 dnl acl_hardcode_libdir_separator,
122 dnl acl_hardcode_direct,
123 dnl acl_hardcode_minus_L.
124 AC_DEFUN([AC_LIB_RPATH],
125 [
126 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
127 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
128 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
129 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
130 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
131 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
132 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
133 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
134 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
135 . ./conftest.sh
136 rm -f ./conftest.sh
137 acl_cv_rpath=done
138 ])
139 wl="$acl_cv_wl"
140 acl_libext="$acl_cv_libext"
141 acl_shlibext="$acl_cv_shlibext"
142 acl_libname_spec="$acl_cv_libname_spec"
143 acl_library_names_spec="$acl_cv_library_names_spec"
144 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
145 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
146 acl_hardcode_direct="$acl_cv_hardcode_direct"
147 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
148 dnl Determine whether the user wants rpath handling at all.
149 AC_ARG_ENABLE([rpath],
150 [ --disable-rpath do not hardcode runtime library paths],
151 :, enable_rpath=yes)
152 ])
153
154 dnl AC_LIB_FROMPACKAGE(name, package)
155 dnl declares that libname comes from the given package. The configure file
156 dnl will then not have a --with-libname-prefix option but a
157 dnl --with-package-prefix option. Several libraries can come from the same
158 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
159 dnl macro call that searches for libname.
160 AC_DEFUN([AC_LIB_FROMPACKAGE],
161 [
162 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
163 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
164 define([acl_frompackage_]NAME, [$2])
165 popdef([NAME])
166 pushdef([PACK],[$2])
167 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
168 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
169 define([acl_libsinpackage_]PACKUP,
170 m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
171 popdef([PACKUP])
172 popdef([PACK])
173 ])
174
175 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
176 dnl the libraries corresponding to explicit and implicit dependencies.
177 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
178 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
179 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
180 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
181 [
182 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
183 pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
184 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
185 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
186 pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
187 [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
188 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
189 dnl Autoconf >= 2.61 supports dots in --with options.
190 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
191 dnl By default, look in $includedir and $libdir.
192 use_additional=yes
193 AC_LIB_WITH_FINAL_PREFIX([
194 eval additional_includedir=\"$includedir\"
195 eval additional_libdir=\"$libdir\"
196 ])
197 AC_ARG_WITH(P_A_C_K[-prefix],
198 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
199 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
200 [
201 if test "X$withval" = "Xno"; then
202 use_additional=no
203 else
204 if test "X$withval" = "X"; then
205 AC_LIB_WITH_FINAL_PREFIX([
206 eval additional_includedir=\"$includedir\"
207 eval additional_libdir=\"$libdir\"
208 ])
209 else
210 additional_includedir="$withval/include"
211 additional_libdir="$withval/$acl_libdirstem"
212 if test "$acl_libdirstem2" != "$acl_libdirstem" \
213 && ! test -d "$withval/$acl_libdirstem"; then
214 additional_libdir="$withval/$acl_libdirstem2"
215 fi
216 fi
217 fi
218 ])
219 dnl Search the library and its dependencies in $additional_libdir and
220 dnl $LDFLAGS. Using breadth-first-seach.
221 LIB[]NAME=
222 LTLIB[]NAME=
223 INC[]NAME=
224 LIB[]NAME[]_PREFIX=
225 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
226 dnl computed. So it has to be reset here.
227 HAVE_LIB[]NAME=
228 rpathdirs=
229 ltrpathdirs=
230 names_already_handled=
231 names_next_round='$1 $2'
232 while test -n "$names_next_round"; do
233 names_this_round="$names_next_round"
234 names_next_round=
235 for name in $names_this_round; do
236 already_handled=
237 for n in $names_already_handled; do
238 if test "$n" = "$name"; then
239 already_handled=yes
240 break
241 fi
242 done
243 if test -z "$already_handled"; then
244 names_already_handled="$names_already_handled $name"
245 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
246 dnl or AC_LIB_HAVE_LINKFLAGS call.
247 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
248 eval value=\"\$HAVE_LIB$uppername\"
249 if test -n "$value"; then
250 if test "$value" = yes; then
251 eval value=\"\$LIB$uppername\"
252 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
253 eval value=\"\$LTLIB$uppername\"
254 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
255 else
256 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
257 dnl that this library doesn't exist. So just drop it.
258 :
259 fi
260 else
261 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
262 dnl and the already constructed $LIBNAME/$LTLIBNAME.
263 found_dir=
264 found_la=
265 found_so=
266 found_a=
267 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
268 if test -n "$acl_shlibext"; then
269 shrext=".$acl_shlibext" # typically: shrext=.so
270 else
271 shrext=
272 fi
273 if test $use_additional = yes; then
274 dir="$additional_libdir"
275 dnl The same code as in the loop below:
276 dnl First look for a shared library.
277 if test -n "$acl_shlibext"; then
278 if test -f "$dir/$libname$shrext"; then
279 found_dir="$dir"
280 found_so="$dir/$libname$shrext"
281 else
282 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
283 ver=`(cd "$dir" && \
284 for f in "$libname$shrext".*; do echo "$f"; done \
285 | sed -e "s,^$libname$shrext\\\\.,," \
286 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
287 | sed 1q ) 2>/dev/null`
288 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
289 found_dir="$dir"
290 found_so="$dir/$libname$shrext.$ver"
291 fi
292 else
293 eval library_names=\"$acl_library_names_spec\"
294 for f in $library_names; do
295 if test -f "$dir/$f"; then
296 found_dir="$dir"
297 found_so="$dir/$f"
298 break
299 fi
300 done
301 fi
302 fi
303 fi
304 dnl Then look for a static library.
305 if test "X$found_dir" = "X"; then
306 if test -f "$dir/$libname.$acl_libext"; then
307 found_dir="$dir"
308 found_a="$dir/$libname.$acl_libext"
309 fi
310 fi
311 if test "X$found_dir" != "X"; then
312 if test -f "$dir/$libname.la"; then
313 found_la="$dir/$libname.la"
314 fi
315 fi
316 fi
317 if test "X$found_dir" = "X"; then
318 for x in $LDFLAGS $LTLIB[]NAME; do
319 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
320 case "$x" in
321 -L*)
322 dir=`echo "X$x" | sed -e 's/^X-L//'`
323 dnl First look for a shared library.
324 if test -n "$acl_shlibext"; then
325 if test -f "$dir/$libname$shrext"; then
326 found_dir="$dir"
327 found_so="$dir/$libname$shrext"
328 else
329 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
330 ver=`(cd "$dir" && \
331 for f in "$libname$shrext".*; do echo "$f"; done \
332 | sed -e "s,^$libname$shrext\\\\.,," \
333 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
334 | sed 1q ) 2>/dev/null`
335 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
336 found_dir="$dir"
337 found_so="$dir/$libname$shrext.$ver"
338 fi
339 else
340 eval library_names=\"$acl_library_names_spec\"
341 for f in $library_names; do
342 if test -f "$dir/$f"; then
343 found_dir="$dir"
344 found_so="$dir/$f"
345 break
346 fi
347 done
348 fi
349 fi
350 fi
351 dnl Then look for a static library.
352 if test "X$found_dir" = "X"; then
353 if test -f "$dir/$libname.$acl_libext"; then
354 found_dir="$dir"
355 found_a="$dir/$libname.$acl_libext"
356 fi
357 fi
358 if test "X$found_dir" != "X"; then
359 if test -f "$dir/$libname.la"; then
360 found_la="$dir/$libname.la"
361 fi
362 fi
363 ;;
364 esac
365 if test "X$found_dir" != "X"; then
366 break
367 fi
368 done
369 fi
370 if test "X$found_dir" != "X"; then
371 dnl Found the library.
372 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
373 if test "X$found_so" != "X"; then
374 dnl Linking with a shared library. We attempt to hardcode its
375 dnl directory into the executable's runpath, unless it's the
376 dnl standard /usr/lib.
377 if test "$enable_rpath" = no \
378 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
379 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
380 dnl No hardcoding is needed.
381 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
382 else
383 dnl Use an explicit option to hardcode DIR into the resulting
384 dnl binary.
385 dnl Potentially add DIR to ltrpathdirs.
386 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
387 haveit=
388 for x in $ltrpathdirs; do
389 if test "X$x" = "X$found_dir"; then
390 haveit=yes
391 break
392 fi
393 done
394 if test -z "$haveit"; then
395 ltrpathdirs="$ltrpathdirs $found_dir"
396 fi
397 dnl The hardcoding into $LIBNAME is system dependent.
398 if test "$acl_hardcode_direct" = yes; then
399 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
400 dnl resulting binary.
401 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
402 else
403 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
404 dnl Use an explicit option to hardcode DIR into the resulting
405 dnl binary.
406 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
407 dnl Potentially add DIR to rpathdirs.
408 dnl The rpathdirs will be appended to $LIBNAME at the end.
409 haveit=
410 for x in $rpathdirs; do
411 if test "X$x" = "X$found_dir"; then
412 haveit=yes
413 break
414 fi
415 done
416 if test -z "$haveit"; then
417 rpathdirs="$rpathdirs $found_dir"
418 fi
419 else
420 dnl Rely on "-L$found_dir".
421 dnl But don't add it if it's already contained in the LDFLAGS
422 dnl or the already constructed $LIBNAME
423 haveit=
424 for x in $LDFLAGS $LIB[]NAME; do
425 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
426 if test "X$x" = "X-L$found_dir"; then
427 haveit=yes
428 break
429 fi
430 done
431 if test -z "$haveit"; then
432 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
433 fi
434 if test "$acl_hardcode_minus_L" != no; then
435 dnl FIXME: Not sure whether we should use
436 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
437 dnl here.
438 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
439 else
440 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
441 dnl here, because this doesn't fit in flags passed to the
442 dnl compiler. So give up. No hardcoding. This affects only
443 dnl very old systems.
444 dnl FIXME: Not sure whether we should use
445 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
446 dnl here.
447 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
448 fi
449 fi
450 fi
451 fi
452 else
453 if test "X$found_a" != "X"; then
454 dnl Linking with a static library.
455 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
456 else
457 dnl We shouldn't come here, but anyway it's good to have a
458 dnl fallback.
459 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
460 fi
461 fi
462 dnl Assume the include files are nearby.
463 additional_includedir=
464 case "$found_dir" in
465 */$acl_libdirstem | */$acl_libdirstem/)
466 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
467 if test "$name" = '$1'; then
468 LIB[]NAME[]_PREFIX="$basedir"
469 fi
470 additional_includedir="$basedir/include"
471 ;;
472 */$acl_libdirstem2 | */$acl_libdirstem2/)
473 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
474 if test "$name" = '$1'; then
475 LIB[]NAME[]_PREFIX="$basedir"
476 fi
477 additional_includedir="$basedir/include"
478 ;;
479 esac
480 if test "X$additional_includedir" != "X"; then
481 dnl Potentially add $additional_includedir to $INCNAME.
482 dnl But don't add it
483 dnl 1. if it's the standard /usr/include,
484 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
485 dnl 3. if it's already present in $CPPFLAGS or the already
486 dnl constructed $INCNAME,
487 dnl 4. if it doesn't exist as a directory.
488 if test "X$additional_includedir" != "X/usr/include"; then
489 haveit=
490 if test "X$additional_includedir" = "X/usr/local/include"; then
491 if test -n "$GCC"; then
492 case $host_os in
493 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
494 esac
495 fi
496 fi
497 if test -z "$haveit"; then
498 for x in $CPPFLAGS $INC[]NAME; do
499 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
500 if test "X$x" = "X-I$additional_includedir"; then
501 haveit=yes
502 break
503 fi
504 done
505 if test -z "$haveit"; then
506 if test -d "$additional_includedir"; then
507 dnl Really add $additional_includedir to $INCNAME.
508 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
509 fi
510 fi
511 fi
512 fi
513 fi
514 dnl Look for dependencies.
515 if test -n "$found_la"; then
516 dnl Read the .la file. It defines the variables
517 dnl dlname, library_names, old_library, dependency_libs, current,
518 dnl age, revision, installed, dlopen, dlpreopen, libdir.
519 save_libdir="$libdir"
520 case "$found_la" in
521 */* | *\\*) . "$found_la" ;;
522 *) . "./$found_la" ;;
523 esac
524 libdir="$save_libdir"
525 dnl We use only dependency_libs.
526 for dep in $dependency_libs; do
527 case "$dep" in
528 -L*)
529 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
530 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
531 dnl But don't add it
532 dnl 1. if it's the standard /usr/lib,
533 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
534 dnl 3. if it's already present in $LDFLAGS or the already
535 dnl constructed $LIBNAME,
536 dnl 4. if it doesn't exist as a directory.
537 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
538 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
539 haveit=
540 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
541 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
542 if test -n "$GCC"; then
543 case $host_os in
544 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
545 esac
546 fi
547 fi
548 if test -z "$haveit"; then
549 haveit=
550 for x in $LDFLAGS $LIB[]NAME; do
551 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
552 if test "X$x" = "X-L$additional_libdir"; then
553 haveit=yes
554 break
555 fi
556 done
557 if test -z "$haveit"; then
558 if test -d "$additional_libdir"; then
559 dnl Really add $additional_libdir to $LIBNAME.
560 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
561 fi
562 fi
563 haveit=
564 for x in $LDFLAGS $LTLIB[]NAME; do
565 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
566 if test "X$x" = "X-L$additional_libdir"; then
567 haveit=yes
568 break
569 fi
570 done
571 if test -z "$haveit"; then
572 if test -d "$additional_libdir"; then
573 dnl Really add $additional_libdir to $LTLIBNAME.
574 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
575 fi
576 fi
577 fi
578 fi
579 ;;
580 -R*)
581 dir=`echo "X$dep" | sed -e 's/^X-R//'`
582 if test "$enable_rpath" != no; then
583 dnl Potentially add DIR to rpathdirs.
584 dnl The rpathdirs will be appended to $LIBNAME at the end.
585 haveit=
586 for x in $rpathdirs; do
587 if test "X$x" = "X$dir"; then
588 haveit=yes
589 break
590 fi
591 done
592 if test -z "$haveit"; then
593 rpathdirs="$rpathdirs $dir"
594 fi
595 dnl Potentially add DIR to ltrpathdirs.
596 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
597 haveit=
598 for x in $ltrpathdirs; do
599 if test "X$x" = "X$dir"; then
600 haveit=yes
601 break
602 fi
603 done
604 if test -z "$haveit"; then
605 ltrpathdirs="$ltrpathdirs $dir"
606 fi
607 fi
608 ;;
609 -l*)
610 dnl Handle this in the next round.
611 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
612 ;;
613 *.la)
614 dnl Handle this in the next round. Throw away the .la's
615 dnl directory; it is already contained in a preceding -L
616 dnl option.
617 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
618 ;;
619 *)
620 dnl Most likely an immediate library name.
621 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
622 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
623 ;;
624 esac
625 done
626 fi
627 else
628 dnl Didn't find the library; assume it is in the system directories
629 dnl known to the linker and runtime loader. (All the system
630 dnl directories known to the linker should also be known to the
631 dnl runtime loader, otherwise the system is severely misconfigured.)
632 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
633 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
634 fi
635 fi
636 fi
637 done
638 done
639 if test "X$rpathdirs" != "X"; then
640 if test -n "$acl_hardcode_libdir_separator"; then
641 dnl Weird platform: only the last -rpath option counts, the user must
642 dnl pass all path elements in one option. We can arrange that for a
643 dnl single library, but not when more than one $LIBNAMEs are used.
644 alldirs=
645 for found_dir in $rpathdirs; do
646 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
647 done
648 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
649 acl_save_libdir="$libdir"
650 libdir="$alldirs"
651 eval flag=\"$acl_hardcode_libdir_flag_spec\"
652 libdir="$acl_save_libdir"
653 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
654 else
655 dnl The -rpath options are cumulative.
656 for found_dir in $rpathdirs; do
657 acl_save_libdir="$libdir"
658 libdir="$found_dir"
659 eval flag=\"$acl_hardcode_libdir_flag_spec\"
660 libdir="$acl_save_libdir"
661 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
662 done
663 fi
664 fi
665 if test "X$ltrpathdirs" != "X"; then
666 dnl When using libtool, the option that works for both libraries and
667 dnl executables is -R. The -R options are cumulative.
668 for found_dir in $ltrpathdirs; do
669 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
670 done
671 fi
672 popdef([P_A_C_K])
673 popdef([PACKLIBS])
674 popdef([PACKUP])
675 popdef([PACK])
676 popdef([NAME])
677 ])
678
679 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
680 dnl unless already present in VAR.
681 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
682 dnl contains two or three consecutive elements that belong together.
683 AC_DEFUN([AC_LIB_APPENDTOVAR],
684 [
685 for element in [$2]; do
686 haveit=
687 for x in $[$1]; do
688 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
689 if test "X$x" = "X$element"; then
690 haveit=yes
691 break
692 fi
693 done
694 if test -z "$haveit"; then
695 [$1]="${[$1]}${[$1]:+ }$element"
696 fi
697 done
698 ])
699
700 dnl For those cases where a variable contains several -L and -l options
701 dnl referring to unknown libraries and directories, this macro determines the
702 dnl necessary additional linker options for the runtime path.
703 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
704 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
705 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
706 dnl otherwise linking without libtool is assumed.
707 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
708 [
709 AC_REQUIRE([AC_LIB_RPATH])
710 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
711 $1=
712 if test "$enable_rpath" != no; then
713 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
714 dnl Use an explicit option to hardcode directories into the resulting
715 dnl binary.
716 rpathdirs=
717 next=
718 for opt in $2; do
719 if test -n "$next"; then
720 dir="$next"
721 dnl No need to hardcode the standard /usr/lib.
722 if test "X$dir" != "X/usr/$acl_libdirstem" \
723 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
724 rpathdirs="$rpathdirs $dir"
725 fi
726 next=
727 else
728 case $opt in
729 -L) next=yes ;;
730 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
731 dnl No need to hardcode the standard /usr/lib.
732 if test "X$dir" != "X/usr/$acl_libdirstem" \
733 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
734 rpathdirs="$rpathdirs $dir"
735 fi
736 next= ;;
737 *) next= ;;
738 esac
739 fi
740 done
741 if test "X$rpathdirs" != "X"; then
742 if test -n ""$3""; then
743 dnl libtool is used for linking. Use -R options.
744 for dir in $rpathdirs; do
745 $1="${$1}${$1:+ }-R$dir"
746 done
747 else
748 dnl The linker is used for linking directly.
749 if test -n "$acl_hardcode_libdir_separator"; then
750 dnl Weird platform: only the last -rpath option counts, the user
751 dnl must pass all path elements in one option.
752 alldirs=
753 for dir in $rpathdirs; do
754 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
755 done
756 acl_save_libdir="$libdir"
757 libdir="$alldirs"
758 eval flag=\"$acl_hardcode_libdir_flag_spec\"
759 libdir="$acl_save_libdir"
760 $1="$flag"
761 else
762 dnl The -rpath options are cumulative.
763 for dir in $rpathdirs; do
764 acl_save_libdir="$libdir"
765 libdir="$dir"
766 eval flag=\"$acl_hardcode_libdir_flag_spec\"
767 libdir="$acl_save_libdir"
768 $1="${$1}${$1:+ }$flag"
769 done
770 fi
771 fi
772 fi
773 fi
774 fi
775 AC_SUBST([$1])
776 ])
+0
-224
m4/lib-prefix.m4 less more
0 # lib-prefix.m4 serial 7 (gettext-0.18)
1 dnl Copyright (C) 2001-2005, 2008-2015 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6 dnl From Bruno Haible.
7
8 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
9 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
10 dnl require excessive bracketing.
11 ifdef([AC_HELP_STRING],
12 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
13 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
14
15 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
16 dnl to access previously installed libraries. The basic assumption is that
17 dnl a user will want packages to use other packages he previously installed
18 dnl with the same --prefix option.
19 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
20 dnl libraries, but is otherwise very convenient.
21 AC_DEFUN([AC_LIB_PREFIX],
22 [
23 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
24 AC_REQUIRE([AC_PROG_CC])
25 AC_REQUIRE([AC_CANONICAL_HOST])
26 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
27 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
28 dnl By default, look in $includedir and $libdir.
29 use_additional=yes
30 AC_LIB_WITH_FINAL_PREFIX([
31 eval additional_includedir=\"$includedir\"
32 eval additional_libdir=\"$libdir\"
33 ])
34 AC_LIB_ARG_WITH([lib-prefix],
35 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
36 --without-lib-prefix don't search for libraries in includedir and libdir],
37 [
38 if test "X$withval" = "Xno"; then
39 use_additional=no
40 else
41 if test "X$withval" = "X"; then
42 AC_LIB_WITH_FINAL_PREFIX([
43 eval additional_includedir=\"$includedir\"
44 eval additional_libdir=\"$libdir\"
45 ])
46 else
47 additional_includedir="$withval/include"
48 additional_libdir="$withval/$acl_libdirstem"
49 fi
50 fi
51 ])
52 if test $use_additional = yes; then
53 dnl Potentially add $additional_includedir to $CPPFLAGS.
54 dnl But don't add it
55 dnl 1. if it's the standard /usr/include,
56 dnl 2. if it's already present in $CPPFLAGS,
57 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
58 dnl 4. if it doesn't exist as a directory.
59 if test "X$additional_includedir" != "X/usr/include"; then
60 haveit=
61 for x in $CPPFLAGS; do
62 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
63 if test "X$x" = "X-I$additional_includedir"; then
64 haveit=yes
65 break
66 fi
67 done
68 if test -z "$haveit"; then
69 if test "X$additional_includedir" = "X/usr/local/include"; then
70 if test -n "$GCC"; then
71 case $host_os in
72 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
73 esac
74 fi
75 fi
76 if test -z "$haveit"; then
77 if test -d "$additional_includedir"; then
78 dnl Really add $additional_includedir to $CPPFLAGS.
79 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
80 fi
81 fi
82 fi
83 fi
84 dnl Potentially add $additional_libdir to $LDFLAGS.
85 dnl But don't add it
86 dnl 1. if it's the standard /usr/lib,
87 dnl 2. if it's already present in $LDFLAGS,
88 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
89 dnl 4. if it doesn't exist as a directory.
90 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
91 haveit=
92 for x in $LDFLAGS; do
93 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
94 if test "X$x" = "X-L$additional_libdir"; then
95 haveit=yes
96 break
97 fi
98 done
99 if test -z "$haveit"; then
100 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
101 if test -n "$GCC"; then
102 case $host_os in
103 linux*) haveit=yes;;
104 esac
105 fi
106 fi
107 if test -z "$haveit"; then
108 if test -d "$additional_libdir"; then
109 dnl Really add $additional_libdir to $LDFLAGS.
110 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
111 fi
112 fi
113 fi
114 fi
115 fi
116 ])
117
118 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
119 dnl acl_final_exec_prefix, containing the values to which $prefix and
120 dnl $exec_prefix will expand at the end of the configure script.
121 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
122 [
123 dnl Unfortunately, prefix and exec_prefix get only finally determined
124 dnl at the end of configure.
125 if test "X$prefix" = "XNONE"; then
126 acl_final_prefix="$ac_default_prefix"
127 else
128 acl_final_prefix="$prefix"
129 fi
130 if test "X$exec_prefix" = "XNONE"; then
131 acl_final_exec_prefix='${prefix}'
132 else
133 acl_final_exec_prefix="$exec_prefix"
134 fi
135 acl_save_prefix="$prefix"
136 prefix="$acl_final_prefix"
137 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
138 prefix="$acl_save_prefix"
139 ])
140
141 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
142 dnl variables prefix and exec_prefix bound to the values they will have
143 dnl at the end of the configure script.
144 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
145 [
146 acl_save_prefix="$prefix"
147 prefix="$acl_final_prefix"
148 acl_save_exec_prefix="$exec_prefix"
149 exec_prefix="$acl_final_exec_prefix"
150 $1
151 exec_prefix="$acl_save_exec_prefix"
152 prefix="$acl_save_prefix"
153 ])
154
155 dnl AC_LIB_PREPARE_MULTILIB creates
156 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
157 dnl "lib" or "lib64" or "lib/64",
158 dnl - a variable acl_libdirstem2, as a secondary possible value for
159 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
160 dnl "lib/amd64".
161 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
162 [
163 dnl There is no formal standard regarding lib and lib64.
164 dnl On glibc systems, the current practice is that on a system supporting
165 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
166 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
167 dnl the compiler's default mode by looking at the compiler's library search
168 dnl path. If at least one of its elements ends in /lib64 or points to a
169 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
170 dnl Otherwise we use the default, namely "lib".
171 dnl On Solaris systems, the current practice is that on a system supporting
172 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
173 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
174 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
175 AC_REQUIRE([AC_CANONICAL_HOST])
176 acl_libdirstem=lib
177 acl_libdirstem2=
178 case "$host_os" in
179 solaris*)
180 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
181 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
182 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
183 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
184 dnl symlink is missing, so we set acl_libdirstem2 too.
185 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
186 [AC_EGREP_CPP([sixtyfour bits], [
187 #ifdef _LP64
188 sixtyfour bits
189 #endif
190 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
191 ])
192 if test $gl_cv_solaris_64bit = yes; then
193 acl_libdirstem=lib/64
194 case "$host_cpu" in
195 sparc*) acl_libdirstem2=lib/sparcv9 ;;
196 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
197 esac
198 fi
199 ;;
200 *)
201 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
202 if test -n "$searchpath"; then
203 acl_save_IFS="${IFS= }"; IFS=":"
204 for searchdir in $searchpath; do
205 if test -d "$searchdir"; then
206 case "$searchdir" in
207 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
208 */../ | */.. )
209 # Better ignore directories of this form. They are misleading.
210 ;;
211 *) searchdir=`cd "$searchdir" && pwd`
212 case "$searchdir" in
213 */lib64 ) acl_libdirstem=lib64 ;;
214 esac ;;
215 esac
216 fi
217 done
218 IFS="$acl_save_IFS"
219 fi
220 ;;
221 esac
222 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
223 ])
+0
-32
m4/nls.m4 less more
0 # nls.m4 serial 5 (gettext-0.18)
1 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
2 dnl Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6 dnl
7 dnl This file can be used in projects which are not available under
8 dnl the GNU General Public License or the GNU Library General Public
9 dnl License but which still want to provide support for the GNU gettext
10 dnl functionality.
11 dnl Please note that the actual code of the GNU gettext library is covered
12 dnl by the GNU Library General Public License, and the rest of the GNU
13 dnl gettext package is covered by the GNU General Public License.
14 dnl They are *not* in the public domain.
15
16 dnl Authors:
17 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
19
20 AC_PREREQ([2.50])
21
22 AC_DEFUN([AM_NLS],
23 [
24 AC_MSG_CHECKING([whether NLS is requested])
25 dnl Default is enabled NLS
26 AC_ARG_ENABLE([nls],
27 [ --disable-nls do not use Native Language Support],
28 USE_NLS=$enableval, USE_NLS=yes)
29 AC_MSG_RESULT([$USE_NLS])
30 AC_SUBST([USE_NLS])
31 ])
+0
-453
m4/po.m4 less more
0 # po.m4 serial 24 (gettext-0.19)
1 dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5 dnl
6 dnl This file can be used in projects which are not available under
7 dnl the GNU General Public License or the GNU Library General Public
8 dnl License but which still want to provide support for the GNU gettext
9 dnl functionality.
10 dnl Please note that the actual code of the GNU gettext library is covered
11 dnl by the GNU Library General Public License, and the rest of the GNU
12 dnl gettext package is covered by the GNU General Public License.
13 dnl They are *not* in the public domain.
14
15 dnl Authors:
16 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
17 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
18
19 AC_PREREQ([2.60])
20
21 dnl Checks for all prerequisites of the po subdirectory.
22 AC_DEFUN([AM_PO_SUBDIRS],
23 [
24 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
25 AC_REQUIRE([AC_PROG_INSTALL])dnl
26 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
27 AC_REQUIRE([AC_PROG_SED])dnl
28 AC_REQUIRE([AM_NLS])dnl
29
30 dnl Release version of the gettext macros. This is used to ensure that
31 dnl the gettext macros and po/Makefile.in.in are in sync.
32 AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
33
34 dnl Perform the following tests also if --disable-nls has been given,
35 dnl because they are needed for "make dist" to work.
36
37 dnl Search for GNU msgfmt in the PATH.
38 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
39 dnl The second test excludes FreeBSD msgfmt.
40 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
41 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
42 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
43 :)
44 AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
45
46 dnl Test whether it is GNU msgfmt >= 0.15.
47 changequote(,)dnl
48 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
49 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
50 *) MSGFMT_015=$MSGFMT ;;
51 esac
52 changequote([,])dnl
53 AC_SUBST([MSGFMT_015])
54 changequote(,)dnl
55 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
56 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
57 *) GMSGFMT_015=$GMSGFMT ;;
58 esac
59 changequote([,])dnl
60 AC_SUBST([GMSGFMT_015])
61
62 dnl Search for GNU xgettext 0.12 or newer in the PATH.
63 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
64 dnl The second test excludes FreeBSD xgettext.
65 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
66 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
67 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
68 :)
69 dnl Remove leftover from FreeBSD xgettext call.
70 rm -f messages.po
71
72 dnl Test whether it is GNU xgettext >= 0.15.
73 changequote(,)dnl
74 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
75 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
76 *) XGETTEXT_015=$XGETTEXT ;;
77 esac
78 changequote([,])dnl
79 AC_SUBST([XGETTEXT_015])
80
81 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
82 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
83 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
84
85 dnl Installation directories.
86 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
87 dnl have to define it here, so that it can be used in po/Makefile.
88 test -n "$localedir" || localedir='${datadir}/locale'
89 AC_SUBST([localedir])
90
91 dnl Support for AM_XGETTEXT_OPTION.
92 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
93 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
94
95 AC_CONFIG_COMMANDS([po-directories], [[
96 for ac_file in $CONFIG_FILES; do
97 # Support "outfile[:infile[:infile...]]"
98 case "$ac_file" in
99 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
100 esac
101 # PO directories have a Makefile.in generated from Makefile.in.in.
102 case "$ac_file" in */Makefile.in)
103 # Adjust a relative srcdir.
104 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
105 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
106 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
107 # In autoconf-2.13 it is called $ac_given_srcdir.
108 # In autoconf-2.50 it is called $srcdir.
109 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
110 case "$ac_given_srcdir" in
111 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
112 /*) top_srcdir="$ac_given_srcdir" ;;
113 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
114 esac
115 # Treat a directory as a PO directory if and only if it has a
116 # POTFILES.in file. This allows packages to have multiple PO
117 # directories under different names or in different locations.
118 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
119 rm -f "$ac_dir/POTFILES"
120 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
121 gt_tab=`printf '\t'`
122 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
123 POMAKEFILEDEPS="POTFILES.in"
124 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
125 # on $ac_dir but don't depend on user-specified configuration
126 # parameters.
127 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
128 # The LINGUAS file contains the set of available languages.
129 if test -n "$OBSOLETE_ALL_LINGUAS"; then
130 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
131 fi
132 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
133 # Hide the ALL_LINGUAS assignment from automake < 1.5.
134 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
135 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
136 else
137 # The set of available languages was given in configure.in.
138 # Hide the ALL_LINGUAS assignment from automake < 1.5.
139 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
140 fi
141 # Compute POFILES
142 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
143 # Compute UPDATEPOFILES
144 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
145 # Compute DUMMYPOFILES
146 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
147 # Compute GMOFILES
148 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
149 case "$ac_given_srcdir" in
150 .) srcdirpre= ;;
151 *) srcdirpre='$(srcdir)/' ;;
152 esac
153 POFILES=
154 UPDATEPOFILES=
155 DUMMYPOFILES=
156 GMOFILES=
157 for lang in $ALL_LINGUAS; do
158 POFILES="$POFILES $srcdirpre$lang.po"
159 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
160 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
161 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
162 done
163 # CATALOGS depends on both $ac_dir and the user's LINGUAS
164 # environment variable.
165 INST_LINGUAS=
166 if test -n "$ALL_LINGUAS"; then
167 for presentlang in $ALL_LINGUAS; do
168 useit=no
169 if test "%UNSET%" != "$LINGUAS"; then
170 desiredlanguages="$LINGUAS"
171 else
172 desiredlanguages="$ALL_LINGUAS"
173 fi
174 for desiredlang in $desiredlanguages; do
175 # Use the presentlang catalog if desiredlang is
176 # a. equal to presentlang, or
177 # b. a variant of presentlang (because in this case,
178 # presentlang can be used as a fallback for messages
179 # which are not translated in the desiredlang catalog).
180 case "$desiredlang" in
181 "$presentlang"*) useit=yes;;
182 esac
183 done
184 if test $useit = yes; then
185 INST_LINGUAS="$INST_LINGUAS $presentlang"
186 fi
187 done
188 fi
189 CATALOGS=
190 if test -n "$INST_LINGUAS"; then
191 for lang in $INST_LINGUAS; do
192 CATALOGS="$CATALOGS $lang.gmo"
193 done
194 fi
195 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
196 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
197 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
198 if test -f "$f"; then
199 case "$f" in
200 *.orig | *.bak | *~) ;;
201 *) cat "$f" >> "$ac_dir/Makefile" ;;
202 esac
203 fi
204 done
205 fi
206 ;;
207 esac
208 done]],
209 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
210 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
211 # from automake < 1.5.
212 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
213 # Capture the value of LINGUAS because we need it to compute CATALOGS.
214 LINGUAS="${LINGUAS-%UNSET%}"
215 ])
216 ])
217
218 dnl Postprocesses a Makefile in a directory containing PO files.
219 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
220 [
221 # When this code is run, in config.status, two variables have already been
222 # set:
223 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
224 # - LINGUAS is the value of the environment variable LINGUAS at configure
225 # time.
226
227 changequote(,)dnl
228 # Adjust a relative srcdir.
229 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
230 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
231 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
232 # In autoconf-2.13 it is called $ac_given_srcdir.
233 # In autoconf-2.50 it is called $srcdir.
234 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
235 case "$ac_given_srcdir" in
236 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
237 /*) top_srcdir="$ac_given_srcdir" ;;
238 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
239 esac
240
241 # Find a way to echo strings without interpreting backslash.
242 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
243 gt_echo='echo'
244 else
245 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
246 gt_echo='printf %s\n'
247 else
248 echo_func () {
249 cat <<EOT
250 $*
251 EOT
252 }
253 gt_echo='echo_func'
254 fi
255 fi
256
257 # A sed script that extracts the value of VARIABLE from a Makefile.
258 tab=`printf '\t'`
259 sed_x_variable='
260 # Test if the hold space is empty.
261 x
262 s/P/P/
263 x
264 ta
265 # Yes it was empty. Look if we have the expected variable definition.
266 /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
267 # Seen the first line of the variable definition.
268 s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
269 ba
270 }
271 bd
272 :a
273 # Here we are processing a line from the variable definition.
274 # Remove comment, more precisely replace it with a space.
275 s/#.*$/ /
276 # See if the line ends in a backslash.
277 tb
278 :b
279 s/\\$//
280 # Print the line, without the trailing backslash.
281 p
282 tc
283 # There was no trailing backslash. The end of the variable definition is
284 # reached. Clear the hold space.
285 s/^.*$//
286 x
287 bd
288 :c
289 # A trailing backslash means that the variable definition continues in the
290 # next line. Put a nonempty string into the hold space to indicate this.
291 s/^.*$/P/
292 x
293 :d
294 '
295 changequote([,])dnl
296
297 # Set POTFILES to the value of the Makefile variable POTFILES.
298 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
299 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
300 # Compute POTFILES_DEPS as
301 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
302 POTFILES_DEPS=
303 for file in $POTFILES; do
304 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
305 done
306 POMAKEFILEDEPS=""
307
308 if test -n "$OBSOLETE_ALL_LINGUAS"; then
309 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
310 fi
311 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
312 # The LINGUAS file contains the set of available languages.
313 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
314 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
315 else
316 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
317 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
318 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
319 fi
320 # Hide the ALL_LINGUAS assignment from automake < 1.5.
321 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
322 # Compute POFILES
323 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
324 # Compute UPDATEPOFILES
325 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
326 # Compute DUMMYPOFILES
327 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
328 # Compute GMOFILES
329 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
330 # Compute PROPERTIESFILES
331 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
332 # Compute CLASSFILES
333 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
334 # Compute QMFILES
335 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
336 # Compute MSGFILES
337 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
338 # Compute RESOURCESDLLFILES
339 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
340 case "$ac_given_srcdir" in
341 .) srcdirpre= ;;
342 *) srcdirpre='$(srcdir)/' ;;
343 esac
344 POFILES=
345 UPDATEPOFILES=
346 DUMMYPOFILES=
347 GMOFILES=
348 PROPERTIESFILES=
349 CLASSFILES=
350 QMFILES=
351 MSGFILES=
352 RESOURCESDLLFILES=
353 for lang in $ALL_LINGUAS; do
354 POFILES="$POFILES $srcdirpre$lang.po"
355 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
356 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
357 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
358 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
359 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
360 QMFILES="$QMFILES $srcdirpre$lang.qm"
361 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
362 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
363 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
364 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
365 done
366 # CATALOGS depends on both $ac_dir and the user's LINGUAS
367 # environment variable.
368 INST_LINGUAS=
369 if test -n "$ALL_LINGUAS"; then
370 for presentlang in $ALL_LINGUAS; do
371 useit=no
372 if test "%UNSET%" != "$LINGUAS"; then
373 desiredlanguages="$LINGUAS"
374 else
375 desiredlanguages="$ALL_LINGUAS"
376 fi
377 for desiredlang in $desiredlanguages; do
378 # Use the presentlang catalog if desiredlang is
379 # a. equal to presentlang, or
380 # b. a variant of presentlang (because in this case,
381 # presentlang can be used as a fallback for messages
382 # which are not translated in the desiredlang catalog).
383 case "$desiredlang" in
384 "$presentlang"*) useit=yes;;
385 esac
386 done
387 if test $useit = yes; then
388 INST_LINGUAS="$INST_LINGUAS $presentlang"
389 fi
390 done
391 fi
392 CATALOGS=
393 JAVACATALOGS=
394 QTCATALOGS=
395 TCLCATALOGS=
396 CSHARPCATALOGS=
397 if test -n "$INST_LINGUAS"; then
398 for lang in $INST_LINGUAS; do
399 CATALOGS="$CATALOGS $lang.gmo"
400 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
401 QTCATALOGS="$QTCATALOGS $lang.qm"
402 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
403 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
404 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
405 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
406 done
407 fi
408
409 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
410 tab=`printf '\t'`
411 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
412 # Add dependencies that cannot be formulated as a simple suffix rule.
413 for lang in $ALL_LINGUAS; do
414 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
415 cat >> "$ac_file.tmp" <<EOF
416 $frobbedlang.msg: $lang.po
417 ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
418 ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
419 EOF
420 done
421 fi
422 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
423 # Add dependencies that cannot be formulated as a simple suffix rule.
424 for lang in $ALL_LINGUAS; do
425 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
426 cat >> "$ac_file.tmp" <<EOF
427 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
428 ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
429 ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
430 EOF
431 done
432 fi
433 if test -n "$POMAKEFILEDEPS"; then
434 cat >> "$ac_file.tmp" <<EOF
435 Makefile: $POMAKEFILEDEPS
436 EOF
437 fi
438 mv "$ac_file.tmp" "$ac_file"
439 ])
440
441 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
442 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
443 [
444 XGETTEXT_EXTRA_OPTIONS=
445 ])
446
447 dnl Registers an option to be passed to xgettext in the po subdirectory.
448 AC_DEFUN([AM_XGETTEXT_OPTION],
449 [
450 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
451 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
452 ])
+0
-91
m4/progtest.m4 less more
0 # progtest.m4 serial 7 (gettext-0.18.2)
1 dnl Copyright (C) 1996-2003, 2005, 2008-2015 Free Software Foundation, Inc.
2 dnl This file is free software; the Free Software Foundation
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5 dnl
6 dnl This file can be used in projects which are not available under
7 dnl the GNU General Public License or the GNU Library General Public
8 dnl License but which still want to provide support for the GNU gettext
9 dnl functionality.
10 dnl Please note that the actual code of the GNU gettext library is covered
11 dnl by the GNU Library General Public License, and the rest of the GNU
12 dnl gettext package is covered by the GNU General Public License.
13 dnl They are *not* in the public domain.
14
15 dnl Authors:
16 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
17
18 AC_PREREQ([2.50])
19
20 # Search path for a program which passes the given test.
21
22 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
23 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
24 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
25 [
26 # Prepare PATH_SEPARATOR.
27 # The user is always right.
28 if test "${PATH_SEPARATOR+set}" != set; then
29 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
30 # contains only /bin. Note that ksh looks also at the FPATH variable,
31 # so we have to set that as well for the test.
32 PATH_SEPARATOR=:
33 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
34 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35 || PATH_SEPARATOR=';'
36 }
37 fi
38
39 # Find out how to test for executable files. Don't use a zero-byte file,
40 # as systems may use methods other than mode bits to determine executability.
41 cat >conf$$.file <<_ASEOF
42 #! /bin/sh
43 exit 0
44 _ASEOF
45 chmod +x conf$$.file
46 if test -x conf$$.file >/dev/null 2>&1; then
47 ac_executable_p="test -x"
48 else
49 ac_executable_p="test -f"
50 fi
51 rm -f conf$$.file
52
53 # Extract the first word of "$2", so it can be a program name with args.
54 set dummy $2; ac_word=[$]2
55 AC_MSG_CHECKING([for $ac_word])
56 AC_CACHE_VAL([ac_cv_path_$1],
57 [case "[$]$1" in
58 [[\\/]]* | ?:[[\\/]]*)
59 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
60 ;;
61 *)
62 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
63 for ac_dir in ifelse([$5], , $PATH, [$5]); do
64 IFS="$ac_save_IFS"
65 test -z "$ac_dir" && ac_dir=.
66 for ac_exec_ext in '' $ac_executable_extensions; do
67 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
68 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
69 if [$3]; then
70 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
71 break 2
72 fi
73 fi
74 done
75 done
76 IFS="$ac_save_IFS"
77 dnl If no 4th arg is given, leave the cache variable unset,
78 dnl so AC_PATH_PROGS will keep looking.
79 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
80 ])dnl
81 ;;
82 esac])dnl
83 $1="$ac_cv_path_$1"
84 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
85 AC_MSG_RESULT([$][$1])
86 else
87 AC_MSG_RESULT([no])
88 fi
89 AC_SUBST([$1])dnl
90 ])
8888 host_triplet = @host@
8989 subdir = man
9090 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
91 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
92 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
93 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
94 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
95 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
96 $(top_srcdir)/configure.ac
91 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
9792 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
9893 $(ACLOCAL_M4)
9994 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
155150 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs
156151 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
157152 ACLOCAL = @ACLOCAL@
153 ALLOCA = @ALLOCA@
158154 AMTAR = @AMTAR@
159155 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
160156 AUTOCONF = @AUTOCONF@
235231 XGETTEXT = @XGETTEXT@
236232 XGETTEXT_015 = @XGETTEXT_015@
237233 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
234 YACC = @YACC@
235 YFLAGS = @YFLAGS@
238236 abs_builddir = @abs_builddir@
239237 abs_srcdir = @abs_srcdir@
240238 abs_top_builddir = @abs_top_builddir@
258256 builddir = @builddir@
259257 datadir = @datadir@
260258 datarootdir = @datarootdir@
259 depend_audio = @depend_audio@
261260 docdir = @docdir@
262261 dvidir = @dvidir@
263262 exec_prefix = @exec_prefix@
270269 includedir = @includedir@
271270 infodir = @infodir@
272271 install_sh = @install_sh@
272 ldadd_audio = @ldadd_audio@
273273 libdir = @libdir@
274274 libexecdir = @libexecdir@
275275 localedir = @localedir@
303303 exit 1;; \
304304 esac; \
305305 done; \
306 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
306 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \
307307 $(am__cd) $(top_srcdir) && \
308 $(AUTOMAKE) --foreign man/Makefile
308 $(AUTOMAKE) --gnu man/Makefile
309309 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
310310 @case '$?' in \
311311 *config.status*) \
00 .\" Text automatically generated by txt2man
1 .TH daisy-player 1 "10 July 2017" "10.5.2" "Linux Reference Manual"
1 .TH daisy-player 1 "06 August 2017" "10.6" "Linux Reference Manual"
22 .SH NAME
33 \fBdaisy-player \fP- player for DAISY Digital Talking Books or Audio-CD's
44 \fB
8484 .TP
8585 .B
8686 enter
87 Start playing
87 Start playing
8888 .TP
8989 .B
9090 space,0
100100 .TP
101101 .B
102102 d
103 store current item to disk
103 store current item to disk (Take into account the selected level)
104104 .TP
105105 .B
106106 D,-
Binary diff not shown
2121 msgstr ""
2222 "Project-Id-Version: gettext 0.11.2\n"
2323 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
24 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
24 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2525 "PO-Revision-Date: 2013-01-29 15:06+0200\n"
2626 "Last-Translator: Willem van der Walt <wvdwalt@csir.co.za>>\n"
2727 "Language-Team: Willem van der Walt <wvdwalt@csir.co.za>\n"
3030 "Content-Type: text/plain; charset=UTF-8\n"
3131 "Content-Transfer-Encoding: 8bit\n"
3232
33 #: src/common.c:91
33 #: src/common.c:111
3434 msgid "eBook-speaker cannot handle this file."
3535 msgstr "eBook-speaker kan nie hierdie lêer hanteer nie."
3636
3737 # 33
38 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
38 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3939 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
4040 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
41 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
42 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
43 #: src/daisy-player.c:2072
41 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
42 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
43 #: src/daisy-player.c:2139
4444 #, c-format
4545 msgid "Cannot read %s"
4646 msgstr "Kan nie %s lees nie"
4747
48 #: src/common.c:688
48 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
49 #: src/daisy-player.c:1181
50 msgid "This book has no audio. Play this book with eBook-speaker"
51 msgstr "Hierdie boek het geen klank. Speel hierdie boek met eBook-speaker"
52
53 #: src/common.c:574
4954 msgid "Please try to play this book with daisy-player"
5055 msgstr "Probeer asseblief hierdie boek met daisy-player te speel"
5156
5257 # 33
53 #: src/common.c:1023
58 #: src/common.c:905
5459 #, c-format
5560 msgid "Cannot read type: %d"
5661 msgstr "Kan nie type %d lees nie"
5762
5863 # 15
59 #: src/common.c:1097
64 #: src/common.c:982
6065 msgid "Go to page number:"
6166 msgstr "Gaan na bladsynommer:"
6267
63 #: src/common.c:1115
68 #: src/common.c:1000
6469 msgid "Please wait..."
6570 msgstr "Wag asseblief..."
6671
67 #: src/common.c:1175
72 #: src/common.c:1060
6873 msgid "Select a soundcard:"
6974 msgstr "Kies die volgende klankkaart"
7075
7176 # 34
72 #: src/common.c:1177
77 #: src/common.c:1062
7378 msgid "Cannot read /proc/asound/cards"
7479 msgstr "Kan nie /proc/asound/cards lees nie"
75
76 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
77 msgid "This book has no audio. Play this book with eBook-speaker"
78 msgstr "Hierdie boek het geen klank. Speel hierdie boek met eBook-speaker"
7980
8081 #: src/daisy3.c:1068
8182 msgid "No items found. Try option \"-N\"."
109110 msgstr "totale lengte: %02d:%02d:%02d"
110111
111112 # 38
112 #: src/daisy-player.c:598
113 #: src/daisy-player.c:606
113114 msgid "These commands are available in this version:"
114115 msgstr "Hierdie bevele is beskikbaar in hierdie weergawe:"
115116
116117 # 41
117 #: src/daisy-player.c:602
118 #: src/daisy-player.c:610
118119 msgid "cursor down,2 - move cursor to the next item"
119120 msgstr "Af peiltjie,2 - skuif die loper na die volgende item"
120121
121122 # 44
122 #: src/daisy-player.c:604
123 #: src/daisy-player.c:612
123124 msgid "cursor up,8 - move cursor to the previous item"
124125 msgstr "op peiltjie,8 - skuif die loper na die vorige item"
125126
126127 # 43
127 #: src/daisy-player.c:606
128 #: src/daisy-player.c:614
128129 msgid "cursor right,6 - skip to next phrase"
129130 msgstr "regs peiltjie,6 - spring na die volgende frase toe"
130131
131132 # 42
132 #: src/daisy-player.c:608
133 #: src/daisy-player.c:616
133134 msgid "cursor left,4 - skip to previous phrase"
134135 msgstr "links peiltjie,4 - spring na die vorige frase toe"
135136
136137 # 57
137 #: src/daisy-player.c:610
138 #: src/daisy-player.c:618
138139 msgid "page-down,3 - view next page"
139140 msgstr "page-down,3 - wys die volgende bladsy"
140141
141142 # 58
142 #: src/daisy-player.c:612
143 #: src/daisy-player.c:620
143144 msgid "page-up,9 - view previous page"
144145 msgstr "page-up,9 - wys die vorige bladsy"
145146
146147 # 46
147 #: src/daisy-player.c:614
148 #: src/daisy-player.c:622
148149 msgid "enter - start playing"
149150 msgstr "enter - begin speel"
150151
151152 # 62
152 #: src/daisy-player.c:616
153 #: src/daisy-player.c:624
153154 msgid "space,0 - pause/resume playing"
154155 msgstr "spasie,0 - stop tydelik/hervat terugspeel"
155156
156157 # 50
157 #: src/daisy-player.c:618
158 #: src/daisy-player.c:626
158159 msgid "home,* - play on normal speed"
159160 msgstr "home,* - speel teen normale spoed"
160161
161162 # 23
162 #: src/daisy-player.c:620
163 #: src/daisy-player.c:628
163164 msgid "Press any key for next page..."
164165 msgstr "Druk enige sleutel vir die volgende bladsy..."
165166
166167 # 32
167 #: src/daisy-player.c:626
168 #: src/daisy-player.c:634
168169 msgid "/ - search for a label"
169170 msgstr "/ - soek vir 'n ettiket"
170171
171172 # 45
172 #: src/daisy-player.c:628
173 #: src/daisy-player.c:636
173174 msgid "d - store current item to disk"
174175 msgstr "d - stoor huidige item op skyf"
175176
176177 # 11
177 #: src/daisy-player.c:630
178 #: src/daisy-player.c:638
178179 msgid "D,- - decrease playing speed"
179180 msgstr "D,- - verlaag terugspeelspoed"
180181
181182 # 59
182 #: src/daisy-player.c:632
183 #: src/daisy-player.c:640
183184 msgid "e,. - quit daisy-player, place a bookmark and eject"
184185 msgstr "e,. - ophou daisy-player, plaas 'n boekmerk en verwyder"
185186
186187 # 47
187 #: src/daisy-player.c:634
188 #: src/daisy-player.c:642
188189 msgid ""
189190 "f - find the currently playing item and place the cursor there"
190191 msgstr ""
191192 "f - Kry die item wat nou speel en skuif die loper daarheen"
192193
193194 # 48
194 #: src/daisy-player.c:637
195 #: src/daisy-player.c:645
195196 msgid "g - go to time in this song (MM:SS)"
196197 msgstr "g - gaan na tyd"
197198
198 #: src/daisy-player.c:640
199 #: src/daisy-player.c:648
199200 msgid "g - go to time in this item (MM:SS)"
200201 msgstr "g - gaan na tyd"
201202
202203 # 48
203 #: src/daisy-player.c:643
204 #: src/daisy-player.c:651
204205 msgid "G - go to page number"
205206 msgstr "G - gaan na bladsynommer"
206207
207208 # 49
208 #: src/daisy-player.c:645
209 #: src/daisy-player.c:653
209210 msgid "h,? - give this help"
210211 msgstr "h,? - wys hierdie help-bladsy"
211212
212213 # 51
213 #: src/daisy-player.c:647
214 #: src/daisy-player.c:655
214215 msgid "j,5 - just play current item"
215216 msgstr "j,5 - speel net die huidige item"
216217
217218 # 52
218 #: src/daisy-player.c:649
219 #: src/daisy-player.c:657
219220 msgid "l - switch to next level"
220221 msgstr "l - verander na die volgende vlak"
221222
222223 # 16
223 #: src/daisy-player.c:651
224 #: src/daisy-player.c:659
224225 msgid "L - switch to previous level"
225226 msgstr "L - verander na die vorige vlak"
226227
227228 # 53
228 #: src/daisy-player.c:653
229 #: src/daisy-player.c:661
229230 msgid "n - search forwards"
230231 msgstr "n - soek vorentoe"
231232
232233 # 18
233 #: src/daisy-player.c:655
234 #: src/daisy-player.c:663
234235 msgid "N - search backwards"
235236 msgstr "N - soek agteruit"
236237
237238 # 55
238 #: src/daisy-player.c:657
239 #: src/daisy-player.c:665
239240 msgid "o - select next output sound device"
240241 msgstr "o - kies die volgende klankkaart"
241242
242243 # 56
243 #: src/daisy-player.c:659
244 #: src/daisy-player.c:667
244245 msgid "p - place a bookmark"
245246 msgstr "p - maak 'n boekmerk"
246247
247248 # 59
248 #: src/daisy-player.c:661
249 #: src/daisy-player.c:669
249250 msgid "q - quit daisy-player and place a bookmark"
250251 msgstr "q - stop daisy-player en maak 'n boekmerk"
251252
252253 # 60
253 #: src/daisy-player.c:663
254 #: src/daisy-player.c:671
254255 msgid "s - stop playing"
255256 msgstr "s - hou op speel"
256257
257258 # 29
258 #: src/daisy-player.c:665
259 #: src/daisy-player.c:673
259260 msgid "U,+ - increase playing speed"
260261 msgstr "U,+ - verhoog terugspeelspoed"
261262
262263 # 11
263 #: src/daisy-player.c:667
264 #: src/daisy-player.c:675
264265 msgid "v,1 - decrease playback volume"
265266 msgstr "v,1 - afspeel volume te verminder"
266267
267268 # 29
268 #: src/daisy-player.c:669
269 #: src/daisy-player.c:677
269270 msgid "V,7 - increase playback volume (beware of Clipping)"
270271 msgstr "V,7 - verhoog afspeel volume (pasop vir afsny)"
271272
272273 # 37
273 #: src/daisy-player.c:671
274 #: src/daisy-player.c:679
274275 msgid "Press any key to leave help..."
275276 msgstr "Druk enige sleutel om die help-skerm te verlaat..."
276277
277278 # 20
278 #: src/daisy-player.c:818
279 #: src/daisy-player.c:826
279280 msgid "Please wait... -------------------------"
280281 msgstr "Wag asseblief... -----------------------"
281282
282283 # 30
283 #: src/daisy-player.c:923
284 #: src/daisy-player.c:931
284285 msgid "What do you search?"
285286 msgstr "Wat soek u?"
286287
287 #: src/daisy-player.c:1024
288 #: src/daisy-player.c:1032
288289 msgid "Go to time (MM:SS):"
289290 msgstr "Gaan na tyd: (mm:ss):"
290291
291292 # 13
292 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
293 #: src/daisy-player.c:1916 src/daisy-player.c:1932
293 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
294 #: src/daisy-player.c:1991 src/daisy-player.c:2007
294295 #, c-format
295296 msgid "Daisy-player - Version %s %s"
296297 msgstr "Daisy-player - weergawe %s %s"
297298
298299 # 39
299 #: src/daisy-player.c:1583
300 #: src/daisy-player.c:1643
300301 #, c-format
301302 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
302303 msgstr ""
303304 "Gebruiksaanwysings: %s [directory met 'n Daisy-struktuur] | "
304305 "[Daisy_book_archive]"
305306
306 #: src/daisy-player.c:1585
307 #: src/daisy-player.c:1645
307308 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
308309 msgstr "[-c cdrom_toestel] [-d ALSA_klank_toestel]"
309310
310311 # 34
311 #: src/daisy-player.c:1598
312 #: src/daisy-player.c:1658
312313 msgid "Cannot read /proc/mounts."
313314 msgstr "Kan nie /proc/mounts lees nie."
314315
315316 # 13
316317 # 13
317318 # 6
318 #: src/daisy-player.c:1793
319 #: src/daisy-player.c:1872
319320 msgid "A parser to play Daisy CD's with Linux"
320321 msgstr "'n program om Daisy CD's in Linux te speel"
321322
322 #: src/daisy-player.c:1795
323 #: src/daisy-player.c:1874
323324 msgid "Scanning for a Daisy CD..."
324325 msgstr "Besig om vir 'n DAISY CD te soek..."
325326
326 #: src/daisy-player.c:1896 src/daisy-player.c:2031
327 #: src/daisy-player.c:1971 src/daisy-player.c:2098
327328 msgid "No DAISY-CD or Audio-cd found"
328329 msgstr "Geen DAISY CD of audio CD is gekry nie"
329330
330331 # 36
331 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
332 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
332333 msgid "No Daisy CD in drive."
333334 msgstr "Daar is nie 'n daisy-cd in die CD speler nie."
334335
335 #: src/daisy-player.c:2014
336 #: src/daisy-player.c:2081
336337 msgid "Found an Audio-CD."
337338 msgstr "Audio CD gekry."
338339
339 #: src/daisy-player.c:2016
340 #: src/daisy-player.c:2083
340341 msgid "Get titles from freedb.freedb.org..."
341342 msgstr "Besig om tietels vanaf freedb.freedb.org te kry..."
342343
343344 # 13
344 #: src/daisy-player.c:2145
345 #: src/daisy-player.c:2212
345346 #, c-format
346347 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
347348 msgstr "Daisy-player - weergawe %s - (C)2017 J. Lemmens"
348349
349350 # 22
350 #: src/daisy-player.c:2158
351 #: src/daisy-player.c:2225
351352 msgid "Press 'h' for help"
352353 msgstr "Druk 'h' vir hulp"
55 #, fuzzy
66 msgid ""
77 msgstr ""
8 "Project-Id-Version: daisy-player 10.5.2\n"
8 "Project-Id-Version: daisy-player 10.6\n"
99 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
10 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
10 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
1111 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1212 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313 "Language-Team: LANGUAGE <LL@li.org>\n"
1616 "Content-Type: text/plain; charset=CHARSET\n"
1717 "Content-Transfer-Encoding: 8bit\n"
1818
19 #: src/common.c:91
19 #: src/common.c:111
2020 msgid "eBook-speaker cannot handle this file."
2121 msgstr ""
2222
23 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
23 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
2424 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
2525 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
26 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
27 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
28 #: src/daisy-player.c:2072
26 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
27 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
28 #: src/daisy-player.c:2139
2929 #, c-format
3030 msgid "Cannot read %s"
3131 msgstr ""
3232
33 #: src/common.c:688
33 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
34 #: src/daisy-player.c:1181
35 msgid "This book has no audio. Play this book with eBook-speaker"
36 msgstr ""
37
38 #: src/common.c:574
3439 msgid "Please try to play this book with daisy-player"
3540 msgstr ""
3641
37 #: src/common.c:1023
42 #: src/common.c:905
3843 #, c-format
3944 msgid "Cannot read type: %d"
4045 msgstr ""
4146
42 #: src/common.c:1097
47 #: src/common.c:982
4348 msgid "Go to page number:"
4449 msgstr ""
4550
46 #: src/common.c:1115
51 #: src/common.c:1000
4752 msgid "Please wait..."
4853 msgstr ""
4954
50 #: src/common.c:1175
55 #: src/common.c:1060
5156 msgid "Select a soundcard:"
5257 msgstr ""
5358
54 #: src/common.c:1177
59 #: src/common.c:1062
5560 msgid "Cannot read /proc/asound/cards"
56 msgstr ""
57
58 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
59 msgid "This book has no audio. Play this book with eBook-speaker"
6061 msgstr ""
6162
6263 #: src/daisy3.c:1068
8687 msgid "total length: %02d:%02d:%02d"
8788 msgstr ""
8889
89 #: src/daisy-player.c:598
90 #: src/daisy-player.c:606
9091 msgid "These commands are available in this version:"
9192 msgstr ""
9293
93 #: src/daisy-player.c:602
94 #: src/daisy-player.c:610
9495 msgid "cursor down,2 - move cursor to the next item"
9596 msgstr ""
9697
97 #: src/daisy-player.c:604
98 #: src/daisy-player.c:612
9899 msgid "cursor up,8 - move cursor to the previous item"
99100 msgstr ""
100101
101 #: src/daisy-player.c:606
102 #: src/daisy-player.c:614
102103 msgid "cursor right,6 - skip to next phrase"
103104 msgstr ""
104105
105 #: src/daisy-player.c:608
106 #: src/daisy-player.c:616
106107 msgid "cursor left,4 - skip to previous phrase"
107108 msgstr ""
108109
109 #: src/daisy-player.c:610
110 #: src/daisy-player.c:618
110111 msgid "page-down,3 - view next page"
111112 msgstr ""
112113
113 #: src/daisy-player.c:612
114 #: src/daisy-player.c:620
114115 msgid "page-up,9 - view previous page"
115116 msgstr ""
116117
117 #: src/daisy-player.c:614
118 #: src/daisy-player.c:622
118119 msgid "enter - start playing"
119120 msgstr ""
120121
121 #: src/daisy-player.c:616
122 #: src/daisy-player.c:624
122123 msgid "space,0 - pause/resume playing"
123124 msgstr ""
124125
125 #: src/daisy-player.c:618
126 #: src/daisy-player.c:626
126127 msgid "home,* - play on normal speed"
127128 msgstr ""
128129
129 #: src/daisy-player.c:620
130 #: src/daisy-player.c:628
130131 msgid "Press any key for next page..."
131132 msgstr ""
132133
133 #: src/daisy-player.c:626
134 #: src/daisy-player.c:634
134135 msgid "/ - search for a label"
135136 msgstr ""
136137
137 #: src/daisy-player.c:628
138 #: src/daisy-player.c:636
138139 msgid "d - store current item to disk"
139140 msgstr ""
140141
141 #: src/daisy-player.c:630
142 #: src/daisy-player.c:638
142143 msgid "D,- - decrease playing speed"
143144 msgstr ""
144145
145 #: src/daisy-player.c:632
146 #: src/daisy-player.c:640
146147 msgid "e,. - quit daisy-player, place a bookmark and eject"
147148 msgstr ""
148149
149 #: src/daisy-player.c:634
150 #: src/daisy-player.c:642
150151 msgid ""
151152 "f - find the currently playing item and place the cursor there"
152153 msgstr ""
153154
154 #: src/daisy-player.c:637
155 #: src/daisy-player.c:645
155156 msgid "g - go to time in this song (MM:SS)"
156157 msgstr ""
157158
158 #: src/daisy-player.c:640
159 #: src/daisy-player.c:648
159160 msgid "g - go to time in this item (MM:SS)"
160161 msgstr ""
161162
162 #: src/daisy-player.c:643
163 #: src/daisy-player.c:651
163164 msgid "G - go to page number"
164165 msgstr ""
165166
166 #: src/daisy-player.c:645
167 #: src/daisy-player.c:653
167168 msgid "h,? - give this help"
168169 msgstr ""
169170
170 #: src/daisy-player.c:647
171 #: src/daisy-player.c:655
171172 msgid "j,5 - just play current item"
172173 msgstr ""
173174
174 #: src/daisy-player.c:649
175 #: src/daisy-player.c:657
175176 msgid "l - switch to next level"
176177 msgstr ""
177178
178 #: src/daisy-player.c:651
179 #: src/daisy-player.c:659
179180 msgid "L - switch to previous level"
180181 msgstr ""
181182
182 #: src/daisy-player.c:653
183 #: src/daisy-player.c:661
183184 msgid "n - search forwards"
184185 msgstr ""
185186
186 #: src/daisy-player.c:655
187 #: src/daisy-player.c:663
187188 msgid "N - search backwards"
188189 msgstr ""
189190
190 #: src/daisy-player.c:657
191 #: src/daisy-player.c:665
191192 msgid "o - select next output sound device"
192193 msgstr ""
193194
194 #: src/daisy-player.c:659
195 #: src/daisy-player.c:667
195196 msgid "p - place a bookmark"
196197 msgstr ""
197198
198 #: src/daisy-player.c:661
199 #: src/daisy-player.c:669
199200 msgid "q - quit daisy-player and place a bookmark"
200201 msgstr ""
201202
202 #: src/daisy-player.c:663
203 #: src/daisy-player.c:671
203204 msgid "s - stop playing"
204205 msgstr ""
205206
206 #: src/daisy-player.c:665
207 #: src/daisy-player.c:673
207208 msgid "U,+ - increase playing speed"
208209 msgstr ""
209210
210 #: src/daisy-player.c:667
211 #: src/daisy-player.c:675
211212 msgid "v,1 - decrease playback volume"
212213 msgstr ""
213214
214 #: src/daisy-player.c:669
215 #: src/daisy-player.c:677
215216 msgid "V,7 - increase playback volume (beware of Clipping)"
216217 msgstr ""
217218
218 #: src/daisy-player.c:671
219 #: src/daisy-player.c:679
219220 msgid "Press any key to leave help..."
220221 msgstr ""
221222
222 #: src/daisy-player.c:818
223 #: src/daisy-player.c:826
223224 msgid "Please wait... -------------------------"
224225 msgstr ""
225226
226 #: src/daisy-player.c:923
227 #: src/daisy-player.c:931
227228 msgid "What do you search?"
228229 msgstr ""
229230
230 #: src/daisy-player.c:1024
231 #: src/daisy-player.c:1032
231232 msgid "Go to time (MM:SS):"
232233 msgstr ""
233234
234 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
235 #: src/daisy-player.c:1916 src/daisy-player.c:1932
235 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
236 #: src/daisy-player.c:1991 src/daisy-player.c:2007
236237 #, c-format
237238 msgid "Daisy-player - Version %s %s"
238239 msgstr ""
239240
240 #: src/daisy-player.c:1583
241 #: src/daisy-player.c:1643
241242 #, c-format
242243 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
243244 msgstr ""
244245
245 #: src/daisy-player.c:1585
246 #: src/daisy-player.c:1645
246247 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
247248 msgstr ""
248249
249 #: src/daisy-player.c:1598
250 #: src/daisy-player.c:1658
250251 msgid "Cannot read /proc/mounts."
251252 msgstr ""
252253
253 #: src/daisy-player.c:1793
254 #: src/daisy-player.c:1872
254255 msgid "A parser to play Daisy CD's with Linux"
255256 msgstr ""
256257
257 #: src/daisy-player.c:1795
258 #: src/daisy-player.c:1874
258259 msgid "Scanning for a Daisy CD..."
259260 msgstr ""
260261
261 #: src/daisy-player.c:1896 src/daisy-player.c:2031
262 #: src/daisy-player.c:1971 src/daisy-player.c:2098
262263 msgid "No DAISY-CD or Audio-cd found"
263264 msgstr ""
264265
265 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
266 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
266267 msgid "No Daisy CD in drive."
267268 msgstr ""
268269
269 #: src/daisy-player.c:2014
270 #: src/daisy-player.c:2081
270271 msgid "Found an Audio-CD."
271272 msgstr ""
272273
273 #: src/daisy-player.c:2016
274 #: src/daisy-player.c:2083
274275 msgid "Get titles from freedb.freedb.org..."
275276 msgstr ""
276277
277 #: src/daisy-player.c:2145
278 #: src/daisy-player.c:2212
278279 #, c-format
279280 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
280281 msgstr ""
281282
282 #: src/daisy-player.c:2158
283 #: src/daisy-player.c:2225
283284 msgid "Press 'h' for help"
284285 msgstr ""
Binary diff not shown
2121 msgstr ""
2222 "Project-Id-Version: gettext 0.11.2\n"
2323 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
24 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
24 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2525 "PO-Revision-Date: 2013-01-29 15:06+0200\n"
2626 "Last-Translator: Klaus Knopper <knopper@knopper.net>\n"
2727 "Language-Team: Klaus Knopper <knopper@knopper.net>\n"
3030 "Content-Type: text/plain; charset=UTF-8\n"
3131 "Content-Transfer-Encoding: 8bit\n"
3232
33 #: src/common.c:91
33 #: src/common.c:111
3434 msgid "eBook-speaker cannot handle this file."
3535 msgstr "eBook-speaker kann diese Datei nicht verarbeiten."
3636
3737 # 33
38 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
38 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3939 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
4040 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
41 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
42 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
43 #: src/daisy-player.c:2072
41 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
42 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
43 #: src/daisy-player.c:2139
4444 #, c-format
4545 msgid "Cannot read %s"
4646 msgstr "Kann %s nicht lesen"
4747
48 #: src/common.c:688
48 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
49 #: src/daisy-player.c:1181
50 msgid "This book has no audio. Play this book with eBook-speaker"
51 msgstr "Dieses Buch hat kein Audio. Spiel dieses Buch mit eBook-speaker"
52
53 #: src/common.c:574
4954 msgid "Please try to play this book with daisy-player"
5055 msgstr "Bitte versuchen Sie, dieses Buch mit daisy-player zu spielen"
5156
5257 # 33
53 #: src/common.c:1023
58 #: src/common.c:905
5459 #, c-format
5560 msgid "Cannot read type: %d"
5661 msgstr "Kann type: %d nicht lesen"
5762
5863 # 15
59 #: src/common.c:1097
64 #: src/common.c:982
6065 msgid "Go to page number:"
6166 msgstr "Gehe zur Seitenzahl:"
6267
63 #: src/common.c:1115
68 #: src/common.c:1000
6469 msgid "Please wait..."
6570 msgstr "Warten Sie mal..."
6671
67 #: src/common.c:1175
72 #: src/common.c:1060
6873 msgid "Select a soundcard:"
6974 msgstr "Wählen Sie eine Soundkarte aus:"
7075
7176 # 34
72 #: src/common.c:1177
77 #: src/common.c:1062
7378 msgid "Cannot read /proc/asound/cards"
7479 msgstr "Kann /proc/mounts nicht lesen"
75
76 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
77 msgid "This book has no audio. Play this book with eBook-speaker"
78 msgstr "Dieses Buch hat kein Audio. Spiel dieses Buch mit eBook-speaker"
7980
8081 #: src/daisy3.c:1068
8182 msgid "No items found. Try option \"-N\"."
109110 msgstr "Gesamtlänge: %02d:%02d:%02d"
110111
111112 # 38
112 #: src/daisy-player.c:598
113 #: src/daisy-player.c:606
113114 msgid "These commands are available in this version:"
114115 msgstr "Folgende Befehle sind in dieser Version vorhanden:"
115116
116117 # 41
117 #: src/daisy-player.c:602
118 #: src/daisy-player.c:610
118119 msgid "cursor down,2 - move cursor to the next item"
119120 msgstr "Pfeil runter,2 - verschiebt den Cursor auf das nächste Element"
120121
121122 # 44
122 #: src/daisy-player.c:604
123 #: src/daisy-player.c:612
123124 msgid "cursor up,8 - move cursor to the previous item"
124125 msgstr "Pfeil hoch,8 - verschiebt den Cursor auf das vorhergehende Element"
125126
126127 # 43
127 #: src/daisy-player.c:606
128 #: src/daisy-player.c:614
128129 msgid "cursor right,6 - skip to next phrase"
129130 msgstr "Pfeil rechts,6 - springe zur nächsten Phrase"
130131
131132 # 42
132 #: src/daisy-player.c:608
133 #: src/daisy-player.c:616
133134 msgid "cursor left,4 - skip to previous phrase"
134135 msgstr "Pfeil links,4 - springe zur vorhergehenden Phrase"
135136
136137 # 57
137 #: src/daisy-player.c:610
138 #: src/daisy-player.c:618
138139 msgid "page-down,3 - view next page"
139140 msgstr "Seite runter,3 - zur nächsten Seite"
140141
141142 # 58
142 #: src/daisy-player.c:612
143 #: src/daisy-player.c:620
143144 msgid "page-up,9 - view previous page"
144145 msgstr "Seite hoch,9 - zur vorigen Seite"
145146
146147 # 46
147 #: src/daisy-player.c:614
148 #: src/daisy-player.c:622
148149 msgid "enter - start playing"
149150 msgstr "Eingabetaste - abspielen"
150151
151152 # 62
152 #: src/daisy-player.c:616
153 #: src/daisy-player.c:624
153154 msgid "space,0 - pause/resume playing"
154155 msgstr "Leertaste,0 - Pause-/Weiter"
155156
156157 # 50
157 #: src/daisy-player.c:618
158 #: src/daisy-player.c:626
158159 msgid "home,* - play on normal speed"
159160 msgstr "home,* - spiele mit normaler Geschwindigkeit"
160161
161162 # 23
162 #: src/daisy-player.c:620
163 #: src/daisy-player.c:628
163164 msgid "Press any key for next page..."
164165 msgstr "Taste drücken für nächste Seite..."
165166
166167 # 32
167 #: src/daisy-player.c:626
168 #: src/daisy-player.c:634
168169 msgid "/ - search for a label"
169170 msgstr "/ - suche nach einem Begriff"
170171
171172 # 45
172 #: src/daisy-player.c:628
173 #: src/daisy-player.c:636
173174 msgid "d - store current item to disk"
174175 msgstr "d - Aktuelles Element speichern"
175176
176177 # 11
177 #: src/daisy-player.c:630
178 #: src/daisy-player.c:638
178179 msgid "D,- - decrease playing speed"
179180 msgstr "D,- - verringere Abspielgeschwindigkeit"
180181
181182 # 59
182 #: src/daisy-player.c:632
183 #: src/daisy-player.c:640
183184 msgid "e,. - quit daisy-player, place a bookmark and eject"
184185 msgstr ""
185186 "e,. - Beenden Sie Daisy-Player, legen Sie ein Lesezeichen und "
186187 "Auswerfen"
187188
188189 # 47
189 #: src/daisy-player.c:634
190 #: src/daisy-player.c:642
190191 msgid ""
191192 "f - find the currently playing item and place the cursor there"
192193 msgstr ""
194195 "platzieren"
195196
196197 # 48
197 #: src/daisy-player.c:637
198 #: src/daisy-player.c:645
198199 msgid "g - go to time in this song (MM:SS)"
199200 msgstr "g - geh zur Zeit in diesem Lied (MM:SS)"
200201
201202 # 48
202 #: src/daisy-player.c:640
203 #: src/daisy-player.c:648
203204 msgid "g - go to time in this item (MM:SS)"
204205 msgstr "g - geh zur Zeit in diesem Artikel (MM:SS)"
205206
206207 # 48
207 #: src/daisy-player.c:643
208 #: src/daisy-player.c:651
208209 msgid "G - go to page number"
209210 msgstr "G - zur Seitenzahl gehen (falls vorhanden)"
210211
211212 # 49
212 #: src/daisy-player.c:645
213 #: src/daisy-player.c:653
213214 msgid "h,? - give this help"
214215 msgstr "h,? - diese Hilfe anzeigen"
215216
216217 # 51
217 #: src/daisy-player.c:647
218 #: src/daisy-player.c:655
218219 msgid "j,5 - just play current item"
219220 msgstr "j,5 - nur das aktuelle Element abspielen"
220221
221222 # 52
222 #: src/daisy-player.c:649
223 #: src/daisy-player.c:657
223224 msgid "l - switch to next level"
224225 msgstr "l - zum nächsten Level wechseln"
225226
226227 # 16
227 #: src/daisy-player.c:651
228 #: src/daisy-player.c:659
228229 msgid "L - switch to previous level"
229230 msgstr "L - zum vorigen Level wechseln"
230231
231232 # 53
232 #: src/daisy-player.c:653
233 #: src/daisy-player.c:661
233234 msgid "n - search forwards"
234235 msgstr "n - Suche vorwärts"
235236
236237 # 18
237 #: src/daisy-player.c:655
238 #: src/daisy-player.c:663
238239 msgid "N - search backwards"
239240 msgstr "N - Suche rückwärts"
240241
241242 # 55
242 #: src/daisy-player.c:657
243 #: src/daisy-player.c:665
243244 msgid "o - select next output sound device"
244245 msgstr "o - nächstes sound device für Ausgabe wählen"
245246
246247 # 56
247 #: src/daisy-player.c:659
248 #: src/daisy-player.c:667
248249 msgid "p - place a bookmark"
249250 msgstr "p - Lesezeichen setzen"
250251
251252 # 59
252 #: src/daisy-player.c:661
253 #: src/daisy-player.c:669
253254 msgid "q - quit daisy-player and place a bookmark"
254255 msgstr "q - Daisy-Player verlassen und Lesezeichen setzen"
255256
256257 # 60
257 #: src/daisy-player.c:663
258 #: src/daisy-player.c:671
258259 msgid "s - stop playing"
259260 msgstr "s - Abspielen stoppen"
260261
261262 # 29
262 #: src/daisy-player.c:665
263 #: src/daisy-player.c:673
263264 msgid "U,+ - increase playing speed"
264265 msgstr "U,+ - erhöhe Abspielgeschwindigkeit"
265266
266267 # 11
267 #: src/daisy-player.c:667
268 #: src/daisy-player.c:675
268269 msgid "v,1 - decrease playback volume"
269270 msgstr "v,1 - verringern Sie die Wiedergabelautstärke"
270271
271272 # 29
272 #: src/daisy-player.c:669
273 #: src/daisy-player.c:677
273274 msgid "V,7 - increase playback volume (beware of Clipping)"
274275 msgstr ""
275276 "V,7 - erhöhe die Wiedergabe-Lautstärke (Vorsicht beim Clipping)"
276277
277278 # 37
278 #: src/daisy-player.c:671
279 #: src/daisy-player.c:679
279280 msgid "Press any key to leave help..."
280281 msgstr "Taste drücken, um die Hilfe zu verlassen..."
281282
282283 # 20
283 #: src/daisy-player.c:818
284 #: src/daisy-player.c:826
284285 msgid "Please wait... -------------------------"
285286 msgstr "Bitte warten... ------------------------"
286287
287288 # 30
288 #: src/daisy-player.c:923
289 #: src/daisy-player.c:931
289290 msgid "What do you search?"
290291 msgstr "Suchen nach...?"
291292
292 #: src/daisy-player.c:1024
293 #: src/daisy-player.c:1032
293294 msgid "Go to time (MM:SS):"
294295 msgstr "Gehe zur Zeit (MM:SS):"
295296
296297 # 13
297 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
298 #: src/daisy-player.c:1916 src/daisy-player.c:1932
298 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
299 #: src/daisy-player.c:1991 src/daisy-player.c:2007
299300 #, c-format
300301 msgid "Daisy-player - Version %s %s"
301302 msgstr "Daisy-player - Version %s %s"
302303
303304 # 39
304 #: src/daisy-player.c:1583
305 #: src/daisy-player.c:1643
305306 #, c-format
306307 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
307308 msgstr ""
308309 "Aufruf: %s [Verzeichnis mit einer Daisy-Struktur] | [Daisy_book_archive]"
309310
310 #: src/daisy-player.c:1585
311 #: src/daisy-player.c:1645
311312 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
312313 msgstr "[-c cdrom_device] [-d ALSA Soundkarte]"
313314
314315 # 34
315 #: src/daisy-player.c:1598
316 #: src/daisy-player.c:1658
316317 msgid "Cannot read /proc/mounts."
317318 msgstr "Kann /proc/mounts nicht lesen."
318319
319320 # 6
320 #: src/daisy-player.c:1793
321 #: src/daisy-player.c:1872
321322 msgid "A parser to play Daisy CD's with Linux"
322323 msgstr "Ein Programm, um Daisy CDs unter Linux abzuspielen"
323324
324 #: src/daisy-player.c:1795
325 #: src/daisy-player.c:1874
325326 msgid "Scanning for a Daisy CD..."
326327 msgstr "Scannen für eine Daisy-CD"
327328
328 #: src/daisy-player.c:1896 src/daisy-player.c:2031
329 #: src/daisy-player.c:1971 src/daisy-player.c:2098
329330 msgid "No DAISY-CD or Audio-cd found"
330331 msgstr "Kein DAISY-CD oder Audio-CD gefunden"
331332
332333 # 36
333 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
334 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
334335 msgid "No Daisy CD in drive."
335336 msgstr "Keine Daisy-CD im Laufwerk."
336337
337 #: src/daisy-player.c:2014
338 #: src/daisy-player.c:2081
338339 msgid "Found an Audio-CD."
339340 msgstr "Eine Audio-CD gefunden."
340341
341 #: src/daisy-player.c:2016
342 #: src/daisy-player.c:2083
342343 msgid "Get titles from freedb.freedb.org..."
343344 msgstr "Holen Titel von freedb.freedb.org..."
344345
345346 # 13
346 #: src/daisy-player.c:2145
347 #: src/daisy-player.c:2212
347348 #, c-format
348349 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
349350 msgstr "Daisy-player - Version %s - (C)2017 J. Lemmens"
350351
351352 # 22
352 #: src/daisy-player.c:2158
353 #: src/daisy-player.c:2225
353354 msgid "Press 'h' for help"
354355 msgstr "'h' für Hilfe drücken"
Binary diff not shown
2929 #
3030 msgid ""
3131 msgstr ""
32 "Project-Id-Version: daisy-player 10.5.2\n"
32 "Project-Id-Version: daisy-player 10.6\n"
3333 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
34 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
35 "PO-Revision-Date: 2017-07-10 16:50+0200\n"
34 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
35 "PO-Revision-Date: 2017-08-06 19:57+0200\n"
3636 "Last-Translator: Automatically generated\n"
3737 "Language-Team: none\n"
3838 "Language: en@boldquot\n"
4141 "Content-Transfer-Encoding: 8bit\n"
4242 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
4343
44 #: src/common.c:91
44 #: src/common.c:111
4545 msgid "eBook-speaker cannot handle this file."
4646 msgstr "eBook-speaker cannot handle this file."
4747
48 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
48 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
4949 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
5050 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
51 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
52 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
53 #: src/daisy-player.c:2072
51 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
52 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
53 #: src/daisy-player.c:2139
5454 #, c-format
5555 msgid "Cannot read %s"
5656 msgstr "Cannot read %s"
5757
58 #: src/common.c:688
58 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
59 #: src/daisy-player.c:1181
60 msgid "This book has no audio. Play this book with eBook-speaker"
61 msgstr "This book has no audio. Play this book with eBook-speaker"
62
63 #: src/common.c:574
5964 msgid "Please try to play this book with daisy-player"
6065 msgstr "Please try to play this book with daisy-player"
6166
62 #: src/common.c:1023
67 #: src/common.c:905
6368 #, c-format
6469 msgid "Cannot read type: %d"
6570 msgstr "Cannot read type: %d"
6671
67 #: src/common.c:1097
72 #: src/common.c:982
6873 msgid "Go to page number:"
6974 msgstr "Go to page number:"
7075
71 #: src/common.c:1115
76 #: src/common.c:1000
7277 msgid "Please wait..."
7378 msgstr "Please wait..."
7479
75 #: src/common.c:1175
80 #: src/common.c:1060
7681 msgid "Select a soundcard:"
7782 msgstr "Select a soundcard:"
7883
79 #: src/common.c:1177
84 #: src/common.c:1062
8085 msgid "Cannot read /proc/asound/cards"
8186 msgstr "Cannot read /proc/asound/cards"
82
83 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
84 msgid "This book has no audio. Play this book with eBook-speaker"
85 msgstr "This book has no audio. Play this book with eBook-speaker"
8687
8788 #: src/daisy3.c:1068
8889 msgid "No items found. Try option \"-N\"."
111112 msgid "total length: %02d:%02d:%02d"
112113 msgstr "total length: %02d:%02d:%02d"
113114
114 #: src/daisy-player.c:598
115 #: src/daisy-player.c:606
115116 msgid "These commands are available in this version:"
116117 msgstr "These commands are available in this version:"
117118
118 #: src/daisy-player.c:602
119 #: src/daisy-player.c:610
119120 msgid "cursor down,2 - move cursor to the next item"
120121 msgstr "cursor down,2 - move cursor to the next item"
121122
122 #: src/daisy-player.c:604
123 #: src/daisy-player.c:612
123124 msgid "cursor up,8 - move cursor to the previous item"
124125 msgstr "cursor up,8 - move cursor to the previous item"
125126
126 #: src/daisy-player.c:606
127 #: src/daisy-player.c:614
127128 msgid "cursor right,6 - skip to next phrase"
128129 msgstr "cursor right,6 - skip to next phrase"
129130
130 #: src/daisy-player.c:608
131 #: src/daisy-player.c:616
131132 msgid "cursor left,4 - skip to previous phrase"
132133 msgstr "cursor left,4 - skip to previous phrase"
133134
134 #: src/daisy-player.c:610
135 #: src/daisy-player.c:618
135136 msgid "page-down,3 - view next page"
136137 msgstr "page-down,3 - view next page"
137138
138 #: src/daisy-player.c:612
139 #: src/daisy-player.c:620
139140 msgid "page-up,9 - view previous page"
140141 msgstr "page-up,9 - view previous page"
141142
142 #: src/daisy-player.c:614
143 #: src/daisy-player.c:622
143144 msgid "enter - start playing"
144145 msgstr "enter - start playing"
145146
146 #: src/daisy-player.c:616
147 #: src/daisy-player.c:624
147148 msgid "space,0 - pause/resume playing"
148149 msgstr "space,0 - pause/resume playing"
149150
150 #: src/daisy-player.c:618
151 #: src/daisy-player.c:626
151152 msgid "home,* - play on normal speed"
152153 msgstr "home,* - play on normal speed"
153154
154 #: src/daisy-player.c:620
155 #: src/daisy-player.c:628
155156 msgid "Press any key for next page..."
156157 msgstr "Press any key for next page..."
157158
158 #: src/daisy-player.c:626
159 #: src/daisy-player.c:634
159160 msgid "/ - search for a label"
160161 msgstr "/ - search for a label"
161162
162 #: src/daisy-player.c:628
163 #: src/daisy-player.c:636
163164 msgid "d - store current item to disk"
164165 msgstr "d - store current item to disk"
165166
166 #: src/daisy-player.c:630
167 #: src/daisy-player.c:638
167168 msgid "D,- - decrease playing speed"
168169 msgstr "D,- - decrease playing speed"
169170
170 #: src/daisy-player.c:632
171 #: src/daisy-player.c:640
171172 msgid "e,. - quit daisy-player, place a bookmark and eject"
172173 msgstr "e,. - quit daisy-player, place a bookmark and eject"
173174
174 #: src/daisy-player.c:634
175 #: src/daisy-player.c:642
175176 msgid ""
176177 "f - find the currently playing item and place the cursor there"
177178 msgstr ""
178179 "f - find the currently playing item and place the cursor there"
179180
180 #: src/daisy-player.c:637
181 #: src/daisy-player.c:645
181182 msgid "g - go to time in this song (MM:SS)"
182183 msgstr "g - go to time in this song (MM:SS)"
183184
184 #: src/daisy-player.c:640
185 #: src/daisy-player.c:648
185186 msgid "g - go to time in this item (MM:SS)"
186187 msgstr "g - go to time in this item (MM:SS)"
187188
188 #: src/daisy-player.c:643
189 #: src/daisy-player.c:651
189190 msgid "G - go to page number"
190191 msgstr "G - go to page number"
191192
192 #: src/daisy-player.c:645
193 #: src/daisy-player.c:653
193194 msgid "h,? - give this help"
194195 msgstr "h,? - give this help"
195196
196 #: src/daisy-player.c:647
197 #: src/daisy-player.c:655
197198 msgid "j,5 - just play current item"
198199 msgstr "j,5 - just play current item"
199200
200 #: src/daisy-player.c:649
201 #: src/daisy-player.c:657
201202 msgid "l - switch to next level"
202203 msgstr "l - switch to next level"
203204
204 #: src/daisy-player.c:651
205 #: src/daisy-player.c:659
205206 msgid "L - switch to previous level"
206207 msgstr "L - switch to previous level"
207208
208 #: src/daisy-player.c:653
209 #: src/daisy-player.c:661
209210 msgid "n - search forwards"
210211 msgstr "n - search forwards"
211212
212 #: src/daisy-player.c:655
213 #: src/daisy-player.c:663
213214 msgid "N - search backwards"
214215 msgstr "N - search backwards"
215216
216 #: src/daisy-player.c:657
217 #: src/daisy-player.c:665
217218 msgid "o - select next output sound device"
218219 msgstr "o - select next output sound device"
219220
220 #: src/daisy-player.c:659
221 #: src/daisy-player.c:667
221222 msgid "p - place a bookmark"
222223 msgstr "p - place a bookmark"
223224
224 #: src/daisy-player.c:661
225 #: src/daisy-player.c:669
225226 msgid "q - quit daisy-player and place a bookmark"
226227 msgstr "q - quit daisy-player and place a bookmark"
227228
228 #: src/daisy-player.c:663
229 #: src/daisy-player.c:671
229230 msgid "s - stop playing"
230231 msgstr "s - stop playing"
231232
232 #: src/daisy-player.c:665
233 #: src/daisy-player.c:673
233234 msgid "U,+ - increase playing speed"
234235 msgstr "U,+ - increase playing speed"
235236
236 #: src/daisy-player.c:667
237 #: src/daisy-player.c:675
237238 msgid "v,1 - decrease playback volume"
238239 msgstr "v,1 - decrease playback volume"
239240
240 #: src/daisy-player.c:669
241 #: src/daisy-player.c:677
241242 msgid "V,7 - increase playback volume (beware of Clipping)"
242243 msgstr "V,7 - increase playback volume (beware of Clipping)"
243244
244 #: src/daisy-player.c:671
245 #: src/daisy-player.c:679
245246 msgid "Press any key to leave help..."
246247 msgstr "Press any key to leave help..."
247248
248 #: src/daisy-player.c:818
249 #: src/daisy-player.c:826
249250 msgid "Please wait... -------------------------"
250251 msgstr "Please wait... -------------------------"
251252
252 #: src/daisy-player.c:923
253 #: src/daisy-player.c:931
253254 msgid "What do you search?"
254255 msgstr "What do you search?"
255256
256 #: src/daisy-player.c:1024
257 #: src/daisy-player.c:1032
257258 msgid "Go to time (MM:SS):"
258259 msgstr "Go to time (MM:SS):"
259260
260 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
261 #: src/daisy-player.c:1916 src/daisy-player.c:1932
261 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
262 #: src/daisy-player.c:1991 src/daisy-player.c:2007
262263 #, c-format
263264 msgid "Daisy-player - Version %s %s"
264265 msgstr "Daisy-player - Version %s %s"
265266
266 #: src/daisy-player.c:1583
267 #: src/daisy-player.c:1643
267268 #, c-format
268269 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
269270 msgstr "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
270271
271 #: src/daisy-player.c:1585
272 #: src/daisy-player.c:1645
272273 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
273274 msgstr "[-c cdrom_device] [-d ALSA_sound_device]"
274275
275 #: src/daisy-player.c:1598
276 #: src/daisy-player.c:1658
276277 msgid "Cannot read /proc/mounts."
277278 msgstr "Cannot read /proc/mounts."
278279
279 #: src/daisy-player.c:1793
280 #: src/daisy-player.c:1872
280281 msgid "A parser to play Daisy CD's with Linux"
281282 msgstr "A parser to play Daisy CD's with Linux"
282283
283 #: src/daisy-player.c:1795
284 #: src/daisy-player.c:1874
284285 msgid "Scanning for a Daisy CD..."
285286 msgstr "Scanning for a Daisy CD..."
286287
287 #: src/daisy-player.c:1896 src/daisy-player.c:2031
288 #: src/daisy-player.c:1971 src/daisy-player.c:2098
288289 msgid "No DAISY-CD or Audio-cd found"
289290 msgstr "No DAISY-CD or Audio-cd found"
290291
291 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
292 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
292293 msgid "No Daisy CD in drive."
293294 msgstr "No Daisy CD in drive."
294295
295 #: src/daisy-player.c:2014
296 #: src/daisy-player.c:2081
296297 msgid "Found an Audio-CD."
297298 msgstr "Found an Audio-CD."
298299
299 #: src/daisy-player.c:2016
300 #: src/daisy-player.c:2083
300301 msgid "Get titles from freedb.freedb.org..."
301302 msgstr "Get titles from freedb.freedb.org..."
302303
303 #: src/daisy-player.c:2145
304 #: src/daisy-player.c:2212
304305 #, c-format
305306 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
306307 msgstr "Daisy-player - Version %s - (C)2017 J. Lemmens"
307308
308 #: src/daisy-player.c:2158
309 #: src/daisy-player.c:2225
309310 msgid "Press 'h' for help"
310311 msgstr "Press ‘h’ for help"
Binary diff not shown
2626 #
2727 msgid ""
2828 msgstr ""
29 "Project-Id-Version: daisy-player 10.5.2\n"
29 "Project-Id-Version: daisy-player 10.6\n"
3030 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
31 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
32 "PO-Revision-Date: 2017-07-10 16:50+0200\n"
31 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
32 "PO-Revision-Date: 2017-08-06 19:57+0200\n"
3333 "Last-Translator: Automatically generated\n"
3434 "Language-Team: none\n"
3535 "Language: en@quot\n"
3838 "Content-Transfer-Encoding: 8bit\n"
3939 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
4040
41 #: src/common.c:91
41 #: src/common.c:111
4242 msgid "eBook-speaker cannot handle this file."
4343 msgstr "eBook-speaker cannot handle this file."
4444
45 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
45 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
4646 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
4747 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
48 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
49 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
50 #: src/daisy-player.c:2072
48 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
49 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
50 #: src/daisy-player.c:2139
5151 #, c-format
5252 msgid "Cannot read %s"
5353 msgstr "Cannot read %s"
5454
55 #: src/common.c:688
55 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
56 #: src/daisy-player.c:1181
57 msgid "This book has no audio. Play this book with eBook-speaker"
58 msgstr "This book has no audio. Play this book with eBook-speaker"
59
60 #: src/common.c:574
5661 msgid "Please try to play this book with daisy-player"
5762 msgstr "Please try to play this book with daisy-player"
5863
59 #: src/common.c:1023
64 #: src/common.c:905
6065 #, c-format
6166 msgid "Cannot read type: %d"
6267 msgstr "Cannot read type: %d"
6368
64 #: src/common.c:1097
69 #: src/common.c:982
6570 msgid "Go to page number:"
6671 msgstr "Go to page number:"
6772
68 #: src/common.c:1115
73 #: src/common.c:1000
6974 msgid "Please wait..."
7075 msgstr "Please wait..."
7176
72 #: src/common.c:1175
77 #: src/common.c:1060
7378 msgid "Select a soundcard:"
7479 msgstr "Select a soundcard:"
7580
76 #: src/common.c:1177
81 #: src/common.c:1062
7782 msgid "Cannot read /proc/asound/cards"
7883 msgstr "Cannot read /proc/asound/cards"
79
80 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
81 msgid "This book has no audio. Play this book with eBook-speaker"
82 msgstr "This book has no audio. Play this book with eBook-speaker"
8384
8485 #: src/daisy3.c:1068
8586 msgid "No items found. Try option \"-N\"."
108109 msgid "total length: %02d:%02d:%02d"
109110 msgstr "total length: %02d:%02d:%02d"
110111
111 #: src/daisy-player.c:598
112 #: src/daisy-player.c:606
112113 msgid "These commands are available in this version:"
113114 msgstr "These commands are available in this version:"
114115
115 #: src/daisy-player.c:602
116 #: src/daisy-player.c:610
116117 msgid "cursor down,2 - move cursor to the next item"
117118 msgstr "cursor down,2 - move cursor to the next item"
118119
119 #: src/daisy-player.c:604
120 #: src/daisy-player.c:612
120121 msgid "cursor up,8 - move cursor to the previous item"
121122 msgstr "cursor up,8 - move cursor to the previous item"
122123
123 #: src/daisy-player.c:606
124 #: src/daisy-player.c:614
124125 msgid "cursor right,6 - skip to next phrase"
125126 msgstr "cursor right,6 - skip to next phrase"
126127
127 #: src/daisy-player.c:608
128 #: src/daisy-player.c:616
128129 msgid "cursor left,4 - skip to previous phrase"
129130 msgstr "cursor left,4 - skip to previous phrase"
130131
131 #: src/daisy-player.c:610
132 #: src/daisy-player.c:618
132133 msgid "page-down,3 - view next page"
133134 msgstr "page-down,3 - view next page"
134135
135 #: src/daisy-player.c:612
136 #: src/daisy-player.c:620
136137 msgid "page-up,9 - view previous page"
137138 msgstr "page-up,9 - view previous page"
138139
139 #: src/daisy-player.c:614
140 #: src/daisy-player.c:622
140141 msgid "enter - start playing"
141142 msgstr "enter - start playing"
142143
143 #: src/daisy-player.c:616
144 #: src/daisy-player.c:624
144145 msgid "space,0 - pause/resume playing"
145146 msgstr "space,0 - pause/resume playing"
146147
147 #: src/daisy-player.c:618
148 #: src/daisy-player.c:626
148149 msgid "home,* - play on normal speed"
149150 msgstr "home,* - play on normal speed"
150151
151 #: src/daisy-player.c:620
152 #: src/daisy-player.c:628
152153 msgid "Press any key for next page..."
153154 msgstr "Press any key for next page..."
154155
155 #: src/daisy-player.c:626
156 #: src/daisy-player.c:634
156157 msgid "/ - search for a label"
157158 msgstr "/ - search for a label"
158159
159 #: src/daisy-player.c:628
160 #: src/daisy-player.c:636
160161 msgid "d - store current item to disk"
161162 msgstr "d - store current item to disk"
162163
163 #: src/daisy-player.c:630
164 #: src/daisy-player.c:638
164165 msgid "D,- - decrease playing speed"
165166 msgstr "D,- - decrease playing speed"
166167
167 #: src/daisy-player.c:632
168 #: src/daisy-player.c:640
168169 msgid "e,. - quit daisy-player, place a bookmark and eject"
169170 msgstr "e,. - quit daisy-player, place a bookmark and eject"
170171
171 #: src/daisy-player.c:634
172 #: src/daisy-player.c:642
172173 msgid ""
173174 "f - find the currently playing item and place the cursor there"
174175 msgstr ""
175176 "f - find the currently playing item and place the cursor there"
176177
177 #: src/daisy-player.c:637
178 #: src/daisy-player.c:645
178179 msgid "g - go to time in this song (MM:SS)"
179180 msgstr "g - go to time in this song (MM:SS)"
180181
181 #: src/daisy-player.c:640
182 #: src/daisy-player.c:648
182183 msgid "g - go to time in this item (MM:SS)"
183184 msgstr "g - go to time in this item (MM:SS)"
184185
185 #: src/daisy-player.c:643
186 #: src/daisy-player.c:651
186187 msgid "G - go to page number"
187188 msgstr "G - go to page number"
188189
189 #: src/daisy-player.c:645
190 #: src/daisy-player.c:653
190191 msgid "h,? - give this help"
191192 msgstr "h,? - give this help"
192193
193 #: src/daisy-player.c:647
194 #: src/daisy-player.c:655
194195 msgid "j,5 - just play current item"
195196 msgstr "j,5 - just play current item"
196197
197 #: src/daisy-player.c:649
198 #: src/daisy-player.c:657
198199 msgid "l - switch to next level"
199200 msgstr "l - switch to next level"
200201
201 #: src/daisy-player.c:651
202 #: src/daisy-player.c:659
202203 msgid "L - switch to previous level"
203204 msgstr "L - switch to previous level"
204205
205 #: src/daisy-player.c:653
206 #: src/daisy-player.c:661
206207 msgid "n - search forwards"
207208 msgstr "n - search forwards"
208209
209 #: src/daisy-player.c:655
210 #: src/daisy-player.c:663
210211 msgid "N - search backwards"
211212 msgstr "N - search backwards"
212213
213 #: src/daisy-player.c:657
214 #: src/daisy-player.c:665
214215 msgid "o - select next output sound device"
215216 msgstr "o - select next output sound device"
216217
217 #: src/daisy-player.c:659
218 #: src/daisy-player.c:667
218219 msgid "p - place a bookmark"
219220 msgstr "p - place a bookmark"
220221
221 #: src/daisy-player.c:661
222 #: src/daisy-player.c:669
222223 msgid "q - quit daisy-player and place a bookmark"
223224 msgstr "q - quit daisy-player and place a bookmark"
224225
225 #: src/daisy-player.c:663
226 #: src/daisy-player.c:671
226227 msgid "s - stop playing"
227228 msgstr "s - stop playing"
228229
229 #: src/daisy-player.c:665
230 #: src/daisy-player.c:673
230231 msgid "U,+ - increase playing speed"
231232 msgstr "U,+ - increase playing speed"
232233
233 #: src/daisy-player.c:667
234 #: src/daisy-player.c:675
234235 msgid "v,1 - decrease playback volume"
235236 msgstr "v,1 - decrease playback volume"
236237
237 #: src/daisy-player.c:669
238 #: src/daisy-player.c:677
238239 msgid "V,7 - increase playback volume (beware of Clipping)"
239240 msgstr "V,7 - increase playback volume (beware of Clipping)"
240241
241 #: src/daisy-player.c:671
242 #: src/daisy-player.c:679
242243 msgid "Press any key to leave help..."
243244 msgstr "Press any key to leave help..."
244245
245 #: src/daisy-player.c:818
246 #: src/daisy-player.c:826
246247 msgid "Please wait... -------------------------"
247248 msgstr "Please wait... -------------------------"
248249
249 #: src/daisy-player.c:923
250 #: src/daisy-player.c:931
250251 msgid "What do you search?"
251252 msgstr "What do you search?"
252253
253 #: src/daisy-player.c:1024
254 #: src/daisy-player.c:1032
254255 msgid "Go to time (MM:SS):"
255256 msgstr "Go to time (MM:SS):"
256257
257 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
258 #: src/daisy-player.c:1916 src/daisy-player.c:1932
258 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
259 #: src/daisy-player.c:1991 src/daisy-player.c:2007
259260 #, c-format
260261 msgid "Daisy-player - Version %s %s"
261262 msgstr "Daisy-player - Version %s %s"
262263
263 #: src/daisy-player.c:1583
264 #: src/daisy-player.c:1643
264265 #, c-format
265266 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
266267 msgstr "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
267268
268 #: src/daisy-player.c:1585
269 #: src/daisy-player.c:1645
269270 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
270271 msgstr "[-c cdrom_device] [-d ALSA_sound_device]"
271272
272 #: src/daisy-player.c:1598
273 #: src/daisy-player.c:1658
273274 msgid "Cannot read /proc/mounts."
274275 msgstr "Cannot read /proc/mounts."
275276
276 #: src/daisy-player.c:1793
277 #: src/daisy-player.c:1872
277278 msgid "A parser to play Daisy CD's with Linux"
278279 msgstr "A parser to play Daisy CD's with Linux"
279280
280 #: src/daisy-player.c:1795
281 #: src/daisy-player.c:1874
281282 msgid "Scanning for a Daisy CD..."
282283 msgstr "Scanning for a Daisy CD..."
283284
284 #: src/daisy-player.c:1896 src/daisy-player.c:2031
285 #: src/daisy-player.c:1971 src/daisy-player.c:2098
285286 msgid "No DAISY-CD or Audio-cd found"
286287 msgstr "No DAISY-CD or Audio-cd found"
287288
288 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
289 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
289290 msgid "No Daisy CD in drive."
290291 msgstr "No Daisy CD in drive."
291292
292 #: src/daisy-player.c:2014
293 #: src/daisy-player.c:2081
293294 msgid "Found an Audio-CD."
294295 msgstr "Found an Audio-CD."
295296
296 #: src/daisy-player.c:2016
297 #: src/daisy-player.c:2083
297298 msgid "Get titles from freedb.freedb.org..."
298299 msgstr "Get titles from freedb.freedb.org..."
299300
300 #: src/daisy-player.c:2145
301 #: src/daisy-player.c:2212
301302 #, c-format
302303 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
303304 msgstr "Daisy-player - Version %s - (C)2017 J. Lemmens"
304305
305 #: src/daisy-player.c:2158
306 #: src/daisy-player.c:2225
306307 msgid "Press 'h' for help"
307308 msgstr "Press ‘h’ for help"
Binary diff not shown
2121 msgstr ""
2222 "Project-Id-Version: gettext 0.11.2\n"
2323 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
24 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
24 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2525 "PO-Revision-Date: 2013-01-29 15:06+0200\n"
2626 "Last-Translator: Hanna Tulleken <hannatulleken@gmail.com>\n"
2727 "Language-Team: Hanna Tulleken <hannatulleken@gmail.com>\n"
3030 "Content-Type: text/plain; charset=UTF-8\n"
3131 "Content-Transfer-Encoding: 8bit\n"
3232
33 #: src/common.c:91
33 #: src/common.c:111
3434 msgid "eBook-speaker cannot handle this file."
3535 msgstr "eBook-speaker no puede manejar este archivo."
3636
37 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
37 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3838 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
3939 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
41 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
42 #: src/daisy-player.c:2072
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
41 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
42 #: src/daisy-player.c:2139
4343 #, c-format
4444 msgid "Cannot read %s"
4545 msgstr "No poder leer %s"
4646
47 #: src/common.c:688
47 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
48 #: src/daisy-player.c:1181
49 msgid "This book has no audio. Play this book with eBook-speaker"
50 msgstr "Este libro no tiene audio. Escuchar este libro con eBook-speaker"
51
52 #: src/common.c:574
4853 msgid "Please try to play this book with daisy-player"
4954 msgstr "Por favor, intenta reproducir este libro con daisy-player"
5055
51 #: src/common.c:1023
56 #: src/common.c:905
5257 #, c-format
5358 msgid "Cannot read type: %d"
5459 msgstr "No poder leer: %d"
5560
56 #: src/common.c:1097
61 #: src/common.c:982
5762 msgid "Go to page number:"
5863 msgstr "Ir a página número:"
5964
60 #: src/common.c:1115
65 #: src/common.c:1000
6166 msgid "Please wait..."
6267 msgstr "Por favor espera..."
6368
64 #: src/common.c:1175
69 #: src/common.c:1060
6570 msgid "Select a soundcard:"
6671 msgstr "seleccionar una ficha sonora:"
6772
68 #: src/common.c:1177
73 #: src/common.c:1062
6974 msgid "Cannot read /proc/asound/cards"
7075 msgstr "No poder leer /proc/sólido/fichas"
71
72 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
73 msgid "This book has no audio. Play this book with eBook-speaker"
74 msgstr "Este libro no tiene audio. Escuchar este libro con eBook-speaker"
7576
7677 #: src/daisy3.c:1068
7778 msgid "No items found. Try option \"-N\"."
100101 msgid "total length: %02d:%02d:%02d"
101102 msgstr "total longitud: %02d:%02d:%02d"
102103
103 #: src/daisy-player.c:598
104 #: src/daisy-player.c:606
104105 msgid "These commands are available in this version:"
105106 msgstr "Estas orden estan disponibles en esta versión:"
106107
107 #: src/daisy-player.c:602
108 #: src/daisy-player.c:610
108109 msgid "cursor down,2 - move cursor to the next item"
109110 msgstr "cursor abajo,2 - desplazar el cursor hasta el tema próximo"
110111
111 #: src/daisy-player.c:604
112 #: src/daisy-player.c:612
112113 msgid "cursor up,8 - move cursor to the previous item"
113114 msgstr "cursor arriba,8 - desplazar el cursor para el tema anterior"
114115
115 #: src/daisy-player.c:606
116 #: src/daisy-player.c:614
116117 msgid "cursor right,6 - skip to next phrase"
117118 msgstr "cursor derecho,6 - saltar para la frase próxima"
118119
119 #: src/daisy-player.c:608
120 #: src/daisy-player.c:616
120121 msgid "cursor left,4 - skip to previous phrase"
121122 msgstr "cursor izquierdo,4 - saltar para la frase anterior"
122123
123 #: src/daisy-player.c:610
124 #: src/daisy-player.c:618
124125 msgid "page-down,3 - view next page"
125126 msgstr "página-abaja,3 - ver página proxima"
126127
127 #: src/daisy-player.c:612
128 #: src/daisy-player.c:620
128129 msgid "page-up,9 - view previous page"
129130 msgstr "página-ariba,9 - ver página anterior"
130131
131 #: src/daisy-player.c:614
132 #: src/daisy-player.c:622
132133 msgid "enter - start playing"
133134 msgstr "entrar - empezar escuchar"
134135
135 #: src/daisy-player.c:616
136 #: src/daisy-player.c:624
136137 msgid "space,0 - pause/resume playing"
137138 msgstr "espacio,0 - pausa/reanudar escuchar"
138139
139 #: src/daisy-player.c:618
140 #: src/daisy-player.c:626
140141 msgid "home,* - play on normal speed"
141142 msgstr "inicio,* - escuchar a velocidad normal"
142143
143 #: src/daisy-player.c:620
144 #: src/daisy-player.c:628
144145 msgid "Press any key for next page..."
145146 msgstr "Hacer clic cada tecla por la página proxima..."
146147
147 #: src/daisy-player.c:626
148 #: src/daisy-player.c:634
148149 msgid "/ - search for a label"
149150 msgstr "/ - buscar por una etiqueta"
150151
151 #: src/daisy-player.c:628
152 #: src/daisy-player.c:636
152153 msgid "d - store current item to disk"
153154 msgstr "d - almacenar el tema actual en disk"
154155
155 #: src/daisy-player.c:630
156 #: src/daisy-player.c:638
156157 msgid "D,- - decrease playing speed"
157158 msgstr "D,- - disminuir velocidad de escuchar"
158159
159 #: src/daisy-player.c:632
160 #: src/daisy-player.c:640
160161 msgid "e,. - quit daisy-player, place a bookmark and eject"
161162 msgstr "e,. - dejar daisy-player, poner una marcapágina y echar"
162163
163 #: src/daisy-player.c:634
164 #: src/daisy-player.c:642
164165 msgid ""
165166 "f - find the currently playing item and place the cursor there"
166167 msgstr "f - encontrar el item escuchando y poner el cursor allí"
167168
168 #: src/daisy-player.c:637
169 #: src/daisy-player.c:645
169170 msgid "g - go to time in this song (MM:SS)"
170171 msgstr "g - ir a tiempo en este canción (MM:SS)"
171172
172 #: src/daisy-player.c:640
173 #: src/daisy-player.c:648
173174 msgid "g - go to time in this item (MM:SS)"
174175 msgstr "g - ir a tiempo en este tema (MM:SS)"
175176
176 #: src/daisy-player.c:643
177 #: src/daisy-player.c:651
177178 msgid "G - go to page number"
178179 msgstr "G - ir a página número (cuando hay)"
179180
180 #: src/daisy-player.c:645
181 #: src/daisy-player.c:653
181182 msgid "h,? - give this help"
182183 msgstr "h,? - dar esta ayuda"
183184
184 #: src/daisy-player.c:647
185 #: src/daisy-player.c:655
185186 msgid "j,5 - just play current item"
186187 msgstr "j,5 - solo escuchar el tema actual"
187188
188 #: src/daisy-player.c:649
189 #: src/daisy-player.c:657
189190 msgid "l - switch to next level"
190191 msgstr "l - gambiar al nivél proxima"
191192
192 #: src/daisy-player.c:651
193 #: src/daisy-player.c:659
193194 msgid "L - switch to previous level"
194195 msgstr "L - gambiar al nivél antes"
195196
196 #: src/daisy-player.c:653
197 #: src/daisy-player.c:661
197198 msgid "n - search forwards"
198199 msgstr "n - buscar adelante"
199200
200 #: src/daisy-player.c:655
201 #: src/daisy-player.c:663
201202 msgid "N - search backwards"
202203 msgstr "N - buscar atrás"
203204
204 #: src/daisy-player.c:657
205 #: src/daisy-player.c:665
205206 msgid "o - select next output sound device"
206207 msgstr "o - seleccionar la proxima salida de dispositivo sonido"
207208
208 #: src/daisy-player.c:659
209 #: src/daisy-player.c:667
209210 msgid "p - place a bookmark"
210211 msgstr "p - poner una marcapágina"
211212
212 #: src/daisy-player.c:661
213 #: src/daisy-player.c:669
213214 msgid "q - quit daisy-player and place a bookmark"
214215 msgstr "q - dejar daisy-player y poner una marcapágina"
215216
216 #: src/daisy-player.c:663
217 #: src/daisy-player.c:671
217218 msgid "s - stop playing"
218219 msgstr "s - parar escuchar"
219220
220 #: src/daisy-player.c:665
221 #: src/daisy-player.c:673
221222 msgid "U,+ - increase playing speed"
222223 msgstr "U,+ - acelerar velocidad de escuchar"
223224
224 #: src/daisy-player.c:667
225 #: src/daisy-player.c:675
225226 msgid "v,1 - decrease playback volume"
226227 msgstr "v,1 - disminuir play-back volumen"
227228
228 #: src/daisy-player.c:669
229 #: src/daisy-player.c:677
229230 msgid "V,7 - increase playback volume (beware of Clipping)"
230231 msgstr ""
231232 "V,7 - acelerar play-back volumen ( cuidar de Clipping )"
232233
233 #: src/daisy-player.c:671
234 #: src/daisy-player.c:679
234235 msgid "Press any key to leave help..."
235236 msgstr "Hacer click alguna tecla para salir ayudar..."
236237
237 #: src/daisy-player.c:818
238 #: src/daisy-player.c:826
238239 msgid "Please wait... -------------------------"
239240 msgstr "Por favor esperar... -------------------------"
240241
241 #: src/daisy-player.c:923
242 #: src/daisy-player.c:931
242243 msgid "What do you search?"
243244 msgstr "¿Qué buscas?"
244245
245 #: src/daisy-player.c:1024
246 #: src/daisy-player.c:1032
246247 msgid "Go to time (MM:SS):"
247248 msgstr "Ir a tiempo (MM:SS):"
248249
249 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
250 #: src/daisy-player.c:1916 src/daisy-player.c:1932
250 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
251 #: src/daisy-player.c:1991 src/daisy-player.c:2007
251252 #, c-format
252253 msgid "Daisy-player - Version %s %s"
253254 msgstr "Daisy-player - Versión %s %s"
254255
255 #: src/daisy-player.c:1583
256 #: src/daisy-player.c:1643
256257 #, c-format
257258 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
258259 msgstr "Uso: %s [manual_con_una_Daisy-estructura] | [Daisy_book_archive]"
259260
260 #: src/daisy-player.c:1585
261 #: src/daisy-player.c:1645
261262 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
262263 msgstr "[-c cdrom_dispositivo] [-d ALSA_sonido_dispositivo]"
263264
264 #: src/daisy-player.c:1598
265 #: src/daisy-player.c:1658
265266 msgid "Cannot read /proc/mounts."
266267 msgstr "No poder leer /proc/mounts."
267268
268 #: src/daisy-player.c:1793
269 #: src/daisy-player.c:1872
269270 msgid "A parser to play Daisy CD's with Linux"
270271 msgstr "Un analizador para escuchar Daisy CD con Linux"
271272
272 #: src/daisy-player.c:1795
273 #: src/daisy-player.c:1874
273274 msgid "Scanning for a Daisy CD..."
274275 msgstr "Explorar un Daisy CD..."
275276
276 #: src/daisy-player.c:1896 src/daisy-player.c:2031
277 #: src/daisy-player.c:1971 src/daisy-player.c:2098
277278 msgid "No DAISY-CD or Audio-cd found"
278279 msgstr "No encontrada DAISY-CD o Audio-cd"
279280
280 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
281 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
281282 msgid "No Daisy CD in drive."
282283 msgstr "No hay Daisy-CD en el unidad."
283284
284 #: src/daisy-player.c:2014
285 #: src/daisy-player.c:2081
285286 msgid "Found an Audio-CD."
286287 msgstr "Encontrada un Audio-CD."
287288
288 #: src/daisy-player.c:2016
289 #: src/daisy-player.c:2083
289290 msgid "Get titles from freedb.freedb.org..."
290291 msgstr "Coger títulos de freedb.freedb.org..."
291292
292 #: src/daisy-player.c:2145
293 #: src/daisy-player.c:2212
293294 #, c-format
294295 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
295296 msgstr "Daisy-player - Versión %s - (C)2017 J. Lemmens"
296297
297 #: src/daisy-player.c:2158
298 #: src/daisy-player.c:2225
298299 msgid "Press 'h' for help"
299300 msgstr "'h' para ayudar"
Binary diff not shown
2121 msgstr ""
2222 "Project-Id-Version: gettext 0.11.2\n"
2323 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
24 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
24 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2525 "PO-Revision-Date: 2013-01-29 15:06+0200\n"
2626 "Last-Translator: Oscar Gonzalez Gallegos <ventas@prediomix.com>\n"
2727 "Language-Team: Oscar Gonzalez Gallegos <ventas@prediomix.com>\n"
3030 "Content-Type: text/plain; charset=UTF-8\n"
3131 "Content-Transfer-Encoding: 8bit\n"
3232
33 #: src/common.c:91
33 #: src/common.c:111
3434 msgid "eBook-speaker cannot handle this file."
3535 msgstr "eBook-speaker no puede manejar este archivo."
3636
37 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
37 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3838 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
3939 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
41 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
42 #: src/daisy-player.c:2072
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
41 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
42 #: src/daisy-player.c:2139
4343 #, c-format
4444 msgid "Cannot read %s"
4545 msgstr "No se puede leer %s"
4646
47 #: src/common.c:688
47 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
48 #: src/daisy-player.c:1181
49 msgid "This book has no audio. Play this book with eBook-speaker"
50 msgstr "Este libro no contiene audio."
51
52 #: src/common.c:574
4853 msgid "Please try to play this book with daisy-player"
4954 msgstr "Por favor, intenta reproducir este libro con daisy-player"
5055
51 #: src/common.c:1023
56 #: src/common.c:905
5257 #, c-format
5358 msgid "Cannot read type: %d"
5459 msgstr "No poder leer: %d"
5560
56 #: src/common.c:1097
61 #: src/common.c:982
5762 msgid "Go to page number:"
5863 msgstr "Ir a página número:"
5964
60 #: src/common.c:1115
65 #: src/common.c:1000
6166 msgid "Please wait..."
6267 msgstr "Por favor espera..."
6368
64 #: src/common.c:1175
69 #: src/common.c:1060
6570 msgid "Select a soundcard:"
6671 msgstr "seleccionar una tarjeta de sonido:"
6772
68 #: src/common.c:1177
73 #: src/common.c:1062
6974 msgid "Cannot read /proc/asound/cards"
7075 msgstr "No se puede leer /proc/asound/cards"
71
72 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
73 msgid "This book has no audio. Play this book with eBook-speaker"
74 msgstr "Este libro no contiene audio."
7576
7677 #: src/daisy3.c:1068
7778 msgid "No items found. Try option \"-N\"."
100101 msgid "total length: %02d:%02d:%02d"
101102 msgstr "longitud total: %02d:%02d:%02d"
102103
103 #: src/daisy-player.c:598
104 #: src/daisy-player.c:606
104105 msgid "These commands are available in this version:"
105106 msgstr "Estas órdenes o comandos estan disponibles en esta versión:"
106107
107 #: src/daisy-player.c:602
108 #: src/daisy-player.c:610
108109 msgid "cursor down,2 - move cursor to the next item"
109110 msgstr "cursor abajo,2 - desplazar el cursor hasta el tema próximo"
110111
111 #: src/daisy-player.c:604
112 #: src/daisy-player.c:612
112113 msgid "cursor up,8 - move cursor to the previous item"
113114 msgstr "cursor arriba,8 - desplazar el cursor al tema anterior"
114115
115 #: src/daisy-player.c:606
116 #: src/daisy-player.c:614
116117 msgid "cursor right,6 - skip to next phrase"
117118 msgstr "cursor derecho,6 - saltar a la frase próxima"
118119
119 #: src/daisy-player.c:608
120 #: src/daisy-player.c:616
120121 msgid "cursor left,4 - skip to previous phrase"
121122 msgstr "cursor izquierdo,4 - saltar a la frase anterior"
122123
123 #: src/daisy-player.c:610
124 #: src/daisy-player.c:618
124125 msgid "page-down,3 - view next page"
125126 msgstr "página-abajo,3 - ver página próxima"
126127
127 #: src/daisy-player.c:612
128 #: src/daisy-player.c:620
128129 msgid "page-up,9 - view previous page"
129130 msgstr "página-ariba,9 - ver página anterior"
130131
131 #: src/daisy-player.c:614
132 #: src/daisy-player.c:622
132133 msgid "enter - start playing"
133134 msgstr "intro - empezar la lectura"
134135
135 #: src/daisy-player.c:616
136 #: src/daisy-player.c:624
136137 msgid "space,0 - pause/resume playing"
137138 msgstr "espacio,0 - pausa/reanudar la lectura"
138139
139 #: src/daisy-player.c:618
140 #: src/daisy-player.c:626
140141 msgid "home,* - play on normal speed"
141142 msgstr "inicio,* - escuchar a velocidad normal"
142143
143 #: src/daisy-player.c:620
144 #: src/daisy-player.c:628
144145 msgid "Press any key for next page..."
145146 msgstr "Presione cualquier tecla para ir a la proxima página ..."
146147
147 #: src/daisy-player.c:626
148 #: src/daisy-player.c:634
148149 msgid "/ - search for a label"
149150 msgstr "/ - buscar por una etiqueta"
150151
151 #: src/daisy-player.c:628
152 #: src/daisy-player.c:636
152153 msgid "d - store current item to disk"
153154 msgstr "d - almacenar el tema actual en el disco"
154155
155 #: src/daisy-player.c:630
156 #: src/daisy-player.c:638
156157 msgid "D,- - decrease playing speed"
157158 msgstr "D,- - disminuir velocidad de lectura"
158159
159 #: src/daisy-player.c:632
160 #: src/daisy-player.c:640
160161 msgid "e,. - quit daisy-player, place a bookmark and eject"
161162 msgstr "e,. - cerrar daisy-player, poner un marcapágina y salir"
162163
163 #: src/daisy-player.c:634
164 #: src/daisy-player.c:642
164165 msgid ""
165166 "f - find the currently playing item and place the cursor there"
166167 msgstr ""
167168 "f - encontrar el item que está siendo escuchado y poner el "
168169 "cursor allí"
169170
170 #: src/daisy-player.c:637
171 #: src/daisy-player.c:645
171172 msgid "g - go to time in this song (MM:SS)"
172173 msgstr "g - ir a tiempo específico en esta canción (MM:SS)"
173174
174 #: src/daisy-player.c:640
175 #: src/daisy-player.c:648
175176 msgid "g - go to time in this item (MM:SS)"
176177 msgstr "g - ir para tiempo específico en este tema (MM:SS)"
177178
178 #: src/daisy-player.c:643
179 #: src/daisy-player.c:651
179180 msgid "G - go to page number"
180181 msgstr "G - ir para página número (cuando hay)"
181182
182 #: src/daisy-player.c:645
183 #: src/daisy-player.c:653
183184 msgid "h,? - give this help"
184185 msgstr "h,? - dar esta ayuda"
185186
186 #: src/daisy-player.c:647
187 #: src/daisy-player.c:655
187188 msgid "j,5 - just play current item"
188189 msgstr "j,5 - solo escuchar el tema actual"
189190
190 #: src/daisy-player.c:649
191 #: src/daisy-player.c:657
191192 msgid "l - switch to next level"
192193 msgstr "l - cambiar al nivel proximo"
193194
194 #: src/daisy-player.c:651
195 #: src/daisy-player.c:659
195196 msgid "L - switch to previous level"
196197 msgstr "L - cambiar al nivel anterior"
197198
198 #: src/daisy-player.c:653
199 #: src/daisy-player.c:661
199200 msgid "n - search forwards"
200201 msgstr "n - buscar hacia adelante"
201202
202 #: src/daisy-player.c:655
203 #: src/daisy-player.c:663
203204 msgid "N - search backwards"
204205 msgstr "N - buscar hacia atrás"
205206
206 #: src/daisy-player.c:657
207 #: src/daisy-player.c:665
207208 msgid "o - select next output sound device"
208209 msgstr ""
209210 "o - seleccionar la proxima salida de dispositivo de sonido"
210211
211 #: src/daisy-player.c:659
212 #: src/daisy-player.c:667
212213 msgid "p - place a bookmark"
213214 msgstr "p - poner un marcapágina"
214215
215 #: src/daisy-player.c:661
216 #: src/daisy-player.c:669
216217 msgid "q - quit daisy-player and place a bookmark"
217218 msgstr "q - cerrar daisy-player y poner una marcapágina"
218219
219 #: src/daisy-player.c:663
220 #: src/daisy-player.c:671
220221 msgid "s - stop playing"
221222 msgstr "s - parar la lectura"
222223
223 #: src/daisy-player.c:665
224 #: src/daisy-player.c:673
224225 msgid "U,+ - increase playing speed"
225226 msgstr "U,+ - acelerar velocidad de lectura"
226227
227 #: src/daisy-player.c:667
228 #: src/daisy-player.c:675
228229 msgid "v,1 - decrease playback volume"
229230 msgstr "v,1 -reducir velocidad de lectura"
230231
231 #: src/daisy-player.c:669
232 #: src/daisy-player.c:677
232233 msgid "V,7 - increase playback volume (beware of Clipping)"
233234 msgstr ""
234235 "V,7 -aumentar volumen de lectura (puede haber distorsión )"
235236
236 #: src/daisy-player.c:671
237 #: src/daisy-player.c:679
237238 msgid "Press any key to leave help..."
238239 msgstr "Presione cualquier tecla para salir de la ayuda..."
239240
240 #: src/daisy-player.c:818
241 #: src/daisy-player.c:826
241242 msgid "Please wait... -------------------------"
242243 msgstr "Por favor esperar... -------------------------"
243244
244 #: src/daisy-player.c:923
245 #: src/daisy-player.c:931
245246 msgid "What do you search?"
246247 msgstr "¿Qué busca?"
247248
248 #: src/daisy-player.c:1024
249 #: src/daisy-player.c:1032
249250 msgid "Go to time (MM:SS):"
250251 msgstr "Ir a tiempo específico (MM:SS):"
251252
252 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
253 #: src/daisy-player.c:1916 src/daisy-player.c:1932
253 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
254 #: src/daisy-player.c:1991 src/daisy-player.c:2007
254255 #, c-format
255256 msgid "Daisy-player - Version %s %s"
256257 msgstr "Daisy-player - Versión %s %s"
257258
258 #: src/daisy-player.c:1583
259 #: src/daisy-player.c:1643
259260 #, c-format
260261 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
261262 msgstr "Uso: %s [manual_con_una_Daisy-estructura] | [Daisy_book_archive]"
262263
263 #: src/daisy-player.c:1585
264 #: src/daisy-player.c:1645
264265 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
265266 msgstr "[-c cdrom_dispositivo] [-d ALSA_sonido_dispositivo]"
266267
267 #: src/daisy-player.c:1598
268 #: src/daisy-player.c:1658
268269 msgid "Cannot read /proc/mounts."
269270 msgstr "No se puede leer /proc/mounts."
270271
271 #: src/daisy-player.c:1793
272 #: src/daisy-player.c:1872
272273 msgid "A parser to play Daisy CD's with Linux"
273274 msgstr "Un analizador para escuchar Daisy CD con Linux"
274275
275 #: src/daisy-player.c:1795
276 #: src/daisy-player.c:1874
276277 msgid "Scanning for a Daisy CD..."
277278 msgstr "Explorando por un Daisy CD..."
278279
279 #: src/daisy-player.c:1896 src/daisy-player.c:2031
280 #: src/daisy-player.c:1971 src/daisy-player.c:2098
280281 msgid "No DAISY-CD or Audio-cd found"
281282 msgstr "No se encontró DAISY CD o Audio-cd"
282283
283 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
284 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
284285 msgid "No Daisy CD in drive."
285286 msgstr "No hay Daisy CD en el unidad."
286287
287 #: src/daisy-player.c:2014
288 #: src/daisy-player.c:2081
288289 msgid "Found an Audio-CD."
289290 msgstr "Se ha encontrado un CD de audio."
290291
291 #: src/daisy-player.c:2016
292 #: src/daisy-player.c:2083
292293 msgid "Get titles from freedb.freedb.org..."
293294 msgstr "Coger títulos de freedb.freedb.org..."
294295
295 #: src/daisy-player.c:2145
296 #: src/daisy-player.c:2212
296297 #, c-format
297298 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
298299 msgstr "Daisy-player - Versión %s - (C)2017 J. Lemmens"
299300
300 #: src/daisy-player.c:2158
301 #: src/daisy-player.c:2225
301302 msgid "Press 'h' for help"
302303 msgstr "'h' para ayuda"
Binary diff not shown
2121 msgstr ""
2222 "Project-Id-Version: gettext 0.11.2\n"
2323 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
24 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
24 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2525 "PO-Revision-Date: 2017-06-19 17:45+0200\n"
2626 "Last-Translator: Jani Kinnunen <janikinnunen340@gmail.com>\n"
2727 "Language-Team: Jani Kinnunen <janikinnunen340@gmail.com>\n"
3030 "Content-Type: text/plain; charset=UTF-8\n"
3131 "Content-Transfer-Encoding: 8bit\n"
3232
33 #: src/common.c:91
33 #: src/common.c:111
3434 msgid "eBook-speaker cannot handle this file."
3535 msgstr "eBook-speaker ei pysty käsittelemään tätä tiedostoa."
3636
37 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
37 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3838 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
3939 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
41 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
42 #: src/daisy-player.c:2072
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
41 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
42 #: src/daisy-player.c:2139
4343 #, c-format
4444 msgid "Cannot read %s"
4545 msgstr "Ei voi lukea %s"
4646
47 #: src/common.c:688
47 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
48 #: src/daisy-player.c:1181
49 msgid "This book has no audio. Play this book with eBook-speaker"
50 msgstr "Tässä kirjassa ei ole ääntä. Käytä toistamiseen eBook-speakeria"
51
52 #: src/common.c:574
4853 msgid "Please try to play this book with daisy-player"
4954 msgstr "Yritä pelata tätä kirjaa daisy-player"
5055
51 #: src/common.c:1023
56 #: src/common.c:905
5257 #, c-format
5358 msgid "Cannot read type: %d"
5459 msgstr "Ei voida lukea tyyppiä: %d"
5560
56 #: src/common.c:1097
61 #: src/common.c:982
5762 msgid "Go to page number:"
5863 msgstr "Siirry sivunumeroon:"
5964
60 #: src/common.c:1115
65 #: src/common.c:1000
6166 msgid "Please wait..."
6267 msgstr "Odota..."
6368
64 #: src/common.c:1175
69 #: src/common.c:1060
6570 msgid "Select a soundcard:"
6671 msgstr "Valitse äänikortti:"
6772
68 #: src/common.c:1177
73 #: src/common.c:1062
6974 msgid "Cannot read /proc/asound/cards"
7075 msgstr "Ei voi lukea /proc/asound/cards"
71
72 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
73 msgid "This book has no audio. Play this book with eBook-speaker"
74 msgstr "Tässä kirjassa ei ole ääntä. Käytä toistamiseen eBook-speakeria"
7576
7677 #: src/daisy3.c:1068
7778 msgid "No items found. Try option \"-N\"."
100101 msgid "total length: %02d:%02d:%02d"
101102 msgstr "kokonaiskesto: %02d:%02d:%02d"
102103
103 #: src/daisy-player.c:598
104 #: src/daisy-player.c:606
104105 msgid "These commands are available in this version:"
105106 msgstr "Seuraavat komennot ovat käytettävissä tässä versiossa:"
106107
107 #: src/daisy-player.c:602
108 #: src/daisy-player.c:610
108109 msgid "cursor down,2 - move cursor to the next item"
109110 msgstr "nuoli alas,2 - siirrä kohdistin seuraavaan kohteeseen"
110111
111 #: src/daisy-player.c:604
112 #: src/daisy-player.c:612
112113 msgid "cursor up,8 - move cursor to the previous item"
113114 msgstr "nuoli ylös,8 - siirrä kohdistin edelliseen kohteeseen"
114115
115 #: src/daisy-player.c:606
116 #: src/daisy-player.c:614
116117 msgid "cursor right,6 - skip to next phrase"
117118 msgstr "nuoli oikealle,6 - siirry seuraavaan virkkeeseen"
118119
119 #: src/daisy-player.c:608
120 #: src/daisy-player.c:616
120121 msgid "cursor left,4 - skip to previous phrase"
121122 msgstr "nuoli vasemmalle,4 - siirry edelliseen virkkeeseen"
122123
123 #: src/daisy-player.c:610
124 #: src/daisy-player.c:618
124125 msgid "page-down,3 - view next page"
125126 msgstr "page down,3 - näytä seuraava sivu"
126127
127 #: src/daisy-player.c:612
128 #: src/daisy-player.c:620
128129 msgid "page-up,9 - view previous page"
129130 msgstr "page up,9 - näytä edellinen sivu"
130131
131 #: src/daisy-player.c:614
132 #: src/daisy-player.c:622
132133 msgid "enter - start playing"
133134 msgstr "enter - aloita toisto"
134135
135 #: src/daisy-player.c:616
136 #: src/daisy-player.c:624
136137 msgid "space,0 - pause/resume playing"
137138 msgstr "välilyönti,0 - pysäytä/jatka toistoa"
138139
139 #: src/daisy-player.c:618
140 #: src/daisy-player.c:626
140141 msgid "home,* - play on normal speed"
141142 msgstr "home,* - toista normaalilla nopeudella"
142143
143 #: src/daisy-player.c:620
144 #: src/daisy-player.c:628
144145 msgid "Press any key for next page..."
145146 msgstr "Siirry seuraavalle sivulle painamalla jotain näppäintä..."
146147
147 #: src/daisy-player.c:626
148 #: src/daisy-player.c:634
148149 msgid "/ - search for a label"
149150 msgstr "/ - etsi nimekettä"
150151
151 #: src/daisy-player.c:628
152 #: src/daisy-player.c:636
152153 msgid "d - store current item to disk"
153154 msgstr "d - tallenna nykyinen kohde levylle"
154155
155 #: src/daisy-player.c:630
156 #: src/daisy-player.c:638
156157 msgid "D,- - decrease playing speed"
157158 msgstr "D,- - vähennä toistonopeutta"
158159
159 #: src/daisy-player.c:632
160 #: src/daisy-player.c:640
160161 msgid "e,. - quit daisy-player, place a bookmark and eject"
161162 msgstr ""
162163 "e,. - poistu daisy-playerista, lisää kirjanmerkki ja poista levy asemasta"
163164
164 #: src/daisy-player.c:634
165 #: src/daisy-player.c:642
165166 msgid ""
166167 "f - find the currently playing item and place the cursor there"
167168 msgstr ""
168169 "f - etsi tällä hetkellä toistettava kohde ja siirrä kohdistin sen "
169170 "kohdalle"
170171
171 #: src/daisy-player.c:637
172 #: src/daisy-player.c:645
172173 msgid "g - go to time in this song (MM:SS)"
173174 msgstr "g - siirry määrättyyn aikaan tässä kappaleessa (MM:SS)"
174175
175 #: src/daisy-player.c:640
176 #: src/daisy-player.c:648
176177 msgid "g - go to time in this item (MM:SS)"
177178 msgstr "g - siirry määrättyyn aikaan tässä kohteessa (MM:SS)"
178179
179 #: src/daisy-player.c:643
180 #: src/daisy-player.c:651
180181 msgid "G - go to page number"
181182 msgstr "G - siirry sivulle"
182183
183 #: src/daisy-player.c:645
184 #: src/daisy-player.c:653
184185 msgid "h,? - give this help"
185186 msgstr "h,? - näytä tämä ohje"
186187
187 #: src/daisy-player.c:647
188 #: src/daisy-player.c:655
188189 msgid "j,5 - just play current item"
189190 msgstr "j,5 - toista vain nykyinen kohde"
190191
191 #: src/daisy-player.c:649
192 #: src/daisy-player.c:657
192193 msgid "l - switch to next level"
193194 msgstr "l - vaihda seuraavalle tasolle"
194195
195 #: src/daisy-player.c:651
196 #: src/daisy-player.c:659
196197 msgid "L - switch to previous level"
197198 msgstr "L - vaihda edelliselle tasolle"
198199
199 #: src/daisy-player.c:653
200 #: src/daisy-player.c:661
200201 msgid "n - search forwards"
201202 msgstr "n - etsi eteenpäin"
202203
203 #: src/daisy-player.c:655
204 #: src/daisy-player.c:663
204205 msgid "N - search backwards"
205206 msgstr "N - etsi taaksepäin"
206207
207 #: src/daisy-player.c:657
208 #: src/daisy-player.c:665
208209 msgid "o - select next output sound device"
209210 msgstr "o - valitse seuraava äänilaite kappaleen toistamiseen"
210211
211 #: src/daisy-player.c:659
212 #: src/daisy-player.c:667
212213 msgid "p - place a bookmark"
213214 msgstr "p - lisää kirjanmerkki"
214215
215 #: src/daisy-player.c:661
216 #: src/daisy-player.c:669
216217 msgid "q - quit daisy-player and place a bookmark"
217218 msgstr "q - poistu daisy-playerista ja lisää kirjanmerkki"
218219
219 #: src/daisy-player.c:663
220 #: src/daisy-player.c:671
220221 msgid "s - stop playing"
221222 msgstr "s - keskeytä toisto"
222223
223 #: src/daisy-player.c:665
224 #: src/daisy-player.c:673
224225 msgid "U,+ - increase playing speed"
225226 msgstr "U,+ - lisää toistonopeutta"
226227
227 #: src/daisy-player.c:667
228 #: src/daisy-player.c:675
228229 msgid "v,1 - decrease playback volume"
229230 msgstr "v,1 - vähennä toiston äänenvoimakkuutta"
230231
231 #: src/daisy-player.c:669
232 #: src/daisy-player.c:677
232233 msgid "V,7 - increase playback volume (beware of Clipping)"
233234 msgstr "V,7 - lisää toiston äänenvoimakkuutta (varo leikkautumista)"
234235
235 #: src/daisy-player.c:671
236 #: src/daisy-player.c:679
236237 msgid "Press any key to leave help..."
237238 msgstr "Poistu ohjeesta painamalla jotain näppäintä..."
238239
239 #: src/daisy-player.c:818
240 #: src/daisy-player.c:826
240241 msgid "Please wait... -------------------------"
241242 msgstr "Odota... -------------------------"
242243
243 #: src/daisy-player.c:923
244 #: src/daisy-player.c:931
244245 msgid "What do you search?"
245246 msgstr "Mitä haluat etsiä?"
246247
247 #: src/daisy-player.c:1024
248 #: src/daisy-player.c:1032
248249 msgid "Go to time (MM:SS):"
249250 msgstr "Siirry aikaan (MM:SS):"
250251
251 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
252 #: src/daisy-player.c:1916 src/daisy-player.c:1932
252 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
253 #: src/daisy-player.c:1991 src/daisy-player.c:2007
253254 #, c-format
254255 msgid "Daisy-player - Version %s %s"
255256 msgstr "Daisy-player - versio %s %s"
256257
257 #: src/daisy-player.c:1583
258 #: src/daisy-player.c:1643
258259 #, c-format
259260 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
260261 msgstr "Käyttö: %s [Daisy-kirjan_hakemisto] | [Daisy-kirjojen_arkisto]"
261262
262 #: src/daisy-player.c:1585
263 #: src/daisy-player.c:1645
263264 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
264265 msgstr "[-c cdrom-laite] [-d ALSA-äänilaite]"
265266
266 #: src/daisy-player.c:1598
267 #: src/daisy-player.c:1658
267268 msgid "Cannot read /proc/mounts."
268269 msgstr "Liitoskohtaa /proc/mounts ei voi lukea."
269270
270 #: src/daisy-player.c:1793
271 #: src/daisy-player.c:1872
271272 msgid "A parser to play Daisy CD's with Linux"
272273 msgstr "Jäsennin Daisy-CD-levyjen toistamiseen Linuxissa"
273274
274 #: src/daisy-player.c:1795
275 #: src/daisy-player.c:1874
275276 msgid "Scanning for a Daisy CD..."
276277 msgstr "Etsitään Daisy-CD:tä..."
277278
278 #: src/daisy-player.c:1896 src/daisy-player.c:2031
279 #: src/daisy-player.c:1971 src/daisy-player.c:2098
279280 msgid "No DAISY-CD or Audio-cd found"
280281 msgstr "DAISY- tai ääni-CD:tä ei löytynyt"
281282
282 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
283 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
283284 msgid "No Daisy CD in drive."
284285 msgstr "Asemassa ei ole Daisy-CD:tä."
285286
286 #: src/daisy-player.c:2014
287 #: src/daisy-player.c:2081
287288 msgid "Found an Audio-CD."
288289 msgstr "Löytyi ääni-CD."
289290
290 #: src/daisy-player.c:2016
291 #: src/daisy-player.c:2083
291292 msgid "Get titles from freedb.freedb.org..."
292293 msgstr "Hae kappaleiden nimet freedb.freedb.org:ista..."
293294
294 #: src/daisy-player.c:2145
295 #: src/daisy-player.c:2212
295296 #, c-format
296297 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
297298 msgstr "Daisy-player - versio %s - (C)2017 J. Lemmens"
298299
299 #: src/daisy-player.c:2158
300 #: src/daisy-player.c:2225
300301 msgid "Press 'h' for help"
301302 msgstr "Saat ohjeita painamalla 'h'"
Binary diff not shown
2121 msgstr ""
2222 "Project-Id-Version: gettext 0.11.2\n"
2323 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
24 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
24 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2525 "PO-Revision-Date: 2017-07-21 15:06+0200\n"
2626 "Last-Translator: Osvaldo La Rosa <yellowpenguin@telenet.be>\n"
2727 "Language-Team: Osvaldo La Rosa <yellowpenguin@telenet.be>\n"
3030 "Content-Type: text/plain; charset=UTF-8\n"
3131 "Content-Transfer-Encoding: 8bit\n"
3232
33 #: src/common.c:91
33 #: src/common.c:111
3434 msgid "eBook-speaker cannot handle this file."
3535 msgstr "L'eBook-Speaker ne peut pas gérer ce fichier."
3636
37 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
37 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3838 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
3939 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
41 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
42 #: src/daisy-player.c:2072
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
41 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
42 #: src/daisy-player.c:2139
4343 #, c-format
4444 msgid "Cannot read %s"
4545 msgstr "Je ne sais pas lire ceci %s"
4646
47 #: src/common.c:688
47 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
48 #: src/daisy-player.c:1181
49 msgid "This book has no audio. Play this book with eBook-speaker"
50 msgstr "Ce livre ne contient pas de piste audio. Lire avec eBook-speaker"
51
52 #: src/common.c:574
4853 msgid "Please try to play this book with daisy-player"
4954 msgstr "Veuillez essayer de lire ce livre avec daisy-player"
5055
51 #: src/common.c:1023
56 #: src/common.c:905
5257 #, c-format
5358 msgid "Cannot read type: %d"
5459 msgstr "Je ne sais pas lire le type: %d"
5560
56 #: src/common.c:1097
61 #: src/common.c:982
5762 msgid "Go to page number:"
5863 msgstr "Aller à la page numéro:"
5964
60 #: src/common.c:1115
65 #: src/common.c:1000
6166 msgid "Please wait..."
6267 msgstr "S'il vous plaît, attendez..."
6368
64 #: src/common.c:1175
69 #: src/common.c:1060
6570 msgid "Select a soundcard:"
6671 msgstr "Sélectionnez une carte son:"
6772
68 #: src/common.c:1177
73 #: src/common.c:1062
6974 msgid "Cannot read /proc/asound/cards"
7075 msgstr "Je ne sais pas lire /proc/asound/cards"
71
72 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
73 msgid "This book has no audio. Play this book with eBook-speaker"
74 msgstr "Ce livre ne contient pas de piste audio. Lire avec eBook-speaker"
7576
7677 #: src/daisy3.c:1068
7778 msgid "No items found. Try option \"-N\"."
100101 msgid "total length: %02d:%02d:%02d"
101102 msgstr "durée totale: %02d:%02d:%02d"
102103
103 #: src/daisy-player.c:598
104 #: src/daisy-player.c:606
104105 msgid "These commands are available in this version:"
105106 msgstr "Ces commandes sont disponibles dans cette version:"
106107
107 #: src/daisy-player.c:602
108 #: src/daisy-player.c:610
108109 msgid "cursor down,2 - move cursor to the next item"
109110 msgstr "curseur bas,2 - déplacer le curseur vers l'élément suivant"
110111
111 #: src/daisy-player.c:604
112 #: src/daisy-player.c:612
112113 msgid "cursor up,8 - move cursor to the previous item"
113114 msgstr "curseur haut,8 - déplacer le curseur vers l'élément précédent"
114115
115 #: src/daisy-player.c:606
116 #: src/daisy-player.c:614
116117 msgid "cursor right,6 - skip to next phrase"
117118 msgstr "curseur droit,6 - aller à la phrase suivante"
118119
119 #: src/daisy-player.c:608
120 #: src/daisy-player.c:616
120121 msgid "cursor left,4 - skip to previous phrase"
121122 msgstr "curseur gauche,4 - revenir à la phrase précédente"
122123
123 #: src/daisy-player.c:610
124 #: src/daisy-player.c:618
124125 msgid "page-down,3 - view next page"
125126 msgstr "page bas,3 - afficher la page suivante"
126127
127 #: src/daisy-player.c:612
128 #: src/daisy-player.c:620
128129 msgid "page-up,9 - view previous page"
129130 msgstr "page haut,9 - afficher la page précédente"
130131
131 #: src/daisy-player.c:614
132 #: src/daisy-player.c:622
132133 msgid "enter - start playing"
133134 msgstr "enter - lancer l'écoute"
134135
135 #: src/daisy-player.c:616
136 #: src/daisy-player.c:624
136137 msgid "space,0 - pause/resume playing"
137138 msgstr "espace,0 - pause/poursuivre l'écoute"
138139
139 #: src/daisy-player.c:618
140 #: src/daisy-player.c:626
140141 msgid "home,* - play on normal speed"
141142 msgstr "home,* - écouter à la vitesse normale"
142143
143 #: src/daisy-player.c:620
144 #: src/daisy-player.c:628
144145 msgid "Press any key for next page..."
145146 msgstr "Appuyez sur une touche pour aller à la page suivante..."
146147
147 #: src/daisy-player.c:626
148 #: src/daisy-player.c:634
148149 msgid "/ - search for a label"
149150 msgstr "/ - chercher un label"
150151
151 #: src/daisy-player.c:628
152 #: src/daisy-player.c:636
152153 msgid "d - store current item to disk"
153154 msgstr "d - sauvegarder l'élément courant sur disque dur"
154155
155 #: src/daisy-player.c:630
156 #: src/daisy-player.c:638
156157 msgid "D,- - decrease playing speed"
157158 msgstr "D,- - réduire la vitesse d'écoute"
158159
159 #: src/daisy-player.c:632
160 #: src/daisy-player.c:640
160161 msgid "e,. - quit daisy-player, place a bookmark and eject"
161162 msgstr "e,. - quitter daisy-player, placer un marqueur et éjecter"
162163
163 #: src/daisy-player.c:634
164 #: src/daisy-player.c:642
164165 msgid ""
165166 "f - find the currently playing item and place the cursor there"
166167 msgstr ""
167168 "f - trouver l'élément en cours de diffusion et y placer le "
168169 "curseur"
169170
170 #: src/daisy-player.c:637
171 #: src/daisy-player.c:645
171172 msgid "g - go to time in this song (MM:SS)"
172173 msgstr "g - aller au temps (MM:SS) dans le morceau"
173174
174 #: src/daisy-player.c:640
175 #: src/daisy-player.c:648
175176 msgid "g - go to time in this item (MM:SS)"
176177 msgstr "g - aller au temps (MM:SS) dans cet élément"
177178
178 #: src/daisy-player.c:643
179 #: src/daisy-player.c:651
179180 msgid "G - go to page number"
180181 msgstr "G - aller à la page numéro"
181182
182 #: src/daisy-player.c:645
183 #: src/daisy-player.c:653
183184 msgid "h,? - give this help"
184185 msgstr "h,? - afficher cette page d'aide"
185186
186 #: src/daisy-player.c:647
187 #: src/daisy-player.c:655
187188 msgid "j,5 - just play current item"
188189 msgstr "j,5 - écouter uniquement l'élément courant"
189190
190 #: src/daisy-player.c:649
191 #: src/daisy-player.c:657
191192 msgid "l - switch to next level"
192193 msgstr "l - aller au niveau suivant"
193194
194 #: src/daisy-player.c:651
195 #: src/daisy-player.c:659
195196 msgid "L - switch to previous level"
196197 msgstr "L - remonter au niveau précédent"
197198
198 #: src/daisy-player.c:653
199 #: src/daisy-player.c:661
199200 msgid "n - search forwards"
200201 msgstr "n - rechercher plus loin"
201202
202 #: src/daisy-player.c:655
203 #: src/daisy-player.c:663
203204 msgid "N - search backwards"
204205 msgstr "N - rechercher avant"
205206
206 #: src/daisy-player.c:657
207 #: src/daisy-player.c:665
207208 msgid "o - select next output sound device"
208209 msgstr "o - sélectionner la carte son suivante"
209210
210 #: src/daisy-player.c:659
211 #: src/daisy-player.c:667
211212 msgid "p - place a bookmark"
212213 msgstr "p - placer un marqueur"
213214
214 #: src/daisy-player.c:661
215 #: src/daisy-player.c:669
215216 msgid "q - quit daisy-player and place a bookmark"
216217 msgstr "q - quitter daisy-player et placer un marqueur"
217218
218 #: src/daisy-player.c:663
219 #: src/daisy-player.c:671
219220 msgid "s - stop playing"
220221 msgstr "s - arrêter l'écoute"
221222
222 #: src/daisy-player.c:665
223 #: src/daisy-player.c:673
223224 msgid "U,+ - increase playing speed"
224225 msgstr "U,+ - accélérer la vitesse d'écoute"
225226
226 #: src/daisy-player.c:667
227 #: src/daisy-player.c:675
227228 msgid "v,1 - decrease playback volume"
228229 msgstr "v,1 - baisser le volume d'écoute"
229230
230 #: src/daisy-player.c:669
231 #: src/daisy-player.c:677
231232 msgid "V,7 - increase playback volume (beware of Clipping)"
232233 msgstr "V,7 - remonter le volume d'écoute"
233234
234 #: src/daisy-player.c:671
235 #: src/daisy-player.c:679
235236 msgid "Press any key to leave help..."
236237 msgstr "Appuyez sur une touche pour quitter l'aide..."
237238
238 #: src/daisy-player.c:818
239 #: src/daisy-player.c:826
239240 msgid "Please wait... -------------------------"
240241 msgstr "Un instant svp... -----------------------"
241242
242 #: src/daisy-player.c:923
243 #: src/daisy-player.c:931
243244 msgid "What do you search?"
244245 msgstr "Que recherchez-vous?"
245246
246 #: src/daisy-player.c:1024
247 #: src/daisy-player.c:1032
247248 msgid "Go to time (MM:SS):"
248249 msgstr "Aller au temps (MM:SS):"
249250
250 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
251 #: src/daisy-player.c:1916 src/daisy-player.c:1932
251 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
252 #: src/daisy-player.c:1991 src/daisy-player.c:2007
252253 #, c-format
253254 msgid "Daisy-player - Version %s %s"
254255 msgstr "Daisy-player - Version %s %s"
255256
256 #: src/daisy-player.c:1583
257 #: src/daisy-player.c:1643
257258 #, c-format
258259 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
259260 msgstr ""
260261 "Utilisation: %s [-l langue] [répertoire avec structure Daisy] | [archive "
261262 "livre Daisy]"
262263
263 #: src/daisy-player.c:1585
264 #: src/daisy-player.c:1645
264265 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
265266 msgstr "[-c unité de lecture cdrom] [-d unité de son Alsa]"
266267
267 #: src/daisy-player.c:1598
268 #: src/daisy-player.c:1658
268269 msgid "Cannot read /proc/mounts."
269270 msgstr "Je ne sais pas lire /proc/mounts."
270271
271 #: src/daisy-player.c:1793
272 #: src/daisy-player.c:1872
272273 msgid "A parser to play Daisy CD's with Linux"
273274 msgstr "Une application pour écouter des CD's Daisy sous Linux"
274275
275 #: src/daisy-player.c:1795
276 #: src/daisy-player.c:1874
276277 msgid "Scanning for a Daisy CD..."
277278 msgstr "Détection d'un CD Daisy..."
278279
279 #: src/daisy-player.c:1896 src/daisy-player.c:2031
280 #: src/daisy-player.c:1971 src/daisy-player.c:2098
280281 msgid "No DAISY-CD or Audio-cd found"
281282 msgstr "Pas de CD Daisy ou audio détecté..."
282283
283 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
284 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
284285 msgid "No Daisy CD in drive."
285286 msgstr "Pas de CD Daisy dans le lecteur."
286287
287 #: src/daisy-player.c:2014
288 #: src/daisy-player.c:2081
288289 msgid "Found an Audio-CD."
289290 msgstr "CD audio détecté."
290291
291 #: src/daisy-player.c:2016
292 #: src/daisy-player.c:2083
292293 msgid "Get titles from freedb.freedb.org..."
293294 msgstr "Rapatriement des titres par freedb.freedb.org..."
294295
295 #: src/daisy-player.c:2145
296 #: src/daisy-player.c:2212
296297 #, c-format
297298 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
298299 msgstr "Daisy-player - Version %s - (C)2017 J. Lemmens"
299300
300 #: src/daisy-player.c:2158
301 #: src/daisy-player.c:2225
301302 msgid "Press 'h' for help"
302303 msgstr "Appuyez sur 'h' pour obtenir de l'aide"
Binary diff not shown
2121 msgstr ""
2222 "Project-Id-Version: gettext 0.11.2\n"
2323 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
24 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
24 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2525 "PO-Revision-Date: 2013-12-09 11:06+0200\n"
2626 "Last-Translator: JimmiXzSq <jimos45812rt1@hotmail.com>\n"
2727 "Language-Team: JimmiXzSq <jimos45812rt1@hotmail.com>\n"
3030 "Content-Type: text/plain; charset=UTF-8\n"
3131 "Content-Transfer-Encoding: 8bit\n"
3232
33 #: src/common.c:91
33 #: src/common.c:111
3434 msgid "eBook-speaker cannot handle this file."
3535 msgstr "Az eBook-speaker nem tudja kezelni ezt a fájlt."
3636
37 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
37 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3838 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
3939 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
41 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
42 #: src/daisy-player.c:2072
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
41 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
42 #: src/daisy-player.c:2139
4343 #, c-format
4444 msgid "Cannot read %s"
4545 msgstr "A(z) %s nem olvasható"
4646
47 #: src/common.c:688
47 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
48 #: src/daisy-player.c:1181
49 msgid "This book has no audio. Play this book with eBook-speaker"
50 msgstr "Ez a könyv nincs hang. Játszani ezt a könyvet eBook-speaker"
51
52 #: src/common.c:574
4853 msgid "Please try to play this book with daisy-player"
4954 msgstr ""
5055 "Kérjük, próbálja meg játszani ezt a könyvet a daisy-player segítségével"
5156
52 #: src/common.c:1023
57 #: src/common.c:905
5358 #, c-format
5459 msgid "Cannot read type: %d"
5560 msgstr "Nem lehet olvasni a típus: %d"
5661
57 #: src/common.c:1097
62 #: src/common.c:982
5863 msgid "Go to page number:"
5964 msgstr "Ugrás az oldalszámra:"
6065
61 #: src/common.c:1115
66 #: src/common.c:1000
6267 msgid "Please wait..."
6368 msgstr "Kérlek várj..."
6469
65 #: src/common.c:1175
70 #: src/common.c:1060
6671 msgid "Select a soundcard:"
6772 msgstr "Válasszon hangkártya:"
6873
69 #: src/common.c:1177
74 #: src/common.c:1062
7075 msgid "Cannot read /proc/asound/cards"
7176 msgstr "A /proc/asound/cards fájl nem olvasható."
72
73 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
74 msgid "This book has no audio. Play this book with eBook-speaker"
75 msgstr "Ez a könyv nincs hang. Játszani ezt a könyvet eBook-speaker"
7677
7778 #: src/daisy3.c:1068
7879 msgid "No items found. Try option \"-N\"."
101102 msgid "total length: %02d:%02d:%02d"
102103 msgstr "Összidő: %02d:%02d:%02d"
103104
104 #: src/daisy-player.c:598
105 #: src/daisy-player.c:606
105106 msgid "These commands are available in this version:"
106107 msgstr "A következő parancsok érhetők el ebben a verzióban:"
107108
108 #: src/daisy-player.c:602
109 #: src/daisy-player.c:610
109110 msgid "cursor down,2 - move cursor to the next item"
110111 msgstr "Le,2 - a kurzor mozgatása a következő elemre"
111112
112 #: src/daisy-player.c:604
113 #: src/daisy-player.c:612
113114 msgid "cursor up,8 - move cursor to the previous item"
114115 msgstr "Fel,8 - a kurzor mozgatása az előző elemre"
115116
116 #: src/daisy-player.c:606
117 #: src/daisy-player.c:614
117118 msgid "cursor right,6 - skip to next phrase"
118119 msgstr "Jobbra,6 - a következő kifejezés kihagyása"
119120
120 #: src/daisy-player.c:608
121 #: src/daisy-player.c:616
121122 msgid "cursor left,4 - skip to previous phrase"
122123 msgstr "Balra,4 - az előző kifejezés kihagyása"
123124
124 #: src/daisy-player.c:610
125 #: src/daisy-player.c:618
125126 msgid "page-down,3 - view next page"
126127 msgstr "PAGEDOWN,3 - a következő oldal megtekintése"
127128
128 #: src/daisy-player.c:612
129 #: src/daisy-player.c:620
129130 msgid "page-up,9 - view previous page"
130131 msgstr "PAGEUP,9 - az előző oldal megtekintése"
131132
132 #: src/daisy-player.c:614
133 #: src/daisy-player.c:622
133134 msgid "enter - start playing"
134135 msgstr "ENTER - a lejátszás megkezdése"
135136
136 #: src/daisy-player.c:616
137 #: src/daisy-player.c:624
137138 msgid "space,0 - pause/resume playing"
138139 msgstr "SZÓKÖZ,0 - a lejátszás szüneteltetése és folytatása"
139140
140 #: src/daisy-player.c:618
141 #: src/daisy-player.c:626
141142 msgid "home,* - play on normal speed"
142143 msgstr "HOME,* - lejátszás normál sebességgel"
143144
144 #: src/daisy-player.c:620
145 #: src/daisy-player.c:628
145146 msgid "Press any key for next page..."
146147 msgstr "A következő oldalra lépéshez nyomjon meg egy billentyűt..."
147148
148 #: src/daisy-player.c:626
149 #: src/daisy-player.c:634
149150 msgid "/ - search for a label"
150151 msgstr "/ - egy címke keresése"
151152
152 #: src/daisy-player.c:628
153 #: src/daisy-player.c:636
153154 msgid "d - store current item to disk"
154155 msgstr "d - az aktuális elem tárolása a lemezre"
155156
156 #: src/daisy-player.c:630
157 #: src/daisy-player.c:638
157158 msgid "D,- - decrease playing speed"
158159 msgstr "D,- - lejátszás sebességének csökkentése"
159160
160 #: src/daisy-player.c:632
161 #: src/daisy-player.c:640
161162 msgid "e,. - quit daisy-player, place a bookmark and eject"
162163 msgstr "e,. - kilép daisy-player, beletenni egy könyvjelzőt, és kiadja"
163164
164 #: src/daisy-player.c:634
165 #: src/daisy-player.c:642
165166 msgid ""
166167 "f - find the currently playing item and place the cursor there"
167168 msgstr ""
168169 "f - az aktuálisan játszott elem helyének megkeresése, és a "
169170 "kurzor elhelyezése az elem helyére"
170171
171 #: src/daisy-player.c:637
172 #: src/daisy-player.c:645
172173 msgid "g - go to time in this song (MM:SS)"
173174 msgstr "g - ugrás egy megadott időre a zeneszámon belül"
174175
175 #: src/daisy-player.c:640
176 #: src/daisy-player.c:648
176177 msgid "g - go to time in this item (MM:SS)"
177178 msgstr "g - ugrás egy megadott időre a zeneszámon belül"
178179
179 #: src/daisy-player.c:643
180 #: src/daisy-player.c:651
180181 msgid "G - go to page number"
181182 msgstr ""
182183 "G - ugrás egy megadott oldalra, ha a Daisy könyv tartalmaz "
183184 "oldalszámokat"
184185
185 #: src/daisy-player.c:645
186 #: src/daisy-player.c:653
186187 msgid "h,? - give this help"
187188 msgstr "h,? - a súgó megjelenítése"
188189
189 #: src/daisy-player.c:647
190 #: src/daisy-player.c:655
190191 msgid "j,5 - just play current item"
191192 msgstr "j,5 - az aktuális elem újbóli lejátszása"
192193
193 #: src/daisy-player.c:649
194 #: src/daisy-player.c:657
194195 msgid "l - switch to next level"
195196 msgstr "l - váltás a következő szintre"
196197
197 #: src/daisy-player.c:651
198 #: src/daisy-player.c:659
198199 msgid "L - switch to previous level"
199200 msgstr "L - váltás az előző szintre"
200201
201 #: src/daisy-player.c:653
202 #: src/daisy-player.c:661
202203 msgid "n - search forwards"
203204 msgstr "n - a következő kifejezés keresése"
204205
205 #: src/daisy-player.c:655
206 #: src/daisy-player.c:663
206207 msgid "N - search backwards"
207208 msgstr "N - az előző kifejezés keresése"
208209
209 #: src/daisy-player.c:657
210 #: src/daisy-player.c:665
210211 msgid "o - select next output sound device"
211212 msgstr "o - a következő hangeszköz kiválasztása"
212213
213 #: src/daisy-player.c:659
214 #: src/daisy-player.c:667
214215 msgid "p - place a bookmark"
215216 msgstr "p - könyvjelző elhelyezése"
216217
217 #: src/daisy-player.c:661
218 #: src/daisy-player.c:669
218219 msgid "q - quit daisy-player and place a bookmark"
219220 msgstr "q - kilép daisy-player és helyezzük egy könyvjelzőt"
220221
221 #: src/daisy-player.c:663
222 #: src/daisy-player.c:671
222223 msgid "s - stop playing"
223224 msgstr "s - a lejátszás leállítása"
224225
225 #: src/daisy-player.c:665
226 #: src/daisy-player.c:673
226227 msgid "U,+ - increase playing speed"
227228 msgstr "U,+ - lejátszás sebességének növelése"
228229
229 #: src/daisy-player.c:667
230 #: src/daisy-player.c:675
230231 msgid "v,1 - decrease playback volume"
231232 msgstr "v,1 - csökkentheti lejátszási hangerő"
232233
233 #: src/daisy-player.c:669
234 #: src/daisy-player.c:677
234235 msgid "V,7 - increase playback volume (beware of Clipping)"
235236 msgstr "V,7 - növelése lejátszás mennyiség (vigyázat a túlvezérlés)"
236237
237 #: src/daisy-player.c:671
238 #: src/daisy-player.c:679
238239 msgid "Press any key to leave help..."
239240 msgstr "A súgó elhagyásához nyomjon meg egy billentyűt..."
240241
241 #: src/daisy-player.c:818
242 #: src/daisy-player.c:826
242243 msgid "Please wait... -------------------------"
243244 msgstr "Kérem várjon..."
244245
245 #: src/daisy-player.c:923
246 #: src/daisy-player.c:931
246247 msgid "What do you search?"
247248 msgstr "Mit keres?"
248249
249 #: src/daisy-player.c:1024
250 #: src/daisy-player.c:1032
250251 msgid "Go to time (MM:SS):"
251252 msgstr "Ugrás egy megadott időtartamra:"
252253
253 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
254 #: src/daisy-player.c:1916 src/daisy-player.c:1932
254 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
255 #: src/daisy-player.c:1991 src/daisy-player.c:2007
255256 #, c-format
256257 msgid "Daisy-player - Version %s %s"
257258 msgstr "Daisy-player - %s verzió %s"
258259
259 #: src/daisy-player.c:1583
260 #: src/daisy-player.c:1643
260261 #, c-format
261262 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
262263 msgstr ""
263264 "Használat: %s [Daisy szerkezetet tartalmazó könyvtár] | "
264265 "[Daisy_book_archive]"
265266
266 #: src/daisy-player.c:1585
267 #: src/daisy-player.c:1645
267268 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
268269 msgstr "[-c CD-rom eszköz] [-d ALSA hangeszköz]"
269270
270 #: src/daisy-player.c:1598
271 #: src/daisy-player.c:1658
271272 msgid "Cannot read /proc/mounts."
272273 msgstr "A /proc csatolások nem olvashatók."
273274
274 #: src/daisy-player.c:1793
275 #: src/daisy-player.c:1872
275276 msgid "A parser to play Daisy CD's with Linux"
276277 msgstr ""
277278 "Egy feldolgozó program, melynek segítségével Daisy könyveket játszhat "
278279 "le Linux alatt"
279280
280 #: src/daisy-player.c:1795
281 #: src/daisy-player.c:1874
281282 msgid "Scanning for a Daisy CD..."
282283 msgstr "DAISY CD keresése..."
283284
284 #: src/daisy-player.c:1896 src/daisy-player.c:2031
285 #: src/daisy-player.c:1971 src/daisy-player.c:2098
285286 msgid "No DAISY-CD or Audio-cd found"
286287 msgstr "Nem található DAISY CD vagy audio CD a meghajtóban."
287288
288 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
289 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
289290 msgid "No Daisy CD in drive."
290291 msgstr "A meghajtóban nincs Daisy lemez."
291292
292 #: src/daisy-player.c:2014
293 #: src/daisy-player.c:2081
293294 msgid "Found an Audio-CD."
294295 msgstr "Az audio CD megtalálva."
295296
296 #: src/daisy-player.c:2016
297 #: src/daisy-player.c:2083
297298 msgid "Get titles from freedb.freedb.org..."
298299 msgstr "A számcímek lekérése a freedb.freedb.org kiszolgálóról..."
299300
300 #: src/daisy-player.c:2145
301 #: src/daisy-player.c:2212
301302 #, c-format
302303 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
303304 msgstr "Daisy-player - %s verzió - (C)2017 J. Lemmens"
304305
305 #: src/daisy-player.c:2158
306 #: src/daisy-player.c:2225
306307 msgid "Press 'h' for help"
307308 msgstr "A segítségért nyomja meg a H billentyűt."
Binary diff not shown
2020 msgstr ""
2121 "Project-Id-Version: gettext 0.11.2\n"
2222 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
23 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
23 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2424 "PO-Revision-Date: 2015-02-17 17:06+0200\n"
2525 "Last-Translator: Sreelakshmi R V <sreelakshmi.rv@gmail.com>\n"
2626 "Language-Team: Sreelakshmi R V <sreelakshmi.rv@gmail.com>\n"
2929 "Content-Type: text/plain; charset=UTF-8\n"
3030 "Content-Transfer-Encoding: 8bit\n"
3131
32 #: src/common.c:91
32 #: src/common.c:111
3333 msgid "eBook-speaker cannot handle this file."
3434 msgstr ""
3535
36 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
36 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3737 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
3838 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
39 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
40 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
41 #: src/daisy-player.c:2072
39 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
40 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
41 #: src/daisy-player.c:2139
4242 #, c-format
4343 msgid "Cannot read %s"
4444 msgstr "%s വായിക്കാൻ കഴിയുന്നില്ല "
4545
46 #: src/common.c:688
46 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
47 #: src/daisy-player.c:1181
48 msgid "This book has no audio. Play this book with eBook-speaker"
49 msgstr "ഈ പുസ്തകത്തിന് ഓഡിയോ ലഭ്യമല്ല. eBook-speaker ഉപയോഗിചു ഇത് കേൾക്കാവുന്നതാണ് ."
50
51 #: src/common.c:574
4752 msgid "Please try to play this book with daisy-player"
4853 msgstr ""
4954
50 #: src/common.c:1023
55 #: src/common.c:905
5156 #, c-format
5257 msgid "Cannot read type: %d"
5358 msgstr ""
5459
55 #: src/common.c:1097
60 #: src/common.c:982
5661 msgid "Go to page number:"
5762 msgstr "പേജ് നമ്പറിലേക്ക് പോവുക"
5863
59 #: src/common.c:1115
64 #: src/common.c:1000
6065 msgid "Please wait..."
6166 msgstr ""
6267
63 #: src/common.c:1175
68 #: src/common.c:1060
6469 msgid "Select a soundcard:"
6570 msgstr "ഒരു സൌണ്ട്കാർഡ് തിരഞ്ഞെടുക്കുക :"
6671
67 #: src/common.c:1177
72 #: src/common.c:1062
6873 msgid "Cannot read /proc/asound/cards"
6974 msgstr " /proc/asound/cards വായിക്കാൻ കഴിയുന്നില്ല"
70
71 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
72 msgid "This book has no audio. Play this book with eBook-speaker"
73 msgstr "ഈ പുസ്തകത്തിന് ഓഡിയോ ലഭ്യമല്ല. eBook-speaker ഉപയോഗിചു ഇത് കേൾക്കാവുന്നതാണ് ."
7475
7576 #: src/daisy3.c:1068
7677 msgid "No items found. Try option \"-N\"."
99100 msgid "total length: %02d:%02d:%02d"
100101 msgstr "ആകെ ദൈർഘ്യം : %02d:%02d:%02d"
101102
102 #: src/daisy-player.c:598
103 #: src/daisy-player.c:606
103104 msgid "These commands are available in this version:"
104105 msgstr "ഈ കമാൻഡുകൾ ഈ പതിപ്പിൽ ലഭ്യമാണ് :"
105106
106 #: src/daisy-player.c:602
107 #: src/daisy-player.c:610
107108 msgid "cursor down,2 - move cursor to the next item"
108109 msgstr "cursor down,2 - അടുത്ത ഇനത്തിലേക്ക് കഴ്സർ നീക്കുക"
109110
110 #: src/daisy-player.c:604
111 #: src/daisy-player.c:612
111112 msgid "cursor up,8 - move cursor to the previous item"
112113 msgstr "cursor up ,8 - മുൻ ഇനത്തിലേക്ക് കഴ്സർ നീക്കുക"
113114
114 #: src/daisy-player.c:606
115 #: src/daisy-player.c:614
115116 msgid "cursor right,6 - skip to next phrase"
116117 msgstr "cursor right ,6 - അടുത്ത പദത്തിലേക്ക് കടക്കുക"
117118
118 #: src/daisy-player.c:608
119 #: src/daisy-player.c:616
119120 msgid "cursor left,4 - skip to previous phrase"
120121 msgstr "cursor left,4 - മുമ്പത്തെ പദത്തിലേക്ക് കടക്കുക"
121122
122 #: src/daisy-player.c:610
123 #: src/daisy-player.c:618
123124 msgid "page-down,3 - view next page"
124125 msgstr "page-down,3 - അടുത്ത പേജ് കാണുക "
125126
126 #: src/daisy-player.c:612
127 #: src/daisy-player.c:620
127128 msgid "page-up,9 - view previous page"
128129 msgstr "page-up,9 - മുൻ പേജ് കാണുക"
129130
130 #: src/daisy-player.c:614
131 #: src/daisy-player.c:622
131132 msgid "enter - start playing"
132133 msgstr "enter - ഫയൽ പ്ലേ ചെയ്തു തുടങ്ങുക"
133134
134 #: src/daisy-player.c:616
135 #: src/daisy-player.c:624
135136 msgid "space,0 - pause/resume playing"
136137 msgstr "space ,0 - പ്ലേ ചെയ്തു കൊണ്ടിരിക്കുന്ന ഫയൽ നിർത്തുക / പുനരാരംഭിക്കുക"
137138
138 #: src/daisy-player.c:618
139 #: src/daisy-player.c:626
139140 msgid "home,* - play on normal speed"
140141 msgstr "home ,* - സാധാരണ വേഗത്തിൽ പ്ലേ ചെയ്യുക"
141142
142 #: src/daisy-player.c:620
143 #: src/daisy-player.c:628
143144 msgid "Press any key for next page..."
144145 msgstr "അടുത്ത പേജിനു വേണ്ടി ഏതെങ്കിലും കീ അമർത്തുക ..."
145146
146 #: src/daisy-player.c:626
147 #: src/daisy-player.c:634
147148 msgid "/ - search for a label"
148149 msgstr "/ - ലേബൽ തിരയുക"
149150
150 #: src/daisy-player.c:628
151 #: src/daisy-player.c:636
151152 msgid "d - store current item to disk"
152153 msgstr "d - നിലവിലെ ഇനം ഡിസ്കിൽ സൂക്ഷിക്കുക"
153154
154 #: src/daisy-player.c:630
155 #: src/daisy-player.c:638
155156 msgid "D,- - decrease playing speed"
156157 msgstr "D,- - പ്ലേ ചെയുന്ന വേഗത കുറയ്ക്കുക"
157158
158 #: src/daisy-player.c:632
159 #: src/daisy-player.c:640
159160 msgid "e,. - quit daisy-player, place a bookmark and eject"
160161 msgstr "e,. - ഫയൽ ബുക്ക്‌മാർക്ക്‌ ചെയ്തു daisy-player ക്ലോസ് ചെയ്യുക "
161162
162 #: src/daisy-player.c:634
163 #: src/daisy-player.c:642
163164 msgid ""
164165 "f - find the currently playing item and place the cursor there"
165166 msgstr "f - ഇപ്പോൾ പ്ലേ ചെയ്യുന്ന ഐറ്റം കണ്ടെത്തി അതിൽ കർസർ വയ്ക്കുക"
166167
167 #: src/daisy-player.c:637
168 #: src/daisy-player.c:645
168169 msgid "g - go to time in this song (MM:SS)"
169170 msgstr "g - ഈ ഗാനത്തിന്റെ (MM:SS) സമയത്തിലേക്ക് പോകുക"
170171
171 #: src/daisy-player.c:640
172 #: src/daisy-player.c:648
172173 msgid "g - go to time in this item (MM:SS)"
173174 msgstr "g - ഈ ഇനത്തിന്റെ (MM:SS) സമയത്തിലേക്ക് പോകുക"
174175
175 #: src/daisy-player.c:643
176 #: src/daisy-player.c:651
176177 msgid "G - go to page number"
177178 msgstr "G - പേജ് നമ്പറിലേക്ക് പോകുക"
178179
179 #: src/daisy-player.c:645
180 #: src/daisy-player.c:653
180181 msgid "h,? - give this help"
181182 msgstr "h,? - ഈ ഹെല്പ് ഫയൽ പ്രദർശിപ്പിക്കുക"
182183
183 #: src/daisy-player.c:647
184 #: src/daisy-player.c:655
184185 msgid "j,5 - just play current item"
185186 msgstr "j,5 - നിലവിലെ ഇനം പ്ലേ ചെയ്യുക"
186187
187 #: src/daisy-player.c:649
188 #: src/daisy-player.c:657
188189 msgid "l - switch to next level"
189190 msgstr "l - അടുത്ത ലെവലിലേക്ക് മാറുക"
190191
191 #: src/daisy-player.c:651
192 #: src/daisy-player.c:659
192193 msgid "L - switch to previous level"
193194 msgstr "L - മുൻ നിലയിലേക്ക്‌ മാറുക"
194195
195 #: src/daisy-player.c:653
196 #: src/daisy-player.c:661
196197 msgid "n - search forwards"
197198 msgstr "n - മുന്നിലേക്ക് തിരയുക "
198199
199 #: src/daisy-player.c:655
200 #: src/daisy-player.c:663
200201 msgid "N - search backwards"
201202 msgstr "N - പുറകോട്ടു്തിരയുക"
202203
203 #: src/daisy-player.c:657
204 #: src/daisy-player.c:665
204205 msgid "o - select next output sound device"
205206 msgstr "o - അടുത്ത സൌണ്ട് ഔട്പുട്ട് ഉപകരണം തിരഞ്ഞെടുക്കുക "
206207
207 #: src/daisy-player.c:659
208 #: src/daisy-player.c:667
208209 msgid "p - place a bookmark"
209210 msgstr "p - ഒരു ബുക്ക്മാർക്ക് സ്ഥാപിക്കുക"
210211
211 #: src/daisy-player.c:661
212 #: src/daisy-player.c:669
212213 msgid "q - quit daisy-player and place a bookmark"
213214 msgstr "q - ഫയൽ ബുക്ക്‌മാർക്ക്‌ ചെയ്തു daisy-player ക്ലോസ് ചെയ്യുക"
214215
215 #: src/daisy-player.c:663
216 #: src/daisy-player.c:671
216217 msgid "s - stop playing"
217218 msgstr "s - ഫയൽ പ്ലേ ചെയ്യുന്നത് നിർത്തുക"
218219
219 #: src/daisy-player.c:665
220 #: src/daisy-player.c:673
220221 msgid "U,+ - increase playing speed"
221222 msgstr "U , + - പ്ലേ ചെയുന്ന വേഗത വർധിപിക്കുക"
222223
223 #: src/daisy-player.c:667
224 #: src/daisy-player.c:675
224225 msgid "v,1 - decrease playback volume"
225226 msgstr "v,1 - പ്ലേബാക്ക് ശബ്ദം കുറയ്ക്കുക"
226227
227 #: src/daisy-player.c:669
228 #: src/daisy-player.c:677
228229 msgid "V,7 - increase playback volume (beware of Clipping)"
229230 msgstr "V,7 - പ്ലേബാക്ക് ശബ്ദം കൂട്ടുക"
230231
231 #: src/daisy-player.c:671
232 #: src/daisy-player.c:679
232233 msgid "Press any key to leave help..."
233234 msgstr "സഹായത്തിനായി ഏതെങ്കിലും കീ അമർത്തുക ..."
234235
235 #: src/daisy-player.c:818
236 #: src/daisy-player.c:826
236237 msgid "Please wait... -------------------------"
237238 msgstr "കാത്തിരിക്കൂ... --------------"
238239
239 #: src/daisy-player.c:923
240 #: src/daisy-player.c:931
240241 msgid "What do you search?"
241242 msgstr "നിങ്ങൾ എന്താണ് തിരയുന്നത്"
242243
243 #: src/daisy-player.c:1024
244 #: src/daisy-player.c:1032
244245 msgid "Go to time (MM:SS):"
245246 msgstr "സമയം (MM:SS) പോവുക :"
246247
247 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
248 #: src/daisy-player.c:1916 src/daisy-player.c:1932
248 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
249 #: src/daisy-player.c:1991 src/daisy-player.c:2007
249250 #, c-format
250251 msgid "Daisy-player - Version %s %s"
251252 msgstr "Daisy-player - പതിപ്പ് %s %s"
252253
253 #: src/daisy-player.c:1583
254 #: src/daisy-player.c:1643
254255 #, c-format
255256 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
256257 msgstr "ഉപയോഗം: %s [ഡെയിസി_ഘടനയിലുള്ള_ഡയറക്ടറി | ഡെയിസി_പുസ്തക_ശേഖരം ]"
257258
258 #: src/daisy-player.c:1585
259 #: src/daisy-player.c:1645
259260 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
260261 msgstr "[-c സിഡി റോം ] [-d ALSA_sound_device]"
261262
262 #: src/daisy-player.c:1598
263 #: src/daisy-player.c:1658
263264 msgid "Cannot read /proc/mounts."
264265 msgstr "/proc/mounts ഫയൽ വായിക്കുവാൻ സാധിക്കുന്നില്ല "
265266
266 #: src/daisy-player.c:1793
267 #: src/daisy-player.c:1872
267268 msgid "A parser to play Daisy CD's with Linux"
268269 msgstr "ഡെയിസി സിഡി ലിനക്സിൽ പ്രവർത്തിപ്പിക്കുവനുള്ള സംവിധാനം"
269270
270 #: src/daisy-player.c:1795
271 #: src/daisy-player.c:1874
271272 msgid "Scanning for a Daisy CD..."
272273 msgstr "ഡെയിസി സിഡി യ്ക്കായി തിരയുന്നു"
273274
274 #: src/daisy-player.c:1896 src/daisy-player.c:2031
275 #: src/daisy-player.c:1971 src/daisy-player.c:2098
275276 msgid "No DAISY-CD or Audio-cd found"
276277 msgstr "ഡ്രൈവിൽ ഓഡിയോ സി ഡി യോ ഡെയിസി സി ഡി യോ ലഭ്യമല്ല"
277278
278 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
279 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
279280 msgid "No Daisy CD in drive."
280281 msgstr "ഡ്രൈവിൽ ഡെയ്സി സിഡി ഇല്ല"
281282
282 #: src/daisy-player.c:2014
283 #: src/daisy-player.c:2081
283284 msgid "Found an Audio-CD."
284285 msgstr "ഒരു ഓഡിയോ - സിഡി കണ്ടെത്തി "
285286
286 #: src/daisy-player.c:2016
287 #: src/daisy-player.c:2083
287288 msgid "Get titles from freedb.freedb.org..."
288289 msgstr ""
289290
290 #: src/daisy-player.c:2145
291 #: src/daisy-player.c:2212
291292 #, c-format
292293 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
293294 msgstr "Daisy-player - പതിപ്പ് %s"
294295
295 #: src/daisy-player.c:2158
296 #: src/daisy-player.c:2225
296297 msgid "Press 'h' for help"
297298 msgstr "സഹായത്തിനായി 'h' അമർത്തുക "
Binary diff not shown
2121 msgstr ""
2222 "Project-Id-Version: gettext 0.11.2\n"
2323 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
24 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
24 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2525 "PO-Revision-Date: 2013-01-29 15:06+0200\n"
2626 "Last-Translator: Ellen <ellenrohaan@hotmail.com>\n"
2727 "Language-Team: Ellen <ellenrohaan@hotmail.com>\n"
3030 "Content-Type: text/plain; charset=UTF-8\n"
3131 "Content-Transfer-Encoding: 8bit\n"
3232
33 #: src/common.c:91
33 #: src/common.c:111
3434 msgid "eBook-speaker cannot handle this file."
3535 msgstr "eBook-speaker kan ikke håndtere denne filen."
3636
37 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
37 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3838 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
3939 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
41 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
42 #: src/daisy-player.c:2072
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
41 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
42 #: src/daisy-player.c:2139
4343 #, c-format
4444 msgid "Cannot read %s"
4545 msgstr "Kan ikke lese %s"
4646
47 #: src/common.c:688
47 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
48 #: src/daisy-player.c:1181
49 msgid "This book has no audio. Play this book with eBook-speaker"
50 msgstr "Denne boken har ingen lyd. Spill denne boken med eBook-speaker"
51
52 #: src/common.c:574
4853 msgid "Please try to play this book with daisy-player"
4954 msgstr "Vennligst prøv å spille denne boken med daisy-player"
5055
51 #: src/common.c:1023
56 #: src/common.c:905
5257 #, c-format
5358 msgid "Cannot read type: %d"
5459 msgstr "Kan ikke lese type: %d"
5560
56 #: src/common.c:1097
61 #: src/common.c:982
5762 msgid "Go to page number:"
5863 msgstr "Gå til side nummer:"
5964
60 #: src/common.c:1115
65 #: src/common.c:1000
6166 msgid "Please wait..."
6267 msgstr "Vennligst vent..."
6368
64 #: src/common.c:1175
69 #: src/common.c:1060
6570 msgid "Select a soundcard:"
6671 msgstr "Velg et lydkort:"
6772
68 #: src/common.c:1177
73 #: src/common.c:1062
6974 msgid "Cannot read /proc/asound/cards"
7075 msgstr "Kan ikke lese /proc/asound/cards"
71
72 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
73 msgid "This book has no audio. Play this book with eBook-speaker"
74 msgstr "Denne boken har ingen lyd. Spill denne boken med eBook-speaker"
7576
7677 #: src/daisy3.c:1068
7778 msgid "No items found. Try option \"-N\"."
100101 msgid "total length: %02d:%02d:%02d"
101102 msgstr "total lengde: %02d:%02d:%02d"
102103
103 #: src/daisy-player.c:598
104 #: src/daisy-player.c:606
104105 msgid "These commands are available in this version:"
105106 msgstr "Disse kommandoer er tilgjengelig i denne versjon:"
106107
107 #: src/daisy-player.c:602
108 #: src/daisy-player.c:610
108109 msgid "cursor down,2 - move cursor to the next item"
109110 msgstr "markør ned,2 - flytt markør til neste element"
110111
111 #: src/daisy-player.c:604
112 #: src/daisy-player.c:612
112113 msgid "cursor up,8 - move cursor to the previous item"
113114 msgstr "markør opp,8 - flytt markør til forrige element"
114115
115 #: src/daisy-player.c:606
116 #: src/daisy-player.c:614
116117 msgid "cursor right,6 - skip to next phrase"
117118 msgstr "markør til høyre,6 - hopp over til neste settning"
118119
119 #: src/daisy-player.c:608
120 #: src/daisy-player.c:616
120121 msgid "cursor left,4 - skip to previous phrase"
121122 msgstr "markør til venstre,4 - hopp over til forrige settning"
122123
123 #: src/daisy-player.c:610
124 #: src/daisy-player.c:618
124125 msgid "page-down,3 - view next page"
125126 msgstr "page-down,3 - viser neste side"
126127
127 #: src/daisy-player.c:612
128 #: src/daisy-player.c:620
128129 msgid "page-up,9 - view previous page"
129130 msgstr "page-up,9 - viser forrige side"
130131
131 #: src/daisy-player.c:614
132 #: src/daisy-player.c:622
132133 msgid "enter - start playing"
133134 msgstr "enter - begynner å spille"
134135
135 #: src/daisy-player.c:616
136 #: src/daisy-player.c:624
136137 msgid "space,0 - pause/resume playing"
137138 msgstr "space,0 - pauserer/gjennopptar spilling"
138139
139 #: src/daisy-player.c:618
140 #: src/daisy-player.c:626
140141 msgid "home,* - play on normal speed"
141142 msgstr "home,* - spiller på normal tempo"
142143
143 #: src/daisy-player.c:620
144 #: src/daisy-player.c:628
144145 msgid "Press any key for next page..."
145146 msgstr "Trykk en tilfeldig knapp for neste side..."
146147
147 #: src/daisy-player.c:626
148 #: src/daisy-player.c:634
148149 msgid "/ - search for a label"
149150 msgstr "/ - søker en etikett"
150151
151 #: src/daisy-player.c:628
152 #: src/daisy-player.c:636
152153 msgid "d - store current item to disk"
153154 msgstr "d - oppbevarer gjeldende element til disk"
154155
155 #: src/daisy-player.c:630
156 #: src/daisy-player.c:638
156157 msgid "D,- - decrease playing speed"
157158 msgstr "D ,- - reduserer spille tempo"
158159
159 #: src/daisy-player.c:632
160 #: src/daisy-player.c:640
160161 msgid "e,. - quit daisy-player, place a bookmark and eject"
161162 msgstr ""
162163 "e,. - slutte daisy-player, plassere et bokmerke og løse ut"
163164
164 #: src/daisy-player.c:634
165 #: src/daisy-player.c:642
165166 msgid ""
166167 "f - find the currently playing item and place the cursor there"
167168 msgstr ""
168169 "f - finner den spillende elementen og plasserer "
169170 "markørender"
170171
171 #: src/daisy-player.c:637
172 #: src/daisy-player.c:645
172173 msgid "g - go to time in this song (MM:SS)"
173174 msgstr "g - går til tidspunkt i denne sangen (MM:SS)"
174175
175 #: src/daisy-player.c:640
176 #: src/daisy-player.c:648
176177 msgid "g - go to time in this item (MM:SS)"
177178 msgstr "g - går til tidspunkt i denne element (MM:SS)"
178179
179 #: src/daisy-player.c:643
180 #: src/daisy-player.c:651
180181 msgid "G - go to page number"
181182 msgstr "G - går til sidenummer (hvis det finnes)"
182183
183 #: src/daisy-player.c:645
184 #: src/daisy-player.c:653
184185 msgid "h,? - give this help"
185186 msgstr "h,? - viser hjelp"
186187
187 #: src/daisy-player.c:647
188 #: src/daisy-player.c:655
188189 msgid "j,5 - just play current item"
189190 msgstr "j,5 - spiller gjeldende element"
190191
191 #: src/daisy-player.c:649
192 #: src/daisy-player.c:657
192193 msgid "l - switch to next level"
193194 msgstr "l - går til neste nivå"
194195
195 #: src/daisy-player.c:651
196 #: src/daisy-player.c:659
196197 msgid "L - switch to previous level"
197198 msgstr "L - gå til forrige nivål"
198199
199 #: src/daisy-player.c:653
200 #: src/daisy-player.c:661
200201 msgid "n - search forwards"
201202 msgstr "n - søker framover"
202203
203 #: src/daisy-player.c:655
204 #: src/daisy-player.c:663
204205 msgid "N - search backwards"
205206 msgstr "N - søker omvendt"
206207
207 #: src/daisy-player.c:657
208 #: src/daisy-player.c:665
208209 msgid "o - select next output sound device"
209210 msgstr "o - selekterer neste lydkart"
210211
211 #: src/daisy-player.c:659
212 #: src/daisy-player.c:667
212213 msgid "p - place a bookmark"
213214 msgstr "p - lager en bokmerke"
214215
215 #: src/daisy-player.c:661
216 #: src/daisy-player.c:669
216217 msgid "q - quit daisy-player and place a bookmark"
217218 msgstr "q - avslutter daisy-player og lager en bokmerke"
218219
219 #: src/daisy-player.c:663
220 #: src/daisy-player.c:671
220221 msgid "s - stop playing"
221222 msgstr "s - stopper å spille"
222223
223 #: src/daisy-player.c:665
224 #: src/daisy-player.c:673
224225 msgid "U,+ - increase playing speed"
225226 msgstr "U,+ - øker spille tempo"
226227
227 #: src/daisy-player.c:667
228 #: src/daisy-player.c:675
228229 msgid "v,1 - decrease playback volume"
229230 msgstr "v,1 - redusere avspillingsvolum"
230231
231 #: src/daisy-player.c:669
232 #: src/daisy-player.c:677
232233 msgid "V,7 - increase playback volume (beware of Clipping)"
233234 msgstr "V,7 - øke avspillingsvolumet (pass av rel)"
234235
235 #: src/daisy-player.c:671
236 #: src/daisy-player.c:679
236237 msgid "Press any key to leave help..."
237238 msgstr "Trykk en tilfeldig knapp for å forlate hjelp..."
238239
239 #: src/daisy-player.c:818
240 #: src/daisy-player.c:826
240241 msgid "Please wait... -------------------------"
241242 msgstr "Vennligst vent.. -------------------------"
242243
243 #: src/daisy-player.c:923
244 #: src/daisy-player.c:931
244245 msgid "What do you search?"
245246 msgstr "Hva søker du?"
246247
247 #: src/daisy-player.c:1024
248 #: src/daisy-player.c:1032
248249 msgid "Go to time (MM:SS):"
249250 msgstr "Gå til tidspunktet (MM:SS):"
250251
251 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
252 #: src/daisy-player.c:1916 src/daisy-player.c:1932
252 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
253 #: src/daisy-player.c:1991 src/daisy-player.c:2007
253254 #, c-format
254255 msgid "Daisy-player - Version %s %s"
255256 msgstr "Daisy-player - Versjon %s %s"
256257
257 #: src/daisy-player.c:1583
258 #: src/daisy-player.c:1643
258259 #, c-format
259260 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
260261 msgstr "Forbruk: %s [mappe_med_Daisy-struktur] | [Daisy_book_archive]"
261262
262 #: src/daisy-player.c:1585
263 #: src/daisy-player.c:1645
263264 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
264265 msgstr "[-c cdrom_apparat] [-d ALSA_lyd_apparat]"
265266
266 #: src/daisy-player.c:1598
267 #: src/daisy-player.c:1658
267268 msgid "Cannot read /proc/mounts."
268269 msgstr "Kan ikke lese /proc/mounts."
269270
270 #: src/daisy-player.c:1793
271 #: src/daisy-player.c:1872
271272 msgid "A parser to play Daisy CD's with Linux"
272273 msgstr "Et program for å spille Daisy CD's med Linux"
273274
274 #: src/daisy-player.c:1795
275 #: src/daisy-player.c:1874
275276 msgid "Scanning for a Daisy CD..."
276277 msgstr "Søker etter en Daisy CD..."
277278
278 #: src/daisy-player.c:1896 src/daisy-player.c:2031
279 #: src/daisy-player.c:1971 src/daisy-player.c:2098
279280 msgid "No DAISY-CD or Audio-cd found"
280281 msgstr "Ingen DAISY-CD eller Lyd-cd funnet"
281282
282 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
283 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
283284 msgid "No Daisy CD in drive."
284285 msgstr "Ingen Daisy-cd i spillern."
285286
286 #: src/daisy-player.c:2014
287 #: src/daisy-player.c:2081
287288 msgid "Found an Audio-CD."
288289 msgstr "Funnet en Lyd-CD."
289290
290 #: src/daisy-player.c:2016
291 #: src/daisy-player.c:2083
291292 msgid "Get titles from freedb.freedb.org..."
292293 msgstr "Henter titler fra freedb.freedb.org..."
293294
294 #: src/daisy-player.c:2145
295 #: src/daisy-player.c:2212
295296 #, c-format
296297 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
297298 msgstr "Daisy-player - Versjon %s - (C)2017 J. Lemmens"
298299
299 #: src/daisy-player.c:2158
300 #: src/daisy-player.c:2225
300301 msgid "Press 'h' for help"
301302 msgstr "Trykk 'h' for hjelp"
Binary diff not shown
2020 msgstr ""
2121 "Project-Id-Version: gettext 0.11.2\n"
2222 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
23 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
23 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2424 "PO-Revision-Date: 2013-01-29 15:06+0200\n"
2525 "Last-Translator: Jos Lemmens <jos@jlemmens.nl>\n"
2626 "Language-Team: Jos Lemmens <jos@jlemmens.nl>\n"
2929 "Content-Type: text/plain; charset=UTF-8\n"
3030 "Content-Transfer-Encoding: 8bit\n"
3131
32 #: src/common.c:91
32 #: src/common.c:111
3333 msgid "eBook-speaker cannot handle this file."
3434 msgstr "eBook-speaker kan dit bestand niet lezen."
3535
3636 # 33
37 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
37 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3838 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
3939 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
41 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
42 #: src/daisy-player.c:2072
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
41 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
42 #: src/daisy-player.c:2139
4343 #, c-format
4444 msgid "Cannot read %s"
4545 msgstr "Kan %s niet lezen"
4646
47 #: src/common.c:688
47 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
48 #: src/daisy-player.c:1181
49 msgid "This book has no audio. Play this book with eBook-speaker"
50 msgstr "Dit boek heeft geen audio. Speel dit boek af met eBook-speaker"
51
52 #: src/common.c:574
4853 msgid "Please try to play this book with daisy-player"
4954 msgstr "Probeer dit boek met daisy-player af te spelen"
5055
5156 # 33
52 #: src/common.c:1023
57 #: src/common.c:905
5358 #, c-format
5459 msgid "Cannot read type: %d"
5560 msgstr "Kan het type %d niet lezen"
5661
5762 # 15
58 #: src/common.c:1097
63 #: src/common.c:982
5964 msgid "Go to page number:"
6065 msgstr "Ga naar pagina nummer:"
6166
62 #: src/common.c:1115
67 #: src/common.c:1000
6368 msgid "Please wait..."
6469 msgstr "Even wachten A.U.B...."
6570
66 #: src/common.c:1175
71 #: src/common.c:1060
6772 msgid "Select a soundcard:"
6873 msgstr "Selecteer een geluikdskaart:"
6974
7075 # 34
71 #: src/common.c:1177
76 #: src/common.c:1062
7277 msgid "Cannot read /proc/asound/cards"
7378 msgstr "Kan /proc/asound/cards niet lezen."
74
75 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
76 msgid "This book has no audio. Play this book with eBook-speaker"
77 msgstr "Dit boek heeft geen audio. Speel dit boek af met eBook-speaker"
7879
7980 #: src/daisy3.c:1068
8081 msgid "No items found. Try option \"-N\"."
108109 msgstr "totale lengte %02d:%02d:%02d"
109110
110111 # 38
111 #: src/daisy-player.c:598
112 #: src/daisy-player.c:606
112113 msgid "These commands are available in this version:"
113114 msgstr "Deze commando's zijn beschikbaar in deze versie"
114115
115116 # 41
116 #: src/daisy-player.c:602
117 #: src/daisy-player.c:610
117118 msgid "cursor down,2 - move cursor to the next item"
118119 msgstr "cursor omlaag,2 - verplaats de cursor naar het volgende item"
119120
120121 # 44
121 #: src/daisy-player.c:604
122 #: src/daisy-player.c:612
122123 msgid "cursor up,8 - move cursor to the previous item"
123124 msgstr "cursor omhoog,8 - verplaats de cursor naar het vorige item"
124125
125126 # 43
126 #: src/daisy-player.c:606
127 #: src/daisy-player.c:614
127128 msgid "cursor right,6 - skip to next phrase"
128129 msgstr "cursor rechts,6 - spring naar de volgende frase"
129130
130131 # 42
131 #: src/daisy-player.c:608
132 #: src/daisy-player.c:616
132133 msgid "cursor left,4 - skip to previous phrase"
133134 msgstr "cursor links,4 - spring naar de vorige frase"
134135
135136 # 57
136 #: src/daisy-player.c:610
137 #: src/daisy-player.c:618
137138 msgid "page-down,3 - view next page"
138139 msgstr "page-down,3 - toon de volgende pagina"
139140
140141 # 58
141 #: src/daisy-player.c:612
142 #: src/daisy-player.c:620
142143 msgid "page-up,9 - view previous page"
143144 msgstr "page-up,9 - toon de vorige pagina"
144145
145146 # 46
146 #: src/daisy-player.c:614
147 #: src/daisy-player.c:622
147148 msgid "enter - start playing"
148149 msgstr "enter - start afspelen"
149150
150151 # 62
151 #: src/daisy-player.c:616
152 #: src/daisy-player.c:624
152153 msgid "space,0 - pause/resume playing"
153154 msgstr "spatie,0 - pauze/vervolg het afspelen"
154155
155156 # 50
156 #: src/daisy-player.c:618
157 #: src/daisy-player.c:626
157158 msgid "home,* - play on normal speed"
158159 msgstr "home,* - speel af op normale snelheid"
159160
160161 # 23
161 #: src/daisy-player.c:620
162 #: src/daisy-player.c:628
162163 msgid "Press any key for next page..."
163164 msgstr "Druk op een toets voor de volgende pagina..."
164165
165166 # 32
166 #: src/daisy-player.c:626
167 #: src/daisy-player.c:634
167168 msgid "/ - search for a label"
168169 msgstr "/ - zoek label"
169170
170171 # 45
171 #: src/daisy-player.c:628
172 #: src/daisy-player.c:636
172173 msgid "d - store current item to disk"
173174 msgstr "d - sla huidige item op op schijf"
174175
175176 # 11
176 #: src/daisy-player.c:630
177 #: src/daisy-player.c:638
177178 msgid "D,- - decrease playing speed"
178179 msgstr "D,- - verlaag afspeel snelheid"
179180
180181 # 59
181 #: src/daisy-player.c:632
182 #: src/daisy-player.c:640
182183 msgid "e,. - quit daisy-player, place a bookmark and eject"
183184 msgstr "e,. - stop daisy-player,plaats een boekenlegger en eject"
184185
185186 # 47
186 #: src/daisy-player.c:634
187 #: src/daisy-player.c:642
187188 msgid ""
188189 "f - find the currently playing item and place the cursor there"
189190 msgstr ""
190191 "f - vindt het huidige spelende item en plaats de cursor daar"
191192
192193 # 48
193 #: src/daisy-player.c:637
194 #: src/daisy-player.c:645
194195 msgid "g - go to time in this song (MM:SS)"
195196 msgstr "g - ga naar tijd in dit lied"
196197
197198 # 48
198 #: src/daisy-player.c:640
199 #: src/daisy-player.c:648
199200 msgid "g - go to time in this item (MM:SS)"
200201 msgstr "g - ga naar tijd in dit item"
201202
202203 # 48
203 #: src/daisy-player.c:643
204 #: src/daisy-player.c:651
204205 msgid "G - go to page number"
205206 msgstr "G - ga naar pagina nummer"
206207
207208 # 49
208 #: src/daisy-player.c:645
209 #: src/daisy-player.c:653
209210 msgid "h,? - give this help"
210211 msgstr "h,? - toon deze help-pagina"
211212
212213 # 51
213 #: src/daisy-player.c:647
214 #: src/daisy-player.c:655
214215 msgid "j,5 - just play current item"
215216 msgstr "j,5 - speel alleen dit item af"
216217
217218 # 52
218 #: src/daisy-player.c:649
219 #: src/daisy-player.c:657
219220 msgid "l - switch to next level"
220221 msgstr "l - schakel naar het volgende niveau"
221222
222223 # 16
223 #: src/daisy-player.c:651
224 #: src/daisy-player.c:659
224225 msgid "L - switch to previous level"
225226 msgstr "L - schakel naar het vorige niveau"
226227
227228 # 53
228 #: src/daisy-player.c:653
229 #: src/daisy-player.c:661
229230 msgid "n - search forwards"
230231 msgstr "n - zoek voorwaarts"
231232
232233 # 18
233 #: src/daisy-player.c:655
234 #: src/daisy-player.c:663
234235 msgid "N - search backwards"
235236 msgstr "N - zoek achteruit"
236237
237238 # 55
238 #: src/daisy-player.c:657
239 #: src/daisy-player.c:665
239240 msgid "o - select next output sound device"
240241 msgstr "o - selecteer de volgende geluidskaart"
241242
242243 # 56
243 #: src/daisy-player.c:659
244 #: src/daisy-player.c:667
244245 msgid "p - place a bookmark"
245246 msgstr "p - plaats een boekenlegger"
246247
247248 # 59
248 #: src/daisy-player.c:661
249 #: src/daisy-player.c:669
249250 msgid "q - quit daisy-player and place a bookmark"
250251 msgstr "q - stop daisy-player en plaats een boekenlegger"
251252
252253 # 60
253 #: src/daisy-player.c:663
254 #: src/daisy-player.c:671
254255 msgid "s - stop playing"
255256 msgstr "s - stop het afspelen"
256257
257258 # 29
258 #: src/daisy-player.c:665
259 #: src/daisy-player.c:673
259260 msgid "U,+ - increase playing speed"
260261 msgstr "U,+ - verhoog afspeel snelheid"
261262
262263 # 11
263 #: src/daisy-player.c:667
264 #: src/daisy-player.c:675
264265 msgid "v,1 - decrease playback volume"
265266 msgstr "v,1 - verlaag het volume"
266267
267268 # 29
268 #: src/daisy-player.c:669
269 #: src/daisy-player.c:677
269270 msgid "V,7 - increase playback volume (beware of Clipping)"
270271 msgstr "V,7 - verhoog het volume (pas op voor oversturing)"
271272
272273 # 37
273 #: src/daisy-player.c:671
274 #: src/daisy-player.c:679
274275 msgid "Press any key to leave help..."
275276 msgstr "Druk op een toets om dit help-scherm te verlaten..."
276277
277278 # 20
278 #: src/daisy-player.c:818
279 #: src/daisy-player.c:826
279280 msgid "Please wait... -------------------------"
280281 msgstr "Even geduld a.u.b.... ------------------"
281282
282283 # 30
283 #: src/daisy-player.c:923
284 #: src/daisy-player.c:931
284285 msgid "What do you search?"
285286 msgstr "Wat zoekt u?"
286287
287 #: src/daisy-player.c:1024
288 #: src/daisy-player.c:1032
288289 msgid "Go to time (MM:SS):"
289290 msgstr "Ga naar tijd (MM:SS):"
290291
291292 # 13
292 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
293 #: src/daisy-player.c:1916 src/daisy-player.c:1932
293 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
294 #: src/daisy-player.c:1991 src/daisy-player.c:2007
294295 #, c-format
295296 msgid "Daisy-player - Version %s %s"
296297 msgstr "Daisy-player - Versie %s %s"
297298
298299 # 39
299 #: src/daisy-player.c:1583
300 #: src/daisy-player.c:1643
300301 #, c-format
301302 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
302303 msgstr "Gebruik: %s [map met een Daisy-structuur] | [Daisy_boek_archief]"
303304
304 #: src/daisy-player.c:1585
305 #: src/daisy-player.c:1645
305306 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
306307 msgstr "[-c cdrom_apparaat] [-d ALSA_geluids_apparaat]"
307308
308309 # 34
309 #: src/daisy-player.c:1598
310 #: src/daisy-player.c:1658
310311 msgid "Cannot read /proc/mounts."
311312 msgstr "Kan /proc/mounts niet lezen."
312313
313314 # 6
314 #: src/daisy-player.c:1793
315 #: src/daisy-player.c:1872
315316 msgid "A parser to play Daisy CD's with Linux"
316317 msgstr "Een programma om Daisy CD's af te spelen"
317318
318 #: src/daisy-player.c:1795
319 #: src/daisy-player.c:1874
319320 msgid "Scanning for a Daisy CD..."
320321 msgstr "Zoeken naar een Daisy CD..."
321322
322 #: src/daisy-player.c:1896 src/daisy-player.c:2031
323 #: src/daisy-player.c:1971 src/daisy-player.c:2098
323324 msgid "No DAISY-CD or Audio-cd found"
324325 msgstr "Geen DAISY-CD of Audio-CD gevonden"
325326
326327 # 36
327 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
328 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
328329 msgid "No Daisy CD in drive."
329330 msgstr "Geen daisy-cd in speler."
330331
331 #: src/daisy-player.c:2014
332 #: src/daisy-player.c:2081
332333 msgid "Found an Audio-CD."
333334 msgstr "Een Audio-CD gevonden."
334335
335 #: src/daisy-player.c:2016
336 #: src/daisy-player.c:2083
336337 msgid "Get titles from freedb.freedb.org..."
337338 msgstr "Haal de titels op bij freedb.freedb.org..."
338339
339340 # 13
340 #: src/daisy-player.c:2145
341 #: src/daisy-player.c:2212
341342 #, c-format
342343 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
343344 msgstr "Daisy-player - Versie %s - (C)2017 J. Lemmens"
344345
345346 # 22
346 #: src/daisy-player.c:2158
347 #: src/daisy-player.c:2225
347348 msgid "Press 'h' for help"
348349 msgstr "Druk op'h' voor hulp"
Binary diff not shown
2121 msgstr ""
2222 "Project-Id-Version: gettext 0.11.2\n"
2323 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
24 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
24 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2525 "PO-Revision-Date: 2013-01-29 15:06+0200\n"
2626 "Last-Translator: Patryk Doering <http://www.rekinet.pl>\n"
2727 "Language-Team: Patryk Doering <http://www.rekinet.pl>Language: pl\n"
3030 "Content-Type: text/plain; charset=UTF-8\n"
3131 "Content-Transfer-Encoding: 8bit\n"
3232
33 #: src/common.c:91
33 #: src/common.c:111
3434 msgid "eBook-speaker cannot handle this file."
3535 msgstr "eBook-speaker nie może obsłużyć tego pliku."
3636
37 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
37 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3838 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
3939 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
41 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
42 #: src/daisy-player.c:2072
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
41 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
42 #: src/daisy-player.c:2139
4343 #, c-format
4444 msgid "Cannot read %s"
4545 msgstr "Nie można odczytać %s"
4646
47 #: src/common.c:688
47 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
48 #: src/daisy-player.c:1181
49 msgid "This book has no audio. Play this book with eBook-speaker"
50 msgstr "Ta książka nie ma dźwięku. Zagraj w tę książkę z eBook-speakerem"
51
52 #: src/common.c:574
4853 msgid "Please try to play this book with daisy-player"
4954 msgstr "Staraj się zagrać w tę książkę z daisy-player"
5055
51 #: src/common.c:1023
56 #: src/common.c:905
5257 #, c-format
5358 msgid "Cannot read type: %d"
5459 msgstr "Nie można odczytać typ: %d"
5560
56 #: src/common.c:1097
61 #: src/common.c:982
5762 msgid "Go to page number:"
5863 msgstr "Idź do strony numer:"
5964
60 #: src/common.c:1115
65 #: src/common.c:1000
6166 msgid "Please wait..."
6267 msgstr "Proszę czekać..."
6368
64 #: src/common.c:1175
69 #: src/common.c:1060
6570 msgid "Select a soundcard:"
6671 msgstr "Wybierz kartę dźwiękową:"
6772
68 #: src/common.c:1177
73 #: src/common.c:1062
6974 msgid "Cannot read /proc/asound/cards"
7075 msgstr "Nie można odczytać /proc/asound/cards "
71
72 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
73 msgid "This book has no audio. Play this book with eBook-speaker"
74 msgstr "Ta książka nie ma dźwięku. Zagraj w tę książkę z eBook-speakerem"
7576
7677 #: src/daisy3.c:1068
7778 msgid "No items found. Try option \"-N\"."
100101 msgid "total length: %02d:%02d:%02d"
101102 msgstr "Długość całkowita: %02d:%02d:%02d"
102103
103 #: src/daisy-player.c:598
104 #: src/daisy-player.c:606
104105 msgid "These commands are available in this version:"
105106 msgstr "Te polecenia są dostępne w tej wersji:"
106107
107 #: src/daisy-player.c:602
108 #: src/daisy-player.c:610
108109 msgid "cursor down,2 - move cursor to the next item"
109110 msgstr "Kursor w dół,2 - przesuń kursor do następnego elementu"
110111
111 #: src/daisy-player.c:604
112 #: src/daisy-player.c:612
112113 msgid "cursor up,8 - move cursor to the previous item"
113114 msgstr "Kursor w górę,8 - przesuń kursor do poprzedniej pozycji"
114115
115 #: src/daisy-player.c:606
116 #: src/daisy-player.c:614
116117 msgid "cursor right,6 - skip to next phrase"
117118 msgstr "Kursor w prawo,6 - przejście do następnej frazy"
118119
119 #: src/daisy-player.c:608
120 #: src/daisy-player.c:616
120121 msgid "cursor left,4 - skip to previous phrase"
121122 msgstr "Kursor w lewo,4 - przejście do poprzedniej frazy"
122123
123 #: src/daisy-player.c:610
124 #: src/daisy-player.c:618
124125 msgid "page-down,3 - view next page"
125126 msgstr "page-down,3 - zobacz następną stronę"
126127
127 #: src/daisy-player.c:612
128 #: src/daisy-player.c:620
128129 msgid "page-up,9 - view previous page"
129130 msgstr "page-up,9 - zobacz poprzednią stronę"
130131
131 #: src/daisy-player.c:614
132 #: src/daisy-player.c:622
132133 msgid "enter - start playing"
133134 msgstr "Enter - rozpoczęcie odtwarzania "
134135
135 #: src/daisy-player.c:616
136 #: src/daisy-player.c:624
136137 msgid "space,0 - pause/resume playing"
137138 msgstr "Space,0 - zatrzymanie odtwarzania "
138139
139 #: src/daisy-player.c:618
140 #: src/daisy-player.c:626
140141 msgid "home,* - play on normal speed"
141142 msgstr "Home,* - odtwarzanie na standardowej prędkości "
142143
143 #: src/daisy-player.c:620
144 #: src/daisy-player.c:628
144145 msgid "Press any key for next page..."
145146 msgstr "Naciśnij dowolny klawisz na następnej stronie..."
146147
147 #: src/daisy-player.c:626
148 #: src/daisy-player.c:634
148149 msgid "/ - search for a label"
149150 msgstr "/ - sprawdź etykietę "
150151
151 #: src/daisy-player.c:628
152 #: src/daisy-player.c:636
152153 msgid "d - store current item to disk"
153154 msgstr "d - zapisz aktualną pozycję na dysku "
154155
155 #: src/daisy-player.c:630
156 #: src/daisy-player.c:638
156157 msgid "D,- - decrease playing speed"
157158 msgstr "D,- - zmniejszenie prędkości odtwarzania "
158159
159 #: src/daisy-player.c:632
160 #: src/daisy-player.c:640
160161 msgid "e,. - quit daisy-player, place a bookmark and eject"
161162 msgstr "e,. - zamknij daisy-player, umieść zakładkę i wysunąć"
162163
163 #: src/daisy-player.c:634
164 #: src/daisy-player.c:642
164165 msgid ""
165166 "f - find the currently playing item and place the cursor there"
166167 msgstr "f - znajdź element aktualnie odtwarzany i umieść tam kursor "
167168
168 #: src/daisy-player.c:637
169 #: src/daisy-player.c:645
169170 msgid "g - go to time in this song (MM:SS)"
170171 msgstr "g - idź do czasu odtwarzania tej pozycji (mm:ss) "
171172
172 #: src/daisy-player.c:640
173 #: src/daisy-player.c:648
173174 msgid "g - go to time in this item (MM:SS)"
174175 msgstr "g - idź do czasu odtwarzania tej pozycji (mm:ss) "
175176
176 #: src/daisy-player.c:643
177 #: src/daisy-player.c:651
177178 msgid "G - go to page number"
178179 msgstr "G - przejdź do strony numer (jeśli jest) "
179180
180 #: src/daisy-player.c:645
181 #: src/daisy-player.c:653
181182 msgid "h,? - give this help"
182183 msgstr "h,? - pomoc "
183184
184 #: src/daisy-player.c:647
185 #: src/daisy-player.c:655
185186 msgid "j,5 - just play current item"
186187 msgstr "j,5 - po prostu odtwarza aktualną pozycję "
187188
188 #: src/daisy-player.c:649
189 #: src/daisy-player.c:657
189190 msgid "l - switch to next level"
190191 msgstr "l - przejście do następnego poziomu "
191192
192 #: src/daisy-player.c:651
193 #: src/daisy-player.c:659
193194 msgid "L - switch to previous level"
194195 msgstr "l - przejście do poprzedniego poziomu "
195196
196 #: src/daisy-player.c:653
197 #: src/daisy-player.c:661
197198 msgid "n - search forwards"
198199 msgstr "n - wyszukiwanie w przód "
199200
200 #: src/daisy-player.c:655
201 #: src/daisy-player.c:663
201202 msgid "N - search backwards"
202203 msgstr "n - wyszukiwanie do tyłu "
203204
204 #: src/daisy-player.c:657
205 #: src/daisy-player.c:665
205206 msgid "o - select next output sound device"
206207 msgstr "o - wybierz wyjściowe urządzenie dźwiękowe "
207208
208 #: src/daisy-player.c:659
209 #: src/daisy-player.c:667
209210 msgid "p - place a bookmark"
210211 msgstr "p - umieść zakładkę "
211212
212 #: src/daisy-player.c:661
213 #: src/daisy-player.c:669
213214 msgid "q - quit daisy-player and place a bookmark"
214215 msgstr "q - wyjście z daisy-playera i umieszczenie zakładki "
215216
216 #: src/daisy-player.c:663
217 #: src/daisy-player.c:671
217218 msgid "s - stop playing"
218219 msgstr "s - zatrzymanie odtwarzania "
219220
220 #: src/daisy-player.c:665
221 #: src/daisy-player.c:673
221222 msgid "U,+ - increase playing speed"
222223 msgstr "U,+ - zwiększenie prędkości odtwarzania "
223224
224 #: src/daisy-player.c:667
225 #: src/daisy-player.c:675
225226 msgid "v,1 - decrease playback volume"
226227 msgstr "V,1 - zmniejszenie głośności odtwarzania"
227228
228 #: src/daisy-player.c:669
229 #: src/daisy-player.c:677
229230 msgid "V,7 - increase playback volume (beware of Clipping)"
230231 msgstr "V,7 - zwiększaj głośność odtwarzania (uważaj na przycinanie)"
231232
232 #: src/daisy-player.c:671
233 #: src/daisy-player.c:679
233234 msgid "Press any key to leave help..."
234235 msgstr "Naciśnij dowolny klawisz, aby opuścić pomoc... "
235236
236 #: src/daisy-player.c:818
237 #: src/daisy-player.c:826
237238 msgid "Please wait... -------------------------"
238239 msgstr "Proszę czekać... ------------------------- "
239240
240 #: src/daisy-player.c:923
241 #: src/daisy-player.c:931
241242 msgid "What do you search?"
242243 msgstr "Czego szukasz?"
243244
244 #: src/daisy-player.c:1024
245 #: src/daisy-player.c:1032
245246 msgid "Go to time (MM:SS):"
246247 msgstr "Idź do czasu (mm:ss):"
247248
248 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
249 #: src/daisy-player.c:1916 src/daisy-player.c:1932
249 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
250 #: src/daisy-player.c:1991 src/daisy-player.c:2007
250251 #, c-format
251252 msgid "Daisy-player - Version %s %s"
252253 msgstr "Daisy-player - Wersja %s %s"
253254
254 #: src/daisy-player.c:1583
255 #: src/daisy-player.c:1643
255256 #, c-format
256257 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
257258 msgstr "Użycie: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
258259
259 #: src/daisy-player.c:1585
260 #: src/daisy-player.c:1645
260261 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
261262 msgstr "[-c cdrom_device] [-d ALSA_sound_device]"
262263
263 #: src/daisy-player.c:1598
264 #: src/daisy-player.c:1658
264265 msgid "Cannot read /proc/mounts."
265266 msgstr "Nie można odczytać /proc/mounts. "
266267
267 #: src/daisy-player.c:1793
268 #: src/daisy-player.c:1872
268269 msgid "A parser to play Daisy CD's with Linux"
269270 msgstr "Parser odtwarza z Daisy CD's i Linuksem"
270271
271 #: src/daisy-player.c:1795
272 #: src/daisy-player.c:1874
272273 msgid "Scanning for a Daisy CD..."
273274 msgstr "Skanowanie Daisy CD... "
274275
275 #: src/daisy-player.c:1896 src/daisy-player.c:2031
276 #: src/daisy-player.c:1971 src/daisy-player.c:2098
276277 msgid "No DAISY-CD or Audio-cd found"
277278 msgstr "To nie jest Daisy-CD ani Audio-CD. "
278279
279 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
280 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
280281 msgid "No Daisy CD in drive."
281282 msgstr "W napędzie nie ma Daisy-CD. "
282283
283 #: src/daisy-player.c:2014
284 #: src/daisy-player.c:2081
284285 msgid "Found an Audio-CD."
285286 msgstr "Znaleziono Audio-CD."
286287
287 #: src/daisy-player.c:2016
288 #: src/daisy-player.c:2083
288289 msgid "Get titles from freedb.freedb.org..."
289290 msgstr "Pobierz tytuły z freedb.freedb.org... "
290291
291 #: src/daisy-player.c:2145
292 #: src/daisy-player.c:2212
292293 #, c-format
293294 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
294295 msgstr "Daisy-player - Wersja %s - (C)2017 J. Lemmens"
295296
296 #: src/daisy-player.c:2158
297 #: src/daisy-player.c:2225
297298 msgid "Press 'h' for help"
298299 msgstr "Naciśnij 'h' jeśli potrzebujesz pomocy"
Binary diff not shown
2222 msgstr ""
2323 "Project-Id-Version: gettext 0.11.2\n"
2424 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
25 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
25 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2626 "PO-Revision-Date: 2014-08-26 15:45+0200\n"
2727 "Last-Translator: Thais Rizzi <thais.rizzi@gmail.com>\n"
2828 "Language-Team: Thais Rizzi <thais.rizzi@gmail.com>\n"
3131 "Content-Type: text/plain; charset=UTF-8\n"
3232 "Content-Transfer-Encoding: 8bit\n"
3333
34 #: src/common.c:91
34 #: src/common.c:111
3535 msgid "eBook-speaker cannot handle this file."
3636 msgstr "O eBook-speaker não pode lidar com este arquivo."
3737
38 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
38 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3939 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
4040 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
41 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
42 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
43 #: src/daisy-player.c:2072
41 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
42 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
43 #: src/daisy-player.c:2139
4444 #, c-format
4545 msgid "Cannot read %s"
4646 msgstr "Não consegue ler %s"
4747
48 #: src/common.c:688
48 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
49 #: src/daisy-player.c:1181
50 msgid "This book has no audio. Play this book with eBook-speaker"
51 msgstr "Este livro não tem áudio. Reproduzir este livro com eBook-speaker"
52
53 #: src/common.c:574
4954 msgid "Please try to play this book with daisy-player"
5055 msgstr "Por favor, tente jogar este livro com o daisy-player"
5156
52 #: src/common.c:1023
57 #: src/common.c:905
5358 #, c-format
5459 msgid "Cannot read type: %d"
5560 msgstr "Não conseguer ler tipo: %d"
5661
57 #: src/common.c:1097
62 #: src/common.c:982
5863 msgid "Go to page number:"
5964 msgstr "Vá para a página número:"
6065
61 #: src/common.c:1115
66 #: src/common.c:1000
6267 msgid "Please wait..."
6368 msgstr "Por favor, espere..."
6469
65 #: src/common.c:1175
70 #: src/common.c:1060
6671 msgid "Select a soundcard:"
6772 msgstr "Selecione uma placa de som:"
6873
69 #: src/common.c:1177
74 #: src/common.c:1062
7075 msgid "Cannot read /proc/asound/cards"
7176 msgstr "Não consegue ler /proc/asound/cards"
72
73 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
74 msgid "This book has no audio. Play this book with eBook-speaker"
75 msgstr "Este livro não tem áudio. Reproduzir este livro com eBook-speaker"
7677
7778 #: src/daisy3.c:1068
7879 msgid "No items found. Try option \"-N\"."
101102 msgid "total length: %02d:%02d:%02d"
102103 msgstr "comprimento total: %02d:%02d:%02d"
103104
104 #: src/daisy-player.c:598
105 #: src/daisy-player.c:606
105106 msgid "These commands are available in this version:"
106107 msgstr "Esse comandos estão disponíveis nessa versão:"
107108
108 #: src/daisy-player.c:602
109 #: src/daisy-player.c:610
109110 msgid "cursor down,2 - move cursor to the next item"
110111 msgstr "cursor para baixo,2 - move o cursor para o próximo item"
111112
112 #: src/daisy-player.c:604
113 #: src/daisy-player.c:612
113114 msgid "cursor up,8 - move cursor to the previous item"
114115 msgstr "cursor para cima,8 - move o cursor para o item anterior"
115116
116 #: src/daisy-player.c:606
117 #: src/daisy-player.c:614
117118 msgid "cursor right,6 - skip to next phrase"
118119 msgstr "cursor para direita,6 - pula para a proxima frase"
119120
120 #: src/daisy-player.c:608
121 #: src/daisy-player.c:616
121122 msgid "cursor left,4 - skip to previous phrase"
122123 msgstr "cursor para esquerda,4 - pula para a frase anterior"
123124
124 #: src/daisy-player.c:610
125 #: src/daisy-player.c:618
125126 msgid "page-down,3 - view next page"
126127 msgstr "page-down,3 - ver página seguinte"
127128
128 #: src/daisy-player.c:612
129 #: src/daisy-player.c:620
129130 msgid "page-up,9 - view previous page"
130131 msgstr "page-up,9 - ver página anterior"
131132
132 #: src/daisy-player.c:614
133 #: src/daisy-player.c:622
133134 msgid "enter - start playing"
134135 msgstr "enter - comece a reprodução"
135136
136 #: src/daisy-player.c:616
137 #: src/daisy-player.c:624
137138 msgid "space,0 - pause/resume playing"
138139 msgstr "espaço,0 - pausa/ resumir reprodução"
139140
140 #: src/daisy-player.c:618
141 #: src/daisy-player.c:626
141142 msgid "home,* - play on normal speed"
142143 msgstr "home,* - reproduzir em velocidade normal"
143144
144 #: src/daisy-player.c:620
145 #: src/daisy-player.c:628
145146 msgid "Press any key for next page..."
146147 msgstr "Pressione qualquer tecla para a próxima pagina..."
147148
148 #: src/daisy-player.c:626
149 #: src/daisy-player.c:634
149150 msgid "/ - search for a label"
150151 msgstr "/ - procure por uma etiqueta"
151152
152 #: src/daisy-player.c:628
153 #: src/daisy-player.c:636
153154 msgid "d - store current item to disk"
154155 msgstr "d - armazena o item atual no disco"
155156
156 #: src/daisy-player.c:630
157 #: src/daisy-player.c:638
157158 msgid "D,- - decrease playing speed"
158159 msgstr "D,- - diminui a velocidade da reprodução"
159160
160 #: src/daisy-player.c:632
161 #: src/daisy-player.c:640
161162 msgid "e,. - quit daisy-player, place a bookmark and eject"
162163 msgstr "e,. - sair do daisy-player, colocar um marcador e ejetar"
163164
164 #: src/daisy-player.c:634
165 #: src/daisy-player.c:642
165166 msgid ""
166167 "f - find the currently playing item and place the cursor there"
167168 msgstr "f - procura o item atual de reprodução e colocar o cursor lá"
168169
169 #: src/daisy-player.c:637
170 #: src/daisy-player.c:645
170171 msgid "g - go to time in this song (MM:SS)"
171172 msgstr "g - vai para determinado tempo nessa musica (MM:SS)"
172173
173 #: src/daisy-player.c:640
174 #: src/daisy-player.c:648
174175 msgid "g - go to time in this item (MM:SS)"
175176 msgstr "g - vai para determinado tempo nessa item (MM:SS)"
176177
177 #: src/daisy-player.c:643
178 #: src/daisy-player.c:651
178179 msgid "G - go to page number"
179180 msgstr "G - vai para o número de pagina (se tiver algum)"
180181
181 #: src/daisy-player.c:645
182 #: src/daisy-player.c:653
182183 msgid "h,? - give this help"
183184 msgstr "h,? - dê essa ajuda"
184185
185 #: src/daisy-player.c:647
186 #: src/daisy-player.c:655
186187 msgid "j,5 - just play current item"
187188 msgstr "j,5 - só reproduza o item atual"
188189
189 #: src/daisy-player.c:649
190 #: src/daisy-player.c:657
190191 msgid "l - switch to next level"
191192 msgstr "l - mude para o proximo nível"
192193
193 #: src/daisy-player.c:651
194 #: src/daisy-player.c:659
194195 msgid "L - switch to previous level"
195196 msgstr "L - mude para o nível anterior"
196197
197 #: src/daisy-player.c:653
198 #: src/daisy-player.c:661
198199 msgid "n - search forwards"
199200 msgstr "n - procure a frente "
200201
201 #: src/daisy-player.c:655
202 #: src/daisy-player.c:663
202203 msgid "N - search backwards"
203204 msgstr "N - procure para trás"
204205
205 #: src/daisy-player.c:657
206 #: src/daisy-player.c:665
206207 msgid "o - select next output sound device"
207208 msgstr "o - selecione o próximo dispositivo de saída de som"
208209
209 #: src/daisy-player.c:659
210 #: src/daisy-player.c:667
210211 msgid "p - place a bookmark"
211212 msgstr "p - coloque o marcador"
212213
213 #: src/daisy-player.c:661
214 #: src/daisy-player.c:669
214215 msgid "q - quit daisy-player and place a bookmark"
215216 msgstr "q - saia do daisy-player e coloque o marcador"
216217
217 #: src/daisy-player.c:663
218 #: src/daisy-player.c:671
218219 msgid "s - stop playing"
219220 msgstr "s - pare de reproduzir"
220221
221 #: src/daisy-player.c:665
222 #: src/daisy-player.c:673
222223 msgid "U,+ - increase playing speed"
223224 msgstr "U,+ - aumente a velocidade de reprodução"
224225
225 #: src/daisy-player.c:667
226 #: src/daisy-player.c:675
226227 msgid "v,1 - decrease playback volume"
227228 msgstr "v,1 - diminuir o volume de reprodução"
228229
229 #: src/daisy-player.c:669
230 #: src/daisy-player.c:677
230231 msgid "V,7 - increase playback volume (beware of Clipping)"
231232 msgstr "V,7 - aumentar o volume de reprodução (cuidado com Clipping)"
232233
233 #: src/daisy-player.c:671
234 #: src/daisy-player.c:679
234235 msgid "Press any key to leave help..."
235236 msgstr "Aperte qualquer tecla para sair da ajuda..."
236237
237 #: src/daisy-player.c:818
238 #: src/daisy-player.c:826
238239 msgid "Please wait... -------------------------"
239240 msgstr "Por favor espere ... -------------------------------"
240241
241 #: src/daisy-player.c:923
242 #: src/daisy-player.c:931
242243 msgid "What do you search?"
243244 msgstr "O que você procura?"
244245
245 #: src/daisy-player.c:1024
246 #: src/daisy-player.c:1032
246247 msgid "Go to time (MM:SS):"
247248 msgstr "Vá para o tempo (MM:SS):"
248249
249 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
250 #: src/daisy-player.c:1916 src/daisy-player.c:1932
250 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
251 #: src/daisy-player.c:1991 src/daisy-player.c:2007
251252 #, c-format
252253 msgid "Daisy-player - Version %s %s"
253254 msgstr "Daisy-player - Versão %s %s"
254255
255 #: src/daisy-player.c:1583
256 #: src/daisy-player.c:1643
256257 #, c-format
257258 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
258259 msgstr "Uso: %s [diretório_com_estrutura_Daisy] | [Daisy_book_archive]"
259260
260 #: src/daisy-player.c:1585
261 #: src/daisy-player.c:1645
261262 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
262263 msgstr "[ -c cdrom_dispositivo] [-d ALSA_dispositivo_de_som] [-n | -y]"
263264
264 #: src/daisy-player.c:1598
265 #: src/daisy-player.c:1658
265266 msgid "Cannot read /proc/mounts."
266267 msgstr "Não consegue ler /proc/mounts."
267268
268 #: src/daisy-player.c:1793
269 #: src/daisy-player.c:1872
269270 msgid "A parser to play Daisy CD's with Linux"
270271 msgstr "Um analisador para reproduzir Daisy CD's com o Linux"
271272
272 #: src/daisy-player.c:1795
273 #: src/daisy-player.c:1874
273274 msgid "Scanning for a Daisy CD..."
274275 msgstr "Procurando por um CD Daisy..."
275276
276 #: src/daisy-player.c:1896 src/daisy-player.c:2031
277 #: src/daisy-player.c:1971 src/daisy-player.c:2098
277278 msgid "No DAISY-CD or Audio-cd found"
278279 msgstr "Nenhum CD DAISY ou CD de áudio identificado"
279280
280 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
281 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
281282 msgid "No Daisy CD in drive."
282283 msgstr "Nenhum CD Daisy no drive."
283284
284 #: src/daisy-player.c:2014
285 #: src/daisy-player.c:2081
285286 msgid "Found an Audio-CD."
286287 msgstr "CD de áudio identificado."
287288
288 #: src/daisy-player.c:2016
289 #: src/daisy-player.c:2083
289290 msgid "Get titles from freedb.freedb.org..."
290291 msgstr "Pegar títulos do freedb.freedb.org..."
291292
292 #: src/daisy-player.c:2145
293 #: src/daisy-player.c:2212
293294 #, c-format
294295 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
295296 msgstr "Daisy-player - Versão %s - (C)2017 J. Lemmens"
296297
297 #: src/daisy-player.c:2158
298 #: src/daisy-player.c:2225
298299 msgid "Press 'h' for help"
299300 msgstr "Pressione 'h' para ajuda"
Binary diff not shown
2121 msgstr ""
2222 "Project-Id-Version: gettext 0.11.2\n"
2323 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
24 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
24 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2525 "PO-Revision-Date: 2015-02-17 17:06+0200\n"
2626 "Last-Translator: Tadej Čepin <tadej.cepin@gmail.com>\n"
2727 "Language-Team: Tadej Čepin <tadej.cepin@gmail.com>\n"
3030 "Content-Type: text/plain; charset=UTF-8\n"
3131 "Content-Transfer-Encoding: 8bit\n"
3232
33 #: src/common.c:91
33 #: src/common.c:111
3434 msgid "eBook-speaker cannot handle this file."
3535 msgstr "eBook-speaker ne more ravnati s to datoteko."
3636
37 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
37 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3838 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
3939 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
41 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
42 #: src/daisy-player.c:2072
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
41 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
42 #: src/daisy-player.c:2139
4343 #, c-format
4444 msgid "Cannot read %s"
4545 msgstr "Ne morem prebrati %s"
4646
47 #: src/common.c:688
47 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
48 #: src/daisy-player.c:1181
49 msgid "This book has no audio. Play this book with eBook-speaker"
50 msgstr "Ta knjiga nima zvoka. Igraj to knjigo z eBook-speaker"
51
52 #: src/common.c:574
4853 msgid "Please try to play this book with daisy-player"
4954 msgstr "Prosimo, poskusite igrati to knjigo z daisy-player"
5055
51 #: src/common.c:1023
56 #: src/common.c:905
5257 #, c-format
5358 msgid "Cannot read type: %d"
5459 msgstr "Ne morem prebrati zvrsti: %d"
5560
56 #: src/common.c:1097
61 #: src/common.c:982
5762 msgid "Go to page number:"
5863 msgstr "Pojdi na stran s številko:"
5964
60 #: src/common.c:1115
65 #: src/common.c:1000
6166 msgid "Please wait..."
6267 msgstr "Prosim počakaj..."
6368
64 #: src/common.c:1175
69 #: src/common.c:1060
6570 msgid "Select a soundcard:"
6671 msgstr "Izberi zvočno kartico:"
6772
68 #: src/common.c:1177
73 #: src/common.c:1062
6974 msgid "Cannot read /proc/asound/cards"
7075 msgstr "Ne morem prebrati /proc/asound/cards"
71
72 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
73 msgid "This book has no audio. Play this book with eBook-speaker"
74 msgstr "Ta knjiga nima zvoka. Igraj to knjigo z eBook-speaker"
7576
7677 #: src/daisy3.c:1068
7778 msgid "No items found. Try option \"-N\"."
100101 msgid "total length: %02d:%02d:%02d"
101102 msgstr "skupna dolžina: %02d:%02d:%02d"
102103
103 #: src/daisy-player.c:598
104 #: src/daisy-player.c:606
104105 msgid "These commands are available in this version:"
105106 msgstr "V tej različici so na voljo naslednji ukazi:"
106107
107 #: src/daisy-player.c:602
108 #: src/daisy-player.c:610
108109 msgid "cursor down,2 - move cursor to the next item"
109110 msgstr "puščica navzdol,2 - premakni utripalko na naslednji element"
110111
111 #: src/daisy-player.c:604
112 #: src/daisy-player.c:612
112113 msgid "cursor up,8 - move cursor to the previous item"
113114 msgstr "puščica navzgor,8 - premakni utripalko na predhodni element"
114115
115 #: src/daisy-player.c:606
116 #: src/daisy-player.c:614
116117 msgid "cursor right,6 - skip to next phrase"
117118 msgstr "puščica desno,6 - skoči na naslednjo frazo"
118119
119 #: src/daisy-player.c:608
120 #: src/daisy-player.c:616
120121 msgid "cursor left,4 - skip to previous phrase"
121122 msgstr "puščica levo,4 - skoči na predhodno frazo"
122123
123 #: src/daisy-player.c:610
124 #: src/daisy-player.c:618
124125 msgid "page-down,3 - view next page"
125126 msgstr "stran-dol,3 - pokaži naslednjo stran"
126127
127 #: src/daisy-player.c:612
128 #: src/daisy-player.c:620
128129 msgid "page-up,9 - view previous page"
129130 msgstr "stran-gor,9 - pokaži predhodno stran"
130131
131 #: src/daisy-player.c:614
132 #: src/daisy-player.c:622
132133 msgid "enter - start playing"
133134 msgstr "enter - začni predvajanje"
134135
135 #: src/daisy-player.c:616
136 #: src/daisy-player.c:624
136137 msgid "space,0 - pause/resume playing"
137138 msgstr "preslednica,0 - zaustavi/nadaljuj predvajanje"
138139
139 #: src/daisy-player.c:618
140 #: src/daisy-player.c:626
140141 msgid "home,* - play on normal speed"
141142 msgstr "domov,* - predvajaj z običajno hitrostjo"
142143
143 #: src/daisy-player.c:620
144 #: src/daisy-player.c:628
144145 msgid "Press any key for next page..."
145146 msgstr "Za prehod na naslednjo stran pritisni katerokoli tipko..."
146147
147 #: src/daisy-player.c:626
148 #: src/daisy-player.c:634
148149 msgid "/ - search for a label"
149150 msgstr "/ - poišči etiketo"
150151
151 #: src/daisy-player.c:628
152 #: src/daisy-player.c:636
152153 msgid "d - store current item to disk"
153154 msgstr "d - shrani trenutni element na disk"
154155
155 #: src/daisy-player.c:630
156 #: src/daisy-player.c:638
156157 msgid "D,- - decrease playing speed"
157158 msgstr "D,- - zmanjšaj hitrost predvajanja"
158159
159 #: src/daisy-player.c:632
160 #: src/daisy-player.c:640
160161 msgid "e,. - quit daisy-player, place a bookmark and eject"
161162 msgstr ""
162163 "e,. - izhod iz predvajalnika DAISY, nastavi zaznamek in izvrzi "
163164
164 #: src/daisy-player.c:634
165 #: src/daisy-player.c:642
165166 msgid ""
166167 "f - find the currently playing item and place the cursor there"
167168 msgstr ""
168169 "f - najdi trenutno predvajan predmet in nanj postavi utripalko"
169170
170 #: src/daisy-player.c:637
171 #: src/daisy-player.c:645
171172 msgid "g - go to time in this song (MM:SS)"
172173 msgstr "g - pojdi na čas v tej skladbi (MM:SS)"
173174
174 #: src/daisy-player.c:640
175 #: src/daisy-player.c:648
175176 msgid "g - go to time in this item (MM:SS)"
176177 msgstr "g - pojdi na čas v tej skladbi (MM:SS)"
177178
178 #: src/daisy-player.c:643
179 #: src/daisy-player.c:651
179180 msgid "G - go to page number"
180181 msgstr "G - pojdi na stran s številko"
181182
182 #: src/daisy-player.c:645
183 #: src/daisy-player.c:653
183184 msgid "h,? - give this help"
184185 msgstr "h,? - podaj to pomoč"
185186
186 #: src/daisy-player.c:647
187 #: src/daisy-player.c:655
187188 msgid "j,5 - just play current item"
188189 msgstr "j,5 - samo predvajaj trenutni element"
189190
190 #: src/daisy-player.c:649
191 #: src/daisy-player.c:657
191192 msgid "l - switch to next level"
192193 msgstr "l - preklopi na naslednji nivo"
193194
194 #: src/daisy-player.c:651
195 #: src/daisy-player.c:659
195196 msgid "L - switch to previous level"
196197 msgstr "L - preklopi na prejšnji nivo"
197198
198 #: src/daisy-player.c:653
199 #: src/daisy-player.c:661
199200 msgid "n - search forwards"
200201 msgstr "n - išči naprej"
201202
202 #: src/daisy-player.c:655
203 #: src/daisy-player.c:663
203204 msgid "N - search backwards"
204205 msgstr "N - išči nazaj"
205206
206 #: src/daisy-player.c:657
207 #: src/daisy-player.c:665
207208 msgid "o - select next output sound device"
208209 msgstr "o - izberi naslednjo izhodno zvočno napravo"
209210
210 #: src/daisy-player.c:659
211 #: src/daisy-player.c:667
211212 msgid "p - place a bookmark"
212213 msgstr "p - postavi zaznamek"
213214
214 #: src/daisy-player.c:661
215 #: src/daisy-player.c:669
215216 msgid "q - quit daisy-player and place a bookmark"
216217 msgstr "q - zapusti predvajalnik DAISY in postavi zaznamek"
217218
218 #: src/daisy-player.c:663
219 #: src/daisy-player.c:671
219220 msgid "s - stop playing"
220221 msgstr "s - zaustavi predvajanje"
221222
222 #: src/daisy-player.c:665
223 #: src/daisy-player.c:673
223224 msgid "U,+ - increase playing speed"
224225 msgstr "U,+ - povečaj hitrost predvajanja"
225226
226 #: src/daisy-player.c:667
227 #: src/daisy-player.c:675
227228 msgid "v,1 - decrease playback volume"
228229 msgstr "v,1 - zmanjša predvajanja glasnosti"
229230
230 #: src/daisy-player.c:669
231 #: src/daisy-player.c:677
231232 msgid "V,7 - increase playback volume (beware of Clipping)"
232233 msgstr "V,7 - povečanje predvajanja volumen (pazi Clipping)"
233234
234 #: src/daisy-player.c:671
235 #: src/daisy-player.c:679
235236 msgid "Press any key to leave help..."
236237 msgstr "Za izhod iz menija pomoči pritisni katerokoli tipko..."
237238
238 #: src/daisy-player.c:818
239 #: src/daisy-player.c:826
239240 msgid "Please wait... -------------------------"
240241 msgstr "Prosim počakaj... -------------------------"
241242
242 #: src/daisy-player.c:923
243 #: src/daisy-player.c:931
243244 msgid "What do you search?"
244245 msgstr "Kaj iščeš?"
245246
246 #: src/daisy-player.c:1024
247 #: src/daisy-player.c:1032
247248 msgid "Go to time (MM:SS):"
248249 msgstr "Pojdi na čas (MM:SS):"
249250
250 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
251 #: src/daisy-player.c:1916 src/daisy-player.c:1932
251 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
252 #: src/daisy-player.c:1991 src/daisy-player.c:2007
252253 #, c-format
253254 msgid "Daisy-player - Version %s %s"
254255 msgstr "Daisy-player - Verzija %s %s"
255256
256 #: src/daisy-player.c:1583
257 #: src/daisy-player.c:1643
257258 #, c-format
258259 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
259260 msgstr "Uporaba: %s [imenik_s_strukturo-DAISY] | [Daisy_book_archive]"
260261
261 #: src/daisy-player.c:1585
262 #: src/daisy-player.c:1645
262263 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
263264 msgstr "[-c cdrom_naprava] [-d ALSA_zvočna_naprava]"
264265
265 #: src/daisy-player.c:1598
266 #: src/daisy-player.c:1658
266267 msgid "Cannot read /proc/mounts."
267268 msgstr "Ne morem prebrati /proc/mounts."
268269
269 #: src/daisy-player.c:1793
270 #: src/daisy-player.c:1872
270271 msgid "A parser to play Daisy CD's with Linux"
271272 msgstr "Razčlenjevalnik, ki predvaja DAISY CD-je na Linux-u"
272273
273 #: src/daisy-player.c:1795
274 #: src/daisy-player.c:1874
274275 msgid "Scanning for a Daisy CD..."
275276 msgstr "Iščem DAISY CD..."
276277
277 #: src/daisy-player.c:1896 src/daisy-player.c:2031
278 #: src/daisy-player.c:1971 src/daisy-player.c:2098
278279 msgid "No DAISY-CD or Audio-cd found"
279280 msgstr "Nisem našel nobenega DAISY CD-ja ali zvočnega CD-ja."
280281
281 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
282 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
282283 msgid "No Daisy CD in drive."
283284 msgstr "V pogonu ni DAISY CD-ja."
284285
285 #: src/daisy-player.c:2014
286 #: src/daisy-player.c:2081
286287 msgid "Found an Audio-CD."
287288 msgstr "Našel sem zvočni CD."
288289
289 #: src/daisy-player.c:2016
290 #: src/daisy-player.c:2083
290291 msgid "Get titles from freedb.freedb.org..."
291292 msgstr "Pridobi naslove iz freedb.freedb.org..."
292293
293 #: src/daisy-player.c:2145
294 #: src/daisy-player.c:2212
294295 #, c-format
295296 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
296297 msgstr "Daisy-player - Verzija %s - (C)2017 J. Lemmens"
297298
298 #: src/daisy-player.c:2158
299 #: src/daisy-player.c:2225
299300 msgid "Press 'h' for help"
300301 msgstr "Za pomoč pritisni tipko 'h'"
Binary diff not shown
2121 msgstr ""
2222 "Project-Id-Version: gettext 0.11.2\n"
2323 "Report-Msgid-Bugs-To: <jos@jlemmens.nl>\n"
24 "POT-Creation-Date: 2017-07-10 16:50+0200\n"
24 "POT-Creation-Date: 2017-08-06 19:57+0200\n"
2525 "PO-Revision-Date: 2014-12-03 15:06+0200\n"
2626 "Last-Translator: Kim Nilsson <kim.nilsson@no-substitute.com>\n"
2727 "Language-Team: Kim Nilsson <kim.nilsson@no-substitute.com>\n"
3030 "Content-Type: text/plain; charset=UTF-8\n"
3131 "Content-Transfer-Encoding: 8bit\n"
3232
33 #: src/common.c:91
33 #: src/common.c:111
3434 msgid "eBook-speaker cannot handle this file."
3535 msgstr "eBook-speaker kan inte hantera den här filen."
3636
37 #: src/common.c:447 src/common.c:523 src/daisy2.02.c:45 src/daisy2.02.c:197
37 #: src/common.c:324 src/common.c:400 src/daisy2.02.c:45 src/daisy2.02.c:197
3838 #: src/daisy3.c:156 src/daisy3.c:225 src/daisy3.c:322 src/daisy3.c:402
3939 #: src/daisy3.c:502 src/daisy3.c:655 src/daisy3.c:712 src/daisy3.c:803
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:732
41 #: src/daisy-player.c:1633 src/daisy-player.c:1662 src/daisy-player.c:1921
42 #: src/daisy-player.c:2072
40 #: src/daisy3.c:878 src/daisy3.c:1098 src/daisy3.c:1228 src/daisy-player.c:740
41 #: src/daisy-player.c:1693 src/daisy-player.c:1722 src/daisy-player.c:1996
42 #: src/daisy-player.c:2139
4343 #, c-format
4444 msgid "Cannot read %s"
4545 msgstr "Kan ej läsa %s"
4646
47 #: src/common.c:688
47 #: src/common.c:538 src/daisy3.c:1052 src/daisy-player.c:807
48 #: src/daisy-player.c:1181
49 msgid "This book has no audio. Play this book with eBook-speaker"
50 msgstr "Den här boken har inget ljud. Spela denna bok med eBook-speaker"
51
52 #: src/common.c:574
4853 msgid "Please try to play this book with daisy-player"
4954 msgstr "Försök att spela den här boken med daisy-player"
5055
51 #: src/common.c:1023
56 #: src/common.c:905
5257 #, c-format
5358 msgid "Cannot read type: %d"
5459 msgstr "Kan inte läsa typ: %d"
5560
56 #: src/common.c:1097
61 #: src/common.c:982
5762 msgid "Go to page number:"
5863 msgstr "Gå till sidnummer:"
5964
60 #: src/common.c:1115
65 #: src/common.c:1000
6166 msgid "Please wait..."
6267 msgstr "Vänta..."
6368
64 #: src/common.c:1175
69 #: src/common.c:1060
6570 msgid "Select a soundcard:"
6671 msgstr "Välj ett ljudkort:"
6772
68 #: src/common.c:1177
73 #: src/common.c:1062
6974 msgid "Cannot read /proc/asound/cards"
7075 msgstr "Kan inte läsa /proc/asound/cards"
71
72 #: src/daisy3.c:1052 src/daisy-player.c:799 src/daisy-player.c:1109
73 msgid "This book has no audio. Play this book with eBook-speaker"
74 msgstr "Den här boken har inget ljud. Spela denna bok med eBook-speaker"
7576
7677 #: src/daisy3.c:1068
7778 msgid "No items found. Try option \"-N\"."
100101 msgid "total length: %02d:%02d:%02d"
101102 msgstr "total längd: %02d:%02d:%02d"
102103
103 #: src/daisy-player.c:598
104 #: src/daisy-player.c:606
104105 msgid "These commands are available in this version:"
105106 msgstr "Dessa kommando är tillgängliga i denna version:"
106107
107 #: src/daisy-player.c:602
108 #: src/daisy-player.c:610
108109 msgid "cursor down,2 - move cursor to the next item"
109110 msgstr "pil ner,2 - gå till nästa rad"
110111
111 #: src/daisy-player.c:604
112 #: src/daisy-player.c:612
112113 msgid "cursor up,8 - move cursor to the previous item"
113114 msgstr "pil upp,8 - gå till föregående rad"
114115
115 #: src/daisy-player.c:606
116 #: src/daisy-player.c:614
116117 msgid "cursor right,6 - skip to next phrase"
117118 msgstr "pil höger,6 - hoppa till nästa fras"
118119
119 #: src/daisy-player.c:608
120 #: src/daisy-player.c:616
120121 msgid "cursor left,4 - skip to previous phrase"
121122 msgstr "pil vänster,4 - hoppa til föregående fras"
122123
123 #: src/daisy-player.c:610
124 #: src/daisy-player.c:618
124125 msgid "page-down,3 - view next page"
125126 msgstr "pgdn,3 - visa nästa sida"
126127
127 #: src/daisy-player.c:612
128 #: src/daisy-player.c:620
128129 msgid "page-up,9 - view previous page"
129130 msgstr "pgup,9 - visa föregående sida"
130131
131 #: src/daisy-player.c:614
132 #: src/daisy-player.c:622
132133 msgid "enter - start playing"
133134 msgstr "enter - börja spela"
134135
135 #: src/daisy-player.c:616
136 #: src/daisy-player.c:624
136137 msgid "space,0 - pause/resume playing"
137138 msgstr "mellanslag,0 - pausa/starta igen"
138139
139 #: src/daisy-player.c:618
140 #: src/daisy-player.c:626
140141 msgid "home,* - play on normal speed"
141142 msgstr "home,* - spela i normal hastighet"
142143
143 #: src/daisy-player.c:620
144 #: src/daisy-player.c:628
144145 msgid "Press any key for next page..."
145146 msgstr "Tryck valfri tangent för nästa sida..."
146147
147 #: src/daisy-player.c:626
148 #: src/daisy-player.c:634
148149 msgid "/ - search for a label"
149150 msgstr "/ - sök efter etikett"
150151
151 #: src/daisy-player.c:628
152 #: src/daisy-player.c:636
152153 msgid "d - store current item to disk"
153154 msgstr "d - spara aktuell rad till fil"
154155
155 #: src/daisy-player.c:630
156 #: src/daisy-player.c:638
156157 msgid "D,- - decrease playing speed"
157158 msgstr "D,- - sänk läshastigheten"
158159
159 #: src/daisy-player.c:632
160 #: src/daisy-player.c:640
160161 msgid "e,. - quit daisy-player, place a bookmark and eject"
161162 msgstr ""
162163 "e,. - stäng av daisy-player, spara ett bokmärke och knuffa ut CD:n"
163164
164 #: src/daisy-player.c:634
165 #: src/daisy-player.c:642
165166 msgid ""
166167 "f - find the currently playing item and place the cursor there"
167168 msgstr "f - hitta det aktuella spåret och vänta där"
168169
169 #: src/daisy-player.c:637
170 #: src/daisy-player.c:645
170171 msgid "g - go to time in this song (MM:SS)"
171172 msgstr "g - gå till viss tid i detta spår (MM:SS)"
172173
173 #: src/daisy-player.c:640
174 #: src/daisy-player.c:648
174175 msgid "g - go to time in this item (MM:SS)"
175176 msgstr "g - gå till viss tid i detta spår (MM:SS)"
176177
177 #: src/daisy-player.c:643
178 #: src/daisy-player.c:651
178179 msgid "G - go to page number"
179180 msgstr "G - gå till sidnummer"
180181
181 #: src/daisy-player.c:645
182 #: src/daisy-player.c:653
182183 msgid "h,? - give this help"
183184 msgstr "h,? - visa denna hjälp"
184185
185 #: src/daisy-player.c:647
186 #: src/daisy-player.c:655
186187 msgid "j,5 - just play current item"
187188 msgstr "j,5 - bara spela aktuellt spår"
188189
189 #: src/daisy-player.c:649
190 #: src/daisy-player.c:657
190191 msgid "l - switch to next level"
191192 msgstr "l - byta till nästa nivå"
192193
193 #: src/daisy-player.c:651
194 #: src/daisy-player.c:659
194195 msgid "L - switch to previous level"
195196 msgstr "L - byta till föregående nivå"
196197
197 #: src/daisy-player.c:653
198 #: src/daisy-player.c:661
198199 msgid "n - search forwards"
199200 msgstr "n - sök framåt"
200201
201 #: src/daisy-player.c:655
202 #: src/daisy-player.c:663
202203 msgid "N - search backwards"
203204 msgstr "N - sök bakåt"
204205
205 #: src/daisy-player.c:657
206 #: src/daisy-player.c:665
206207 msgid "o - select next output sound device"
207208 msgstr "o - välj nästa ljudenhet"
208209
209 #: src/daisy-player.c:659
210 #: src/daisy-player.c:667
210211 msgid "p - place a bookmark"
211212 msgstr "p - spara ett bokmärke"
212213
213 #: src/daisy-player.c:661
214 #: src/daisy-player.c:669
214215 msgid "q - quit daisy-player and place a bookmark"
215216 msgstr "q - stäng av daisy-player och spara ett bokmärke"
216217
217 #: src/daisy-player.c:663
218 #: src/daisy-player.c:671
218219 msgid "s - stop playing"
219220 msgstr "s - sluta spela"
220221
221 #: src/daisy-player.c:665
222 #: src/daisy-player.c:673
222223 msgid "U,+ - increase playing speed"
223224 msgstr "U,+ - öka läshastigheten"
224225
225 #: src/daisy-player.c:667
226 #: src/daisy-player.c:675
226227 msgid "v,1 - decrease playback volume"
227228 msgstr "v,1 - minska uppspelningsvolymen"
228229
229 #: src/daisy-player.c:669
230 #: src/daisy-player.c:677
230231 msgid "V,7 - increase playback volume (beware of Clipping)"
231232 msgstr "V,7 - öka uppspelningsvolymen (se upp för klippning)"
232233
233 #: src/daisy-player.c:671
234 #: src/daisy-player.c:679
234235 msgid "Press any key to leave help..."
235236 msgstr "Tryck valfri tangent för att lämna hjälp..."
236237
237 #: src/daisy-player.c:818
238 #: src/daisy-player.c:826
238239 msgid "Please wait... -------------------------"
239240 msgstr "Vänligen vänta... -------------------------"
240241
241 #: src/daisy-player.c:923
242 #: src/daisy-player.c:931
242243 msgid "What do you search?"
243244 msgstr "Vad söker du efter?"
244245
245 #: src/daisy-player.c:1024
246 #: src/daisy-player.c:1032
246247 msgid "Go to time (MM:SS):"
247248 msgstr "Gå till tid (MM:SS):"
248249
249 #: src/daisy-player.c:1580 src/daisy-player.c:1791 src/daisy-player.c:1809
250 #: src/daisy-player.c:1916 src/daisy-player.c:1932
250 #: src/daisy-player.c:1640 src/daisy-player.c:1870 src/daisy-player.c:1888
251 #: src/daisy-player.c:1991 src/daisy-player.c:2007
251252 #, c-format
252253 msgid "Daisy-player - Version %s %s"
253254 msgstr "Daisy-player - Version %s %s"
254255
255 #: src/daisy-player.c:1583
256 #: src/daisy-player.c:1643
256257 #, c-format
257258 msgid "Usage: %s [directory_with_a_Daisy-structure] | [Daisy_book_archive]"
258259 msgstr "Användning: %s [mapp_med_en_Daisy-struktur] | [Daisy_book_archive]"
259260
260 #: src/daisy-player.c:1585
261 #: src/daisy-player.c:1645
261262 msgid "[-c cdrom_device] [-d ALSA_sound_device]"
262263 msgstr "[-c cdrom_enhet] [-d ALSA_ljudenhet]"
263264
264 #: src/daisy-player.c:1598
265 #: src/daisy-player.c:1658
265266 msgid "Cannot read /proc/mounts."
266267 msgstr "Kan inte läsa /proc/mounts."
267268
268 #: src/daisy-player.c:1793
269 #: src/daisy-player.c:1872
269270 msgid "A parser to play Daisy CD's with Linux"
270271 msgstr "Ett program som spelar Daisy-skivor med Linux"
271272
272 #: src/daisy-player.c:1795
273 #: src/daisy-player.c:1874
273274 msgid "Scanning for a Daisy CD..."
274275 msgstr "Letar efter en Daisy-CD..."
275276
276 #: src/daisy-player.c:1896 src/daisy-player.c:2031
277 #: src/daisy-player.c:1971 src/daisy-player.c:2098
277278 msgid "No DAISY-CD or Audio-cd found"
278279 msgstr "Ingen DAISY-CD eller ljud-cd hittad"
279280
280 #: src/daisy-player.c:1957 src/daisy-player.c:1969 src/daisy-player.c:1996
281 #: src/daisy-player.c:2028 src/daisy-player.c:2040 src/daisy-player.c:2067
281282 msgid "No Daisy CD in drive."
282283 msgstr "Ingen Daisy-CD i CD-spelaren."
283284
284 #: src/daisy-player.c:2014
285 #: src/daisy-player.c:2081
285286 msgid "Found an Audio-CD."
286287 msgstr "Hittade en ljud-cd."
287288
288 #: src/daisy-player.c:2016
289 #: src/daisy-player.c:2083
289290 msgid "Get titles from freedb.freedb.org..."
290291 msgstr "Hämtar titlar från freedb.freedb.org..."
291292
292 #: src/daisy-player.c:2145
293 #: src/daisy-player.c:2212
293294 #, c-format
294295 msgid "Daisy-player - Version %s - (C)2017 J. Lemmens"
295296 msgstr "Daisy-player - Version %s - (C)2017 J. Lemmens"
296297
297 #: src/daisy-player.c:2158
298 #: src/daisy-player.c:2225
298299 msgid "Press 'h' for help"
299300 msgstr "Tryck 'h' för hjälp"
0 AUTOMAKE_OPTIONS = foreign
01 AM_CFLAGS = -D LOCALEDIR=\"$(prefix)/share/locale\" -Wall -Wextra \
1 -Wuninitialized -Winit-self -fno-common \
2 -g -I /usr/include/libxml2/ -O2 -fstack-protector \
2 -Wunused-function -Wuninitialized -Winit-self -fno-common \
3 -g -I /usr/include/libxml2/ -O3 \
34 --param=ssp-buffer-size=4 -Wformat -Werror=format-security \
45 -DPROGRAMNAME_LOCALEDIR=\"${PROGRAMNAME_LOCALEDIR}\"
56 AM_LDFLAGS = -lncursesw -lsox -lxml2 -lcdio -lcdio_cdda -lcdio_paranoia \
6 -lmagic
7 -lmagic -lasound -lmad
8
79 bin_PROGRAMS = daisy-player
8 daisy_player_SOURCES = daisy.h audiocd.c paranoia.c \
9 common.c daisy2.02.c daisy3.c daisy-player.c
10
11 ldadd = $(depend) @LTLIBINTL@
12
13 DEPENDENCIES = $(depend) \
14 LDADD = $(ldadd)
15
16 CLEANFILES = $(EXTRA_PROGRAMS)
17
18 libtool: $(LIBTOOL_DEPS)
19 $(SHELL) ./config.status --recheck
20
21 .c.s:
22 $(COMPILE) -S $<
23
24 again:
25 $(MAKE) clean
26 $(MAKE)
27
28 .PHONY: profile again
29
30 daisy_player_SOURCES = daisy.h audiocd.c paranoia.c common.c daisy2.02.c \
31 daisy3.c daisy-player.c \
32 madplay/global.h madplay/madplay.c madplay/audio.c \
33 madplay/version.h madplay/audio.h \
34 madplay/crc.c madplay/version.c madplay/tag.c \
35 madplay/rgain.h madplay/player.c \
36 madplay/tag.h madplay/audio_wave.c madplay/resample.c \
37 madplay/crc.h madplay/gettext.h madplay/resample.h \
38 madplay/rgain.c \
39 madplay/filter.c madplay/player.h \
40 madplay/filter.h madplay/audio_cdda.c
41
1042 localedir = $(datadir)/locale
9090 bin_PROGRAMS = daisy-player$(EXEEXT)
9191 subdir = src
9292 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
93 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
94 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
95 $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
96 $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/nls.m4 \
97 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
98 $(top_srcdir)/configure.ac
93 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
9994 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
10095 $(ACLOCAL_M4)
10196 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
105100 CONFIG_CLEAN_VPATH_FILES =
106101 am__installdirs = "$(DESTDIR)$(bindir)"
107102 PROGRAMS = $(bin_PROGRAMS)
103 am__dirstamp = $(am__leading_dot)dirstamp
108104 am_daisy_player_OBJECTS = audiocd.$(OBJEXT) paranoia.$(OBJEXT) \
109105 common.$(OBJEXT) daisy2.02.$(OBJEXT) daisy3.$(OBJEXT) \
110 daisy-player.$(OBJEXT)
106 daisy-player.$(OBJEXT) madplay/madplay.$(OBJEXT) \
107 madplay/audio.$(OBJEXT) madplay/crc.$(OBJEXT) \
108 madplay/version.$(OBJEXT) madplay/tag.$(OBJEXT) \
109 madplay/player.$(OBJEXT) madplay/audio_wave.$(OBJEXT) \
110 madplay/resample.$(OBJEXT) madplay/rgain.$(OBJEXT) \
111 madplay/filter.$(OBJEXT) madplay/audio_cdda.$(OBJEXT)
111112 daisy_player_OBJECTS = $(am_daisy_player_OBJECTS)
112113 daisy_player_LDADD = $(LDADD)
113114 AM_V_P = $(am__v_P_@AM_V@)
168169 $(top_srcdir)/mkinstalldirs
169170 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
170171 ACLOCAL = @ACLOCAL@
172 ALLOCA = @ALLOCA@
171173 AMTAR = @AMTAR@
172174 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
173175 AUTOCONF = @AUTOCONF@
248250 XGETTEXT = @XGETTEXT@
249251 XGETTEXT_015 = @XGETTEXT_015@
250252 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
253 YACC = @YACC@
254 YFLAGS = @YFLAGS@
251255 abs_builddir = @abs_builddir@
252256 abs_srcdir = @abs_srcdir@
253257 abs_top_builddir = @abs_top_builddir@
271275 builddir = @builddir@
272276 datadir = @datadir@
273277 datarootdir = @datarootdir@
278 depend_audio = @depend_audio@
274279 docdir = @docdir@
275280 dvidir = @dvidir@
276281 exec_prefix = @exec_prefix@
283288 includedir = @includedir@
284289 infodir = @infodir@
285290 install_sh = @install_sh@
291 ldadd_audio = @ldadd_audio@
286292 libdir = @libdir@
287293 libexecdir = @libexecdir@
288294 localedir = $(datadir)/locale
303309 top_build_prefix = @top_build_prefix@
304310 top_builddir = @top_builddir@
305311 top_srcdir = @top_srcdir@
312 AUTOMAKE_OPTIONS = foreign
306313 AM_CFLAGS = -D LOCALEDIR=\"$(prefix)/share/locale\" -Wall -Wextra \
307 -Wuninitialized -Winit-self -fno-common \
308 -g -I /usr/include/libxml2/ -O2 -fstack-protector \
314 -Wunused-function -Wuninitialized -Winit-self -fno-common \
315 -g -I /usr/include/libxml2/ -O3 \
309316 --param=ssp-buffer-size=4 -Wformat -Werror=format-security \
310317 -DPROGRAMNAME_LOCALEDIR=\"${PROGRAMNAME_LOCALEDIR}\"
311318
312319 AM_LDFLAGS = -lncursesw -lsox -lxml2 -lcdio -lcdio_cdda -lcdio_paranoia \
313 -lmagic
314
315 daisy_player_SOURCES = daisy.h audiocd.c paranoia.c \
316 common.c daisy2.02.c daisy3.c daisy-player.c
320 -lmagic -lasound -lmad
321
322 ldadd = $(depend) @LTLIBINTL@
323 DEPENDENCIES = $(depend) \
324 LDADD = $(ldadd)
325
326 CLEANFILES = $(EXTRA_PROGRAMS)
327 daisy_player_SOURCES = daisy.h audiocd.c paranoia.c common.c daisy2.02.c \
328 daisy3.c daisy-player.c \
329 madplay/global.h madplay/madplay.c madplay/audio.c \
330 madplay/version.h madplay/audio.h \
331 madplay/crc.c madplay/version.c madplay/tag.c \
332 madplay/rgain.h madplay/player.c \
333 madplay/tag.h madplay/audio_wave.c madplay/resample.c \
334 madplay/crc.h madplay/gettext.h madplay/resample.h \
335 madplay/rgain.c \
336 madplay/filter.c madplay/player.h \
337 madplay/filter.h madplay/audio_cdda.c
317338
318339 all: all-am
319340
320341 .SUFFIXES:
321 .SUFFIXES: .c .o .obj
342 .SUFFIXES: .c .o .obj .s
322343 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
323344 @for dep in $?; do \
324345 case '$(am__configure_deps)' in \
328349 exit 1;; \
329350 esac; \
330351 done; \
331 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
352 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src//Makefile'; \
332353 $(am__cd) $(top_srcdir) && \
333 $(AUTOMAKE) --foreign src/Makefile
354 $(AUTOMAKE) --foreign src//Makefile
334355 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
335356 @case '$?' in \
336357 *config.status*) \
390411
391412 clean-binPROGRAMS:
392413 -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
414 madplay/$(am__dirstamp):
415 @$(MKDIR_P) madplay
416 @: > madplay/$(am__dirstamp)
417 madplay/$(DEPDIR)/$(am__dirstamp):
418 @$(MKDIR_P) madplay/$(DEPDIR)
419 @: > madplay/$(DEPDIR)/$(am__dirstamp)
420 madplay/madplay.$(OBJEXT): madplay/$(am__dirstamp) \
421 madplay/$(DEPDIR)/$(am__dirstamp)
422 madplay/audio.$(OBJEXT): madplay/$(am__dirstamp) \
423 madplay/$(DEPDIR)/$(am__dirstamp)
424 madplay/crc.$(OBJEXT): madplay/$(am__dirstamp) \
425 madplay/$(DEPDIR)/$(am__dirstamp)
426 madplay/version.$(OBJEXT): madplay/$(am__dirstamp) \
427 madplay/$(DEPDIR)/$(am__dirstamp)
428 madplay/tag.$(OBJEXT): madplay/$(am__dirstamp) \
429 madplay/$(DEPDIR)/$(am__dirstamp)
430 madplay/player.$(OBJEXT): madplay/$(am__dirstamp) \
431 madplay/$(DEPDIR)/$(am__dirstamp)
432 madplay/audio_wave.$(OBJEXT): madplay/$(am__dirstamp) \
433 madplay/$(DEPDIR)/$(am__dirstamp)
434 madplay/resample.$(OBJEXT): madplay/$(am__dirstamp) \
435 madplay/$(DEPDIR)/$(am__dirstamp)
436 madplay/rgain.$(OBJEXT): madplay/$(am__dirstamp) \
437 madplay/$(DEPDIR)/$(am__dirstamp)
438 madplay/filter.$(OBJEXT): madplay/$(am__dirstamp) \
439 madplay/$(DEPDIR)/$(am__dirstamp)
440 madplay/audio_cdda.$(OBJEXT): madplay/$(am__dirstamp) \
441 madplay/$(DEPDIR)/$(am__dirstamp)
393442
394443 daisy-player$(EXEEXT): $(daisy_player_OBJECTS) $(daisy_player_DEPENDENCIES) $(EXTRA_daisy_player_DEPENDENCIES)
395444 @rm -f daisy-player$(EXEEXT)
397446
398447 mostlyclean-compile:
399448 -rm -f *.$(OBJEXT)
449 -rm -f madplay/*.$(OBJEXT)
400450
401451 distclean-compile:
402452 -rm -f *.tab.c
407457 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/daisy2.02.Po@am__quote@
408458 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/daisy3.Po@am__quote@
409459 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/paranoia.Po@am__quote@
460 @AMDEP_TRUE@@am__include@ @am__quote@madplay/$(DEPDIR)/audio.Po@am__quote@
461 @AMDEP_TRUE@@am__include@ @am__quote@madplay/$(DEPDIR)/audio_cdda.Po@am__quote@
462 @AMDEP_TRUE@@am__include@ @am__quote@madplay/$(DEPDIR)/audio_wave.Po@am__quote@
463 @AMDEP_TRUE@@am__include@ @am__quote@madplay/$(DEPDIR)/crc.Po@am__quote@
464 @AMDEP_TRUE@@am__include@ @am__quote@madplay/$(DEPDIR)/filter.Po@am__quote@
465 @AMDEP_TRUE@@am__include@ @am__quote@madplay/$(DEPDIR)/madplay.Po@am__quote@
466 @AMDEP_TRUE@@am__include@ @am__quote@madplay/$(DEPDIR)/player.Po@am__quote@
467 @AMDEP_TRUE@@am__include@ @am__quote@madplay/$(DEPDIR)/resample.Po@am__quote@
468 @AMDEP_TRUE@@am__include@ @am__quote@madplay/$(DEPDIR)/rgain.Po@am__quote@
469 @AMDEP_TRUE@@am__include@ @am__quote@madplay/$(DEPDIR)/tag.Po@am__quote@
470 @AMDEP_TRUE@@am__include@ @am__quote@madplay/$(DEPDIR)/version.Po@am__quote@
410471
411472 .c.o:
412 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
413 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
473 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
474 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
475 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
414476 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
415477 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
416478 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
417479
418480 .c.obj:
419 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
420 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
481 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
482 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
483 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
421484 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
422485 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
423486 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
533596 mostlyclean-generic:
534597
535598 clean-generic:
599 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
536600
537601 distclean-generic:
538602 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
539603 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
604 -rm -f madplay/$(DEPDIR)/$(am__dirstamp)
605 -rm -f madplay/$(am__dirstamp)
540606
541607 maintainer-clean-generic:
542608 @echo "This command is intended for maintainers to use"
546612 clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
547613
548614 distclean: distclean-am
549 -rm -rf ./$(DEPDIR)
615 -rm -rf ./$(DEPDIR) madplay/$(DEPDIR)
550616 -rm -f Makefile
551617 distclean-am: clean-am distclean-compile distclean-generic \
552618 distclean-tags
592658 installcheck-am:
593659
594660 maintainer-clean: maintainer-clean-am
595 -rm -rf ./$(DEPDIR)
661 -rm -rf ./$(DEPDIR) madplay/$(DEPDIR)
596662 -rm -f Makefile
597663 maintainer-clean-am: distclean-am maintainer-clean-generic
598664
629695 .PRECIOUS: Makefile
630696
631697
698 libtool: $(LIBTOOL_DEPS)
699 $(SHELL) ./config.status --recheck
700
701 .c.s:
702 $(COMPILE) -S $<
703
704 again:
705 $(MAKE) clean
706 $(MAKE)
707
708 .PHONY: profile again
709
632710 # Tell versions [3.59,3.63) of GNU make to not export all variables.
633711 # Otherwise a system limit (for SysV at least) may be exceeded.
634712 .NOEXPORT:
1717 */
1818
1919 #include "daisy.h"
20
21 void set_volume (misc_t *misc)
22 {
23 snd_mixer_t *handle;
24 snd_mixer_selem_id_t *sid;
25 snd_mixer_elem_t *elem;
26
27 if (snd_mixer_open (&handle, 0) != 0)
28 failure (misc, "snd_mixer_open", errno);
29 snd_mixer_attach (handle, misc->sound_dev);
30 snd_mixer_selem_register (handle, NULL, NULL);
31 snd_mixer_load (handle);
32 snd_mixer_selem_id_alloca (&sid);
33 snd_mixer_selem_id_set_index (sid, 0);
34 snd_mixer_selem_id_set_name (sid, "Master");
35 if ((elem = snd_mixer_find_selem (handle, sid)) == NULL)
36 return;
37 snd_mixer_selem_set_playback_volume_all (elem, misc->volume);
38 snd_mixer_close (handle);
39 } // set_volume
2040
2141 char *get_dir_content (misc_t *misc, char *dir_name, char *search_str)
2242 {
137157 _exit (-1);
138158 } // failure
139159
140 void skip_left (misc_t *misc, my_attribute_t *my_attribute,
141 daisy_t *daisy)
142 {
143 int just;
144 #ifdef DAISY_PLAYER
145 char *prev_id;
146
147 prev_id = misc->prev_id;
148 if (*prev_id == 0)
149 {
150 misc->prev_id = strdup (misc->current_id);
151 prev_id = misc->prev_id;
152 } // if
153 if (misc->cd_type == CDIO_DISC_MODE_CD_DA)
154 return;
155 #endif
156 if (misc->playing < 0)
157 {
158 beep ();
159 return;
160 } // if
161 just = misc->just_this_item;
162 if (misc->player_pid > -1)
163 {
164 while (kill (misc->player_pid, SIGKILL) != 0);
165 misc->player_pid = -2;
166 } // if
167 if (misc->reader)
168 xmlTextReaderClose (misc->reader);
169 if (misc->doc)
170 xmlFreeDoc (misc->doc);
171 misc->current = misc->displaying = misc->playing;
172 misc->current_page_number = daisy[misc->current].page_number;
173 #ifdef DAISY_PLAYER
174 if (strcmp (daisy[misc->playing].first_id, misc->audio_id) == 0)
175 #endif
176 #ifdef EBOOK_SPEAKER
177 if (misc->phrase_nr == 1)
178 #endif
179 {
180 if (misc->playing == 0)
181 {
182 beep ();
183 misc->current = misc->displaying = misc->playing;
184 unlink (misc->tmp_wav);
185 unlink ("old.wav");
186 misc->current_page_number = daisy[misc->playing].page_number;
187 #ifdef DAISY_PLAYER
188 open_clips_file (misc, my_attribute, daisy[misc->playing].clips_file,
189 daisy[misc->playing].clips_anchor);
190 misc->current_id = strdup (daisy[misc->playing].first_id);
191 #endif
192 #ifdef EBOOK_SPEAKER
193 open_text_file (misc, my_attribute, daisy[misc->playing].xml_file,
194 daisy[misc->playing].anchor);
195 misc->phrase_nr = 0;
196 misc->player_pid = -2;
197 #endif
198 view_screen (misc, daisy);
199 return;
200 } // if misc->playing == 0
201
202 if (misc->just_this_item > -1 &&
203 daisy[misc->playing].level == misc->level)
204 {
205 beep ();
206 misc->current = misc->displaying = misc->playing;
207 misc->playing = misc->just_this_item = -1;
208 view_screen (misc, daisy);
209 wmove (misc->screenwin, daisy[misc->current].y,
210 daisy[misc->current].x);
211 return;
212 } // if
213
214 // go to previous item
215 misc->current = misc->displaying = --misc->playing;
216 #ifdef DAISY_PLAYER
217 open_clips_file (misc, my_attribute, daisy[misc->playing].clips_file,
218 daisy[misc->playing].clips_anchor);
219 misc->current_id = strdup (daisy[misc->playing].first_id);
220 while (1)
221 {
222 if (strcmp (daisy[misc->playing].last_id, misc->audio_id) == 0)
223 break;
224 get_next_clips (misc, my_attribute, daisy);
225 } // while
226 start_playing (misc, daisy);
227 #endif
228 #ifdef EBOOK_SPEAKER
229 open_text_file (misc, my_attribute,
230 daisy[misc->playing].xml_file, daisy[misc->playing].anchor);
231 misc->phrase_nr = 0;
232 while (1)
233 {
234 if (! get_tag_or_label (misc, my_attribute, misc->reader))
235 return;
236 if (strcasecmp (misc->tag, "pagenum") == 0 ||
237 strcasecmp (my_attribute->class, "pagenum") == 0)
238 {
239 parse_page_number (misc, my_attribute, misc->reader);
240 } // if
241 if (! *misc->label)
242 continue;
243 if (misc->phrase_nr++ == daisy[misc->playing].n_phrases - 2)
244 break;
245 } // while
246 start_playing (misc, my_attribute, daisy);
247 #endif
248 view_screen (misc, daisy);
249 return;
250 } // go to previous item
251
252 #ifdef DAISY_PLAYER
253 open_clips_file (misc, my_attribute, daisy[misc->playing].clips_file,
254 daisy[misc->playing].clips_anchor);
255 while (1)
256 {
257 if (strcmp (misc->current_id, prev_id) == 0)
258 {
259 misc->current = misc->displaying = misc->playing;
260 misc->just_this_item = just;
261 start_playing (misc, daisy);
262 view_screen (misc, daisy);
263 return;
264 } // if
265 misc->prev_id = strdup (misc->audio_id);
266 get_next_clips (misc, my_attribute, daisy);
267 } // while
268 #endif
269 #ifdef EBOOK_SPEAKER
270 misc->player_pid = -2;
271 go_to_phrase (misc, my_attribute, daisy, misc->current,
272 misc->phrase_nr - 1);
273 misc->just_this_item = just;
274 #endif
275 } // skip_left
276
277160 void playfile (misc_t *misc, char *in_file, char *in_type,
278161 char *out_file, char *out_type, char *tempo)
279162 {
363246 args[0] = "-s";
364247 args[1] = tempo;
365248 sox_effect_options (e, 2, args);
366 sox_add_effect (chain, e, &sox_in->signal, &sox_in->signal);
367
368 e = sox_create_effect (sox_find_effect ("vol"));
369 snprintf (misc->str, MAX_STR, "%lf", misc->volume);
370 args[0] = misc->str;
371 sox_effect_options (e, 1, args);
372249 sox_add_effect (chain, e, &sox_in->signal, &sox_in->signal);
373250
374251 e = sox_create_effect (sox_find_effect ("rate"));
652529 if (strlen (misc->opf_name) < 4)
653530 *misc->opf_name = 0;
654531
532 if (*misc->ncc_html == 0 && *misc->ncx_name == 0 && *misc->opf_name == 0)
533 {
534 beep ();
535 endwin ();
536 printf ("%s\n", gettext (
537 "This book has no audio. Play this book with eBook-speaker"));
538 _exit (0);
539 } // if
540
655541 // count items in opf
656542 misc->items_in_opf = 0;
657543 doc = htmlParseFile (misc->opf_name, "UTF-8");
767653 {
768654 // Be sure not to remove wrong files
769655 snprintf (misc->cmd, MAX_CMD - 1, "rm -rf %s/*", misc->tmp_dir);
770 switch (system (misc->cmd))
771 {
772 default:
773 break;
774 } // switch
656 switch (system (misc->cmd));
775657 } // if
776658 } // clear_tmp_dir
777659
1030912 get_attributes (misc, my_attribute, reader);
1031913 #ifdef DAISY_PLAYER
1032914 if (strcasecmp (misc->tag, "audio") == 0)
915 {
916 misc->prev_id = strdup (misc->audio_id);
1033917 misc->audio_id = strdup (misc->current_id);
918 } // if
1034919 #endif
1035920 return 1;
1036921 case XML_READER_TYPE_END_ELEMENT:
388388 } // switch
389389
390390 char tempo_str[15];
391 char begin[20], duration[20];
391392
392393 view_page (misc, daisy);
393394 lseek (misc->tmp_wav_fd, SEEK_SET, 0);
394 snprintf (misc->cmd, MAX_CMD - 1,
395 "/usr/bin/madplay -Q \"%s\" -s %f -t %f -o wav:\"%s\"",
396 misc->current_audio_file, misc->clip_begin,
397 misc->clip_end - misc->clip_begin, misc->tmp_wav);
398 if (system (misc->cmd) != 0)
399 {
400 int e;
401
402 e = errno;
403 beep ();
404 endwin ();
405 printf ("\n");
406 kill (getppid (), SIGTERM);
407 failure (misc, misc->cmd, e);
408 } // if
395 snprintf (begin, 20, "%f", misc->clip_begin);
396 snprintf (duration, 20, "%f", misc->clip_end - misc->clip_begin);
397 madplay (misc->current_audio_file, begin, duration, misc->tmp_wav);
409398 snprintf (tempo_str, 10, "%lf", misc->speed);
410399 playfile (misc, misc->tmp_wav, "wav", misc->sound_dev, "alsa", tempo_str);
411400 _exit (0);
449438 } // open_clips_file
450439
451440 void write_wav (misc_t *misc, my_attribute_t *my_attribute,
452 daisy_t *daisy, char *outfile)
453 {
454 char str_wav[MAX_STR];
441 daisy_t *daisy, char *label)
442 {
443 char in_file[MAX_STR], out_file[MAX_STR];
444 char out_cdr[MAX_STR], complete_cdr[MAX_STR];
455445 struct passwd *pw;
456446 int old_playing, old_displaying, old_current, old_just_this_item;
447 char begin[20], duration[20];
448 int w;
457449
458450 pw = getpwuid (geteuid ());
459 strcpy (str_wav, pw->pw_dir);
460 strcat (str_wav, "/");
461 strcat (str_wav, outfile);
462 strcat (str_wav, ".wav");
463 while (access (str_wav, R_OK) == 0)
464 strncat (str_wav, ".wav", MAX_STR - 1);
451 snprintf (out_file, MAX_STR, "%s/%s.wav", pw->pw_dir, label);
452 while (access (out_file, R_OK) == 0)
453 strncat (out_file, ".wav", MAX_STR - 1);
465454
466455 if (misc->cd_type == CDIO_DISC_MODE_CD_DA)
467456 {
471460
472461 sp = misc->speed;
473462 misc->speed = 1;
474 pid = play_track (misc, str_wav, "wav",
463 pid = play_track (misc, out_file, "wav",
475464 daisy[misc->current].first_lsn);
476465 misc->speed = sp;
477466 do
478467 {
479468 if (! (p_readbuf = paranoia_read (misc->par, NULL)))
480469 break;
481 switch (write (misc->pipefd[1], p_readbuf, CDIO_CD_FRAMESIZE_RAW))
482 {
483 default:
484 break;
485 } // switch
470 switch (write (misc->pipefd[1], p_readbuf, CDIO_CD_FRAMESIZE_RAW));
486471 } while (++misc->lsn_cursor <= daisy[misc->current].last_lsn);
472 if (misc->par)
473 paranoia_free (misc->par);
474 // The .wav file is not correctly closed; I don't know the solution, sorry.
487475 kill (pid, SIGQUIT);
488476 return;
489477 } // if
494482 old_just_this_item = misc->just_this_item;
495483 misc->just_this_item = misc->playing = misc->current;
496484
497 open_clips_file (misc, my_attribute, daisy[misc->current].clips_file,
498 daisy[misc->current].clips_anchor);
499 get_next_clips (misc, my_attribute, daisy);
500 snprintf (misc->cmd, MAX_CMD - 1,
501 "/usr/bin/madplay -Q \"%s\" -s %f -t %f -o wave:\"%s\"",
502 misc->current_audio_file,
503 daisy[misc->current].begin, daisy[misc->current].duration,
504 str_wav);
505 if (system (misc->cmd) != 0)
506 {
507 int e;
508
509 e = errno;
510 beep ();
511 endwin ();
512 printf ("\n");
513 failure (misc, misc->cmd, e);
514 } // if
485 snprintf (out_cdr, MAX_STR, "%s/out.cdr", misc->tmp_dir);
486 snprintf (complete_cdr, MAX_STR, "%s/complete.cdr", misc->tmp_dir);
487 w = open (complete_cdr, O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
488 while (1)
489 {
490 #define BUF_SIZE 8192
491 int r;
492 char buffer[BUF_SIZE];
493 ssize_t in, out;
494
495 open_clips_file (misc, my_attribute, daisy[misc->current].clips_file,
496 daisy[misc->current].clips_anchor);
497 get_next_clips (misc, my_attribute, daisy);
498 snprintf (begin, 20, "%f", daisy[misc->current].begin);
499 snprintf (duration, 20, "%f", daisy[misc->current].duration);
500 snprintf (in_file, MAX_STR, "%s/%s",
501 misc->daisy_mp, misc->current_audio_file);
502 if (access (in_file, R_OK) != 0)
503 failure (misc, in_file, errno);
504 madplay (in_file, begin, duration, out_cdr);
505 r = open (out_cdr, O_RDONLY);
506 while ((in = read (r, &buffer, BUF_SIZE)) > 0)
507 {
508 out = write (w, &buffer, in);
509 if (out != in)
510 failure (misc, "read/write", errno);
511 } // while
512 close (r);
513 if (misc->current + 1 >= misc->total_items)
514 break;
515 if (daisy[misc->current + 1].level <= misc->level)
516 break;
517 misc->current += 1;
518 } // while
519 close (w);
520 playfile (misc, complete_cdr, "cdr", out_file, "wav", "1");
515521 misc->playing = old_playing;
516522 misc->displaying = old_displaying;
517523 misc->current= old_current;
528534 misc->playing = -1;
529535 misc->pause_resume_lsn_cursor = misc->lsn_cursor;
530536 kill (misc->player_pid, SIGKILL);
531 while (kill (misc->player_pid, 0) == 0);
532537 if (misc->cd_type != CDIO_DISC_MODE_CD_DA)
538 {
539 wait (NULL);
533540 misc->player_pid = -2;
541 } // if
534542 return;
535543 } // if
536544
10571065
10581066 misc->clip_begin = 0;
10591067 open_clips_file (misc, my_attribute, daisy[misc->current].clips_file,
1068
10601069 daisy[misc->current].clips_anchor);
10611070 misc->current_id = strdup (daisy[misc->current].first_id);
1062 do
1071 do
10631072 {
10641073 get_next_clips (misc, my_attribute, daisy);
10651074 } while (misc->clip_begin / misc->speed < secs);
10661075 start_playing (misc, daisy);
10671076 view_screen (misc, daisy);
10681077 } // go_to_time
1078
1079 void skip_left (misc_t *misc, my_attribute_t *my_attribute,
1080 daisy_t *daisy)
1081 {
1082 char *prev_id;
1083
1084 prev_id = strdup (misc->prev_id);
1085 if (misc->cd_type == CDIO_DISC_MODE_CD_DA)
1086 return;
1087 if (misc->playing < 0) // not playing
1088 {
1089 beep ();
1090 return;
1091 } // if not playing
1092 if (misc->playing == 0) // first item
1093 {
1094 if (strcmp (daisy[misc->playing].first_id, misc->audio_id) == 0)
1095 {
1096 beep ();
1097 return;
1098 } // if
1099 } // if first item
1100 if (misc->player_pid > -1)
1101 {
1102 while (kill (misc->player_pid, SIGKILL) != 0);
1103 misc->player_pid = -2;
1104 } // if
1105 if (misc->reader)
1106 xmlTextReaderClose (misc->reader);
1107 if (misc->doc)
1108 xmlFreeDoc (misc->doc);
1109 if (strcmp (daisy[misc->playing].first_id, misc->audio_id) == 0)
1110 {
1111 if (misc->just_this_item > -1 &&
1112 daisy[misc->playing].level <= misc->level)
1113 {
1114 beep ();
1115 misc->current = misc->displaying = misc->playing;
1116 misc->playing = misc->just_this_item = -1;
1117 view_screen (misc, daisy);
1118 wmove (misc->screenwin, daisy[misc->current].y,
1119 daisy[misc->current].x);
1120 return;
1121 } // if misc->just_this_item
1122 // go to previous item
1123 misc->playing--;
1124 prev_id = strdup (daisy[misc->playing].last_id);
1125 } // go to previous item
1126 misc->current = misc->displaying = misc->playing;
1127 misc->current_page_number = daisy[misc->current].page_number;
1128 open_clips_file (misc, my_attribute, daisy[misc->playing].clips_file,
1129 daisy[misc->playing].clips_anchor);
1130 misc->current_id = strdup (daisy[misc->playing].first_id);
1131 while (1)
1132 {
1133 if (strcmp (misc->current_id, prev_id) == 0)
1134 break;
1135 get_next_clips (misc, my_attribute, daisy);
1136 } // while
1137 start_playing (misc, daisy);
1138 view_screen (misc, daisy);
1139 return;
1140 } // skip_left
10691141
10701142 void browse (misc_t *misc, my_attribute_t *my_attribute,
10711143 daisy_t *daisy, char *wd)
11281200 "cd \"%s\"; \"%s\" \"%s\"/\"%s\" -d %s",
11291201 wd, PACKAGE, misc->daisy_mp,
11301202 daisy[misc->current].daisy_mp, misc->sound_dev);
1131 switch (system (str))
1132 {
1133 default:
1134 break;
1135 } // switch
1136
1203 switch (system (str));
11371204 snprintf (str, MAX_STR - 1,
11381205 "cd \"%s\"; \"%s\" \"%s\" -d %s\n", wd, PACKAGE,
11391206 misc->daisy_mp, misc->sound_dev);
1140 switch (system (str))
1141 {
1142 default:
1143 break;
1144 } // switch
1207 switch (system (str));
11451208 quit_daisy_player (misc, daisy);
11461209 _exit (0);
11471210 } // if
11961259 quit_daisy_player (misc, daisy);
11971260 while (kill (misc->player_pid, 0) == 0);
11981261 snprintf (misc->cmd, MAX_CMD, "eject -pm %s", misc->cd_dev);
1199 switch (system (misc->cmd))
1200 {
1201 default:
1202 break;
1203 } // switch
1262 switch (system (misc->cmd));
12041263 _exit (0);
12051264 case 'f':
12061265 if (misc->playing == -1)
14791538 break;
14801539 case 'v':
14811540 case '1':
1482 if (misc->volume <= 0)
1541 if (misc->volume <= misc->min_vol)
14831542 {
14841543 beep ();
14851544 break;
14861545 } // if
1487 misc->volume -= 0.1;
1546 misc->volume -= 1;
1547 set_volume (misc);
14881548 if (misc->playing == -1)
14891549 break;
14901550 pause_resume (misc, my_attribute, daisy);
14921552 break;
14931553 case 'V':
14941554 case '7':
1495 if (misc->volume >= 3)
1555 if (misc->volume >= misc->max_vol)
14961556 {
14971557 beep ();
14981558 break;
14991559 } // if
1500 misc->volume += 0.1;
1560 misc->volume += 1;
1561 set_volume (misc);
15011562 if (misc->playing == -1)
15021563 break;
15031564 pause_resume (misc, my_attribute, daisy);
15141575 {
15151576 // if not playing
15161577 misc->player_pid = -2;
1517 misc->prev_id = strdup (misc->audio_id);
15181578 get_next_clips (misc, my_attribute, daisy);
15191579 start_playing (misc, daisy);
15201580 view_screen (misc, daisy);
17091769 my_attribute_t my_attribute;
17101770 daisy_t *daisy;
17111771 struct sigaction usr_action;
1772 snd_mixer_t *handle;
1773 snd_mixer_selem_id_t *sid;
1774 snd_mixer_elem_t *elem;
1775 snd_mixer_selem_channel_id_t cid;
17121776
17131777 daisy = NULL;
17141778 misc.tmp_dir = misc.label = NULL;
1715 misc.speed = misc.volume = 1;
1779 misc.speed = 1;
17161780 misc.playing = misc.just_this_item = -1;
17171781 misc.discinfo = 0;
17181782 misc.cd_type = -1;
17191783 misc.ignore_bookmark = 0;
17201784 *misc.bookmark_title = 0;
17211785 misc.current_id = strdup ("");
1722 misc.prev_id = misc.audio_id = strdup ("");
1786 misc.prev_id = misc.audio_id = strdup ("");
17231787 misc.total_time = 0;
17241788 *misc.daisy_title = 0;
17251789 *misc.ncc_html = 0;
17381802 bindtextdomain (PACKAGE, str);
17391803 make_tmp_dir (&misc);
17401804 start_wd = strdup (get_current_dir_name ());
1805 if (snd_mixer_open (&handle, 0) != 0)
1806 failure (&misc, "snd_mixer_open", errno);
1807 snd_mixer_attach (handle, misc.sound_dev);
1808 snd_mixer_selem_register (handle, NULL, NULL);
1809 snd_mixer_load (handle);
1810 snd_mixer_selem_id_alloca (&sid);
1811 snd_mixer_selem_id_set_index (sid, 0);
1812 snd_mixer_selem_id_set_name (sid, "Master");
1813 if ((elem = snd_mixer_find_selem (handle, sid)) == NULL)
1814 failure (&misc, "snd_mixer_find_selem", errno);
1815 snd_mixer_selem_get_playback_volume_range (elem,
1816 &misc.min_vol, &misc.max_vol);
1817 cid = 0;
1818 snd_mixer_selem_get_playback_volume (elem, cid, &misc.volume);
1819 snd_mixer_close (handle);
17411820 opterr = 0;
17421821 misc.use_OPF = misc.use_NCX = 0;
17431822 while ((opt = getopt (argc, argv, "c:d:ijnyON")) != -1)
18631942 snprintf (misc.cmd, MAX_CMD - 1,
18641943 "/usr/bin/unar \"%s\" -o %s > /dev/null",
18651944 argv[optind], misc.tmp_dir);
1866 switch (system (misc.cmd))
1867 {
1868 default:
1869 break;
1870 } // switch
1945 switch (system (misc.cmd));
18711946
18721947 DIR *dir;
18731948 struct dirent *dirent;
19382013 _exit (-1);
19392014 } // if
19402015 snprintf (misc.cmd, MAX_CMD, "eject -tp %s", misc.cd_dev);
1941 switch (system (misc.cmd))
1942 {
1943 default:
1944 break;
1945 } // switch
2016 switch (system (misc.cmd));
19462017 start = time (NULL);
19472018
19482019 misc.daisy_mp = strdup (misc.cd_dev);
19982069 } // if
19992070 snprintf (misc.cmd, MAX_CMD,
20002071 "udisksctl mount -b %s > /dev/null", misc.cd_dev);
2001 switch (system (misc.cmd))
2002 {
2003 default:
2004 break;
2005 } // switch
2072 switch (system (misc.cmd));
20062073 get_mount_point (&misc);
20072074 } while (! get_mount_point (&misc));
20082075 break;
2222 #include <stdio.h>
2323 #include <unistd.h>
2424 #include <strings.h>
25 #define __STDC_WANT_IEC_60559_BFP_EXT__
2526 #include <stdlib.h>
2627 #include <ctype.h>
2728 #include <sys/types.h>
4546 #include <cdio/paranoia.h>
4647 #include <cdio/disc.h>
4748 #include <magic.h>
49 #include <alsa/asoundlib.h>
50 #include <alsa/mixer.h>
4851
4952 #undef PACKAGE
5053 #undef PACKAGE_BUGREPORT
110113 int pipefd[2], tmp_wav_fd, has_audio_tag;
111114 int pause_resume_playing;
112115 char *pause_resume_id, *prev_id, *current_id, *audio_id;
113 float speed, total_time, volume;
114 float clip_begin, clip_end;
116 float speed, total_time, clip_begin, clip_end;
117 long min_vol, max_vol, volume;
115118 htmlDocPtr doc;
116119 xmlTextReaderPtr reader;
117120 pid_t player_pid, cdda_pid;
183186 extern void make_tmp_dir (misc_t *);
184187 extern char *find_index_name (misc_t *, char *);
185188 extern void select_next_output_device (misc_t *, my_attribute_t *, daisy_t *);
189 extern void set_volume (misc_t *);
190 extern int madplay (char *, char *, char *, char *);
0 Notes on the Free Translation Project
1 *************************************
2
3 Free software is going international! The Free Translation Project is
4 a way to get maintainers of free software, translators, and users all
5 together, so that will gradually become able to speak many languages.
6 A few packages already provide translations for their messages.
7
8 If you found this `ABOUT-NLS' file inside a distribution, you may
9 assume that the distributed package does use GNU `gettext' internally,
10 itself available at your nearest GNU archive site. But you do _not_
11 need to install GNU `gettext' prior to configuring, installing or using
12 this package with messages translated.
13
14 Installers will find here some useful hints. These notes also
15 explain how users should proceed for getting the programs to use the
16 available translations. They tell how people wanting to contribute and
17 work at translations should contact the appropriate team.
18
19 When reporting bugs in the `intl/' directory or bugs which may be
20 related to internationalization, you should tell about the version of
21 `gettext' which is used. The information can be found in the
22 `intl/VERSION' file, in internationalized packages.
23
24 Quick configuration advice
25 ==========================
26
27 If you want to exploit the full power of internationalization, you
28 should configure it using
29
30 ./configure --with-included-gettext
31
32 to force usage of internationalizing routines provided within this
33 package, despite the existence of internationalizing capabilities in the
34 operating system where this package is being installed. So far, only
35 the `gettext' implementation in the GNU C library version 2 provides as
36 many features (such as locale alias, message inheritance, automatic
37 charset conversion or plural form handling) as the implementation here.
38 It is also not possible to offer this additional functionality on top
39 of a `catgets' implementation. Future versions of GNU `gettext' will
40 very likely convey even more functionality. So it might be a good idea
41 to change to GNU `gettext' as soon as possible.
42
43 So you need _not_ provide this option if you are using GNU libc 2 or
44 you have installed a recent copy of the GNU gettext package with the
45 included `libintl'.
46
47 INSTALL Matters
48 ===============
49
50 Some packages are "localizable" when properly installed; the programs
51 they contain can be made to speak your own native language. Most such
52 packages use GNU `gettext'. Other packages have their own ways to
53 internationalization, predating GNU `gettext'.
54
55 By default, this package will be installed to allow translation of
56 messages. It will automatically detect whether the system already
57 provides the GNU `gettext' functions. If not, the GNU `gettext' own
58 library will be used. This library is wholly contained within this
59 package, usually in the `intl/' subdirectory, so prior installation of
60 the GNU `gettext' package is _not_ required. Installers may use
61 special options at configuration time for changing the default
62 behaviour. The commands:
63
64 ./configure --with-included-gettext
65 ./configure --disable-nls
66
67 will respectively bypass any pre-existing `gettext' to use the
68 internationalizing routines provided within this package, or else,
69 _totally_ disable translation of messages.
70
71 When you already have GNU `gettext' installed on your system and run
72 configure without an option for your new package, `configure' will
73 probably detect the previously built and installed `libintl.a' file and
74 will decide to use this. This might be not what is desirable. You
75 should use the more recent version of the GNU `gettext' library. I.e.
76 if the file `intl/VERSION' shows that the library which comes with this
77 package is more recent, you should use
78
79 ./configure --with-included-gettext
80
81 to prevent auto-detection.
82
83 The configuration process will not test for the `catgets' function
84 and therefore it will not be used. The reason is that even an
85 emulation of `gettext' on top of `catgets' could not provide all the
86 extensions of the GNU `gettext' library.
87
88 Internationalized packages have usually many `po/LL.po' files, where
89 LL gives an ISO 639 two-letter code identifying the language. Unless
90 translations have been forbidden at `configure' time by using the
91 `--disable-nls' switch, all available translations are installed
92 together with the package. However, the environment variable `LINGUAS'
93 may be set, prior to configuration, to limit the installed set.
94 `LINGUAS' should then contain a space separated list of two-letter
95 codes, stating which languages are allowed.
96
97 Using This Package
98 ==================
99
100 As a user, if your language has been installed for this package, you
101 only have to set the `LANG' environment variable to the appropriate
102 `LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
103 and `CC' is an ISO 3166 two-letter country code. For example, let's
104 suppose that you speak German and live in Germany. At the shell
105 prompt, merely execute `setenv LANG de_DE' (in `csh'),
106 `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
107 This can be done from your `.login' or `.profile' file, once and for
108 all.
109
110 You might think that the country code specification is redundant.
111 But in fact, some languages have dialects in different countries. For
112 example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
113 country code serves to distinguish the dialects.
114
115 The locale naming convention of `LL_CC', with `LL' denoting the
116 language and `CC' denoting the country, is the one use on systems based
117 on GNU libc. On other systems, some variations of this scheme are
118 used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
119 locales supported by your system for your country by running the command
120 `locale -a | grep '^LL''.
121
122 Not all programs have translations for all languages. By default, an
123 English message is shown in place of a nonexistent translation. If you
124 understand other languages, you can set up a priority list of languages.
125 This is done through a different environment variable, called
126 `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
127 for the purpose of message handling, but you still need to have `LANG'
128 set to the primary language; this is required by other parts of the
129 system libraries. For example, some Swedish users who would rather
130 read translations in German than English for when Swedish is not
131 available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
132
133 Special advice for Norwegian users: The language code for Norwegian
134 bokma*l changed from `no' to `nb' recently (in 2003). During the
135 transition period, while some message catalogs for this language are
136 installed under `nb' and some older ones under `no', it's recommended
137 for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
138 older translations are used.
139
140 In the `LANGUAGE' environment variable, but not in the `LANG'
141 environment variable, `LL_CC' combinations can be abbreviated as `LL'
142 to denote the language's main dialect. For example, `de' is equivalent
143 to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
144 (Portuguese as spoken in Portugal) in this context.
145
146 Translating Teams
147 =================
148
149 For the Free Translation Project to be a success, we need interested
150 people who like their own language and write it well, and who are also
151 able to synergize with other translators speaking the same language.
152 Each translation team has its own mailing list. The up-to-date list of
153 teams can be found at the Free Translation Project's homepage,
154 `http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
155 area.
156
157 If you'd like to volunteer to _work_ at translating messages, you
158 should become a member of the translating team for your own language.
159 The subscribing address is _not_ the same as the list itself, it has
160 `-request' appended. For example, speakers of Swedish can send a
161 message to `sv-request@li.org', having this message body:
162
163 subscribe
164
165 Keep in mind that team members are expected to participate
166 _actively_ in translations, or at solving translational difficulties,
167 rather than merely lurking around. If your team does not exist yet and
168 you want to start one, or if you are unsure about what to do or how to
169 get started, please write to `translation@iro.umontreal.ca' to reach the
170 coordinator for all translator teams.
171
172 The English team is special. It works at improving and uniformizing
173 the terminology in use. Proven linguistic skill are praised more than
174 programming skill, here.
175
176 Available Packages
177 ==================
178
179 Languages are not equally supported in all packages. The following
180 matrix shows the current state of internationalization, as of January
181 2004. The matrix shows, in regard of each package, for which languages
182 PO files have been submitted to translation coordination, with a
183 translation percentage of at least 50%.
184
185 Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es
186 +----------------------------------------------------+
187 a2ps | [] [] [] [] |
188 aegis | () |
189 ant-phone | () |
190 anubis | |
191 ap-utils | |
192 aspell | [] |
193 bash | [] [] [] [] |
194 batchelor | |
195 bfd | [] [] |
196 binutils | [] [] |
197 bison | [] [] [] |
198 bluez-pin | [] [] [] |
199 clisp | |
200 clisp | [] [] [] |
201 console-tools | [] [] |
202 coreutils | [] [] [] [] |
203 cpio | [] [] [] |
204 darkstat | [] () [] |
205 diffutils | [] [] [] [] [] [] [] |
206 e2fsprogs | [] [] [] |
207 enscript | [] [] [] [] |
208 error | [] [] [] [] [] |
209 fetchmail | [] () [] [] [] [] |
210 fileutils | [] [] [] |
211 findutils | [] [] [] [] [] [] [] |
212 flex | [] [] [] [] |
213 fslint | |
214 gas | [] |
215 gawk | [] [] [] [] |
216 gbiff | [] |
217 gcal | [] |
218 gcc | [] [] |
219 gettext | [] [] [] [] [] |
220 gettext-examples | [] [] [] [] |
221 gettext-runtime | [] [] [] [] [] |
222 gettext-tools | [] [] [] |
223 gimp-print | [] [] [] [] [] |
224 gliv | |
225 glunarclock | [] [] |
226 gnubiff | [] |
227 gnucash | [] () [] [] |
228 gnucash-glossary | [] () [] |
229 gnupg | [] () [] [] [] [] |
230 gpe-aerial | [] |
231 gpe-beam | [] [] |
232 gpe-calendar | [] [] |
233 gpe-clock | [] [] |
234 gpe-conf | [] [] |
235 gpe-contacts | [] [] |
236 gpe-edit | [] |
237 gpe-go | [] |
238 gpe-login | [] [] |
239 gpe-ownerinfo | [] [] |
240 gpe-sketchbook | [] [] |
241 gpe-su | [] [] |
242 gpe-taskmanager | [] [] |
243 gpe-timesheet | [] |
244 gpe-today | [] [] |
245 gpe-todo | [] [] |
246 gphoto2 | [] [] [] [] |
247 gprof | [] [] [] |
248 gpsdrive | () () () |
249 gramadoir | [] |
250 grep | [] [] [] [] [] [] |
251 gretl | [] |
252 gtick | [] () |
253 hello | [] [] [] [] [] [] |
254 id-utils | [] [] |
255 indent | [] [] [] [] |
256 iso_3166 | [] [] [] [] [] [] [] [] [] [] |
257 iso_3166_1 | [] [] [] [] [] [] |
258 iso_3166_2 | |
259 iso_3166_3 | [] |
260 iso_4217 | [] [] [] [] |
261 iso_639 | |
262 jpilot | [] [] [] |
263 jtag | |
264 jwhois | [] |
265 kbd | [] [] [] [] [] |
266 latrine | () |
267 ld | [] [] |
268 libc | [] [] [] [] [] [] |
269 libgpewidget | [] [] |
270 libiconv | [] [] [] [] [] |
271 lifelines | [] () |
272 lilypond | [] |
273 lingoteach | |
274 lingoteach_lessons | () () |
275 lynx | [] [] [] [] |
276 m4 | [] [] [] [] |
277 mailutils | [] [] |
278 make | [] [] [] |
279 man-db | [] () [] [] () |
280 minicom | [] [] [] |
281 mysecretdiary | [] [] [] |
282 nano | [] () [] [] [] |
283 nano_1_0 | [] () [] [] [] |
284 opcodes | [] |
285 parted | [] [] [] [] [] |
286 ptx | [] [] [] [] [] |
287 python | |
288 radius | [] |
289 recode | [] [] [] [] [] [] [] |
290 rpm | [] [] |
291 screem | |
292 scrollkeeper | [] [] [] [] [] [] |
293 sed | [] [] [] [] [] [] |
294 sh-utils | [] [] [] |
295 shared-mime-info | |
296 sharutils | [] [] [] [] [] [] |
297 silky | () |
298 skencil | [] () [] |
299 sketch | [] () [] |
300 soundtracker | [] [] [] |
301 sp | [] |
302 tar | [] [] [] [] |
303 texinfo | [] [] [] |
304 textutils | [] [] [] [] |
305 tin | () () |
306 tp-robot | |
307 tuxpaint | [] [] [] [] [] [] [] |
308 unicode-han-tra... | |
309 unicode-transla... | |
310 util-linux | [] [] [] [] [] |
311 vorbis-tools | [] [] [] [] |
312 wastesedge | () |
313 wdiff | [] [] [] [] |
314 wget | [] [] [] [] [] [] |
315 xchat | [] [] [] [] |
316 xfree86_xkb_xml | [] [] |
317 xpad | [] |
318 +----------------------------------------------------+
319 af am ar az be bg bs ca cs da de el en en_GB eo es
320 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68
321
322 et eu fa fi fr ga gl he hr hu id is it ja ko lg
323 +-------------------------------------------------+
324 a2ps | [] [] [] () () |
325 aegis | |
326 ant-phone | [] |
327 anubis | [] |
328 ap-utils | [] |
329 aspell | [] [] |
330 bash | [] [] |
331 batchelor | [] [] |
332 bfd | [] |
333 binutils | [] [] |
334 bison | [] [] [] [] |
335 bluez-pin | [] [] [] [] [] |
336 clisp | |
337 clisp | [] |
338 console-tools | |
339 coreutils | [] [] [] [] [] [] |
340 cpio | [] [] [] [] |
341 darkstat | () [] [] [] |
342 diffutils | [] [] [] [] [] [] [] |
343 e2fsprogs | |
344 enscript | [] [] |
345 error | [] [] [] [] |
346 fetchmail | [] |
347 fileutils | [] [] [] [] [] [] |
348 findutils | [] [] [] [] [] [] [] [] [] [] [] |
349 flex | [] [] [] |
350 fslint | [] |
351 gas | [] |
352 gawk | [] [] [] |
353 gbiff | [] |
354 gcal | [] |
355 gcc | [] |
356 gettext | [] [] [] |
357 gettext-examples | [] [] |
358 gettext-runtime | [] [] [] [] [] |
359 gettext-tools | [] [] [] |
360 gimp-print | [] [] |
361 gliv | () |
362 glunarclock | [] [] [] [] |
363 gnubiff | [] |
364 gnucash | () [] |
365 gnucash-glossary | [] |
366 gnupg | [] [] [] [] [] [] [] |
367 gpe-aerial | [] |
368 gpe-beam | [] |
369 gpe-calendar | [] [] [] |
370 gpe-clock | [] |
371 gpe-conf | [] |
372 gpe-contacts | [] [] |
373 gpe-edit | [] [] |
374 gpe-go | [] |
375 gpe-login | [] [] |
376 gpe-ownerinfo | [] [] [] |
377 gpe-sketchbook | [] |
378 gpe-su | [] |
379 gpe-taskmanager | [] |
380 gpe-timesheet | [] [] [] |
381 gpe-today | [] [] |
382 gpe-todo | [] [] |
383 gphoto2 | [] [] [] |
384 gprof | [] [] |
385 gpsdrive | () () () |
386 gramadoir | [] [] |
387 grep | [] [] [] [] [] [] [] [] [] [] [] |
388 gretl | [] [] |
389 gtick | [] [] [] |
390 hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
391 id-utils | [] [] [] [] |
392 indent | [] [] [] [] [] [] [] [] [] |
393 iso_3166 | [] [] [] [] [] [] [] |
394 iso_3166_1 | [] [] [] [] [] |
395 iso_3166_2 | |
396 iso_3166_3 | |
397 iso_4217 | [] [] [] [] [] [] |
398 iso_639 | |
399 jpilot | [] () |
400 jtag | [] |
401 jwhois | [] [] [] [] |
402 kbd | [] |
403 latrine | [] |
404 ld | [] |
405 libc | [] [] [] [] [] [] |
406 libgpewidget | [] [] [] [] |
407 libiconv | [] [] [] [] [] [] [] [] [] |
408 lifelines | () |
409 lilypond | [] |
410 lingoteach | [] [] |
411 lingoteach_lessons | |
412 lynx | [] [] [] [] |
413 m4 | [] [] [] [] |
414 mailutils | |
415 make | [] [] [] [] [] [] |
416 man-db | () () |
417 minicom | [] [] [] [] |
418 mysecretdiary | [] [] |
419 nano | [] [] [] [] |
420 nano_1_0 | [] [] [] [] |
421 opcodes | [] |
422 parted | [] [] [] |
423 ptx | [] [] [] [] [] [] [] |
424 python | |
425 radius | [] |
426 recode | [] [] [] [] [] [] |
427 rpm | [] [] |
428 screem | |
429 scrollkeeper | [] |
430 sed | [] [] [] [] [] [] [] [] [] |
431 sh-utils | [] [] [] [] [] [] [] |
432 shared-mime-info | [] [] [] |
433 sharutils | [] [] [] [] [] |
434 silky | () [] () () |
435 skencil | [] |
436 sketch | [] |
437 soundtracker | [] [] |
438 sp | [] () |
439 tar | [] [] [] [] [] [] [] [] [] |
440 texinfo | [] [] [] [] |
441 textutils | [] [] [] [] [] [] |
442 tin | [] () |
443 tp-robot | [] |
444 tuxpaint | [] [] [] [] [] [] [] [] [] |
445 unicode-han-tra... | |
446 unicode-transla... | [] [] |
447 util-linux | [] [] [] [] () [] |
448 vorbis-tools | [] |
449 wastesedge | () |
450 wdiff | [] [] [] [] [] [] |
451 wget | [] [] [] [] [] [] [] |
452 xchat | [] [] [] |
453 xfree86_xkb_xml | [] [] |
454 xpad | [] [] |
455 +-------------------------------------------------+
456 et eu fa fi fr ga gl he hr hu id is it ja ko lg
457 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0
458
459 lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
460 +-----------------------------------------------------+
461 a2ps | [] [] () () [] [] [] |
462 aegis | () () () |
463 ant-phone | [] [] |
464 anubis | [] [] [] [] [] [] |
465 ap-utils | [] () [] |
466 aspell | [] |
467 bash | [] [] [] |
468 batchelor | [] |
469 bfd | [] |
470 binutils | [] |
471 bison | [] [] [] [] [] |
472 bluez-pin | [] [] [] |
473 clisp | |
474 clisp | [] |
475 console-tools | [] |
476 coreutils | [] [] |
477 cpio | [] [] [] [] [] |
478 darkstat | [] [] [] [] |
479 diffutils | [] [] [] [] [] [] |
480 e2fsprogs | [] |
481 enscript | [] [] [] [] |
482 error | [] [] [] |
483 fetchmail | [] [] () [] |
484 fileutils | [] [] [] |
485 findutils | [] [] [] [] [] |
486 flex | [] [] [] [] |
487 fslint | [] [] |
488 gas | |
489 gawk | [] [] [] |
490 gbiff | [] [] |
491 gcal | |
492 gcc | |
493 gettext | [] [] [] |
494 gettext-examples | [] [] [] |
495 gettext-runtime | [] [] [] [] |
496 gettext-tools | [] [] |
497 gimp-print | [] |
498 gliv | [] [] [] |
499 glunarclock | [] [] [] [] |
500 gnubiff | [] |
501 gnucash | [] [] () [] |
502 gnucash-glossary | [] [] |
503 gnupg | [] |
504 gpe-aerial | [] [] [] [] |
505 gpe-beam | [] [] [] [] |
506 gpe-calendar | [] [] [] [] |
507 gpe-clock | [] [] [] [] |
508 gpe-conf | [] [] [] [] |
509 gpe-contacts | [] [] [] [] |
510 gpe-edit | [] [] [] [] |
511 gpe-go | [] [] [] |
512 gpe-login | [] [] [] [] |
513 gpe-ownerinfo | [] [] [] [] |
514 gpe-sketchbook | [] [] [] [] |
515 gpe-su | [] [] [] [] |
516 gpe-taskmanager | [] [] [] [] |
517 gpe-timesheet | [] [] [] [] |
518 gpe-today | [] [] [] [] |
519 gpe-todo | [] [] [] [] |
520 gphoto2 | [] |
521 gprof | [] [] |
522 gpsdrive | () () [] |
523 gramadoir | () [] |
524 grep | [] [] [] [] [] |
525 gretl | |
526 gtick | [] [] [] |
527 hello | [] [] [] [] [] [] [] [] [] [] |
528 id-utils | [] [] [] [] |
529 indent | [] [] [] [] |
530 iso_3166 | [] [] [] |
531 iso_3166_1 | [] [] |
532 iso_3166_2 | |
533 iso_3166_3 | [] |
534 iso_4217 | [] [] [] [] [] [] [] [] |
535 iso_639 | [] |
536 jpilot | () () |
537 jtag | |
538 jwhois | [] [] [] [] () |
539 kbd | [] [] [] |
540 latrine | [] |
541 ld | |
542 libc | [] [] [] [] |
543 libgpewidget | [] [] [] |
544 libiconv | [] [] [] [] [] |
545 lifelines | |
546 lilypond | |
547 lingoteach | |
548 lingoteach_lessons | |
549 lynx | [] [] [] |
550 m4 | [] [] [] [] [] |
551 mailutils | [] [] [] |
552 make | [] [] [] [] |
553 man-db | [] |
554 minicom | [] [] [] [] |
555 mysecretdiary | [] [] [] |
556 nano | [] [] [] [] [] |
557 nano_1_0 | [] [] [] [] [] [] |
558 opcodes | [] [] |
559 parted | [] [] [] [] |
560 ptx | [] [] [] [] [] [] [] [] |
561 python | |
562 radius | [] [] |
563 recode | [] [] [] [] |
564 rpm | [] [] [] |
565 screem | |
566 scrollkeeper | [] [] [] [] [] |
567 sed | [] [] [] |
568 sh-utils | [] [] |
569 shared-mime-info | [] [] |
570 sharutils | [] [] |
571 silky | () |
572 skencil | [] [] |
573 sketch | [] [] |
574 soundtracker | |
575 sp | |
576 tar | [] [] [] [] [] [] |
577 texinfo | [] [] [] [] |
578 textutils | [] [] |
579 tin | |
580 tp-robot | [] |
581 tuxpaint | [] [] [] [] [] [] [] [] |
582 unicode-han-tra... | |
583 unicode-transla... | |
584 util-linux | [] [] [] |
585 vorbis-tools | [] [] [] |
586 wastesedge | |
587 wdiff | [] [] [] [] [] |
588 wget | [] [] [] |
589 xchat | [] [] [] |
590 xfree86_xkb_xml | [] [] |
591 xpad | [] [] |
592 +-----------------------------------------------------+
593 lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
594 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63
595
596 sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
597 +-----------------------------------------------------+
598 a2ps | [] [] [] [] | 16
599 aegis | | 0
600 ant-phone | | 3
601 anubis | [] [] | 9
602 ap-utils | () | 3
603 aspell | | 4
604 bash | | 9
605 batchelor | | 3
606 bfd | [] [] | 6
607 binutils | [] [] [] | 8
608 bison | [] [] | 14
609 bluez-pin | [] [] [] | 14
610 clisp | | 0
611 clisp | | 5
612 console-tools | | 3
613 coreutils | [] [] [] [] | 16
614 cpio | [] [] | 14
615 darkstat | [] [] [] () () | 12
616 diffutils | [] [] [] | 23
617 e2fsprogs | [] [] | 6
618 enscript | [] [] | 12
619 error | [] [] [] | 15
620 fetchmail | [] [] | 11
621 fileutils | [] [] [] [] [] | 17
622 findutils | [] [] [] [] [] [] | 29
623 flex | [] [] | 13
624 fslint | | 3
625 gas | [] | 3
626 gawk | [] [] | 12
627 gbiff | | 4
628 gcal | [] [] | 4
629 gcc | [] | 4
630 gettext | [] [] [] [] [] | 16
631 gettext-examples | [] [] [] [] [] | 14
632 gettext-runtime | [] [] [] [] [] [] [] [] | 22
633 gettext-tools | [] [] [] [] [] [] | 14
634 gimp-print | [] [] | 10
635 gliv | | 3
636 glunarclock | [] [] [] | 13
637 gnubiff | | 3
638 gnucash | [] [] | 9
639 gnucash-glossary | [] [] [] | 8
640 gnupg | [] [] [] [] | 17
641 gpe-aerial | [] | 7
642 gpe-beam | [] | 8
643 gpe-calendar | [] [] [] [] | 13
644 gpe-clock | [] [] [] | 10
645 gpe-conf | [] [] | 9
646 gpe-contacts | [] [] [] | 11
647 gpe-edit | [] [] [] [] [] | 12
648 gpe-go | | 5
649 gpe-login | [] [] [] [] [] | 13
650 gpe-ownerinfo | [] [] [] [] | 13
651 gpe-sketchbook | [] [] | 9
652 gpe-su | [] [] [] | 10
653 gpe-taskmanager | [] [] [] | 10
654 gpe-timesheet | [] [] [] [] | 12
655 gpe-today | [] [] [] [] [] | 13
656 gpe-todo | [] [] [] [] | 12
657 gphoto2 | [] [] [] | 11
658 gprof | [] [] | 9
659 gpsdrive | [] [] | 3
660 gramadoir | [] | 5
661 grep | [] [] [] [] | 26
662 gretl | | 3
663 gtick | | 7
664 hello | [] [] [] [] [] | 34
665 id-utils | [] [] | 12
666 indent | [] [] [] [] | 21
667 iso_3166 | [] [] [] [] [] [] [] | 27
668 iso_3166_1 | [] [] [] | 16
669 iso_3166_2 | | 0
670 iso_3166_3 | | 2
671 iso_4217 | [] [] [] [] [] [] | 24
672 iso_639 | | 1
673 jpilot | [] [] [] [] [] | 9
674 jtag | [] | 2
675 jwhois | () [] [] | 11
676 kbd | [] [] | 11
677 latrine | | 2
678 ld | [] [] | 5
679 libc | [] [] [] [] | 20
680 libgpewidget | [] [] [] [] | 13
681 libiconv | [] [] [] [] [] [] [] [] | 27
682 lifelines | [] | 2
683 lilypond | [] | 3
684 lingoteach | | 2
685 lingoteach_lessons | () | 0
686 lynx | [] [] [] | 14
687 m4 | [] [] | 15
688 mailutils | | 5
689 make | [] [] [] | 16
690 man-db | [] | 5
691 minicom | | 11
692 mysecretdiary | [] [] | 10
693 nano | [] [] [] [] | 17
694 nano_1_0 | [] [] [] | 17
695 opcodes | [] [] | 6
696 parted | [] [] [] | 15
697 ptx | [] [] | 22
698 python | | 0
699 radius | | 4
700 recode | [] [] [] | 20
701 rpm | [] [] | 9
702 screem | [] [] | 2
703 scrollkeeper | [] [] [] | 15
704 sed | [] [] [] [] [] [] | 24
705 sh-utils | [] [] | 14
706 shared-mime-info | [] [] | 7
707 sharutils | [] [] [] [] | 17
708 silky | () | 3
709 skencil | [] | 6
710 sketch | [] | 6
711 soundtracker | [] [] | 7
712 sp | [] | 3
713 tar | [] [] [] [] [] | 24
714 texinfo | [] [] [] | 14
715 textutils | [] [] [] [] | 16
716 tin | | 1
717 tp-robot | | 2
718 tuxpaint | [] [] [] [] [] | 29
719 unicode-han-tra... | | 0
720 unicode-transla... | | 2
721 util-linux | [] [] | 15
722 vorbis-tools | | 8
723 wastesedge | | 0
724 wdiff | [] [] [] | 18
725 wget | [] [] [] [] [] [] [] [] | 24
726 xchat | [] [] [] [] [] | 15
727 xfree86_xkb_xml | [] [] [] [] [] | 11
728 xpad | | 5
729 +-----------------------------------------------------+
730 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
731 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373
732
733 Some counters in the preceding matrix are higher than the number of
734 visible blocks let us expect. This is because a few extra PO files are
735 used for implementing regional variants of languages, or language
736 dialects.
737
738 For a PO file in the matrix above to be effective, the package to
739 which it applies should also have been internationalized and
740 distributed as such by its maintainer. There might be an observable
741 lag between the mere existence a PO file and its wide availability in a
742 distribution.
743
744 If January 2004 seems to be old, you may fetch a more recent copy of
745 this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
746 matrix with full percentage details can be found at
747 `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
748
749 Using `gettext' in new packages
750 ===============================
751
752 If you are writing a freely available program and want to
753 internationalize it you are welcome to use GNU `gettext' in your
754 package. Of course you have to respect the GNU Library General Public
755 License which covers the use of the GNU `gettext' library. This means
756 in particular that even non-free programs can use `libintl' as a shared
757 library, whereas only free software can use `libintl' as a static
758 library or use modified versions of `libintl'.
759
760 Once the sources are changed appropriately and the setup can handle
761 the use of `gettext' the only thing missing are the translations. The
762 Free Translation Project is also available for packages which are not
763 developed inside the GNU project. Therefore the information given above
764 applies also for every other Free Software Project. Contact
765 `translation@iro.umontreal.ca' to make the `.pot' files available to
766 the translation teams.
767
0
1 madplay - MPEG audio decoder and player
2 Copyright (C) 2000-2004 Robert Leslie
3
4 $Id: CHANGES,v 1.94 2004/02/23 21:34:53 rob Exp $
5
6 ===============================================================================
7
8 Version 0.15.2 (beta)
9
10 * Applied a minor patch from Florin Braescu for the ALSA audio output
11 module.
12
13 * Modified the reading of LAME encoder tags to compensate for Replay Gain
14 heresy by subtracting 6 dB from Replay Gain values written by LAME
15 3.95.1 and later. This achieves a uniform reference of 83 dB SPL in
16 accordance with the Replay Gain proposed standard.
17
18 * Updated the display of encoder tags to show the Replay Gain reference
19 level.
20
21 * Updated documentation to mention the Replay Gain reference level and
22 LAME heresy.
23
24 Version 0.15.1 (beta)
25
26 * Updated to autoconf 2.59, automake 1.8.2, libtool 1.5.2, gettext 0.14.1.
27
28 * Added support for Replay Gain to `madplay', enabled with a new -G
29 (--replay-gain) option.
30
31 * Added new -T (--show-tags-only) option to `madplay' to display ID3
32 and/or encoder tags without decoding any audio.
33
34 * Renamed `id3tag' command-line program to `madtag' to avoid conflict with
35 another package.
36
37 * Improved 32-bit support detection for audio_oss module.
38
39 * Fixed a problem using the --disable-mmap configure option.
40
41 Version 0.15.0 (beta)
42
43 * Updated to autoconf 2.57, automake 1.7.5, libtool 1.4.3, gettext 0.11.5.
44
45 * Added support to `madplay' for arbitrary resampling ratios.
46
47 * Added new -R (--sample-rate) option to `madplay'.
48
49 * Added support to `madplay' for RVA2 (relative volume adjustment) frames
50 in ID3 tags. The "master volume" channel volume adjustment of the first
51 RVA2 frame is now honored, unless overridden by a command-line option.
52
53 * Added new -A (--adjust-volume) option to `madplay' to override per-file
54 relative volume adjustments (see above).
55
56 * Added new keyboard controls to `madplay' for dynamically increasing (+)
57 and decreasing (-) the audio output gain.
58
59 * Changed `madplay' tty controls to be disabled by default when -q or -Q
60 is given (on the assumption these are most often used when running
61 madplay in the background.)
62
63 * Added new --display-time option to `madplay'.
64
65 * Changed `madplay' to allow switching to Overall Time even for singleton
66 playlists.
67
68 * Added new --ancillary-output option to `madplay'.
69
70 * Added new audio_qnx module (untested) for QNX platforms courtesy of
71 Steven Grimm.
72
73 * Added new audio_alsa module (untested) for ALSA platforms courtesy of
74 Hod McWuff.
75
76 * Added new audio_carbon module for Mac OS X platforms.
77
78 * Changed audio_sun to use the AUDIODEV environment variable for the
79 default audio device path.
80
81 * Changed audio_hex support to be enabled in all builds.
82
83 * Changed to use native Cygwin build by default; give --host=mingw32 to
84 `configure' to use MinGW (and avoid a dependency on the Cygwin DLL).
85
86 * Begun work on a new `id3tag' command-line tool for displaying and
87 manipulating ID3 tags.
88
89 Version 0.14.2 (beta)
90
91 * Added a new output module, audio_esd, for EsounD (Enlightened Sound
92 Daemon) support. You must have EsounD already installed before running
93 `configure'. Use -o esd:[HOSTNAME] as args to `madplay'. If --with-esd
94 is given to `configure', EsounD will be used for native audio output.
95
96 * Added a new output module, audio_cdda, for creating CD audio images.
97 Output is forced to 16-bit 44100 Hz stereo.
98
99 * Added a new output module, audio_aiff, for Audio IFF (AIFF) format
100 files.
101
102 * Changed the audio_wave module to initially write ~0 length rather than
103 0, for better compatibility when output is piped to another program.
104
105 * Changed audio_oss module to try /dev/sound/dsp before /dev/dsp.
106
107 * Added new -b (--bit-depth) option to `madplay'. Most output modules now
108 support configurable bit depths.
109
110 * Added new -i (--ignore-crc) option to `madplay'.
111
112 * Changed Cygwin builds to use MinGW; resulting Win32 executables no
113 longer have a dependency on Cygwin DLLs.
114
115 * `madplay' now supports keyboard controls under Win32.
116
117 * Made use of localeconv() conditional based on results from `configure'.
118
119 * Made use of assert() portable to systems without <assert.h>.
120
121 * Fixed my bad fix for avoiding log10(0).
122
123 Version 0.14.1 (beta)
124
125 * Updated config.guess and config.sub to latest upstream versions.
126
127 * Fixed a NetBSD compatibility issue in audio_sun.
128
129 * Fixed a FreeBSD compatibility issue in audio_oss.
130
131 * Modified the audio_null output module to compute peak amplitude.
132
133 * Changed the peak amplitude computation to avoid evaluating log10(0).
134
135 * Several other small fixes.
136
137 Version 0.14.0 (beta)
138
139 * Fixed a possible segmentation fault due to mmap() abuse.
140
141 * Improved MSVC++ portability and added MSVC++ project files.
142
143 * Modified the PCM dithering routine for better dithered output.
144
145 * Added TTY controls and new --tty-control and --no-tty-control options to
146 `madplay'. TTY control keys: `P' pause, `S' stop, `Q' quit, `F' forward,
147 `B' backward.
148
149 * New time/time-remaining modes with --verbose --tty-control (select by
150 pressing `T'.)
151
152 Version 0.13.0 (beta)
153
154 * The last complete audio frame should now be properly decoded even when
155 it is not followed by other data.
156
157 * Added new --downsample option to `madplay'.
158
159 Version 0.12.3 (beta)
160
161 * Added calls to madvise() on supported systems to reduce memory overhead
162 when using mmap().
163
164 * Added support for automatic mono/stereo channel selection based on
165 output capability.
166
167 * Added a new option to force stereo output of single or dual channel
168 streams.
169
170 * Added a new option to amplify/attenuate the output signal by an amount
171 expressed in decibels.
172
173 * Output statistics (peak amplitude, clipped samples) are now gathered and
174 displayed after decoding.
175
176 * Fixed a problem calling setlocale() when NLS is disabled.
177
178 * Fixed a configure problem when multiple -O CFLAGS are present.
179
180 Version 0.12.2 (beta)
181
182 * Fixed another FreeBSD sound compatibility problem in audio_oss.c.
183
184 Version 0.12.1 (beta)
185
186 * Rewrote the audio PCM packing routines for (hopefully) somewhat better
187 performance.
188
189 * Fixed a FreeBSD sound compatibility problem in audio_oss.c with help
190 from Graham Guttocks.
191
192 * Moved ID3 genre table into a separate file and updated extensions with
193 current list from Winamp.
194
195 * New Croatian, Norwegian, and Spanish translations courtesy of Mario
196 Horvat, Christoffer Nicolaisen, and Damian Brizuela, respectively.
197
198 * Added a simple ABX testing script.
199
200 Version 0.12.0 (alpha)
201
202 * Changed the build environment to use automake and libtool. A libmad
203 shared library can now be built using the --enable-shared option to
204 `configure'.
205
206 * Added internationalization support via GNU gettext. New French
207 translation added courtesy of Gabriel Bouvigne.
208
209 * Changed raw output module to use host-endian byte order.
210
211 * Added --disable-mmap option to `configure' per suggestion of Erik
212 Andersen.
213
214 * Debug builds now link with -lefence, if available.
215
216 * Added `madplay' support for filter chains. This could eventually be
217 extended to support dynamically loaded filters.
218
219 * Added a new optional fade-in filter.
220
221 * Rewrote madplay.c to use GNU getopt, and added many new options (use
222 `madplay --help' to see them all.)
223
224 * Updated the man page for `madplay'.
225
226 Version 0.11.4 (beta)
227
228 * Added Sun/NeXT audio file output module (audio_au.c).
229
230 * Added 32-bit (really 24-bit) output support to OSS module.
231
232 * Relaxed output sample frequency match requirement.
233
234 * Fixed endian assumption problem in audio_sun.c.
235
236 * Added -mtune=strongarm for all ARM targets.
237
238 Version 0.11.3 (beta)
239
240 * Joint stereo mode now shows LR indicator during playback.
241
242 Version 0.11.2 (beta)
243
244 * Added a dual channel output selection option.
245
246 * Improved the OSS output module by falling back on 8-bit format if 16-bit
247 is not available, and by using native 16-bit endianness.
248
249 * PCM output is now dithered for better audio quality. A new runtime
250 option can disable this feature.
251
252 * Added a resampling feature for unsupported output sampling frequencies.
253
254 * Centralized sample scaling and formatting in audio.c for the output
255 modules.
256
257 * Moved the empeg-car audio output support into a separate module.
258
259 * Added bad-CRC frame muting code to madplay.c.
260
261 * Changed `madtime' to indicate average bitrates.
262
263 * Reduced the ID3 genre table memory usage.
264
265 * Minor code clean-up.
266
267 Version 0.11.1 (beta)
268
269 * Improved the robustness of the Win32 audio output module.
270
271 * Added a short man page for madplay.
272
273 * Wrote most of the code for madtime.
274
275 * Wrote code for an experimental multi-stream mixer `madmix'
276 (--enable-experimental to add -x option support for this to madplay).
277
278 Version 0.10.3 (beta)
279
280 * Made portable to Cygwin.
281
282 * Wrote new Win32 audio interface module.
283
284 Version 0.10.1 (beta)
285
286 * Miscellaneous code clean-up.
287
288 * Running madplay with no arguments now gives usage info.
289
290 Version 0.10.0 (beta)
291
292 * Added framework for ID3v2 support.
293
294 * Added prefix parsing for output module selection.
295
296 * Added audio_raw output module.
297
298 * Rewrote madplay.c to use high-level interface.
299
300 Version 0.9.7 (beta)
301
302 * Added audio_hex module (--enable-debugging) for PCM-level debugging.
303
304 * Fixed bug in audio_sun module; should work correctly now.
305
306 * Added -Q (very quiet) option to omit bitstream error messages.
307
308 * Reduced -v output by eliminating timing tenths.
309
310 * Fixed problem configuring unsupported sample frequencies, and added user
311 feedback.
312
313 * Enhanced final frame count reporting to include playing time.
314
315 * Cleaned up madplay.c somewhat.
316
317 ===============================================================================
318
0 GNU GENERAL PUBLIC LICENSE
1 Version 2, June 1991
2
3 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
4 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8 Preamble
9
10 The licenses for most software are designed to take away your
11 freedom to share and change it. By contrast, the GNU General Public
12 License is intended to guarantee your freedom to share and change free
13 software--to make sure the software is free for all its users. This
14 General Public License applies to most of the Free Software
15 Foundation's software and to any other program whose authors commit to
16 using it. (Some other Free Software Foundation software is covered by
17 the GNU Library General Public License instead.) You can apply it to
18 your programs, too.
19
20 When we speak of free software, we are referring to freedom, not
21 price. Our General Public Licenses are designed to make sure that you
22 have the freedom to distribute copies of free software (and charge for
23 this service if you wish), that you receive source code or can get it
24 if you want it, that you can change the software or use pieces of it
25 in new free programs; and that you know you can do these things.
26
27 To protect your rights, we need to make restrictions that forbid
28 anyone to deny you these rights or to ask you to surrender the rights.
29 These restrictions translate to certain responsibilities for you if you
30 distribute copies of the software, or if you modify it.
31
32 For example, if you distribute copies of such a program, whether
33 gratis or for a fee, you must give the recipients all the rights that
34 you have. You must make sure that they, too, receive or can get the
35 source code. And you must show them these terms so they know their
36 rights.
37
38 We protect your rights with two steps: (1) copyright the software, and
39 (2) offer you this license which gives you legal permission to copy,
40 distribute and/or modify the software.
41
42 Also, for each author's protection and ours, we want to make certain
43 that everyone understands that there is no warranty for this free
44 software. If the software is modified by someone else and passed on, we
45 want its recipients to know that what they have is not the original, so
46 that any problems introduced by others will not reflect on the original
47 authors' reputations.
48
49 Finally, any free program is threatened constantly by software
50 patents. We wish to avoid the danger that redistributors of a free
51 program will individually obtain patent licenses, in effect making the
52 program proprietary. To prevent this, we have made it clear that any
53 patent must be licensed for everyone's free use or not licensed at all.
54
55 The precise terms and conditions for copying, distribution and
56 modification follow.
57
58 GNU GENERAL PUBLIC LICENSE
59 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
60
61 0. This License applies to any program or other work which contains
62 a notice placed by the copyright holder saying it may be distributed
63 under the terms of this General Public License. The "Program", below,
64 refers to any such program or work, and a "work based on the Program"
65 means either the Program or any derivative work under copyright law:
66 that is to say, a work containing the Program or a portion of it,
67 either verbatim or with modifications and/or translated into another
68 language. (Hereinafter, translation is included without limitation in
69 the term "modification".) Each licensee is addressed as "you".
70
71 Activities other than copying, distribution and modification are not
72 covered by this License; they are outside its scope. The act of
73 running the Program is not restricted, and the output from the Program
74 is covered only if its contents constitute a work based on the
75 Program (independent of having been made by running the Program).
76 Whether that is true depends on what the Program does.
77
78 1. You may copy and distribute verbatim copies of the Program's
79 source code as you receive it, in any medium, provided that you
80 conspicuously and appropriately publish on each copy an appropriate
81 copyright notice and disclaimer of warranty; keep intact all the
82 notices that refer to this License and to the absence of any warranty;
83 and give any other recipients of the Program a copy of this License
84 along with the Program.
85
86 You may charge a fee for the physical act of transferring a copy, and
87 you may at your option offer warranty protection in exchange for a fee.
88
89 2. You may modify your copy or copies of the Program or any portion
90 of it, thus forming a work based on the Program, and copy and
91 distribute such modifications or work under the terms of Section 1
92 above, provided that you also meet all of these conditions:
93
94 a) You must cause the modified files to carry prominent notices
95 stating that you changed the files and the date of any change.
96
97 b) You must cause any work that you distribute or publish, that in
98 whole or in part contains or is derived from the Program or any
99 part thereof, to be licensed as a whole at no charge to all third
100 parties under the terms of this License.
101
102 c) If the modified program normally reads commands interactively
103 when run, you must cause it, when started running for such
104 interactive use in the most ordinary way, to print or display an
105 announcement including an appropriate copyright notice and a
106 notice that there is no warranty (or else, saying that you provide
107 a warranty) and that users may redistribute the program under
108 these conditions, and telling the user how to view a copy of this
109 License. (Exception: if the Program itself is interactive but
110 does not normally print such an announcement, your work based on
111 the Program is not required to print an announcement.)
112
113 These requirements apply to the modified work as a whole. If
114 identifiable sections of that work are not derived from the Program,
115 and can be reasonably considered independent and separate works in
116 themselves, then this License, and its terms, do not apply to those
117 sections when you distribute them as separate works. But when you
118 distribute the same sections as part of a whole which is a work based
119 on the Program, the distribution of the whole must be on the terms of
120 this License, whose permissions for other licensees extend to the
121 entire whole, and thus to each and every part regardless of who wrote it.
122
123 Thus, it is not the intent of this section to claim rights or contest
124 your rights to work written entirely by you; rather, the intent is to
125 exercise the right to control the distribution of derivative or
126 collective works based on the Program.
127
128 In addition, mere aggregation of another work not based on the Program
129 with the Program (or with a work based on the Program) on a volume of
130 a storage or distribution medium does not bring the other work under
131 the scope of this License.
132
133 3. You may copy and distribute the Program (or a work based on it,
134 under Section 2) in object code or executable form under the terms of
135 Sections 1 and 2 above provided that you also do one of the following:
136
137 a) Accompany it with the complete corresponding machine-readable
138 source code, which must be distributed under the terms of Sections
139 1 and 2 above on a medium customarily used for software interchange; or,
140
141 b) Accompany it with a written offer, valid for at least three
142 years, to give any third party, for a charge no more than your
143 cost of physically performing source distribution, a complete
144 machine-readable copy of the corresponding source code, to be
145 distributed under the terms of Sections 1 and 2 above on a medium
146 customarily used for software interchange; or,
147
148 c) Accompany it with the information you received as to the offer
149 to distribute corresponding source code. (This alternative is
150 allowed only for noncommercial distribution and only if you
151 received the program in object code or executable form with such
152 an offer, in accord with Subsection b above.)
153
154 The source code for a work means the preferred form of the work for
155 making modifications to it. For an executable work, complete source
156 code means all the source code for all modules it contains, plus any
157 associated interface definition files, plus the scripts used to
158 control compilation and installation of the executable. However, as a
159 special exception, the source code distributed need not include
160 anything that is normally distributed (in either source or binary
161 form) with the major components (compiler, kernel, and so on) of the
162 operating system on which the executable runs, unless that component
163 itself accompanies the executable.
164
165 If distribution of executable or object code is made by offering
166 access to copy from a designated place, then offering equivalent
167 access to copy the source code from the same place counts as
168 distribution of the source code, even though third parties are not
169 compelled to copy the source along with the object code.
170
171 4. You may not copy, modify, sublicense, or distribute the Program
172 except as expressly provided under this License. Any attempt
173 otherwise to copy, modify, sublicense or distribute the Program is
174 void, and will automatically terminate your rights under this License.
175 However, parties who have received copies, or rights, from you under
176 this License will not have their licenses terminated so long as such
177 parties remain in full compliance.
178
179 5. You are not required to accept this License, since you have not
180 signed it. However, nothing else grants you permission to modify or
181 distribute the Program or its derivative works. These actions are
182 prohibited by law if you do not accept this License. Therefore, by
183 modifying or distributing the Program (or any work based on the
184 Program), you indicate your acceptance of this License to do so, and
185 all its terms and conditions for copying, distributing or modifying
186 the Program or works based on it.
187
188 6. Each time you redistribute the Program (or any work based on the
189 Program), the recipient automatically receives a license from the
190 original licensor to copy, distribute or modify the Program subject to
191 these terms and conditions. You may not impose any further
192 restrictions on the recipients' exercise of the rights granted herein.
193 You are not responsible for enforcing compliance by third parties to
194 this License.
195
196 7. If, as a consequence of a court judgment or allegation of patent
197 infringement or for any other reason (not limited to patent issues),
198 conditions are imposed on you (whether by court order, agreement or
199 otherwise) that contradict the conditions of this License, they do not
200 excuse you from the conditions of this License. If you cannot
201 distribute so as to satisfy simultaneously your obligations under this
202 License and any other pertinent obligations, then as a consequence you
203 may not distribute the Program at all. For example, if a patent
204 license would not permit royalty-free redistribution of the Program by
205 all those who receive copies directly or indirectly through you, then
206 the only way you could satisfy both it and this License would be to
207 refrain entirely from distribution of the Program.
208
209 If any portion of this section is held invalid or unenforceable under
210 any particular circumstance, the balance of the section is intended to
211 apply and the section as a whole is intended to apply in other
212 circumstances.
213
214 It is not the purpose of this section to induce you to infringe any
215 patents or other property right claims or to contest validity of any
216 such claims; this section has the sole purpose of protecting the
217 integrity of the free software distribution system, which is
218 implemented by public license practices. Many people have made
219 generous contributions to the wide range of software distributed
220 through that system in reliance on consistent application of that
221 system; it is up to the author/donor to decide if he or she is willing
222 to distribute software through any other system and a licensee cannot
223 impose that choice.
224
225 This section is intended to make thoroughly clear what is believed to
226 be a consequence of the rest of this License.
227
228 8. If the distribution and/or use of the Program is restricted in
229 certain countries either by patents or by copyrighted interfaces, the
230 original copyright holder who places the Program under this License
231 may add an explicit geographical distribution limitation excluding
232 those countries, so that distribution is permitted only in or among
233 countries not thus excluded. In such case, this License incorporates
234 the limitation as if written in the body of this License.
235
236 9. The Free Software Foundation may publish revised and/or new versions
237 of the General Public License from time to time. Such new versions will
238 be similar in spirit to the present version, but may differ in detail to
239 address new problems or concerns.
240
241 Each version is given a distinguishing version number. If the Program
242 specifies a version number of this License which applies to it and "any
243 later version", you have the option of following the terms and conditions
244 either of that version or of any later version published by the Free
245 Software Foundation. If the Program does not specify a version number of
246 this License, you may choose any version ever published by the Free Software
247 Foundation.
248
249 10. If you wish to incorporate parts of the Program into other free
250 programs whose distribution conditions are different, write to the author
251 to ask for permission. For software which is copyrighted by the Free
252 Software Foundation, write to the Free Software Foundation; we sometimes
253 make exceptions for this. Our decision will be guided by the two goals
254 of preserving the free status of all derivatives of our free software and
255 of promoting the sharing and reuse of software generally.
256
257 NO WARRANTY
258
259 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
260 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
261 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
262 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
263 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
264 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
265 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
266 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
267 REPAIR OR CORRECTION.
268
269 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
270 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
271 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
272 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
273 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
274 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
275 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
276 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
277 POSSIBILITY OF SUCH DAMAGES.
278
279 END OF TERMS AND CONDITIONS
280
281 How to Apply These Terms to Your New Programs
282
283 If you develop a new program, and you want it to be of the greatest
284 possible use to the public, the best way to achieve this is to make it
285 free software which everyone can redistribute and change under these terms.
286
287 To do so, attach the following notices to the program. It is safest
288 to attach them to the start of each source file to most effectively
289 convey the exclusion of warranty; and each file should have at least
290 the "copyright" line and a pointer to where the full notice is found.
291
292 <one line to give the program's name and a brief idea of what it does.>
293 Copyright (C) <year> <name of author>
294
295 This program is free software; you can redistribute it and/or modify
296 it under the terms of the GNU General Public License as published by
297 the Free Software Foundation; either version 2 of the License, or
298 (at your option) any later version.
299
300 This program is distributed in the hope that it will be useful,
301 but WITHOUT ANY WARRANTY; without even the implied warranty of
302 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
303 GNU General Public License for more details.
304
305 You should have received a copy of the GNU General Public License
306 along with this program; if not, write to the Free Software
307 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
308
309
310 Also add information on how to contact you by electronic and paper mail.
311
312 If the program is interactive, make it output a short notice like this
313 when it starts in an interactive mode:
314
315 Gnomovision version 69, Copyright (C) year name of author
316 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 This is free software, and you are welcome to redistribute it
318 under certain conditions; type `show c' for details.
319
320 The hypothetical commands `show w' and `show c' should show the appropriate
321 parts of the General Public License. Of course, the commands you use may
322 be called something other than `show w' and `show c'; they could even be
323 mouse-clicks or menu items--whatever suits your program.
324
325 You should also get your employer (if you work as a programmer) or your
326 school, if any, to sign a "copyright disclaimer" for the program, if
327 necessary. Here is a sample; alter the names:
328
329 Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
332 <signature of Ty Coon>, 1 April 1989
333 Ty Coon, President of Vice
334
335 This General Public License does not permit incorporating your program into
336 proprietary programs. If your program is a subroutine library, you may
337 consider it more useful to permit linking proprietary applications with the
338 library. If this is what you want to do, use the GNU Library General
339 Public License instead of this License.
0
1 madplay - MPEG audio decoder and player
2 Copyright (C) 2000-2004 Robert Leslie
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18 If you would like to negotiate alternate licensing terms, you may do
19 so by contacting the author: Robert Leslie <rob@mars.org>
20
0
1 madplay - MPEG audio decoder and player
2 Copyright (C) 2000-2004 Robert Leslie
3
4 $Id: CREDITS,v 1.44 2004/02/23 21:34:53 rob Exp $
5
6 ===============================================================================
7
8 AUTHOR
9
10 Except where otherwise noted, all code was authored by:
11
12 Robert Leslie <rob@mars.org>
13
14 CONTRIBUTORS
15
16 Significant contributions have been incorporated with thanks to:
17
18 Erik Andersen <andersen@codepoet.org>
19 2000/09/30: configure.ac
20 - Suggested --disable-mmap option for low memory systems.
21 2000/09/30: madplay.c
22 - Suggested shuffle/repeat options.
23
24 Greg Berenfield <gberenfield@berenfield.com>
25 2001/12/01: madplay.c
26 - Suggested option to select default time display mode.
27
28 Gabriel Bouvigne <bouvigne@mp3-tech.org>
29 2000/10/15: po/fr.po
30 - French message translations.
31
32 Florin Braescu <braescu_f@yahoo.com>
33 2004/02/19: audio_alsa.c
34 - Provided patch for using ALSA on modern systems
35
36 Damian Brizuela <damianweb@yahoo.com>
37 2000/11/03: po/es.po
38 - Spanish message translations.
39
40 Simon Burge <simonb@wasabisystems.com>
41 2000/09/19: audio_sun.c
42 - Discovered endian assumption problem.
43 2001/02/09: audio_sun.c
44 - Reported <string.h> dependency under NetBSD.
45 2001/10/19: audio_sun.c
46 - NetBSD compatibility fix for I_FLUSH.
47
48 Giuseppe Corbelli <cowo@lugbs.linux.it>
49 2002/01/04: mad.list.in
50 - Contributed epm package list.
51
52 Rafael Avila de Espíndola <rafael.espindola@ic.unicamp.br>
53 2003/09/23: filter.h, player.h
54 - Reported problem with --disable-mmap option.
55
56 Matthew Green <mrg@eterna.com.au>
57 2000/11/26: player.c
58 - Provided initial implementation of TTY controls.
59
60 Steven Grimm <koreth@midwinter.com>
61 2001/11/26: audio_qnx.c, configure.ac
62 - Provided QNX audio output module.
63
64 Graham Guttocks <graham_guttocks@yahoo.co.nz>
65 2000/11/08: audio_oss.c
66 - Discovered FreeBSD compatibility problem.
67
68 Mario Horvat <marioh@ugrad.unimelb.edu.au>
69 2000/10/26: po/hr.po
70 - Croatian message translations.
71
72 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
73 2000/11/25: player.c
74 - Suggested use of madvise() via patch from Antti Kantee to reduce
75 mmap() memory overhead.
76
77 Aleksander Korzynski <A.Korzynski@elka.pw.edu.pl>
78 2004/02/23: tag.c
79 - Reported LAME heresy with respect to Replay Gain reference
80 level.
81
82 Glenn Maynard <g_mad@zewt.org>
83 2004/01/23: tag.c
84 - Suggested checking for 'Info' as well as 'Xing' tags.
85
86 Hod McWuff <hod@users.sourceforge.net>
87 2002/02/18: audio_alsa.c
88 - Provided ALSA audio output module.
89
90 Dominik Mierzejewski <dmierzej@elka.pw.edu.pl>
91 2001/10/22: po/Makefile.in.in
92 - Reported missing use of DESTDIR.
93
94 Christoffer Nicolaisen <chrn@start.no>
95 2000/10/26: po/no.po
96 - Norwegian message translations.
97
98 Brett Paterson <brett@fmod.org>
99 2001/10/28: global.h
100 - Reported missing <assert.h> et al. under MS Embedded Visual C.
101
102 Sean 'Shaleh' Perry <shaleh@via.net>
103 2001/10/22: config.guess, config.sub
104 - Keep up to date for proper Debian packaging.
105
106 Bertrand Petit <eemad@phoe.frmug.org>
107 2001/10/22: player.c
108 - Suggested avoidance of log10(0).
109 2001/10/22: configure.ac, audio_oss.c
110 - Compatibility fix for FreeBSD versions 0-3.
111 2001/10/23: player.c
112 - Noted my bad fix for avoiding log10(0).
113
114 Nicolas Pitre <nico@cam.org>
115 2001/11/19: resample.c
116 - Suggested computation of any resampling ratio.
117
118 Ignatios Souvatzis <is@netbsd.org>
119 2003/06/02: audio_sun.c
120 - Suggested use of AUDIODEV environment variable for default audio
121 device path (e.g. SunRay terminals).
122
123 Sasaki Toshiya <s.toshi@nttcom.co.jp>
124 2002/06/05: madplay.c
125 - Reported need for _setmode() under Win32.
126
127 Felix von Leitner <leitner@fefe.de>
128 2001/10/24: madplay.c, player.c
129 - Suggested -i (--ignore-crc) option.
130 2001/10/24: madplay.c, player.c, madtime.c
131 - Suggested conditional use of localeconv() based on results from
132 `configure'.
133 2001/10/29: audio_oss.c
134 - Suggested trying /dev/sound/dsp before /dev/dsp.
135
136 ===============================================================================
137
0 Basic Installation
1 ==================
2
3 These are generic installation instructions.
4
5 The `configure' shell script attempts to guess correct values for
6 various system-dependent variables used during compilation. It uses
7 those values to create a `Makefile' in each directory of the package.
8 It may also create one or more `.h' files containing system-dependent
9 definitions. Finally, it creates a shell script `config.status' that
10 you can run in the future to recreate the current configuration, a file
11 `config.cache' that saves the results of its tests to speed up
12 reconfiguring, and a file `config.log' containing compiler output
13 (useful mainly for debugging `configure').
14
15 If you need to do unusual things to compile the package, please try
16 to figure out how `configure' could check whether to do them, and mail
17 diffs or instructions to the address given in the `README' so they can
18 be considered for the next release. If at some point `config.cache'
19 contains results you don't want to keep, you may remove or edit it.
20
21 The file `configure.in' is used to create `configure' by a program
22 called `autoconf'. You only need `configure.in' if you want to change
23 it or regenerate `configure' using a newer version of `autoconf'.
24
25 The simplest way to compile this package is:
26
27 1. `cd' to the directory containing the package's source code and type
28 `./configure' to configure the package for your system. If you're
29 using `csh' on an old version of System V, you might need to type
30 `sh ./configure' instead to prevent `csh' from trying to execute
31 `configure' itself.
32
33 Running `configure' takes awhile. While running, it prints some
34 messages telling which features it is checking for.
35
36 2. Type `make' to compile the package.
37
38 3. Optionally, type `make check' to run any self-tests that come with
39 the package.
40
41 4. Type `make install' to install the programs and any data files and
42 documentation.
43
44 5. You can remove the program binaries and object files from the
45 source code directory by typing `make clean'. To also remove the
46 files that `configure' created (so you can compile the package for
47 a different kind of computer), type `make distclean'. There is
48 also a `make maintainer-clean' target, but that is intended mainly
49 for the package's developers. If you use it, you may have to get
50 all sorts of other programs in order to regenerate files that came
51 with the distribution.
52
53 Compilers and Options
54 =====================
55
56 Some systems require unusual options for compilation or linking that
57 the `configure' script does not know about. You can give `configure'
58 initial values for variables by setting them in the environment. Using
59 a Bourne-compatible shell, you can do that on the command line like
60 this:
61 CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
62
63 Or on systems that have the `env' program, you can do it like this:
64 env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
65
66 Compiling For Multiple Architectures
67 ====================================
68
69 You can compile the package for more than one kind of computer at the
70 same time, by placing the object files for each architecture in their
71 own directory. To do this, you must use a version of `make' that
72 supports the `VPATH' variable, such as GNU `make'. `cd' to the
73 directory where you want the object files and executables to go and run
74 the `configure' script. `configure' automatically checks for the
75 source code in the directory that `configure' is in and in `..'.
76
77 If you have to use a `make' that does not supports the `VPATH'
78 variable, you have to compile the package for one architecture at a time
79 in the source code directory. After you have installed the package for
80 one architecture, use `make distclean' before reconfiguring for another
81 architecture.
82
83 Installation Names
84 ==================
85
86 By default, `make install' will install the package's files in
87 `/usr/local/bin', `/usr/local/man', etc. You can specify an
88 installation prefix other than `/usr/local' by giving `configure' the
89 option `--prefix=PATH'.
90
91 You can specify separate installation prefixes for
92 architecture-specific files and architecture-independent files. If you
93 give `configure' the option `--exec-prefix=PATH', the package will use
94 PATH as the prefix for installing programs and libraries.
95 Documentation and other data files will still use the regular prefix.
96
97 In addition, if you use an unusual directory layout you can give
98 options like `--bindir=PATH' to specify different values for particular
99 kinds of files. Run `configure --help' for a list of the directories
100 you can set and what kinds of files go in them.
101
102 If the package supports it, you can cause programs to be installed
103 with an extra prefix or suffix on their names by giving `configure' the
104 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
105
106 Optional Features
107 =================
108
109 Some packages pay attention to `--enable-FEATURE' options to
110 `configure', where FEATURE indicates an optional part of the package.
111 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
112 is something like `gnu-as' or `x' (for the X Window System). The
113 `README' should mention any `--enable-' and `--with-' options that the
114 package recognizes.
115
116 For packages that use the X Window System, `configure' can usually
117 find the X include and library files automatically, but if it doesn't,
118 you can use the `configure' options `--x-includes=DIR' and
119 `--x-libraries=DIR' to specify their locations.
120
121 Specifying the System Type
122 ==========================
123
124 There may be some features `configure' can not figure out
125 automatically, but needs to determine by the type of host the package
126 will run on. Usually `configure' can figure that out, but if it prints
127 a message saying it can not guess the host type, give it the
128 `--host=TYPE' option. TYPE can either be a short name for the system
129 type, such as `sun4', or a canonical name with three fields:
130 CPU-COMPANY-SYSTEM
131
132 See the file `config.sub' for the possible values of each field. If
133 `config.sub' isn't included in this package, then this package doesn't
134 need to know the host type.
135
136 If you are building compiler tools for cross-compiling, you can also
137 use the `--target=TYPE' option to select the type of system they will
138 produce code for and the `--build=TYPE' option to select the type of
139 system on which you are compiling the package.
140
141 Sharing Defaults
142 ================
143
144 If you want to set default values for `configure' scripts to share,
145 you can create a site shell script called `config.site' that gives
146 default values for variables like `CC', `cache_file', and `prefix'.
147 `configure' looks for `PREFIX/share/config.site' if it exists, then
148 `PREFIX/etc/config.site' if it exists. Or, you can set the
149 `CONFIG_SITE' environment variable to the location of the site script.
150 A warning: not all `configure' scripts look for a site script.
151
152 Operation Controls
153 ==================
154
155 `configure' recognizes the following options to control how it
156 operates.
157
158 `--cache-file=FILE'
159 Use and save the results of the tests in FILE instead of
160 `./config.cache'. Set FILE to `/dev/null' to disable caching, for
161 debugging `configure'.
162
163 `--help'
164 Print a summary of the options to `configure', and exit.
165
166 `--quiet'
167 `--silent'
168 `-q'
169 Do not print messages saying which checks are being made. To
170 suppress all normal output, redirect it to `/dev/null' (any error
171 messages will still be shown).
172
173 `--srcdir=DIR'
174 Look for the package's source code in directory DIR. Usually
175 `configure' can determine that directory automatically.
176
177 `--version'
178 Print the version of Autoconf used to generate the `configure'
179 script, and exit.
180
181 `configure' also accepts some other, not widely useful, options.
182
0 # madtest.c - a small program for testing. (C)2017 J. Lemmens
1
2 ## madplay - MPEG audio decoder and player
3 ## Copyright (C) 2000-2004 Robert Leslie
4 ##
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2 of the License, or
8 ## (at your option) any later version.
9 ##
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 ##
19 ## If you would like to negotiate alternate licensing terms, you may do
20 ## so by contacting the author: Robert Leslie <rob@mars.org>
21 ##
22 ## $Id: Makefile.am,v 1.36 2004/02/23 21:34:53 rob Exp $
23 ##
24
25 AUTOMAKE_OPTIONS = foreign
26
27 AM_CFLAGS = -D LOCALEDIR=\"$(prefix)/share/locale\" -Wall -Wextra \
28 -Wunused-function -Wuninitialized -Winit-self -fno-common \
29 -I /usr/include/libxml2/ -O3 \
30 --param=ssp-buffer-size=4 -Wformat -Werror=format-security \
31 -DPROGRAMNAME_LOCALEDIR=\"${PROGRAMNAME_LOCALEDIR}\"
32
33 DIST_SUBDIRS = m4
34
35 ACLOCAL_AMFLAGS = -I m4
36
37 bin_PROGRAMS = madtest
38
39 EXTRA_DIST = ABOUT-NL aclocal.m4 am ar-lib autom4te.cache CHANGES \
40 compile config.guess config.h config.h.in config.status \
41 config.sub configure configure.ac COPYING COPYRIGHT \
42 CREDITS depcomp INSTALL install-sh m4 Makefile.am \
43 Makefile.in mdate-sh missing mkinstalldirs py-compile \
44 README test-driver texinfo.tex TODO VERSION ylwrap
45
46 default_audio = audio.c audio.h audio_wave.c
47
48 madtest_SOURCES = global.h madplay.c gettext.h version.c resample.c \
49 filter.c tag.c crc.c rgain.c player.h player.c \
50 version.h resample.h filter.h tag.h crc.h rgain.h \
51 audio_cdda.c $(default_audio) madtest.c
52 madtest_DEPENDENCIES = $(depend_audio) $(DEPENDENCIES)
53 madtest_LDADD = $(ldadd_audio) $(LDADD) $(ldadd_libid3tag)
54
55 localedir = $(datadir)/locale
56 AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
57
58 depend_audio = @depend_audio@
59 ldadd_audio = $(depend_audio) @ldadd_audio@
60
61 ldadd_libmad = -lmad
62
63 depend = @LIBOBJS@
64 #ldadd = $(depend) @LTLIBINTL@
65
66 DEPENDENCIES = $(depend)
67 LDADD = $(ldadd) $(ldadd_libmad)
68
69 CLEANFILES = $(EXTRA_PROGRAMS)
70
71 libtool: $(LIBTOOL_DEPS)
72 $(SHELL) ./config.status --recheck
73
74 profile: madtest
75 gprof madtest | less
76
77 .c.s:
78 $(COMPILE) -S $<
79
80 again:
81 $(MAKE) clean
82 $(MAKE)
83
84 .PHONY: profile again
0 # Makefile.in generated by automake 1.15 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # madtest.c - a small program for testing. (C)2017 J. Lemmens
17
18 VPATH = @srcdir@
19 am__is_gnu_make = { \
20 if test -z '$(MAKELEVEL)'; then \
21 false; \
22 elif test -n '$(MAKE_HOST)'; then \
23 true; \
24 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
25 true; \
26 else \
27 false; \
28 fi; \
29 }
30 am__make_running_with_option = \
31 case $${target_option-} in \
32 ?) ;; \
33 *) echo "am__make_running_with_option: internal error: invalid" \
34 "target option '$${target_option-}' specified" >&2; \
35 exit 1;; \
36 esac; \
37 has_opt=no; \
38 sane_makeflags=$$MAKEFLAGS; \
39 if $(am__is_gnu_make); then \
40 sane_makeflags=$$MFLAGS; \
41 else \
42 case $$MAKEFLAGS in \
43 *\\[\ \ ]*) \
44 bs=\\; \
45 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
46 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
47 esac; \
48 fi; \
49 skip_next=no; \
50 strip_trailopt () \
51 { \
52 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
53 }; \
54 for flg in $$sane_makeflags; do \
55 test $$skip_next = yes && { skip_next=no; continue; }; \
56 case $$flg in \
57 *=*|--*) continue;; \
58 -*I) strip_trailopt 'I'; skip_next=yes;; \
59 -*I?*) strip_trailopt 'I';; \
60 -*O) strip_trailopt 'O'; skip_next=yes;; \
61 -*O?*) strip_trailopt 'O';; \
62 -*l) strip_trailopt 'l'; skip_next=yes;; \
63 -*l?*) strip_trailopt 'l';; \
64 -[dEDm]) skip_next=yes;; \
65 -[JT]) skip_next=yes;; \
66 esac; \
67 case $$flg in \
68 *$$target_option*) has_opt=yes; break;; \
69 esac; \
70 done; \
71 test $$has_opt = yes
72 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
73 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
74 pkgdatadir = $(datadir)/@PACKAGE@
75 pkgincludedir = $(includedir)/@PACKAGE@
76 pkglibdir = $(libdir)/@PACKAGE@
77 pkglibexecdir = $(libexecdir)/@PACKAGE@
78 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
79 install_sh_DATA = $(install_sh) -c -m 644
80 install_sh_PROGRAM = $(install_sh) -c
81 install_sh_SCRIPT = $(install_sh) -c
82 INSTALL_HEADER = $(INSTALL_DATA)
83 transform = $(program_transform_name)
84 NORMAL_INSTALL = :
85 PRE_INSTALL = :
86 POST_INSTALL = :
87 NORMAL_UNINSTALL = :
88 PRE_UNINSTALL = :
89 POST_UNINSTALL = :
90 build_triplet = @build@
91 host_triplet = @host@
92 bin_PROGRAMS = madtest$(EXEEXT)
93 subdir = .
94 SUBDIRS =
95 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
96 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
97 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
98 $(ACLOCAL_M4)
99 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
100 $(am__configure_deps) $(am__DIST_COMMON)
101 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
102 configure.lineno config.status.lineno
103 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
104 CONFIG_HEADER = config.h
105 CONFIG_CLEAN_FILES =
106 CONFIG_CLEAN_VPATH_FILES =
107 am__installdirs = "$(DESTDIR)$(bindir)"
108 PROGRAMS = $(bin_PROGRAMS)
109 am__objects_1 = audio.$(OBJEXT) audio_wave.$(OBJEXT)
110 am_madtest_OBJECTS = madplay.$(OBJEXT) version.$(OBJEXT) \
111 resample.$(OBJEXT) filter.$(OBJEXT) tag.$(OBJEXT) \
112 crc.$(OBJEXT) rgain.$(OBJEXT) player.$(OBJEXT) \
113 audio_cdda.$(OBJEXT) $(am__objects_1) madtest.$(OBJEXT)
114 madtest_OBJECTS = $(am_madtest_OBJECTS)
115 am__DEPENDENCIES_1 =
116 am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
117 AM_V_P = $(am__v_P_@AM_V@)
118 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
119 am__v_P_0 = false
120 am__v_P_1 = :
121 AM_V_GEN = $(am__v_GEN_@AM_V@)
122 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
123 am__v_GEN_0 = @echo " GEN " $@;
124 am__v_GEN_1 =
125 AM_V_at = $(am__v_at_@AM_V@)
126 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
127 am__v_at_0 = @
128 am__v_at_1 =
129 DEFAULT_INCLUDES = -I.@am__isrc@
130 depcomp = $(SHELL) $(top_srcdir)/depcomp
131 am__depfiles_maybe = depfiles
132 am__mv = mv -f
133 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
134 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
135 AM_V_CC = $(am__v_CC_@AM_V@)
136 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
137 am__v_CC_0 = @echo " CC " $@;
138 am__v_CC_1 =
139 CCLD = $(CC)
140 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
141 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
142 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
143 am__v_CCLD_0 = @echo " CCLD " $@;
144 am__v_CCLD_1 =
145 SOURCES = $(madtest_SOURCES)
146 DIST_SOURCES = $(madtest_SOURCES)
147 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
148 ctags-recursive dvi-recursive html-recursive info-recursive \
149 install-data-recursive install-dvi-recursive \
150 install-exec-recursive install-html-recursive \
151 install-info-recursive install-pdf-recursive \
152 install-ps-recursive install-recursive installcheck-recursive \
153 installdirs-recursive pdf-recursive ps-recursive \
154 tags-recursive uninstall-recursive
155 am__can_run_installinfo = \
156 case $$AM_UPDATE_INFO_DIR in \
157 n|no|NO) false;; \
158 *) (install-info --version) >/dev/null 2>&1;; \
159 esac
160 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
161 distclean-recursive maintainer-clean-recursive
162 am__recursive_targets = \
163 $(RECURSIVE_TARGETS) \
164 $(RECURSIVE_CLEAN_TARGETS) \
165 $(am__extra_recursive_targets)
166 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
167 cscope distdir dist dist-all distcheck
168 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
169 $(LISP)config.h.in
170 # Read a list of newline-separated strings from the standard input,
171 # and print each of them once, without duplicates. Input order is
172 # *not* preserved.
173 am__uniquify_input = $(AWK) '\
174 BEGIN { nonempty = 0; } \
175 { items[$$0] = 1; nonempty = 1; } \
176 END { if (nonempty) { for (i in items) print i; }; } \
177 '
178 # Make sure the list of sources is unique. This is necessary because,
179 # e.g., the same source file might be shared among _SOURCES variables
180 # for different programs/libraries.
181 am__define_uniq_tagged_files = \
182 list='$(am__tagged_files)'; \
183 unique=`for i in $$list; do \
184 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
185 done | $(am__uniquify_input)`
186 ETAGS = etags
187 CTAGS = ctags
188 CSCOPE = cscope
189 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
190 ABOUT-NLS COPYING INSTALL README TODO ar-lib compile \
191 config.guess config.sub depcomp install-sh mdate-sh missing \
192 mkinstalldirs py-compile texinfo.tex ylwrap
193 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
194 distdir = $(PACKAGE)-$(VERSION)
195 top_distdir = $(distdir)
196 am__remove_distdir = \
197 if test -d "$(distdir)"; then \
198 find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
199 && rm -rf "$(distdir)" \
200 || { sleep 5 && rm -rf "$(distdir)"; }; \
201 else :; fi
202 am__post_remove_distdir = $(am__remove_distdir)
203 am__relativize = \
204 dir0=`pwd`; \
205 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
206 sed_rest='s,^[^/]*/*,,'; \
207 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
208 sed_butlast='s,/*[^/]*$$,,'; \
209 while test -n "$$dir1"; do \
210 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
211 if test "$$first" != "."; then \
212 if test "$$first" = ".."; then \
213 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
214 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
215 else \
216 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
217 if test "$$first2" = "$$first"; then \
218 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
219 else \
220 dir2="../$$dir2"; \
221 fi; \
222 dir0="$$dir0"/"$$first"; \
223 fi; \
224 fi; \
225 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
226 done; \
227 reldir="$$dir2"
228 DIST_ARCHIVES = $(distdir).tar.gz
229 GZIP_ENV = --best
230 DIST_TARGETS = dist-gzip
231 distuninstallcheck_listfiles = find . -type f -print
232 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
233 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
234 distcleancheck_listfiles = find . -type f -print
235 ACLOCAL = @ACLOCAL@
236 ALLOCA = @ALLOCA@
237 AMTAR = @AMTAR@
238 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
239 AUTOCONF = @AUTOCONF@
240 AUTOHEADER = @AUTOHEADER@
241 AUTOMAKE = @AUTOMAKE@
242 AWK = @AWK@
243 CC = @CC@
244 CCDEPMODE = @CCDEPMODE@
245 CFLAGS = @CFLAGS@
246 CPP = @CPP@
247 CPPFLAGS = @CPPFLAGS@
248 CXX = @CXX@
249 CXXDEPMODE = @CXXDEPMODE@
250 CXXFLAGS = @CXXFLAGS@
251 CYGPATH_W = @CYGPATH_W@
252 DEFS = @DEFS@
253 DEPDIR = @DEPDIR@
254 ECHO_C = @ECHO_C@
255 ECHO_N = @ECHO_N@
256 ECHO_T = @ECHO_T@
257 EGREP = @EGREP@
258 EXEEXT = @EXEEXT@
259 GREP = @GREP@
260 INSTALL = @INSTALL@
261 INSTALL_DATA = @INSTALL_DATA@
262 INSTALL_PROGRAM = @INSTALL_PROGRAM@
263 INSTALL_SCRIPT = @INSTALL_SCRIPT@
264 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
265 LDFLAGS = @LDFLAGS@
266 LIBOBJS = @LIBOBJS@
267 LIBS = @LIBS@
268 LN_S = @LN_S@
269 LTLIBOBJS = @LTLIBOBJS@
270 MAKEINFO = @MAKEINFO@
271 MKDIR_P = @MKDIR_P@
272 OBJEXT = @OBJEXT@
273 PACKAGE = @PACKAGE@
274 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
275 PACKAGE_NAME = @PACKAGE_NAME@
276 PACKAGE_STRING = @PACKAGE_STRING@
277 PACKAGE_TARNAME = @PACKAGE_TARNAME@
278 PACKAGE_URL = @PACKAGE_URL@
279 PACKAGE_VERSION = @PACKAGE_VERSION@
280 PATH_SEPARATOR = @PATH_SEPARATOR@
281 POW_LIB = @POW_LIB@
282 SET_MAKE = @SET_MAKE@
283 SHELL = @SHELL@
284 STRIP = @STRIP@
285 VERSION = @VERSION@
286 YACC = @YACC@
287 YFLAGS = @YFLAGS@
288 abs_builddir = @abs_builddir@
289 abs_srcdir = @abs_srcdir@
290 abs_top_builddir = @abs_top_builddir@
291 abs_top_srcdir = @abs_top_srcdir@
292 ac_ct_CC = @ac_ct_CC@
293 ac_ct_CXX = @ac_ct_CXX@
294 am__include = @am__include@
295 am__leading_dot = @am__leading_dot@
296 am__quote = @am__quote@
297 am__tar = @am__tar@
298 am__untar = @am__untar@
299 bindir = @bindir@
300 build = @build@
301 build_alias = @build_alias@
302 build_cpu = @build_cpu@
303 build_os = @build_os@
304 build_vendor = @build_vendor@
305 builddir = @builddir@
306 datadir = @datadir@
307 datarootdir = @datarootdir@
308 depend_audio = @depend_audio@
309 docdir = @docdir@
310 dvidir = @dvidir@
311 exec_prefix = @exec_prefix@
312 host = @host@
313 host_alias = @host_alias@
314 host_cpu = @host_cpu@
315 host_os = @host_os@
316 host_vendor = @host_vendor@
317 htmldir = @htmldir@
318 includedir = @includedir@
319 infodir = @infodir@
320 install_sh = @install_sh@
321 ldadd_audio = $(depend_audio) @ldadd_audio@
322 libdir = @libdir@
323 libexecdir = @libexecdir@
324 localedir = $(datadir)/locale
325 localstatedir = @localstatedir@
326 mandir = @mandir@
327 mkdir_p = @mkdir_p@
328 oldincludedir = @oldincludedir@
329 pdfdir = @pdfdir@
330 prefix = @prefix@
331 program_transform_name = @program_transform_name@
332 psdir = @psdir@
333 runstatedir = @runstatedir@
334 sbindir = @sbindir@
335 sharedstatedir = @sharedstatedir@
336 srcdir = @srcdir@
337 sysconfdir = @sysconfdir@
338 target_alias = @target_alias@
339 top_build_prefix = @top_build_prefix@
340 top_builddir = @top_builddir@
341 top_srcdir = @top_srcdir@
342 AUTOMAKE_OPTIONS = foreign
343 AM_CFLAGS = -D LOCALEDIR=\"$(prefix)/share/locale\" -Wall -Wextra \
344 -Wunused-function -Wuninitialized -Winit-self -fno-common \
345 -I /usr/include/libxml2/ -O3 \
346 --param=ssp-buffer-size=4 -Wformat -Werror=format-security \
347 -DPROGRAMNAME_LOCALEDIR=\"${PROGRAMNAME_LOCALEDIR}\"
348
349 DIST_SUBDIRS = m4
350 ACLOCAL_AMFLAGS = -I m4
351 EXTRA_DIST = ABOUT-NL aclocal.m4 am ar-lib autom4te.cache CHANGES \
352 compile config.guess config.h config.h.in config.status \
353 config.sub configure configure.ac COPYING COPYRIGHT \
354 CREDITS depcomp INSTALL install-sh m4 Makefile.am \
355 Makefile.in mdate-sh missing mkinstalldirs py-compile \
356 README test-driver texinfo.tex TODO VERSION ylwrap
357
358 default_audio = audio.c audio.h audio_wave.c
359 madtest_SOURCES = global.h madplay.c gettext.h version.c resample.c \
360 filter.c tag.c crc.c rgain.c player.h player.c \
361 version.h resample.h filter.h tag.h crc.h rgain.h \
362 audio_cdda.c $(default_audio) madtest.c
363
364 madtest_DEPENDENCIES = $(depend_audio) $(DEPENDENCIES)
365 madtest_LDADD = $(ldadd_audio) $(LDADD) $(ldadd_libid3tag)
366 AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
367 ldadd_libmad = -lmad
368 depend = @LIBOBJS@
369 #ldadd = $(depend) @LTLIBINTL@
370 DEPENDENCIES = $(depend)
371 LDADD = $(ldadd) $(ldadd_libmad)
372 CLEANFILES = $(EXTRA_PROGRAMS)
373 all: config.h
374 $(MAKE) $(AM_MAKEFLAGS) all-recursive
375
376 .SUFFIXES:
377 .SUFFIXES: .c .o .obj .s
378 am--refresh: Makefile
379 @:
380 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
381 @for dep in $?; do \
382 case '$(am__configure_deps)' in \
383 *$$dep*) \
384 echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
385 $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
386 && exit 0; \
387 exit 1;; \
388 esac; \
389 done; \
390 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
391 $(am__cd) $(top_srcdir) && \
392 $(AUTOMAKE) --foreign Makefile
393 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
394 @case '$?' in \
395 *config.status*) \
396 echo ' $(SHELL) ./config.status'; \
397 $(SHELL) ./config.status;; \
398 *) \
399 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
400 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
401 esac;
402
403 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
404 $(SHELL) ./config.status --recheck
405
406 $(top_srcdir)/configure: $(am__configure_deps)
407 $(am__cd) $(srcdir) && $(AUTOCONF)
408 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
409 $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
410 $(am__aclocal_m4_deps):
411
412 config.h: stamp-h1
413 @test -f $@ || rm -f stamp-h1
414 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
415
416 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
417 @rm -f stamp-h1
418 cd $(top_builddir) && $(SHELL) ./config.status config.h
419 $(srcdir)/config.h.in: $(am__configure_deps)
420 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
421 rm -f stamp-h1
422 touch $@
423
424 distclean-hdr:
425 -rm -f config.h stamp-h1
426 install-binPROGRAMS: $(bin_PROGRAMS)
427 @$(NORMAL_INSTALL)
428 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
429 if test -n "$$list"; then \
430 echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
431 $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
432 fi; \
433 for p in $$list; do echo "$$p $$p"; done | \
434 sed 's/$(EXEEXT)$$//' | \
435 while read p p1; do if test -f $$p \
436 ; then echo "$$p"; echo "$$p"; else :; fi; \
437 done | \
438 sed -e 'p;s,.*/,,;n;h' \
439 -e 's|.*|.|' \
440 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
441 sed 'N;N;N;s,\n, ,g' | \
442 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
443 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
444 if ($$2 == $$4) files[d] = files[d] " " $$1; \
445 else { print "f", $$3 "/" $$4, $$1; } } \
446 END { for (d in files) print "f", d, files[d] }' | \
447 while read type dir files; do \
448 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
449 test -z "$$files" || { \
450 echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
451 $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
452 } \
453 ; done
454
455 uninstall-binPROGRAMS:
456 @$(NORMAL_UNINSTALL)
457 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
458 files=`for p in $$list; do echo "$$p"; done | \
459 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
460 -e 's/$$/$(EXEEXT)/' \
461 `; \
462 test -n "$$list" || exit 0; \
463 echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
464 cd "$(DESTDIR)$(bindir)" && rm -f $$files
465
466 clean-binPROGRAMS:
467 -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
468
469 madtest$(EXEEXT): $(madtest_OBJECTS) $(madtest_DEPENDENCIES) $(EXTRA_madtest_DEPENDENCIES)
470 @rm -f madtest$(EXEEXT)
471 $(AM_V_CCLD)$(LINK) $(madtest_OBJECTS) $(madtest_LDADD) $(LIBS)
472
473 mostlyclean-compile:
474 -rm -f *.$(OBJEXT)
475
476 distclean-compile:
477 -rm -f *.tab.c
478
479 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio.Po@am__quote@
480 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio_cdda.Po@am__quote@
481 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/audio_wave.Po@am__quote@
482 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc.Po@am__quote@
483 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter.Po@am__quote@
484 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/madplay.Po@am__quote@
485 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/madtest.Po@am__quote@
486 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/player.Po@am__quote@
487 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resample.Po@am__quote@
488 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgain.Po@am__quote@
489 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tag.Po@am__quote@
490 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@
491
492 .c.o:
493 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
494 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
495 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
496 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
497 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
498 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
499
500 .c.obj:
501 @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
502 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
503 @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
504 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
505 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
506 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
507
508 # This directory's subdirectories are mostly independent; you can cd
509 # into them and run 'make' without going through this Makefile.
510 # To change the values of 'make' variables: instead of editing Makefiles,
511 # (1) if the variable is set in 'config.status', edit 'config.status'
512 # (which will cause the Makefiles to be regenerated when you run 'make');
513 # (2) otherwise, pass the desired values on the 'make' command line.
514 $(am__recursive_targets):
515 @fail=; \
516 if $(am__make_keepgoing); then \
517 failcom='fail=yes'; \
518 else \
519 failcom='exit 1'; \
520 fi; \
521 dot_seen=no; \
522 target=`echo $@ | sed s/-recursive//`; \
523 case "$@" in \
524 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
525 *) list='$(SUBDIRS)' ;; \
526 esac; \
527 for subdir in $$list; do \
528 echo "Making $$target in $$subdir"; \
529 if test "$$subdir" = "."; then \
530 dot_seen=yes; \
531 local_target="$$target-am"; \
532 else \
533 local_target="$$target"; \
534 fi; \
535 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
536 || eval $$failcom; \
537 done; \
538 if test "$$dot_seen" = "no"; then \
539 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
540 fi; test -z "$$fail"
541
542 ID: $(am__tagged_files)
543 $(am__define_uniq_tagged_files); mkid -fID $$unique
544 tags: tags-recursive
545 TAGS: tags
546
547 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
548 set x; \
549 here=`pwd`; \
550 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
551 include_option=--etags-include; \
552 empty_fix=.; \
553 else \
554 include_option=--include; \
555 empty_fix=; \
556 fi; \
557 list='$(SUBDIRS)'; for subdir in $$list; do \
558 if test "$$subdir" = .; then :; else \
559 test ! -f $$subdir/TAGS || \
560 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
561 fi; \
562 done; \
563 $(am__define_uniq_tagged_files); \
564 shift; \
565 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
566 test -n "$$unique" || unique=$$empty_fix; \
567 if test $$# -gt 0; then \
568 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
569 "$$@" $$unique; \
570 else \
571 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
572 $$unique; \
573 fi; \
574 fi
575 ctags: ctags-recursive
576
577 CTAGS: ctags
578 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
579 $(am__define_uniq_tagged_files); \
580 test -z "$(CTAGS_ARGS)$$unique" \
581 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
582 $$unique
583
584 GTAGS:
585 here=`$(am__cd) $(top_builddir) && pwd` \
586 && $(am__cd) $(top_srcdir) \
587 && gtags -i $(GTAGS_ARGS) "$$here"
588 cscope: cscope.files
589 test ! -s cscope.files \
590 || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
591 clean-cscope:
592 -rm -f cscope.files
593 cscope.files: clean-cscope cscopelist
594 cscopelist: cscopelist-recursive
595
596 cscopelist-am: $(am__tagged_files)
597 list='$(am__tagged_files)'; \
598 case "$(srcdir)" in \
599 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
600 *) sdir=$(subdir)/$(srcdir) ;; \
601 esac; \
602 for i in $$list; do \
603 if test -f "$$i"; then \
604 echo "$(subdir)/$$i"; \
605 else \
606 echo "$$sdir/$$i"; \
607 fi; \
608 done >> $(top_builddir)/cscope.files
609
610 distclean-tags:
611 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
612 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
613
614 distdir: $(DISTFILES)
615 $(am__remove_distdir)
616 test -d "$(distdir)" || mkdir "$(distdir)"
617 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
618 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
619 list='$(DISTFILES)'; \
620 dist_files=`for file in $$list; do echo $$file; done | \
621 sed -e "s|^$$srcdirstrip/||;t" \
622 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
623 case $$dist_files in \
624 */*) $(MKDIR_P) `echo "$$dist_files" | \
625 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
626 sort -u` ;; \
627 esac; \
628 for file in $$dist_files; do \
629 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
630 if test -d $$d/$$file; then \
631 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
632 if test -d "$(distdir)/$$file"; then \
633 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
634 fi; \
635 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
636 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
637 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
638 fi; \
639 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
640 else \
641 test -f "$(distdir)/$$file" \
642 || cp -p $$d/$$file "$(distdir)/$$file" \
643 || exit 1; \
644 fi; \
645 done
646 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
647 if test "$$subdir" = .; then :; else \
648 $(am__make_dryrun) \
649 || test -d "$(distdir)/$$subdir" \
650 || $(MKDIR_P) "$(distdir)/$$subdir" \
651 || exit 1; \
652 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
653 $(am__relativize); \
654 new_distdir=$$reldir; \
655 dir1=$$subdir; dir2="$(top_distdir)"; \
656 $(am__relativize); \
657 new_top_distdir=$$reldir; \
658 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
659 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
660 ($(am__cd) $$subdir && \
661 $(MAKE) $(AM_MAKEFLAGS) \
662 top_distdir="$$new_top_distdir" \
663 distdir="$$new_distdir" \
664 am__remove_distdir=: \
665 am__skip_length_check=: \
666 am__skip_mode_fix=: \
667 distdir) \
668 || exit 1; \
669 fi; \
670 done
671 -test -n "$(am__skip_mode_fix)" \
672 || find "$(distdir)" -type d ! -perm -755 \
673 -exec chmod u+rwx,go+rx {} \; -o \
674 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
675 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
676 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
677 || chmod -R a+r "$(distdir)"
678 dist-gzip: distdir
679 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
680 $(am__post_remove_distdir)
681
682 dist-bzip2: distdir
683 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
684 $(am__post_remove_distdir)
685
686 dist-lzip: distdir
687 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
688 $(am__post_remove_distdir)
689
690 dist-xz: distdir
691 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
692 $(am__post_remove_distdir)
693
694 dist-tarZ: distdir
695 @echo WARNING: "Support for distribution archives compressed with" \
696 "legacy program 'compress' is deprecated." >&2
697 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
698 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
699 $(am__post_remove_distdir)
700
701 dist-shar: distdir
702 @echo WARNING: "Support for shar distribution archives is" \
703 "deprecated." >&2
704 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
705 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
706 $(am__post_remove_distdir)
707
708 dist-zip: distdir
709 -rm -f $(distdir).zip
710 zip -rq $(distdir).zip $(distdir)
711 $(am__post_remove_distdir)
712
713 dist dist-all:
714 $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
715 $(am__post_remove_distdir)
716
717 # This target untars the dist file and tries a VPATH configuration. Then
718 # it guarantees that the distribution is self-contained by making another
719 # tarfile.
720 distcheck: dist
721 case '$(DIST_ARCHIVES)' in \
722 *.tar.gz*) \
723 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
724 *.tar.bz2*) \
725 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
726 *.tar.lz*) \
727 lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
728 *.tar.xz*) \
729 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
730 *.tar.Z*) \
731 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
732 *.shar.gz*) \
733 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
734 *.zip*) \
735 unzip $(distdir).zip ;;\
736 esac
737 chmod -R a-w $(distdir)
738 chmod u+w $(distdir)
739 mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
740 chmod a-w $(distdir)
741 test -d $(distdir)/_build || exit 0; \
742 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
743 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
744 && am__cwd=`pwd` \
745 && $(am__cd) $(distdir)/_build/sub \
746 && ../../configure \
747 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
748 $(DISTCHECK_CONFIGURE_FLAGS) \
749 --srcdir=../.. --prefix="$$dc_install_base" \
750 && $(MAKE) $(AM_MAKEFLAGS) \
751 && $(MAKE) $(AM_MAKEFLAGS) dvi \
752 && $(MAKE) $(AM_MAKEFLAGS) check \
753 && $(MAKE) $(AM_MAKEFLAGS) install \
754 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
755 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
756 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
757 distuninstallcheck \
758 && chmod -R a-w "$$dc_install_base" \
759 && ({ \
760 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
761 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
762 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
763 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
764 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
765 } || { rm -rf "$$dc_destdir"; exit 1; }) \
766 && rm -rf "$$dc_destdir" \
767 && $(MAKE) $(AM_MAKEFLAGS) dist \
768 && rm -rf $(DIST_ARCHIVES) \
769 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
770 && cd "$$am__cwd" \
771 || exit 1
772 $(am__post_remove_distdir)
773 @(echo "$(distdir) archives ready for distribution: "; \
774 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
775 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
776 distuninstallcheck:
777 @test -n '$(distuninstallcheck_dir)' || { \
778 echo 'ERROR: trying to run $@ with an empty' \
779 '$$(distuninstallcheck_dir)' >&2; \
780 exit 1; \
781 }; \
782 $(am__cd) '$(distuninstallcheck_dir)' || { \
783 echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
784 exit 1; \
785 }; \
786 test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
787 || { echo "ERROR: files left after uninstall:" ; \
788 if test -n "$(DESTDIR)"; then \
789 echo " (check DESTDIR support)"; \
790 fi ; \
791 $(distuninstallcheck_listfiles) ; \
792 exit 1; } >&2
793 distcleancheck: distclean
794 @if test '$(srcdir)' = . ; then \
795 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
796 exit 1 ; \
797 fi
798 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
799 || { echo "ERROR: files left in build directory after distclean:" ; \
800 $(distcleancheck_listfiles) ; \
801 exit 1; } >&2
802 check-am: all-am
803 check: check-recursive
804 all-am: Makefile $(PROGRAMS) config.h
805 installdirs: installdirs-recursive
806 installdirs-am:
807 for dir in "$(DESTDIR)$(bindir)"; do \
808 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
809 done
810 install: install-recursive
811 install-exec: install-exec-recursive
812 install-data: install-data-recursive
813 uninstall: uninstall-recursive
814
815 install-am: all-am
816 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
817
818 installcheck: installcheck-recursive
819 install-strip:
820 if test -z '$(STRIP)'; then \
821 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
822 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
823 install; \
824 else \
825 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
826 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
827 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
828 fi
829 mostlyclean-generic:
830
831 clean-generic:
832 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
833
834 distclean-generic:
835 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
836 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
837
838 maintainer-clean-generic:
839 @echo "This command is intended for maintainers to use"
840 @echo "it deletes files that may require special tools to rebuild."
841 clean: clean-recursive
842
843 clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
844
845 distclean: distclean-recursive
846 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
847 -rm -rf ./$(DEPDIR)
848 -rm -f Makefile
849 distclean-am: clean-am distclean-compile distclean-generic \
850 distclean-hdr distclean-tags
851
852 dvi: dvi-recursive
853
854 dvi-am:
855
856 html: html-recursive
857
858 html-am:
859
860 info: info-recursive
861
862 info-am:
863
864 install-data-am:
865
866 install-dvi: install-dvi-recursive
867
868 install-dvi-am:
869
870 install-exec-am: install-binPROGRAMS
871
872 install-html: install-html-recursive
873
874 install-html-am:
875
876 install-info: install-info-recursive
877
878 install-info-am:
879
880 install-man:
881
882 install-pdf: install-pdf-recursive
883
884 install-pdf-am:
885
886 install-ps: install-ps-recursive
887
888 install-ps-am:
889
890 installcheck-am:
891
892 maintainer-clean: maintainer-clean-recursive
893 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
894 -rm -rf $(top_srcdir)/autom4te.cache
895 -rm -rf ./$(DEPDIR)
896 -rm -f Makefile
897 maintainer-clean-am: distclean-am maintainer-clean-generic
898
899 mostlyclean: mostlyclean-recursive
900
901 mostlyclean-am: mostlyclean-compile mostlyclean-generic
902
903 pdf: pdf-recursive
904
905 pdf-am:
906
907 ps: ps-recursive
908
909 ps-am:
910
911 uninstall-am: uninstall-binPROGRAMS
912
913 .MAKE: $(am__recursive_targets) all install-am install-strip
914
915 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
916 am--refresh check check-am clean clean-binPROGRAMS \
917 clean-cscope clean-generic cscope cscopelist-am ctags ctags-am \
918 dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \
919 dist-tarZ dist-xz dist-zip distcheck distclean \
920 distclean-compile distclean-generic distclean-hdr \
921 distclean-tags distcleancheck distdir distuninstallcheck dvi \
922 dvi-am html html-am info info-am install install-am \
923 install-binPROGRAMS install-data install-data-am install-dvi \
924 install-dvi-am install-exec install-exec-am install-html \
925 install-html-am install-info install-info-am install-man \
926 install-pdf install-pdf-am install-ps install-ps-am \
927 install-strip installcheck installcheck-am installdirs \
928 installdirs-am maintainer-clean maintainer-clean-generic \
929 mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
930 ps ps-am tags tags-am uninstall uninstall-am \
931 uninstall-binPROGRAMS
932
933 .PRECIOUS: Makefile
934
935
936 libtool: $(LIBTOOL_DEPS)
937 $(SHELL) ./config.status --recheck
938
939 profile: madtest
940 gprof madtest | less
941
942 .c.s:
943 $(COMPILE) -S $<
944
945 again:
946 $(MAKE) clean
947 $(MAKE)
948
949 .PHONY: profile again
950
951 # Tell versions [3.59,3.63) of GNU make to not export all variables.
952 # Otherwise a system limit (for SysV at least) may be exceeded.
953 .NOEXPORT:
0
1 madplay - MPEG audio decoder and player
2 Copyright (C) 2000-2004 Robert Leslie
3
4 $Id: README,v 1.60 2004/01/23 09:41:31 rob Exp $
5
6 ===============================================================================
7
8 INTRODUCTION
9
10 `madplay' is a command-line MPEG audio decoder and player based on the MAD
11 library (libmad). For details about MAD, see the libmad package
12 distributed separately.
13
14 After decoding, `madplay' sends the output to an audio output module. The
15 following audio output modules are provided:
16
17 - an Open Sound System interface module (for Linux, et al.)
18 - a Sun audio interface module (for Solaris, NetBSD, et al.)
19 - a Mac OS Carbon audio interface module (for Mac OS X)
20 - a Win32 audio interface module (for Windows 95/98/NT/2000, et al.)
21 - an ALSA audio interface module
22 - a QNX audio interface module
23 - an EsounD interface module
24 - a CD audio output module (*.cdr, *.cda)
25 - an Audio IFF output module (*.aif, *.aiff)
26 - a Microsoft RIFF/WAVE file output module (*.wav)
27 - a Sun/NeXT audio file output module (*.au, *.snd)
28 - a raw PCM output module
29 - a hex output module (for debugging and compliance testing)
30 - a null module (for timing the decoder)
31
32 `madplay' will also read and display ID3 tag information, and further
33 supports the relative volume adjustment information (RVA2) in such tags,
34 as written by tools like `normalize'.
35
36 Audio Quality
37
38 MAD produces output samples with a precision greater than 24 bits. Because
39 most output formats use fewer bits, typically 16, `madplay' implements a
40 dithering algorithm when truncating samples for output. This produces high
41 quality audio that generally sounds superior to the output of a simple
42 rounding algorithm. However, dithering may unfavorably affect an analytic
43 examination of the output (such as compliance testing), and therefore it
44 may optionally be disabled at runtime.
45
46 ===============================================================================
47
48 BUILDING AND INSTALLING
49
50 Before you can build this package, you must first build and install the
51 libmad and libid3tag packages distributed separately.
52
53 Windows Platforms
54
55 `madplay' can be built under Windows using either MSVC++ or Cygwin. A
56 MSVC++ project file and workspace can be found under the `msvc++'
57 subdirectory.
58
59 To build `madplay' using Cygwin, you will first need to install the Cygwin
60 tools:
61
62 http://www.cygwin.com/
63
64 You may then proceed with the following POSIX instructions within the
65 Cygwin shell.
66
67 Note that by default Cygwin will build an executable that depends on the
68 Cygwin DLL. You can use MinGW to build an executable that does not depend
69 on the Cygwin DLL. To do so, give the option --host=mingw32 to
70 `configure'. Be certain you also link with MinGW versions of libmad,
71 libid3tag, and any further dependent libraries (such as zlib).
72
73 POSIX Platforms (including Cygwin)
74
75 The code is distributed with a `configure' script that will generate for
76 you a `Makefile' and a `config.h' in each of the subdirectories that
77 require them. See the file `INSTALL' for generic instructions.
78
79 The specific options you may want to give `configure' are:
80
81 --disable-debugging do not compile with debugging support, and
82 use more optimizations
83
84 --with-alsa use ALSA for default audio output
85
86 --with-esd use EsounD (Enlightened Sound Daemon) for
87 default audio output
88
89 Support for the EsounD output format type (esd) is enabled automatically
90 if the EsounD library (libesd) is available, however it is not made the
91 default output format unless --with-esd is given. To disable EsounD
92 support completely, use --without-esd.
93
94 If you have installed libmad and/or libid3tag in an unusual place or
95 `configure' can't find them, you may need to indicate where they are:
96
97 ./configure ... CPPFLAGS="-I${include_dir}" LDFLAGS="-L${lib_dir}"
98
99 where ${include_dir} and ${lib_dir} are the locations of the installed
100 header and library files, respectively.
101
102 Experimenting and Developing
103
104 Further options for `configure' that may be useful to developers and
105 experimenters are:
106
107 --enable-debugging enable diagnostic debugging support and
108 debugging symbols
109
110 --enable-profiling generate `gprof' profiling code
111
112 --enable-experimental enable code using the EXPERIMENTAL
113 preprocessor define
114
115 ===============================================================================
116
117 COPYRIGHT AND AUTHOR
118
119 Please read the `COPYRIGHT' file for copyright and warranty information.
120 Also, the file `COPYING' contains the full text of the GNU GPL.
121
122 Send inquiries, comments, bug reports, suggestions, patches, etc. to:
123
124 Robert Leslie <rob@mars.org>
125
126 See also the `madplay' home page on the Web:
127
128 http://www.mars.org/home/rob/proj/mpeg/
129
130 ===============================================================================
131
0
1 madplay - MPEG audio decoder and player
2 Copyright (C) 2000-2004 Robert Leslie
3
4 $Id: TODO,v 1.67 2004/02/17 02:26:42 rob Exp $
5
6 ===============================================================================
7
8 madplay:
9 - auto attenuation?
10 - fade-out support
11 - customizable gap support
12 - fix start/stop time granularity
13 - resampling with bandlimited interpolation
14 - byte position reporting
15 - better bitstream error recovery
16 - handle emphasis
17 - equalizer support
18 - dynamically loaded filters
19 - automatic volume adjustment filter
20 - handle SIGPIPE? (audio_esd)
21 - pass ID3 tag data to output modules
22 - read RIFF-encapsulated MPEG audio files
23
24 id3tag:
25 - needs work!
26
27 madtime:
28 - recurse directories
29 - collect directory names
30 - non-mmap support
31
32 mad123:
33 - needs work!
34
0 0.15.2b
1 configure.ac:24
2 version.h:27
3 abxtest:27
4 msvc++/config.h:243,249,269
5
6 msvc++/madplay.dsw:6,21
0 # generated automatically by aclocal 1.15 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
3
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 # PARTICULAR PURPOSE.
12
13 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
17 [m4_warning([this file was generated for autoconf 2.69.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
21
22 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
23 #
24 # This file is free software; the Free Software Foundation
25 # gives unlimited permission to copy and/or distribute it,
26 # with or without modifications, as long as this notice is preserved.
27
28 # AM_AUTOMAKE_VERSION(VERSION)
29 # ----------------------------
30 # Automake X.Y traces this macro to ensure aclocal.m4 has been
31 # generated from the m4 files accompanying Automake X.Y.
32 # (This private macro should not be called outside this file.)
33 AC_DEFUN([AM_AUTOMAKE_VERSION],
34 [am__api_version='1.15'
35 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36 dnl require some minimum version. Point them to the right macro.
37 m4_if([$1], [1.15], [],
38 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39 ])
40
41 # _AM_AUTOCONF_VERSION(VERSION)
42 # -----------------------------
43 # aclocal traces this macro to find the Autoconf version.
44 # This is a private macro too. Using m4_define simplifies
45 # the logic in aclocal, which can simply ignore this definition.
46 m4_define([_AM_AUTOCONF_VERSION], [])
47
48 # AM_SET_CURRENT_AUTOMAKE_VERSION
49 # -------------------------------
50 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.15])dnl
54 m4_ifndef([AC_AUTOCONF_VERSION],
55 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57
58 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
59
60 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
61 #
62 # This file is free software; the Free Software Foundation
63 # gives unlimited permission to copy and/or distribute it,
64 # with or without modifications, as long as this notice is preserved.
65
66 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
68 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
69 #
70 # Of course, Automake must honor this variable whenever it calls a
71 # tool from the auxiliary directory. The problem is that $srcdir (and
72 # therefore $ac_aux_dir as well) can be either absolute or relative,
73 # depending on how configure is run. This is pretty annoying, since
74 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
75 # source directory, any form will work fine, but in subdirectories a
76 # relative path needs to be adjusted first.
77 #
78 # $ac_aux_dir/missing
79 # fails when called from a subdirectory if $ac_aux_dir is relative
80 # $top_srcdir/$ac_aux_dir/missing
81 # fails if $ac_aux_dir is absolute,
82 # fails when called from a subdirectory in a VPATH build with
83 # a relative $ac_aux_dir
84 #
85 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86 # are both prefixed by $srcdir. In an in-source build this is usually
87 # harmless because $srcdir is '.', but things will broke when you
88 # start a VPATH build or use an absolute $srcdir.
89 #
90 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
92 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93 # and then we would define $MISSING as
94 # MISSING="\${SHELL} $am_aux_dir/missing"
95 # This will work as long as MISSING is not called from configure, because
96 # unfortunately $(top_srcdir) has no meaning in configure.
97 # However there are other variables, like CC, which are often used in
98 # configure, and could therefore not use this "fixed" $ac_aux_dir.
99 #
100 # Another solution, used here, is to always expand $ac_aux_dir to an
101 # absolute PATH. The drawback is that using absolute paths prevent a
102 # configured tree to be moved without reconfiguration.
103
104 AC_DEFUN([AM_AUX_DIR_EXPAND],
105 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
106 # Expand $ac_aux_dir to an absolute path.
107 am_aux_dir=`cd "$ac_aux_dir" && pwd`
108 ])
109
110 # AM_CONDITIONAL -*- Autoconf -*-
111
112 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
113 #
114 # This file is free software; the Free Software Foundation
115 # gives unlimited permission to copy and/or distribute it,
116 # with or without modifications, as long as this notice is preserved.
117
118 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
119 # -------------------------------------
120 # Define a conditional.
121 AC_DEFUN([AM_CONDITIONAL],
122 [AC_PREREQ([2.52])dnl
123 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
124 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
125 AC_SUBST([$1_TRUE])dnl
126 AC_SUBST([$1_FALSE])dnl
127 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
128 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
129 m4_define([_AM_COND_VALUE_$1], [$2])dnl
130 if $2; then
131 $1_TRUE=
132 $1_FALSE='#'
133 else
134 $1_TRUE='#'
135 $1_FALSE=
136 fi
137 AC_CONFIG_COMMANDS_PRE(
138 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
139 AC_MSG_ERROR([[conditional "$1" was never defined.
140 Usually this means the macro was only invoked conditionally.]])
141 fi])])
142
143 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
144 #
145 # This file is free software; the Free Software Foundation
146 # gives unlimited permission to copy and/or distribute it,
147 # with or without modifications, as long as this notice is preserved.
148
149
150 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
151 # written in clear, in which case automake, when reading aclocal.m4,
152 # will think it sees a *use*, and therefore will trigger all it's
153 # C support machinery. Also note that it means that autoscan, seeing
154 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
155
156
157 # _AM_DEPENDENCIES(NAME)
158 # ----------------------
159 # See how the compiler implements dependency checking.
160 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
161 # We try a few techniques and use that to set a single cache variable.
162 #
163 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
164 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
165 # dependency, and given that the user is not expected to run this macro,
166 # just rely on AC_PROG_CC.
167 AC_DEFUN([_AM_DEPENDENCIES],
168 [AC_REQUIRE([AM_SET_DEPDIR])dnl
169 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
170 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
171 AC_REQUIRE([AM_DEP_TRACK])dnl
172
173 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
174 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
175 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
176 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
177 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
178 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
179 [depcc="$$1" am_compiler_list=])
180
181 AC_CACHE_CHECK([dependency style of $depcc],
182 [am_cv_$1_dependencies_compiler_type],
183 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
184 # We make a subdir and do the tests there. Otherwise we can end up
185 # making bogus files that we don't know about and never remove. For
186 # instance it was reported that on HP-UX the gcc test will end up
187 # making a dummy file named 'D' -- because '-MD' means "put the output
188 # in D".
189 rm -rf conftest.dir
190 mkdir conftest.dir
191 # Copy depcomp to subdir because otherwise we won't find it if we're
192 # using a relative directory.
193 cp "$am_depcomp" conftest.dir
194 cd conftest.dir
195 # We will build objects and dependencies in a subdirectory because
196 # it helps to detect inapplicable dependency modes. For instance
197 # both Tru64's cc and ICC support -MD to output dependencies as a
198 # side effect of compilation, but ICC will put the dependencies in
199 # the current directory while Tru64 will put them in the object
200 # directory.
201 mkdir sub
202
203 am_cv_$1_dependencies_compiler_type=none
204 if test "$am_compiler_list" = ""; then
205 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
206 fi
207 am__universal=false
208 m4_case([$1], [CC],
209 [case " $depcc " in #(
210 *\ -arch\ *\ -arch\ *) am__universal=true ;;
211 esac],
212 [CXX],
213 [case " $depcc " in #(
214 *\ -arch\ *\ -arch\ *) am__universal=true ;;
215 esac])
216
217 for depmode in $am_compiler_list; do
218 # Setup a source with many dependencies, because some compilers
219 # like to wrap large dependency lists on column 80 (with \), and
220 # we should not choose a depcomp mode which is confused by this.
221 #
222 # We need to recreate these files for each test, as the compiler may
223 # overwrite some of them when testing with obscure command lines.
224 # This happens at least with the AIX C compiler.
225 : > sub/conftest.c
226 for i in 1 2 3 4 5 6; do
227 echo '#include "conftst'$i'.h"' >> sub/conftest.c
228 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
229 # Solaris 10 /bin/sh.
230 echo '/* dummy */' > sub/conftst$i.h
231 done
232 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
233
234 # We check with '-c' and '-o' for the sake of the "dashmstdout"
235 # mode. It turns out that the SunPro C++ compiler does not properly
236 # handle '-M -o', and we need to detect this. Also, some Intel
237 # versions had trouble with output in subdirs.
238 am__obj=sub/conftest.${OBJEXT-o}
239 am__minus_obj="-o $am__obj"
240 case $depmode in
241 gcc)
242 # This depmode causes a compiler race in universal mode.
243 test "$am__universal" = false || continue
244 ;;
245 nosideeffect)
246 # After this tag, mechanisms are not by side-effect, so they'll
247 # only be used when explicitly requested.
248 if test "x$enable_dependency_tracking" = xyes; then
249 continue
250 else
251 break
252 fi
253 ;;
254 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
255 # This compiler won't grok '-c -o', but also, the minuso test has
256 # not run yet. These depmodes are late enough in the game, and
257 # so weak that their functioning should not be impacted.
258 am__obj=conftest.${OBJEXT-o}
259 am__minus_obj=
260 ;;
261 none) break ;;
262 esac
263 if depmode=$depmode \
264 source=sub/conftest.c object=$am__obj \
265 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
266 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
267 >/dev/null 2>conftest.err &&
268 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
269 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
270 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
271 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
272 # icc doesn't choke on unknown options, it will just issue warnings
273 # or remarks (even with -Werror). So we grep stderr for any message
274 # that says an option was ignored or not supported.
275 # When given -MP, icc 7.0 and 7.1 complain thusly:
276 # icc: Command line warning: ignoring option '-M'; no argument required
277 # The diagnosis changed in icc 8.0:
278 # icc: Command line remark: option '-MP' not supported
279 if (grep 'ignoring option' conftest.err ||
280 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
281 am_cv_$1_dependencies_compiler_type=$depmode
282 break
283 fi
284 fi
285 done
286
287 cd ..
288 rm -rf conftest.dir
289 else
290 am_cv_$1_dependencies_compiler_type=none
291 fi
292 ])
293 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
294 AM_CONDITIONAL([am__fastdep$1], [
295 test "x$enable_dependency_tracking" != xno \
296 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
297 ])
298
299
300 # AM_SET_DEPDIR
301 # -------------
302 # Choose a directory name for dependency files.
303 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
304 AC_DEFUN([AM_SET_DEPDIR],
305 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
306 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
307 ])
308
309
310 # AM_DEP_TRACK
311 # ------------
312 AC_DEFUN([AM_DEP_TRACK],
313 [AC_ARG_ENABLE([dependency-tracking], [dnl
314 AS_HELP_STRING(
315 [--enable-dependency-tracking],
316 [do not reject slow dependency extractors])
317 AS_HELP_STRING(
318 [--disable-dependency-tracking],
319 [speeds up one-time build])])
320 if test "x$enable_dependency_tracking" != xno; then
321 am_depcomp="$ac_aux_dir/depcomp"
322 AMDEPBACKSLASH='\'
323 am__nodep='_no'
324 fi
325 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
326 AC_SUBST([AMDEPBACKSLASH])dnl
327 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
328 AC_SUBST([am__nodep])dnl
329 _AM_SUBST_NOTMAKE([am__nodep])dnl
330 ])
331
332 # Generate code to set up dependency tracking. -*- Autoconf -*-
333
334 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
335 #
336 # This file is free software; the Free Software Foundation
337 # gives unlimited permission to copy and/or distribute it,
338 # with or without modifications, as long as this notice is preserved.
339
340
341 # _AM_OUTPUT_DEPENDENCY_COMMANDS
342 # ------------------------------
343 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
344 [{
345 # Older Autoconf quotes --file arguments for eval, but not when files
346 # are listed without --file. Let's play safe and only enable the eval
347 # if we detect the quoting.
348 case $CONFIG_FILES in
349 *\'*) eval set x "$CONFIG_FILES" ;;
350 *) set x $CONFIG_FILES ;;
351 esac
352 shift
353 for mf
354 do
355 # Strip MF so we end up with the name of the file.
356 mf=`echo "$mf" | sed -e 's/:.*$//'`
357 # Check whether this is an Automake generated Makefile or not.
358 # We used to match only the files named 'Makefile.in', but
359 # some people rename them; so instead we look at the file content.
360 # Grep'ing the first line is not enough: some people post-process
361 # each Makefile.in and add a new line on top of each file to say so.
362 # Grep'ing the whole file is not good either: AIX grep has a line
363 # limit of 2048, but all sed's we know have understand at least 4000.
364 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
365 dirpart=`AS_DIRNAME("$mf")`
366 else
367 continue
368 fi
369 # Extract the definition of DEPDIR, am__include, and am__quote
370 # from the Makefile without running 'make'.
371 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
372 test -z "$DEPDIR" && continue
373 am__include=`sed -n 's/^am__include = //p' < "$mf"`
374 test -z "$am__include" && continue
375 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
376 # Find all dependency output files, they are included files with
377 # $(DEPDIR) in their names. We invoke sed twice because it is the
378 # simplest approach to changing $(DEPDIR) to its actual value in the
379 # expansion.
380 for file in `sed -n "
381 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
382 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
383 # Make sure the directory exists.
384 test -f "$dirpart/$file" && continue
385 fdir=`AS_DIRNAME(["$file"])`
386 AS_MKDIR_P([$dirpart/$fdir])
387 # echo "creating $dirpart/$file"
388 echo '# dummy' > "$dirpart/$file"
389 done
390 done
391 }
392 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
393
394
395 # AM_OUTPUT_DEPENDENCY_COMMANDS
396 # -----------------------------
397 # This macro should only be invoked once -- use via AC_REQUIRE.
398 #
399 # This code is only required when automatic dependency tracking
400 # is enabled. FIXME. This creates each '.P' file that we will
401 # need in order to bootstrap the dependency handling code.
402 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
403 [AC_CONFIG_COMMANDS([depfiles],
404 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
405 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
406 ])
407
408 # Do all the work for Automake. -*- Autoconf -*-
409
410 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
411 #
412 # This file is free software; the Free Software Foundation
413 # gives unlimited permission to copy and/or distribute it,
414 # with or without modifications, as long as this notice is preserved.
415
416 # This macro actually does too much. Some checks are only needed if
417 # your package does certain things. But this isn't really a big deal.
418
419 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
420 m4_define([AC_PROG_CC],
421 m4_defn([AC_PROG_CC])
422 [_AM_PROG_CC_C_O
423 ])
424
425 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
426 # AM_INIT_AUTOMAKE([OPTIONS])
427 # -----------------------------------------------
428 # The call with PACKAGE and VERSION arguments is the old style
429 # call (pre autoconf-2.50), which is being phased out. PACKAGE
430 # and VERSION should now be passed to AC_INIT and removed from
431 # the call to AM_INIT_AUTOMAKE.
432 # We support both call styles for the transition. After
433 # the next Automake release, Autoconf can make the AC_INIT
434 # arguments mandatory, and then we can depend on a new Autoconf
435 # release and drop the old call support.
436 AC_DEFUN([AM_INIT_AUTOMAKE],
437 [AC_PREREQ([2.65])dnl
438 dnl Autoconf wants to disallow AM_ names. We explicitly allow
439 dnl the ones we care about.
440 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
441 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
442 AC_REQUIRE([AC_PROG_INSTALL])dnl
443 if test "`cd $srcdir && pwd`" != "`pwd`"; then
444 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
445 # is not polluted with repeated "-I."
446 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
447 # test to see if srcdir already configured
448 if test -f $srcdir/config.status; then
449 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
450 fi
451 fi
452
453 # test whether we have cygpath
454 if test -z "$CYGPATH_W"; then
455 if (cygpath --version) >/dev/null 2>/dev/null; then
456 CYGPATH_W='cygpath -w'
457 else
458 CYGPATH_W=echo
459 fi
460 fi
461 AC_SUBST([CYGPATH_W])
462
463 # Define the identity of the package.
464 dnl Distinguish between old-style and new-style calls.
465 m4_ifval([$2],
466 [AC_DIAGNOSE([obsolete],
467 [$0: two- and three-arguments forms are deprecated.])
468 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
469 AC_SUBST([PACKAGE], [$1])dnl
470 AC_SUBST([VERSION], [$2])],
471 [_AM_SET_OPTIONS([$1])dnl
472 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
473 m4_if(
474 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
475 [ok:ok],,
476 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
477 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
478 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
479
480 _AM_IF_OPTION([no-define],,
481 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
482 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
483
484 # Some tools Automake needs.
485 AC_REQUIRE([AM_SANITY_CHECK])dnl
486 AC_REQUIRE([AC_ARG_PROGRAM])dnl
487 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
488 AM_MISSING_PROG([AUTOCONF], [autoconf])
489 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
490 AM_MISSING_PROG([AUTOHEADER], [autoheader])
491 AM_MISSING_PROG([MAKEINFO], [makeinfo])
492 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
493 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
494 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
495 # For better backward compatibility. To be removed once Automake 1.9.x
496 # dies out for good. For more background, see:
497 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
498 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
499 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
500 # We need awk for the "check" target (and possibly the TAP driver). The
501 # system "awk" is bad on some platforms.
502 AC_REQUIRE([AC_PROG_AWK])dnl
503 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
504 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
505 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
506 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
507 [_AM_PROG_TAR([v7])])])
508 _AM_IF_OPTION([no-dependencies],,
509 [AC_PROVIDE_IFELSE([AC_PROG_CC],
510 [_AM_DEPENDENCIES([CC])],
511 [m4_define([AC_PROG_CC],
512 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
513 AC_PROVIDE_IFELSE([AC_PROG_CXX],
514 [_AM_DEPENDENCIES([CXX])],
515 [m4_define([AC_PROG_CXX],
516 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
517 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
518 [_AM_DEPENDENCIES([OBJC])],
519 [m4_define([AC_PROG_OBJC],
520 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
521 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
522 [_AM_DEPENDENCIES([OBJCXX])],
523 [m4_define([AC_PROG_OBJCXX],
524 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
525 ])
526 AC_REQUIRE([AM_SILENT_RULES])dnl
527 dnl The testsuite driver may need to know about EXEEXT, so add the
528 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
529 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
530 AC_CONFIG_COMMANDS_PRE(dnl
531 [m4_provide_if([_AM_COMPILER_EXEEXT],
532 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
533
534 # POSIX will say in a future version that running "rm -f" with no argument
535 # is OK; and we want to be able to make that assumption in our Makefile
536 # recipes. So use an aggressive probe to check that the usage we want is
537 # actually supported "in the wild" to an acceptable degree.
538 # See automake bug#10828.
539 # To make any issue more visible, cause the running configure to be aborted
540 # by default if the 'rm' program in use doesn't match our expectations; the
541 # user can still override this though.
542 if rm -f && rm -fr && rm -rf; then : OK; else
543 cat >&2 <<'END'
544 Oops!
545
546 Your 'rm' program seems unable to run without file operands specified
547 on the command line, even when the '-f' option is present. This is contrary
548 to the behaviour of most rm programs out there, and not conforming with
549 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
550
551 Please tell bug-automake@gnu.org about your system, including the value
552 of your $PATH and any error possibly output before this message. This
553 can help us improve future automake versions.
554
555 END
556 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
557 echo 'Configuration will proceed anyway, since you have set the' >&2
558 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
559 echo >&2
560 else
561 cat >&2 <<'END'
562 Aborting the configuration process, to ensure you take notice of the issue.
563
564 You can download and install GNU coreutils to get an 'rm' implementation
565 that behaves properly: <http://www.gnu.org/software/coreutils/>.
566
567 If you want to complete the configuration process using your problematic
568 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
569 to "yes", and re-run configure.
570
571 END
572 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
573 fi
574 fi
575 dnl The trailing newline in this macro's definition is deliberate, for
576 dnl backward compatibility and to allow trailing 'dnl'-style comments
577 dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
578 ])
579
580 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
581 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
582 dnl mangled by Autoconf and run in a shell conditional statement.
583 m4_define([_AC_COMPILER_EXEEXT],
584 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
585
586 # When config.status generates a header, we must update the stamp-h file.
587 # This file resides in the same directory as the config header
588 # that is generated. The stamp files are numbered to have different names.
589
590 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
591 # loop where config.status creates the headers, so we can generate
592 # our stamp files there.
593 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
594 [# Compute $1's index in $config_headers.
595 _am_arg=$1
596 _am_stamp_count=1
597 for _am_header in $config_headers :; do
598 case $_am_header in
599 $_am_arg | $_am_arg:* )
600 break ;;
601 * )
602 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
603 esac
604 done
605 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
606
607 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
608 #
609 # This file is free software; the Free Software Foundation
610 # gives unlimited permission to copy and/or distribute it,
611 # with or without modifications, as long as this notice is preserved.
612
613 # AM_PROG_INSTALL_SH
614 # ------------------
615 # Define $install_sh.
616 AC_DEFUN([AM_PROG_INSTALL_SH],
617 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
618 if test x"${install_sh+set}" != xset; then
619 case $am_aux_dir in
620 *\ * | *\ *)
621 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
622 *)
623 install_sh="\${SHELL} $am_aux_dir/install-sh"
624 esac
625 fi
626 AC_SUBST([install_sh])])
627
628 # Copyright (C) 2003-2014 Free Software Foundation, Inc.
629 #
630 # This file is free software; the Free Software Foundation
631 # gives unlimited permission to copy and/or distribute it,
632 # with or without modifications, as long as this notice is preserved.
633
634 # Check whether the underlying file-system supports filenames
635 # with a leading dot. For instance MS-DOS doesn't.
636 AC_DEFUN([AM_SET_LEADING_DOT],
637 [rm -rf .tst 2>/dev/null
638 mkdir .tst 2>/dev/null
639 if test -d .tst; then
640 am__leading_dot=.
641 else
642 am__leading_dot=_
643 fi
644 rmdir .tst 2>/dev/null
645 AC_SUBST([am__leading_dot])])
646
647 # Check to see how 'make' treats includes. -*- Autoconf -*-
648
649 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
650 #
651 # This file is free software; the Free Software Foundation
652 # gives unlimited permission to copy and/or distribute it,
653 # with or without modifications, as long as this notice is preserved.
654
655 # AM_MAKE_INCLUDE()
656 # -----------------
657 # Check to see how make treats includes.
658 AC_DEFUN([AM_MAKE_INCLUDE],
659 [am_make=${MAKE-make}
660 cat > confinc << 'END'
661 am__doit:
662 @echo this is the am__doit target
663 .PHONY: am__doit
664 END
665 # If we don't find an include directive, just comment out the code.
666 AC_MSG_CHECKING([for style of include used by $am_make])
667 am__include="#"
668 am__quote=
669 _am_result=none
670 # First try GNU make style include.
671 echo "include confinc" > confmf
672 # Ignore all kinds of additional output from 'make'.
673 case `$am_make -s -f confmf 2> /dev/null` in #(
674 *the\ am__doit\ target*)
675 am__include=include
676 am__quote=
677 _am_result=GNU
678 ;;
679 esac
680 # Now try BSD make style include.
681 if test "$am__include" = "#"; then
682 echo '.include "confinc"' > confmf
683 case `$am_make -s -f confmf 2> /dev/null` in #(
684 *the\ am__doit\ target*)
685 am__include=.include
686 am__quote="\""
687 _am_result=BSD
688 ;;
689 esac
690 fi
691 AC_SUBST([am__include])
692 AC_SUBST([am__quote])
693 AC_MSG_RESULT([$_am_result])
694 rm -f confinc confmf
695 ])
696
697 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
698
699 # Copyright (C) 1997-2014 Free Software Foundation, Inc.
700 #
701 # This file is free software; the Free Software Foundation
702 # gives unlimited permission to copy and/or distribute it,
703 # with or without modifications, as long as this notice is preserved.
704
705 # AM_MISSING_PROG(NAME, PROGRAM)
706 # ------------------------------
707 AC_DEFUN([AM_MISSING_PROG],
708 [AC_REQUIRE([AM_MISSING_HAS_RUN])
709 $1=${$1-"${am_missing_run}$2"}
710 AC_SUBST($1)])
711
712 # AM_MISSING_HAS_RUN
713 # ------------------
714 # Define MISSING if not defined so far and test if it is modern enough.
715 # If it is, set am_missing_run to use it, otherwise, to nothing.
716 AC_DEFUN([AM_MISSING_HAS_RUN],
717 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
718 AC_REQUIRE_AUX_FILE([missing])dnl
719 if test x"${MISSING+set}" != xset; then
720 case $am_aux_dir in
721 *\ * | *\ *)
722 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
723 *)
724 MISSING="\${SHELL} $am_aux_dir/missing" ;;
725 esac
726 fi
727 # Use eval to expand $SHELL
728 if eval "$MISSING --is-lightweight"; then
729 am_missing_run="$MISSING "
730 else
731 am_missing_run=
732 AC_MSG_WARN(['missing' script is too old or missing])
733 fi
734 ])
735
736 # Helper functions for option handling. -*- Autoconf -*-
737
738 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
739 #
740 # This file is free software; the Free Software Foundation
741 # gives unlimited permission to copy and/or distribute it,
742 # with or without modifications, as long as this notice is preserved.
743
744 # _AM_MANGLE_OPTION(NAME)
745 # -----------------------
746 AC_DEFUN([_AM_MANGLE_OPTION],
747 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
748
749 # _AM_SET_OPTION(NAME)
750 # --------------------
751 # Set option NAME. Presently that only means defining a flag for this option.
752 AC_DEFUN([_AM_SET_OPTION],
753 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
754
755 # _AM_SET_OPTIONS(OPTIONS)
756 # ------------------------
757 # OPTIONS is a space-separated list of Automake options.
758 AC_DEFUN([_AM_SET_OPTIONS],
759 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
760
761 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
762 # -------------------------------------------
763 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
764 AC_DEFUN([_AM_IF_OPTION],
765 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
766
767 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
768 #
769 # This file is free software; the Free Software Foundation
770 # gives unlimited permission to copy and/or distribute it,
771 # with or without modifications, as long as this notice is preserved.
772
773 # _AM_PROG_CC_C_O
774 # ---------------
775 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
776 # to automatically call this.
777 AC_DEFUN([_AM_PROG_CC_C_O],
778 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
779 AC_REQUIRE_AUX_FILE([compile])dnl
780 AC_LANG_PUSH([C])dnl
781 AC_CACHE_CHECK(
782 [whether $CC understands -c and -o together],
783 [am_cv_prog_cc_c_o],
784 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
785 # Make sure it works both with $CC and with simple cc.
786 # Following AC_PROG_CC_C_O, we do the test twice because some
787 # compilers refuse to overwrite an existing .o file with -o,
788 # though they will create one.
789 am_cv_prog_cc_c_o=yes
790 for am_i in 1 2; do
791 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
792 && test -f conftest2.$ac_objext; then
793 : OK
794 else
795 am_cv_prog_cc_c_o=no
796 break
797 fi
798 done
799 rm -f core conftest*
800 unset am_i])
801 if test "$am_cv_prog_cc_c_o" != yes; then
802 # Losing compiler, so override with the script.
803 # FIXME: It is wrong to rewrite CC.
804 # But if we don't then we get into trouble of one sort or another.
805 # A longer-term fix would be to have automake use am__CC in this case,
806 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
807 CC="$am_aux_dir/compile $CC"
808 fi
809 AC_LANG_POP([C])])
810
811 # For backward compatibility.
812 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
813
814 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
815 #
816 # This file is free software; the Free Software Foundation
817 # gives unlimited permission to copy and/or distribute it,
818 # with or without modifications, as long as this notice is preserved.
819
820 # AM_RUN_LOG(COMMAND)
821 # -------------------
822 # Run COMMAND, save the exit status in ac_status, and log it.
823 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
824 AC_DEFUN([AM_RUN_LOG],
825 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
826 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
827 ac_status=$?
828 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
829 (exit $ac_status); }])
830
831 # Check to make sure that the build environment is sane. -*- Autoconf -*-
832
833 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
834 #
835 # This file is free software; the Free Software Foundation
836 # gives unlimited permission to copy and/or distribute it,
837 # with or without modifications, as long as this notice is preserved.
838
839 # AM_SANITY_CHECK
840 # ---------------
841 AC_DEFUN([AM_SANITY_CHECK],
842 [AC_MSG_CHECKING([whether build environment is sane])
843 # Reject unsafe characters in $srcdir or the absolute working directory
844 # name. Accept space and tab only in the latter.
845 am_lf='
846 '
847 case `pwd` in
848 *[[\\\"\#\$\&\'\`$am_lf]]*)
849 AC_MSG_ERROR([unsafe absolute working directory name]);;
850 esac
851 case $srcdir in
852 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
853 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
854 esac
855
856 # Do 'set' in a subshell so we don't clobber the current shell's
857 # arguments. Must try -L first in case configure is actually a
858 # symlink; some systems play weird games with the mod time of symlinks
859 # (eg FreeBSD returns the mod time of the symlink's containing
860 # directory).
861 if (
862 am_has_slept=no
863 for am_try in 1 2; do
864 echo "timestamp, slept: $am_has_slept" > conftest.file
865 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
866 if test "$[*]" = "X"; then
867 # -L didn't work.
868 set X `ls -t "$srcdir/configure" conftest.file`
869 fi
870 if test "$[*]" != "X $srcdir/configure conftest.file" \
871 && test "$[*]" != "X conftest.file $srcdir/configure"; then
872
873 # If neither matched, then we have a broken ls. This can happen
874 # if, for instance, CONFIG_SHELL is bash and it inherits a
875 # broken ls alias from the environment. This has actually
876 # happened. Such a system could not be considered "sane".
877 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
878 alias in your environment])
879 fi
880 if test "$[2]" = conftest.file || test $am_try -eq 2; then
881 break
882 fi
883 # Just in case.
884 sleep 1
885 am_has_slept=yes
886 done
887 test "$[2]" = conftest.file
888 )
889 then
890 # Ok.
891 :
892 else
893 AC_MSG_ERROR([newly created file is older than distributed files!
894 Check your system clock])
895 fi
896 AC_MSG_RESULT([yes])
897 # If we didn't sleep, we still need to ensure time stamps of config.status and
898 # generated files are strictly newer.
899 am_sleep_pid=
900 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
901 ( sleep 1 ) &
902 am_sleep_pid=$!
903 fi
904 AC_CONFIG_COMMANDS_PRE(
905 [AC_MSG_CHECKING([that generated files are newer than configure])
906 if test -n "$am_sleep_pid"; then
907 # Hide warnings about reused PIDs.
908 wait $am_sleep_pid 2>/dev/null
909 fi
910 AC_MSG_RESULT([done])])
911 rm -f conftest.file
912 ])
913
914 # Copyright (C) 2009-2014 Free Software Foundation, Inc.
915 #
916 # This file is free software; the Free Software Foundation
917 # gives unlimited permission to copy and/or distribute it,
918 # with or without modifications, as long as this notice is preserved.
919
920 # AM_SILENT_RULES([DEFAULT])
921 # --------------------------
922 # Enable less verbose build rules; with the default set to DEFAULT
923 # ("yes" being less verbose, "no" or empty being verbose).
924 AC_DEFUN([AM_SILENT_RULES],
925 [AC_ARG_ENABLE([silent-rules], [dnl
926 AS_HELP_STRING(
927 [--enable-silent-rules],
928 [less verbose build output (undo: "make V=1")])
929 AS_HELP_STRING(
930 [--disable-silent-rules],
931 [verbose build output (undo: "make V=0")])dnl
932 ])
933 case $enable_silent_rules in @%:@ (((
934 yes) AM_DEFAULT_VERBOSITY=0;;
935 no) AM_DEFAULT_VERBOSITY=1;;
936 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
937 esac
938 dnl
939 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
940 dnl do not support nested variable expansions.
941 dnl See automake bug#9928 and bug#10237.
942 am_make=${MAKE-make}
943 AC_CACHE_CHECK([whether $am_make supports nested variables],
944 [am_cv_make_support_nested_variables],
945 [if AS_ECHO([['TRUE=$(BAR$(V))
946 BAR0=false
947 BAR1=true
948 V=1
949 am__doit:
950 @$(TRUE)
951 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
952 am_cv_make_support_nested_variables=yes
953 else
954 am_cv_make_support_nested_variables=no
955 fi])
956 if test $am_cv_make_support_nested_variables = yes; then
957 dnl Using '$V' instead of '$(V)' breaks IRIX make.
958 AM_V='$(V)'
959 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
960 else
961 AM_V=$AM_DEFAULT_VERBOSITY
962 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
963 fi
964 AC_SUBST([AM_V])dnl
965 AM_SUBST_NOTMAKE([AM_V])dnl
966 AC_SUBST([AM_DEFAULT_V])dnl
967 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
968 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
969 AM_BACKSLASH='\'
970 AC_SUBST([AM_BACKSLASH])dnl
971 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
972 ])
973
974 # Copyright (C) 2001-2014 Free Software Foundation, Inc.
975 #
976 # This file is free software; the Free Software Foundation
977 # gives unlimited permission to copy and/or distribute it,
978 # with or without modifications, as long as this notice is preserved.
979
980 # AM_PROG_INSTALL_STRIP
981 # ---------------------
982 # One issue with vendor 'install' (even GNU) is that you can't
983 # specify the program used to strip binaries. This is especially
984 # annoying in cross-compiling environments, where the build's strip
985 # is unlikely to handle the host's binaries.
986 # Fortunately install-sh will honor a STRIPPROG variable, so we
987 # always use install-sh in "make install-strip", and initialize
988 # STRIPPROG with the value of the STRIP variable (set by the user).
989 AC_DEFUN([AM_PROG_INSTALL_STRIP],
990 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
991 # Installed binaries are usually stripped using 'strip' when the user
992 # run "make install-strip". However 'strip' might not be the right
993 # tool to use in cross-compilation environments, therefore Automake
994 # will honor the 'STRIP' environment variable to overrule this program.
995 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
996 if test "$cross_compiling" != no; then
997 AC_CHECK_TOOL([STRIP], [strip], :)
998 fi
999 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
1000 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1001
1002 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
1003 #
1004 # This file is free software; the Free Software Foundation
1005 # gives unlimited permission to copy and/or distribute it,
1006 # with or without modifications, as long as this notice is preserved.
1007
1008 # _AM_SUBST_NOTMAKE(VARIABLE)
1009 # ---------------------------
1010 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1011 # This macro is traced by Automake.
1012 AC_DEFUN([_AM_SUBST_NOTMAKE])
1013
1014 # AM_SUBST_NOTMAKE(VARIABLE)
1015 # --------------------------
1016 # Public sister of _AM_SUBST_NOTMAKE.
1017 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1018
1019 # Check how to create a tarball. -*- Autoconf -*-
1020
1021 # Copyright (C) 2004-2014 Free Software Foundation, Inc.
1022 #
1023 # This file is free software; the Free Software Foundation
1024 # gives unlimited permission to copy and/or distribute it,
1025 # with or without modifications, as long as this notice is preserved.
1026
1027 # _AM_PROG_TAR(FORMAT)
1028 # --------------------
1029 # Check how to create a tarball in format FORMAT.
1030 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
1031 #
1032 # Substitute a variable $(am__tar) that is a command
1033 # writing to stdout a FORMAT-tarball containing the directory
1034 # $tardir.
1035 # tardir=directory && $(am__tar) > result.tar
1036 #
1037 # Substitute a variable $(am__untar) that extract such
1038 # a tarball read from stdin.
1039 # $(am__untar) < result.tar
1040 #
1041 AC_DEFUN([_AM_PROG_TAR],
1042 [# Always define AMTAR for backward compatibility. Yes, it's still used
1043 # in the wild :-( We should find a proper way to deprecate it ...
1044 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1045
1046 # We'll loop over all known methods to create a tar archive until one works.
1047 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1048
1049 m4_if([$1], [v7],
1050 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1051
1052 [m4_case([$1],
1053 [ustar],
1054 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1055 # There is notably a 21 bits limit for the UID and the GID. In fact,
1056 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1057 # and bug#13588).
1058 am_max_uid=2097151 # 2^21 - 1
1059 am_max_gid=$am_max_uid
1060 # The $UID and $GID variables are not portable, so we need to resort
1061 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1062 # below are definitely unexpected, so allow the users to see them
1063 # (that is, avoid stderr redirection).
1064 am_uid=`id -u || echo unknown`
1065 am_gid=`id -g || echo unknown`
1066 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1067 if test $am_uid -le $am_max_uid; then
1068 AC_MSG_RESULT([yes])
1069 else
1070 AC_MSG_RESULT([no])
1071 _am_tools=none
1072 fi
1073 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1074 if test $am_gid -le $am_max_gid; then
1075 AC_MSG_RESULT([yes])
1076 else
1077 AC_MSG_RESULT([no])
1078 _am_tools=none
1079 fi],
1080
1081 [pax],
1082 [],
1083
1084 [m4_fatal([Unknown tar format])])
1085
1086 AC_MSG_CHECKING([how to create a $1 tar archive])
1087
1088 # Go ahead even if we have the value already cached. We do so because we
1089 # need to set the values for the 'am__tar' and 'am__untar' variables.
1090 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1091
1092 for _am_tool in $_am_tools; do
1093 case $_am_tool in
1094 gnutar)
1095 for _am_tar in tar gnutar gtar; do
1096 AM_RUN_LOG([$_am_tar --version]) && break
1097 done
1098 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1099 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1100 am__untar="$_am_tar -xf -"
1101 ;;
1102 plaintar)
1103 # Must skip GNU tar: if it does not support --format= it doesn't create
1104 # ustar tarball either.
1105 (tar --version) >/dev/null 2>&1 && continue
1106 am__tar='tar chf - "$$tardir"'
1107 am__tar_='tar chf - "$tardir"'
1108 am__untar='tar xf -'
1109 ;;
1110 pax)
1111 am__tar='pax -L -x $1 -w "$$tardir"'
1112 am__tar_='pax -L -x $1 -w "$tardir"'
1113 am__untar='pax -r'
1114 ;;
1115 cpio)
1116 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1117 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1118 am__untar='cpio -i -H $1 -d'
1119 ;;
1120 none)
1121 am__tar=false
1122 am__tar_=false
1123 am__untar=false
1124 ;;
1125 esac
1126
1127 # If the value was cached, stop now. We just wanted to have am__tar
1128 # and am__untar set.
1129 test -n "${am_cv_prog_tar_$1}" && break
1130
1131 # tar/untar a dummy directory, and stop if the command works.
1132 rm -rf conftest.dir
1133 mkdir conftest.dir
1134 echo GrepMe > conftest.dir/file
1135 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1136 rm -rf conftest.dir
1137 if test -s conftest.tar; then
1138 AM_RUN_LOG([$am__untar <conftest.tar])
1139 AM_RUN_LOG([cat conftest.dir/file])
1140 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1141 fi
1142 done
1143 rm -rf conftest.dir
1144
1145 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1146 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1147
1148 AC_SUBST([am__tar])
1149 AC_SUBST([am__untar])
1150 ]) # _AM_PROG_TAR
1151
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 2001-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 am__tty_colors_dummy = \
17 mgn= red= grn= lgn= blu= brg= std=; \
18 am__color_tests=no
19
20 am__tty_colors = { \
21 $(am__tty_colors_dummy); \
22 if test "X$(AM_COLOR_TESTS)" = Xno; then \
23 am__color_tests=no; \
24 elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
25 am__color_tests=yes; \
26 ## If stdout is a non-dumb tty, use colors. If test -t is not supported,
27 ## then this check fails; a conservative approach. Of course do not
28 ## redirect stdout here, just stderr.
29 elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
30 am__color_tests=yes; \
31 fi; \
32 if test $$am__color_tests = yes; then \
33 red=''; \
34 grn=''; \
35 lgn=''; \
36 blu=''; \
37 mgn=''; \
38 brg=''; \
39 std=''; \
40 fi; \
41 }
42
43 .PHONY: check-TESTS
44
45 if !%?SERIAL_TESTS%
46
47 include inst-vars.am
48
49 ## New parallel test driver.
50 ##
51 ## The first version of the code here was adapted from check.mk, which was
52 ## originally written at EPITA/LRDE, further developed at Gostai, then made
53 ## its way from GNU coreutils to end up, largely rewritten, in Automake.
54 ## The current version is an heavy rewrite of that, to allow for support
55 ## of more test metadata, and the use of custom test drivers and protocols
56 ## (among them, TAP).
57
58 am__recheck_rx = ^[ ]*:recheck:[ ]*
59 am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
60 am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
61
62 # A command that, given a newline-separated list of test names on the
63 # standard input, print the name of the tests that are to be re-run
64 # upon "make recheck".
65 am__list_recheck_tests = $(AWK) '{ \
66 ## By default, we assume the test is to be re-run.
67 recheck = 1; \
68 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
69 { \
70 if (rc < 0) \
71 { \
72 ## If we've encountered an I/O error here, there are three possibilities:
73 ##
74 ## [1] The '.log' file exists, but the '.trs' does not; in this case,
75 ## we "gracefully" recover by assuming the corresponding test is
76 ## to be re-run (which will re-create the missing '.trs' file).
77 ##
78 ## [2] Both the '.log' and '.trs' files are missing; this means that
79 ## the corresponding test has not been run, and is thus *not* to
80 ## be re-run.
81 ##
82 ## [3] We have encountered some corner-case problem (e.g., a '.log' or
83 ## '.trs' files somehow made unreadable, or issues with a bad NFS
84 ## connection, or whatever); we don't handle such corner cases.
85 ##
86 if ((getline line2 < ($$0 ".log")) < 0) \
87 recheck = 0; \
88 break; \
89 } \
90 else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
91 ## A directive explicitly specifying the test is *not* to be re-run.
92 { \
93 recheck = 0; \
94 break; \
95 } \
96 else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
97 { \
98 ## A directive explicitly specifying the test *is* to be re-run.
99 break; \
100 } \
101 ## else continue with the next iteration.
102 }; \
103 if (recheck) \
104 print $$0; \
105 ## Don't leak open file descriptors, as this could cause serious
106 ## problems when there are many tests (yes, even on Linux).
107 close ($$0 ".trs"); \
108 close ($$0 ".log"); \
109 }'
110
111 # A command that, given a newline-separated list of test names on the
112 # standard input, create the global log from their .trs and .log files.
113 am__create_global_log = $(AWK) ' \
114 function fatal(msg) \
115 { \
116 print "fatal: making $@: " msg | "cat >&2"; \
117 exit 1; \
118 } \
119 function rst_section(header) \
120 { \
121 print header; \
122 len = length(header); \
123 for (i = 1; i <= len; i = i + 1) \
124 printf "="; \
125 printf "\n\n"; \
126 } \
127 { \
128 ## By default, we assume the test log is to be copied in the global log,
129 ## and that its result is simply "RUN" (i.e., we still don't know what
130 ## it outcome was, but we know that at least it has run).
131 copy_in_global_log = 1; \
132 global_test_result = "RUN"; \
133 while ((rc = (getline line < ($$0 ".trs"))) != 0) \
134 { \
135 if (rc < 0) \
136 fatal("failed to read from " $$0 ".trs"); \
137 if (line ~ /$(am__global_test_result_rx)/) \
138 { \
139 sub("$(am__global_test_result_rx)", "", line); \
140 sub("[ ]*$$", "", line); \
141 global_test_result = line; \
142 } \
143 else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
144 copy_in_global_log = 0; \
145 }; \
146 if (copy_in_global_log) \
147 { \
148 rst_section(global_test_result ": " $$0); \
149 while ((rc = (getline line < ($$0 ".log"))) != 0) \
150 { \
151 if (rc < 0) \
152 fatal("failed to read from " $$0 ".log"); \
153 print line; \
154 }; \
155 printf "\n"; \
156 }; \
157 ## Don't leak open file descriptors, as this could cause serious
158 ## problems when there are many tests (yes, even on Linux).
159 close ($$0 ".trs"); \
160 close ($$0 ".log"); \
161 }'
162
163 # Restructured Text title.
164 am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
165
166 # Solaris 10 'make', and several other traditional 'make' implementations,
167 # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
168 # by disabling -e (using the XSI extension "set +e") if it's set.
169 am__sh_e_setup = case $$- in *e*) set +e;; esac
170
171 # Default flags passed to test drivers.
172 am__common_driver_flags = \
173 --color-tests "$$am__color_tests" \
174 --enable-hard-errors "$$am__enable_hard_errors" \
175 --expect-failure "$$am__expect_failure"
176
177 # To be inserted before the command running the test. Creates the
178 # directory for the log if needed. Stores in $dir the directory
179 # containing $f, in $tst the test, in $log the log. Executes the
180 # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
181 # passes TESTS_ENVIRONMENT. Set up options for the wrapper that
182 # will run the test scripts (or their associated LOG_COMPILER, if
183 # thy have one).
184 am__check_pre = \
185 $(am__sh_e_setup); \
186 $(am__vpath_adj_setup) $(am__vpath_adj) \
187 $(am__tty_colors); \
188 srcdir=$(srcdir); export srcdir; \
189 case "$@" in \
190 */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
191 *) am__odir=.;; \
192 esac; \
193 test "x$$am__odir" = x"." || test -d "$$am__odir" \
194 || $(MKDIR_P) "$$am__odir" || exit $$?; \
195 if test -f "./$$f"; then dir=./; \
196 elif test -f "$$f"; then dir=; \
197 else dir="$(srcdir)/"; fi; \
198 tst=$$dir$$f; log='$@'; \
199 if test -n '$(DISABLE_HARD_ERRORS)'; then \
200 am__enable_hard_errors=no; \
201 else \
202 am__enable_hard_errors=yes; \
203 fi; \
204 ## The use of $dir below is required to account for VPATH
205 ## rewriting done by Sun make.
206 case " $(XFAIL_TESTS) " in \
207 *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
208 am__expect_failure=yes;; \
209 *) \
210 am__expect_failure=no;; \
211 esac; \
212 $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
213
214 # A shell command to get the names of the tests scripts with any registered
215 # extension removed (i.e., equivalently, the names of the test logs, with
216 # the '.log' extension removed). The result is saved in the shell variable
217 # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
218 # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
219 # since that might cause problem with VPATH rewrites for suffix-less tests.
220 # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
221 am__set_TESTS_bases = \
222 bases='$(TEST_LOGS)'; \
223 bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
224 ## Trim away any extra whitespace. This has already proved useful
225 ## in avoiding weird bug on lesser make implementations. It also
226 ## works around the GNU make 3.80 bug where trailing whitespace in
227 ## "TESTS = foo.test $(empty)" causes $(TESTS_LOGS) to erroneously
228 ## expand to "foo.log .log".
229 bases=`echo $$bases`
230
231 # Recover from deleted '.trs' file; this should ensure that
232 # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
233 # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
234 # to avoid problems with "make -n".
235 .log.trs:
236 rm -f $< $@
237 $(MAKE) $(AM_MAKEFLAGS) $<
238
239 # Leading 'am--fnord' is there to ensure the list of targets does not
240 # expand to empty, as could happen e.g. with make check TESTS=''.
241 am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
242 am--force-recheck:
243 @:
244
245 $(TEST_SUITE_LOG): $(TEST_LOGS)
246 @$(am__set_TESTS_bases); \
247 ## Helper shell function, tells whether a path refers to an existing,
248 ## regular, readable file.
249 am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
250 ## We need to ensures that all the required '.trs' and '.log' files will
251 ## be present and readable. The direct dependencies of $(TEST_SUITE_LOG)
252 ## only ensure that all the '.log' files exists; they don't ensure that
253 ## the '.log' files are readable, and worse, they don't ensure that the
254 ## '.trs' files even exist.
255 redo_bases=`for i in $$bases; do \
256 am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
257 done`; \
258 if test -n "$$redo_bases"; then \
259 ## Uh-oh, either some '.log' files were unreadable, or some '.trs' files
260 ## were missing (or unreadable). We need to re-run the corresponding
261 ## tests in order to re-create them.
262 redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
263 redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
264 if $(am__make_dryrun); then :; else \
265 ## Break "rm -f" into two calls to minimize the possibility of exceeding
266 ## command line length limits.
267 rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
268 fi; \
269 fi; \
270 ## Use a trick to to ensure that we don't go into an infinite recursion
271 ## in case a test log in $(TEST_LOGS) is the same as $(TEST_SUITE_LOG).
272 ## Yes, this has already happened in practice. Sigh!
273 if test -n "$$am__remaking_logs"; then \
274 echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
275 "recursion detected" >&2; \
276 ## Invoking this unconditionally could cause a useless "make all" to
277 ## be invoked when '$redo_logs' expands to empty (automake bug#16302).
278 elif test -n "$$redo_logs"; then \
279 am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
280 fi; \
281 if $(am__make_dryrun); then :; else \
282 ## Sanity check: each unreadable or non-existent test result file should
283 ## has been properly remade at this point, as should the corresponding log
284 ## file.
285 st=0; \
286 errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
287 for i in $$redo_bases; do \
288 test -f $$i.trs && test -r $$i.trs \
289 || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
290 test -f $$i.log && test -r $$i.log \
291 || { echo "$$errmsg $$i.log" >&2; st=1; }; \
292 done; \
293 test $$st -eq 0 || exit 1; \
294 fi
295 ## We need a new subshell to work portably with "make -n", since the
296 ## previous part of the recipe contained a $(MAKE) invocation.
297 @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
298 ws='[ ]'; \
299 ## List of test result files.
300 results=`for b in $$bases; do echo $$b.trs; done`; \
301 test -n "$$results" || results=/dev/null; \
302 ## Prepare data for the test suite summary. These do not take into account
303 ## unreadable test results, but they'll be appropriately updated later if
304 ## needed.
305 all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
306 pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
307 fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
308 skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
309 xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
310 xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
311 error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
312 ## Whether the testsuite was successful or not.
313 if test `expr $$fail + $$xpass + $$error` -eq 0; then \
314 success=true; \
315 else \
316 success=false; \
317 fi; \
318 ## Make $br a line of exactly 76 '=' characters, that will be used to
319 ## enclose the testsuite summary report when displayed on the console.
320 br='==================='; br=$$br$$br$$br$$br; \
321 ## When writing the test summary to the console, we want to color a line
322 ## reporting the count of some result *only* if at least one test
323 ## experienced such a result. This function is handy in this regard.
324 result_count () \
325 { \
326 if test x"$$1" = x"--maybe-color"; then \
327 maybe_colorize=yes; \
328 elif test x"$$1" = x"--no-color"; then \
329 maybe_colorize=no; \
330 else \
331 echo "$@: invalid 'result_count' usage" >&2; exit 4; \
332 fi; \
333 shift; \
334 desc=$$1 count=$$2; \
335 if test $$maybe_colorize = yes && test $$count -gt 0; then \
336 color_start=$$3 color_end=$$std; \
337 else \
338 color_start= color_end=; \
339 fi; \
340 echo "$${color_start}# $$desc $$count$${color_end}"; \
341 }; \
342 ## A shell function that creates the testsuite summary. We need it
343 ## because we have to create *two* summaries, one for test-suite.log,
344 ## and a possibly-colorized one for console output.
345 create_testsuite_report () \
346 { \
347 result_count $$1 "TOTAL:" $$all "$$brg"; \
348 result_count $$1 "PASS: " $$pass "$$grn"; \
349 result_count $$1 "SKIP: " $$skip "$$blu"; \
350 result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
351 result_count $$1 "FAIL: " $$fail "$$red"; \
352 result_count $$1 "XPASS:" $$xpass "$$red"; \
353 result_count $$1 "ERROR:" $$error "$$mgn"; \
354 }; \
355 ## Write "global" testsuite log.
356 { \
357 echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
358 $(am__rst_title); \
359 create_testsuite_report --no-color; \
360 echo; \
361 echo ".. contents:: :depth: 2"; \
362 echo; \
363 for b in $$bases; do echo $$b; done \
364 | $(am__create_global_log); \
365 } >$(TEST_SUITE_LOG).tmp || exit 1; \
366 mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
367 ## Emit the test summary on the console.
368 if $$success; then \
369 col="$$grn"; \
370 else \
371 col="$$red"; \
372 test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
373 fi; \
374 ## Multi line coloring is problematic with "less -R", so we really need
375 ## to color each line individually.
376 echo "$${col}$$br$${std}"; \
377 echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
378 echo "$${col}$$br$${std}"; \
379 ## This is expected to go to the console, so it might have to be colorized.
380 create_testsuite_report --maybe-color; \
381 echo "$$col$$br$$std"; \
382 if $$success; then :; else \
383 echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
384 if test -n "$(PACKAGE_BUGREPORT)"; then \
385 echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
386 fi; \
387 echo "$$col$$br$$std"; \
388 fi; \
389 ## Be sure to exit with the proper exit status. The use of "exit 1" below
390 ## is required to work around a FreeBSD make bug (present only when running
391 ## in concurrent mode). See automake bug#9245:
392 ## <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9245>
393 ## and FreeBSD PR bin/159730:
394 ## <http://www.freebsd.org/cgi/query-pr.cgi?pr=159730>.
395 $$success || exit 1
396
397 RECHECK_LOGS = $(TEST_LOGS)
398
399 ## ------------------------------------------ ##
400 ## Running all tests, or rechecking failures. ##
401 ## ------------------------------------------ ##
402
403 check-TESTS:
404 @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
405 @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
406 ## We always have to remove $(TEST_SUITE_LOG), to ensure its rule is run
407 ## in any case even in lazy mode: otherwise, if no test needs rerunning,
408 ## or a prior run plus reruns all happen within the same timestamp (can
409 ## happen with a prior "make TESTS=<subset>"), then we get no log output.
410 ## OTOH, this means that, in the rule for '$(TEST_SUITE_LOG)', we
411 ## cannot use '$?' to compute the set of lazily rerun tests, lest
412 ## we rely on .PHONY to work portably.
413 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
414 @set +e; $(am__set_TESTS_bases); \
415 log_list=`for i in $$bases; do echo $$i.log; done`; \
416 trs_list=`for i in $$bases; do echo $$i.trs; done`; \
417 ## Remove newlines and normalize whitespace. Trailing (and possibly
418 ## leading) whitespace is known to cause segmentation faults on
419 ## Solaris 10 XPG4 make.
420 log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
421 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
422 ## Be sure to exit with the proper exit status (automake bug#9245). See
423 ## comments in the recipe of $(TEST_SUITE_LOG) above for more information.
424 exit $$?;
425
426 ## Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
427 ## It must also depend on the 'all' target. See automake bug#11252.
428 recheck: all %CHECK_DEPS%
429 ## See comments above in the check-TESTS recipe for why remove
430 ## $(TEST_SUITE_LOG) here.
431 @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
432 @set +e; $(am__set_TESTS_bases); \
433 ## We must only consider tests that had an unexpected outcome (FAIL
434 ## or XPASS) in the earlier run.
435 bases=`for i in $$bases; do echo $$i; done \
436 | $(am__list_recheck_tests)` || exit 1; \
437 log_list=`for i in $$bases; do echo $$i.log; done`; \
438 ## Remove newlines and normalize whitespace. Trailing (and possibly
439 ## leading) whitespace is known to cause segmentation faults on
440 ## Solaris 10 XPG4 make.
441 log_list=`echo $$log_list`; \
442 ## Move the '.log' and '.trs' files associated with the tests to be
443 ## re-run out of the way, so that those tests will be re-run by the
444 ## "make test-suite.log" recursive invocation below.
445 ## Two tricky requirements:
446 ## - we must avoid extra files removal when running under "make -n";
447 ## - in case the test is a compiled program whose compilation fails,
448 ## we must ensure that any '.log' and '.trs' file referring to such
449 ## test are preserved, so that future "make recheck" invocations
450 ## will still try to re-compile and re-run it (automake bug#11791).
451 ## The tricky recursive make invocation below should cater to such
452 ## requirements.
453 $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
454 am__force_recheck=am--force-recheck \
455 TEST_LOGS="$$log_list"; \
456 ## Be sure to exit with the proper exit status (automake bug#9245). See
457 ## comments in the recipe of $(TEST_SUITE_LOG) above for more information.
458 exit $$?
459
460 AM_RECURSIVE_TARGETS += check recheck
461
462 .PHONY: recheck
463
464 else %?SERIAL_TESTS%
465
466 ## Obsolescent serial testsuite driver.
467
468 check-TESTS: $(TESTS)
469 @failed=0; all=0; xfail=0; xpass=0; skip=0; \
470 srcdir=$(srcdir); export srcdir; \
471 ## Make sure Solaris VPATH-expands all members of this list, even
472 ## the first and the last one; thus the spaces around $(TESTS)
473 list=' $(TESTS) '; \
474 $(am__tty_colors); \
475 if test -n "$$list"; then \
476 for tst in $$list; do \
477 if test -f ./$$tst; then dir=./; \
478 ## Note: Solaris 2.7 seems to expand TESTS using VPATH. That's
479 ## why we also try 'dir='.
480 elif test -f $$tst; then dir=; \
481 else dir="$(srcdir)/"; fi; \
482 if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
483 ## Success
484 all=`expr $$all + 1`; \
485 case " $(XFAIL_TESTS) " in \
486 *[\ \ ]$$tst[\ \ ]*) \
487 xpass=`expr $$xpass + 1`; \
488 failed=`expr $$failed + 1`; \
489 col=$$red; res=XPASS; \
490 ;; \
491 *) \
492 col=$$grn; res=PASS; \
493 ;; \
494 esac; \
495 elif test $$? -ne 77; then \
496 ## Failure
497 all=`expr $$all + 1`; \
498 case " $(XFAIL_TESTS) " in \
499 *[\ \ ]$$tst[\ \ ]*) \
500 xfail=`expr $$xfail + 1`; \
501 col=$$lgn; res=XFAIL; \
502 ;; \
503 *) \
504 failed=`expr $$failed + 1`; \
505 col=$$red; res=FAIL; \
506 ;; \
507 esac; \
508 else \
509 ## Skipped
510 skip=`expr $$skip + 1`; \
511 col=$$blu; res=SKIP; \
512 fi; \
513 echo "$${col}$$res$${std}: $$tst"; \
514 done; \
515 ## Prepare the banner
516 if test "$$all" -eq 1; then \
517 tests="test"; \
518 All=""; \
519 else \
520 tests="tests"; \
521 All="All "; \
522 fi; \
523 if test "$$failed" -eq 0; then \
524 if test "$$xfail" -eq 0; then \
525 banner="$$All$$all $$tests passed"; \
526 else \
527 if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
528 banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
529 fi; \
530 else \
531 if test "$$xpass" -eq 0; then \
532 banner="$$failed of $$all $$tests failed"; \
533 else \
534 if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
535 banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
536 fi; \
537 fi; \
538 ## DASHES should contain the largest line of the banner.
539 dashes="$$banner"; \
540 skipped=""; \
541 if test "$$skip" -ne 0; then \
542 if test "$$skip" -eq 1; then \
543 skipped="($$skip test was not run)"; \
544 else \
545 skipped="($$skip tests were not run)"; \
546 fi; \
547 test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
548 dashes="$$skipped"; \
549 fi; \
550 report=""; \
551 if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
552 report="Please report to $(PACKAGE_BUGREPORT)"; \
553 test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
554 dashes="$$report"; \
555 fi; \
556 dashes=`echo "$$dashes" | sed s/./=/g`; \
557 if test "$$failed" -eq 0; then \
558 col="$$grn"; \
559 else \
560 col="$$red"; \
561 fi; \
562 ## Multi line coloring is problematic with "less -R", so we really need
563 ## to color each line individually.
564 echo "$${col}$$dashes$${std}"; \
565 echo "$${col}$$banner$${std}"; \
566 test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
567 test -z "$$report" || echo "$${col}$$report$${std}"; \
568 echo "$${col}$$dashes$${std}"; \
569 test "$$failed" -eq 0; \
570 else :; fi
571
572 endif %?SERIAL_TESTS%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 2008-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 if %?FIRST%
17 ## When BSD make is run in parallel mode, it apparently strips any
18 ## leading directory component from the automatic variable '$*' (of
19 ## course, against what POSIX mandates). Try to detect and work
20 ## around this incompatibility.
21 am__set_b = \
22 case '$@' in \
23 */*) \
24 case '$*' in \
25 */*) b='$*';; \
26 *) b=`echo '$@' | sed 's/\.log$$//'`; \
27 esac;; \
28 *) \
29 b='$*';; \
30 esac
31 endif %?FIRST%
32
33 ## From a test file to a .log and .trs file.
34 ?GENERIC?%EXT%.log:
35 ?!GENERIC?%OBJ%: %SOURCE%
36 @p='%SOURCE%'; \
37 ## Another hack to support BSD make in parallel mode.
38 ?!GENERIC? b='%BASE%'; \
39 ?GENERIC? $(am__set_b); \
40 $(am__check_pre) %DRIVER% --test-name "$$f" \
41 --log-file $$b.log --trs-file $$b.trs \
42 $(am__common_driver_flags) %DRIVER_FLAGS% -- %COMPILE% \
43 "$$tst" $(AM_TESTS_FD_REDIRECT)
44
45 ## If no programs are built in this package, then this rule is removed
46 ## at automake time. Otherwise, %am__EXEEXT% expands to a configure time
47 ## conditional, true if $(EXEEXT) is nonempty, thus this rule does not
48 ## conflict with the previous one.
49 if %am__EXEEXT%
50 ?GENERIC?%EXT%$(EXEEXT).log:
51 @p='%SOURCE%'; \
52 ## Another hack to support BSD make in parallel mode.
53 ?!GENERIC? b='%BASE%'; \
54 ?GENERIC? $(am__set_b); \
55 $(am__check_pre) %DRIVER% --test-name "$$f" \
56 --log-file $$b.log --trs-file $$b.trs \
57 $(am__common_driver_flags) %DRIVER_FLAGS% -- %COMPILE% \
58 "$$tst" $(AM_TESTS_FD_REDIRECT)
59 endif %am__EXEEXT%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 .PHONY: distclean-hdr
17 distclean-am: distclean-hdr
18 distclean-hdr:
19 -rm -f %FILES%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 ## We must test each macro because it might be empty, and an empty "rm
17 ## -rf" command looks disturbing. Also, the Solaris 2.4 "rm" will
18 ## return an error if there are no arguments other than "-f".
19 mostlyclean-am: mostlyclean-generic
20 mostlyclean-generic:
21 %MOSTLYCLEAN_RMS%
22
23 clean-am: clean-generic mostlyclean-am
24 clean-generic:
25 %CLEAN_RMS%
26
27 distclean-am: distclean-generic clean-am
28 distclean-generic:
29 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
30 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
31 %DISTCLEAN_RMS%
32
33 ## Makefiles and their dependencies cannot be cleaned by
34 ## an -am dependency, because that would prevent other distclean
35 ## dependencies from calling make recursively. (The multilib
36 ## cleaning rules do this.)
37 ##
38 ## If you change distclean here, you probably also want to change
39 ## maintainer-clean below.
40 distclean:
41 -rm -f %MAKEFILE%
42
43 maintainer-clean-am: maintainer-clean-generic distclean-am
44 maintainer-clean-generic:
45 ## FIXME: shouldn't we really print these messages before running
46 ## the dependencies?
47 @echo "This command is intended for maintainers to use"
48 @echo "it deletes files that may require special tools to rebuild."
49 %MAINTAINER_CLEAN_RMS%
50
51 ## See comment for distclean.
52 maintainer-clean:
53 -rm -f %MAKEFILE%
54
55 .PHONY: clean mostlyclean distclean maintainer-clean \
56 clean-generic mostlyclean-generic distclean-generic maintainer-clean-generic
57
58 ?!SUBDIRS?clean: clean-am
59 ?!SUBDIRS?distclean: distclean-am
60 ?!SUBDIRS?mostlyclean: mostlyclean-am
61 ?!SUBDIRS?maintainer-clean: maintainer-clean-am
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 DEFAULT_INCLUDES = %DEFAULT_INCLUDES%
17
18 mostlyclean-am: mostlyclean-compile
19 mostlyclean-compile:
20 -rm -f *.$(OBJEXT)
21 ?MOSTLYRMS?%MOSTLYRMS%
22
23 distclean-am: distclean-compile
24 distclean-compile:
25 -rm -f *.tab.c
26 ?DISTRMS?%DISTRMS%
27
28 .PHONY: mostlyclean-compile distclean-compile
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 2001-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16
17 ## This dummy rule is called from subdirectories whenever one of the
18 ## top-level Makefile's dependencies must be updated. It does depend
19 ## on %MAKEFILE% for the benefit of non-GNU make implementations (GNU
20 ## make will always make sure %MAKEFILE% is updated before considering
21 ## the am--refresh target anyway).
22 if %?TOPDIR_P%
23 .PHONY: am--refresh
24 am--refresh: %MAKEFILE%
25 @:
26 endif %?TOPDIR_P%
27
28 ## --------------------- ##
29 ## Building Makefile.*. ##
30 ## --------------------- ##
31
32 ## This rule remakes the Makefile.in.
33 %MAKEFILE-IN%: %MAINTAINER-MODE% %MAKEFILE-AM% %MAKEFILE-IN-DEPS% $(am__configure_deps)
34 ## If configure.ac or one of configure's dependencies has changed, all
35 ## Makefile.in are to be updated; it is then more efficient to run
36 ## automake on all the Makefiles at once. It also allow Automake to be
37 ## run for newly added directories.
38 @for dep in $?; do \
39 case '$(am__configure_deps)' in \
40 *$$dep*) \
41 ?TOPDIR_P? echo ' cd $(srcdir) && $(AUTOMAKE) %AUTOMAKE-OPTIONS%'; \
42 ?TOPDIR_P? $(am__cd) $(srcdir) && $(AUTOMAKE) %AUTOMAKE-OPTIONS% \
43 ?TOPDIR_P? && exit 0; \
44 ?!TOPDIR_P? ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
45 ## If on the other hand, subdir/Makefile.in has been removed, then toplevel
46 ## am--refresh will not be aware of any need to run. We still invoke it
47 ## due to $? listing all prerequisites. Fix up for it by running the rebuild
48 ## rule for this file only, below.
49 ?!TOPDIR_P? && { if test -f $@; then exit 0; else break; fi; }; \
50 exit 1;; \
51 esac; \
52 done; \
53 ## Otherwise, rebuild only this file.
54 echo ' cd $(top_srcdir) && $(AUTOMAKE) %AUTOMAKE-OPTIONS% %MAKEFILE-AM-SOURCES%'; \
55 $(am__cd) $(top_srcdir) && \
56 $(AUTOMAKE) %AUTOMAKE-OPTIONS% %MAKEFILE-AM-SOURCES%
57
58 ## Ensure that GNU make doesn't remove Makefile if ./config.status (below)
59 ## is interrupted. Otherwise, the user would need to know to rerun
60 ## ./config.status to recreate the lost Makefile.
61 .PRECIOUS: %MAKEFILE%
62 ## This rule remakes the Makefile.
63 %MAKEFILE%: %MAKEFILE-DEPS% $(top_builddir)/config.status
64 ## If Makefile is to be updated because of config.status, then run
65 ## config.status without argument in order to (i) rerun all the
66 ## AC_CONFIG_COMMANDS including those that are not visible to
67 ## Automake, and (ii) to save time by running config.status all with
68 ## all the files, instead of once per file (iii) generate Makefiles
69 ## in newly added directories.
70 @case '$?' in \
71 ## Don't prefix $(top_builddir), because GNU make will strip it out
72 ## when it's '.'.
73 *config.status*) \
74 ?TOPDIR_P? echo ' $(SHELL) ./config.status'; \
75 ?TOPDIR_P? $(SHELL) ./config.status;; \
76 ?!TOPDIR_P? cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
77 *) \
78 ## FIXME: $(am__depfiles_maybe) lets us re-run the rule to create the
79 ## .P files. Ideally we wouldn't have to do this by hand.
80 echo ' cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe)'; \
81 cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe);; \
82 esac;
83
84 ## Avoid the "deleted header file" problem for the dependencies.
85 ## Add the trailing "$(am__empty)" to trick Automake into not spuriously
86 ## complaining about "duplicated targets" in case the %MAKEFILE-IN-DEPS%
87 ## list expands to a single target that is also declared in some
88 ## user-defined rule.
89 ?HAVE-MAKEFILE-IN-DEPS?%MAKEFILE-IN-DEPS% $(am__empty):
90
91 DIST_COMMON += %MAKEFILE-AM%
92
93
94 ## --------------------------- ##
95 ## config.status & configure. ##
96 ## --------------------------- ##
97
98 if %?TOPDIR_P%
99 ## Always require configure.ac and configure at top level, even if they
100 ## don't exist. This is especially important for configure, since it
101 ## won't be created until autoconf is run -- which might be after
102 ## automake is run.
103 DIST_COMMON += $(top_srcdir)/configure $(am__configure_deps)
104 endif %?TOPDIR_P%
105
106 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
107 ?TOPDIR_P? $(SHELL) ./config.status --recheck
108 ?!TOPDIR_P? cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
109
110 $(top_srcdir)/configure: %MAINTAINER-MODE% $(am__configure_deps)
111 ?TOPDIR_P? $(am__cd) $(srcdir) && $(AUTOCONF)
112 ?!TOPDIR_P? cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
113
114
115 ## ------------ ##
116 ## aclocal.m4. ##
117 ## ------------ ##
118
119 ## Whenever a configure dependency changes we need to rebuild
120 ## aclocal.m4 too. Changing configure.ac, or any file included by
121 ## aclocal.m4 might require adding more files to aclocal.m4. Hence
122 ## the $(am__configure_deps) dependency.
123 ## We still need $(ACLOCAL_AMFLAGS) for sake of backward-compatibility;
124 ## we should hopefully be able to get rid of it in a not-so-distant
125 ## future.
126 if %?REGEN-ACLOCAL-M4%
127 $(ACLOCAL_M4): %MAINTAINER-MODE% $(am__aclocal_m4_deps)
128 ?TOPDIR_P? $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
129 ?!TOPDIR_P? cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
130
131 ## Avoid the "deleted header file" problem for the dependencies.
132 $(am__aclocal_m4_deps):
133 endif %?REGEN-ACLOCAL-M4%
134
135
136 ## --------- ##
137 ## cleanup. ##
138 ## --------- ##
139
140 ## We special-case config.status here. If we do it as part of the
141 ## normal clean processing for this directory, then it might be
142 ## removed before some subdir is cleaned. However, that subdir's
143 ## Makefile depends on config.status.
144
145 if %?TOPDIR_P%
146 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
147 configure.lineno config.status.lineno
148 distclean:
149 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
150
151 ## Note: you might think we should remove Makefile.in, configure, or
152 ## aclocal.m4 here in a maintainer-clean rule. However, the GNU
153 ## Coding Standards explicitly prohibit this.
154
155 maintainer-clean:
156 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
157 ## autom4te.cache is created by Autoconf; the only valid target to
158 ## remove it is maintainer-clean, not distclean.
159 ## If you have an autom4te.cache that cause distcheck to fail, then
160 ## it is good news: you finally discovered that autoconf and/or
161 ## autoheader is needed to use your tarball, which is wrong.
162 -rm -rf $(top_srcdir)/autom4te.cache
163
164
165 endif %?TOPDIR_P%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 if %?INSTALL%
17 include inst-vars.am
18 endif %?INSTALL%
19
20 ## ------------ ##
21 ## Installing. ##
22 ## ------------ ##
23
24 if %?INSTALL%
25 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
26 ?EXEC?.PHONY install-exec-am: install-%DIR%%PRIMARY%
27 ?!EXEC?.PHONY install-data-am: install-%DIR%%PRIMARY%
28 install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
29 @$(NORMAL_INSTALL)
30 if %?BASE%
31 ## Funny invocation because Makefile variable can be empty, leading to
32 ## a syntax error in sh.
33 @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
34 if test -n "$$list"; then \
35 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
36 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
37 fi; \
38 for p in $$list; do \
39 ## A file can be in the source directory or the build directory.
40 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
41 ## If the _%PRIMARY% variable has an entry like foo/bar, install it as
42 ## $(destdir)/bar, not $(destdir)/foo/bar. The user can make a
43 ## new dir variable or use a nobase_ target for the latter case.
44 echo "$$d$$p"; \
45 done | $(am__base_list) | \
46 while read files; do \
47 echo " $(INSTALL_%ONE_PRIMARY%) $$files '$(DESTDIR)$(%NDIR%dir)'"; \
48 $(INSTALL_%ONE_PRIMARY%) $$files "$(DESTDIR)$(%NDIR%dir)" || exit $$?; \
49 done
50 else !%?BASE%
51 @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
52 if test -n "$$list"; then \
53 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
54 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
55 fi; \
56 $(am__nobase_list) | while read dir files; do \
57 xfiles=; for file in $$files; do \
58 if test -f "$$file"; then xfiles="$$xfiles $$file"; \
59 else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
60 test -z "$$xfiles" || { \
61 test "x$$dir" = x. || { \
62 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
63 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
64 echo " $(INSTALL_%ONE_PRIMARY%) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
65 $(INSTALL_%ONE_PRIMARY%) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \
66 done
67 endif !%?BASE%
68 endif %?INSTALL%
69
70
71 ## -------------- ##
72 ## Uninstalling. ##
73 ## -------------- ##
74
75 if %?INSTALL%
76 .PHONY uninstall-am: uninstall-%DIR%%PRIMARY%
77 uninstall-%DIR%%PRIMARY%:
78 @$(NORMAL_UNINSTALL)
79 @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
80 ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
81 ?!BASE? $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
82 dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
83 endif %?INSTALL%
84
85
86 ## ---------- ##
87 ## Cleaning. ##
88 ## ---------- ##
89
90 ## Nothing.
91
92
93 ## -------------- ##
94 ## Distributing. ##
95 ## -------------- ##
96
97 if %?DIST%
98 DIST_COMMON += %DISTVAR%
99 endif %?DIST%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 ## Name of tool to use. Default is the same as the package.
17 DEJATOOL = $(PACKAGE)
18
19 ## Default flags to pass to dejagnu. The user can override this.
20 RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
21
22 EXPECT = expect
23 RUNTEST = runtest
24
25
26 .PHONY: check-DEJAGNU
27 check-DEJAGNU: site.exp
28 ## Life is easiest with an absolute srcdir, so do that.
29 srcdir='$(srcdir)'; export srcdir; \
30 EXPECT=$(EXPECT); export EXPECT; \
31 ## If runtest can't be found, print a warning but don't die. It is
32 ## pointless to cause a failure if the tests cannot be run at all.
33 if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \
34 exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
35 if $(RUNTEST) $(AM_RUNTESTFLAGS) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
36 then :; else exit_status=1; fi; \
37 done; \
38 else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\
39 fi; \
40 exit $$exit_status
41
42
43 ## ------------------- ##
44 ## Building site.exp. ##
45 ## ------------------- ##
46
47 ## Note that in the rule we don't directly generate site.exp to avoid
48 ## the possibility of a corrupted site.exp if make is interrupted.
49 ## Jim Meyering has some useful text on this topic.
50 site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
51 @echo 'Making a new site.exp file ...'
52 @echo '## these variables are automatically generated by make ##' >site.tmp
53 @echo '# Do not edit here. If you wish to override these values' >>site.tmp
54 @echo '# edit the last section' >>site.tmp
55 @echo 'set srcdir "$(srcdir)"' >>site.tmp
56 @echo "set objdir `pwd`" >>site.tmp
57 ## Quote the *_alias variables because they might be empty.
58 ?BUILD? @echo 'set build_alias "$(build_alias)"' >>site.tmp
59 ?BUILD? @echo 'set build_triplet $(build_triplet)' >>site.tmp
60 ?HOST? @echo 'set host_alias "$(host_alias)"' >>site.tmp
61 ?HOST? @echo 'set host_triplet $(host_triplet)' >>site.tmp
62 ?TARGET? @echo 'set target_alias "$(target_alias)"' >>site.tmp
63 ?TARGET? @echo 'set target_triplet $(target_triplet)' >>site.tmp
64 ## Allow the package author to extend site.exp.
65 @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \
66 echo "## Begin content included from file $$f. Do not modify. ##" \
67 && cat `test -f "$$f" || echo '$(srcdir)/'`$$f \
68 && echo "## End content included from file $$f. ##" \
69 || exit 1; \
70 done >> site.tmp
71 @echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp
72 @if test -f site.exp; then \
73 sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \
74 fi
75 @-rm -f site.bak
76 @test ! -f site.exp || mv site.exp site.bak
77 @mv site.tmp site.exp
78
79 ## ---------- ##
80 ## Cleaning. ##
81 ## ---------- ##
82
83 .PHONY distclean-am: distclean-DEJAGNU
84
85 distclean-DEJAGNU:
86 ## Any other cleaning must be done by the user or by the test suite
87 ## itself. We can't predict what dejagnu or the test suite might
88 ## generate.
89 -rm -f site.exp site.bak
90 -l='$(DEJATOOL)'; for tool in $$l; do \
91 rm -f $$tool.sum $$tool.log; \
92 done
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 am__mv = mv -f
17
18 ## This Makefile depends on Depdirs' files, so we should never
19 ## erase them in -am or -recursive rules; that would prevent any other
20 ## rules from being recursive (for instance multilib clean rules are
21 ## recursive).
22 distclean:
23 -rm -rf %DEPDIRS%
24
25 maintainer-clean:
26 -rm -rf %DEPDIRS%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 ## This file is read several times:
17 ## - once per *extension* (not per language) for generic compilation rules
18 ## - once for each file which requires specific flags.
19
20 ## Note it is on purpose we wrote "if %AMDEP%", since:
21 ##
22 ## - if deps are turned off, %AMDEP% is mapped onto FALSE, and therefore
23 ## the "if FALSE" chunk is removed (automake-time conditionals).
24 ##
25 ## - if deps are on, %AMDEP% is mapped onto AMDEP, and therefore
26 ## the "if AMDEP" chunk is prefix with @AMDEP_TRUE@ just like for any
27 ## other configure-time conditional.
28 ##
29 ## We do likewise for %FASTDEP%; this expands to an ordinary configure-time
30 ## conditional. %FASTDEP% is used to speed up the common case of building
31 ## a package with gcc 3.x or later. In this case we can skip the use of
32 ## depcomp and easily inline the dependency tracking.
33
34 if %?NONLIBTOOL%
35 ?GENERIC?%EXT%.o:
36 ?!GENERIC?%OBJ%: %SOURCE%
37 if %FASTDEP%
38 ## In fast-dep mode, we can always use -o.
39 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
40 ?!GENERIC? %VERBOSE%%COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
41 ?!GENERIC? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
42 ?GENERIC??!SUBDIROBJ? %VERBOSE%%COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJ% %SOURCEFLAG%%SOURCE%
43 ?GENERIC??!SUBDIROBJ? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
44 ?GENERIC??SUBDIROBJ? %VERBOSE%depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
45 ?GENERIC??SUBDIROBJ? %COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJ% %SOURCEFLAG%%SOURCE% &&\
46 ?GENERIC??SUBDIROBJ? $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
47 else !%FASTDEP%
48 if %AMDEP%
49 %VERBOSE%source='%SOURCE%' object='%OBJ%' libtool=no @AMDEPBACKSLASH@
50 DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
51 endif %AMDEP%
52 if %?GENERIC%
53 ?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJ% %SOURCEFLAG%%SOURCE%
54 ?!-o? %VERBOSE-NODEP%%COMPILE% %-c% %SOURCEFLAG%%SOURCE%
55 else !%?GENERIC%
56 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
57 ?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
58 ?!-o? %VERBOSE-NODEP%%COMPILE% %-c% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
59 endif !%?GENERIC%
60 endif !%FASTDEP%
61
62 ?GENERIC?%EXT%.obj:
63 ?!GENERIC?%OBJOBJ%: %SOURCE%
64 if %FASTDEP%
65 ## In fast-dep mode, we can always use -o.
66 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
67 ?!GENERIC? %VERBOSE%%COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
68 ?!GENERIC? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
69 ?GENERIC??!SUBDIROBJ? %VERBOSE%%COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'`
70 ?GENERIC??!SUBDIROBJ? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
71 ?GENERIC??SUBDIROBJ? %VERBOSE%depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
72 ?GENERIC??SUBDIROBJ? %COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'` &&\
73 ?GENERIC??SUBDIROBJ? $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
74 else !%FASTDEP%
75 if %AMDEP%
76 %VERBOSE%source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@
77 DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
78 endif %AMDEP%
79 if %?GENERIC%
80 ?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'`
81 ?!-o? %VERBOSE-NODEP%%COMPILE% %-c% `$(CYGPATH_W) %SOURCEFLAG%'%SOURCE%'`
82 else !%?GENERIC%
83 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
84 ?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJOBJ% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
85 ?!-o? %VERBOSE-NODEP%%COMPILE% %-c% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
86 endif !%?GENERIC%
87 endif !%FASTDEP%
88 endif %?NONLIBTOOL%
89
90 if %?LIBTOOL%
91 ?GENERIC?%EXT%.lo:
92 ?!GENERIC?%LTOBJ%: %SOURCE%
93 if %FASTDEP%
94 ## In fast-dep mode, we can always use -o.
95 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
96 ?!GENERIC? %VERBOSE%%LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
97 ?!GENERIC? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
98 ?GENERIC??!SUBDIROBJ? %VERBOSE%%LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE%
99 ?GENERIC??!SUBDIROBJ? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
100 ?GENERIC??SUBDIROBJ? %VERBOSE%depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
101 ?GENERIC??SUBDIROBJ? %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE% &&\
102 ?GENERIC??SUBDIROBJ? $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
103 else !%FASTDEP%
104 if %AMDEP%
105 %VERBOSE%source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@
106 DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
107 endif %AMDEP%
108 ## We can always use '-o' with Libtool.
109 ?GENERIC? %VERBOSE-NODEP%%LTCOMPILE% %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE%
110 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
111 ?!GENERIC? %VERBOSE-NODEP%%LTCOMPILE% %-c% -o %LTOBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
112 endif !%FASTDEP%
113 endif %?LIBTOOL%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 2001-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 DIST_COMMON += $(am__DIST_COMMON)
17 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
18
19 if %?TOPDIR_P%
20 distdir = $(PACKAGE)-$(VERSION)
21 top_distdir = $(distdir)
22
23 am__remove_distdir = \
24 if test -d "$(distdir)"; then \
25 find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
26 && rm -rf "$(distdir)" \
27 ## On MSYS (1.0.17) it is not possible to remove a directory that is in
28 ## use; so, if the first rm fails, we sleep some seconds and retry, to
29 ## give pending processes some time to exit and "release" the directory
30 ## before we remove it. The value of "some seconds" is 5 for the moment,
31 ## which is mostly an arbitrary value, but seems high enough in practice.
32 ## See automake bug#10470.
33 || { sleep 5 && rm -rf "$(distdir)"; }; \
34 else :; fi
35 am__post_remove_distdir = $(am__remove_distdir)
36 endif %?TOPDIR_P%
37
38 if %?SUBDIRS%
39 ## computes a relative pathname RELDIR such that DIR1/RELDIR = DIR2.
40 ## Input:
41 ## - DIR1 relative pathname, relative to the current directory
42 ## - DIR2 relative pathname, relative to the current directory
43 ## Output:
44 ## - reldir relative pathname of DIR2, relative to DIR1
45 am__relativize = \
46 dir0=`pwd`; \
47 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
48 sed_rest='s,^[^/]*/*,,'; \
49 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
50 sed_butlast='s,/*[^/]*$$,,'; \
51 while test -n "$$dir1"; do \
52 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
53 if test "$$first" != "."; then \
54 if test "$$first" = ".."; then \
55 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
56 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
57 else \
58 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
59 if test "$$first2" = "$$first"; then \
60 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
61 else \
62 dir2="../$$dir2"; \
63 fi; \
64 dir0="$$dir0"/"$$first"; \
65 fi; \
66 fi; \
67 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
68 done; \
69 reldir="$$dir2"
70 endif %?SUBDIRS%
71
72 .PHONY: distdir
73 if %?SUBDIRS%
74 AM_RECURSIVE_TARGETS += distdir
75 endif %?SUBDIRS%
76
77 distdir: $(DISTFILES)
78 ##
79 ## For Gnits users, this is pretty handy. Look at 15 lines
80 ## in case some explanatory text is desirable.
81 ##
82 if %?TOPDIR_P%
83 if %?CK-NEWS%
84 @case `sed 15q $(srcdir)/NEWS` in \
85 *"$(VERSION)"*) : ;; \
86 *) \
87 echo "NEWS not updated; not releasing" 1>&2; \
88 exit 1;; \
89 esac
90 endif %?CK-NEWS%
91 endif %?TOPDIR_P%
92 ##
93 ## Only for the top dir.
94 ##
95 if %?TOPDIR_P%
96 $(am__remove_distdir)
97 test -d "$(distdir)" || mkdir "$(distdir)"
98 endif %?TOPDIR_P%
99 ##
100 ##
101 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
102 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
103 ##
104 ## Yet another hack to support SUN make.
105 ##
106 ## Let's assume 'foo' appears in DISTFILES and is not a built file.
107 ## When building with VPATH=$(srcdir), SUN make and OSF1/Tru64 will
108 ## rewrite 'foo' as '$(srcdir)/foo'. An attempt to install the file
109 ## with
110 ## cp $file $(distdir)/$file
111 ## will thus install $(srcdir)/foo as $(distdir)/$(srcdir)/foo
112 ## instead of $(distdir)/foo.
113 ##
114 ## So let's strip this leading $(srcdir)/ when it exists. (As far we
115 ## know, only SUN make and OSF1/Tru64 make add it.) Searching whether
116 ## the file is to be found in the source or build directory will be
117 ## done later.
118 ##
119 ## In case we are _not_ using SUN or OSF1/Tru64 make, how can we be sure
120 ## we are not stripping a legitimate filename that starts with the
121 ## same pattern as $(srcdir)?
122 ## Well, it can't happen without the Makefile author distributing
123 ## something out of the distribution (which is bad). As an example,
124 ## consider "EXTRA_DIST = ../bar". This is an issue if $srcdir is
125 ## '..', however getting this value for srcdir is impossible:
126 ## "EXTRA_DIST = ../bar" implies we are in a subdirectory (so '../bar'
127 ## is within the package), hence '$srcdir' is something like
128 ## '../../subdir'.
129 ##
130 ## There is more to say about files which are above the current directory,
131 ## like '../bar' in the previous example. The OSF1/Tru64 make
132 ## implementation can simplify filenames resulting from a VPATH lookup.
133 ## For instance if "VPATH = ../../subdir" and '../bar' is found in that
134 ## VPATH directory, then occurrences of '../bar' will be replaced by
135 ## '../../bar' (instead of '../../subdir/../bar'). This obviously defeats
136 ## any attempt to strip a leading $srcdir. Presently we have no workaround
137 ## for this. We avoid this issue by writing "EXTRA_DIST = $(srcdir)/../bar"
138 ## instead of "EXTRA_DIST = ../bar". This prefixing is needed only for files
139 ## above the current directory. Fortunately, apart from auxdir files which
140 ## can be located in .. or ../.., this situation hardly occurs in practice.
141 ##
142 ## Also rewrite $(top_srcdir) (which sometimes appears in DISTFILES, and can
143 ## be absolute) by $(top_builddir) (which is always relative). $(srcdir) will
144 ## be prepended later.
145 list='$(DISTFILES)'; \
146 dist_files=`for file in $$list; do echo $$file; done | \
147 sed -e "s|^$$srcdirstrip/||;t" \
148 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
149 ## (The second 't' command clears the flag for the next round.)
150 ##
151 ## Make the subdirectories for the files.
152 ##
153 case $$dist_files in \
154 */*) $(MKDIR_P) `echo "$$dist_files" | \
155 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
156 sort -u` ;; \
157 esac; \
158 ##
159 ##
160 for file in $$dist_files; do \
161 ##
162 ## Always look for the file in the build directory first. That way
163 ## for something like yacc output we will correctly pick up the latest
164 ## version. Also check for directories in the build directory first,
165 ## so one can ship generated directories.
166 ##
167 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
168 ##
169 ## Use cp, not ln. There are situations in which "ln" can fail. For
170 ## instance a file to distribute could actually be a cross-filesystem
171 ## symlink -- this can easily happen if "gettextize" was run on the
172 ## distribution.
173 ##
174 if test -d $$d/$$file; then \
175 ## Don't mention $$file in the destination argument, since this fails if
176 ## the destination directory already exists. Also, use '-R' and not '-r'.
177 ## '-r' is almost always incorrect.
178 ##
179 ## If a directory exists both in '.' and $(srcdir), then we copy the
180 ## files from $(srcdir) first and then install those from '.'. This
181 ## can help people who distribute directories made of source files
182 ## *and* generated files. It is also important when the directory
183 ## exists only in $(srcdir), because some vendor Make (such as Tru64)
184 ## will magically create an empty directory in '.'.
185 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
186 ## If the destination directory already exists, it may contain read-only
187 ## files, e.g., during "make distcheck".
188 if test -d "$(distdir)/$$file"; then \
189 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
190 fi; \
191 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
192 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
193 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
194 fi; \
195 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
196 else \
197 ## Test for file existence because sometimes a file gets included in
198 ## DISTFILES twice. For example this happens when a single source
199 ## file is used in building more than one program.
200 ## See also test 'dist-repeated.sh'.
201 test -f "$(distdir)/$$file" \
202 || cp -p $$d/$$file "$(distdir)/$$file" \
203 || exit 1; \
204 fi; \
205 done
206 ##
207 ## Test for directory existence here because previous automake
208 ## invocation might have created some directories. Note that we
209 ## explicitly set distdir for the subdir make; that lets us mix-n-match
210 ## many automake-using packages into one large package, and have "dist"
211 ## at the top level do the right thing. If we're in the topmost
212 ## directory, then we use 'distdir' instead of 'top_distdir'; this lets
213 ## us work correctly with an enclosing package.
214 if %?SUBDIRS%
215 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
216 if test "$$subdir" = .; then :; else \
217 $(am__make_dryrun) \
218 || test -d "$(distdir)/$$subdir" \
219 || $(MKDIR_P) "$(distdir)/$$subdir" \
220 || exit 1; \
221 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
222 $(am__relativize); \
223 new_distdir=$$reldir; \
224 dir1=$$subdir; dir2="$(top_distdir)"; \
225 $(am__relativize); \
226 new_top_distdir=$$reldir; \
227 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
228 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
229 ($(am__cd) $$subdir && \
230 $(MAKE) $(AM_MAKEFLAGS) \
231 top_distdir="$$new_top_distdir" \
232 distdir="$$new_distdir" \
233 ## Disable am__remove_distdir so that sub-packages do not clear a
234 ## directory we have already cleared and might even have populated
235 ## (e.g. shared AUX dir in the sub-package).
236 am__remove_distdir=: \
237 ## Disable filename length check:
238 am__skip_length_check=: \
239 ## No need to fix modes more than once:
240 am__skip_mode_fix=: \
241 distdir) \
242 || exit 1; \
243 fi; \
244 done
245 endif %?SUBDIRS%
246 ##
247 ## We might have to perform some last second updates, such as updating
248 ## info files.
249 ## We must explicitly set distdir and top_distdir for these sub-makes.
250 ##
251 if %?DIST-TARGETS%
252 $(MAKE) $(AM_MAKEFLAGS) \
253 top_distdir="$(top_distdir)" distdir="$(distdir)" \
254 %DIST-TARGETS%
255 endif %?DIST-TARGETS%
256 ##
257 ## This complex find command will try to avoid changing the modes of
258 ## links into the source tree, in case they're hard-linked.
259 ##
260 ## Ignore return result from chmod, because it might give an error
261 ## if we chmod a symlink.
262 ##
263 ## Another nastiness: if the file is unreadable by us, we make it
264 ## readable regardless of the number of links to it. This only
265 ## happens in perverse cases.
266 ##
267 ## We use $(install_sh) because that is a known-portable way to modify
268 ## the file in place in the source tree.
269 ##
270 ## If we are being invoked recursively, then there is no need to walk
271 ## the whole subtree again. This is a complexity reduction for a deep
272 ## hierarchy of subpackages.
273 ##
274 if %?TOPDIR_P%
275 -test -n "$(am__skip_mode_fix)" \
276 || find "$(distdir)" -type d ! -perm -755 \
277 -exec chmod u+rwx,go+rx {} \; -o \
278 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
279 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
280 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
281 || chmod -R a+r "$(distdir)"
282 if %?FILENAME_FILTER%
283 @if test -z "$(am__skip_length_check)" && find "$(distdir)" -type f -print | \
284 grep '^%FILENAME_FILTER%' 1>&2; then \
285 echo 'error: the above filenames are too long' 1>&2; \
286 exit 1; \
287 else :; fi
288 endif %?FILENAME_FILTER%
289 endif %?TOPDIR_P%
290
291
292
293 ## --------------------------------------- ##
294 ## Building various distribution flavors. ##
295 ## --------------------------------------- ##
296
297 ## Note that we don't use GNU tar's '-z' option. One reason (but not
298 ## the only reason) is that some versions of tar (e.g., OSF1)
299 ## interpret '-z' differently.
300 ##
301 ## The -o option of GNU tar used to exclude empty directories. This
302 ## behavior was fixed in tar 1.12 (released on 1997-04-25). But older
303 ## versions of tar are still used (for instance NetBSD 1.6.1 ships
304 ## with tar 1.11.2). We do not do anything specific w.r.t. this
305 ## incompatibility since packages where empty directories need to be
306 ## present in the archive are really unusual.
307 ##
308 ## We order DIST_TARGETS by expected duration of the compressors,
309 ## slowest first, for better parallelism in "make dist". Do not
310 ## reorder DIST_ARCHIVES, users may expect gzip to be first.
311
312 if %?TOPDIR_P%
313
314 ?GZIP?DIST_ARCHIVES += $(distdir).tar.gz
315 GZIP_ENV = --best
316 .PHONY: dist-gzip
317 dist-gzip: distdir
318 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
319 $(am__post_remove_distdir)
320
321 ?BZIP2?DIST_ARCHIVES += $(distdir).tar.bz2
322 .PHONY: dist-bzip2
323 dist-bzip2: distdir
324 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
325 $(am__post_remove_distdir)
326
327 ?LZIP?DIST_ARCHIVES += $(distdir).tar.lz
328 .PHONY: dist-lzip
329 dist-lzip: distdir
330 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
331 $(am__post_remove_distdir)
332
333 ?XZ?DIST_ARCHIVES += $(distdir).tar.xz
334 .PHONY: dist-xz
335 dist-xz: distdir
336 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
337 $(am__post_remove_distdir)
338
339 ?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
340 .PHONY: dist-tarZ
341 dist-tarZ: distdir
342 @echo WARNING: "Support for distribution archives compressed with" \
343 "legacy program 'compress' is deprecated." >&2
344 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
345 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
346 $(am__post_remove_distdir)
347
348 ?SHAR?DIST_ARCHIVES += $(distdir).shar.gz
349 .PHONY: dist-shar
350 dist-shar: distdir
351 @echo WARNING: "Support for shar distribution archives is" \
352 "deprecated." >&2
353 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
354 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
355 $(am__post_remove_distdir)
356
357 ?ZIP?DIST_ARCHIVES += $(distdir).zip
358 .PHONY: dist-zip
359 dist-zip: distdir
360 -rm -f $(distdir).zip
361 zip -rq $(distdir).zip $(distdir)
362 $(am__post_remove_distdir)
363
364 ?LZIP?DIST_TARGETS += dist-lzip
365 ?XZ?DIST_TARGETS += dist-xz
366 ?SHAR?DIST_TARGETS += dist-shar
367 ?BZIP2?DIST_TARGETS += dist-bzip2
368 ?GZIP?DIST_TARGETS += dist-gzip
369 ?ZIP?DIST_TARGETS += dist-zip
370 ?COMPRESS?DIST_TARGETS += dist-tarZ
371
372 endif %?TOPDIR_P%
373
374
375
376 ## ------------------------------------------------- ##
377 ## Building all the requested distribution flavors. ##
378 ## ------------------------------------------------- ##
379
380 ## Currently we cannot use if/endif inside a rule. The file_contents
381 ## parser needs work.
382
383 if %?TOPDIR_P%
384
385 .PHONY: dist dist-all
386 if %?SUBDIRS%
387 AM_RECURSIVE_TARGETS += dist dist-all
388 endif %?SUBDIRS%
389
390 dist dist-all:
391 $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
392 $(am__post_remove_distdir)
393
394 endif %?TOPDIR_P%
395
396
397 ## ------------------------- ##
398 ## Checking a distribution. ##
399 ## ------------------------- ##
400
401
402 if %?TOPDIR_P%
403 if %?SUBDIRS%
404 AM_RECURSIVE_TARGETS += distcheck
405 endif %?SUBDIRS%
406
407 # This target untars the dist file and tries a VPATH configuration. Then
408 # it guarantees that the distribution is self-contained by making another
409 # tarfile.
410 .PHONY: distcheck
411 distcheck: dist
412 case '$(DIST_ARCHIVES)' in \
413 *.tar.gz*) \
414 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
415 *.tar.bz2*) \
416 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
417 *.tar.lz*) \
418 lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
419 *.tar.xz*) \
420 xz -dc $(distdir).tar.xz | $(am__untar) ;;\
421 *.tar.Z*) \
422 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
423 *.shar.gz*) \
424 GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
425 *.zip*) \
426 unzip $(distdir).zip ;;\
427 esac
428 ## Make the new source tree read-only. Distributions ought to work in
429 ## this case. However, make the top-level directory writable so we
430 ## can make our new subdirs.
431 chmod -R a-w $(distdir)
432 chmod u+w $(distdir)
433 mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
434 ## Undo the write access.
435 chmod a-w $(distdir)
436 ## With GNU make, the following command will be executed even with "make -n",
437 ## due to the presence of '$(MAKE)'. That is normally all well (and '$(MAKE)'
438 ## is necessary for things like parallel distcheck), but here we don't want
439 ## execution. To avoid MAKEFLAGS parsing hassles, use a witness file that a
440 ## non-'-n' run would have just created.
441 test -d $(distdir)/_build || exit 0; \
442 ## Compute the absolute path of '_inst'. Strip any leading DOS drive
443 ## to allow DESTDIR installations. Otherwise "$(DESTDIR)$(prefix)" would
444 ## expand to "c:/temp/am-dc-5668/c:/src/package/package-1.0/_inst".
445 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
446 ## We will attempt a DESTDIR install in $dc_destdir. We don't
447 ## create this directory under $dc_install_base, because it would
448 ## create very long directory names.
449 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
450 ?DISTCHECK-HOOK? && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
451 ## Parallel BSD make may not start a new shell for each command in a recipe,
452 ## so be sure to 'cd' back to the original directory after this.
453 && am__cwd=`pwd` \
454 ## If we merely used '$(distdir)/_build' here, "make distcheck" could
455 ## sometimes fail to detect missing files in the distribution tarball,
456 ## especially in those cases where both the generated files and their
457 ## dependencies are explicitly in $(srcdir). See automake bug#18286.
458 && $(am__cd) $(distdir)/_build/sub \
459 && ../../configure \
460 ?GETTEXT? --with-included-gettext \
461 ## Additional flags for configure.
462 $(AM_DISTCHECK_CONFIGURE_FLAGS) \
463 $(DISTCHECK_CONFIGURE_FLAGS) \
464 ## At the moment, the code doesn't actually support changes in these --srcdir
465 ## and --prefix values, so don't allow them to be overridden by the user or
466 ## the developer. That used to be allowed, and caused issues in practice
467 ## (in corner-case usages); see automake bug#14991.
468 --srcdir=../.. --prefix="$$dc_install_base" \
469 && $(MAKE) $(AM_MAKEFLAGS) \
470 && $(MAKE) $(AM_MAKEFLAGS) dvi \
471 && $(MAKE) $(AM_MAKEFLAGS) check \
472 && $(MAKE) $(AM_MAKEFLAGS) install \
473 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
474 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
475 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
476 distuninstallcheck \
477 ## Make sure the package has proper DESTDIR support (we could not test this
478 ## in the previous install/installcheck/uninstall test, because it's reasonable
479 ## for installcheck to fail in a DESTDIR install).
480 ## We make the '$dc_install_base' read-only because this is where files
481 ## with missing DESTDIR support are likely to be installed.
482 && chmod -R a-w "$$dc_install_base" \
483 ## The logic here is quite convoluted because we must clean $dc_destdir
484 ## whatever happens (it won't be erased by the next run of distcheck like
485 ## $(distdir) is).
486 && ({ \
487 ## Build the directory, so we can cd into it even if "make install"
488 ## didn't create it. Use mkdir, not $(MKDIR_P) because we want to
489 ## fail if the directory already exists (PR/413).
490 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
491 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
492 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
493 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
494 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
495 } || { rm -rf "$$dc_destdir"; exit 1; }) \
496 && rm -rf "$$dc_destdir" \
497 && $(MAKE) $(AM_MAKEFLAGS) dist \
498 ## Make sure to remove the dists we created in the test build directory.
499 && rm -rf $(DIST_ARCHIVES) \
500 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
501 ## Cater to parallel BSD make (see above).
502 && cd "$$am__cwd" \
503 || exit 1
504 $(am__post_remove_distdir)
505 @(echo "$(distdir) archives ready for distribution: "; \
506 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
507 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
508
509 ## Define distuninstallcheck_listfiles and distuninstallcheck separately
510 ## from distcheck, so that they can be overridden by the user.
511 .PHONY: distuninstallcheck
512 distuninstallcheck_listfiles = find . -type f -print
513 ## The 'dir' file (created by install-info) might still exist after
514 ## uninstall, so we must be prepared to account for it. The following
515 ## check is not 100% strict, but is definitely good enough, and even
516 ## accounts for overridden $(infodir).
517 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
518 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
519 distuninstallcheck:
520 @test -n '$(distuninstallcheck_dir)' || { \
521 echo 'ERROR: trying to run $@ with an empty' \
522 '$$(distuninstallcheck_dir)' >&2; \
523 exit 1; \
524 }; \
525 $(am__cd) '$(distuninstallcheck_dir)' || { \
526 echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
527 exit 1; \
528 }; \
529 test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
530 || { echo "ERROR: files left after uninstall:" ; \
531 if test -n "$(DESTDIR)"; then \
532 echo " (check DESTDIR support)"; \
533 fi ; \
534 $(distuninstallcheck_listfiles) ; \
535 exit 1; } >&2
536
537 ## Define distcleancheck_listfiles and distcleancheck separately
538 ## from distcheck, so that they can be overridden by the user.
539 .PHONY: distcleancheck
540 distcleancheck_listfiles = find . -type f -print
541 distcleancheck: distclean
542 @if test '$(srcdir)' = . ; then \
543 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
544 exit 1 ; \
545 fi
546 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
547 || { echo "ERROR: files left in build directory after distclean:" ; \
548 $(distcleancheck_listfiles) ; \
549 exit 1; } >&2
550 endif %?TOPDIR_P%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 # Tell versions [3.59,3.63) of GNU make to not export all variables.
17 # Otherwise a system limit (for SysV at least) may be exceeded.
18 .NOEXPORT:
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 VPATH = @srcdir@
17
18 @SET_MAKE@
19
20 ## We used to define this. However, we don't because vendor makes
21 ## (e.g., Solaris, Irix) won't correctly propagate variables that are
22 ## defined in Makefile. This particular variable can't be correctly
23 ## defined by configure (at least, not the current configure), so we
24 ## simply avoid defining it to allow the user to use this feature with
25 ## a vendor make.
26 ## DESTDIR =
27
28 ## Shell code that determines whether we are running under GNU make.
29 ##
30 ## Why the this needs to be so convoluted?
31 ##
32 ## (1) We can't unconditionally use make functions or special variables
33 ## starting with a dot, as those cause non-GNU implmentations to
34 ## crash hard.
35 ##
36 ## (2) We can't use $(MAKE_VERSION) here, as it is also defined in some
37 ## non-GNU make implementations (e.g., FreeBSD make). But at least
38 ## BSD make does *not* define the $(CURDIR) variable -- it uses
39 ## $(.CURDIR) instead.
40 ##
41 ## (3) We can't use $(MAKEFILE_LIST) here, as in some situations it
42 ## might cause the shell to die with "Arg list too long" (see
43 ## automake bug#18744).
44 ##
45 ## (4) We can't use $(MAKE_HOST) unconditionally, as it is only
46 ## defined in GNU make 4.0 or later.
47 ##
48 am__is_gnu_make = { \
49 if test -z '$(MAKELEVEL)'; then \
50 false; \
51 elif test -n '$(MAKE_HOST)'; then \
52 true; \
53 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
54 true; \
55 else \
56 false; \
57 fi; \
58 }
59
60 ## Shell code that determines whether the current make instance is
61 ## running with a given one-letter option (e.g., -k, -n) that takes
62 ## no argument.
63 am__make_running_with_option = \
64 case $${target_option-} in \
65 ?) ;; \
66 *) echo "am__make_running_with_option: internal error: invalid" \
67 "target option '$${target_option-}' specified" >&2; \
68 exit 1;; \
69 esac; \
70 has_opt=no; \
71 sane_makeflags=$$MAKEFLAGS; \
72 if $(am__is_gnu_make); then \
73 ## The format of $(MAKEFLAGS) is quite tricky with GNU make; the
74 ## variable $(MFLAGS) behaves much better in that regard. So use it.
75 sane_makeflags=$$MFLAGS; \
76 else \
77 ## Non-GNU make: we must rely on $(MAKEFLAGS). This is tricker and more
78 ## brittle, but is the best we can do.
79 case $$MAKEFLAGS in \
80 ## If we run "make TESTS='snooze nap'", FreeBSD make will export MAKEFLAGS
81 ## to " TESTS=foo\ nap", so that the simpler loop below (on word-split
82 ## $$MAKEFLAGS) would see a "make flag" equal to "nap", and would wrongly
83 ## misinterpret that as and indication that make is running in dry mode.
84 ## This has already happened in practice. So we need this hack.
85 *\\[\ \ ]*) \
86 ## Extra indirection with ${bs} required by FreeBSD 8.x make.
87 ## Not sure why (so sorry for the cargo-cult programming here).
88 bs=\\; \
89 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
90 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
91 esac; \
92 fi; \
93 skip_next=no; \
94 strip_trailopt () \
95 { \
96 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
97 }; \
98 for flg in $$sane_makeflags; do \
99 test $$skip_next = yes && { skip_next=no; continue; }; \
100 case $$flg in \
101 *=*|--*) continue;; \
102 ##
103 ## GNU make 4.0 has changed the format of $MFLAGS, and removed the space
104 ## between an option and its argument (e.g., from "-I dir" to "-Idir").
105 ## So we need to handle both formats, at least for options valid in GNU
106 ## make. OTOH, BSD make formats $(MAKEFLAGS) by separating all options,
107 ## and separating any option from its argument, so things are easier
108 ## there.
109 ##
110 ## For GNU make and BSD make.
111 -*I) strip_trailopt 'I'; skip_next=yes;; \
112 -*I?*) strip_trailopt 'I';; \
113 ## For GNU make >= 4.0.
114 -*O) strip_trailopt 'O'; skip_next=yes;; \
115 -*O?*) strip_trailopt 'O';; \
116 ## For GNU make (possibly overkill, this one).
117 -*l) strip_trailopt 'l'; skip_next=yes;; \
118 -*l?*) strip_trailopt 'l';; \
119 ## For BSD make.
120 -[dEDm]) skip_next=yes;; \
121 ## For NetBSD make.
122 -[JT]) skip_next=yes;; \
123 esac; \
124 case $$flg in \
125 *$$target_option*) has_opt=yes; break;; \
126 esac; \
127 done; \
128 test $$has_opt = yes
129
130 ## Shell code that determines whether make is running in "dry mode"
131 ## ("make -n") or not. Useful in rules that invoke make recursively,
132 ## and are thus executed also with "make -n" -- either because they
133 ## are declared as dependencies to '.MAKE' (NetBSD make), or because
134 ## their recipes contain the "$(MAKE)" string (GNU and Solaris make).
135 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
136
137 ## Shell code that determines whether make is running in "keep-going mode"
138 ## ("make -k") or not. Useful in rules that must recursively descend into
139 ## subdirectories, and decide whether to stop at the first error or not.
140 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
141
142 ## Some derived variables that have been found to be useful.
143 pkgdatadir = $(datadir)/@PACKAGE@
144 pkgincludedir = $(includedir)/@PACKAGE@
145 pkglibdir = $(libdir)/@PACKAGE@
146 pkglibexecdir = $(libexecdir)/@PACKAGE@
147
148 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
149 install_sh_DATA = $(install_sh) -c -m 644
150 install_sh_PROGRAM = $(install_sh) -c
151 install_sh_SCRIPT = $(install_sh) -c
152 INSTALL_HEADER = $(INSTALL_DATA)
153 transform = $(program_transform_name)
154
155 ## These are defined because otherwise make on NetBSD V1.1 will print
156 ## (eg): $(NORMAL_INSTALL) expands to empty string.
157 NORMAL_INSTALL = :
158 PRE_INSTALL = :
159 POST_INSTALL = :
160 NORMAL_UNINSTALL = :
161 PRE_UNINSTALL = :
162 POST_UNINSTALL = :
163
164 ## dejagnu.am uses these variables. Some users might rely on them too.
165 ?BUILD?build_triplet = @build@
166 ?HOST?host_triplet = @host@
167 ?TARGET?target_triplet = @target@
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16
17 ## Exactly the same as data.am.
18 include data.am
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 2004-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 if %?FIRST%
17
18 ## These variables help stripping any $(VPATH) that some
19 ## Make implementations prepend before VPATH-found files.
20 ## The issue is discussed at length in distdir.am.
21 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
22 am__vpath_adj = case $$p in \
23 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
24 *) f=$$p;; \
25 esac;
26 ## Strip all directories.
27 am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
28 ## Number of files to install concurrently.
29 am__install_max = 40
30 ## Take a $list of nobase files, strip $(srcdir) from them.
31 ## Split apart in setup variable and an action that can be used
32 ## in backticks or in a pipe.
33 am__nobase_strip_setup = \
34 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
35 am__nobase_strip = \
36 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
37 ## Take a $list of nobase files, collect them, indexed by their
38 ## srcdir-stripped dirnames. For up to am__install_max files, output
39 ## a line containing the dirname and the files, space-separated.
40 ## The arbitrary limit helps avoid the quadratic scaling exhibited by
41 ## string concatenation in most shells, and should avoid line length
42 ## limitations, while still offering only negligible performance impact
43 ## through spawning more install commands than absolutely needed.
44 am__nobase_list = $(am__nobase_strip_setup); \
45 for p in $$list; do echo "$$p $$p"; done | \
46 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
47 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
48 if (++n[$$2] == $(am__install_max)) \
49 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
50 END { for (dir in files) print dir, files[dir] }'
51 ## Collect up to 40 files per line from stdin.
52 am__base_list = \
53 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
54 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
55
56 ## A shell code fragment to uninstall files from a given directory.
57 ## It expects the $dir and $files shell variables to be defined respectively
58 ## to the directory where the files to be removed are, and to the list of
59 ## such files.
60 am__uninstall_files_from_dir = { \
61 ## Some rm implementations complain if 'rm -f' is used without arguments.
62 test -z "$$files" \
63 ## At least Solaris /bin/sh still lacks 'test -e', so we use the multiple
64 ## tests below instead. We expect $dir to be either non-existent or a
65 ## directory, so the failure we'll experience if it is a regular file
66 ## is indeed desired and welcome (better to fail loudly thasn silently).
67 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
68 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
69 $(am__cd) "$$dir" && rm -f $$files; }; \
70 }
71
72 endif %?FIRST%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 2001-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 ## ----------------------------------------- ##
17 ## installdirs -- Creating the installdirs. ##
18 ## ----------------------------------------- ##
19
20 ## The reason we loop over %am__installdirs% (instead of simply running
21 ## $(MKDIR_P) %am__installdirs%) is that directories variable such as
22 ## "$(DESTDIR)$(mydir)" can potentially expand to "" if $(mydir) is
23 ## conditionally defined. BTW, those directories are quoted in order
24 ## to support installation paths with spaces.
25
26 if %?SUBDIRS%
27 .PHONY: installdirs installdirs-am
28 RECURSIVE_TARGETS += installdirs-recursive
29 installdirs: installdirs-recursive
30 installdirs-am:%installdirs-local%
31 ?am__installdirs? for dir in %am__installdirs%; do \
32 ?am__installdirs? test -z "$$dir" || $(MKDIR_P) "$$dir"; \
33 ?am__installdirs? done
34 else !%?SUBDIRS%
35 .PHONY: installdirs
36 installdirs:%installdirs-local%
37 ?am__installdirs? for dir in %am__installdirs%; do \
38 ?am__installdirs? test -z "$$dir" || $(MKDIR_P) "$$dir"; \
39 ?am__installdirs? done
40 endif !%?SUBDIRS%
41
42
43 ## ----------------- ##
44 ## Install targets. ##
45 ## ----------------- ##
46
47 .PHONY: install install-exec install-data uninstall
48 .PHONY: install-exec-am install-data-am uninstall-am
49
50 if %?SUBDIRS%
51 RECURSIVE_TARGETS += install-data-recursive install-exec-recursive \
52 install-recursive uninstall-recursive
53 install:%maybe_BUILT_SOURCES% install-recursive
54 install-exec: install-exec-recursive
55 install-data: install-data-recursive
56 uninstall: uninstall-recursive
57 else !%?SUBDIRS%
58 install:%maybe_BUILT_SOURCES% install-am
59 install-exec: install-exec-am
60 install-data: install-data-am
61 uninstall: uninstall-am
62 endif !%?SUBDIRS%
63
64 if %?maybe_BUILT_SOURCES%
65 .MAKE: install
66 endif %?maybe_BUILT_SOURCES%
67
68 .MAKE .PHONY: install-am
69 install-am: all-am
70 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
71
72
73 .PHONY: installcheck
74 ?SUBDIRS?installcheck: installcheck-recursive
75 ?!SUBDIRS?installcheck: installcheck-am
76 ?!SUBDIRS?.PHONY: installcheck-am
77 ?!SUBDIRS?installcheck-am:
78
79 ## If you ever modify this, keep in mind that INSTALL_PROGRAM is used
80 ## in subdirectories, so never set it to a value relative to the top
81 ## directory.
82 .MAKE .PHONY: install-strip
83 install-strip:
84 ## Beware that there are two variables used to install programs:
85 ## INSTALL_PROGRAM is used for ordinary *_PROGRAMS
86 ## install_sh_PROGRAM is used for nobase_*_PROGRAMS (because install-sh
87 ## creates directories)
88 ## It's OK to override both with INSTALL_STRIP_PROGRAM, because
89 ## INSTALL_STRIP_PROGRAM uses install-sh (see m4/strip.m4 for a rationale).
90 ##
91 ## Use double quotes for the *_PROGRAM settings because we might need to
92 ## interpolate some backquotes at runtime.
93 ##
94 ## The case for empty $(STRIP) is separate so that it is quoted correctly for
95 ## multiple words, but does not expand to an empty words if STRIP is empty.
96 if test -z '$(STRIP)'; then \
97 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
98 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
99 install; \
100 else \
101 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
102 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
103 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
104 fi
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1998-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16
17 ## ---------- ##
18 ## Building. ##
19 ## ---------- ##
20
21 if %?FIRST%
22 JAVAC = javac
23 CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT)$${CLASSPATH:+":$$CLASSPATH"}
24 JAVAROOT = $(top_builddir)
25 endif %?FIRST%
26
27 class%NDIR%.stamp: $(am__java_sources)
28 @list1='$?'; list2=; if test -n "$$list1"; then \
29 for p in $$list1; do \
30 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
31 list2="$$list2 $$d$$p"; \
32 done; \
33 echo '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) '"$$list2"; \
34 $(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) $$list2; \
35 else :; fi
36 echo timestamp > $@
37
38
39 ## ------------ ##
40 ## Installing. ##
41 ## ------------ ##
42
43 if %?INSTALL%
44 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
45 ?EXEC?.PHONY install-exec-am: install-%DIR%JAVA
46 ?!EXEC?.PHONY install-data-am: install-%DIR%JAVA
47 install-%DIR%JAVA: class%NDIR%.stamp
48 @$(NORMAL_INSTALL)
49 ## A single .java file can be compiled into multiple .class files. So
50 ## we just install all the .class files that got built into this
51 ## directory. This is not optimal, but will have to do for now.
52 @test -n "$(%DIR%_JAVA)" && test -n "$(%NDIR%dir)" || exit 0; \
53 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
54 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
55 set x *.class; shift; test "$$1" != "*.class" || exit 0; \
56 echo " $(INSTALL_DATA)" "$$@" "'$(DESTDIR)$(%NDIR%dir)/$$p'"; \
57 $(INSTALL_DATA) "$$@" "$(DESTDIR)$(%NDIR%dir)"
58 endif %?INSTALL%
59
60
61 ## -------------- ##
62 ## Uninstalling. ##
63 ## -------------- ##
64
65 if %?INSTALL%
66 .PHONY uninstall-am: uninstall-%DIR%JAVA
67 uninstall-%DIR%JAVA:
68 @$(NORMAL_UNINSTALL)
69 @test -n "$(%DIR%_JAVA)" && test -n "$(%NDIR%dir)" || exit 0; \
70 set x *.class; shift; test "$$1" != "*.class" || exit 0; \
71 echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" "$$@" ")"; \
72 cd "$(DESTDIR)$(%NDIR%dir)" && rm -f "$$@"
73 endif %?INSTALL%
74
75
76 ## ---------- ##
77 ## Cleaning. ##
78 ## ---------- ##
79
80 .PHONY clean-am: clean-%NDIR%JAVA
81 clean-%NDIR%JAVA:
82 -rm -f *.class class%NDIR%.stamp
83
84
85 ## -------------- ##
86 ## Distributing. ##
87 ## -------------- ##
88
89 if %?DIST%
90 DIST_COMMON += %DISTVAR%
91 endif %?DIST%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 2001-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 ## This file is read once per *language*, not per extension.
17
18 ## ------------------------- ##
19 ## Preprocessed Fortran 77. ##
20 ## ------------------------- ##
21
22 ## We also handle the case of preprocessing '.F' files into '.f' files.
23 if %?PPF77%
24 .F.f:
25 $(F77COMPILE) -F $<
26 endif %?PPF77%
27
28
29
30 ## -------- ##
31 ## Ratfor. ##
32 ## -------- ##
33
34 ## We also handle the case of preprocessing `.r' files into `.f' files.
35 if %?RATFOR%
36 .r.f:
37 $(RCOMPILE) -F $<
38 endif %?RATFOR%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 2001-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 ## See the comment about am__skipyacc in yacc.am.
17 if %?MAINTAINER-MODE%
18 if %?FIRST%
19 @MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ ||
20 endif %?FIRST%
21 endif %?MAINTAINER-MODE%
22
23 ?GENERIC?%EXT%%DERIVED-EXT%:
24 ?!GENERIC?%OBJ%: %SOURCE%
25 ?GENERIC? %VERBOSE%$(am__skiplex) $(SHELL) $(YLWRAP) %SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
26 ?!GENERIC? %VERBOSE% \
27 ?!GENERIC??DIST_SOURCE? $(am__skiplex) \
28 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
29 ?!GENERIC? $(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 %LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES) $(EXTRA_%XLIBRARY%_DEPENDENCIES) %DIRSTAMP%
17 %SILENT%-rm -f %LIBRARY%
18 %VERBOSE%$(%XLIBRARY%_AR) %LIBRARY% $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_LIBADD)
19 %SILENT%$(RANLIB) %LIBRARY%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 if %?INSTALL%
17 include inst-vars.am
18 endif %?INSTALL%
19
20 ## ------------ ##
21 ## Installing. ##
22 ## ------------ ##
23
24 if %?INSTALL%
25 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
26 ?EXEC?.PHONY install-exec-am: install-%DIR%LIBRARIES
27 ?!EXEC?.PHONY install-data-am: install-%DIR%LIBRARIES
28 install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
29 @$(NORMAL_INSTALL)
30 if %?BASE%
31 ## Funny invocation because Makefile variable can be empty, leading to
32 ## a syntax error in sh.
33 @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
34 list2=; for p in $$list; do \
35 if test -f $$p; then \
36 list2="$$list2 $$p"; \
37 else :; fi; \
38 done; \
39 test -z "$$list2" || { \
40 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
41 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
42 echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(%NDIR%dir)'"; \
43 $(INSTALL_DATA) $$list2 "$(DESTDIR)$(%NDIR%dir)" || exit $$?; }
44 else !%?BASE%
45 ## Funny invocation because Makefile variable can be empty, leading to
46 ## a syntax error in sh.
47 @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
48 if test -n "$$list"; then \
49 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
50 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
51 fi; \
52 $(am__nobase_list) | while read dir files; do \
53 xfiles=; for p in $$files; do \
54 if test -f "$$p"; then xfiles="$$xfiles $$p"; else :; fi; done; \
55 test -z "$$xfiles" || { \
56 test "x$$dir" = x. || { \
57 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
58 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
59 echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
60 $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \
61 done
62 endif !%?BASE%
63 ## We do two loops here so that $(POST_INSTALL) can be empty. If we
64 ## merge the two loops, we get a syntax error from sh. Anyway, having
65 ## $(POST_INSTALL) in the middle of the loop essentially renders it
66 ## useless; sh never actually executes this command. Read the GNU
67 ## Standards for a little enlightenment on this.
68 @$(POST_INSTALL)
69 @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
70 for p in $$list; do \
71 if test -f $$p; then \
72 ?BASE? $(am__strip_dir) \
73 ?!BASE? f=$$p; \
74 ## Must ranlib after installing because mod time changes.
75 ## cd to target directory because AIX ranlib messes up with whitespace
76 ## in the argument.
77 echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && $(RANLIB) $$f )"; \
78 ( cd "$(DESTDIR)$(%NDIR%dir)" && $(RANLIB) $$f ) || exit $$?; \
79 else :; fi; \
80 done
81 endif %?INSTALL%
82
83
84 ## -------------- ##
85 ## Uninstalling. ##
86 ## -------------- ##
87
88 if %?INSTALL%
89 .PHONY uninstall-am: uninstall-%DIR%LIBRARIES
90 uninstall-%DIR%LIBRARIES:
91 @$(NORMAL_UNINSTALL)
92 @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
93 ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
94 ?!BASE? $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
95 dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
96 endif %?INSTALL%
97
98
99 ## ---------- ##
100 ## Cleaning. ##
101 ## ---------- ##
102
103 .PHONY clean-am: clean-%DIR%LIBRARIES
104 clean-%DIR%LIBRARIES:
105 -test -z "$(%DIR%_LIBRARIES)" || rm -f $(%DIR%_LIBRARIES)
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 .PHONY: mostlyclean-libtool clean-libtool distclean-libtool
17 mostlyclean-am: mostlyclean-libtool
18 mostlyclean-libtool:
19 -rm -f *.lo
20
21 clean-am: clean-libtool
22 clean-libtool:
23 ?LTRMS?%LTRMS%
24
25 ?TOPDIR_P?distclean-am: distclean-libtool
26 ?TOPDIR_P?distclean-libtool:
27 ?TOPDIR_P? -rm -f libtool config.lt
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1996-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 if %?INSTALL%
17 include inst-vars.am
18 endif %?INSTALL%
19
20 ## ---------- ##
21 ## Building. ##
22 ## ---------- ##
23
24 .el.elc:
25 ## We add $(builddir) and $(srcdir) to load-path, so that any '.el' files
26 ## that $< depends upon can be found (including generated ones).
27 ## We prefer files from the build directory to those from the source
28 ## directory, in true VPATH spirit.
29 ## The destination file is normally determined by appending "c" to the
30 ## input (which would erronously put it in $(srcdir) in VPATH builds),
31 ## so we override that, too.
32 if test "$(EMACS)" != "no"; then \
33 am__dir=. am__subdir_includes=''; \
34 case $@ in */*) \
35 am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
36 am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
37 esac; \
38 ## Emacs byte-compilation won't create this automatically, sadly.
39 test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \
40 $(EMACS) --batch \
41 $(AM_ELCFLAGS) $(ELCFLAGS) \
42 $$am__subdir_includes -L $(builddir) -L $(srcdir) \
43 --eval "(defun byte-compile-dest-file (f) \"$@\")" \
44 --eval "(unless (byte-compile-file \"$<\") (kill-emacs 1))"; \
45 else :; fi
46
47
48 ## ------------ ##
49 ## Installing. ##
50 ## ------------ ##
51
52 if %?INSTALL%
53 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
54
55 ?BASE?%DIR%LISP_INSTALL = $(INSTALL_DATA)
56 ?!BASE?%DIR%LISP_INSTALL = $(install_sh_DATA)
57
58 ?EXEC?.PHONY install-exec-am: install-%DIR%LISP
59 ?!EXEC?.PHONY install-data-am: install-%DIR%LISP
60
61 install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
62 @$(NORMAL_INSTALL)
63 ## Do not install anything if EMACS was not found.
64 @if test "$(EMACS)" != no && test -n "$(%NDIR%dir)"; then \
65 ?!BASE? $(am__vpath_adj_setup) \
66 ## Funny invocation because Makefile variable can be empty, leading to
67 ## a syntax error in sh.
68 list='$(%DIR%_LISP)'; \
69 if test -n "$$list"; then \
70 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
71 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
72 fi; \
73 for p in $$list; do \
74 ## A lisp file can be in the source directory or the build directory.
75 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
76 ?BASE? $(am__strip_dir) \
77 ?!BASE? $(am__vpath_adj) \
78 echo " $(%DIR%LISP_INSTALL) '$$d$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
79 $(%DIR%LISP_INSTALL) "$$d$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" || exit $$?; \
80 ## Only install .elc file if it exists.
81 if test -f $${p}c; then \
82 echo " $(%DIR%LISP_INSTALL) '$${p}c' '$(DESTDIR)$(%NDIR%dir)/$${f}c'"; \
83 $(%DIR%LISP_INSTALL) "$${p}c" "$(DESTDIR)$(%NDIR%dir)/$${f}c" || exit $$?; \
84 else : ; fi; \
85 done; \
86 else : ; fi
87 endif %?INSTALL%
88
89
90 ## -------------- ##
91 ## Uninstalling. ##
92 ## -------------- ##
93
94 if %?INSTALL%
95 .PHONY uninstall-am: uninstall-%DIR%LISP
96 uninstall-%DIR%LISP:
97 @$(NORMAL_UNINSTALL)
98 ## Do not uninstall anything if EMACS was not found.
99 @test "$(EMACS)" != no && test -n "$(%NDIR%dir)" || exit 0; \
100 list='$(%DIR%_LISP)'; \
101 ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
102 ?!BASE? $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
103 files="$$files "`echo "$$files" | sed 's|$$|c|'`; \
104 dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
105 endif %?INSTALL%
106
107
108 ## ---------- ##
109 ## Cleaning. ##
110 ## ---------- ##
111
112 .PHONY clean-am: clean-lisp
113 clean-lisp:
114 -rm -f $(ELCFILES)
115
116
117 ## -------------- ##
118 ## Distributing. ##
119 ## -------------- ##
120
121 if %?DIST%
122 DIST_COMMON += %DISTVAR%
123 endif %?DIST%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 if %?INSTALL%
17 include inst-vars.am
18 endif %?INSTALL%
19
20 ## ------------ ##
21 ## Installing. ##
22 ## ------------ ##
23
24 if %?INSTALL%
25
26 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
27
28 ?EXEC?.PHONY install-exec-am: install-%DIR%LTLIBRARIES
29 ?!EXEC?.PHONY install-data-am: install-%DIR%LTLIBRARIES
30
31 install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
32 @$(NORMAL_INSTALL)
33 if %?BASE%
34 ## Funny invocation because Makefile variable can be empty, leading to
35 ## a syntax error in sh.
36 @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
37 list2=; for p in $$list; do \
38 if test -f $$p; then \
39 list2="$$list2 $$p"; \
40 else :; fi; \
41 done; \
42 test -z "$$list2" || { \
43 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
44 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
45 ## Note that we explicitly set the libtool mode. This avoids any lossage
46 ## if the program doesn't have a name that libtool expects.
47 ## Use INSTALL and not INSTALL_DATA because libtool knows the right
48 ## permissions to use.
49 ?LIBTOOL? echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(%NDIR%dir)'"; \
50 ?LIBTOOL? $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(%NDIR%dir)"; \
51 ?!LIBTOOL? echo " $(INSTALL) $(INSTALL_STRIP_FLAG) $$list '$(DESTDIR)$(%NDIR%dir)'"; \
52 ?!LIBTOOL? $(INSTALL) $(INSTALL_STRIP_FLAG) $$list "$(DESTDIR)$(%NDIR%dir)"; \
53 }
54 else !%?BASE%
55 @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
56 if test -n "$$list"; then \
57 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
58 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
59 fi; \
60 for p in $$list; do if test -f "$$p"; then echo "$$p $$p"; else :; fi; done | \
61 sed '/ .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
62 $(AWK) 'BEGIN { cur = "." } \
63 { if ($$2 == cur) { files = files " " $$1 } \
64 else { print cur, files; files = $$1; cur = $$2 } } \
65 END { print cur, files }' | \
66 while read dir files; do \
67 test -z "$$files" || { \
68 test "x$$dir" = x. || { \
69 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
70 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
71 ## Note that we explicitly set the libtool mode. This avoids any lossage
72 ## if the program doesn't have a name that libtool expects.
73 ## Use INSTALL and not INSTALL_DATA because libtool knows the right
74 ## permissions to use.
75 ?LIBTOOL? echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$files '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
76 ?LIBTOOL? $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$files "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; \
77 ?!LIBTOOL? echo " $(INSTALL) $(INSTALL_STRIP_FLAG) $$files '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
78 ?!LIBTOOL? $(INSTALL) $(INSTALL_STRIP_FLAG) $$files "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; \
79 }; \
80 done
81 endif !%?BASE%
82 endif %?INSTALL%
83
84
85 ## -------------- ##
86 ## Uninstalling. ##
87 ## -------------- ##
88
89 if %?INSTALL%
90 .PHONY uninstall-am: uninstall-%DIR%LTLIBRARIES
91 uninstall-%DIR%LTLIBRARIES:
92 @$(NORMAL_UNINSTALL)
93 @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
94 for p in $$list; do \
95 ?BASE? $(am__strip_dir) \
96 ?!BASE? f=$$p; \
97 ?LIBTOOL? echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
98 ?LIBTOOL? $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
99 ?!LIBTOOL? echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
100 ?!LIBTOOL? rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
101 done
102 endif %?INSTALL%
103
104
105 ## ---------- ##
106 ## Cleaning. ##
107 ## ---------- ##
108
109 .PHONY clean-am: clean-%DIR%LTLIBRARIES
110 clean-%DIR%LTLIBRARIES:
111 -test -z "$(%DIR%_LTLIBRARIES)" || rm -f $(%DIR%_LTLIBRARIES)
112 ## 'so_locations' files are created by some linkers (IRIX, OSF) when
113 ## building a shared object. Libtool places these files in the
114 ## directory where the shared object is created.
115 @list='$(%DIR%_LTLIBRARIES)'; \
116 locs=`for p in $$list; do echo $$p; done | \
117 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
118 sort -u`; \
119 test -z "$$locs" || { \
120 echo rm -f $${locs}; \
121 rm -f $${locs}; \
122 }
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 %LTLIBRARY%: $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_DEPENDENCIES) $(EXTRA_%XLTLIBRARY%_DEPENDENCIES) %DIRSTAMP%
17 %VERBOSE%$(%XLINK%) %RPATH% $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_LIBADD) $(LIBS)
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 NROFF = nroff
17 ## We don't really need this, but we use it in case we ever want to
18 ## support noinst_MANS.
19 MANS = %MANS%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1998-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 include inst-vars.am
17 man%SECTION%dir = $(mandir)/man%SECTION%
18
19 ## ------------ ##
20 ## Installing. ##
21 ## ------------ ##
22
23 ## MANS primary are always installed in mandir, hence install-data
24 ## is hard coded.
25
26 .PHONY: install-man
27 ?INSTALL-MAN?install-data-am: install-man
28 ?INSTALL-MAN?am__installdirs += "$(DESTDIR)$(man%SECTION%dir)"
29 .PHONY install-man: install-man%SECTION%
30 install-man%SECTION%: %DEPS%
31 @$(NORMAL_INSTALL)
32 if %?NOTRANS_MANS%
33 ## Handle MANS with notrans_ prefix
34 @list1='%NOTRANS_SECT_LIST%'; \
35 ?!HAVE_NOTRANS? list2=''; \
36 ?HAVE_NOTRANS? list2='%NOTRANS_LIST%'; \
37 test -n "$(man%SECTION%dir)" \
38 && test -n "`echo $$list1$$list2`" \
39 || exit 0; \
40 echo " $(MKDIR_P) '$(DESTDIR)$(man%SECTION%dir)'"; \
41 $(MKDIR_P) "$(DESTDIR)$(man%SECTION%dir)" || exit 1; \
42 { for i in $$list1; do echo "$$i"; done; \
43 ## Extract all items from notrans_man_MANS that should go in this section.
44 ## This must be done dynamically to support conditionals.
45 if test -n "$$list2"; then \
46 for i in $$list2; do echo "$$i"; done \
47 ## Accept for 'man1' files like 'foo.1c' but not 'sub.1/foo.2' or 'foo-2.1.4'.
48 | sed -n '/\.%SECTION%[a-z]*$$/p'; \
49 fi; \
50 ## Extract basename of manpage, change the extension if needed.
51 } | while read p; do \
52 ## Find the file.
53 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
54 echo "$$d$$p"; echo "$$p"; \
55 done | \
56 ## Extract the basename of the man page and change the extension if needed.
57 sed 'n;s,.*/,,;p;s,\.[^%SECTION%][0-9a-z]*$$,.%SECTION%,' | \
58 sed 'N;N;s,\n, ,g' | { \
59 ## We now have a list "sourcefile basename installed-name".
60 list=; while read file base inst; do \
61 if test "$$base" = "$$inst"; then list="$$list $$file"; else \
62 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
63 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man%SECTION%dir)/$$inst" || exit $$?; \
64 fi; \
65 done; \
66 for i in $$list; do echo "$$i"; done | $(am__base_list) | \
67 while read files; do \
68 test -z "$$files" || { \
69 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man%SECTION%dir)'"; \
70 $(INSTALL_DATA) $$files "$(DESTDIR)$(man%SECTION%dir)" || exit $$?; }; \
71 done; }
72 endif %?NOTRANS_MANS%
73 if %?TRANS_MANS%
74 ## Handle MANS without notrans_ prefix
75 @list1='%TRANS_SECT_LIST%'; \
76 ?!HAVE_TRANS? list2=''; \
77 ?HAVE_TRANS? list2='%TRANS_LIST%'; \
78 test -n "$(man%SECTION%dir)" \
79 && test -n "`echo $$list1$$list2`" \
80 || exit 0; \
81 echo " $(MKDIR_P) '$(DESTDIR)$(man%SECTION%dir)'"; \
82 $(MKDIR_P) "$(DESTDIR)$(man%SECTION%dir)" || exit 1; \
83 { for i in $$list1; do echo "$$i"; done; \
84 ## Extract all items from notrans_man_MANS that should go in this section.
85 ## This must be done dynamically to support conditionals.
86 if test -n "$$list2"; then \
87 for i in $$list2; do echo "$$i"; done \
88 ## Accept for 'man1' files like `foo.1c' but not 'sub.1/foo.2' or 'foo-2.1.4'.
89 | sed -n '/\.%SECTION%[a-z]*$$/p'; \
90 fi; \
91 ## Extract basename of manpage, change the extension if needed.
92 } | while read p; do \
93 ## Find the file.
94 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
95 echo "$$d$$p"; echo "$$p"; \
96 done | \
97 ## Extract the basename of the man page and change the extension if needed.
98 sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^%SECTION%][0-9a-z]*$$,%SECTION%,;x' \
99 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
100 sed 'N;N;s,\n, ,g' | { \
101 ## We now have a list "sourcefile basename installed-name".
102 list=; while read file base inst; do \
103 if test "$$base" = "$$inst"; then list="$$list $$file"; else \
104 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
105 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man%SECTION%dir)/$$inst" || exit $$?; \
106 fi; \
107 done; \
108 for i in $$list; do echo "$$i"; done | $(am__base_list) | \
109 while read files; do \
110 test -z "$$files" || { \
111 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man%SECTION%dir)'"; \
112 $(INSTALL_DATA) $$files "$(DESTDIR)$(man%SECTION%dir)" || exit $$?; }; \
113 done; }
114 endif %?TRANS_MANS%
115
116
117 ## -------------- ##
118 ## Uninstalling. ##
119 ## -------------- ##
120
121 .PHONY: uninstall-man
122 ?INSTALL-MAN?uninstall-am: uninstall-man
123 .PHONY uninstall-man: uninstall-man%SECTION%
124 uninstall-man%SECTION%:
125 @$(NORMAL_UNINSTALL)
126 if %?NOTRANS_MANS%
127 ## Handle MANS with notrans_ prefix
128 @list='%NOTRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
129 files=`{ for i in $$list; do echo "$$i"; done; \
130 ## Extract all items from notrans_man_MANS that should go in this section.
131 ## This must be done dynamically to support conditionals.
132 ?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
133 ## Accept for 'man1' files like 'foo.1c' but not 'sub.1/foo.2' or 'foo-2.1.4'.
134 ?HAVE_NOTRANS? sed -n '/\.%SECTION%[a-z]*$$/p'; \
135 ## Extract basename of manpage, change the extension if needed.
136 } | sed 's,.*/,,;s,\.[^%SECTION%][0-9a-z]*$$,.%SECTION%,'`; \
137 dir='$(DESTDIR)$(man%SECTION%dir)'; $(am__uninstall_files_from_dir)
138 endif %?NOTRANS_MANS%
139 if %?TRANS_MANS%
140 ## Handle MANS without notrans_ prefix
141 @list='%TRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
142 files=`{ for i in $$list; do echo "$$i"; done; \
143 ## Extract all items from man_MANS that should go in this section.
144 ## This must be done dynamically to support conditionals.
145 ?HAVE_TRANS? l2='%TRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
146 ## Accept for 'man1' files like 'foo.1c' but not 'sub.1/foo.2' or 'foo-2.1.4'.
147 ?HAVE_TRANS? sed -n '/\.%SECTION%[a-z]*$$/p'; \
148 ## Extract basename of manpage, run it through the program rename
149 ## transform, and change the extension if needed.
150 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^%SECTION%][0-9a-z]*$$,%SECTION%,;x' \
151 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
152 dir='$(DESTDIR)$(man%SECTION%dir)'; $(am__uninstall_files_from_dir)
153 endif %?TRANS_MANS%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 %PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) $(EXTRA_%XPROGRAM%_DEPENDENCIES) %DIRSTAMP%
17 ## Remove program before linking. Otherwise the link will fail if the
18 ## program is running somewhere. FIXME: this could be a loss if
19 ## you're using an incremental linker. Maybe we should think twice?
20 ## Or maybe not... sadly, incremental linkers are rarer than losing
21 ## systems.
22 @rm -f %PROGRAM%%EXEEXT%
23 %VERBOSE%$(%XLINK%) $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_LDADD) $(LIBS)
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 ## ------------ ##
17 ## Installing. ##
18 ## ------------ ##
19
20 if %?INSTALL%
21 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
22 ?EXEC?.PHONY install-exec-am: install-%DIR%PROGRAMS
23 ?!EXEC?.PHONY install-data-am: install-%DIR%PROGRAMS
24 install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
25 @$(NORMAL_INSTALL)
26 ## Funny invocation because Makefile variable can be empty, leading to
27 ## a syntax error in sh.
28 @list='$(%DIR%_PROGRAMS)'; test -n "$(%NDIR%dir)" || list=; \
29 if test -n "$$list"; then \
30 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
31 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
32 fi; \
33 for p in $$list; do echo "$$p $$p"; done | \
34 ## On Cygwin with libtool test won't see 'foo.exe' but instead 'foo'.
35 ## So we check for both.
36 sed 's/$(EXEEXT)$$//' | \
37 while read p p1; do if test -f $$p \
38 ?LIBTOOL? || test -f $$p1 \
39 ; then echo "$$p"; echo "$$p"; else :; fi; \
40 done | \
41 ## We now have a list of sourcefile pairs, separated by newline.
42 ## Turn that into "sourcefile source_base target_dir xformed_target_base",
43 ## with newlines being turned into spaces in a second step.
44 sed -e 'p;s,.*/,,;n;h' \
45 ?BASE? -e 's|.*|.|' \
46 ?!BASE? -e 's|[^/]*$$||; s|^$$|.|' \
47 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
48 sed 'N;N;N;s,\n, ,g' | \
49 ## The following awk script turns that into one line containing directories
50 ## and then lines of 'type target_name_or_directory sources ...', with type
51 ## 'd' designating directories, and 'f' files.
52 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
53 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
54 if ($$2 == $$4) files[d] = files[d] " " $$1; \
55 else { print "f", $$3 "/" $$4, $$1; } } \
56 END { for (d in files) print "f", d, files[d] }' | \
57 while read type dir files; do \
58 ?!BASE? case $$type in \
59 ?!BASE? d) echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
60 ?!BASE? $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?;; \
61 ?!BASE? f) \
62 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
63 test -z "$$files" || { \
64 ?!LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(%NDIR%dir)$$dir'"; \
65 ?!LIBTOOL? $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(%NDIR%dir)$$dir" || exit $$?; \
66 ## Note that we explicitly set the libtool mode. This avoids any
67 ## lossage if the install program doesn't have a name that libtool
68 ## expects.
69 ?LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(%NDIR%dir)$$dir'"; \
70 ?LIBTOOL? $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(%NDIR%dir)$$dir" || exit $$?; \
71 } \
72 ?!BASE? ;; esac \
73 ; done
74
75 endif %?INSTALL%
76
77
78 ## -------------- ##
79 ## Uninstalling. ##
80 ## -------------- ##
81
82 if %?INSTALL%
83 .PHONY uninstall-am: uninstall-%DIR%PROGRAMS
84 uninstall-%DIR%PROGRAMS:
85 @$(NORMAL_UNINSTALL)
86 @list='$(%DIR%_PROGRAMS)'; test -n "$(%NDIR%dir)" || list=; \
87 files=`for p in $$list; do echo "$$p"; done | \
88 ## Remove any leading directory before applying $(transform),
89 ## but keep the directory part in the hold buffer, in order to
90 ## reapply it again afterwards in the nobase case. Append $(EXEEXT).
91 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
92 -e 's/$$/$(EXEEXT)/' \
93 ?!BASE? -e 'x;s,[^/]*$$,,;G;s,\n,,' \
94 `; \
95 test -n "$$list" || exit 0; \
96 echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$files ")"; \
97 cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$files
98 endif %?INSTALL%
99
100
101 ## ---------- ##
102 ## Cleaning. ##
103 ## ---------- ##
104
105 .PHONY clean-am: clean-%DIR%PROGRAMS
106 clean-%DIR%PROGRAMS:
107 ?!LIBTOOL? -test -z "$(%DIR%_PROGRAMS)" || rm -f $(%DIR%_PROGRAMS)
108 ## Under Cygwin, we build 'program$(EXEEXT)'. However, if this
109 ## program uses a Libtool library, Libtool will move it in
110 ## '_libs/program$(EXEEXT)' and create a 'program' wrapper (without
111 ## '$(EXEEXT)'). Therefore, if Libtool is used, we must try to erase
112 ## both 'program$(EXEEXT)' and 'program'.
113 ## Cleaning the '_libs/' or '.libs/' directory is done from clean-libtool.
114 ## FIXME: In the future (i.e., when it works) it would be nice to delegate
115 ## this task to "libtool --mode=clean".
116 ?LIBTOOL? @list='$(%DIR%_PROGRAMS)'; test -n "$$list" || exit 0; \
117 ?LIBTOOL? echo " rm -f" $$list; \
118 ?LIBTOOL? rm -f $$list || exit $$?; \
119 ?LIBTOOL? test -n "$(EXEEXT)" || exit 0; \
120 ?LIBTOOL? list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
121 ?LIBTOOL? echo " rm -f" $$list; \
122 ?LIBTOOL? rm -f $$list
123
124
125 ## ---------- ##
126 ## Checking. ##
127 ## ---------- ##
128
129 if %?CK-OPTS%
130 .PHONY installcheck-am: installcheck-%DIR%PROGRAMS
131 installcheck-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
132 bad=0; pid=$$$$; list="$(%DIR%_PROGRAMS)"; for p in $$list; do \
133 case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
134 ## Match $(srcdir)/$$p in addition to $$p because Sun make might rewrite
135 ## filenames in AM_INSTALLCHECK_STD_OPTIONS_EXEMPT during VPATH builds.
136 *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
137 esac; \
138 ## Strip the directory and $(EXEEXT) before applying $(transform).
139 f=`echo "$$p" | \
140 sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
141 ## Insert the directory back if nobase_ is used.
142 ?!BASE? f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
143 for opt in --help --version; do \
144 if "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt >c$${pid}_.out \
145 2>c$${pid}_.err </dev/null \
146 && test -n "`cat c$${pid}_.out`" \
147 && test -z "`cat c$${pid}_.err`"; then :; \
148 else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
149 done; \
150 done; rm -f c$${pid}_.???; exit $$bad
151 endif %?CK-OPTS%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1999-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 if %?INSTALL%
17 include inst-vars.am
18 endif %?INSTALL%
19
20 ?FIRST?am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
21
22 ## ------------ ##
23 ## Installing. ##
24 ## ------------ ##
25
26 if %?INSTALL%
27 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
28 ?EXEC?.PHONY install-exec-am: install-%DIR%PYTHON
29 ?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
30 install-%DIR%PYTHON: $(%DIR%_PYTHON)
31 @$(NORMAL_INSTALL)
32 if %?BASE%
33 @list='$(%DIR%_PYTHON)'; dlist=; list2=; test -n "$(%NDIR%dir)" || list=; \
34 if test -n "$$list"; then \
35 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
36 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
37 fi; \
38 for p in $$list; do \
39 ## A file can be in the source directory or the build directory.
40 if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
41 if test -f $$b$$p; then \
42 ## Compute basename of source file. Unless this is a nobase_ target, we
43 ## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.py',
44 ## not '$(DESTDIR)$(%NDIR%dir)/python/foo.py'.
45 $(am__strip_dir) \
46 dlist="$$dlist $$f"; \
47 list2="$$list2 $$b$$p"; \
48 else :; fi; \
49 done; \
50 for file in $$list2; do echo $$file; done | $(am__base_list) | \
51 while read files; do \
52 ## Don't perform translation, since script name is important.
53 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(%NDIR%dir)'"; \
54 $(INSTALL_DATA) $$files "$(DESTDIR)$(%NDIR%dir)" || exit $$?; \
55 done || exit $$?; \
56 ## Byte-compile must be done at install time, since file times are
57 ## encoded in the actual files.
58 if test -n "$$dlist"; then \
59 $(am__py_compile) --destdir "$(DESTDIR)" \
60 --basedir "$(%NDIR%dir)" $$dlist; \
61 else :; fi
62 else !%?BASE%
63 @list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
64 if test -n "$$list"; then \
65 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
66 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
67 fi; \
68 $(am__nobase_list) | { while read dir files; do \
69 xfiles=; for p in $$files; do \
70 ## A file can be in the source directory or the build directory.
71 if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
72 if test -f "$$b$$p"; then xfiles="$$xfiles $$b$$p"; dlist="$$dlist $$p"; \
73 else :; fi; done; \
74 test -z "$$xfiles" || { \
75 test "x$$dir" = x. || { \
76 echo "$(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
77 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
78 ## Don't perform translation, since script name is important.
79 echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
80 $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \
81 done; \
82 ## Byte-compile must be done at install time, since file times are
83 ## encoded in the actual files.
84 if test -n "$$dlist"; then \
85 $(am__py_compile) --destdir "$(DESTDIR)" \
86 --basedir "$(%NDIR%dir)" $$dlist; \
87 else :; fi; }
88 endif !%?BASE%
89 endif %?INSTALL%
90
91
92 ## -------------- ##
93 ## Uninstalling. ##
94 ## -------------- ##
95
96 if %?INSTALL%
97
98 ?FIRST?am__pep3147_tweak = \
99 ?FIRST? sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|'
100
101 .PHONY uninstall-am: uninstall-%DIR%PYTHON
102 uninstall-%DIR%PYTHON:
103 @$(NORMAL_UNINSTALL)
104 @list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
105 ?BASE? py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
106 ?!BASE? $(am__nobase_strip_setup); py_files=`$(am__nobase_strip)`; \
107 test -n "$$py_files" || exit 0; \
108 dir='$(DESTDIR)$(%NDIR%dir)'; \
109 ## Also remove the .pyc and .pyo byte compiled versions.
110 ## This is somewhat tricky, because for newer pythons we have to take
111 ## PEP-3147 into account.
112 pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \
113 pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \
114 py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \
115 echo "$$py_files_pep3147";\
116 pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \
117 pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \
118 st=0; \
119 for files in \
120 "$$py_files" \
121 "$$pyc_files" \
122 "$$pyo_files" \
123 ## Installation of '.py' files is not influenced by PEP-3147, so it
124 ## is correct *not* to have $pyfiles_pep3147 here.
125 "$$pyc_files_pep3147" \
126 "$$pyo_files_pep3147" \
127 ; do \
128 $(am__uninstall_files_from_dir) || st=$$?; \
129 done; \
130 exit $$st
131 endif %?INSTALL%
132
133
134 ## ---------- ##
135 ## Cleaning. ##
136 ## ---------- ##
137
138 ## There is nothing to clean here since files are
139 ## byte-compiled when (and where) they are installed.
140
141 ## -------------- ##
142 ## Distributing. ##
143 ## -------------- ##
144
145 if %?DIST%
146 DIST_COMMON += %DISTVAR%
147 endif %?DIST%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 %CONFIG_H%: %STAMP%
17 ## Recover from removal of CONFIG_HEADER.
18 @test -f $@ || rm -f %STAMP%
19 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) %STAMP%
20
21
22 %STAMP%: %CONFIG_H_DEPS% $(top_builddir)/config.status
23 @rm -f %STAMP%
24 cd $(top_builddir) && $(SHELL) ./config.status %CONFIG_H_PATH%
25
26
27 ## Only the first file of AC_CONFIG_HEADERS is assumed to be generated
28 ## by autoheader.
29 if %?FIRST-HDR%
30 %CONFIG_HIN%: %MAINTAINER-MODE% $(am__configure_deps) %FILES%
31 ## Cater to parallel BSD make.
32 ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
33 ## Whenever $(AUTOHEADER) has run, we must make sure that
34 ## ./config.status will rebuild config.h. The dependency from %STAMP%
35 ## on %CONFIG_H_DEPS% (which contains config.hin) is not enough to
36 ## express this.
37 ##
38 ## There are some tricky cases where this rule will build a
39 ## config.hin which has the same timestamp as %STAMP%, in which case
40 ## ./config.status will not be rerun (meaning that users will use an
41 ## out-of-date config.h without knowing it). One situation where this
42 ## can occur is the following:
43 ## 1. the user updates some configure dependency (let's say foo.m4)
44 ## and runs 'make';
45 ## 2. the rebuild rules detect that a foo.m4 has changed,
46 ## run aclocal, autoconf, automake, and then run ./config.status.
47 ## (Note that autoheader hasn't been called yet, so ./config.status
48 ## outputs a config.h from an obsolete config.hin);
49 ## 3. once Makefile has been regenerated, make continues, and
50 ## discovers that config.h is a dependency of the 'all' rule.
51 ## Because config.h depends on stamp-h1, stamp-h1 depends on
52 ## config.hin, and config.hin depends on aclocal.m4, make runs
53 ## autoheader to rebuild config.hin.
54 ## Now make ought to call ./config.status once again to rebuild
55 ## config.h from the new config.hin, but if you have a sufficiently
56 ## fast box, steps 2 and 3 will occur within the same second: the
57 ## config.h/stamp-h1 generated from the outdated config.hin will have
58 ## the same mtime as the new config.hin. Hence make will think that
59 ## config.h is up to date.
60 ##
61 ## A solution is to erase %STAMP% here so that the %STAMP% rule
62 ## is always triggered after the this one.
63 rm -f %STAMP%
64 ## Autoheader has the bad habit of not changing the timestamp if
65 ## config.hin is unchanged, which breaks Make targets. Since what
66 ## must not changed gratuitously is config.h, which is already handled
67 ## by config.status, there is no reason to make things complex for
68 ## config.hin.
69 touch $@
70 endif %?FIRST-HDR%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 if %?INSTALL%
17 include inst-vars.am
18 endif %?INSTALL%
19
20 ## ------------ ##
21 ## Installing. ##
22 ## ------------ ##
23
24 if %?INSTALL%
25 ## if doesn't work properly for Automake variables yet.
26 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
27 ?EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS
28 ?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
29 install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
30 @$(NORMAL_INSTALL)
31 ## Funny invocation because Makefile variable can be empty, leading to
32 ## a syntax error in sh.
33 @list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || list=; \
34 if test -n "$$list"; then \
35 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
36 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
37 fi; \
38 ?!BASE? $(am__nobase_strip_setup); \
39 for p in $$list; do \
40 ## A file can be in the source directory or the build directory.
41 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
42 ## A script may or may not exist.
43 if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
44 done | \
45 ## We now have a list of "sourcefile newline (nobase-)target" pairs.
46 ## Turn that into "sourcefile source_base target_dir xformed_target_base",
47 ## with newlines being turned into spaces in a second step.
48 sed -e 'p;s,.*/,,;n' \
49 ?BASE? -e 'h;s|.*|.|' \
50 ?!BASE? -e "s|$$srcdirstrip/||" -e 'h;s|[^/]*$$||; s|^$$|.|' \
51 -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
52 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
53 { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
54 if ($$2 == $$4) { files[d] = files[d] " " $$1; \
55 if (++n[d] == $(am__install_max)) { \
56 print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
57 else { print "f", d "/" $$4, $$1 } } \
58 END { for (d in files) print "f", d, files[d] }' | \
59 while read type dir files; do \
60 ?!BASE? case $$type in \
61 ?!BASE? d) echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
62 ?!BASE? $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?;; \
63 ?!BASE? f) \
64 if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
65 test -z "$$files" || { \
66 echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(%NDIR%dir)$$dir'"; \
67 $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(%NDIR%dir)$$dir" || exit $$?; \
68 } \
69 ?!BASE? ;; esac \
70 ; done
71 endif %?INSTALL%
72
73
74 ## -------------- ##
75 ## Uninstalling. ##
76 ## -------------- ##
77
78 if %?INSTALL%
79 .PHONY uninstall-am: uninstall-%DIR%SCRIPTS
80 uninstall-%DIR%SCRIPTS:
81 @$(NORMAL_UNINSTALL)
82 @list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || exit 0; \
83 ?BASE? files=`for p in $$list; do echo "$$p"; done | \
84 ?BASE? sed -e 's,.*/,,;$(transform)'`; \
85 ?!BASE? $(am__nobase_strip_setup); \
86 ?!BASE? files=`$(am__nobase_strip) \
87 ?!BASE? -e 'h;s,.*/,,;$(transform);x;s|[^/]*$$||;G;s,\n,,'`; \
88 dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
89 endif %?INSTALL%
90
91
92 ## -------------- ##
93 ## Distributing. ##
94 ## -------------- ##
95
96 if %?DIST%
97 DIST_COMMON += %DISTVAR%
98 endif %?DIST%
99
100
101 ## ---------- ##
102 ## Checking. ##
103 ## ---------- ##
104
105 if %?CK-OPTS%
106 .PHONY installcheck-am: installcheck-%DIR%SCRIPTS
107 installcheck-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
108 bad=0; pid=$$$$; list="$(%DIR%_SCRIPTS)"; for p in $$list; do \
109 case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
110 ## Match $(srcdir)/$$p in addition to $$p because Sun make might rewrite
111 ## filenames in AM_INSTALLCHECK_STD_OPTIONS_EXEMPT during VPATH builds.
112 *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
113 esac; \
114 ## Strip any leading directory before applying $(transform).
115 f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \
116 ## Insert the directory back if nobase_ is used.
117 ?!BASE? f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
118 for opt in --help --version; do \
119 if "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt >c$${pid}_.out \
120 2>c$${pid}_.err </dev/null \
121 && test -n "`cat c$${pid}_.out`" \
122 && test -z "`cat c$${pid}_.err`"; then :; \
123 else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
124 done; \
125 done; rm -f c$${pid}_.???; exit $$bad
126 endif %?CK-OPTS%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 RECURSIVE_TARGETS += all-recursive check-recursive installcheck-recursive
17 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
18 distclean-recursive maintainer-clean-recursive
19
20 am__recursive_targets = \
21 $(RECURSIVE_TARGETS) \
22 $(RECURSIVE_CLEAN_TARGETS) \
23 $(am__extra_recursive_targets)
24
25 ## All documented targets which invoke 'make' recursively, or depend
26 ## on targets that do so. GNUmakefile from gnulib depends on this.
27 AM_RECURSIVE_TARGETS += $(am__recursive_targets:-recursive=)
28
29 .PHONY .MAKE: $(am__recursive_targets)
30
31 # This directory's subdirectories are mostly independent; you can cd
32 # into them and run 'make' without going through this Makefile.
33 # To change the values of 'make' variables: instead of editing Makefiles,
34 # (1) if the variable is set in 'config.status', edit 'config.status'
35 # (which will cause the Makefiles to be regenerated when you run 'make');
36 # (2) otherwise, pass the desired values on the 'make' command line.
37
38 $(am__recursive_targets):
39 ## Using $failcom allows "-k" to keep its natural meaning when running a
40 ## recursive rule.
41 @fail=; \
42 if $(am__make_keepgoing); then \
43 failcom='fail=yes'; \
44 else \
45 failcom='exit 1'; \
46 fi; \
47 dot_seen=no; \
48 target=`echo $@ | sed s/-recursive//`; \
49 ## For distclean and maintainer-clean we make sure to use the full
50 ## list of subdirectories. We do this so that 'configure; make
51 ## distclean' really is a no-op, even if SUBDIRS is conditional.
52 case "$@" in \
53 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
54 *) list='$(SUBDIRS)' ;; \
55 esac; \
56 for subdir in $$list; do \
57 echo "Making $$target in $$subdir"; \
58 if test "$$subdir" = "."; then \
59 dot_seen=yes; \
60 local_target="$$target-am"; \
61 else \
62 local_target="$$target"; \
63 fi; \
64 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
65 || eval $$failcom; \
66 done; \
67 if test "$$dot_seen" = "no"; then \
68 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
69 fi; test -z "$$fail"
70
71 mostlyclean: mostlyclean-recursive
72 clean: clean-recursive
73 distclean: distclean-recursive
74 maintainer-clean: maintainer-clean-recursive
75
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 # Read a list of newline-separated strings from the standard input,
17 # and print each of them once, without duplicates. Input order is
18 # *not* preserved.
19 am__uniquify_input = $(AWK) '\
20 BEGIN { nonempty = 0; } \
21 { items[$$0] = 1; nonempty = 1; } \
22 END { if (nonempty) { for (i in items) print i; }; } \
23 '
24
25 # Make sure the list of sources is unique. This is necessary because,
26 # e.g., the same source file might be shared among _SOURCES variables
27 # for different programs/libraries.
28 am__define_uniq_tagged_files = \
29 list='$(am__tagged_files)'; \
30 unique=`for i in $$list; do \
31 ## Handle VPATH correctly.
32 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
33 done | $(am__uniquify_input)`
34
35 ## ---- ##
36 ## ID. ##
37 ## ---- ##
38
39 ID: $(am__tagged_files)
40 $(am__define_uniq_tagged_files); mkid -fID $$unique
41
42
43 ## ------ ##
44 ## TAGS. ##
45 ## ------ ##
46
47 ETAGS = etags
48 .PHONY: TAGS tags
49 if %?SUBDIRS%
50 AM_RECURSIVE_TARGETS += TAGS
51 RECURSIVE_TARGETS += tags-recursive
52 tags: tags-recursive
53 else !%?SUBDIRS%
54 tags: tags-am
55 endif !%?SUBDIRS%
56 TAGS: tags
57
58 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
59 ## We use the positional parameters to build the subdir list with
60 ## absolute names, without the need to worry about white space in `pwd`.
61 set x; \
62 here=`pwd`; \
63 ## Exuberant Ctags wants --etags-include,
64 ## GNU Etags --include
65 ## Furthermore Exuberant Ctags 5.5.4 fails to create TAGS files
66 ## when no files are supplied, despite any --etags-include option.
67 ## A workaround is to pass '.' as a file. This is what $empty_fix is for.
68 ?SUBDIRS? if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
69 ?SUBDIRS? include_option=--etags-include; \
70 ?SUBDIRS? empty_fix=.; \
71 ?SUBDIRS? else \
72 ?SUBDIRS? include_option=--include; \
73 ?SUBDIRS? empty_fix=; \
74 ?SUBDIRS? fi; \
75 ?SUBDIRS? list='$(SUBDIRS)'; for subdir in $$list; do \
76 ## Do nothing if we're trying to look in '.'.
77 ?SUBDIRS? if test "$$subdir" = .; then :; else \
78 ?SUBDIRS? test ! -f $$subdir/TAGS || \
79 ## Note that the = is mandatory for --etags-include.
80 ?SUBDIRS? set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
81 ?SUBDIRS? fi; \
82 ?SUBDIRS? done; \
83 $(am__define_uniq_tagged_files); \
84 ## Remove the 'x' we added first:
85 shift; \
86 ## Make sure we have something to run etags on.
87 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
88 test -n "$$unique" || unique=$$empty_fix; \
89 if test $$# -gt 0; then \
90 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
91 "$$@" $$unique; \
92 else \
93 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
94 $$unique; \
95 fi; \
96 fi
97
98
99 ## --------------- ##
100 ## vi-style tags. ##
101 ## --------------- ##
102
103 CTAGS = ctags
104 .PHONY: CTAGS ctags
105 if %?SUBDIRS%
106 AM_RECURSIVE_TARGETS += CTAGS
107 RECURSIVE_TARGETS += ctags-recursive
108 ctags: ctags-recursive
109 else !%?SUBDIRS%
110 ctags: ctags-am
111 endif !%?SUBDIRS%
112
113 CTAGS: ctags
114 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
115 $(am__define_uniq_tagged_files); \
116 ## Make sure we have something to run ctags on.
117 test -z "$(CTAGS_ARGS)$$unique" \
118 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
119 $$unique
120
121
122 ## --------------- ##
123 ## "Global tags". ##
124 ## --------------- ##
125
126 .PHONY: GTAGS
127 GTAGS:
128 here=`$(am__cd) $(top_builddir) && pwd` \
129 && $(am__cd) $(top_srcdir) \
130 && gtags -i $(GTAGS_ARGS) "$$here"
131
132
133 ## ------- ##
134 ## cscope ##
135 ## ------- ##
136
137 if %?TOPDIR_P%
138 CSCOPE = cscope
139 .PHONY: cscope clean-cscope
140 AM_RECURSIVE_TARGETS += cscope
141 cscope: cscope.files
142 test ! -s cscope.files \
143 || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
144 clean-cscope:
145 -rm -f cscope.files
146 cscope.files: clean-cscope cscopelist
147 endif %?TOPDIR_P%
148
149 if %?SUBDIRS%
150 RECURSIVE_TARGETS += cscopelist-recursive
151 cscopelist: cscopelist-recursive
152 else !%?SUBDIRS%
153 cscopelist: cscopelist-am
154 endif !%?SUBDIRS%
155
156 cscopelist-am: $(am__tagged_files)
157 list='$(am__tagged_files)'; \
158 case "$(srcdir)" in \
159 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
160 *) sdir=$(subdir)/$(srcdir) ;; \
161 esac; \
162 for i in $$list; do \
163 if test -f "$$i"; then \
164 echo "$(subdir)/$$i"; \
165 else \
166 echo "$$sdir/$$i"; \
167 fi; \
168 done >> $(top_builddir)/cscope.files
169
170
171 ## ---------- ##
172 ## Cleaning. ##
173 ## ---------- ##
174
175 .PHONY distclean-am: distclean-tags
176
177 distclean-tags:
178 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
179 if %?TOPDIR_P%
180 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
181 endif %?TOPDIR_P%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 DIST_COMMON += %VTEXI% %STAMPVTI%
17
18 ## Don't give this rule a command (even '@:').
19 ## %STAMPVTI% is always newer than %VTEXI%, so this rule is always
20 ## triggered. If you equip this rule with a command, GNU make will
21 ## assume %VTEXI% has been rebuild in the current directory and
22 ## discard any %VTEXI% file found in a VPATH search.
23 %VTEXI%: %MAINTAINER-MODE% %STAMPVTI%
24
25 ## Depend on configure so that version number updates cause a rebuild.
26 ## (Not configure.ac, because not all setups define the version number
27 ## in this file.)
28 %STAMPVTI%: %TEXI% $(top_srcdir)/configure
29 ## It is wrong to have %STAMPVTI% dependent on %DIRSTAMP%, because
30 ## %STAMPVTI% is distributed and %DIRSTAMP% isn't: a distributed file
31 ## should never be dependent upon a non-distributed built file.
32 ## Therefore we ensure that %DIRSTAMP% exists in the rule.
33 ## Use cp + mv so that the update of %VTEXI% is atomic even if
34 ## the source directory is on a different file system.
35 ?DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP%
36 @(dir=.; test -f ./%TEXI% || dir=$(srcdir); \
37 set `$(SHELL) %MDDIR%mdate-sh $$dir/%TEXI%`; \
38 echo "@set UPDATED $$1 $$2 $$3"; \
39 echo "@set UPDATED-MONTH $$2 $$3"; \
40 echo "@set EDITION $(VERSION)"; \
41 echo "@set VERSION $(VERSION)") > %VTI%.tmp$$$$ && \
42 (cmp -s %VTI%.tmp$$$$ %VTEXI% \
43 || (echo "Updating %VTEXI%" && \
44 cp %VTI%.tmp$$$$ %VTEXI%.tmp$$$$ && \
45 mv %VTEXI%.tmp$$$$ %VTEXI%)) && \
46 rm -f %VTI%.tmp$$$$ %VTEXI%.$$$$
47 @cp %VTEXI% $@
48
49 mostlyclean-am: mostlyclean-%VTI%
50 mostlyclean-%VTI%:
51 -rm -f %VTI%.tmp* %VTEXI%.tmp*
52
53 maintainer-clean-am: maintainer-clean-%VTI%
54 maintainer-clean-%VTI%:
55 %MAINTAINER-MODE% -rm -f %STAMPVTI% %VTEXI%
56
57 .PHONY: mostlyclean-%VTI% maintainer-clean-%VTI%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16
17 ?GENERIC_INFO?%SOURCE_SUFFIX%%DEST_SUFFIX%:
18 ?!GENERIC_INFO?%DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_INFO% %DEPS%
19 ## It is wrong to have 'info' files dependent on %DIRSTAMP%, because
20 ## 'info' files are distributed and %DIRSTAMP% isn't: a distributed file
21 ## should never be dependent upon a non-distributed built file.
22 ## Therefore we ensure that %DIRSTAMP% exists in the rule.
23 ?!INSRC??DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP%
24 ## Back up the info files before running makeinfo. This is the cheapest
25 ## way to ensure that
26 ## 1) If the texinfo file shrinks (or if you start using --no-split),
27 ## you'll not be left with some dead info files lying around -- dead
28 ## files which would end up in the distribution.
29 ## 2) If the texinfo file has some minor mistakes which cause makeinfo
30 ## to fail, the info files are not removed. (They are needed by the
31 ## developer while he writes documentation.)
32 ## *.iNN files are used on DJGPP. See the comments in install-info-am
33 %AM_V_MAKEINFO%restore=: && backupdir="$(am__leading_dot)am$$$$" && \
34 ?INSRC? am__cwd=`pwd` && $(am__cd) $(srcdir) && \
35 rm -rf $$backupdir && mkdir $$backupdir && \
36 ## If makeinfo is not installed we must not backup the files so
37 ## 'missing' can do its job and touch $@ if it exists.
38 if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
39 for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
40 if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
41 done; \
42 else :; fi && \
43 ?INSRC? cd "$$am__cwd"; \
44 if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
45 ?!INSRC? -o $@ `test -f '%SOURCE_INFO%' || echo '$(srcdir)/'`%SOURCE_INFO%; \
46 ?INSRC??!GENERIC_INFO? -o $@ $(srcdir)/%SOURCE_INFO%; \
47 ?INSRC??GENERIC_INFO? -o $@ $<; \
48 then \
49 rc=0; \
50 ?INSRC? $(am__cd) $(srcdir); \
51 else \
52 rc=$$?; \
53 ## Beware that backup info files might come from a subdirectory.
54 ?INSRC? $(am__cd) $(srcdir) && \
55 $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
56 fi; \
57 rm -rf $$backupdir; exit $$rc
58
59 INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
60
61 ?GENERIC?%SOURCE_SUFFIX%.dvi:
62 ?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS% %DIRSTAMP%
63 %AM_V_TEXI2DVI%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
64 ## Must set MAKEINFO like this so that version.texi will be found even
65 ## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
66 MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
67 ## texi2dvi doesn't silence everything with -q, redirect to /dev/null instead.
68 ## We still want -q (%TEXIQUIET%) because it turns on batch mode.
69 ## Use '--build-dir' so that TeX and Texinfo auxiliary files and build
70 ## by-products are left in there, instead of cluttering the current
71 ## directory (see automake bug#11146). Use a different build-dir for
72 ## each file (and distinct from that of the corresponding PDF file) to
73 ## avoid hitting a Texinfop bug that could cause low-probability racy
74 ## failure when doing parallel builds; see:
75 ## http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html
76 $(TEXI2DVI) %TEXIQUIET% --build-dir=$(@:.dvi=.t2d) -o $@ %TEXIDEVNULL% \
77 ?GENERIC? %SOURCE%
78 ?!GENERIC? `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
79
80 ?GENERIC?%SOURCE_SUFFIX%.pdf:
81 ?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
82 %AM_V_TEXI2PDF%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
83 ## Must set MAKEINFO like this so that version.texi will be found even
84 ## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
85 MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
86 ## texi2pdf doesn't silence everything with -q, redirect to /dev/null instead.
87 ## We still want -q (%TEXIQUIET%) because it turns on batch mode.
88 ## Use '--build-dir' so that TeX and Texinfo auxiliary files and build
89 ## by-products are left in there, instead of cluttering the current
90 ## directory (see automake bug#11146). Use a different build-dir for
91 ## each file (and distinct from that of the corresponding DVI file) to
92 ## avoid hitting a Texinfop bug that could cause low-probability racy
93 ## failure when doing parallel builds; see:
94 ## http://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html
95 $(TEXI2PDF) %TEXIQUIET% --build-dir=$(@:.pdf=.t2p) -o $@ %TEXIDEVNULL% \
96 ?GENERIC? %SOURCE%
97 ?!GENERIC? `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
98
99 ?GENERIC?%SOURCE_SUFFIX%.html:
100 ?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%
101 ## When --split (the default) is used, makeinfo will output a
102 ## directory. However it will not update the time stamp of a
103 ## previously existing directory, and when the names of the nodes
104 ## in the manual change, it may leave unused pages. Our fix
105 ## is to build under a temporary name, and replace the target on
106 ## success.
107 %AM_V_MAKEINFO%rm -rf $(@:.html=.htp)
108 %SILENT%if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
109 ?GENERIC? -o $(@:.html=.htp) %SOURCE%; \
110 ?!GENERIC? -o $(@:.html=.htp) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \
111 then \
112 rm -rf $@ && mv $(@:.html=.htp) $@; \
113 else \
114 rm -rf $(@:.html=.htp); exit 1; \
115 fi
116
117 ## If we are using the generic rules, we need separate dependencies.
118 ## (Don't wonder about %DIRSTAMP% here, this is used only by non-generic
119 ## rules.)
120 if %?GENERIC_INFO%
121 %DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_REAL% %DEPS%
122 endif %?GENERIC_INFO%
123 if %?GENERIC%
124 %DEST_PREFIX%.dvi: %SOURCE_REAL% %DEPS%
125 %DEST_PREFIX%.pdf: %SOURCE_REAL% %DEPS%
126 %DEST_PREFIX%.html: %SOURCE_REAL% %DEPS%
127 endif %?GENERIC%
0 ## automake - create Makefile.in from Makefile.am
1
2 ## Copyright (C) 1994-2014 Free Software Foundation, Inc.
3
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
7 ## any later version.
8
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
13
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
16
17 ## ----------- ##
18 ## Variables. ##
19 ## ----------- ##
20
21 if %?LOCAL-TEXIS%
22 TEXI2DVI = texi2dvi
23 TEXI2PDF = $(TEXI2DVI) --pdf --batch
24 MAKEINFOHTML = $(MAKEINFO) --html
25 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
26 endif %?LOCAL-TEXIS%
27
28
29 ## ---------- ##
30 ## Building. ##
31 ## ---------- ##
32
33 ## The way to make PostScript, for those who want it.
34 if %?LOCAL-TEXIS%
35 DVIPS = dvips
36 .dvi.ps:
37 %AM_V_DVIPS%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
38 $(DVIPS) %TEXIQUIET% -o $@ $<
39 endif %?LOCAL-TEXIS%
40
41 .PHONY: dvi dvi-am html html-am info info-am pdf pdf-am ps ps-am
42 if %?SUBDIRS%
43 RECURSIVE_TARGETS += dvi-recursive html-recursive info-recursive
44 RECURSIVE_TARGETS += pdf-recursive ps-recursive
45 dvi: dvi-recursive
46 html: html-recursive
47 info: info-recursive
48 pdf: pdf-recursive
49 ps: ps-recursive
50 else !%?SUBDIRS%
51 dvi: dvi-am
52 html: html-am
53 info: info-am
54 pdf: pdf-am
55 ps: ps-am
56 endif !%?SUBDIRS%
57
58 if %?LOCAL-TEXIS%
59 dvi-am: $(DVIS)
60 html-am: $(HTMLS)
61 info-am: $(INFO_DEPS)
62 pdf-am: $(PDFS)
63 ps-am: $(PSS)
64 else ! %?LOCAL-TEXIS%
65 dvi-am:
66 html-am:
67 info-am:
68 pdf-am:
69 ps-am:
70 endif ! %?LOCAL-TEXIS%
71
72
73 ## ------------ ##
74 ## Installing. ##
75 ## ------------ ##
76
77 ## Some code should be run only if install-info actually exists, and
78 ## if the user doesn't request it not to be run (through the
79 ## 'AM_UPDATE_INFO_DIR' environment variable). See automake bug#9773
80 ## and Debian Bug#543992.
81 am__can_run_installinfo = \
82 case $$AM_UPDATE_INFO_DIR in \
83 n|no|NO) false;; \
84 *) (install-info --version) >/dev/null 2>&1;; \
85 esac
86
87 ## Look in both . and srcdir because the info pages might have been
88 ## rebuilt in the build directory. Can't cd to srcdir; that might
89 ## break a possible install-sh reference.
90 ##
91 ## Funny name due to --cygnus influence; we want to reserve
92 ## 'install-info' for the user.
93 ##
94 ## TEXINFOS primary are always installed in infodir, hence install-data
95 ## is hard coded.
96 if %?INSTALL-INFO%
97 if %?LOCAL-TEXIS%
98 am__installdirs += "$(DESTDIR)$(infodir)"
99 install-data-am: install-info-am
100 endif %?LOCAL-TEXIS%
101 endif %?INSTALL-INFO%
102 .PHONY: \
103 install-dvi install-dvi-am \
104 install-html install-html-am \
105 install-info install-info-am \
106 install-pdf install-pdf-am \
107 install-ps install-ps-am
108
109 if %?SUBDIRS%
110 RECURSIVE_TARGETS += \
111 install-dvi-recursive \
112 install-html-recursive \
113 install-info-recursive \
114 install-pdf-recursive \
115 install-ps-recursive
116 install-dvi: install-dvi-recursive
117 install-html: install-html-recursive
118 install-info: install-info-recursive
119 install-pdf: install-pdf-recursive
120 install-ps: install-ps-recursive
121 else !%?SUBDIRS%
122 install-dvi: install-dvi-am
123 install-html: install-html-am
124 install-info: install-info-am
125 install-pdf: install-pdf-am
126 install-ps: install-ps-am
127 endif !%?SUBDIRS%
128
129 if %?LOCAL-TEXIS%
130
131 include inst-vars.am
132
133 install-dvi-am: $(DVIS)
134 @$(NORMAL_INSTALL)
135 @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
136 if test -n "$$list"; then \
137 echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
138 $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
139 fi; \
140 for p in $$list; do \
141 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
142 echo "$$d$$p"; \
143 done | $(am__base_list) | \
144 while read files; do \
145 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
146 $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
147 done
148
149 install-html-am: $(HTMLS)
150 @$(NORMAL_INSTALL)
151 @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
152 if test -n "$$list"; then \
153 echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
154 $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
155 fi; \
156 for p in $$list; do \
157 if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
158 $(am__strip_dir) \
159 ## This indirection is required to work around a bug of the Solaris 10
160 ## shell /usr/xpg4/bin/sh. The description of the bug can be found at
161 ## <http://lists.gnu.org/archive/html/bug-autoconf/2011-11/msg00005.html>
162 ## and the report of the original failure can be found at automake
163 ## bug#10026 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10026#23>
164 d2=$$d$$p; \
165 if test -d "$$d2"; then \
166 echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
167 $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
168 echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
169 $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
170 else \
171 list2="$$list2 $$d2"; \
172 fi; \
173 done; \
174 test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
175 while read files; do \
176 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
177 $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
178 done; }
179
180 install-info-am: $(INFO_DEPS)
181 @$(NORMAL_INSTALL)
182 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
183 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
184 if test -n "$$list"; then \
185 echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
186 $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
187 fi; \
188 for file in $$list; do \
189 ## Strip possible $(srcdir) prefix.
190 case $$file in \
191 $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
192 esac; \
193 if test -f $$file; then d=.; else d=$(srcdir); fi; \
194 ## 8+3 filesystems cannot deal with foo.info-N filenames: they all
195 ## conflict. DJGPP comes with a tool, DJTAR, that will rename these
196 ## files to foo.iNN while extracting the archive. DJGPP's makeinfo
197 ## is patched to grok these filenames. However we have to account
198 ## for the renaming when installing the info files.
199 ##
200 ## If $file == foo.info, then $file_i == foo.i. The reason we use two
201 ## shell commands instead of one ('s|\.info$$|.i|') is so that a suffix-less
202 ## 'foo' becomes 'foo.i' too.
203 file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
204 for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
205 $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
206 if test -f $$ifile; then \
207 echo "$$ifile"; \
208 else : ; fi; \
209 done; \
210 done | $(am__base_list) | \
211 while read files; do \
212 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
213 $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
214 @$(POST_INSTALL)
215 @if $(am__can_run_installinfo); then \
216 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
217 for file in $$list; do \
218 ## Strip directory
219 relfile=`echo "$$file" | sed 's|^.*/||'`; \
220 ## Run ":" after install-info in case install-info fails. We really
221 ## don't care about failures here, because they can be spurious. For
222 ## instance if you don't have a dir file, install-info will fail. I
223 ## think instead it should create a new dir file for you. This bug
224 ## causes the "make distcheck" target to fail reliably.
225 echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
226 ## Use "|| :" here because Sun make passes -e to sh; if install-info
227 ## fails then we'd fail if we used ";".
228 install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
229 done; \
230 else : ; fi
231
232 install-pdf-am: $(PDFS)
233 @$(NORMAL_INSTALL)
234 @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
235 if test -n "$$list"; then \
236 echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
237 $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
238 fi; \
239 for p in $$list; do \
240 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
241 echo "$$d$$p"; \
242 done | $(am__base_list) | \
243 while read files; do \
244 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
245 $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
246
247 install-ps-am: $(PSS)
248 @$(NORMAL_INSTALL)
249 @list='$(PSS)'; test -n "$(psdir)" || list=; \
250 if test -n "$$list"; then \
251 echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
252 $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
253 fi; \
254 for p in $$list; do \
255 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
256 echo "$$d$$p"; \
257 done | $(am__base_list) | \
258 while read files; do \
259 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
260 $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
261
262 else ! %?LOCAL-TEXIS%
263 install-dvi-am:
264 install-html-am:
265 install-info-am:
266 install-pdf-am:
267 install-ps-am:
268 endif ! %?LOCAL-TEXIS%
269
270
271 ## -------------- ##
272 ## Uninstalling. ##
273 ## -------------- ##
274
275 if %?LOCAL-TEXIS%
276 .PHONY uninstall-am: \
277 uninstall-dvi-am \
278 uninstall-html-am \
279 uninstall-info-am \
280 uninstall-ps-am \
281 uninstall-pdf-am
282
283 uninstall-dvi-am:
284 @$(NORMAL_UNINSTALL)
285 @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
286 for p in $$list; do \
287 $(am__strip_dir) \
288 echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
289 rm -f "$(DESTDIR)$(dvidir)/$$f"; \
290 done
291
292 uninstall-html-am:
293 @$(NORMAL_UNINSTALL)
294 @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
295 for p in $$list; do \
296 $(am__strip_dir) \
297 ## $f can be a directory, hence the -r.
298 echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
299 rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
300 done
301
302 uninstall-info-am:
303 @$(PRE_UNINSTALL)
304 ## Run two loops here so that we can handle PRE_UNINSTALL and
305 ## NORMAL_UNINSTALL correctly.
306 @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
307 list='$(INFO_DEPS)'; \
308 for file in $$list; do \
309 relfile=`echo "$$file" | sed 's|^.*/||'`; \
310 ## install-info needs the actual info file. We use the installed one,
311 ## rather than relying on one still being in srcdir or builddir.
312 ## However, "make uninstall && make uninstall" should not fail,
313 ## so we ignore failure if the file did not exist.
314 echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
315 if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
316 then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
317 done; \
318 else :; fi
319 @$(NORMAL_UNINSTALL)
320 @list='$(INFO_DEPS)'; \
321 for file in $$list; do \
322 relfile=`echo "$$file" | sed 's|^.*/||'`; \
323 ## DJGPP-style info files. See comment in install-info-am.
324 relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
325 (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
326 echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
327 rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
328 else :; fi); \
329 done
330
331 uninstall-pdf-am:
332 @$(NORMAL_UNINSTALL)
333 @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
334 for p in $$list; do \
335 $(am__strip_dir) \
336 echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
337 rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
338 done
339
340 uninstall-ps-am:
341 @$(NORMAL_UNINSTALL)
342 @list='$(PSS)'; test -n "$(psdir)" || list=; \
343 for p in $$list; do \
344 $(am__strip_dir) \
345 echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
346 rm -f "$(DESTDIR)$(psdir)/$$f"; \
347 done
348 endif %?LOCAL-TEXIS%
349
350 if %?LOCAL-TEXIS%
351 .PHONY: dist-info
352 dist-info: $(INFO_DEPS)
353 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
354 list='$(INFO_DEPS)'; \
355 for base in $$list; do \
356 ## Strip possible $(srcdir) prefix.
357 case $$base in \
358 $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
359 esac; \
360 if test -f $$base; then d=.; else d=$(srcdir); fi; \
361 base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
362 for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
363 if test -f $$file; then \
364 ## Strip leading '$$d/'.
365 relfile=`expr "$$file" : "$$d/\(.*\)"`; \
366 test -f "$(distdir)/$$relfile" || \
367 cp -p $$file "$(distdir)/$$relfile"; \
368 else :; fi; \
369 done; \
370 done
371 endif %?LOCAL-TEXIS%
372
373
374 ## ---------- ##
375 ## Cleaning. ##
376 ## ---------- ##
377
378 ## The funny name is due to --cygnus influence; in Cygnus mode,
379 ## 'clean-info' is a target that users can use.
380
381 if %?LOCAL-TEXIS%
382 .PHONY mostlyclean-am: mostlyclean-aminfo
383 .PHONY: mostlyclean-aminfo
384 mostlyclean-aminfo:
385 ## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
386 ## contain any directory created by "makeinfo --html", as well as the
387 ## '*.t2d' and '*.t2p' directories used by texi2dvi and texi2pdf.
388 -rm -rf %MOSTLYCLEAN%
389
390 .PHONY clean-am: clean-aminfo
391 clean-aminfo:
392 ## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
393 ## above for details.
394 ?TEXICLEAN? -test -z "%TEXICLEAN%" \
395 ?TEXICLEAN? || rm -rf %TEXICLEAN%
396
397 .PHONY maintainer-clean-am: maintainer-clean-aminfo
398 maintainer-clean-aminfo:
399 @list='$(INFO_DEPS)'; for i in $$list; do \
400 ## .iNN files are DJGPP-style info files.
401 i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
402 echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
403 rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
404 done
405 ## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
406 ## above for details.
407 ?MAINTCLEAN? -test -z "%MAINTCLEAN%" \
408 ?MAINTCLEAN? || rm -rf %MAINTCLEAN%
409
410 endif %?LOCAL-TEXIS%
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 2008-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 ## There is no rule here. :-)
0 ## automake - create Makefile.in from Makefile.am
1 ## Copyright (C) 1998-2014 Free Software Foundation, Inc.
2
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2, or (at your option)
6 ## any later version.
7
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 ## We want to disable the Yacc rebuild rule when
17 ## 1. AM_MAINTAINER_MODE is used, and
18 ## 2. --enable-maintainer-mode is not specified, and
19 ## 3. parser.c already exist, and
20 ## 4. parser.y and parser.c are distributed.
21 ## Point #3 is because "make maintainer-clean" erases parser.c, yet
22 ## the GNU Coding Standards require that ./configure; make works even
23 ## after that.
24 ## Point #4 is because parsers listed in nodist_*_SOURCES are always
25 ## built on the user's side, so it makes no sense to disable them.
26 ##
27 ## Points #1, #2, #3 are solved by unconditionally prefixing the rule
28 ## with $(am__skipyacc) defined below only when needed.
29 ##
30 ## Point #4 requires a condition on whether parser.y/parser.c are
31 ## distributed or not. We cannot have a generic rule that works in
32 ## both cases, so we ensure in automake that nodist_ parsers always
33 ## use non-generic rules.
34 if %?FIRST%
35 if %?MAINTAINER-MODE%
36 @MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ ||
37 endif %?MAINTAINER-MODE%
38 ## The 's/c$/h/' substitution *must* be the last one.
39 am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \
40 -e s/c++$$/h++/ -e s/c$$/h/
41 endif %?FIRST%
42
43 ?GENERIC?%EXT%%DERIVED-EXT%:
44 ?!GENERIC?%OBJ%: %SOURCE%
45 ?GENERIC? %VERBOSE%$(am__skipyacc) $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE%
46 ?!GENERIC? %VERBOSE% \
47 ?!GENERIC??DIST_SOURCE? $(am__skipyacc) \
48 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
49 ?!GENERIC? $(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE%
0 #! /bin/sh
1 # Wrapper for Microsoft lib.exe
2
3 me=ar-lib
4 scriptversion=2012-03-01.08; # UTC
5
6 # Copyright (C) 2010-2014 Free Software Foundation, Inc.
7 # Written by Peter Rosin <peda@lysator.liu.se>.
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
12 # any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under
25 # the same distribution terms that you use for the rest of that program.
26
27 # This file is maintained in Automake, please report
28 # bugs to <bug-automake@gnu.org> or send patches to
29 # <automake-patches@gnu.org>.
30
31
32 # func_error message
33 func_error ()
34 {
35 echo "$me: $1" 1>&2
36 exit 1
37 }
38
39 file_conv=
40
41 # func_file_conv build_file
42 # Convert a $build file to $host form and store it in $file
43 # Currently only supports Windows hosts.
44 func_file_conv ()
45 {
46 file=$1
47 case $file in
48 / | /[!/]*) # absolute file, and not a UNC file
49 if test -z "$file_conv"; then
50 # lazily determine how to convert abs files
51 case `uname -s` in
52 MINGW*)
53 file_conv=mingw
54 ;;
55 CYGWIN*)
56 file_conv=cygwin
57 ;;
58 *)
59 file_conv=wine
60 ;;
61 esac
62 fi
63 case $file_conv in
64 mingw)
65 file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
66 ;;
67 cygwin)
68 file=`cygpath -m "$file" || echo "$file"`
69 ;;
70 wine)
71 file=`winepath -w "$file" || echo "$file"`
72 ;;
73 esac
74 ;;
75 esac
76 }
77
78 # func_at_file at_file operation archive
79 # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
80 # for each of them.
81 # When interpreting the content of the @FILE, do NOT use func_file_conv,
82 # since the user would need to supply preconverted file names to
83 # binutils ar, at least for MinGW.
84 func_at_file ()
85 {
86 operation=$2
87 archive=$3
88 at_file_contents=`cat "$1"`
89 eval set x "$at_file_contents"
90 shift
91
92 for member
93 do
94 $AR -NOLOGO $operation:"$member" "$archive" || exit $?
95 done
96 }
97
98 case $1 in
99 '')
100 func_error "no command. Try '$0 --help' for more information."
101 ;;
102 -h | --h*)
103 cat <<EOF
104 Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
105
106 Members may be specified in a file named with @FILE.
107 EOF
108 exit $?
109 ;;
110 -v | --v*)
111 echo "$me, version $scriptversion"
112 exit $?
113 ;;
114 esac
115
116 if test $# -lt 3; then
117 func_error "you must specify a program, an action and an archive"
118 fi
119
120 AR=$1
121 shift
122 while :
123 do
124 if test $# -lt 2; then
125 func_error "you must specify a program, an action and an archive"
126 fi
127 case $1 in
128 -lib | -LIB \
129 | -ltcg | -LTCG \
130 | -machine* | -MACHINE* \
131 | -subsystem* | -SUBSYSTEM* \
132 | -verbose | -VERBOSE \
133 | -wx* | -WX* )
134 AR="$AR $1"
135 shift
136 ;;
137 *)
138 action=$1
139 shift
140 break
141 ;;
142 esac
143 done
144 orig_archive=$1
145 shift
146 func_file_conv "$orig_archive"
147 archive=$file
148
149 # strip leading dash in $action
150 action=${action#-}
151
152 delete=
153 extract=
154 list=
155 quick=
156 replace=
157 index=
158 create=
159
160 while test -n "$action"
161 do
162 case $action in
163 d*) delete=yes ;;
164 x*) extract=yes ;;
165 t*) list=yes ;;
166 q*) quick=yes ;;
167 r*) replace=yes ;;
168 s*) index=yes ;;
169 S*) ;; # the index is always updated implicitly
170 c*) create=yes ;;
171 u*) ;; # TODO: don't ignore the update modifier
172 v*) ;; # TODO: don't ignore the verbose modifier
173 *)
174 func_error "unknown action specified"
175 ;;
176 esac
177 action=${action#?}
178 done
179
180 case $delete$extract$list$quick$replace,$index in
181 yes,* | ,yes)
182 ;;
183 yesyes*)
184 func_error "more than one action specified"
185 ;;
186 *)
187 func_error "no action specified"
188 ;;
189 esac
190
191 if test -n "$delete"; then
192 if test ! -f "$orig_archive"; then
193 func_error "archive not found"
194 fi
195 for member
196 do
197 case $1 in
198 @*)
199 func_at_file "${1#@}" -REMOVE "$archive"
200 ;;
201 *)
202 func_file_conv "$1"
203 $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
204 ;;
205 esac
206 done
207
208 elif test -n "$extract"; then
209 if test ! -f "$orig_archive"; then
210 func_error "archive not found"
211 fi
212 if test $# -gt 0; then
213 for member
214 do
215 case $1 in
216 @*)
217 func_at_file "${1#@}" -EXTRACT "$archive"
218 ;;
219 *)
220 func_file_conv "$1"
221 $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
222 ;;
223 esac
224 done
225 else
226 $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
227 do
228 $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
229 done
230 fi
231
232 elif test -n "$quick$replace"; then
233 if test ! -f "$orig_archive"; then
234 if test -z "$create"; then
235 echo "$me: creating $orig_archive"
236 fi
237 orig_archive=
238 else
239 orig_archive=$archive
240 fi
241
242 for member
243 do
244 case $1 in
245 @*)
246 func_file_conv "${1#@}"
247 set x "$@" "@$file"
248 ;;
249 *)
250 func_file_conv "$1"
251 set x "$@" "$file"
252 ;;
253 esac
254 shift
255 shift
256 done
257
258 if test -n "$orig_archive"; then
259 $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
260 else
261 $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
262 fi
263
264 elif test -n "$list"; then
265 if test ! -f "$orig_archive"; then
266 func_error "archive not found"
267 fi
268 $AR -NOLOGO -LIST "$archive" || exit $?
269 fi
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: audio.c,v 1.36 2004/01/23 09:41:31 rob Exp $
19 */
20
21 # ifdef HAVE_CONFIG_H
22 # include "config.h"
23 # endif
24
25 # include "global.h"
26
27 # include <string.h>
28 # include <stdio.h>
29 # include <mad.h>
30
31 # include "audio.h"
32
33 char const *audio_error;
34
35 static struct audio_dither left_dither, right_dither;
36
37 # if defined(_MSC_VER)
38 # pragma warning(disable: 4550) /* expression evaluates to a function which
39 is missing an argument list */
40 # endif
41
42 /*
43 * NAME: audio_output()
44 * DESCRIPTION: choose an audio output module from a specifier pathname
45 */
46 audio_ctlfunc_t *audio_output (char const **path)
47 {
48 char const *ext;
49 unsigned int i;
50
51 struct map
52 {
53 char const *name;
54 audio_ctlfunc_t *module;
55 };
56
57 struct map const prefixes[] =
58 {
59 { "cdda", audio_cdda },
60 { "wave", audio_wave },
61 { "wav", audio_wave }
62 };
63
64 struct map const extensions[] =
65 {
66 { "cdr", audio_cdda },
67 { "cda", audio_cdda },
68 { "cdda", audio_cdda },
69 { "wav", audio_wave }
70 };
71
72 /* check for prefix specifier */
73
74 ext = strchr(*path, ':');
75 if (ext) {
76 char const *type;
77
78 type = *path;
79 *path = ext + 1;
80
81 for (i = 0; i < sizeof (prefixes) / sizeof (prefixes[0]); ++i)
82 {
83 if (strncasecmp (type, prefixes[i].name, ext - type) == 0 &&
84 strlen (prefixes[i].name) == (size_t) (ext - type))
85 return prefixes[i].module;
86 }
87
88 *path = type;
89 return 0;
90 }
91
92 /* check for file extension specifier */
93
94 ext = strrchr(*path, '.');
95 if (ext)
96 {
97 ++ext;
98
99 for (i = 0; i < sizeof(extensions) / sizeof(extensions[0]); ++i)
100 {
101 if (strcasecmp(ext, extensions[i].name) == 0)
102 return extensions[i].module;
103 } // for
104 } // if
105
106 return 0;
107 }
108
109 /*
110 * NAME: audio_control_init()
111 * DESCRIPTION: initialize an audio control structure
112 */
113 void audio_control_init (union audio_control *control,
114 enum audio_command command)
115 {
116 switch (control->command = command)
117 {
118 case AUDIO_COMMAND_INIT:
119 control->init.path = 0;
120 break;
121
122 case AUDIO_COMMAND_CONFIG:
123 control->config.channels = 0;
124 control->config.speed = 0;
125 control->config.precision = 0;
126 break;
127
128 case AUDIO_COMMAND_PLAY:
129 control->play.nsamples = 0;
130 control->play.samples[0] = 0;
131 control->play.samples[1] = 0;
132 control->play.mode = AUDIO_MODE_DITHER;
133 control->play.stats = 0;
134 break;
135
136 case AUDIO_COMMAND_FINISH:
137 break;
138 } // switch
139 } // audio_control_init
140
141 /*
142 * NAME: clip()
143 * DESCRIPTION: gather signal statistics while clipping
144 */
145 static inline
146 void clip(mad_fixed_t *sample, struct audio_stats *stats)
147 {
148 enum {
149 MIN = -MAD_F_ONE,
150 MAX = MAD_F_ONE - 1
151 };
152
153 if (*sample >= stats->peak_sample) {
154 if (*sample > MAX) {
155 ++stats->clipped_samples;
156 if (*sample - MAX > stats->peak_clipping)
157 stats->peak_clipping = *sample - MAX;
158
159 *sample = MAX;
160 }
161 stats->peak_sample = *sample;
162 }
163 else if (*sample < -stats->peak_sample) {
164 if (*sample < MIN) {
165 ++stats->clipped_samples;
166 if (MIN - *sample > stats->peak_clipping)
167 stats->peak_clipping = MIN - *sample;
168
169 *sample = MIN;
170 }
171 stats->peak_sample = -*sample;
172 }
173 }
174
175 /*
176 * NAME: audio_linear_round()
177 * DESCRIPTION: generic linear sample quantize routine
178 */
179 # if defined(_MSC_VER)
180 extern /* needed to satisfy bizarre MSVC++ interaction with inline */
181 # endif
182 inline
183 signed long audio_linear_round(unsigned int bits, mad_fixed_t sample,
184 struct audio_stats *stats)
185 {
186 /* round */
187 sample += (1L << (MAD_F_FRACBITS - bits));
188
189 /* clip */
190 clip(&sample, stats);
191
192 /* quantize and scale */
193 return sample >> (MAD_F_FRACBITS + 1 - bits);
194 }
195
196 /*
197 * NAME: prng()
198 * DESCRIPTION: 32-bit pseudo-random number generator
199 */
200 static inline
201 unsigned long prng(unsigned long state)
202 {
203 return (state * 0x0019660dL + 0x3c6ef35fL) & 0xffffffffL;
204 }
205
206 /*
207 * NAME: audio_linear_dither()
208 * DESCRIPTION: generic linear sample quantize and dither routine
209 */
210 # if defined(_MSC_VER)
211 extern /* needed to satisfy bizarre MSVC++ interaction with inline */
212 # endif
213 inline
214 signed long audio_linear_dither(unsigned int bits, mad_fixed_t sample,
215 struct audio_dither *dither,
216 struct audio_stats *stats)
217 {
218 unsigned int scalebits;
219 mad_fixed_t output, mask, random;
220
221 enum {
222 MIN = -MAD_F_ONE,
223 MAX = MAD_F_ONE - 1
224 };
225
226 /* noise shape */
227 sample += dither->error[0] - dither->error[1] + dither->error[2];
228
229 dither->error[2] = dither->error[1];
230 dither->error[1] = dither->error[0] / 2;
231
232 /* bias */
233 output = sample + (1L << (MAD_F_FRACBITS + 1 - bits - 1));
234
235 scalebits = MAD_F_FRACBITS + 1 - bits;
236 mask = (1L << scalebits) - 1;
237
238 /* dither */
239 random = prng(dither->random);
240 output += (random & mask) - (dither->random & mask);
241
242 dither->random = random;
243
244 /* clip */
245 if (output >= stats->peak_sample) {
246 if (output > MAX) {
247 ++stats->clipped_samples;
248 if (output - MAX > stats->peak_clipping)
249 stats->peak_clipping = output - MAX;
250
251 output = MAX;
252
253 if (sample > MAX)
254 sample = MAX;
255 }
256 stats->peak_sample = output;
257 }
258 else if (output < -stats->peak_sample) {
259 if (output < MIN) {
260 ++stats->clipped_samples;
261 if (MIN - output > stats->peak_clipping)
262 stats->peak_clipping = MIN - output;
263
264 output = MIN;
265
266 if (sample < MIN)
267 sample = MIN;
268 }
269 stats->peak_sample = -output;
270 }
271
272 /* quantize */
273 output &= ~mask;
274
275 /* error feedback */
276 dither->error[0] = sample - output;
277
278 /* scale */
279 return output >> scalebits;
280 }
281
282 /*
283 * NAME: audio_pcm_u8()
284 * DESCRIPTION: write a block of unsigned 8-bit PCM samples
285 */
286 unsigned int audio_pcm_u8(unsigned char *data, unsigned int nsamples,
287 mad_fixed_t const *left, mad_fixed_t const *right,
288 enum audio_mode mode, struct audio_stats *stats)
289 {
290 unsigned int len;
291
292 len = nsamples;
293
294 if (right) { /* stereo */
295 switch (mode) {
296 case AUDIO_MODE_ROUND:
297 while (len--) {
298 data[0] = audio_linear_round(8, *left++, stats) ^ 0x80;
299 data[1] = audio_linear_round(8, *right++, stats) ^ 0x80;
300
301 data += 2;
302 }
303 break;
304
305 case AUDIO_MODE_DITHER:
306 while (len--) {
307 data[0] = audio_linear_dither(8, *left++,
308 &left_dither, stats) ^ 0x80;
309 data[1] = audio_linear_dither(8, *right++,
310 &right_dither, stats) ^ 0x80;
311
312 data += 2;
313 }
314 break;
315
316 default:
317 return 0;
318 }
319
320 return nsamples * 2;
321 }
322 else { /* mono */
323 switch (mode) {
324 case AUDIO_MODE_ROUND:
325 while (len--)
326 *data++ = audio_linear_round(8, *left++, stats) ^ 0x80;
327 break;
328
329 case AUDIO_MODE_DITHER:
330 while (len--)
331 *data++ = audio_linear_dither(8, *left++, &left_dither, stats) ^ 0x80;
332 break;
333
334 default:
335 return 0;
336 }
337
338 return nsamples;
339 }
340 }
341
342 /*
343 * NAME: audio_pcm_s8()
344 * DESCRIPTION: write a block of signed 8-bit PCM samples
345 */
346 unsigned int audio_pcm_s8(unsigned char *data, unsigned int nsamples,
347 mad_fixed_t const *left, mad_fixed_t const *right,
348 enum audio_mode mode, struct audio_stats *stats)
349 {
350 unsigned int len;
351
352 len = nsamples;
353
354 if (right) { /* stereo */
355 switch (mode) {
356 case AUDIO_MODE_ROUND:
357 while (len--) {
358 data[0] = audio_linear_round(8, *left++, stats);
359 data[1] = audio_linear_round(8, *right++, stats);
360
361 data += 2;
362 }
363 break;
364
365 case AUDIO_MODE_DITHER:
366 while (len--) {
367 data[0] = audio_linear_dither(8, *left++,
368 &left_dither, stats);
369 data[1] = audio_linear_dither(8, *right++,
370 &right_dither, stats);
371
372 data += 2;
373 }
374 break;
375
376 default:
377 return 0;
378 }
379
380 return nsamples * 2;
381 }
382 else { /* mono */
383 switch (mode) {
384 case AUDIO_MODE_ROUND:
385 while (len--)
386 *data++ = audio_linear_round(8, *left++, stats);
387 break;
388
389 case AUDIO_MODE_DITHER:
390 while (len--)
391 *data++ = audio_linear_dither(8, *left++, &left_dither, stats);
392 break;
393
394 default:
395 return 0;
396 }
397
398 return nsamples;
399 }
400 }
401
402 /*
403 * NAME: audio_pcm_s16le()
404 * DESCRIPTION: write a block of signed 16-bit little-endian PCM samples
405 */
406 unsigned int audio_pcm_s16le(unsigned char *data, unsigned int nsamples,
407 mad_fixed_t const *left, mad_fixed_t const *right,
408 enum audio_mode mode, struct audio_stats *stats)
409 {
410 unsigned int len;
411 register signed int sample0, sample1;
412
413 len = nsamples;
414
415 if (right) { /* stereo */
416 switch (mode) {
417 case AUDIO_MODE_ROUND:
418 while (len--) {
419 sample0 = audio_linear_round(16, *left++, stats);
420 sample1 = audio_linear_round(16, *right++, stats);
421
422 data[0] = sample0 >> 0;
423 data[1] = sample0 >> 8;
424 data[2] = sample1 >> 0;
425 data[3] = sample1 >> 8;
426
427 data += 4;
428 }
429 break;
430
431 case AUDIO_MODE_DITHER:
432 while (len--) {
433 sample0 = audio_linear_dither(16, *left++, &left_dither, stats);
434 sample1 = audio_linear_dither(16, *right++, &right_dither, stats);
435
436 data[0] = sample0 >> 0;
437 data[1] = sample0 >> 8;
438 data[2] = sample1 >> 0;
439 data[3] = sample1 >> 8;
440
441 data += 4;
442 }
443 break;
444
445 default:
446 return 0;
447 }
448
449 return nsamples * 2 * 2;
450 }
451 else { /* mono */
452 switch (mode) {
453 case AUDIO_MODE_ROUND:
454 while (len--) {
455 sample0 = audio_linear_round(16, *left++, stats);
456
457 data[0] = sample0 >> 0;
458 data[1] = sample0 >> 8;
459
460 data += 2;
461 }
462 break;
463
464 case AUDIO_MODE_DITHER:
465 while (len--) {
466 sample0 = audio_linear_dither(16, *left++, &left_dither, stats);
467
468 data[0] = sample0 >> 0;
469 data[1] = sample0 >> 8;
470
471 data += 2;
472 }
473 break;
474
475 default:
476 return 0;
477 }
478
479 return nsamples * 2;
480 }
481 }
482
483 /*
484 * NAME: audio_pcm_s16be()
485 * DESCRIPTION: write a block of signed 16-bit big-endian PCM samples
486 */
487 unsigned int audio_pcm_s16be(unsigned char *data, unsigned int nsamples,
488 mad_fixed_t const *left, mad_fixed_t const *right,
489 enum audio_mode mode, struct audio_stats *stats)
490 {
491 unsigned int len;
492 register signed int sample0, sample1;
493
494 len = nsamples;
495
496 if (right) { /* stereo */
497 switch (mode) {
498 case AUDIO_MODE_ROUND:
499 while (len--) {
500 sample0 = audio_linear_round(16, *left++, stats);
501 sample1 = audio_linear_round(16, *right++, stats);
502
503 data[0] = sample0 >> 8;
504 data[1] = sample0 >> 0;
505 data[2] = sample1 >> 8;
506 data[3] = sample1 >> 0;
507
508 data += 4;
509 }
510 break;
511
512 case AUDIO_MODE_DITHER:
513 while (len--) {
514 sample0 = audio_linear_dither(16, *left++, &left_dither, stats);
515 sample1 = audio_linear_dither(16, *right++, &right_dither, stats);
516
517 data[0] = sample0 >> 8;
518 data[1] = sample0 >> 0;
519 data[2] = sample1 >> 8;
520 data[3] = sample1 >> 0;
521
522 data += 4;
523 }
524 break;
525
526 default:
527 return 0;
528 }
529
530 return nsamples * 2 * 2;
531 }
532 else { /* mono */
533 switch (mode) {
534 case AUDIO_MODE_ROUND:
535 while (len--) {
536 sample0 = audio_linear_round(16, *left++, stats);
537
538 data[0] = sample0 >> 8;
539 data[1] = sample0 >> 0;
540
541 data += 2;
542 }
543 break;
544
545 case AUDIO_MODE_DITHER:
546 while (len--) {
547 sample0 = audio_linear_dither(16, *left++, &left_dither, stats);
548
549 data[0] = sample0 >> 8;
550 data[1] = sample0 >> 0;
551
552 data += 2;
553 }
554 break;
555
556 default:
557 return 0;
558 }
559
560 return nsamples * 2;
561 }
562 }
563
564 /*
565 * NAME: audio_pcm_s24le()
566 * DESCRIPTION: write a block of signed 24-bit little-endian PCM samples
567 */
568 unsigned int audio_pcm_s24le(unsigned char *data, unsigned int nsamples,
569 mad_fixed_t const *left, mad_fixed_t const *right,
570 enum audio_mode mode, struct audio_stats *stats)
571 {
572 unsigned int len;
573 register signed long sample0, sample1;
574
575 len = nsamples;
576
577 if (right) { /* stereo */
578 switch (mode) {
579 case AUDIO_MODE_ROUND:
580 while (len--) {
581 sample0 = audio_linear_round(24, *left++, stats);
582 sample1 = audio_linear_round(24, *right++, stats);
583
584 data[0] = sample0 >> 0;
585 data[1] = sample0 >> 8;
586 data[2] = sample0 >> 16;
587
588 data[3] = sample1 >> 0;
589 data[4] = sample1 >> 8;
590 data[5] = sample1 >> 16;
591
592 data += 6;
593 }
594 break;
595
596 case AUDIO_MODE_DITHER:
597 while (len--) {
598 sample0 = audio_linear_dither(24, *left++, &left_dither, stats);
599 sample1 = audio_linear_dither(24, *right++, &right_dither, stats);
600
601 data[0] = sample0 >> 0;
602 data[1] = sample0 >> 8;
603 data[2] = sample0 >> 16;
604
605 data[3] = sample1 >> 0;
606 data[4] = sample1 >> 8;
607 data[5] = sample1 >> 16;
608
609 data += 6;
610 }
611 break;
612
613 default:
614 return 0;
615 }
616
617 return nsamples * 3 * 2;
618 }
619 else { /* mono */
620 switch (mode) {
621 case AUDIO_MODE_ROUND:
622 while (len--) {
623 sample0 = audio_linear_round(24, *left++, stats);
624
625 data[0] = sample0 >> 0;
626 data[1] = sample0 >> 8;
627 data[2] = sample0 >> 16;
628
629 data += 3;
630 }
631 break;
632
633 case AUDIO_MODE_DITHER:
634 while (len--) {
635 sample0 = audio_linear_dither(24, *left++, &left_dither, stats);
636
637 data[0] = sample0 >> 0;
638 data[1] = sample0 >> 8;
639 data[2] = sample0 >> 16;
640
641 data += 3;
642 }
643 break;
644
645 default:
646 return 0;
647 }
648
649 return nsamples * 3;
650 }
651 }
652
653 /*
654 * NAME: audio_pcm_s24be()
655 * DESCRIPTION: write a block of signed 24-bit big-endian PCM samples
656 */
657 unsigned int audio_pcm_s24be(unsigned char *data, unsigned int nsamples,
658 mad_fixed_t const *left, mad_fixed_t const *right,
659 enum audio_mode mode, struct audio_stats *stats)
660 {
661 unsigned int len;
662 register signed long sample0, sample1;
663
664 len = nsamples;
665
666 if (right) { /* stereo */
667 switch (mode) {
668 case AUDIO_MODE_ROUND:
669 while (len--) {
670 sample0 = audio_linear_round(24, *left++, stats);
671 sample1 = audio_linear_round(24, *right++, stats);
672
673 data[0] = sample0 >> 16;
674 data[1] = sample0 >> 8;
675 data[2] = sample0 >> 0;
676
677 data[3] = sample1 >> 16;
678 data[4] = sample1 >> 8;
679 data[5] = sample1 >> 0;
680
681 data += 6;
682 }
683 break;
684
685 case AUDIO_MODE_DITHER:
686 while (len--) {
687 sample0 = audio_linear_dither(24, *left++, &left_dither, stats);
688 sample1 = audio_linear_dither(24, *right++, &right_dither, stats);
689
690 data[0] = sample0 >> 16;
691 data[1] = sample0 >> 8;
692 data[2] = sample0 >> 0;
693
694 data[3] = sample1 >> 16;
695 data[4] = sample1 >> 8;
696 data[5] = sample1 >> 0;
697
698 data += 6;
699 }
700 break;
701
702 default:
703 return 0;
704 }
705
706 return nsamples * 3 * 2;
707 }
708 else { /* mono */
709 switch (mode) {
710 case AUDIO_MODE_ROUND:
711 while (len--) {
712 sample0 = audio_linear_round(24, *left++, stats);
713
714 data[0] = sample0 >> 16;
715 data[1] = sample0 >> 8;
716 data[2] = sample0 >> 0;
717
718 data += 3;
719 }
720 break;
721
722 case AUDIO_MODE_DITHER:
723 while (len--) {
724 sample1 = audio_linear_dither(24, *left++, &left_dither, stats);
725
726 data[0] = sample1 >> 16;
727 data[1] = sample1 >> 8;
728 data[2] = sample1 >> 0;
729
730 data += 3;
731 }
732 break;
733
734 default:
735 return 0;
736 }
737
738 return nsamples * 3;
739 }
740 }
741
742 /*
743 * NAME: audio_pcm_s32le()
744 * DESCRIPTION: write a block of signed 32-bit little-endian PCM samples
745 */
746 unsigned int audio_pcm_s32le(unsigned char *data, unsigned int nsamples,
747 mad_fixed_t const *left, mad_fixed_t const *right,
748 enum audio_mode mode, struct audio_stats *stats)
749 {
750 unsigned int len;
751 register signed long sample0, sample1;
752
753 len = nsamples;
754
755 if (right) { /* stereo */
756 switch (mode) {
757 case AUDIO_MODE_ROUND:
758 while (len--) {
759 sample0 = audio_linear_round(24, *left++, stats);
760 sample1 = audio_linear_round(24, *right++, stats);
761
762 data[0] = 0;
763 data[1] = sample0 >> 0;
764 data[2] = sample0 >> 8;
765 data[3] = sample0 >> 16;
766
767 data[4] = 0;
768 data[5] = sample1 >> 0;
769 data[6] = sample1 >> 8;
770 data[7] = sample1 >> 16;
771
772 data += 8;
773 }
774 break;
775
776 case AUDIO_MODE_DITHER:
777 while (len--) {
778 sample0 = audio_linear_dither(24, *left++, &left_dither, stats);
779 sample1 = audio_linear_dither(24, *right++, &right_dither, stats);
780
781 data[0] = 0;
782 data[1] = sample0 >> 0;
783 data[2] = sample0 >> 8;
784 data[3] = sample0 >> 16;
785
786 data[4] = 0;
787 data[5] = sample1 >> 0;
788 data[6] = sample1 >> 8;
789 data[7] = sample1 >> 16;
790
791 data += 8;
792 }
793 break;
794
795 default:
796 return 0;
797 }
798
799 return nsamples * 4 * 2;
800 }
801 else { /* mono */
802 switch (mode) {
803 case AUDIO_MODE_ROUND:
804 while (len--) {
805 sample0 = audio_linear_round(24, *left++, stats);
806
807 data[0] = 0;
808 data[1] = sample0 >> 0;
809 data[2] = sample0 >> 8;
810 data[3] = sample0 >> 16;
811
812 data += 4;
813 }
814 break;
815
816 case AUDIO_MODE_DITHER:
817 while (len--) {
818 sample0 = audio_linear_dither(24, *left++, &left_dither, stats);
819
820 data[0] = 0;
821 data[1] = sample0 >> 0;
822 data[2] = sample0 >> 8;
823 data[3] = sample0 >> 16;
824
825 data += 4;
826 }
827 break;
828
829 default:
830 return 0;
831 }
832
833 return nsamples * 4;
834 }
835 }
836
837 /*
838 * NAME: audio_pcm_s32be()
839 * DESCRIPTION: write a block of signed 32-bit big-endian PCM samples
840 */
841 unsigned int audio_pcm_s32be(unsigned char *data, unsigned int nsamples,
842 mad_fixed_t const *left, mad_fixed_t const *right,
843 enum audio_mode mode, struct audio_stats *stats)
844 {
845 unsigned int len;
846 register signed long sample0, sample1;
847
848 len = nsamples;
849
850 if (right) { /* stereo */
851 switch (mode) {
852 case AUDIO_MODE_ROUND:
853 while (len--) {
854 sample0 = audio_linear_round(24, *left++, stats);
855 sample1 = audio_linear_round(24, *right++, stats);
856
857 data[0] = sample0 >> 16;
858 data[1] = sample0 >> 8;
859 data[2] = sample0 >> 0;
860 data[3] = 0;
861
862 data[4] = sample1 >> 16;
863 data[5] = sample1 >> 8;
864 data[6] = sample1 >> 0;
865 data[7] = 0;
866
867 data += 8;
868 }
869 break;
870
871 case AUDIO_MODE_DITHER:
872 while (len--) {
873 sample0 = audio_linear_dither(24, *left++, &left_dither, stats);
874 sample1 = audio_linear_dither(24, *right++, &right_dither, stats);
875
876 data[0] = sample0 >> 16;
877 data[1] = sample0 >> 8;
878 data[2] = sample0 >> 0;
879 data[3] = 0;
880
881 data[4] = sample1 >> 16;
882 data[5] = sample1 >> 8;
883 data[6] = sample1 >> 0;
884 data[7] = 0;
885
886 data += 8;
887 }
888 break;
889
890 default:
891 return 0;
892 }
893
894 return nsamples * 4 * 2;
895 }
896 else { /* mono */
897 switch (mode) {
898 case AUDIO_MODE_ROUND:
899 while (len--) {
900 sample0 = audio_linear_round(24, *left++, stats);
901
902 data[0] = sample0 >> 16;
903 data[1] = sample0 >> 8;
904 data[2] = sample0 >> 0;
905 data[3] = 0;
906
907 data += 4;
908 }
909 break;
910
911 case AUDIO_MODE_DITHER:
912 while (len--) {
913 sample0 = audio_linear_dither(24, *left++, &left_dither, stats);
914
915 data[0] = sample0 >> 16;
916 data[1] = sample0 >> 8;
917 data[2] = sample0 >> 0;
918 data[3] = 0;
919
920 data += 4;
921 }
922 break;
923
924 default:
925 return 0;
926 }
927
928 return nsamples * 4;
929 }
930 }
931
932 static
933 unsigned char linear2mulaw(mad_fixed_t sample)
934 {
935 unsigned int sign, mulaw;
936
937 enum {
938 BIAS = (mad_fixed_t) ((0x10 << 1) + 1) << (MAD_F_FRACBITS - 13)
939 };
940
941 if (sample < 0) {
942 sample = BIAS - sample;
943 sign = 0x7f;
944 }
945 else {
946 sample = BIAS + sample;
947 sign = 0xff;
948 }
949
950 mulaw = 0x7f;
951 if (sample < MAD_F_ONE) {
952 unsigned int segment;
953 unsigned long mask;
954
955 segment = 7;
956 for (mask = 1L << (MAD_F_FRACBITS - 1); !(sample & mask); mask >>= 1)
957 --segment;
958
959 mulaw = ((segment << 4) |
960 ((sample >> (MAD_F_FRACBITS - 1 - (7 - segment) - 4)) & 0x0f));
961 }
962
963 mulaw ^= sign;
964
965 # if 0
966 if (mulaw == 0x00)
967 mulaw = 0x02;
968 # endif
969
970 return mulaw;
971 }
972
973 static
974 mad_fixed_t mulaw2linear(unsigned char mulaw)
975 {
976 int sign, segment, mantissa, value;
977
978 enum {
979 BIAS = (0x10 << 1) + 1
980 };
981
982 mulaw = ~mulaw;
983 sign = (mulaw >> 7) & 0x01;
984 segment = (mulaw >> 4) & 0x07;
985 mantissa = (mulaw >> 0) & 0x0f;
986
987 value = ((0x21 | (mantissa << 1)) << segment) - BIAS;
988 if (sign)
989 value = -value;
990
991 return (mad_fixed_t) value << (MAD_F_FRACBITS - 13);
992 }
993
994 /*
995 * NAME: audio_mulaw_round()
996 * DESCRIPTION: convert a linear PCM value to 8-bit ISDN mu-law
997 */
998 inline
999 unsigned char audio_mulaw_round(mad_fixed_t sample, struct audio_stats *stats)
1000 {
1001 clip(&sample, stats);
1002
1003 return linear2mulaw(sample);
1004 }
1005
1006 /*
1007 * NAME: audio_mulaw_dither()
1008 * DESCRIPTION: convert a linear PCM value to dithered 8-bit ISDN mu-law
1009 */
1010 inline
1011 unsigned char audio_mulaw_dither(mad_fixed_t sample,
1012 struct audio_dither *dither,
1013 struct audio_stats *stats)
1014 {
1015 unsigned char mulaw;
1016
1017 /* noise shape */
1018 sample += dither->error[0];
1019
1020 clip(&sample, stats);
1021
1022 mulaw = linear2mulaw(sample);
1023
1024 /* error feedback */
1025 dither->error[0] = sample - mulaw2linear(mulaw);
1026
1027 return mulaw;
1028 }
1029
1030 /*
1031 * NAME: audio_pcm_mulaw()
1032 * DESCRIPTION: write a block of 8-bit mu-law encoded samples
1033 */
1034 unsigned int audio_pcm_mulaw(unsigned char *data, unsigned int nsamples,
1035 mad_fixed_t const *left, mad_fixed_t const *right,
1036 enum audio_mode mode, struct audio_stats *stats)
1037 {
1038 unsigned int len;
1039
1040 len = nsamples;
1041
1042 if (right) { /* stereo */
1043 switch (mode) {
1044 case AUDIO_MODE_ROUND:
1045 while (len--) {
1046 data[0] = audio_mulaw_round(*left++, stats);
1047 data[1] = audio_mulaw_round(*right++, stats);
1048
1049 data += 2;
1050 }
1051 break;
1052
1053 case AUDIO_MODE_DITHER:
1054 while (len--) {
1055 data[0] = audio_mulaw_dither(*left++, &left_dither, stats);
1056 data[1] = audio_mulaw_dither(*right++, &right_dither, stats);
1057
1058 data += 2;
1059 }
1060 break;
1061
1062 default:
1063 return 0;
1064 }
1065
1066 return nsamples * 2;
1067 }
1068 else { /* mono */
1069 switch (mode) {
1070 case AUDIO_MODE_ROUND:
1071 while (len--)
1072 *data++ = audio_mulaw_round(*left++, stats);
1073 break;
1074
1075 case AUDIO_MODE_DITHER:
1076 while (len--)
1077 *data++ = audio_mulaw_dither(*left++, &left_dither, stats);
1078 break;
1079
1080 default:
1081 return 0;
1082 }
1083
1084 return nsamples;
1085 }
1086 }
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: audio.h,v 1.38 2004/01/23 09:41:31 rob Exp $
19 */
20
21 # ifndef AUDIO_H
22 # define AUDIO_H
23
24 # include <mad.h>
25
26 # define MAX_RESAMPLEFACTOR 6
27 # define MAX_NSAMPLES (1152 * MAX_RESAMPLEFACTOR)
28
29 enum audio_command {
30 AUDIO_COMMAND_INIT,
31 AUDIO_COMMAND_CONFIG,
32 AUDIO_COMMAND_PLAY,
33 AUDIO_COMMAND_FINISH
34 };
35
36 enum audio_mode {
37 AUDIO_MODE_ROUND,
38 AUDIO_MODE_DITHER
39 };
40
41 struct audio_stats {
42 unsigned long clipped_samples;
43 mad_fixed_t peak_clipping;
44 mad_fixed_t peak_sample;
45 };
46
47 union audio_control
48 {
49 enum audio_command command;
50
51 struct audio_init
52 {
53 enum audio_command command;
54 char const *path;
55 } init;
56
57 struct audio_config
58 {
59 enum audio_command command;
60 unsigned int channels;
61 unsigned int speed;
62 unsigned int precision;
63 } config;
64
65 struct audio_play
66 {
67 enum audio_command command;
68 unsigned int nsamples;
69 mad_fixed_t const *samples[2];
70 enum audio_mode mode;
71 struct audio_stats *stats;
72 } play;
73
74 struct audio_stop
75 {
76 enum audio_command command;
77 int flush;
78 } stop;
79
80 struct audio_finish
81 {
82 enum audio_command command;
83 } finish;
84 };
85
86 struct audio_dither
87 {
88 mad_fixed_t error[3];
89 mad_fixed_t random;
90 };
91
92 extern char const *audio_error;
93
94 typedef int audio_ctlfunc_t(union audio_control *);
95
96 audio_ctlfunc_t *audio_output(char const **);
97
98 audio_ctlfunc_t audio_win32;
99
100 audio_ctlfunc_t audio_null;
101 audio_ctlfunc_t audio_cdda;
102 audio_ctlfunc_t audio_wave;
103
104 void audio_control_init(union audio_control *, enum audio_command);
105
106 signed long audio_linear_round(unsigned int, mad_fixed_t,
107 struct audio_stats *);
108 signed long audio_linear_dither(unsigned int, mad_fixed_t,
109 struct audio_dither *, struct audio_stats *);
110
111 unsigned char audio_mulaw_round(mad_fixed_t, struct audio_stats *);
112 unsigned char audio_mulaw_dither(mad_fixed_t, struct audio_dither *,
113 struct audio_stats *);
114
115 typedef unsigned int audio_pcmfunc_t(unsigned char *, unsigned int,
116 mad_fixed_t const *, mad_fixed_t const *,
117 enum audio_mode, struct audio_stats *);
118
119 audio_pcmfunc_t audio_pcm_u8;
120
121 audio_pcmfunc_t audio_pcm_s8;
122 audio_pcmfunc_t audio_pcm_s16le;
123 audio_pcmfunc_t audio_pcm_s16be;
124 audio_pcmfunc_t audio_pcm_s24le;
125 audio_pcmfunc_t audio_pcm_s24be;
126 audio_pcmfunc_t audio_pcm_s32le;
127 audio_pcmfunc_t audio_pcm_s32be;
128
129 audio_pcmfunc_t audio_pcm_mulaw;
130
131 # endif
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: audio_cdda.c,v 1.9 2004/01/23 09:41:31 rob Exp $
19 */
20
21 # ifdef HAVE_CONFIG_H
22 # include "config.h"
23 # endif
24
25 # include "global.h"
26
27 # include <stdio.h>
28 # include <string.h>
29
30 # include <mad.h>
31
32 # include "audio.h"
33
34 static FILE *outfile;
35 unsigned int samplecount;
36
37 # define CD_FRAMESZ (44100 / 75)
38
39 static
40 int init(struct audio_init *init)
41 {
42 if (init->path && strcmp(init->path, "-") != 0) {
43 outfile = fopen(init->path, "wb");
44 if (outfile == 0) {
45 audio_error = ":";
46 return -1;
47 }
48 }
49 else
50 outfile = stdout;
51
52 samplecount = 0;
53
54 return 0;
55 }
56
57 static
58 int config(struct audio_config *config)
59 {
60 /* force 16-bit 44100 Hz stereo */
61
62 config->channels = 2;
63 config->speed = 44100;
64 config->precision = 16;
65
66 return 0;
67 }
68
69 static
70 int output(unsigned char const *data, unsigned int nsamples)
71 {
72 unsigned int count;
73 int result = 0;
74
75 count = fwrite(data, 2 * 2, nsamples, outfile);
76
77 if (count != nsamples) {
78 audio_error = ":fwrite";
79 result = -1;
80 }
81
82 samplecount = (samplecount + count) % CD_FRAMESZ;
83
84 return result;
85 }
86
87 static
88 int play(struct audio_play *play)
89 {
90 unsigned char data[MAX_NSAMPLES * 2 * 2];
91
92 audio_pcm_s16be(data, play->nsamples, play->samples[0], play->samples[1],
93 play->mode, play->stats);
94
95 return output(data, play->nsamples);
96 }
97
98 static
99 int finish ()
100 {
101 int result = 0;
102
103 /* pad audio to CD frame boundary */
104
105 if (samplecount) {
106 unsigned char padding[CD_FRAMESZ * 2 * 2];
107 unsigned int padsz;
108
109 padsz = CD_FRAMESZ - samplecount;
110
111 memset(padding, 0, padsz * 2 * 2);
112
113 result = output(padding, padsz);
114 }
115
116 if (outfile != stdout &&
117 fclose(outfile) == EOF &&
118 result == 0) {
119 audio_error = ":fclose";
120 result = -1;
121 }
122
123 return result;
124 }
125
126 int audio_cdda (union audio_control *control)
127 {
128 audio_error = 0;
129
130 switch (control->command) {
131 case AUDIO_COMMAND_INIT:
132 return init(&control->init);
133
134 case AUDIO_COMMAND_CONFIG:
135 return config(&control->config);
136
137 case AUDIO_COMMAND_PLAY:
138 return play(&control->play);
139
140 case AUDIO_COMMAND_FINISH:
141 return finish(&control->finish);
142 }
143
144 return 0;
145 }
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: audio_wave.c,v 1.18 2004/01/23 09:41:31 rob Exp $
19 */
20
21 # ifdef HAVE_CONFIG_H
22 # include "config.h"
23 # endif
24
25 # include "global.h"
26
27 # include <stdio.h>
28 # include <string.h>
29 # include <mad.h>
30
31 # include "audio.h"
32
33 static FILE *outfile;
34 static audio_pcmfunc_t *audio_pcm;
35
36 static unsigned long riff_len, data_len;
37 static long data_chunk;
38
39 static unsigned int config_channels;
40 static unsigned int config_speed;
41 static unsigned int config_precision;
42
43 # define WAVE_FORMAT_PCM 0x0001
44 # define UNKNOWN_LENGTH "\xff\xff\xff\xff"
45
46 static
47 int init(struct audio_init *init)
48 {
49 if (init->path && strcmp(init->path, "-") != 0) {
50 outfile = fopen(init->path, "wb");
51 if (outfile == 0) {
52 audio_error = ":";
53 return -1;
54 }
55 }
56 else
57 outfile = stdout;
58
59 /* RIFF header and (WAVE) data type identifier */
60
61 if (fwrite("RIFF" UNKNOWN_LENGTH "WAVE", 4 + 4 + 4, 1, outfile) != 1) {
62 audio_error = ":fwrite";
63 return -1;
64 }
65
66 riff_len = 4;
67 data_chunk = -1;
68
69 config_channels = 0;
70 config_speed = 0;
71 config_precision = 0;
72
73 return 0;
74 }
75
76 /*
77 * NAME: int32()
78 * DESCRIPTION: store 32-bit little-endian integer
79 */
80 static
81 void int32(unsigned char *ptr, unsigned long num)
82 {
83 ptr[0] = num >> 0;
84 ptr[1] = num >> 8;
85 ptr[2] = num >> 16;
86 ptr[3] = num >> 24;
87 }
88
89 /*
90 * NAME: int16()
91 * DESCRIPTION: store 16-bit little-endian integer
92 */
93 static
94 void int16(unsigned char *ptr, unsigned int num)
95 {
96 ptr[0] = num >> 0;
97 ptr[1] = num >> 8;
98 }
99
100 static
101 int config(struct audio_config *config)
102 {
103 unsigned char chunk[8 + 16];
104 unsigned int block_al, bitdepth;
105 unsigned long bytes_ps;
106
107 if (config_precision) {
108 /* it's not possible to change the format once set */
109
110 config->channels = config_channels;
111 config->speed = config_speed;
112 config->precision = config_precision;
113
114 return 0;
115 }
116
117 bitdepth = config->precision;
118 if (bitdepth == 0)
119 bitdepth = 16;
120 else if (bitdepth > 32)
121 bitdepth = 32;
122
123 /* Format chunk */
124
125 block_al = config->channels * ((bitdepth + 7) / 8);
126 bytes_ps = config->speed * block_al;
127
128 memcpy(&chunk[0], "fmt ", 4); /* chunkID */
129 int32(&chunk[4], 16); /* chunkSize */
130
131 int16(&chunk[8], WAVE_FORMAT_PCM); /* wFormatTag */
132 int16(&chunk[10], config->channels); /* wChannels */
133 int32(&chunk[12], config->speed); /* dwSamplesPerSec */
134 int32(&chunk[16], bytes_ps); /* dwAvgBytesPerSec */
135 int16(&chunk[20], block_al); /* wBlockAlign */
136
137 /* PCM-format-specific */
138
139 int16(&chunk[22], bitdepth); /* wBitsPerSample */
140
141 if (fwrite(chunk, 8 + 16, 1, outfile) != 1) {
142 audio_error = ":fwrite";
143 return -1;
144 }
145
146 riff_len += 8 + 16;
147
148 /* Data chunk */
149
150 data_chunk = ftell(outfile);
151
152 if (fwrite("data" UNKNOWN_LENGTH, 8 + 0, 1, outfile) != 1) {
153 audio_error = ":fwrite";
154 return -1;
155 }
156
157 riff_len += 8 + 0;
158 data_len = 0;
159
160 switch (config->precision = bitdepth) {
161 case 1: case 2: case 3: case 4:
162 case 5: case 6: case 7: case 8:
163 audio_pcm = audio_pcm_u8;
164 break;
165
166 case 9: case 10: case 11: case 12:
167 case 13: case 14: case 15: case 16:
168 audio_pcm = audio_pcm_s16le;
169 break;
170
171 case 17: case 18: case 19: case 20:
172 case 21: case 22: case 23: case 24:
173 audio_pcm = audio_pcm_s24le;
174 break;
175
176 case 25: case 26: case 27: case 28:
177 case 29: case 30: case 31: case 32:
178 audio_pcm = audio_pcm_s32le;
179 break;
180 }
181
182 config_channels = config->channels;
183 config_speed = config->speed;
184 config_precision = config->precision;
185
186 return 0;
187 }
188
189 static
190 int play(struct audio_play *play)
191 {
192 unsigned char data[MAX_NSAMPLES * 4 * 2];
193 unsigned int len;
194
195 len = audio_pcm(data, play->nsamples, play->samples[0], play->samples[1],
196 play->mode, play->stats);
197
198 if (fwrite(data, len, 1, outfile) != 1) {
199 audio_error = ":fwrite";
200 return -1;
201 }
202
203 data_len += len;
204 riff_len += len;
205
206 return 0;
207 }
208
209 static
210 int patch_int32(long address, unsigned long num)
211 {
212 unsigned char dword[4];
213
214 if (fseek(outfile, address, SEEK_SET) == -1) {
215 audio_error = ":fseek";
216 return -1;
217 }
218
219 int32(dword, num);
220
221 if (fwrite(dword, sizeof(dword), 1, outfile) != 1) {
222 audio_error = ":fwrite";
223 return -1;
224 }
225
226 if (fseek(outfile, 0, SEEK_END) == -1) {
227 audio_error = ":fseek";
228 return -1;
229 }
230
231 return 0;
232 }
233
234 static
235 int finish ()
236 {
237 int result = 0;
238
239 if (config_precision == 0) {
240 struct audio_config dummy;
241
242 /* write empty chunks */
243
244 dummy.command = AUDIO_COMMAND_CONFIG;
245 dummy.channels = 2;
246 dummy.speed = 44100;
247 dummy.precision = 0;
248
249 result = config(&dummy);
250 }
251
252 if (data_len & 1) {
253 if (fputc(0, outfile) == EOF && result == 0) {
254 audio_error = ":fputc";
255 result = -1;
256 }
257
258 ++riff_len;
259 }
260
261 if (result == 0 &&
262 data_chunk != -1 && patch_int32(data_chunk + 4, data_len) == -1)
263 result = -1;
264
265 if (result == 0)
266 patch_int32(4, riff_len);
267
268 if (outfile != stdout &&
269 fclose(outfile) == EOF &&
270 result == 0) {
271 audio_error = ":fclose";
272 result = -1;
273 }
274
275 return result;
276 }
277
278 int audio_wave(union audio_control *control)
279 {
280 audio_error = 0;
281
282 switch (control->command) {
283 case AUDIO_COMMAND_INIT:
284 return init(&control->init);
285
286 case AUDIO_COMMAND_CONFIG:
287 return config(&control->config);
288
289 case AUDIO_COMMAND_PLAY:
290 return play(&control->play);
291
292 case AUDIO_COMMAND_FINISH:
293 return finish(&control->finish);
294 }
295
296 return 0;
297 }
0 #! /bin/sh
1 # Wrapper for compilers which do not understand '-c -o'.
2
3 scriptversion=2012-10-14.11; # UTC
4
5 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
6 # Written by Tom Tromey <tromey@cygnus.com>.
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 # This file is maintained in Automake, please report
27 # bugs to <bug-automake@gnu.org> or send patches to
28 # <automake-patches@gnu.org>.
29
30 nl='
31 '
32
33 # We need space, tab and new line, in precisely that order. Quoting is
34 # there to prevent tools from complaining about whitespace usage.
35 IFS=" "" $nl"
36
37 file_conv=
38
39 # func_file_conv build_file lazy
40 # Convert a $build file to $host form and store it in $file
41 # Currently only supports Windows hosts. If the determined conversion
42 # type is listed in (the comma separated) LAZY, no conversion will
43 # take place.
44 func_file_conv ()
45 {
46 file=$1
47 case $file in
48 / | /[!/]*) # absolute file, and not a UNC file
49 if test -z "$file_conv"; then
50 # lazily determine how to convert abs files
51 case `uname -s` in
52 MINGW*)
53 file_conv=mingw
54 ;;
55 CYGWIN*)
56 file_conv=cygwin
57 ;;
58 *)
59 file_conv=wine
60 ;;
61 esac
62 fi
63 case $file_conv/,$2, in
64 *,$file_conv,*)
65 ;;
66 mingw/*)
67 file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
68 ;;
69 cygwin/*)
70 file=`cygpath -m "$file" || echo "$file"`
71 ;;
72 wine/*)
73 file=`winepath -w "$file" || echo "$file"`
74 ;;
75 esac
76 ;;
77 esac
78 }
79
80 # func_cl_dashL linkdir
81 # Make cl look for libraries in LINKDIR
82 func_cl_dashL ()
83 {
84 func_file_conv "$1"
85 if test -z "$lib_path"; then
86 lib_path=$file
87 else
88 lib_path="$lib_path;$file"
89 fi
90 linker_opts="$linker_opts -LIBPATH:$file"
91 }
92
93 # func_cl_dashl library
94 # Do a library search-path lookup for cl
95 func_cl_dashl ()
96 {
97 lib=$1
98 found=no
99 save_IFS=$IFS
100 IFS=';'
101 for dir in $lib_path $LIB
102 do
103 IFS=$save_IFS
104 if $shared && test -f "$dir/$lib.dll.lib"; then
105 found=yes
106 lib=$dir/$lib.dll.lib
107 break
108 fi
109 if test -f "$dir/$lib.lib"; then
110 found=yes
111 lib=$dir/$lib.lib
112 break
113 fi
114 if test -f "$dir/lib$lib.a"; then
115 found=yes
116 lib=$dir/lib$lib.a
117 break
118 fi
119 done
120 IFS=$save_IFS
121
122 if test "$found" != yes; then
123 lib=$lib.lib
124 fi
125 }
126
127 # func_cl_wrapper cl arg...
128 # Adjust compile command to suit cl
129 func_cl_wrapper ()
130 {
131 # Assume a capable shell
132 lib_path=
133 shared=:
134 linker_opts=
135 for arg
136 do
137 if test -n "$eat"; then
138 eat=
139 else
140 case $1 in
141 -o)
142 # configure might choose to run compile as 'compile cc -o foo foo.c'.
143 eat=1
144 case $2 in
145 *.o | *.[oO][bB][jJ])
146 func_file_conv "$2"
147 set x "$@" -Fo"$file"
148 shift
149 ;;
150 *)
151 func_file_conv "$2"
152 set x "$@" -Fe"$file"
153 shift
154 ;;
155 esac
156 ;;
157 -I)
158 eat=1
159 func_file_conv "$2" mingw
160 set x "$@" -I"$file"
161 shift
162 ;;
163 -I*)
164 func_file_conv "${1#-I}" mingw
165 set x "$@" -I"$file"
166 shift
167 ;;
168 -l)
169 eat=1
170 func_cl_dashl "$2"
171 set x "$@" "$lib"
172 shift
173 ;;
174 -l*)
175 func_cl_dashl "${1#-l}"
176 set x "$@" "$lib"
177 shift
178 ;;
179 -L)
180 eat=1
181 func_cl_dashL "$2"
182 ;;
183 -L*)
184 func_cl_dashL "${1#-L}"
185 ;;
186 -static)
187 shared=false
188 ;;
189 -Wl,*)
190 arg=${1#-Wl,}
191 save_ifs="$IFS"; IFS=','
192 for flag in $arg; do
193 IFS="$save_ifs"
194 linker_opts="$linker_opts $flag"
195 done
196 IFS="$save_ifs"
197 ;;
198 -Xlinker)
199 eat=1
200 linker_opts="$linker_opts $2"
201 ;;
202 -*)
203 set x "$@" "$1"
204 shift
205 ;;
206 *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
207 func_file_conv "$1"
208 set x "$@" -Tp"$file"
209 shift
210 ;;
211 *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
212 func_file_conv "$1" mingw
213 set x "$@" "$file"
214 shift
215 ;;
216 *)
217 set x "$@" "$1"
218 shift
219 ;;
220 esac
221 fi
222 shift
223 done
224 if test -n "$linker_opts"; then
225 linker_opts="-link$linker_opts"
226 fi
227 exec "$@" $linker_opts
228 exit 1
229 }
230
231 eat=
232
233 case $1 in
234 '')
235 echo "$0: No command. Try '$0 --help' for more information." 1>&2
236 exit 1;
237 ;;
238 -h | --h*)
239 cat <<\EOF
240 Usage: compile [--help] [--version] PROGRAM [ARGS]
241
242 Wrapper for compilers which do not understand '-c -o'.
243 Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
244 arguments, and rename the output as expected.
245
246 If you are trying to build a whole package this is not the
247 right script to run: please start by reading the file 'INSTALL'.
248
249 Report bugs to <bug-automake@gnu.org>.
250 EOF
251 exit $?
252 ;;
253 -v | --v*)
254 echo "compile $scriptversion"
255 exit $?
256 ;;
257 cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
258 func_cl_wrapper "$@" # Doesn't return...
259 ;;
260 esac
261
262 ofile=
263 cfile=
264
265 for arg
266 do
267 if test -n "$eat"; then
268 eat=
269 else
270 case $1 in
271 -o)
272 # configure might choose to run compile as 'compile cc -o foo foo.c'.
273 # So we strip '-o arg' only if arg is an object.
274 eat=1
275 case $2 in
276 *.o | *.obj)
277 ofile=$2
278 ;;
279 *)
280 set x "$@" -o "$2"
281 shift
282 ;;
283 esac
284 ;;
285 *.c)
286 cfile=$1
287 set x "$@" "$1"
288 shift
289 ;;
290 *)
291 set x "$@" "$1"
292 shift
293 ;;
294 esac
295 fi
296 shift
297 done
298
299 if test -z "$ofile" || test -z "$cfile"; then
300 # If no '-o' option was seen then we might have been invoked from a
301 # pattern rule where we don't need one. That is ok -- this is a
302 # normal compilation that the losing compiler can handle. If no
303 # '.c' file was seen then we are probably linking. That is also
304 # ok.
305 exec "$@"
306 fi
307
308 # Name of file we expect compiler to create.
309 cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
310
311 # Create the lock directory.
312 # Note: use '[/\\:.-]' here to ensure that we don't use the same name
313 # that we are using for the .o file. Also, base the name on the expected
314 # object file name, since that is what matters with a parallel build.
315 lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
316 while true; do
317 if mkdir "$lockdir" >/dev/null 2>&1; then
318 break
319 fi
320 sleep 1
321 done
322 # FIXME: race condition here if user kills between mkdir and trap.
323 trap "rmdir '$lockdir'; exit 1" 1 2 15
324
325 # Run the compile.
326 "$@"
327 ret=$?
328
329 if test -f "$cofile"; then
330 test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
331 elif test -f "${cofile}bj"; then
332 test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
333 fi
334
335 rmdir "$lockdir"
336 exit $ret
337
338 # Local Variables:
339 # mode: shell-script
340 # sh-indentation: 2
341 # eval: (add-hook 'write-file-hooks 'time-stamp)
342 # time-stamp-start: "scriptversion="
343 # time-stamp-format: "%:y-%02m-%02d.%02H"
344 # time-stamp-time-zone: "UTC"
345 # time-stamp-end: "; # UTC"
346 # End:
0 #! /bin/sh
1 # Attempt to guess a canonical system name.
2 # Copyright 1992-2016 Free Software Foundation, Inc.
3
4 timestamp='2016-10-02'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25 #
26 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
27 #
28 # You can get the latest version of this script from:
29 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
30 #
31 # Please send patches to <config-patches@gnu.org>.
32
33
34 me=`echo "$0" | sed -e 's,.*/,,'`
35
36 usage="\
37 Usage: $0 [OPTION]
38
39 Output the configuration name of the system \`$me' is run on.
40
41 Operation modes:
42 -h, --help print this help, then exit
43 -t, --time-stamp print date of last modification, then exit
44 -v, --version print version number, then exit
45
46 Report bugs and patches to <config-patches@gnu.org>."
47
48 version="\
49 GNU config.guess ($timestamp)
50
51 Originally written by Per Bothner.
52 Copyright 1992-2016 Free Software Foundation, Inc.
53
54 This is free software; see the source for copying conditions. There is NO
55 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
56
57 help="
58 Try \`$me --help' for more information."
59
60 # Parse command line
61 while test $# -gt 0 ; do
62 case $1 in
63 --time-stamp | --time* | -t )
64 echo "$timestamp" ; exit ;;
65 --version | -v )
66 echo "$version" ; exit ;;
67 --help | --h* | -h )
68 echo "$usage"; exit ;;
69 -- ) # Stop option processing
70 shift; break ;;
71 - ) # Use stdin as input.
72 break ;;
73 -* )
74 echo "$me: invalid option $1$help" >&2
75 exit 1 ;;
76 * )
77 break ;;
78 esac
79 done
80
81 if test $# != 0; then
82 echo "$me: too many arguments$help" >&2
83 exit 1
84 fi
85
86 trap 'exit 1' 1 2 15
87
88 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
89 # compiler to aid in system detection is discouraged as it requires
90 # temporary files to be created and, as you can see below, it is a
91 # headache to deal with in a portable fashion.
92
93 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
94 # use `HOST_CC' if defined, but it is deprecated.
95
96 # Portable tmp directory creation inspired by the Autoconf team.
97
98 set_cc_for_build='
99 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
100 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
101 : ${TMPDIR=/tmp} ;
102 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
103 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
104 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
105 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
106 dummy=$tmp/dummy ;
107 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
108 case $CC_FOR_BUILD,$HOST_CC,$CC in
109 ,,) echo "int x;" > $dummy.c ;
110 for c in cc gcc c89 c99 ; do
111 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
112 CC_FOR_BUILD="$c"; break ;
113 fi ;
114 done ;
115 if test x"$CC_FOR_BUILD" = x ; then
116 CC_FOR_BUILD=no_compiler_found ;
117 fi
118 ;;
119 ,,*) CC_FOR_BUILD=$CC ;;
120 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
121 esac ; set_cc_for_build= ;'
122
123 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
124 # (ghazi@noc.rutgers.edu 1994-08-24)
125 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
126 PATH=$PATH:/.attbin ; export PATH
127 fi
128
129 UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
130 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
131 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
132 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133
134 case "${UNAME_SYSTEM}" in
135 Linux|GNU|GNU/*)
136 # If the system lacks a compiler, then just pick glibc.
137 # We could probably try harder.
138 LIBC=gnu
139
140 eval $set_cc_for_build
141 cat <<-EOF > $dummy.c
142 #include <features.h>
143 #if defined(__UCLIBC__)
144 LIBC=uclibc
145 #elif defined(__dietlibc__)
146 LIBC=dietlibc
147 #else
148 LIBC=gnu
149 #endif
150 EOF
151 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
152 ;;
153 esac
154
155 # Note: order is significant - the case branches are not exclusive.
156
157 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
158 *:NetBSD:*:*)
159 # NetBSD (nbsd) targets should (where applicable) match one or
160 # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
161 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
162 # switched to ELF, *-*-netbsd* would select the old
163 # object file format. This provides both forward
164 # compatibility and a consistent mechanism for selecting the
165 # object file format.
166 #
167 # Note: NetBSD doesn't particularly care about the vendor
168 # portion of the name. We always set it to "unknown".
169 sysctl="sysctl -n hw.machine_arch"
170 UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
171 /sbin/$sysctl 2>/dev/null || \
172 /usr/sbin/$sysctl 2>/dev/null || \
173 echo unknown)`
174 case "${UNAME_MACHINE_ARCH}" in
175 armeb) machine=armeb-unknown ;;
176 arm*) machine=arm-unknown ;;
177 sh3el) machine=shl-unknown ;;
178 sh3eb) machine=sh-unknown ;;
179 sh5el) machine=sh5le-unknown ;;
180 earmv*)
181 arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
182 endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
183 machine=${arch}${endian}-unknown
184 ;;
185 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
186 esac
187 # The Operating System including object format, if it has switched
188 # to ELF recently (or will in the future) and ABI.
189 case "${UNAME_MACHINE_ARCH}" in
190 earm*)
191 os=netbsdelf
192 ;;
193 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
194 eval $set_cc_for_build
195 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
196 | grep -q __ELF__
197 then
198 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
199 # Return netbsd for either. FIX?
200 os=netbsd
201 else
202 os=netbsdelf
203 fi
204 ;;
205 *)
206 os=netbsd
207 ;;
208 esac
209 # Determine ABI tags.
210 case "${UNAME_MACHINE_ARCH}" in
211 earm*)
212 expr='s/^earmv[0-9]/-eabi/;s/eb$//'
213 abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
214 ;;
215 esac
216 # The OS release
217 # Debian GNU/NetBSD machines have a different userland, and
218 # thus, need a distinct triplet. However, they do not need
219 # kernel version information, so it can be replaced with a
220 # suitable tag, in the style of linux-gnu.
221 case "${UNAME_VERSION}" in
222 Debian*)
223 release='-gnu'
224 ;;
225 *)
226 release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
227 ;;
228 esac
229 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
230 # contains redundant information, the shorter form:
231 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
232 echo "${machine}-${os}${release}${abi}"
233 exit ;;
234 *:Bitrig:*:*)
235 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
236 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
237 exit ;;
238 *:OpenBSD:*:*)
239 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
240 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
241 exit ;;
242 *:LibertyBSD:*:*)
243 UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
244 echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
245 exit ;;
246 *:ekkoBSD:*:*)
247 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
248 exit ;;
249 *:SolidBSD:*:*)
250 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
251 exit ;;
252 macppc:MirBSD:*:*)
253 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
254 exit ;;
255 *:MirBSD:*:*)
256 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
257 exit ;;
258 *:Sortix:*:*)
259 echo ${UNAME_MACHINE}-unknown-sortix
260 exit ;;
261 alpha:OSF1:*:*)
262 case $UNAME_RELEASE in
263 *4.0)
264 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
265 ;;
266 *5.*)
267 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
268 ;;
269 esac
270 # According to Compaq, /usr/sbin/psrinfo has been available on
271 # OSF/1 and Tru64 systems produced since 1995. I hope that
272 # covers most systems running today. This code pipes the CPU
273 # types through head -n 1, so we only detect the type of CPU 0.
274 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
275 case "$ALPHA_CPU_TYPE" in
276 "EV4 (21064)")
277 UNAME_MACHINE=alpha ;;
278 "EV4.5 (21064)")
279 UNAME_MACHINE=alpha ;;
280 "LCA4 (21066/21068)")
281 UNAME_MACHINE=alpha ;;
282 "EV5 (21164)")
283 UNAME_MACHINE=alphaev5 ;;
284 "EV5.6 (21164A)")
285 UNAME_MACHINE=alphaev56 ;;
286 "EV5.6 (21164PC)")
287 UNAME_MACHINE=alphapca56 ;;
288 "EV5.7 (21164PC)")
289 UNAME_MACHINE=alphapca57 ;;
290 "EV6 (21264)")
291 UNAME_MACHINE=alphaev6 ;;
292 "EV6.7 (21264A)")
293 UNAME_MACHINE=alphaev67 ;;
294 "EV6.8CB (21264C)")
295 UNAME_MACHINE=alphaev68 ;;
296 "EV6.8AL (21264B)")
297 UNAME_MACHINE=alphaev68 ;;
298 "EV6.8CX (21264D)")
299 UNAME_MACHINE=alphaev68 ;;
300 "EV6.9A (21264/EV69A)")
301 UNAME_MACHINE=alphaev69 ;;
302 "EV7 (21364)")
303 UNAME_MACHINE=alphaev7 ;;
304 "EV7.9 (21364A)")
305 UNAME_MACHINE=alphaev79 ;;
306 esac
307 # A Pn.n version is a patched version.
308 # A Vn.n version is a released version.
309 # A Tn.n version is a released field test version.
310 # A Xn.n version is an unreleased experimental baselevel.
311 # 1.2 uses "1.2" for uname -r.
312 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
313 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
314 exitcode=$?
315 trap '' 0
316 exit $exitcode ;;
317 Alpha\ *:Windows_NT*:*)
318 # How do we know it's Interix rather than the generic POSIX subsystem?
319 # Should we change UNAME_MACHINE based on the output of uname instead
320 # of the specific Alpha model?
321 echo alpha-pc-interix
322 exit ;;
323 21064:Windows_NT:50:3)
324 echo alpha-dec-winnt3.5
325 exit ;;
326 Amiga*:UNIX_System_V:4.0:*)
327 echo m68k-unknown-sysv4
328 exit ;;
329 *:[Aa]miga[Oo][Ss]:*:*)
330 echo ${UNAME_MACHINE}-unknown-amigaos
331 exit ;;
332 *:[Mm]orph[Oo][Ss]:*:*)
333 echo ${UNAME_MACHINE}-unknown-morphos
334 exit ;;
335 *:OS/390:*:*)
336 echo i370-ibm-openedition
337 exit ;;
338 *:z/VM:*:*)
339 echo s390-ibm-zvmoe
340 exit ;;
341 *:OS400:*:*)
342 echo powerpc-ibm-os400
343 exit ;;
344 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
345 echo arm-acorn-riscix${UNAME_RELEASE}
346 exit ;;
347 arm*:riscos:*:*|arm*:RISCOS:*:*)
348 echo arm-unknown-riscos
349 exit ;;
350 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
351 echo hppa1.1-hitachi-hiuxmpp
352 exit ;;
353 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
354 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
355 if test "`(/bin/universe) 2>/dev/null`" = att ; then
356 echo pyramid-pyramid-sysv3
357 else
358 echo pyramid-pyramid-bsd
359 fi
360 exit ;;
361 NILE*:*:*:dcosx)
362 echo pyramid-pyramid-svr4
363 exit ;;
364 DRS?6000:unix:4.0:6*)
365 echo sparc-icl-nx6
366 exit ;;
367 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
368 case `/usr/bin/uname -p` in
369 sparc) echo sparc-icl-nx7; exit ;;
370 esac ;;
371 s390x:SunOS:*:*)
372 echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
373 exit ;;
374 sun4H:SunOS:5.*:*)
375 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
376 exit ;;
377 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
378 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
379 exit ;;
380 i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
381 echo i386-pc-auroraux${UNAME_RELEASE}
382 exit ;;
383 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
384 eval $set_cc_for_build
385 SUN_ARCH=i386
386 # If there is a compiler, see if it is configured for 64-bit objects.
387 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
388 # This test works for both compilers.
389 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
390 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
391 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
392 grep IS_64BIT_ARCH >/dev/null
393 then
394 SUN_ARCH=x86_64
395 fi
396 fi
397 echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
398 exit ;;
399 sun4*:SunOS:6*:*)
400 # According to config.sub, this is the proper way to canonicalize
401 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
402 # it's likely to be more like Solaris than SunOS4.
403 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
404 exit ;;
405 sun4*:SunOS:*:*)
406 case "`/usr/bin/arch -k`" in
407 Series*|S4*)
408 UNAME_RELEASE=`uname -v`
409 ;;
410 esac
411 # Japanese Language versions have a version number like `4.1.3-JL'.
412 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
413 exit ;;
414 sun3*:SunOS:*:*)
415 echo m68k-sun-sunos${UNAME_RELEASE}
416 exit ;;
417 sun*:*:4.2BSD:*)
418 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
419 test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
420 case "`/bin/arch`" in
421 sun3)
422 echo m68k-sun-sunos${UNAME_RELEASE}
423 ;;
424 sun4)
425 echo sparc-sun-sunos${UNAME_RELEASE}
426 ;;
427 esac
428 exit ;;
429 aushp:SunOS:*:*)
430 echo sparc-auspex-sunos${UNAME_RELEASE}
431 exit ;;
432 # The situation for MiNT is a little confusing. The machine name
433 # can be virtually everything (everything which is not
434 # "atarist" or "atariste" at least should have a processor
435 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
436 # to the lowercase version "mint" (or "freemint"). Finally
437 # the system name "TOS" denotes a system which is actually not
438 # MiNT. But MiNT is downward compatible to TOS, so this should
439 # be no problem.
440 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
441 echo m68k-atari-mint${UNAME_RELEASE}
442 exit ;;
443 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
444 echo m68k-atari-mint${UNAME_RELEASE}
445 exit ;;
446 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
447 echo m68k-atari-mint${UNAME_RELEASE}
448 exit ;;
449 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
450 echo m68k-milan-mint${UNAME_RELEASE}
451 exit ;;
452 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
453 echo m68k-hades-mint${UNAME_RELEASE}
454 exit ;;
455 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
456 echo m68k-unknown-mint${UNAME_RELEASE}
457 exit ;;
458 m68k:machten:*:*)
459 echo m68k-apple-machten${UNAME_RELEASE}
460 exit ;;
461 powerpc:machten:*:*)
462 echo powerpc-apple-machten${UNAME_RELEASE}
463 exit ;;
464 RISC*:Mach:*:*)
465 echo mips-dec-mach_bsd4.3
466 exit ;;
467 RISC*:ULTRIX:*:*)
468 echo mips-dec-ultrix${UNAME_RELEASE}
469 exit ;;
470 VAX*:ULTRIX*:*:*)
471 echo vax-dec-ultrix${UNAME_RELEASE}
472 exit ;;
473 2020:CLIX:*:* | 2430:CLIX:*:*)
474 echo clipper-intergraph-clix${UNAME_RELEASE}
475 exit ;;
476 mips:*:*:UMIPS | mips:*:*:RISCos)
477 eval $set_cc_for_build
478 sed 's/^ //' << EOF >$dummy.c
479 #ifdef __cplusplus
480 #include <stdio.h> /* for printf() prototype */
481 int main (int argc, char *argv[]) {
482 #else
483 int main (argc, argv) int argc; char *argv[]; {
484 #endif
485 #if defined (host_mips) && defined (MIPSEB)
486 #if defined (SYSTYPE_SYSV)
487 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
488 #endif
489 #if defined (SYSTYPE_SVR4)
490 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
491 #endif
492 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
493 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
494 #endif
495 #endif
496 exit (-1);
497 }
498 EOF
499 $CC_FOR_BUILD -o $dummy $dummy.c &&
500 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
501 SYSTEM_NAME=`$dummy $dummyarg` &&
502 { echo "$SYSTEM_NAME"; exit; }
503 echo mips-mips-riscos${UNAME_RELEASE}
504 exit ;;
505 Motorola:PowerMAX_OS:*:*)
506 echo powerpc-motorola-powermax
507 exit ;;
508 Motorola:*:4.3:PL8-*)
509 echo powerpc-harris-powermax
510 exit ;;
511 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
512 echo powerpc-harris-powermax
513 exit ;;
514 Night_Hawk:Power_UNIX:*:*)
515 echo powerpc-harris-powerunix
516 exit ;;
517 m88k:CX/UX:7*:*)
518 echo m88k-harris-cxux7
519 exit ;;
520 m88k:*:4*:R4*)
521 echo m88k-motorola-sysv4
522 exit ;;
523 m88k:*:3*:R3*)
524 echo m88k-motorola-sysv3
525 exit ;;
526 AViiON:dgux:*:*)
527 # DG/UX returns AViiON for all architectures
528 UNAME_PROCESSOR=`/usr/bin/uname -p`
529 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
530 then
531 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
532 [ ${TARGET_BINARY_INTERFACE}x = x ]
533 then
534 echo m88k-dg-dgux${UNAME_RELEASE}
535 else
536 echo m88k-dg-dguxbcs${UNAME_RELEASE}
537 fi
538 else
539 echo i586-dg-dgux${UNAME_RELEASE}
540 fi
541 exit ;;
542 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
543 echo m88k-dolphin-sysv3
544 exit ;;
545 M88*:*:R3*:*)
546 # Delta 88k system running SVR3
547 echo m88k-motorola-sysv3
548 exit ;;
549 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
550 echo m88k-tektronix-sysv3
551 exit ;;
552 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
553 echo m68k-tektronix-bsd
554 exit ;;
555 *:IRIX*:*:*)
556 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
557 exit ;;
558 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
559 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
560 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
561 i*86:AIX:*:*)
562 echo i386-ibm-aix
563 exit ;;
564 ia64:AIX:*:*)
565 if [ -x /usr/bin/oslevel ] ; then
566 IBM_REV=`/usr/bin/oslevel`
567 else
568 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
569 fi
570 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
571 exit ;;
572 *:AIX:2:3)
573 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
574 eval $set_cc_for_build
575 sed 's/^ //' << EOF >$dummy.c
576 #include <sys/systemcfg.h>
577
578 main()
579 {
580 if (!__power_pc())
581 exit(1);
582 puts("powerpc-ibm-aix3.2.5");
583 exit(0);
584 }
585 EOF
586 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
587 then
588 echo "$SYSTEM_NAME"
589 else
590 echo rs6000-ibm-aix3.2.5
591 fi
592 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
593 echo rs6000-ibm-aix3.2.4
594 else
595 echo rs6000-ibm-aix3.2
596 fi
597 exit ;;
598 *:AIX:*:[4567])
599 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
600 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
601 IBM_ARCH=rs6000
602 else
603 IBM_ARCH=powerpc
604 fi
605 if [ -x /usr/bin/lslpp ] ; then
606 IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
607 awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
608 else
609 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
610 fi
611 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
612 exit ;;
613 *:AIX:*:*)
614 echo rs6000-ibm-aix
615 exit ;;
616 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
617 echo romp-ibm-bsd4.4
618 exit ;;
619 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
620 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
621 exit ;; # report: romp-ibm BSD 4.3
622 *:BOSX:*:*)
623 echo rs6000-bull-bosx
624 exit ;;
625 DPX/2?00:B.O.S.:*:*)
626 echo m68k-bull-sysv3
627 exit ;;
628 9000/[34]??:4.3bsd:1.*:*)
629 echo m68k-hp-bsd
630 exit ;;
631 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
632 echo m68k-hp-bsd4.4
633 exit ;;
634 9000/[34678]??:HP-UX:*:*)
635 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
636 case "${UNAME_MACHINE}" in
637 9000/31? ) HP_ARCH=m68000 ;;
638 9000/[34]?? ) HP_ARCH=m68k ;;
639 9000/[678][0-9][0-9])
640 if [ -x /usr/bin/getconf ]; then
641 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
642 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
643 case "${sc_cpu_version}" in
644 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
645 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
646 532) # CPU_PA_RISC2_0
647 case "${sc_kernel_bits}" in
648 32) HP_ARCH=hppa2.0n ;;
649 64) HP_ARCH=hppa2.0w ;;
650 '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
651 esac ;;
652 esac
653 fi
654 if [ "${HP_ARCH}" = "" ]; then
655 eval $set_cc_for_build
656 sed 's/^ //' << EOF >$dummy.c
657
658 #define _HPUX_SOURCE
659 #include <stdlib.h>
660 #include <unistd.h>
661
662 int main ()
663 {
664 #if defined(_SC_KERNEL_BITS)
665 long bits = sysconf(_SC_KERNEL_BITS);
666 #endif
667 long cpu = sysconf (_SC_CPU_VERSION);
668
669 switch (cpu)
670 {
671 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
672 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
673 case CPU_PA_RISC2_0:
674 #if defined(_SC_KERNEL_BITS)
675 switch (bits)
676 {
677 case 64: puts ("hppa2.0w"); break;
678 case 32: puts ("hppa2.0n"); break;
679 default: puts ("hppa2.0"); break;
680 } break;
681 #else /* !defined(_SC_KERNEL_BITS) */
682 puts ("hppa2.0"); break;
683 #endif
684 default: puts ("hppa1.0"); break;
685 }
686 exit (0);
687 }
688 EOF
689 (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
690 test -z "$HP_ARCH" && HP_ARCH=hppa
691 fi ;;
692 esac
693 if [ ${HP_ARCH} = hppa2.0w ]
694 then
695 eval $set_cc_for_build
696
697 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
698 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
699 # generating 64-bit code. GNU and HP use different nomenclature:
700 #
701 # $ CC_FOR_BUILD=cc ./config.guess
702 # => hppa2.0w-hp-hpux11.23
703 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
704 # => hppa64-hp-hpux11.23
705
706 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
707 grep -q __LP64__
708 then
709 HP_ARCH=hppa2.0w
710 else
711 HP_ARCH=hppa64
712 fi
713 fi
714 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
715 exit ;;
716 ia64:HP-UX:*:*)
717 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
718 echo ia64-hp-hpux${HPUX_REV}
719 exit ;;
720 3050*:HI-UX:*:*)
721 eval $set_cc_for_build
722 sed 's/^ //' << EOF >$dummy.c
723 #include <unistd.h>
724 int
725 main ()
726 {
727 long cpu = sysconf (_SC_CPU_VERSION);
728 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
729 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
730 results, however. */
731 if (CPU_IS_PA_RISC (cpu))
732 {
733 switch (cpu)
734 {
735 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
736 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
737 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
738 default: puts ("hppa-hitachi-hiuxwe2"); break;
739 }
740 }
741 else if (CPU_IS_HP_MC68K (cpu))
742 puts ("m68k-hitachi-hiuxwe2");
743 else puts ("unknown-hitachi-hiuxwe2");
744 exit (0);
745 }
746 EOF
747 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
748 { echo "$SYSTEM_NAME"; exit; }
749 echo unknown-hitachi-hiuxwe2
750 exit ;;
751 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
752 echo hppa1.1-hp-bsd
753 exit ;;
754 9000/8??:4.3bsd:*:*)
755 echo hppa1.0-hp-bsd
756 exit ;;
757 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
758 echo hppa1.0-hp-mpeix
759 exit ;;
760 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
761 echo hppa1.1-hp-osf
762 exit ;;
763 hp8??:OSF1:*:*)
764 echo hppa1.0-hp-osf
765 exit ;;
766 i*86:OSF1:*:*)
767 if [ -x /usr/sbin/sysversion ] ; then
768 echo ${UNAME_MACHINE}-unknown-osf1mk
769 else
770 echo ${UNAME_MACHINE}-unknown-osf1
771 fi
772 exit ;;
773 parisc*:Lites*:*:*)
774 echo hppa1.1-hp-lites
775 exit ;;
776 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
777 echo c1-convex-bsd
778 exit ;;
779 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
780 if getsysinfo -f scalar_acc
781 then echo c32-convex-bsd
782 else echo c2-convex-bsd
783 fi
784 exit ;;
785 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
786 echo c34-convex-bsd
787 exit ;;
788 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
789 echo c38-convex-bsd
790 exit ;;
791 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
792 echo c4-convex-bsd
793 exit ;;
794 CRAY*Y-MP:*:*:*)
795 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
796 exit ;;
797 CRAY*[A-Z]90:*:*:*)
798 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
799 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
800 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
801 -e 's/\.[^.]*$/.X/'
802 exit ;;
803 CRAY*TS:*:*:*)
804 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
805 exit ;;
806 CRAY*T3E:*:*:*)
807 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
808 exit ;;
809 CRAY*SV1:*:*:*)
810 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
811 exit ;;
812 *:UNICOS/mp:*:*)
813 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
814 exit ;;
815 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
816 FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
817 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
818 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
819 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
820 exit ;;
821 5000:UNIX_System_V:4.*:*)
822 FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
823 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
824 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
825 exit ;;
826 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
827 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
828 exit ;;
829 sparc*:BSD/OS:*:*)
830 echo sparc-unknown-bsdi${UNAME_RELEASE}
831 exit ;;
832 *:BSD/OS:*:*)
833 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
834 exit ;;
835 *:FreeBSD:*:*)
836 UNAME_PROCESSOR=`/usr/bin/uname -p`
837 case ${UNAME_PROCESSOR} in
838 amd64)
839 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
840 *)
841 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
842 esac
843 exit ;;
844 i*:CYGWIN*:*)
845 echo ${UNAME_MACHINE}-pc-cygwin
846 exit ;;
847 *:MINGW64*:*)
848 echo ${UNAME_MACHINE}-pc-mingw64
849 exit ;;
850 *:MINGW*:*)
851 echo ${UNAME_MACHINE}-pc-mingw32
852 exit ;;
853 *:MSYS*:*)
854 echo ${UNAME_MACHINE}-pc-msys
855 exit ;;
856 i*:windows32*:*)
857 # uname -m includes "-pc" on this system.
858 echo ${UNAME_MACHINE}-mingw32
859 exit ;;
860 i*:PW*:*)
861 echo ${UNAME_MACHINE}-pc-pw32
862 exit ;;
863 *:Interix*:*)
864 case ${UNAME_MACHINE} in
865 x86)
866 echo i586-pc-interix${UNAME_RELEASE}
867 exit ;;
868 authenticamd | genuineintel | EM64T)
869 echo x86_64-unknown-interix${UNAME_RELEASE}
870 exit ;;
871 IA64)
872 echo ia64-unknown-interix${UNAME_RELEASE}
873 exit ;;
874 esac ;;
875 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
876 echo i${UNAME_MACHINE}-pc-mks
877 exit ;;
878 8664:Windows_NT:*)
879 echo x86_64-pc-mks
880 exit ;;
881 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
882 # How do we know it's Interix rather than the generic POSIX subsystem?
883 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
884 # UNAME_MACHINE based on the output of uname instead of i386?
885 echo i586-pc-interix
886 exit ;;
887 i*:UWIN*:*)
888 echo ${UNAME_MACHINE}-pc-uwin
889 exit ;;
890 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
891 echo x86_64-unknown-cygwin
892 exit ;;
893 p*:CYGWIN*:*)
894 echo powerpcle-unknown-cygwin
895 exit ;;
896 prep*:SunOS:5.*:*)
897 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
898 exit ;;
899 *:GNU:*:*)
900 # the GNU system
901 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
902 exit ;;
903 *:GNU/*:*:*)
904 # other systems with GNU libc and userland
905 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
906 exit ;;
907 i*86:Minix:*:*)
908 echo ${UNAME_MACHINE}-pc-minix
909 exit ;;
910 aarch64:Linux:*:*)
911 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
912 exit ;;
913 aarch64_be:Linux:*:*)
914 UNAME_MACHINE=aarch64_be
915 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
916 exit ;;
917 alpha:Linux:*:*)
918 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
919 EV5) UNAME_MACHINE=alphaev5 ;;
920 EV56) UNAME_MACHINE=alphaev56 ;;
921 PCA56) UNAME_MACHINE=alphapca56 ;;
922 PCA57) UNAME_MACHINE=alphapca56 ;;
923 EV6) UNAME_MACHINE=alphaev6 ;;
924 EV67) UNAME_MACHINE=alphaev67 ;;
925 EV68*) UNAME_MACHINE=alphaev68 ;;
926 esac
927 objdump --private-headers /bin/sh | grep -q ld.so.1
928 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
929 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
930 exit ;;
931 arc:Linux:*:* | arceb:Linux:*:*)
932 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
933 exit ;;
934 arm*:Linux:*:*)
935 eval $set_cc_for_build
936 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
937 | grep -q __ARM_EABI__
938 then
939 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
940 else
941 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
942 | grep -q __ARM_PCS_VFP
943 then
944 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
945 else
946 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
947 fi
948 fi
949 exit ;;
950 avr32*:Linux:*:*)
951 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
952 exit ;;
953 cris:Linux:*:*)
954 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
955 exit ;;
956 crisv32:Linux:*:*)
957 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
958 exit ;;
959 e2k:Linux:*:*)
960 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
961 exit ;;
962 frv:Linux:*:*)
963 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
964 exit ;;
965 hexagon:Linux:*:*)
966 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
967 exit ;;
968 i*86:Linux:*:*)
969 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
970 exit ;;
971 ia64:Linux:*:*)
972 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
973 exit ;;
974 k1om:Linux:*:*)
975 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
976 exit ;;
977 m32r*:Linux:*:*)
978 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
979 exit ;;
980 m68*:Linux:*:*)
981 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
982 exit ;;
983 mips:Linux:*:* | mips64:Linux:*:*)
984 eval $set_cc_for_build
985 sed 's/^ //' << EOF >$dummy.c
986 #undef CPU
987 #undef ${UNAME_MACHINE}
988 #undef ${UNAME_MACHINE}el
989 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
990 CPU=${UNAME_MACHINE}el
991 #else
992 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
993 CPU=${UNAME_MACHINE}
994 #else
995 CPU=
996 #endif
997 #endif
998 EOF
999 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
1000 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
1001 ;;
1002 mips64el:Linux:*:*)
1003 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1004 exit ;;
1005 openrisc*:Linux:*:*)
1006 echo or1k-unknown-linux-${LIBC}
1007 exit ;;
1008 or32:Linux:*:* | or1k*:Linux:*:*)
1009 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1010 exit ;;
1011 padre:Linux:*:*)
1012 echo sparc-unknown-linux-${LIBC}
1013 exit ;;
1014 parisc64:Linux:*:* | hppa64:Linux:*:*)
1015 echo hppa64-unknown-linux-${LIBC}
1016 exit ;;
1017 parisc:Linux:*:* | hppa:Linux:*:*)
1018 # Look for CPU level
1019 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
1020 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
1021 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
1022 *) echo hppa-unknown-linux-${LIBC} ;;
1023 esac
1024 exit ;;
1025 ppc64:Linux:*:*)
1026 echo powerpc64-unknown-linux-${LIBC}
1027 exit ;;
1028 ppc:Linux:*:*)
1029 echo powerpc-unknown-linux-${LIBC}
1030 exit ;;
1031 ppc64le:Linux:*:*)
1032 echo powerpc64le-unknown-linux-${LIBC}
1033 exit ;;
1034 ppcle:Linux:*:*)
1035 echo powerpcle-unknown-linux-${LIBC}
1036 exit ;;
1037 riscv32:Linux:*:* | riscv64:Linux:*:*)
1038 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1039 exit ;;
1040 s390:Linux:*:* | s390x:Linux:*:*)
1041 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
1042 exit ;;
1043 sh64*:Linux:*:*)
1044 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1045 exit ;;
1046 sh*:Linux:*:*)
1047 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1048 exit ;;
1049 sparc:Linux:*:* | sparc64:Linux:*:*)
1050 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1051 exit ;;
1052 tile*:Linux:*:*)
1053 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1054 exit ;;
1055 vax:Linux:*:*)
1056 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
1057 exit ;;
1058 x86_64:Linux:*:*)
1059 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
1060 exit ;;
1061 xtensa*:Linux:*:*)
1062 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1063 exit ;;
1064 i*86:DYNIX/ptx:4*:*)
1065 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1066 # earlier versions are messed up and put the nodename in both
1067 # sysname and nodename.
1068 echo i386-sequent-sysv4
1069 exit ;;
1070 i*86:UNIX_SV:4.2MP:2.*)
1071 # Unixware is an offshoot of SVR4, but it has its own version
1072 # number series starting with 2...
1073 # I am not positive that other SVR4 systems won't match this,
1074 # I just have to hope. -- rms.
1075 # Use sysv4.2uw... so that sysv4* matches it.
1076 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1077 exit ;;
1078 i*86:OS/2:*:*)
1079 # If we were able to find `uname', then EMX Unix compatibility
1080 # is probably installed.
1081 echo ${UNAME_MACHINE}-pc-os2-emx
1082 exit ;;
1083 i*86:XTS-300:*:STOP)
1084 echo ${UNAME_MACHINE}-unknown-stop
1085 exit ;;
1086 i*86:atheos:*:*)
1087 echo ${UNAME_MACHINE}-unknown-atheos
1088 exit ;;
1089 i*86:syllable:*:*)
1090 echo ${UNAME_MACHINE}-pc-syllable
1091 exit ;;
1092 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1093 echo i386-unknown-lynxos${UNAME_RELEASE}
1094 exit ;;
1095 i*86:*DOS:*:*)
1096 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1097 exit ;;
1098 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1099 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1100 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1101 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1102 else
1103 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1104 fi
1105 exit ;;
1106 i*86:*:5:[678]*)
1107 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1108 case `/bin/uname -X | grep "^Machine"` in
1109 *486*) UNAME_MACHINE=i486 ;;
1110 *Pentium) UNAME_MACHINE=i586 ;;
1111 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1112 esac
1113 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1114 exit ;;
1115 i*86:*:3.2:*)
1116 if test -f /usr/options/cb.name; then
1117 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1118 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1119 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1120 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1121 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1122 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1123 && UNAME_MACHINE=i586
1124 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1125 && UNAME_MACHINE=i686
1126 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1127 && UNAME_MACHINE=i686
1128 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1129 else
1130 echo ${UNAME_MACHINE}-pc-sysv32
1131 fi
1132 exit ;;
1133 pc:*:*:*)
1134 # Left here for compatibility:
1135 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1136 # the processor, so we play safe by assuming i586.
1137 # Note: whatever this is, it MUST be the same as what config.sub
1138 # prints for the "djgpp" host, or else GDB configure will decide that
1139 # this is a cross-build.
1140 echo i586-pc-msdosdjgpp
1141 exit ;;
1142 Intel:Mach:3*:*)
1143 echo i386-pc-mach3
1144 exit ;;
1145 paragon:*:*:*)
1146 echo i860-intel-osf1
1147 exit ;;
1148 i860:*:4.*:*) # i860-SVR4
1149 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1150 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1151 else # Add other i860-SVR4 vendors below as they are discovered.
1152 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1153 fi
1154 exit ;;
1155 mini*:CTIX:SYS*5:*)
1156 # "miniframe"
1157 echo m68010-convergent-sysv
1158 exit ;;
1159 mc68k:UNIX:SYSTEM5:3.51m)
1160 echo m68k-convergent-sysv
1161 exit ;;
1162 M680?0:D-NIX:5.3:*)
1163 echo m68k-diab-dnix
1164 exit ;;
1165 M68*:*:R3V[5678]*:*)
1166 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1167 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1168 OS_REL=''
1169 test -r /etc/.relid \
1170 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1171 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1172 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1173 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1174 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1175 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1176 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1177 && { echo i486-ncr-sysv4; exit; } ;;
1178 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
1179 OS_REL='.3'
1180 test -r /etc/.relid \
1181 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1182 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1183 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1184 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1185 && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
1186 /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
1187 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1188 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1189 echo m68k-unknown-lynxos${UNAME_RELEASE}
1190 exit ;;
1191 mc68030:UNIX_System_V:4.*:*)
1192 echo m68k-atari-sysv4
1193 exit ;;
1194 TSUNAMI:LynxOS:2.*:*)
1195 echo sparc-unknown-lynxos${UNAME_RELEASE}
1196 exit ;;
1197 rs6000:LynxOS:2.*:*)
1198 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1199 exit ;;
1200 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1201 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1202 exit ;;
1203 SM[BE]S:UNIX_SV:*:*)
1204 echo mips-dde-sysv${UNAME_RELEASE}
1205 exit ;;
1206 RM*:ReliantUNIX-*:*:*)
1207 echo mips-sni-sysv4
1208 exit ;;
1209 RM*:SINIX-*:*:*)
1210 echo mips-sni-sysv4
1211 exit ;;
1212 *:SINIX-*:*:*)
1213 if uname -p 2>/dev/null >/dev/null ; then
1214 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1215 echo ${UNAME_MACHINE}-sni-sysv4
1216 else
1217 echo ns32k-sni-sysv
1218 fi
1219 exit ;;
1220 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1221 # says <Richard.M.Bartel@ccMail.Census.GOV>
1222 echo i586-unisys-sysv4
1223 exit ;;
1224 *:UNIX_System_V:4*:FTX*)
1225 # From Gerald Hewes <hewes@openmarket.com>.
1226 # How about differentiating between stratus architectures? -djm
1227 echo hppa1.1-stratus-sysv4
1228 exit ;;
1229 *:*:*:FTX*)
1230 # From seanf@swdc.stratus.com.
1231 echo i860-stratus-sysv4
1232 exit ;;
1233 i*86:VOS:*:*)
1234 # From Paul.Green@stratus.com.
1235 echo ${UNAME_MACHINE}-stratus-vos
1236 exit ;;
1237 *:VOS:*:*)
1238 # From Paul.Green@stratus.com.
1239 echo hppa1.1-stratus-vos
1240 exit ;;
1241 mc68*:A/UX:*:*)
1242 echo m68k-apple-aux${UNAME_RELEASE}
1243 exit ;;
1244 news*:NEWS-OS:6*:*)
1245 echo mips-sony-newsos6
1246 exit ;;
1247 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1248 if [ -d /usr/nec ]; then
1249 echo mips-nec-sysv${UNAME_RELEASE}
1250 else
1251 echo mips-unknown-sysv${UNAME_RELEASE}
1252 fi
1253 exit ;;
1254 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1255 echo powerpc-be-beos
1256 exit ;;
1257 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1258 echo powerpc-apple-beos
1259 exit ;;
1260 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1261 echo i586-pc-beos
1262 exit ;;
1263 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1264 echo i586-pc-haiku
1265 exit ;;
1266 x86_64:Haiku:*:*)
1267 echo x86_64-unknown-haiku
1268 exit ;;
1269 SX-4:SUPER-UX:*:*)
1270 echo sx4-nec-superux${UNAME_RELEASE}
1271 exit ;;
1272 SX-5:SUPER-UX:*:*)
1273 echo sx5-nec-superux${UNAME_RELEASE}
1274 exit ;;
1275 SX-6:SUPER-UX:*:*)
1276 echo sx6-nec-superux${UNAME_RELEASE}
1277 exit ;;
1278 SX-7:SUPER-UX:*:*)
1279 echo sx7-nec-superux${UNAME_RELEASE}
1280 exit ;;
1281 SX-8:SUPER-UX:*:*)
1282 echo sx8-nec-superux${UNAME_RELEASE}
1283 exit ;;
1284 SX-8R:SUPER-UX:*:*)
1285 echo sx8r-nec-superux${UNAME_RELEASE}
1286 exit ;;
1287 SX-ACE:SUPER-UX:*:*)
1288 echo sxace-nec-superux${UNAME_RELEASE}
1289 exit ;;
1290 Power*:Rhapsody:*:*)
1291 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1292 exit ;;
1293 *:Rhapsody:*:*)
1294 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1295 exit ;;
1296 *:Darwin:*:*)
1297 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1298 eval $set_cc_for_build
1299 if test "$UNAME_PROCESSOR" = unknown ; then
1300 UNAME_PROCESSOR=powerpc
1301 fi
1302 if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1303 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1304 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1305 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1306 grep IS_64BIT_ARCH >/dev/null
1307 then
1308 case $UNAME_PROCESSOR in
1309 i386) UNAME_PROCESSOR=x86_64 ;;
1310 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1311 esac
1312 fi
1313 fi
1314 elif test "$UNAME_PROCESSOR" = i386 ; then
1315 # Avoid executing cc on OS X 10.9, as it ships with a stub
1316 # that puts up a graphical alert prompting to install
1317 # developer tools. Any system running Mac OS X 10.7 or
1318 # later (Darwin 11 and later) is required to have a 64-bit
1319 # processor. This is not true of the ARM version of Darwin
1320 # that Apple uses in portable devices.
1321 UNAME_PROCESSOR=x86_64
1322 fi
1323 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1324 exit ;;
1325 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1326 UNAME_PROCESSOR=`uname -p`
1327 if test "$UNAME_PROCESSOR" = x86; then
1328 UNAME_PROCESSOR=i386
1329 UNAME_MACHINE=pc
1330 fi
1331 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1332 exit ;;
1333 *:QNX:*:4*)
1334 echo i386-pc-qnx
1335 exit ;;
1336 NEO-?:NONSTOP_KERNEL:*:*)
1337 echo neo-tandem-nsk${UNAME_RELEASE}
1338 exit ;;
1339 NSE-*:NONSTOP_KERNEL:*:*)
1340 echo nse-tandem-nsk${UNAME_RELEASE}
1341 exit ;;
1342 NSR-?:NONSTOP_KERNEL:*:*)
1343 echo nsr-tandem-nsk${UNAME_RELEASE}
1344 exit ;;
1345 *:NonStop-UX:*:*)
1346 echo mips-compaq-nonstopux
1347 exit ;;
1348 BS2000:POSIX*:*:*)
1349 echo bs2000-siemens-sysv
1350 exit ;;
1351 DS/*:UNIX_System_V:*:*)
1352 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1353 exit ;;
1354 *:Plan9:*:*)
1355 # "uname -m" is not consistent, so use $cputype instead. 386
1356 # is converted to i386 for consistency with other x86
1357 # operating systems.
1358 if test "$cputype" = 386; then
1359 UNAME_MACHINE=i386
1360 else
1361 UNAME_MACHINE="$cputype"
1362 fi
1363 echo ${UNAME_MACHINE}-unknown-plan9
1364 exit ;;
1365 *:TOPS-10:*:*)
1366 echo pdp10-unknown-tops10
1367 exit ;;
1368 *:TENEX:*:*)
1369 echo pdp10-unknown-tenex
1370 exit ;;
1371 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1372 echo pdp10-dec-tops20
1373 exit ;;
1374 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1375 echo pdp10-xkl-tops20
1376 exit ;;
1377 *:TOPS-20:*:*)
1378 echo pdp10-unknown-tops20
1379 exit ;;
1380 *:ITS:*:*)
1381 echo pdp10-unknown-its
1382 exit ;;
1383 SEI:*:*:SEIUX)
1384 echo mips-sei-seiux${UNAME_RELEASE}
1385 exit ;;
1386 *:DragonFly:*:*)
1387 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1388 exit ;;
1389 *:*VMS:*:*)
1390 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1391 case "${UNAME_MACHINE}" in
1392 A*) echo alpha-dec-vms ; exit ;;
1393 I*) echo ia64-dec-vms ; exit ;;
1394 V*) echo vax-dec-vms ; exit ;;
1395 esac ;;
1396 *:XENIX:*:SysV)
1397 echo i386-pc-xenix
1398 exit ;;
1399 i*86:skyos:*:*)
1400 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
1401 exit ;;
1402 i*86:rdos:*:*)
1403 echo ${UNAME_MACHINE}-pc-rdos
1404 exit ;;
1405 i*86:AROS:*:*)
1406 echo ${UNAME_MACHINE}-pc-aros
1407 exit ;;
1408 x86_64:VMkernel:*:*)
1409 echo ${UNAME_MACHINE}-unknown-esx
1410 exit ;;
1411 amd64:Isilon\ OneFS:*:*)
1412 echo x86_64-unknown-onefs
1413 exit ;;
1414 esac
1415
1416 cat >&2 <<EOF
1417 $0: unable to guess system type
1418
1419 This script (version $timestamp), has failed to recognize the
1420 operating system you are using. If your script is old, overwrite
1421 config.guess and config.sub with the latest versions from:
1422
1423 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
1424 and
1425 http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
1426
1427 If $0 has already been updated, send the following data and any
1428 information you think might be pertinent to config-patches@gnu.org to
1429 provide the necessary information to handle your system.
1430
1431 config.guess timestamp = $timestamp
1432
1433 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1434 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1435 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1436 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1437
1438 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1439 /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1440
1441 hostinfo = `(hostinfo) 2>/dev/null`
1442 /bin/universe = `(/bin/universe) 2>/dev/null`
1443 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1444 /bin/arch = `(/bin/arch) 2>/dev/null`
1445 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1446 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1447
1448 UNAME_MACHINE = ${UNAME_MACHINE}
1449 UNAME_RELEASE = ${UNAME_RELEASE}
1450 UNAME_SYSTEM = ${UNAME_SYSTEM}
1451 UNAME_VERSION = ${UNAME_VERSION}
1452 EOF
1453
1454 exit 1
1455
1456 # Local variables:
1457 # eval: (add-hook 'write-file-hooks 'time-stamp)
1458 # time-stamp-start: "timestamp='"
1459 # time-stamp-format: "%:y-%02m-%02d"
1460 # time-stamp-end: "'"
1461 # End:
0 /* config.h. Generated from config.h.in by configure. */
1 /* config.h.in. Generated from configure.ac by autoheader. */
2
3 /* Define if building universal (internal helper macro) */
4 /* #undef AC_APPLE_UNIVERSAL_BUILD */
5
6 /* audio_wav */
7 #define AUDIO_DEFAULT /**/
8
9 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
10 systems. This function is required for `alloca.c' support on those systems.
11 */
12 /* #undef CRAY_STACKSEG_END */
13
14 /* Define to 1 if using `alloca.c'. */
15 /* #undef C_ALLOCA */
16
17 /* Define to enable diagnostic debugging support. */
18 /* #undef DEBUG */
19
20 /* Define to enable experimental code. */
21 /* #undef EXPERIMENTAL */
22
23 /* Define to 1 if you have `alloca', as a function or macro. */
24 #define HAVE_ALLOCA 1
25
26 /* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
27 */
28 #define HAVE_ALLOCA_H 1
29
30 /* Define to 1 if you have the <argz.h> header file. */
31 #define HAVE_ARGZ_H 1
32
33 /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
34 /* #undef HAVE_DOPRNT */
35
36 /* Define to 1 if you have the <fcntl.h> header file. */
37 #define HAVE_FCNTL_H 1
38
39 /* Define to 1 if you have the <float.h> header file. */
40 #define HAVE_FLOAT_H 1
41
42 /* Define to 1 if you have the `getcwd' function. */
43 #define HAVE_GETCWD 1
44
45 /* Define to 1 if you have the `getpagesize' function. */
46 #define HAVE_GETPAGESIZE 1
47
48 /* Define to 1 if you have the <inttypes.h> header file. */
49 #define HAVE_INTTYPES_H 1
50
51 /* Define to 1 if you have the <langinfo.h> header file. */
52 #define HAVE_LANGINFO_H 1
53
54 /* Define to 1 if you have the `efence' library (-lefence). */
55 /* #undef HAVE_LIBEFENCE */
56
57 /* Define to 1 if you have the <libintl.h> header file. */
58 #define HAVE_LIBINTL_H 1
59
60 /* Define to 1 if you have the <limits.h> header file. */
61 #define HAVE_LIMITS_H 1
62
63 /* Define to 1 if you have the `localeconv' function. */
64 #define HAVE_LOCALECONV 1
65
66 /* Define to 1 if you have the <locale.h> header file. */
67 #define HAVE_LOCALE_H 1
68
69 /* Define to 1 if you have the `madvise' function. */
70 #define HAVE_MADVISE 1
71
72 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
73 to 0 otherwise. */
74 #define HAVE_MALLOC 1
75
76 /* Define to 1 if you have the <malloc.h> header file. */
77 #define HAVE_MALLOC_H 1
78
79 /* Define to 1 if you have the `memmove' function. */
80 #define HAVE_MEMMOVE 1
81
82 /* Define to 1 if you have the <memory.h> header file. */
83 #define HAVE_MEMORY_H 1
84
85 /* Define to 1 if you have the `mempcpy' function. */
86 #define HAVE_MEMPCPY 1
87
88 /* Define to 1 if you have the `memset' function. */
89 #define HAVE_MEMSET 1
90
91 /* Define to 1 if you have a working `mmap' system call. */
92 #define HAVE_MMAP 1
93
94 /* Define to 1 if you have the `munmap' function. */
95 #define HAVE_MUNMAP 1
96
97 /* Define to 1 if you have the `nl_langinfo' function. */
98 #define HAVE_NL_LANGINFO 1
99
100 /* Define to 1 if you have the `pow' function. */
101 #define HAVE_POW 1
102
103 /* Define to 1 if the system has the type `ptrdiff_t'. */
104 #define HAVE_PTRDIFF_T 1
105
106 /* Define to 1 if your system has a GNU libc compatible `realloc' function,
107 and to 0 otherwise. */
108 #define HAVE_REALLOC 1
109
110 /* Define to 1 if you have the <stddef.h> header file. */
111 #define HAVE_STDDEF_H 1
112
113 /* Define to 1 if you have the <stdint.h> header file. */
114 #define HAVE_STDINT_H 1
115
116 /* Define to 1 if you have the <stdio_ext.h> header file. */
117 #define HAVE_STDIO_EXT_H 1
118
119 /* Define to 1 if you have the <stdlib.h> header file. */
120 #define HAVE_STDLIB_H 1
121
122 /* Define to 1 if you have the `stpcpy' function. */
123 #define HAVE_STPCPY 1
124
125 /* Define to 1 if you have the `strcasecmp' function. */
126 #define HAVE_STRCASECMP 1
127
128 /* Define to 1 if you have the `strchr' function. */
129 #define HAVE_STRCHR 1
130
131 /* Define to 1 if you have the `strcspn' function. */
132 #define HAVE_STRCSPN 1
133
134 /* Define to 1 if you have the <strings.h> header file. */
135 #define HAVE_STRINGS_H 1
136
137 /* Define to 1 if you have the <string.h> header file. */
138 #define HAVE_STRING_H 1
139
140 /* Define to 1 if you have the `strncasecmp' function. */
141 #define HAVE_STRNCASECMP 1
142
143 /* Define to 1 if you have the `strrchr' function. */
144 #define HAVE_STRRCHR 1
145
146 /* Define to 1 if you have the `strstr' function. */
147 #define HAVE_STRSTR 1
148
149 /* Define to 1 if you have the `strtol' function. */
150 #define HAVE_STRTOL 1
151
152 /* Define to 1 if you have the `strtoul' function. */
153 #define HAVE_STRTOUL 1
154
155 /* Define to 1 if you have the <sys/param.h> header file. */
156 #define HAVE_SYS_PARAM_H 1
157
158 /* Define to 1 if you have the <sys/stat.h> header file. */
159 #define HAVE_SYS_STAT_H 1
160
161 /* Define to 1 if you have the <sys/types.h> header file. */
162 #define HAVE_SYS_TYPES_H 1
163
164 /* Define to 1 if you have the <termios.h> header file. */
165 #define HAVE_TERMIOS_H 1
166
167 /* Define to 1 if you have the <unistd.h> header file. */
168 #define HAVE_UNISTD_H 1
169
170 /* Define to 1 if you have the `vprintf' function. */
171 #define HAVE_VPRINTF 1
172
173 /* Define to 1 if you have the <wchar.h> header file. */
174 #define HAVE_WCHAR_H 1
175
176 /* Define to 1 if the system has the type `_Bool'. */
177 #define HAVE__BOOL 1
178
179 /* Define to 1 if you have the `__argz_count' function. */
180 #define HAVE___ARGZ_COUNT 1
181
182 /* Define to 1 if you have the `__argz_next' function. */
183 #define HAVE___ARGZ_NEXT 1
184
185 /* Define to 1 if you have the `__argz_stringify' function. */
186 #define HAVE___ARGZ_STRINGIFY 1
187
188 /* Define to disable debugging assertions. */
189 /* #undef NDEBUG */
190
191 /* Name of package */
192 #define PACKAGE "madtest"
193
194 /* Define to the address where bug reports for this package should be sent. */
195 #define PACKAGE_BUGREPORT "rob@mars.org"
196
197 /* Define to the full name of this package. */
198 #define PACKAGE_NAME "MPEG audio decoder and player"
199
200 /* Define to the full name and version of this package. */
201 #define PACKAGE_STRING "MPEG audio decoder and player 0.15.2b"
202
203 /* Define to the one symbol short name of this package. */
204 #define PACKAGE_TARNAME "madtest"
205
206 /* Define to the home page for this package. */
207 #define PACKAGE_URL ""
208
209 /* Define to the version of this package. */
210 #define PACKAGE_VERSION "0.15.2b"
211
212 /* If using the C implementation of alloca, define if you know the
213 direction of stack growth for your system; otherwise it will be
214 automatically deduced at runtime.
215 STACK_DIRECTION > 0 => grows toward higher addresses
216 STACK_DIRECTION < 0 => grows toward lower addresses
217 STACK_DIRECTION = 0 => direction of growth unknown */
218 /* #undef STACK_DIRECTION */
219
220 /* Define to 1 if you have the ANSI C header files. */
221 #define STDC_HEADERS 1
222
223 /* Version number of package */
224 #define VERSION "0.15.2b"
225
226 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
227 significant byte first (like Motorola and SPARC, unlike Intel). */
228 #if defined AC_APPLE_UNIVERSAL_BUILD
229 # if defined __BIG_ENDIAN__
230 # define WORDS_BIGENDIAN 1
231 # endif
232 #else
233 # ifndef WORDS_BIGENDIAN
234 /* # undef WORDS_BIGENDIAN */
235 # endif
236 #endif
237
238 /* Define to empty if `const' does not conform to ANSI C. */
239 /* #undef const */
240
241 /* Define to `__inline__' or `__inline' if that's what the C compiler
242 calls it, or to nothing if 'inline' is not supported under any name. */
243 #ifndef __cplusplus
244 /* #undef inline */
245 #endif
246
247 /* Define to rpl_malloc if the replacement function should be used. */
248 /* #undef malloc */
249
250 /* Define to rpl_realloc if the replacement function should be used. */
251 /* #undef realloc */
252
253 /* Define to `unsigned int' if <sys/types.h> does not define. */
254 /* #undef size_t */
255
256 /* Define to `int' if <sys/types.h> does not define. */
257 /* #undef ssize_t */
0 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define if building universal (internal helper macro) */
3 #undef AC_APPLE_UNIVERSAL_BUILD
4
5 /* audio_wav */
6 #undef AUDIO_DEFAULT
7
8 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
9 systems. This function is required for `alloca.c' support on those systems.
10 */
11 #undef CRAY_STACKSEG_END
12
13 /* Define to 1 if using `alloca.c'. */
14 #undef C_ALLOCA
15
16 /* Define to enable diagnostic debugging support. */
17 #undef DEBUG
18
19 /* Define to enable experimental code. */
20 #undef EXPERIMENTAL
21
22 /* Define to 1 if you have `alloca', as a function or macro. */
23 #undef HAVE_ALLOCA
24
25 /* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
26 */
27 #undef HAVE_ALLOCA_H
28
29 /* Define to 1 if you have the <argz.h> header file. */
30 #undef HAVE_ARGZ_H
31
32 /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
33 #undef HAVE_DOPRNT
34
35 /* Define to 1 if you have the <fcntl.h> header file. */
36 #undef HAVE_FCNTL_H
37
38 /* Define to 1 if you have the <float.h> header file. */
39 #undef HAVE_FLOAT_H
40
41 /* Define to 1 if you have the `getcwd' function. */
42 #undef HAVE_GETCWD
43
44 /* Define to 1 if you have the `getpagesize' function. */
45 #undef HAVE_GETPAGESIZE
46
47 /* Define to 1 if you have the <inttypes.h> header file. */
48 #undef HAVE_INTTYPES_H
49
50 /* Define to 1 if you have the <langinfo.h> header file. */
51 #undef HAVE_LANGINFO_H
52
53 /* Define to 1 if you have the `efence' library (-lefence). */
54 #undef HAVE_LIBEFENCE
55
56 /* Define to 1 if you have the <libintl.h> header file. */
57 #undef HAVE_LIBINTL_H
58
59 /* Define to 1 if you have the <limits.h> header file. */
60 #undef HAVE_LIMITS_H
61
62 /* Define to 1 if you have the `localeconv' function. */
63 #undef HAVE_LOCALECONV
64
65 /* Define to 1 if you have the <locale.h> header file. */
66 #undef HAVE_LOCALE_H
67
68 /* Define to 1 if you have the `madvise' function. */
69 #undef HAVE_MADVISE
70
71 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
72 to 0 otherwise. */
73 #undef HAVE_MALLOC
74
75 /* Define to 1 if you have the <malloc.h> header file. */
76 #undef HAVE_MALLOC_H
77
78 /* Define to 1 if you have the `memmove' function. */
79 #undef HAVE_MEMMOVE
80
81 /* Define to 1 if you have the <memory.h> header file. */
82 #undef HAVE_MEMORY_H
83
84 /* Define to 1 if you have the `mempcpy' function. */
85 #undef HAVE_MEMPCPY
86
87 /* Define to 1 if you have the `memset' function. */
88 #undef HAVE_MEMSET
89
90 /* Define to 1 if you have a working `mmap' system call. */
91 #undef HAVE_MMAP
92
93 /* Define to 1 if you have the `munmap' function. */
94 #undef HAVE_MUNMAP
95
96 /* Define to 1 if you have the `nl_langinfo' function. */
97 #undef HAVE_NL_LANGINFO
98
99 /* Define to 1 if you have the `pow' function. */
100 #undef HAVE_POW
101
102 /* Define to 1 if the system has the type `ptrdiff_t'. */
103 #undef HAVE_PTRDIFF_T
104
105 /* Define to 1 if your system has a GNU libc compatible `realloc' function,
106 and to 0 otherwise. */
107 #undef HAVE_REALLOC
108
109 /* Define to 1 if you have the <stddef.h> header file. */
110 #undef HAVE_STDDEF_H
111
112 /* Define to 1 if you have the <stdint.h> header file. */
113 #undef HAVE_STDINT_H
114
115 /* Define to 1 if you have the <stdio_ext.h> header file. */
116 #undef HAVE_STDIO_EXT_H
117
118 /* Define to 1 if you have the <stdlib.h> header file. */
119 #undef HAVE_STDLIB_H
120
121 /* Define to 1 if you have the `stpcpy' function. */
122 #undef HAVE_STPCPY
123
124 /* Define to 1 if you have the `strcasecmp' function. */
125 #undef HAVE_STRCASECMP
126
127 /* Define to 1 if you have the `strchr' function. */
128 #undef HAVE_STRCHR
129
130 /* Define to 1 if you have the `strcspn' function. */
131 #undef HAVE_STRCSPN
132
133 /* Define to 1 if you have the <strings.h> header file. */
134 #undef HAVE_STRINGS_H
135
136 /* Define to 1 if you have the <string.h> header file. */
137 #undef HAVE_STRING_H
138
139 /* Define to 1 if you have the `strncasecmp' function. */
140 #undef HAVE_STRNCASECMP
141
142 /* Define to 1 if you have the `strrchr' function. */
143 #undef HAVE_STRRCHR
144
145 /* Define to 1 if you have the `strstr' function. */
146 #undef HAVE_STRSTR
147
148 /* Define to 1 if you have the `strtol' function. */
149 #undef HAVE_STRTOL
150
151 /* Define to 1 if you have the `strtoul' function. */
152 #undef HAVE_STRTOUL
153
154 /* Define to 1 if you have the <sys/param.h> header file. */
155 #undef HAVE_SYS_PARAM_H
156
157 /* Define to 1 if you have the <sys/stat.h> header file. */
158 #undef HAVE_SYS_STAT_H
159
160 /* Define to 1 if you have the <sys/types.h> header file. */
161 #undef HAVE_SYS_TYPES_H
162
163 /* Define to 1 if you have the <termios.h> header file. */
164 #undef HAVE_TERMIOS_H
165
166 /* Define to 1 if you have the <unistd.h> header file. */
167 #undef HAVE_UNISTD_H
168
169 /* Define to 1 if you have the `vprintf' function. */
170 #undef HAVE_VPRINTF
171
172 /* Define to 1 if you have the <wchar.h> header file. */
173 #undef HAVE_WCHAR_H
174
175 /* Define to 1 if the system has the type `_Bool'. */
176 #undef HAVE__BOOL
177
178 /* Define to 1 if you have the `__argz_count' function. */
179 #undef HAVE___ARGZ_COUNT
180
181 /* Define to 1 if you have the `__argz_next' function. */
182 #undef HAVE___ARGZ_NEXT
183
184 /* Define to 1 if you have the `__argz_stringify' function. */
185 #undef HAVE___ARGZ_STRINGIFY
186
187 /* Define to disable debugging assertions. */
188 #undef NDEBUG
189
190 /* Name of package */
191 #undef PACKAGE
192
193 /* Define to the address where bug reports for this package should be sent. */
194 #undef PACKAGE_BUGREPORT
195
196 /* Define to the full name of this package. */
197 #undef PACKAGE_NAME
198
199 /* Define to the full name and version of this package. */
200 #undef PACKAGE_STRING
201
202 /* Define to the one symbol short name of this package. */
203 #undef PACKAGE_TARNAME
204
205 /* Define to the home page for this package. */
206 #undef PACKAGE_URL
207
208 /* Define to the version of this package. */
209 #undef PACKAGE_VERSION
210
211 /* If using the C implementation of alloca, define if you know the
212 direction of stack growth for your system; otherwise it will be
213 automatically deduced at runtime.
214 STACK_DIRECTION > 0 => grows toward higher addresses
215 STACK_DIRECTION < 0 => grows toward lower addresses
216 STACK_DIRECTION = 0 => direction of growth unknown */
217 #undef STACK_DIRECTION
218
219 /* Define to 1 if you have the ANSI C header files. */
220 #undef STDC_HEADERS
221
222 /* Version number of package */
223 #undef VERSION
224
225 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
226 significant byte first (like Motorola and SPARC, unlike Intel). */
227 #if defined AC_APPLE_UNIVERSAL_BUILD
228 # if defined __BIG_ENDIAN__
229 # define WORDS_BIGENDIAN 1
230 # endif
231 #else
232 # ifndef WORDS_BIGENDIAN
233 # undef WORDS_BIGENDIAN
234 # endif
235 #endif
236
237 /* Define to empty if `const' does not conform to ANSI C. */
238 #undef const
239
240 /* Define to `__inline__' or `__inline' if that's what the C compiler
241 calls it, or to nothing if 'inline' is not supported under any name. */
242 #ifndef __cplusplus
243 #undef inline
244 #endif
245
246 /* Define to rpl_malloc if the replacement function should be used. */
247 #undef malloc
248
249 /* Define to rpl_realloc if the replacement function should be used. */
250 #undef realloc
251
252 /* Define to `unsigned int' if <sys/types.h> does not define. */
253 #undef size_t
254
255 /* Define to `int' if <sys/types.h> does not define. */
256 #undef ssize_t
0 #! /bin/bash
1 # Generated by configure.
2 # Run this file to recreate the current configuration.
3 # Compiler output produced by configure, useful for debugging
4 # configure, is in config.log if it exists.
5
6 debug=false
7 ac_cs_recheck=false
8 ac_cs_silent=false
9
10 SHELL=${CONFIG_SHELL-/bin/bash}
11 export SHELL
12 ## -------------------- ##
13 ## M4sh Initialization. ##
14 ## -------------------- ##
15
16 # Be more Bourne compatible
17 DUALCASE=1; export DUALCASE # for MKS sh
18 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19 emulate sh
20 NULLCMD=:
21 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
24 setopt NO_GLOB_SUBST
25 else
26 case `(set -o) 2>/dev/null` in #(
27 *posix*) :
28 set -o posix ;; #(
29 *) :
30 ;;
31 esac
32 fi
33
34
35 as_nl='
36 '
37 export as_nl
38 # Printing a long string crashes Solaris 7 /usr/bin/printf.
39 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
42 # Prefer a ksh shell builtin over an external printf program on Solaris,
43 # but without wasting forks for bash or zsh.
44 if test -z "$BASH_VERSION$ZSH_VERSION" \
45 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
46 as_echo='print -r --'
47 as_echo_n='print -rn --'
48 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='printf %s\n'
50 as_echo_n='printf %s'
51 else
52 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
54 as_echo_n='/usr/ucb/echo -n'
55 else
56 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
57 as_echo_n_body='eval
58 arg=$1;
59 case $arg in #(
60 *"$as_nl"*)
61 expr "X$arg" : "X\\(.*\\)$as_nl";
62 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
63 esac;
64 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65 '
66 export as_echo_n_body
67 as_echo_n='sh -c $as_echo_n_body as_echo'
68 fi
69 export as_echo_body
70 as_echo='sh -c $as_echo_body as_echo'
71 fi
72
73 # The user is always right.
74 if test "${PATH_SEPARATOR+set}" != set; then
75 PATH_SEPARATOR=:
76 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
77 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
78 PATH_SEPARATOR=';'
79 }
80 fi
81
82
83 # IFS
84 # We need space, tab and new line, in precisely that order. Quoting is
85 # there to prevent editors from complaining about space-tab.
86 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
87 # splitting by setting IFS to empty value.)
88 IFS=" "" $as_nl"
89
90 # Find who we are. Look in the path if we contain no directory separator.
91 as_myself=
92 case $0 in #((
93 *[\\/]* ) as_myself=$0 ;;
94 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
95 for as_dir in $PATH
96 do
97 IFS=$as_save_IFS
98 test -z "$as_dir" && as_dir=.
99 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
100 done
101 IFS=$as_save_IFS
102
103 ;;
104 esac
105 # We did not find ourselves, most probably we were run as `sh COMMAND'
106 # in which case we are not to be found in the path.
107 if test "x$as_myself" = x; then
108 as_myself=$0
109 fi
110 if test ! -f "$as_myself"; then
111 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
112 exit 1
113 fi
114
115 # Unset variables that we do not need and which cause bugs (e.g. in
116 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
117 # suppresses any "Segmentation fault" message there. '((' could
118 # trigger a bug in pdksh 5.2.14.
119 for as_var in BASH_ENV ENV MAIL MAILPATH
120 do eval test x\${$as_var+set} = xset \
121 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
122 done
123 PS1='$ '
124 PS2='> '
125 PS4='+ '
126
127 # NLS nuisances.
128 LC_ALL=C
129 export LC_ALL
130 LANGUAGE=C
131 export LANGUAGE
132
133 # CDPATH.
134 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135
136
137 # as_fn_error STATUS ERROR [LINENO LOG_FD]
138 # ----------------------------------------
139 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
140 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
141 # script with STATUS, using 1 if that was 0.
142 as_fn_error ()
143 {
144 as_status=$1; test $as_status -eq 0 && as_status=1
145 if test "$4"; then
146 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
147 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
148 fi
149 $as_echo "$as_me: error: $2" >&2
150 as_fn_exit $as_status
151 } # as_fn_error
152
153
154 # as_fn_set_status STATUS
155 # -----------------------
156 # Set $? to STATUS, without forking.
157 as_fn_set_status ()
158 {
159 return $1
160 } # as_fn_set_status
161
162 # as_fn_exit STATUS
163 # -----------------
164 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
165 as_fn_exit ()
166 {
167 set +e
168 as_fn_set_status $1
169 exit $1
170 } # as_fn_exit
171
172 # as_fn_unset VAR
173 # ---------------
174 # Portably unset VAR.
175 as_fn_unset ()
176 {
177 { eval $1=; unset $1;}
178 }
179 as_unset=as_fn_unset
180 # as_fn_append VAR VALUE
181 # ----------------------
182 # Append the text in VALUE to the end of the definition contained in VAR. Take
183 # advantage of any shell optimizations that allow amortized linear growth over
184 # repeated appends, instead of the typical quadratic growth present in naive
185 # implementations.
186 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
187 eval 'as_fn_append ()
188 {
189 eval $1+=\$2
190 }'
191 else
192 as_fn_append ()
193 {
194 eval $1=\$$1\$2
195 }
196 fi # as_fn_append
197
198 # as_fn_arith ARG...
199 # ------------------
200 # Perform arithmetic evaluation on the ARGs, and store the result in the
201 # global $as_val. Take advantage of shells that can avoid forks. The arguments
202 # must be portable across $(()) and expr.
203 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
204 eval 'as_fn_arith ()
205 {
206 as_val=$(( $* ))
207 }'
208 else
209 as_fn_arith ()
210 {
211 as_val=`expr "$@" || test $? -eq 1`
212 }
213 fi # as_fn_arith
214
215
216 if expr a : '\(a\)' >/dev/null 2>&1 &&
217 test "X`expr 00001 : '.*\(...\)'`" = X001; then
218 as_expr=expr
219 else
220 as_expr=false
221 fi
222
223 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
224 as_basename=basename
225 else
226 as_basename=false
227 fi
228
229 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
230 as_dirname=dirname
231 else
232 as_dirname=false
233 fi
234
235 as_me=`$as_basename -- "$0" ||
236 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
237 X"$0" : 'X\(//\)$' \| \
238 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
239 $as_echo X/"$0" |
240 sed '/^.*\/\([^/][^/]*\)\/*$/{
241 s//\1/
242 q
243 }
244 /^X\/\(\/\/\)$/{
245 s//\1/
246 q
247 }
248 /^X\/\(\/\).*/{
249 s//\1/
250 q
251 }
252 s/.*/./; q'`
253
254 # Avoid depending upon Character Ranges.
255 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
256 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
257 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
258 as_cr_digits='0123456789'
259 as_cr_alnum=$as_cr_Letters$as_cr_digits
260
261 ECHO_C= ECHO_N= ECHO_T=
262 case `echo -n x` in #(((((
263 -n*)
264 case `echo 'xy\c'` in
265 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
266 xy) ECHO_C='\c';;
267 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
268 ECHO_T=' ';;
269 esac;;
270 *)
271 ECHO_N='-n';;
272 esac
273
274 rm -f conf$$ conf$$.exe conf$$.file
275 if test -d conf$$.dir; then
276 rm -f conf$$.dir/conf$$.file
277 else
278 rm -f conf$$.dir
279 mkdir conf$$.dir 2>/dev/null
280 fi
281 if (echo >conf$$.file) 2>/dev/null; then
282 if ln -s conf$$.file conf$$ 2>/dev/null; then
283 as_ln_s='ln -s'
284 # ... but there are two gotchas:
285 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
286 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
287 # In both cases, we have to default to `cp -pR'.
288 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
289 as_ln_s='cp -pR'
290 elif ln conf$$.file conf$$ 2>/dev/null; then
291 as_ln_s=ln
292 else
293 as_ln_s='cp -pR'
294 fi
295 else
296 as_ln_s='cp -pR'
297 fi
298 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
299 rmdir conf$$.dir 2>/dev/null
300
301
302 # as_fn_mkdir_p
303 # -------------
304 # Create "$as_dir" as a directory, including parents if necessary.
305 as_fn_mkdir_p ()
306 {
307
308 case $as_dir in #(
309 -*) as_dir=./$as_dir;;
310 esac
311 test -d "$as_dir" || eval $as_mkdir_p || {
312 as_dirs=
313 while :; do
314 case $as_dir in #(
315 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
316 *) as_qdir=$as_dir;;
317 esac
318 as_dirs="'$as_qdir' $as_dirs"
319 as_dir=`$as_dirname -- "$as_dir" ||
320 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
321 X"$as_dir" : 'X\(//\)[^/]' \| \
322 X"$as_dir" : 'X\(//\)$' \| \
323 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
324 $as_echo X"$as_dir" |
325 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
326 s//\1/
327 q
328 }
329 /^X\(\/\/\)[^/].*/{
330 s//\1/
331 q
332 }
333 /^X\(\/\/\)$/{
334 s//\1/
335 q
336 }
337 /^X\(\/\).*/{
338 s//\1/
339 q
340 }
341 s/.*/./; q'`
342 test -d "$as_dir" && break
343 done
344 test -z "$as_dirs" || eval "mkdir $as_dirs"
345 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
346
347
348 } # as_fn_mkdir_p
349 if mkdir -p . 2>/dev/null; then
350 as_mkdir_p='mkdir -p "$as_dir"'
351 else
352 test -d ./-p && rmdir ./-p
353 as_mkdir_p=false
354 fi
355
356
357 # as_fn_executable_p FILE
358 # -----------------------
359 # Test if FILE is an executable regular file.
360 as_fn_executable_p ()
361 {
362 test -f "$1" && test -x "$1"
363 } # as_fn_executable_p
364 as_test_x='test -x'
365 as_executable_p=as_fn_executable_p
366
367 # Sed expression to map a string onto a valid CPP name.
368 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
369
370 # Sed expression to map a string onto a valid variable name.
371 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
372
373
374 exec 6>&1
375 ## ----------------------------------- ##
376 ## Main body of $CONFIG_STATUS script. ##
377 ## ----------------------------------- ##
378 # Save the log message, to keep $0 and so on meaningful, and to
379 # report actual input values of CONFIG_FILES etc. instead of their
380 # values after options handling.
381 ac_log="
382 This file was extended by MPEG audio decoder and player $as_me 0.15.2b, which was
383 generated by GNU Autoconf 2.69. Invocation command line was
384
385 CONFIG_FILES = $CONFIG_FILES
386 CONFIG_HEADERS = $CONFIG_HEADERS
387 CONFIG_LINKS = $CONFIG_LINKS
388 CONFIG_COMMANDS = $CONFIG_COMMANDS
389 $ $0 $@
390
391 on `(hostname || uname -n) 2>/dev/null | sed 1q`
392 "
393
394 # Files that config.status was made for.
395 config_files=" Makefile m4/Makefile"
396 config_headers=" config.h"
397 config_commands=" depfiles"
398
399 ac_cs_usage="\
400 \`$as_me' instantiates files and other configuration actions
401 from templates according to the current configuration. Unless the files
402 and actions are specified as TAGs, all are instantiated by default.
403
404 Usage: $0 [OPTION]... [TAG]...
405
406 -h, --help print this help, then exit
407 -V, --version print version number and configuration settings, then exit
408 --config print configuration, then exit
409 -q, --quiet, --silent
410 do not print progress messages
411 -d, --debug don't remove temporary files
412 --recheck update $as_me by reconfiguring in the same conditions
413 --file=FILE[:TEMPLATE]
414 instantiate the configuration file FILE
415 --header=FILE[:TEMPLATE]
416 instantiate the configuration header FILE
417
418 Configuration files:
419 $config_files
420
421 Configuration headers:
422 $config_headers
423
424 Configuration commands:
425 $config_commands
426
427 Report bugs to <rob@mars.org>."
428
429 ac_cs_config=""
430 ac_cs_version="\
431 MPEG audio decoder and player config.status 0.15.2b
432 configured by ./configure, generated by GNU Autoconf 2.69,
433 with options \"$ac_cs_config\"
434
435 Copyright (C) 2012 Free Software Foundation, Inc.
436 This config.status script is free software; the Free Software Foundation
437 gives unlimited permission to copy, distribute and modify it."
438
439 ac_pwd='/home/jos/src/own_stuff/daisy-player/src/madplay'
440 srcdir='.'
441 INSTALL='/usr/bin/install -c'
442 MKDIR_P='/bin/mkdir -p'
443 AWK='gawk'
444 test -n "$AWK" || AWK=awk
445 # The default lists apply if the user does not specify any file.
446 ac_need_defaults=:
447 while test $# != 0
448 do
449 case $1 in
450 --*=?*)
451 ac_option=`expr "X$1" : 'X\([^=]*\)='`
452 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
453 ac_shift=:
454 ;;
455 --*=)
456 ac_option=`expr "X$1" : 'X\([^=]*\)='`
457 ac_optarg=
458 ac_shift=:
459 ;;
460 *)
461 ac_option=$1
462 ac_optarg=$2
463 ac_shift=shift
464 ;;
465 esac
466
467 case $ac_option in
468 # Handling of the options.
469 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
470 ac_cs_recheck=: ;;
471 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
472 $as_echo "$ac_cs_version"; exit ;;
473 --config | --confi | --conf | --con | --co | --c )
474 $as_echo "$ac_cs_config"; exit ;;
475 --debug | --debu | --deb | --de | --d | -d )
476 debug=: ;;
477 --file | --fil | --fi | --f )
478 $ac_shift
479 case $ac_optarg in
480 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
481 '') as_fn_error $? "missing file argument" ;;
482 esac
483 as_fn_append CONFIG_FILES " '$ac_optarg'"
484 ac_need_defaults=false;;
485 --header | --heade | --head | --hea )
486 $ac_shift
487 case $ac_optarg in
488 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
489 esac
490 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
491 ac_need_defaults=false;;
492 --he | --h)
493 # Conflict between --help and --header
494 as_fn_error $? "ambiguous option: \`$1'
495 Try \`$0 --help' for more information.";;
496 --help | --hel | -h )
497 $as_echo "$ac_cs_usage"; exit ;;
498 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
499 | -silent | --silent | --silen | --sile | --sil | --si | --s)
500 ac_cs_silent=: ;;
501
502 # This is an error.
503 -*) as_fn_error $? "unrecognized option: \`$1'
504 Try \`$0 --help' for more information." ;;
505
506 *) as_fn_append ac_config_targets " $1"
507 ac_need_defaults=false ;;
508
509 esac
510 shift
511 done
512
513 ac_configure_extra_args=
514
515 if $ac_cs_silent; then
516 exec 6>/dev/null
517 ac_configure_extra_args="$ac_configure_extra_args --silent"
518 fi
519
520 if $ac_cs_recheck; then
521 set X /bin/bash './configure' $ac_configure_extra_args --no-create --no-recursion
522 shift
523 $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6
524 CONFIG_SHELL='/bin/bash'
525 export CONFIG_SHELL
526 exec "$@"
527 fi
528
529 exec 5>>config.log
530 {
531 echo
532 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
533 ## Running $as_me. ##
534 _ASBOX
535 $as_echo "$ac_log"
536 } >&5
537
538 #
539 # INIT-COMMANDS
540 #
541 AMDEP_TRUE="" ac_aux_dir="."
542
543
544 # Handling of arguments.
545 for ac_config_target in $ac_config_targets
546 do
547 case $ac_config_target in
548 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
549 "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
550 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
551 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
552
553 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
554 esac
555 done
556
557
558 # If the user did not use the arguments to specify the items to instantiate,
559 # then the envvar interface is used. Set only those that are not.
560 # We use the long form for the default assignment because of an extremely
561 # bizarre bug on SunOS 4.1.3.
562 if $ac_need_defaults; then
563 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
564 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
565 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
566 fi
567
568 # Have a temporary directory for convenience. Make it in the build tree
569 # simply because there is no reason against having it here, and in addition,
570 # creating and moving files from /tmp can sometimes cause problems.
571 # Hook for its removal unless debugging.
572 # Note that there is a small window in which the directory will not be cleaned:
573 # after its creation but before its name has been assigned to `$tmp'.
574 $debug ||
575 {
576 tmp= ac_tmp=
577 trap 'exit_status=$?
578 : "${ac_tmp:=$tmp}"
579 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
580 ' 0
581 trap 'as_fn_exit 1' 1 2 13 15
582 }
583 # Create a (secure) tmp directory for tmp files.
584
585 {
586 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
587 test -d "$tmp"
588 } ||
589 {
590 tmp=./conf$$-$RANDOM
591 (umask 077 && mkdir "$tmp")
592 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
593 ac_tmp=$tmp
594
595 # Set up the scripts for CONFIG_FILES section.
596 # No need to generate them if there are no CONFIG_FILES.
597 # This happens for instance with `./config.status config.h'.
598 if test -n "$CONFIG_FILES"; then
599
600
601 ac_cr=`echo X | tr X '\015'`
602 # On cygwin, bash can eat \r inside `` if the user requested igncr.
603 # But we know of no other shell where ac_cr would be empty at this
604 # point, so we can use a bashism as a fallback.
605 if test "x$ac_cr" = x; then
606 eval ac_cr=\$\'\\r\'
607 fi
608 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
609 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
610 ac_cs_awk_cr='\\r'
611 else
612 ac_cs_awk_cr=$ac_cr
613 fi
614
615 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
616 cat >>"$ac_tmp/subs1.awk" <<\_ACAWK &&
617 S["am__EXEEXT_FALSE"]=""
618 S["am__EXEEXT_TRUE"]="#"
619 S["LTLIBOBJS"]=""
620 S["ldadd_audio"]=""
621 S["depend_audio"]=""
622 S["am__fastdepCXX_FALSE"]="#"
623 S["am__fastdepCXX_TRUE"]=""
624 S["CXXDEPMODE"]="depmode=gcc3"
625 S["ac_ct_CXX"]="g++"
626 S["CXXFLAGS"]="-g -O2"
627 S["CXX"]="g++"
628 S["POW_LIB"]=""
629 S["ALLOCA"]=""
630 S["LN_S"]="ln -s"
631 S["YFLAGS"]=""
632 S["YACC"]="bison -y"
633 S["LIBOBJS"]=""
634 S["EGREP"]="/bin/grep -E"
635 S["GREP"]="/bin/grep"
636 S["CPP"]="gcc -E"
637 S["am__fastdepCC_FALSE"]="#"
638 S["am__fastdepCC_TRUE"]=""
639 S["CCDEPMODE"]="depmode=gcc3"
640 S["am__nodep"]="_no"
641 S["AMDEPBACKSLASH"]="\\"
642 S["AMDEP_FALSE"]="#"
643 S["AMDEP_TRUE"]=""
644 S["am__quote"]=""
645 S["am__include"]="include"
646 S["DEPDIR"]=".deps"
647 S["OBJEXT"]="o"
648 S["EXEEXT"]=""
649 S["ac_ct_CC"]="gcc"
650 S["CPPFLAGS"]=""
651 S["LDFLAGS"]=""
652 S["CFLAGS"]="-g -O2"
653 S["CC"]="gcc"
654 S["host_os"]="linux-gnu"
655 S["host_vendor"]="pc"
656 S["host_cpu"]="x86_64"
657 S["host"]="x86_64-pc-linux-gnu"
658 S["build_os"]="linux-gnu"
659 S["build_vendor"]="pc"
660 S["build_cpu"]="x86_64"
661 S["build"]="x86_64-pc-linux-gnu"
662 S["AM_BACKSLASH"]="\\"
663 S["AM_DEFAULT_VERBOSITY"]="1"
664 S["AM_DEFAULT_V"]="$(AM_DEFAULT_VERBOSITY)"
665 S["AM_V"]="$(V)"
666 S["am__untar"]="$${TAR-tar} xf -"
667 S["am__tar"]="$${TAR-tar} chof - \"$$tardir\""
668 S["AMTAR"]="$${TAR-tar}"
669 S["am__leading_dot"]="."
670 S["SET_MAKE"]=""
671 S["AWK"]="gawk"
672 S["mkdir_p"]="$(MKDIR_P)"
673 S["MKDIR_P"]="/bin/mkdir -p"
674 S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s"
675 S["STRIP"]=""
676 S["install_sh"]="${SHELL} /home/jos/src/own_stuff/daisy-player/src/madplay/install-sh"
677 S["MAKEINFO"]="${SHELL} /home/jos/src/own_stuff/daisy-player/src/madplay/missing makeinfo"
678 S["AUTOHEADER"]="${SHELL} /home/jos/src/own_stuff/daisy-player/src/madplay/missing autoheader"
679 S["AUTOMAKE"]="${SHELL} /home/jos/src/own_stuff/daisy-player/src/madplay/missing automake-1.15"
680 S["AUTOCONF"]="${SHELL} /home/jos/src/own_stuff/daisy-player/src/madplay/missing autoconf"
681 S["ACLOCAL"]="${SHELL} /home/jos/src/own_stuff/daisy-player/src/madplay/missing aclocal-1.15"
682 S["VERSION"]="0.15.2b"
683 S["PACKAGE"]="madtest"
684 S["CYGPATH_W"]="echo"
685 S["am__isrc"]=""
686 S["INSTALL_DATA"]="${INSTALL} -m 644"
687 S["INSTALL_SCRIPT"]="${INSTALL}"
688 S["INSTALL_PROGRAM"]="${INSTALL}"
689 S["target_alias"]=""
690 S["host_alias"]=""
691 S["build_alias"]=""
692 S["LIBS"]="-lm "
693 S["ECHO_T"]=""
694 S["ECHO_N"]="-n"
695 S["ECHO_C"]=""
696 S["DEFS"]="-DHAVE_CONFIG_H"
697 S["mandir"]="${datarootdir}/man"
698 S["localedir"]="${datarootdir}/locale"
699 S["libdir"]="${exec_prefix}/lib"
700 S["psdir"]="${docdir}"
701 S["pdfdir"]="${docdir}"
702 S["dvidir"]="${docdir}"
703 S["htmldir"]="${docdir}"
704 S["infodir"]="${datarootdir}/info"
705 S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}"
706 S["oldincludedir"]="/usr/include"
707 S["includedir"]="${prefix}/include"
708 S["runstatedir"]="${localstatedir}/run"
709 S["localstatedir"]="${prefix}/var"
710 S["sharedstatedir"]="${prefix}/com"
711 S["sysconfdir"]="${prefix}/etc"
712 S["datadir"]="${datarootdir}"
713 S["datarootdir"]="${prefix}/share"
714 S["libexecdir"]="${exec_prefix}/libexec"
715 S["sbindir"]="${exec_prefix}/sbin"
716 S["bindir"]="${exec_prefix}/bin"
717 S["program_transform_name"]="s,x,x,"
718 S["prefix"]="/usr/local"
719 S["exec_prefix"]="${prefix}"
720 S["PACKAGE_URL"]=""
721 S["PACKAGE_BUGREPORT"]="rob@mars.org"
722 S["PACKAGE_STRING"]="MPEG audio decoder and player 0.15.2b"
723 S["PACKAGE_VERSION"]="0.15.2b"
724 S["PACKAGE_TARNAME"]="madtest"
725 S["PACKAGE_NAME"]="MPEG audio decoder and player"
726 S["PATH_SEPARATOR"]=":"
727 S["SHELL"]="/bin/bash"
728 _ACAWK
729 cat >>"$ac_tmp/subs1.awk" <<_ACAWK &&
730 for (key in S) S_is_set[key] = 1
731 FS = ""
732
733 }
734 {
735 line = $ 0
736 nfields = split(line, field, "@")
737 substed = 0
738 len = length(field[1])
739 for (i = 2; i < nfields; i++) {
740 key = field[i]
741 keylen = length(key)
742 if (S_is_set[key]) {
743 value = S[key]
744 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
745 len += length(value) + length(field[++i])
746 substed = 1
747 } else
748 len += 1 + keylen
749 }
750
751 print line
752 }
753
754 _ACAWK
755 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
756 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
757 else
758 cat
759 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
760 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
761 fi # test -n "$CONFIG_FILES"
762
763 # Set up the scripts for CONFIG_HEADERS section.
764 # No need to generate them if there are no CONFIG_HEADERS.
765 # This happens for instance with `./config.status Makefile'.
766 if test -n "$CONFIG_HEADERS"; then
767 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
768 BEGIN {
769 D["PACKAGE_NAME"]=" \"MPEG audio decoder and player\""
770 D["PACKAGE_TARNAME"]=" \"madtest\""
771 D["PACKAGE_VERSION"]=" \"0.15.2b\""
772 D["PACKAGE_STRING"]=" \"MPEG audio decoder and player 0.15.2b\""
773 D["PACKAGE_BUGREPORT"]=" \"rob@mars.org\""
774 D["PACKAGE_URL"]=" \"\""
775 D["PACKAGE"]=" \"madtest\""
776 D["VERSION"]=" \"0.15.2b\""
777 D["STDC_HEADERS"]=" 1"
778 D["HAVE_SYS_TYPES_H"]=" 1"
779 D["HAVE_SYS_STAT_H"]=" 1"
780 D["HAVE_STDLIB_H"]=" 1"
781 D["HAVE_STRING_H"]=" 1"
782 D["HAVE_MEMORY_H"]=" 1"
783 D["HAVE_STRINGS_H"]=" 1"
784 D["HAVE_INTTYPES_H"]=" 1"
785 D["HAVE_STDINT_H"]=" 1"
786 D["HAVE_UNISTD_H"]=" 1"
787 D["HAVE_VPRINTF"]=" 1"
788 D["HAVE_STDLIB_H"]=" 1"
789 D["HAVE_UNISTD_H"]=" 1"
790 D["HAVE_SYS_PARAM_H"]=" 1"
791 D["HAVE_GETPAGESIZE"]=" 1"
792 D["HAVE_MMAP"]=" 1"
793 D["HAVE_MADVISE"]=" 1"
794 D["HAVE_LOCALECONV"]=" 1"
795 D["HAVE_STRCASECMP"]=" 1"
796 D["HAVE_STRNCASECMP"]=" 1"
797 D["HAVE___ARGZ_COUNT"]=" 1"
798 D["HAVE___ARGZ_NEXT"]=" 1"
799 D["HAVE___ARGZ_STRINGIFY"]=" 1"
800 D["HAVE_MEMMOVE"]=" 1"
801 D["HAVE_MUNMAP"]=" 1"
802 D["HAVE_STRCASECMP"]=" 1"
803 D["HAVE_MEMSET"]=" 1"
804 D["HAVE_NL_LANGINFO"]=" 1"
805 D["HAVE_POW"]=" 1"
806 D["HAVE_STRCHR"]=" 1"
807 D["HAVE_STRCSPN"]=" 1"
808 D["HAVE_STRNCASECMP"]=" 1"
809 D["HAVE_STRRCHR"]=" 1"
810 D["HAVE_STRSTR"]=" 1"
811 D["HAVE_STRTOL"]=" 1"
812 D["HAVE_FLOAT_H"]=" 1"
813 D["HAVE_FCNTL_H"]=" 1"
814 D["HAVE_TERMIOS_H"]=" 1"
815 D["HAVE_LANGINFO_H"]=" 1"
816 D["HAVE_LIBINTL_H"]=" 1"
817 D["HAVE_LOCALE_H"]=" 1"
818 D["HAVE_MALLOC_H"]=" 1"
819 D["HAVE_STDIO_EXT_H"]=" 1"
820 D["HAVE_WCHAR_H"]=" 1"
821 D["HAVE__BOOL"]=" 1"
822 D["HAVE_PTRDIFF_T"]=" 1"
823 D["HAVE_GETCWD"]=" 1"
824 D["HAVE_MEMPCPY"]=" 1"
825 D["HAVE_STPCPY"]=" 1"
826 D["HAVE_STRTOUL"]=" 1"
827 D["HAVE_ARGZ_H"]=" 1"
828 D["HAVE_LIMITS_H"]=" 1"
829 D["HAVE_STDDEF_H"]=" 1"
830 D["HAVE_SYS_PARAM_H"]=" 1"
831 D["HAVE_ALLOCA_H"]=" 1"
832 D["HAVE_ALLOCA"]=" 1"
833 D["HAVE_STDLIB_H"]=" 1"
834 D["HAVE_MALLOC"]=" 1"
835 D["HAVE_STDLIB_H"]=" 1"
836 D["HAVE_REALLOC"]=" 1"
837 D["AUDIO_DEFAULT"]=" /**/"
838 for (key in D) D_is_set[key] = 1
839 FS = ""
840 }
841 /^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ {
842 line = $ 0
843 split(line, arg, " ")
844 if (arg[1] == "#") {
845 defundef = arg[2]
846 mac1 = arg[3]
847 } else {
848 defundef = substr(arg[1], 2)
849 mac1 = arg[2]
850 }
851 split(mac1, mac2, "(") #)
852 macro = mac2[1]
853 prefix = substr(line, 1, index(line, defundef) - 1)
854 if (D_is_set[macro]) {
855 # Preserve the white space surrounding the "#".
856 print prefix "define", macro P[macro] D[macro]
857 next
858 } else {
859 # Replace #undef with comments. This is necessary, for example,
860 # in the case of _POSIX_SOURCE, which is predefined and required
861 # on some systems where configure will not decide to define it.
862 if (defundef == "undef") {
863 print "/*", prefix defundef, macro, "*/"
864 next
865 }
866 }
867 }
868 { print }
869 _ACAWK
870 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
871 fi # test -n "$CONFIG_HEADERS"
872
873
874 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
875 shift
876 for ac_tag
877 do
878 case $ac_tag in
879 :[FHLC]) ac_mode=$ac_tag; continue;;
880 esac
881 case $ac_mode$ac_tag in
882 :[FHL]*:*);;
883 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
884 :[FH]-) ac_tag=-:-;;
885 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
886 esac
887 ac_save_IFS=$IFS
888 IFS=:
889 set x $ac_tag
890 IFS=$ac_save_IFS
891 shift
892 ac_file=$1
893 shift
894
895 case $ac_mode in
896 :L) ac_source=$1;;
897 :[FH])
898 ac_file_inputs=
899 for ac_f
900 do
901 case $ac_f in
902 -) ac_f="$ac_tmp/stdin";;
903 *) # Look for the file first in the build tree, then in the source tree
904 # (if the path is not absolute). The absolute path cannot be DOS-style,
905 # because $ac_f cannot contain `:'.
906 test -f "$ac_f" ||
907 case $ac_f in
908 [\\/$]*) false;;
909 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
910 esac ||
911 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
912 esac
913 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
914 as_fn_append ac_file_inputs " '$ac_f'"
915 done
916
917 # Let's still pretend it is `configure' which instantiates (i.e., don't
918 # use $as_me), people would be surprised to read:
919 # /* config.h. Generated by config.status. */
920 configure_input='Generated from '`
921 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
922 `' by configure.'
923 if test x"$ac_file" != x-; then
924 configure_input="$ac_file. $configure_input"
925 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
926 $as_echo "$as_me: creating $ac_file" >&6;}
927 fi
928 # Neutralize special characters interpreted by sed in replacement strings.
929 case $configure_input in #(
930 *\&* | *\|* | *\\* )
931 ac_sed_conf_input=`$as_echo "$configure_input" |
932 sed 's/[\\\\&|]/\\\\&/g'`;; #(
933 *) ac_sed_conf_input=$configure_input;;
934 esac
935
936 case $ac_tag in
937 *:-:* | *:-) cat >"$ac_tmp/stdin" \
938 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
939 esac
940 ;;
941 esac
942
943 ac_dir=`$as_dirname -- "$ac_file" ||
944 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
945 X"$ac_file" : 'X\(//\)[^/]' \| \
946 X"$ac_file" : 'X\(//\)$' \| \
947 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
948 $as_echo X"$ac_file" |
949 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
950 s//\1/
951 q
952 }
953 /^X\(\/\/\)[^/].*/{
954 s//\1/
955 q
956 }
957 /^X\(\/\/\)$/{
958 s//\1/
959 q
960 }
961 /^X\(\/\).*/{
962 s//\1/
963 q
964 }
965 s/.*/./; q'`
966 as_dir="$ac_dir"; as_fn_mkdir_p
967 ac_builddir=.
968
969 case "$ac_dir" in
970 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
971 *)
972 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
973 # A ".." for each directory in $ac_dir_suffix.
974 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
975 case $ac_top_builddir_sub in
976 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
977 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
978 esac ;;
979 esac
980 ac_abs_top_builddir=$ac_pwd
981 ac_abs_builddir=$ac_pwd$ac_dir_suffix
982 # for backward compatibility:
983 ac_top_builddir=$ac_top_build_prefix
984
985 case $srcdir in
986 .) # We are building in place.
987 ac_srcdir=.
988 ac_top_srcdir=$ac_top_builddir_sub
989 ac_abs_top_srcdir=$ac_pwd ;;
990 [\\/]* | ?:[\\/]* ) # Absolute name.
991 ac_srcdir=$srcdir$ac_dir_suffix;
992 ac_top_srcdir=$srcdir
993 ac_abs_top_srcdir=$srcdir ;;
994 *) # Relative name.
995 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
996 ac_top_srcdir=$ac_top_build_prefix$srcdir
997 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
998 esac
999 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1000
1001
1002 case $ac_mode in
1003 :F)
1004 #
1005 # CONFIG_FILE
1006 #
1007
1008 case $INSTALL in
1009 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
1010 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
1011 esac
1012 ac_MKDIR_P=$MKDIR_P
1013 case $MKDIR_P in
1014 [\\/$]* | ?:[\\/]* ) ;;
1015 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
1016 esac
1017 # If the template does not know about datarootdir, expand it.
1018 # FIXME: This hack should be removed a few years after 2.60.
1019 ac_datarootdir_hack=; ac_datarootdir_seen=
1020 ac_sed_dataroot='
1021 /datarootdir/ {
1022 p
1023 q
1024 }
1025 /@datadir@/p
1026 /@docdir@/p
1027 /@infodir@/p
1028 /@localedir@/p
1029 /@mandir@/p'
1030 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
1031 *datarootdir*) ac_datarootdir_seen=yes;;
1032 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
1033 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
1034 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
1035 ac_datarootdir_hack='
1036 s&@datadir@&${datarootdir}&g
1037 s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g
1038 s&@infodir@&${datarootdir}/info&g
1039 s&@localedir@&${datarootdir}/locale&g
1040 s&@mandir@&${datarootdir}/man&g
1041 s&\${datarootdir}&${prefix}/share&g' ;;
1042 esac
1043 ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{
1044 h
1045 s///
1046 s/^/:/
1047 s/[ ]*$/:/
1048 s/:\$(srcdir):/:/g
1049 s/:\${srcdir}:/:/g
1050 s/:@srcdir@:/:/g
1051 s/^:*//
1052 s/:*$//
1053 x
1054 s/\(=[ ]*\).*/\1/
1055 G
1056 s/\n//
1057 s/^[^=]*=[ ]*$//
1058 }
1059
1060 :t
1061 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
1062 s|@configure_input@|$ac_sed_conf_input|;t t
1063 s&@top_builddir@&$ac_top_builddir_sub&;t t
1064 s&@top_build_prefix@&$ac_top_build_prefix&;t t
1065 s&@srcdir@&$ac_srcdir&;t t
1066 s&@abs_srcdir@&$ac_abs_srcdir&;t t
1067 s&@top_srcdir@&$ac_top_srcdir&;t t
1068 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
1069 s&@builddir@&$ac_builddir&;t t
1070 s&@abs_builddir@&$ac_abs_builddir&;t t
1071 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
1072 s&@INSTALL@&$ac_INSTALL&;t t
1073 s&@MKDIR_P@&$ac_MKDIR_P&;t t
1074 $ac_datarootdir_hack
1075 "
1076 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
1077 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1078
1079 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
1080 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
1081 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
1082 "$ac_tmp/out"`; test -z "$ac_out"; } &&
1083 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
1084 which seems to be undefined. Please make sure it is defined" >&5
1085 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
1086 which seems to be undefined. Please make sure it is defined" >&2;}
1087
1088 rm -f "$ac_tmp/stdin"
1089 case $ac_file in
1090 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
1091 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
1092 esac \
1093 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1094 ;;
1095 :H)
1096 #
1097 # CONFIG_HEADER
1098 #
1099 if test x"$ac_file" != x-; then
1100 {
1101 $as_echo "/* $configure_input */" \
1102 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
1103 } >"$ac_tmp/config.h" \
1104 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1105 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
1106 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
1107 $as_echo "$as_me: $ac_file is unchanged" >&6;}
1108 else
1109 rm -f "$ac_file"
1110 mv "$ac_tmp/config.h" "$ac_file" \
1111 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
1112 fi
1113 else
1114 $as_echo "/* $configure_input */" \
1115 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
1116 || as_fn_error $? "could not create -" "$LINENO" 5
1117 fi
1118 # Compute "$ac_file"'s index in $config_headers.
1119 _am_arg="$ac_file"
1120 _am_stamp_count=1
1121 for _am_header in $config_headers :; do
1122 case $_am_header in
1123 $_am_arg | $_am_arg:* )
1124 break ;;
1125 * )
1126 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1127 esac
1128 done
1129 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
1130 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1131 X"$_am_arg" : 'X\(//\)[^/]' \| \
1132 X"$_am_arg" : 'X\(//\)$' \| \
1133 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
1134 $as_echo X"$_am_arg" |
1135 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1136 s//\1/
1137 q
1138 }
1139 /^X\(\/\/\)[^/].*/{
1140 s//\1/
1141 q
1142 }
1143 /^X\(\/\/\)$/{
1144 s//\1/
1145 q
1146 }
1147 /^X\(\/\).*/{
1148 s//\1/
1149 q
1150 }
1151 s/.*/./; q'`/stamp-h$_am_stamp_count
1152 ;;
1153
1154 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
1155 $as_echo "$as_me: executing $ac_file commands" >&6;}
1156 ;;
1157 esac
1158
1159
1160 case $ac_file$ac_mode in
1161 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
1162 # Older Autoconf quotes --file arguments for eval, but not when files
1163 # are listed without --file. Let's play safe and only enable the eval
1164 # if we detect the quoting.
1165 case $CONFIG_FILES in
1166 *\'*) eval set x "$CONFIG_FILES" ;;
1167 *) set x $CONFIG_FILES ;;
1168 esac
1169 shift
1170 for mf
1171 do
1172 # Strip MF so we end up with the name of the file.
1173 mf=`echo "$mf" | sed -e 's/:.*$//'`
1174 # Check whether this is an Automake generated Makefile or not.
1175 # We used to match only the files named 'Makefile.in', but
1176 # some people rename them; so instead we look at the file content.
1177 # Grep'ing the first line is not enough: some people post-process
1178 # each Makefile.in and add a new line on top of each file to say so.
1179 # Grep'ing the whole file is not good either: AIX grep has a line
1180 # limit of 2048, but all sed's we know have understand at least 4000.
1181 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1182 dirpart=`$as_dirname -- "$mf" ||
1183 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1184 X"$mf" : 'X\(//\)[^/]' \| \
1185 X"$mf" : 'X\(//\)$' \| \
1186 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
1187 $as_echo X"$mf" |
1188 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1189 s//\1/
1190 q
1191 }
1192 /^X\(\/\/\)[^/].*/{
1193 s//\1/
1194 q
1195 }
1196 /^X\(\/\/\)$/{
1197 s//\1/
1198 q
1199 }
1200 /^X\(\/\).*/{
1201 s//\1/
1202 q
1203 }
1204 s/.*/./; q'`
1205 else
1206 continue
1207 fi
1208 # Extract the definition of DEPDIR, am__include, and am__quote
1209 # from the Makefile without running 'make'.
1210 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1211 test -z "$DEPDIR" && continue
1212 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1213 test -z "$am__include" && continue
1214 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1215 # Find all dependency output files, they are included files with
1216 # $(DEPDIR) in their names. We invoke sed twice because it is the
1217 # simplest approach to changing $(DEPDIR) to its actual value in the
1218 # expansion.
1219 for file in `sed -n "
1220 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1221 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
1222 # Make sure the directory exists.
1223 test -f "$dirpart/$file" && continue
1224 fdir=`$as_dirname -- "$file" ||
1225 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1226 X"$file" : 'X\(//\)[^/]' \| \
1227 X"$file" : 'X\(//\)$' \| \
1228 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
1229 $as_echo X"$file" |
1230 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1231 s//\1/
1232 q
1233 }
1234 /^X\(\/\/\)[^/].*/{
1235 s//\1/
1236 q
1237 }
1238 /^X\(\/\/\)$/{
1239 s//\1/
1240 q
1241 }
1242 /^X\(\/\).*/{
1243 s//\1/
1244 q
1245 }
1246 s/.*/./; q'`
1247 as_dir=$dirpart/$fdir; as_fn_mkdir_p
1248 # echo "creating $dirpart/$file"
1249 echo '# dummy' > "$dirpart/$file"
1250 done
1251 done
1252 }
1253 ;;
1254
1255 esac
1256 done # for ac_tag
1257
1258
1259 as_fn_exit 0
0 #! /bin/sh
1 # Configuration validation subroutine script.
2 # Copyright 1992-2016 Free Software Foundation, Inc.
3
4 timestamp='2016-11-04'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program that contains a
21 # configuration script generated by Autoconf, you may include it under
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25
26
27 # Please send patches to <config-patches@gnu.org>.
28 #
29 # Configuration subroutine to validate and canonicalize a configuration type.
30 # Supply the specified configuration type as an argument.
31 # If it is invalid, we print an error message on stderr and exit with code 1.
32 # Otherwise, we print the canonical config type on stdout and succeed.
33
34 # You can get the latest version of this script from:
35 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
36
37 # This file is supposed to be the same for all GNU packages
38 # and recognize all the CPU types, system types and aliases
39 # that are meaningful with *any* GNU software.
40 # Each package is responsible for reporting which valid configurations
41 # it does not support. The user should be able to distinguish
42 # a failure to support a valid configuration from a meaningless
43 # configuration.
44
45 # The goal of this file is to map all the various variations of a given
46 # machine specification into a single specification in the form:
47 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
48 # or in some cases, the newer four-part form:
49 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
50 # It is wrong to echo any other type of specification.
51
52 me=`echo "$0" | sed -e 's,.*/,,'`
53
54 usage="\
55 Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
56
57 Canonicalize a configuration name.
58
59 Operation modes:
60 -h, --help print this help, then exit
61 -t, --time-stamp print date of last modification, then exit
62 -v, --version print version number, then exit
63
64 Report bugs and patches to <config-patches@gnu.org>."
65
66 version="\
67 GNU config.sub ($timestamp)
68
69 Copyright 1992-2016 Free Software Foundation, Inc.
70
71 This is free software; see the source for copying conditions. There is NO
72 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
73
74 help="
75 Try \`$me --help' for more information."
76
77 # Parse command line
78 while test $# -gt 0 ; do
79 case $1 in
80 --time-stamp | --time* | -t )
81 echo "$timestamp" ; exit ;;
82 --version | -v )
83 echo "$version" ; exit ;;
84 --help | --h* | -h )
85 echo "$usage"; exit ;;
86 -- ) # Stop option processing
87 shift; break ;;
88 - ) # Use stdin as input.
89 break ;;
90 -* )
91 echo "$me: invalid option $1$help"
92 exit 1 ;;
93
94 *local*)
95 # First pass through any local machine types.
96 echo $1
97 exit ;;
98
99 * )
100 break ;;
101 esac
102 done
103
104 case $# in
105 0) echo "$me: missing argument$help" >&2
106 exit 1;;
107 1) ;;
108 *) echo "$me: too many arguments$help" >&2
109 exit 1;;
110 esac
111
112 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
113 # Here we must recognize all the valid KERNEL-OS combinations.
114 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
115 case $maybe_os in
116 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
117 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
118 knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
119 kopensolaris*-gnu* | cloudabi*-eabi* | \
120 storm-chaos* | os2-emx* | rtmk-nova*)
121 os=-$maybe_os
122 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
123 ;;
124 android-linux)
125 os=-linux-android
126 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
127 ;;
128 *)
129 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
130 if [ $basic_machine != $1 ]
131 then os=`echo $1 | sed 's/.*-/-/'`
132 else os=; fi
133 ;;
134 esac
135
136 ### Let's recognize common machines as not being operating systems so
137 ### that things like config.sub decstation-3100 work. We also
138 ### recognize some manufacturers as not being operating systems, so we
139 ### can provide default operating systems below.
140 case $os in
141 -sun*os*)
142 # Prevent following clause from handling this invalid input.
143 ;;
144 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
145 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
146 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
147 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
148 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
149 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
150 -apple | -axis | -knuth | -cray | -microblaze*)
151 os=
152 basic_machine=$1
153 ;;
154 -bluegene*)
155 os=-cnk
156 ;;
157 -sim | -cisco | -oki | -wec | -winbond)
158 os=
159 basic_machine=$1
160 ;;
161 -scout)
162 ;;
163 -wrs)
164 os=-vxworks
165 basic_machine=$1
166 ;;
167 -chorusos*)
168 os=-chorusos
169 basic_machine=$1
170 ;;
171 -chorusrdb)
172 os=-chorusrdb
173 basic_machine=$1
174 ;;
175 -hiux*)
176 os=-hiuxwe2
177 ;;
178 -sco6)
179 os=-sco5v6
180 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
181 ;;
182 -sco5)
183 os=-sco3.2v5
184 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
185 ;;
186 -sco4)
187 os=-sco3.2v4
188 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
189 ;;
190 -sco3.2.[4-9]*)
191 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
192 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
193 ;;
194 -sco3.2v[4-9]*)
195 # Don't forget version if it is 3.2v4 or newer.
196 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
197 ;;
198 -sco5v6*)
199 # Don't forget version if it is 3.2v4 or newer.
200 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
201 ;;
202 -sco*)
203 os=-sco3.2v2
204 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
205 ;;
206 -udk*)
207 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
208 ;;
209 -isc)
210 os=-isc2.2
211 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
212 ;;
213 -clix*)
214 basic_machine=clipper-intergraph
215 ;;
216 -isc*)
217 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
218 ;;
219 -lynx*178)
220 os=-lynxos178
221 ;;
222 -lynx*5)
223 os=-lynxos5
224 ;;
225 -lynx*)
226 os=-lynxos
227 ;;
228 -ptx*)
229 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
230 ;;
231 -windowsnt*)
232 os=`echo $os | sed -e 's/windowsnt/winnt/'`
233 ;;
234 -psos*)
235 os=-psos
236 ;;
237 -mint | -mint[0-9]*)
238 basic_machine=m68k-atari
239 os=-mint
240 ;;
241 esac
242
243 # Decode aliases for certain CPU-COMPANY combinations.
244 case $basic_machine in
245 # Recognize the basic CPU types without company name.
246 # Some are omitted here because they have special meanings below.
247 1750a | 580 \
248 | a29k \
249 | aarch64 | aarch64_be \
250 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
251 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
252 | am33_2.0 \
253 | arc | arceb \
254 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
255 | avr | avr32 \
256 | ba \
257 | be32 | be64 \
258 | bfin \
259 | c4x | c8051 | clipper \
260 | d10v | d30v | dlx | dsp16xx \
261 | e2k | epiphany \
262 | fido | fr30 | frv | ft32 \
263 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
264 | hexagon \
265 | i370 | i860 | i960 | ia64 \
266 | ip2k | iq2000 \
267 | k1om \
268 | le32 | le64 \
269 | lm32 \
270 | m32c | m32r | m32rle | m68000 | m68k | m88k \
271 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
272 | mips | mipsbe | mipseb | mipsel | mipsle \
273 | mips16 \
274 | mips64 | mips64el \
275 | mips64octeon | mips64octeonel \
276 | mips64orion | mips64orionel \
277 | mips64r5900 | mips64r5900el \
278 | mips64vr | mips64vrel \
279 | mips64vr4100 | mips64vr4100el \
280 | mips64vr4300 | mips64vr4300el \
281 | mips64vr5000 | mips64vr5000el \
282 | mips64vr5900 | mips64vr5900el \
283 | mipsisa32 | mipsisa32el \
284 | mipsisa32r2 | mipsisa32r2el \
285 | mipsisa32r6 | mipsisa32r6el \
286 | mipsisa64 | mipsisa64el \
287 | mipsisa64r2 | mipsisa64r2el \
288 | mipsisa64r6 | mipsisa64r6el \
289 | mipsisa64sb1 | mipsisa64sb1el \
290 | mipsisa64sr71k | mipsisa64sr71kel \
291 | mipsr5900 | mipsr5900el \
292 | mipstx39 | mipstx39el \
293 | mn10200 | mn10300 \
294 | moxie \
295 | mt \
296 | msp430 \
297 | nds32 | nds32le | nds32be \
298 | nios | nios2 | nios2eb | nios2el \
299 | ns16k | ns32k \
300 | open8 | or1k | or1knd | or32 \
301 | pdp10 | pdp11 | pj | pjl \
302 | powerpc | powerpc64 | powerpc64le | powerpcle \
303 | pru \
304 | pyramid \
305 | riscv32 | riscv64 \
306 | rl78 | rx \
307 | score \
308 | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
309 | sh64 | sh64le \
310 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
311 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
312 | spu \
313 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
314 | ubicom32 \
315 | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
316 | visium \
317 | we32k \
318 | x86 | xc16x | xstormy16 | xtensa \
319 | z8k | z80)
320 basic_machine=$basic_machine-unknown
321 ;;
322 c54x)
323 basic_machine=tic54x-unknown
324 ;;
325 c55x)
326 basic_machine=tic55x-unknown
327 ;;
328 c6x)
329 basic_machine=tic6x-unknown
330 ;;
331 leon|leon[3-9])
332 basic_machine=sparc-$basic_machine
333 ;;
334 m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
335 basic_machine=$basic_machine-unknown
336 os=-none
337 ;;
338 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
339 ;;
340 ms1)
341 basic_machine=mt-unknown
342 ;;
343
344 strongarm | thumb | xscale)
345 basic_machine=arm-unknown
346 ;;
347 xgate)
348 basic_machine=$basic_machine-unknown
349 os=-none
350 ;;
351 xscaleeb)
352 basic_machine=armeb-unknown
353 ;;
354
355 xscaleel)
356 basic_machine=armel-unknown
357 ;;
358
359 # We use `pc' rather than `unknown'
360 # because (1) that's what they normally are, and
361 # (2) the word "unknown" tends to confuse beginning users.
362 i*86 | x86_64)
363 basic_machine=$basic_machine-pc
364 ;;
365 # Object if more than one company name word.
366 *-*-*)
367 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
368 exit 1
369 ;;
370 # Recognize the basic CPU types with company name.
371 580-* \
372 | a29k-* \
373 | aarch64-* | aarch64_be-* \
374 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
375 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
376 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
377 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
378 | avr-* | avr32-* \
379 | ba-* \
380 | be32-* | be64-* \
381 | bfin-* | bs2000-* \
382 | c[123]* | c30-* | [cjt]90-* | c4x-* \
383 | c8051-* | clipper-* | craynv-* | cydra-* \
384 | d10v-* | d30v-* | dlx-* \
385 | e2k-* | elxsi-* \
386 | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
387 | h8300-* | h8500-* \
388 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
389 | hexagon-* \
390 | i*86-* | i860-* | i960-* | ia64-* \
391 | ip2k-* | iq2000-* \
392 | k1om-* \
393 | le32-* | le64-* \
394 | lm32-* \
395 | m32c-* | m32r-* | m32rle-* \
396 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
397 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
398 | microblaze-* | microblazeel-* \
399 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
400 | mips16-* \
401 | mips64-* | mips64el-* \
402 | mips64octeon-* | mips64octeonel-* \
403 | mips64orion-* | mips64orionel-* \
404 | mips64r5900-* | mips64r5900el-* \
405 | mips64vr-* | mips64vrel-* \
406 | mips64vr4100-* | mips64vr4100el-* \
407 | mips64vr4300-* | mips64vr4300el-* \
408 | mips64vr5000-* | mips64vr5000el-* \
409 | mips64vr5900-* | mips64vr5900el-* \
410 | mipsisa32-* | mipsisa32el-* \
411 | mipsisa32r2-* | mipsisa32r2el-* \
412 | mipsisa32r6-* | mipsisa32r6el-* \
413 | mipsisa64-* | mipsisa64el-* \
414 | mipsisa64r2-* | mipsisa64r2el-* \
415 | mipsisa64r6-* | mipsisa64r6el-* \
416 | mipsisa64sb1-* | mipsisa64sb1el-* \
417 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
418 | mipsr5900-* | mipsr5900el-* \
419 | mipstx39-* | mipstx39el-* \
420 | mmix-* \
421 | mt-* \
422 | msp430-* \
423 | nds32-* | nds32le-* | nds32be-* \
424 | nios-* | nios2-* | nios2eb-* | nios2el-* \
425 | none-* | np1-* | ns16k-* | ns32k-* \
426 | open8-* \
427 | or1k*-* \
428 | orion-* \
429 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
430 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
431 | pru-* \
432 | pyramid-* \
433 | riscv32-* | riscv64-* \
434 | rl78-* | romp-* | rs6000-* | rx-* \
435 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
436 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
437 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
438 | sparclite-* \
439 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
440 | tahoe-* \
441 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
442 | tile*-* \
443 | tron-* \
444 | ubicom32-* \
445 | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
446 | vax-* \
447 | visium-* \
448 | we32k-* \
449 | x86-* | x86_64-* | xc16x-* | xps100-* \
450 | xstormy16-* | xtensa*-* \
451 | ymp-* \
452 | z8k-* | z80-*)
453 ;;
454 # Recognize the basic CPU types without company name, with glob match.
455 xtensa*)
456 basic_machine=$basic_machine-unknown
457 ;;
458 # Recognize the various machine names and aliases which stand
459 # for a CPU type and a company and sometimes even an OS.
460 386bsd)
461 basic_machine=i386-unknown
462 os=-bsd
463 ;;
464 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
465 basic_machine=m68000-att
466 ;;
467 3b*)
468 basic_machine=we32k-att
469 ;;
470 a29khif)
471 basic_machine=a29k-amd
472 os=-udi
473 ;;
474 abacus)
475 basic_machine=abacus-unknown
476 ;;
477 adobe68k)
478 basic_machine=m68010-adobe
479 os=-scout
480 ;;
481 alliant | fx80)
482 basic_machine=fx80-alliant
483 ;;
484 altos | altos3068)
485 basic_machine=m68k-altos
486 ;;
487 am29k)
488 basic_machine=a29k-none
489 os=-bsd
490 ;;
491 amd64)
492 basic_machine=x86_64-pc
493 ;;
494 amd64-*)
495 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
496 ;;
497 amdahl)
498 basic_machine=580-amdahl
499 os=-sysv
500 ;;
501 amiga | amiga-*)
502 basic_machine=m68k-unknown
503 ;;
504 amigaos | amigados)
505 basic_machine=m68k-unknown
506 os=-amigaos
507 ;;
508 amigaunix | amix)
509 basic_machine=m68k-unknown
510 os=-sysv4
511 ;;
512 apollo68)
513 basic_machine=m68k-apollo
514 os=-sysv
515 ;;
516 apollo68bsd)
517 basic_machine=m68k-apollo
518 os=-bsd
519 ;;
520 aros)
521 basic_machine=i386-pc
522 os=-aros
523 ;;
524 asmjs)
525 basic_machine=asmjs-unknown
526 ;;
527 aux)
528 basic_machine=m68k-apple
529 os=-aux
530 ;;
531 balance)
532 basic_machine=ns32k-sequent
533 os=-dynix
534 ;;
535 blackfin)
536 basic_machine=bfin-unknown
537 os=-linux
538 ;;
539 blackfin-*)
540 basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
541 os=-linux
542 ;;
543 bluegene*)
544 basic_machine=powerpc-ibm
545 os=-cnk
546 ;;
547 c54x-*)
548 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
549 ;;
550 c55x-*)
551 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
552 ;;
553 c6x-*)
554 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
555 ;;
556 c90)
557 basic_machine=c90-cray
558 os=-unicos
559 ;;
560 cegcc)
561 basic_machine=arm-unknown
562 os=-cegcc
563 ;;
564 convex-c1)
565 basic_machine=c1-convex
566 os=-bsd
567 ;;
568 convex-c2)
569 basic_machine=c2-convex
570 os=-bsd
571 ;;
572 convex-c32)
573 basic_machine=c32-convex
574 os=-bsd
575 ;;
576 convex-c34)
577 basic_machine=c34-convex
578 os=-bsd
579 ;;
580 convex-c38)
581 basic_machine=c38-convex
582 os=-bsd
583 ;;
584 cray | j90)
585 basic_machine=j90-cray
586 os=-unicos
587 ;;
588 craynv)
589 basic_machine=craynv-cray
590 os=-unicosmp
591 ;;
592 cr16 | cr16-*)
593 basic_machine=cr16-unknown
594 os=-elf
595 ;;
596 crds | unos)
597 basic_machine=m68k-crds
598 ;;
599 crisv32 | crisv32-* | etraxfs*)
600 basic_machine=crisv32-axis
601 ;;
602 cris | cris-* | etrax*)
603 basic_machine=cris-axis
604 ;;
605 crx)
606 basic_machine=crx-unknown
607 os=-elf
608 ;;
609 da30 | da30-*)
610 basic_machine=m68k-da30
611 ;;
612 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
613 basic_machine=mips-dec
614 ;;
615 decsystem10* | dec10*)
616 basic_machine=pdp10-dec
617 os=-tops10
618 ;;
619 decsystem20* | dec20*)
620 basic_machine=pdp10-dec
621 os=-tops20
622 ;;
623 delta | 3300 | motorola-3300 | motorola-delta \
624 | 3300-motorola | delta-motorola)
625 basic_machine=m68k-motorola
626 ;;
627 delta88)
628 basic_machine=m88k-motorola
629 os=-sysv3
630 ;;
631 dicos)
632 basic_machine=i686-pc
633 os=-dicos
634 ;;
635 djgpp)
636 basic_machine=i586-pc
637 os=-msdosdjgpp
638 ;;
639 dpx20 | dpx20-*)
640 basic_machine=rs6000-bull
641 os=-bosx
642 ;;
643 dpx2* | dpx2*-bull)
644 basic_machine=m68k-bull
645 os=-sysv3
646 ;;
647 e500v[12])
648 basic_machine=powerpc-unknown
649 os=$os"spe"
650 ;;
651 e500v[12]-*)
652 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
653 os=$os"spe"
654 ;;
655 ebmon29k)
656 basic_machine=a29k-amd
657 os=-ebmon
658 ;;
659 elxsi)
660 basic_machine=elxsi-elxsi
661 os=-bsd
662 ;;
663 encore | umax | mmax)
664 basic_machine=ns32k-encore
665 ;;
666 es1800 | OSE68k | ose68k | ose | OSE)
667 basic_machine=m68k-ericsson
668 os=-ose
669 ;;
670 fx2800)
671 basic_machine=i860-alliant
672 ;;
673 genix)
674 basic_machine=ns32k-ns
675 ;;
676 gmicro)
677 basic_machine=tron-gmicro
678 os=-sysv
679 ;;
680 go32)
681 basic_machine=i386-pc
682 os=-go32
683 ;;
684 h3050r* | hiux*)
685 basic_machine=hppa1.1-hitachi
686 os=-hiuxwe2
687 ;;
688 h8300hms)
689 basic_machine=h8300-hitachi
690 os=-hms
691 ;;
692 h8300xray)
693 basic_machine=h8300-hitachi
694 os=-xray
695 ;;
696 h8500hms)
697 basic_machine=h8500-hitachi
698 os=-hms
699 ;;
700 harris)
701 basic_machine=m88k-harris
702 os=-sysv3
703 ;;
704 hp300-*)
705 basic_machine=m68k-hp
706 ;;
707 hp300bsd)
708 basic_machine=m68k-hp
709 os=-bsd
710 ;;
711 hp300hpux)
712 basic_machine=m68k-hp
713 os=-hpux
714 ;;
715 hp3k9[0-9][0-9] | hp9[0-9][0-9])
716 basic_machine=hppa1.0-hp
717 ;;
718 hp9k2[0-9][0-9] | hp9k31[0-9])
719 basic_machine=m68000-hp
720 ;;
721 hp9k3[2-9][0-9])
722 basic_machine=m68k-hp
723 ;;
724 hp9k6[0-9][0-9] | hp6[0-9][0-9])
725 basic_machine=hppa1.0-hp
726 ;;
727 hp9k7[0-79][0-9] | hp7[0-79][0-9])
728 basic_machine=hppa1.1-hp
729 ;;
730 hp9k78[0-9] | hp78[0-9])
731 # FIXME: really hppa2.0-hp
732 basic_machine=hppa1.1-hp
733 ;;
734 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
735 # FIXME: really hppa2.0-hp
736 basic_machine=hppa1.1-hp
737 ;;
738 hp9k8[0-9][13679] | hp8[0-9][13679])
739 basic_machine=hppa1.1-hp
740 ;;
741 hp9k8[0-9][0-9] | hp8[0-9][0-9])
742 basic_machine=hppa1.0-hp
743 ;;
744 hppa-next)
745 os=-nextstep3
746 ;;
747 hppaosf)
748 basic_machine=hppa1.1-hp
749 os=-osf
750 ;;
751 hppro)
752 basic_machine=hppa1.1-hp
753 os=-proelf
754 ;;
755 i370-ibm* | ibm*)
756 basic_machine=i370-ibm
757 ;;
758 i*86v32)
759 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
760 os=-sysv32
761 ;;
762 i*86v4*)
763 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
764 os=-sysv4
765 ;;
766 i*86v)
767 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
768 os=-sysv
769 ;;
770 i*86sol2)
771 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
772 os=-solaris2
773 ;;
774 i386mach)
775 basic_machine=i386-mach
776 os=-mach
777 ;;
778 i386-vsta | vsta)
779 basic_machine=i386-unknown
780 os=-vsta
781 ;;
782 iris | iris4d)
783 basic_machine=mips-sgi
784 case $os in
785 -irix*)
786 ;;
787 *)
788 os=-irix4
789 ;;
790 esac
791 ;;
792 isi68 | isi)
793 basic_machine=m68k-isi
794 os=-sysv
795 ;;
796 leon-*|leon[3-9]-*)
797 basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
798 ;;
799 m68knommu)
800 basic_machine=m68k-unknown
801 os=-linux
802 ;;
803 m68knommu-*)
804 basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
805 os=-linux
806 ;;
807 m88k-omron*)
808 basic_machine=m88k-omron
809 ;;
810 magnum | m3230)
811 basic_machine=mips-mips
812 os=-sysv
813 ;;
814 merlin)
815 basic_machine=ns32k-utek
816 os=-sysv
817 ;;
818 microblaze*)
819 basic_machine=microblaze-xilinx
820 ;;
821 mingw64)
822 basic_machine=x86_64-pc
823 os=-mingw64
824 ;;
825 mingw32)
826 basic_machine=i686-pc
827 os=-mingw32
828 ;;
829 mingw32ce)
830 basic_machine=arm-unknown
831 os=-mingw32ce
832 ;;
833 miniframe)
834 basic_machine=m68000-convergent
835 ;;
836 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
837 basic_machine=m68k-atari
838 os=-mint
839 ;;
840 mips3*-*)
841 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
842 ;;
843 mips3*)
844 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
845 ;;
846 monitor)
847 basic_machine=m68k-rom68k
848 os=-coff
849 ;;
850 morphos)
851 basic_machine=powerpc-unknown
852 os=-morphos
853 ;;
854 moxiebox)
855 basic_machine=moxie-unknown
856 os=-moxiebox
857 ;;
858 msdos)
859 basic_machine=i386-pc
860 os=-msdos
861 ;;
862 ms1-*)
863 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
864 ;;
865 msys)
866 basic_machine=i686-pc
867 os=-msys
868 ;;
869 mvs)
870 basic_machine=i370-ibm
871 os=-mvs
872 ;;
873 nacl)
874 basic_machine=le32-unknown
875 os=-nacl
876 ;;
877 ncr3000)
878 basic_machine=i486-ncr
879 os=-sysv4
880 ;;
881 netbsd386)
882 basic_machine=i386-unknown
883 os=-netbsd
884 ;;
885 netwinder)
886 basic_machine=armv4l-rebel
887 os=-linux
888 ;;
889 news | news700 | news800 | news900)
890 basic_machine=m68k-sony
891 os=-newsos
892 ;;
893 news1000)
894 basic_machine=m68030-sony
895 os=-newsos
896 ;;
897 news-3600 | risc-news)
898 basic_machine=mips-sony
899 os=-newsos
900 ;;
901 necv70)
902 basic_machine=v70-nec
903 os=-sysv
904 ;;
905 next | m*-next )
906 basic_machine=m68k-next
907 case $os in
908 -nextstep* )
909 ;;
910 -ns2*)
911 os=-nextstep2
912 ;;
913 *)
914 os=-nextstep3
915 ;;
916 esac
917 ;;
918 nh3000)
919 basic_machine=m68k-harris
920 os=-cxux
921 ;;
922 nh[45]000)
923 basic_machine=m88k-harris
924 os=-cxux
925 ;;
926 nindy960)
927 basic_machine=i960-intel
928 os=-nindy
929 ;;
930 mon960)
931 basic_machine=i960-intel
932 os=-mon960
933 ;;
934 nonstopux)
935 basic_machine=mips-compaq
936 os=-nonstopux
937 ;;
938 np1)
939 basic_machine=np1-gould
940 ;;
941 neo-tandem)
942 basic_machine=neo-tandem
943 ;;
944 nse-tandem)
945 basic_machine=nse-tandem
946 ;;
947 nsr-tandem)
948 basic_machine=nsr-tandem
949 ;;
950 op50n-* | op60c-*)
951 basic_machine=hppa1.1-oki
952 os=-proelf
953 ;;
954 openrisc | openrisc-*)
955 basic_machine=or32-unknown
956 ;;
957 os400)
958 basic_machine=powerpc-ibm
959 os=-os400
960 ;;
961 OSE68000 | ose68000)
962 basic_machine=m68000-ericsson
963 os=-ose
964 ;;
965 os68k)
966 basic_machine=m68k-none
967 os=-os68k
968 ;;
969 pa-hitachi)
970 basic_machine=hppa1.1-hitachi
971 os=-hiuxwe2
972 ;;
973 paragon)
974 basic_machine=i860-intel
975 os=-osf
976 ;;
977 parisc)
978 basic_machine=hppa-unknown
979 os=-linux
980 ;;
981 parisc-*)
982 basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
983 os=-linux
984 ;;
985 pbd)
986 basic_machine=sparc-tti
987 ;;
988 pbb)
989 basic_machine=m68k-tti
990 ;;
991 pc532 | pc532-*)
992 basic_machine=ns32k-pc532
993 ;;
994 pc98)
995 basic_machine=i386-pc
996 ;;
997 pc98-*)
998 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
999 ;;
1000 pentium | p5 | k5 | k6 | nexgen | viac3)
1001 basic_machine=i586-pc
1002 ;;
1003 pentiumpro | p6 | 6x86 | athlon | athlon_*)
1004 basic_machine=i686-pc
1005 ;;
1006 pentiumii | pentium2 | pentiumiii | pentium3)
1007 basic_machine=i686-pc
1008 ;;
1009 pentium4)
1010 basic_machine=i786-pc
1011 ;;
1012 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
1013 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
1014 ;;
1015 pentiumpro-* | p6-* | 6x86-* | athlon-*)
1016 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1017 ;;
1018 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
1019 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
1020 ;;
1021 pentium4-*)
1022 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
1023 ;;
1024 pn)
1025 basic_machine=pn-gould
1026 ;;
1027 power) basic_machine=power-ibm
1028 ;;
1029 ppc | ppcbe) basic_machine=powerpc-unknown
1030 ;;
1031 ppc-* | ppcbe-*)
1032 basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
1033 ;;
1034 ppcle | powerpclittle)
1035 basic_machine=powerpcle-unknown
1036 ;;
1037 ppcle-* | powerpclittle-*)
1038 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
1039 ;;
1040 ppc64) basic_machine=powerpc64-unknown
1041 ;;
1042 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
1043 ;;
1044 ppc64le | powerpc64little)
1045 basic_machine=powerpc64le-unknown
1046 ;;
1047 ppc64le-* | powerpc64little-*)
1048 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
1049 ;;
1050 ps2)
1051 basic_machine=i386-ibm
1052 ;;
1053 pw32)
1054 basic_machine=i586-unknown
1055 os=-pw32
1056 ;;
1057 rdos | rdos64)
1058 basic_machine=x86_64-pc
1059 os=-rdos
1060 ;;
1061 rdos32)
1062 basic_machine=i386-pc
1063 os=-rdos
1064 ;;
1065 rom68k)
1066 basic_machine=m68k-rom68k
1067 os=-coff
1068 ;;
1069 rm[46]00)
1070 basic_machine=mips-siemens
1071 ;;
1072 rtpc | rtpc-*)
1073 basic_machine=romp-ibm
1074 ;;
1075 s390 | s390-*)
1076 basic_machine=s390-ibm
1077 ;;
1078 s390x | s390x-*)
1079 basic_machine=s390x-ibm
1080 ;;
1081 sa29200)
1082 basic_machine=a29k-amd
1083 os=-udi
1084 ;;
1085 sb1)
1086 basic_machine=mipsisa64sb1-unknown
1087 ;;
1088 sb1el)
1089 basic_machine=mipsisa64sb1el-unknown
1090 ;;
1091 sde)
1092 basic_machine=mipsisa32-sde
1093 os=-elf
1094 ;;
1095 sei)
1096 basic_machine=mips-sei
1097 os=-seiux
1098 ;;
1099 sequent)
1100 basic_machine=i386-sequent
1101 ;;
1102 sh)
1103 basic_machine=sh-hitachi
1104 os=-hms
1105 ;;
1106 sh5el)
1107 basic_machine=sh5le-unknown
1108 ;;
1109 sh64)
1110 basic_machine=sh64-unknown
1111 ;;
1112 sparclite-wrs | simso-wrs)
1113 basic_machine=sparclite-wrs
1114 os=-vxworks
1115 ;;
1116 sps7)
1117 basic_machine=m68k-bull
1118 os=-sysv2
1119 ;;
1120 spur)
1121 basic_machine=spur-unknown
1122 ;;
1123 st2000)
1124 basic_machine=m68k-tandem
1125 ;;
1126 stratus)
1127 basic_machine=i860-stratus
1128 os=-sysv4
1129 ;;
1130 strongarm-* | thumb-*)
1131 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1132 ;;
1133 sun2)
1134 basic_machine=m68000-sun
1135 ;;
1136 sun2os3)
1137 basic_machine=m68000-sun
1138 os=-sunos3
1139 ;;
1140 sun2os4)
1141 basic_machine=m68000-sun
1142 os=-sunos4
1143 ;;
1144 sun3os3)
1145 basic_machine=m68k-sun
1146 os=-sunos3
1147 ;;
1148 sun3os4)
1149 basic_machine=m68k-sun
1150 os=-sunos4
1151 ;;
1152 sun4os3)
1153 basic_machine=sparc-sun
1154 os=-sunos3
1155 ;;
1156 sun4os4)
1157 basic_machine=sparc-sun
1158 os=-sunos4
1159 ;;
1160 sun4sol2)
1161 basic_machine=sparc-sun
1162 os=-solaris2
1163 ;;
1164 sun3 | sun3-*)
1165 basic_machine=m68k-sun
1166 ;;
1167 sun4)
1168 basic_machine=sparc-sun
1169 ;;
1170 sun386 | sun386i | roadrunner)
1171 basic_machine=i386-sun
1172 ;;
1173 sv1)
1174 basic_machine=sv1-cray
1175 os=-unicos
1176 ;;
1177 symmetry)
1178 basic_machine=i386-sequent
1179 os=-dynix
1180 ;;
1181 t3e)
1182 basic_machine=alphaev5-cray
1183 os=-unicos
1184 ;;
1185 t90)
1186 basic_machine=t90-cray
1187 os=-unicos
1188 ;;
1189 tile*)
1190 basic_machine=$basic_machine-unknown
1191 os=-linux-gnu
1192 ;;
1193 tx39)
1194 basic_machine=mipstx39-unknown
1195 ;;
1196 tx39el)
1197 basic_machine=mipstx39el-unknown
1198 ;;
1199 toad1)
1200 basic_machine=pdp10-xkl
1201 os=-tops20
1202 ;;
1203 tower | tower-32)
1204 basic_machine=m68k-ncr
1205 ;;
1206 tpf)
1207 basic_machine=s390x-ibm
1208 os=-tpf
1209 ;;
1210 udi29k)
1211 basic_machine=a29k-amd
1212 os=-udi
1213 ;;
1214 ultra3)
1215 basic_machine=a29k-nyu
1216 os=-sym1
1217 ;;
1218 v810 | necv810)
1219 basic_machine=v810-nec
1220 os=-none
1221 ;;
1222 vaxv)
1223 basic_machine=vax-dec
1224 os=-sysv
1225 ;;
1226 vms)
1227 basic_machine=vax-dec
1228 os=-vms
1229 ;;
1230 vpp*|vx|vx-*)
1231 basic_machine=f301-fujitsu
1232 ;;
1233 vxworks960)
1234 basic_machine=i960-wrs
1235 os=-vxworks
1236 ;;
1237 vxworks68)
1238 basic_machine=m68k-wrs
1239 os=-vxworks
1240 ;;
1241 vxworks29k)
1242 basic_machine=a29k-wrs
1243 os=-vxworks
1244 ;;
1245 w65*)
1246 basic_machine=w65-wdc
1247 os=-none
1248 ;;
1249 w89k-*)
1250 basic_machine=hppa1.1-winbond
1251 os=-proelf
1252 ;;
1253 xbox)
1254 basic_machine=i686-pc
1255 os=-mingw32
1256 ;;
1257 xps | xps100)
1258 basic_machine=xps100-honeywell
1259 ;;
1260 xscale-* | xscalee[bl]-*)
1261 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
1262 ;;
1263 ymp)
1264 basic_machine=ymp-cray
1265 os=-unicos
1266 ;;
1267 z8k-*-coff)
1268 basic_machine=z8k-unknown
1269 os=-sim
1270 ;;
1271 z80-*-coff)
1272 basic_machine=z80-unknown
1273 os=-sim
1274 ;;
1275 none)
1276 basic_machine=none-none
1277 os=-none
1278 ;;
1279
1280 # Here we handle the default manufacturer of certain CPU types. It is in
1281 # some cases the only manufacturer, in others, it is the most popular.
1282 w89k)
1283 basic_machine=hppa1.1-winbond
1284 ;;
1285 op50n)
1286 basic_machine=hppa1.1-oki
1287 ;;
1288 op60c)
1289 basic_machine=hppa1.1-oki
1290 ;;
1291 romp)
1292 basic_machine=romp-ibm
1293 ;;
1294 mmix)
1295 basic_machine=mmix-knuth
1296 ;;
1297 rs6000)
1298 basic_machine=rs6000-ibm
1299 ;;
1300 vax)
1301 basic_machine=vax-dec
1302 ;;
1303 pdp10)
1304 # there are many clones, so DEC is not a safe bet
1305 basic_machine=pdp10-unknown
1306 ;;
1307 pdp11)
1308 basic_machine=pdp11-dec
1309 ;;
1310 we32k)
1311 basic_machine=we32k-att
1312 ;;
1313 sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
1314 basic_machine=sh-unknown
1315 ;;
1316 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1317 basic_machine=sparc-sun
1318 ;;
1319 cydra)
1320 basic_machine=cydra-cydrome
1321 ;;
1322 orion)
1323 basic_machine=orion-highlevel
1324 ;;
1325 orion105)
1326 basic_machine=clipper-highlevel
1327 ;;
1328 mac | mpw | mac-mpw)
1329 basic_machine=m68k-apple
1330 ;;
1331 pmac | pmac-mpw)
1332 basic_machine=powerpc-apple
1333 ;;
1334 *-unknown)
1335 # Make sure to match an already-canonicalized machine name.
1336 ;;
1337 *)
1338 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1339 exit 1
1340 ;;
1341 esac
1342
1343 # Here we canonicalize certain aliases for manufacturers.
1344 case $basic_machine in
1345 *-digital*)
1346 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1347 ;;
1348 *-commodore*)
1349 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1350 ;;
1351 *)
1352 ;;
1353 esac
1354
1355 # Decode manufacturer-specific aliases for certain operating systems.
1356
1357 if [ x"$os" != x"" ]
1358 then
1359 case $os in
1360 # First match some system type aliases
1361 # that might get confused with valid system types.
1362 # -solaris* is a basic system type, with this one exception.
1363 -auroraux)
1364 os=-auroraux
1365 ;;
1366 -solaris1 | -solaris1.*)
1367 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1368 ;;
1369 -solaris)
1370 os=-solaris2
1371 ;;
1372 -svr4*)
1373 os=-sysv4
1374 ;;
1375 -unixware*)
1376 os=-sysv4.2uw
1377 ;;
1378 -gnu/linux*)
1379 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1380 ;;
1381 # First accept the basic system types.
1382 # The portable systems comes first.
1383 # Each alternative MUST END IN A *, to match a version number.
1384 # -sysv* is not here because it comes later, after sysvr4.
1385 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1386 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
1387 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1388 | -sym* | -kopensolaris* | -plan9* \
1389 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1390 | -aos* | -aros* | -cloudabi* | -sortix* \
1391 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1392 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1393 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1394 | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
1395 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1396 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1397 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1398 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1399 | -chorusos* | -chorusrdb* | -cegcc* \
1400 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1401 | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1402 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
1403 | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
1404 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1405 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1406 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1407 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1408 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1409 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1410 | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
1411 | -onefs* | -tirtos* | -phoenix* | -fuchsia*)
1412 # Remember, each alternative MUST END IN *, to match a version number.
1413 ;;
1414 -qnx*)
1415 case $basic_machine in
1416 x86-* | i*86-*)
1417 ;;
1418 *)
1419 os=-nto$os
1420 ;;
1421 esac
1422 ;;
1423 -nto-qnx*)
1424 ;;
1425 -nto*)
1426 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1427 ;;
1428 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1429 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1430 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1431 ;;
1432 -mac*)
1433 os=`echo $os | sed -e 's|mac|macos|'`
1434 ;;
1435 -linux-dietlibc)
1436 os=-linux-dietlibc
1437 ;;
1438 -linux*)
1439 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1440 ;;
1441 -sunos5*)
1442 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1443 ;;
1444 -sunos6*)
1445 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1446 ;;
1447 -opened*)
1448 os=-openedition
1449 ;;
1450 -os400*)
1451 os=-os400
1452 ;;
1453 -wince*)
1454 os=-wince
1455 ;;
1456 -osfrose*)
1457 os=-osfrose
1458 ;;
1459 -osf*)
1460 os=-osf
1461 ;;
1462 -utek*)
1463 os=-bsd
1464 ;;
1465 -dynix*)
1466 os=-bsd
1467 ;;
1468 -acis*)
1469 os=-aos
1470 ;;
1471 -atheos*)
1472 os=-atheos
1473 ;;
1474 -syllable*)
1475 os=-syllable
1476 ;;
1477 -386bsd)
1478 os=-bsd
1479 ;;
1480 -ctix* | -uts*)
1481 os=-sysv
1482 ;;
1483 -nova*)
1484 os=-rtmk-nova
1485 ;;
1486 -ns2 )
1487 os=-nextstep2
1488 ;;
1489 -nsk*)
1490 os=-nsk
1491 ;;
1492 # Preserve the version number of sinix5.
1493 -sinix5.*)
1494 os=`echo $os | sed -e 's|sinix|sysv|'`
1495 ;;
1496 -sinix*)
1497 os=-sysv4
1498 ;;
1499 -tpf*)
1500 os=-tpf
1501 ;;
1502 -triton*)
1503 os=-sysv3
1504 ;;
1505 -oss*)
1506 os=-sysv3
1507 ;;
1508 -svr4)
1509 os=-sysv4
1510 ;;
1511 -svr3)
1512 os=-sysv3
1513 ;;
1514 -sysvr4)
1515 os=-sysv4
1516 ;;
1517 # This must come after -sysvr4.
1518 -sysv*)
1519 ;;
1520 -ose*)
1521 os=-ose
1522 ;;
1523 -es1800*)
1524 os=-ose
1525 ;;
1526 -xenix)
1527 os=-xenix
1528 ;;
1529 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1530 os=-mint
1531 ;;
1532 -aros*)
1533 os=-aros
1534 ;;
1535 -zvmoe)
1536 os=-zvmoe
1537 ;;
1538 -dicos*)
1539 os=-dicos
1540 ;;
1541 -nacl*)
1542 ;;
1543 -ios)
1544 ;;
1545 -none)
1546 ;;
1547 *)
1548 # Get rid of the `-' at the beginning of $os.
1549 os=`echo $os | sed 's/[^-]*-//'`
1550 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1551 exit 1
1552 ;;
1553 esac
1554 else
1555
1556 # Here we handle the default operating systems that come with various machines.
1557 # The value should be what the vendor currently ships out the door with their
1558 # machine or put another way, the most popular os provided with the machine.
1559
1560 # Note that if you're going to try to match "-MANUFACTURER" here (say,
1561 # "-sun"), then you have to tell the case statement up towards the top
1562 # that MANUFACTURER isn't an operating system. Otherwise, code above
1563 # will signal an error saying that MANUFACTURER isn't an operating
1564 # system, and we'll never get to this point.
1565
1566 case $basic_machine in
1567 score-*)
1568 os=-elf
1569 ;;
1570 spu-*)
1571 os=-elf
1572 ;;
1573 *-acorn)
1574 os=-riscix1.2
1575 ;;
1576 arm*-rebel)
1577 os=-linux
1578 ;;
1579 arm*-semi)
1580 os=-aout
1581 ;;
1582 c4x-* | tic4x-*)
1583 os=-coff
1584 ;;
1585 c8051-*)
1586 os=-elf
1587 ;;
1588 hexagon-*)
1589 os=-elf
1590 ;;
1591 tic54x-*)
1592 os=-coff
1593 ;;
1594 tic55x-*)
1595 os=-coff
1596 ;;
1597 tic6x-*)
1598 os=-coff
1599 ;;
1600 # This must come before the *-dec entry.
1601 pdp10-*)
1602 os=-tops20
1603 ;;
1604 pdp11-*)
1605 os=-none
1606 ;;
1607 *-dec | vax-*)
1608 os=-ultrix4.2
1609 ;;
1610 m68*-apollo)
1611 os=-domain
1612 ;;
1613 i386-sun)
1614 os=-sunos4.0.2
1615 ;;
1616 m68000-sun)
1617 os=-sunos3
1618 ;;
1619 m68*-cisco)
1620 os=-aout
1621 ;;
1622 mep-*)
1623 os=-elf
1624 ;;
1625 mips*-cisco)
1626 os=-elf
1627 ;;
1628 mips*-*)
1629 os=-elf
1630 ;;
1631 or32-*)
1632 os=-coff
1633 ;;
1634 *-tti) # must be before sparc entry or we get the wrong os.
1635 os=-sysv3
1636 ;;
1637 sparc-* | *-sun)
1638 os=-sunos4.1.1
1639 ;;
1640 *-be)
1641 os=-beos
1642 ;;
1643 *-haiku)
1644 os=-haiku
1645 ;;
1646 *-ibm)
1647 os=-aix
1648 ;;
1649 *-knuth)
1650 os=-mmixware
1651 ;;
1652 *-wec)
1653 os=-proelf
1654 ;;
1655 *-winbond)
1656 os=-proelf
1657 ;;
1658 *-oki)
1659 os=-proelf
1660 ;;
1661 *-hp)
1662 os=-hpux
1663 ;;
1664 *-hitachi)
1665 os=-hiux
1666 ;;
1667 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1668 os=-sysv
1669 ;;
1670 *-cbm)
1671 os=-amigaos
1672 ;;
1673 *-dg)
1674 os=-dgux
1675 ;;
1676 *-dolphin)
1677 os=-sysv3
1678 ;;
1679 m68k-ccur)
1680 os=-rtu
1681 ;;
1682 m88k-omron*)
1683 os=-luna
1684 ;;
1685 *-next )
1686 os=-nextstep
1687 ;;
1688 *-sequent)
1689 os=-ptx
1690 ;;
1691 *-crds)
1692 os=-unos
1693 ;;
1694 *-ns)
1695 os=-genix
1696 ;;
1697 i370-*)
1698 os=-mvs
1699 ;;
1700 *-next)
1701 os=-nextstep3
1702 ;;
1703 *-gould)
1704 os=-sysv
1705 ;;
1706 *-highlevel)
1707 os=-bsd
1708 ;;
1709 *-encore)
1710 os=-bsd
1711 ;;
1712 *-sgi)
1713 os=-irix
1714 ;;
1715 *-siemens)
1716 os=-sysv4
1717 ;;
1718 *-masscomp)
1719 os=-rtu
1720 ;;
1721 f30[01]-fujitsu | f700-fujitsu)
1722 os=-uxpv
1723 ;;
1724 *-rom68k)
1725 os=-coff
1726 ;;
1727 *-*bug)
1728 os=-coff
1729 ;;
1730 *-apple)
1731 os=-macos
1732 ;;
1733 *-atari*)
1734 os=-mint
1735 ;;
1736 *)
1737 os=-none
1738 ;;
1739 esac
1740 fi
1741
1742 # Here we handle the case where we know the os, and the CPU type, but not the
1743 # manufacturer. We pick the logical manufacturer.
1744 vendor=unknown
1745 case $basic_machine in
1746 *-unknown)
1747 case $os in
1748 -riscix*)
1749 vendor=acorn
1750 ;;
1751 -sunos*)
1752 vendor=sun
1753 ;;
1754 -cnk*|-aix*)
1755 vendor=ibm
1756 ;;
1757 -beos*)
1758 vendor=be
1759 ;;
1760 -hpux*)
1761 vendor=hp
1762 ;;
1763 -mpeix*)
1764 vendor=hp
1765 ;;
1766 -hiux*)
1767 vendor=hitachi
1768 ;;
1769 -unos*)
1770 vendor=crds
1771 ;;
1772 -dgux*)
1773 vendor=dg
1774 ;;
1775 -luna*)
1776 vendor=omron
1777 ;;
1778 -genix*)
1779 vendor=ns
1780 ;;
1781 -mvs* | -opened*)
1782 vendor=ibm
1783 ;;
1784 -os400*)
1785 vendor=ibm
1786 ;;
1787 -ptx*)
1788 vendor=sequent
1789 ;;
1790 -tpf*)
1791 vendor=ibm
1792 ;;
1793 -vxsim* | -vxworks* | -windiss*)
1794 vendor=wrs
1795 ;;
1796 -aux*)
1797 vendor=apple
1798 ;;
1799 -hms*)
1800 vendor=hitachi
1801 ;;
1802 -mpw* | -macos*)
1803 vendor=apple
1804 ;;
1805 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1806 vendor=atari
1807 ;;
1808 -vos*)
1809 vendor=stratus
1810 ;;
1811 esac
1812 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1813 ;;
1814 esac
1815
1816 echo $basic_machine$os
1817 exit
1818
1819 # Local variables:
1820 # eval: (add-hook 'write-file-hooks 'time-stamp)
1821 # time-stamp-start: "timestamp='"
1822 # time-stamp-format: "%:y-%02m-%02d"
1823 # time-stamp-end: "'"
1824 # End:
0 #! /bin/sh
1 # From configure.ac Id: configure.ac,v 1.17 2004/02/23 21:34:53 rob Exp .
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for MPEG audio decoder and player 0.15.2b.
4 #
5 # Report bugs to <rob@mars.org>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
16
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20 emulate sh
21 NULLCMD=:
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
25 setopt NO_GLOB_SUBST
26 else
27 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
32 esac
33 fi
34
35
36 as_nl='
37 '
38 export as_nl
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52 else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72 fi
73
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
76 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
81 fi
82
83
84 # IFS
85 # We need space, tab and new line, in precisely that order. Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
89 IFS=" "" $as_nl"
90
91 # Find who we are. Look in the path if we contain no directory separator.
92 as_myself=
93 case $0 in #((
94 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96 for as_dir in $PATH
97 do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
102 IFS=$as_save_IFS
103
104 ;;
105 esac
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
109 as_myself=$0
110 fi
111 if test ! -f "$as_myself"; then
112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
114 fi
115
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there. '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123 done
124 PS1='$ '
125 PS2='> '
126 PS4='+ '
127
128 # NLS nuisances.
129 LC_ALL=C
130 export LC_ALL
131 LANGUAGE=C
132 export LANGUAGE
133
134 # CDPATH.
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137 # Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
145 BASH_ENV=/dev/null
146 ENV=/dev/null
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148 case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153 esac
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158 as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170 else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176 esac
177 fi
178 "
179 as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
184
185 exitcode=0
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192 else
193 exitcode=1; echo positional parameters were not saved.
194 fi
195 test x\$exitcode = x0 || exit 1
196 test -x / || exit 1"
197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204 else
205 as_have_required=no
206 fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209 else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211 as_found=false
212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213 do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227 fi
228 fi
229 done;;
230 esac
231 as_found=false
232 done
233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236 fi; }
237 IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243 # neutralization value for shells without unset; and this also
244 # works around shells that cannot unset nonexistent variables.
245 # Preserve -v and -x to the replacement shell.
246 BASH_ENV=/dev/null
247 ENV=/dev/null
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249 case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254 esac
255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256 # Admittedly, this is quite paranoid, since all the known shells bail
257 # out after a failed `exec'.
258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259 exit 255
260 fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and rob@mars.org about
270 $0: your system, including any error possibly output before
271 $0: this message. Then install a modern shell, or manually
272 $0: run the script under such a shell if you do have one."
273 fi
274 exit 1
275 fi
276 fi
277 fi
278 SHELL=${CONFIG_SHELL-/bin/sh}
279 export SHELL
280 # Unset more variables known to interfere with behavior of common tools.
281 CLICOLOR_FORCE= GREP_OPTIONS=
282 unset CLICOLOR_FORCE GREP_OPTIONS
283
284 ## --------------------- ##
285 ## M4sh Shell Functions. ##
286 ## --------------------- ##
287 # as_fn_unset VAR
288 # ---------------
289 # Portably unset VAR.
290 as_fn_unset ()
291 {
292 { eval $1=; unset $1;}
293 }
294 as_unset=as_fn_unset
295
296 # as_fn_set_status STATUS
297 # -----------------------
298 # Set $? to STATUS, without forking.
299 as_fn_set_status ()
300 {
301 return $1
302 } # as_fn_set_status
303
304 # as_fn_exit STATUS
305 # -----------------
306 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
307 as_fn_exit ()
308 {
309 set +e
310 as_fn_set_status $1
311 exit $1
312 } # as_fn_exit
313
314 # as_fn_mkdir_p
315 # -------------
316 # Create "$as_dir" as a directory, including parents if necessary.
317 as_fn_mkdir_p ()
318 {
319
320 case $as_dir in #(
321 -*) as_dir=./$as_dir;;
322 esac
323 test -d "$as_dir" || eval $as_mkdir_p || {
324 as_dirs=
325 while :; do
326 case $as_dir in #(
327 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
328 *) as_qdir=$as_dir;;
329 esac
330 as_dirs="'$as_qdir' $as_dirs"
331 as_dir=`$as_dirname -- "$as_dir" ||
332 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
333 X"$as_dir" : 'X\(//\)[^/]' \| \
334 X"$as_dir" : 'X\(//\)$' \| \
335 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
336 $as_echo X"$as_dir" |
337 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
338 s//\1/
339 q
340 }
341 /^X\(\/\/\)[^/].*/{
342 s//\1/
343 q
344 }
345 /^X\(\/\/\)$/{
346 s//\1/
347 q
348 }
349 /^X\(\/\).*/{
350 s//\1/
351 q
352 }
353 s/.*/./; q'`
354 test -d "$as_dir" && break
355 done
356 test -z "$as_dirs" || eval "mkdir $as_dirs"
357 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
358
359
360 } # as_fn_mkdir_p
361
362 # as_fn_executable_p FILE
363 # -----------------------
364 # Test if FILE is an executable regular file.
365 as_fn_executable_p ()
366 {
367 test -f "$1" && test -x "$1"
368 } # as_fn_executable_p
369 # as_fn_append VAR VALUE
370 # ----------------------
371 # Append the text in VALUE to the end of the definition contained in VAR. Take
372 # advantage of any shell optimizations that allow amortized linear growth over
373 # repeated appends, instead of the typical quadratic growth present in naive
374 # implementations.
375 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
376 eval 'as_fn_append ()
377 {
378 eval $1+=\$2
379 }'
380 else
381 as_fn_append ()
382 {
383 eval $1=\$$1\$2
384 }
385 fi # as_fn_append
386
387 # as_fn_arith ARG...
388 # ------------------
389 # Perform arithmetic evaluation on the ARGs, and store the result in the
390 # global $as_val. Take advantage of shells that can avoid forks. The arguments
391 # must be portable across $(()) and expr.
392 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
393 eval 'as_fn_arith ()
394 {
395 as_val=$(( $* ))
396 }'
397 else
398 as_fn_arith ()
399 {
400 as_val=`expr "$@" || test $? -eq 1`
401 }
402 fi # as_fn_arith
403
404
405 # as_fn_error STATUS ERROR [LINENO LOG_FD]
406 # ----------------------------------------
407 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
408 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
409 # script with STATUS, using 1 if that was 0.
410 as_fn_error ()
411 {
412 as_status=$1; test $as_status -eq 0 && as_status=1
413 if test "$4"; then
414 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
415 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
416 fi
417 $as_echo "$as_me: error: $2" >&2
418 as_fn_exit $as_status
419 } # as_fn_error
420
421 if expr a : '\(a\)' >/dev/null 2>&1 &&
422 test "X`expr 00001 : '.*\(...\)'`" = X001; then
423 as_expr=expr
424 else
425 as_expr=false
426 fi
427
428 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
429 as_basename=basename
430 else
431 as_basename=false
432 fi
433
434 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
435 as_dirname=dirname
436 else
437 as_dirname=false
438 fi
439
440 as_me=`$as_basename -- "$0" ||
441 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
442 X"$0" : 'X\(//\)$' \| \
443 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
444 $as_echo X/"$0" |
445 sed '/^.*\/\([^/][^/]*\)\/*$/{
446 s//\1/
447 q
448 }
449 /^X\/\(\/\/\)$/{
450 s//\1/
451 q
452 }
453 /^X\/\(\/\).*/{
454 s//\1/
455 q
456 }
457 s/.*/./; q'`
458
459 # Avoid depending upon Character Ranges.
460 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
461 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
462 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
463 as_cr_digits='0123456789'
464 as_cr_alnum=$as_cr_Letters$as_cr_digits
465
466
467 as_lineno_1=$LINENO as_lineno_1a=$LINENO
468 as_lineno_2=$LINENO as_lineno_2a=$LINENO
469 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
470 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
471 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
472 sed -n '
473 p
474 /[$]LINENO/=
475 ' <$as_myself |
476 sed '
477 s/[$]LINENO.*/&-/
478 t lineno
479 b
480 :lineno
481 N
482 :loop
483 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
484 t loop
485 s/-\n.*//
486 ' >$as_me.lineno &&
487 chmod +x "$as_me.lineno" ||
488 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
489
490 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
491 # already done that, so ensure we don't try to do so again and fall
492 # in an infinite loop. This has already happened in practice.
493 _as_can_reexec=no; export _as_can_reexec
494 # Don't try to exec as it changes $[0], causing all sort of problems
495 # (the dirname of $[0] is not the place where we might find the
496 # original and so on. Autoconf is especially sensitive to this).
497 . "./$as_me.lineno"
498 # Exit status is that of the last command.
499 exit
500 }
501
502 ECHO_C= ECHO_N= ECHO_T=
503 case `echo -n x` in #(((((
504 -n*)
505 case `echo 'xy\c'` in
506 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
507 xy) ECHO_C='\c';;
508 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
509 ECHO_T=' ';;
510 esac;;
511 *)
512 ECHO_N='-n';;
513 esac
514
515 rm -f conf$$ conf$$.exe conf$$.file
516 if test -d conf$$.dir; then
517 rm -f conf$$.dir/conf$$.file
518 else
519 rm -f conf$$.dir
520 mkdir conf$$.dir 2>/dev/null
521 fi
522 if (echo >conf$$.file) 2>/dev/null; then
523 if ln -s conf$$.file conf$$ 2>/dev/null; then
524 as_ln_s='ln -s'
525 # ... but there are two gotchas:
526 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
527 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
528 # In both cases, we have to default to `cp -pR'.
529 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
530 as_ln_s='cp -pR'
531 elif ln conf$$.file conf$$ 2>/dev/null; then
532 as_ln_s=ln
533 else
534 as_ln_s='cp -pR'
535 fi
536 else
537 as_ln_s='cp -pR'
538 fi
539 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
540 rmdir conf$$.dir 2>/dev/null
541
542 if mkdir -p . 2>/dev/null; then
543 as_mkdir_p='mkdir -p "$as_dir"'
544 else
545 test -d ./-p && rmdir ./-p
546 as_mkdir_p=false
547 fi
548
549 as_test_x='test -x'
550 as_executable_p=as_fn_executable_p
551
552 # Sed expression to map a string onto a valid CPP name.
553 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
554
555 # Sed expression to map a string onto a valid variable name.
556 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
557
558
559 test -n "$DJDIR" || exec 7<&0 </dev/null
560 exec 6>&1
561
562 # Name of the host.
563 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
564 # so uname gets run too.
565 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
566
567 #
568 # Initializations.
569 #
570 ac_default_prefix=/usr/local
571 ac_clean_files=
572 ac_config_libobj_dir=.
573 LIBOBJS=
574 cross_compiling=no
575 subdirs=
576 MFLAGS=
577 MAKEFLAGS=
578
579 # Identity of this package.
580 PACKAGE_NAME='MPEG audio decoder and player'
581 PACKAGE_TARNAME='madtest'
582 PACKAGE_VERSION='0.15.2b'
583 PACKAGE_STRING='MPEG audio decoder and player 0.15.2b'
584 PACKAGE_BUGREPORT='rob@mars.org'
585 PACKAGE_URL=''
586
587 # Factoring default headers for most tests.
588 ac_includes_default="\
589 #include <stdio.h>
590 #ifdef HAVE_SYS_TYPES_H
591 # include <sys/types.h>
592 #endif
593 #ifdef HAVE_SYS_STAT_H
594 # include <sys/stat.h>
595 #endif
596 #ifdef STDC_HEADERS
597 # include <stdlib.h>
598 # include <stddef.h>
599 #else
600 # ifdef HAVE_STDLIB_H
601 # include <stdlib.h>
602 # endif
603 #endif
604 #ifdef HAVE_STRING_H
605 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
606 # include <memory.h>
607 # endif
608 # include <string.h>
609 #endif
610 #ifdef HAVE_STRINGS_H
611 # include <strings.h>
612 #endif
613 #ifdef HAVE_INTTYPES_H
614 # include <inttypes.h>
615 #endif
616 #ifdef HAVE_STDINT_H
617 # include <stdint.h>
618 #endif
619 #ifdef HAVE_UNISTD_H
620 # include <unistd.h>
621 #endif"
622
623 ac_header_list=
624 ac_subst_vars='am__EXEEXT_FALSE
625 am__EXEEXT_TRUE
626 LTLIBOBJS
627 ldadd_audio
628 depend_audio
629 am__fastdepCXX_FALSE
630 am__fastdepCXX_TRUE
631 CXXDEPMODE
632 ac_ct_CXX
633 CXXFLAGS
634 CXX
635 POW_LIB
636 ALLOCA
637 LN_S
638 YFLAGS
639 YACC
640 LIBOBJS
641 EGREP
642 GREP
643 CPP
644 am__fastdepCC_FALSE
645 am__fastdepCC_TRUE
646 CCDEPMODE
647 am__nodep
648 AMDEPBACKSLASH
649 AMDEP_FALSE
650 AMDEP_TRUE
651 am__quote
652 am__include
653 DEPDIR
654 OBJEXT
655 EXEEXT
656 ac_ct_CC
657 CPPFLAGS
658 LDFLAGS
659 CFLAGS
660 CC
661 host_os
662 host_vendor
663 host_cpu
664 host
665 build_os
666 build_vendor
667 build_cpu
668 build
669 AM_BACKSLASH
670 AM_DEFAULT_VERBOSITY
671 AM_DEFAULT_V
672 AM_V
673 am__untar
674 am__tar
675 AMTAR
676 am__leading_dot
677 SET_MAKE
678 AWK
679 mkdir_p
680 MKDIR_P
681 INSTALL_STRIP_PROGRAM
682 STRIP
683 install_sh
684 MAKEINFO
685 AUTOHEADER
686 AUTOMAKE
687 AUTOCONF
688 ACLOCAL
689 VERSION
690 PACKAGE
691 CYGPATH_W
692 am__isrc
693 INSTALL_DATA
694 INSTALL_SCRIPT
695 INSTALL_PROGRAM
696 target_alias
697 host_alias
698 build_alias
699 LIBS
700 ECHO_T
701 ECHO_N
702 ECHO_C
703 DEFS
704 mandir
705 localedir
706 libdir
707 psdir
708 pdfdir
709 dvidir
710 htmldir
711 infodir
712 docdir
713 oldincludedir
714 includedir
715 runstatedir
716 localstatedir
717 sharedstatedir
718 sysconfdir
719 datadir
720 datarootdir
721 libexecdir
722 sbindir
723 bindir
724 program_transform_name
725 prefix
726 exec_prefix
727 PACKAGE_URL
728 PACKAGE_BUGREPORT
729 PACKAGE_STRING
730 PACKAGE_VERSION
731 PACKAGE_TARNAME
732 PACKAGE_NAME
733 PATH_SEPARATOR
734 SHELL'
735 ac_subst_files=''
736 ac_user_opts='
737 enable_option_checking
738 enable_silent_rules
739 enable_dependency_tracking
740 enable_profiling
741 enable_debugging
742 enable_experimental
743 '
744 ac_precious_vars='build_alias
745 host_alias
746 target_alias
747 CC
748 CFLAGS
749 LDFLAGS
750 LIBS
751 CPPFLAGS
752 CPP
753 YACC
754 YFLAGS
755 CXX
756 CXXFLAGS
757 CCC'
758
759
760 # Initialize some variables set by options.
761 ac_init_help=
762 ac_init_version=false
763 ac_unrecognized_opts=
764 ac_unrecognized_sep=
765 # The variables have the same names as the options, with
766 # dashes changed to underlines.
767 cache_file=/dev/null
768 exec_prefix=NONE
769 no_create=
770 no_recursion=
771 prefix=NONE
772 program_prefix=NONE
773 program_suffix=NONE
774 program_transform_name=s,x,x,
775 silent=
776 site=
777 srcdir=
778 verbose=
779 x_includes=NONE
780 x_libraries=NONE
781
782 # Installation directory options.
783 # These are left unexpanded so users can "make install exec_prefix=/foo"
784 # and all the variables that are supposed to be based on exec_prefix
785 # by default will actually change.
786 # Use braces instead of parens because sh, perl, etc. also accept them.
787 # (The list follows the same order as the GNU Coding Standards.)
788 bindir='${exec_prefix}/bin'
789 sbindir='${exec_prefix}/sbin'
790 libexecdir='${exec_prefix}/libexec'
791 datarootdir='${prefix}/share'
792 datadir='${datarootdir}'
793 sysconfdir='${prefix}/etc'
794 sharedstatedir='${prefix}/com'
795 localstatedir='${prefix}/var'
796 runstatedir='${localstatedir}/run'
797 includedir='${prefix}/include'
798 oldincludedir='/usr/include'
799 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
800 infodir='${datarootdir}/info'
801 htmldir='${docdir}'
802 dvidir='${docdir}'
803 pdfdir='${docdir}'
804 psdir='${docdir}'
805 libdir='${exec_prefix}/lib'
806 localedir='${datarootdir}/locale'
807 mandir='${datarootdir}/man'
808
809 ac_prev=
810 ac_dashdash=
811 for ac_option
812 do
813 # If the previous option needs an argument, assign it.
814 if test -n "$ac_prev"; then
815 eval $ac_prev=\$ac_option
816 ac_prev=
817 continue
818 fi
819
820 case $ac_option in
821 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
822 *=) ac_optarg= ;;
823 *) ac_optarg=yes ;;
824 esac
825
826 # Accept the important Cygnus configure options, so we can diagnose typos.
827
828 case $ac_dashdash$ac_option in
829 --)
830 ac_dashdash=yes ;;
831
832 -bindir | --bindir | --bindi | --bind | --bin | --bi)
833 ac_prev=bindir ;;
834 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
835 bindir=$ac_optarg ;;
836
837 -build | --build | --buil | --bui | --bu)
838 ac_prev=build_alias ;;
839 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
840 build_alias=$ac_optarg ;;
841
842 -cache-file | --cache-file | --cache-fil | --cache-fi \
843 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
844 ac_prev=cache_file ;;
845 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
846 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
847 cache_file=$ac_optarg ;;
848
849 --config-cache | -C)
850 cache_file=config.cache ;;
851
852 -datadir | --datadir | --datadi | --datad)
853 ac_prev=datadir ;;
854 -datadir=* | --datadir=* | --datadi=* | --datad=*)
855 datadir=$ac_optarg ;;
856
857 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
858 | --dataroo | --dataro | --datar)
859 ac_prev=datarootdir ;;
860 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
861 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
862 datarootdir=$ac_optarg ;;
863
864 -disable-* | --disable-*)
865 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
866 # Reject names that are not valid shell variable names.
867 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
868 as_fn_error $? "invalid feature name: $ac_useropt"
869 ac_useropt_orig=$ac_useropt
870 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
871 case $ac_user_opts in
872 *"
873 "enable_$ac_useropt"
874 "*) ;;
875 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
876 ac_unrecognized_sep=', ';;
877 esac
878 eval enable_$ac_useropt=no ;;
879
880 -docdir | --docdir | --docdi | --doc | --do)
881 ac_prev=docdir ;;
882 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
883 docdir=$ac_optarg ;;
884
885 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
886 ac_prev=dvidir ;;
887 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
888 dvidir=$ac_optarg ;;
889
890 -enable-* | --enable-*)
891 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
892 # Reject names that are not valid shell variable names.
893 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
894 as_fn_error $? "invalid feature name: $ac_useropt"
895 ac_useropt_orig=$ac_useropt
896 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
897 case $ac_user_opts in
898 *"
899 "enable_$ac_useropt"
900 "*) ;;
901 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
902 ac_unrecognized_sep=', ';;
903 esac
904 eval enable_$ac_useropt=\$ac_optarg ;;
905
906 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
907 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
908 | --exec | --exe | --ex)
909 ac_prev=exec_prefix ;;
910 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
911 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
912 | --exec=* | --exe=* | --ex=*)
913 exec_prefix=$ac_optarg ;;
914
915 -gas | --gas | --ga | --g)
916 # Obsolete; use --with-gas.
917 with_gas=yes ;;
918
919 -help | --help | --hel | --he | -h)
920 ac_init_help=long ;;
921 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
922 ac_init_help=recursive ;;
923 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
924 ac_init_help=short ;;
925
926 -host | --host | --hos | --ho)
927 ac_prev=host_alias ;;
928 -host=* | --host=* | --hos=* | --ho=*)
929 host_alias=$ac_optarg ;;
930
931 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
932 ac_prev=htmldir ;;
933 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
934 | --ht=*)
935 htmldir=$ac_optarg ;;
936
937 -includedir | --includedir | --includedi | --included | --include \
938 | --includ | --inclu | --incl | --inc)
939 ac_prev=includedir ;;
940 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
941 | --includ=* | --inclu=* | --incl=* | --inc=*)
942 includedir=$ac_optarg ;;
943
944 -infodir | --infodir | --infodi | --infod | --info | --inf)
945 ac_prev=infodir ;;
946 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
947 infodir=$ac_optarg ;;
948
949 -libdir | --libdir | --libdi | --libd)
950 ac_prev=libdir ;;
951 -libdir=* | --libdir=* | --libdi=* | --libd=*)
952 libdir=$ac_optarg ;;
953
954 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
955 | --libexe | --libex | --libe)
956 ac_prev=libexecdir ;;
957 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
958 | --libexe=* | --libex=* | --libe=*)
959 libexecdir=$ac_optarg ;;
960
961 -localedir | --localedir | --localedi | --localed | --locale)
962 ac_prev=localedir ;;
963 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
964 localedir=$ac_optarg ;;
965
966 -localstatedir | --localstatedir | --localstatedi | --localstated \
967 | --localstate | --localstat | --localsta | --localst | --locals)
968 ac_prev=localstatedir ;;
969 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
970 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
971 localstatedir=$ac_optarg ;;
972
973 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
974 ac_prev=mandir ;;
975 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
976 mandir=$ac_optarg ;;
977
978 -nfp | --nfp | --nf)
979 # Obsolete; use --without-fp.
980 with_fp=no ;;
981
982 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
983 | --no-cr | --no-c | -n)
984 no_create=yes ;;
985
986 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
987 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
988 no_recursion=yes ;;
989
990 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
991 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
992 | --oldin | --oldi | --old | --ol | --o)
993 ac_prev=oldincludedir ;;
994 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
995 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
996 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
997 oldincludedir=$ac_optarg ;;
998
999 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1000 ac_prev=prefix ;;
1001 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1002 prefix=$ac_optarg ;;
1003
1004 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1005 | --program-pre | --program-pr | --program-p)
1006 ac_prev=program_prefix ;;
1007 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1008 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1009 program_prefix=$ac_optarg ;;
1010
1011 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1012 | --program-suf | --program-su | --program-s)
1013 ac_prev=program_suffix ;;
1014 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1015 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1016 program_suffix=$ac_optarg ;;
1017
1018 -program-transform-name | --program-transform-name \
1019 | --program-transform-nam | --program-transform-na \
1020 | --program-transform-n | --program-transform- \
1021 | --program-transform | --program-transfor \
1022 | --program-transfo | --program-transf \
1023 | --program-trans | --program-tran \
1024 | --progr-tra | --program-tr | --program-t)
1025 ac_prev=program_transform_name ;;
1026 -program-transform-name=* | --program-transform-name=* \
1027 | --program-transform-nam=* | --program-transform-na=* \
1028 | --program-transform-n=* | --program-transform-=* \
1029 | --program-transform=* | --program-transfor=* \
1030 | --program-transfo=* | --program-transf=* \
1031 | --program-trans=* | --program-tran=* \
1032 | --progr-tra=* | --program-tr=* | --program-t=*)
1033 program_transform_name=$ac_optarg ;;
1034
1035 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1036 ac_prev=pdfdir ;;
1037 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1038 pdfdir=$ac_optarg ;;
1039
1040 -psdir | --psdir | --psdi | --psd | --ps)
1041 ac_prev=psdir ;;
1042 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1043 psdir=$ac_optarg ;;
1044
1045 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1046 | -silent | --silent | --silen | --sile | --sil)
1047 silent=yes ;;
1048
1049 -runstatedir | --runstatedir | --runstatedi | --runstated \
1050 | --runstate | --runstat | --runsta | --runst | --runs \
1051 | --run | --ru | --r)
1052 ac_prev=runstatedir ;;
1053 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1054 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1055 | --run=* | --ru=* | --r=*)
1056 runstatedir=$ac_optarg ;;
1057
1058 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1059 ac_prev=sbindir ;;
1060 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1061 | --sbi=* | --sb=*)
1062 sbindir=$ac_optarg ;;
1063
1064 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1065 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1066 | --sharedst | --shareds | --shared | --share | --shar \
1067 | --sha | --sh)
1068 ac_prev=sharedstatedir ;;
1069 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1070 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1071 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1072 | --sha=* | --sh=*)
1073 sharedstatedir=$ac_optarg ;;
1074
1075 -site | --site | --sit)
1076 ac_prev=site ;;
1077 -site=* | --site=* | --sit=*)
1078 site=$ac_optarg ;;
1079
1080 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1081 ac_prev=srcdir ;;
1082 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1083 srcdir=$ac_optarg ;;
1084
1085 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1086 | --syscon | --sysco | --sysc | --sys | --sy)
1087 ac_prev=sysconfdir ;;
1088 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1089 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1090 sysconfdir=$ac_optarg ;;
1091
1092 -target | --target | --targe | --targ | --tar | --ta | --t)
1093 ac_prev=target_alias ;;
1094 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1095 target_alias=$ac_optarg ;;
1096
1097 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1098 verbose=yes ;;
1099
1100 -version | --version | --versio | --versi | --vers | -V)
1101 ac_init_version=: ;;
1102
1103 -with-* | --with-*)
1104 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1105 # Reject names that are not valid shell variable names.
1106 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1107 as_fn_error $? "invalid package name: $ac_useropt"
1108 ac_useropt_orig=$ac_useropt
1109 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1110 case $ac_user_opts in
1111 *"
1112 "with_$ac_useropt"
1113 "*) ;;
1114 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1115 ac_unrecognized_sep=', ';;
1116 esac
1117 eval with_$ac_useropt=\$ac_optarg ;;
1118
1119 -without-* | --without-*)
1120 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1121 # Reject names that are not valid shell variable names.
1122 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1123 as_fn_error $? "invalid package name: $ac_useropt"
1124 ac_useropt_orig=$ac_useropt
1125 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1126 case $ac_user_opts in
1127 *"
1128 "with_$ac_useropt"
1129 "*) ;;
1130 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1131 ac_unrecognized_sep=', ';;
1132 esac
1133 eval with_$ac_useropt=no ;;
1134
1135 --x)
1136 # Obsolete; use --with-x.
1137 with_x=yes ;;
1138
1139 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1140 | --x-incl | --x-inc | --x-in | --x-i)
1141 ac_prev=x_includes ;;
1142 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1143 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1144 x_includes=$ac_optarg ;;
1145
1146 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1147 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1148 ac_prev=x_libraries ;;
1149 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1150 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1151 x_libraries=$ac_optarg ;;
1152
1153 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1154 Try \`$0 --help' for more information"
1155 ;;
1156
1157 *=*)
1158 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1159 # Reject names that are not valid shell variable names.
1160 case $ac_envvar in #(
1161 '' | [0-9]* | *[!_$as_cr_alnum]* )
1162 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1163 esac
1164 eval $ac_envvar=\$ac_optarg
1165 export $ac_envvar ;;
1166
1167 *)
1168 # FIXME: should be removed in autoconf 3.0.
1169 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1170 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1171 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1172 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1173 ;;
1174
1175 esac
1176 done
1177
1178 if test -n "$ac_prev"; then
1179 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1180 as_fn_error $? "missing argument to $ac_option"
1181 fi
1182
1183 if test -n "$ac_unrecognized_opts"; then
1184 case $enable_option_checking in
1185 no) ;;
1186 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1187 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1188 esac
1189 fi
1190
1191 # Check all directory arguments for consistency.
1192 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1193 datadir sysconfdir sharedstatedir localstatedir includedir \
1194 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1195 libdir localedir mandir runstatedir
1196 do
1197 eval ac_val=\$$ac_var
1198 # Remove trailing slashes.
1199 case $ac_val in
1200 */ )
1201 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1202 eval $ac_var=\$ac_val;;
1203 esac
1204 # Be sure to have absolute directory names.
1205 case $ac_val in
1206 [\\/$]* | ?:[\\/]* ) continue;;
1207 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1208 esac
1209 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1210 done
1211
1212 # There might be people who depend on the old broken behavior: `$host'
1213 # used to hold the argument of --host etc.
1214 # FIXME: To remove some day.
1215 build=$build_alias
1216 host=$host_alias
1217 target=$target_alias
1218
1219 # FIXME: To remove some day.
1220 if test "x$host_alias" != x; then
1221 if test "x$build_alias" = x; then
1222 cross_compiling=maybe
1223 elif test "x$build_alias" != "x$host_alias"; then
1224 cross_compiling=yes
1225 fi
1226 fi
1227
1228 ac_tool_prefix=
1229 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1230
1231 test "$silent" = yes && exec 6>/dev/null
1232
1233
1234 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1235 ac_ls_di=`ls -di .` &&
1236 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1237 as_fn_error $? "working directory cannot be determined"
1238 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1239 as_fn_error $? "pwd does not report name of working directory"
1240
1241
1242 # Find the source files, if location was not specified.
1243 if test -z "$srcdir"; then
1244 ac_srcdir_defaulted=yes
1245 # Try the directory containing this script, then the parent directory.
1246 ac_confdir=`$as_dirname -- "$as_myself" ||
1247 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1248 X"$as_myself" : 'X\(//\)[^/]' \| \
1249 X"$as_myself" : 'X\(//\)$' \| \
1250 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1251 $as_echo X"$as_myself" |
1252 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1253 s//\1/
1254 q
1255 }
1256 /^X\(\/\/\)[^/].*/{
1257 s//\1/
1258 q
1259 }
1260 /^X\(\/\/\)$/{
1261 s//\1/
1262 q
1263 }
1264 /^X\(\/\).*/{
1265 s//\1/
1266 q
1267 }
1268 s/.*/./; q'`
1269 srcdir=$ac_confdir
1270 if test ! -r "$srcdir/$ac_unique_file"; then
1271 srcdir=..
1272 fi
1273 else
1274 ac_srcdir_defaulted=no
1275 fi
1276 if test ! -r "$srcdir/$ac_unique_file"; then
1277 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1278 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1279 fi
1280 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1281 ac_abs_confdir=`(
1282 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1283 pwd)`
1284 # When building in place, set srcdir=.
1285 if test "$ac_abs_confdir" = "$ac_pwd"; then
1286 srcdir=.
1287 fi
1288 # Remove unnecessary trailing slashes from srcdir.
1289 # Double slashes in file names in object file debugging info
1290 # mess up M-x gdb in Emacs.
1291 case $srcdir in
1292 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1293 esac
1294 for ac_var in $ac_precious_vars; do
1295 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1296 eval ac_env_${ac_var}_value=\$${ac_var}
1297 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1298 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1299 done
1300
1301 #
1302 # Report the --help message.
1303 #
1304 if test "$ac_init_help" = "long"; then
1305 # Omit some internal or obsolete options to make the list less imposing.
1306 # This message is too long to be a string in the A/UX 3.1 sh.
1307 cat <<_ACEOF
1308 \`configure' configures MPEG audio decoder and player 0.15.2b to adapt to many kinds of systems.
1309
1310 Usage: $0 [OPTION]... [VAR=VALUE]...
1311
1312 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1313 VAR=VALUE. See below for descriptions of some of the useful variables.
1314
1315 Defaults for the options are specified in brackets.
1316
1317 Configuration:
1318 -h, --help display this help and exit
1319 --help=short display options specific to this package
1320 --help=recursive display the short help of all the included packages
1321 -V, --version display version information and exit
1322 -q, --quiet, --silent do not print \`checking ...' messages
1323 --cache-file=FILE cache test results in FILE [disabled]
1324 -C, --config-cache alias for \`--cache-file=config.cache'
1325 -n, --no-create do not create output files
1326 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1327
1328 Installation directories:
1329 --prefix=PREFIX install architecture-independent files in PREFIX
1330 [$ac_default_prefix]
1331 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1332 [PREFIX]
1333
1334 By default, \`make install' will install all the files in
1335 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1336 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1337 for instance \`--prefix=\$HOME'.
1338
1339 For better control, use the options below.
1340
1341 Fine tuning of the installation directories:
1342 --bindir=DIR user executables [EPREFIX/bin]
1343 --sbindir=DIR system admin executables [EPREFIX/sbin]
1344 --libexecdir=DIR program executables [EPREFIX/libexec]
1345 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1346 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1347 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1348 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1349 --libdir=DIR object code libraries [EPREFIX/lib]
1350 --includedir=DIR C header files [PREFIX/include]
1351 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1352 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1353 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1354 --infodir=DIR info documentation [DATAROOTDIR/info]
1355 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1356 --mandir=DIR man documentation [DATAROOTDIR/man]
1357 --docdir=DIR documentation root [DATAROOTDIR/doc/madtest]
1358 --htmldir=DIR html documentation [DOCDIR]
1359 --dvidir=DIR dvi documentation [DOCDIR]
1360 --pdfdir=DIR pdf documentation [DOCDIR]
1361 --psdir=DIR ps documentation [DOCDIR]
1362 _ACEOF
1363
1364 cat <<\_ACEOF
1365
1366 Program names:
1367 --program-prefix=PREFIX prepend PREFIX to installed program names
1368 --program-suffix=SUFFIX append SUFFIX to installed program names
1369 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1370
1371 System types:
1372 --build=BUILD configure for building on BUILD [guessed]
1373 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1374 _ACEOF
1375 fi
1376
1377 if test -n "$ac_init_help"; then
1378 case $ac_init_help in
1379 short | recursive ) echo "Configuration of MPEG audio decoder and player 0.15.2b:";;
1380 esac
1381 cat <<\_ACEOF
1382
1383 Optional Features:
1384 --disable-option-checking ignore unrecognized --enable/--with options
1385 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1386 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1387 --enable-silent-rules less verbose build output (undo: "make V=1")
1388 --disable-silent-rules verbose build output (undo: "make V=0")
1389 --enable-dependency-tracking
1390 do not reject slow dependency extractors
1391 --disable-dependency-tracking
1392 speeds up one-time build
1393 --enable-profiling generate profiling code
1394 --enable-debugging enable diagnostic debugging support
1395 --disable-debugging do not enable debugging and use more optimization
1396 --enable-experimental enable experimental code
1397
1398 Some influential environment variables:
1399 CC C compiler command
1400 CFLAGS C compiler flags
1401 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1402 nonstandard directory <lib dir>
1403 LIBS libraries to pass to the linker, e.g. -l<library>
1404 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1405 you have headers in a nonstandard directory <include dir>
1406 CPP C preprocessor
1407 YACC The `Yet Another Compiler Compiler' implementation to use.
1408 Defaults to the first program found out of: `bison -y', `byacc',
1409 `yacc'.
1410 YFLAGS The list of arguments that will be passed by default to $YACC.
1411 This script will default YFLAGS to the empty string to avoid a
1412 default value of `-d' given by some make applications.
1413 CXX C++ compiler command
1414 CXXFLAGS C++ compiler flags
1415
1416 Use these variables to override the choices made by `configure' or to help
1417 it to find libraries and programs with nonstandard names/locations.
1418
1419 Report bugs to <rob@mars.org>.
1420 _ACEOF
1421 ac_status=$?
1422 fi
1423
1424 if test "$ac_init_help" = "recursive"; then
1425 # If there are subdirs, report their specific --help.
1426 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1427 test -d "$ac_dir" ||
1428 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1429 continue
1430 ac_builddir=.
1431
1432 case "$ac_dir" in
1433 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1434 *)
1435 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1436 # A ".." for each directory in $ac_dir_suffix.
1437 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1438 case $ac_top_builddir_sub in
1439 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1440 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1441 esac ;;
1442 esac
1443 ac_abs_top_builddir=$ac_pwd
1444 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1445 # for backward compatibility:
1446 ac_top_builddir=$ac_top_build_prefix
1447
1448 case $srcdir in
1449 .) # We are building in place.
1450 ac_srcdir=.
1451 ac_top_srcdir=$ac_top_builddir_sub
1452 ac_abs_top_srcdir=$ac_pwd ;;
1453 [\\/]* | ?:[\\/]* ) # Absolute name.
1454 ac_srcdir=$srcdir$ac_dir_suffix;
1455 ac_top_srcdir=$srcdir
1456 ac_abs_top_srcdir=$srcdir ;;
1457 *) # Relative name.
1458 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1459 ac_top_srcdir=$ac_top_build_prefix$srcdir
1460 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1461 esac
1462 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1463
1464 cd "$ac_dir" || { ac_status=$?; continue; }
1465 # Check for guested configure.
1466 if test -f "$ac_srcdir/configure.gnu"; then
1467 echo &&
1468 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1469 elif test -f "$ac_srcdir/configure"; then
1470 echo &&
1471 $SHELL "$ac_srcdir/configure" --help=recursive
1472 else
1473 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1474 fi || ac_status=$?
1475 cd "$ac_pwd" || { ac_status=$?; break; }
1476 done
1477 fi
1478
1479 test -n "$ac_init_help" && exit $ac_status
1480 if $ac_init_version; then
1481 cat <<\_ACEOF
1482 MPEG audio decoder and player configure 0.15.2b
1483 generated by GNU Autoconf 2.69
1484
1485 Copyright (C) 2012 Free Software Foundation, Inc.
1486 This configure script is free software; the Free Software Foundation
1487 gives unlimited permission to copy, distribute and modify it.
1488 _ACEOF
1489 exit
1490 fi
1491
1492 ## ------------------------ ##
1493 ## Autoconf initialization. ##
1494 ## ------------------------ ##
1495
1496 # ac_fn_c_try_compile LINENO
1497 # --------------------------
1498 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1499 ac_fn_c_try_compile ()
1500 {
1501 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1502 rm -f conftest.$ac_objext
1503 if { { ac_try="$ac_compile"
1504 case "(($ac_try" in
1505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1506 *) ac_try_echo=$ac_try;;
1507 esac
1508 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1509 $as_echo "$ac_try_echo"; } >&5
1510 (eval "$ac_compile") 2>conftest.err
1511 ac_status=$?
1512 if test -s conftest.err; then
1513 grep -v '^ *+' conftest.err >conftest.er1
1514 cat conftest.er1 >&5
1515 mv -f conftest.er1 conftest.err
1516 fi
1517 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1518 test $ac_status = 0; } && {
1519 test -z "$ac_c_werror_flag" ||
1520 test ! -s conftest.err
1521 } && test -s conftest.$ac_objext; then :
1522 ac_retval=0
1523 else
1524 $as_echo "$as_me: failed program was:" >&5
1525 sed 's/^/| /' conftest.$ac_ext >&5
1526
1527 ac_retval=1
1528 fi
1529 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1530 as_fn_set_status $ac_retval
1531
1532 } # ac_fn_c_try_compile
1533
1534 # ac_fn_c_try_cpp LINENO
1535 # ----------------------
1536 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1537 ac_fn_c_try_cpp ()
1538 {
1539 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1540 if { { ac_try="$ac_cpp conftest.$ac_ext"
1541 case "(($ac_try" in
1542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1543 *) ac_try_echo=$ac_try;;
1544 esac
1545 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1546 $as_echo "$ac_try_echo"; } >&5
1547 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1548 ac_status=$?
1549 if test -s conftest.err; then
1550 grep -v '^ *+' conftest.err >conftest.er1
1551 cat conftest.er1 >&5
1552 mv -f conftest.er1 conftest.err
1553 fi
1554 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1555 test $ac_status = 0; } > conftest.i && {
1556 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1557 test ! -s conftest.err
1558 }; then :
1559 ac_retval=0
1560 else
1561 $as_echo "$as_me: failed program was:" >&5
1562 sed 's/^/| /' conftest.$ac_ext >&5
1563
1564 ac_retval=1
1565 fi
1566 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1567 as_fn_set_status $ac_retval
1568
1569 } # ac_fn_c_try_cpp
1570
1571 # ac_fn_c_try_run LINENO
1572 # ----------------------
1573 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1574 # that executables *can* be run.
1575 ac_fn_c_try_run ()
1576 {
1577 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1578 if { { ac_try="$ac_link"
1579 case "(($ac_try" in
1580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1581 *) ac_try_echo=$ac_try;;
1582 esac
1583 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1584 $as_echo "$ac_try_echo"; } >&5
1585 (eval "$ac_link") 2>&5
1586 ac_status=$?
1587 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1588 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1589 { { case "(($ac_try" in
1590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1591 *) ac_try_echo=$ac_try;;
1592 esac
1593 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1594 $as_echo "$ac_try_echo"; } >&5
1595 (eval "$ac_try") 2>&5
1596 ac_status=$?
1597 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1598 test $ac_status = 0; }; }; then :
1599 ac_retval=0
1600 else
1601 $as_echo "$as_me: program exited with status $ac_status" >&5
1602 $as_echo "$as_me: failed program was:" >&5
1603 sed 's/^/| /' conftest.$ac_ext >&5
1604
1605 ac_retval=$ac_status
1606 fi
1607 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1608 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1609 as_fn_set_status $ac_retval
1610
1611 } # ac_fn_c_try_run
1612
1613 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1614 # -------------------------------------------------------
1615 # Tests whether HEADER exists and can be compiled using the include files in
1616 # INCLUDES, setting the cache variable VAR accordingly.
1617 ac_fn_c_check_header_compile ()
1618 {
1619 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1621 $as_echo_n "checking for $2... " >&6; }
1622 if eval \${$3+:} false; then :
1623 $as_echo_n "(cached) " >&6
1624 else
1625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1626 /* end confdefs.h. */
1627 $4
1628 #include <$2>
1629 _ACEOF
1630 if ac_fn_c_try_compile "$LINENO"; then :
1631 eval "$3=yes"
1632 else
1633 eval "$3=no"
1634 fi
1635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1636 fi
1637 eval ac_res=\$$3
1638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1639 $as_echo "$ac_res" >&6; }
1640 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1641
1642 } # ac_fn_c_check_header_compile
1643
1644 # ac_fn_c_try_link LINENO
1645 # -----------------------
1646 # Try to link conftest.$ac_ext, and return whether this succeeded.
1647 ac_fn_c_try_link ()
1648 {
1649 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1650 rm -f conftest.$ac_objext conftest$ac_exeext
1651 if { { ac_try="$ac_link"
1652 case "(($ac_try" in
1653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1654 *) ac_try_echo=$ac_try;;
1655 esac
1656 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1657 $as_echo "$ac_try_echo"; } >&5
1658 (eval "$ac_link") 2>conftest.err
1659 ac_status=$?
1660 if test -s conftest.err; then
1661 grep -v '^ *+' conftest.err >conftest.er1
1662 cat conftest.er1 >&5
1663 mv -f conftest.er1 conftest.err
1664 fi
1665 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1666 test $ac_status = 0; } && {
1667 test -z "$ac_c_werror_flag" ||
1668 test ! -s conftest.err
1669 } && test -s conftest$ac_exeext && {
1670 test "$cross_compiling" = yes ||
1671 test -x conftest$ac_exeext
1672 }; then :
1673 ac_retval=0
1674 else
1675 $as_echo "$as_me: failed program was:" >&5
1676 sed 's/^/| /' conftest.$ac_ext >&5
1677
1678 ac_retval=1
1679 fi
1680 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1681 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1682 # interfere with the next link command; also delete a directory that is
1683 # left behind by Apple's compiler. We do this before executing the actions.
1684 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1685 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1686 as_fn_set_status $ac_retval
1687
1688 } # ac_fn_c_try_link
1689
1690 # ac_fn_c_check_func LINENO FUNC VAR
1691 # ----------------------------------
1692 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1693 ac_fn_c_check_func ()
1694 {
1695 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1697 $as_echo_n "checking for $2... " >&6; }
1698 if eval \${$3+:} false; then :
1699 $as_echo_n "(cached) " >&6
1700 else
1701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1702 /* end confdefs.h. */
1703 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1704 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1705 #define $2 innocuous_$2
1706
1707 /* System header to define __stub macros and hopefully few prototypes,
1708 which can conflict with char $2 (); below.
1709 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1710 <limits.h> exists even on freestanding compilers. */
1711
1712 #ifdef __STDC__
1713 # include <limits.h>
1714 #else
1715 # include <assert.h>
1716 #endif
1717
1718 #undef $2
1719
1720 /* Override any GCC internal prototype to avoid an error.
1721 Use char because int might match the return type of a GCC
1722 builtin and then its argument prototype would still apply. */
1723 #ifdef __cplusplus
1724 extern "C"
1725 #endif
1726 char $2 ();
1727 /* The GNU C library defines this for functions which it implements
1728 to always fail with ENOSYS. Some functions are actually named
1729 something starting with __ and the normal name is an alias. */
1730 #if defined __stub_$2 || defined __stub___$2
1731 choke me
1732 #endif
1733
1734 int
1735 main ()
1736 {
1737 return $2 ();
1738 ;
1739 return 0;
1740 }
1741 _ACEOF
1742 if ac_fn_c_try_link "$LINENO"; then :
1743 eval "$3=yes"
1744 else
1745 eval "$3=no"
1746 fi
1747 rm -f core conftest.err conftest.$ac_objext \
1748 conftest$ac_exeext conftest.$ac_ext
1749 fi
1750 eval ac_res=\$$3
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1752 $as_echo "$ac_res" >&6; }
1753 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1754
1755 } # ac_fn_c_check_func
1756
1757 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1758 # -------------------------------------------
1759 # Tests whether TYPE exists after having included INCLUDES, setting cache
1760 # variable VAR accordingly.
1761 ac_fn_c_check_type ()
1762 {
1763 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1765 $as_echo_n "checking for $2... " >&6; }
1766 if eval \${$3+:} false; then :
1767 $as_echo_n "(cached) " >&6
1768 else
1769 eval "$3=no"
1770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1771 /* end confdefs.h. */
1772 $4
1773 int
1774 main ()
1775 {
1776 if (sizeof ($2))
1777 return 0;
1778 ;
1779 return 0;
1780 }
1781 _ACEOF
1782 if ac_fn_c_try_compile "$LINENO"; then :
1783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1784 /* end confdefs.h. */
1785 $4
1786 int
1787 main ()
1788 {
1789 if (sizeof (($2)))
1790 return 0;
1791 ;
1792 return 0;
1793 }
1794 _ACEOF
1795 if ac_fn_c_try_compile "$LINENO"; then :
1796
1797 else
1798 eval "$3=yes"
1799 fi
1800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1801 fi
1802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1803 fi
1804 eval ac_res=\$$3
1805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1806 $as_echo "$ac_res" >&6; }
1807 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1808
1809 } # ac_fn_c_check_type
1810
1811 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1812 # -------------------------------------------------------
1813 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1814 # the include files in INCLUDES and setting the cache variable VAR
1815 # accordingly.
1816 ac_fn_c_check_header_mongrel ()
1817 {
1818 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1819 if eval \${$3+:} false; then :
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1821 $as_echo_n "checking for $2... " >&6; }
1822 if eval \${$3+:} false; then :
1823 $as_echo_n "(cached) " >&6
1824 fi
1825 eval ac_res=\$$3
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1827 $as_echo "$ac_res" >&6; }
1828 else
1829 # Is the header compilable?
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1831 $as_echo_n "checking $2 usability... " >&6; }
1832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1833 /* end confdefs.h. */
1834 $4
1835 #include <$2>
1836 _ACEOF
1837 if ac_fn_c_try_compile "$LINENO"; then :
1838 ac_header_compiler=yes
1839 else
1840 ac_header_compiler=no
1841 fi
1842 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1844 $as_echo "$ac_header_compiler" >&6; }
1845
1846 # Is the header present?
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1848 $as_echo_n "checking $2 presence... " >&6; }
1849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1850 /* end confdefs.h. */
1851 #include <$2>
1852 _ACEOF
1853 if ac_fn_c_try_cpp "$LINENO"; then :
1854 ac_header_preproc=yes
1855 else
1856 ac_header_preproc=no
1857 fi
1858 rm -f conftest.err conftest.i conftest.$ac_ext
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1860 $as_echo "$ac_header_preproc" >&6; }
1861
1862 # So? What about this header?
1863 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1864 yes:no: )
1865 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1866 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1868 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1869 ;;
1870 no:yes:* )
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1872 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1874 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1876 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1878 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1880 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1881 ( $as_echo "## --------------------------- ##
1882 ## Report this to rob@mars.org ##
1883 ## --------------------------- ##"
1884 ) | sed "s/^/$as_me: WARNING: /" >&2
1885 ;;
1886 esac
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1888 $as_echo_n "checking for $2... " >&6; }
1889 if eval \${$3+:} false; then :
1890 $as_echo_n "(cached) " >&6
1891 else
1892 eval "$3=\$ac_header_compiler"
1893 fi
1894 eval ac_res=\$$3
1895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1896 $as_echo "$ac_res" >&6; }
1897 fi
1898 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1899
1900 } # ac_fn_c_check_header_mongrel
1901
1902 # ac_fn_cxx_try_compile LINENO
1903 # ----------------------------
1904 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1905 ac_fn_cxx_try_compile ()
1906 {
1907 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908 rm -f conftest.$ac_objext
1909 if { { ac_try="$ac_compile"
1910 case "(($ac_try" in
1911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1912 *) ac_try_echo=$ac_try;;
1913 esac
1914 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1915 $as_echo "$ac_try_echo"; } >&5
1916 (eval "$ac_compile") 2>conftest.err
1917 ac_status=$?
1918 if test -s conftest.err; then
1919 grep -v '^ *+' conftest.err >conftest.er1
1920 cat conftest.er1 >&5
1921 mv -f conftest.er1 conftest.err
1922 fi
1923 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1924 test $ac_status = 0; } && {
1925 test -z "$ac_cxx_werror_flag" ||
1926 test ! -s conftest.err
1927 } && test -s conftest.$ac_objext; then :
1928 ac_retval=0
1929 else
1930 $as_echo "$as_me: failed program was:" >&5
1931 sed 's/^/| /' conftest.$ac_ext >&5
1932
1933 ac_retval=1
1934 fi
1935 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1936 as_fn_set_status $ac_retval
1937
1938 } # ac_fn_cxx_try_compile
1939 cat >config.log <<_ACEOF
1940 This file contains any messages produced by compilers while
1941 running configure, to aid debugging if configure makes a mistake.
1942
1943 It was created by MPEG audio decoder and player $as_me 0.15.2b, which was
1944 generated by GNU Autoconf 2.69. Invocation command line was
1945
1946 $ $0 $@
1947
1948 _ACEOF
1949 exec 5>>config.log
1950 {
1951 cat <<_ASUNAME
1952 ## --------- ##
1953 ## Platform. ##
1954 ## --------- ##
1955
1956 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1957 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1958 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1959 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1960 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1961
1962 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1963 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1964
1965 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1966 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1967 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1968 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1969 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1970 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1971 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1972
1973 _ASUNAME
1974
1975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1976 for as_dir in $PATH
1977 do
1978 IFS=$as_save_IFS
1979 test -z "$as_dir" && as_dir=.
1980 $as_echo "PATH: $as_dir"
1981 done
1982 IFS=$as_save_IFS
1983
1984 } >&5
1985
1986 cat >&5 <<_ACEOF
1987
1988
1989 ## ----------- ##
1990 ## Core tests. ##
1991 ## ----------- ##
1992
1993 _ACEOF
1994
1995
1996 # Keep a trace of the command line.
1997 # Strip out --no-create and --no-recursion so they do not pile up.
1998 # Strip out --silent because we don't want to record it for future runs.
1999 # Also quote any args containing shell meta-characters.
2000 # Make two passes to allow for proper duplicate-argument suppression.
2001 ac_configure_args=
2002 ac_configure_args0=
2003 ac_configure_args1=
2004 ac_must_keep_next=false
2005 for ac_pass in 1 2
2006 do
2007 for ac_arg
2008 do
2009 case $ac_arg in
2010 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2011 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2012 | -silent | --silent | --silen | --sile | --sil)
2013 continue ;;
2014 *\'*)
2015 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2016 esac
2017 case $ac_pass in
2018 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2019 2)
2020 as_fn_append ac_configure_args1 " '$ac_arg'"
2021 if test $ac_must_keep_next = true; then
2022 ac_must_keep_next=false # Got value, back to normal.
2023 else
2024 case $ac_arg in
2025 *=* | --config-cache | -C | -disable-* | --disable-* \
2026 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2027 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2028 | -with-* | --with-* | -without-* | --without-* | --x)
2029 case "$ac_configure_args0 " in
2030 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2031 esac
2032 ;;
2033 -* ) ac_must_keep_next=true ;;
2034 esac
2035 fi
2036 as_fn_append ac_configure_args " '$ac_arg'"
2037 ;;
2038 esac
2039 done
2040 done
2041 { ac_configure_args0=; unset ac_configure_args0;}
2042 { ac_configure_args1=; unset ac_configure_args1;}
2043
2044 # When interrupted or exit'd, cleanup temporary files, and complete
2045 # config.log. We remove comments because anyway the quotes in there
2046 # would cause problems or look ugly.
2047 # WARNING: Use '\'' to represent an apostrophe within the trap.
2048 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2049 trap 'exit_status=$?
2050 # Save into config.log some information that might help in debugging.
2051 {
2052 echo
2053
2054 $as_echo "## ---------------- ##
2055 ## Cache variables. ##
2056 ## ---------------- ##"
2057 echo
2058 # The following way of writing the cache mishandles newlines in values,
2059 (
2060 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2061 eval ac_val=\$$ac_var
2062 case $ac_val in #(
2063 *${as_nl}*)
2064 case $ac_var in #(
2065 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2066 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2067 esac
2068 case $ac_var in #(
2069 _ | IFS | as_nl) ;; #(
2070 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2071 *) { eval $ac_var=; unset $ac_var;} ;;
2072 esac ;;
2073 esac
2074 done
2075 (set) 2>&1 |
2076 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2077 *${as_nl}ac_space=\ *)
2078 sed -n \
2079 "s/'\''/'\''\\\\'\'''\''/g;
2080 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2081 ;; #(
2082 *)
2083 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2084 ;;
2085 esac |
2086 sort
2087 )
2088 echo
2089
2090 $as_echo "## ----------------- ##
2091 ## Output variables. ##
2092 ## ----------------- ##"
2093 echo
2094 for ac_var in $ac_subst_vars
2095 do
2096 eval ac_val=\$$ac_var
2097 case $ac_val in
2098 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2099 esac
2100 $as_echo "$ac_var='\''$ac_val'\''"
2101 done | sort
2102 echo
2103
2104 if test -n "$ac_subst_files"; then
2105 $as_echo "## ------------------- ##
2106 ## File substitutions. ##
2107 ## ------------------- ##"
2108 echo
2109 for ac_var in $ac_subst_files
2110 do
2111 eval ac_val=\$$ac_var
2112 case $ac_val in
2113 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2114 esac
2115 $as_echo "$ac_var='\''$ac_val'\''"
2116 done | sort
2117 echo
2118 fi
2119
2120 if test -s confdefs.h; then
2121 $as_echo "## ----------- ##
2122 ## confdefs.h. ##
2123 ## ----------- ##"
2124 echo
2125 cat confdefs.h
2126 echo
2127 fi
2128 test "$ac_signal" != 0 &&
2129 $as_echo "$as_me: caught signal $ac_signal"
2130 $as_echo "$as_me: exit $exit_status"
2131 } >&5
2132 rm -f core *.core core.conftest.* &&
2133 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2134 exit $exit_status
2135 ' 0
2136 for ac_signal in 1 2 13 15; do
2137 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2138 done
2139 ac_signal=0
2140
2141 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2142 rm -f -r conftest* confdefs.h
2143
2144 $as_echo "/* confdefs.h */" > confdefs.h
2145
2146 # Predefined preprocessor variables.
2147
2148 cat >>confdefs.h <<_ACEOF
2149 #define PACKAGE_NAME "$PACKAGE_NAME"
2150 _ACEOF
2151
2152 cat >>confdefs.h <<_ACEOF
2153 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2154 _ACEOF
2155
2156 cat >>confdefs.h <<_ACEOF
2157 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2158 _ACEOF
2159
2160 cat >>confdefs.h <<_ACEOF
2161 #define PACKAGE_STRING "$PACKAGE_STRING"
2162 _ACEOF
2163
2164 cat >>confdefs.h <<_ACEOF
2165 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2166 _ACEOF
2167
2168 cat >>confdefs.h <<_ACEOF
2169 #define PACKAGE_URL "$PACKAGE_URL"
2170 _ACEOF
2171
2172
2173 # Let the site file select an alternate cache file if it wants to.
2174 # Prefer an explicitly selected file to automatically selected ones.
2175 ac_site_file1=NONE
2176 ac_site_file2=NONE
2177 if test -n "$CONFIG_SITE"; then
2178 # We do not want a PATH search for config.site.
2179 case $CONFIG_SITE in #((
2180 -*) ac_site_file1=./$CONFIG_SITE;;
2181 */*) ac_site_file1=$CONFIG_SITE;;
2182 *) ac_site_file1=./$CONFIG_SITE;;
2183 esac
2184 elif test "x$prefix" != xNONE; then
2185 ac_site_file1=$prefix/share/config.site
2186 ac_site_file2=$prefix/etc/config.site
2187 else
2188 ac_site_file1=$ac_default_prefix/share/config.site
2189 ac_site_file2=$ac_default_prefix/etc/config.site
2190 fi
2191 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2192 do
2193 test "x$ac_site_file" = xNONE && continue
2194 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2195 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2196 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2197 sed 's/^/| /' "$ac_site_file" >&5
2198 . "$ac_site_file" \
2199 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2200 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2201 as_fn_error $? "failed to load site script $ac_site_file
2202 See \`config.log' for more details" "$LINENO" 5; }
2203 fi
2204 done
2205
2206 if test -r "$cache_file"; then
2207 # Some versions of bash will fail to source /dev/null (special files
2208 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2209 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2210 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2211 $as_echo "$as_me: loading cache $cache_file" >&6;}
2212 case $cache_file in
2213 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2214 *) . "./$cache_file";;
2215 esac
2216 fi
2217 else
2218 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2219 $as_echo "$as_me: creating cache $cache_file" >&6;}
2220 >$cache_file
2221 fi
2222
2223 as_fn_append ac_header_list " stdlib.h"
2224 as_fn_append ac_header_list " unistd.h"
2225 as_fn_append ac_header_list " sys/param.h"
2226 # Check that the precious variables saved in the cache have kept the same
2227 # value.
2228 ac_cache_corrupted=false
2229 for ac_var in $ac_precious_vars; do
2230 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2231 eval ac_new_set=\$ac_env_${ac_var}_set
2232 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2233 eval ac_new_val=\$ac_env_${ac_var}_value
2234 case $ac_old_set,$ac_new_set in
2235 set,)
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2237 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2238 ac_cache_corrupted=: ;;
2239 ,set)
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2241 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2242 ac_cache_corrupted=: ;;
2243 ,);;
2244 *)
2245 if test "x$ac_old_val" != "x$ac_new_val"; then
2246 # differences in whitespace do not lead to failure.
2247 ac_old_val_w=`echo x $ac_old_val`
2248 ac_new_val_w=`echo x $ac_new_val`
2249 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2250 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2251 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2252 ac_cache_corrupted=:
2253 else
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2255 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2256 eval $ac_var=\$ac_old_val
2257 fi
2258 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2259 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2260 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2261 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2262 fi;;
2263 esac
2264 # Pass precious variables to config.status.
2265 if test "$ac_new_set" = set; then
2266 case $ac_new_val in
2267 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2268 *) ac_arg=$ac_var=$ac_new_val ;;
2269 esac
2270 case " $ac_configure_args " in
2271 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2272 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2273 esac
2274 fi
2275 done
2276 if $ac_cache_corrupted; then
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2278 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2280 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2281 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2282 fi
2283 ## -------------------- ##
2284 ## Main body of script. ##
2285 ## -------------------- ##
2286
2287 ac_ext=c
2288 ac_cpp='$CPP $CPPFLAGS'
2289 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2290 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2292
2293
2294
2295
2296 am__api_version='1.15'
2297
2298 ac_aux_dir=
2299 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2300 if test -f "$ac_dir/install-sh"; then
2301 ac_aux_dir=$ac_dir
2302 ac_install_sh="$ac_aux_dir/install-sh -c"
2303 break
2304 elif test -f "$ac_dir/install.sh"; then
2305 ac_aux_dir=$ac_dir
2306 ac_install_sh="$ac_aux_dir/install.sh -c"
2307 break
2308 elif test -f "$ac_dir/shtool"; then
2309 ac_aux_dir=$ac_dir
2310 ac_install_sh="$ac_aux_dir/shtool install -c"
2311 break
2312 fi
2313 done
2314 if test -z "$ac_aux_dir"; then
2315 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2316 fi
2317
2318 # These three variables are undocumented and unsupported,
2319 # and are intended to be withdrawn in a future Autoconf release.
2320 # They can cause serious problems if a builder's source tree is in a directory
2321 # whose full name contains unusual characters.
2322 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2323 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2324 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2325
2326
2327 # Find a good install program. We prefer a C program (faster),
2328 # so one script is as good as another. But avoid the broken or
2329 # incompatible versions:
2330 # SysV /etc/install, /usr/sbin/install
2331 # SunOS /usr/etc/install
2332 # IRIX /sbin/install
2333 # AIX /bin/install
2334 # AmigaOS /C/install, which installs bootblocks on floppy discs
2335 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2336 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2337 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2338 # OS/2's system install, which has a completely different semantic
2339 # ./install, which can be erroneously created by make from ./install.sh.
2340 # Reject install programs that cannot install multiple files.
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2342 $as_echo_n "checking for a BSD-compatible install... " >&6; }
2343 if test -z "$INSTALL"; then
2344 if ${ac_cv_path_install+:} false; then :
2345 $as_echo_n "(cached) " >&6
2346 else
2347 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2348 for as_dir in $PATH
2349 do
2350 IFS=$as_save_IFS
2351 test -z "$as_dir" && as_dir=.
2352 # Account for people who put trailing slashes in PATH elements.
2353 case $as_dir/ in #((
2354 ./ | .// | /[cC]/* | \
2355 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2356 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2357 /usr/ucb/* ) ;;
2358 *)
2359 # OSF1 and SCO ODT 3.0 have their own names for install.
2360 # Don't use installbsd from OSF since it installs stuff as root
2361 # by default.
2362 for ac_prog in ginstall scoinst install; do
2363 for ac_exec_ext in '' $ac_executable_extensions; do
2364 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2365 if test $ac_prog = install &&
2366 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2367 # AIX install. It has an incompatible calling convention.
2368 :
2369 elif test $ac_prog = install &&
2370 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2371 # program-specific install script used by HP pwplus--don't use.
2372 :
2373 else
2374 rm -rf conftest.one conftest.two conftest.dir
2375 echo one > conftest.one
2376 echo two > conftest.two
2377 mkdir conftest.dir
2378 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2379 test -s conftest.one && test -s conftest.two &&
2380 test -s conftest.dir/conftest.one &&
2381 test -s conftest.dir/conftest.two
2382 then
2383 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2384 break 3
2385 fi
2386 fi
2387 fi
2388 done
2389 done
2390 ;;
2391 esac
2392
2393 done
2394 IFS=$as_save_IFS
2395
2396 rm -rf conftest.one conftest.two conftest.dir
2397
2398 fi
2399 if test "${ac_cv_path_install+set}" = set; then
2400 INSTALL=$ac_cv_path_install
2401 else
2402 # As a last resort, use the slow shell script. Don't cache a
2403 # value for INSTALL within a source directory, because that will
2404 # break other packages using the cache if that directory is
2405 # removed, or if the value is a relative name.
2406 INSTALL=$ac_install_sh
2407 fi
2408 fi
2409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
2410 $as_echo "$INSTALL" >&6; }
2411
2412 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2413 # It thinks the first close brace ends the variable substitution.
2414 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2415
2416 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2417
2418 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2419
2420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
2421 $as_echo_n "checking whether build environment is sane... " >&6; }
2422 # Reject unsafe characters in $srcdir or the absolute working directory
2423 # name. Accept space and tab only in the latter.
2424 am_lf='
2425 '
2426 case `pwd` in
2427 *[\\\"\#\$\&\'\`$am_lf]*)
2428 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
2429 esac
2430 case $srcdir in
2431 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2432 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
2433 esac
2434
2435 # Do 'set' in a subshell so we don't clobber the current shell's
2436 # arguments. Must try -L first in case configure is actually a
2437 # symlink; some systems play weird games with the mod time of symlinks
2438 # (eg FreeBSD returns the mod time of the symlink's containing
2439 # directory).
2440 if (
2441 am_has_slept=no
2442 for am_try in 1 2; do
2443 echo "timestamp, slept: $am_has_slept" > conftest.file
2444 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2445 if test "$*" = "X"; then
2446 # -L didn't work.
2447 set X `ls -t "$srcdir/configure" conftest.file`
2448 fi
2449 if test "$*" != "X $srcdir/configure conftest.file" \
2450 && test "$*" != "X conftest.file $srcdir/configure"; then
2451
2452 # If neither matched, then we have a broken ls. This can happen
2453 # if, for instance, CONFIG_SHELL is bash and it inherits a
2454 # broken ls alias from the environment. This has actually
2455 # happened. Such a system could not be considered "sane".
2456 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
2457 alias in your environment" "$LINENO" 5
2458 fi
2459 if test "$2" = conftest.file || test $am_try -eq 2; then
2460 break
2461 fi
2462 # Just in case.
2463 sleep 1
2464 am_has_slept=yes
2465 done
2466 test "$2" = conftest.file
2467 )
2468 then
2469 # Ok.
2470 :
2471 else
2472 as_fn_error $? "newly created file is older than distributed files!
2473 Check your system clock" "$LINENO" 5
2474 fi
2475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2476 $as_echo "yes" >&6; }
2477 # If we didn't sleep, we still need to ensure time stamps of config.status and
2478 # generated files are strictly newer.
2479 am_sleep_pid=
2480 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2481 ( sleep 1 ) &
2482 am_sleep_pid=$!
2483 fi
2484
2485 rm -f conftest.file
2486
2487 test "$program_prefix" != NONE &&
2488 program_transform_name="s&^&$program_prefix&;$program_transform_name"
2489 # Use a double $ so make ignores it.
2490 test "$program_suffix" != NONE &&
2491 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
2492 # Double any \ or $.
2493 # By default was `s,x,x', remove it if useless.
2494 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
2495 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
2496
2497 # Expand $ac_aux_dir to an absolute path.
2498 am_aux_dir=`cd "$ac_aux_dir" && pwd`
2499
2500 if test x"${MISSING+set}" != xset; then
2501 case $am_aux_dir in
2502 *\ * | *\ *)
2503 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
2504 *)
2505 MISSING="\${SHELL} $am_aux_dir/missing" ;;
2506 esac
2507 fi
2508 # Use eval to expand $SHELL
2509 if eval "$MISSING --is-lightweight"; then
2510 am_missing_run="$MISSING "
2511 else
2512 am_missing_run=
2513 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
2514 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
2515 fi
2516
2517 if test x"${install_sh+set}" != xset; then
2518 case $am_aux_dir in
2519 *\ * | *\ *)
2520 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
2521 *)
2522 install_sh="\${SHELL} $am_aux_dir/install-sh"
2523 esac
2524 fi
2525
2526 # Installed binaries are usually stripped using 'strip' when the user
2527 # run "make install-strip". However 'strip' might not be the right
2528 # tool to use in cross-compilation environments, therefore Automake
2529 # will honor the 'STRIP' environment variable to overrule this program.
2530 if test "$cross_compiling" != no; then
2531 if test -n "$ac_tool_prefix"; then
2532 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2533 set dummy ${ac_tool_prefix}strip; ac_word=$2
2534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2535 $as_echo_n "checking for $ac_word... " >&6; }
2536 if ${ac_cv_prog_STRIP+:} false; then :
2537 $as_echo_n "(cached) " >&6
2538 else
2539 if test -n "$STRIP"; then
2540 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2541 else
2542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2543 for as_dir in $PATH
2544 do
2545 IFS=$as_save_IFS
2546 test -z "$as_dir" && as_dir=.
2547 for ac_exec_ext in '' $ac_executable_extensions; do
2548 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2549 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2550 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2551 break 2
2552 fi
2553 done
2554 done
2555 IFS=$as_save_IFS
2556
2557 fi
2558 fi
2559 STRIP=$ac_cv_prog_STRIP
2560 if test -n "$STRIP"; then
2561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
2562 $as_echo "$STRIP" >&6; }
2563 else
2564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2565 $as_echo "no" >&6; }
2566 fi
2567
2568
2569 fi
2570 if test -z "$ac_cv_prog_STRIP"; then
2571 ac_ct_STRIP=$STRIP
2572 # Extract the first word of "strip", so it can be a program name with args.
2573 set dummy strip; ac_word=$2
2574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2575 $as_echo_n "checking for $ac_word... " >&6; }
2576 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
2577 $as_echo_n "(cached) " >&6
2578 else
2579 if test -n "$ac_ct_STRIP"; then
2580 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2581 else
2582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2583 for as_dir in $PATH
2584 do
2585 IFS=$as_save_IFS
2586 test -z "$as_dir" && as_dir=.
2587 for ac_exec_ext in '' $ac_executable_extensions; do
2588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2589 ac_cv_prog_ac_ct_STRIP="strip"
2590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2591 break 2
2592 fi
2593 done
2594 done
2595 IFS=$as_save_IFS
2596
2597 fi
2598 fi
2599 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2600 if test -n "$ac_ct_STRIP"; then
2601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
2602 $as_echo "$ac_ct_STRIP" >&6; }
2603 else
2604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2605 $as_echo "no" >&6; }
2606 fi
2607
2608 if test "x$ac_ct_STRIP" = x; then
2609 STRIP=":"
2610 else
2611 case $cross_compiling:$ac_tool_warned in
2612 yes:)
2613 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2614 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2615 ac_tool_warned=yes ;;
2616 esac
2617 STRIP=$ac_ct_STRIP
2618 fi
2619 else
2620 STRIP="$ac_cv_prog_STRIP"
2621 fi
2622
2623 fi
2624 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2625
2626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
2627 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
2628 if test -z "$MKDIR_P"; then
2629 if ${ac_cv_path_mkdir+:} false; then :
2630 $as_echo_n "(cached) " >&6
2631 else
2632 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2633 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
2634 do
2635 IFS=$as_save_IFS
2636 test -z "$as_dir" && as_dir=.
2637 for ac_prog in mkdir gmkdir; do
2638 for ac_exec_ext in '' $ac_executable_extensions; do
2639 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
2640 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
2641 'mkdir (GNU coreutils) '* | \
2642 'mkdir (coreutils) '* | \
2643 'mkdir (fileutils) '4.1*)
2644 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
2645 break 3;;
2646 esac
2647 done
2648 done
2649 done
2650 IFS=$as_save_IFS
2651
2652 fi
2653
2654 test -d ./--version && rmdir ./--version
2655 if test "${ac_cv_path_mkdir+set}" = set; then
2656 MKDIR_P="$ac_cv_path_mkdir -p"
2657 else
2658 # As a last resort, use the slow shell script. Don't cache a
2659 # value for MKDIR_P within a source directory, because that will
2660 # break other packages using the cache if that directory is
2661 # removed, or if the value is a relative name.
2662 MKDIR_P="$ac_install_sh -d"
2663 fi
2664 fi
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
2666 $as_echo "$MKDIR_P" >&6; }
2667
2668 for ac_prog in gawk mawk nawk awk
2669 do
2670 # Extract the first word of "$ac_prog", so it can be a program name with args.
2671 set dummy $ac_prog; ac_word=$2
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2673 $as_echo_n "checking for $ac_word... " >&6; }
2674 if ${ac_cv_prog_AWK+:} false; then :
2675 $as_echo_n "(cached) " >&6
2676 else
2677 if test -n "$AWK"; then
2678 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2679 else
2680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2681 for as_dir in $PATH
2682 do
2683 IFS=$as_save_IFS
2684 test -z "$as_dir" && as_dir=.
2685 for ac_exec_ext in '' $ac_executable_extensions; do
2686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2687 ac_cv_prog_AWK="$ac_prog"
2688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2689 break 2
2690 fi
2691 done
2692 done
2693 IFS=$as_save_IFS
2694
2695 fi
2696 fi
2697 AWK=$ac_cv_prog_AWK
2698 if test -n "$AWK"; then
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
2700 $as_echo "$AWK" >&6; }
2701 else
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2703 $as_echo "no" >&6; }
2704 fi
2705
2706
2707 test -n "$AWK" && break
2708 done
2709
2710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2711 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
2712 set x ${MAKE-make}
2713 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2714 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
2715 $as_echo_n "(cached) " >&6
2716 else
2717 cat >conftest.make <<\_ACEOF
2718 SHELL = /bin/sh
2719 all:
2720 @echo '@@@%%%=$(MAKE)=@@@%%%'
2721 _ACEOF
2722 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
2723 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2724 *@@@%%%=?*=@@@%%%*)
2725 eval ac_cv_prog_make_${ac_make}_set=yes;;
2726 *)
2727 eval ac_cv_prog_make_${ac_make}_set=no;;
2728 esac
2729 rm -f conftest.make
2730 fi
2731 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2733 $as_echo "yes" >&6; }
2734 SET_MAKE=
2735 else
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2737 $as_echo "no" >&6; }
2738 SET_MAKE="MAKE=${MAKE-make}"
2739 fi
2740
2741 rm -rf .tst 2>/dev/null
2742 mkdir .tst 2>/dev/null
2743 if test -d .tst; then
2744 am__leading_dot=.
2745 else
2746 am__leading_dot=_
2747 fi
2748 rmdir .tst 2>/dev/null
2749
2750 # Check whether --enable-silent-rules was given.
2751 if test "${enable_silent_rules+set}" = set; then :
2752 enableval=$enable_silent_rules;
2753 fi
2754
2755 case $enable_silent_rules in # (((
2756 yes) AM_DEFAULT_VERBOSITY=0;;
2757 no) AM_DEFAULT_VERBOSITY=1;;
2758 *) AM_DEFAULT_VERBOSITY=1;;
2759 esac
2760 am_make=${MAKE-make}
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
2762 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
2763 if ${am_cv_make_support_nested_variables+:} false; then :
2764 $as_echo_n "(cached) " >&6
2765 else
2766 if $as_echo 'TRUE=$(BAR$(V))
2767 BAR0=false
2768 BAR1=true
2769 V=1
2770 am__doit:
2771 @$(TRUE)
2772 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
2773 am_cv_make_support_nested_variables=yes
2774 else
2775 am_cv_make_support_nested_variables=no
2776 fi
2777 fi
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
2779 $as_echo "$am_cv_make_support_nested_variables" >&6; }
2780 if test $am_cv_make_support_nested_variables = yes; then
2781 AM_V='$(V)'
2782 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
2783 else
2784 AM_V=$AM_DEFAULT_VERBOSITY
2785 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
2786 fi
2787 AM_BACKSLASH='\'
2788
2789 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2790 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2791 # is not polluted with repeated "-I."
2792 am__isrc=' -I$(srcdir)'
2793 # test to see if srcdir already configured
2794 if test -f $srcdir/config.status; then
2795 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
2796 fi
2797 fi
2798
2799 # test whether we have cygpath
2800 if test -z "$CYGPATH_W"; then
2801 if (cygpath --version) >/dev/null 2>/dev/null; then
2802 CYGPATH_W='cygpath -w'
2803 else
2804 CYGPATH_W=echo
2805 fi
2806 fi
2807
2808
2809 # Define the identity of the package.
2810 PACKAGE='madtest'
2811 VERSION='0.15.2b'
2812
2813
2814 cat >>confdefs.h <<_ACEOF
2815 #define PACKAGE "$PACKAGE"
2816 _ACEOF
2817
2818
2819 cat >>confdefs.h <<_ACEOF
2820 #define VERSION "$VERSION"
2821 _ACEOF
2822
2823 # Some tools Automake needs.
2824
2825 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2826
2827
2828 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2829
2830
2831 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2832
2833
2834 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2835
2836
2837 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2838
2839 # For better backward compatibility. To be removed once Automake 1.9.x
2840 # dies out for good. For more background, see:
2841 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
2842 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
2843 mkdir_p='$(MKDIR_P)'
2844
2845 # We need awk for the "check" target (and possibly the TAP driver). The
2846 # system "awk" is bad on some platforms.
2847 # Always define AMTAR for backward compatibility. Yes, it's still used
2848 # in the wild :-( We should find a proper way to deprecate it ...
2849 AMTAR='$${TAR-tar}'
2850
2851
2852 # We'll loop over all known methods to create a tar archive until one works.
2853 _am_tools='gnutar pax cpio none'
2854
2855 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
2856
2857
2858
2859
2860
2861
2862 # POSIX will say in a future version that running "rm -f" with no argument
2863 # is OK; and we want to be able to make that assumption in our Makefile
2864 # recipes. So use an aggressive probe to check that the usage we want is
2865 # actually supported "in the wild" to an acceptable degree.
2866 # See automake bug#10828.
2867 # To make any issue more visible, cause the running configure to be aborted
2868 # by default if the 'rm' program in use doesn't match our expectations; the
2869 # user can still override this though.
2870 if rm -f && rm -fr && rm -rf; then : OK; else
2871 cat >&2 <<'END'
2872 Oops!
2873
2874 Your 'rm' program seems unable to run without file operands specified
2875 on the command line, even when the '-f' option is present. This is contrary
2876 to the behaviour of most rm programs out there, and not conforming with
2877 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
2878
2879 Please tell bug-automake@gnu.org about your system, including the value
2880 of your $PATH and any error possibly output before this message. This
2881 can help us improve future automake versions.
2882
2883 END
2884 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
2885 echo 'Configuration will proceed anyway, since you have set the' >&2
2886 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
2887 echo >&2
2888 else
2889 cat >&2 <<'END'
2890 Aborting the configuration process, to ensure you take notice of the issue.
2891
2892 You can download and install GNU coreutils to get an 'rm' implementation
2893 that behaves properly: <http://www.gnu.org/software/coreutils/>.
2894
2895 If you want to complete the configuration process using your problematic
2896 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
2897 to "yes", and re-run configure.
2898
2899 END
2900 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
2901 fi
2902 fi
2903
2904 ac_config_files="$ac_config_files Makefile m4/Makefile"
2905
2906
2907
2908 # Make sure we can run config.sub.
2909 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2910 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2911
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2913 $as_echo_n "checking build system type... " >&6; }
2914 if ${ac_cv_build+:} false; then :
2915 $as_echo_n "(cached) " >&6
2916 else
2917 ac_build_alias=$build_alias
2918 test "x$ac_build_alias" = x &&
2919 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2920 test "x$ac_build_alias" = x &&
2921 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2922 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2923 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2924
2925 fi
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2927 $as_echo "$ac_cv_build" >&6; }
2928 case $ac_cv_build in
2929 *-*-*) ;;
2930 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2931 esac
2932 build=$ac_cv_build
2933 ac_save_IFS=$IFS; IFS='-'
2934 set x $ac_cv_build
2935 shift
2936 build_cpu=$1
2937 build_vendor=$2
2938 shift; shift
2939 # Remember, the first character of IFS is used to create $*,
2940 # except with old shells:
2941 build_os=$*
2942 IFS=$ac_save_IFS
2943 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2944
2945
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2947 $as_echo_n "checking host system type... " >&6; }
2948 if ${ac_cv_host+:} false; then :
2949 $as_echo_n "(cached) " >&6
2950 else
2951 if test "x$host_alias" = x; then
2952 ac_cv_host=$ac_cv_build
2953 else
2954 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2955 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2956 fi
2957
2958 fi
2959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2960 $as_echo "$ac_cv_host" >&6; }
2961 case $ac_cv_host in
2962 *-*-*) ;;
2963 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2964 esac
2965 host=$ac_cv_host
2966 ac_save_IFS=$IFS; IFS='-'
2967 set x $ac_cv_host
2968 shift
2969 host_cpu=$1
2970 host_vendor=$2
2971 shift; shift
2972 # Remember, the first character of IFS is used to create $*,
2973 # except with old shells:
2974 host_os=$*
2975 IFS=$ac_save_IFS
2976 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2977
2978
2979
2980
2981 ac_ext=c
2982 ac_cpp='$CPP $CPPFLAGS'
2983 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2984 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2985 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2986 if test -n "$ac_tool_prefix"; then
2987 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2988 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2990 $as_echo_n "checking for $ac_word... " >&6; }
2991 if ${ac_cv_prog_CC+:} false; then :
2992 $as_echo_n "(cached) " >&6
2993 else
2994 if test -n "$CC"; then
2995 ac_cv_prog_CC="$CC" # Let the user override the test.
2996 else
2997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2998 for as_dir in $PATH
2999 do
3000 IFS=$as_save_IFS
3001 test -z "$as_dir" && as_dir=.
3002 for ac_exec_ext in '' $ac_executable_extensions; do
3003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3004 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3006 break 2
3007 fi
3008 done
3009 done
3010 IFS=$as_save_IFS
3011
3012 fi
3013 fi
3014 CC=$ac_cv_prog_CC
3015 if test -n "$CC"; then
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3017 $as_echo "$CC" >&6; }
3018 else
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3020 $as_echo "no" >&6; }
3021 fi
3022
3023
3024 fi
3025 if test -z "$ac_cv_prog_CC"; then
3026 ac_ct_CC=$CC
3027 # Extract the first word of "gcc", so it can be a program name with args.
3028 set dummy gcc; ac_word=$2
3029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3030 $as_echo_n "checking for $ac_word... " >&6; }
3031 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3032 $as_echo_n "(cached) " >&6
3033 else
3034 if test -n "$ac_ct_CC"; then
3035 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3036 else
3037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3038 for as_dir in $PATH
3039 do
3040 IFS=$as_save_IFS
3041 test -z "$as_dir" && as_dir=.
3042 for ac_exec_ext in '' $ac_executable_extensions; do
3043 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3044 ac_cv_prog_ac_ct_CC="gcc"
3045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3046 break 2
3047 fi
3048 done
3049 done
3050 IFS=$as_save_IFS
3051
3052 fi
3053 fi
3054 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3055 if test -n "$ac_ct_CC"; then
3056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3057 $as_echo "$ac_ct_CC" >&6; }
3058 else
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3060 $as_echo "no" >&6; }
3061 fi
3062
3063 if test "x$ac_ct_CC" = x; then
3064 CC=""
3065 else
3066 case $cross_compiling:$ac_tool_warned in
3067 yes:)
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3069 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3070 ac_tool_warned=yes ;;
3071 esac
3072 CC=$ac_ct_CC
3073 fi
3074 else
3075 CC="$ac_cv_prog_CC"
3076 fi
3077
3078 if test -z "$CC"; then
3079 if test -n "$ac_tool_prefix"; then
3080 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3081 set dummy ${ac_tool_prefix}cc; ac_word=$2
3082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3083 $as_echo_n "checking for $ac_word... " >&6; }
3084 if ${ac_cv_prog_CC+:} false; then :
3085 $as_echo_n "(cached) " >&6
3086 else
3087 if test -n "$CC"; then
3088 ac_cv_prog_CC="$CC" # Let the user override the test.
3089 else
3090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3091 for as_dir in $PATH
3092 do
3093 IFS=$as_save_IFS
3094 test -z "$as_dir" && as_dir=.
3095 for ac_exec_ext in '' $ac_executable_extensions; do
3096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3097 ac_cv_prog_CC="${ac_tool_prefix}cc"
3098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3099 break 2
3100 fi
3101 done
3102 done
3103 IFS=$as_save_IFS
3104
3105 fi
3106 fi
3107 CC=$ac_cv_prog_CC
3108 if test -n "$CC"; then
3109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3110 $as_echo "$CC" >&6; }
3111 else
3112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3113 $as_echo "no" >&6; }
3114 fi
3115
3116
3117 fi
3118 fi
3119 if test -z "$CC"; then
3120 # Extract the first word of "cc", so it can be a program name with args.
3121 set dummy cc; ac_word=$2
3122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3123 $as_echo_n "checking for $ac_word... " >&6; }
3124 if ${ac_cv_prog_CC+:} false; then :
3125 $as_echo_n "(cached) " >&6
3126 else
3127 if test -n "$CC"; then
3128 ac_cv_prog_CC="$CC" # Let the user override the test.
3129 else
3130 ac_prog_rejected=no
3131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3132 for as_dir in $PATH
3133 do
3134 IFS=$as_save_IFS
3135 test -z "$as_dir" && as_dir=.
3136 for ac_exec_ext in '' $ac_executable_extensions; do
3137 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3138 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3139 ac_prog_rejected=yes
3140 continue
3141 fi
3142 ac_cv_prog_CC="cc"
3143 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3144 break 2
3145 fi
3146 done
3147 done
3148 IFS=$as_save_IFS
3149
3150 if test $ac_prog_rejected = yes; then
3151 # We found a bogon in the path, so make sure we never use it.
3152 set dummy $ac_cv_prog_CC
3153 shift
3154 if test $# != 0; then
3155 # We chose a different compiler from the bogus one.
3156 # However, it has the same basename, so the bogon will be chosen
3157 # first if we set CC to just the basename; use the full file name.
3158 shift
3159 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3160 fi
3161 fi
3162 fi
3163 fi
3164 CC=$ac_cv_prog_CC
3165 if test -n "$CC"; then
3166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3167 $as_echo "$CC" >&6; }
3168 else
3169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3170 $as_echo "no" >&6; }
3171 fi
3172
3173
3174 fi
3175 if test -z "$CC"; then
3176 if test -n "$ac_tool_prefix"; then
3177 for ac_prog in cl.exe
3178 do
3179 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3180 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3182 $as_echo_n "checking for $ac_word... " >&6; }
3183 if ${ac_cv_prog_CC+:} false; then :
3184 $as_echo_n "(cached) " >&6
3185 else
3186 if test -n "$CC"; then
3187 ac_cv_prog_CC="$CC" # Let the user override the test.
3188 else
3189 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3190 for as_dir in $PATH
3191 do
3192 IFS=$as_save_IFS
3193 test -z "$as_dir" && as_dir=.
3194 for ac_exec_ext in '' $ac_executable_extensions; do
3195 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3196 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3197 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3198 break 2
3199 fi
3200 done
3201 done
3202 IFS=$as_save_IFS
3203
3204 fi
3205 fi
3206 CC=$ac_cv_prog_CC
3207 if test -n "$CC"; then
3208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3209 $as_echo "$CC" >&6; }
3210 else
3211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3212 $as_echo "no" >&6; }
3213 fi
3214
3215
3216 test -n "$CC" && break
3217 done
3218 fi
3219 if test -z "$CC"; then
3220 ac_ct_CC=$CC
3221 for ac_prog in cl.exe
3222 do
3223 # Extract the first word of "$ac_prog", so it can be a program name with args.
3224 set dummy $ac_prog; ac_word=$2
3225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3226 $as_echo_n "checking for $ac_word... " >&6; }
3227 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3228 $as_echo_n "(cached) " >&6
3229 else
3230 if test -n "$ac_ct_CC"; then
3231 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3232 else
3233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3234 for as_dir in $PATH
3235 do
3236 IFS=$as_save_IFS
3237 test -z "$as_dir" && as_dir=.
3238 for ac_exec_ext in '' $ac_executable_extensions; do
3239 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3240 ac_cv_prog_ac_ct_CC="$ac_prog"
3241 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3242 break 2
3243 fi
3244 done
3245 done
3246 IFS=$as_save_IFS
3247
3248 fi
3249 fi
3250 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3251 if test -n "$ac_ct_CC"; then
3252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3253 $as_echo "$ac_ct_CC" >&6; }
3254 else
3255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3256 $as_echo "no" >&6; }
3257 fi
3258
3259
3260 test -n "$ac_ct_CC" && break
3261 done
3262
3263 if test "x$ac_ct_CC" = x; then
3264 CC=""
3265 else
3266 case $cross_compiling:$ac_tool_warned in
3267 yes:)
3268 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3269 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3270 ac_tool_warned=yes ;;
3271 esac
3272 CC=$ac_ct_CC
3273 fi
3274 fi
3275
3276 fi
3277
3278
3279 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3280 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3281 as_fn_error $? "no acceptable C compiler found in \$PATH
3282 See \`config.log' for more details" "$LINENO" 5; }
3283
3284 # Provide some information about the compiler.
3285 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3286 set X $ac_compile
3287 ac_compiler=$2
3288 for ac_option in --version -v -V -qversion; do
3289 { { ac_try="$ac_compiler $ac_option >&5"
3290 case "(($ac_try" in
3291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3292 *) ac_try_echo=$ac_try;;
3293 esac
3294 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3295 $as_echo "$ac_try_echo"; } >&5
3296 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3297 ac_status=$?
3298 if test -s conftest.err; then
3299 sed '10a\
3300 ... rest of stderr output deleted ...
3301 10q' conftest.err >conftest.er1
3302 cat conftest.er1 >&5
3303 fi
3304 rm -f conftest.er1 conftest.err
3305 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3306 test $ac_status = 0; }
3307 done
3308
3309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3310 /* end confdefs.h. */
3311
3312 int
3313 main ()
3314 {
3315
3316 ;
3317 return 0;
3318 }
3319 _ACEOF
3320 ac_clean_files_save=$ac_clean_files
3321 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3322 # Try to create an executable without -o first, disregard a.out.
3323 # It will help us diagnose broken compilers, and finding out an intuition
3324 # of exeext.
3325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3326 $as_echo_n "checking whether the C compiler works... " >&6; }
3327 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3328
3329 # The possible output files:
3330 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3331
3332 ac_rmfiles=
3333 for ac_file in $ac_files
3334 do
3335 case $ac_file in
3336 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3337 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3338 esac
3339 done
3340 rm -f $ac_rmfiles
3341
3342 if { { ac_try="$ac_link_default"
3343 case "(($ac_try" in
3344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3345 *) ac_try_echo=$ac_try;;
3346 esac
3347 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3348 $as_echo "$ac_try_echo"; } >&5
3349 (eval "$ac_link_default") 2>&5
3350 ac_status=$?
3351 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3352 test $ac_status = 0; }; then :
3353 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3354 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3355 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3356 # so that the user can short-circuit this test for compilers unknown to
3357 # Autoconf.
3358 for ac_file in $ac_files ''
3359 do
3360 test -f "$ac_file" || continue
3361 case $ac_file in
3362 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3363 ;;
3364 [ab].out )
3365 # We found the default executable, but exeext='' is most
3366 # certainly right.
3367 break;;
3368 *.* )
3369 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3370 then :; else
3371 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3372 fi
3373 # We set ac_cv_exeext here because the later test for it is not
3374 # safe: cross compilers may not add the suffix if given an `-o'
3375 # argument, so we may need to know it at that point already.
3376 # Even if this section looks crufty: it has the advantage of
3377 # actually working.
3378 break;;
3379 * )
3380 break;;
3381 esac
3382 done
3383 test "$ac_cv_exeext" = no && ac_cv_exeext=
3384
3385 else
3386 ac_file=''
3387 fi
3388 if test -z "$ac_file"; then :
3389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3390 $as_echo "no" >&6; }
3391 $as_echo "$as_me: failed program was:" >&5
3392 sed 's/^/| /' conftest.$ac_ext >&5
3393
3394 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3395 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3396 as_fn_error 77 "C compiler cannot create executables
3397 See \`config.log' for more details" "$LINENO" 5; }
3398 else
3399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3400 $as_echo "yes" >&6; }
3401 fi
3402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3403 $as_echo_n "checking for C compiler default output file name... " >&6; }
3404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3405 $as_echo "$ac_file" >&6; }
3406 ac_exeext=$ac_cv_exeext
3407
3408 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3409 ac_clean_files=$ac_clean_files_save
3410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3411 $as_echo_n "checking for suffix of executables... " >&6; }
3412 if { { ac_try="$ac_link"
3413 case "(($ac_try" in
3414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3415 *) ac_try_echo=$ac_try;;
3416 esac
3417 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3418 $as_echo "$ac_try_echo"; } >&5
3419 (eval "$ac_link") 2>&5
3420 ac_status=$?
3421 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3422 test $ac_status = 0; }; then :
3423 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3424 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3425 # work properly (i.e., refer to `conftest.exe'), while it won't with
3426 # `rm'.
3427 for ac_file in conftest.exe conftest conftest.*; do
3428 test -f "$ac_file" || continue
3429 case $ac_file in
3430 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3431 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3432 break;;
3433 * ) break;;
3434 esac
3435 done
3436 else
3437 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3438 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3439 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3440 See \`config.log' for more details" "$LINENO" 5; }
3441 fi
3442 rm -f conftest conftest$ac_cv_exeext
3443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3444 $as_echo "$ac_cv_exeext" >&6; }
3445
3446 rm -f conftest.$ac_ext
3447 EXEEXT=$ac_cv_exeext
3448 ac_exeext=$EXEEXT
3449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3450 /* end confdefs.h. */
3451 #include <stdio.h>
3452 int
3453 main ()
3454 {
3455 FILE *f = fopen ("conftest.out", "w");
3456 return ferror (f) || fclose (f) != 0;
3457
3458 ;
3459 return 0;
3460 }
3461 _ACEOF
3462 ac_clean_files="$ac_clean_files conftest.out"
3463 # Check that the compiler produces executables we can run. If not, either
3464 # the compiler is broken, or we cross compile.
3465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3466 $as_echo_n "checking whether we are cross compiling... " >&6; }
3467 if test "$cross_compiling" != yes; then
3468 { { ac_try="$ac_link"
3469 case "(($ac_try" in
3470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3471 *) ac_try_echo=$ac_try;;
3472 esac
3473 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3474 $as_echo "$ac_try_echo"; } >&5
3475 (eval "$ac_link") 2>&5
3476 ac_status=$?
3477 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3478 test $ac_status = 0; }
3479 if { ac_try='./conftest$ac_cv_exeext'
3480 { { case "(($ac_try" in
3481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3482 *) ac_try_echo=$ac_try;;
3483 esac
3484 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3485 $as_echo "$ac_try_echo"; } >&5
3486 (eval "$ac_try") 2>&5
3487 ac_status=$?
3488 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3489 test $ac_status = 0; }; }; then
3490 cross_compiling=no
3491 else
3492 if test "$cross_compiling" = maybe; then
3493 cross_compiling=yes
3494 else
3495 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3496 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3497 as_fn_error $? "cannot run C compiled programs.
3498 If you meant to cross compile, use \`--host'.
3499 See \`config.log' for more details" "$LINENO" 5; }
3500 fi
3501 fi
3502 fi
3503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3504 $as_echo "$cross_compiling" >&6; }
3505
3506 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3507 ac_clean_files=$ac_clean_files_save
3508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3509 $as_echo_n "checking for suffix of object files... " >&6; }
3510 if ${ac_cv_objext+:} false; then :
3511 $as_echo_n "(cached) " >&6
3512 else
3513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3514 /* end confdefs.h. */
3515
3516 int
3517 main ()
3518 {
3519
3520 ;
3521 return 0;
3522 }
3523 _ACEOF
3524 rm -f conftest.o conftest.obj
3525 if { { ac_try="$ac_compile"
3526 case "(($ac_try" in
3527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3528 *) ac_try_echo=$ac_try;;
3529 esac
3530 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3531 $as_echo "$ac_try_echo"; } >&5
3532 (eval "$ac_compile") 2>&5
3533 ac_status=$?
3534 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3535 test $ac_status = 0; }; then :
3536 for ac_file in conftest.o conftest.obj conftest.*; do
3537 test -f "$ac_file" || continue;
3538 case $ac_file in
3539 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3540 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3541 break;;
3542 esac
3543 done
3544 else
3545 $as_echo "$as_me: failed program was:" >&5
3546 sed 's/^/| /' conftest.$ac_ext >&5
3547
3548 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3549 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3550 as_fn_error $? "cannot compute suffix of object files: cannot compile
3551 See \`config.log' for more details" "$LINENO" 5; }
3552 fi
3553 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3554 fi
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3556 $as_echo "$ac_cv_objext" >&6; }
3557 OBJEXT=$ac_cv_objext
3558 ac_objext=$OBJEXT
3559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3560 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3561 if ${ac_cv_c_compiler_gnu+:} false; then :
3562 $as_echo_n "(cached) " >&6
3563 else
3564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3565 /* end confdefs.h. */
3566
3567 int
3568 main ()
3569 {
3570 #ifndef __GNUC__
3571 choke me
3572 #endif
3573
3574 ;
3575 return 0;
3576 }
3577 _ACEOF
3578 if ac_fn_c_try_compile "$LINENO"; then :
3579 ac_compiler_gnu=yes
3580 else
3581 ac_compiler_gnu=no
3582 fi
3583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3584 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3585
3586 fi
3587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3588 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3589 if test $ac_compiler_gnu = yes; then
3590 GCC=yes
3591 else
3592 GCC=
3593 fi
3594 ac_test_CFLAGS=${CFLAGS+set}
3595 ac_save_CFLAGS=$CFLAGS
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3597 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3598 if ${ac_cv_prog_cc_g+:} false; then :
3599 $as_echo_n "(cached) " >&6
3600 else
3601 ac_save_c_werror_flag=$ac_c_werror_flag
3602 ac_c_werror_flag=yes
3603 ac_cv_prog_cc_g=no
3604 CFLAGS="-g"
3605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3606 /* end confdefs.h. */
3607
3608 int
3609 main ()
3610 {
3611
3612 ;
3613 return 0;
3614 }
3615 _ACEOF
3616 if ac_fn_c_try_compile "$LINENO"; then :
3617 ac_cv_prog_cc_g=yes
3618 else
3619 CFLAGS=""
3620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3621 /* end confdefs.h. */
3622
3623 int
3624 main ()
3625 {
3626
3627 ;
3628 return 0;
3629 }
3630 _ACEOF
3631 if ac_fn_c_try_compile "$LINENO"; then :
3632
3633 else
3634 ac_c_werror_flag=$ac_save_c_werror_flag
3635 CFLAGS="-g"
3636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3637 /* end confdefs.h. */
3638
3639 int
3640 main ()
3641 {
3642
3643 ;
3644 return 0;
3645 }
3646 _ACEOF
3647 if ac_fn_c_try_compile "$LINENO"; then :
3648 ac_cv_prog_cc_g=yes
3649 fi
3650 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3651 fi
3652 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3653 fi
3654 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3655 ac_c_werror_flag=$ac_save_c_werror_flag
3656 fi
3657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3658 $as_echo "$ac_cv_prog_cc_g" >&6; }
3659 if test "$ac_test_CFLAGS" = set; then
3660 CFLAGS=$ac_save_CFLAGS
3661 elif test $ac_cv_prog_cc_g = yes; then
3662 if test "$GCC" = yes; then
3663 CFLAGS="-g -O2"
3664 else
3665 CFLAGS="-g"
3666 fi
3667 else
3668 if test "$GCC" = yes; then
3669 CFLAGS="-O2"
3670 else
3671 CFLAGS=
3672 fi
3673 fi
3674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3675 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3676 if ${ac_cv_prog_cc_c89+:} false; then :
3677 $as_echo_n "(cached) " >&6
3678 else
3679 ac_cv_prog_cc_c89=no
3680 ac_save_CC=$CC
3681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3682 /* end confdefs.h. */
3683 #include <stdarg.h>
3684 #include <stdio.h>
3685 struct stat;
3686 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3687 struct buf { int x; };
3688 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3689 static char *e (p, i)
3690 char **p;
3691 int i;
3692 {
3693 return p[i];
3694 }
3695 static char *f (char * (*g) (char **, int), char **p, ...)
3696 {
3697 char *s;
3698 va_list v;
3699 va_start (v,p);
3700 s = g (p, va_arg (v,int));
3701 va_end (v);
3702 return s;
3703 }
3704
3705 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3706 function prototypes and stuff, but not '\xHH' hex character constants.
3707 These don't provoke an error unfortunately, instead are silently treated
3708 as 'x'. The following induces an error, until -std is added to get
3709 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3710 array size at least. It's necessary to write '\x00'==0 to get something
3711 that's true only with -std. */
3712 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3713
3714 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3715 inside strings and character constants. */
3716 #define FOO(x) 'x'
3717 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3718
3719 int test (int i, double x);
3720 struct s1 {int (*f) (int a);};
3721 struct s2 {int (*f) (double a);};
3722 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3723 int argc;
3724 char **argv;
3725 int
3726 main ()
3727 {
3728 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3729 ;
3730 return 0;
3731 }
3732 _ACEOF
3733 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3734 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3735 do
3736 CC="$ac_save_CC $ac_arg"
3737 if ac_fn_c_try_compile "$LINENO"; then :
3738 ac_cv_prog_cc_c89=$ac_arg
3739 fi
3740 rm -f core conftest.err conftest.$ac_objext
3741 test "x$ac_cv_prog_cc_c89" != "xno" && break
3742 done
3743 rm -f conftest.$ac_ext
3744 CC=$ac_save_CC
3745
3746 fi
3747 # AC_CACHE_VAL
3748 case "x$ac_cv_prog_cc_c89" in
3749 x)
3750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3751 $as_echo "none needed" >&6; } ;;
3752 xno)
3753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3754 $as_echo "unsupported" >&6; } ;;
3755 *)
3756 CC="$CC $ac_cv_prog_cc_c89"
3757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3758 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3759 esac
3760 if test "x$ac_cv_prog_cc_c89" != xno; then :
3761
3762 fi
3763
3764 ac_ext=c
3765 ac_cpp='$CPP $CPPFLAGS'
3766 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3767 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3768 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3769
3770 ac_ext=c
3771 ac_cpp='$CPP $CPPFLAGS'
3772 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3773 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3774 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
3776 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
3777 if ${am_cv_prog_cc_c_o+:} false; then :
3778 $as_echo_n "(cached) " >&6
3779 else
3780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3781 /* end confdefs.h. */
3782
3783 int
3784 main ()
3785 {
3786
3787 ;
3788 return 0;
3789 }
3790 _ACEOF
3791 # Make sure it works both with $CC and with simple cc.
3792 # Following AC_PROG_CC_C_O, we do the test twice because some
3793 # compilers refuse to overwrite an existing .o file with -o,
3794 # though they will create one.
3795 am_cv_prog_cc_c_o=yes
3796 for am_i in 1 2; do
3797 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
3798 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
3799 ac_status=$?
3800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3801 (exit $ac_status); } \
3802 && test -f conftest2.$ac_objext; then
3803 : OK
3804 else
3805 am_cv_prog_cc_c_o=no
3806 break
3807 fi
3808 done
3809 rm -f core conftest*
3810 unset am_i
3811 fi
3812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
3813 $as_echo "$am_cv_prog_cc_c_o" >&6; }
3814 if test "$am_cv_prog_cc_c_o" != yes; then
3815 # Losing compiler, so override with the script.
3816 # FIXME: It is wrong to rewrite CC.
3817 # But if we don't then we get into trouble of one sort or another.
3818 # A longer-term fix would be to have automake use am__CC in this case,
3819 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3820 CC="$am_aux_dir/compile $CC"
3821 fi
3822 ac_ext=c
3823 ac_cpp='$CPP $CPPFLAGS'
3824 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3825 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3826 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3827
3828 DEPDIR="${am__leading_dot}deps"
3829
3830 ac_config_commands="$ac_config_commands depfiles"
3831
3832
3833 am_make=${MAKE-make}
3834 cat > confinc << 'END'
3835 am__doit:
3836 @echo this is the am__doit target
3837 .PHONY: am__doit
3838 END
3839 # If we don't find an include directive, just comment out the code.
3840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3841 $as_echo_n "checking for style of include used by $am_make... " >&6; }
3842 am__include="#"
3843 am__quote=
3844 _am_result=none
3845 # First try GNU make style include.
3846 echo "include confinc" > confmf
3847 # Ignore all kinds of additional output from 'make'.
3848 case `$am_make -s -f confmf 2> /dev/null` in #(
3849 *the\ am__doit\ target*)
3850 am__include=include
3851 am__quote=
3852 _am_result=GNU
3853 ;;
3854 esac
3855 # Now try BSD make style include.
3856 if test "$am__include" = "#"; then
3857 echo '.include "confinc"' > confmf
3858 case `$am_make -s -f confmf 2> /dev/null` in #(
3859 *the\ am__doit\ target*)
3860 am__include=.include
3861 am__quote="\""
3862 _am_result=BSD
3863 ;;
3864 esac
3865 fi
3866
3867
3868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3869 $as_echo "$_am_result" >&6; }
3870 rm -f confinc confmf
3871
3872 # Check whether --enable-dependency-tracking was given.
3873 if test "${enable_dependency_tracking+set}" = set; then :
3874 enableval=$enable_dependency_tracking;
3875 fi
3876
3877 if test "x$enable_dependency_tracking" != xno; then
3878 am_depcomp="$ac_aux_dir/depcomp"
3879 AMDEPBACKSLASH='\'
3880 am__nodep='_no'
3881 fi
3882 if test "x$enable_dependency_tracking" != xno; then
3883 AMDEP_TRUE=
3884 AMDEP_FALSE='#'
3885 else
3886 AMDEP_TRUE='#'
3887 AMDEP_FALSE=
3888 fi
3889
3890
3891
3892 depcc="$CC" am_compiler_list=
3893
3894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
3895 $as_echo_n "checking dependency style of $depcc... " >&6; }
3896 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
3897 $as_echo_n "(cached) " >&6
3898 else
3899 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3900 # We make a subdir and do the tests there. Otherwise we can end up
3901 # making bogus files that we don't know about and never remove. For
3902 # instance it was reported that on HP-UX the gcc test will end up
3903 # making a dummy file named 'D' -- because '-MD' means "put the output
3904 # in D".
3905 rm -rf conftest.dir
3906 mkdir conftest.dir
3907 # Copy depcomp to subdir because otherwise we won't find it if we're
3908 # using a relative directory.
3909 cp "$am_depcomp" conftest.dir
3910 cd conftest.dir
3911 # We will build objects and dependencies in a subdirectory because
3912 # it helps to detect inapplicable dependency modes. For instance
3913 # both Tru64's cc and ICC support -MD to output dependencies as a
3914 # side effect of compilation, but ICC will put the dependencies in
3915 # the current directory while Tru64 will put them in the object
3916 # directory.
3917 mkdir sub
3918
3919 am_cv_CC_dependencies_compiler_type=none
3920 if test "$am_compiler_list" = ""; then
3921 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3922 fi
3923 am__universal=false
3924 case " $depcc " in #(
3925 *\ -arch\ *\ -arch\ *) am__universal=true ;;
3926 esac
3927
3928 for depmode in $am_compiler_list; do
3929 # Setup a source with many dependencies, because some compilers
3930 # like to wrap large dependency lists on column 80 (with \), and
3931 # we should not choose a depcomp mode which is confused by this.
3932 #
3933 # We need to recreate these files for each test, as the compiler may
3934 # overwrite some of them when testing with obscure command lines.
3935 # This happens at least with the AIX C compiler.
3936 : > sub/conftest.c
3937 for i in 1 2 3 4 5 6; do
3938 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3939 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
3940 # Solaris 10 /bin/sh.
3941 echo '/* dummy */' > sub/conftst$i.h
3942 done
3943 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3944
3945 # We check with '-c' and '-o' for the sake of the "dashmstdout"
3946 # mode. It turns out that the SunPro C++ compiler does not properly
3947 # handle '-M -o', and we need to detect this. Also, some Intel
3948 # versions had trouble with output in subdirs.
3949 am__obj=sub/conftest.${OBJEXT-o}
3950 am__minus_obj="-o $am__obj"
3951 case $depmode in
3952 gcc)
3953 # This depmode causes a compiler race in universal mode.
3954 test "$am__universal" = false || continue
3955 ;;
3956 nosideeffect)
3957 # After this tag, mechanisms are not by side-effect, so they'll
3958 # only be used when explicitly requested.
3959 if test "x$enable_dependency_tracking" = xyes; then
3960 continue
3961 else
3962 break
3963 fi
3964 ;;
3965 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
3966 # This compiler won't grok '-c -o', but also, the minuso test has
3967 # not run yet. These depmodes are late enough in the game, and
3968 # so weak that their functioning should not be impacted.
3969 am__obj=conftest.${OBJEXT-o}
3970 am__minus_obj=
3971 ;;
3972 none) break ;;
3973 esac
3974 if depmode=$depmode \
3975 source=sub/conftest.c object=$am__obj \
3976 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3977 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
3978 >/dev/null 2>conftest.err &&
3979 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3980 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3981 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
3982 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3983 # icc doesn't choke on unknown options, it will just issue warnings
3984 # or remarks (even with -Werror). So we grep stderr for any message
3985 # that says an option was ignored or not supported.
3986 # When given -MP, icc 7.0 and 7.1 complain thusly:
3987 # icc: Command line warning: ignoring option '-M'; no argument required
3988 # The diagnosis changed in icc 8.0:
3989 # icc: Command line remark: option '-MP' not supported
3990 if (grep 'ignoring option' conftest.err ||
3991 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3992 am_cv_CC_dependencies_compiler_type=$depmode
3993 break
3994 fi
3995 fi
3996 done
3997
3998 cd ..
3999 rm -rf conftest.dir
4000 else
4001 am_cv_CC_dependencies_compiler_type=none
4002 fi
4003
4004 fi
4005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4006 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4007 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4008
4009 if
4010 test "x$enable_dependency_tracking" != xno \
4011 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4012 am__fastdepCC_TRUE=
4013 am__fastdepCC_FALSE='#'
4014 else
4015 am__fastdepCC_TRUE='#'
4016 am__fastdepCC_FALSE=
4017 fi
4018
4019
4020
4021
4022
4023
4024 ac_config_headers="$ac_config_headers config.h"
4025
4026
4027 ac_ext=c
4028 ac_cpp='$CPP $CPPFLAGS'
4029 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4030 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4031 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4033 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4034 # On Suns, sometimes $CPP names a directory.
4035 if test -n "$CPP" && test -d "$CPP"; then
4036 CPP=
4037 fi
4038 if test -z "$CPP"; then
4039 if ${ac_cv_prog_CPP+:} false; then :
4040 $as_echo_n "(cached) " >&6
4041 else
4042 # Double quotes because CPP needs to be expanded
4043 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4044 do
4045 ac_preproc_ok=false
4046 for ac_c_preproc_warn_flag in '' yes
4047 do
4048 # Use a header file that comes with gcc, so configuring glibc
4049 # with a fresh cross-compiler works.
4050 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4051 # <limits.h> exists even on freestanding compilers.
4052 # On the NeXT, cc -E runs the code through the compiler's parser,
4053 # not just through cpp. "Syntax error" is here to catch this case.
4054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4055 /* end confdefs.h. */
4056 #ifdef __STDC__
4057 # include <limits.h>
4058 #else
4059 # include <assert.h>
4060 #endif
4061 Syntax error
4062 _ACEOF
4063 if ac_fn_c_try_cpp "$LINENO"; then :
4064
4065 else
4066 # Broken: fails on valid input.
4067 continue
4068 fi
4069 rm -f conftest.err conftest.i conftest.$ac_ext
4070
4071 # OK, works on sane cases. Now check whether nonexistent headers
4072 # can be detected and how.
4073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4074 /* end confdefs.h. */
4075 #include <ac_nonexistent.h>
4076 _ACEOF
4077 if ac_fn_c_try_cpp "$LINENO"; then :
4078 # Broken: success on invalid input.
4079 continue
4080 else
4081 # Passes both tests.
4082 ac_preproc_ok=:
4083 break
4084 fi
4085 rm -f conftest.err conftest.i conftest.$ac_ext
4086
4087 done
4088 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4089 rm -f conftest.i conftest.err conftest.$ac_ext
4090 if $ac_preproc_ok; then :
4091 break
4092 fi
4093
4094 done
4095 ac_cv_prog_CPP=$CPP
4096
4097 fi
4098 CPP=$ac_cv_prog_CPP
4099 else
4100 ac_cv_prog_CPP=$CPP
4101 fi
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4103 $as_echo "$CPP" >&6; }
4104 ac_preproc_ok=false
4105 for ac_c_preproc_warn_flag in '' yes
4106 do
4107 # Use a header file that comes with gcc, so configuring glibc
4108 # with a fresh cross-compiler works.
4109 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4110 # <limits.h> exists even on freestanding compilers.
4111 # On the NeXT, cc -E runs the code through the compiler's parser,
4112 # not just through cpp. "Syntax error" is here to catch this case.
4113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4114 /* end confdefs.h. */
4115 #ifdef __STDC__
4116 # include <limits.h>
4117 #else
4118 # include <assert.h>
4119 #endif
4120 Syntax error
4121 _ACEOF
4122 if ac_fn_c_try_cpp "$LINENO"; then :
4123
4124 else
4125 # Broken: fails on valid input.
4126 continue
4127 fi
4128 rm -f conftest.err conftest.i conftest.$ac_ext
4129
4130 # OK, works on sane cases. Now check whether nonexistent headers
4131 # can be detected and how.
4132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4133 /* end confdefs.h. */
4134 #include <ac_nonexistent.h>
4135 _ACEOF
4136 if ac_fn_c_try_cpp "$LINENO"; then :
4137 # Broken: success on invalid input.
4138 continue
4139 else
4140 # Passes both tests.
4141 ac_preproc_ok=:
4142 break
4143 fi
4144 rm -f conftest.err conftest.i conftest.$ac_ext
4145
4146 done
4147 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4148 rm -f conftest.i conftest.err conftest.$ac_ext
4149 if $ac_preproc_ok; then :
4150
4151 else
4152 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4153 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4154 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4155 See \`config.log' for more details" "$LINENO" 5; }
4156 fi
4157
4158 ac_ext=c
4159 ac_cpp='$CPP $CPPFLAGS'
4160 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4161 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4162 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4163
4164
4165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4166 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4167 if ${ac_cv_path_GREP+:} false; then :
4168 $as_echo_n "(cached) " >&6
4169 else
4170 if test -z "$GREP"; then
4171 ac_path_GREP_found=false
4172 # Loop through the user's path and test for each of PROGNAME-LIST
4173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4175 do
4176 IFS=$as_save_IFS
4177 test -z "$as_dir" && as_dir=.
4178 for ac_prog in grep ggrep; do
4179 for ac_exec_ext in '' $ac_executable_extensions; do
4180 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4181 as_fn_executable_p "$ac_path_GREP" || continue
4182 # Check for GNU ac_path_GREP and select it if it is found.
4183 # Check for GNU $ac_path_GREP
4184 case `"$ac_path_GREP" --version 2>&1` in
4185 *GNU*)
4186 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4187 *)
4188 ac_count=0
4189 $as_echo_n 0123456789 >"conftest.in"
4190 while :
4191 do
4192 cat "conftest.in" "conftest.in" >"conftest.tmp"
4193 mv "conftest.tmp" "conftest.in"
4194 cp "conftest.in" "conftest.nl"
4195 $as_echo 'GREP' >> "conftest.nl"
4196 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4197 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4198 as_fn_arith $ac_count + 1 && ac_count=$as_val
4199 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4200 # Best one so far, save it but keep looking for a better one
4201 ac_cv_path_GREP="$ac_path_GREP"
4202 ac_path_GREP_max=$ac_count
4203 fi
4204 # 10*(2^10) chars as input seems more than enough
4205 test $ac_count -gt 10 && break
4206 done
4207 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4208 esac
4209
4210 $ac_path_GREP_found && break 3
4211 done
4212 done
4213 done
4214 IFS=$as_save_IFS
4215 if test -z "$ac_cv_path_GREP"; then
4216 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4217 fi
4218 else
4219 ac_cv_path_GREP=$GREP
4220 fi
4221
4222 fi
4223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4224 $as_echo "$ac_cv_path_GREP" >&6; }
4225 GREP="$ac_cv_path_GREP"
4226
4227
4228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4229 $as_echo_n "checking for egrep... " >&6; }
4230 if ${ac_cv_path_EGREP+:} false; then :
4231 $as_echo_n "(cached) " >&6
4232 else
4233 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4234 then ac_cv_path_EGREP="$GREP -E"
4235 else
4236 if test -z "$EGREP"; then
4237 ac_path_EGREP_found=false
4238 # Loop through the user's path and test for each of PROGNAME-LIST
4239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4240 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4241 do
4242 IFS=$as_save_IFS
4243 test -z "$as_dir" && as_dir=.
4244 for ac_prog in egrep; do
4245 for ac_exec_ext in '' $ac_executable_extensions; do
4246 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4247 as_fn_executable_p "$ac_path_EGREP" || continue
4248 # Check for GNU ac_path_EGREP and select it if it is found.
4249 # Check for GNU $ac_path_EGREP
4250 case `"$ac_path_EGREP" --version 2>&1` in
4251 *GNU*)
4252 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4253 *)
4254 ac_count=0
4255 $as_echo_n 0123456789 >"conftest.in"
4256 while :
4257 do
4258 cat "conftest.in" "conftest.in" >"conftest.tmp"
4259 mv "conftest.tmp" "conftest.in"
4260 cp "conftest.in" "conftest.nl"
4261 $as_echo 'EGREP' >> "conftest.nl"
4262 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4263 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4264 as_fn_arith $ac_count + 1 && ac_count=$as_val
4265 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4266 # Best one so far, save it but keep looking for a better one
4267 ac_cv_path_EGREP="$ac_path_EGREP"
4268 ac_path_EGREP_max=$ac_count
4269 fi
4270 # 10*(2^10) chars as input seems more than enough
4271 test $ac_count -gt 10 && break
4272 done
4273 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4274 esac
4275
4276 $ac_path_EGREP_found && break 3
4277 done
4278 done
4279 done
4280 IFS=$as_save_IFS
4281 if test -z "$ac_cv_path_EGREP"; then
4282 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4283 fi
4284 else
4285 ac_cv_path_EGREP=$EGREP
4286 fi
4287
4288 fi
4289 fi
4290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4291 $as_echo "$ac_cv_path_EGREP" >&6; }
4292 EGREP="$ac_cv_path_EGREP"
4293
4294
4295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4296 $as_echo_n "checking for ANSI C header files... " >&6; }
4297 if ${ac_cv_header_stdc+:} false; then :
4298 $as_echo_n "(cached) " >&6
4299 else
4300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4301 /* end confdefs.h. */
4302 #include <stdlib.h>
4303 #include <stdarg.h>
4304 #include <string.h>
4305 #include <float.h>
4306
4307 int
4308 main ()
4309 {
4310
4311 ;
4312 return 0;
4313 }
4314 _ACEOF
4315 if ac_fn_c_try_compile "$LINENO"; then :
4316 ac_cv_header_stdc=yes
4317 else
4318 ac_cv_header_stdc=no
4319 fi
4320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4321
4322 if test $ac_cv_header_stdc = yes; then
4323 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4325 /* end confdefs.h. */
4326 #include <string.h>
4327
4328 _ACEOF
4329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4330 $EGREP "memchr" >/dev/null 2>&1; then :
4331
4332 else
4333 ac_cv_header_stdc=no
4334 fi
4335 rm -f conftest*
4336
4337 fi
4338
4339 if test $ac_cv_header_stdc = yes; then
4340 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4342 /* end confdefs.h. */
4343 #include <stdlib.h>
4344
4345 _ACEOF
4346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4347 $EGREP "free" >/dev/null 2>&1; then :
4348
4349 else
4350 ac_cv_header_stdc=no
4351 fi
4352 rm -f conftest*
4353
4354 fi
4355
4356 if test $ac_cv_header_stdc = yes; then
4357 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4358 if test "$cross_compiling" = yes; then :
4359 :
4360 else
4361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4362 /* end confdefs.h. */
4363 #include <ctype.h>
4364 #include <stdlib.h>
4365 #if ((' ' & 0x0FF) == 0x020)
4366 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4367 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4368 #else
4369 # define ISLOWER(c) \
4370 (('a' <= (c) && (c) <= 'i') \
4371 || ('j' <= (c) && (c) <= 'r') \
4372 || ('s' <= (c) && (c) <= 'z'))
4373 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4374 #endif
4375
4376 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4377 int
4378 main ()
4379 {
4380 int i;
4381 for (i = 0; i < 256; i++)
4382 if (XOR (islower (i), ISLOWER (i))
4383 || toupper (i) != TOUPPER (i))
4384 return 2;
4385 return 0;
4386 }
4387 _ACEOF
4388 if ac_fn_c_try_run "$LINENO"; then :
4389
4390 else
4391 ac_cv_header_stdc=no
4392 fi
4393 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4394 conftest.$ac_objext conftest.beam conftest.$ac_ext
4395 fi
4396
4397 fi
4398 fi
4399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4400 $as_echo "$ac_cv_header_stdc" >&6; }
4401 if test $ac_cv_header_stdc = yes; then
4402
4403 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4404
4405 fi
4406
4407
4408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
4409 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
4410 if ${ac_cv_c_const+:} false; then :
4411 $as_echo_n "(cached) " >&6
4412 else
4413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4414 /* end confdefs.h. */
4415
4416 int
4417 main ()
4418 {
4419
4420 #ifndef __cplusplus
4421 /* Ultrix mips cc rejects this sort of thing. */
4422 typedef int charset[2];
4423 const charset cs = { 0, 0 };
4424 /* SunOS 4.1.1 cc rejects this. */
4425 char const *const *pcpcc;
4426 char **ppc;
4427 /* NEC SVR4.0.2 mips cc rejects this. */
4428 struct point {int x, y;};
4429 static struct point const zero = {0,0};
4430 /* AIX XL C 1.02.0.0 rejects this.
4431 It does not let you subtract one const X* pointer from another in
4432 an arm of an if-expression whose if-part is not a constant
4433 expression */
4434 const char *g = "string";
4435 pcpcc = &g + (g ? g-g : 0);
4436 /* HPUX 7.0 cc rejects these. */
4437 ++pcpcc;
4438 ppc = (char**) pcpcc;
4439 pcpcc = (char const *const *) ppc;
4440 { /* SCO 3.2v4 cc rejects this sort of thing. */
4441 char tx;
4442 char *t = &tx;
4443 char const *s = 0 ? (char *) 0 : (char const *) 0;
4444
4445 *t++ = 0;
4446 if (s) return 0;
4447 }
4448 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4449 int x[] = {25, 17};
4450 const int *foo = &x[0];
4451 ++foo;
4452 }
4453 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4454 typedef const int *iptr;
4455 iptr p = 0;
4456 ++p;
4457 }
4458 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
4459 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4460 struct s { int j; const int *ap[3]; } bx;
4461 struct s *b = &bx; b->j = 5;
4462 }
4463 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4464 const int foo = 10;
4465 if (!foo) return 0;
4466 }
4467 return !cs[0] && !zero.x;
4468 #endif
4469
4470 ;
4471 return 0;
4472 }
4473 _ACEOF
4474 if ac_fn_c_try_compile "$LINENO"; then :
4475 ac_cv_c_const=yes
4476 else
4477 ac_cv_c_const=no
4478 fi
4479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4480 fi
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
4482 $as_echo "$ac_cv_c_const" >&6; }
4483 if test $ac_cv_c_const = no; then
4484
4485 $as_echo "#define const /**/" >>confdefs.h
4486
4487 fi
4488
4489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4490 $as_echo_n "checking for inline... " >&6; }
4491 if ${ac_cv_c_inline+:} false; then :
4492 $as_echo_n "(cached) " >&6
4493 else
4494 ac_cv_c_inline=no
4495 for ac_kw in inline __inline__ __inline; do
4496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4497 /* end confdefs.h. */
4498 #ifndef __cplusplus
4499 typedef int foo_t;
4500 static $ac_kw foo_t static_foo () {return 0; }
4501 $ac_kw foo_t foo () {return 0; }
4502 #endif
4503
4504 _ACEOF
4505 if ac_fn_c_try_compile "$LINENO"; then :
4506 ac_cv_c_inline=$ac_kw
4507 fi
4508 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4509 test "$ac_cv_c_inline" != no && break
4510 done
4511
4512 fi
4513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
4514 $as_echo "$ac_cv_c_inline" >&6; }
4515
4516 case $ac_cv_c_inline in
4517 inline | yes) ;;
4518 *)
4519 case $ac_cv_c_inline in
4520 no) ac_val=;;
4521 *) ac_val=$ac_cv_c_inline;;
4522 esac
4523 cat >>confdefs.h <<_ACEOF
4524 #ifndef __cplusplus
4525 #define inline $ac_val
4526 #endif
4527 _ACEOF
4528 ;;
4529 esac
4530
4531 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4532 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4533 inttypes.h stdint.h unistd.h
4534 do :
4535 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4536 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4537 "
4538 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4539 cat >>confdefs.h <<_ACEOF
4540 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4541 _ACEOF
4542
4543 fi
4544
4545 done
4546
4547
4548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
4549 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
4550 if ${ac_cv_c_bigendian+:} false; then :
4551 $as_echo_n "(cached) " >&6
4552 else
4553 ac_cv_c_bigendian=unknown
4554 # See if we're dealing with a universal compiler.
4555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4556 /* end confdefs.h. */
4557 #ifndef __APPLE_CC__
4558 not a universal capable compiler
4559 #endif
4560 typedef int dummy;
4561
4562 _ACEOF
4563 if ac_fn_c_try_compile "$LINENO"; then :
4564
4565 # Check for potential -arch flags. It is not universal unless
4566 # there are at least two -arch flags with different values.
4567 ac_arch=
4568 ac_prev=
4569 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
4570 if test -n "$ac_prev"; then
4571 case $ac_word in
4572 i?86 | x86_64 | ppc | ppc64)
4573 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
4574 ac_arch=$ac_word
4575 else
4576 ac_cv_c_bigendian=universal
4577 break
4578 fi
4579 ;;
4580 esac
4581 ac_prev=
4582 elif test "x$ac_word" = "x-arch"; then
4583 ac_prev=arch
4584 fi
4585 done
4586 fi
4587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4588 if test $ac_cv_c_bigendian = unknown; then
4589 # See if sys/param.h defines the BYTE_ORDER macro.
4590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4591 /* end confdefs.h. */
4592 #include <sys/types.h>
4593 #include <sys/param.h>
4594
4595 int
4596 main ()
4597 {
4598 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
4599 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
4600 && LITTLE_ENDIAN)
4601 bogus endian macros
4602 #endif
4603
4604 ;
4605 return 0;
4606 }
4607 _ACEOF
4608 if ac_fn_c_try_compile "$LINENO"; then :
4609 # It does; now see whether it defined to BIG_ENDIAN or not.
4610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4611 /* end confdefs.h. */
4612 #include <sys/types.h>
4613 #include <sys/param.h>
4614
4615 int
4616 main ()
4617 {
4618 #if BYTE_ORDER != BIG_ENDIAN
4619 not big endian
4620 #endif
4621
4622 ;
4623 return 0;
4624 }
4625 _ACEOF
4626 if ac_fn_c_try_compile "$LINENO"; then :
4627 ac_cv_c_bigendian=yes
4628 else
4629 ac_cv_c_bigendian=no
4630 fi
4631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4632 fi
4633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4634 fi
4635 if test $ac_cv_c_bigendian = unknown; then
4636 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4638 /* end confdefs.h. */
4639 #include <limits.h>
4640
4641 int
4642 main ()
4643 {
4644 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
4645 bogus endian macros
4646 #endif
4647
4648 ;
4649 return 0;
4650 }
4651 _ACEOF
4652 if ac_fn_c_try_compile "$LINENO"; then :
4653 # It does; now see whether it defined to _BIG_ENDIAN or not.
4654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4655 /* end confdefs.h. */
4656 #include <limits.h>
4657
4658 int
4659 main ()
4660 {
4661 #ifndef _BIG_ENDIAN
4662 not big endian
4663 #endif
4664
4665 ;
4666 return 0;
4667 }
4668 _ACEOF
4669 if ac_fn_c_try_compile "$LINENO"; then :
4670 ac_cv_c_bigendian=yes
4671 else
4672 ac_cv_c_bigendian=no
4673 fi
4674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4675 fi
4676 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4677 fi
4678 if test $ac_cv_c_bigendian = unknown; then
4679 # Compile a test program.
4680 if test "$cross_compiling" = yes; then :
4681 # Try to guess by grepping values from an object file.
4682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4683 /* end confdefs.h. */
4684 short int ascii_mm[] =
4685 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4686 short int ascii_ii[] =
4687 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4688 int use_ascii (int i) {
4689 return ascii_mm[i] + ascii_ii[i];
4690 }
4691 short int ebcdic_ii[] =
4692 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4693 short int ebcdic_mm[] =
4694 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4695 int use_ebcdic (int i) {
4696 return ebcdic_mm[i] + ebcdic_ii[i];
4697 }
4698 extern int foo;
4699
4700 int
4701 main ()
4702 {
4703 return use_ascii (foo) == use_ebcdic (foo);
4704 ;
4705 return 0;
4706 }
4707 _ACEOF
4708 if ac_fn_c_try_compile "$LINENO"; then :
4709 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4710 ac_cv_c_bigendian=yes
4711 fi
4712 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4713 if test "$ac_cv_c_bigendian" = unknown; then
4714 ac_cv_c_bigendian=no
4715 else
4716 # finding both strings is unlikely to happen, but who knows?
4717 ac_cv_c_bigendian=unknown
4718 fi
4719 fi
4720 fi
4721 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4722 else
4723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4724 /* end confdefs.h. */
4725 $ac_includes_default
4726 int
4727 main ()
4728 {
4729
4730 /* Are we little or big endian? From Harbison&Steele. */
4731 union
4732 {
4733 long int l;
4734 char c[sizeof (long int)];
4735 } u;
4736 u.l = 1;
4737 return u.c[sizeof (long int) - 1] == 1;
4738
4739 ;
4740 return 0;
4741 }
4742 _ACEOF
4743 if ac_fn_c_try_run "$LINENO"; then :
4744 ac_cv_c_bigendian=no
4745 else
4746 ac_cv_c_bigendian=yes
4747 fi
4748 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4749 conftest.$ac_objext conftest.beam conftest.$ac_ext
4750 fi
4751
4752 fi
4753 fi
4754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4755 $as_echo "$ac_cv_c_bigendian" >&6; }
4756 case $ac_cv_c_bigendian in #(
4757 yes)
4758 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
4759 ;; #(
4760 no)
4761 ;; #(
4762 universal)
4763
4764 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
4765
4766 ;; #(
4767 *)
4768 as_fn_error $? "unknown endianness
4769 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
4770 esac
4771
4772
4773
4774 for ac_func in vprintf
4775 do :
4776 ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
4777 if test "x$ac_cv_func_vprintf" = xyes; then :
4778 cat >>confdefs.h <<_ACEOF
4779 #define HAVE_VPRINTF 1
4780 _ACEOF
4781
4782 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
4783 if test "x$ac_cv_func__doprnt" = xyes; then :
4784
4785 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
4786
4787 fi
4788
4789 fi
4790 done
4791
4792
4793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
4794 $as_echo_n "checking for error_at_line... " >&6; }
4795 if ${ac_cv_lib_error_at_line+:} false; then :
4796 $as_echo_n "(cached) " >&6
4797 else
4798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4799 /* end confdefs.h. */
4800 #include <error.h>
4801 int
4802 main ()
4803 {
4804 error_at_line (0, 0, "", 0, "an error occurred");
4805 ;
4806 return 0;
4807 }
4808 _ACEOF
4809 if ac_fn_c_try_link "$LINENO"; then :
4810 ac_cv_lib_error_at_line=yes
4811 else
4812 ac_cv_lib_error_at_line=no
4813 fi
4814 rm -f core conftest.err conftest.$ac_objext \
4815 conftest$ac_exeext conftest.$ac_ext
4816 fi
4817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
4818 $as_echo "$ac_cv_lib_error_at_line" >&6; }
4819 if test $ac_cv_lib_error_at_line = no; then
4820 case " $LIBOBJS " in
4821 *" error.$ac_objext "* ) ;;
4822 *) LIBOBJS="$LIBOBJS error.$ac_objext"
4823 ;;
4824 esac
4825
4826 fi
4827
4828
4829
4830
4831 for ac_header in $ac_header_list
4832 do :
4833 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4834 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4835 "
4836 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4837 cat >>confdefs.h <<_ACEOF
4838 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4839 _ACEOF
4840
4841 fi
4842
4843 done
4844
4845
4846
4847
4848
4849
4850
4851
4852 for ac_func in getpagesize
4853 do :
4854 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
4855 if test "x$ac_cv_func_getpagesize" = xyes; then :
4856 cat >>confdefs.h <<_ACEOF
4857 #define HAVE_GETPAGESIZE 1
4858 _ACEOF
4859
4860 fi
4861 done
4862
4863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
4864 $as_echo_n "checking for working mmap... " >&6; }
4865 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
4866 $as_echo_n "(cached) " >&6
4867 else
4868 if test "$cross_compiling" = yes; then :
4869 ac_cv_func_mmap_fixed_mapped=no
4870 else
4871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4872 /* end confdefs.h. */
4873 $ac_includes_default
4874 /* malloc might have been renamed as rpl_malloc. */
4875 #undef malloc
4876
4877 /* Thanks to Mike Haertel and Jim Avera for this test.
4878 Here is a matrix of mmap possibilities:
4879 mmap private not fixed
4880 mmap private fixed at somewhere currently unmapped
4881 mmap private fixed at somewhere already mapped
4882 mmap shared not fixed
4883 mmap shared fixed at somewhere currently unmapped
4884 mmap shared fixed at somewhere already mapped
4885 For private mappings, we should verify that changes cannot be read()
4886 back from the file, nor mmap's back from the file at a different
4887 address. (There have been systems where private was not correctly
4888 implemented like the infamous i386 svr4.0, and systems where the
4889 VM page cache was not coherent with the file system buffer cache
4890 like early versions of FreeBSD and possibly contemporary NetBSD.)
4891 For shared mappings, we should conversely verify that changes get
4892 propagated back to all the places they're supposed to be.
4893
4894 Grep wants private fixed already mapped.
4895 The main things grep needs to know about mmap are:
4896 * does it exist and is it safe to write into the mmap'd area
4897 * how to use it (BSD variants) */
4898
4899 #include <fcntl.h>
4900 #include <sys/mman.h>
4901
4902 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
4903 char *malloc ();
4904 #endif
4905
4906 /* This mess was copied from the GNU getpagesize.h. */
4907 #ifndef HAVE_GETPAGESIZE
4908 # ifdef _SC_PAGESIZE
4909 # define getpagesize() sysconf(_SC_PAGESIZE)
4910 # else /* no _SC_PAGESIZE */
4911 # ifdef HAVE_SYS_PARAM_H
4912 # include <sys/param.h>
4913 # ifdef EXEC_PAGESIZE
4914 # define getpagesize() EXEC_PAGESIZE
4915 # else /* no EXEC_PAGESIZE */
4916 # ifdef NBPG
4917 # define getpagesize() NBPG * CLSIZE
4918 # ifndef CLSIZE
4919 # define CLSIZE 1
4920 # endif /* no CLSIZE */
4921 # else /* no NBPG */
4922 # ifdef NBPC
4923 # define getpagesize() NBPC
4924 # else /* no NBPC */
4925 # ifdef PAGESIZE
4926 # define getpagesize() PAGESIZE
4927 # endif /* PAGESIZE */
4928 # endif /* no NBPC */
4929 # endif /* no NBPG */
4930 # endif /* no EXEC_PAGESIZE */
4931 # else /* no HAVE_SYS_PARAM_H */
4932 # define getpagesize() 8192 /* punt totally */
4933 # endif /* no HAVE_SYS_PARAM_H */
4934 # endif /* no _SC_PAGESIZE */
4935
4936 #endif /* no HAVE_GETPAGESIZE */
4937
4938 int
4939 main ()
4940 {
4941 char *data, *data2, *data3;
4942 const char *cdata2;
4943 int i, pagesize;
4944 int fd, fd2;
4945
4946 pagesize = getpagesize ();
4947
4948 /* First, make a file with some known garbage in it. */
4949 data = (char *) malloc (pagesize);
4950 if (!data)
4951 return 1;
4952 for (i = 0; i < pagesize; ++i)
4953 *(data + i) = rand ();
4954 umask (0);
4955 fd = creat ("conftest.mmap", 0600);
4956 if (fd < 0)
4957 return 2;
4958 if (write (fd, data, pagesize) != pagesize)
4959 return 3;
4960 close (fd);
4961
4962 /* Next, check that the tail of a page is zero-filled. File must have
4963 non-zero length, otherwise we risk SIGBUS for entire page. */
4964 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
4965 if (fd2 < 0)
4966 return 4;
4967 cdata2 = "";
4968 if (write (fd2, cdata2, 1) != 1)
4969 return 5;
4970 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
4971 if (data2 == MAP_FAILED)
4972 return 6;
4973 for (i = 0; i < pagesize; ++i)
4974 if (*(data2 + i))
4975 return 7;
4976 close (fd2);
4977 if (munmap (data2, pagesize))
4978 return 8;
4979
4980 /* Next, try to mmap the file at a fixed address which already has
4981 something else allocated at it. If we can, also make sure that
4982 we see the same garbage. */
4983 fd = open ("conftest.mmap", O_RDWR);
4984 if (fd < 0)
4985 return 9;
4986 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
4987 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4988 return 10;
4989 for (i = 0; i < pagesize; ++i)
4990 if (*(data + i) != *(data2 + i))
4991 return 11;
4992
4993 /* Finally, make sure that changes to the mapped area do not
4994 percolate back to the file as seen by read(). (This is a bug on
4995 some variants of i386 svr4.0.) */
4996 for (i = 0; i < pagesize; ++i)
4997 *(data2 + i) = *(data2 + i) + 1;
4998 data3 = (char *) malloc (pagesize);
4999 if (!data3)
5000 return 12;
5001 if (read (fd, data3, pagesize) != pagesize)
5002 return 13;
5003 for (i = 0; i < pagesize; ++i)
5004 if (*(data + i) != *(data3 + i))
5005 return 14;
5006 close (fd);
5007 return 0;
5008 }
5009 _ACEOF
5010 if ac_fn_c_try_run "$LINENO"; then :
5011 ac_cv_func_mmap_fixed_mapped=yes
5012 else
5013 ac_cv_func_mmap_fixed_mapped=no
5014 fi
5015 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5016 conftest.$ac_objext conftest.beam conftest.$ac_ext
5017 fi
5018
5019 fi
5020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
5021 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
5022 if test $ac_cv_func_mmap_fixed_mapped = yes; then
5023
5024 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
5025
5026 fi
5027 rm -f conftest.mmap conftest.txt
5028
5029 for ac_func in madvise localeconv
5030 do :
5031 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5032 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5033 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5034 cat >>confdefs.h <<_ACEOF
5035 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
5036 _ACEOF
5037
5038 fi
5039 done
5040
5041 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
5042 if test "x$ac_cv_func_strcasecmp" = xyes; then :
5043 $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h
5044
5045 else
5046 case " $LIBOBJS " in
5047 *" strcasecmp.$ac_objext "* ) ;;
5048 *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext"
5049 ;;
5050 esac
5051
5052 fi
5053
5054 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
5055 if test "x$ac_cv_func_strncasecmp" = xyes; then :
5056 $as_echo "#define HAVE_STRNCASECMP 1" >>confdefs.h
5057
5058 else
5059 case " $LIBOBJS " in
5060 *" strncasecmp.$ac_objext "* ) ;;
5061 *) LIBOBJS="$LIBOBJS strncasecmp.$ac_objext"
5062 ;;
5063 esac
5064
5065 fi
5066
5067
5068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pow" >&5
5069 $as_echo_n "checking for library containing pow... " >&6; }
5070 if ${ac_cv_search_pow+:} false; then :
5071 $as_echo_n "(cached) " >&6
5072 else
5073 ac_func_search_save_LIBS=$LIBS
5074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5075 /* end confdefs.h. */
5076
5077 /* Override any GCC internal prototype to avoid an error.
5078 Use char because int might match the return type of a GCC
5079 builtin and then its argument prototype would still apply. */
5080 #ifdef __cplusplus
5081 extern "C"
5082 #endif
5083 char pow ();
5084 int
5085 main ()
5086 {
5087 return pow ();
5088 ;
5089 return 0;
5090 }
5091 _ACEOF
5092 for ac_lib in '' m; do
5093 if test -z "$ac_lib"; then
5094 ac_res="none required"
5095 else
5096 ac_res=-l$ac_lib
5097 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5098 fi
5099 if ac_fn_c_try_link "$LINENO"; then :
5100 ac_cv_search_pow=$ac_res
5101 fi
5102 rm -f core conftest.err conftest.$ac_objext \
5103 conftest$ac_exeext
5104 if ${ac_cv_search_pow+:} false; then :
5105 break
5106 fi
5107 done
5108 if ${ac_cv_search_pow+:} false; then :
5109
5110 else
5111 ac_cv_search_pow=no
5112 fi
5113 rm conftest.$ac_ext
5114 LIBS=$ac_func_search_save_LIBS
5115 fi
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pow" >&5
5117 $as_echo "$ac_cv_search_pow" >&6; }
5118 ac_res=$ac_cv_search_pow
5119 if test "$ac_res" != no; then :
5120 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5121
5122 fi
5123
5124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing log10" >&5
5125 $as_echo_n "checking for library containing log10... " >&6; }
5126 if ${ac_cv_search_log10+:} false; then :
5127 $as_echo_n "(cached) " >&6
5128 else
5129 ac_func_search_save_LIBS=$LIBS
5130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5131 /* end confdefs.h. */
5132
5133 /* Override any GCC internal prototype to avoid an error.
5134 Use char because int might match the return type of a GCC
5135 builtin and then its argument prototype would still apply. */
5136 #ifdef __cplusplus
5137 extern "C"
5138 #endif
5139 char log10 ();
5140 int
5141 main ()
5142 {
5143 return log10 ();
5144 ;
5145 return 0;
5146 }
5147 _ACEOF
5148 for ac_lib in '' m; do
5149 if test -z "$ac_lib"; then
5150 ac_res="none required"
5151 else
5152 ac_res=-l$ac_lib
5153 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5154 fi
5155 if ac_fn_c_try_link "$LINENO"; then :
5156 ac_cv_search_log10=$ac_res
5157 fi
5158 rm -f core conftest.err conftest.$ac_objext \
5159 conftest$ac_exeext
5160 if ${ac_cv_search_log10+:} false; then :
5161 break
5162 fi
5163 done
5164 if ${ac_cv_search_log10+:} false; then :
5165
5166 else
5167 ac_cv_search_log10=no
5168 fi
5169 rm conftest.$ac_ext
5170 LIBS=$ac_func_search_save_LIBS
5171 fi
5172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_log10" >&5
5173 $as_echo "$ac_cv_search_log10" >&6; }
5174 ac_res=$ac_cv_search_log10
5175 if test "$ac_res" != no; then :
5176 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5177
5178 fi
5179
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use mmap" >&5
5181 $as_echo_n "checking whether to use mmap... " >&6; }
5182 cat >confcache <<\_ACEOF
5183 # This file is a shell script that caches the results of configure
5184 # tests run on this system so they can be shared between configure
5185 # scripts and configure runs, see configure's option --config-cache.
5186 # It is not useful on other systems. If it contains results you don't
5187 # want to keep, you may remove or edit it.
5188 #
5189 # config.status only pays attention to the cache file if you give it
5190 # the --recheck option to rerun configure.
5191 #
5192 # `ac_cv_env_foo' variables (set or unset) will be overridden when
5193 # loading this file, other *unset* `ac_cv_foo' will be assigned the
5194 # following values.
5195
5196 _ACEOF
5197
5198 # The following way of writing the cache mishandles newlines in values,
5199 # but we know of no workaround that is simple, portable, and efficient.
5200 # So, we kill variables containing newlines.
5201 # Ultrix sh set writes to stderr and can't be redirected directly,
5202 # and sets the high bit in the cache file unless we assign to the vars.
5203 (
5204 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
5205 eval ac_val=\$$ac_var
5206 case $ac_val in #(
5207 *${as_nl}*)
5208 case $ac_var in #(
5209 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
5210 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
5211 esac
5212 case $ac_var in #(
5213 _ | IFS | as_nl) ;; #(
5214 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
5215 *) { eval $ac_var=; unset $ac_var;} ;;
5216 esac ;;
5217 esac
5218 done
5219
5220 (set) 2>&1 |
5221 case $as_nl`(ac_space=' '; set) 2>&1` in #(
5222 *${as_nl}ac_space=\ *)
5223 # `set' does not quote correctly, so add quotes: double-quote
5224 # substitution turns \\\\ into \\, and sed turns \\ into \.
5225 sed -n \
5226 "s/'/'\\\\''/g;
5227 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
5228 ;; #(
5229 *)
5230 # `set' quotes correctly as required by POSIX, so do not add quotes.
5231 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
5232 ;;
5233 esac |
5234 sort
5235 ) |
5236 sed '
5237 /^ac_cv_env_/b end
5238 t clear
5239 :clear
5240 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
5241 t end
5242 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
5243 :end' >>confcache
5244 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
5245 if test -w "$cache_file"; then
5246 if test "x$cache_file" != "x/dev/null"; then
5247 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
5248 $as_echo "$as_me: updating cache $cache_file" >&6;}
5249 if test ! -f "$cache_file" || test -h "$cache_file"; then
5250 cat confcache >"$cache_file"
5251 else
5252 case $cache_file in #(
5253 */* | ?:*)
5254 mv -f confcache "$cache_file"$$ &&
5255 mv -f "$cache_file"$$ "$cache_file" ;; #(
5256 *)
5257 mv -f confcache "$cache_file" ;;
5258 esac
5259 fi
5260 fi
5261 else
5262 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
5263 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
5264 fi
5265 fi
5266 rm -f confcache
5267
5268
5269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable profiling" >&5
5270 $as_echo_n "checking whether to enable profiling... " >&6; }
5271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_profiling-no}" >&5
5272 $as_echo "${enable_profiling-no}" >&6; }
5273
5274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debugging" >&5
5275 $as_echo_n "checking whether to enable debugging... " >&6; }
5276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_experimental-no}" >&5
5277 $as_echo "${enable_experimental-no}" >&6; }
5278
5279
5280 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
5281 if test "x$ac_cv_type_ssize_t" = xyes; then :
5282
5283 else
5284
5285 cat >>confdefs.h <<_ACEOF
5286 #define ssize_t int
5287 _ACEOF
5288
5289 fi
5290
5291 for ac_prog in 'bison -y' byacc
5292 do
5293 # Extract the first word of "$ac_prog", so it can be a program name with args.
5294 set dummy $ac_prog; ac_word=$2
5295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5296 $as_echo_n "checking for $ac_word... " >&6; }
5297 if ${ac_cv_prog_YACC+:} false; then :
5298 $as_echo_n "(cached) " >&6
5299 else
5300 if test -n "$YACC"; then
5301 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5302 else
5303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5304 for as_dir in $PATH
5305 do
5306 IFS=$as_save_IFS
5307 test -z "$as_dir" && as_dir=.
5308 for ac_exec_ext in '' $ac_executable_extensions; do
5309 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5310 ac_cv_prog_YACC="$ac_prog"
5311 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5312 break 2
5313 fi
5314 done
5315 done
5316 IFS=$as_save_IFS
5317
5318 fi
5319 fi
5320 YACC=$ac_cv_prog_YACC
5321 if test -n "$YACC"; then
5322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5323 $as_echo "$YACC" >&6; }
5324 else
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5326 $as_echo "no" >&6; }
5327 fi
5328
5329
5330 test -n "$YACC" && break
5331 done
5332 test -n "$YACC" || YACC="yacc"
5333
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
5335 $as_echo_n "checking whether ln -s works... " >&6; }
5336 LN_S=$as_ln_s
5337 if test "$LN_S" = "ln -s"; then
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5339 $as_echo "yes" >&6; }
5340 else
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
5342 $as_echo "no, using $LN_S" >&6; }
5343 fi
5344
5345 for ac_func in __argz_count
5346 do :
5347 ac_fn_c_check_func "$LINENO" "__argz_count" "ac_cv_func___argz_count"
5348 if test "x$ac_cv_func___argz_count" = xyes; then :
5349 cat >>confdefs.h <<_ACEOF
5350 #define HAVE___ARGZ_COUNT 1
5351 _ACEOF
5352
5353 fi
5354 done
5355
5356 for ac_func in __argz_next
5357 do :
5358 ac_fn_c_check_func "$LINENO" "__argz_next" "ac_cv_func___argz_next"
5359 if test "x$ac_cv_func___argz_next" = xyes; then :
5360 cat >>confdefs.h <<_ACEOF
5361 #define HAVE___ARGZ_NEXT 1
5362 _ACEOF
5363
5364 fi
5365 done
5366
5367 for ac_func in __argz_stringify
5368 do :
5369 ac_fn_c_check_func "$LINENO" "__argz_stringify" "ac_cv_func___argz_stringify"
5370 if test "x$ac_cv_func___argz_stringify" = xyes; then :
5371 cat >>confdefs.h <<_ACEOF
5372 #define HAVE___ARGZ_STRINGIFY 1
5373 _ACEOF
5374
5375 fi
5376 done
5377
5378 for ac_func in memmove
5379 do :
5380 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
5381 if test "x$ac_cv_func_memmove" = xyes; then :
5382 cat >>confdefs.h <<_ACEOF
5383 #define HAVE_MEMMOVE 1
5384 _ACEOF
5385
5386 fi
5387 done
5388
5389 for ac_func in munmap
5390 do :
5391 ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap"
5392 if test "x$ac_cv_func_munmap" = xyes; then :
5393 cat >>confdefs.h <<_ACEOF
5394 #define HAVE_MUNMAP 1
5395 _ACEOF
5396
5397 fi
5398 done
5399
5400 for ac_func in strcasecmp
5401 do :
5402 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
5403 if test "x$ac_cv_func_strcasecmp" = xyes; then :
5404 cat >>confdefs.h <<_ACEOF
5405 #define HAVE_STRCASECMP 1
5406 _ACEOF
5407
5408 fi
5409 done
5410
5411 for ac_func in memset
5412 do :
5413 ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
5414 if test "x$ac_cv_func_memset" = xyes; then :
5415 cat >>confdefs.h <<_ACEOF
5416 #define HAVE_MEMSET 1
5417 _ACEOF
5418
5419 fi
5420 done
5421
5422 for ac_func in nl_langinfo
5423 do :
5424 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
5425 if test "x$ac_cv_func_nl_langinfo" = xyes; then :
5426 cat >>confdefs.h <<_ACEOF
5427 #define HAVE_NL_LANGINFO 1
5428 _ACEOF
5429
5430 fi
5431 done
5432
5433 for ac_func in pow
5434 do :
5435 ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
5436 if test "x$ac_cv_func_pow" = xyes; then :
5437 cat >>confdefs.h <<_ACEOF
5438 #define HAVE_POW 1
5439 _ACEOF
5440
5441 fi
5442 done
5443
5444 for ac_func in strchr
5445 do :
5446 ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
5447 if test "x$ac_cv_func_strchr" = xyes; then :
5448 cat >>confdefs.h <<_ACEOF
5449 #define HAVE_STRCHR 1
5450 _ACEOF
5451
5452 fi
5453 done
5454
5455 for ac_func in strcspn
5456 do :
5457 ac_fn_c_check_func "$LINENO" "strcspn" "ac_cv_func_strcspn"
5458 if test "x$ac_cv_func_strcspn" = xyes; then :
5459 cat >>confdefs.h <<_ACEOF
5460 #define HAVE_STRCSPN 1
5461 _ACEOF
5462
5463 fi
5464 done
5465
5466 for ac_func in strncasecmp
5467 do :
5468 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
5469 if test "x$ac_cv_func_strncasecmp" = xyes; then :
5470 cat >>confdefs.h <<_ACEOF
5471 #define HAVE_STRNCASECMP 1
5472 _ACEOF
5473
5474 fi
5475 done
5476
5477 for ac_func in strrchr
5478 do :
5479 ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr"
5480 if test "x$ac_cv_func_strrchr" = xyes; then :
5481 cat >>confdefs.h <<_ACEOF
5482 #define HAVE_STRRCHR 1
5483 _ACEOF
5484
5485 fi
5486 done
5487
5488 for ac_func in strstr
5489 do :
5490 ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
5491 if test "x$ac_cv_func_strstr" = xyes; then :
5492 cat >>confdefs.h <<_ACEOF
5493 #define HAVE_STRSTR 1
5494 _ACEOF
5495
5496 fi
5497 done
5498
5499 for ac_func in strtol
5500 do :
5501 ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
5502 if test "x$ac_cv_func_strtol" = xyes; then :
5503 cat >>confdefs.h <<_ACEOF
5504 #define HAVE_STRTOL 1
5505 _ACEOF
5506
5507 fi
5508 done
5509
5510 for ac_header in float.h
5511 do :
5512 ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default"
5513 if test "x$ac_cv_header_float_h" = xyes; then :
5514 cat >>confdefs.h <<_ACEOF
5515 #define HAVE_FLOAT_H 1
5516 _ACEOF
5517
5518 fi
5519
5520 done
5521
5522 for ac_header in fcntl.h
5523 do :
5524 ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
5525 if test "x$ac_cv_header_fcntl_h" = xyes; then :
5526 cat >>confdefs.h <<_ACEOF
5527 #define HAVE_FCNTL_H 1
5528 _ACEOF
5529
5530 fi
5531
5532 done
5533
5534 for ac_header in termios.h
5535 do :
5536 ac_fn_c_check_header_mongrel "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
5537 if test "x$ac_cv_header_termios_h" = xyes; then :
5538 cat >>confdefs.h <<_ACEOF
5539 #define HAVE_TERMIOS_H 1
5540 _ACEOF
5541
5542 fi
5543
5544 done
5545
5546 for ac_header in langinfo.h
5547 do :
5548 ac_fn_c_check_header_mongrel "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default"
5549 if test "x$ac_cv_header_langinfo_h" = xyes; then :
5550 cat >>confdefs.h <<_ACEOF
5551 #define HAVE_LANGINFO_H 1
5552 _ACEOF
5553
5554 fi
5555
5556 done
5557
5558 for ac_header in libintl.h
5559 do :
5560 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
5561 if test "x$ac_cv_header_libintl_h" = xyes; then :
5562 cat >>confdefs.h <<_ACEOF
5563 #define HAVE_LIBINTL_H 1
5564 _ACEOF
5565
5566 fi
5567
5568 done
5569
5570 for ac_header in locale.h
5571 do :
5572 ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
5573 if test "x$ac_cv_header_locale_h" = xyes; then :
5574 cat >>confdefs.h <<_ACEOF
5575 #define HAVE_LOCALE_H 1
5576 _ACEOF
5577
5578 fi
5579
5580 done
5581
5582 for ac_header in malloc.h
5583 do :
5584 ac_fn_c_check_header_mongrel "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default"
5585 if test "x$ac_cv_header_malloc_h" = xyes; then :
5586 cat >>confdefs.h <<_ACEOF
5587 #define HAVE_MALLOC_H 1
5588 _ACEOF
5589
5590 fi
5591
5592 done
5593
5594 for ac_header in stdio_ext.h
5595 do :
5596 ac_fn_c_check_header_mongrel "$LINENO" "stdio_ext.h" "ac_cv_header_stdio_ext_h" "$ac_includes_default"
5597 if test "x$ac_cv_header_stdio_ext_h" = xyes; then :
5598 cat >>confdefs.h <<_ACEOF
5599 #define HAVE_STDIO_EXT_H 1
5600 _ACEOF
5601
5602 fi
5603
5604 done
5605
5606 for ac_header in wchar.h
5607 do :
5608 ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
5609 if test "x$ac_cv_header_wchar_h" = xyes; then :
5610 cat >>confdefs.h <<_ACEOF
5611 #define HAVE_WCHAR_H 1
5612 _ACEOF
5613
5614 fi
5615
5616 done
5617
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
5619 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
5620 if ${ac_cv_header_stdbool_h+:} false; then :
5621 $as_echo_n "(cached) " >&6
5622 else
5623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5624 /* end confdefs.h. */
5625
5626 #include <stdbool.h>
5627 #ifndef bool
5628 "error: bool is not defined"
5629 #endif
5630 #ifndef false
5631 "error: false is not defined"
5632 #endif
5633 #if false
5634 "error: false is not 0"
5635 #endif
5636 #ifndef true
5637 "error: true is not defined"
5638 #endif
5639 #if true != 1
5640 "error: true is not 1"
5641 #endif
5642 #ifndef __bool_true_false_are_defined
5643 "error: __bool_true_false_are_defined is not defined"
5644 #endif
5645
5646 struct s { _Bool s: 1; _Bool t; } s;
5647
5648 char a[true == 1 ? 1 : -1];
5649 char b[false == 0 ? 1 : -1];
5650 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
5651 char d[(bool) 0.5 == true ? 1 : -1];
5652 /* See body of main program for 'e'. */
5653 char f[(_Bool) 0.0 == false ? 1 : -1];
5654 char g[true];
5655 char h[sizeof (_Bool)];
5656 char i[sizeof s.t];
5657 enum { j = false, k = true, l = false * true, m = true * 256 };
5658 /* The following fails for
5659 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
5660 _Bool n[m];
5661 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
5662 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
5663 /* Catch a bug in an HP-UX C compiler. See
5664 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
5665 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
5666 */
5667 _Bool q = true;
5668 _Bool *pq = &q;
5669
5670 int
5671 main ()
5672 {
5673
5674 bool e = &s;
5675 *pq |= q;
5676 *pq |= ! q;
5677 /* Refer to every declared value, to avoid compiler optimizations. */
5678 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
5679 + !m + !n + !o + !p + !q + !pq);
5680
5681 ;
5682 return 0;
5683 }
5684 _ACEOF
5685 if ac_fn_c_try_compile "$LINENO"; then :
5686 ac_cv_header_stdbool_h=yes
5687 else
5688 ac_cv_header_stdbool_h=no
5689 fi
5690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5691 fi
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
5693 $as_echo "$ac_cv_header_stdbool_h" >&6; }
5694 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
5695 if test "x$ac_cv_type__Bool" = xyes; then :
5696
5697 cat >>confdefs.h <<_ACEOF
5698 #define HAVE__BOOL 1
5699 _ACEOF
5700
5701
5702 fi
5703
5704
5705 ac_fn_c_check_header_mongrel "$LINENO" "id3tag.h" "ac_cv_header_id3tag_h" "$ac_includes_default"
5706 if test "x$ac_cv_header_id3tag_h" = xyes; then :
5707
5708 else
5709
5710 as_fn_error $? "id3tag.h was not found
5711 *** You must first install libid3tag before you can build this package.
5712 *** If libid3tag is already installed, you may need to use the CPPFLAGS
5713 *** environment variable to specify its installed location, e.g. -I<dir>." "$LINENO" 5
5714
5715 fi
5716
5717
5718 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
5719 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
5720
5721 cat >>confdefs.h <<_ACEOF
5722 #define HAVE_PTRDIFF_T 1
5723 _ACEOF
5724
5725
5726 fi
5727
5728 for ac_func in getcwd
5729 do :
5730 ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
5731 if test "x$ac_cv_func_getcwd" = xyes; then :
5732 cat >>confdefs.h <<_ACEOF
5733 #define HAVE_GETCWD 1
5734 _ACEOF
5735
5736 fi
5737 done
5738
5739 for ac_func in mempcpy
5740 do :
5741 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
5742 if test "x$ac_cv_func_mempcpy" = xyes; then :
5743 cat >>confdefs.h <<_ACEOF
5744 #define HAVE_MEMPCPY 1
5745 _ACEOF
5746
5747 fi
5748 done
5749
5750 for ac_func in stpcpy
5751 do :
5752 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
5753 if test "x$ac_cv_func_stpcpy" = xyes; then :
5754 cat >>confdefs.h <<_ACEOF
5755 #define HAVE_STPCPY 1
5756 _ACEOF
5757
5758 fi
5759 done
5760
5761 for ac_func in strtoul
5762 do :
5763 ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
5764 if test "x$ac_cv_func_strtoul" = xyes; then :
5765 cat >>confdefs.h <<_ACEOF
5766 #define HAVE_STRTOUL 1
5767 _ACEOF
5768
5769 fi
5770 done
5771
5772 for ac_header in argz.h
5773 do :
5774 ac_fn_c_check_header_mongrel "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default"
5775 if test "x$ac_cv_header_argz_h" = xyes; then :
5776 cat >>confdefs.h <<_ACEOF
5777 #define HAVE_ARGZ_H 1
5778 _ACEOF
5779
5780 fi
5781
5782 done
5783
5784 for ac_header in limits.h
5785 do :
5786 ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
5787 if test "x$ac_cv_header_limits_h" = xyes; then :
5788 cat >>confdefs.h <<_ACEOF
5789 #define HAVE_LIMITS_H 1
5790 _ACEOF
5791
5792 fi
5793
5794 done
5795
5796 for ac_header in stddef.h
5797 do :
5798 ac_fn_c_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
5799 if test "x$ac_cv_header_stddef_h" = xyes; then :
5800 cat >>confdefs.h <<_ACEOF
5801 #define HAVE_STDDEF_H 1
5802 _ACEOF
5803
5804 fi
5805
5806 done
5807
5808 for ac_header in sys/param.h
5809 do :
5810 ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
5811 if test "x$ac_cv_header_sys_param_h" = xyes; then :
5812 cat >>confdefs.h <<_ACEOF
5813 #define HAVE_SYS_PARAM_H 1
5814 _ACEOF
5815
5816 fi
5817
5818 done
5819
5820 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
5821 if test "x$ac_cv_type_size_t" = xyes; then :
5822
5823 else
5824
5825 cat >>confdefs.h <<_ACEOF
5826 #define size_t unsigned int
5827 _ACEOF
5828
5829 fi
5830
5831 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5832 # for constant arguments. Useless!
5833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
5834 $as_echo_n "checking for working alloca.h... " >&6; }
5835 if ${ac_cv_working_alloca_h+:} false; then :
5836 $as_echo_n "(cached) " >&6
5837 else
5838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5839 /* end confdefs.h. */
5840 #include <alloca.h>
5841 int
5842 main ()
5843 {
5844 char *p = (char *) alloca (2 * sizeof (int));
5845 if (p) return 0;
5846 ;
5847 return 0;
5848 }
5849 _ACEOF
5850 if ac_fn_c_try_link "$LINENO"; then :
5851 ac_cv_working_alloca_h=yes
5852 else
5853 ac_cv_working_alloca_h=no
5854 fi
5855 rm -f core conftest.err conftest.$ac_objext \
5856 conftest$ac_exeext conftest.$ac_ext
5857 fi
5858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
5859 $as_echo "$ac_cv_working_alloca_h" >&6; }
5860 if test $ac_cv_working_alloca_h = yes; then
5861
5862 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
5863
5864 fi
5865
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
5867 $as_echo_n "checking for alloca... " >&6; }
5868 if ${ac_cv_func_alloca_works+:} false; then :
5869 $as_echo_n "(cached) " >&6
5870 else
5871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5872 /* end confdefs.h. */
5873 #ifdef __GNUC__
5874 # define alloca __builtin_alloca
5875 #else
5876 # ifdef _MSC_VER
5877 # include <malloc.h>
5878 # define alloca _alloca
5879 # else
5880 # ifdef HAVE_ALLOCA_H
5881 # include <alloca.h>
5882 # else
5883 # ifdef _AIX
5884 #pragma alloca
5885 # else
5886 # ifndef alloca /* predefined by HP cc +Olibcalls */
5887 void *alloca (size_t);
5888 # endif
5889 # endif
5890 # endif
5891 # endif
5892 #endif
5893
5894 int
5895 main ()
5896 {
5897 char *p = (char *) alloca (1);
5898 if (p) return 0;
5899 ;
5900 return 0;
5901 }
5902 _ACEOF
5903 if ac_fn_c_try_link "$LINENO"; then :
5904 ac_cv_func_alloca_works=yes
5905 else
5906 ac_cv_func_alloca_works=no
5907 fi
5908 rm -f core conftest.err conftest.$ac_objext \
5909 conftest$ac_exeext conftest.$ac_ext
5910 fi
5911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
5912 $as_echo "$ac_cv_func_alloca_works" >&6; }
5913
5914 if test $ac_cv_func_alloca_works = yes; then
5915
5916 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
5917
5918 else
5919 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5920 # that cause trouble. Some versions do not even contain alloca or
5921 # contain a buggy version. If you still want to use their alloca,
5922 # use ar to extract alloca.o from them instead of compiling alloca.c.
5923
5924 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
5925
5926 $as_echo "#define C_ALLOCA 1" >>confdefs.h
5927
5928
5929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
5930 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
5931 if ${ac_cv_os_cray+:} false; then :
5932 $as_echo_n "(cached) " >&6
5933 else
5934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5935 /* end confdefs.h. */
5936 #if defined CRAY && ! defined CRAY2
5937 webecray
5938 #else
5939 wenotbecray
5940 #endif
5941
5942 _ACEOF
5943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5944 $EGREP "webecray" >/dev/null 2>&1; then :
5945 ac_cv_os_cray=yes
5946 else
5947 ac_cv_os_cray=no
5948 fi
5949 rm -f conftest*
5950
5951 fi
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
5953 $as_echo "$ac_cv_os_cray" >&6; }
5954 if test $ac_cv_os_cray = yes; then
5955 for ac_func in _getb67 GETB67 getb67; do
5956 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5957 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5958 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
5959
5960 cat >>confdefs.h <<_ACEOF
5961 #define CRAY_STACKSEG_END $ac_func
5962 _ACEOF
5963
5964 break
5965 fi
5966
5967 done
5968 fi
5969
5970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
5971 $as_echo_n "checking stack direction for C alloca... " >&6; }
5972 if ${ac_cv_c_stack_direction+:} false; then :
5973 $as_echo_n "(cached) " >&6
5974 else
5975 if test "$cross_compiling" = yes; then :
5976 ac_cv_c_stack_direction=0
5977 else
5978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5979 /* end confdefs.h. */
5980 $ac_includes_default
5981 int
5982 find_stack_direction (int *addr, int depth)
5983 {
5984 int dir, dummy = 0;
5985 if (! addr)
5986 addr = &dummy;
5987 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
5988 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
5989 return dir + dummy;
5990 }
5991
5992 int
5993 main (int argc, char **argv)
5994 {
5995 return find_stack_direction (0, argc + !argv + 20) < 0;
5996 }
5997 _ACEOF
5998 if ac_fn_c_try_run "$LINENO"; then :
5999 ac_cv_c_stack_direction=1
6000 else
6001 ac_cv_c_stack_direction=-1
6002 fi
6003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6004 conftest.$ac_objext conftest.beam conftest.$ac_ext
6005 fi
6006
6007 fi
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6009 $as_echo "$ac_cv_c_stack_direction" >&6; }
6010 cat >>confdefs.h <<_ACEOF
6011 #define STACK_DIRECTION $ac_cv_c_stack_direction
6012 _ACEOF
6013
6014
6015 fi
6016
6017 for ac_header in stdlib.h
6018 do :
6019 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
6020 if test "x$ac_cv_header_stdlib_h" = xyes; then :
6021 cat >>confdefs.h <<_ACEOF
6022 #define HAVE_STDLIB_H 1
6023 _ACEOF
6024
6025 fi
6026
6027 done
6028
6029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
6030 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
6031 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
6032 $as_echo_n "(cached) " >&6
6033 else
6034 if test "$cross_compiling" = yes; then :
6035 ac_cv_func_malloc_0_nonnull=no
6036 else
6037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6038 /* end confdefs.h. */
6039 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
6040 # include <stdlib.h>
6041 #else
6042 char *malloc ();
6043 #endif
6044
6045 int
6046 main ()
6047 {
6048 return ! malloc (0);
6049 ;
6050 return 0;
6051 }
6052 _ACEOF
6053 if ac_fn_c_try_run "$LINENO"; then :
6054 ac_cv_func_malloc_0_nonnull=yes
6055 else
6056 ac_cv_func_malloc_0_nonnull=no
6057 fi
6058 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6059 conftest.$ac_objext conftest.beam conftest.$ac_ext
6060 fi
6061
6062 fi
6063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
6064 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
6065 if test $ac_cv_func_malloc_0_nonnull = yes; then :
6066
6067 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
6068
6069 else
6070 $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
6071
6072 case " $LIBOBJS " in
6073 *" malloc.$ac_objext "* ) ;;
6074 *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
6075 ;;
6076 esac
6077
6078
6079 $as_echo "#define malloc rpl_malloc" >>confdefs.h
6080
6081 fi
6082
6083
6084 for ac_header in stdlib.h
6085 do :
6086 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
6087 if test "x$ac_cv_header_stdlib_h" = xyes; then :
6088 cat >>confdefs.h <<_ACEOF
6089 #define HAVE_STDLIB_H 1
6090 _ACEOF
6091
6092 fi
6093
6094 done
6095
6096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
6097 $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
6098 if ${ac_cv_func_realloc_0_nonnull+:} false; then :
6099 $as_echo_n "(cached) " >&6
6100 else
6101 if test "$cross_compiling" = yes; then :
6102 ac_cv_func_realloc_0_nonnull=no
6103 else
6104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6105 /* end confdefs.h. */
6106 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
6107 # include <stdlib.h>
6108 #else
6109 char *realloc ();
6110 #endif
6111
6112 int
6113 main ()
6114 {
6115 return ! realloc (0, 0);
6116 ;
6117 return 0;
6118 }
6119 _ACEOF
6120 if ac_fn_c_try_run "$LINENO"; then :
6121 ac_cv_func_realloc_0_nonnull=yes
6122 else
6123 ac_cv_func_realloc_0_nonnull=no
6124 fi
6125 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6126 conftest.$ac_objext conftest.beam conftest.$ac_ext
6127 fi
6128
6129 fi
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
6131 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
6132 if test $ac_cv_func_realloc_0_nonnull = yes; then :
6133
6134 $as_echo "#define HAVE_REALLOC 1" >>confdefs.h
6135
6136 else
6137 $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
6138
6139 case " $LIBOBJS " in
6140 *" realloc.$ac_objext "* ) ;;
6141 *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
6142 ;;
6143 esac
6144
6145
6146 $as_echo "#define realloc rpl_realloc" >>confdefs.h
6147
6148 fi
6149
6150
6151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
6152 $as_echo_n "checking for working strtod... " >&6; }
6153 if ${ac_cv_func_strtod+:} false; then :
6154 $as_echo_n "(cached) " >&6
6155 else
6156 if test "$cross_compiling" = yes; then :
6157 ac_cv_func_strtod=no
6158 else
6159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6160 /* end confdefs.h. */
6161
6162 $ac_includes_default
6163 #ifndef strtod
6164 double strtod ();
6165 #endif
6166 int
6167 main()
6168 {
6169 {
6170 /* Some versions of Linux strtod mis-parse strings with leading '+'. */
6171 char *string = " +69";
6172 char *term;
6173 double value;
6174 value = strtod (string, &term);
6175 if (value != 69 || term != (string + 4))
6176 return 1;
6177 }
6178
6179 {
6180 /* Under Solaris 2.4, strtod returns the wrong value for the
6181 terminating character under some conditions. */
6182 char *string = "NaN";
6183 char *term;
6184 strtod (string, &term);
6185 if (term != string && *(term - 1) == 0)
6186 return 1;
6187 }
6188 return 0;
6189 }
6190
6191 _ACEOF
6192 if ac_fn_c_try_run "$LINENO"; then :
6193 ac_cv_func_strtod=yes
6194 else
6195 ac_cv_func_strtod=no
6196 fi
6197 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6198 conftest.$ac_objext conftest.beam conftest.$ac_ext
6199 fi
6200
6201 fi
6202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
6203 $as_echo "$ac_cv_func_strtod" >&6; }
6204 if test $ac_cv_func_strtod = no; then
6205 case " $LIBOBJS " in
6206 *" strtod.$ac_objext "* ) ;;
6207 *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
6208 ;;
6209 esac
6210
6211 ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
6212 if test "x$ac_cv_func_pow" = xyes; then :
6213
6214 fi
6215
6216 if test $ac_cv_func_pow = no; then
6217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
6218 $as_echo_n "checking for pow in -lm... " >&6; }
6219 if ${ac_cv_lib_m_pow+:} false; then :
6220 $as_echo_n "(cached) " >&6
6221 else
6222 ac_check_lib_save_LIBS=$LIBS
6223 LIBS="-lm $LIBS"
6224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6225 /* end confdefs.h. */
6226
6227 /* Override any GCC internal prototype to avoid an error.
6228 Use char because int might match the return type of a GCC
6229 builtin and then its argument prototype would still apply. */
6230 #ifdef __cplusplus
6231 extern "C"
6232 #endif
6233 char pow ();
6234 int
6235 main ()
6236 {
6237 return pow ();
6238 ;
6239 return 0;
6240 }
6241 _ACEOF
6242 if ac_fn_c_try_link "$LINENO"; then :
6243 ac_cv_lib_m_pow=yes
6244 else
6245 ac_cv_lib_m_pow=no
6246 fi
6247 rm -f core conftest.err conftest.$ac_objext \
6248 conftest$ac_exeext conftest.$ac_ext
6249 LIBS=$ac_check_lib_save_LIBS
6250 fi
6251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
6252 $as_echo "$ac_cv_lib_m_pow" >&6; }
6253 if test "x$ac_cv_lib_m_pow" = xyes; then :
6254 POW_LIB=-lm
6255 else
6256 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
6257 $as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
6258 fi
6259
6260 fi
6261
6262 fi
6263
6264 ac_ext=cpp
6265 ac_cpp='$CXXCPP $CPPFLAGS'
6266 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6267 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6268 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6269 if test -z "$CXX"; then
6270 if test -n "$CCC"; then
6271 CXX=$CCC
6272 else
6273 if test -n "$ac_tool_prefix"; then
6274 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
6275 do
6276 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6277 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6279 $as_echo_n "checking for $ac_word... " >&6; }
6280 if ${ac_cv_prog_CXX+:} false; then :
6281 $as_echo_n "(cached) " >&6
6282 else
6283 if test -n "$CXX"; then
6284 ac_cv_prog_CXX="$CXX" # Let the user override the test.
6285 else
6286 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6287 for as_dir in $PATH
6288 do
6289 IFS=$as_save_IFS
6290 test -z "$as_dir" && as_dir=.
6291 for ac_exec_ext in '' $ac_executable_extensions; do
6292 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6293 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
6294 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6295 break 2
6296 fi
6297 done
6298 done
6299 IFS=$as_save_IFS
6300
6301 fi
6302 fi
6303 CXX=$ac_cv_prog_CXX
6304 if test -n "$CXX"; then
6305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
6306 $as_echo "$CXX" >&6; }
6307 else
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6309 $as_echo "no" >&6; }
6310 fi
6311
6312
6313 test -n "$CXX" && break
6314 done
6315 fi
6316 if test -z "$CXX"; then
6317 ac_ct_CXX=$CXX
6318 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
6319 do
6320 # Extract the first word of "$ac_prog", so it can be a program name with args.
6321 set dummy $ac_prog; ac_word=$2
6322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6323 $as_echo_n "checking for $ac_word... " >&6; }
6324 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
6325 $as_echo_n "(cached) " >&6
6326 else
6327 if test -n "$ac_ct_CXX"; then
6328 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
6329 else
6330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6331 for as_dir in $PATH
6332 do
6333 IFS=$as_save_IFS
6334 test -z "$as_dir" && as_dir=.
6335 for ac_exec_ext in '' $ac_executable_extensions; do
6336 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6337 ac_cv_prog_ac_ct_CXX="$ac_prog"
6338 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6339 break 2
6340 fi
6341 done
6342 done
6343 IFS=$as_save_IFS
6344
6345 fi
6346 fi
6347 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
6348 if test -n "$ac_ct_CXX"; then
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
6350 $as_echo "$ac_ct_CXX" >&6; }
6351 else
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6353 $as_echo "no" >&6; }
6354 fi
6355
6356
6357 test -n "$ac_ct_CXX" && break
6358 done
6359
6360 if test "x$ac_ct_CXX" = x; then
6361 CXX="g++"
6362 else
6363 case $cross_compiling:$ac_tool_warned in
6364 yes:)
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6366 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6367 ac_tool_warned=yes ;;
6368 esac
6369 CXX=$ac_ct_CXX
6370 fi
6371 fi
6372
6373 fi
6374 fi
6375 # Provide some information about the compiler.
6376 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
6377 set X $ac_compile
6378 ac_compiler=$2
6379 for ac_option in --version -v -V -qversion; do
6380 { { ac_try="$ac_compiler $ac_option >&5"
6381 case "(($ac_try" in
6382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6383 *) ac_try_echo=$ac_try;;
6384 esac
6385 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6386 $as_echo "$ac_try_echo"; } >&5
6387 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
6388 ac_status=$?
6389 if test -s conftest.err; then
6390 sed '10a\
6391 ... rest of stderr output deleted ...
6392 10q' conftest.err >conftest.er1
6393 cat conftest.er1 >&5
6394 fi
6395 rm -f conftest.er1 conftest.err
6396 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6397 test $ac_status = 0; }
6398 done
6399
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
6401 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
6402 if ${ac_cv_cxx_compiler_gnu+:} false; then :
6403 $as_echo_n "(cached) " >&6
6404 else
6405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6406 /* end confdefs.h. */
6407
6408 int
6409 main ()
6410 {
6411 #ifndef __GNUC__
6412 choke me
6413 #endif
6414
6415 ;
6416 return 0;
6417 }
6418 _ACEOF
6419 if ac_fn_cxx_try_compile "$LINENO"; then :
6420 ac_compiler_gnu=yes
6421 else
6422 ac_compiler_gnu=no
6423 fi
6424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6425 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
6426
6427 fi
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
6429 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
6430 if test $ac_compiler_gnu = yes; then
6431 GXX=yes
6432 else
6433 GXX=
6434 fi
6435 ac_test_CXXFLAGS=${CXXFLAGS+set}
6436 ac_save_CXXFLAGS=$CXXFLAGS
6437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
6438 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
6439 if ${ac_cv_prog_cxx_g+:} false; then :
6440 $as_echo_n "(cached) " >&6
6441 else
6442 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6443 ac_cxx_werror_flag=yes
6444 ac_cv_prog_cxx_g=no
6445 CXXFLAGS="-g"
6446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6447 /* end confdefs.h. */
6448
6449 int
6450 main ()
6451 {
6452
6453 ;
6454 return 0;
6455 }
6456 _ACEOF
6457 if ac_fn_cxx_try_compile "$LINENO"; then :
6458 ac_cv_prog_cxx_g=yes
6459 else
6460 CXXFLAGS=""
6461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6462 /* end confdefs.h. */
6463
6464 int
6465 main ()
6466 {
6467
6468 ;
6469 return 0;
6470 }
6471 _ACEOF
6472 if ac_fn_cxx_try_compile "$LINENO"; then :
6473
6474 else
6475 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6476 CXXFLAGS="-g"
6477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6478 /* end confdefs.h. */
6479
6480 int
6481 main ()
6482 {
6483
6484 ;
6485 return 0;
6486 }
6487 _ACEOF
6488 if ac_fn_cxx_try_compile "$LINENO"; then :
6489 ac_cv_prog_cxx_g=yes
6490 fi
6491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6492 fi
6493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6494 fi
6495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6496 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6497 fi
6498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
6499 $as_echo "$ac_cv_prog_cxx_g" >&6; }
6500 if test "$ac_test_CXXFLAGS" = set; then
6501 CXXFLAGS=$ac_save_CXXFLAGS
6502 elif test $ac_cv_prog_cxx_g = yes; then
6503 if test "$GXX" = yes; then
6504 CXXFLAGS="-g -O2"
6505 else
6506 CXXFLAGS="-g"
6507 fi
6508 else
6509 if test "$GXX" = yes; then
6510 CXXFLAGS="-O2"
6511 else
6512 CXXFLAGS=
6513 fi
6514 fi
6515 ac_ext=c
6516 ac_cpp='$CPP $CPPFLAGS'
6517 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6518 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6519 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6520
6521 depcc="$CXX" am_compiler_list=
6522
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6524 $as_echo_n "checking dependency style of $depcc... " >&6; }
6525 if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
6526 $as_echo_n "(cached) " >&6
6527 else
6528 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6529 # We make a subdir and do the tests there. Otherwise we can end up
6530 # making bogus files that we don't know about and never remove. For
6531 # instance it was reported that on HP-UX the gcc test will end up
6532 # making a dummy file named 'D' -- because '-MD' means "put the output
6533 # in D".
6534 rm -rf conftest.dir
6535 mkdir conftest.dir
6536 # Copy depcomp to subdir because otherwise we won't find it if we're
6537 # using a relative directory.
6538 cp "$am_depcomp" conftest.dir
6539 cd conftest.dir
6540 # We will build objects and dependencies in a subdirectory because
6541 # it helps to detect inapplicable dependency modes. For instance
6542 # both Tru64's cc and ICC support -MD to output dependencies as a
6543 # side effect of compilation, but ICC will put the dependencies in
6544 # the current directory while Tru64 will put them in the object
6545 # directory.
6546 mkdir sub
6547
6548 am_cv_CXX_dependencies_compiler_type=none
6549 if test "$am_compiler_list" = ""; then
6550 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6551 fi
6552 am__universal=false
6553 case " $depcc " in #(
6554 *\ -arch\ *\ -arch\ *) am__universal=true ;;
6555 esac
6556
6557 for depmode in $am_compiler_list; do
6558 # Setup a source with many dependencies, because some compilers
6559 # like to wrap large dependency lists on column 80 (with \), and
6560 # we should not choose a depcomp mode which is confused by this.
6561 #
6562 # We need to recreate these files for each test, as the compiler may
6563 # overwrite some of them when testing with obscure command lines.
6564 # This happens at least with the AIX C compiler.
6565 : > sub/conftest.c
6566 for i in 1 2 3 4 5 6; do
6567 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6568 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
6569 # Solaris 10 /bin/sh.
6570 echo '/* dummy */' > sub/conftst$i.h
6571 done
6572 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6573
6574 # We check with '-c' and '-o' for the sake of the "dashmstdout"
6575 # mode. It turns out that the SunPro C++ compiler does not properly
6576 # handle '-M -o', and we need to detect this. Also, some Intel
6577 # versions had trouble with output in subdirs.
6578 am__obj=sub/conftest.${OBJEXT-o}
6579 am__minus_obj="-o $am__obj"
6580 case $depmode in
6581 gcc)
6582 # This depmode causes a compiler race in universal mode.
6583 test "$am__universal" = false || continue
6584 ;;
6585 nosideeffect)
6586 # After this tag, mechanisms are not by side-effect, so they'll
6587 # only be used when explicitly requested.
6588 if test "x$enable_dependency_tracking" = xyes; then
6589 continue
6590 else
6591 break
6592 fi
6593 ;;
6594 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
6595 # This compiler won't grok '-c -o', but also, the minuso test has
6596 # not run yet. These depmodes are late enough in the game, and
6597 # so weak that their functioning should not be impacted.
6598 am__obj=conftest.${OBJEXT-o}
6599 am__minus_obj=
6600 ;;
6601 none) break ;;
6602 esac
6603 if depmode=$depmode \
6604 source=sub/conftest.c object=$am__obj \
6605 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6606 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
6607 >/dev/null 2>conftest.err &&
6608 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
6609 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6610 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
6611 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6612 # icc doesn't choke on unknown options, it will just issue warnings
6613 # or remarks (even with -Werror). So we grep stderr for any message
6614 # that says an option was ignored or not supported.
6615 # When given -MP, icc 7.0 and 7.1 complain thusly:
6616 # icc: Command line warning: ignoring option '-M'; no argument required
6617 # The diagnosis changed in icc 8.0:
6618 # icc: Command line remark: option '-MP' not supported
6619 if (grep 'ignoring option' conftest.err ||
6620 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6621 am_cv_CXX_dependencies_compiler_type=$depmode
6622 break
6623 fi
6624 fi
6625 done
6626
6627 cd ..
6628 rm -rf conftest.dir
6629 else
6630 am_cv_CXX_dependencies_compiler_type=none
6631 fi
6632
6633 fi
6634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
6635 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
6636 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
6637
6638 if
6639 test "x$enable_dependency_tracking" != xno \
6640 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
6641 am__fastdepCXX_TRUE=
6642 am__fastdepCXX_FALSE='#'
6643 else
6644 am__fastdepCXX_TRUE='#'
6645 am__fastdepCXX_FALSE=
6646 fi
6647
6648
6649
6650
6651 depend_audio=""
6652 ldadd_audio=""
6653
6654
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for audio support" >&5
6656 $as_echo_n "checking for audio support... " >&6; }
6657
6658 if test "$audio" = unknown
6659 then
6660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6661 /* end confdefs.h. */
6662
6663 # include <mmsystem.h>
6664
6665 _ACEOF
6666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6667 $EGREP "waveOutOpen" >/dev/null 2>&1; then :
6668 audio="win32"; ldadd_audio="$ldadd_audio -lwinmm"
6669 fi
6670 rm -f conftest*
6671
6672 fi
6673
6674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $audio" >&5
6675 $as_echo "$audio" >&6; }
6676
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable profiling" >&5
6678 $as_echo_n "checking whether to enable profiling... " >&6; }
6679 # Check whether --enable-profiling was given.
6680 if test "${enable_profiling+set}" = set; then :
6681 enableval=$enable_profiling;
6682 case "$enableval" in
6683 yes) profile="-pg" ;;
6684 esac
6685
6686 fi
6687
6688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_profiling-no}" >&5
6689 $as_echo "${enable_profiling-no}" >&6; }
6690
6691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debugging" >&5
6692 $as_echo_n "checking whether to enable debugging... " >&6; }
6693 # Check whether --enable-debugging was given.
6694 if test "${enable_debugging+set}" = set; then :
6695 enableval=$enable_debugging;
6696 case "$enableval" in
6697 yes)
6698
6699 $as_echo "#define DEBUG 1" >>confdefs.h
6700
6701 optimize=""
6702 ;;
6703 no)
6704 if test -n "$profile"
6705 then
6706 as_fn_error $? "--enable-profiling and --disable-debugging are incompatible" "$LINENO" 5
6707 fi
6708
6709
6710 $as_echo "#define NDEBUG 1" >>confdefs.h
6711
6712 debug=""
6713 if test "$GCC" = yes
6714 then
6715 optimize="$optimize -fomit-frame-pointer"
6716 fi
6717 ;;
6718 esac
6719
6720 fi
6721
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_debugging-default}" >&5
6723 $as_echo "${enable_debugging-default}" >&6; }
6724
6725 case "$enable_debugging" in
6726 yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -lefence" >&5
6727 $as_echo_n "checking for malloc in -lefence... " >&6; }
6728 if ${ac_cv_lib_efence_malloc+:} false; then :
6729 $as_echo_n "(cached) " >&6
6730 else
6731 ac_check_lib_save_LIBS=$LIBS
6732 LIBS="-lefence $LIBS"
6733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6734 /* end confdefs.h. */
6735
6736 /* Override any GCC internal prototype to avoid an error.
6737 Use char because int might match the return type of a GCC
6738 builtin and then its argument prototype would still apply. */
6739 #ifdef __cplusplus
6740 extern "C"
6741 #endif
6742 char malloc ();
6743 int
6744 main ()
6745 {
6746 return malloc ();
6747 ;
6748 return 0;
6749 }
6750 _ACEOF
6751 if ac_fn_c_try_link "$LINENO"; then :
6752 ac_cv_lib_efence_malloc=yes
6753 else
6754 ac_cv_lib_efence_malloc=no
6755 fi
6756 rm -f core conftest.err conftest.$ac_objext \
6757 conftest$ac_exeext conftest.$ac_ext
6758 LIBS=$ac_check_lib_save_LIBS
6759 fi
6760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_efence_malloc" >&5
6761 $as_echo "$ac_cv_lib_efence_malloc" >&6; }
6762 if test "x$ac_cv_lib_efence_malloc" = xyes; then :
6763 cat >>confdefs.h <<_ACEOF
6764 #define HAVE_LIBEFENCE 1
6765 _ACEOF
6766
6767 LIBS="-lefence $LIBS"
6768
6769 fi
6770 ;;
6771 esac
6772
6773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable experimental code" >&5
6774 $as_echo_n "checking whether to enable experimental code... " >&6; }
6775 # Check whether --enable-experimental was given.
6776 if test "${enable_experimental+set}" = set; then :
6777 enableval=$enable_experimental;
6778 case "$enableval" in
6779 yes)
6780
6781 $as_echo "#define EXPERIMENTAL 1" >>confdefs.h
6782
6783 ;;
6784 esac
6785
6786 fi
6787
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_experimental-no}" >&5
6789 $as_echo "${enable_experimental-no}" >&6; }
6790
6791
6792 test -n "$arch" && CFLAGS="$CFLAGS $arch"
6793 test -n "$debug" && CFLAGS="$CFLAGS $debug"
6794 test -n "$optimize" && CFLAGS="$CFLAGS $optimize"
6795 test -n "$profile" && CFLAGS="$CFLAGS $profile" LDFLAGS="$LDFLAGS $profile"
6796
6797 $as_echo "#define AUDIO_DEFAULT /**/" >>confdefs.h
6798
6799 cat >confcache <<\_ACEOF
6800 # This file is a shell script that caches the results of configure
6801 # tests run on this system so they can be shared between configure
6802 # scripts and configure runs, see configure's option --config-cache.
6803 # It is not useful on other systems. If it contains results you don't
6804 # want to keep, you may remove or edit it.
6805 #
6806 # config.status only pays attention to the cache file if you give it
6807 # the --recheck option to rerun configure.
6808 #
6809 # `ac_cv_env_foo' variables (set or unset) will be overridden when
6810 # loading this file, other *unset* `ac_cv_foo' will be assigned the
6811 # following values.
6812
6813 _ACEOF
6814
6815 # The following way of writing the cache mishandles newlines in values,
6816 # but we know of no workaround that is simple, portable, and efficient.
6817 # So, we kill variables containing newlines.
6818 # Ultrix sh set writes to stderr and can't be redirected directly,
6819 # and sets the high bit in the cache file unless we assign to the vars.
6820 (
6821 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
6822 eval ac_val=\$$ac_var
6823 case $ac_val in #(
6824 *${as_nl}*)
6825 case $ac_var in #(
6826 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
6827 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
6828 esac
6829 case $ac_var in #(
6830 _ | IFS | as_nl) ;; #(
6831 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
6832 *) { eval $ac_var=; unset $ac_var;} ;;
6833 esac ;;
6834 esac
6835 done
6836
6837 (set) 2>&1 |
6838 case $as_nl`(ac_space=' '; set) 2>&1` in #(
6839 *${as_nl}ac_space=\ *)
6840 # `set' does not quote correctly, so add quotes: double-quote
6841 # substitution turns \\\\ into \\, and sed turns \\ into \.
6842 sed -n \
6843 "s/'/'\\\\''/g;
6844 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
6845 ;; #(
6846 *)
6847 # `set' quotes correctly as required by POSIX, so do not add quotes.
6848 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
6849 ;;
6850 esac |
6851 sort
6852 ) |
6853 sed '
6854 /^ac_cv_env_/b end
6855 t clear
6856 :clear
6857 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
6858 t end
6859 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
6860 :end' >>confcache
6861 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
6862 if test -w "$cache_file"; then
6863 if test "x$cache_file" != "x/dev/null"; then
6864 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
6865 $as_echo "$as_me: updating cache $cache_file" >&6;}
6866 if test ! -f "$cache_file" || test -h "$cache_file"; then
6867 cat confcache >"$cache_file"
6868 else
6869 case $cache_file in #(
6870 */* | ?:*)
6871 mv -f confcache "$cache_file"$$ &&
6872 mv -f "$cache_file"$$ "$cache_file" ;; #(
6873 *)
6874 mv -f confcache "$cache_file" ;;
6875 esac
6876 fi
6877 fi
6878 else
6879 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
6880 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
6881 fi
6882 fi
6883 rm -f confcache
6884
6885 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6886 # Let make expand exec_prefix.
6887 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6888
6889 DEFS=-DHAVE_CONFIG_H
6890
6891 ac_libobjs=
6892 ac_ltlibobjs=
6893 U=
6894 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
6895 # 1. Remove the extension, and $U if already installed.
6896 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
6897 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
6898 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
6899 # will be set to the directory where LIBOBJS objects are built.
6900 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
6901 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
6902 done
6903 LIBOBJS=$ac_libobjs
6904
6905 LTLIBOBJS=$ac_ltlibobjs
6906
6907
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
6909 $as_echo_n "checking that generated files are newer than configure... " >&6; }
6910 if test -n "$am_sleep_pid"; then
6911 # Hide warnings about reused PIDs.
6912 wait $am_sleep_pid 2>/dev/null
6913 fi
6914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
6915 $as_echo "done" >&6; }
6916 if test -n "$EXEEXT"; then
6917 am__EXEEXT_TRUE=
6918 am__EXEEXT_FALSE='#'
6919 else
6920 am__EXEEXT_TRUE='#'
6921 am__EXEEXT_FALSE=
6922 fi
6923
6924 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
6925 as_fn_error $? "conditional \"AMDEP\" was never defined.
6926 Usually this means the macro was only invoked conditionally." "$LINENO" 5
6927 fi
6928 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
6929 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
6930 Usually this means the macro was only invoked conditionally." "$LINENO" 5
6931 fi
6932
6933 if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
6934 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
6935 Usually this means the macro was only invoked conditionally." "$LINENO" 5
6936 fi
6937
6938 : "${CONFIG_STATUS=./config.status}"
6939 ac_write_fail=0
6940 ac_clean_files_save=$ac_clean_files
6941 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
6942 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
6943 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
6944 as_write_fail=0
6945 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
6946 #! $SHELL
6947 # Generated by $as_me.
6948 # Run this file to recreate the current configuration.
6949 # Compiler output produced by configure, useful for debugging
6950 # configure, is in config.log if it exists.
6951
6952 debug=false
6953 ac_cs_recheck=false
6954 ac_cs_silent=false
6955
6956 SHELL=\${CONFIG_SHELL-$SHELL}
6957 export SHELL
6958 _ASEOF
6959 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
6960 ## -------------------- ##
6961 ## M4sh Initialization. ##
6962 ## -------------------- ##
6963
6964 # Be more Bourne compatible
6965 DUALCASE=1; export DUALCASE # for MKS sh
6966 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
6967 emulate sh
6968 NULLCMD=:
6969 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
6970 # is contrary to our usage. Disable this feature.
6971 alias -g '${1+"$@"}'='"$@"'
6972 setopt NO_GLOB_SUBST
6973 else
6974 case `(set -o) 2>/dev/null` in #(
6975 *posix*) :
6976 set -o posix ;; #(
6977 *) :
6978 ;;
6979 esac
6980 fi
6981
6982
6983 as_nl='
6984 '
6985 export as_nl
6986 # Printing a long string crashes Solaris 7 /usr/bin/printf.
6987 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6988 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
6989 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
6990 # Prefer a ksh shell builtin over an external printf program on Solaris,
6991 # but without wasting forks for bash or zsh.
6992 if test -z "$BASH_VERSION$ZSH_VERSION" \
6993 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
6994 as_echo='print -r --'
6995 as_echo_n='print -rn --'
6996 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
6997 as_echo='printf %s\n'
6998 as_echo_n='printf %s'
6999 else
7000 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
7001 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
7002 as_echo_n='/usr/ucb/echo -n'
7003 else
7004 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
7005 as_echo_n_body='eval
7006 arg=$1;
7007 case $arg in #(
7008 *"$as_nl"*)
7009 expr "X$arg" : "X\\(.*\\)$as_nl";
7010 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
7011 esac;
7012 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
7013 '
7014 export as_echo_n_body
7015 as_echo_n='sh -c $as_echo_n_body as_echo'
7016 fi
7017 export as_echo_body
7018 as_echo='sh -c $as_echo_body as_echo'
7019 fi
7020
7021 # The user is always right.
7022 if test "${PATH_SEPARATOR+set}" != set; then
7023 PATH_SEPARATOR=:
7024 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
7025 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
7026 PATH_SEPARATOR=';'
7027 }
7028 fi
7029
7030
7031 # IFS
7032 # We need space, tab and new line, in precisely that order. Quoting is
7033 # there to prevent editors from complaining about space-tab.
7034 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
7035 # splitting by setting IFS to empty value.)
7036 IFS=" "" $as_nl"
7037
7038 # Find who we are. Look in the path if we contain no directory separator.
7039 as_myself=
7040 case $0 in #((
7041 *[\\/]* ) as_myself=$0 ;;
7042 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7043 for as_dir in $PATH
7044 do
7045 IFS=$as_save_IFS
7046 test -z "$as_dir" && as_dir=.
7047 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
7048 done
7049 IFS=$as_save_IFS
7050
7051 ;;
7052 esac
7053 # We did not find ourselves, most probably we were run as `sh COMMAND'
7054 # in which case we are not to be found in the path.
7055 if test "x$as_myself" = x; then
7056 as_myself=$0
7057 fi
7058 if test ! -f "$as_myself"; then
7059 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
7060 exit 1
7061 fi
7062
7063 # Unset variables that we do not need and which cause bugs (e.g. in
7064 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
7065 # suppresses any "Segmentation fault" message there. '((' could
7066 # trigger a bug in pdksh 5.2.14.
7067 for as_var in BASH_ENV ENV MAIL MAILPATH
7068 do eval test x\${$as_var+set} = xset \
7069 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
7070 done
7071 PS1='$ '
7072 PS2='> '
7073 PS4='+ '
7074
7075 # NLS nuisances.
7076 LC_ALL=C
7077 export LC_ALL
7078 LANGUAGE=C
7079 export LANGUAGE
7080
7081 # CDPATH.
7082 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
7083
7084
7085 # as_fn_error STATUS ERROR [LINENO LOG_FD]
7086 # ----------------------------------------
7087 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
7088 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
7089 # script with STATUS, using 1 if that was 0.
7090 as_fn_error ()
7091 {
7092 as_status=$1; test $as_status -eq 0 && as_status=1
7093 if test "$4"; then
7094 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
7095 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
7096 fi
7097 $as_echo "$as_me: error: $2" >&2
7098 as_fn_exit $as_status
7099 } # as_fn_error
7100
7101
7102 # as_fn_set_status STATUS
7103 # -----------------------
7104 # Set $? to STATUS, without forking.
7105 as_fn_set_status ()
7106 {
7107 return $1
7108 } # as_fn_set_status
7109
7110 # as_fn_exit STATUS
7111 # -----------------
7112 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
7113 as_fn_exit ()
7114 {
7115 set +e
7116 as_fn_set_status $1
7117 exit $1
7118 } # as_fn_exit
7119
7120 # as_fn_unset VAR
7121 # ---------------
7122 # Portably unset VAR.
7123 as_fn_unset ()
7124 {
7125 { eval $1=; unset $1;}
7126 }
7127 as_unset=as_fn_unset
7128 # as_fn_append VAR VALUE
7129 # ----------------------
7130 # Append the text in VALUE to the end of the definition contained in VAR. Take
7131 # advantage of any shell optimizations that allow amortized linear growth over
7132 # repeated appends, instead of the typical quadratic growth present in naive
7133 # implementations.
7134 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
7135 eval 'as_fn_append ()
7136 {
7137 eval $1+=\$2
7138 }'
7139 else
7140 as_fn_append ()
7141 {
7142 eval $1=\$$1\$2
7143 }
7144 fi # as_fn_append
7145
7146 # as_fn_arith ARG...
7147 # ------------------
7148 # Perform arithmetic evaluation on the ARGs, and store the result in the
7149 # global $as_val. Take advantage of shells that can avoid forks. The arguments
7150 # must be portable across $(()) and expr.
7151 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
7152 eval 'as_fn_arith ()
7153 {
7154 as_val=$(( $* ))
7155 }'
7156 else
7157 as_fn_arith ()
7158 {
7159 as_val=`expr "$@" || test $? -eq 1`
7160 }
7161 fi # as_fn_arith
7162
7163
7164 if expr a : '\(a\)' >/dev/null 2>&1 &&
7165 test "X`expr 00001 : '.*\(...\)'`" = X001; then
7166 as_expr=expr
7167 else
7168 as_expr=false
7169 fi
7170
7171 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
7172 as_basename=basename
7173 else
7174 as_basename=false
7175 fi
7176
7177 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
7178 as_dirname=dirname
7179 else
7180 as_dirname=false
7181 fi
7182
7183 as_me=`$as_basename -- "$0" ||
7184 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
7185 X"$0" : 'X\(//\)$' \| \
7186 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
7187 $as_echo X/"$0" |
7188 sed '/^.*\/\([^/][^/]*\)\/*$/{
7189 s//\1/
7190 q
7191 }
7192 /^X\/\(\/\/\)$/{
7193 s//\1/
7194 q
7195 }
7196 /^X\/\(\/\).*/{
7197 s//\1/
7198 q
7199 }
7200 s/.*/./; q'`
7201
7202 # Avoid depending upon Character Ranges.
7203 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
7204 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
7205 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
7206 as_cr_digits='0123456789'
7207 as_cr_alnum=$as_cr_Letters$as_cr_digits
7208
7209 ECHO_C= ECHO_N= ECHO_T=
7210 case `echo -n x` in #(((((
7211 -n*)
7212 case `echo 'xy\c'` in
7213 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
7214 xy) ECHO_C='\c';;
7215 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
7216 ECHO_T=' ';;
7217 esac;;
7218 *)
7219 ECHO_N='-n';;
7220 esac
7221
7222 rm -f conf$$ conf$$.exe conf$$.file
7223 if test -d conf$$.dir; then
7224 rm -f conf$$.dir/conf$$.file
7225 else
7226 rm -f conf$$.dir
7227 mkdir conf$$.dir 2>/dev/null
7228 fi
7229 if (echo >conf$$.file) 2>/dev/null; then
7230 if ln -s conf$$.file conf$$ 2>/dev/null; then
7231 as_ln_s='ln -s'
7232 # ... but there are two gotchas:
7233 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
7234 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
7235 # In both cases, we have to default to `cp -pR'.
7236 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
7237 as_ln_s='cp -pR'
7238 elif ln conf$$.file conf$$ 2>/dev/null; then
7239 as_ln_s=ln
7240 else
7241 as_ln_s='cp -pR'
7242 fi
7243 else
7244 as_ln_s='cp -pR'
7245 fi
7246 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
7247 rmdir conf$$.dir 2>/dev/null
7248
7249
7250 # as_fn_mkdir_p
7251 # -------------
7252 # Create "$as_dir" as a directory, including parents if necessary.
7253 as_fn_mkdir_p ()
7254 {
7255
7256 case $as_dir in #(
7257 -*) as_dir=./$as_dir;;
7258 esac
7259 test -d "$as_dir" || eval $as_mkdir_p || {
7260 as_dirs=
7261 while :; do
7262 case $as_dir in #(
7263 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
7264 *) as_qdir=$as_dir;;
7265 esac
7266 as_dirs="'$as_qdir' $as_dirs"
7267 as_dir=`$as_dirname -- "$as_dir" ||
7268 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7269 X"$as_dir" : 'X\(//\)[^/]' \| \
7270 X"$as_dir" : 'X\(//\)$' \| \
7271 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
7272 $as_echo X"$as_dir" |
7273 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
7274 s//\1/
7275 q
7276 }
7277 /^X\(\/\/\)[^/].*/{
7278 s//\1/
7279 q
7280 }
7281 /^X\(\/\/\)$/{
7282 s//\1/
7283 q
7284 }
7285 /^X\(\/\).*/{
7286 s//\1/
7287 q
7288 }
7289 s/.*/./; q'`
7290 test -d "$as_dir" && break
7291 done
7292 test -z "$as_dirs" || eval "mkdir $as_dirs"
7293 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
7294
7295
7296 } # as_fn_mkdir_p
7297 if mkdir -p . 2>/dev/null; then
7298 as_mkdir_p='mkdir -p "$as_dir"'
7299 else
7300 test -d ./-p && rmdir ./-p
7301 as_mkdir_p=false
7302 fi
7303
7304
7305 # as_fn_executable_p FILE
7306 # -----------------------
7307 # Test if FILE is an executable regular file.
7308 as_fn_executable_p ()
7309 {
7310 test -f "$1" && test -x "$1"
7311 } # as_fn_executable_p
7312 as_test_x='test -x'
7313 as_executable_p=as_fn_executable_p
7314
7315 # Sed expression to map a string onto a valid CPP name.
7316 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
7317
7318 # Sed expression to map a string onto a valid variable name.
7319 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
7320
7321
7322 exec 6>&1
7323 ## ----------------------------------- ##
7324 ## Main body of $CONFIG_STATUS script. ##
7325 ## ----------------------------------- ##
7326 _ASEOF
7327 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
7328
7329 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7330 # Save the log message, to keep $0 and so on meaningful, and to
7331 # report actual input values of CONFIG_FILES etc. instead of their
7332 # values after options handling.
7333 ac_log="
7334 This file was extended by MPEG audio decoder and player $as_me 0.15.2b, which was
7335 generated by GNU Autoconf 2.69. Invocation command line was
7336
7337 CONFIG_FILES = $CONFIG_FILES
7338 CONFIG_HEADERS = $CONFIG_HEADERS
7339 CONFIG_LINKS = $CONFIG_LINKS
7340 CONFIG_COMMANDS = $CONFIG_COMMANDS
7341 $ $0 $@
7342
7343 on `(hostname || uname -n) 2>/dev/null | sed 1q`
7344 "
7345
7346 _ACEOF
7347
7348 case $ac_config_files in *"
7349 "*) set x $ac_config_files; shift; ac_config_files=$*;;
7350 esac
7351
7352 case $ac_config_headers in *"
7353 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
7354 esac
7355
7356
7357 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7358 # Files that config.status was made for.
7359 config_files="$ac_config_files"
7360 config_headers="$ac_config_headers"
7361 config_commands="$ac_config_commands"
7362
7363 _ACEOF
7364
7365 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7366 ac_cs_usage="\
7367 \`$as_me' instantiates files and other configuration actions
7368 from templates according to the current configuration. Unless the files
7369 and actions are specified as TAGs, all are instantiated by default.
7370
7371 Usage: $0 [OPTION]... [TAG]...
7372
7373 -h, --help print this help, then exit
7374 -V, --version print version number and configuration settings, then exit
7375 --config print configuration, then exit
7376 -q, --quiet, --silent
7377 do not print progress messages
7378 -d, --debug don't remove temporary files
7379 --recheck update $as_me by reconfiguring in the same conditions
7380 --file=FILE[:TEMPLATE]
7381 instantiate the configuration file FILE
7382 --header=FILE[:TEMPLATE]
7383 instantiate the configuration header FILE
7384
7385 Configuration files:
7386 $config_files
7387
7388 Configuration headers:
7389 $config_headers
7390
7391 Configuration commands:
7392 $config_commands
7393
7394 Report bugs to <rob@mars.org>."
7395
7396 _ACEOF
7397 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7398 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
7399 ac_cs_version="\\
7400 MPEG audio decoder and player config.status 0.15.2b
7401 configured by $0, generated by GNU Autoconf 2.69,
7402 with options \\"\$ac_cs_config\\"
7403
7404 Copyright (C) 2012 Free Software Foundation, Inc.
7405 This config.status script is free software; the Free Software Foundation
7406 gives unlimited permission to copy, distribute and modify it."
7407
7408 ac_pwd='$ac_pwd'
7409 srcdir='$srcdir'
7410 INSTALL='$INSTALL'
7411 MKDIR_P='$MKDIR_P'
7412 AWK='$AWK'
7413 test -n "\$AWK" || AWK=awk
7414 _ACEOF
7415
7416 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7417 # The default lists apply if the user does not specify any file.
7418 ac_need_defaults=:
7419 while test $# != 0
7420 do
7421 case $1 in
7422 --*=?*)
7423 ac_option=`expr "X$1" : 'X\([^=]*\)='`
7424 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
7425 ac_shift=:
7426 ;;
7427 --*=)
7428 ac_option=`expr "X$1" : 'X\([^=]*\)='`
7429 ac_optarg=
7430 ac_shift=:
7431 ;;
7432 *)
7433 ac_option=$1
7434 ac_optarg=$2
7435 ac_shift=shift
7436 ;;
7437 esac
7438
7439 case $ac_option in
7440 # Handling of the options.
7441 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7442 ac_cs_recheck=: ;;
7443 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
7444 $as_echo "$ac_cs_version"; exit ;;
7445 --config | --confi | --conf | --con | --co | --c )
7446 $as_echo "$ac_cs_config"; exit ;;
7447 --debug | --debu | --deb | --de | --d | -d )
7448 debug=: ;;
7449 --file | --fil | --fi | --f )
7450 $ac_shift
7451 case $ac_optarg in
7452 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
7453 '') as_fn_error $? "missing file argument" ;;
7454 esac
7455 as_fn_append CONFIG_FILES " '$ac_optarg'"
7456 ac_need_defaults=false;;
7457 --header | --heade | --head | --hea )
7458 $ac_shift
7459 case $ac_optarg in
7460 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
7461 esac
7462 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
7463 ac_need_defaults=false;;
7464 --he | --h)
7465 # Conflict between --help and --header
7466 as_fn_error $? "ambiguous option: \`$1'
7467 Try \`$0 --help' for more information.";;
7468 --help | --hel | -h )
7469 $as_echo "$ac_cs_usage"; exit ;;
7470 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
7471 | -silent | --silent | --silen | --sile | --sil | --si | --s)
7472 ac_cs_silent=: ;;
7473
7474 # This is an error.
7475 -*) as_fn_error $? "unrecognized option: \`$1'
7476 Try \`$0 --help' for more information." ;;
7477
7478 *) as_fn_append ac_config_targets " $1"
7479 ac_need_defaults=false ;;
7480
7481 esac
7482 shift
7483 done
7484
7485 ac_configure_extra_args=
7486
7487 if $ac_cs_silent; then
7488 exec 6>/dev/null
7489 ac_configure_extra_args="$ac_configure_extra_args --silent"
7490 fi
7491
7492 _ACEOF
7493 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7494 if \$ac_cs_recheck; then
7495 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
7496 shift
7497 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
7498 CONFIG_SHELL='$SHELL'
7499 export CONFIG_SHELL
7500 exec "\$@"
7501 fi
7502
7503 _ACEOF
7504 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7505 exec 5>>config.log
7506 {
7507 echo
7508 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
7509 ## Running $as_me. ##
7510 _ASBOX
7511 $as_echo "$ac_log"
7512 } >&5
7513
7514 _ACEOF
7515 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7516 #
7517 # INIT-COMMANDS
7518 #
7519 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
7520
7521 _ACEOF
7522
7523 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7524
7525 # Handling of arguments.
7526 for ac_config_target in $ac_config_targets
7527 do
7528 case $ac_config_target in
7529 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
7530 "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
7531 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
7532 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
7533
7534 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
7535 esac
7536 done
7537
7538
7539 # If the user did not use the arguments to specify the items to instantiate,
7540 # then the envvar interface is used. Set only those that are not.
7541 # We use the long form for the default assignment because of an extremely
7542 # bizarre bug on SunOS 4.1.3.
7543 if $ac_need_defaults; then
7544 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
7545 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
7546 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
7547 fi
7548
7549 # Have a temporary directory for convenience. Make it in the build tree
7550 # simply because there is no reason against having it here, and in addition,
7551 # creating and moving files from /tmp can sometimes cause problems.
7552 # Hook for its removal unless debugging.
7553 # Note that there is a small window in which the directory will not be cleaned:
7554 # after its creation but before its name has been assigned to `$tmp'.
7555 $debug ||
7556 {
7557 tmp= ac_tmp=
7558 trap 'exit_status=$?
7559 : "${ac_tmp:=$tmp}"
7560 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
7561 ' 0
7562 trap 'as_fn_exit 1' 1 2 13 15
7563 }
7564 # Create a (secure) tmp directory for tmp files.
7565
7566 {
7567 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
7568 test -d "$tmp"
7569 } ||
7570 {
7571 tmp=./conf$$-$RANDOM
7572 (umask 077 && mkdir "$tmp")
7573 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
7574 ac_tmp=$tmp
7575
7576 # Set up the scripts for CONFIG_FILES section.
7577 # No need to generate them if there are no CONFIG_FILES.
7578 # This happens for instance with `./config.status config.h'.
7579 if test -n "$CONFIG_FILES"; then
7580
7581
7582 ac_cr=`echo X | tr X '\015'`
7583 # On cygwin, bash can eat \r inside `` if the user requested igncr.
7584 # But we know of no other shell where ac_cr would be empty at this
7585 # point, so we can use a bashism as a fallback.
7586 if test "x$ac_cr" = x; then
7587 eval ac_cr=\$\'\\r\'
7588 fi
7589 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
7590 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
7591 ac_cs_awk_cr='\\r'
7592 else
7593 ac_cs_awk_cr=$ac_cr
7594 fi
7595
7596 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
7597 _ACEOF
7598
7599
7600 {
7601 echo "cat >conf$$subs.awk <<_ACEOF" &&
7602 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
7603 echo "_ACEOF"
7604 } >conf$$subs.sh ||
7605 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
7606 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
7607 ac_delim='%!_!# '
7608 for ac_last_try in false false false false false :; do
7609 . ./conf$$subs.sh ||
7610 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
7611
7612 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
7613 if test $ac_delim_n = $ac_delim_num; then
7614 break
7615 elif $ac_last_try; then
7616 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
7617 else
7618 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
7619 fi
7620 done
7621 rm -f conf$$subs.sh
7622
7623 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7624 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
7625 _ACEOF
7626 sed -n '
7627 h
7628 s/^/S["/; s/!.*/"]=/
7629 p
7630 g
7631 s/^[^!]*!//
7632 :repl
7633 t repl
7634 s/'"$ac_delim"'$//
7635 t delim
7636 :nl
7637 h
7638 s/\(.\{148\}\)..*/\1/
7639 t more1
7640 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
7641 p
7642 n
7643 b repl
7644 :more1
7645 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
7646 p
7647 g
7648 s/.\{148\}//
7649 t nl
7650 :delim
7651 h
7652 s/\(.\{148\}\)..*/\1/
7653 t more2
7654 s/["\\]/\\&/g; s/^/"/; s/$/"/
7655 p
7656 b
7657 :more2
7658 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
7659 p
7660 g
7661 s/.\{148\}//
7662 t delim
7663 ' <conf$$subs.awk | sed '
7664 /^[^""]/{
7665 N
7666 s/\n//
7667 }
7668 ' >>$CONFIG_STATUS || ac_write_fail=1
7669 rm -f conf$$subs.awk
7670 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7671 _ACAWK
7672 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
7673 for (key in S) S_is_set[key] = 1
7674 FS = ""
7675
7676 }
7677 {
7678 line = $ 0
7679 nfields = split(line, field, "@")
7680 substed = 0
7681 len = length(field[1])
7682 for (i = 2; i < nfields; i++) {
7683 key = field[i]
7684 keylen = length(key)
7685 if (S_is_set[key]) {
7686 value = S[key]
7687 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
7688 len += length(value) + length(field[++i])
7689 substed = 1
7690 } else
7691 len += 1 + keylen
7692 }
7693
7694 print line
7695 }
7696
7697 _ACAWK
7698 _ACEOF
7699 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7700 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
7701 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
7702 else
7703 cat
7704 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
7705 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
7706 _ACEOF
7707
7708 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
7709 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
7710 # trailing colons and then remove the whole line if VPATH becomes empty
7711 # (actually we leave an empty line to preserve line numbers).
7712 if test "x$srcdir" = x.; then
7713 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
7714 h
7715 s///
7716 s/^/:/
7717 s/[ ]*$/:/
7718 s/:\$(srcdir):/:/g
7719 s/:\${srcdir}:/:/g
7720 s/:@srcdir@:/:/g
7721 s/^:*//
7722 s/:*$//
7723 x
7724 s/\(=[ ]*\).*/\1/
7725 G
7726 s/\n//
7727 s/^[^=]*=[ ]*$//
7728 }'
7729 fi
7730
7731 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7732 fi # test -n "$CONFIG_FILES"
7733
7734 # Set up the scripts for CONFIG_HEADERS section.
7735 # No need to generate them if there are no CONFIG_HEADERS.
7736 # This happens for instance with `./config.status Makefile'.
7737 if test -n "$CONFIG_HEADERS"; then
7738 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
7739 BEGIN {
7740 _ACEOF
7741
7742 # Transform confdefs.h into an awk script `defines.awk', embedded as
7743 # here-document in config.status, that substitutes the proper values into
7744 # config.h.in to produce config.h.
7745
7746 # Create a delimiter string that does not exist in confdefs.h, to ease
7747 # handling of long lines.
7748 ac_delim='%!_!# '
7749 for ac_last_try in false false :; do
7750 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
7751 if test -z "$ac_tt"; then
7752 break
7753 elif $ac_last_try; then
7754 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
7755 else
7756 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
7757 fi
7758 done
7759
7760 # For the awk script, D is an array of macro values keyed by name,
7761 # likewise P contains macro parameters if any. Preserve backslash
7762 # newline sequences.
7763
7764 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
7765 sed -n '
7766 s/.\{148\}/&'"$ac_delim"'/g
7767 t rset
7768 :rset
7769 s/^[ ]*#[ ]*define[ ][ ]*/ /
7770 t def
7771 d
7772 :def
7773 s/\\$//
7774 t bsnl
7775 s/["\\]/\\&/g
7776 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
7777 D["\1"]=" \3"/p
7778 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
7779 d
7780 :bsnl
7781 s/["\\]/\\&/g
7782 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
7783 D["\1"]=" \3\\\\\\n"\\/p
7784 t cont
7785 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
7786 t cont
7787 d
7788 :cont
7789 n
7790 s/.\{148\}/&'"$ac_delim"'/g
7791 t clear
7792 :clear
7793 s/\\$//
7794 t bsnlc
7795 s/["\\]/\\&/g; s/^/"/; s/$/"/p
7796 d
7797 :bsnlc
7798 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
7799 b cont
7800 ' <confdefs.h | sed '
7801 s/'"$ac_delim"'/"\\\
7802 "/g' >>$CONFIG_STATUS || ac_write_fail=1
7803
7804 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
7805 for (key in D) D_is_set[key] = 1
7806 FS = ""
7807 }
7808 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
7809 line = \$ 0
7810 split(line, arg, " ")
7811 if (arg[1] == "#") {
7812 defundef = arg[2]
7813 mac1 = arg[3]
7814 } else {
7815 defundef = substr(arg[1], 2)
7816 mac1 = arg[2]
7817 }
7818 split(mac1, mac2, "(") #)
7819 macro = mac2[1]
7820 prefix = substr(line, 1, index(line, defundef) - 1)
7821 if (D_is_set[macro]) {
7822 # Preserve the white space surrounding the "#".
7823 print prefix "define", macro P[macro] D[macro]
7824 next
7825 } else {
7826 # Replace #undef with comments. This is necessary, for example,
7827 # in the case of _POSIX_SOURCE, which is predefined and required
7828 # on some systems where configure will not decide to define it.
7829 if (defundef == "undef") {
7830 print "/*", prefix defundef, macro, "*/"
7831 next
7832 }
7833 }
7834 }
7835 { print }
7836 _ACAWK
7837 _ACEOF
7838 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7839 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
7840 fi # test -n "$CONFIG_HEADERS"
7841
7842
7843 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
7844 shift
7845 for ac_tag
7846 do
7847 case $ac_tag in
7848 :[FHLC]) ac_mode=$ac_tag; continue;;
7849 esac
7850 case $ac_mode$ac_tag in
7851 :[FHL]*:*);;
7852 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
7853 :[FH]-) ac_tag=-:-;;
7854 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
7855 esac
7856 ac_save_IFS=$IFS
7857 IFS=:
7858 set x $ac_tag
7859 IFS=$ac_save_IFS
7860 shift
7861 ac_file=$1
7862 shift
7863
7864 case $ac_mode in
7865 :L) ac_source=$1;;
7866 :[FH])
7867 ac_file_inputs=
7868 for ac_f
7869 do
7870 case $ac_f in
7871 -) ac_f="$ac_tmp/stdin";;
7872 *) # Look for the file first in the build tree, then in the source tree
7873 # (if the path is not absolute). The absolute path cannot be DOS-style,
7874 # because $ac_f cannot contain `:'.
7875 test -f "$ac_f" ||
7876 case $ac_f in
7877 [\\/$]*) false;;
7878 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
7879 esac ||
7880 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
7881 esac
7882 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
7883 as_fn_append ac_file_inputs " '$ac_f'"
7884 done
7885
7886 # Let's still pretend it is `configure' which instantiates (i.e., don't
7887 # use $as_me), people would be surprised to read:
7888 # /* config.h. Generated by config.status. */
7889 configure_input='Generated from '`
7890 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
7891 `' by configure.'
7892 if test x"$ac_file" != x-; then
7893 configure_input="$ac_file. $configure_input"
7894 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
7895 $as_echo "$as_me: creating $ac_file" >&6;}
7896 fi
7897 # Neutralize special characters interpreted by sed in replacement strings.
7898 case $configure_input in #(
7899 *\&* | *\|* | *\\* )
7900 ac_sed_conf_input=`$as_echo "$configure_input" |
7901 sed 's/[\\\\&|]/\\\\&/g'`;; #(
7902 *) ac_sed_conf_input=$configure_input;;
7903 esac
7904
7905 case $ac_tag in
7906 *:-:* | *:-) cat >"$ac_tmp/stdin" \
7907 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
7908 esac
7909 ;;
7910 esac
7911
7912 ac_dir=`$as_dirname -- "$ac_file" ||
7913 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
7914 X"$ac_file" : 'X\(//\)[^/]' \| \
7915 X"$ac_file" : 'X\(//\)$' \| \
7916 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
7917 $as_echo X"$ac_file" |
7918 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
7919 s//\1/
7920 q
7921 }
7922 /^X\(\/\/\)[^/].*/{
7923 s//\1/
7924 q
7925 }
7926 /^X\(\/\/\)$/{
7927 s//\1/
7928 q
7929 }
7930 /^X\(\/\).*/{
7931 s//\1/
7932 q
7933 }
7934 s/.*/./; q'`
7935 as_dir="$ac_dir"; as_fn_mkdir_p
7936 ac_builddir=.
7937
7938 case "$ac_dir" in
7939 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
7940 *)
7941 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
7942 # A ".." for each directory in $ac_dir_suffix.
7943 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
7944 case $ac_top_builddir_sub in
7945 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
7946 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
7947 esac ;;
7948 esac
7949 ac_abs_top_builddir=$ac_pwd
7950 ac_abs_builddir=$ac_pwd$ac_dir_suffix
7951 # for backward compatibility:
7952 ac_top_builddir=$ac_top_build_prefix
7953
7954 case $srcdir in
7955 .) # We are building in place.
7956 ac_srcdir=.
7957 ac_top_srcdir=$ac_top_builddir_sub
7958 ac_abs_top_srcdir=$ac_pwd ;;
7959 [\\/]* | ?:[\\/]* ) # Absolute name.
7960 ac_srcdir=$srcdir$ac_dir_suffix;
7961 ac_top_srcdir=$srcdir
7962 ac_abs_top_srcdir=$srcdir ;;
7963 *) # Relative name.
7964 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
7965 ac_top_srcdir=$ac_top_build_prefix$srcdir
7966 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
7967 esac
7968 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
7969
7970
7971 case $ac_mode in
7972 :F)
7973 #
7974 # CONFIG_FILE
7975 #
7976
7977 case $INSTALL in
7978 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
7979 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
7980 esac
7981 ac_MKDIR_P=$MKDIR_P
7982 case $MKDIR_P in
7983 [\\/$]* | ?:[\\/]* ) ;;
7984 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
7985 esac
7986 _ACEOF
7987
7988 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
7989 # If the template does not know about datarootdir, expand it.
7990 # FIXME: This hack should be removed a few years after 2.60.
7991 ac_datarootdir_hack=; ac_datarootdir_seen=
7992 ac_sed_dataroot='
7993 /datarootdir/ {
7994 p
7995 q
7996 }
7997 /@datadir@/p
7998 /@docdir@/p
7999 /@infodir@/p
8000 /@localedir@/p
8001 /@mandir@/p'
8002 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
8003 *datarootdir*) ac_datarootdir_seen=yes;;
8004 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
8005 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
8006 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8007 _ACEOF
8008 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8009 ac_datarootdir_hack='
8010 s&@datadir@&$datadir&g
8011 s&@docdir@&$docdir&g
8012 s&@infodir@&$infodir&g
8013 s&@localedir@&$localedir&g
8014 s&@mandir@&$mandir&g
8015 s&\\\${datarootdir}&$datarootdir&g' ;;
8016 esac
8017 _ACEOF
8018
8019 # Neutralize VPATH when `$srcdir' = `.'.
8020 # Shell code in configure.ac might set extrasub.
8021 # FIXME: do we really want to maintain this feature?
8022 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8023 ac_sed_extra="$ac_vpsub
8024 $extrasub
8025 _ACEOF
8026 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8027 :t
8028 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
8029 s|@configure_input@|$ac_sed_conf_input|;t t
8030 s&@top_builddir@&$ac_top_builddir_sub&;t t
8031 s&@top_build_prefix@&$ac_top_build_prefix&;t t
8032 s&@srcdir@&$ac_srcdir&;t t
8033 s&@abs_srcdir@&$ac_abs_srcdir&;t t
8034 s&@top_srcdir@&$ac_top_srcdir&;t t
8035 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
8036 s&@builddir@&$ac_builddir&;t t
8037 s&@abs_builddir@&$ac_abs_builddir&;t t
8038 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
8039 s&@INSTALL@&$ac_INSTALL&;t t
8040 s&@MKDIR_P@&$ac_MKDIR_P&;t t
8041 $ac_datarootdir_hack
8042 "
8043 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
8044 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
8045
8046 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
8047 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
8048 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
8049 "$ac_tmp/out"`; test -z "$ac_out"; } &&
8050 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
8051 which seems to be undefined. Please make sure it is defined" >&5
8052 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
8053 which seems to be undefined. Please make sure it is defined" >&2;}
8054
8055 rm -f "$ac_tmp/stdin"
8056 case $ac_file in
8057 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
8058 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
8059 esac \
8060 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
8061 ;;
8062 :H)
8063 #
8064 # CONFIG_HEADER
8065 #
8066 if test x"$ac_file" != x-; then
8067 {
8068 $as_echo "/* $configure_input */" \
8069 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
8070 } >"$ac_tmp/config.h" \
8071 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
8072 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
8073 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
8074 $as_echo "$as_me: $ac_file is unchanged" >&6;}
8075 else
8076 rm -f "$ac_file"
8077 mv "$ac_tmp/config.h" "$ac_file" \
8078 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
8079 fi
8080 else
8081 $as_echo "/* $configure_input */" \
8082 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
8083 || as_fn_error $? "could not create -" "$LINENO" 5
8084 fi
8085 # Compute "$ac_file"'s index in $config_headers.
8086 _am_arg="$ac_file"
8087 _am_stamp_count=1
8088 for _am_header in $config_headers :; do
8089 case $_am_header in
8090 $_am_arg | $_am_arg:* )
8091 break ;;
8092 * )
8093 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
8094 esac
8095 done
8096 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
8097 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8098 X"$_am_arg" : 'X\(//\)[^/]' \| \
8099 X"$_am_arg" : 'X\(//\)$' \| \
8100 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
8101 $as_echo X"$_am_arg" |
8102 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8103 s//\1/
8104 q
8105 }
8106 /^X\(\/\/\)[^/].*/{
8107 s//\1/
8108 q
8109 }
8110 /^X\(\/\/\)$/{
8111 s//\1/
8112 q
8113 }
8114 /^X\(\/\).*/{
8115 s//\1/
8116 q
8117 }
8118 s/.*/./; q'`/stamp-h$_am_stamp_count
8119 ;;
8120
8121 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
8122 $as_echo "$as_me: executing $ac_file commands" >&6;}
8123 ;;
8124 esac
8125
8126
8127 case $ac_file$ac_mode in
8128 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
8129 # Older Autoconf quotes --file arguments for eval, but not when files
8130 # are listed without --file. Let's play safe and only enable the eval
8131 # if we detect the quoting.
8132 case $CONFIG_FILES in
8133 *\'*) eval set x "$CONFIG_FILES" ;;
8134 *) set x $CONFIG_FILES ;;
8135 esac
8136 shift
8137 for mf
8138 do
8139 # Strip MF so we end up with the name of the file.
8140 mf=`echo "$mf" | sed -e 's/:.*$//'`
8141 # Check whether this is an Automake generated Makefile or not.
8142 # We used to match only the files named 'Makefile.in', but
8143 # some people rename them; so instead we look at the file content.
8144 # Grep'ing the first line is not enough: some people post-process
8145 # each Makefile.in and add a new line on top of each file to say so.
8146 # Grep'ing the whole file is not good either: AIX grep has a line
8147 # limit of 2048, but all sed's we know have understand at least 4000.
8148 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
8149 dirpart=`$as_dirname -- "$mf" ||
8150 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8151 X"$mf" : 'X\(//\)[^/]' \| \
8152 X"$mf" : 'X\(//\)$' \| \
8153 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
8154 $as_echo X"$mf" |
8155 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8156 s//\1/
8157 q
8158 }
8159 /^X\(\/\/\)[^/].*/{
8160 s//\1/
8161 q
8162 }
8163 /^X\(\/\/\)$/{
8164 s//\1/
8165 q
8166 }
8167 /^X\(\/\).*/{
8168 s//\1/
8169 q
8170 }
8171 s/.*/./; q'`
8172 else
8173 continue
8174 fi
8175 # Extract the definition of DEPDIR, am__include, and am__quote
8176 # from the Makefile without running 'make'.
8177 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
8178 test -z "$DEPDIR" && continue
8179 am__include=`sed -n 's/^am__include = //p' < "$mf"`
8180 test -z "$am__include" && continue
8181 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
8182 # Find all dependency output files, they are included files with
8183 # $(DEPDIR) in their names. We invoke sed twice because it is the
8184 # simplest approach to changing $(DEPDIR) to its actual value in the
8185 # expansion.
8186 for file in `sed -n "
8187 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
8188 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
8189 # Make sure the directory exists.
8190 test -f "$dirpart/$file" && continue
8191 fdir=`$as_dirname -- "$file" ||
8192 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8193 X"$file" : 'X\(//\)[^/]' \| \
8194 X"$file" : 'X\(//\)$' \| \
8195 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
8196 $as_echo X"$file" |
8197 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8198 s//\1/
8199 q
8200 }
8201 /^X\(\/\/\)[^/].*/{
8202 s//\1/
8203 q
8204 }
8205 /^X\(\/\/\)$/{
8206 s//\1/
8207 q
8208 }
8209 /^X\(\/\).*/{
8210 s//\1/
8211 q
8212 }
8213 s/.*/./; q'`
8214 as_dir=$dirpart/$fdir; as_fn_mkdir_p
8215 # echo "creating $dirpart/$file"
8216 echo '# dummy' > "$dirpart/$file"
8217 done
8218 done
8219 }
8220 ;;
8221
8222 esac
8223 done # for ac_tag
8224
8225
8226 as_fn_exit 0
8227 _ACEOF
8228 ac_clean_files=$ac_clean_files_save
8229
8230 test $ac_write_fail = 0 ||
8231 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
8232
8233
8234 # configure is writing to config.log, and then calls config.status.
8235 # config.status does its own redirection, appending to config.log.
8236 # Unfortunately, on DOS this fails, as config.log is still kept open
8237 # by configure, so config.status won't be able to write to it; its
8238 # output is simply discarded. So we exec the FD to /dev/null,
8239 # effectively closing config.log, so it can be properly (re)opened and
8240 # appended to by config.status. When coming back to configure, we
8241 # need to make the FD available again.
8242 if test "$no_create" != yes; then
8243 ac_cs_success=:
8244 ac_config_status_args=
8245 test "$silent" = yes &&
8246 ac_config_status_args="$ac_config_status_args --quiet"
8247 exec 5>/dev/null
8248 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
8249 exec 5>>config.log
8250 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
8251 # would make configure fail if this is the last instruction.
8252 $ac_cs_success || as_fn_exit 1
8253 fi
8254 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
8255 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
8256 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
8257 fi
8258
0 dnl madplay - MPEG audio decoder and player
1 dnl Copyright (C) 2000-2004 Robert Leslie
2 dnl
3 dnl This program is free software; you can redistribute it and/or modify
4 dnl it under the terms of the GNU General Public License as published by
5 dnl the Free Software Foundation; either version 2 of the License, or
6 dnl (at your option) any later version.
7 dnl
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 dnl GNU General Public License for more details.
12 dnl
13 dnl You should have received a copy of the GNU General Public License
14 dnl along with this program; if not, write to the Free Software
15 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 dnl
17 AC_REVISION([$Id: configure.ac,v 1.17 2004/02/23 21:34:53 rob Exp $])dnl
18
19 dnl Process this file with autoconf to produce a configure script.
20
21 AC_INIT([MPEG audio decoder and player],[0.15.2b],[rob@mars.org],[madtest])
22 AC_PREREQ([2.69])
23
24 AM_INIT_AUTOMAKE([subdir-objects])
25 AC_CONFIG_FILES([Makefile
26 m4/Makefile])
27
28 dnl System type.
29
30 AC_CANONICAL_HOST
31
32 dnl Checks for programs.
33
34 AC_PROG_CC
35
36 dnl Support for libtool.
37
38 dnl Compiler options.
39
40 dnl Checks for header files.
41
42 AC_CONFIG_HEADERS([config.h])
43 AC_HEADER_STDC
44 dnl Checks for typedefs, structures, and compiler characteristics.
45
46 AC_C_CONST
47 AC_C_INLINE
48 AC_C_BIGENDIAN
49
50 dnl Checks for library functions.
51
52 AC_FUNC_VPRINTF
53 AC_FUNC_ERROR_AT_LINE
54 AC_FUNC_MMAP
55 AC_CHECK_FUNCS(madvise localeconv)
56 AC_REPLACE_FUNCS(strcasecmp strncasecmp)
57 AC_SEARCH_LIBS(pow, m)
58 AC_SEARCH_LIBS(log10, m)
59 AC_MSG_CHECKING([whether to use mmap])
60 AC_CACHE_SAVE
61
62 dnl madplay options...
63
64 AC_MSG_CHECKING([whether to enable profiling])
65 AC_MSG_RESULT(${enable_profiling-no})
66
67 AC_MSG_CHECKING([whether to enable debugging])
68 AC_MSG_RESULT(${enable_experimental-no})
69
70 dnl Create output files.
71
72 AC_TYPE_SSIZE_T
73 AC_PROG_YACC
74 AC_PROG_LN_S
75 AC_CHECK_FUNCS([__argz_count])
76 AC_CHECK_FUNCS([__argz_next])
77 AC_CHECK_FUNCS([__argz_stringify])
78 AC_CHECK_FUNCS([memmove])
79 AC_CHECK_FUNCS([munmap])
80 AC_CHECK_FUNCS([strcasecmp])
81 AC_CHECK_FUNCS([memset])
82 AC_CHECK_FUNCS([nl_langinfo])
83 AC_CHECK_FUNCS([pow])
84 AC_CHECK_FUNCS([strchr])
85 AC_CHECK_FUNCS([strcspn])
86 AC_CHECK_FUNCS([strncasecmp])
87 AC_CHECK_FUNCS([strrchr])
88 AC_CHECK_FUNCS([strstr])
89 AC_CHECK_FUNCS([strtol])
90 AC_CHECK_HEADERS([float.h])
91 AC_CHECK_HEADERS([fcntl.h])
92 AC_CHECK_HEADERS([termios.h])
93 AC_CHECK_HEADERS([langinfo.h])
94 AC_CHECK_HEADERS([libintl.h])
95 AC_CHECK_HEADERS([locale.h])
96 AC_CHECK_HEADERS([malloc.h])
97 AC_CHECK_HEADERS([stdio_ext.h])
98 AC_CHECK_HEADERS([wchar.h])
99 AC_CHECK_HEADER_STDBOOL
100 AC_CHECK_HEADER(id3tag.h, [], [
101 AC_MSG_ERROR([id3tag.h was not found
102 *** You must first install libid3tag before you can build this package.
103 *** If libid3tag is already installed, you may need to use the CPPFLAGS
104 *** environment variable to specify its installed location, e.g. -I<dir>.])
105 ])
106 AC_CHECK_TYPES([ptrdiff_t])
107 AC_CHECK_FUNCS([getcwd])
108 AC_CHECK_FUNCS([mempcpy])
109 AC_CHECK_FUNCS([stpcpy])
110 AC_CHECK_FUNCS([strtoul])
111 AC_CHECK_HEADERS([argz.h])
112 AC_CHECK_HEADERS([limits.h])
113 AC_CHECK_HEADERS([stddef.h])
114 AC_CHECK_HEADERS([sys/param.h])
115 AC_FUNC_ALLOCA
116 AC_FUNC_MALLOC
117 AC_FUNC_REALLOC
118 AC_FUNC_STRTOD
119 AC_PROG_CXX
120
121 dnl Select an audio system.
122
123 depend_audio=""
124 ldadd_audio=""
125 AC_SUBST(depend_audio)
126 AC_SUBST(ldadd_audio)
127 AC_MSG_CHECKING([for audio support])
128
129 if test "$audio" = unknown
130 then
131 AC_EGREP_CPP(waveOutOpen, [
132 # include <mmsystem.h>
133 ], [audio="win32"; ldadd_audio="$ldadd_audio -lwinmm"])
134 fi
135
136 AC_MSG_RESULT($audio)
137
138 AC_MSG_CHECKING([whether to enable profiling])
139 AC_ARG_ENABLE(profiling, AS_HELP_STRING([--enable-profiling],[generate profiling code]),
140 [
141 case "$enableval" in
142 yes) profile="-pg" ;;
143 esac
144 ])
145 AC_MSG_RESULT(${enable_profiling-no})
146
147 AC_MSG_CHECKING([whether to enable debugging])
148 AC_ARG_ENABLE(debugging, AS_HELP_STRING([--enable-debugging],[enable diagnostic debugging support])
149 AS_HELP_STRING([--disable-debugging],[do not enable debugging and use more optimization]),
150 [
151 case "$enableval" in
152 yes)
153 AC_DEFINE(DEBUG, 1,
154 [Define to enable diagnostic debugging support.])
155 optimize=""
156 ;;
157 no)
158 if test -n "$profile"
159 then
160 AC_MSG_ERROR([--enable-profiling and --disable-debugging are incompatible])
161 fi
162
163 AC_DEFINE(NDEBUG, 1,
164 [Define to disable debugging assertions.])
165 debug=""
166 if test "$GCC" = yes
167 then
168 optimize="$optimize -fomit-frame-pointer"
169 fi
170 ;;
171 esac
172 ])
173 AC_MSG_RESULT(${enable_debugging-default})
174
175 case "$enable_debugging" in
176 yes) AC_CHECK_LIB(efence, malloc) ;;
177 esac
178
179 AC_MSG_CHECKING([whether to enable experimental code])
180 AC_ARG_ENABLE(experimental, AS_HELP_STRING([--enable-experimental],[enable experimental code]),
181 [
182 case "$enableval" in
183 yes)
184 AC_DEFINE(EXPERIMENTAL, 1, [Define to enable experimental code.])
185 ;;
186 esac
187 ])
188 AC_MSG_RESULT(${enable_experimental-no})
189
190 dnl Create output files.
191
192 test -n "$arch" && CFLAGS="$CFLAGS $arch"
193 test -n "$debug" && CFLAGS="$CFLAGS $debug"
194 test -n "$optimize" && CFLAGS="$CFLAGS $optimize"
195 test -n "$profile" && CFLAGS="$CFLAGS $profile" LDFLAGS="$LDFLAGS $profile"
196 AC_DEFINE([AUDIO_DEFAULT], [], [audio_wav])
197 AC_OUTPUT
0 # -*- Autoconf -*-
1 # Process this file with autoconf to produce a configure script.
2
3 AC_PREREQ([2.69])
4 AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
5 AC_CONFIG_SRCDIR([global.h])
6 AC_CONFIG_HEADERS([config.h])
7
8 # Checks for programs.
9 AC_PROG_CC
10
11 # Checks for libraries.
12 # FIXME: Replace `main' with a function in `-lmad':
13 AC_CHECK_LIB([mad], [main])
14
15 # Checks for header files.
16 AC_CHECK_HEADERS([fcntl.h libintl.h locale.h stdlib.h string.h termios.h unistd.h])
17
18 # Checks for typedefs, structures, and compiler characteristics.
19 AC_C_INLINE
20 AC_TYPE_SIZE_T
21
22 # Checks for library functions.
23 AC_FUNC_ERROR_AT_LINE
24 AC_FUNC_MALLOC
25 AC_FUNC_MMAP
26 AC_CHECK_FUNCS([memmove memset munmap pow strcasecmp strchr strncasecmp strrchr strstr strtol])
27
28 AC_CONFIG_FILES([Makefile
29 m4/Makefile])
30 AC_OUTPUT
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: crc.c,v 1.1 2004/02/17 02:26:42 rob Exp $
19 */
20
21 # ifdef HAVE_CONFIG_H
22 # include "config.h"
23 # endif
24
25 # include "global.h"
26
27 # include "crc.h"
28
29 /*
30 * It would be nice to use the code in libmad to compute all CRC-16 values,
31 * but unfortunately the LAME tag uses reflected CRCs whereas MPEG audio
32 * frames do not. Therefore we are forced to write yet another CRC routine.
33 */
34
35 static
36 unsigned short const crc_table[256] = {
37 0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241,
38 0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440,
39 0xcc01, 0x0cc0, 0x0d80, 0xcd41, 0x0f00, 0xcfc1, 0xce81, 0x0e40,
40 0x0a00, 0xcac1, 0xcb81, 0x0b40, 0xc901, 0x09c0, 0x0880, 0xc841,
41 0xd801, 0x18c0, 0x1980, 0xd941, 0x1b00, 0xdbc1, 0xda81, 0x1a40,
42 0x1e00, 0xdec1, 0xdf81, 0x1f40, 0xdd01, 0x1dc0, 0x1c80, 0xdc41,
43 0x1400, 0xd4c1, 0xd581, 0x1540, 0xd701, 0x17c0, 0x1680, 0xd641,
44 0xd201, 0x12c0, 0x1380, 0xd341, 0x1100, 0xd1c1, 0xd081, 0x1040,
45
46 0xf001, 0x30c0, 0x3180, 0xf141, 0x3300, 0xf3c1, 0xf281, 0x3240,
47 0x3600, 0xf6c1, 0xf781, 0x3740, 0xf501, 0x35c0, 0x3480, 0xf441,
48 0x3c00, 0xfcc1, 0xfd81, 0x3d40, 0xff01, 0x3fc0, 0x3e80, 0xfe41,
49 0xfa01, 0x3ac0, 0x3b80, 0xfb41, 0x3900, 0xf9c1, 0xf881, 0x3840,
50 0x2800, 0xe8c1, 0xe981, 0x2940, 0xeb01, 0x2bc0, 0x2a80, 0xea41,
51 0xee01, 0x2ec0, 0x2f80, 0xef41, 0x2d00, 0xedc1, 0xec81, 0x2c40,
52 0xe401, 0x24c0, 0x2580, 0xe541, 0x2700, 0xe7c1, 0xe681, 0x2640,
53 0x2200, 0xe2c1, 0xe381, 0x2340, 0xe101, 0x21c0, 0x2080, 0xe041,
54
55 0xa001, 0x60c0, 0x6180, 0xa141, 0x6300, 0xa3c1, 0xa281, 0x6240,
56 0x6600, 0xa6c1, 0xa781, 0x6740, 0xa501, 0x65c0, 0x6480, 0xa441,
57 0x6c00, 0xacc1, 0xad81, 0x6d40, 0xaf01, 0x6fc0, 0x6e80, 0xae41,
58 0xaa01, 0x6ac0, 0x6b80, 0xab41, 0x6900, 0xa9c1, 0xa881, 0x6840,
59 0x7800, 0xb8c1, 0xb981, 0x7940, 0xbb01, 0x7bc0, 0x7a80, 0xba41,
60 0xbe01, 0x7ec0, 0x7f80, 0xbf41, 0x7d00, 0xbdc1, 0xbc81, 0x7c40,
61 0xb401, 0x74c0, 0x7580, 0xb541, 0x7700, 0xb7c1, 0xb681, 0x7640,
62 0x7200, 0xb2c1, 0xb381, 0x7340, 0xb101, 0x71c0, 0x7080, 0xb041,
63
64 0x5000, 0x90c1, 0x9181, 0x5140, 0x9301, 0x53c0, 0x5280, 0x9241,
65 0x9601, 0x56c0, 0x5780, 0x9741, 0x5500, 0x95c1, 0x9481, 0x5440,
66 0x9c01, 0x5cc0, 0x5d80, 0x9d41, 0x5f00, 0x9fc1, 0x9e81, 0x5e40,
67 0x5a00, 0x9ac1, 0x9b81, 0x5b40, 0x9901, 0x59c0, 0x5880, 0x9841,
68 0x8801, 0x48c0, 0x4980, 0x8941, 0x4b00, 0x8bc1, 0x8a81, 0x4a40,
69 0x4e00, 0x8ec1, 0x8f81, 0x4f40, 0x8d01, 0x4dc0, 0x4c80, 0x8c41,
70 0x4400, 0x84c1, 0x8581, 0x4540, 0x8701, 0x47c0, 0x4680, 0x8641,
71 0x8201, 0x42c0, 0x4380, 0x8341, 0x4100, 0x81c1, 0x8081, 0x4040
72 };
73
74 /*
75 * NAME: crc->compute()
76 * DESCRIPTION: calculate reflected CRC-16 value (polynomial 0x8005)
77 */
78 unsigned short crc_compute(char const *data, unsigned int length,
79 unsigned short init)
80 {
81 register unsigned int crc;
82
83 for (crc = init; length >= 8; length -= 8) {
84 crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
85 crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
86 crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
87 crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
88 crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
89 crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
90 crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
91 crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
92 }
93
94 switch (length) {
95 case 7: crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
96 case 6: crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
97 case 5: crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
98 case 4: crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
99 case 3: crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
100 case 2: crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
101 case 1: crc = crc_table[(crc ^ *data++) & 0xff] ^ (crc >> 8);
102 case 0: break;
103 }
104
105 return crc;
106 }
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: crc.h,v 1.1 2004/02/17 02:26:43 rob Exp $
19 */
20
21 # ifndef CRC_H
22 # define CRC_H
23
24 unsigned short crc_compute(char const *, unsigned int, unsigned short);
25
26 # endif
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2013-05-30.07; # UTC
4
5 # Copyright (C) 1999-2014 Free Software Foundation, Inc.
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
26
27 case $1 in
28 '')
29 echo "$0: No command. Try '$0 --help' for more information." 1>&2
30 exit 1;
31 ;;
32 -h | --h*)
33 cat <<\EOF
34 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
35
36 Run PROGRAMS ARGS to compile a file, generating dependencies
37 as side-effects.
38
39 Environment variables:
40 depmode Dependency tracking mode.
41 source Source file read by 'PROGRAMS ARGS'.
42 object Object file output by 'PROGRAMS ARGS'.
43 DEPDIR directory where to store dependencies.
44 depfile Dependency file to output.
45 tmpdepfile Temporary file to use when outputting dependencies.
46 libtool Whether libtool is used (yes/no).
47
48 Report bugs to <bug-automake@gnu.org>.
49 EOF
50 exit $?
51 ;;
52 -v | --v*)
53 echo "depcomp $scriptversion"
54 exit $?
55 ;;
56 esac
57
58 # Get the directory component of the given path, and save it in the
59 # global variables '$dir'. Note that this directory component will
60 # be either empty or ending with a '/' character. This is deliberate.
61 set_dir_from ()
62 {
63 case $1 in
64 */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
65 *) dir=;;
66 esac
67 }
68
69 # Get the suffix-stripped basename of the given path, and save it the
70 # global variable '$base'.
71 set_base_from ()
72 {
73 base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
74 }
75
76 # If no dependency file was actually created by the compiler invocation,
77 # we still have to create a dummy depfile, to avoid errors with the
78 # Makefile "include basename.Plo" scheme.
79 make_dummy_depfile ()
80 {
81 echo "#dummy" > "$depfile"
82 }
83
84 # Factor out some common post-processing of the generated depfile.
85 # Requires the auxiliary global variable '$tmpdepfile' to be set.
86 aix_post_process_depfile ()
87 {
88 # If the compiler actually managed to produce a dependency file,
89 # post-process it.
90 if test -f "$tmpdepfile"; then
91 # Each line is of the form 'foo.o: dependency.h'.
92 # Do two passes, one to just change these to
93 # $object: dependency.h
94 # and one to simply output
95 # dependency.h:
96 # which is needed to avoid the deleted-header problem.
97 { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
98 sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
99 } > "$depfile"
100 rm -f "$tmpdepfile"
101 else
102 make_dummy_depfile
103 fi
104 }
105
106 # A tabulation character.
107 tab=' '
108 # A newline character.
109 nl='
110 '
111 # Character ranges might be problematic outside the C locale.
112 # These definitions help.
113 upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
114 lower=abcdefghijklmnopqrstuvwxyz
115 digits=0123456789
116 alpha=${upper}${lower}
117
118 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
119 echo "depcomp: Variables source, object and depmode must be set" 1>&2
120 exit 1
121 fi
122
123 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
124 depfile=${depfile-`echo "$object" |
125 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
126 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
127
128 rm -f "$tmpdepfile"
129
130 # Avoid interferences from the environment.
131 gccflag= dashmflag=
132
133 # Some modes work just like other modes, but use different flags. We
134 # parameterize here, but still list the modes in the big case below,
135 # to make depend.m4 easier to write. Note that we *cannot* use a case
136 # here, because this file can only contain one case statement.
137 if test "$depmode" = hp; then
138 # HP compiler uses -M and no extra arg.
139 gccflag=-M
140 depmode=gcc
141 fi
142
143 if test "$depmode" = dashXmstdout; then
144 # This is just like dashmstdout with a different argument.
145 dashmflag=-xM
146 depmode=dashmstdout
147 fi
148
149 cygpath_u="cygpath -u -f -"
150 if test "$depmode" = msvcmsys; then
151 # This is just like msvisualcpp but w/o cygpath translation.
152 # Just convert the backslash-escaped backslashes to single forward
153 # slashes to satisfy depend.m4
154 cygpath_u='sed s,\\\\,/,g'
155 depmode=msvisualcpp
156 fi
157
158 if test "$depmode" = msvc7msys; then
159 # This is just like msvc7 but w/o cygpath translation.
160 # Just convert the backslash-escaped backslashes to single forward
161 # slashes to satisfy depend.m4
162 cygpath_u='sed s,\\\\,/,g'
163 depmode=msvc7
164 fi
165
166 if test "$depmode" = xlc; then
167 # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
168 gccflag=-qmakedep=gcc,-MF
169 depmode=gcc
170 fi
171
172 case "$depmode" in
173 gcc3)
174 ## gcc 3 implements dependency tracking that does exactly what
175 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
176 ## it if -MD -MP comes after the -MF stuff. Hmm.
177 ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
178 ## the command line argument order; so add the flags where they
179 ## appear in depend2.am. Note that the slowdown incurred here
180 ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
181 for arg
182 do
183 case $arg in
184 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
185 *) set fnord "$@" "$arg" ;;
186 esac
187 shift # fnord
188 shift # $arg
189 done
190 "$@"
191 stat=$?
192 if test $stat -ne 0; then
193 rm -f "$tmpdepfile"
194 exit $stat
195 fi
196 mv "$tmpdepfile" "$depfile"
197 ;;
198
199 gcc)
200 ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
201 ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
202 ## (see the conditional assignment to $gccflag above).
203 ## There are various ways to get dependency output from gcc. Here's
204 ## why we pick this rather obscure method:
205 ## - Don't want to use -MD because we'd like the dependencies to end
206 ## up in a subdir. Having to rename by hand is ugly.
207 ## (We might end up doing this anyway to support other compilers.)
208 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
209 ## -MM, not -M (despite what the docs say). Also, it might not be
210 ## supported by the other compilers which use the 'gcc' depmode.
211 ## - Using -M directly means running the compiler twice (even worse
212 ## than renaming).
213 if test -z "$gccflag"; then
214 gccflag=-MD,
215 fi
216 "$@" -Wp,"$gccflag$tmpdepfile"
217 stat=$?
218 if test $stat -ne 0; then
219 rm -f "$tmpdepfile"
220 exit $stat
221 fi
222 rm -f "$depfile"
223 echo "$object : \\" > "$depfile"
224 # The second -e expression handles DOS-style file names with drive
225 # letters.
226 sed -e 's/^[^:]*: / /' \
227 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
228 ## This next piece of magic avoids the "deleted header file" problem.
229 ## The problem is that when a header file which appears in a .P file
230 ## is deleted, the dependency causes make to die (because there is
231 ## typically no way to rebuild the header). We avoid this by adding
232 ## dummy dependencies for each header file. Too bad gcc doesn't do
233 ## this for us directly.
234 ## Some versions of gcc put a space before the ':'. On the theory
235 ## that the space means something, we add a space to the output as
236 ## well. hp depmode also adds that space, but also prefixes the VPATH
237 ## to the object. Take care to not repeat it in the output.
238 ## Some versions of the HPUX 10.20 sed can't process this invocation
239 ## correctly. Breaking it into two sed invocations is a workaround.
240 tr ' ' "$nl" < "$tmpdepfile" \
241 | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
242 | sed -e 's/$/ :/' >> "$depfile"
243 rm -f "$tmpdepfile"
244 ;;
245
246 hp)
247 # This case exists only to let depend.m4 do its work. It works by
248 # looking at the text of this script. This case will never be run,
249 # since it is checked for above.
250 exit 1
251 ;;
252
253 sgi)
254 if test "$libtool" = yes; then
255 "$@" "-Wp,-MDupdate,$tmpdepfile"
256 else
257 "$@" -MDupdate "$tmpdepfile"
258 fi
259 stat=$?
260 if test $stat -ne 0; then
261 rm -f "$tmpdepfile"
262 exit $stat
263 fi
264 rm -f "$depfile"
265
266 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
267 echo "$object : \\" > "$depfile"
268 # Clip off the initial element (the dependent). Don't try to be
269 # clever and replace this with sed code, as IRIX sed won't handle
270 # lines with more than a fixed number of characters (4096 in
271 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
272 # the IRIX cc adds comments like '#:fec' to the end of the
273 # dependency line.
274 tr ' ' "$nl" < "$tmpdepfile" \
275 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
276 | tr "$nl" ' ' >> "$depfile"
277 echo >> "$depfile"
278 # The second pass generates a dummy entry for each header file.
279 tr ' ' "$nl" < "$tmpdepfile" \
280 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
281 >> "$depfile"
282 else
283 make_dummy_depfile
284 fi
285 rm -f "$tmpdepfile"
286 ;;
287
288 xlc)
289 # This case exists only to let depend.m4 do its work. It works by
290 # looking at the text of this script. This case will never be run,
291 # since it is checked for above.
292 exit 1
293 ;;
294
295 aix)
296 # The C for AIX Compiler uses -M and outputs the dependencies
297 # in a .u file. In older versions, this file always lives in the
298 # current directory. Also, the AIX compiler puts '$object:' at the
299 # start of each line; $object doesn't have directory information.
300 # Version 6 uses the directory in both cases.
301 set_dir_from "$object"
302 set_base_from "$object"
303 if test "$libtool" = yes; then
304 tmpdepfile1=$dir$base.u
305 tmpdepfile2=$base.u
306 tmpdepfile3=$dir.libs/$base.u
307 "$@" -Wc,-M
308 else
309 tmpdepfile1=$dir$base.u
310 tmpdepfile2=$dir$base.u
311 tmpdepfile3=$dir$base.u
312 "$@" -M
313 fi
314 stat=$?
315 if test $stat -ne 0; then
316 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
317 exit $stat
318 fi
319
320 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
321 do
322 test -f "$tmpdepfile" && break
323 done
324 aix_post_process_depfile
325 ;;
326
327 tcc)
328 # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
329 # FIXME: That version still under development at the moment of writing.
330 # Make that this statement remains true also for stable, released
331 # versions.
332 # It will wrap lines (doesn't matter whether long or short) with a
333 # trailing '\', as in:
334 #
335 # foo.o : \
336 # foo.c \
337 # foo.h \
338 #
339 # It will put a trailing '\' even on the last line, and will use leading
340 # spaces rather than leading tabs (at least since its commit 0394caf7
341 # "Emit spaces for -MD").
342 "$@" -MD -MF "$tmpdepfile"
343 stat=$?
344 if test $stat -ne 0; then
345 rm -f "$tmpdepfile"
346 exit $stat
347 fi
348 rm -f "$depfile"
349 # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
350 # We have to change lines of the first kind to '$object: \'.
351 sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
352 # And for each line of the second kind, we have to emit a 'dep.h:'
353 # dummy dependency, to avoid the deleted-header problem.
354 sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
355 rm -f "$tmpdepfile"
356 ;;
357
358 ## The order of this option in the case statement is important, since the
359 ## shell code in configure will try each of these formats in the order
360 ## listed in this file. A plain '-MD' option would be understood by many
361 ## compilers, so we must ensure this comes after the gcc and icc options.
362 pgcc)
363 # Portland's C compiler understands '-MD'.
364 # Will always output deps to 'file.d' where file is the root name of the
365 # source file under compilation, even if file resides in a subdirectory.
366 # The object file name does not affect the name of the '.d' file.
367 # pgcc 10.2 will output
368 # foo.o: sub/foo.c sub/foo.h
369 # and will wrap long lines using '\' :
370 # foo.o: sub/foo.c ... \
371 # sub/foo.h ... \
372 # ...
373 set_dir_from "$object"
374 # Use the source, not the object, to determine the base name, since
375 # that's sadly what pgcc will do too.
376 set_base_from "$source"
377 tmpdepfile=$base.d
378
379 # For projects that build the same source file twice into different object
380 # files, the pgcc approach of using the *source* file root name can cause
381 # problems in parallel builds. Use a locking strategy to avoid stomping on
382 # the same $tmpdepfile.
383 lockdir=$base.d-lock
384 trap "
385 echo '$0: caught signal, cleaning up...' >&2
386 rmdir '$lockdir'
387 exit 1
388 " 1 2 13 15
389 numtries=100
390 i=$numtries
391 while test $i -gt 0; do
392 # mkdir is a portable test-and-set.
393 if mkdir "$lockdir" 2>/dev/null; then
394 # This process acquired the lock.
395 "$@" -MD
396 stat=$?
397 # Release the lock.
398 rmdir "$lockdir"
399 break
400 else
401 # If the lock is being held by a different process, wait
402 # until the winning process is done or we timeout.
403 while test -d "$lockdir" && test $i -gt 0; do
404 sleep 1
405 i=`expr $i - 1`
406 done
407 fi
408 i=`expr $i - 1`
409 done
410 trap - 1 2 13 15
411 if test $i -le 0; then
412 echo "$0: failed to acquire lock after $numtries attempts" >&2
413 echo "$0: check lockdir '$lockdir'" >&2
414 exit 1
415 fi
416
417 if test $stat -ne 0; then
418 rm -f "$tmpdepfile"
419 exit $stat
420 fi
421 rm -f "$depfile"
422 # Each line is of the form `foo.o: dependent.h',
423 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
424 # Do two passes, one to just change these to
425 # `$object: dependent.h' and one to simply `dependent.h:'.
426 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
427 # Some versions of the HPUX 10.20 sed can't process this invocation
428 # correctly. Breaking it into two sed invocations is a workaround.
429 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
430 | sed -e 's/$/ :/' >> "$depfile"
431 rm -f "$tmpdepfile"
432 ;;
433
434 hp2)
435 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
436 # compilers, which have integrated preprocessors. The correct option
437 # to use with these is +Maked; it writes dependencies to a file named
438 # 'foo.d', which lands next to the object file, wherever that
439 # happens to be.
440 # Much of this is similar to the tru64 case; see comments there.
441 set_dir_from "$object"
442 set_base_from "$object"
443 if test "$libtool" = yes; then
444 tmpdepfile1=$dir$base.d
445 tmpdepfile2=$dir.libs/$base.d
446 "$@" -Wc,+Maked
447 else
448 tmpdepfile1=$dir$base.d
449 tmpdepfile2=$dir$base.d
450 "$@" +Maked
451 fi
452 stat=$?
453 if test $stat -ne 0; then
454 rm -f "$tmpdepfile1" "$tmpdepfile2"
455 exit $stat
456 fi
457
458 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
459 do
460 test -f "$tmpdepfile" && break
461 done
462 if test -f "$tmpdepfile"; then
463 sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
464 # Add 'dependent.h:' lines.
465 sed -ne '2,${
466 s/^ *//
467 s/ \\*$//
468 s/$/:/
469 p
470 }' "$tmpdepfile" >> "$depfile"
471 else
472 make_dummy_depfile
473 fi
474 rm -f "$tmpdepfile" "$tmpdepfile2"
475 ;;
476
477 tru64)
478 # The Tru64 compiler uses -MD to generate dependencies as a side
479 # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
480 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
481 # dependencies in 'foo.d' instead, so we check for that too.
482 # Subdirectories are respected.
483 set_dir_from "$object"
484 set_base_from "$object"
485
486 if test "$libtool" = yes; then
487 # Libtool generates 2 separate objects for the 2 libraries. These
488 # two compilations output dependencies in $dir.libs/$base.o.d and
489 # in $dir$base.o.d. We have to check for both files, because
490 # one of the two compilations can be disabled. We should prefer
491 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
492 # automatically cleaned when .libs/ is deleted, while ignoring
493 # the former would cause a distcleancheck panic.
494 tmpdepfile1=$dir$base.o.d # libtool 1.5
495 tmpdepfile2=$dir.libs/$base.o.d # Likewise.
496 tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
497 "$@" -Wc,-MD
498 else
499 tmpdepfile1=$dir$base.d
500 tmpdepfile2=$dir$base.d
501 tmpdepfile3=$dir$base.d
502 "$@" -MD
503 fi
504
505 stat=$?
506 if test $stat -ne 0; then
507 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
508 exit $stat
509 fi
510
511 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
512 do
513 test -f "$tmpdepfile" && break
514 done
515 # Same post-processing that is required for AIX mode.
516 aix_post_process_depfile
517 ;;
518
519 msvc7)
520 if test "$libtool" = yes; then
521 showIncludes=-Wc,-showIncludes
522 else
523 showIncludes=-showIncludes
524 fi
525 "$@" $showIncludes > "$tmpdepfile"
526 stat=$?
527 grep -v '^Note: including file: ' "$tmpdepfile"
528 if test $stat -ne 0; then
529 rm -f "$tmpdepfile"
530 exit $stat
531 fi
532 rm -f "$depfile"
533 echo "$object : \\" > "$depfile"
534 # The first sed program below extracts the file names and escapes
535 # backslashes for cygpath. The second sed program outputs the file
536 # name when reading, but also accumulates all include files in the
537 # hold buffer in order to output them again at the end. This only
538 # works with sed implementations that can handle large buffers.
539 sed < "$tmpdepfile" -n '
540 /^Note: including file: *\(.*\)/ {
541 s//\1/
542 s/\\/\\\\/g
543 p
544 }' | $cygpath_u | sort -u | sed -n '
545 s/ /\\ /g
546 s/\(.*\)/'"$tab"'\1 \\/p
547 s/.\(.*\) \\/\1:/
548 H
549 $ {
550 s/.*/'"$tab"'/
551 G
552 p
553 }' >> "$depfile"
554 echo >> "$depfile" # make sure the fragment doesn't end with a backslash
555 rm -f "$tmpdepfile"
556 ;;
557
558 msvc7msys)
559 # This case exists only to let depend.m4 do its work. It works by
560 # looking at the text of this script. This case will never be run,
561 # since it is checked for above.
562 exit 1
563 ;;
564
565 #nosideeffect)
566 # This comment above is used by automake to tell side-effect
567 # dependency tracking mechanisms from slower ones.
568
569 dashmstdout)
570 # Important note: in order to support this mode, a compiler *must*
571 # always write the preprocessed file to stdout, regardless of -o.
572 "$@" || exit $?
573
574 # Remove the call to Libtool.
575 if test "$libtool" = yes; then
576 while test "X$1" != 'X--mode=compile'; do
577 shift
578 done
579 shift
580 fi
581
582 # Remove '-o $object'.
583 IFS=" "
584 for arg
585 do
586 case $arg in
587 -o)
588 shift
589 ;;
590 $object)
591 shift
592 ;;
593 *)
594 set fnord "$@" "$arg"
595 shift # fnord
596 shift # $arg
597 ;;
598 esac
599 done
600
601 test -z "$dashmflag" && dashmflag=-M
602 # Require at least two characters before searching for ':'
603 # in the target name. This is to cope with DOS-style filenames:
604 # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
605 "$@" $dashmflag |
606 sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
607 rm -f "$depfile"
608 cat < "$tmpdepfile" > "$depfile"
609 # Some versions of the HPUX 10.20 sed can't process this sed invocation
610 # correctly. Breaking it into two sed invocations is a workaround.
611 tr ' ' "$nl" < "$tmpdepfile" \
612 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
613 | sed -e 's/$/ :/' >> "$depfile"
614 rm -f "$tmpdepfile"
615 ;;
616
617 dashXmstdout)
618 # This case only exists to satisfy depend.m4. It is never actually
619 # run, as this mode is specially recognized in the preamble.
620 exit 1
621 ;;
622
623 makedepend)
624 "$@" || exit $?
625 # Remove any Libtool call
626 if test "$libtool" = yes; then
627 while test "X$1" != 'X--mode=compile'; do
628 shift
629 done
630 shift
631 fi
632 # X makedepend
633 shift
634 cleared=no eat=no
635 for arg
636 do
637 case $cleared in
638 no)
639 set ""; shift
640 cleared=yes ;;
641 esac
642 if test $eat = yes; then
643 eat=no
644 continue
645 fi
646 case "$arg" in
647 -D*|-I*)
648 set fnord "$@" "$arg"; shift ;;
649 # Strip any option that makedepend may not understand. Remove
650 # the object too, otherwise makedepend will parse it as a source file.
651 -arch)
652 eat=yes ;;
653 -*|$object)
654 ;;
655 *)
656 set fnord "$@" "$arg"; shift ;;
657 esac
658 done
659 obj_suffix=`echo "$object" | sed 's/^.*\././'`
660 touch "$tmpdepfile"
661 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
662 rm -f "$depfile"
663 # makedepend may prepend the VPATH from the source file name to the object.
664 # No need to regex-escape $object, excess matching of '.' is harmless.
665 sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
666 # Some versions of the HPUX 10.20 sed can't process the last invocation
667 # correctly. Breaking it into two sed invocations is a workaround.
668 sed '1,2d' "$tmpdepfile" \
669 | tr ' ' "$nl" \
670 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
671 | sed -e 's/$/ :/' >> "$depfile"
672 rm -f "$tmpdepfile" "$tmpdepfile".bak
673 ;;
674
675 cpp)
676 # Important note: in order to support this mode, a compiler *must*
677 # always write the preprocessed file to stdout.
678 "$@" || exit $?
679
680 # Remove the call to Libtool.
681 if test "$libtool" = yes; then
682 while test "X$1" != 'X--mode=compile'; do
683 shift
684 done
685 shift
686 fi
687
688 # Remove '-o $object'.
689 IFS=" "
690 for arg
691 do
692 case $arg in
693 -o)
694 shift
695 ;;
696 $object)
697 shift
698 ;;
699 *)
700 set fnord "$@" "$arg"
701 shift # fnord
702 shift # $arg
703 ;;
704 esac
705 done
706
707 "$@" -E \
708 | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
709 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
710 | sed '$ s: \\$::' > "$tmpdepfile"
711 rm -f "$depfile"
712 echo "$object : \\" > "$depfile"
713 cat < "$tmpdepfile" >> "$depfile"
714 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
715 rm -f "$tmpdepfile"
716 ;;
717
718 msvisualcpp)
719 # Important note: in order to support this mode, a compiler *must*
720 # always write the preprocessed file to stdout.
721 "$@" || exit $?
722
723 # Remove the call to Libtool.
724 if test "$libtool" = yes; then
725 while test "X$1" != 'X--mode=compile'; do
726 shift
727 done
728 shift
729 fi
730
731 IFS=" "
732 for arg
733 do
734 case "$arg" in
735 -o)
736 shift
737 ;;
738 $object)
739 shift
740 ;;
741 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
742 set fnord "$@"
743 shift
744 shift
745 ;;
746 *)
747 set fnord "$@" "$arg"
748 shift
749 shift
750 ;;
751 esac
752 done
753 "$@" -E 2>/dev/null |
754 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
755 rm -f "$depfile"
756 echo "$object : \\" > "$depfile"
757 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
758 echo "$tab" >> "$depfile"
759 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
760 rm -f "$tmpdepfile"
761 ;;
762
763 msvcmsys)
764 # This case exists only to let depend.m4 do its work. It works by
765 # looking at the text of this script. This case will never be run,
766 # since it is checked for above.
767 exit 1
768 ;;
769
770 none)
771 exec "$@"
772 ;;
773
774 *)
775 echo "Unknown depmode $depmode" 1>&2
776 exit 1
777 ;;
778 esac
779
780 exit 0
781
782 # Local Variables:
783 # mode: shell-script
784 # sh-indentation: 2
785 # eval: (add-hook 'write-file-hooks 'time-stamp)
786 # time-stamp-start: "scriptversion="
787 # time-stamp-format: "%:y-%02m-%02d.%02H"
788 # time-stamp-time-zone: "UTC"
789 # time-stamp-end: "; # UTC"
790 # End:
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: filter.c,v 1.13 2004/02/17 02:26:43 rob Exp $
19 */
20
21 # ifdef HAVE_CONFIG_H
22 # include "config.h"
23 # endif
24
25 # include "global.h"
26
27 # include <stdlib.h>
28 # include <stdio.h>
29 # include <mad.h>
30
31 # include "filter.h"
32 # include "player.h"
33
34 /*
35 * NAME: filter->init()
36 * DESCRIPTION: initialize a new filter
37 */
38 void filter_init(struct filter *filter,
39 filter_func_t *func, void *data, struct filter *chain)
40 {
41 filter->flags = 0;
42 filter->func = func;
43 filter->data = data;
44 filter->chain = chain;
45 }
46
47 /*
48 * NAME: filter->new()
49 * DESCRIPTION: allocate a new filter object and chain it to another
50 */
51 struct filter *filter_new(filter_func_t *func, void *data,
52 struct filter *chain)
53 {
54 struct filter *filter;
55
56 filter = malloc(sizeof(*filter));
57 if (filter) {
58 filter_init(filter, func, data, chain);
59 filter->flags |= FILTER_FLAG_DMEM;
60 }
61
62 return filter;
63 }
64
65 /*
66 * NAME: filter->free()
67 * DESCRIPTION: deallocate a filter object chain
68 */
69 void filter_free(struct filter *filter)
70 {
71 while (filter) {
72 struct filter *chain;
73
74 chain = filter->chain;
75
76 if (filter->flags & FILTER_FLAG_DMEM)
77 free(filter);
78 else
79 filter->chain = 0;
80
81 filter = chain;
82 }
83 }
84
85 /*
86 * NAME: filter->run()
87 * DESCRIPTION: execute a filter chain
88 */
89 enum mad_flow filter_run(struct filter *filter, struct mad_frame *frame)
90 {
91 while (filter) {
92 enum mad_flow result;
93
94 result = filter->func(filter->data, frame);
95 if (result != MAD_FLOW_CONTINUE)
96 return result;
97
98 filter = filter->chain;
99 }
100
101 return MAD_FLOW_CONTINUE;
102 }
103
104 /* --- Filters ------------------------------------------------------------- */
105
106 /*
107 * NAME: gain_filter()
108 * DESCRIPTION: perform attenuation or amplification
109 */
110 enum mad_flow gain_filter(void *data, struct mad_frame *frame)
111 {
112 register mad_fixed_t gain = *(mad_fixed_t *) data;
113
114 if (gain != MAD_F_ONE) {
115 unsigned int nch, ch, ns, s, sb;
116
117 nch = MAD_NCHANNELS(&frame->header);
118 ns = MAD_NSBSAMPLES(&frame->header);
119
120 for (ch = 0; ch < nch; ++ch) {
121 for (s = 0; s < ns; ++s) {
122 for (sb = 0; sb < 32; ++sb) {
123 frame->sbsample[ch][s][sb] =
124 mad_f_mul(frame->sbsample[ch][s][sb], gain);
125 }
126 }
127 }
128 }
129
130 return MAD_FLOW_CONTINUE;
131 }
132
133 # if 0
134 /*
135 * NAME: limit_filter()
136 * DESCRIPTION: limiting filter
137 */
138 enum mad_flow limit_filter(void *data, struct mad_frame *frame)
139 {
140 struct player *player = data;
141 unsigned int nch, ch, ns, s, sb;
142
143 nch = MAD_NCHANNELS(&frame->header);
144 ns = MAD_NSBSAMPLES(&frame->header);
145
146 for (ch = 0; ch < nch; ++ch) {
147 for (s = 0; s < ns; ++s) {
148 for (sb = 0; sb < 32; ++sb) {
149 frame->sbsample[ch][s][sb];
150 }
151 }
152 }
153
154 return MAD_FLOW_CONTINUE;
155 }
156 # endif
157
158 /*
159 * NAME: fadein_filter()
160 * DESCRIPTION: fade-in filter
161 */
162 enum mad_flow fadein_filter(void *data, struct mad_frame *frame)
163 {
164 struct player *player = data;
165
166 if (mad_timer_compare(player->stats.play_timer, player->fade_in) < 0) {
167 mad_timer_t frame_start, frame_end, ratio;
168 unsigned int nch, nsamples, s;
169 mad_fixed_t step, scalefactor;
170
171 /*
172 * Fade-in processing may occur over the entire frame, or it may end
173 * somewhere within the frame. Find out where processing should end.
174 */
175
176 nsamples = MAD_NSBSAMPLES(&frame->header);
177
178 /* this frame has not yet been added to play_timer */
179
180 frame_start = frame_end = player->stats.play_timer;
181 mad_timer_add(&frame_end, frame->header.duration);
182
183 if (mad_timer_compare(player->fade_in, frame_end) < 0) {
184 mad_timer_t length;
185
186 length = frame_start;
187
188 mad_timer_negate(&length);
189 mad_timer_add(&length, player->fade_in);
190
191 mad_timer_set(&ratio, 0,
192 mad_timer_count(length, frame->header.samplerate),
193 mad_timer_count(frame->header.duration,
194 frame->header.samplerate));
195
196 nsamples = mad_timer_fraction(ratio, nsamples);
197 }
198
199 /* determine starting scalefactor and step size */
200
201 mad_timer_set(&ratio, 0,
202 mad_timer_count(frame_start, frame->header.samplerate),
203 mad_timer_count(player->fade_in, frame->header.samplerate));
204
205 scalefactor = mad_timer_fraction(ratio, MAD_F_ONE);
206 step = MAD_F_ONE / (mad_timer_count(player->fade_in,
207 frame->header.samplerate) / 32);
208
209 /* scale subband samples */
210
211 nch = MAD_NCHANNELS(&frame->header);
212
213 for (s = 0; s < nsamples; ++s) {
214 unsigned int ch, sb;
215
216 for (ch = 0; ch < nch; ++ch) {
217 for (sb = 0; sb < 32; ++sb) {
218 frame->sbsample[ch][s][sb] =
219 mad_f_mul(frame->sbsample[ch][s][sb], scalefactor);
220 }
221 }
222
223 scalefactor += step;
224 }
225 }
226
227 return MAD_FLOW_CONTINUE;
228 }
229
230 # if defined(EXPERIMENTAL)
231 /*
232 * NAME: mixer_filter()
233 * DESCRIPTION: pre-empt decoding by dumping frame to independent mixer
234 */
235 enum mad_flow mixer_filter(void *data, struct mad_frame *frame)
236 {
237 FILE *dest = data;
238
239 if (fwrite(frame, sizeof(*frame), 1, dest) != 1)
240 return MAD_FLOW_BREAK;
241
242 return MAD_FLOW_IGNORE;
243 }
244
245 /*
246 * NAME: experimental_filter()
247 * DESCRIPTION: experimental filter
248 */
249 enum mad_flow experimental_filter(void *data, struct mad_frame *frame)
250 {
251 if (frame->header.mode == MAD_MODE_STEREO ||
252 frame->header.mode == MAD_MODE_JOINT_STEREO) {
253 unsigned int ns, s, sb;
254
255 ns = MAD_NSBSAMPLES(&frame->header);
256
257 /* enhance stereo separation */
258
259 for (s = 0; s < ns; ++s) {
260 for (sb = 0; sb < 32; ++sb) {
261 mad_fixed_t left, right;
262
263 left = frame->sbsample[0][s][sb];
264 right = frame->sbsample[1][s][sb];
265
266 frame->sbsample[0][s][sb] -= right / 4;
267 frame->sbsample[1][s][sb] -= left / 4;
268 }
269 }
270 }
271
272 return MAD_FLOW_CONTINUE;
273 }
274 # endif
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: filter.h,v 1.10 2004/02/17 02:26:43 rob Exp $
19 */
20
21 # ifndef FILTER_H
22 # define FILTER_H
23
24 # include <mad.h>
25
26 typedef enum mad_flow filter_func_t(void *, struct mad_frame *);
27
28 struct filter {
29 int flags;
30 filter_func_t *func;
31 void *data;
32 struct filter *chain;
33 };
34
35 enum {
36 FILTER_FLAG_DMEM = 0x0001
37 };
38
39 void filter_init(struct filter *, filter_func_t *, void *, struct filter *);
40
41 # define filter_finish(filter) /* nothing */
42
43 struct filter *filter_new(filter_func_t *, void *, struct filter *);
44 void filter_free(struct filter *);
45
46 enum mad_flow filter_run(struct filter *, struct mad_frame *);
47
48 /* filter function prototypes */
49
50 filter_func_t gain_filter; /* mad_fixed_t *data */
51 filter_func_t limit_filter; /* struct player *data */
52 filter_func_t mono_filter; /* void *data */
53 filter_func_t fadein_filter; /* struct player *data */
54
55 # if defined(EXPERIMENTAL)
56 filter_func_t mixer_filter; /* FILE *data */
57 filter_func_t experimental_filter; /* void *data */
58 # endif
59
60 # endif
0 /* Convenience header for conditional use of GNU <libintl.h>.
1 Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
2
3 This program is free software; you can redistribute it and/or modify it
4 under the terms of the GNU Library General Public License as published
5 by the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public
14 License along with this program; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 USA. */
17
18 #ifndef _LIBGETTEXT_H
19 #define _LIBGETTEXT_H 1
20
21 /* NLS can be disabled through the configure --disable-nls option. */
22 #if ENABLE_NLS
23
24 /* Get declarations of GNU message catalog functions. */
25 # include <libintl.h>
26
27 #else
28
29 /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
30 chokes if dcgettext is defined as a macro. So include it now, to make
31 later inclusions of <locale.h> a NOP. We don't include <libintl.h>
32 as well because people using "gettext.h" will not include <libintl.h>,
33 and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
34 is OK. */
35 #if defined(__sun)
36 # include <locale.h>
37 #endif
38
39 /* Disabled NLS.
40 The casts to 'const char *' serve the purpose of producing warnings
41 for invalid uses of the value returned from these functions.
42 On pre-ANSI systems without 'const', the config.h file is supposed to
43 contain "#define const". */
44 # define gettext(Msgid) ((const char *) (Msgid))
45 # define dgettext(Domainname, Msgid) ((const char *) (Msgid))
46 # define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
47 # define ngettext(Msgid1, Msgid2, N) \
48 ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
49 # define dngettext(Domainname, Msgid1, Msgid2, N) \
50 ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
51 # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
52 ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
53 # define textdomain(Domainname) ((const char *) (Domainname))
54 # define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
55 # define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
56
57 #endif
58
59 /* A pseudo function call that serves as a marker for the automated
60 extraction of messages, but does not call gettext(). The run-time
61 translation is done at a different place in the code.
62 The argument, String, should be a literal string. Concatenated strings
63 and other string expressions won't work.
64 The macro's expansion is not parenthesized, so that it is suitable as
65 initializer for static 'char[]' or 'const char[]' variables. */
66 #define gettext_noop(String) String
67
68 #endif /* _LIBGETTEXT_H */
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: global.h,v 1.13 2004/01/23 09:41:31 rob Exp $
19 */
20
21 # ifndef GLOBAL_H
22 # define GLOBAL_H
23
24 /* conditional debugging */
25
26 # if defined(DEBUG) && defined(NDEBUG)
27 # error "cannot define both DEBUG and NDEBUG"
28 # endif
29
30 # if defined(DEBUG)
31 # include <stdio.h>
32 # endif
33
34 /* conditional features */
35
36 # if defined(HAVE_MMAP) && !defined(USE_MMAP)
37 # undef HAVE_MMAP
38 # endif
39
40 # if defined(HAVE_TERMIOS_H) || defined(_WIN32)
41 # define USE_TTY
42 # endif
43
44 # if !defined(HAVE_UNISTD_H)
45 signed long read(int, void *, unsigned long count);
46 signed long lseek(int, signed long, int);
47 int open(char const *, int, ...);
48 int close(int);
49
50 # if 0
51 # define isatty(x) ((x) == STDIN_FILENO)
52 # endif
53
54 # define S_ISREG(x) (((x) & S_IFREG) == S_IFREG)
55
56 # define STDIN_FILENO 0
57 # define STDOUT_FILENO 1
58
59 # define SEEK_CUR 1
60 # endif
61
62 # if !defined(HAVE_ASSERT_H)
63 # if defined(NDEBUG)
64 # define assert(x) /* nothing */
65 # else
66 # define assert(x) do { if (!(x)) abort(); } while (0)
67 # endif
68 # endif
69
70 /* conditional replacement function prototypes */
71
72 # if !defined(HAVE_STRCASECMP)
73 int strcasecmp(char const *, char const *);
74 # endif
75
76 # if !defined(HAVE_STRNCASECMP)
77 int strncasecmp(char const *, char const *, unsigned long);
78 # endif
79
80 /* natural language support */
81
82 # define _(text) gettext(text)
83 # define N_(text) gettext_noop(text)
84
85 # endif
0 #!/bin/sh
1 #
2 # install - install a program, script, or datafile
3 # This comes from X11R5 (mit/util/scripts/install.sh).
4 #
5 # Copyright 1991 by the Massachusetts Institute of Technology
6 #
7 # Permission to use, copy, modify, distribute, and sell this software and its
8 # documentation for any purpose is hereby granted without fee, provided that
9 # the above copyright notice appear in all copies and that both that
10 # copyright notice and this permission notice appear in supporting
11 # documentation, and that the name of M.I.T. not be used in advertising or
12 # publicity pertaining to distribution of the software without specific,
13 # written prior permission. M.I.T. makes no representations about the
14 # suitability of this software for any purpose. It is provided "as is"
15 # without express or implied warranty.
16 #
17 # Calling this script install-sh is preferred over install.sh, to prevent
18 # `make' implicit rules from creating a file called install from it
19 # when there is no Makefile.
20 #
21 # This script is compatible with the BSD install script, but was written
22 # from scratch. It can only install one file at a time, a restriction
23 # shared with many OS's install programs.
24
25
26 # set DOITPROG to echo to test this script
27
28 # Don't use :- since 4.3BSD and earlier shells don't like it.
29 doit="${DOITPROG-}"
30
31
32 # put in absolute paths if you don't have them in your path; or use env. vars.
33
34 mvprog="${MVPROG-mv}"
35 cpprog="${CPPROG-cp}"
36 chmodprog="${CHMODPROG-chmod}"
37 chownprog="${CHOWNPROG-chown}"
38 chgrpprog="${CHGRPPROG-chgrp}"
39 stripprog="${STRIPPROG-strip}"
40 rmprog="${RMPROG-rm}"
41 mkdirprog="${MKDIRPROG-mkdir}"
42
43 transformbasename=""
44 transform_arg=""
45 instcmd="$mvprog"
46 chmodcmd="$chmodprog 0755"
47 chowncmd=""
48 chgrpcmd=""
49 stripcmd=""
50 rmcmd="$rmprog -f"
51 mvcmd="$mvprog"
52 src=""
53 dst=""
54 dir_arg=""
55
56 while [ x"$1" != x ]; do
57 case $1 in
58 -c) instcmd=$cpprog
59 shift
60 continue;;
61
62 -d) dir_arg=true
63 shift
64 continue;;
65
66 -m) chmodcmd="$chmodprog $2"
67 shift
68 shift
69 continue;;
70
71 -o) chowncmd="$chownprog $2"
72 shift
73 shift
74 continue;;
75
76 -g) chgrpcmd="$chgrpprog $2"
77 shift
78 shift
79 continue;;
80
81 -s) stripcmd=$stripprog
82 shift
83 continue;;
84
85 -t=*) transformarg=`echo $1 | sed 's/-t=//'`
86 shift
87 continue;;
88
89 -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
90 shift
91 continue;;
92
93 *) if [ x"$src" = x ]
94 then
95 src=$1
96 else
97 # this colon is to work around a 386BSD /bin/sh bug
98 :
99 dst=$1
100 fi
101 shift
102 continue;;
103 esac
104 done
105
106 if [ x"$src" = x ]
107 then
108 echo "$0: no input file specified" >&2
109 exit 1
110 else
111 :
112 fi
113
114 if [ x"$dir_arg" != x ]; then
115 dst=$src
116 src=""
117
118 if [ -d "$dst" ]; then
119 instcmd=:
120 chmodcmd=""
121 else
122 instcmd=$mkdirprog
123 fi
124 else
125
126 # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
127 # might cause directories to be created, which would be especially bad
128 # if $src (and thus $dsttmp) contains '*'.
129
130 if [ -f "$src" ] || [ -d "$src" ]
131 then
132 :
133 else
134 echo "$0: $src does not exist" >&2
135 exit 1
136 fi
137
138 if [ x"$dst" = x ]
139 then
140 echo "$0: no destination specified" >&2
141 exit 1
142 else
143 :
144 fi
145
146 # If destination is a directory, append the input filename; if your system
147 # does not like double slashes in filenames, you may need to add some logic
148
149 if [ -d "$dst" ]
150 then
151 dst=$dst/`basename "$src"`
152 else
153 :
154 fi
155 fi
156
157 ## this sed command emulates the dirname command
158 dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
159
160 # Make sure that the destination directory exists.
161 # this part is taken from Noah Friedman's mkinstalldirs script
162
163 # Skip lots of stat calls in the usual case.
164 if [ ! -d "$dstdir" ]; then
165 defaultIFS='
166 '
167 IFS="${IFS-$defaultIFS}"
168
169 oIFS=$IFS
170 # Some sh's can't handle IFS=/ for some reason.
171 IFS='%'
172 set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
173 IFS=$oIFS
174
175 pathcomp=''
176
177 while [ $# -ne 0 ] ; do
178 pathcomp=$pathcomp$1
179 shift
180
181 if [ ! -d "$pathcomp" ] ;
182 then
183 $mkdirprog "$pathcomp"
184 else
185 :
186 fi
187
188 pathcomp=$pathcomp/
189 done
190 fi
191
192 if [ x"$dir_arg" != x ]
193 then
194 $doit $instcmd "$dst" &&
195
196 if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
197 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
198 if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
199 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
200 else
201
202 # If we're going to rename the final executable, determine the name now.
203
204 if [ x"$transformarg" = x ]
205 then
206 dstfile=`basename "$dst"`
207 else
208 dstfile=`basename "$dst" $transformbasename |
209 sed $transformarg`$transformbasename
210 fi
211
212 # don't allow the sed command to completely eliminate the filename
213
214 if [ x"$dstfile" = x ]
215 then
216 dstfile=`basename "$dst"`
217 else
218 :
219 fi
220
221 # Make a couple of temp file names in the proper directory.
222
223 dsttmp=$dstdir/#inst.$$#
224 rmtmp=$dstdir/#rm.$$#
225
226 # Trap to clean up temp files at exit.
227
228 trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
229 trap '(exit $?); exit' 1 2 13 15
230
231 # Move or copy the file name to the temp name
232
233 $doit $instcmd "$src" "$dsttmp" &&
234
235 # and set any options; do chmod last to preserve setuid bits
236
237 # If any of these fail, we abort the whole thing. If we want to
238 # ignore errors from any of these, just make sure not to ignore
239 # errors from the above "$doit $instcmd $src $dsttmp" command.
240
241 if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
242 if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
243 if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
244 if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
245
246 # Now remove or move aside any old file at destination location. We try this
247 # two ways since rm can't unlink itself on some systems and the destination
248 # file might be busy for other reasons. In this case, the final cleanup
249 # might fail but the new file should still install successfully.
250
251 {
252 if [ -f "$dstdir/$dstfile" ]
253 then
254 $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
255 $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
256 {
257 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
258 (exit 1); exit
259 }
260 else
261 :
262 fi
263 } &&
264
265 # Now rename the file to the real destination.
266
267 $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
268
269 fi &&
270
271 # The final little trick to "correctly" pass the exit status to the exit trap.
272
273 {
274 (exit 0); exit
275 }
0 2004-02-16 gettextize <bug-gnu-gettext@gnu.org>
1
2 * po.m4: Upgrade to gettext-0.14.1.
3
4 2004-01-23 gettextize <bug-gnu-gettext@gnu.org>
5
6 * gettext.m4: Upgrade to gettext-0.13.1.
7 * intmax.m4: New file, from gettext-0.13.1.
8 * lib-ld.m4: Upgrade to gettext-0.13.1.
9 * lib-prefix.m4: Upgrade to gettext-0.13.1.
10 * longdouble.m4: New file, from gettext-0.13.1.
11 * longlong.m4: New file, from gettext-0.13.1.
12 * po.m4: Upgrade to gettext-0.13.1.
13 * printf-posix.m4: New file, from gettext-0.13.1.
14 * signed.m4: New file, from gettext-0.13.1.
15 * size_max.m4: New file, from gettext-0.13.1.
16 * ulonglong.m4: Upgrade to gettext-0.13.1.
17 * wchar_t.m4: New file, from gettext-0.13.1.
18 * wint_t.m4: New file, from gettext-0.13.1.
19 * xsize.m4: New file, from gettext-0.13.1.
20 * Makefile.am (EXTRA_DIST): Add the new files.
21
22 2003-09-15 gettextize <bug-gnu-gettext@gnu.org>
23
24 * gettext.m4: Upgrade to gettext-0.12.1.
25 * inttypes_h.m4: Upgrade to gettext-0.12.1.
26 * lib-ld.m4: Upgrade to gettext-0.12.1.
27 * lib-link.m4: Upgrade to gettext-0.12.1.
28 * lib-prefix.m4: Upgrade to gettext-0.12.1.
29 * nls.m4: New file, from gettext-0.12.1.
30 * po.m4: New file, from gettext-0.12.1.
31 * progtest.m4: Upgrade to gettext-0.12.1.
32 * stdint_h.m4: Upgrade to gettext-0.12.1.
33 * uintmax_t.m4: Upgrade to gettext-0.12.1.
34 * Makefile.am (EXTRA_DIST): Add the new files.
35
0 # Makefile.in generated by automake 1.15 from Makefile.am.
1 # m4/Makefile. Generated from Makefile.in by configure.
2
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14
15
16 am__is_gnu_make = { \
17 if test -z '$(MAKELEVEL)'; then \
18 false; \
19 elif test -n '$(MAKE_HOST)'; then \
20 true; \
21 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
22 true; \
23 else \
24 false; \
25 fi; \
26 }
27 am__make_running_with_option = \
28 case $${target_option-} in \
29 ?) ;; \
30 *) echo "am__make_running_with_option: internal error: invalid" \
31 "target option '$${target_option-}' specified" >&2; \
32 exit 1;; \
33 esac; \
34 has_opt=no; \
35 sane_makeflags=$$MAKEFLAGS; \
36 if $(am__is_gnu_make); then \
37 sane_makeflags=$$MFLAGS; \
38 else \
39 case $$MAKEFLAGS in \
40 *\\[\ \ ]*) \
41 bs=\\; \
42 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
43 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
44 esac; \
45 fi; \
46 skip_next=no; \
47 strip_trailopt () \
48 { \
49 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
50 }; \
51 for flg in $$sane_makeflags; do \
52 test $$skip_next = yes && { skip_next=no; continue; }; \
53 case $$flg in \
54 *=*|--*) continue;; \
55 -*I) strip_trailopt 'I'; skip_next=yes;; \
56 -*I?*) strip_trailopt 'I';; \
57 -*O) strip_trailopt 'O'; skip_next=yes;; \
58 -*O?*) strip_trailopt 'O';; \
59 -*l) strip_trailopt 'l'; skip_next=yes;; \
60 -*l?*) strip_trailopt 'l';; \
61 -[dEDm]) skip_next=yes;; \
62 -[JT]) skip_next=yes;; \
63 esac; \
64 case $$flg in \
65 *$$target_option*) has_opt=yes; break;; \
66 esac; \
67 done; \
68 test $$has_opt = yes
69 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
70 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
71 pkgdatadir = $(datadir)/madtest
72 pkgincludedir = $(includedir)/madtest
73 pkglibdir = $(libdir)/madtest
74 pkglibexecdir = $(libexecdir)/madtest
75 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
76 install_sh_DATA = $(install_sh) -c -m 644
77 install_sh_PROGRAM = $(install_sh) -c
78 install_sh_SCRIPT = $(install_sh) -c
79 INSTALL_HEADER = $(INSTALL_DATA)
80 transform = $(program_transform_name)
81 NORMAL_INSTALL = :
82 PRE_INSTALL = :
83 POST_INSTALL = :
84 NORMAL_UNINSTALL = :
85 PRE_UNINSTALL = :
86 POST_UNINSTALL = :
87 build_triplet = x86_64-pc-linux-gnu
88 host_triplet = x86_64-pc-linux-gnu
89 subdir = m4
90 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
91 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
92 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
93 $(ACLOCAL_M4)
94 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
95 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
96 CONFIG_HEADER = $(top_builddir)/config.h
97 CONFIG_CLEAN_FILES =
98 CONFIG_CLEAN_VPATH_FILES =
99 AM_V_P = $(am__v_P_$(V))
100 am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
101 am__v_P_0 = false
102 am__v_P_1 = :
103 AM_V_GEN = $(am__v_GEN_$(V))
104 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
105 am__v_GEN_0 = @echo " GEN " $@;
106 am__v_GEN_1 =
107 AM_V_at = $(am__v_at_$(V))
108 am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
109 am__v_at_0 = @
110 am__v_at_1 =
111 SOURCES =
112 DIST_SOURCES =
113 am__can_run_installinfo = \
114 case $$AM_UPDATE_INFO_DIR in \
115 n|no|NO) false;; \
116 *) (install-info --version) >/dev/null 2>&1;; \
117 esac
118 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
119 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs \
120 ChangeLog
121 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
122 ACLOCAL = ${SHELL} /home/jos/src/own_stuff/daisy-player/src/madplay/missing aclocal-1.15
123 ALLOCA =
124 AMTAR = $${TAR-tar}
125 AM_DEFAULT_VERBOSITY = 1
126 AUTOCONF = ${SHELL} /home/jos/src/own_stuff/daisy-player/src/madplay/missing autoconf
127 AUTOHEADER = ${SHELL} /home/jos/src/own_stuff/daisy-player/src/madplay/missing autoheader
128 AUTOMAKE = ${SHELL} /home/jos/src/own_stuff/daisy-player/src/madplay/missing automake-1.15
129 AWK = gawk
130 CC = gcc
131 CCDEPMODE = depmode=gcc3
132 CFLAGS = -g -O2
133 CPP = gcc -E
134 CPPFLAGS =
135 CXX = g++
136 CXXDEPMODE = depmode=gcc3
137 CXXFLAGS = -g -O2
138 CYGPATH_W = echo
139 DEFS = -DHAVE_CONFIG_H
140 DEPDIR = .deps
141 ECHO_C =
142 ECHO_N = -n
143 ECHO_T =
144 EGREP = /bin/grep -E
145 EXEEXT =
146 GREP = /bin/grep
147 INSTALL = /usr/bin/install -c
148 INSTALL_DATA = ${INSTALL} -m 644
149 INSTALL_PROGRAM = ${INSTALL}
150 INSTALL_SCRIPT = ${INSTALL}
151 INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
152 LDFLAGS =
153 LIBOBJS =
154 LIBS = -lm
155 LN_S = ln -s
156 LTLIBOBJS =
157 MAKEINFO = ${SHELL} /home/jos/src/own_stuff/daisy-player/src/madplay/missing makeinfo
158 MKDIR_P = /bin/mkdir -p
159 OBJEXT = o
160 PACKAGE = madtest
161 PACKAGE_BUGREPORT = rob@mars.org
162 PACKAGE_NAME = MPEG audio decoder and player
163 PACKAGE_STRING = MPEG audio decoder and player 0.15.2b
164 PACKAGE_TARNAME = madtest
165 PACKAGE_URL =
166 PACKAGE_VERSION = 0.15.2b
167 PATH_SEPARATOR = :
168 POW_LIB =
169 SET_MAKE =
170 SHELL = /bin/bash
171 STRIP =
172 VERSION = 0.15.2b
173 YACC = bison -y
174 YFLAGS =
175 abs_builddir = /home/jos/src/own_stuff/daisy-player/src/madplay/m4
176 abs_srcdir = /home/jos/src/own_stuff/daisy-player/src/madplay/m4
177 abs_top_builddir = /home/jos/src/own_stuff/daisy-player/src/madplay
178 abs_top_srcdir = /home/jos/src/own_stuff/daisy-player/src/madplay
179 ac_ct_CC = gcc
180 ac_ct_CXX = g++
181 am__include = include
182 am__leading_dot = .
183 am__quote =
184 am__tar = $${TAR-tar} chof - "$$tardir"
185 am__untar = $${TAR-tar} xf -
186 bindir = ${exec_prefix}/bin
187 build = x86_64-pc-linux-gnu
188 build_alias =
189 build_cpu = x86_64
190 build_os = linux-gnu
191 build_vendor = pc
192 builddir = .
193 datadir = ${datarootdir}
194 datarootdir = ${prefix}/share
195 depend_audio =
196 docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
197 dvidir = ${docdir}
198 exec_prefix = ${prefix}
199 host = x86_64-pc-linux-gnu
200 host_alias =
201 host_cpu = x86_64
202 host_os = linux-gnu
203 host_vendor = pc
204 htmldir = ${docdir}
205 includedir = ${prefix}/include
206 infodir = ${datarootdir}/info
207 install_sh = ${SHELL} /home/jos/src/own_stuff/daisy-player/src/madplay/install-sh
208 ldadd_audio =
209 libdir = ${exec_prefix}/lib
210 libexecdir = ${exec_prefix}/libexec
211 localedir = ${datarootdir}/locale
212 localstatedir = ${prefix}/var
213 mandir = ${datarootdir}/man
214 mkdir_p = $(MKDIR_P)
215 oldincludedir = /usr/include
216 pdfdir = ${docdir}
217 prefix = /usr/local
218 program_transform_name = s,x,x,
219 psdir = ${docdir}
220 runstatedir = ${localstatedir}/run
221 sbindir = ${exec_prefix}/sbin
222 sharedstatedir = ${prefix}/com
223 srcdir = .
224 sysconfdir = ${prefix}/etc
225 target_alias =
226 top_build_prefix = ../
227 top_builddir = ..
228 top_srcdir = ..
229 EXTRA_DIST = intmax.m4 longdouble.m4 longlong.m4 printf-posix.m4 \
230 signed.m4 size_max.m4 wchar_t.m4 wint_t.m4 xsize.m4 \
231 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 \
232 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4 \
233 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 \
234 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4
235
236 all: all-am
237
238 .SUFFIXES:
239 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
240 @for dep in $?; do \
241 case '$(am__configure_deps)' in \
242 *$$dep*) \
243 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
244 && { if test -f $@; then exit 0; else break; fi; }; \
245 exit 1;; \
246 esac; \
247 done; \
248 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \
249 $(am__cd) $(top_srcdir) && \
250 $(AUTOMAKE) --gnu m4/Makefile
251 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
252 @case '$?' in \
253 *config.status*) \
254 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
255 *) \
256 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
257 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
258 esac;
259
260 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
261 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
262
263 $(top_srcdir)/configure: $(am__configure_deps)
264 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
265 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
266 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
267 $(am__aclocal_m4_deps):
268 tags TAGS:
269
270 ctags CTAGS:
271
272 cscope cscopelist:
273
274
275 distdir: $(DISTFILES)
276 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
277 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
278 list='$(DISTFILES)'; \
279 dist_files=`for file in $$list; do echo $$file; done | \
280 sed -e "s|^$$srcdirstrip/||;t" \
281 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
282 case $$dist_files in \
283 */*) $(MKDIR_P) `echo "$$dist_files" | \
284 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
285 sort -u` ;; \
286 esac; \
287 for file in $$dist_files; do \
288 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
289 if test -d $$d/$$file; then \
290 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
291 if test -d "$(distdir)/$$file"; then \
292 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
293 fi; \
294 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
295 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
296 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
297 fi; \
298 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
299 else \
300 test -f "$(distdir)/$$file" \
301 || cp -p $$d/$$file "$(distdir)/$$file" \
302 || exit 1; \
303 fi; \
304 done
305 check-am: all-am
306 check: check-am
307 all-am: Makefile
308 installdirs:
309 install: install-am
310 install-exec: install-exec-am
311 install-data: install-data-am
312 uninstall: uninstall-am
313
314 install-am: all-am
315 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
316
317 installcheck: installcheck-am
318 install-strip:
319 if test -z '$(STRIP)'; then \
320 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
321 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
322 install; \
323 else \
324 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
325 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
326 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
327 fi
328 mostlyclean-generic:
329
330 clean-generic:
331
332 distclean-generic:
333 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
334 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
335
336 maintainer-clean-generic:
337 @echo "This command is intended for maintainers to use"
338 @echo "it deletes files that may require special tools to rebuild."
339 clean: clean-am
340
341 clean-am: clean-generic mostlyclean-am
342
343 distclean: distclean-am
344 -rm -f Makefile
345 distclean-am: clean-am distclean-generic
346
347 dvi: dvi-am
348
349 dvi-am:
350
351 html: html-am
352
353 html-am:
354
355 info: info-am
356
357 info-am:
358
359 install-data-am:
360
361 install-dvi: install-dvi-am
362
363 install-dvi-am:
364
365 install-exec-am:
366
367 install-html: install-html-am
368
369 install-html-am:
370
371 install-info: install-info-am
372
373 install-info-am:
374
375 install-man:
376
377 install-pdf: install-pdf-am
378
379 install-pdf-am:
380
381 install-ps: install-ps-am
382
383 install-ps-am:
384
385 installcheck-am:
386
387 maintainer-clean: maintainer-clean-am
388 -rm -f Makefile
389 maintainer-clean-am: distclean-am maintainer-clean-generic
390
391 mostlyclean: mostlyclean-am
392
393 mostlyclean-am: mostlyclean-generic
394
395 pdf: pdf-am
396
397 pdf-am:
398
399 ps: ps-am
400
401 ps-am:
402
403 uninstall-am:
404
405 .MAKE: install-am install-strip
406
407 .PHONY: all all-am check check-am clean clean-generic cscopelist-am \
408 ctags-am distclean distclean-generic distdir dvi dvi-am html \
409 html-am info info-am install install-am install-data \
410 install-data-am install-dvi install-dvi-am install-exec \
411 install-exec-am install-html install-html-am install-info \
412 install-info-am install-man install-pdf install-pdf-am \
413 install-ps install-ps-am install-strip installcheck \
414 installcheck-am installdirs maintainer-clean \
415 maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
416 pdf-am ps ps-am tags-am uninstall uninstall-am
417
418 .PRECIOUS: Makefile
419
420
421 # Tell versions [3.59,3.63) of GNU make to not export all variables.
422 # Otherwise a system limit (for SysV at least) may be exceeded.
423 .NOEXPORT:
0 ## madplay - MPEG audio decoder and player
1 ## Copyright (C) 2000-2003 Robert Leslie
2 ##
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 2 of the License, or
6 ## (at your option) any later version.
7 ##
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12 ##
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program; if not, write to the Free Software
15 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 ##
17 ## If you would like to negotiate alternate licensing terms, you may do
18 ## so by contacting the author: Robert Leslie <rob@mars.org>
19 ##
20 ## $Id: Makefile.am,v 1.5 2004/01/23 09:26:59 rob Exp $
21 ##
22
23 ## Process this file with automake to produce Makefile.in
24
25 EXTRA_DIST = intmax.m4 longdouble.m4 longlong.m4 printf-posix.m4 \
26 signed.m4 size_max.m4 wchar_t.m4 wint_t.m4 xsize.m4 \
27 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 \
28 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4 \
29 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 \
30 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4
0 # Makefile.in generated by automake 1.15 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15 VPATH = @srcdir@
16 am__is_gnu_make = { \
17 if test -z '$(MAKELEVEL)'; then \
18 false; \
19 elif test -n '$(MAKE_HOST)'; then \
20 true; \
21 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
22 true; \
23 else \
24 false; \
25 fi; \
26 }
27 am__make_running_with_option = \
28 case $${target_option-} in \
29 ?) ;; \
30 *) echo "am__make_running_with_option: internal error: invalid" \
31 "target option '$${target_option-}' specified" >&2; \
32 exit 1;; \
33 esac; \
34 has_opt=no; \
35 sane_makeflags=$$MAKEFLAGS; \
36 if $(am__is_gnu_make); then \
37 sane_makeflags=$$MFLAGS; \
38 else \
39 case $$MAKEFLAGS in \
40 *\\[\ \ ]*) \
41 bs=\\; \
42 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
43 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
44 esac; \
45 fi; \
46 skip_next=no; \
47 strip_trailopt () \
48 { \
49 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
50 }; \
51 for flg in $$sane_makeflags; do \
52 test $$skip_next = yes && { skip_next=no; continue; }; \
53 case $$flg in \
54 *=*|--*) continue;; \
55 -*I) strip_trailopt 'I'; skip_next=yes;; \
56 -*I?*) strip_trailopt 'I';; \
57 -*O) strip_trailopt 'O'; skip_next=yes;; \
58 -*O?*) strip_trailopt 'O';; \
59 -*l) strip_trailopt 'l'; skip_next=yes;; \
60 -*l?*) strip_trailopt 'l';; \
61 -[dEDm]) skip_next=yes;; \
62 -[JT]) skip_next=yes;; \
63 esac; \
64 case $$flg in \
65 *$$target_option*) has_opt=yes; break;; \
66 esac; \
67 done; \
68 test $$has_opt = yes
69 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
70 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
71 pkgdatadir = $(datadir)/@PACKAGE@
72 pkgincludedir = $(includedir)/@PACKAGE@
73 pkglibdir = $(libdir)/@PACKAGE@
74 pkglibexecdir = $(libexecdir)/@PACKAGE@
75 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
76 install_sh_DATA = $(install_sh) -c -m 644
77 install_sh_PROGRAM = $(install_sh) -c
78 install_sh_SCRIPT = $(install_sh) -c
79 INSTALL_HEADER = $(INSTALL_DATA)
80 transform = $(program_transform_name)
81 NORMAL_INSTALL = :
82 PRE_INSTALL = :
83 POST_INSTALL = :
84 NORMAL_UNINSTALL = :
85 PRE_UNINSTALL = :
86 POST_UNINSTALL = :
87 build_triplet = @build@
88 host_triplet = @host@
89 subdir = m4
90 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
91 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
92 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
93 $(ACLOCAL_M4)
94 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
95 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
96 CONFIG_HEADER = $(top_builddir)/config.h
97 CONFIG_CLEAN_FILES =
98 CONFIG_CLEAN_VPATH_FILES =
99 AM_V_P = $(am__v_P_@AM_V@)
100 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
101 am__v_P_0 = false
102 am__v_P_1 = :
103 AM_V_GEN = $(am__v_GEN_@AM_V@)
104 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
105 am__v_GEN_0 = @echo " GEN " $@;
106 am__v_GEN_1 =
107 AM_V_at = $(am__v_at_@AM_V@)
108 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
109 am__v_at_0 = @
110 am__v_at_1 =
111 SOURCES =
112 DIST_SOURCES =
113 am__can_run_installinfo = \
114 case $$AM_UPDATE_INFO_DIR in \
115 n|no|NO) false;; \
116 *) (install-info --version) >/dev/null 2>&1;; \
117 esac
118 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
119 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs \
120 ChangeLog
121 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
122 ACLOCAL = @ACLOCAL@
123 ALLOCA = @ALLOCA@
124 AMTAR = @AMTAR@
125 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
126 AUTOCONF = @AUTOCONF@
127 AUTOHEADER = @AUTOHEADER@
128 AUTOMAKE = @AUTOMAKE@
129 AWK = @AWK@
130 CC = @CC@
131 CCDEPMODE = @CCDEPMODE@
132 CFLAGS = @CFLAGS@
133 CPP = @CPP@
134 CPPFLAGS = @CPPFLAGS@
135 CXX = @CXX@
136 CXXDEPMODE = @CXXDEPMODE@
137 CXXFLAGS = @CXXFLAGS@
138 CYGPATH_W = @CYGPATH_W@
139 DEFS = @DEFS@
140 DEPDIR = @DEPDIR@
141 ECHO_C = @ECHO_C@
142 ECHO_N = @ECHO_N@
143 ECHO_T = @ECHO_T@
144 EGREP = @EGREP@
145 EXEEXT = @EXEEXT@
146 GREP = @GREP@
147 INSTALL = @INSTALL@
148 INSTALL_DATA = @INSTALL_DATA@
149 INSTALL_PROGRAM = @INSTALL_PROGRAM@
150 INSTALL_SCRIPT = @INSTALL_SCRIPT@
151 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
152 LDFLAGS = @LDFLAGS@
153 LIBOBJS = @LIBOBJS@
154 LIBS = @LIBS@
155 LN_S = @LN_S@
156 LTLIBOBJS = @LTLIBOBJS@
157 MAKEINFO = @MAKEINFO@
158 MKDIR_P = @MKDIR_P@
159 OBJEXT = @OBJEXT@
160 PACKAGE = @PACKAGE@
161 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
162 PACKAGE_NAME = @PACKAGE_NAME@
163 PACKAGE_STRING = @PACKAGE_STRING@
164 PACKAGE_TARNAME = @PACKAGE_TARNAME@
165 PACKAGE_URL = @PACKAGE_URL@
166 PACKAGE_VERSION = @PACKAGE_VERSION@
167 PATH_SEPARATOR = @PATH_SEPARATOR@
168 POW_LIB = @POW_LIB@
169 SET_MAKE = @SET_MAKE@
170 SHELL = @SHELL@
171 STRIP = @STRIP@
172 VERSION = @VERSION@
173 YACC = @YACC@
174 YFLAGS = @YFLAGS@
175 abs_builddir = @abs_builddir@
176 abs_srcdir = @abs_srcdir@
177 abs_top_builddir = @abs_top_builddir@
178 abs_top_srcdir = @abs_top_srcdir@
179 ac_ct_CC = @ac_ct_CC@
180 ac_ct_CXX = @ac_ct_CXX@
181 am__include = @am__include@
182 am__leading_dot = @am__leading_dot@
183 am__quote = @am__quote@
184 am__tar = @am__tar@
185 am__untar = @am__untar@
186 bindir = @bindir@
187 build = @build@
188 build_alias = @build_alias@
189 build_cpu = @build_cpu@
190 build_os = @build_os@
191 build_vendor = @build_vendor@
192 builddir = @builddir@
193 datadir = @datadir@
194 datarootdir = @datarootdir@
195 depend_audio = @depend_audio@
196 docdir = @docdir@
197 dvidir = @dvidir@
198 exec_prefix = @exec_prefix@
199 host = @host@
200 host_alias = @host_alias@
201 host_cpu = @host_cpu@
202 host_os = @host_os@
203 host_vendor = @host_vendor@
204 htmldir = @htmldir@
205 includedir = @includedir@
206 infodir = @infodir@
207 install_sh = @install_sh@
208 ldadd_audio = @ldadd_audio@
209 libdir = @libdir@
210 libexecdir = @libexecdir@
211 localedir = @localedir@
212 localstatedir = @localstatedir@
213 mandir = @mandir@
214 mkdir_p = @mkdir_p@
215 oldincludedir = @oldincludedir@
216 pdfdir = @pdfdir@
217 prefix = @prefix@
218 program_transform_name = @program_transform_name@
219 psdir = @psdir@
220 runstatedir = @runstatedir@
221 sbindir = @sbindir@
222 sharedstatedir = @sharedstatedir@
223 srcdir = @srcdir@
224 sysconfdir = @sysconfdir@
225 target_alias = @target_alias@
226 top_build_prefix = @top_build_prefix@
227 top_builddir = @top_builddir@
228 top_srcdir = @top_srcdir@
229 EXTRA_DIST = intmax.m4 longdouble.m4 longlong.m4 printf-posix.m4 \
230 signed.m4 size_max.m4 wchar_t.m4 wint_t.m4 xsize.m4 \
231 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 \
232 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4 \
233 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 \
234 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4
235
236 all: all-am
237
238 .SUFFIXES:
239 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
240 @for dep in $?; do \
241 case '$(am__configure_deps)' in \
242 *$$dep*) \
243 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
244 && { if test -f $@; then exit 0; else break; fi; }; \
245 exit 1;; \
246 esac; \
247 done; \
248 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \
249 $(am__cd) $(top_srcdir) && \
250 $(AUTOMAKE) --gnu m4/Makefile
251 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
252 @case '$?' in \
253 *config.status*) \
254 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
255 *) \
256 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
257 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
258 esac;
259
260 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
261 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
262
263 $(top_srcdir)/configure: $(am__configure_deps)
264 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
265 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
266 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
267 $(am__aclocal_m4_deps):
268 tags TAGS:
269
270 ctags CTAGS:
271
272 cscope cscopelist:
273
274
275 distdir: $(DISTFILES)
276 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
277 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
278 list='$(DISTFILES)'; \
279 dist_files=`for file in $$list; do echo $$file; done | \
280 sed -e "s|^$$srcdirstrip/||;t" \
281 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
282 case $$dist_files in \
283 */*) $(MKDIR_P) `echo "$$dist_files" | \
284 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
285 sort -u` ;; \
286 esac; \
287 for file in $$dist_files; do \
288 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
289 if test -d $$d/$$file; then \
290 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
291 if test -d "$(distdir)/$$file"; then \
292 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
293 fi; \
294 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
295 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
296 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
297 fi; \
298 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
299 else \
300 test -f "$(distdir)/$$file" \
301 || cp -p $$d/$$file "$(distdir)/$$file" \
302 || exit 1; \
303 fi; \
304 done
305 check-am: all-am
306 check: check-am
307 all-am: Makefile
308 installdirs:
309 install: install-am
310 install-exec: install-exec-am
311 install-data: install-data-am
312 uninstall: uninstall-am
313
314 install-am: all-am
315 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
316
317 installcheck: installcheck-am
318 install-strip:
319 if test -z '$(STRIP)'; then \
320 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
321 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
322 install; \
323 else \
324 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
325 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
326 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
327 fi
328 mostlyclean-generic:
329
330 clean-generic:
331
332 distclean-generic:
333 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
334 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
335
336 maintainer-clean-generic:
337 @echo "This command is intended for maintainers to use"
338 @echo "it deletes files that may require special tools to rebuild."
339 clean: clean-am
340
341 clean-am: clean-generic mostlyclean-am
342
343 distclean: distclean-am
344 -rm -f Makefile
345 distclean-am: clean-am distclean-generic
346
347 dvi: dvi-am
348
349 dvi-am:
350
351 html: html-am
352
353 html-am:
354
355 info: info-am
356
357 info-am:
358
359 install-data-am:
360
361 install-dvi: install-dvi-am
362
363 install-dvi-am:
364
365 install-exec-am:
366
367 install-html: install-html-am
368
369 install-html-am:
370
371 install-info: install-info-am
372
373 install-info-am:
374
375 install-man:
376
377 install-pdf: install-pdf-am
378
379 install-pdf-am:
380
381 install-ps: install-ps-am
382
383 install-ps-am:
384
385 installcheck-am:
386
387 maintainer-clean: maintainer-clean-am
388 -rm -f Makefile
389 maintainer-clean-am: distclean-am maintainer-clean-generic
390
391 mostlyclean: mostlyclean-am
392
393 mostlyclean-am: mostlyclean-generic
394
395 pdf: pdf-am
396
397 pdf-am:
398
399 ps: ps-am
400
401 ps-am:
402
403 uninstall-am:
404
405 .MAKE: install-am install-strip
406
407 .PHONY: all all-am check check-am clean clean-generic cscopelist-am \
408 ctags-am distclean distclean-generic distdir dvi dvi-am html \
409 html-am info info-am install install-am install-data \
410 install-data-am install-dvi install-dvi-am install-exec \
411 install-exec-am install-html install-html-am install-info \
412 install-info-am install-man install-pdf install-pdf-am \
413 install-ps install-ps-am install-strip installcheck \
414 installcheck-am installdirs maintainer-clean \
415 maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
416 pdf-am ps ps-am tags-am uninstall uninstall-am
417
418 .PRECIOUS: Makefile
419
420
421 # Tell versions [3.59,3.63) of GNU make to not export all variables.
422 # Otherwise a system limit (for SysV at least) may be exceeded.
423 .NOEXPORT:
0 # codeset.m4 serial AM1 (gettext-0.10.40)
1 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Bruno Haible.
9
10 AC_DEFUN([AM_LANGINFO_CODESET],
11 [
12 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
13 [AC_TRY_LINK([#include <langinfo.h>],
14 [char* cs = nl_langinfo(CODESET);],
15 am_cv_langinfo_codeset=yes,
16 am_cv_langinfo_codeset=no)
17 ])
18 if test $am_cv_langinfo_codeset = yes; then
19 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
20 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
21 fi
22 ])
0 # gettext.m4 serial 28 (gettext-0.13)
1 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7 dnl
8 dnl This file can can be used in projects which are not available under
9 dnl the GNU General Public License or the GNU Library General Public
10 dnl License but which still want to provide support for the GNU gettext
11 dnl functionality.
12 dnl Please note that the actual code of the GNU gettext library is covered
13 dnl by the GNU Library General Public License, and the rest of the GNU
14 dnl gettext package package is covered by the GNU General Public License.
15 dnl They are *not* in the public domain.
16
17 dnl Authors:
18 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
19 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
20
21 dnl Macro to add for using GNU gettext.
22
23 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
24 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
25 dnl default (if it is not specified or empty) is 'no-libtool'.
26 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
27 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
28 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
29 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
30 dnl depending on --{enable,disable}-{shared,static} and on the presence of
31 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
32 dnl $(top_builddir)/intl/libintl.a will be created.
33 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
34 dnl implementations (in libc or libintl) without the ngettext() function
35 dnl will be ignored. If NEEDSYMBOL is specified and is
36 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
37 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
38 dnl INTLDIR is used to find the intl libraries. If empty,
39 dnl the value `$(top_builddir)/intl/' is used.
40 dnl
41 dnl The result of the configuration is one of three cases:
42 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
43 dnl and used.
44 dnl Catalog format: GNU --> install in $(datadir)
45 dnl Catalog extension: .mo after installation, .gmo in source tree
46 dnl 2) GNU gettext has been found in the system's C library.
47 dnl Catalog format: GNU --> install in $(datadir)
48 dnl Catalog extension: .mo after installation, .gmo in source tree
49 dnl 3) No internationalization, always use English msgid.
50 dnl Catalog format: none
51 dnl Catalog extension: none
52 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
53 dnl The use of .gmo is historical (it was needed to avoid overwriting the
54 dnl GNU format catalogs when building on a platform with an X/Open gettext),
55 dnl but we keep it in order not to force irrelevant filename changes on the
56 dnl maintainers.
57 dnl
58 AC_DEFUN([AM_GNU_GETTEXT],
59 [
60 dnl Argument checking.
61 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
62 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
63 ])])])])])
64 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
65 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
66 ])])])])
67 define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
68 define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
69
70 AC_REQUIRE([AM_PO_SUBDIRS])dnl
71 ifelse(gt_included_intl, yes, [
72 AC_REQUIRE([AM_INTL_SUBDIR])dnl
73 ])
74
75 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
76 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
77 AC_REQUIRE([AC_LIB_RPATH])
78
79 dnl Sometimes libintl requires libiconv, so first search for libiconv.
80 dnl Ideally we would do this search only after the
81 dnl if test "$USE_NLS" = "yes"; then
82 dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
83 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
84 dnl the configure script would need to contain the same shell code
85 dnl again, outside any 'if'. There are two solutions:
86 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
87 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
88 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
89 dnl documented, we avoid it.
90 ifelse(gt_included_intl, yes, , [
91 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
92 ])
93
94 dnl Set USE_NLS.
95 AM_NLS
96
97 ifelse(gt_included_intl, yes, [
98 BUILD_INCLUDED_LIBINTL=no
99 USE_INCLUDED_LIBINTL=no
100 ])
101 LIBINTL=
102 LTLIBINTL=
103 POSUB=
104
105 dnl If we use NLS figure out what method
106 if test "$USE_NLS" = "yes"; then
107 gt_use_preinstalled_gnugettext=no
108 ifelse(gt_included_intl, yes, [
109 AC_MSG_CHECKING([whether included gettext is requested])
110 AC_ARG_WITH(included-gettext,
111 [ --with-included-gettext use the GNU gettext library included here],
112 nls_cv_force_use_gnu_gettext=$withval,
113 nls_cv_force_use_gnu_gettext=no)
114 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
115
116 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
117 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
118 ])
119 dnl User does not insist on using GNU NLS library. Figure out what
120 dnl to use. If GNU gettext is available we use this. Else we have
121 dnl to fall back to GNU NLS library.
122
123 dnl Add a version number to the cache macros.
124 define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
125 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
126 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
127
128 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
129 [AC_TRY_LINK([#include <libintl.h>
130 ]ifelse([$2], [need-formatstring-macros],
131 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
132 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
133 #endif
134 changequote(,)dnl
135 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
136 changequote([,])dnl
137 ], [])[extern int _nl_msg_cat_cntr;
138 extern int *_nl_domain_bindings;],
139 [bindtextdomain ("", "");
140 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
141 gt_cv_func_gnugettext_libc=yes,
142 gt_cv_func_gnugettext_libc=no)])
143
144 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
145 dnl Sometimes libintl requires libiconv, so first search for libiconv.
146 ifelse(gt_included_intl, yes, , [
147 AM_ICONV_LINK
148 ])
149 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
150 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
151 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
152 dnl even if libiconv doesn't exist.
153 AC_LIB_LINKFLAGS_BODY([intl])
154 AC_CACHE_CHECK([for GNU gettext in libintl],
155 gt_cv_func_gnugettext_libintl,
156 [gt_save_CPPFLAGS="$CPPFLAGS"
157 CPPFLAGS="$CPPFLAGS $INCINTL"
158 gt_save_LIBS="$LIBS"
159 LIBS="$LIBS $LIBINTL"
160 dnl Now see whether libintl exists and does not depend on libiconv.
161 AC_TRY_LINK([#include <libintl.h>
162 ]ifelse([$2], [need-formatstring-macros],
163 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
164 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
165 #endif
166 changequote(,)dnl
167 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
168 changequote([,])dnl
169 ], [])[extern int _nl_msg_cat_cntr;
170 extern
171 #ifdef __cplusplus
172 "C"
173 #endif
174 const char *_nl_expand_alias ();],
175 [bindtextdomain ("", "");
176 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
177 gt_cv_func_gnugettext_libintl=yes,
178 gt_cv_func_gnugettext_libintl=no)
179 dnl Now see whether libintl exists and depends on libiconv.
180 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
181 LIBS="$LIBS $LIBICONV"
182 AC_TRY_LINK([#include <libintl.h>
183 ]ifelse([$2], [need-formatstring-macros],
184 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
185 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
186 #endif
187 changequote(,)dnl
188 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
189 changequote([,])dnl
190 ], [])[extern int _nl_msg_cat_cntr;
191 extern
192 #ifdef __cplusplus
193 "C"
194 #endif
195 const char *_nl_expand_alias ();],
196 [bindtextdomain ("", "");
197 return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
198 [LIBINTL="$LIBINTL $LIBICONV"
199 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
200 gt_cv_func_gnugettext_libintl=yes
201 ])
202 fi
203 CPPFLAGS="$gt_save_CPPFLAGS"
204 LIBS="$gt_save_LIBS"])
205 fi
206
207 dnl If an already present or preinstalled GNU gettext() is found,
208 dnl use it. But if this macro is used in GNU gettext, and GNU
209 dnl gettext is already preinstalled in libintl, we update this
210 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
211 if test "$gt_cv_func_gnugettext_libc" = "yes" \
212 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
213 && test "$PACKAGE" != gettext-runtime \
214 && test "$PACKAGE" != gettext-tools; }; then
215 gt_use_preinstalled_gnugettext=yes
216 else
217 dnl Reset the values set by searching for libintl.
218 LIBINTL=
219 LTLIBINTL=
220 INCINTL=
221 fi
222
223 ifelse(gt_included_intl, yes, [
224 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
225 dnl GNU gettext is not found in the C library.
226 dnl Fall back on included GNU gettext library.
227 nls_cv_use_gnu_gettext=yes
228 fi
229 fi
230
231 if test "$nls_cv_use_gnu_gettext" = "yes"; then
232 dnl Mark actions used to generate GNU NLS library.
233 BUILD_INCLUDED_LIBINTL=yes
234 USE_INCLUDED_LIBINTL=yes
235 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
236 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
237 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
238 fi
239
240 if test "$gt_use_preinstalled_gnugettext" = "yes" \
241 || test "$nls_cv_use_gnu_gettext" = "yes"; then
242 dnl Mark actions to use GNU gettext tools.
243 CATOBJEXT=.gmo
244 fi
245 ])
246
247 if test "$gt_use_preinstalled_gnugettext" = "yes" \
248 || test "$nls_cv_use_gnu_gettext" = "yes"; then
249 AC_DEFINE(ENABLE_NLS, 1,
250 [Define to 1 if translation of program messages to the user's native language
251 is requested.])
252 else
253 USE_NLS=no
254 fi
255 fi
256
257 AC_MSG_CHECKING([whether to use NLS])
258 AC_MSG_RESULT([$USE_NLS])
259 if test "$USE_NLS" = "yes"; then
260 AC_MSG_CHECKING([where the gettext function comes from])
261 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
262 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
263 gt_source="external libintl"
264 else
265 gt_source="libc"
266 fi
267 else
268 gt_source="included intl directory"
269 fi
270 AC_MSG_RESULT([$gt_source])
271 fi
272
273 if test "$USE_NLS" = "yes"; then
274
275 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
276 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
277 AC_MSG_CHECKING([how to link with libintl])
278 AC_MSG_RESULT([$LIBINTL])
279 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
280 fi
281
282 dnl For backward compatibility. Some packages may be using this.
283 AC_DEFINE(HAVE_GETTEXT, 1,
284 [Define if the GNU gettext() function is already present or preinstalled.])
285 AC_DEFINE(HAVE_DCGETTEXT, 1,
286 [Define if the GNU dcgettext() function is already present or preinstalled.])
287 fi
288
289 dnl We need to process the po/ directory.
290 POSUB=po
291 fi
292
293 ifelse(gt_included_intl, yes, [
294 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
295 dnl to 'yes' because some of the testsuite requires it.
296 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
297 BUILD_INCLUDED_LIBINTL=yes
298 fi
299
300 dnl Make all variables we use known to autoconf.
301 AC_SUBST(BUILD_INCLUDED_LIBINTL)
302 AC_SUBST(USE_INCLUDED_LIBINTL)
303 AC_SUBST(CATOBJEXT)
304
305 dnl For backward compatibility. Some configure.ins may be using this.
306 nls_cv_header_intl=
307 nls_cv_header_libgt=
308
309 dnl For backward compatibility. Some Makefiles may be using this.
310 DATADIRNAME=share
311 AC_SUBST(DATADIRNAME)
312
313 dnl For backward compatibility. Some Makefiles may be using this.
314 INSTOBJEXT=.mo
315 AC_SUBST(INSTOBJEXT)
316
317 dnl For backward compatibility. Some Makefiles may be using this.
318 GENCAT=gencat
319 AC_SUBST(GENCAT)
320
321 dnl For backward compatibility. Some Makefiles may be using this.
322 if test "$USE_INCLUDED_LIBINTL" = yes; then
323 INTLOBJS="\$(GETTOBJS)"
324 fi
325 AC_SUBST(INTLOBJS)
326
327 dnl Enable libtool support if the surrounding package wishes it.
328 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
329 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
330 ])
331
332 dnl For backward compatibility. Some Makefiles may be using this.
333 INTLLIBS="$LIBINTL"
334 AC_SUBST(INTLLIBS)
335
336 dnl Make all documented variables known to autoconf.
337 AC_SUBST(LIBINTL)
338 AC_SUBST(LTLIBINTL)
339 AC_SUBST(POSUB)
340 ])
341
342
343 dnl Checks for all prerequisites of the intl subdirectory,
344 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
345 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
346 AC_DEFUN([AM_INTL_SUBDIR],
347 [
348 AC_REQUIRE([AC_PROG_INSTALL])dnl
349 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
350 AC_REQUIRE([AC_PROG_CC])dnl
351 AC_REQUIRE([AC_CANONICAL_HOST])dnl
352 AC_REQUIRE([AC_PROG_RANLIB])dnl
353 AC_REQUIRE([AC_ISC_POSIX])dnl
354 AC_REQUIRE([AC_HEADER_STDC])dnl
355 AC_REQUIRE([AC_C_CONST])dnl
356 AC_REQUIRE([bh_C_SIGNED])dnl
357 AC_REQUIRE([AC_C_INLINE])dnl
358 AC_REQUIRE([AC_TYPE_OFF_T])dnl
359 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
360 AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl
361 AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
362 AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
363 AC_REQUIRE([gt_TYPE_WINT_T])dnl
364 AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
365 AC_REQUIRE([jm_AC_HEADER_STDINT_H])
366 AC_REQUIRE([gt_TYPE_INTMAX_T])
367 AC_REQUIRE([gt_PRINTF_POSIX])
368 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
369 AC_REQUIRE([AC_FUNC_MMAP])dnl
370 AC_REQUIRE([jm_GLIBC21])dnl
371 AC_REQUIRE([gt_INTDIV0])dnl
372 AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
373 AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
374 AC_REQUIRE([gt_INTTYPES_PRI])dnl
375 AC_REQUIRE([gl_XSIZE])dnl
376
377 AC_CHECK_TYPE([ptrdiff_t], ,
378 [AC_DEFINE([ptrdiff_t], [long],
379 [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
380 ])
381 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
382 stdlib.h string.h unistd.h sys/param.h])
383 AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
384 mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
385 strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
386 __fsetlocking])
387
388 dnl Use the _snprintf function only if it is declared (because on NetBSD it
389 dnl is defined as a weak alias of snprintf; we prefer to use the latter).
390 gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
391 gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
392
393 dnl Use the *_unlocked functions only if they are declared.
394 dnl (because some of them were defined without being declared in Solaris
395 dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
396 dnl on Solaris 2.5.1 to run on Solaris 2.6).
397 dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
398 gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
399 gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
400 gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
401
402 case $gt_cv_func_printf_posix in
403 *yes) HAVE_POSIX_PRINTF=1 ;;
404 *) HAVE_POSIX_PRINTF=0 ;;
405 esac
406 AC_SUBST([HAVE_POSIX_PRINTF])
407 if test "$ac_cv_func_asprintf" = yes; then
408 HAVE_ASPRINTF=1
409 else
410 HAVE_ASPRINTF=0
411 fi
412 AC_SUBST([HAVE_ASPRINTF])
413 if test "$ac_cv_func_snprintf" = yes; then
414 HAVE_SNPRINTF=1
415 else
416 HAVE_SNPRINTF=0
417 fi
418 AC_SUBST([HAVE_SNPRINTF])
419 if test "$ac_cv_func_wprintf" = yes; then
420 HAVE_WPRINTF=1
421 else
422 HAVE_WPRINTF=0
423 fi
424 AC_SUBST([HAVE_WPRINTF])
425
426 AM_ICONV
427 AM_LANGINFO_CODESET
428 if test $ac_cv_header_locale_h = yes; then
429 AM_LC_MESSAGES
430 fi
431
432 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
433 dnl because plural.y uses bison specific features. It requires at least
434 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
435 dnl compile.
436 dnl bison is only needed for the maintainer (who touches plural.y). But in
437 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
438 dnl the rule in general Makefile. Now, some people carelessly touch the
439 dnl files or have a broken "make" program, hence the plural.c rule will
440 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
441 dnl present or too old.
442 AC_CHECK_PROGS([INTLBISON], [bison])
443 if test -z "$INTLBISON"; then
444 ac_verc_fail=yes
445 else
446 dnl Found it, now check the version.
447 AC_MSG_CHECKING([version of bison])
448 changequote(<<,>>)dnl
449 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
450 case $ac_prog_version in
451 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
452 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
453 changequote([,])dnl
454 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
455 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
456 esac
457 AC_MSG_RESULT([$ac_prog_version])
458 fi
459 if test $ac_verc_fail = yes; then
460 INTLBISON=:
461 fi
462 ])
463
464
465 dnl gt_CHECK_DECL(FUNC, INCLUDES)
466 dnl Check whether a function is declared.
467 AC_DEFUN([gt_CHECK_DECL],
468 [
469 AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
470 [AC_TRY_COMPILE([$2], [
471 #ifndef $1
472 char *p = (char *) $1;
473 #endif
474 ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
475 if test $ac_cv_have_decl_$1 = yes; then
476 gt_value=1
477 else
478 gt_value=0
479 fi
480 AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
481 [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
482 ])
483
484
485 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
486 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
0 # glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
1 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 # Test for the GNU C Library, version 2.1 or newer.
9 # From Bruno Haible.
10
11 AC_DEFUN([jm_GLIBC21],
12 [
13 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
14 ac_cv_gnu_library_2_1,
15 [AC_EGREP_CPP([Lucky GNU user],
16 [
17 #include <features.h>
18 #ifdef __GNU_LIBRARY__
19 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
20 Lucky GNU user
21 #endif
22 #endif
23 ],
24 ac_cv_gnu_library_2_1=yes,
25 ac_cv_gnu_library_2_1=no)
26 ]
27 )
28 AC_SUBST(GLIBC21)
29 GLIBC21="$ac_cv_gnu_library_2_1"
30 ]
31 )
0 # iconv.m4 serial AM4 (gettext-0.11.3)
1 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Bruno Haible.
9
10 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
11 [
12 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
13 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
14 AC_REQUIRE([AC_LIB_RPATH])
15
16 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
17 dnl accordingly.
18 AC_LIB_LINKFLAGS_BODY([iconv])
19 ])
20
21 AC_DEFUN([AM_ICONV_LINK],
22 [
23 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
24 dnl those with the standalone portable GNU libiconv installed).
25
26 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
27 dnl accordingly.
28 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
29
30 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
31 dnl because if the user has installed libiconv and not disabled its use
32 dnl via --without-libiconv-prefix, he wants to use it. The first
33 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
34 am_save_CPPFLAGS="$CPPFLAGS"
35 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
36
37 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
38 am_cv_func_iconv="no, consider installing GNU libiconv"
39 am_cv_lib_iconv=no
40 AC_TRY_LINK([#include <stdlib.h>
41 #include <iconv.h>],
42 [iconv_t cd = iconv_open("","");
43 iconv(cd,NULL,NULL,NULL,NULL);
44 iconv_close(cd);],
45 am_cv_func_iconv=yes)
46 if test "$am_cv_func_iconv" != yes; then
47 am_save_LIBS="$LIBS"
48 LIBS="$LIBS $LIBICONV"
49 AC_TRY_LINK([#include <stdlib.h>
50 #include <iconv.h>],
51 [iconv_t cd = iconv_open("","");
52 iconv(cd,NULL,NULL,NULL,NULL);
53 iconv_close(cd);],
54 am_cv_lib_iconv=yes
55 am_cv_func_iconv=yes)
56 LIBS="$am_save_LIBS"
57 fi
58 ])
59 if test "$am_cv_func_iconv" = yes; then
60 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
61 fi
62 if test "$am_cv_lib_iconv" = yes; then
63 AC_MSG_CHECKING([how to link with libiconv])
64 AC_MSG_RESULT([$LIBICONV])
65 else
66 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
67 dnl either.
68 CPPFLAGS="$am_save_CPPFLAGS"
69 LIBICONV=
70 LTLIBICONV=
71 fi
72 AC_SUBST(LIBICONV)
73 AC_SUBST(LTLIBICONV)
74 ])
75
76 AC_DEFUN([AM_ICONV],
77 [
78 AM_ICONV_LINK
79 if test "$am_cv_func_iconv" = yes; then
80 AC_MSG_CHECKING([for iconv declaration])
81 AC_CACHE_VAL(am_cv_proto_iconv, [
82 AC_TRY_COMPILE([
83 #include <stdlib.h>
84 #include <iconv.h>
85 extern
86 #ifdef __cplusplus
87 "C"
88 #endif
89 #if defined(__STDC__) || defined(__cplusplus)
90 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
91 #else
92 size_t iconv();
93 #endif
94 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
95 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
96 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
97 AC_MSG_RESULT([$]{ac_t:-
98 }[$]am_cv_proto_iconv)
99 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
100 [Define as const if the declaration of iconv() needs const.])
101 fi
102 ])
0 # intdiv0.m4 serial 1 (gettext-0.11.3)
1 dnl Copyright (C) 2002 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Bruno Haible.
9
10 AC_DEFUN([gt_INTDIV0],
11 [
12 AC_REQUIRE([AC_PROG_CC])dnl
13 AC_REQUIRE([AC_CANONICAL_HOST])dnl
14
15 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
16 gt_cv_int_divbyzero_sigfpe,
17 [
18 AC_TRY_RUN([
19 #include <stdlib.h>
20 #include <signal.h>
21
22 static void
23 #ifdef __cplusplus
24 sigfpe_handler (int sig)
25 #else
26 sigfpe_handler (sig) int sig;
27 #endif
28 {
29 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
30 exit (sig != SIGFPE);
31 }
32
33 int x = 1;
34 int y = 0;
35 int z;
36 int nan;
37
38 int main ()
39 {
40 signal (SIGFPE, sigfpe_handler);
41 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
42 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
43 signal (SIGTRAP, sigfpe_handler);
44 #endif
45 /* Linux/SPARC yields signal SIGILL. */
46 #if defined (__sparc__) && defined (__linux__)
47 signal (SIGILL, sigfpe_handler);
48 #endif
49
50 z = x / y;
51 nan = y / y;
52 exit (1);
53 }
54 ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
55 [
56 # Guess based on the CPU.
57 case "$host_cpu" in
58 alpha* | i[34567]86 | m68k | s390*)
59 gt_cv_int_divbyzero_sigfpe="guessing yes";;
60 *)
61 gt_cv_int_divbyzero_sigfpe="guessing no";;
62 esac
63 ])
64 ])
65 case "$gt_cv_int_divbyzero_sigfpe" in
66 *yes) value=1;;
67 *) value=0;;
68 esac
69 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
70 [Define if integer division by zero raises signal SIGFPE.])
71 ])
0 # intmax.m4 serial 1 (gettext-0.12)
1 dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Bruno Haible.
9 dnl Test whether the system has the 'intmax_t' type, but don't attempt to
10 dnl find a replacement if it is lacking.
11
12 AC_DEFUN([gt_TYPE_INTMAX_T],
13 [
14 AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
15 AC_REQUIRE([jm_AC_HEADER_STDINT_H])
16 AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
17 [AC_TRY_COMPILE([
18 #include <stddef.h>
19 #include <stdlib.h>
20 #if HAVE_STDINT_H_WITH_UINTMAX
21 #include <stdint.h>
22 #endif
23 #if HAVE_INTTYPES_H_WITH_UINTMAX
24 #include <inttypes.h>
25 #endif
26 ], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
27 if test $gt_cv_c_intmax_t = yes; then
28 AC_DEFINE(HAVE_INTMAX_T, 1,
29 [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
30 fi
31 ])
0 # inttypes-pri.m4 serial 1 (gettext-0.11.4)
1 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Bruno Haible.
9
10 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
11 # macros to non-string values. This is the case on AIX 4.3.3.
12
13 AC_DEFUN([gt_INTTYPES_PRI],
14 [
15 AC_REQUIRE([gt_HEADER_INTTYPES_H])
16 if test $gt_cv_header_inttypes_h = yes; then
17 AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
18 gt_cv_inttypes_pri_broken,
19 [
20 AC_TRY_COMPILE([#include <inttypes.h>
21 #ifdef PRId32
22 char *p = PRId32;
23 #endif
24 ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
25 ])
26 fi
27 if test "$gt_cv_inttypes_pri_broken" = yes; then
28 AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
29 [Define if <inttypes.h> exists and defines unusable PRI* macros.])
30 fi
31 ])
0 # inttypes.m4 serial 1 (gettext-0.11.4)
1 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Paul Eggert.
9
10 # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
11 # <sys/types.h>.
12
13 AC_DEFUN([gt_HEADER_INTTYPES_H],
14 [
15 AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
16 [
17 AC_TRY_COMPILE(
18 [#include <sys/types.h>
19 #include <inttypes.h>],
20 [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
21 ])
22 if test $gt_cv_header_inttypes_h = yes; then
23 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
24 [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
25 fi
26 ])
0 # inttypes_h.m4 serial 5 (gettext-0.12)
1 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Paul Eggert.
9
10 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
11 # doesn't clash with <sys/types.h>, and declares uintmax_t.
12
13 AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
14 [
15 AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
16 [AC_TRY_COMPILE(
17 [#include <sys/types.h>
18 #include <inttypes.h>],
19 [uintmax_t i = (uintmax_t) -1;],
20 jm_ac_cv_header_inttypes_h=yes,
21 jm_ac_cv_header_inttypes_h=no)])
22 if test $jm_ac_cv_header_inttypes_h = yes; then
23 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
24 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
25 and declares uintmax_t. ])
26 fi
27 ])
0 # isc-posix.m4 serial 2 (gettext-0.11.2)
1 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
9
10 # This test replaces the one in autoconf.
11 # Currently this macro should have the same name as the autoconf macro
12 # because gettext's gettext.m4 (distributed in the automake package)
13 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
14 # give these diagnostics:
15 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
16 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
17
18 undefine([AC_ISC_POSIX])
19
20 AC_DEFUN([AC_ISC_POSIX],
21 [
22 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
23 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
24 ]
25 )
0 # lcmessage.m4 serial 3 (gettext-0.11.3)
1 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7 dnl
8 dnl This file can can be used in projects which are not available under
9 dnl the GNU General Public License or the GNU Library General Public
10 dnl License but which still want to provide support for the GNU gettext
11 dnl functionality.
12 dnl Please note that the actual code of the GNU gettext library is covered
13 dnl by the GNU Library General Public License, and the rest of the GNU
14 dnl gettext package package is covered by the GNU General Public License.
15 dnl They are *not* in the public domain.
16
17 dnl Authors:
18 dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
19
20 # Check whether LC_MESSAGES is available in <locale.h>.
21
22 AC_DEFUN([AM_LC_MESSAGES],
23 [
24 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
25 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
26 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
27 if test $am_cv_val_LC_MESSAGES = yes; then
28 AC_DEFINE(HAVE_LC_MESSAGES, 1,
29 [Define if your <locale.h> file defines LC_MESSAGES.])
30 fi
31 ])
0 # lib-ld.m4 serial 3 (gettext-0.13)
1 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl Subroutines of libtool.m4,
9 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
10 dnl with libtool.m4.
11
12 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
13 AC_DEFUN([AC_LIB_PROG_LD_GNU],
14 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
15 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
16 case `$LD -v 2>&1 </dev/null` in
17 *GNU* | *'with BFD'*)
18 acl_cv_prog_gnu_ld=yes ;;
19 *)
20 acl_cv_prog_gnu_ld=no ;;
21 esac])
22 with_gnu_ld=$acl_cv_prog_gnu_ld
23 ])
24
25 dnl From libtool-1.4. Sets the variable LD.
26 AC_DEFUN([AC_LIB_PROG_LD],
27 [AC_ARG_WITH(gnu-ld,
28 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
29 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
30 AC_REQUIRE([AC_PROG_CC])dnl
31 AC_REQUIRE([AC_CANONICAL_HOST])dnl
32 # Prepare PATH_SEPARATOR.
33 # The user is always right.
34 if test "${PATH_SEPARATOR+set}" != set; then
35 echo "#! /bin/sh" >conf$$.sh
36 echo "exit 0" >>conf$$.sh
37 chmod +x conf$$.sh
38 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
39 PATH_SEPARATOR=';'
40 else
41 PATH_SEPARATOR=:
42 fi
43 rm -f conf$$.sh
44 fi
45 ac_prog=ld
46 if test "$GCC" = yes; then
47 # Check if gcc -print-prog-name=ld gives a path.
48 AC_MSG_CHECKING([for ld used by GCC])
49 case $host in
50 *-*-mingw*)
51 # gcc leaves a trailing carriage return which upsets mingw
52 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
53 *)
54 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
55 esac
56 case $ac_prog in
57 # Accept absolute paths.
58 [[\\/]* | [A-Za-z]:[\\/]*)]
59 [re_direlt='/[^/][^/]*/\.\./']
60 # Canonicalize the path of ld
61 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
62 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
63 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
64 done
65 test -z "$LD" && LD="$ac_prog"
66 ;;
67 "")
68 # If it fails, then pretend we aren't using GCC.
69 ac_prog=ld
70 ;;
71 *)
72 # If it is relative, then search for the first ld in PATH.
73 with_gnu_ld=unknown
74 ;;
75 esac
76 elif test "$with_gnu_ld" = yes; then
77 AC_MSG_CHECKING([for GNU ld])
78 else
79 AC_MSG_CHECKING([for non-GNU ld])
80 fi
81 AC_CACHE_VAL(acl_cv_path_LD,
82 [if test -z "$LD"; then
83 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
84 for ac_dir in $PATH; do
85 test -z "$ac_dir" && ac_dir=.
86 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
87 acl_cv_path_LD="$ac_dir/$ac_prog"
88 # Check to see if the program is GNU ld. I'd rather use --version,
89 # but apparently some GNU ld's only accept -v.
90 # Break only if it was the GNU/non-GNU ld that we prefer.
91 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
92 *GNU* | *'with BFD'*)
93 test "$with_gnu_ld" != no && break ;;
94 *)
95 test "$with_gnu_ld" != yes && break ;;
96 esac
97 fi
98 done
99 IFS="$ac_save_ifs"
100 else
101 acl_cv_path_LD="$LD" # Let the user override the test with a path.
102 fi])
103 LD="$acl_cv_path_LD"
104 if test -n "$LD"; then
105 AC_MSG_RESULT($LD)
106 else
107 AC_MSG_RESULT(no)
108 fi
109 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
110 AC_LIB_PROG_LD_GNU
111 ])
0 # lib-link.m4 serial 4 (gettext-0.12)
1 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Bruno Haible.
9
10 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
11 dnl the libraries corresponding to explicit and implicit dependencies.
12 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
13 dnl augments the CPPFLAGS variable.
14 AC_DEFUN([AC_LIB_LINKFLAGS],
15 [
16 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
17 AC_REQUIRE([AC_LIB_RPATH])
18 define([Name],[translit([$1],[./-], [___])])
19 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
20 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
21 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
22 AC_LIB_LINKFLAGS_BODY([$1], [$2])
23 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
24 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
25 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
26 ])
27 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
28 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
29 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
30 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
31 AC_SUBST([LIB]NAME)
32 AC_SUBST([LTLIB]NAME)
33 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
34 dnl results of this search when this library appears as a dependency.
35 HAVE_LIB[]NAME=yes
36 undefine([Name])
37 undefine([NAME])
38 ])
39
40 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
41 dnl searches for libname and the libraries corresponding to explicit and
42 dnl implicit dependencies, together with the specified include files and
43 dnl the ability to compile and link the specified testcode. If found, it
44 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
45 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
46 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
47 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
48 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
49 [
50 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
51 AC_REQUIRE([AC_LIB_RPATH])
52 define([Name],[translit([$1],[./-], [___])])
53 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
54 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
55
56 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
57 dnl accordingly.
58 AC_LIB_LINKFLAGS_BODY([$1], [$2])
59
60 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
61 dnl because if the user has installed lib[]Name and not disabled its use
62 dnl via --without-lib[]Name-prefix, he wants to use it.
63 ac_save_CPPFLAGS="$CPPFLAGS"
64 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
65
66 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
67 ac_save_LIBS="$LIBS"
68 LIBS="$LIBS $LIB[]NAME"
69 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
70 LIBS="$ac_save_LIBS"
71 ])
72 if test "$ac_cv_lib[]Name" = yes; then
73 HAVE_LIB[]NAME=yes
74 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
75 AC_MSG_CHECKING([how to link with lib[]$1])
76 AC_MSG_RESULT([$LIB[]NAME])
77 else
78 HAVE_LIB[]NAME=no
79 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
80 dnl $INC[]NAME either.
81 CPPFLAGS="$ac_save_CPPFLAGS"
82 LIB[]NAME=
83 LTLIB[]NAME=
84 fi
85 AC_SUBST([HAVE_LIB]NAME)
86 AC_SUBST([LIB]NAME)
87 AC_SUBST([LTLIB]NAME)
88 undefine([Name])
89 undefine([NAME])
90 ])
91
92 dnl Determine the platform dependent parameters needed to use rpath:
93 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
94 dnl hardcode_direct, hardcode_minus_L.
95 AC_DEFUN([AC_LIB_RPATH],
96 [
97 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
98 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
99 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
100 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
101 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
102 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
103 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
104 . ./conftest.sh
105 rm -f ./conftest.sh
106 acl_cv_rpath=done
107 ])
108 wl="$acl_cv_wl"
109 libext="$acl_cv_libext"
110 shlibext="$acl_cv_shlibext"
111 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
112 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
113 hardcode_direct="$acl_cv_hardcode_direct"
114 hardcode_minus_L="$acl_cv_hardcode_minus_L"
115 dnl Determine whether the user wants rpath handling at all.
116 AC_ARG_ENABLE(rpath,
117 [ --disable-rpath do not hardcode runtime library paths],
118 :, enable_rpath=yes)
119 ])
120
121 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
122 dnl the libraries corresponding to explicit and implicit dependencies.
123 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
124 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
125 [
126 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
127 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
128 dnl By default, look in $includedir and $libdir.
129 use_additional=yes
130 AC_LIB_WITH_FINAL_PREFIX([
131 eval additional_includedir=\"$includedir\"
132 eval additional_libdir=\"$libdir\"
133 ])
134 AC_LIB_ARG_WITH([lib$1-prefix],
135 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
136 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
137 [
138 if test "X$withval" = "Xno"; then
139 use_additional=no
140 else
141 if test "X$withval" = "X"; then
142 AC_LIB_WITH_FINAL_PREFIX([
143 eval additional_includedir=\"$includedir\"
144 eval additional_libdir=\"$libdir\"
145 ])
146 else
147 additional_includedir="$withval/include"
148 additional_libdir="$withval/lib"
149 fi
150 fi
151 ])
152 dnl Search the library and its dependencies in $additional_libdir and
153 dnl $LDFLAGS. Using breadth-first-seach.
154 LIB[]NAME=
155 LTLIB[]NAME=
156 INC[]NAME=
157 rpathdirs=
158 ltrpathdirs=
159 names_already_handled=
160 names_next_round='$1 $2'
161 while test -n "$names_next_round"; do
162 names_this_round="$names_next_round"
163 names_next_round=
164 for name in $names_this_round; do
165 already_handled=
166 for n in $names_already_handled; do
167 if test "$n" = "$name"; then
168 already_handled=yes
169 break
170 fi
171 done
172 if test -z "$already_handled"; then
173 names_already_handled="$names_already_handled $name"
174 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
175 dnl or AC_LIB_HAVE_LINKFLAGS call.
176 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
177 eval value=\"\$HAVE_LIB$uppername\"
178 if test -n "$value"; then
179 if test "$value" = yes; then
180 eval value=\"\$LIB$uppername\"
181 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
182 eval value=\"\$LTLIB$uppername\"
183 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
184 else
185 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
186 dnl that this library doesn't exist. So just drop it.
187 :
188 fi
189 else
190 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
191 dnl and the already constructed $LIBNAME/$LTLIBNAME.
192 found_dir=
193 found_la=
194 found_so=
195 found_a=
196 if test $use_additional = yes; then
197 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
198 found_dir="$additional_libdir"
199 found_so="$additional_libdir/lib$name.$shlibext"
200 if test -f "$additional_libdir/lib$name.la"; then
201 found_la="$additional_libdir/lib$name.la"
202 fi
203 else
204 if test -f "$additional_libdir/lib$name.$libext"; then
205 found_dir="$additional_libdir"
206 found_a="$additional_libdir/lib$name.$libext"
207 if test -f "$additional_libdir/lib$name.la"; then
208 found_la="$additional_libdir/lib$name.la"
209 fi
210 fi
211 fi
212 fi
213 if test "X$found_dir" = "X"; then
214 for x in $LDFLAGS $LTLIB[]NAME; do
215 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
216 case "$x" in
217 -L*)
218 dir=`echo "X$x" | sed -e 's/^X-L//'`
219 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
220 found_dir="$dir"
221 found_so="$dir/lib$name.$shlibext"
222 if test -f "$dir/lib$name.la"; then
223 found_la="$dir/lib$name.la"
224 fi
225 else
226 if test -f "$dir/lib$name.$libext"; then
227 found_dir="$dir"
228 found_a="$dir/lib$name.$libext"
229 if test -f "$dir/lib$name.la"; then
230 found_la="$dir/lib$name.la"
231 fi
232 fi
233 fi
234 ;;
235 esac
236 if test "X$found_dir" != "X"; then
237 break
238 fi
239 done
240 fi
241 if test "X$found_dir" != "X"; then
242 dnl Found the library.
243 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
244 if test "X$found_so" != "X"; then
245 dnl Linking with a shared library. We attempt to hardcode its
246 dnl directory into the executable's runpath, unless it's the
247 dnl standard /usr/lib.
248 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
249 dnl No hardcoding is needed.
250 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
251 else
252 dnl Use an explicit option to hardcode DIR into the resulting
253 dnl binary.
254 dnl Potentially add DIR to ltrpathdirs.
255 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
256 haveit=
257 for x in $ltrpathdirs; do
258 if test "X$x" = "X$found_dir"; then
259 haveit=yes
260 break
261 fi
262 done
263 if test -z "$haveit"; then
264 ltrpathdirs="$ltrpathdirs $found_dir"
265 fi
266 dnl The hardcoding into $LIBNAME is system dependent.
267 if test "$hardcode_direct" = yes; then
268 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
269 dnl resulting binary.
270 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
271 else
272 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
273 dnl Use an explicit option to hardcode DIR into the resulting
274 dnl binary.
275 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
276 dnl Potentially add DIR to rpathdirs.
277 dnl The rpathdirs will be appended to $LIBNAME at the end.
278 haveit=
279 for x in $rpathdirs; do
280 if test "X$x" = "X$found_dir"; then
281 haveit=yes
282 break
283 fi
284 done
285 if test -z "$haveit"; then
286 rpathdirs="$rpathdirs $found_dir"
287 fi
288 else
289 dnl Rely on "-L$found_dir".
290 dnl But don't add it if it's already contained in the LDFLAGS
291 dnl or the already constructed $LIBNAME
292 haveit=
293 for x in $LDFLAGS $LIB[]NAME; do
294 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
295 if test "X$x" = "X-L$found_dir"; then
296 haveit=yes
297 break
298 fi
299 done
300 if test -z "$haveit"; then
301 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
302 fi
303 if test "$hardcode_minus_L" != no; then
304 dnl FIXME: Not sure whether we should use
305 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
306 dnl here.
307 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
308 else
309 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
310 dnl here, because this doesn't fit in flags passed to the
311 dnl compiler. So give up. No hardcoding. This affects only
312 dnl very old systems.
313 dnl FIXME: Not sure whether we should use
314 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
315 dnl here.
316 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
317 fi
318 fi
319 fi
320 fi
321 else
322 if test "X$found_a" != "X"; then
323 dnl Linking with a static library.
324 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
325 else
326 dnl We shouldn't come here, but anyway it's good to have a
327 dnl fallback.
328 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
329 fi
330 fi
331 dnl Assume the include files are nearby.
332 additional_includedir=
333 case "$found_dir" in
334 */lib | */lib/)
335 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
336 additional_includedir="$basedir/include"
337 ;;
338 esac
339 if test "X$additional_includedir" != "X"; then
340 dnl Potentially add $additional_includedir to $INCNAME.
341 dnl But don't add it
342 dnl 1. if it's the standard /usr/include,
343 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
344 dnl 3. if it's already present in $CPPFLAGS or the already
345 dnl constructed $INCNAME,
346 dnl 4. if it doesn't exist as a directory.
347 if test "X$additional_includedir" != "X/usr/include"; then
348 haveit=
349 if test "X$additional_includedir" = "X/usr/local/include"; then
350 if test -n "$GCC"; then
351 case $host_os in
352 linux*) haveit=yes;;
353 esac
354 fi
355 fi
356 if test -z "$haveit"; then
357 for x in $CPPFLAGS $INC[]NAME; do
358 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
359 if test "X$x" = "X-I$additional_includedir"; then
360 haveit=yes
361 break
362 fi
363 done
364 if test -z "$haveit"; then
365 if test -d "$additional_includedir"; then
366 dnl Really add $additional_includedir to $INCNAME.
367 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
368 fi
369 fi
370 fi
371 fi
372 fi
373 dnl Look for dependencies.
374 if test -n "$found_la"; then
375 dnl Read the .la file. It defines the variables
376 dnl dlname, library_names, old_library, dependency_libs, current,
377 dnl age, revision, installed, dlopen, dlpreopen, libdir.
378 save_libdir="$libdir"
379 case "$found_la" in
380 */* | *\\*) . "$found_la" ;;
381 *) . "./$found_la" ;;
382 esac
383 libdir="$save_libdir"
384 dnl We use only dependency_libs.
385 for dep in $dependency_libs; do
386 case "$dep" in
387 -L*)
388 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
389 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
390 dnl But don't add it
391 dnl 1. if it's the standard /usr/lib,
392 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
393 dnl 3. if it's already present in $LDFLAGS or the already
394 dnl constructed $LIBNAME,
395 dnl 4. if it doesn't exist as a directory.
396 if test "X$additional_libdir" != "X/usr/lib"; then
397 haveit=
398 if test "X$additional_libdir" = "X/usr/local/lib"; then
399 if test -n "$GCC"; then
400 case $host_os in
401 linux*) haveit=yes;;
402 esac
403 fi
404 fi
405 if test -z "$haveit"; then
406 haveit=
407 for x in $LDFLAGS $LIB[]NAME; do
408 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
409 if test "X$x" = "X-L$additional_libdir"; then
410 haveit=yes
411 break
412 fi
413 done
414 if test -z "$haveit"; then
415 if test -d "$additional_libdir"; then
416 dnl Really add $additional_libdir to $LIBNAME.
417 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
418 fi
419 fi
420 haveit=
421 for x in $LDFLAGS $LTLIB[]NAME; do
422 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
423 if test "X$x" = "X-L$additional_libdir"; then
424 haveit=yes
425 break
426 fi
427 done
428 if test -z "$haveit"; then
429 if test -d "$additional_libdir"; then
430 dnl Really add $additional_libdir to $LTLIBNAME.
431 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
432 fi
433 fi
434 fi
435 fi
436 ;;
437 -R*)
438 dir=`echo "X$dep" | sed -e 's/^X-R//'`
439 if test "$enable_rpath" != no; then
440 dnl Potentially add DIR to rpathdirs.
441 dnl The rpathdirs will be appended to $LIBNAME at the end.
442 haveit=
443 for x in $rpathdirs; do
444 if test "X$x" = "X$dir"; then
445 haveit=yes
446 break
447 fi
448 done
449 if test -z "$haveit"; then
450 rpathdirs="$rpathdirs $dir"
451 fi
452 dnl Potentially add DIR to ltrpathdirs.
453 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
454 haveit=
455 for x in $ltrpathdirs; do
456 if test "X$x" = "X$dir"; then
457 haveit=yes
458 break
459 fi
460 done
461 if test -z "$haveit"; then
462 ltrpathdirs="$ltrpathdirs $dir"
463 fi
464 fi
465 ;;
466 -l*)
467 dnl Handle this in the next round.
468 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
469 ;;
470 *.la)
471 dnl Handle this in the next round. Throw away the .la's
472 dnl directory; it is already contained in a preceding -L
473 dnl option.
474 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
475 ;;
476 *)
477 dnl Most likely an immediate library name.
478 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
479 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
480 ;;
481 esac
482 done
483 fi
484 else
485 dnl Didn't find the library; assume it is in the system directories
486 dnl known to the linker and runtime loader. (All the system
487 dnl directories known to the linker should also be known to the
488 dnl runtime loader, otherwise the system is severely misconfigured.)
489 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
490 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
491 fi
492 fi
493 fi
494 done
495 done
496 if test "X$rpathdirs" != "X"; then
497 if test -n "$hardcode_libdir_separator"; then
498 dnl Weird platform: only the last -rpath option counts, the user must
499 dnl pass all path elements in one option. We can arrange that for a
500 dnl single library, but not when more than one $LIBNAMEs are used.
501 alldirs=
502 for found_dir in $rpathdirs; do
503 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
504 done
505 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
506 acl_save_libdir="$libdir"
507 libdir="$alldirs"
508 eval flag=\"$hardcode_libdir_flag_spec\"
509 libdir="$acl_save_libdir"
510 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
511 else
512 dnl The -rpath options are cumulative.
513 for found_dir in $rpathdirs; do
514 acl_save_libdir="$libdir"
515 libdir="$found_dir"
516 eval flag=\"$hardcode_libdir_flag_spec\"
517 libdir="$acl_save_libdir"
518 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
519 done
520 fi
521 fi
522 if test "X$ltrpathdirs" != "X"; then
523 dnl When using libtool, the option that works for both libraries and
524 dnl executables is -R. The -R options are cumulative.
525 for found_dir in $ltrpathdirs; do
526 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
527 done
528 fi
529 ])
530
531 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
532 dnl unless already present in VAR.
533 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
534 dnl contains two or three consecutive elements that belong together.
535 AC_DEFUN([AC_LIB_APPENDTOVAR],
536 [
537 for element in [$2]; do
538 haveit=
539 for x in $[$1]; do
540 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
541 if test "X$x" = "X$element"; then
542 haveit=yes
543 break
544 fi
545 done
546 if test -z "$haveit"; then
547 [$1]="${[$1]}${[$1]:+ }$element"
548 fi
549 done
550 ])
0 # lib-prefix.m4 serial 3 (gettext-0.13)
1 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Bruno Haible.
9
10 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
11 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
12 dnl require excessive bracketing.
13 ifdef([AC_HELP_STRING],
14 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
15 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
16
17 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
18 dnl to access previously installed libraries. The basic assumption is that
19 dnl a user will want packages to use other packages he previously installed
20 dnl with the same --prefix option.
21 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
22 dnl libraries, but is otherwise very convenient.
23 AC_DEFUN([AC_LIB_PREFIX],
24 [
25 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
26 AC_REQUIRE([AC_PROG_CC])
27 AC_REQUIRE([AC_CANONICAL_HOST])
28 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
29 dnl By default, look in $includedir and $libdir.
30 use_additional=yes
31 AC_LIB_WITH_FINAL_PREFIX([
32 eval additional_includedir=\"$includedir\"
33 eval additional_libdir=\"$libdir\"
34 ])
35 AC_LIB_ARG_WITH([lib-prefix],
36 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
37 --without-lib-prefix don't search for libraries in includedir and libdir],
38 [
39 if test "X$withval" = "Xno"; then
40 use_additional=no
41 else
42 if test "X$withval" = "X"; then
43 AC_LIB_WITH_FINAL_PREFIX([
44 eval additional_includedir=\"$includedir\"
45 eval additional_libdir=\"$libdir\"
46 ])
47 else
48 additional_includedir="$withval/include"
49 additional_libdir="$withval/lib"
50 fi
51 fi
52 ])
53 if test $use_additional = yes; then
54 dnl Potentially add $additional_includedir to $CPPFLAGS.
55 dnl But don't add it
56 dnl 1. if it's the standard /usr/include,
57 dnl 2. if it's already present in $CPPFLAGS,
58 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
59 dnl 4. if it doesn't exist as a directory.
60 if test "X$additional_includedir" != "X/usr/include"; then
61 haveit=
62 for x in $CPPFLAGS; do
63 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
64 if test "X$x" = "X-I$additional_includedir"; then
65 haveit=yes
66 break
67 fi
68 done
69 if test -z "$haveit"; then
70 if test "X$additional_includedir" = "X/usr/local/include"; then
71 if test -n "$GCC"; then
72 case $host_os in
73 linux*) haveit=yes;;
74 esac
75 fi
76 fi
77 if test -z "$haveit"; then
78 if test -d "$additional_includedir"; then
79 dnl Really add $additional_includedir to $CPPFLAGS.
80 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
81 fi
82 fi
83 fi
84 fi
85 dnl Potentially add $additional_libdir to $LDFLAGS.
86 dnl But don't add it
87 dnl 1. if it's the standard /usr/lib,
88 dnl 2. if it's already present in $LDFLAGS,
89 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
90 dnl 4. if it doesn't exist as a directory.
91 if test "X$additional_libdir" != "X/usr/lib"; then
92 haveit=
93 for x in $LDFLAGS; do
94 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
95 if test "X$x" = "X-L$additional_libdir"; then
96 haveit=yes
97 break
98 fi
99 done
100 if test -z "$haveit"; then
101 if test "X$additional_libdir" = "X/usr/local/lib"; then
102 if test -n "$GCC"; then
103 case $host_os in
104 linux*) haveit=yes;;
105 esac
106 fi
107 fi
108 if test -z "$haveit"; then
109 if test -d "$additional_libdir"; then
110 dnl Really add $additional_libdir to $LDFLAGS.
111 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
112 fi
113 fi
114 fi
115 fi
116 fi
117 ])
118
119 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
120 dnl acl_final_exec_prefix, containing the values to which $prefix and
121 dnl $exec_prefix will expand at the end of the configure script.
122 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
123 [
124 dnl Unfortunately, prefix and exec_prefix get only finally determined
125 dnl at the end of configure.
126 if test "X$prefix" = "XNONE"; then
127 acl_final_prefix="$ac_default_prefix"
128 else
129 acl_final_prefix="$prefix"
130 fi
131 if test "X$exec_prefix" = "XNONE"; then
132 acl_final_exec_prefix='${prefix}'
133 else
134 acl_final_exec_prefix="$exec_prefix"
135 fi
136 acl_save_prefix="$prefix"
137 prefix="$acl_final_prefix"
138 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
139 prefix="$acl_save_prefix"
140 ])
141
142 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
143 dnl variables prefix and exec_prefix bound to the values they will have
144 dnl at the end of the configure script.
145 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
146 [
147 acl_save_prefix="$prefix"
148 prefix="$acl_final_prefix"
149 acl_save_exec_prefix="$exec_prefix"
150 exec_prefix="$acl_final_exec_prefix"
151 $1
152 exec_prefix="$acl_save_exec_prefix"
153 prefix="$acl_save_prefix"
154 ])
0 # longdouble.m4 serial 1 (gettext-0.12)
1 dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Bruno Haible.
9 dnl Test whether the compiler supports the 'long double' type.
10 dnl Prerequisite: AC_PROG_CC
11
12 AC_DEFUN([gt_TYPE_LONGDOUBLE],
13 [
14 AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
15 [if test "$GCC" = yes; then
16 gt_cv_c_long_double=yes
17 else
18 AC_TRY_COMPILE([
19 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
20 long double foo = 0.0;
21 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
22 int array [2*(sizeof(long double) >= sizeof(double)) - 1];
23 ], ,
24 gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
25 fi])
26 if test $gt_cv_c_long_double = yes; then
27 AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
28 fi
29 ])
0 # longlong.m4 serial 4
1 dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Paul Eggert.
9
10 # Define HAVE_LONG_LONG if 'long long' works.
11
12 AC_DEFUN([jm_AC_TYPE_LONG_LONG],
13 [
14 AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
15 [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
16 [long long llmax = (long long) -1;
17 return ll << i | ll >> i | llmax / ll | llmax % ll;],
18 ac_cv_type_long_long=yes,
19 ac_cv_type_long_long=no)])
20 if test $ac_cv_type_long_long = yes; then
21 AC_DEFINE(HAVE_LONG_LONG, 1,
22 [Define if you have the 'long long' type.])
23 fi
24 ])
0 # nls.m4 serial 1 (gettext-0.12)
1 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7 dnl
8 dnl This file can can be used in projects which are not available under
9 dnl the GNU General Public License or the GNU Library General Public
10 dnl License but which still want to provide support for the GNU gettext
11 dnl functionality.
12 dnl Please note that the actual code of the GNU gettext library is covered
13 dnl by the GNU Library General Public License, and the rest of the GNU
14 dnl gettext package package is covered by the GNU General Public License.
15 dnl They are *not* in the public domain.
16
17 dnl Authors:
18 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
19 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
20
21 AC_DEFUN([AM_NLS],
22 [
23 AC_MSG_CHECKING([whether NLS is requested])
24 dnl Default is enabled NLS
25 AC_ARG_ENABLE(nls,
26 [ --disable-nls do not use Native Language Support],
27 USE_NLS=$enableval, USE_NLS=yes)
28 AC_MSG_RESULT($USE_NLS)
29 AC_SUBST(USE_NLS)
30 ])
31
32 AC_DEFUN([AM_MKINSTALLDIRS],
33 [
34 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
35 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
36 dnl Try to locate it.
37 MKINSTALLDIRS=
38 if test -n "$ac_aux_dir"; then
39 case "$ac_aux_dir" in
40 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
41 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
42 esac
43 fi
44 if test -z "$MKINSTALLDIRS"; then
45 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
46 fi
47 AC_SUBST(MKINSTALLDIRS)
48 ])
0 # po.m4 serial 3 (gettext-0.14)
1 dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7 dnl
8 dnl This file can can be used in projects which are not available under
9 dnl the GNU General Public License or the GNU Library General Public
10 dnl License but which still want to provide support for the GNU gettext
11 dnl functionality.
12 dnl Please note that the actual code of the GNU gettext library is covered
13 dnl by the GNU Library General Public License, and the rest of the GNU
14 dnl gettext package package is covered by the GNU General Public License.
15 dnl They are *not* in the public domain.
16
17 dnl Authors:
18 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
19 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
20
21 dnl Checks for all prerequisites of the po subdirectory.
22 AC_DEFUN([AM_PO_SUBDIRS],
23 [
24 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
25 AC_REQUIRE([AC_PROG_INSTALL])dnl
26 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
27 AC_REQUIRE([AM_NLS])dnl
28
29 dnl Perform the following tests also if --disable-nls has been given,
30 dnl because they are needed for "make dist" to work.
31
32 dnl Search for GNU msgfmt in the PATH.
33 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
34 dnl The second test excludes FreeBSD msgfmt.
35 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
36 [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
37 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
38 :)
39 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
40
41 dnl Search for GNU xgettext 0.12 or newer in the PATH.
42 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
43 dnl The second test excludes FreeBSD xgettext.
44 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
45 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
46 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
47 :)
48 dnl Remove leftover from FreeBSD xgettext call.
49 rm -f messages.po
50
51 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
52 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
53 [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
54
55 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
56 dnl Test whether we really found GNU msgfmt.
57 if test "$GMSGFMT" != ":"; then
58 dnl If it is no GNU msgfmt we define it as : so that the
59 dnl Makefiles still can work.
60 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
61 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
62 : ;
63 else
64 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
65 AC_MSG_RESULT(
66 [found $GMSGFMT program is not GNU msgfmt; ignore it])
67 GMSGFMT=":"
68 fi
69 fi
70
71 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
72 dnl Test whether we really found GNU xgettext.
73 if test "$XGETTEXT" != ":"; then
74 dnl If it is no GNU xgettext we define it as : so that the
75 dnl Makefiles still can work.
76 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
77 (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
78 : ;
79 else
80 AC_MSG_RESULT(
81 [found xgettext program is not GNU xgettext; ignore it])
82 XGETTEXT=":"
83 fi
84 dnl Remove leftover from FreeBSD xgettext call.
85 rm -f messages.po
86 fi
87
88 AC_OUTPUT_COMMANDS([
89 for ac_file in $CONFIG_FILES; do
90 # Support "outfile[:infile[:infile...]]"
91 case "$ac_file" in
92 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
93 esac
94 # PO directories have a Makefile.in generated from Makefile.in.in.
95 case "$ac_file" in */Makefile.in)
96 # Adjust a relative srcdir.
97 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
98 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
99 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
100 # In autoconf-2.13 it is called $ac_given_srcdir.
101 # In autoconf-2.50 it is called $srcdir.
102 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
103 case "$ac_given_srcdir" in
104 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
105 /*) top_srcdir="$ac_given_srcdir" ;;
106 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
107 esac
108 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
109 rm -f "$ac_dir/POTFILES"
110 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
111 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
112 POMAKEFILEDEPS="POTFILES.in"
113 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
114 # on $ac_dir but don't depend on user-specified configuration
115 # parameters.
116 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
117 # The LINGUAS file contains the set of available languages.
118 if test -n "$OBSOLETE_ALL_LINGUAS"; then
119 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
120 fi
121 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
122 # Hide the ALL_LINGUAS assigment from automake.
123 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
124 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
125 else
126 # The set of available languages was given in configure.in.
127 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
128 fi
129 # Compute POFILES
130 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
131 # Compute UPDATEPOFILES
132 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
133 # Compute DUMMYPOFILES
134 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
135 # Compute GMOFILES
136 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
137 case "$ac_given_srcdir" in
138 .) srcdirpre= ;;
139 *) srcdirpre='$(srcdir)/' ;;
140 esac
141 POFILES=
142 UPDATEPOFILES=
143 DUMMYPOFILES=
144 GMOFILES=
145 for lang in $ALL_LINGUAS; do
146 POFILES="$POFILES $srcdirpre$lang.po"
147 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
148 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
149 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
150 done
151 # CATALOGS depends on both $ac_dir and the user's LINGUAS
152 # environment variable.
153 INST_LINGUAS=
154 if test -n "$ALL_LINGUAS"; then
155 for presentlang in $ALL_LINGUAS; do
156 useit=no
157 if test "%UNSET%" != "$LINGUAS"; then
158 desiredlanguages="$LINGUAS"
159 else
160 desiredlanguages="$ALL_LINGUAS"
161 fi
162 for desiredlang in $desiredlanguages; do
163 # Use the presentlang catalog if desiredlang is
164 # a. equal to presentlang, or
165 # b. a variant of presentlang (because in this case,
166 # presentlang can be used as a fallback for messages
167 # which are not translated in the desiredlang catalog).
168 case "$desiredlang" in
169 "$presentlang"*) useit=yes;;
170 esac
171 done
172 if test $useit = yes; then
173 INST_LINGUAS="$INST_LINGUAS $presentlang"
174 fi
175 done
176 fi
177 CATALOGS=
178 if test -n "$INST_LINGUAS"; then
179 for lang in $INST_LINGUAS; do
180 CATALOGS="$CATALOGS $lang.gmo"
181 done
182 fi
183 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
184 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
185 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
186 if test -f "$f"; then
187 case "$f" in
188 *.orig | *.bak | *~) ;;
189 *) cat "$f" >> "$ac_dir/Makefile" ;;
190 esac
191 fi
192 done
193 fi
194 ;;
195 esac
196 done],
197 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
198 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
199 # from automake.
200 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
201 # Capture the value of LINGUAS because we need it to compute CATALOGS.
202 LINGUAS="${LINGUAS-%UNSET%}"
203 ])
204 ])
205
206 dnl Postprocesses a Makefile in a directory containing PO files.
207 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
208 [
209 # When this code is run, in config.status, two variables have already been
210 # set:
211 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
212 # - LINGUAS is the value of the environment variable LINGUAS at configure
213 # time.
214
215 changequote(,)dnl
216 # Adjust a relative srcdir.
217 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
218 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
219 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
220 # In autoconf-2.13 it is called $ac_given_srcdir.
221 # In autoconf-2.50 it is called $srcdir.
222 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
223 case "$ac_given_srcdir" in
224 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
225 /*) top_srcdir="$ac_given_srcdir" ;;
226 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
227 esac
228
229 # Find a way to echo strings without interpreting backslash.
230 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
231 gt_echo='echo'
232 else
233 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
234 gt_echo='printf %s\n'
235 else
236 echo_func () {
237 cat <<EOT
238 $*
239 EOT
240 }
241 gt_echo='echo_func'
242 fi
243 fi
244
245 # A sed script that extracts the value of VARIABLE from a Makefile.
246 sed_x_variable='
247 # Test if the hold space is empty.
248 x
249 s/P/P/
250 x
251 ta
252 # Yes it was empty. Look if we have the expected variable definition.
253 /^[ ]*VARIABLE[ ]*=/{
254 # Seen the first line of the variable definition.
255 s/^[ ]*VARIABLE[ ]*=//
256 ba
257 }
258 bd
259 :a
260 # Here we are processing a line from the variable definition.
261 # Remove comment, more precisely replace it with a space.
262 s/#.*$/ /
263 # See if the line ends in a backslash.
264 tb
265 :b
266 s/\\$//
267 # Print the line, without the trailing backslash.
268 p
269 tc
270 # There was no trailing backslash. The end of the variable definition is
271 # reached. Clear the hold space.
272 s/^.*$//
273 x
274 bd
275 :c
276 # A trailing backslash means that the variable definition continues in the
277 # next line. Put a nonempty string into the hold space to indicate this.
278 s/^.*$/P/
279 x
280 :d
281 '
282 changequote([,])dnl
283
284 # Set POTFILES to the value of the Makefile variable POTFILES.
285 sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
286 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
287 # Compute POTFILES_DEPS as
288 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
289 POTFILES_DEPS=
290 for file in $POTFILES; do
291 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
292 done
293 POMAKEFILEDEPS=""
294
295 if test -n "$OBSOLETE_ALL_LINGUAS"; then
296 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
297 fi
298 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
299 # The LINGUAS file contains the set of available languages.
300 ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
301 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
302 else
303 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
304 sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
305 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
306 fi
307 # Hide the ALL_LINGUAS assigment from automake.
308 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
309 # Compute POFILES
310 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
311 # Compute UPDATEPOFILES
312 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
313 # Compute DUMMYPOFILES
314 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
315 # Compute GMOFILES
316 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
317 # Compute PROPERTIESFILES
318 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
319 # Compute CLASSFILES
320 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
321 # Compute QMFILES
322 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
323 # Compute MSGFILES
324 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
325 # Compute RESOURCESDLLFILES
326 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
327 case "$ac_given_srcdir" in
328 .) srcdirpre= ;;
329 *) srcdirpre='$(srcdir)/' ;;
330 esac
331 POFILES=
332 UPDATEPOFILES=
333 DUMMYPOFILES=
334 GMOFILES=
335 PROPERTIESFILES=
336 CLASSFILES=
337 QMFILES=
338 MSGFILES=
339 RESOURCESDLLFILES=
340 for lang in $ALL_LINGUAS; do
341 POFILES="$POFILES $srcdirpre$lang.po"
342 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
343 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
344 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
345 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
346 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
347 QMFILES="$QMFILES $srcdirpre$lang.qm"
348 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
349 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
350 frobbedlang=`echo $lang | sed -e 's/_/-/g'`
351 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
352 done
353 # CATALOGS depends on both $ac_dir and the user's LINGUAS
354 # environment variable.
355 INST_LINGUAS=
356 if test -n "$ALL_LINGUAS"; then
357 for presentlang in $ALL_LINGUAS; do
358 useit=no
359 if test "%UNSET%" != "$LINGUAS"; then
360 desiredlanguages="$LINGUAS"
361 else
362 desiredlanguages="$ALL_LINGUAS"
363 fi
364 for desiredlang in $desiredlanguages; do
365 # Use the presentlang catalog if desiredlang is
366 # a. equal to presentlang, or
367 # b. a variant of presentlang (because in this case,
368 # presentlang can be used as a fallback for messages
369 # which are not translated in the desiredlang catalog).
370 case "$desiredlang" in
371 "$presentlang"*) useit=yes;;
372 esac
373 done
374 if test $useit = yes; then
375 INST_LINGUAS="$INST_LINGUAS $presentlang"
376 fi
377 done
378 fi
379 CATALOGS=
380 JAVACATALOGS=
381 QTCATALOGS=
382 TCLCATALOGS=
383 CSHARPCATALOGS=
384 if test -n "$INST_LINGUAS"; then
385 for lang in $INST_LINGUAS; do
386 CATALOGS="$CATALOGS $lang.gmo"
387 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
388 QTCATALOGS="$QTCATALOGS $lang.qm"
389 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
390 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
391 frobbedlang=`echo $lang | sed -e 's/_/-/g'`
392 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
393 done
394 fi
395
396 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
397 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
398 # Add dependencies that cannot be formulated as a simple suffix rule.
399 for lang in $ALL_LINGUAS; do
400 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
401 cat >> "$ac_file.tmp" <<EOF
402 $frobbedlang.msg: $lang.po
403 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
404 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
405 EOF
406 done
407 fi
408 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
409 # Add dependencies that cannot be formulated as a simple suffix rule.
410 for lang in $ALL_LINGUAS; do
411 frobbedlang=`echo $lang | sed -e 's/_/-/g'`
412 cat >> "$ac_file.tmp" <<EOF
413 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
414 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
415 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
416 EOF
417 done
418 fi
419 if test -n "$POMAKEFILEDEPS"; then
420 cat >> "$ac_file.tmp" <<EOF
421 Makefile: $POMAKEFILEDEPS
422 EOF
423 fi
424 mv "$ac_file.tmp" "$ac_file"
425 ])
0 # printf-posix.m4 serial 2 (gettext-0.13.1)
1 dnl Copyright (C) 2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Bruno Haible.
9 dnl Test whether the printf() function supports POSIX/XSI format strings with
10 dnl positions.
11
12 AC_DEFUN([gt_PRINTF_POSIX],
13 [
14 AC_REQUIRE([AC_PROG_CC])
15 AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
16 gt_cv_func_printf_posix,
17 [
18 AC_TRY_RUN([
19 #include <stdio.h>
20 #include <string.h>
21 /* The string "%2$d %1$d", with dollar characters protected from the shell's
22 dollar expansion (possibly an autoconf bug). */
23 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
24 static char buf[100];
25 int main ()
26 {
27 sprintf (buf, format, 33, 55);
28 return (strcmp (buf, "55 33") != 0);
29 }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
30 [
31 AC_EGREP_CPP(notposix, [
32 #if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
33 notposix
34 #endif
35 ], gt_cv_func_printf_posix="guessing no",
36 gt_cv_func_printf_posix="guessing yes")
37 ])
38 ])
39 case $gt_cv_func_printf_posix in
40 *yes)
41 AC_DEFINE(HAVE_POSIX_PRINTF, 1,
42 [Define if your printf() function supports format strings with positions.])
43 ;;
44 esac
45 ])
0 # progtest.m4 serial 3 (gettext-0.12)
1 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7 dnl
8 dnl This file can can be used in projects which are not available under
9 dnl the GNU General Public License or the GNU Library General Public
10 dnl License but which still want to provide support for the GNU gettext
11 dnl functionality.
12 dnl Please note that the actual code of the GNU gettext library is covered
13 dnl by the GNU Library General Public License, and the rest of the GNU
14 dnl gettext package package is covered by the GNU General Public License.
15 dnl They are *not* in the public domain.
16
17 dnl Authors:
18 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
19
20 # Search path for a program which passes the given test.
21
22 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
23 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
24 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
25 [
26 # Prepare PATH_SEPARATOR.
27 # The user is always right.
28 if test "${PATH_SEPARATOR+set}" != set; then
29 echo "#! /bin/sh" >conf$$.sh
30 echo "exit 0" >>conf$$.sh
31 chmod +x conf$$.sh
32 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
33 PATH_SEPARATOR=';'
34 else
35 PATH_SEPARATOR=:
36 fi
37 rm -f conf$$.sh
38 fi
39
40 # Find out how to test for executable files. Don't use a zero-byte file,
41 # as systems may use methods other than mode bits to determine executability.
42 cat >conf$$.file <<_ASEOF
43 #! /bin/sh
44 exit 0
45 _ASEOF
46 chmod +x conf$$.file
47 if test -x conf$$.file >/dev/null 2>&1; then
48 ac_executable_p="test -x"
49 else
50 ac_executable_p="test -f"
51 fi
52 rm -f conf$$.file
53
54 # Extract the first word of "$2", so it can be a program name with args.
55 set dummy $2; ac_word=[$]2
56 AC_MSG_CHECKING([for $ac_word])
57 AC_CACHE_VAL(ac_cv_path_$1,
58 [case "[$]$1" in
59 [[\\/]]* | ?:[[\\/]]*)
60 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
61 ;;
62 *)
63 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
64 for ac_dir in ifelse([$5], , $PATH, [$5]); do
65 IFS="$ac_save_IFS"
66 test -z "$ac_dir" && ac_dir=.
67 for ac_exec_ext in '' $ac_executable_extensions; do
68 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
69 if [$3]; then
70 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
71 break 2
72 fi
73 fi
74 done
75 done
76 IFS="$ac_save_IFS"
77 dnl If no 4th arg is given, leave the cache variable unset,
78 dnl so AC_PATH_PROGS will keep looking.
79 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
80 ])dnl
81 ;;
82 esac])dnl
83 $1="$ac_cv_path_$1"
84 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
85 AC_MSG_RESULT([$]$1)
86 else
87 AC_MSG_RESULT(no)
88 fi
89 AC_SUBST($1)dnl
90 ])
0 # signed.m4 serial 1 (gettext-0.10.40)
1 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Bruno Haible.
9
10 AC_DEFUN([bh_C_SIGNED],
11 [
12 AC_CACHE_CHECK([for signed], bh_cv_c_signed,
13 [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
14 if test $bh_cv_c_signed = no; then
15 AC_DEFINE(signed, ,
16 [Define to empty if the C compiler doesn't support this keyword.])
17 fi
18 ])
0 # size_max.m4 serial 2
1 dnl Copyright (C) 2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Bruno Haible.
9
10 AC_DEFUN([gl_SIZE_MAX],
11 [
12 AC_CHECK_HEADERS(stdint.h)
13 dnl First test whether the system already has SIZE_MAX.
14 AC_MSG_CHECKING([for SIZE_MAX])
15 result=
16 AC_EGREP_CPP([Found it], [
17 #include <limits.h>
18 #if HAVE_STDINT_H
19 #include <stdint.h>
20 #endif
21 #ifdef SIZE_MAX
22 Found it
23 #endif
24 ], result=yes)
25 if test -z "$result"; then
26 dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
27 dnl than the type 'unsigned long'.
28 dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
29 dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
30 _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
31 [#include <stddef.h>], result=?)
32 _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
33 [#include <stddef.h>], result=?)
34 _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
35 [#include <stddef.h>], result=?)
36 if test "$fits_in_uint" = 1; then
37 dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
38 dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
39 AC_TRY_COMPILE([#include <stddef.h>
40 extern size_t foo;
41 extern unsigned long foo;
42 ], [], fits_in_uint=0)
43 fi
44 if test -z "$result"; then
45 if test "$fits_in_uint" = 1; then
46 result="$res_hi$res_lo"U
47 else
48 result="$res_hi$res_lo"UL
49 fi
50 else
51 dnl Shouldn't happen, but who knows...
52 result='~(size_t)0'
53 fi
54 fi
55 AC_MSG_RESULT([$result])
56 if test "$result" != yes; then
57 AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
58 [Define as the maximum value of type 'size_t', if the system doesn't define it.])
59 fi
60 ])
0 # stdint_h.m4 serial 3 (gettext-0.12)
1 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Paul Eggert.
9
10 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
11 # doesn't clash with <sys/types.h>, and declares uintmax_t.
12
13 AC_DEFUN([jm_AC_HEADER_STDINT_H],
14 [
15 AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
16 [AC_TRY_COMPILE(
17 [#include <sys/types.h>
18 #include <stdint.h>],
19 [uintmax_t i = (uintmax_t) -1;],
20 jm_ac_cv_header_stdint_h=yes,
21 jm_ac_cv_header_stdint_h=no)])
22 if test $jm_ac_cv_header_stdint_h = yes; then
23 AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
24 [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
25 and declares uintmax_t. ])
26 fi
27 ])
0 # uintmax_t.m4 serial 7 (gettext-0.12)
1 dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Paul Eggert.
9
10 AC_PREREQ(2.13)
11
12 # Define uintmax_t to 'unsigned long' or 'unsigned long long'
13 # if it is not already defined in <stdint.h> or <inttypes.h>.
14
15 AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
16 [
17 AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
18 AC_REQUIRE([jm_AC_HEADER_STDINT_H])
19 if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
20 AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
21 test $ac_cv_type_unsigned_long_long = yes \
22 && ac_type='unsigned long long' \
23 || ac_type='unsigned long'
24 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
25 [Define to unsigned long or unsigned long long
26 if <stdint.h> and <inttypes.h> don't define.])
27 else
28 AC_DEFINE(HAVE_UINTMAX_T, 1,
29 [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
30 fi
31 ])
0 # ulonglong.m4 serial 3
1 dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Paul Eggert.
9
10 # Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
11
12 AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
13 [
14 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
15 [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
16 [unsigned long long ullmax = (unsigned long long) -1;
17 return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
18 ac_cv_type_unsigned_long_long=yes,
19 ac_cv_type_unsigned_long_long=no)])
20 if test $ac_cv_type_unsigned_long_long = yes; then
21 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
22 [Define if you have the 'unsigned long long' type.])
23 fi
24 ])
0 # wchar_t.m4 serial 1 (gettext-0.12)
1 dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Bruno Haible.
9 dnl Test whether <stddef.h> has the 'wchar_t' type.
10 dnl Prerequisite: AC_PROG_CC
11
12 AC_DEFUN([gt_TYPE_WCHAR_T],
13 [
14 AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
15 [AC_TRY_COMPILE([#include <stddef.h>
16 wchar_t foo = (wchar_t)'\0';], ,
17 gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
18 if test $gt_cv_c_wchar_t = yes; then
19 AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
20 fi
21 ])
0 # wint_t.m4 serial 1 (gettext-0.12)
1 dnl Copyright (C) 2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 dnl From Bruno Haible.
9 dnl Test whether <wchar.h> has the 'wint_t' type.
10 dnl Prerequisite: AC_PROG_CC
11
12 AC_DEFUN([gt_TYPE_WINT_T],
13 [
14 AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
15 [AC_TRY_COMPILE([#include <wchar.h>
16 wint_t foo = (wchar_t)'\0';], ,
17 gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
18 if test $gt_cv_c_wint_t = yes; then
19 AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
20 fi
21 ])
0 # xsize.m4 serial 2
1 dnl Copyright (C) 2003 Free Software Foundation, Inc.
2 dnl This file is free software, distributed under the terms of the GNU
3 dnl General Public License. As a special exception to the GNU General
4 dnl Public License, this file may be distributed as part of a program
5 dnl that contains a configuration script generated by Autoconf, under
6 dnl the same distribution terms as the rest of that program.
7
8 AC_DEFUN([gl_XSIZE],
9 [
10 dnl Prerequisites of lib/xsize.h.
11 AC_REQUIRE([gl_SIZE_MAX])
12 AC_CHECK_HEADERS(stdint.h)
13 ])
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: madplay.c,v 1.86 2004/02/23 21:34:53 rob Exp $
19 */
20
21 # ifdef HAVE_CONFIG_H
22 # include "config.h"
23 # endif
24
25 # include "global.h"
26
27 /* include this first to avoid conflicts with MinGW __argc et al. */
28 # include "getopt.h"
29
30 # include <locale.h>
31 # include <stdio.h>
32 # include <stdarg.h>
33 # include <stdlib.h>
34 # include <string.h>
35
36 # ifdef HAVE_ASSERT_H
37 # include <assert.h>
38 # endif
39
40 # ifdef HAVE_UNISTD_H
41 # include <unistd.h>
42 # endif
43
44 # ifdef HAVE_FCNTL_H
45 # include <fcntl.h>
46 # endif
47
48 # include <ctype.h>
49 # include <mad.h>
50
51 # include "gettext.h"
52
53 # include "version.h"
54 # include "audio.h"
55 # include "player.h"
56
57 # define FADE_DEFAULT "0:05"
58
59 # if defined(EXPERIMENTAL)
60 static int external_mix;
61 static int experimental;
62 # endif
63
64 char const *argv0;
65
66
67 /*
68 * NAME: verror()
69 * DESCRIPTION: print error message with program title prefix
70 */
71 static
72 void verror(char const *message, va_list args)
73 {
74 fprintf(stderr, "%s: ", argv0);
75 vfprintf(stderr, message, args);
76 fputc('\n', stderr);
77 }
78
79 /*
80 * NAME: warn()
81 * DESCRIPTION: print warning message
82 */
83 static
84 void warn(char const *message, ...)
85 {
86 va_list args;
87
88 va_start(args, message);
89 verror(message, args);
90 va_end(args);
91 }
92
93 /*
94 * NAME: die()
95 * DESCRIPTION: exit with failure status after printing message
96 */
97 static
98 void die(char const *message, ...)
99 {
100 va_list args;
101
102 va_start(args, message);
103 verror(message, args);
104 va_end(args);
105
106 exit(1);
107 }
108
109 /*
110 * NAME: parse_time()
111 * DESCRIPTION: parse a time specification string
112 */
113 static int parse_time (mad_timer_t *timer, char const *str)
114 {
115 mad_timer_t time, accum = mad_timer_zero;
116 signed long decimal;
117 unsigned long seconds, fraction, fracpart;
118 int minus;
119
120 while (isspace((unsigned char) *str))
121 ++str;
122
123 do {
124 seconds = fraction = fracpart = 0;
125
126 switch (*str) {
127 case '-':
128 ++str;
129 minus = 1;
130 break;
131
132 case '+':
133 ++str;
134 default:
135 minus = 0;
136 }
137
138 do {
139 decimal = strtol(str, (char **) &str, 10);
140 if (decimal < 0)
141 return -1;
142
143 seconds += decimal;
144
145 if (*str == ':') {
146 seconds *= 60;
147 ++str;
148 }
149 }
150 while (*str >= '0' && *str <= '9');
151
152 if (*str == '.')
153 {
154 char const *ptr;
155
156 decimal = strtol(++str, (char **) &ptr, 10);
157 if (decimal < 0)
158 return -1;
159
160 fraction = decimal;
161
162 for (fracpart = 1; str != ptr; ++str)
163 fracpart *= 10;
164 }
165 else if (*str == '/') {
166 ++str;
167
168 decimal = strtol(str, (char **) &str, 10);
169 if (decimal < 0)
170 return -1;
171
172 fraction = seconds;
173 fracpart = decimal;
174
175 seconds = 0;
176 }
177
178 mad_timer_set(&time, seconds, fraction, fracpart);
179 if (minus)
180 mad_timer_negate(&time);
181
182 mad_timer_add(&accum, time);
183 }
184 while (*str == '-' || *str == '+');
185
186 while (isspace((unsigned char) *str))
187 ++str;
188
189 if (*str != 0)
190 return -1;
191
192 *timer = accum;
193
194 return 0;
195 }
196
197 /*
198 * NAME: get_time()
199 * DESCRIPTION: parse a time value or die
200 */
201 static mad_timer_t get_time (char const *str, int positive, char const *name)
202 {
203 mad_timer_t time;
204
205 if (parse_time (&time, str) == -1)
206 die(_("invalid %s specification \"%s\""), name, str);
207
208 if (positive && mad_timer_sign (time) <= 0)
209 die(_("%s must be positive"), name);
210
211 return time;
212 }
213
214 /*
215 * NAME: main()
216 * DESCRIPTION: program entry point
217 */
218 int madplay (char *in_file, char *begin, char *duration, char *out_file)
219 {
220 struct player player;
221 int result = 0;
222 int ttyset = 0;
223
224 /* initialize and get options */
225
226 player_init (&player);
227 player.verbosity = -2;
228 if (! ttyset)
229 player.options &= ~PLAYER_OPTION_TTYCONTROL;
230 player.global_start = get_time (begin, 0, _("start time"));
231 player.options |= PLAYER_OPTION_SKIP;
232 player.global_stop = get_time (duration, 1, _("playing time"));
233 player.options |= PLAYER_OPTION_TIMED;
234 player.input.path = in_file;
235 player.output.path = out_file;
236 player.output.command = audio_output (&player.output.path);
237 if (player.output.command == 0)
238 die (_("unknown output format type for \"%s\""), out_file);
239 if (!ttyset)
240 player.options &= ~PLAYER_OPTION_TTYCONTROL;
241
242 /* main processing */
243
244 if (player.options & PLAYER_OPTION_CROSSFADE)
245 {
246 if (!(player.options & PLAYER_OPTION_GAP))
247 warn(_("cross-fade ignored without gap"));
248 else
249 if (mad_timer_sign(player.gap) >= 0)
250 warn(_("cross-fade ignored without negative gap"));
251 }
252
253 if (player.output.replay_gain & PLAYER_RGAIN_ENABLED)
254 {
255 if (player.options & PLAYER_OPTION_IGNOREVOLADJ)
256 warn(_("volume adjustment ignored with Replay Gain enabled"));
257 else
258 player.options |= PLAYER_OPTION_IGNOREVOLADJ;
259 }
260
261 if ((player.options & PLAYER_OPTION_SHOWTAGSONLY) &&
262 player.repeat != 1) {
263 warn(_("ignoring repeat"));
264 player.repeat = 1;
265 }
266
267 /* make stop time absolute */
268 if (player.options & PLAYER_OPTION_TIMED)
269 mad_timer_add (&player.global_stop, player.global_start);
270 /* run the player */
271
272 if (player_run (&player) == -1)
273 result = 4;
274
275 /* finish up */
276
277 player_finish (&player);
278
279 return result;
280 } // madplay
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: madplay.c,v 1.86 2004/02/23 21:34:53 rob Exp $
19 */
20
21 #include <stdio.h>
22 extern int madplay (char *, char *, char *, char *);
23
24 int main (int argc, char *argv[])
25 {
26 if (argc != 5)
27 {
28 printf ("Usage: %s <in_file> <start_time> <duration> <out_file.wav>\n", *argv);
29 return -1;
30 } // if
31 return madplay (argv[1], argv[2], argv[3], argv[4]);
32 } // main
0 #!/bin/sh
1 # Get modification time of a file or directory and pretty-print it.
2
3 scriptversion=2015-04-09.19; # UTC
4
5 # Copyright (C) 1995-2014 Free Software Foundation, Inc.
6 # written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 # This file is maintained in Automake, please report
27 # bugs to <bug-automake@gnu.org> or send patches to
28 # <automake-patches@gnu.org>.
29
30 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
31 emulate sh
32 NULLCMD=:
33 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
34 # is contrary to our usage. Disable this feature.
35 alias -g '${1+"$@"}'='"$@"'
36 setopt NO_GLOB_SUBST
37 fi
38
39 case $1 in
40 '')
41 echo "$0: No file. Try '$0 --help' for more information." 1>&2
42 exit 1;
43 ;;
44 -h | --h*)
45 cat <<\EOF
46 Usage: mdate-sh [--help] [--version] FILE
47
48 Pretty-print the modification day of FILE, in the format:
49 1 January 1970
50
51 Report bugs to <bug-automake@gnu.org>.
52 EOF
53 exit $?
54 ;;
55 -v | --v*)
56 echo "mdate-sh $scriptversion"
57 exit $?
58 ;;
59 esac
60
61 error ()
62 {
63 echo "$0: $1" >&2
64 exit 1
65 }
66
67
68 # Prevent date giving response in another language.
69 LANG=C
70 export LANG
71 LC_ALL=C
72 export LC_ALL
73 LC_TIME=C
74 export LC_TIME
75
76 # Use UTC to get reproducible result
77 TZ=UTC
78 export TZ
79
80 # GNU ls changes its time format in response to the TIME_STYLE
81 # variable. Since we cannot assume 'unset' works, revert this
82 # variable to its documented default.
83 if test "${TIME_STYLE+set}" = set; then
84 TIME_STYLE=posix-long-iso
85 export TIME_STYLE
86 fi
87
88 save_arg1=$1
89
90 # Find out how to get the extended ls output of a file or directory.
91 if ls -L /dev/null 1>/dev/null 2>&1; then
92 ls_command='ls -L -l -d'
93 else
94 ls_command='ls -l -d'
95 fi
96 # Avoid user/group names that might have spaces, when possible.
97 if ls -n /dev/null 1>/dev/null 2>&1; then
98 ls_command="$ls_command -n"
99 fi
100
101 # A 'ls -l' line looks as follows on OS/2.
102 # drwxrwx--- 0 Aug 11 2001 foo
103 # This differs from Unix, which adds ownership information.
104 # drwxrwx--- 2 root root 4096 Aug 11 2001 foo
105 #
106 # To find the date, we split the line on spaces and iterate on words
107 # until we find a month. This cannot work with files whose owner is a
108 # user named "Jan", or "Feb", etc. However, it's unlikely that '/'
109 # will be owned by a user whose name is a month. So we first look at
110 # the extended ls output of the root directory to decide how many
111 # words should be skipped to get the date.
112
113 # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
114 set x`$ls_command /`
115
116 # Find which argument is the month.
117 month=
118 command=
119 until test $month
120 do
121 test $# -gt 0 || error "failed parsing '$ls_command /' output"
122 shift
123 # Add another shift to the command.
124 command="$command shift;"
125 case $1 in
126 Jan) month=January; nummonth=1;;
127 Feb) month=February; nummonth=2;;
128 Mar) month=March; nummonth=3;;
129 Apr) month=April; nummonth=4;;
130 May) month=May; nummonth=5;;
131 Jun) month=June; nummonth=6;;
132 Jul) month=July; nummonth=7;;
133 Aug) month=August; nummonth=8;;
134 Sep) month=September; nummonth=9;;
135 Oct) month=October; nummonth=10;;
136 Nov) month=November; nummonth=11;;
137 Dec) month=December; nummonth=12;;
138 esac
139 done
140
141 test -n "$month" || error "failed parsing '$ls_command /' output"
142
143 # Get the extended ls output of the file or directory.
144 set dummy x`eval "$ls_command \"\\\$save_arg1\""`
145
146 # Remove all preceding arguments
147 eval $command
148
149 # Because of the dummy argument above, month is in $2.
150 #
151 # On a POSIX system, we should have
152 #
153 # $# = 5
154 # $1 = file size
155 # $2 = month
156 # $3 = day
157 # $4 = year or time
158 # $5 = filename
159 #
160 # On Darwin 7.7.0 and 7.6.0, we have
161 #
162 # $# = 4
163 # $1 = day
164 # $2 = month
165 # $3 = year or time
166 # $4 = filename
167
168 # Get the month.
169 case $2 in
170 Jan) month=January; nummonth=1;;
171 Feb) month=February; nummonth=2;;
172 Mar) month=March; nummonth=3;;
173 Apr) month=April; nummonth=4;;
174 May) month=May; nummonth=5;;
175 Jun) month=June; nummonth=6;;
176 Jul) month=July; nummonth=7;;
177 Aug) month=August; nummonth=8;;
178 Sep) month=September; nummonth=9;;
179 Oct) month=October; nummonth=10;;
180 Nov) month=November; nummonth=11;;
181 Dec) month=December; nummonth=12;;
182 esac
183
184 case $3 in
185 ???*) day=$1;;
186 *) day=$3; shift;;
187 esac
188
189 # Here we have to deal with the problem that the ls output gives either
190 # the time of day or the year.
191 case $3 in
192 *:*) set `date`; eval year=\$$#
193 case $2 in
194 Jan) nummonthtod=1;;
195 Feb) nummonthtod=2;;
196 Mar) nummonthtod=3;;
197 Apr) nummonthtod=4;;
198 May) nummonthtod=5;;
199 Jun) nummonthtod=6;;
200 Jul) nummonthtod=7;;
201 Aug) nummonthtod=8;;
202 Sep) nummonthtod=9;;
203 Oct) nummonthtod=10;;
204 Nov) nummonthtod=11;;
205 Dec) nummonthtod=12;;
206 esac
207 # For the first six month of the year the time notation can also
208 # be used for files modified in the last year.
209 if (expr $nummonth \> $nummonthtod) > /dev/null;
210 then
211 year=`expr $year - 1`
212 fi;;
213 *) year=$3;;
214 esac
215
216 # The result.
217 echo $day $month $year
218
219 # Local Variables:
220 # mode: shell-script
221 # sh-indentation: 2
222 # eval: (add-hook 'write-file-hooks 'time-stamp)
223 # time-stamp-start: "scriptversion="
224 # time-stamp-format: "%:y-%02m-%02d.%02H"
225 # time-stamp-time-zone: "UTC"
226 # time-stamp-end: "; # UTC"
227 # End:
0 #! /bin/sh
1 # Common wrapper for a few potentially missing GNU programs.
2
3 scriptversion=2013-10-28.13; # UTC
4
5 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
6 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 if test $# -eq 0; then
27 echo 1>&2 "Try '$0 --help' for more information"
28 exit 1
29 fi
30
31 case $1 in
32
33 --is-lightweight)
34 # Used by our autoconf macros to check whether the available missing
35 # script is modern enough.
36 exit 0
37 ;;
38
39 --run)
40 # Back-compat with the calling convention used by older automake.
41 shift
42 ;;
43
44 -h|--h|--he|--hel|--help)
45 echo "\
46 $0 [OPTION]... PROGRAM [ARGUMENT]...
47
48 Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
49 to PROGRAM being missing or too old.
50
51 Options:
52 -h, --help display this help and exit
53 -v, --version output version information and exit
54
55 Supported PROGRAM values:
56 aclocal autoconf autoheader autom4te automake makeinfo
57 bison yacc flex lex help2man
58
59 Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
60 'g' are ignored when checking the name.
61
62 Send bug reports to <bug-automake@gnu.org>."
63 exit $?
64 ;;
65
66 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
67 echo "missing $scriptversion (GNU Automake)"
68 exit $?
69 ;;
70
71 -*)
72 echo 1>&2 "$0: unknown '$1' option"
73 echo 1>&2 "Try '$0 --help' for more information"
74 exit 1
75 ;;
76
77 esac
78
79 # Run the given program, remember its exit status.
80 "$@"; st=$?
81
82 # If it succeeded, we are done.
83 test $st -eq 0 && exit 0
84
85 # Also exit now if we it failed (or wasn't found), and '--version' was
86 # passed; such an option is passed most likely to detect whether the
87 # program is present and works.
88 case $2 in --version|--help) exit $st;; esac
89
90 # Exit code 63 means version mismatch. This often happens when the user
91 # tries to use an ancient version of a tool on a file that requires a
92 # minimum version.
93 if test $st -eq 63; then
94 msg="probably too old"
95 elif test $st -eq 127; then
96 # Program was missing.
97 msg="missing on your system"
98 else
99 # Program was found and executed, but failed. Give up.
100 exit $st
101 fi
102
103 perl_URL=http://www.perl.org/
104 flex_URL=http://flex.sourceforge.net/
105 gnu_software_URL=http://www.gnu.org/software
106
107 program_details ()
108 {
109 case $1 in
110 aclocal|automake)
111 echo "The '$1' program is part of the GNU Automake package:"
112 echo "<$gnu_software_URL/automake>"
113 echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
114 echo "<$gnu_software_URL/autoconf>"
115 echo "<$gnu_software_URL/m4/>"
116 echo "<$perl_URL>"
117 ;;
118 autoconf|autom4te|autoheader)
119 echo "The '$1' program is part of the GNU Autoconf package:"
120 echo "<$gnu_software_URL/autoconf/>"
121 echo "It also requires GNU m4 and Perl in order to run:"
122 echo "<$gnu_software_URL/m4/>"
123 echo "<$perl_URL>"
124 ;;
125 esac
126 }
127
128 give_advice ()
129 {
130 # Normalize program name to check for.
131 normalized_program=`echo "$1" | sed '
132 s/^gnu-//; t
133 s/^gnu//; t
134 s/^g//; t'`
135
136 printf '%s\n' "'$1' is $msg."
137
138 configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
139 case $normalized_program in
140 autoconf*)
141 echo "You should only need it if you modified 'configure.ac',"
142 echo "or m4 files included by it."
143 program_details 'autoconf'
144 ;;
145 autoheader*)
146 echo "You should only need it if you modified 'acconfig.h' or"
147 echo "$configure_deps."
148 program_details 'autoheader'
149 ;;
150 automake*)
151 echo "You should only need it if you modified 'Makefile.am' or"
152 echo "$configure_deps."
153 program_details 'automake'
154 ;;
155 aclocal*)
156 echo "You should only need it if you modified 'acinclude.m4' or"
157 echo "$configure_deps."
158 program_details 'aclocal'
159 ;;
160 autom4te*)
161 echo "You might have modified some maintainer files that require"
162 echo "the 'autom4te' program to be rebuilt."
163 program_details 'autom4te'
164 ;;
165 bison*|yacc*)
166 echo "You should only need it if you modified a '.y' file."
167 echo "You may want to install the GNU Bison package:"
168 echo "<$gnu_software_URL/bison/>"
169 ;;
170 lex*|flex*)
171 echo "You should only need it if you modified a '.l' file."
172 echo "You may want to install the Fast Lexical Analyzer package:"
173 echo "<$flex_URL>"
174 ;;
175 help2man*)
176 echo "You should only need it if you modified a dependency" \
177 "of a man page."
178 echo "You may want to install the GNU Help2man package:"
179 echo "<$gnu_software_URL/help2man/>"
180 ;;
181 makeinfo*)
182 echo "You should only need it if you modified a '.texi' file, or"
183 echo "any other file indirectly affecting the aspect of the manual."
184 echo "You might want to install the Texinfo package:"
185 echo "<$gnu_software_URL/texinfo/>"
186 echo "The spurious makeinfo call might also be the consequence of"
187 echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
188 echo "want to install GNU make:"
189 echo "<$gnu_software_URL/make/>"
190 ;;
191 *)
192 echo "You might have modified some files without having the proper"
193 echo "tools for further handling them. Check the 'README' file, it"
194 echo "often tells you about the needed prerequisites for installing"
195 echo "this package. You may also peek at any GNU archive site, in"
196 echo "case some other package contains this missing '$1' program."
197 ;;
198 esac
199 }
200
201 give_advice "$1" | sed -e '1s/^/WARNING: /' \
202 -e '2,$s/^/ /' >&2
203
204 # Propagate the correct exit status (expected to be 127 for a program
205 # not found, 63 for a program that failed due to version mismatch).
206 exit $st
207
208 # Local variables:
209 # eval: (add-hook 'write-file-hooks 'time-stamp)
210 # time-stamp-start: "scriptversion="
211 # time-stamp-format: "%:y-%02m-%02d.%02H"
212 # time-stamp-time-zone: "UTC"
213 # time-stamp-end: "; # UTC"
214 # End:
0 #! /bin/sh
1 # mkinstalldirs --- make directory hierarchy
2
3 scriptversion=2009-04-28.21; # UTC
4
5 # Original author: Noah Friedman <friedman@prep.ai.mit.edu>
6 # Created: 1993-05-16
7 # Public domain.
8 #
9 # This file is maintained in Automake, please report
10 # bugs to <bug-automake@gnu.org> or send patches to
11 # <automake-patches@gnu.org>.
12
13 nl='
14 '
15 IFS=" "" $nl"
16 errstatus=0
17 dirmode=
18
19 usage="\
20 Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
21
22 Create each directory DIR (with mode MODE, if specified), including all
23 leading file name components.
24
25 Report bugs to <bug-automake@gnu.org>."
26
27 # process command line arguments
28 while test $# -gt 0 ; do
29 case $1 in
30 -h | --help | --h*) # -h for help
31 echo "$usage"
32 exit $?
33 ;;
34 -m) # -m PERM arg
35 shift
36 test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
37 dirmode=$1
38 shift
39 ;;
40 --version)
41 echo "$0 $scriptversion"
42 exit $?
43 ;;
44 --) # stop option processing
45 shift
46 break
47 ;;
48 -*) # unknown option
49 echo "$usage" 1>&2
50 exit 1
51 ;;
52 *) # first non-opt arg
53 break
54 ;;
55 esac
56 done
57
58 for file
59 do
60 if test -d "$file"; then
61 shift
62 else
63 break
64 fi
65 done
66
67 case $# in
68 0) exit 0 ;;
69 esac
70
71 # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
72 # mkdir -p a/c at the same time, both will detect that a is missing,
73 # one will create a, then the other will try to create a and die with
74 # a "File exists" error. This is a problem when calling mkinstalldirs
75 # from a parallel make. We use --version in the probe to restrict
76 # ourselves to GNU mkdir, which is thread-safe.
77 case $dirmode in
78 '')
79 if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
80 echo "mkdir -p -- $*"
81 exec mkdir -p -- "$@"
82 else
83 # On NextStep and OpenStep, the 'mkdir' command does not
84 # recognize any option. It will interpret all options as
85 # directories to create, and then abort because '.' already
86 # exists.
87 test -d ./-p && rmdir ./-p
88 test -d ./--version && rmdir ./--version
89 fi
90 ;;
91 *)
92 if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
93 test ! -d ./--version; then
94 echo "mkdir -m $dirmode -p -- $*"
95 exec mkdir -m "$dirmode" -p -- "$@"
96 else
97 # Clean up after NextStep and OpenStep mkdir.
98 for d in ./-m ./-p ./--version "./$dirmode";
99 do
100 test -d $d && rmdir $d
101 done
102 fi
103 ;;
104 esac
105
106 for file
107 do
108 case $file in
109 /*) pathcomp=/ ;;
110 *) pathcomp= ;;
111 esac
112 oIFS=$IFS
113 IFS=/
114 set fnord $file
115 shift
116 IFS=$oIFS
117
118 for d
119 do
120 test "x$d" = x && continue
121
122 pathcomp=$pathcomp$d
123 case $pathcomp in
124 -*) pathcomp=./$pathcomp ;;
125 esac
126
127 if test ! -d "$pathcomp"; then
128 echo "mkdir $pathcomp"
129
130 mkdir "$pathcomp" || lasterr=$?
131
132 if test ! -d "$pathcomp"; then
133 errstatus=$lasterr
134 else
135 if test ! -z "$dirmode"; then
136 echo "chmod $dirmode $pathcomp"
137 lasterr=
138 chmod "$dirmode" "$pathcomp" || lasterr=$?
139
140 if test ! -z "$lasterr"; then
141 errstatus=$lasterr
142 fi
143 fi
144 fi
145 fi
146
147 pathcomp=$pathcomp/
148 done
149 done
150
151 exit $errstatus
152
153 # Local Variables:
154 # mode: shell-script
155 # sh-indentation: 2
156 # eval: (add-hook 'write-file-hooks 'time-stamp)
157 # time-stamp-start: "scriptversion="
158 # time-stamp-format: "%:y-%02m-%02d.%02H"
159 # time-stamp-time-zone: "UTC"
160 # time-stamp-end: "; # UTC"
161 # End:
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: player.c,v 1.69 2004/02/23 21:34:53 rob Exp $
19 */
20
21 #include <errno.h>
22 # ifdef HAVE_CONFIG_H
23 # include "config.h"
24 # endif
25
26 # include "global.h"
27
28 # include <stdio.h>
29 # include <stdarg.h>
30 # include <stdlib.h>
31
32 # ifdef HAVE_SYS_TYPES_H
33 # include <sys/types.h>
34 # endif
35
36 # include <sys/stat.h>
37
38 # ifdef HAVE_FCNTL_H
39 # include <fcntl.h>
40 # endif
41
42 # ifdef HAVE_UNISTD_H
43 # include <unistd.h>
44 # endif
45
46 # include <string.h>
47
48 # ifdef HAVE_ERRNO_H
49 # include <errno.h>
50 # endif
51
52 # include <time.h>
53 # include <locale.h>
54 # include <math.h>
55
56 # ifdef HAVE_TERMIOS_H
57 # include <termios.h>
58 # endif
59
60 # ifdef _WIN32
61 # include <windows.h>
62 # endif
63
64 # include <signal.h>
65
66 # ifdef HAVE_ASSERT_H
67 # include <assert.h>
68 # endif
69
70 # if defined(HAVE_MMAP)
71 # include <sys/mman.h>
72 # endif
73
74 # if !defined(O_BINARY)
75 # define O_BINARY 0
76 # endif
77
78 # include <mad.h>
79 # include <id3tag.h>
80
81 # include "gettext.h"
82
83 # include "player.h"
84 # include "audio.h"
85 # include "resample.h"
86 # include "filter.h"
87 # include "tag.h"
88 # include "rgain.h"
89
90 # define MPEG_BUFSZ 40000 /* 2.5 s at 128 kbps; 1 s at 320 kbps */
91 # define FREQ_TOLERANCE 2 /* percent sampling frequency tolerance */
92
93 # define TTY_DEVICE "/dev/tty"
94
95 # define KEY_CTRL(key) ((key) & 0x1f)
96
97 enum {
98 KEY_PAUSE = 'p',
99 KEY_STOP = 's',
100 KEY_FORWARD = 'f',
101 KEY_BACK = 'b',
102 KEY_TIME = 't',
103 KEY_QUIT = 'q',
104 KEY_INFO = 'i',
105 KEY_GAINDECR = '-',
106 KEY_GAININCR = '+',
107 KEY_GAINZERO = '_',
108 KEY_GAININFO = '='
109 };
110
111 /*
112 * NAME: player_init()
113 * DESCRIPTION: initialize player structure
114 */
115 void player_init (struct player *player)
116 {
117 player->verbosity = 0;
118
119 player->options = 0;
120 player->repeat = 1;
121 player->control = PLAYER_CONTROL_DEFAULT;
122 player->global_start = mad_timer_zero;
123 player->global_stop = mad_timer_zero;
124
125 player->fade_in = mad_timer_zero;
126 player->fade_out = mad_timer_zero;
127 player->gap = mad_timer_zero;
128
129 player->input.path = 0;
130 player->input.fd = -1;
131 # if defined(HAVE_MMAP)
132 player->input.fdm = 0;
133 # endif
134 player->input.data = 0;
135 player->input.length = 0;
136 player->input.eof = 0;
137
138 tag_init(&player->input.tag);
139
140 player->output.mode = AUDIO_MODE_DITHER;
141 player->output.voladj_db = 0;
142 player->output.attamp_db = 0;
143 player->output.gain = MAD_F_ONE;
144 player->output.replay_gain = 0;
145 player->output.filters = 0;
146 player->output.channels_in = 0;
147 player->output.channels_out = 0;
148 player->output.select = PLAYER_CHANNEL_DEFAULT;
149 player->output.speed_in = 0;
150 player->output.speed_out = 0;
151 player->output.speed_request = 0;
152 player->output.precision_in = 0;
153 player->output.precision_out = 0;
154 player->output.path = 0;
155 player->output.command = 0;
156 /* player->output.resample */
157 player->output.resampled = 0;
158 player->stats.show = STATS_SHOW_OVERALL;
159 player->stats.label = 0;
160 player->stats.total_bytes = 0;
161 player->stats.total_time = mad_timer_zero;
162 player->stats.global_timer = mad_timer_zero;
163 player->stats.absolute_timer = mad_timer_zero;
164 player->stats.play_timer = mad_timer_zero;
165 player->stats.global_framecount = 0;
166 player->stats.absolute_framecount = 0;
167 player->stats.play_framecount = 0;
168 player->stats.error_frame = -1;
169 player->stats.mute_frame = 0;
170 player->stats.vbr = 0;
171 player->stats.bitrate = 0;
172 player->stats.vbr_frames = 0;
173 player->stats.vbr_rate = 0;
174 player->stats.nsecs = 0;
175 player->stats.audio.clipped_samples = 0;
176 player->stats.audio.peak_clipping = 0;
177 player->stats.audio.peak_sample = 0;
178 } // player_init
179
180 /*
181 * NAME: player_finish()
182 * DESCRIPTION: destroy a player structure
183 */
184 void player_finish (struct player *player)
185 {
186 if (player->output.filters)
187 {
188 filter_free (player->output.filters);
189 } // if
190
191 if (player->output.resampled)
192 {
193 resample_finish (&player->output.resample[0]);
194 resample_finish (&player->output.resample[1]);
195
196 free (player->output.resampled);
197 player->output.resampled = 0;
198 } // if
199 } // player_finish
200
201 /*
202 * NAME: error()
203 * DESCRIPTION: show an error using proper interaction with message()
204 */
205 static
206 void error(char const *id, char const *format, ...)
207 {
208 int err;
209 va_list args;
210
211 err = errno;
212
213 if (id)
214 fprintf(stderr, "%s: ", id);
215
216 va_start(args, format);
217
218 if (*format == ':') {
219 if (format[1] == 0) {
220 format = va_arg(args, char const *);
221 errno = err;
222 perror(format);
223 }
224 else {
225 errno = err;
226 perror(format + 1);
227 }
228 }
229 else {
230 vfprintf(stderr, format, args);
231 fputc('\n', stderr);
232 }
233
234 va_end(args);
235 }
236
237 # if defined(HAVE_MMAP)
238 /*
239 * NAME: map_file()
240 * DESCRIPTION: map the contents of a file into memory
241 */
242 static
243 void *map_file(int fd, unsigned long length)
244 {
245 void *fdm;
246
247 fdm = mmap(0, length, PROT_READ, MAP_SHARED, fd, 0);
248 if (fdm == MAP_FAILED)
249 return 0;
250
251 # if defined(HAVE_MADVISE)
252 madvise(fdm, length, MADV_SEQUENTIAL);
253 # endif
254
255 return fdm;
256 }
257
258 /*
259 * NAME: unmap_file()
260 * DESCRIPTION: undo a file mapping
261 */
262 static
263 int unmap_file(void *fdm, unsigned long length)
264 {
265 if (munmap(fdm, length) == -1)
266 return -1;
267
268 return 0;
269 }
270
271 /*
272 * NAME: decode->input_mmap()
273 * DESCRIPTION: (re)fill decoder input buffer from a memory map
274 */
275 static enum mad_flow decode_input_mmap (void *data, struct mad_stream *stream)
276 {
277 struct player *player = data;
278 struct input *input = &player->input;
279
280 if (input->eof)
281 return MAD_FLOW_STOP;
282
283 if (stream->next_frame) {
284 struct stat stat;
285 unsigned long posn, left;
286
287 if (fstat(input->fd, &stat) == -1)
288 return MAD_FLOW_BREAK;
289
290 posn = stream->next_frame - input->fdm;
291
292 /* check for file size change and update map */
293
294 if (stat.st_size > input->length) {
295 if (unmap_file(input->fdm, input->length) == -1) {
296 input->fdm = 0;
297 input->data = 0;
298 return MAD_FLOW_BREAK;
299 }
300
301 player->stats.total_bytes += stat.st_size - input->length;
302
303 input->length = stat.st_size;
304
305 input->fdm = map_file(input->fd, input->length);
306 if (input->fdm == 0) {
307 input->data = 0;
308 return MAD_FLOW_BREAK;
309 }
310
311 mad_stream_buffer(stream, input->fdm + posn, input->length - posn);
312
313 return MAD_FLOW_CONTINUE;
314 }
315
316 /* end of memory map; append MAD_BUFFER_GUARD zero bytes */
317
318 left = input->length - posn;
319
320 input->data = malloc(left + MAD_BUFFER_GUARD);
321 if (input->data == 0)
322 return MAD_FLOW_BREAK;
323
324 input->eof = 1;
325
326 memcpy(input->data, input->fdm + posn, left);
327 memset(input->data + left, 0, MAD_BUFFER_GUARD);
328
329 mad_stream_buffer(stream, input->data, left + MAD_BUFFER_GUARD);
330
331 return MAD_FLOW_CONTINUE;
332 }
333
334 /* first call */
335
336 mad_stream_buffer(stream, input->fdm, input->length);
337
338 return MAD_FLOW_CONTINUE;
339 }
340 # endif
341
342 /*
343 * NAME: decode->input_read()
344 * DESCRIPTION: (re)fill decoder input buffer by reading a file descriptor
345 */
346 static
347 enum mad_flow decode_input_read (void *data, struct mad_stream *stream)
348 {
349 struct player *player = data;
350 struct input *input = &player->input;
351 int len;
352
353 if (input->eof)
354 return MAD_FLOW_STOP;
355
356 if (stream->next_frame) {
357 memmove(input->data, stream->next_frame,
358 input->length = &input->data[input->length] - stream->next_frame);
359 }
360
361 do {
362 len = read(input->fd, input->data + input->length,
363 MPEG_BUFSZ - input->length);
364 }
365 while (len == -1 && errno == EINTR);
366
367 if (len == -1) {
368 error("input", ":read");
369 return MAD_FLOW_BREAK;
370 }
371 else if (len == 0) {
372 input->eof = 1;
373
374 assert(MPEG_BUFSZ - input->length >= MAD_BUFFER_GUARD);
375
376 while (len < MAD_BUFFER_GUARD)
377 input->data[input->length + len++] = 0;
378 }
379
380 mad_stream_buffer(stream, input->data, input->length += len);
381
382 return MAD_FLOW_CONTINUE;
383 }
384
385 /*
386 * NAME: decode->header()
387 * DESCRIPTION: decide whether to continue decoding based on header
388 */
389 static
390 enum mad_flow decode_header(void *data, struct mad_header const *header)
391 {
392 struct player *player = data;
393
394 if ((player->options & PLAYER_OPTION_TIMED) &&
395 mad_timer_compare(player->stats.global_timer, player->global_stop) > 0)
396 return MAD_FLOW_STOP;
397
398 /* accounting (except first frame) */
399
400 if (player->stats.absolute_framecount) {
401 ++player->stats.absolute_framecount;
402 mad_timer_add(&player->stats.absolute_timer, header->duration);
403
404 ++player->stats.global_framecount;
405 mad_timer_add(&player->stats.global_timer, header->duration);
406
407 if ((player->options & PLAYER_OPTION_SKIP) &&
408 mad_timer_compare(player->stats.global_timer,
409 player->global_start) < 0)
410 return MAD_FLOW_IGNORE;
411 }
412
413 return MAD_FLOW_CONTINUE;
414 }
415
416 /*
417 * NAME: set_gain()
418 * DESCRIPTION: modify player gain information
419 */
420 static
421 double set_gain (struct player *player, double db)
422 {
423 db = player->output.voladj_db + player->output.attamp_db;
424 if (db > DB_MAX || db < DB_MIN) {
425 db = (db > DB_MAX) ? DB_MAX : DB_MIN;
426 player->output.attamp_db = db - player->output.voladj_db;
427 }
428
429 player->output.gain = db ? mad_f_tofixed(pow(10, db / 20)) : MAD_F_ONE;
430
431 return db;
432 }
433
434 /*
435 * NAME: use_rgain()
436 * DESCRIPTION: select and employ a Replay Gain volume adjustment
437 */
438 static
439 void use_rgain(struct player *player, struct rgain *list)
440 {
441 struct rgain *rgain = &list[0];
442
443 if ((player->output.replay_gain & PLAYER_RGAIN_AUDIOPHILE) &&
444 list[1].name == RGAIN_NAME_AUDIOPHILE &&
445 list[1].originator != RGAIN_ORIGINATOR_UNSPECIFIED)
446 rgain = &list[1];
447
448 if (RGAIN_VALID(rgain))
449 {
450
451 player->output.replay_gain |= PLAYER_RGAIN_SET;
452 }
453 } // use_rgain
454
455 /*
456 * NAME: decode->filter()
457 * DESCRIPTION: perform filtering on decoded frame
458 */
459 static
460 enum mad_flow decode_filter(void *data, struct mad_stream const *stream,
461 struct mad_frame *frame)
462 {
463 struct player *player = data;
464
465 /* first frame accounting */
466
467 if (player->stats.absolute_framecount == 0) {
468 if (player->input.tag.flags == 0 &&
469 tag_parse(&player->input.tag, stream) == 0)
470 {
471 struct tag *tag = &player->input.tag;
472 unsigned int frame_size;
473
474 if ((tag->flags & TAG_LAME) &&
475 (player->output.replay_gain & PLAYER_RGAIN_ENABLED) &&
476 ! (player->output.replay_gain & PLAYER_RGAIN_SET))
477 use_rgain(player, tag->lame.replay_gain);
478 if ((tag->flags & TAG_XING) &&
479 (tag->xing.flags & TAG_XING_FRAMES))
480 {
481 player->stats.total_time = frame->header.duration;
482 mad_timer_multiply(&player->stats.total_time, tag->xing.frames);
483 } // if
484
485 /* total stream byte size adjustment */
486
487 frame_size = stream->next_frame - stream->this_frame;
488
489 if (player->stats.total_bytes == 0)
490 {
491 if ((tag->flags & TAG_XING) && (tag->xing.flags & TAG_XING_BYTES) &&
492 tag->xing.bytes > frame_size)
493 player->stats.total_bytes = tag->xing.bytes - frame_size;
494 }
495 else
496 if (player->stats.total_bytes >=
497 (unsigned long) (stream->next_frame - stream->this_frame))
498 player->stats.total_bytes -= frame_size;
499
500 return (player->options & PLAYER_OPTION_SHOWTAGSONLY) ?
501 MAD_FLOW_STOP : MAD_FLOW_IGNORE;
502 }
503 else if (player->options & PLAYER_OPTION_SHOWTAGSONLY)
504 return MAD_FLOW_STOP;
505
506 ++player->stats.absolute_framecount;
507 mad_timer_add(&player->stats.absolute_timer, frame->header.duration);
508
509 ++player->stats.global_framecount;
510 mad_timer_add(&player->stats.global_timer, frame->header.duration);
511
512 if ((player->options & PLAYER_OPTION_SKIP) &&
513 mad_timer_compare(player->stats.global_timer,
514 player->global_start) < 0)
515 return MAD_FLOW_IGNORE;
516 }
517
518 /* run the filter chain */
519
520 return filter_run(player->output.filters, frame);
521 } // decode_filter
522
523
524 /*
525 * NAME: decode->output()
526 * DESCRIPTION: configure audio module and output decoded samples
527 */
528 static
529 enum mad_flow decode_output(void *data, struct mad_header const *header,
530 struct mad_pcm *pcm)
531 {
532 struct player *player = data;
533 struct output *output = &player->output;
534 mad_fixed_t const *ch1, *ch2;
535 unsigned int nchannels;
536 union audio_control control;
537
538 ch1 = pcm->samples[0];
539 ch2 = pcm->samples[1];
540
541 switch (nchannels = pcm->channels) {
542 case 1:
543 ch2 = 0;
544 if (output->select == PLAYER_CHANNEL_STEREO) {
545 ch2 = ch1;
546 nchannels = 2;
547 }
548 break;
549
550 case 2:
551 switch (output->select) {
552 case PLAYER_CHANNEL_RIGHT:
553 ch1 = ch2;
554 /* fall through */
555
556 case PLAYER_CHANNEL_LEFT:
557 ch2 = 0;
558 nchannels = 1;
559 /* fall through */
560
561 case PLAYER_CHANNEL_STEREO:
562 break;
563
564 default:
565 if (header->mode == MAD_MODE_DUAL_CHANNEL) {
566 if (output->select == PLAYER_CHANNEL_DEFAULT) {
567 if (player->verbosity >= -1) {
568 error("output",
569 _("no channel selected for dual channel; using first"));
570 }
571
572 output->select = -PLAYER_CHANNEL_LEFT;
573 }
574
575 ch2 = 0;
576 nchannels = 1;
577 }
578 }
579 }
580
581 if (output->channels_in != nchannels ||
582 output->speed_in != pcm->samplerate) {
583 unsigned int speed_request;
584
585 if (player->verbosity >= 1 &&
586 pcm->samplerate != header->samplerate) {
587 error("output", _("decoded sample frequency %u Hz"),
588 pcm->samplerate);
589 }
590
591 speed_request = output->speed_request ?
592 output->speed_request : pcm->samplerate;
593
594 audio_control_init(&control, AUDIO_COMMAND_CONFIG);
595
596 control.config.channels = nchannels;
597 control.config.speed = speed_request;
598 control.config.precision = output->precision_in;
599
600 if (output->command(&control) == -1) {
601 error("output", audio_error);
602 return MAD_FLOW_BREAK;
603 }
604
605 output->channels_in = nchannels;
606 output->speed_in = pcm->samplerate;
607
608 output->channels_out = control.config.channels;
609 output->speed_out = control.config.speed;
610 output->precision_out = control.config.precision;
611
612 if (player->verbosity >= -1 &&
613 output->channels_in != output->channels_out) {
614 if (output->channels_in == 1)
615 error("output", _("mono output not available; forcing stereo"));
616 else {
617 error("output", _("stereo output not available; using first channel "
618 "(use -m to mix)"));
619 }
620 }
621
622 if (player->verbosity >= -1 &&
623 output->precision_in &&
624 output->precision_in != output->precision_out) {
625 error("output", _("bit depth %u not available; using %u"),
626 output->precision_in, output->precision_out);
627 }
628
629 if (player->verbosity >= -1 &&
630 speed_request != output->speed_out) {
631 error("output", _("sample frequency %u Hz not available; using %u Hz"),
632 speed_request, output->speed_out);
633 }
634
635 /* check whether resampling is necessary */
636 if (abs(output->speed_out - output->speed_in) <
637 (long) FREQ_TOLERANCE * output->speed_in / 100) {
638 if (output->resampled) {
639 resample_finish(&output->resample[0]);
640 resample_finish(&output->resample[1]);
641
642 free(output->resampled);
643 output->resampled = 0;
644 }
645 }
646 else {
647 if (output->resampled) {
648 resample_finish(&output->resample[0]);
649 resample_finish(&output->resample[1]);
650 }
651 else {
652 output->resampled = malloc(sizeof(*output->resampled));
653 if (output->resampled == 0) {
654 error("output",
655 _("not enough memory to allocate resampling buffer"));
656
657 output->speed_in = 0;
658 return MAD_FLOW_BREAK;
659 }
660 }
661
662 if (resample_init(&output->resample[0],
663 output->speed_in, output->speed_out) == -1 ||
664 resample_init(&output->resample[1],
665 output->speed_in, output->speed_out) == -1) {
666 error("output", _("cannot resample %u Hz to %u Hz"),
667 output->speed_in, output->speed_out);
668
669 free(output->resampled);
670 output->resampled = 0;
671
672 output->speed_in = 0;
673 return MAD_FLOW_BREAK;
674 }
675 else if (player->verbosity >= -1) {
676 error("output", _("resampling %u Hz to %u Hz"),
677 output->speed_in, output->speed_out);
678 }
679 }
680 }
681
682 audio_control_init(&control, AUDIO_COMMAND_PLAY);
683
684 if (output->channels_in != output->channels_out)
685 ch2 = (output->channels_out == 2) ? ch1 : 0;
686
687 if (output->resampled) {
688 control.play.nsamples = resample_block(&output->resample[0],
689 pcm->length, ch1,
690 (*output->resampled)[0]);
691 control.play.samples[0] = (*output->resampled)[0];
692
693 if (ch2 == ch1)
694 control.play.samples[1] = control.play.samples[0];
695 else if (ch2) {
696 resample_block(&output->resample[1], pcm->length, ch2,
697 (*output->resampled)[1]);
698 control.play.samples[1] = (*output->resampled)[1];
699 }
700 else
701 control.play.samples[1] = 0;
702 }
703 else {
704 control.play.nsamples = pcm->length;
705 control.play.samples[0] = ch1;
706 control.play.samples[1] = ch2;
707 }
708
709 control.play.mode = output->mode;
710 control.play.stats = &player->stats.audio;
711
712 if (output->command(&control) == -1) {
713 error("output", audio_error);
714 return MAD_FLOW_BREAK;
715 }
716
717 ++player->stats.play_framecount;
718 mad_timer_add(&player->stats.play_timer, header->duration);
719
720 return MAD_FLOW_CONTINUE;
721 }
722
723 /*
724 * NAME: decode->error()
725 * DESCRIPTION: handle a decoding error
726 */
727 static
728 enum mad_flow decode_error(void *data, struct mad_stream *stream,
729 struct mad_frame *frame)
730 {
731 struct player *player = data;
732
733 switch (stream->error) {
734 case MAD_ERROR_BADDATAPTR:
735 return MAD_FLOW_CONTINUE;
736
737 /* fall through */
738
739 default:
740 if (player->verbosity >= -1 &&
741 !(player->options & PLAYER_OPTION_SHOWTAGSONLY) &&
742 ((stream->error == MAD_ERROR_LOSTSYNC && !player->input.eof)
743 || stream->sync) &&
744 player->stats.global_framecount != player->stats.error_frame) {
745 error("error", _("frame %lu: %s"),
746 player->stats.absolute_framecount, mad_stream_errorstr(stream));
747 player->stats.error_frame = player->stats.global_framecount;
748 }
749 }
750
751 if (stream->error == MAD_ERROR_BADCRC) {
752 if (player->stats.global_framecount == player->stats.mute_frame)
753 mad_frame_mute(frame);
754
755 player->stats.mute_frame = player->stats.global_framecount + 1;
756
757 return MAD_FLOW_IGNORE;
758 }
759
760 return MAD_FLOW_CONTINUE;
761 }
762
763 /*
764 * NAME: decode()
765 * DESCRIPTION: decode and output audio for an open file
766 */
767 static int decode (struct player *player)
768 {
769 struct stat stat;
770 struct mad_decoder decoder;
771 int options, result;
772
773 if (fstat(player->input.fd, &stat) == -1) {
774 error("decode", ":fstat");
775 return -1;
776 }
777
778 if (S_ISREG(stat.st_mode))
779 player->stats.total_bytes = stat.st_size;
780
781 tag_init(&player->input.tag);
782
783 /* prepare input buffers */
784
785 # if defined(HAVE_MMAP)
786 if (S_ISREG(stat.st_mode) && stat.st_size > 0) {
787 player->input.length = stat.st_size;
788
789 player->input.fdm = map_file(player->input.fd, player->input.length);
790 if (player->input.fdm == 0 && player->verbosity >= 0)
791 error("decode", ":mmap");
792
793 player->input.data = player->input.fdm;
794 }
795 # endif
796
797 if (player->input.data == 0) {
798 player->input.data = malloc(MPEG_BUFSZ);
799 if (player->input.data == 0) {
800 error("decode", _("not enough memory to allocate input buffer"));
801 return -1;
802 }
803
804 player->input.length = 0;
805 }
806
807 player->input.eof = 0;
808
809 /* reset statistics */
810 player->stats.absolute_timer = mad_timer_zero;
811 player->stats.play_timer = mad_timer_zero;
812 player->stats.absolute_framecount = 0;
813 player->stats.play_framecount = 0;
814 player->stats.error_frame = -1;
815 player->stats.vbr = 0;
816 player->stats.bitrate = 0;
817 player->stats.vbr_frames = 0;
818 player->stats.vbr_rate = 0;
819 player->stats.audio.clipped_samples = 0;
820 player->stats.audio.peak_clipping = 0;
821 player->stats.audio.peak_sample = 0;
822
823 mad_decoder_init(&decoder, player,
824 # if defined(HAVE_MMAP)
825 player->input.fdm ? decode_input_mmap :
826 # endif
827 decode_input_read,
828 decode_header, decode_filter,
829 player->output.command ? decode_output : 0,
830 decode_error, 0);
831
832 options = 0;
833 if (player->options & PLAYER_OPTION_DOWNSAMPLE)
834 options |= MAD_OPTION_HALFSAMPLERATE;
835 if (player->options & PLAYER_OPTION_IGNORECRC)
836 options |= MAD_OPTION_IGNORECRC;
837
838 mad_decoder_options(&decoder, options);
839
840 result = mad_decoder_run(&decoder, MAD_DECODER_MODE_SYNC);
841
842 mad_decoder_finish(&decoder);
843
844 # if defined(HAVE_MMAP)
845 if (player->input.fdm) {
846 if (unmap_file(player->input.fdm, player->input.length) == -1) {
847 error("decode", ":munmap");
848 result = -1;
849 }
850
851 player->input.fdm = 0;
852
853 if (!player->input.eof)
854 player->input.data = 0;
855 }
856 # endif
857
858 if (player->input.data) {
859 free(player->input.data);
860 player->input.data = 0;
861 }
862
863 tag_finish(&player->input.tag);
864
865 return result;
866 }
867
868 /*
869 * NAME: play_one()
870 * DESCRIPTION: open and play a single file
871 */
872 static int play_one (struct player *player)
873 {
874 char const *file = player->input.path;
875 int result;
876
877 player->input.fd = open(file, O_RDONLY | O_BINARY);
878 if (player->input.fd == -1)
879 {
880 error(0, ":", file);
881 return -1;
882 } // if
883
884 /* reset file information */
885
886 player->stats.total_bytes = 0;
887 player->stats.total_time = mad_timer_zero;
888 player->output.replay_gain &= ~PLAYER_RGAIN_SET;
889 result = decode (player);
890
891 if (player->input.fd != STDIN_FILENO &&
892 close(player->input.fd) == -1 && result == 0)
893 {
894 error(0, ":", player->input.path);
895 result = -1;
896 } // if
897
898 return result;
899 } // play_one
900
901 /*
902 * NAME: addfilter()
903 * DESCRIPTION: insert a filter at the beginning of the filter chain
904 */
905 static
906 int addfilter(struct player *player, filter_func_t *func, void *data)
907 {
908 struct filter *filter;
909
910 filter = filter_new(func, data, player->output.filters);
911 if (filter == 0)
912 return -1;
913
914 player->output.filters = filter;
915
916 return 0;
917 }
918
919 /*
920 * NAME: setup_filters()
921 * DESCRIPTION: create output filters
922 */
923 static
924 int setup_filters(struct player *player)
925 {
926 /* filters must be added in reverse order */
927
928 # if defined(EXPERIMENTAL)
929 if ((player->options & PLAYER_OPTION_EXTERNALMIX) &&
930 addfilter(player, mixer_filter, stdout) == -1)
931 return -1;
932
933 if ((player->options & PLAYER_OPTION_EXPERIMENTAL) &&
934 addfilter(player, experimental_filter, 0) == -1)
935 return -1;
936 # endif
937
938 if ((player->options & PLAYER_OPTION_FADEIN) &&
939 addfilter(player, fadein_filter, player) == -1)
940 return -1;
941
942 addfilter(player, gain_filter, &player->output.gain);
943
944 return 0;
945 }
946
947 /*
948 * NAME: silence()
949 * DESCRIPTION: output silence for a period of time
950 */
951 static int silence (struct player *player, mad_timer_t duration)
952 {
953 union audio_control control;
954 unsigned int nchannels, speed, nsamples;
955 mad_fixed_t *samples;
956 mad_timer_t unit;
957 int result = 0;
958
959 audio_control_init(&control, AUDIO_COMMAND_CONFIG);
960 control.config.channels = 2;
961 control.config.speed = 44100;
962
963 if (player->output.command(&control) == -1)
964 {
965 error("audio", audio_error);
966 return -1;
967 }
968
969 nchannels = control.config.channels;
970 speed = control.config.speed;
971 nsamples = speed > MAX_NSAMPLES ? MAX_NSAMPLES : speed;
972
973 player->output.channels_in = nchannels;
974 player->output.channels_out = nchannels;
975 player->output.speed_in = speed;
976 player->output.speed_out = speed;
977
978 samples = calloc(nsamples, sizeof(mad_fixed_t));
979 if (samples == 0) {
980 error ("silence", _("not enough memory to allocate sample buffer"));
981 return -1;
982 }
983
984 audio_control_init(&control, AUDIO_COMMAND_PLAY);
985 control.play.nsamples = nsamples;
986 control.play.samples[0] = samples;
987 control.play.samples[1] = (nchannels == 2) ? samples : 0;
988 control.play.mode = player->output.mode;
989 control.play.stats = &player->stats.audio;
990
991 mad_timer_set(&unit, 0, nsamples, speed);
992
993 for (mad_timer_negate(&duration);
994 mad_timer_sign(duration) < 0;
995 mad_timer_add(&duration, unit))
996 {
997 if (mad_timer_compare(unit, mad_timer_abs(duration)) > 0) {
998 unit = mad_timer_abs(duration);
999 control.play.nsamples = mad_timer_fraction(unit, speed);
1000 }
1001
1002 if (player->output.command(&control) == -1) {
1003 error("audio", audio_error);
1004 goto fail;
1005 }
1006
1007 mad_timer_add(&player->stats.global_timer, unit);
1008 } // forh
1009
1010 if (0) {
1011 fail:
1012 result = -1;
1013 }
1014
1015 free(samples);
1016
1017 return result;
1018 }
1019
1020 /*
1021 * NAME: player->run()
1022 * DESCRIPTION: begin playback
1023 */
1024 int player_run (struct player *player)
1025 {
1026 int result = 0;
1027 union audio_control control;
1028
1029 /* set up filters */
1030
1031 if (setup_filters (player) == -1)
1032 {
1033 error("filter", _("not enough memory to allocate filters"));
1034 goto fail;
1035 }
1036
1037 set_gain (player, 0);
1038
1039 /* initialize audio */
1040
1041 if (player->output.command)
1042 {
1043 audio_control_init (&control, AUDIO_COMMAND_INIT);
1044 control.init.path = player->output.path;
1045
1046 if (player->output.command (&control) == -1)
1047 {
1048 error("audio", audio_error, control.init.path);
1049 goto fail;
1050 }
1051
1052 if ((player->options & PLAYER_OPTION_SKIP) &&
1053 mad_timer_sign(player->global_start) < 0)
1054 {
1055 player->stats.global_timer = player->global_start;
1056
1057 if (silence (player, mad_timer_abs (player->global_start)) == -1)
1058 result = -1;
1059 }
1060 } // if
1061
1062 if (result == 0)
1063 result = play_one (player);
1064
1065 /* drain and close audio */
1066
1067 if (player->output.command)
1068 {
1069 audio_control_init(&control, AUDIO_COMMAND_FINISH);
1070
1071 if (player->output.command(&control) == -1)
1072 {
1073 error("audio", audio_error);
1074 goto fail;
1075 } // if
1076 } // if
1077
1078 if (0)
1079 {
1080 fail:
1081 result = -1;
1082 } // if
1083 return result;
1084 } // player_run
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: player.h,v 1.24 2004/02/23 21:34:53 rob Exp $
19 */
20
21 # ifndef PLAYER_H
22 # define PLAYER_H
23
24 # include <stdio.h>
25 # include <mad.h>
26
27 # include "audio.h"
28 # include "resample.h"
29 # include "filter.h"
30 # include "tag.h"
31
32 enum {
33 PLAYER_OPTION_SHUFFLE = 0x0001,
34 PLAYER_OPTION_DOWNSAMPLE = 0x0002,
35 PLAYER_OPTION_IGNORECRC = 0x0004,
36 PLAYER_OPTION_IGNOREVOLADJ = 0x0008,
37
38 PLAYER_OPTION_SKIP = 0x0010,
39 PLAYER_OPTION_TIMED = 0x0020,
40 PLAYER_OPTION_TTYCONTROL = 0x0040,
41 PLAYER_OPTION_STREAMID3 = 0x0080,
42
43 PLAYER_OPTION_FADEIN = 0x0100,
44 PLAYER_OPTION_FADEOUT = 0x0200,
45 PLAYER_OPTION_GAP = 0x0400,
46 PLAYER_OPTION_CROSSFADE = 0x0800,
47
48 # if defined(EXPERIMENTAL)
49 PLAYER_OPTION_EXTERNALMIX = 0x1000,
50 PLAYER_OPTION_EXPERIMENTAL = 0x2000,
51 # endif
52
53 PLAYER_OPTION_SHOWTAGSONLY = 0x4000
54 };
55
56 enum player_control {
57 PLAYER_CONTROL_DEFAULT,
58 PLAYER_CONTROL_NEXT,
59 PLAYER_CONTROL_PREVIOUS,
60 PLAYER_CONTROL_REPLAY,
61 PLAYER_CONTROL_STOP
62 };
63
64 enum player_channel {
65 PLAYER_CHANNEL_DEFAULT = 0,
66 PLAYER_CHANNEL_LEFT = 1,
67 PLAYER_CHANNEL_RIGHT = 2,
68 PLAYER_CHANNEL_MONO = 3,
69 PLAYER_CHANNEL_STEREO = 4
70 };
71
72 enum stats_show {
73 STATS_SHOW_OVERALL,
74 STATS_SHOW_CURRENT,
75 STATS_SHOW_REMAINING
76 };
77
78 enum {
79 DB_MIN = -175, /* minimum representable mad_fixed_t factor */
80 DB_MAX = +18 /* maximum representable mad_fixed_t factor */
81 };
82
83 enum {
84 PLAYER_RGAIN_ENABLED = 0x0001,
85 PLAYER_RGAIN_SET = 0x0002,
86 PLAYER_RGAIN_AUDIOPHILE = 0x0010,
87 PLAYER_RGAIN_HARDLIMIT = 0x0020
88 };
89
90 struct player
91 {
92 int verbosity;
93
94 int options;
95 int repeat;
96
97 enum player_control control;
98
99 mad_timer_t global_start;
100 mad_timer_t global_stop;
101
102 mad_timer_t fade_in;
103 mad_timer_t fade_out;
104 mad_timer_t gap;
105
106 struct input
107 {
108 char const *path;
109
110 int fd;
111 # if defined(HAVE_MMAP)
112 unsigned char *fdm;
113 # endif
114
115 unsigned char *data;
116 unsigned long length;
117
118 int eof;
119
120 struct tag tag;
121 } input;
122
123 struct output
124 {
125 enum audio_mode mode;
126
127 double voladj_db;
128 double attamp_db;
129 mad_fixed_t gain;
130
131 int replay_gain;
132
133 struct filter *filters;
134
135 unsigned int channels_in;
136 unsigned int channels_out;
137 enum player_channel select;
138
139 unsigned int speed_in;
140 unsigned int speed_out;
141 unsigned int speed_request;
142
143 unsigned int precision_in;
144 unsigned int precision_out;
145
146 char const *path;
147 audio_ctlfunc_t *command;
148
149 struct resample_state resample[2];
150 mad_fixed_t (*resampled)[2][MAX_NSAMPLES];
151 } output;
152
153 struct ancillary
154 {
155 char const *path;
156 FILE *file;
157
158 unsigned short buffer;
159 unsigned short length;
160 } ancillary;
161
162 struct stats {
163 enum stats_show show;
164 char const *label;
165
166 unsigned long total_bytes;
167 mad_timer_t total_time;
168
169 mad_timer_t global_timer;
170 mad_timer_t absolute_timer;
171 mad_timer_t play_timer;
172
173 unsigned long global_framecount;
174 unsigned long absolute_framecount;
175 unsigned long play_framecount;
176
177 unsigned long error_frame;
178 unsigned long mute_frame;
179
180 int vbr;
181 unsigned int bitrate;
182 unsigned long vbr_frames;
183 unsigned long vbr_rate;
184
185 signed long nsecs;
186
187 struct audio_stats audio;
188 } stats;
189 };
190
191 void player_init(struct player *);
192 void player_finish(struct player *);
193
194 int player_run(struct player *);
195
196 # endif
0 #!/bin/sh
1 # py-compile - Compile a Python program
2
3 scriptversion=2011-06-08.12; # UTC
4
5 # Copyright (C) 2000-2014 Free Software Foundation, Inc.
6
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # This file is maintained in Automake, please report
26 # bugs to <bug-automake@gnu.org> or send patches to
27 # <automake-patches@gnu.org>.
28
29 if [ -z "$PYTHON" ]; then
30 PYTHON=python
31 fi
32
33 me=py-compile
34
35 usage_error ()
36 {
37 echo "$me: $*" >&2
38 echo "Try '$me --help' for more information." >&2
39 exit 1
40 }
41
42 basedir=
43 destdir=
44 while test $# -ne 0; do
45 case "$1" in
46 --basedir)
47 if test $# -lt 2; then
48 usage_error "option '--basedir' requires an argument"
49 else
50 basedir=$2
51 fi
52 shift
53 ;;
54 --destdir)
55 if test $# -lt 2; then
56 usage_error "option '--destdir' requires an argument"
57 else
58 destdir=$2
59 fi
60 shift
61 ;;
62 -h|--help)
63 cat <<\EOF
64 Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
65
66 Byte compile some python scripts FILES. Use --destdir to specify any
67 leading directory path to the FILES that you don't want to include in the
68 byte compiled file. Specify --basedir for any additional path information you
69 do want to be shown in the byte compiled file.
70
71 Example:
72 py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
73
74 Report bugs to <bug-automake@gnu.org>.
75 EOF
76 exit $?
77 ;;
78 -v|--version)
79 echo "$me $scriptversion"
80 exit $?
81 ;;
82 --)
83 shift
84 break
85 ;;
86 -*)
87 usage_error "unrecognized option '$1'"
88 ;;
89 *)
90 break
91 ;;
92 esac
93 shift
94 done
95
96 files=$*
97 if test -z "$files"; then
98 usage_error "no files given"
99 fi
100
101 # if basedir was given, then it should be prepended to filenames before
102 # byte compilation.
103 if [ -z "$basedir" ]; then
104 pathtrans="path = file"
105 else
106 pathtrans="path = os.path.join('$basedir', file)"
107 fi
108
109 # if destdir was given, then it needs to be prepended to the filename to
110 # byte compile but not go into the compiled file.
111 if [ -z "$destdir" ]; then
112 filetrans="filepath = path"
113 else
114 filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
115 fi
116
117 $PYTHON -c "
118 import sys, os, py_compile, imp
119
120 files = '''$files'''
121
122 sys.stdout.write('Byte-compiling python modules...\n')
123 for file in files.split():
124 $pathtrans
125 $filetrans
126 if not os.path.exists(filepath) or not (len(filepath) >= 3
127 and filepath[-3:] == '.py'):
128 continue
129 sys.stdout.write(file)
130 sys.stdout.flush()
131 if hasattr(imp, 'get_tag'):
132 py_compile.compile(filepath, imp.cache_from_source(filepath), path)
133 else:
134 py_compile.compile(filepath, filepath + 'c', path)
135 sys.stdout.write('\n')" || exit $?
136
137 # this will fail for python < 1.5, but that doesn't matter ...
138 $PYTHON -O -c "
139 import sys, os, py_compile, imp
140
141 # pypy does not use .pyo optimization
142 if hasattr(sys, 'pypy_translation_info'):
143 sys.exit(0)
144
145 files = '''$files'''
146 sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
147 for file in files.split():
148 $pathtrans
149 $filetrans
150 if not os.path.exists(filepath) or not (len(filepath) >= 3
151 and filepath[-3:] == '.py'):
152 continue
153 sys.stdout.write(file)
154 sys.stdout.flush()
155 if hasattr(imp, 'get_tag'):
156 py_compile.compile(filepath, imp.cache_from_source(filepath, False), path)
157 else:
158 py_compile.compile(filepath, filepath + 'o', path)
159 sys.stdout.write('\n')" 2>/dev/null || :
160
161 # Local Variables:
162 # mode: shell-script
163 # sh-indentation: 2
164 # eval: (add-hook 'write-file-hooks 'time-stamp)
165 # time-stamp-start: "scriptversion="
166 # time-stamp-format: "%:y-%02m-%02d.%02H"
167 # time-stamp-time-zone: "UTC"
168 # time-stamp-end: "; # UTC"
169 # End:
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: resample.c,v 1.11 2004/01/23 09:41:32 rob Exp $
19 */
20
21 # ifdef HAVE_CONFIG_H
22 # include "config.h"
23 # endif
24
25 # include "global.h"
26
27 # include <string.h>
28 # include <mad.h>
29
30 # include "resample.h"
31 # include "audio.h"
32
33 /*
34 * NAME: resample_init()
35 * DESCRIPTION: initialize resampling state
36 */
37 int resample_init(struct resample_state *state,
38 unsigned int oldrate, unsigned int newrate)
39 {
40 mad_fixed_t ratio;
41
42 if (newrate == 0)
43 return -1;
44
45 ratio = mad_f_div(oldrate, newrate);
46 if (ratio <= 0 || ratio > MAX_RESAMPLEFACTOR * MAD_F_ONE)
47 return -1;
48
49 state->ratio = ratio;
50
51 state->step = 0;
52 state->last = 0;
53
54 return 0;
55 }
56
57 /*
58 * NAME: resample_block()
59 * DESCRIPTION: algorithmically change the sampling rate of a PCM sample block
60 */
61 unsigned int resample_block(struct resample_state *state,
62 unsigned int nsamples, mad_fixed_t const *old,
63 mad_fixed_t *new)
64 {
65 mad_fixed_t const *end, *begin;
66
67 /*
68 * This resampling algorithm is based on a linear interpolation, which is
69 * not at all the best sounding but is relatively fast and efficient.
70 *
71 * A better algorithm would be one that implements a bandlimited
72 * interpolation.
73 */
74
75 if (state->ratio == MAD_F_ONE) {
76 memcpy(new, old, nsamples * sizeof(mad_fixed_t));
77 return nsamples;
78 }
79
80 end = old + nsamples;
81 begin = new;
82
83 if (state->step < 0) {
84 state->step = mad_f_fracpart(-state->step);
85
86 while (state->step < MAD_F_ONE) {
87 *new++ = state->step ?
88 state->last + mad_f_mul(*old - state->last, state->step) : state->last;
89
90 state->step += state->ratio;
91 if (((state->step + 0x00000080L) & 0x0fffff00L) == 0)
92 state->step = (state->step + 0x00000080L) & ~0x0fffffffL;
93 }
94
95 state->step -= MAD_F_ONE;
96 }
97
98 while (end - old > 1 + mad_f_intpart(state->step)) {
99 old += mad_f_intpart(state->step);
100 state->step = mad_f_fracpart(state->step);
101
102 *new++ = state->step ?
103 *old + mad_f_mul(old[1] - old[0], state->step) : *old;
104
105 state->step += state->ratio;
106 if (((state->step + 0x00000080L) & 0x0fffff00L) == 0)
107 state->step = (state->step + 0x00000080L) & ~0x0fffffffL;
108 }
109
110 if (end - old == 1 + mad_f_intpart(state->step)) {
111 state->last = end[-1];
112 state->step = -state->step;
113 }
114 else
115 state->step -= mad_f_fromint(end - old);
116
117 return new - begin;
118 }
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: resample.h,v 1.9 2004/01/23 09:41:32 rob Exp $
19 */
20
21 # ifndef RESAMPLE_H
22 # define RESAMPLE_H
23
24 # include <mad.h>
25
26 struct resample_state {
27 mad_fixed_t ratio;
28
29 mad_fixed_t step;
30 mad_fixed_t last;
31 };
32
33 int resample_init(struct resample_state *, unsigned int, unsigned int);
34
35 # define resample_finish(state) /* nothing */
36
37 unsigned int resample_block(struct resample_state *, unsigned int,
38 mad_fixed_t const *, mad_fixed_t *);
39
40 # endif
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: rgain.c,v 1.1 2004/02/23 21:34:53 rob Exp $
19 */
20
21 # ifdef HAVE_CONFIG_H
22 # include "config.h"
23 # endif
24
25 # include "global.h"
26
27 # include <mad.h>
28
29 # include "rgain.h"
30 # include "gettext.h"
31
32 /*
33 * NAME: rgain->parse()
34 * DESCRIPTION: parse a 16-bit Replay Gain field
35 */
36 void rgain_parse(struct rgain *rgain, struct mad_bitptr *ptr)
37 {
38 int negative;
39
40 rgain->name = mad_bit_read(ptr, 3);
41 rgain->originator = mad_bit_read(ptr, 3);
42
43 negative = mad_bit_read(ptr, 1);
44 rgain->adjustment = mad_bit_read(ptr, 9);
45
46 if (negative)
47 rgain->adjustment = -rgain->adjustment;
48 }
49
50 /*
51 * NAME: rgain->originator()
52 * DESCRIPTION: return a string description of a Replay Gain originator
53 */
54 char const *rgain_originator(struct rgain const *rgain)
55 {
56 char const *originator = 0;
57
58 switch (rgain->originator) {
59 case RGAIN_ORIGINATOR_UNSPECIFIED:
60 return 0;
61 case RGAIN_ORIGINATOR_PRESET:
62 originator = _("preset");
63 break;
64 case RGAIN_ORIGINATOR_USER:
65 originator = _("user");
66 break;
67 case RGAIN_ORIGINATOR_AUTOMATIC:
68 originator = _("automatic");
69 break;
70 }
71
72 return originator ? originator : _("other");
73 }
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: rgain.h,v 1.1 2004/02/23 21:34:53 rob Exp $
19 */
20
21 # ifndef RGAIN_H
22 # define RGAIN_H
23
24 # include <mad.h>
25
26 # define RGAIN_REFERENCE 83 /* reference level (dB SPL) */
27
28 enum rgain_name {
29 RGAIN_NAME_NOT_SET = 0x0,
30 RGAIN_NAME_RADIO = 0x1,
31 RGAIN_NAME_AUDIOPHILE = 0x2
32 };
33
34 enum rgain_originator {
35 RGAIN_ORIGINATOR_UNSPECIFIED = 0x0,
36 RGAIN_ORIGINATOR_PRESET = 0x1,
37 RGAIN_ORIGINATOR_USER = 0x2,
38 RGAIN_ORIGINATOR_AUTOMATIC = 0x3
39 };
40
41 struct rgain {
42 enum rgain_name name; /* profile (see above) */
43 enum rgain_originator originator; /* source (see above) */
44 signed short adjustment; /* in units of 0.1 dB */
45 };
46
47 # define RGAIN_SET(rgain) ((rgain)->name != RGAIN_NAME_NOT_SET)
48
49 # define RGAIN_VALID(rgain) \
50 (((rgain)->name == RGAIN_NAME_RADIO || \
51 (rgain)->name == RGAIN_NAME_AUDIOPHILE) && \
52 (rgain)->originator != RGAIN_ORIGINATOR_UNSPECIFIED)
53
54 # define RGAIN_DB(rgain) ((rgain)->adjustment / 10.0)
55
56 void rgain_parse(struct rgain *, struct mad_bitptr *);
57 char const *rgain_originator(struct rgain const *);
58
59 # endif
0 timestamp for config.h
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: tag.c,v 1.2 2004/02/23 21:34:53 rob Exp $
19 */
20
21 # ifdef HAVE_CONFIG_H
22 # include "config.h"
23 # endif
24
25 # include "global.h"
26
27 # include <string.h>
28 # include <stdio.h>
29 # include <mad.h>
30
31 # include "crc.h"
32 # include "rgain.h"
33 # include "tag.h"
34
35 # define XING_MAGIC (('X' << 24) | ('i' << 16) | ('n' << 8) | 'g')
36 # define INFO_MAGIC (('I' << 24) | ('n' << 16) | ('f' << 8) | 'o')
37 # define LAME_MAGIC (('L' << 24) | ('A' << 16) | ('M' << 8) | 'E')
38
39 /*
40 * NAME: tag->init()
41 * DESCRIPTION: initialize tag structure
42 */
43 void tag_init(struct tag *tag)
44 {
45 tag->flags = 0;
46 tag->encoder[0] = 0;
47 }
48
49 /*
50 * NAME: parse_xing()
51 * DESCRIPTION: parse a Xing VBR tag
52 */
53 static
54 int parse_xing(struct tag_xing *xing,
55 struct mad_bitptr *ptr, unsigned int *bitlen)
56 {
57 if (*bitlen < 32)
58 goto fail;
59
60 xing->flags = mad_bit_read(ptr, 32);
61 *bitlen -= 32;
62
63 if (xing->flags & TAG_XING_FRAMES) {
64 if (*bitlen < 32)
65 goto fail;
66
67 xing->frames = mad_bit_read(ptr, 32);
68 *bitlen -= 32;
69 }
70
71 if (xing->flags & TAG_XING_BYTES) {
72 if (*bitlen < 32)
73 goto fail;
74
75 xing->bytes = mad_bit_read(ptr, 32);
76 *bitlen -= 32;
77 }
78
79 if (xing->flags & TAG_XING_TOC) {
80 int i;
81
82 if (*bitlen < 800)
83 goto fail;
84
85 for (i = 0; i < 100; ++i)
86 xing->toc[i] = mad_bit_read(ptr, 8);
87
88 *bitlen -= 800;
89 }
90
91 if (xing->flags & TAG_XING_SCALE) {
92 if (*bitlen < 32)
93 goto fail;
94
95 xing->scale = mad_bit_read(ptr, 32);
96 *bitlen -= 32;
97 }
98
99 return 0;
100
101 fail:
102 xing->flags = 0;
103 return -1;
104 }
105
106 /*
107 * NAME: parse_lame()
108 * DESCRIPTION: parse a LAME tag
109 */
110 static
111 int parse_lame (struct tag_lame *lame,
112 struct mad_bitptr *ptr, unsigned int *bitlen,
113 unsigned short crc)
114 {
115 struct mad_bitptr save = *ptr;
116 unsigned long magic;
117 unsigned char const *version;
118
119 if (*bitlen < 36 * 8)
120 goto fail;
121
122 /* bytes $9A-$A4: Encoder short VersionString */
123
124 magic = mad_bit_read(ptr, 4 * 8);
125 version = mad_bit_nextbyte (ptr);
126
127 mad_bit_skip(ptr, 5 * 8);
128
129 /* byte $A5: Info Tag revision + VBR method */
130
131 lame->revision = mad_bit_read(ptr, 4);
132 if (lame->revision == 15)
133 goto fail;
134
135 lame->vbr_method = mad_bit_read(ptr, 4);
136
137 /* byte $A6: Lowpass filter value (Hz) */
138
139 lame->lowpass_filter = mad_bit_read(ptr, 8) * 100;
140
141 /* bytes $A7-$AA: 32 bit "Peak signal amplitude" */
142
143 lame->peak = mad_bit_read(ptr, 32) << 5;
144
145 /* bytes $AB-$AC: 16 bit "Radio Replay Gain" */
146
147 rgain_parse(&lame->replay_gain[0], ptr);
148
149 /* bytes $AD-$AE: 16 bit "Audiophile Replay Gain" */
150
151 rgain_parse(&lame->replay_gain[1], ptr);
152
153 /*
154 * As of version 3.95.1, LAME writes Replay Gain values with a reference of
155 * 89 dB SPL instead of the 83 dB specified in the Replay Gain proposed
156 * standard. Here we compensate for the heresy.
157 */
158 if (magic == LAME_MAGIC) {
159 char str[6];
160 unsigned major = 0, minor = 0, patch = 0;
161 int i;
162
163 memcpy(str, version, 5);
164 str[5] = 0;
165
166 sscanf(str, "%u.%u.%u", &major, &minor, &patch);
167
168 if (major > 3 ||
169 (major == 3 && (minor > 95 ||
170 (minor == 95 && str[4] == '.')))) {
171 for (i = 0; i < 2; ++i) {
172 if (RGAIN_SET(&lame->replay_gain[i]))
173 lame->replay_gain[i].adjustment -= 60; /* 6.0 dB */
174 }
175 }
176 }
177
178 /* byte $AF: Encoding flags + ATH Type */
179
180 lame->flags = mad_bit_read(ptr, 4);
181 lame->ath_type = mad_bit_read(ptr, 4);
182
183 /* byte $B0: if ABR {specified bitrate} else {minimal bitrate} */
184
185 lame->bitrate = mad_bit_read(ptr, 8);
186
187 /* bytes $B1-$B3: Encoder delays */
188
189 lame->start_delay = mad_bit_read(ptr, 12);
190 lame->end_padding = mad_bit_read(ptr, 12);
191
192 /* byte $B4: Misc */
193
194 lame->source_samplerate = mad_bit_read(ptr, 2);
195
196 if (mad_bit_read(ptr, 1))
197 lame->flags |= TAG_LAME_UNWISE;
198
199 lame->stereo_mode = mad_bit_read(ptr, 3);
200 lame->noise_shaping = mad_bit_read(ptr, 2);
201
202 /* byte $B5: MP3 Gain */
203
204 lame->gain = mad_bit_read(ptr, 8);
205
206 /* bytes $B6-B7: Preset and surround info */
207
208 mad_bit_skip(ptr, 2);
209
210 lame->surround = mad_bit_read(ptr, 3);
211 lame->preset = mad_bit_read(ptr, 11);
212
213 /* bytes $B8-$BB: MusicLength */
214
215 lame->music_length = mad_bit_read(ptr, 32);
216
217 /* bytes $BC-$BD: MusicCRC */
218
219 lame->music_crc = mad_bit_read(ptr, 16);
220
221 /* bytes $BE-$BF: CRC-16 of Info Tag */
222
223 if (mad_bit_read(ptr, 16) != crc)
224 goto fail;
225
226 *bitlen -= 36 * 8;
227
228 return 0;
229
230 fail:
231 *ptr = save;
232 return -1;
233 }
234
235 /*
236 * NAME: tag->parse()
237 * DESCRIPTION: parse Xing/LAME tag(s)
238 */
239 int tag_parse(struct tag *tag, struct mad_stream const *stream)
240 {
241 struct mad_bitptr ptr = stream->anc_ptr;
242 struct mad_bitptr start = ptr;
243 unsigned int bitlen = stream->anc_bitlen;
244 unsigned long magic;
245 int i;
246
247 if (bitlen < 32)
248 return -1;
249
250 magic = mad_bit_read(&ptr, 32);
251 bitlen -= 32;
252
253 if (magic != XING_MAGIC &&
254 magic != INFO_MAGIC &&
255 magic != LAME_MAGIC) {
256 /*
257 * Due to an unfortunate historical accident, a Xing VBR tag may be
258 * misplaced in a stream with CRC protection. We check for this by
259 * assuming the tag began two octets prior and the high bits of the
260 * following flags field are always zero.
261 */
262
263 if (magic != (((unsigned long) XING_MAGIC << 16) & 0xffffffffL) &&
264 magic != (((unsigned long) INFO_MAGIC << 16) & 0xffffffffL))
265 return -1;
266
267 magic >>= 16;
268
269 /* backtrack the bit pointer */
270
271 ptr = start;
272 mad_bit_skip(&ptr, 16);
273 bitlen += 16;
274 }
275
276 if ((magic & 0x0000ffffL) == (XING_MAGIC & 0x0000ffffL))
277 tag->flags |= TAG_VBR;
278
279 /* Xing tag */
280
281 if (magic == LAME_MAGIC) {
282 ptr = start;
283 bitlen += 32;
284 }
285 else if (parse_xing(&tag->xing, &ptr, &bitlen) == 0)
286 tag->flags |= TAG_XING;
287
288 /* encoder string */
289
290 if (bitlen >= 20 * 8) {
291 start = ptr;
292
293 for (i = 0; i < 20; ++i) {
294 tag->encoder[i] = mad_bit_read(&ptr, 8);
295
296 if (tag->encoder[i] == 0)
297 break;
298
299 /* keep only printable ASCII chars */
300
301 if (tag->encoder[i] < 0x20 || tag->encoder[i] >= 0x7f) {
302 tag->encoder[i] = 0;
303 break;
304 }
305 }
306
307 tag->encoder[20] = 0;
308 ptr = start;
309 }
310
311 /* LAME tag */
312
313 if (stream->next_frame - stream->this_frame >= 192 &&
314 parse_lame(&tag->lame, &ptr, &bitlen,
315 crc_compute ((const char *) stream->this_frame, 190, 0x0000)) == 0) {
316 tag->flags |= TAG_LAME;
317 tag->encoder[9] = 0;
318 }
319 else {
320 for (i = 0; i < 20; ++i) {
321 if (tag->encoder[i] == 0)
322 break;
323
324 /* stop at padding chars */
325
326 if (tag->encoder[i] == 0x55) {
327 tag->encoder[i] = 0;
328 break;
329 }
330 }
331 }
332
333 return 0;
334 }
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: tag.h,v 1.2 2004/02/23 21:34:53 rob Exp $
19 */
20
21 # ifndef TAG_H
22 # define TAG_H
23
24 # include <mad.h>
25
26 # include "rgain.h"
27
28 enum {
29 TAG_XING = 0x0001,
30 TAG_LAME = 0x0002,
31 TAG_VBR = 0x0100
32 };
33
34 enum {
35 TAG_XING_FRAMES = 0x00000001L,
36 TAG_XING_BYTES = 0x00000002L,
37 TAG_XING_TOC = 0x00000004L,
38 TAG_XING_SCALE = 0x00000008L
39 };
40
41 struct tag_xing {
42 long flags; /* valid fields (see above) */
43 unsigned long frames; /* total number of frames */
44 unsigned long bytes; /* total number of bytes */
45 unsigned char toc[100]; /* 100-point seek table */
46 long scale; /* VBR quality indicator (0 best - 100 worst) */
47 };
48
49 enum {
50 TAG_LAME_NSPSYTUNE = 0x01,
51 TAG_LAME_NSSAFEJOINT = 0x02,
52 TAG_LAME_NOGAP_NEXT = 0x04,
53 TAG_LAME_NOGAP_PREV = 0x08,
54
55 TAG_LAME_UNWISE = 0x10
56 };
57
58 enum tag_lame_vbr {
59 TAG_LAME_VBR_CONSTANT = 1,
60 TAG_LAME_VBR_ABR = 2,
61 TAG_LAME_VBR_METHOD1 = 3,
62 TAG_LAME_VBR_METHOD2 = 4,
63 TAG_LAME_VBR_METHOD3 = 5,
64 TAG_LAME_VBR_METHOD4 = 6,
65 TAG_LAME_VBR_CONSTANT2PASS = 8,
66 TAG_LAME_VBR_ABR2PASS = 9
67 };
68
69 enum tag_lame_source {
70 TAG_LAME_SOURCE_32LOWER = 0x00,
71 TAG_LAME_SOURCE_44_1 = 0x01,
72 TAG_LAME_SOURCE_48 = 0x02,
73 TAG_LAME_SOURCE_HIGHER48 = 0x03
74 };
75
76 enum tag_lame_mode {
77 TAG_LAME_MODE_MONO = 0x00,
78 TAG_LAME_MODE_STEREO = 0x01,
79 TAG_LAME_MODE_DUAL = 0x02,
80 TAG_LAME_MODE_JOINT = 0x03,
81 TAG_LAME_MODE_FORCE = 0x04,
82 TAG_LAME_MODE_AUTO = 0x05,
83 TAG_LAME_MODE_INTENSITY = 0x06,
84 TAG_LAME_MODE_UNDEFINED = 0x07
85 };
86
87 enum tag_lame_surround {
88 TAG_LAME_SURROUND_NONE = 0,
89 TAG_LAME_SURROUND_DPL = 1,
90 TAG_LAME_SURROUND_DPL2 = 2,
91 TAG_LAME_SURROUND_AMBISONIC = 3
92 };
93
94 enum tag_lame_preset {
95 TAG_LAME_PRESET_NONE = 0,
96 TAG_LAME_PRESET_V9 = 410,
97 TAG_LAME_PRESET_V8 = 420,
98 TAG_LAME_PRESET_V7 = 430,
99 TAG_LAME_PRESET_V6 = 440,
100 TAG_LAME_PRESET_V5 = 450,
101 TAG_LAME_PRESET_V4 = 460,
102 TAG_LAME_PRESET_V3 = 470,
103 TAG_LAME_PRESET_V2 = 480,
104 TAG_LAME_PRESET_V1 = 490,
105 TAG_LAME_PRESET_V0 = 500,
106 TAG_LAME_PRESET_R3MIX = 1000,
107 TAG_LAME_PRESET_STANDARD = 1001,
108 TAG_LAME_PRESET_EXTREME = 1002,
109 TAG_LAME_PRESET_INSANE = 1003,
110 TAG_LAME_PRESET_STANDARD_FAST = 1004,
111 TAG_LAME_PRESET_EXTREME_FAST = 1005,
112 TAG_LAME_PRESET_MEDIUM = 1006,
113 TAG_LAME_PRESET_MEDIUM_FAST = 1007
114 };
115
116 struct tag_lame {
117 unsigned char revision;
118 unsigned char flags;
119
120 enum tag_lame_vbr vbr_method;
121 unsigned short lowpass_filter;
122
123 mad_fixed_t peak;
124 struct rgain replay_gain[2];
125
126 unsigned char ath_type;
127 unsigned char bitrate;
128
129 unsigned short start_delay;
130 unsigned short end_padding;
131
132 enum tag_lame_source source_samplerate;
133 enum tag_lame_mode stereo_mode;
134 unsigned char noise_shaping;
135
136 signed char gain;
137 enum tag_lame_surround surround;
138 enum tag_lame_preset preset;
139
140 unsigned long music_length;
141 unsigned short music_crc;
142 };
143
144 struct tag {
145 int flags;
146 struct tag_xing xing;
147 struct tag_lame lame;
148 char encoder[21];
149 };
150
151 void tag_init(struct tag *);
152
153 # define tag_finish(tag) /* nothing */
154
155 int tag_parse(struct tag *, struct mad_stream const *);
156
157 # endif
0 #! /bin/sh
1 # Copyright (C) 2011-2014 Free Software Foundation, Inc.
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2, or (at your option)
6 # any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 # As a special exception to the GNU General Public License, if you
17 # distribute this file as part of a program that contains a
18 # configuration script generated by Autoconf, you may include it under
19 # the same distribution terms that you use for the rest of that program.
20
21 # This file is maintained in Automake, please report
22 # bugs to <bug-automake@gnu.org> or send patches to
23 # <automake-patches@gnu.org>.
24
25 scriptversion=2013-12-23.17; # UTC
26
27 # Make unconditional expansion of undefined variables an error. This
28 # helps a lot in preventing typo-related bugs.
29 set -u
30
31 me=tap-driver.sh
32
33 fatal ()
34 {
35 echo "$me: fatal: $*" >&2
36 exit 1
37 }
38
39 usage_error ()
40 {
41 echo "$me: $*" >&2
42 print_usage >&2
43 exit 2
44 }
45
46 print_usage ()
47 {
48 cat <<END
49 Usage:
50 tap-driver.sh --test-name=NAME --log-file=PATH --trs-file=PATH
51 [--expect-failure={yes|no}] [--color-tests={yes|no}]
52 [--enable-hard-errors={yes|no}] [--ignore-exit]
53 [--diagnostic-string=STRING] [--merge|--no-merge]
54 [--comments|--no-comments] [--] TEST-COMMAND
55 The '--test-name', '-log-file' and '--trs-file' options are mandatory.
56 END
57 }
58
59 # TODO: better error handling in option parsing (in particular, ensure
60 # TODO: $log_file, $trs_file and $test_name are defined).
61 test_name= # Used for reporting.
62 log_file= # Where to save the result and output of the test script.
63 trs_file= # Where to save the metadata of the test run.
64 expect_failure=0
65 color_tests=0
66 merge=0
67 ignore_exit=0
68 comments=0
69 diag_string='#'
70 while test $# -gt 0; do
71 case $1 in
72 --help) print_usage; exit $?;;
73 --version) echo "$me $scriptversion"; exit $?;;
74 --test-name) test_name=$2; shift;;
75 --log-file) log_file=$2; shift;;
76 --trs-file) trs_file=$2; shift;;
77 --color-tests) color_tests=$2; shift;;
78 --expect-failure) expect_failure=$2; shift;;
79 --enable-hard-errors) shift;; # No-op.
80 --merge) merge=1;;
81 --no-merge) merge=0;;
82 --ignore-exit) ignore_exit=1;;
83 --comments) comments=1;;
84 --no-comments) comments=0;;
85 --diagnostic-string) diag_string=$2; shift;;
86 --) shift; break;;
87 -*) usage_error "invalid option: '$1'";;
88 esac
89 shift
90 done
91
92 test $# -gt 0 || usage_error "missing test command"
93
94 case $expect_failure in
95 yes) expect_failure=1;;
96 *) expect_failure=0;;
97 esac
98
99 if test $color_tests = yes; then
100 init_colors='
101 color_map["red"]="" # Red.
102 color_map["grn"]="" # Green.
103 color_map["lgn"]="" # Light green.
104 color_map["blu"]="" # Blue.
105 color_map["mgn"]="" # Magenta.
106 color_map["std"]="" # No color.
107 color_for_result["ERROR"] = "mgn"
108 color_for_result["PASS"] = "grn"
109 color_for_result["XPASS"] = "red"
110 color_for_result["FAIL"] = "red"
111 color_for_result["XFAIL"] = "lgn"
112 color_for_result["SKIP"] = "blu"'
113 else
114 init_colors=''
115 fi
116
117 # :; is there to work around a bug in bash 3.2 (and earlier) which
118 # does not always set '$?' properly on redirection failure.
119 # See the Autoconf manual for more details.
120 :;{
121 (
122 # Ignore common signals (in this subshell only!), to avoid potential
123 # problems with Korn shells. Some Korn shells are known to propagate
124 # to themselves signals that have killed a child process they were
125 # waiting for; this is done at least for SIGINT (and usually only for
126 # it, in truth). Without the `trap' below, such a behaviour could
127 # cause a premature exit in the current subshell, e.g., in case the
128 # test command it runs gets terminated by a SIGINT. Thus, the awk
129 # script we are piping into would never seen the exit status it
130 # expects on its last input line (which is displayed below by the
131 # last `echo $?' statement), and would thus die reporting an internal
132 # error.
133 # For more information, see the Autoconf manual and the threads:
134 # <http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
135 # <http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/2009-February/004121.html>
136 trap : 1 3 2 13 15
137 if test $merge -gt 0; then
138 exec 2>&1
139 else
140 exec 2>&3
141 fi
142 "$@"
143 echo $?
144 ) | LC_ALL=C ${AM_TAP_AWK-awk} \
145 -v me="$me" \
146 -v test_script_name="$test_name" \
147 -v log_file="$log_file" \
148 -v trs_file="$trs_file" \
149 -v expect_failure="$expect_failure" \
150 -v merge="$merge" \
151 -v ignore_exit="$ignore_exit" \
152 -v comments="$comments" \
153 -v diag_string="$diag_string" \
154 '
155 # TODO: the usages of "cat >&3" below could be optimized when using
156 # GNU awk, and/on on systems that supports /dev/fd/.
157
158 # Implementation note: in what follows, `result_obj` will be an
159 # associative array that (partly) simulates a TAP result object
160 # from the `TAP::Parser` perl module.
161
162 ## ----------- ##
163 ## FUNCTIONS ##
164 ## ----------- ##
165
166 function fatal(msg)
167 {
168 print me ": " msg | "cat >&2"
169 exit 1
170 }
171
172 function abort(where)
173 {
174 fatal("internal error " where)
175 }
176
177 # Convert a boolean to a "yes"/"no" string.
178 function yn(bool)
179 {
180 return bool ? "yes" : "no";
181 }
182
183 function add_test_result(result)
184 {
185 if (!test_results_index)
186 test_results_index = 0
187 test_results_list[test_results_index] = result
188 test_results_index += 1
189 test_results_seen[result] = 1;
190 }
191
192 # Whether the test script should be re-run by "make recheck".
193 function must_recheck()
194 {
195 for (k in test_results_seen)
196 if (k != "XFAIL" && k != "PASS" && k != "SKIP")
197 return 1
198 return 0
199 }
200
201 # Whether the content of the log file associated to this test should
202 # be copied into the "global" test-suite.log.
203 function copy_in_global_log()
204 {
205 for (k in test_results_seen)
206 if (k != "PASS")
207 return 1
208 return 0
209 }
210
211 function get_global_test_result()
212 {
213 if ("ERROR" in test_results_seen)
214 return "ERROR"
215 if ("FAIL" in test_results_seen || "XPASS" in test_results_seen)
216 return "FAIL"
217 all_skipped = 1
218 for (k in test_results_seen)
219 if (k != "SKIP")
220 all_skipped = 0
221 if (all_skipped)
222 return "SKIP"
223 return "PASS";
224 }
225
226 function stringify_result_obj(result_obj)
227 {
228 if (result_obj["is_unplanned"] || result_obj["number"] != testno)
229 return "ERROR"
230
231 if (plan_seen == LATE_PLAN)
232 return "ERROR"
233
234 if (result_obj["directive"] == "TODO")
235 return result_obj["is_ok"] ? "XPASS" : "XFAIL"
236
237 if (result_obj["directive"] == "SKIP")
238 return result_obj["is_ok"] ? "SKIP" : COOKED_FAIL;
239
240 if (length(result_obj["directive"]))
241 abort("in function stringify_result_obj()")
242
243 return result_obj["is_ok"] ? COOKED_PASS : COOKED_FAIL
244 }
245
246 function decorate_result(result)
247 {
248 color_name = color_for_result[result]
249 if (color_name)
250 return color_map[color_name] "" result "" color_map["std"]
251 # If we are not using colorized output, or if we do not know how
252 # to colorize the given result, we should return it unchanged.
253 return result
254 }
255
256 function report(result, details)
257 {
258 if (result ~ /^(X?(PASS|FAIL)|SKIP|ERROR)/)
259 {
260 msg = ": " test_script_name
261 add_test_result(result)
262 }
263 else if (result == "#")
264 {
265 msg = " " test_script_name ":"
266 }
267 else
268 {
269 abort("in function report()")
270 }
271 if (length(details))
272 msg = msg " " details
273 # Output on console might be colorized.
274 print decorate_result(result) msg
275 # Log the result in the log file too, to help debugging (this is
276 # especially true when said result is a TAP error or "Bail out!").
277 print result msg | "cat >&3";
278 }
279
280 function testsuite_error(error_message)
281 {
282 report("ERROR", "- " error_message)
283 }
284
285 function handle_tap_result()
286 {
287 details = result_obj["number"];
288 if (length(result_obj["description"]))
289 details = details " " result_obj["description"]
290
291 if (plan_seen == LATE_PLAN)
292 {
293 details = details " # AFTER LATE PLAN";
294 }
295 else if (result_obj["is_unplanned"])
296 {
297 details = details " # UNPLANNED";
298 }
299 else if (result_obj["number"] != testno)
300 {
301 details = sprintf("%s # OUT-OF-ORDER (expecting %d)",
302 details, testno);
303 }
304 else if (result_obj["directive"])
305 {
306 details = details " # " result_obj["directive"];
307 if (length(result_obj["explanation"]))
308 details = details " " result_obj["explanation"]
309 }
310
311 report(stringify_result_obj(result_obj), details)
312 }
313
314 # `skip_reason` should be empty whenever planned > 0.
315 function handle_tap_plan(planned, skip_reason)
316 {
317 planned += 0 # Avoid getting confused if, say, `planned` is "00"
318 if (length(skip_reason) && planned > 0)
319 abort("in function handle_tap_plan()")
320 if (plan_seen)
321 {
322 # Error, only one plan per stream is acceptable.
323 testsuite_error("multiple test plans")
324 return;
325 }
326 planned_tests = planned
327 # The TAP plan can come before or after *all* the TAP results; we speak
328 # respectively of an "early" or a "late" plan. If we see the plan line
329 # after at least one TAP result has been seen, assume we have a late
330 # plan; in this case, any further test result seen after the plan will
331 # be flagged as an error.
332 plan_seen = (testno >= 1 ? LATE_PLAN : EARLY_PLAN)
333 # If testno > 0, we have an error ("too many tests run") that will be
334 # automatically dealt with later, so do not worry about it here. If
335 # $plan_seen is true, we have an error due to a repeated plan, and that
336 # has already been dealt with above. Otherwise, we have a valid "plan
337 # with SKIP" specification, and should report it as a particular kind
338 # of SKIP result.
339 if (planned == 0 && testno == 0)
340 {
341 if (length(skip_reason))
342 skip_reason = "- " skip_reason;
343 report("SKIP", skip_reason);
344 }
345 }
346
347 function extract_tap_comment(line)
348 {
349 if (index(line, diag_string) == 1)
350 {
351 # Strip leading `diag_string` from `line`.
352 line = substr(line, length(diag_string) + 1)
353 # And strip any leading and trailing whitespace left.
354 sub("^[ \t]*", "", line)
355 sub("[ \t]*$", "", line)
356 # Return what is left (if any).
357 return line;
358 }
359 return "";
360 }
361
362 # When this function is called, we know that line is a TAP result line,
363 # so that it matches the (perl) RE "^(not )?ok\b".
364 function setup_result_obj(line)
365 {
366 # Get the result, and remove it from the line.
367 result_obj["is_ok"] = (substr(line, 1, 2) == "ok" ? 1 : 0)
368 sub("^(not )?ok[ \t]*", "", line)
369
370 # If the result has an explicit number, get it and strip it; otherwise,
371 # automatically assing the next progresive number to it.
372 if (line ~ /^[0-9]+$/ || line ~ /^[0-9]+[^a-zA-Z0-9_]/)
373 {
374 match(line, "^[0-9]+")
375 # The final `+ 0` is to normalize numbers with leading zeros.
376 result_obj["number"] = substr(line, 1, RLENGTH) + 0
377 line = substr(line, RLENGTH + 1)
378 }
379 else
380 {
381 result_obj["number"] = testno
382 }
383
384 if (plan_seen == LATE_PLAN)
385 # No further test results are acceptable after a "late" TAP plan
386 # has been seen.
387 result_obj["is_unplanned"] = 1
388 else if (plan_seen && testno > planned_tests)
389 result_obj["is_unplanned"] = 1
390 else
391 result_obj["is_unplanned"] = 0
392
393 # Strip trailing and leading whitespace.
394 sub("^[ \t]*", "", line)
395 sub("[ \t]*$", "", line)
396
397 # This will have to be corrected if we have a "TODO"/"SKIP" directive.
398 result_obj["description"] = line
399 result_obj["directive"] = ""
400 result_obj["explanation"] = ""
401
402 if (index(line, "#") == 0)
403 return # No possible directive, nothing more to do.
404
405 # Directives are case-insensitive.
406 rx = "[ \t]*#[ \t]*([tT][oO][dD][oO]|[sS][kK][iI][pP])[ \t]*"
407
408 # See whether we have the directive, and if yes, where.
409 pos = match(line, rx "$")
410 if (!pos)
411 pos = match(line, rx "[^a-zA-Z0-9_]")
412
413 # If there was no TAP directive, we have nothing more to do.
414 if (!pos)
415 return
416
417 # Let`s now see if the TAP directive has been escaped. For example:
418 # escaped: ok \# SKIP
419 # not escaped: ok \\# SKIP
420 # escaped: ok \\\\\# SKIP
421 # not escaped: ok \ # SKIP
422 if (substr(line, pos, 1) == "#")
423 {
424 bslash_count = 0
425 for (i = pos; i > 1 && substr(line, i - 1, 1) == "\\"; i--)
426 bslash_count += 1
427 if (bslash_count % 2)
428 return # Directive was escaped.
429 }
430
431 # Strip the directive and its explanation (if any) from the test
432 # description.
433 result_obj["description"] = substr(line, 1, pos - 1)
434 # Now remove the test description from the line, that has been dealt
435 # with already.
436 line = substr(line, pos)
437 # Strip the directive, and save its value (normalized to upper case).
438 sub("^[ \t]*#[ \t]*", "", line)
439 result_obj["directive"] = toupper(substr(line, 1, 4))
440 line = substr(line, 5)
441 # Now get the explanation for the directive (if any), with leading
442 # and trailing whitespace removed.
443 sub("^[ \t]*", "", line)
444 sub("[ \t]*$", "", line)
445 result_obj["explanation"] = line
446 }
447
448 function get_test_exit_message(status)
449 {
450 if (status == 0)
451 return ""
452 if (status !~ /^[1-9][0-9]*$/)
453 abort("getting exit status")
454 if (status < 127)
455 exit_details = ""
456 else if (status == 127)
457 exit_details = " (command not found?)"
458 else if (status >= 128 && status <= 255)
459 exit_details = sprintf(" (terminated by signal %d?)", status - 128)
460 else if (status > 256 && status <= 384)
461 # We used to report an "abnormal termination" here, but some Korn
462 # shells, when a child process die due to signal number n, can leave
463 # in $? an exit status of 256+n instead of the more standard 128+n.
464 # Apparently, both behaviours are allowed by POSIX (2008), so be
465 # prepared to handle them both. See also Austing Group report ID
466 # 0000051 <http://www.austingroupbugs.net/view.php?id=51>
467 exit_details = sprintf(" (terminated by signal %d?)", status - 256)
468 else
469 # Never seen in practice.
470 exit_details = " (abnormal termination)"
471 return sprintf("exited with status %d%s", status, exit_details)
472 }
473
474 function write_test_results()
475 {
476 print ":global-test-result: " get_global_test_result() > trs_file
477 print ":recheck: " yn(must_recheck()) > trs_file
478 print ":copy-in-global-log: " yn(copy_in_global_log()) > trs_file
479 for (i = 0; i < test_results_index; i += 1)
480 print ":test-result: " test_results_list[i] > trs_file
481 close(trs_file);
482 }
483
484 BEGIN {
485
486 ## ------- ##
487 ## SETUP ##
488 ## ------- ##
489
490 '"$init_colors"'
491
492 # Properly initialized once the TAP plan is seen.
493 planned_tests = 0
494
495 COOKED_PASS = expect_failure ? "XPASS": "PASS";
496 COOKED_FAIL = expect_failure ? "XFAIL": "FAIL";
497
498 # Enumeration-like constants to remember which kind of plan (if any)
499 # has been seen. It is important that NO_PLAN evaluates "false" as
500 # a boolean.
501 NO_PLAN = 0
502 EARLY_PLAN = 1
503 LATE_PLAN = 2
504
505 testno = 0 # Number of test results seen so far.
506 bailed_out = 0 # Whether a "Bail out!" directive has been seen.
507
508 # Whether the TAP plan has been seen or not, and if yes, which kind
509 # it is ("early" is seen before any test result, "late" otherwise).
510 plan_seen = NO_PLAN
511
512 ## --------- ##
513 ## PARSING ##
514 ## --------- ##
515
516 is_first_read = 1
517
518 while (1)
519 {
520 # Involutions required so that we are able to read the exit status
521 # from the last input line.
522 st = getline
523 if (st < 0) # I/O error.
524 fatal("I/O error while reading from input stream")
525 else if (st == 0) # End-of-input
526 {
527 if (is_first_read)
528 abort("in input loop: only one input line")
529 break
530 }
531 if (is_first_read)
532 {
533 is_first_read = 0
534 nextline = $0
535 continue
536 }
537 else
538 {
539 curline = nextline
540 nextline = $0
541 $0 = curline
542 }
543 # Copy any input line verbatim into the log file.
544 print | "cat >&3"
545 # Parsing of TAP input should stop after a "Bail out!" directive.
546 if (bailed_out)
547 continue
548
549 # TAP test result.
550 if ($0 ~ /^(not )?ok$/ || $0 ~ /^(not )?ok[^a-zA-Z0-9_]/)
551 {
552 testno += 1
553 setup_result_obj($0)
554 handle_tap_result()
555 }
556 # TAP plan (normal or "SKIP" without explanation).
557 else if ($0 ~ /^1\.\.[0-9]+[ \t]*$/)
558 {
559 # The next two lines will put the number of planned tests in $0.
560 sub("^1\\.\\.", "")
561 sub("[^0-9]*$", "")
562 handle_tap_plan($0, "")
563 continue
564 }
565 # TAP "SKIP" plan, with an explanation.
566 else if ($0 ~ /^1\.\.0+[ \t]*#/)
567 {
568 # The next lines will put the skip explanation in $0, stripping
569 # any leading and trailing whitespace. This is a little more
570 # tricky in truth, since we want to also strip a potential leading
571 # "SKIP" string from the message.
572 sub("^[^#]*#[ \t]*(SKIP[: \t][ \t]*)?", "")
573 sub("[ \t]*$", "");
574 handle_tap_plan(0, $0)
575 }
576 # "Bail out!" magic.
577 # Older versions of prove and TAP::Harness (e.g., 3.17) did not
578 # recognize a "Bail out!" directive when preceded by leading
579 # whitespace, but more modern versions (e.g., 3.23) do. So we
580 # emulate the latter, "more modern" behaviour.
581 else if ($0 ~ /^[ \t]*Bail out!/)
582 {
583 bailed_out = 1
584 # Get the bailout message (if any), with leading and trailing
585 # whitespace stripped. The message remains stored in `$0`.
586 sub("^[ \t]*Bail out![ \t]*", "");
587 sub("[ \t]*$", "");
588 # Format the error message for the
589 bailout_message = "Bail out!"
590 if (length($0))
591 bailout_message = bailout_message " " $0
592 testsuite_error(bailout_message)
593 }
594 # Maybe we have too look for dianogtic comments too.
595 else if (comments != 0)
596 {
597 comment = extract_tap_comment($0);
598 if (length(comment))
599 report("#", comment);
600 }
601 }
602
603 ## -------- ##
604 ## FINISH ##
605 ## -------- ##
606
607 # A "Bail out!" directive should cause us to ignore any following TAP
608 # error, as well as a non-zero exit status from the TAP producer.
609 if (!bailed_out)
610 {
611 if (!plan_seen)
612 {
613 testsuite_error("missing test plan")
614 }
615 else if (planned_tests != testno)
616 {
617 bad_amount = testno > planned_tests ? "many" : "few"
618 testsuite_error(sprintf("too %s tests run (expected %d, got %d)",
619 bad_amount, planned_tests, testno))
620 }
621 if (!ignore_exit)
622 {
623 # Fetch exit status from the last line.
624 exit_message = get_test_exit_message(nextline)
625 if (exit_message)
626 testsuite_error(exit_message)
627 }
628 }
629
630 write_test_results()
631
632 exit 0
633
634 } # End of "BEGIN" block.
635 '
636
637 # TODO: document that we consume the file descriptor 3 :-(
638 } 3>"$log_file"
639
640 test $? -eq 0 || fatal "I/O or internal error"
641
642 # Local Variables:
643 # mode: shell-script
644 # sh-indentation: 2
645 # eval: (add-hook 'write-file-hooks 'time-stamp)
646 # time-stamp-start: "scriptversion="
647 # time-stamp-format: "%:y-%02m-%02d.%02H"
648 # time-stamp-time-zone: "UTC"
649 # time-stamp-end: "; # UTC"
650 # End:
0 #! /bin/sh
1 # test-driver - basic testsuite driver script.
2
3 scriptversion=2013-07-13.22; # UTC
4
5 # Copyright (C) 2011-2014 Free Software Foundation, Inc.
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
10 # any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program that contains a
22 # configuration script generated by Autoconf, you may include it under
23 # the same distribution terms that you use for the rest of that program.
24
25 # This file is maintained in Automake, please report
26 # bugs to <bug-automake@gnu.org> or send patches to
27 # <automake-patches@gnu.org>.
28
29 # Make unconditional expansion of undefined variables an error. This
30 # helps a lot in preventing typo-related bugs.
31 set -u
32
33 usage_error ()
34 {
35 echo "$0: $*" >&2
36 print_usage >&2
37 exit 2
38 }
39
40 print_usage ()
41 {
42 cat <<END
43 Usage:
44 test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
45 [--expect-failure={yes|no}] [--color-tests={yes|no}]
46 [--enable-hard-errors={yes|no}] [--]
47 TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
48 The '--test-name', '--log-file' and '--trs-file' options are mandatory.
49 END
50 }
51
52 test_name= # Used for reporting.
53 log_file= # Where to save the output of the test script.
54 trs_file= # Where to save the metadata of the test run.
55 expect_failure=no
56 color_tests=no
57 enable_hard_errors=yes
58 while test $# -gt 0; do
59 case $1 in
60 --help) print_usage; exit $?;;
61 --version) echo "test-driver $scriptversion"; exit $?;;
62 --test-name) test_name=$2; shift;;
63 --log-file) log_file=$2; shift;;
64 --trs-file) trs_file=$2; shift;;
65 --color-tests) color_tests=$2; shift;;
66 --expect-failure) expect_failure=$2; shift;;
67 --enable-hard-errors) enable_hard_errors=$2; shift;;
68 --) shift; break;;
69 -*) usage_error "invalid option: '$1'";;
70 *) break;;
71 esac
72 shift
73 done
74
75 missing_opts=
76 test x"$test_name" = x && missing_opts="$missing_opts --test-name"
77 test x"$log_file" = x && missing_opts="$missing_opts --log-file"
78 test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
79 if test x"$missing_opts" != x; then
80 usage_error "the following mandatory options are missing:$missing_opts"
81 fi
82
83 if test $# -eq 0; then
84 usage_error "missing argument"
85 fi
86
87 if test $color_tests = yes; then
88 # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
89 red='' # Red.
90 grn='' # Green.
91 lgn='' # Light green.
92 blu='' # Blue.
93 mgn='' # Magenta.
94 std='' # No color.
95 else
96 red= grn= lgn= blu= mgn= std=
97 fi
98
99 do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
100 trap "st=129; $do_exit" 1
101 trap "st=130; $do_exit" 2
102 trap "st=141; $do_exit" 13
103 trap "st=143; $do_exit" 15
104
105 # Test script is run here.
106 "$@" >$log_file 2>&1
107 estatus=$?
108
109 if test $enable_hard_errors = no && test $estatus -eq 99; then
110 tweaked_estatus=1
111 else
112 tweaked_estatus=$estatus
113 fi
114
115 case $tweaked_estatus:$expect_failure in
116 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
117 0:*) col=$grn res=PASS recheck=no gcopy=no;;
118 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
119 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
120 *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
121 *:*) col=$red res=FAIL recheck=yes gcopy=yes;;
122 esac
123
124 # Report the test outcome and exit status in the logs, so that one can
125 # know whether the test passed or failed simply by looking at the '.log'
126 # file, without the need of also peaking into the corresponding '.trs'
127 # file (automake bug#11814).
128 echo "$res $test_name (exit status: $estatus)" >>$log_file
129
130 # Report outcome to console.
131 echo "${col}${res}${std}: $test_name"
132
133 # Register the test result, and other relevant metadata.
134 echo ":test-result: $res" > $trs_file
135 echo ":global-test-result: $res" >> $trs_file
136 echo ":recheck: $recheck" >> $trs_file
137 echo ":copy-in-global-log: $gcopy" >> $trs_file
138
139 # Local Variables:
140 # mode: shell-script
141 # sh-indentation: 2
142 # eval: (add-hook 'write-file-hooks 'time-stamp)
143 # time-stamp-start: "scriptversion="
144 # time-stamp-format: "%:y-%02m-%02d.%02H"
145 # time-stamp-time-zone: "UTC"
146 # time-stamp-end: "; # UTC"
147 # End:
0 % texinfo.tex -- TeX macros to handle Texinfo files.
1 %
2 % Load plain if necessary, i.e., if running under initex.
3 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
4 %
5 \def\texinfoversion{2013-02-01.11}
6 %
7 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
8 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
9 % 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
10 %
11 % This texinfo.tex file is free software: you can redistribute it and/or
12 % modify it under the terms of the GNU General Public License as
13 % published by the Free Software Foundation, either version 3 of the
14 % License, or (at your option) any later version.
15 %
16 % This texinfo.tex file is distributed in the hope that it will be
17 % useful, but WITHOUT ANY WARRANTY; without even the implied warranty
18 % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 % General Public License for more details.
20 %
21 % You should have received a copy of the GNU General Public License
22 % along with this program. If not, see <http://www.gnu.org/licenses/>.
23 %
24 % As a special exception, when this file is read by TeX when processing
25 % a Texinfo source document, you may use the result without
26 % restriction. This Exception is an additional permission under section 7
27 % of the GNU General Public License, version 3 ("GPLv3").
28 %
29 % Please try the latest version of texinfo.tex before submitting bug
30 % reports; you can get the latest version from:
31 % http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
32 % http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
33 % http://www.gnu.org/software/texinfo/ (the Texinfo home page)
34 % The texinfo.tex in any given distribution could well be out
35 % of date, so if that's what you're using, please check.
36 %
37 % Send bug reports to bug-texinfo@gnu.org. Please include including a
38 % complete document in each bug report with which we can reproduce the
39 % problem. Patches are, of course, greatly appreciated.
40 %
41 % To process a Texinfo manual with TeX, it's most reliable to use the
42 % texi2dvi shell script that comes with the distribution. For a simple
43 % manual foo.texi, however, you can get away with this:
44 % tex foo.texi
45 % texindex foo.??
46 % tex foo.texi
47 % tex foo.texi
48 % dvips foo.dvi -o # or whatever; this makes foo.ps.
49 % The extra TeX runs get the cross-reference information correct.
50 % Sometimes one run after texindex suffices, and sometimes you need more
51 % than two; texi2dvi does it as many times as necessary.
52 %
53 % It is possible to adapt texinfo.tex for other languages, to some
54 % extent. You can get the existing language-specific files from the
55 % full Texinfo distribution.
56 %
57 % The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
58
59
60 \message{Loading texinfo [version \texinfoversion]:}
61
62 % If in a .fmt file, print the version number
63 % and turn on active characters that we couldn't do earlier because
64 % they might have appeared in the input file name.
65 \everyjob{\message{[Texinfo version \texinfoversion]}%
66 \catcode`+=\active \catcode`\_=\active}
67
68 \chardef\other=12
69
70 % We never want plain's \outer definition of \+ in Texinfo.
71 % For @tex, we can use \tabalign.
72 \let\+ = \relax
73
74 % Save some plain tex macros whose names we will redefine.
75 \let\ptexb=\b
76 \let\ptexbullet=\bullet
77 \let\ptexc=\c
78 \let\ptexcomma=\,
79 \let\ptexdot=\.
80 \let\ptexdots=\dots
81 \let\ptexend=\end
82 \let\ptexequiv=\equiv
83 \let\ptexexclam=\!
84 \let\ptexfootnote=\footnote
85 \let\ptexgtr=>
86 \let\ptexhat=^
87 \let\ptexi=\i
88 \let\ptexindent=\indent
89 \let\ptexinsert=\insert
90 \let\ptexlbrace=\{
91 \let\ptexless=<
92 \let\ptexnewwrite\newwrite
93 \let\ptexnoindent=\noindent
94 \let\ptexplus=+
95 \let\ptexraggedright=\raggedright
96 \let\ptexrbrace=\}
97 \let\ptexslash=\/
98 \let\ptexstar=\*
99 \let\ptext=\t
100 \let\ptextop=\top
101 {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
102
103 % If this character appears in an error message or help string, it
104 % starts a new line in the output.
105 \newlinechar = `^^J
106
107 % Use TeX 3.0's \inputlineno to get the line number, for better error
108 % messages, but if we're using an old version of TeX, don't do anything.
109 %
110 \ifx\inputlineno\thisisundefined
111 \let\linenumber = \empty % Pre-3.0.
112 \else
113 \def\linenumber{l.\the\inputlineno:\space}
114 \fi
115
116 % Set up fixed words for English if not already set.
117 \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
118 \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
119 \ifx\putworderror\undefined \gdef\putworderror{error}\fi
120 \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
121 \ifx\putwordin\undefined \gdef\putwordin{in}\fi
122 \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
123 \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
124 \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
125 \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
126 \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
127 \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
128 \ifx\putwordof\undefined \gdef\putwordof{of}\fi
129 \ifx\putwordon\undefined \gdef\putwordon{on}\fi
130 \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
131 \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
132 \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
133 \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
134 \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
135 \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
136 \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
137 %
138 \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
139 \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
140 \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
141 \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
142 \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
143 \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
144 \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
145 \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
146 \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
147 \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
148 \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
149 \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
150 %
151 \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
152 \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
153 \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
154 \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
155 \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
156
157 % Since the category of space is not known, we have to be careful.
158 \chardef\spacecat = 10
159 \def\spaceisspace{\catcode`\ =\spacecat}
160
161 % sometimes characters are active, so we need control sequences.
162 \chardef\ampChar = `\&
163 \chardef\colonChar = `\:
164 \chardef\commaChar = `\,
165 \chardef\dashChar = `\-
166 \chardef\dotChar = `\.
167 \chardef\exclamChar= `\!
168 \chardef\hashChar = `\#
169 \chardef\lquoteChar= `\`
170 \chardef\questChar = `\?
171 \chardef\rquoteChar= `\'
172 \chardef\semiChar = `\;
173 \chardef\slashChar = `\/
174 \chardef\underChar = `\_
175
176 % Ignore a token.
177 %
178 \def\gobble#1{}
179
180 % The following is used inside several \edef's.
181 \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
182
183 % Hyphenation fixes.
184 \hyphenation{
185 Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
186 ap-pen-dix bit-map bit-maps
187 data-base data-bases eshell fall-ing half-way long-est man-u-script
188 man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
189 par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
190 spell-ing spell-ings
191 stand-alone strong-est time-stamp time-stamps which-ever white-space
192 wide-spread wrap-around
193 }
194
195 % Margin to add to right of even pages, to left of odd pages.
196 \newdimen\bindingoffset
197 \newdimen\normaloffset
198 \newdimen\pagewidth \newdimen\pageheight
199
200 % For a final copy, take out the rectangles
201 % that mark overfull boxes (in case you have decided
202 % that the text looks ok even though it passes the margin).
203 %
204 \def\finalout{\overfullrule=0pt }
205
206 % Sometimes it is convenient to have everything in the transcript file
207 % and nothing on the terminal. We don't just call \tracingall here,
208 % since that produces some useless output on the terminal. We also make
209 % some effort to order the tracing commands to reduce output in the log
210 % file; cf. trace.sty in LaTeX.
211 %
212 \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
213 \def\loggingall{%
214 \tracingstats2
215 \tracingpages1
216 \tracinglostchars2 % 2 gives us more in etex
217 \tracingparagraphs1
218 \tracingoutput1
219 \tracingmacros2
220 \tracingrestores1
221 \showboxbreadth\maxdimen \showboxdepth\maxdimen
222 \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
223 \tracingscantokens1
224 \tracingifs1
225 \tracinggroups1
226 \tracingnesting2
227 \tracingassigns1
228 \fi
229 \tracingcommands3 % 3 gives us more in etex
230 \errorcontextlines16
231 }%
232
233 % @errormsg{MSG}. Do the index-like expansions on MSG, but if things
234 % aren't perfect, it's not the end of the world, being an error message,
235 % after all.
236 %
237 \def\errormsg{\begingroup \indexnofonts \doerrormsg}
238 \def\doerrormsg#1{\errmessage{#1}}
239
240 % add check for \lastpenalty to plain's definitions. If the last thing
241 % we did was a \nobreak, we don't want to insert more space.
242 %
243 \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
244 \removelastskip\penalty-50\smallskip\fi\fi}
245 \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
246 \removelastskip\penalty-100\medskip\fi\fi}
247 \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
248 \removelastskip\penalty-200\bigskip\fi\fi}
249
250 % Do @cropmarks to get crop marks.
251 %
252 \newif\ifcropmarks
253 \let\cropmarks = \cropmarkstrue
254 %
255 % Dimensions to add cropmarks at corners.
256 % Added by P. A. MacKay, 12 Nov. 1986
257 %
258 \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
259 \newdimen\cornerlong \cornerlong=1pc
260 \newdimen\cornerthick \cornerthick=.3pt
261 \newdimen\topandbottommargin \topandbottommargin=.75in
262
263 % Output a mark which sets \thischapter, \thissection and \thiscolor.
264 % We dump everything together because we only have one kind of mark.
265 % This works because we only use \botmark / \topmark, not \firstmark.
266 %
267 % A mark contains a subexpression of the \ifcase ... \fi construct.
268 % \get*marks macros below extract the needed part using \ifcase.
269 %
270 % Another complication is to let the user choose whether \thischapter
271 % (\thissection) refers to the chapter (section) in effect at the top
272 % of a page, or that at the bottom of a page. The solution is
273 % described on page 260 of The TeXbook. It involves outputting two
274 % marks for the sectioning macros, one before the section break, and
275 % one after. I won't pretend I can describe this better than DEK...
276 \def\domark{%
277 \toks0=\expandafter{\lastchapterdefs}%
278 \toks2=\expandafter{\lastsectiondefs}%
279 \toks4=\expandafter{\prevchapterdefs}%
280 \toks6=\expandafter{\prevsectiondefs}%
281 \toks8=\expandafter{\lastcolordefs}%
282 \mark{%
283 \the\toks0 \the\toks2
284 \noexpand\or \the\toks4 \the\toks6
285 \noexpand\else \the\toks8
286 }%
287 }
288 % \topmark doesn't work for the very first chapter (after the title
289 % page or the contents), so we use \firstmark there -- this gets us
290 % the mark with the chapter defs, unless the user sneaks in, e.g.,
291 % @setcolor (or @url, or @link, etc.) between @contents and the very
292 % first @chapter.
293 \def\gettopheadingmarks{%
294 \ifcase0\topmark\fi
295 \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
296 }
297 \def\getbottomheadingmarks{\ifcase1\botmark\fi}
298 \def\getcolormarks{\ifcase2\topmark\fi}
299
300 % Avoid "undefined control sequence" errors.
301 \def\lastchapterdefs{}
302 \def\lastsectiondefs{}
303 \def\prevchapterdefs{}
304 \def\prevsectiondefs{}
305 \def\lastcolordefs{}
306
307 % Main output routine.
308 \chardef\PAGE = 255
309 \output = {\onepageout{\pagecontents\PAGE}}
310
311 \newbox\headlinebox
312 \newbox\footlinebox
313
314 % \onepageout takes a vbox as an argument. Note that \pagecontents
315 % does insertions, but you have to call it yourself.
316 \def\onepageout#1{%
317 \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
318 %
319 \ifodd\pageno \advance\hoffset by \bindingoffset
320 \else \advance\hoffset by -\bindingoffset\fi
321 %
322 % Do this outside of the \shipout so @code etc. will be expanded in
323 % the headline as they should be, not taken literally (outputting ''code).
324 \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
325 \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
326 \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
327 \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
328 %
329 {%
330 % Have to do this stuff outside the \shipout because we want it to
331 % take effect in \write's, yet the group defined by the \vbox ends
332 % before the \shipout runs.
333 %
334 \indexdummies % don't expand commands in the output.
335 \normalturnoffactive % \ in index entries must not stay \, e.g., if
336 % the page break happens to be in the middle of an example.
337 % We don't want .vr (or whatever) entries like this:
338 % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
339 % "\acronym" won't work when it's read back in;
340 % it needs to be
341 % {\code {{\tt \backslashcurfont }acronym}
342 \shipout\vbox{%
343 % Do this early so pdf references go to the beginning of the page.
344 \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
345 %
346 \ifcropmarks \vbox to \outervsize\bgroup
347 \hsize = \outerhsize
348 \vskip-\topandbottommargin
349 \vtop to0pt{%
350 \line{\ewtop\hfil\ewtop}%
351 \nointerlineskip
352 \line{%
353 \vbox{\moveleft\cornerthick\nstop}%
354 \hfill
355 \vbox{\moveright\cornerthick\nstop}%
356 }%
357 \vss}%
358 \vskip\topandbottommargin
359 \line\bgroup
360 \hfil % center the page within the outer (page) hsize.
361 \ifodd\pageno\hskip\bindingoffset\fi
362 \vbox\bgroup
363 \fi
364 %
365 \unvbox\headlinebox
366 \pagebody{#1}%
367 \ifdim\ht\footlinebox > 0pt
368 % Only leave this space if the footline is nonempty.
369 % (We lessened \vsize for it in \oddfootingyyy.)
370 % The \baselineskip=24pt in plain's \makefootline has no effect.
371 \vskip 24pt
372 \unvbox\footlinebox
373 \fi
374 %
375 \ifcropmarks
376 \egroup % end of \vbox\bgroup
377 \hfil\egroup % end of (centering) \line\bgroup
378 \vskip\topandbottommargin plus1fill minus1fill
379 \boxmaxdepth = \cornerthick
380 \vbox to0pt{\vss
381 \line{%
382 \vbox{\moveleft\cornerthick\nsbot}%
383 \hfill
384 \vbox{\moveright\cornerthick\nsbot}%
385 }%
386 \nointerlineskip
387 \line{\ewbot\hfil\ewbot}%
388 }%
389 \egroup % \vbox from first cropmarks clause
390 \fi
391 }% end of \shipout\vbox
392 }% end of group with \indexdummies
393 \advancepageno
394 \ifnum\outputpenalty>-20000 \else\dosupereject\fi
395 }
396
397 \newinsert\margin \dimen\margin=\maxdimen
398
399 \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
400 {\catcode`\@ =11
401 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
402 % marginal hacks, juha@viisa.uucp (Juha Takala)
403 \ifvoid\margin\else % marginal info is present
404 \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
405 \dimen@=\dp#1\relax \unvbox#1\relax
406 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
407 \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
408 }
409
410 % Here are the rules for the cropmarks. Note that they are
411 % offset so that the space between them is truly \outerhsize or \outervsize
412 % (P. A. MacKay, 12 November, 1986)
413 %
414 \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
415 \def\nstop{\vbox
416 {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
417 \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
418 \def\nsbot{\vbox
419 {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
420
421 % Parse an argument, then pass it to #1. The argument is the rest of
422 % the input line (except we remove a trailing comment). #1 should be a
423 % macro which expects an ordinary undelimited TeX argument.
424 %
425 \def\parsearg{\parseargusing{}}
426 \def\parseargusing#1#2{%
427 \def\argtorun{#2}%
428 \begingroup
429 \obeylines
430 \spaceisspace
431 #1%
432 \parseargline\empty% Insert the \empty token, see \finishparsearg below.
433 }
434
435 {\obeylines %
436 \gdef\parseargline#1^^M{%
437 \endgroup % End of the group started in \parsearg.
438 \argremovecomment #1\comment\ArgTerm%
439 }%
440 }
441
442 % First remove any @comment, then any @c comment.
443 \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
444 \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
445
446 % Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
447 %
448 % \argremovec might leave us with trailing space, e.g.,
449 % @end itemize @c foo
450 % This space token undergoes the same procedure and is eventually removed
451 % by \finishparsearg.
452 %
453 \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
454 \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
455 \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
456 \def\temp{#3}%
457 \ifx\temp\empty
458 % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
459 \let\temp\finishparsearg
460 \else
461 \let\temp\argcheckspaces
462 \fi
463 % Put the space token in:
464 \temp#1 #3\ArgTerm
465 }
466
467 % If a _delimited_ argument is enclosed in braces, they get stripped; so
468 % to get _exactly_ the rest of the line, we had to prevent such situation.
469 % We prepended an \empty token at the very beginning and we expand it now,
470 % just before passing the control to \argtorun.
471 % (Similarly, we have to think about #3 of \argcheckspacesY above: it is
472 % either the null string, or it ends with \^^M---thus there is no danger
473 % that a pair of braces would be stripped.
474 %
475 % But first, we have to remove the trailing space token.
476 %
477 \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
478
479 % \parseargdef\foo{...}
480 % is roughly equivalent to
481 % \def\foo{\parsearg\Xfoo}
482 % \def\Xfoo#1{...}
483 %
484 % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
485 % favourite TeX trick. --kasal, 16nov03
486
487 \def\parseargdef#1{%
488 \expandafter \doparseargdef \csname\string#1\endcsname #1%
489 }
490 \def\doparseargdef#1#2{%
491 \def#2{\parsearg#1}%
492 \def#1##1%
493 }
494
495 % Several utility definitions with active space:
496 {
497 \obeyspaces
498 \gdef\obeyedspace{ }
499
500 % Make each space character in the input produce a normal interword
501 % space in the output. Don't allow a line break at this space, as this
502 % is used only in environments like @example, where each line of input
503 % should produce a line of output anyway.
504 %
505 \gdef\sepspaces{\obeyspaces\let =\tie}
506
507 % If an index command is used in an @example environment, any spaces
508 % therein should become regular spaces in the raw index file, not the
509 % expansion of \tie (\leavevmode \penalty \@M \ ).
510 \gdef\unsepspaces{\let =\space}
511 }
512
513
514 \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
515
516 % Define the framework for environments in texinfo.tex. It's used like this:
517 %
518 % \envdef\foo{...}
519 % \def\Efoo{...}
520 %
521 % It's the responsibility of \envdef to insert \begingroup before the
522 % actual body; @end closes the group after calling \Efoo. \envdef also
523 % defines \thisenv, so the current environment is known; @end checks
524 % whether the environment name matches. The \checkenv macro can also be
525 % used to check whether the current environment is the one expected.
526 %
527 % Non-false conditionals (@iftex, @ifset) don't fit into this, so they
528 % are not treated as environments; they don't open a group. (The
529 % implementation of @end takes care not to call \endgroup in this
530 % special case.)
531
532
533 % At run-time, environments start with this:
534 \def\startenvironment#1{\begingroup\def\thisenv{#1}}
535 % initialize
536 \let\thisenv\empty
537
538 % ... but they get defined via ``\envdef\foo{...}'':
539 \long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
540 \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
541
542 % Check whether we're in the right environment:
543 \def\checkenv#1{%
544 \def\temp{#1}%
545 \ifx\thisenv\temp
546 \else
547 \badenverr
548 \fi
549 }
550
551 % Environment mismatch, #1 expected:
552 \def\badenverr{%
553 \errhelp = \EMsimple
554 \errmessage{This command can appear only \inenvironment\temp,
555 not \inenvironment\thisenv}%
556 }
557 \def\inenvironment#1{%
558 \ifx#1\empty
559 outside of any environment%
560 \else
561 in environment \expandafter\string#1%
562 \fi
563 }
564
565 % @end foo executes the definition of \Efoo.
566 % But first, it executes a specialized version of \checkenv
567 %
568 \parseargdef\end{%
569 \if 1\csname iscond.#1\endcsname
570 \else
571 % The general wording of \badenverr may not be ideal.
572 \expandafter\checkenv\csname#1\endcsname
573 \csname E#1\endcsname
574 \endgroup
575 \fi
576 }
577
578 \newhelp\EMsimple{Press RETURN to continue.}
579
580
581 % Be sure we're in horizontal mode when doing a tie, since we make space
582 % equivalent to this in @example-like environments. Otherwise, a space
583 % at the beginning of a line will start with \penalty -- and
584 % since \penalty is valid in vertical mode, we'd end up putting the
585 % penalty on the vertical list instead of in the new paragraph.
586 {\catcode`@ = 11
587 % Avoid using \@M directly, because that causes trouble
588 % if the definition is written into an index file.
589 \global\let\tiepenalty = \@M
590 \gdef\tie{\leavevmode\penalty\tiepenalty\ }
591 }
592
593 % @: forces normal size whitespace following.
594 \def\:{\spacefactor=1000 }
595
596 % @* forces a line break.
597 \def\*{\unskip\hfil\break\hbox{}\ignorespaces}
598
599 % @/ allows a line break.
600 \let\/=\allowbreak
601
602 % @. is an end-of-sentence period.
603 \def\.{.\spacefactor=\endofsentencespacefactor\space}
604
605 % @! is an end-of-sentence bang.
606 \def\!{!\spacefactor=\endofsentencespacefactor\space}
607
608 % @? is an end-of-sentence query.
609 \def\?{?\spacefactor=\endofsentencespacefactor\space}
610
611 % @frenchspacing on|off says whether to put extra space after punctuation.
612 %
613 \def\onword{on}
614 \def\offword{off}
615 %
616 \parseargdef\frenchspacing{%
617 \def\temp{#1}%
618 \ifx\temp\onword \plainfrenchspacing
619 \else\ifx\temp\offword \plainnonfrenchspacing
620 \else
621 \errhelp = \EMsimple
622 \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
623 \fi\fi
624 }
625
626 % @w prevents a word break. Without the \leavevmode, @w at the
627 % beginning of a paragraph, when TeX is still in vertical mode, would
628 % produce a whole line of output instead of starting the paragraph.
629 \def\w#1{\leavevmode\hbox{#1}}
630
631 % @group ... @end group forces ... to be all on one page, by enclosing
632 % it in a TeX vbox. We use \vtop instead of \vbox to construct the box
633 % to keep its height that of a normal line. According to the rules for
634 % \topskip (p.114 of the TeXbook), the glue inserted is
635 % max (\topskip - \ht (first item), 0). If that height is large,
636 % therefore, no glue is inserted, and the space between the headline and
637 % the text is small, which looks bad.
638 %
639 % Another complication is that the group might be very large. This can
640 % cause the glue on the previous page to be unduly stretched, because it
641 % does not have much material. In this case, it's better to add an
642 % explicit \vfill so that the extra space is at the bottom. The
643 % threshold for doing this is if the group is more than \vfilllimit
644 % percent of a page (\vfilllimit can be changed inside of @tex).
645 %
646 \newbox\groupbox
647 \def\vfilllimit{0.7}
648 %
649 \envdef\group{%
650 \ifnum\catcode`\^^M=\active \else
651 \errhelp = \groupinvalidhelp
652 \errmessage{@group invalid in context where filling is enabled}%
653 \fi
654 \startsavinginserts
655 %
656 \setbox\groupbox = \vtop\bgroup
657 % Do @comment since we are called inside an environment such as
658 % @example, where each end-of-line in the input causes an
659 % end-of-line in the output. We don't want the end-of-line after
660 % the `@group' to put extra space in the output. Since @group
661 % should appear on a line by itself (according to the Texinfo
662 % manual), we don't worry about eating any user text.
663 \comment
664 }
665 %
666 % The \vtop produces a box with normal height and large depth; thus, TeX puts
667 % \baselineskip glue before it, and (when the next line of text is done)
668 % \lineskip glue after it. Thus, space below is not quite equal to space
669 % above. But it's pretty close.
670 \def\Egroup{%
671 % To get correct interline space between the last line of the group
672 % and the first line afterwards, we have to propagate \prevdepth.
673 \endgraf % Not \par, as it may have been set to \lisppar.
674 \global\dimen1 = \prevdepth
675 \egroup % End the \vtop.
676 % \dimen0 is the vertical size of the group's box.
677 \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
678 % \dimen2 is how much space is left on the page (more or less).
679 \dimen2 = \pageheight \advance\dimen2 by -\pagetotal
680 % if the group doesn't fit on the current page, and it's a big big
681 % group, force a page break.
682 \ifdim \dimen0 > \dimen2
683 \ifdim \pagetotal < \vfilllimit\pageheight
684 \page
685 \fi
686 \fi
687 \box\groupbox
688 \prevdepth = \dimen1
689 \checkinserts
690 }
691 %
692 % TeX puts in an \escapechar (i.e., `@') at the beginning of the help
693 % message, so this ends up printing `@group can only ...'.
694 %
695 \newhelp\groupinvalidhelp{%
696 group can only be used in environments such as @example,^^J%
697 where each line of input produces a line of output.}
698
699 % @need space-in-mils
700 % forces a page break if there is not space-in-mils remaining.
701
702 \newdimen\mil \mil=0.001in
703
704 \parseargdef\need{%
705 % Ensure vertical mode, so we don't make a big box in the middle of a
706 % paragraph.
707 \par
708 %
709 % If the @need value is less than one line space, it's useless.
710 \dimen0 = #1\mil
711 \dimen2 = \ht\strutbox
712 \advance\dimen2 by \dp\strutbox
713 \ifdim\dimen0 > \dimen2
714 %
715 % Do a \strut just to make the height of this box be normal, so the
716 % normal leading is inserted relative to the preceding line.
717 % And a page break here is fine.
718 \vtop to #1\mil{\strut\vfil}%
719 %
720 % TeX does not even consider page breaks if a penalty added to the
721 % main vertical list is 10000 or more. But in order to see if the
722 % empty box we just added fits on the page, we must make it consider
723 % page breaks. On the other hand, we don't want to actually break the
724 % page after the empty box. So we use a penalty of 9999.
725 %
726 % There is an extremely small chance that TeX will actually break the
727 % page at this \penalty, if there are no other feasible breakpoints in
728 % sight. (If the user is using lots of big @group commands, which
729 % almost-but-not-quite fill up a page, TeX will have a hard time doing
730 % good page breaking, for example.) However, I could not construct an
731 % example where a page broke at this \penalty; if it happens in a real
732 % document, then we can reconsider our strategy.
733 \penalty9999
734 %
735 % Back up by the size of the box, whether we did a page break or not.
736 \kern -#1\mil
737 %
738 % Do not allow a page break right after this kern.
739 \nobreak
740 \fi
741 }
742
743 % @br forces paragraph break (and is undocumented).
744
745 \let\br = \par
746
747 % @page forces the start of a new page.
748 %
749 \def\page{\par\vfill\supereject}
750
751 % @exdent text....
752 % outputs text on separate line in roman font, starting at standard page margin
753
754 % This records the amount of indent in the innermost environment.
755 % That's how much \exdent should take out.
756 \newskip\exdentamount
757
758 % This defn is used inside fill environments such as @defun.
759 \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}
760
761 % This defn is used inside nofill environments such as @example.
762 \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount
763 \leftline{\hskip\leftskip{\rm#1}}}}
764
765 % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
766 % paragraph. For more general purposes, use the \margin insertion
767 % class. WHICH is `l' or `r'. Not documented, written for gawk manual.
768 %
769 \newskip\inmarginspacing \inmarginspacing=1cm
770 \def\strutdepth{\dp\strutbox}
771 %
772 \def\doinmargin#1#2{\strut\vadjust{%
773 \nobreak
774 \kern-\strutdepth
775 \vtop to \strutdepth{%
776 \baselineskip=\strutdepth
777 \vss
778 % if you have multiple lines of stuff to put here, you'll need to
779 % make the vbox yourself of the appropriate size.
780 \ifx#1l%
781 \llap{\ignorespaces #2\hskip\inmarginspacing}%
782 \else
783 \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
784 \fi
785 \null
786 }%
787 }}
788 \def\inleftmargin{\doinmargin l}
789 \def\inrightmargin{\doinmargin r}
790 %
791 % @inmargin{TEXT [, RIGHT-TEXT]}
792 % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
793 % else use TEXT for both).
794 %
795 \def\inmargin#1{\parseinmargin #1,,\finish}
796 \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
797 \setbox0 = \hbox{\ignorespaces #2}%
798 \ifdim\wd0 > 0pt
799 \def\lefttext{#1}% have both texts
800 \def\righttext{#2}%
801 \else
802 \def\lefttext{#1}% have only one text
803 \def\righttext{#1}%
804 \fi
805 %
806 \ifodd\pageno
807 \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
808 \else
809 \def\temp{\inleftmargin\lefttext}%
810 \fi
811 \temp
812 }
813
814 % @| inserts a changebar to the left of the current line. It should
815 % surround any changed text. This approach does *not* work if the
816 % change spans more than two lines of output. To handle that, we would
817 % have adopt a much more difficult approach (putting marks into the main
818 % vertical list for the beginning and end of each change). This command
819 % is not documented, not supported, and doesn't work.
820 %
821 \def\|{%
822 % \vadjust can only be used in horizontal mode.
823 \leavevmode
824 %
825 % Append this vertical mode material after the current line in the output.
826 \vadjust{%
827 % We want to insert a rule with the height and depth of the current
828 % leading; that is exactly what \strutbox is supposed to record.
829 \vskip-\baselineskip
830 %
831 % \vadjust-items are inserted at the left edge of the type. So
832 % the \llap here moves out into the left-hand margin.
833 \llap{%
834 %
835 % For a thicker or thinner bar, change the `1pt'.
836 \vrule height\baselineskip width1pt
837 %
838 % This is the space between the bar and the text.
839 \hskip 12pt
840 }%
841 }%
842 }
843
844 % @include FILE -- \input text of FILE.
845 %
846 \def\include{\parseargusing\filenamecatcodes\includezzz}
847 \def\includezzz#1{%
848 \pushthisfilestack
849 \def\thisfile{#1}%
850 {%
851 \makevalueexpandable % we want to expand any @value in FILE.
852 \turnoffactive % and allow special characters in the expansion
853 \indexnofonts % Allow `@@' and other weird things in file names.
854 \wlog{texinfo.tex: doing @include of #1^^J}%
855 \edef\temp{\noexpand\input #1 }%
856 %
857 % This trickery is to read FILE outside of a group, in case it makes
858 % definitions, etc.
859 \expandafter
860 }\temp
861 \popthisfilestack
862 }
863 \def\filenamecatcodes{%
864 \catcode`\\=\other
865 \catcode`~=\other
866 \catcode`^=\other
867 \catcode`_=\other
868 \catcode`|=\other
869 \catcode`<=\other
870 \catcode`>=\other
871 \catcode`+=\other
872 \catcode`-=\other
873 \catcode`\`=\other
874 \catcode`\'=\other
875 }
876
877 \def\pushthisfilestack{%
878 \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
879 }
880 \def\pushthisfilestackX{%
881 \expandafter\pushthisfilestackY\thisfile\StackTerm
882 }
883 \def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
884 \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
885 }
886
887 \def\popthisfilestack{\errthisfilestackempty}
888 \def\errthisfilestackempty{\errmessage{Internal error:
889 the stack of filenames is empty.}}
890 %
891 \def\thisfile{}
892
893 % @center line
894 % outputs that line, centered.
895 %
896 \parseargdef\center{%
897 \ifhmode
898 \let\centersub\centerH
899 \else
900 \let\centersub\centerV
901 \fi
902 \centersub{\hfil \ignorespaces#1\unskip \hfil}%
903 \let\centersub\relax % don't let the definition persist, just in case
904 }
905 \def\centerH#1{{%
906 \hfil\break
907 \advance\hsize by -\leftskip
908 \advance\hsize by -\rightskip
909 \line{#1}%
910 \break
911 }}
912 %
913 \newcount\centerpenalty
914 \def\centerV#1{%
915 % The idea here is the same as in \startdefun, \cartouche, etc.: if
916 % @center is the first thing after a section heading, we need to wipe
917 % out the negative parskip inserted by \sectionheading, but still
918 % prevent a page break here.
919 \centerpenalty = \lastpenalty
920 \ifnum\centerpenalty>10000 \vskip\parskip \fi
921 \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi
922 \line{\kern\leftskip #1\kern\rightskip}%
923 }
924
925 % @sp n outputs n lines of vertical space
926 %
927 \parseargdef\sp{\vskip #1\baselineskip}
928
929 % @comment ...line which is ignored...
930 % @c is the same as @comment
931 % @ignore ... @end ignore is another way to write a comment
932 %
933 \def\comment{\begingroup \catcode`\^^M=\other%
934 \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
935 \commentxxx}
936 {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
937 %
938 \let\c=\comment
939
940 % @paragraphindent NCHARS
941 % We'll use ems for NCHARS, close enough.
942 % NCHARS can also be the word `asis' or `none'.
943 % We cannot feasibly implement @paragraphindent asis, though.
944 %
945 \def\asisword{asis} % no translation, these are keywords
946 \def\noneword{none}
947 %
948 \parseargdef\paragraphindent{%
949 \def\temp{#1}%
950 \ifx\temp\asisword
951 \else
952 \ifx\temp\noneword
953 \defaultparindent = 0pt
954 \else
955 \defaultparindent = #1em
956 \fi
957 \fi
958 \parindent = \defaultparindent
959 }
960
961 % @exampleindent NCHARS
962 % We'll use ems for NCHARS like @paragraphindent.
963 % It seems @exampleindent asis isn't necessary, but
964 % I preserve it to make it similar to @paragraphindent.
965 \parseargdef\exampleindent{%
966 \def\temp{#1}%
967 \ifx\temp\asisword
968 \else
969 \ifx\temp\noneword
970 \lispnarrowing = 0pt
971 \else
972 \lispnarrowing = #1em
973 \fi
974 \fi
975 }
976
977 % @firstparagraphindent WORD
978 % If WORD is `none', then suppress indentation of the first paragraph
979 % after a section heading. If WORD is `insert', then do indent at such
980 % paragraphs.
981 %
982 % The paragraph indentation is suppressed or not by calling
983 % \suppressfirstparagraphindent, which the sectioning commands do.
984 % We switch the definition of this back and forth according to WORD.
985 % By default, we suppress indentation.
986 %
987 \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
988 \def\insertword{insert}
989 %
990 \parseargdef\firstparagraphindent{%
991 \def\temp{#1}%
992 \ifx\temp\noneword
993 \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
994 \else\ifx\temp\insertword
995 \let\suppressfirstparagraphindent = \relax
996 \else
997 \errhelp = \EMsimple
998 \errmessage{Unknown @firstparagraphindent option `\temp'}%
999 \fi\fi
1000 }
1001
1002 % Here is how we actually suppress indentation. Redefine \everypar to
1003 % \kern backwards by \parindent, and then reset itself to empty.
1004 %
1005 % We also make \indent itself not actually do anything until the next
1006 % paragraph.
1007 %
1008 \gdef\dosuppressfirstparagraphindent{%
1009 \gdef\indent{%
1010 \restorefirstparagraphindent
1011 \indent
1012 }%
1013 \gdef\noindent{%
1014 \restorefirstparagraphindent
1015 \noindent
1016 }%
1017 \global\everypar = {%
1018 \kern -\parindent
1019 \restorefirstparagraphindent
1020 }%
1021 }
1022
1023 \gdef\restorefirstparagraphindent{%
1024 \global \let \indent = \ptexindent
1025 \global \let \noindent = \ptexnoindent
1026 \global \everypar = {}%
1027 }
1028
1029
1030 % @refill is a no-op.
1031 \let\refill=\relax
1032
1033 % If working on a large document in chapters, it is convenient to
1034 % be able to disable indexing, cross-referencing, and contents, for test runs.
1035 % This is done with @novalidate (before @setfilename).
1036 %
1037 \newif\iflinks \linkstrue % by default we want the aux files.
1038 \let\novalidate = \linksfalse
1039
1040 % @setfilename is done at the beginning of every texinfo file.
1041 % So open here the files we need to have open while reading the input.
1042 % This makes it possible to make a .fmt file for texinfo.
1043 \def\setfilename{%
1044 \fixbackslash % Turn off hack to swallow `\input texinfo'.
1045 \iflinks
1046 \tryauxfile
1047 % Open the new aux file. TeX will close it automatically at exit.
1048 \immediate\openout\auxfile=\jobname.aux
1049 \fi % \openindices needs to do some work in any case.
1050 \openindices
1051 \let\setfilename=\comment % Ignore extra @setfilename cmds.
1052 %
1053 % If texinfo.cnf is present on the system, read it.
1054 % Useful for site-wide @afourpaper, etc.
1055 \openin 1 texinfo.cnf
1056 \ifeof 1 \else \input texinfo.cnf \fi
1057 \closein 1
1058 %
1059 \comment % Ignore the actual filename.
1060 }
1061
1062 % Called from \setfilename.
1063 %
1064 \def\openindices{%
1065 \newindex{cp}%
1066 \newcodeindex{fn}%
1067 \newcodeindex{vr}%
1068 \newcodeindex{tp}%
1069 \newcodeindex{ky}%
1070 \newcodeindex{pg}%
1071 }
1072
1073 % @bye.
1074 \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
1075
1076
1077 \message{pdf,}
1078 % adobe `portable' document format
1079 \newcount\tempnum
1080 \newcount\lnkcount
1081 \newtoks\filename
1082 \newcount\filenamelength
1083 \newcount\pgn
1084 \newtoks\toksA
1085 \newtoks\toksB
1086 \newtoks\toksC
1087 \newtoks\toksD
1088 \newbox\boxA
1089 \newcount\countA
1090 \newif\ifpdf
1091 \newif\ifpdfmakepagedest
1092
1093 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
1094 % can be set). So we test for \relax and 0 as well as being undefined.
1095 \ifx\pdfoutput\thisisundefined
1096 \else
1097 \ifx\pdfoutput\relax
1098 \else
1099 \ifcase\pdfoutput
1100 \else
1101 \pdftrue
1102 \fi
1103 \fi
1104 \fi
1105
1106 % PDF uses PostScript string constants for the names of xref targets,
1107 % for display in the outlines, and in other places. Thus, we have to
1108 % double any backslashes. Otherwise, a name like "\node" will be
1109 % interpreted as a newline (\n), followed by o, d, e. Not good.
1110 %
1111 % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
1112 % related messages. The final outcome is that it is up to the TeX user
1113 % to double the backslashes and otherwise make the string valid, so
1114 % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
1115 % do this reliably, so we use it.
1116
1117 % #1 is a control sequence in which to do the replacements,
1118 % which we \xdef.
1119 \def\txiescapepdf#1{%
1120 \ifx\pdfescapestring\thisisundefined
1121 % No primitive available; should we give a warning or log?
1122 % Many times it won't matter.
1123 \else
1124 % The expandable \pdfescapestring primitive escapes parentheses,
1125 % backslashes, and other special chars.
1126 \xdef#1{\pdfescapestring{#1}}%
1127 \fi
1128 }
1129
1130 \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
1131 with PDF output, and none of those formats could be found. (.eps cannot
1132 be supported due to the design of the PDF format; use regular TeX (DVI
1133 output) for that.)}
1134
1135 \ifpdf
1136 %
1137 % Color manipulation macros based on pdfcolor.tex,
1138 % except using rgb instead of cmyk; the latter is said to render as a
1139 % very dark gray on-screen and a very dark halftone in print, instead
1140 % of actual black.
1141 \def\rgbDarkRed{0.50 0.09 0.12}
1142 \def\rgbBlack{0 0 0}
1143 %
1144 % k sets the color for filling (usual text, etc.);
1145 % K sets the color for stroking (thin rules, e.g., normal _'s).
1146 \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
1147 %
1148 % Set color, and create a mark which defines \thiscolor accordingly,
1149 % so that \makeheadline knows which color to restore.
1150 \def\setcolor#1{%
1151 \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
1152 \domark
1153 \pdfsetcolor{#1}%
1154 }
1155 %
1156 \def\maincolor{\rgbBlack}
1157 \pdfsetcolor{\maincolor}
1158 \edef\thiscolor{\maincolor}
1159 \def\lastcolordefs{}
1160 %
1161 \def\makefootline{%
1162 \baselineskip24pt
1163 \line{\pdfsetcolor{\maincolor}\the\footline}%
1164 }
1165 %
1166 \def\makeheadline{%
1167 \vbox to 0pt{%
1168 \vskip-22.5pt
1169 \line{%
1170 \vbox to8.5pt{}%
1171 % Extract \thiscolor definition from the marks.
1172 \getcolormarks
1173 % Typeset the headline with \maincolor, then restore the color.
1174 \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
1175 }%
1176 \vss
1177 }%
1178 \nointerlineskip
1179 }
1180 %
1181 %
1182 \pdfcatalog{/PageMode /UseOutlines}
1183 %
1184 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1185 \def\dopdfimage#1#2#3{%
1186 \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
1187 \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
1188 %
1189 % pdftex (and the PDF format) support .pdf, .png, .jpg (among
1190 % others). Let's try in that order, PDF first since if
1191 % someone has a scalable image, presumably better to use that than a
1192 % bitmap.
1193 \let\pdfimgext=\empty
1194 \begingroup
1195 \openin 1 #1.pdf \ifeof 1
1196 \openin 1 #1.PDF \ifeof 1
1197 \openin 1 #1.png \ifeof 1
1198 \openin 1 #1.jpg \ifeof 1
1199 \openin 1 #1.jpeg \ifeof 1
1200 \openin 1 #1.JPG \ifeof 1
1201 \errhelp = \nopdfimagehelp
1202 \errmessage{Could not find image file #1 for pdf}%
1203 \else \gdef\pdfimgext{JPG}%
1204 \fi
1205 \else \gdef\pdfimgext{jpeg}%
1206 \fi
1207 \else \gdef\pdfimgext{jpg}%
1208 \fi
1209 \else \gdef\pdfimgext{png}%
1210 \fi
1211 \else \gdef\pdfimgext{PDF}%
1212 \fi
1213 \else \gdef\pdfimgext{pdf}%
1214 \fi
1215 \closein 1
1216 \endgroup
1217 %
1218 % without \immediate, ancient pdftex seg faults when the same image is
1219 % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
1220 \ifnum\pdftexversion < 14
1221 \immediate\pdfimage
1222 \else
1223 \immediate\pdfximage
1224 \fi
1225 \ifdim \wd0 >0pt width \pdfimagewidth \fi
1226 \ifdim \wd2 >0pt height \pdfimageheight \fi
1227 \ifnum\pdftexversion<13
1228 #1.\pdfimgext
1229 \else
1230 {#1.\pdfimgext}%
1231 \fi
1232 \ifnum\pdftexversion < 14 \else
1233 \pdfrefximage \pdflastximage
1234 \fi}
1235 %
1236 \def\pdfmkdest#1{{%
1237 % We have to set dummies so commands such as @code, and characters
1238 % such as \, aren't expanded when present in a section title.
1239 \indexnofonts
1240 \turnoffactive
1241 \makevalueexpandable
1242 \def\pdfdestname{#1}%
1243 \txiescapepdf\pdfdestname
1244 \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
1245 }}
1246 %
1247 % used to mark target names; must be expandable.
1248 \def\pdfmkpgn#1{#1}
1249 %
1250 % by default, use a color that is dark enough to print on paper as
1251 % nearly black, but still distinguishable for online viewing.
1252 \def\urlcolor{\rgbDarkRed}
1253 \def\linkcolor{\rgbDarkRed}
1254 \def\endlink{\setcolor{\maincolor}\pdfendlink}
1255 %
1256 % Adding outlines to PDF; macros for calculating structure of outlines
1257 % come from Petr Olsak
1258 \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
1259 \else \csname#1\endcsname \fi}
1260 \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
1261 \advance\tempnum by 1
1262 \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
1263 %
1264 % #1 is the section text, which is what will be displayed in the
1265 % outline by the pdf viewer. #2 is the pdf expression for the number
1266 % of subentries (or empty, for subsubsections). #3 is the node text,
1267 % which might be empty if this toc entry had no corresponding node.
1268 % #4 is the page number
1269 %
1270 \def\dopdfoutline#1#2#3#4{%
1271 % Generate a link to the node text if that exists; else, use the
1272 % page number. We could generate a destination for the section
1273 % text in the case where a section has no node, but it doesn't
1274 % seem worth the trouble, since most documents are normally structured.
1275 \edef\pdfoutlinedest{#3}%
1276 \ifx\pdfoutlinedest\empty
1277 \def\pdfoutlinedest{#4}%
1278 \else
1279 \txiescapepdf\pdfoutlinedest
1280 \fi
1281 %
1282 % Also escape PDF chars in the display string.
1283 \edef\pdfoutlinetext{#1}%
1284 \txiescapepdf\pdfoutlinetext
1285 %
1286 \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
1287 }
1288 %
1289 \def\pdfmakeoutlines{%
1290 \begingroup
1291 % Read toc silently, to get counts of subentries for \pdfoutline.
1292 \def\partentry##1##2##3##4{}% ignore parts in the outlines
1293 \def\numchapentry##1##2##3##4{%
1294 \def\thischapnum{##2}%
1295 \def\thissecnum{0}%
1296 \def\thissubsecnum{0}%
1297 }%
1298 \def\numsecentry##1##2##3##4{%
1299 \advancenumber{chap\thischapnum}%
1300 \def\thissecnum{##2}%
1301 \def\thissubsecnum{0}%
1302 }%
1303 \def\numsubsecentry##1##2##3##4{%
1304 \advancenumber{sec\thissecnum}%
1305 \def\thissubsecnum{##2}%
1306 }%
1307 \def\numsubsubsecentry##1##2##3##4{%
1308 \advancenumber{subsec\thissubsecnum}%
1309 }%
1310 \def\thischapnum{0}%
1311 \def\thissecnum{0}%
1312 \def\thissubsecnum{0}%
1313 %
1314 % use \def rather than \let here because we redefine \chapentry et
1315 % al. a second time, below.
1316 \def\appentry{\numchapentry}%
1317 \def\appsecentry{\numsecentry}%
1318 \def\appsubsecentry{\numsubsecentry}%
1319 \def\appsubsubsecentry{\numsubsubsecentry}%
1320 \def\unnchapentry{\numchapentry}%
1321 \def\unnsecentry{\numsecentry}%
1322 \def\unnsubsecentry{\numsubsecentry}%
1323 \def\unnsubsubsecentry{\numsubsubsecentry}%
1324 \readdatafile{toc}%
1325 %
1326 % Read toc second time, this time actually producing the outlines.
1327 % The `-' means take the \expnumber as the absolute number of
1328 % subentries, which we calculated on our first read of the .toc above.
1329 %
1330 % We use the node names as the destinations.
1331 \def\numchapentry##1##2##3##4{%
1332 \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
1333 \def\numsecentry##1##2##3##4{%
1334 \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
1335 \def\numsubsecentry##1##2##3##4{%
1336 \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
1337 \def\numsubsubsecentry##1##2##3##4{% count is always zero
1338 \dopdfoutline{##1}{}{##3}{##4}}%
1339 %
1340 % PDF outlines are displayed using system fonts, instead of
1341 % document fonts. Therefore we cannot use special characters,
1342 % since the encoding is unknown. For example, the eogonek from
1343 % Latin 2 (0xea) gets translated to a | character. Info from
1344 % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
1345 %
1346 % TODO this right, we have to translate 8-bit characters to
1347 % their "best" equivalent, based on the @documentencoding. Too
1348 % much work for too little return. Just use the ASCII equivalents
1349 % we use for the index sort strings.
1350 %
1351 \indexnofonts
1352 \setupdatafile
1353 % We can have normal brace characters in the PDF outlines, unlike
1354 % Texinfo index files. So set that up.
1355 \def\{{\lbracecharliteral}%
1356 \def\}{\rbracecharliteral}%
1357 \catcode`\\=\active \otherbackslash
1358 \input \tocreadfilename
1359 \endgroup
1360 }
1361 {\catcode`[=1 \catcode`]=2
1362 \catcode`{=\other \catcode`}=\other
1363 \gdef\lbracecharliteral[{]%
1364 \gdef\rbracecharliteral[}]%
1365 ]
1366 %
1367 \def\skipspaces#1{\def\PP{#1}\def\D{|}%
1368 \ifx\PP\D\let\nextsp\relax
1369 \else\let\nextsp\skipspaces
1370 \addtokens{\filename}{\PP}%
1371 \advance\filenamelength by 1
1372 \fi
1373 \nextsp}
1374 \def\getfilename#1{%
1375 \filenamelength=0
1376 % If we don't expand the argument now, \skipspaces will get
1377 % snagged on things like "@value{foo}".
1378 \edef\temp{#1}%
1379 \expandafter\skipspaces\temp|\relax
1380 }
1381 \ifnum\pdftexversion < 14
1382 \let \startlink \pdfannotlink
1383 \else
1384 \let \startlink \pdfstartlink
1385 \fi
1386 % make a live url in pdf output.
1387 \def\pdfurl#1{%
1388 \begingroup
1389 % it seems we really need yet another set of dummies; have not
1390 % tried to figure out what each command should do in the context
1391 % of @url. for now, just make @/ a no-op, that's the only one
1392 % people have actually reported a problem with.
1393 %
1394 \normalturnoffactive
1395 \def\@{@}%
1396 \let\/=\empty
1397 \makevalueexpandable
1398 % do we want to go so far as to use \indexnofonts instead of just
1399 % special-casing \var here?
1400 \def\var##1{##1}%
1401 %
1402 \leavevmode\setcolor{\urlcolor}%
1403 \startlink attr{/Border [0 0 0]}%
1404 user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
1405 \endgroup}
1406 \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
1407 \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
1408 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
1409 \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
1410 \def\maketoks{%
1411 \expandafter\poptoks\the\toksA|ENDTOKS|\relax
1412 \ifx\first0\adn0
1413 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
1414 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
1415 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
1416 \else
1417 \ifnum0=\countA\else\makelink\fi
1418 \ifx\first.\let\next=\done\else
1419 \let\next=\maketoks
1420 \addtokens{\toksB}{\the\toksD}
1421 \ifx\first,\addtokens{\toksB}{\space}\fi
1422 \fi
1423 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1424 \next}
1425 \def\makelink{\addtokens{\toksB}%
1426 {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
1427 \def\pdflink#1{%
1428 \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
1429 \setcolor{\linkcolor}#1\endlink}
1430 \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
1431 \else
1432 % non-pdf mode
1433 \let\pdfmkdest = \gobble
1434 \let\pdfurl = \gobble
1435 \let\endlink = \relax
1436 \let\setcolor = \gobble
1437 \let\pdfsetcolor = \gobble
1438 \let\pdfmakeoutlines = \relax
1439 \fi % \ifx\pdfoutput
1440
1441
1442 \message{fonts,}
1443
1444 % Change the current font style to #1, remembering it in \curfontstyle.
1445 % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
1446 % italics, not bold italics.
1447 %
1448 \def\setfontstyle#1{%
1449 \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
1450 \csname ten#1\endcsname % change the current font
1451 }
1452
1453 % Select #1 fonts with the current style.
1454 %
1455 \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
1456
1457 \def\rm{\fam=0 \setfontstyle{rm}}
1458 \def\it{\fam=\itfam \setfontstyle{it}}
1459 \def\sl{\fam=\slfam \setfontstyle{sl}}
1460 \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
1461 \def\tt{\fam=\ttfam \setfontstyle{tt}}
1462
1463 % Unfortunately, we have to override this for titles and the like, since
1464 % in those cases "rm" is bold. Sigh.
1465 \def\rmisbold{\rm\def\curfontstyle{bf}}
1466
1467 % Texinfo sort of supports the sans serif font style, which plain TeX does not.
1468 % So we set up a \sf.
1469 \newfam\sffam
1470 \def\sf{\fam=\sffam \setfontstyle{sf}}
1471 \let\li = \sf % Sometimes we call it \li, not \sf.
1472
1473 % We don't need math for this font style.
1474 \def\ttsl{\setfontstyle{ttsl}}
1475
1476
1477 % Set the baselineskip to #1, and the lineskip and strut size
1478 % correspondingly. There is no deep meaning behind these magic numbers
1479 % used as factors; they just match (closely enough) what Knuth defined.
1480 %
1481 \def\lineskipfactor{.08333}
1482 \def\strutheightpercent{.70833}
1483 \def\strutdepthpercent {.29167}
1484 %
1485 % can get a sort of poor man's double spacing by redefining this.
1486 \def\baselinefactor{1}
1487 %
1488 \newdimen\textleading
1489 \def\setleading#1{%
1490 \dimen0 = #1\relax
1491 \normalbaselineskip = \baselinefactor\dimen0
1492 \normallineskip = \lineskipfactor\normalbaselineskip
1493 \normalbaselines
1494 \setbox\strutbox =\hbox{%
1495 \vrule width0pt height\strutheightpercent\baselineskip
1496 depth \strutdepthpercent \baselineskip
1497 }%
1498 }
1499
1500 % PDF CMaps. See also LaTeX's t1.cmap.
1501 %
1502 % do nothing with this by default.
1503 \expandafter\let\csname cmapOT1\endcsname\gobble
1504 \expandafter\let\csname cmapOT1IT\endcsname\gobble
1505 \expandafter\let\csname cmapOT1TT\endcsname\gobble
1506
1507 % if we are producing pdf, and we have \pdffontattr, then define cmaps.
1508 % (\pdffontattr was introduced many years ago, but people still run
1509 % older pdftex's; it's easy to conditionalize, so we do.)
1510 \ifpdf \ifx\pdffontattr\thisisundefined \else
1511 \begingroup
1512 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
1513 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
1514 %%DocumentNeededResources: ProcSet (CIDInit)
1515 %%IncludeResource: ProcSet (CIDInit)
1516 %%BeginResource: CMap (TeX-OT1-0)
1517 %%Title: (TeX-OT1-0 TeX OT1 0)
1518 %%Version: 1.000
1519 %%EndComments
1520 /CIDInit /ProcSet findresource begin
1521 12 dict begin
1522 begincmap
1523 /CIDSystemInfo
1524 << /Registry (TeX)
1525 /Ordering (OT1)
1526 /Supplement 0
1527 >> def
1528 /CMapName /TeX-OT1-0 def
1529 /CMapType 2 def
1530 1 begincodespacerange
1531 <00> <7F>
1532 endcodespacerange
1533 8 beginbfrange
1534 <00> <01> <0393>
1535 <09> <0A> <03A8>
1536 <23> <26> <0023>
1537 <28> <3B> <0028>
1538 <3F> <5B> <003F>
1539 <5D> <5E> <005D>
1540 <61> <7A> <0061>
1541 <7B> <7C> <2013>
1542 endbfrange
1543 40 beginbfchar
1544 <02> <0398>
1545 <03> <039B>
1546 <04> <039E>
1547 <05> <03A0>
1548 <06> <03A3>
1549 <07> <03D2>
1550 <08> <03A6>
1551 <0B> <00660066>
1552 <0C> <00660069>
1553 <0D> <0066006C>
1554 <0E> <006600660069>
1555 <0F> <00660066006C>
1556 <10> <0131>
1557 <11> <0237>
1558 <12> <0060>
1559 <13> <00B4>
1560 <14> <02C7>
1561 <15> <02D8>
1562 <16> <00AF>
1563 <17> <02DA>
1564 <18> <00B8>
1565 <19> <00DF>
1566 <1A> <00E6>
1567 <1B> <0153>
1568 <1C> <00F8>
1569 <1D> <00C6>
1570 <1E> <0152>
1571 <1F> <00D8>
1572 <21> <0021>
1573 <22> <201D>
1574 <27> <2019>
1575 <3C> <00A1>
1576 <3D> <003D>
1577 <3E> <00BF>
1578 <5C> <201C>
1579 <5F> <02D9>
1580 <60> <2018>
1581 <7D> <02DD>
1582 <7E> <007E>
1583 <7F> <00A8>
1584 endbfchar
1585 endcmap
1586 CMapName currentdict /CMap defineresource pop
1587 end
1588 end
1589 %%EndResource
1590 %%EOF
1591 }\endgroup
1592 \expandafter\edef\csname cmapOT1\endcsname#1{%
1593 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
1594 }%
1595 %
1596 % \cmapOT1IT
1597 \begingroup
1598 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
1599 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
1600 %%DocumentNeededResources: ProcSet (CIDInit)
1601 %%IncludeResource: ProcSet (CIDInit)
1602 %%BeginResource: CMap (TeX-OT1IT-0)
1603 %%Title: (TeX-OT1IT-0 TeX OT1IT 0)
1604 %%Version: 1.000
1605 %%EndComments
1606 /CIDInit /ProcSet findresource begin
1607 12 dict begin
1608 begincmap
1609 /CIDSystemInfo
1610 << /Registry (TeX)
1611 /Ordering (OT1IT)
1612 /Supplement 0
1613 >> def
1614 /CMapName /TeX-OT1IT-0 def
1615 /CMapType 2 def
1616 1 begincodespacerange
1617 <00> <7F>
1618 endcodespacerange
1619 8 beginbfrange
1620 <00> <01> <0393>
1621 <09> <0A> <03A8>
1622 <25> <26> <0025>
1623 <28> <3B> <0028>
1624 <3F> <5B> <003F>
1625 <5D> <5E> <005D>
1626 <61> <7A> <0061>
1627 <7B> <7C> <2013>
1628 endbfrange
1629 42 beginbfchar
1630 <02> <0398>
1631 <03> <039B>
1632 <04> <039E>
1633 <05> <03A0>
1634 <06> <03A3>
1635 <07> <03D2>
1636 <08> <03A6>
1637 <0B> <00660066>
1638 <0C> <00660069>
1639 <0D> <0066006C>
1640 <0E> <006600660069>
1641 <0F> <00660066006C>
1642 <10> <0131>
1643 <11> <0237>
1644 <12> <0060>
1645 <13> <00B4>
1646 <14> <02C7>
1647 <15> <02D8>
1648 <16> <00AF>
1649 <17> <02DA>
1650 <18> <00B8>
1651 <19> <00DF>
1652 <1A> <00E6>
1653 <1B> <0153>
1654 <1C> <00F8>
1655 <1D> <00C6>
1656 <1E> <0152>
1657 <1F> <00D8>
1658 <21> <0021>
1659 <22> <201D>
1660 <23> <0023>
1661 <24> <00A3>
1662 <27> <2019>
1663 <3C> <00A1>
1664 <3D> <003D>
1665 <3E> <00BF>
1666 <5C> <201C>
1667 <5F> <02D9>
1668 <60> <2018>
1669 <7D> <02DD>
1670 <7E> <007E>
1671 <7F> <00A8>
1672 endbfchar
1673 endcmap
1674 CMapName currentdict /CMap defineresource pop
1675 end
1676 end
1677 %%EndResource
1678 %%EOF
1679 }\endgroup
1680 \expandafter\edef\csname cmapOT1IT\endcsname#1{%
1681 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
1682 }%
1683 %
1684 % \cmapOT1TT
1685 \begingroup
1686 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
1687 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
1688 %%DocumentNeededResources: ProcSet (CIDInit)
1689 %%IncludeResource: ProcSet (CIDInit)
1690 %%BeginResource: CMap (TeX-OT1TT-0)
1691 %%Title: (TeX-OT1TT-0 TeX OT1TT 0)
1692 %%Version: 1.000
1693 %%EndComments
1694 /CIDInit /ProcSet findresource begin
1695 12 dict begin
1696 begincmap
1697 /CIDSystemInfo
1698 << /Registry (TeX)
1699 /Ordering (OT1TT)
1700 /Supplement 0
1701 >> def
1702 /CMapName /TeX-OT1TT-0 def
1703 /CMapType 2 def
1704 1 begincodespacerange
1705 <00> <7F>
1706 endcodespacerange
1707 5 beginbfrange
1708 <00> <01> <0393>
1709 <09> <0A> <03A8>
1710 <21> <26> <0021>
1711 <28> <5F> <0028>
1712 <61> <7E> <0061>
1713 endbfrange
1714 32 beginbfchar
1715 <02> <0398>
1716 <03> <039B>
1717 <04> <039E>
1718 <05> <03A0>
1719 <06> <03A3>
1720 <07> <03D2>
1721 <08> <03A6>
1722 <0B> <2191>
1723 <0C> <2193>
1724 <0D> <0027>
1725 <0E> <00A1>
1726 <0F> <00BF>
1727 <10> <0131>
1728 <11> <0237>
1729 <12> <0060>
1730 <13> <00B4>
1731 <14> <02C7>
1732 <15> <02D8>
1733 <16> <00AF>
1734 <17> <02DA>
1735 <18> <00B8>
1736 <19> <00DF>
1737 <1A> <00E6>
1738 <1B> <0153>
1739 <1C> <00F8>
1740 <1D> <00C6>
1741 <1E> <0152>
1742 <1F> <00D8>
1743 <20> <2423>
1744 <27> <2019>
1745 <60> <2018>
1746 <7F> <00A8>
1747 endbfchar
1748 endcmap
1749 CMapName currentdict /CMap defineresource pop
1750 end
1751 end
1752 %%EndResource
1753 %%EOF
1754 }\endgroup
1755 \expandafter\edef\csname cmapOT1TT\endcsname#1{%
1756 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
1757 }%
1758 \fi\fi
1759
1760
1761 % Set the font macro #1 to the font named \fontprefix#2.
1762 % #3 is the font's design size, #4 is a scale factor, #5 is the CMap
1763 % encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
1764 % Example:
1765 % #1 = \textrm
1766 % #2 = \rmshape
1767 % #3 = 10
1768 % #4 = \mainmagstep
1769 % #5 = OT1
1770 %
1771 \def\setfont#1#2#3#4#5{%
1772 \font#1=\fontprefix#2#3 scaled #4
1773 \csname cmap#5\endcsname#1%
1774 }
1775 % This is what gets called when #5 of \setfont is empty.
1776 \let\cmap\gobble
1777 %
1778 % (end of cmaps)
1779
1780 % Use cm as the default font prefix.
1781 % To specify the font prefix, you must define \fontprefix
1782 % before you read in texinfo.tex.
1783 \ifx\fontprefix\thisisundefined
1784 \def\fontprefix{cm}
1785 \fi
1786 % Support font families that don't use the same naming scheme as CM.
1787 \def\rmshape{r}
1788 \def\rmbshape{bx} % where the normal face is bold
1789 \def\bfshape{b}
1790 \def\bxshape{bx}
1791 \def\ttshape{tt}
1792 \def\ttbshape{tt}
1793 \def\ttslshape{sltt}
1794 \def\itshape{ti}
1795 \def\itbshape{bxti}
1796 \def\slshape{sl}
1797 \def\slbshape{bxsl}
1798 \def\sfshape{ss}
1799 \def\sfbshape{ss}
1800 \def\scshape{csc}
1801 \def\scbshape{csc}
1802
1803 % Definitions for a main text size of 11pt. (The default in Texinfo.)
1804 %
1805 \def\definetextfontsizexi{%
1806 % Text fonts (11.2pt, magstep1).
1807 \def\textnominalsize{11pt}
1808 \edef\mainmagstep{\magstephalf}
1809 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
1810 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
1811 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
1812 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
1813 \setfont\textsl\slshape{10}{\mainmagstep}{OT1}
1814 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
1815 \setfont\textsc\scshape{10}{\mainmagstep}{OT1}
1816 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
1817 \font\texti=cmmi10 scaled \mainmagstep
1818 \font\textsy=cmsy10 scaled \mainmagstep
1819 \def\textecsize{1095}
1820
1821 % A few fonts for @defun names and args.
1822 \setfont\defbf\bfshape{10}{\magstep1}{OT1}
1823 \setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
1824 \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
1825 \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
1826
1827 % Fonts for indices, footnotes, small examples (9pt).
1828 \def\smallnominalsize{9pt}
1829 \setfont\smallrm\rmshape{9}{1000}{OT1}
1830 \setfont\smalltt\ttshape{9}{1000}{OT1TT}
1831 \setfont\smallbf\bfshape{10}{900}{OT1}
1832 \setfont\smallit\itshape{9}{1000}{OT1IT}
1833 \setfont\smallsl\slshape{9}{1000}{OT1}
1834 \setfont\smallsf\sfshape{9}{1000}{OT1}
1835 \setfont\smallsc\scshape{10}{900}{OT1}
1836 \setfont\smallttsl\ttslshape{10}{900}{OT1TT}
1837 \font\smalli=cmmi9
1838 \font\smallsy=cmsy9
1839 \def\smallecsize{0900}
1840
1841 % Fonts for small examples (8pt).
1842 \def\smallernominalsize{8pt}
1843 \setfont\smallerrm\rmshape{8}{1000}{OT1}
1844 \setfont\smallertt\ttshape{8}{1000}{OT1TT}
1845 \setfont\smallerbf\bfshape{10}{800}{OT1}
1846 \setfont\smallerit\itshape{8}{1000}{OT1IT}
1847 \setfont\smallersl\slshape{8}{1000}{OT1}
1848 \setfont\smallersf\sfshape{8}{1000}{OT1}
1849 \setfont\smallersc\scshape{10}{800}{OT1}
1850 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
1851 \font\smalleri=cmmi8
1852 \font\smallersy=cmsy8
1853 \def\smallerecsize{0800}
1854
1855 % Fonts for title page (20.4pt):
1856 \def\titlenominalsize{20pt}
1857 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
1858 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
1859 \setfont\titlesl\slbshape{10}{\magstep4}{OT1}
1860 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
1861 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
1862 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
1863 \let\titlebf=\titlerm
1864 \setfont\titlesc\scbshape{10}{\magstep4}{OT1}
1865 \font\titlei=cmmi12 scaled \magstep3
1866 \font\titlesy=cmsy10 scaled \magstep4
1867 \def\titleecsize{2074}
1868
1869 % Chapter (and unnumbered) fonts (17.28pt).
1870 \def\chapnominalsize{17pt}
1871 \setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
1872 \setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
1873 \setfont\chapsl\slbshape{10}{\magstep3}{OT1}
1874 \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
1875 \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
1876 \setfont\chapsf\sfbshape{17}{1000}{OT1}
1877 \let\chapbf=\chaprm
1878 \setfont\chapsc\scbshape{10}{\magstep3}{OT1}
1879 \font\chapi=cmmi12 scaled \magstep2
1880 \font\chapsy=cmsy10 scaled \magstep3
1881 \def\chapecsize{1728}
1882
1883 % Section fonts (14.4pt).
1884 \def\secnominalsize{14pt}
1885 \setfont\secrm\rmbshape{12}{\magstep1}{OT1}
1886 \setfont\secit\itbshape{10}{\magstep2}{OT1IT}
1887 \setfont\secsl\slbshape{10}{\magstep2}{OT1}
1888 \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
1889 \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
1890 \setfont\secsf\sfbshape{12}{\magstep1}{OT1}
1891 \let\secbf\secrm
1892 \setfont\secsc\scbshape{10}{\magstep2}{OT1}
1893 \font\seci=cmmi12 scaled \magstep1
1894 \font\secsy=cmsy10 scaled \magstep2
1895 \def\sececsize{1440}
1896
1897 % Subsection fonts (13.15pt).
1898 \def\ssecnominalsize{13pt}
1899 \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
1900 \setfont\ssecit\itbshape{10}{1315}{OT1IT}
1901 \setfont\ssecsl\slbshape{10}{1315}{OT1}
1902 \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
1903 \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
1904 \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
1905 \let\ssecbf\ssecrm
1906 \setfont\ssecsc\scbshape{10}{1315}{OT1}
1907 \font\sseci=cmmi12 scaled \magstephalf
1908 \font\ssecsy=cmsy10 scaled 1315
1909 \def\ssececsize{1200}
1910
1911 % Reduced fonts for @acro in text (10pt).
1912 \def\reducednominalsize{10pt}
1913 \setfont\reducedrm\rmshape{10}{1000}{OT1}
1914 \setfont\reducedtt\ttshape{10}{1000}{OT1TT}
1915 \setfont\reducedbf\bfshape{10}{1000}{OT1}
1916 \setfont\reducedit\itshape{10}{1000}{OT1IT}
1917 \setfont\reducedsl\slshape{10}{1000}{OT1}
1918 \setfont\reducedsf\sfshape{10}{1000}{OT1}
1919 \setfont\reducedsc\scshape{10}{1000}{OT1}
1920 \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
1921 \font\reducedi=cmmi10
1922 \font\reducedsy=cmsy10
1923 \def\reducedecsize{1000}
1924
1925 \textleading = 13.2pt % line spacing for 11pt CM
1926 \textfonts % reset the current fonts
1927 \rm
1928 } % end of 11pt text font size definitions, \definetextfontsizexi
1929
1930
1931 % Definitions to make the main text be 10pt Computer Modern, with
1932 % section, chapter, etc., sizes following suit. This is for the GNU
1933 % Press printing of the Emacs 22 manual. Maybe other manuals in the
1934 % future. Used with @smallbook, which sets the leading to 12pt.
1935 %
1936 \def\definetextfontsizex{%
1937 % Text fonts (10pt).
1938 \def\textnominalsize{10pt}
1939 \edef\mainmagstep{1000}
1940 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
1941 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
1942 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
1943 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
1944 \setfont\textsl\slshape{10}{\mainmagstep}{OT1}
1945 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
1946 \setfont\textsc\scshape{10}{\mainmagstep}{OT1}
1947 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
1948 \font\texti=cmmi10 scaled \mainmagstep
1949 \font\textsy=cmsy10 scaled \mainmagstep
1950 \def\textecsize{1000}
1951
1952 % A few fonts for @defun names and args.
1953 \setfont\defbf\bfshape{10}{\magstephalf}{OT1}
1954 \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
1955 \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
1956 \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
1957
1958 % Fonts for indices, footnotes, small examples (9pt).
1959 \def\smallnominalsize{9pt}
1960 \setfont\smallrm\rmshape{9}{1000}{OT1}
1961 \setfont\smalltt\ttshape{9}{1000}{OT1TT}
1962 \setfont\smallbf\bfshape{10}{900}{OT1}
1963 \setfont\smallit\itshape{9}{1000}{OT1IT}
1964 \setfont\smallsl\slshape{9}{1000}{OT1}
1965 \setfont\smallsf\sfshape{9}{1000}{OT1}
1966 \setfont\smallsc\scshape{10}{900}{OT1}
1967 \setfont\smallttsl\ttslshape{10}{900}{OT1TT}
1968 \font\smalli=cmmi9
1969 \font\smallsy=cmsy9
1970 \def\smallecsize{0900}
1971
1972 % Fonts for small examples (8pt).
1973 \def\smallernominalsize{8pt}
1974 \setfont\smallerrm\rmshape{8}{1000}{OT1}
1975 \setfont\smallertt\ttshape{8}{1000}{OT1TT}
1976 \setfont\smallerbf\bfshape{10}{800}{OT1}
1977 \setfont\smallerit\itshape{8}{1000}{OT1IT}
1978 \setfont\smallersl\slshape{8}{1000}{OT1}
1979 \setfont\smallersf\sfshape{8}{1000}{OT1}
1980 \setfont\smallersc\scshape{10}{800}{OT1}
1981 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
1982 \font\smalleri=cmmi8
1983 \font\smallersy=cmsy8
1984 \def\smallerecsize{0800}
1985
1986 % Fonts for title page (20.4pt):
1987 \def\titlenominalsize{20pt}
1988 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
1989 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
1990 \setfont\titlesl\slbshape{10}{\magstep4}{OT1}
1991 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
1992 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
1993 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
1994 \let\titlebf=\titlerm
1995 \setfont\titlesc\scbshape{10}{\magstep4}{OT1}
1996 \font\titlei=cmmi12 scaled \magstep3
1997 \font\titlesy=cmsy10 scaled \magstep4
1998 \def\titleecsize{2074}
1999
2000 % Chapter fonts (14.4pt).
2001 \def\chapnominalsize{14pt}
2002 \setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
2003 \setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
2004 \setfont\chapsl\slbshape{10}{\magstep2}{OT1}
2005 \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
2006 \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
2007 \setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
2008 \let\chapbf\chaprm
2009 \setfont\chapsc\scbshape{10}{\magstep2}{OT1}
2010 \font\chapi=cmmi12 scaled \magstep1
2011 \font\chapsy=cmsy10 scaled \magstep2
2012 \def\chapecsize{1440}
2013
2014 % Section fonts (12pt).
2015 \def\secnominalsize{12pt}
2016 \setfont\secrm\rmbshape{12}{1000}{OT1}
2017 \setfont\secit\itbshape{10}{\magstep1}{OT1IT}
2018 \setfont\secsl\slbshape{10}{\magstep1}{OT1}
2019 \setfont\sectt\ttbshape{12}{1000}{OT1TT}
2020 \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
2021 \setfont\secsf\sfbshape{12}{1000}{OT1}
2022 \let\secbf\secrm
2023 \setfont\secsc\scbshape{10}{\magstep1}{OT1}
2024 \font\seci=cmmi12
2025 \font\secsy=cmsy10 scaled \magstep1
2026 \def\sececsize{1200}
2027
2028 % Subsection fonts (10pt).
2029 \def\ssecnominalsize{10pt}
2030 \setfont\ssecrm\rmbshape{10}{1000}{OT1}
2031 \setfont\ssecit\itbshape{10}{1000}{OT1IT}
2032 \setfont\ssecsl\slbshape{10}{1000}{OT1}
2033 \setfont\ssectt\ttbshape{10}{1000}{OT1TT}
2034 \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
2035 \setfont\ssecsf\sfbshape{10}{1000}{OT1}
2036 \let\ssecbf\ssecrm
2037 \setfont\ssecsc\scbshape{10}{1000}{OT1}
2038 \font\sseci=cmmi10
2039 \font\ssecsy=cmsy10
2040 \def\ssececsize{1000}
2041
2042 % Reduced fonts for @acro in text (9pt).
2043 \def\reducednominalsize{9pt}
2044 \setfont\reducedrm\rmshape{9}{1000}{OT1}
2045 \setfont\reducedtt\ttshape{9}{1000}{OT1TT}
2046 \setfont\reducedbf\bfshape{10}{900}{OT1}
2047 \setfont\reducedit\itshape{9}{1000}{OT1IT}
2048 \setfont\reducedsl\slshape{9}{1000}{OT1}
2049 \setfont\reducedsf\sfshape{9}{1000}{OT1}
2050 \setfont\reducedsc\scshape{10}{900}{OT1}
2051 \setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
2052 \font\reducedi=cmmi9
2053 \font\reducedsy=cmsy9
2054 \def\reducedecsize{0900}
2055
2056 \divide\parskip by 2 % reduce space between paragraphs
2057 \textleading = 12pt % line spacing for 10pt CM
2058 \textfonts % reset the current fonts
2059 \rm
2060 } % end of 10pt text font size definitions, \definetextfontsizex
2061
2062
2063 % We provide the user-level command
2064 % @fonttextsize 10
2065 % (or 11) to redefine the text font size. pt is assumed.
2066 %
2067 \def\xiword{11}
2068 \def\xword{10}
2069 \def\xwordpt{10pt}
2070 %
2071 \parseargdef\fonttextsize{%
2072 \def\textsizearg{#1}%
2073 %\wlog{doing @fonttextsize \textsizearg}%
2074 %
2075 % Set \globaldefs so that documents can use this inside @tex, since
2076 % makeinfo 4.8 does not support it, but we need it nonetheless.
2077 %
2078 \begingroup \globaldefs=1
2079 \ifx\textsizearg\xword \definetextfontsizex
2080 \else \ifx\textsizearg\xiword \definetextfontsizexi
2081 \else
2082 \errhelp=\EMsimple
2083 \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
2084 \fi\fi
2085 \endgroup
2086 }
2087
2088
2089 % In order for the font changes to affect most math symbols and letters,
2090 % we have to define the \textfont of the standard families. Since
2091 % texinfo doesn't allow for producing subscripts and superscripts except
2092 % in the main text, we don't bother to reset \scriptfont and
2093 % \scriptscriptfont (which would also require loading a lot more fonts).
2094 %
2095 \def\resetmathfonts{%
2096 \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
2097 \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
2098 \textfont\ttfam=\tentt \textfont\sffam=\tensf
2099 }
2100
2101 % The font-changing commands redefine the meanings of \tenSTYLE, instead
2102 % of just \STYLE. We do this because \STYLE needs to also set the
2103 % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
2104 % \tenSTYLE to set the current font.
2105 %
2106 % Each font-changing command also sets the names \lsize (one size lower)
2107 % and \lllsize (three sizes lower). These relative commands are used in
2108 % the LaTeX logo and acronyms.
2109 %
2110 % This all needs generalizing, badly.
2111 %
2112 \def\textfonts{%
2113 \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
2114 \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
2115 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
2116 \let\tenttsl=\textttsl
2117 \def\curfontsize{text}%
2118 \def\lsize{reduced}\def\lllsize{smaller}%
2119 \resetmathfonts \setleading{\textleading}}
2120 \def\titlefonts{%
2121 \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
2122 \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
2123 \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
2124 \let\tenttsl=\titlettsl
2125 \def\curfontsize{title}%
2126 \def\lsize{chap}\def\lllsize{subsec}%
2127 \resetmathfonts \setleading{27pt}}
2128 \def\titlefont#1{{\titlefonts\rmisbold #1}}
2129 \def\chapfonts{%
2130 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
2131 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
2132 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
2133 \let\tenttsl=\chapttsl
2134 \def\curfontsize{chap}%
2135 \def\lsize{sec}\def\lllsize{text}%
2136 \resetmathfonts \setleading{19pt}}
2137 \def\secfonts{%
2138 \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
2139 \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
2140 \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
2141 \let\tenttsl=\secttsl
2142 \def\curfontsize{sec}%
2143 \def\lsize{subsec}\def\lllsize{reduced}%
2144 \resetmathfonts \setleading{16pt}}
2145 \def\subsecfonts{%
2146 \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
2147 \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
2148 \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
2149 \let\tenttsl=\ssecttsl
2150 \def\curfontsize{ssec}%
2151 \def\lsize{text}\def\lllsize{small}%
2152 \resetmathfonts \setleading{15pt}}
2153 \let\subsubsecfonts = \subsecfonts
2154 \def\reducedfonts{%
2155 \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
2156 \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
2157 \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
2158 \let\tenttsl=\reducedttsl
2159 \def\curfontsize{reduced}%
2160 \def\lsize{small}\def\lllsize{smaller}%
2161 \resetmathfonts \setleading{10.5pt}}
2162 \def\smallfonts{%
2163 \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
2164 \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
2165 \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
2166 \let\tenttsl=\smallttsl
2167 \def\curfontsize{small}%
2168 \def\lsize{smaller}\def\lllsize{smaller}%
2169 \resetmathfonts \setleading{10.5pt}}
2170 \def\smallerfonts{%
2171 \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
2172 \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
2173 \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
2174 \let\tenttsl=\smallerttsl
2175 \def\curfontsize{smaller}%
2176 \def\lsize{smaller}\def\lllsize{smaller}%
2177 \resetmathfonts \setleading{9.5pt}}
2178
2179 % Fonts for short table of contents.
2180 \setfont\shortcontrm\rmshape{12}{1000}{OT1}
2181 \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
2182 \setfont\shortcontsl\slshape{12}{1000}{OT1}
2183 \setfont\shortconttt\ttshape{12}{1000}{OT1TT}
2184
2185 % Define these just so they can be easily changed for other fonts.
2186 \def\angleleft{$\langle$}
2187 \def\angleright{$\rangle$}
2188
2189 % Set the fonts to use with the @small... environments.
2190 \let\smallexamplefonts = \smallfonts
2191
2192 % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
2193 % can fit this many characters:
2194 % 8.5x11=86 smallbook=72 a4=90 a5=69
2195 % If we use \scriptfonts (8pt), then we can fit this many characters:
2196 % 8.5x11=90+ smallbook=80 a4=90+ a5=77
2197 % For me, subjectively, the few extra characters that fit aren't worth
2198 % the additional smallness of 8pt. So I'm making the default 9pt.
2199 %
2200 % By the way, for comparison, here's what fits with @example (10pt):
2201 % 8.5x11=71 smallbook=60 a4=75 a5=58
2202 % --karl, 24jan03.
2203
2204 % Set up the default fonts, so we can use them for creating boxes.
2205 %
2206 \definetextfontsizexi
2207
2208
2209 \message{markup,}
2210
2211 % Check if we are currently using a typewriter font. Since all the
2212 % Computer Modern typewriter fonts have zero interword stretch (and
2213 % shrink), and it is reasonable to expect all typewriter fonts to have
2214 % this property, we can check that font parameter.
2215 %
2216 \def\ifmonospace{\ifdim\fontdimen3\font=0pt }
2217
2218 % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
2219 % define and register \INITMACRO to be called on markup style changes.
2220 % \INITMACRO can check \currentmarkupstyle for the innermost
2221 % style and the set of \ifmarkupSTYLE switches for all styles
2222 % currently in effect.
2223 \newif\ifmarkupvar
2224 \newif\ifmarkupsamp
2225 \newif\ifmarkupkey
2226 %\newif\ifmarkupfile % @file == @samp.
2227 %\newif\ifmarkupoption % @option == @samp.
2228 \newif\ifmarkupcode
2229 \newif\ifmarkupkbd
2230 %\newif\ifmarkupenv % @env == @code.
2231 %\newif\ifmarkupcommand % @command == @code.
2232 \newif\ifmarkuptex % @tex (and part of @math, for now).
2233 \newif\ifmarkupexample
2234 \newif\ifmarkupverb
2235 \newif\ifmarkupverbatim
2236
2237 \let\currentmarkupstyle\empty
2238
2239 \def\setupmarkupstyle#1{%
2240 \csname markup#1true\endcsname
2241 \def\currentmarkupstyle{#1}%
2242 \markupstylesetup
2243 }
2244
2245 \let\markupstylesetup\empty
2246
2247 \def\defmarkupstylesetup#1{%
2248 \expandafter\def\expandafter\markupstylesetup
2249 \expandafter{\markupstylesetup #1}%
2250 \def#1%
2251 }
2252
2253 % Markup style setup for left and right quotes.
2254 \defmarkupstylesetup\markupsetuplq{%
2255 \expandafter\let\expandafter \temp
2256 \csname markupsetuplq\currentmarkupstyle\endcsname
2257 \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
2258 }
2259
2260 \defmarkupstylesetup\markupsetuprq{%
2261 \expandafter\let\expandafter \temp
2262 \csname markupsetuprq\currentmarkupstyle\endcsname
2263 \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
2264 }
2265
2266 {
2267 \catcode`\'=\active
2268 \catcode`\`=\active
2269
2270 \gdef\markupsetuplqdefault{\let`\lq}
2271 \gdef\markupsetuprqdefault{\let'\rq}
2272
2273 \gdef\markupsetcodequoteleft{\let`\codequoteleft}
2274 \gdef\markupsetcodequoteright{\let'\codequoteright}
2275 }
2276
2277 \let\markupsetuplqcode \markupsetcodequoteleft
2278 \let\markupsetuprqcode \markupsetcodequoteright
2279 %
2280 \let\markupsetuplqexample \markupsetcodequoteleft
2281 \let\markupsetuprqexample \markupsetcodequoteright
2282 %
2283 \let\markupsetuplqkbd \markupsetcodequoteleft
2284 \let\markupsetuprqkbd \markupsetcodequoteright
2285 %
2286 \let\markupsetuplqsamp \markupsetcodequoteleft
2287 \let\markupsetuprqsamp \markupsetcodequoteright
2288 %
2289 \let\markupsetuplqverb \markupsetcodequoteleft
2290 \let\markupsetuprqverb \markupsetcodequoteright
2291 %
2292 \let\markupsetuplqverbatim \markupsetcodequoteleft
2293 \let\markupsetuprqverbatim \markupsetcodequoteright
2294
2295 % Allow an option to not use regular directed right quote/apostrophe
2296 % (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
2297 % The undirected quote is ugly, so don't make it the default, but it
2298 % works for pasting with more pdf viewers (at least evince), the
2299 % lilypond developers report. xpdf does work with the regular 0x27.
2300 %
2301 \def\codequoteright{%
2302 \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
2303 \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
2304 '%
2305 \else \char'15 \fi
2306 \else \char'15 \fi
2307 }
2308 %
2309 % and a similar option for the left quote char vs. a grave accent.
2310 % Modern fonts display ASCII 0x60 as a grave accent, so some people like
2311 % the code environments to do likewise.
2312 %
2313 \def\codequoteleft{%
2314 \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
2315 \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
2316 % [Knuth] pp. 380,381,391
2317 % \relax disables Spanish ligatures ?` and !` of \tt font.
2318 \relax`%
2319 \else \char'22 \fi
2320 \else \char'22 \fi
2321 }
2322
2323 % Commands to set the quote options.
2324 %
2325 \parseargdef\codequoteundirected{%
2326 \def\temp{#1}%
2327 \ifx\temp\onword
2328 \expandafter\let\csname SETtxicodequoteundirected\endcsname
2329 = t%
2330 \else\ifx\temp\offword
2331 \expandafter\let\csname SETtxicodequoteundirected\endcsname
2332 = \relax
2333 \else
2334 \errhelp = \EMsimple
2335 \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
2336 \fi\fi
2337 }
2338 %
2339 \parseargdef\codequotebacktick{%
2340 \def\temp{#1}%
2341 \ifx\temp\onword
2342 \expandafter\let\csname SETtxicodequotebacktick\endcsname
2343 = t%
2344 \else\ifx\temp\offword
2345 \expandafter\let\csname SETtxicodequotebacktick\endcsname
2346 = \relax
2347 \else
2348 \errhelp = \EMsimple
2349 \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
2350 \fi\fi
2351 }
2352
2353 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
2354 \def\noligaturesquoteleft{\relax\lq}
2355
2356 % Count depth in font-changes, for error checks
2357 \newcount\fontdepth \fontdepth=0
2358
2359 % Font commands.
2360
2361 % #1 is the font command (\sl or \it), #2 is the text to slant.
2362 % If we are in a monospaced environment, however, 1) always use \ttsl,
2363 % and 2) do not add an italic correction.
2364 \def\dosmartslant#1#2{%
2365 \ifusingtt
2366 {{\ttsl #2}\let\next=\relax}%
2367 {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
2368 \next
2369 }
2370 \def\smartslanted{\dosmartslant\sl}
2371 \def\smartitalic{\dosmartslant\it}
2372
2373 % Output an italic correction unless \next (presumed to be the following
2374 % character) is such as not to need one.
2375 \def\smartitaliccorrection{%
2376 \ifx\next,%
2377 \else\ifx\next-%
2378 \else\ifx\next.%
2379 \else\ptexslash
2380 \fi\fi\fi
2381 \aftersmartic
2382 }
2383
2384 % Unconditional use \ttsl, and no ic. @var is set to this for defuns.
2385 \def\ttslanted#1{{\ttsl #1}}
2386
2387 % @cite is like \smartslanted except unconditionally use \sl. We never want
2388 % ttsl for book titles, do we?
2389 \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
2390
2391 \def\aftersmartic{}
2392 \def\var#1{%
2393 \let\saveaftersmartic = \aftersmartic
2394 \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
2395 \smartslanted{#1}%
2396 }
2397
2398 \let\i=\smartitalic
2399 \let\slanted=\smartslanted
2400 \let\dfn=\smartslanted
2401 \let\emph=\smartitalic
2402
2403 % Explicit font changes: @r, @sc, undocumented @ii.
2404 \def\r#1{{\rm #1}} % roman font
2405 \def\sc#1{{\smallcaps#1}} % smallcaps font
2406 \def\ii#1{{\it #1}} % italic font
2407
2408 % @b, explicit bold. Also @strong.
2409 \def\b#1{{\bf #1}}
2410 \let\strong=\b
2411
2412 % @sansserif, explicit sans.
2413 \def\sansserif#1{{\sf #1}}
2414
2415 % We can't just use \exhyphenpenalty, because that only has effect at
2416 % the end of a paragraph. Restore normal hyphenation at the end of the
2417 % group within which \nohyphenation is presumably called.
2418 %
2419 \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
2420 \def\restorehyphenation{\hyphenchar\font = `- }
2421
2422 % Set sfcode to normal for the chars that usually have another value.
2423 % Can't use plain's \frenchspacing because it uses the `\x notation, and
2424 % sometimes \x has an active definition that messes things up.
2425 %
2426 \catcode`@=11
2427 \def\plainfrenchspacing{%
2428 \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
2429 \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
2430 \def\endofsentencespacefactor{1000}% for @. and friends
2431 }
2432 \def\plainnonfrenchspacing{%
2433 \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
2434 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
2435 \def\endofsentencespacefactor{3000}% for @. and friends
2436 }
2437 \catcode`@=\other
2438 \def\endofsentencespacefactor{3000}% default
2439
2440 % @t, explicit typewriter.
2441 \def\t#1{%
2442 {\tt \rawbackslash \plainfrenchspacing #1}%
2443 \null
2444 }
2445
2446 % @samp.
2447 \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
2448
2449 % @indicateurl is \samp, that is, with quotes.
2450 \let\indicateurl=\samp
2451
2452 % @code (and similar) prints in typewriter, but with spaces the same
2453 % size as normal in the surrounding text, without hyphenation, etc.
2454 % This is a subroutine for that.
2455 \def\tclose#1{%
2456 {%
2457 % Change normal interword space to be same as for the current font.
2458 \spaceskip = \fontdimen2\font
2459 %
2460 % Switch to typewriter.
2461 \tt
2462 %
2463 % But `\ ' produces the large typewriter interword space.
2464 \def\ {{\spaceskip = 0pt{} }}%
2465 %
2466 % Turn off hyphenation.
2467 \nohyphenation
2468 %
2469 \rawbackslash
2470 \plainfrenchspacing
2471 #1%
2472 }%
2473 \null % reset spacefactor to 1000
2474 }
2475
2476 % We *must* turn on hyphenation at `-' and `_' in @code.
2477 % Otherwise, it is too hard to avoid overfull hboxes
2478 % in the Emacs manual, the Library manual, etc.
2479 %
2480 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
2481 % both hyphenation at - and hyphenation within words.
2482 % We must therefore turn them both off (\tclose does that)
2483 % and arrange explicitly to hyphenate at a dash.
2484 % -- rms.
2485 {
2486 \catcode`\-=\active \catcode`\_=\active
2487 \catcode`\'=\active \catcode`\`=\active
2488 \global\let'=\rq \global\let`=\lq % default definitions
2489 %
2490 \global\def\code{\begingroup
2491 \setupmarkupstyle{code}%
2492 % The following should really be moved into \setupmarkupstyle handlers.
2493 \catcode\dashChar=\active \catcode\underChar=\active
2494 \ifallowcodebreaks
2495 \let-\codedash
2496 \let_\codeunder
2497 \else
2498 \let-\normaldash
2499 \let_\realunder
2500 \fi
2501 \codex
2502 }
2503 }
2504
2505 \def\codex #1{\tclose{#1}\endgroup}
2506
2507 \def\normaldash{-}
2508 \def\codedash{-\discretionary{}{}{}}
2509 \def\codeunder{%
2510 % this is all so @math{@code{var_name}+1} can work. In math mode, _
2511 % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
2512 % will therefore expand the active definition of _, which is us
2513 % (inside @code that is), therefore an endless loop.
2514 \ifusingtt{\ifmmode
2515 \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
2516 \else\normalunderscore \fi
2517 \discretionary{}{}{}}%
2518 {\_}%
2519 }
2520
2521 % An additional complication: the above will allow breaks after, e.g.,
2522 % each of the four underscores in __typeof__. This is bad.
2523 % @allowcodebreaks provides a document-level way to turn breaking at -
2524 % and _ on and off.
2525 %
2526 \newif\ifallowcodebreaks \allowcodebreakstrue
2527
2528 \def\keywordtrue{true}
2529 \def\keywordfalse{false}
2530
2531 \parseargdef\allowcodebreaks{%
2532 \def\txiarg{#1}%
2533 \ifx\txiarg\keywordtrue
2534 \allowcodebreakstrue
2535 \else\ifx\txiarg\keywordfalse
2536 \allowcodebreaksfalse
2537 \else
2538 \errhelp = \EMsimple
2539 \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
2540 \fi\fi
2541 }
2542
2543 % For @command, @env, @file, @option quotes seem unnecessary,
2544 % so use \code rather than \samp.
2545 \let\command=\code
2546 \let\env=\code
2547 \let\file=\code
2548 \let\option=\code
2549
2550 % @uref (abbreviation for `urlref') takes an optional (comma-separated)
2551 % second argument specifying the text to display and an optional third
2552 % arg as text to display instead of (rather than in addition to) the url
2553 % itself. First (mandatory) arg is the url.
2554 % (This \urefnobreak definition isn't used now, leaving it for a while
2555 % for comparison.)
2556 \def\urefnobreak#1{\dourefnobreak #1,,,\finish}
2557 \def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
2558 \unsepspaces
2559 \pdfurl{#1}%
2560 \setbox0 = \hbox{\ignorespaces #3}%
2561 \ifdim\wd0 > 0pt
2562 \unhbox0 % third arg given, show only that
2563 \else
2564 \setbox0 = \hbox{\ignorespaces #2}%
2565 \ifdim\wd0 > 0pt
2566 \ifpdf
2567 \unhbox0 % PDF: 2nd arg given, show only it
2568 \else
2569 \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
2570 \fi
2571 \else
2572 \code{#1}% only url given, so show it
2573 \fi
2574 \fi
2575 \endlink
2576 \endgroup}
2577
2578 % This \urefbreak definition is the active one.
2579 \def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
2580 \let\uref=\urefbreak
2581 \def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
2582 \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
2583 \unsepspaces
2584 \pdfurl{#1}%
2585 \setbox0 = \hbox{\ignorespaces #3}%
2586 \ifdim\wd0 > 0pt
2587 \unhbox0 % third arg given, show only that
2588 \else
2589 \setbox0 = \hbox{\ignorespaces #2}%
2590 \ifdim\wd0 > 0pt
2591 \ifpdf
2592 \unhbox0 % PDF: 2nd arg given, show only it
2593 \else
2594 \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
2595 \fi
2596 \else
2597 \urefcode{#1}% only url given, so show it
2598 \fi
2599 \fi
2600 \endlink
2601 \endgroup}
2602
2603 % Allow line breaks around only a few characters (only).
2604 \def\urefcatcodes{%
2605 \catcode\ampChar=\active \catcode\dotChar=\active
2606 \catcode\hashChar=\active \catcode\questChar=\active
2607 \catcode\slashChar=\active
2608 }
2609 {
2610 \urefcatcodes
2611 %
2612 \global\def\urefcode{\begingroup
2613 \setupmarkupstyle{code}%
2614 \urefcatcodes
2615 \let&\urefcodeamp
2616 \let.\urefcodedot
2617 \let#\urefcodehash
2618 \let?\urefcodequest
2619 \let/\urefcodeslash
2620 \codex
2621 }
2622 %
2623 % By default, they are just regular characters.
2624 \global\def&{\normalamp}
2625 \global\def.{\normaldot}
2626 \global\def#{\normalhash}
2627 \global\def?{\normalquest}
2628 \global\def/{\normalslash}
2629 }
2630
2631 % we put a little stretch before and after the breakable chars, to help
2632 % line breaking of long url's. The unequal skips make look better in
2633 % cmtt at least, especially for dots.
2634 \def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
2635 \def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
2636 %
2637 \def\urefcodeamp{\urefprestretch \&\urefpoststretch}
2638 \def\urefcodedot{\urefprestretch .\urefpoststretch}
2639 \def\urefcodehash{\urefprestretch \#\urefpoststretch}
2640 \def\urefcodequest{\urefprestretch ?\urefpoststretch}
2641 \def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
2642 {
2643 \catcode`\/=\active
2644 \global\def\urefcodeslashfinish{%
2645 \urefprestretch \slashChar
2646 % Allow line break only after the final / in a sequence of
2647 % slashes, to avoid line break between the slashes in http://.
2648 \ifx\next/\else \urefpoststretch \fi
2649 }
2650 }
2651
2652 % One more complication: by default we'll break after the special
2653 % characters, but some people like to break before the special chars, so
2654 % allow that. Also allow no breaking at all, for manual control.
2655 %
2656 \parseargdef\urefbreakstyle{%
2657 \def\txiarg{#1}%
2658 \ifx\txiarg\wordnone
2659 \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
2660 \else\ifx\txiarg\wordbefore
2661 \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
2662 \else\ifx\txiarg\wordafter
2663 \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
2664 \else
2665 \errhelp = \EMsimple
2666 \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
2667 \fi\fi\fi
2668 }
2669 \def\wordafter{after}
2670 \def\wordbefore{before}
2671 \def\wordnone{none}
2672
2673 \urefbreakstyle after
2674
2675 % @url synonym for @uref, since that's how everyone uses it.
2676 %
2677 \let\url=\uref
2678
2679 % rms does not like angle brackets --karl, 17may97.
2680 % So now @email is just like @uref, unless we are pdf.
2681 %
2682 %\def\email#1{\angleleft{\tt #1}\angleright}
2683 \ifpdf
2684 \def\email#1{\doemail#1,,\finish}
2685 \def\doemail#1,#2,#3\finish{\begingroup
2686 \unsepspaces
2687 \pdfurl{mailto:#1}%
2688 \setbox0 = \hbox{\ignorespaces #2}%
2689 \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
2690 \endlink
2691 \endgroup}
2692 \else
2693 \let\email=\uref
2694 \fi
2695
2696 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
2697 % `example' (@kbd uses ttsl only inside of @example and friends),
2698 % or `code' (@kbd uses normal tty font always).
2699 \parseargdef\kbdinputstyle{%
2700 \def\txiarg{#1}%
2701 \ifx\txiarg\worddistinct
2702 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
2703 \else\ifx\txiarg\wordexample
2704 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
2705 \else\ifx\txiarg\wordcode
2706 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
2707 \else
2708 \errhelp = \EMsimple
2709 \errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
2710 \fi\fi\fi
2711 }
2712 \def\worddistinct{distinct}
2713 \def\wordexample{example}
2714 \def\wordcode{code}
2715
2716 % Default is `distinct'.
2717 \kbdinputstyle distinct
2718
2719 % @kbd is like @code, except that if the argument is just one @key command,
2720 % then @kbd has no effect.
2721 \def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}}
2722
2723 \def\xkey{\key}
2724 \def\kbdsub#1#2#3\par{%
2725 \def\one{#1}\def\three{#3}\def\threex{??}%
2726 \ifx\one\xkey\ifx\threex\three \key{#2}%
2727 \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
2728 \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
2729 }
2730
2731 % definition of @key that produces a lozenge. Doesn't adjust to text size.
2732 %\setfont\keyrm\rmshape{8}{1000}{OT1}
2733 %\font\keysy=cmsy9
2734 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
2735 % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
2736 % \vbox{\hrule\kern-0.4pt
2737 % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
2738 % \kern-0.4pt\hrule}%
2739 % \kern-.06em\raise0.4pt\hbox{\angleright}}}}
2740
2741 % definition of @key with no lozenge. If the current font is already
2742 % monospace, don't change it; that way, we respect @kbdinputstyle. But
2743 % if it isn't monospace, then use \tt.
2744 %
2745 \def\key#1{{\setupmarkupstyle{key}%
2746 \nohyphenation
2747 \ifmonospace\else\tt\fi
2748 #1}\null}
2749
2750 % @clicksequence{File @click{} Open ...}
2751 \def\clicksequence#1{\begingroup #1\endgroup}
2752
2753 % @clickstyle @arrow (by default)
2754 \parseargdef\clickstyle{\def\click{#1}}
2755 \def\click{\arrow}
2756
2757 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the
2758 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
2759 %
2760 \def\dmn#1{\thinspace #1}
2761
2762 % @l was never documented to mean ``switch to the Lisp font'',
2763 % and it is not used as such in any manual I can find. We need it for
2764 % Polish suppressed-l. --karl, 22sep96.
2765 %\def\l#1{{\li #1}\null}
2766
2767 % @acronym for "FBI", "NATO", and the like.
2768 % We print this one point size smaller, since it's intended for
2769 % all-uppercase.
2770 %
2771 \def\acronym#1{\doacronym #1,,\finish}
2772 \def\doacronym#1,#2,#3\finish{%
2773 {\selectfonts\lsize #1}%
2774 \def\temp{#2}%
2775 \ifx\temp\empty \else
2776 \space ({\unsepspaces \ignorespaces \temp \unskip})%
2777 \fi
2778 \null % reset \spacefactor=1000
2779 }
2780
2781 % @abbr for "Comput. J." and the like.
2782 % No font change, but don't do end-of-sentence spacing.
2783 %
2784 \def\abbr#1{\doabbr #1,,\finish}
2785 \def\doabbr#1,#2,#3\finish{%
2786 {\plainfrenchspacing #1}%
2787 \def\temp{#2}%
2788 \ifx\temp\empty \else
2789 \space ({\unsepspaces \ignorespaces \temp \unskip})%
2790 \fi
2791 \null % reset \spacefactor=1000
2792 }
2793
2794 % @asis just yields its argument. Used with @table, for example.
2795 %
2796 \def\asis#1{#1}
2797
2798 % @math outputs its argument in math mode.
2799 %
2800 % One complication: _ usually means subscripts, but it could also mean
2801 % an actual _ character, as in @math{@var{some_variable} + 1}. So make
2802 % _ active, and distinguish by seeing if the current family is \slfam,
2803 % which is what @var uses.
2804 {
2805 \catcode`\_ = \active
2806 \gdef\mathunderscore{%
2807 \catcode`\_=\active
2808 \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
2809 }
2810 }
2811 % Another complication: we want \\ (and @\) to output a math (or tt) \.
2812 % FYI, plain.tex uses \\ as a temporary control sequence (for no
2813 % particular reason), but this is not advertised and we don't care.
2814 %
2815 % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
2816 \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
2817 %
2818 \def\math{%
2819 \tex
2820 \mathunderscore
2821 \let\\ = \mathbackslash
2822 \mathactive
2823 % make the texinfo accent commands work in math mode
2824 \let\"=\ddot
2825 \let\'=\acute
2826 \let\==\bar
2827 \let\^=\hat
2828 \let\`=\grave
2829 \let\u=\breve
2830 \let\v=\check
2831 \let\~=\tilde
2832 \let\dotaccent=\dot
2833 $\finishmath
2834 }
2835 \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
2836
2837 % Some active characters (such as <) are spaced differently in math.
2838 % We have to reset their definitions in case the @math was an argument
2839 % to a command which sets the catcodes (such as @item or @section).
2840 %
2841 {
2842 \catcode`^ = \active
2843 \catcode`< = \active
2844 \catcode`> = \active
2845 \catcode`+ = \active
2846 \catcode`' = \active
2847 \gdef\mathactive{%
2848 \let^ = \ptexhat
2849 \let< = \ptexless
2850 \let> = \ptexgtr
2851 \let+ = \ptexplus
2852 \let' = \ptexquoteright
2853 }
2854 }
2855
2856 % ctrl is no longer a Texinfo command, but leave this definition for fun.
2857 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
2858
2859 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
2860 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
2861 % except specified as a normal braced arg, so no newlines to worry about.
2862 %
2863 \def\outfmtnametex{tex}
2864 %
2865 \long\def\inlinefmt#1{\doinlinefmt #1,\finish}
2866 \long\def\doinlinefmt#1,#2,\finish{%
2867 \def\inlinefmtname{#1}%
2868 \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
2869 }
2870 % For raw, must switch into @tex before parsing the argument, to avoid
2871 % setting catcodes prematurely. Doing it this way means that, for
2872 % example, @inlineraw{html, foo{bar} gets a parse error instead of being
2873 % ignored. But this isn't important because if people want a literal
2874 % *right* brace they would have to use a command anyway, so they may as
2875 % well use a command to get a left brace too. We could re-use the
2876 % delimiter character idea from \verb, but it seems like overkill.
2877 %
2878 \long\def\inlineraw{\tex \doinlineraw}
2879 \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
2880 \def\doinlinerawtwo#1,#2,\finish{%
2881 \def\inlinerawname{#1}%
2882 \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
2883 \endgroup % close group opened by \tex.
2884 }
2885
2886
2887 \message{glyphs,}
2888 % and logos.
2889
2890 % @@ prints an @, as does @atchar{}.
2891 \def\@{\char64 }
2892 \let\atchar=\@
2893
2894 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
2895 % Unless we're in typewriter, use \ecfont because the CM text fonts do
2896 % not have braces, and we don't want to switch into math.
2897 \def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
2898 \def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
2899 \let\{=\mylbrace \let\lbracechar=\{
2900 \let\}=\myrbrace \let\rbracechar=\}
2901 \begingroup
2902 % Definitions to produce \{ and \} commands for indices,
2903 % and @{ and @} for the aux/toc files.
2904 \catcode`\{ = \other \catcode`\} = \other
2905 \catcode`\[ = 1 \catcode`\] = 2
2906 \catcode`\! = 0 \catcode`\\ = \other
2907 !gdef!lbracecmd[\{]%
2908 !gdef!rbracecmd[\}]%
2909 !gdef!lbraceatcmd[@{]%
2910 !gdef!rbraceatcmd[@}]%
2911 !endgroup
2912
2913 % @comma{} to avoid , parsing problems.
2914 \let\comma = ,
2915
2916 % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
2917 % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
2918 \let\, = \ptexc
2919 \let\dotaccent = \ptexdot
2920 \def\ringaccent#1{{\accent23 #1}}
2921 \let\tieaccent = \ptext
2922 \let\ubaraccent = \ptexb
2923 \let\udotaccent = \d
2924
2925 % Other special characters: @questiondown @exclamdown @ordf @ordm
2926 % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
2927 \def\questiondown{?`}
2928 \def\exclamdown{!`}
2929 \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
2930 \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
2931
2932 % Dotless i and dotless j, used for accents.
2933 \def\imacro{i}
2934 \def\jmacro{j}
2935 \def\dotless#1{%
2936 \def\temp{#1}%
2937 \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
2938 \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
2939 \else \errmessage{@dotless can be used only with i or j}%
2940 \fi\fi
2941 }
2942
2943 % The \TeX{} logo, as in plain, but resetting the spacing so that a
2944 % period following counts as ending a sentence. (Idea found in latex.)
2945 %
2946 \edef\TeX{\TeX \spacefactor=1000 }
2947
2948 % @LaTeX{} logo. Not quite the same results as the definition in
2949 % latex.ltx, since we use a different font for the raised A; it's most
2950 % convenient for us to use an explicitly smaller font, rather than using
2951 % the \scriptstyle font (since we don't reset \scriptstyle and
2952 % \scriptscriptstyle).
2953 %
2954 \def\LaTeX{%
2955 L\kern-.36em
2956 {\setbox0=\hbox{T}%
2957 \vbox to \ht0{\hbox{%
2958 \ifx\textnominalsize\xwordpt
2959 % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
2960 % Revert to plain's \scriptsize, which is 7pt.
2961 \count255=\the\fam $\fam\count255 \scriptstyle A$%
2962 \else
2963 % For 11pt, we can use our lllsize.
2964 \selectfonts\lllsize A%
2965 \fi
2966 }%
2967 \vss
2968 }}%
2969 \kern-.15em
2970 \TeX
2971 }
2972
2973 % Some math mode symbols.
2974 \def\bullet{$\ptexbullet$}
2975 \def\geq{\ifmmode \ge\else $\ge$\fi}
2976 \def\leq{\ifmmode \le\else $\le$\fi}
2977 \def\minus{\ifmmode -\else $-$\fi}
2978
2979 % @dots{} outputs an ellipsis using the current font.
2980 % We do .5em per period so that it has the same spacing in the cm
2981 % typewriter fonts as three actual period characters; on the other hand,
2982 % in other typewriter fonts three periods are wider than 1.5em. So do
2983 % whichever is larger.
2984 %
2985 \def\dots{%
2986 \leavevmode
2987 \setbox0=\hbox{...}% get width of three periods
2988 \ifdim\wd0 > 1.5em
2989 \dimen0 = \wd0
2990 \else
2991 \dimen0 = 1.5em
2992 \fi
2993 \hbox to \dimen0{%
2994 \hskip 0pt plus.25fil
2995 .\hskip 0pt plus1fil
2996 .\hskip 0pt plus1fil
2997 .\hskip 0pt plus.5fil
2998 }%
2999 }
3000
3001 % @enddots{} is an end-of-sentence ellipsis.
3002 %
3003 \def\enddots{%
3004 \dots
3005 \spacefactor=\endofsentencespacefactor
3006 }
3007
3008 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
3009 %
3010 % Since these characters are used in examples, they should be an even number of
3011 % \tt widths. Each \tt character is 1en, so two makes it 1em.
3012 %
3013 \def\point{$\star$}
3014 \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
3015 \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
3016 \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
3017 \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
3018 \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
3019
3020 % The @error{} command.
3021 % Adapted from the TeXbook's \boxit.
3022 %
3023 \newbox\errorbox
3024 %
3025 {\tentt \global\dimen0 = 3em}% Width of the box.
3026 \dimen2 = .55pt % Thickness of rules
3027 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
3028 \setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
3029 %
3030 \setbox\errorbox=\hbox to \dimen0{\hfil
3031 \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
3032 \advance\hsize by -2\dimen2 % Rules.
3033 \vbox{%
3034 \hrule height\dimen2
3035 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
3036 \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
3037 \kern3pt\vrule width\dimen2}% Space to right.
3038 \hrule height\dimen2}
3039 \hfil}
3040 %
3041 \def\error{\leavevmode\lower.7ex\copy\errorbox}
3042
3043 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
3044 %
3045 \def\pounds{{\it\$}}
3046
3047 % @euro{} comes from a separate font, depending on the current style.
3048 % We use the free feym* fonts from the eurosym package by Henrik
3049 % Theiling, which support regular, slanted, bold and bold slanted (and
3050 % "outlined" (blackboard board, sort of) versions, which we don't need).
3051 % It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
3052 %
3053 % Although only regular is the truly official Euro symbol, we ignore
3054 % that. The Euro is designed to be slightly taller than the regular
3055 % font height.
3056 %
3057 % feymr - regular
3058 % feymo - slanted
3059 % feybr - bold
3060 % feybo - bold slanted
3061 %
3062 % There is no good (free) typewriter version, to my knowledge.
3063 % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
3064 % Hmm.
3065 %
3066 % Also doesn't work in math. Do we need to do math with euro symbols?
3067 % Hope not.
3068 %
3069 %
3070 \def\euro{{\eurofont e}}
3071 \def\eurofont{%
3072 % We set the font at each command, rather than predefining it in
3073 % \textfonts and the other font-switching commands, so that
3074 % installations which never need the symbol don't have to have the
3075 % font installed.
3076 %
3077 % There is only one designed size (nominal 10pt), so we always scale
3078 % that to the current nominal size.
3079 %
3080 % By the way, simply using "at 1em" works for cmr10 and the like, but
3081 % does not work for cmbx10 and other extended/shrunken fonts.
3082 %
3083 \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
3084 %
3085 \ifx\curfontstyle\bfstylename
3086 % bold:
3087 \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
3088 \else
3089 % regular:
3090 \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
3091 \fi
3092 \thiseurofont
3093 }
3094
3095 % Glyphs from the EC fonts. We don't use \let for the aliases, because
3096 % sometimes we redefine the original macro, and the alias should reflect
3097 % the redefinition.
3098 %
3099 % Use LaTeX names for the Icelandic letters.
3100 \def\DH{{\ecfont \char"D0}} % Eth
3101 \def\dh{{\ecfont \char"F0}} % eth
3102 \def\TH{{\ecfont \char"DE}} % Thorn
3103 \def\th{{\ecfont \char"FE}} % thorn
3104 %
3105 \def\guillemetleft{{\ecfont \char"13}}
3106 \def\guillemotleft{\guillemetleft}
3107 \def\guillemetright{{\ecfont \char"14}}
3108 \def\guillemotright{\guillemetright}
3109 \def\guilsinglleft{{\ecfont \char"0E}}
3110 \def\guilsinglright{{\ecfont \char"0F}}
3111 \def\quotedblbase{{\ecfont \char"12}}
3112 \def\quotesinglbase{{\ecfont \char"0D}}
3113 %
3114 % This positioning is not perfect (see the ogonek LaTeX package), but
3115 % we have the precomposed glyphs for the most common cases. We put the
3116 % tests to use those glyphs in the single \ogonek macro so we have fewer
3117 % dummy definitions to worry about for index entries, etc.
3118 %
3119 % ogonek is also used with other letters in Lithuanian (IOU), but using
3120 % the precomposed glyphs for those is not so easy since they aren't in
3121 % the same EC font.
3122 \def\ogonek#1{{%
3123 \def\temp{#1}%
3124 \ifx\temp\macrocharA\Aogonek
3125 \else\ifx\temp\macrochara\aogonek
3126 \else\ifx\temp\macrocharE\Eogonek
3127 \else\ifx\temp\macrochare\eogonek
3128 \else
3129 \ecfont \setbox0=\hbox{#1}%
3130 \ifdim\ht0=1ex\accent"0C #1%
3131 \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
3132 \fi
3133 \fi\fi\fi\fi
3134 }%
3135 }
3136 \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
3137 \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
3138 \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
3139 \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
3140 %
3141 % Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
3142 \def\ecfont{%
3143 % We can't distinguish serif/sans and italic/slanted, but this
3144 % is used for crude hacks anyway (like adding French and German
3145 % quotes to documents typeset with CM, where we lose kerning), so
3146 % hopefully nobody will notice/care.
3147 \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
3148 \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
3149 \ifmonospace
3150 % typewriter:
3151 \font\thisecfont = ectt\ecsize \space at \nominalsize
3152 \else
3153 \ifx\curfontstyle\bfstylename
3154 % bold:
3155 \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
3156 \else
3157 % regular:
3158 \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
3159 \fi
3160 \fi
3161 \thisecfont
3162 }
3163
3164 % @registeredsymbol - R in a circle. The font for the R should really
3165 % be smaller yet, but lllsize is the best we can do for now.
3166 % Adapted from the plain.tex definition of \copyright.
3167 %
3168 \def\registeredsymbol{%
3169 $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}%
3170 \hfil\crcr\Orb}}%
3171 }$%
3172 }
3173
3174 % @textdegree - the normal degrees sign.
3175 %
3176 \def\textdegree{$^\circ$}
3177
3178 % Laurent Siebenmann reports \Orb undefined with:
3179 % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
3180 % so we'll define it if necessary.
3181 %
3182 \ifx\Orb\thisisundefined
3183 \def\Orb{\mathhexbox20D}
3184 \fi
3185
3186 % Quotes.
3187 \chardef\quotedblleft="5C
3188 \chardef\quotedblright=`\"
3189 \chardef\quoteleft=`\`
3190 \chardef\quoteright=`\'
3191
3192
3193 \message{page headings,}
3194
3195 \newskip\titlepagetopglue \titlepagetopglue = 1.5in
3196 \newskip\titlepagebottomglue \titlepagebottomglue = 2pc
3197
3198 % First the title page. Must do @settitle before @titlepage.
3199 \newif\ifseenauthor
3200 \newif\iffinishedtitlepage
3201
3202 % Do an implicit @contents or @shortcontents after @end titlepage if the
3203 % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
3204 %
3205 \newif\ifsetcontentsaftertitlepage
3206 \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
3207 \newif\ifsetshortcontentsaftertitlepage
3208 \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
3209
3210 \parseargdef\shorttitlepage{%
3211 \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
3212 \endgroup\page\hbox{}\page}
3213
3214 \envdef\titlepage{%
3215 % Open one extra group, as we want to close it in the middle of \Etitlepage.
3216 \begingroup
3217 \parindent=0pt \textfonts
3218 % Leave some space at the very top of the page.
3219 \vglue\titlepagetopglue
3220 % No rule at page bottom unless we print one at the top with @title.
3221 \finishedtitlepagetrue
3222 %
3223 % Most title ``pages'' are actually two pages long, with space
3224 % at the top of the second. We don't want the ragged left on the second.
3225 \let\oldpage = \page
3226 \def\page{%
3227 \iffinishedtitlepage\else
3228 \finishtitlepage
3229 \fi
3230 \let\page = \oldpage
3231 \page
3232 \null
3233 }%
3234 }
3235
3236 \def\Etitlepage{%
3237 \iffinishedtitlepage\else
3238 \finishtitlepage
3239 \fi
3240 % It is important to do the page break before ending the group,
3241 % because the headline and footline are only empty inside the group.
3242 % If we use the new definition of \page, we always get a blank page
3243 % after the title page, which we certainly don't want.
3244 \oldpage
3245 \endgroup
3246 %
3247 % Need this before the \...aftertitlepage checks so that if they are
3248 % in effect the toc pages will come out with page numbers.
3249 \HEADINGSon
3250 %
3251 % If they want short, they certainly want long too.
3252 \ifsetshortcontentsaftertitlepage
3253 \shortcontents
3254 \contents
3255 \global\let\shortcontents = \relax
3256 \global\let\contents = \relax
3257 \fi
3258 %
3259 \ifsetcontentsaftertitlepage
3260 \contents
3261 \global\let\contents = \relax
3262 \global\let\shortcontents = \relax
3263 \fi
3264 }
3265
3266 \def\finishtitlepage{%
3267 \vskip4pt \hrule height 2pt width \hsize
3268 \vskip\titlepagebottomglue
3269 \finishedtitlepagetrue
3270 }
3271
3272 % Settings used for typesetting titles: no hyphenation, no indentation,
3273 % don't worry much about spacing, ragged right. This should be used
3274 % inside a \vbox, and fonts need to be set appropriately first. Because
3275 % it is always used for titles, nothing else, we call \rmisbold. \par
3276 % should be specified before the end of the \vbox, since a vbox is a group.
3277 %
3278 \def\raggedtitlesettings{%
3279 \rmisbold
3280 \hyphenpenalty=10000
3281 \parindent=0pt
3282 \tolerance=5000
3283 \ptexraggedright
3284 }
3285
3286 % Macros to be used within @titlepage:
3287
3288 \let\subtitlerm=\tenrm
3289 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
3290
3291 \parseargdef\title{%
3292 \checkenv\titlepage
3293 \vbox{\titlefonts \raggedtitlesettings #1\par}%
3294 % print a rule at the page bottom also.
3295 \finishedtitlepagefalse
3296 \vskip4pt \hrule height 4pt width \hsize \vskip4pt
3297 }
3298
3299 \parseargdef\subtitle{%
3300 \checkenv\titlepage
3301 {\subtitlefont \rightline{#1}}%
3302 }
3303
3304 % @author should come last, but may come many times.
3305 % It can also be used inside @quotation.
3306 %
3307 \parseargdef\author{%
3308 \def\temp{\quotation}%
3309 \ifx\thisenv\temp
3310 \def\quotationauthor{#1}% printed in \Equotation.
3311 \else
3312 \checkenv\titlepage
3313 \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
3314 {\secfonts\rmisbold \leftline{#1}}%
3315 \fi
3316 }
3317
3318
3319 % Set up page headings and footings.
3320
3321 \let\thispage=\folio
3322
3323 \newtoks\evenheadline % headline on even pages
3324 \newtoks\oddheadline % headline on odd pages
3325 \newtoks\evenfootline % footline on even pages
3326 \newtoks\oddfootline % footline on odd pages
3327
3328 % Now make TeX use those variables
3329 \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
3330 \else \the\evenheadline \fi}}
3331 \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
3332 \else \the\evenfootline \fi}\HEADINGShook}
3333 \let\HEADINGShook=\relax
3334
3335 % Commands to set those variables.
3336 % For example, this is what @headings on does
3337 % @evenheading @thistitle|@thispage|@thischapter
3338 % @oddheading @thischapter|@thispage|@thistitle
3339 % @evenfooting @thisfile||
3340 % @oddfooting ||@thisfile
3341
3342
3343 \def\evenheading{\parsearg\evenheadingxxx}
3344 \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish}
3345 \def\evenheadingyyy #1\|#2\|#3\|#4\finish{%
3346 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3347
3348 \def\oddheading{\parsearg\oddheadingxxx}
3349 \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish}
3350 \def\oddheadingyyy #1\|#2\|#3\|#4\finish{%
3351 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3352
3353 \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
3354
3355 \def\evenfooting{\parsearg\evenfootingxxx}
3356 \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish}
3357 \def\evenfootingyyy #1\|#2\|#3\|#4\finish{%
3358 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3359
3360 \def\oddfooting{\parsearg\oddfootingxxx}
3361 \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish}
3362 \def\oddfootingyyy #1\|#2\|#3\|#4\finish{%
3363 \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
3364 %
3365 % Leave some space for the footline. Hopefully ok to assume
3366 % @evenfooting will not be used by itself.
3367 \global\advance\pageheight by -12pt
3368 \global\advance\vsize by -12pt
3369 }
3370
3371 \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
3372
3373 % @evenheadingmarks top \thischapter <- chapter at the top of a page
3374 % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page
3375 %
3376 % The same set of arguments for:
3377 %
3378 % @oddheadingmarks
3379 % @evenfootingmarks
3380 % @oddfootingmarks
3381 % @everyheadingmarks
3382 % @everyfootingmarks
3383
3384 \def\evenheadingmarks{\headingmarks{even}{heading}}
3385 \def\oddheadingmarks{\headingmarks{odd}{heading}}
3386 \def\evenfootingmarks{\headingmarks{even}{footing}}
3387 \def\oddfootingmarks{\headingmarks{odd}{footing}}
3388 \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1}
3389 \headingmarks{odd}{heading}{#1} }
3390 \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1}
3391 \headingmarks{odd}{footing}{#1} }
3392 % #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
3393 \def\headingmarks#1#2#3 {%
3394 \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname
3395 \global\expandafter\let\csname get#1#2marks\endcsname \temp
3396 }
3397
3398 \everyheadingmarks bottom
3399 \everyfootingmarks bottom
3400
3401 % @headings double turns headings on for double-sided printing.
3402 % @headings single turns headings on for single-sided printing.
3403 % @headings off turns them off.
3404 % @headings on same as @headings double, retained for compatibility.
3405 % @headings after turns on double-sided headings after this page.
3406 % @headings doubleafter turns on double-sided headings after this page.
3407 % @headings singleafter turns on single-sided headings after this page.
3408 % By default, they are off at the start of a document,
3409 % and turned `on' after @end titlepage.
3410
3411 \def\headings #1 {\csname HEADINGS#1\endcsname}
3412
3413 \def\headingsoff{% non-global headings elimination
3414 \evenheadline={\hfil}\evenfootline={\hfil}%
3415 \oddheadline={\hfil}\oddfootline={\hfil}%
3416 }
3417
3418 \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
3419 \HEADINGSoff % it's the default
3420
3421 % When we turn headings on, set the page number to 1.
3422 % For double-sided printing, put current file name in lower left corner,
3423 % chapter name on inside top of right hand pages, document
3424 % title on inside top of left hand pages, and page numbers on outside top
3425 % edge of all pages.
3426 \def\HEADINGSdouble{%
3427 \global\pageno=1
3428 \global\evenfootline={\hfil}
3429 \global\oddfootline={\hfil}
3430 \global\evenheadline={\line{\folio\hfil\thistitle}}
3431 \global\oddheadline={\line{\thischapter\hfil\folio}}
3432 \global\let\contentsalignmacro = \chapoddpage
3433 }
3434 \let\contentsalignmacro = \chappager
3435
3436 % For single-sided printing, chapter title goes across top left of page,
3437 % page number on top right.
3438 \def\HEADINGSsingle{%
3439 \global\pageno=1
3440 \global\evenfootline={\hfil}
3441 \global\oddfootline={\hfil}
3442 \global\evenheadline={\line{\thischapter\hfil\folio}}
3443 \global\oddheadline={\line{\thischapter\hfil\folio}}
3444 \global\let\contentsalignmacro = \chappager
3445 }
3446 \def\HEADINGSon{\HEADINGSdouble}
3447
3448 \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
3449 \let\HEADINGSdoubleafter=\HEADINGSafter
3450 \def\HEADINGSdoublex{%
3451 \global\evenfootline={\hfil}
3452 \global\oddfootline={\hfil}
3453 \global\evenheadline={\line{\folio\hfil\thistitle}}
3454 \global\oddheadline={\line{\thischapter\hfil\folio}}
3455 \global\let\contentsalignmacro = \chapoddpage
3456 }
3457
3458 \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
3459 \def\HEADINGSsinglex{%
3460 \global\evenfootline={\hfil}
3461 \global\oddfootline={\hfil}
3462 \global\evenheadline={\line{\thischapter\hfil\folio}}
3463 \global\oddheadline={\line{\thischapter\hfil\folio}}
3464 \global\let\contentsalignmacro = \chappager
3465 }
3466
3467 % Subroutines used in generating headings
3468 % This produces Day Month Year style of output.
3469 % Only define if not already defined, in case a txi-??.tex file has set
3470 % up a different format (e.g., txi-cs.tex does this).
3471 \ifx\today\thisisundefined
3472 \def\today{%
3473 \number\day\space
3474 \ifcase\month
3475 \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
3476 \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
3477 \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
3478 \fi
3479 \space\number\year}
3480 \fi
3481
3482 % @settitle line... specifies the title of the document, for headings.
3483 % It generates no output of its own.
3484 \def\thistitle{\putwordNoTitle}
3485 \def\settitle{\parsearg{\gdef\thistitle}}
3486
3487
3488 \message{tables,}
3489 % Tables -- @table, @ftable, @vtable, @item(x).
3490
3491 % default indentation of table text
3492 \newdimen\tableindent \tableindent=.8in
3493 % default indentation of @itemize and @enumerate text
3494 \newdimen\itemindent \itemindent=.3in
3495 % margin between end of table item and start of table text.
3496 \newdimen\itemmargin \itemmargin=.1in
3497
3498 % used internally for \itemindent minus \itemmargin
3499 \newdimen\itemmax
3500
3501 % Note @table, @ftable, and @vtable define @item, @itemx, etc., with
3502 % these defs.
3503 % They also define \itemindex
3504 % to index the item name in whatever manner is desired (perhaps none).
3505
3506 \newif\ifitemxneedsnegativevskip
3507
3508 \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
3509
3510 \def\internalBitem{\smallbreak \parsearg\itemzzz}
3511 \def\internalBitemx{\itemxpar \parsearg\itemzzz}
3512
3513 \def\itemzzz #1{\begingroup %
3514 \advance\hsize by -\rightskip
3515 \advance\hsize by -\tableindent
3516 \setbox0=\hbox{\itemindicate{#1}}%
3517 \itemindex{#1}%
3518 \nobreak % This prevents a break before @itemx.
3519 %
3520 % If the item text does not fit in the space we have, put it on a line
3521 % by itself, and do not allow a page break either before or after that
3522 % line. We do not start a paragraph here because then if the next
3523 % command is, e.g., @kindex, the whatsit would get put into the
3524 % horizontal list on a line by itself, resulting in extra blank space.
3525 \ifdim \wd0>\itemmax
3526 %
3527 % Make this a paragraph so we get the \parskip glue and wrapping,
3528 % but leave it ragged-right.
3529 \begingroup
3530 \advance\leftskip by-\tableindent
3531 \advance\hsize by\tableindent
3532 \advance\rightskip by0pt plus1fil\relax
3533 \leavevmode\unhbox0\par
3534 \endgroup
3535 %
3536 % We're going to be starting a paragraph, but we don't want the
3537 % \parskip glue -- logically it's part of the @item we just started.
3538 \nobreak \vskip-\parskip
3539 %
3540 % Stop a page break at the \parskip glue coming up. However, if
3541 % what follows is an environment such as @example, there will be no
3542 % \parskip glue; then the negative vskip we just inserted would
3543 % cause the example and the item to crash together. So we use this
3544 % bizarre value of 10001 as a signal to \aboveenvbreak to insert
3545 % \parskip glue after all. Section titles are handled this way also.
3546 %
3547 \penalty 10001
3548 \endgroup
3549 \itemxneedsnegativevskipfalse
3550 \else
3551 % The item text fits into the space. Start a paragraph, so that the
3552 % following text (if any) will end up on the same line.
3553 \noindent
3554 % Do this with kerns and \unhbox so that if there is a footnote in
3555 % the item text, it can migrate to the main vertical list and
3556 % eventually be printed.
3557 \nobreak\kern-\tableindent
3558 \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
3559 \unhbox0
3560 \nobreak\kern\dimen0
3561 \endgroup
3562 \itemxneedsnegativevskiptrue
3563 \fi
3564 }
3565
3566 \def\item{\errmessage{@item while not in a list environment}}
3567 \def\itemx{\errmessage{@itemx while not in a list environment}}
3568
3569 % @table, @ftable, @vtable.
3570 \envdef\table{%
3571 \let\itemindex\gobble
3572 \tablecheck{table}%
3573 }
3574 \envdef\ftable{%
3575 \def\itemindex ##1{\doind {fn}{\code{##1}}}%
3576 \tablecheck{ftable}%
3577 }
3578 \envdef\vtable{%
3579 \def\itemindex ##1{\doind {vr}{\code{##1}}}%
3580 \tablecheck{vtable}%
3581 }
3582 \def\tablecheck#1{%
3583 \ifnum \the\catcode`\^^M=\active
3584 \endgroup
3585 \errmessage{This command won't work in this context; perhaps the problem is
3586 that we are \inenvironment\thisenv}%
3587 \def\next{\doignore{#1}}%
3588 \else
3589 \let\next\tablex
3590 \fi
3591 \next
3592 }
3593 \def\tablex#1{%
3594 \def\itemindicate{#1}%
3595 \parsearg\tabley
3596 }
3597 \def\tabley#1{%
3598 {%
3599 \makevalueexpandable
3600 \edef\temp{\noexpand\tablez #1\space\space\space}%
3601 \expandafter
3602 }\temp \endtablez
3603 }
3604 \def\tablez #1 #2 #3 #4\endtablez{%
3605 \aboveenvbreak
3606 \ifnum 0#1>0 \advance \leftskip by #1\mil \fi
3607 \ifnum 0#2>0 \tableindent=#2\mil \fi
3608 \ifnum 0#3>0 \advance \rightskip by #3\mil \fi
3609 \itemmax=\tableindent
3610 \advance \itemmax by -\itemmargin
3611 \advance \leftskip by \tableindent
3612 \exdentamount=\tableindent
3613 \parindent = 0pt
3614 \parskip = \smallskipamount
3615 \ifdim \parskip=0pt \parskip=2pt \fi
3616 \let\item = \internalBitem
3617 \let\itemx = \internalBitemx
3618 }
3619 \def\Etable{\endgraf\afterenvbreak}
3620 \let\Eftable\Etable
3621 \let\Evtable\Etable
3622 \let\Eitemize\Etable
3623 \let\Eenumerate\Etable
3624
3625 % This is the counter used by @enumerate, which is really @itemize
3626
3627 \newcount \itemno
3628
3629 \envdef\itemize{\parsearg\doitemize}
3630
3631 \def\doitemize#1{%
3632 \aboveenvbreak
3633 \itemmax=\itemindent
3634 \advance\itemmax by -\itemmargin
3635 \advance\leftskip by \itemindent
3636 \exdentamount=\itemindent
3637 \parindent=0pt
3638 \parskip=\smallskipamount
3639 \ifdim\parskip=0pt \parskip=2pt \fi
3640 %
3641 % Try typesetting the item mark that if the document erroneously says
3642 % something like @itemize @samp (intending @table), there's an error
3643 % right away at the @itemize. It's not the best error message in the
3644 % world, but it's better than leaving it to the @item. This means if
3645 % the user wants an empty mark, they have to say @w{} not just @w.
3646 \def\itemcontents{#1}%
3647 \setbox0 = \hbox{\itemcontents}%
3648 %
3649 % @itemize with no arg is equivalent to @itemize @bullet.
3650 \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
3651 %
3652 \let\item=\itemizeitem
3653 }
3654
3655 % Definition of @item while inside @itemize and @enumerate.
3656 %
3657 \def\itemizeitem{%
3658 \advance\itemno by 1 % for enumerations
3659 {\let\par=\endgraf \smallbreak}% reasonable place to break
3660 {%
3661 % If the document has an @itemize directly after a section title, a
3662 % \nobreak will be last on the list, and \sectionheading will have
3663 % done a \vskip-\parskip. In that case, we don't want to zero
3664 % parskip, or the item text will crash with the heading. On the
3665 % other hand, when there is normal text preceding the item (as there
3666 % usually is), we do want to zero parskip, or there would be too much
3667 % space. In that case, we won't have a \nobreak before. At least
3668 % that's the theory.
3669 \ifnum\lastpenalty<10000 \parskip=0in \fi
3670 \noindent
3671 \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
3672 %
3673 \vadjust{\penalty 1200}}% not good to break after first line of item.
3674 \flushcr
3675 }
3676
3677 % \splitoff TOKENS\endmark defines \first to be the first token in
3678 % TOKENS, and \rest to be the remainder.
3679 %
3680 \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
3681
3682 % Allow an optional argument of an uppercase letter, lowercase letter,
3683 % or number, to specify the first label in the enumerated list. No
3684 % argument is the same as `1'.
3685 %
3686 \envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
3687 \def\enumeratey #1 #2\endenumeratey{%
3688 % If we were given no argument, pretend we were given `1'.
3689 \def\thearg{#1}%
3690 \ifx\thearg\empty \def\thearg{1}\fi
3691 %
3692 % Detect if the argument is a single token. If so, it might be a
3693 % letter. Otherwise, the only valid thing it can be is a number.
3694 % (We will always have one token, because of the test we just made.
3695 % This is a good thing, since \splitoff doesn't work given nothing at
3696 % all -- the first parameter is undelimited.)
3697 \expandafter\splitoff\thearg\endmark
3698 \ifx\rest\empty
3699 % Only one token in the argument. It could still be anything.
3700 % A ``lowercase letter'' is one whose \lccode is nonzero.
3701 % An ``uppercase letter'' is one whose \lccode is both nonzero, and
3702 % not equal to itself.
3703 % Otherwise, we assume it's a number.
3704 %
3705 % We need the \relax at the end of the \ifnum lines to stop TeX from
3706 % continuing to look for a <number>.
3707 %
3708 \ifnum\lccode\expandafter`\thearg=0\relax
3709 \numericenumerate % a number (we hope)
3710 \else
3711 % It's a letter.
3712 \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
3713 \lowercaseenumerate % lowercase letter
3714 \else
3715 \uppercaseenumerate % uppercase letter
3716 \fi
3717 \fi
3718 \else
3719 % Multiple tokens in the argument. We hope it's a number.
3720 \numericenumerate
3721 \fi
3722 }
3723
3724 % An @enumerate whose labels are integers. The starting integer is
3725 % given in \thearg.
3726 %
3727 \def\numericenumerate{%
3728 \itemno = \thearg
3729 \startenumeration{\the\itemno}%
3730 }
3731
3732 % The starting (lowercase) letter is in \thearg.
3733 \def\lowercaseenumerate{%
3734 \itemno = \expandafter`\thearg
3735 \startenumeration{%
3736 % Be sure we're not beyond the end of the alphabet.
3737 \ifnum\itemno=0
3738 \errmessage{No more lowercase letters in @enumerate; get a bigger
3739 alphabet}%
3740 \fi
3741 \char\lccode\itemno
3742 }%
3743 }
3744
3745 % The starting (uppercase) letter is in \thearg.
3746 \def\uppercaseenumerate{%
3747 \itemno = \expandafter`\thearg
3748 \startenumeration{%
3749 % Be sure we're not beyond the end of the alphabet.
3750 \ifnum\itemno=0
3751 \errmessage{No more uppercase letters in @enumerate; get a bigger
3752 alphabet}
3753 \fi
3754 \char\uccode\itemno
3755 }%
3756 }
3757
3758 % Call \doitemize, adding a period to the first argument and supplying the
3759 % common last two arguments. Also subtract one from the initial value in
3760 % \itemno, since @item increments \itemno.
3761 %
3762 \def\startenumeration#1{%
3763 \advance\itemno by -1
3764 \doitemize{#1.}\flushcr
3765 }
3766
3767 % @alphaenumerate and @capsenumerate are abbreviations for giving an arg
3768 % to @enumerate.
3769 %
3770 \def\alphaenumerate{\enumerate{a}}
3771 \def\capsenumerate{\enumerate{A}}
3772 \def\Ealphaenumerate{\Eenumerate}
3773 \def\Ecapsenumerate{\Eenumerate}
3774
3775
3776 % @multitable macros
3777 % Amy Hendrickson, 8/18/94, 3/6/96
3778 %
3779 % @multitable ... @end multitable will make as many columns as desired.
3780 % Contents of each column will wrap at width given in preamble. Width
3781 % can be specified either with sample text given in a template line,
3782 % or in percent of \hsize, the current width of text on page.
3783
3784 % Table can continue over pages but will only break between lines.
3785
3786 % To make preamble:
3787 %
3788 % Either define widths of columns in terms of percent of \hsize:
3789 % @multitable @columnfractions .25 .3 .45
3790 % @item ...
3791 %
3792 % Numbers following @columnfractions are the percent of the total
3793 % current hsize to be used for each column. You may use as many
3794 % columns as desired.
3795
3796
3797 % Or use a template:
3798 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
3799 % @item ...
3800 % using the widest term desired in each column.
3801
3802 % Each new table line starts with @item, each subsequent new column
3803 % starts with @tab. Empty columns may be produced by supplying @tab's
3804 % with nothing between them for as many times as empty columns are needed,
3805 % ie, @tab@tab@tab will produce two empty columns.
3806
3807 % @item, @tab do not need to be on their own lines, but it will not hurt
3808 % if they are.
3809
3810 % Sample multitable:
3811
3812 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
3813 % @item first col stuff @tab second col stuff @tab third col
3814 % @item
3815 % first col stuff
3816 % @tab
3817 % second col stuff
3818 % @tab
3819 % third col
3820 % @item first col stuff @tab second col stuff
3821 % @tab Many paragraphs of text may be used in any column.
3822 %
3823 % They will wrap at the width determined by the template.
3824 % @item@tab@tab This will be in third column.
3825 % @end multitable
3826
3827 % Default dimensions may be reset by user.
3828 % @multitableparskip is vertical space between paragraphs in table.
3829 % @multitableparindent is paragraph indent in table.
3830 % @multitablecolmargin is horizontal space to be left between columns.
3831 % @multitablelinespace is space to leave between table items, baseline
3832 % to baseline.
3833 % 0pt means it depends on current normal line spacing.
3834 %
3835 \newskip\multitableparskip
3836 \newskip\multitableparindent
3837 \newdimen\multitablecolspace
3838 \newskip\multitablelinespace
3839 \multitableparskip=0pt
3840 \multitableparindent=6pt
3841 \multitablecolspace=12pt
3842 \multitablelinespace=0pt
3843
3844 % Macros used to set up halign preamble:
3845 %
3846 \let\endsetuptable\relax
3847 \def\xendsetuptable{\endsetuptable}
3848 \let\columnfractions\relax
3849 \def\xcolumnfractions{\columnfractions}
3850 \newif\ifsetpercent
3851
3852 % #1 is the @columnfraction, usually a decimal number like .5, but might
3853 % be just 1. We just use it, whatever it is.
3854 %
3855 \def\pickupwholefraction#1 {%
3856 \global\advance\colcount by 1
3857 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}%
3858 \setuptable
3859 }
3860
3861 \newcount\colcount
3862 \def\setuptable#1{%
3863 \def\firstarg{#1}%
3864 \ifx\firstarg\xendsetuptable
3865 \let\go = \relax
3866 \else
3867 \ifx\firstarg\xcolumnfractions
3868 \global\setpercenttrue
3869 \else
3870 \ifsetpercent
3871 \let\go\pickupwholefraction
3872 \else
3873 \global\advance\colcount by 1
3874 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
3875 % separator; typically that is always in the input, anyway.
3876 \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
3877 \fi
3878 \fi
3879 \ifx\go\pickupwholefraction
3880 % Put the argument back for the \pickupwholefraction call, so
3881 % we'll always have a period there to be parsed.
3882 \def\go{\pickupwholefraction#1}%
3883 \else
3884 \let\go = \setuptable
3885 \fi%
3886 \fi
3887 \go
3888 }
3889
3890 % multitable-only commands.
3891 %
3892 % @headitem starts a heading row, which we typeset in bold.
3893 % Assignments have to be global since we are inside the implicit group
3894 % of an alignment entry. \everycr resets \everytab so we don't have to
3895 % undo it ourselves.
3896 \def\headitemfont{\b}% for people to use in the template row; not changeable
3897 \def\headitem{%
3898 \checkenv\multitable
3899 \crcr
3900 \global\everytab={\bf}% can't use \headitemfont since the parsing differs
3901 \the\everytab % for the first item
3902 }%
3903 %
3904 % A \tab used to include \hskip1sp. But then the space in a template
3905 % line is not enough. That is bad. So let's go back to just `&' until
3906 % we again encounter the problem the 1sp was intended to solve.
3907 % --karl, nathan@acm.org, 20apr99.
3908 \def\tab{\checkenv\multitable &\the\everytab}%
3909
3910 % @multitable ... @end multitable definitions:
3911 %
3912 \newtoks\everytab % insert after every tab.
3913 %
3914 \envdef\multitable{%
3915 \vskip\parskip
3916 \startsavinginserts
3917 %
3918 % @item within a multitable starts a normal row.
3919 % We use \def instead of \let so that if one of the multitable entries
3920 % contains an @itemize, we don't choke on the \item (seen as \crcr aka
3921 % \endtemplate) expanding \doitemize.
3922 \def\item{\crcr}%
3923 %
3924 \tolerance=9500
3925 \hbadness=9500
3926 \setmultitablespacing
3927 \parskip=\multitableparskip
3928 \parindent=\multitableparindent
3929 \overfullrule=0pt
3930 \global\colcount=0
3931 %
3932 \everycr = {%
3933 \noalign{%
3934 \global\everytab={}%
3935 \global\colcount=0 % Reset the column counter.
3936 % Check for saved footnotes, etc.
3937 \checkinserts
3938 % Keeps underfull box messages off when table breaks over pages.
3939 %\filbreak
3940 % Maybe so, but it also creates really weird page breaks when the
3941 % table breaks over pages. Wouldn't \vfil be better? Wait until the
3942 % problem manifests itself, so it can be fixed for real --karl.
3943 }%
3944 }%
3945 %
3946 \parsearg\domultitable
3947 }
3948 \def\domultitable#1{%
3949 % To parse everything between @multitable and @item:
3950 \setuptable#1 \endsetuptable
3951 %
3952 % This preamble sets up a generic column definition, which will
3953 % be used as many times as user calls for columns.
3954 % \vtop will set a single line and will also let text wrap and
3955 % continue for many paragraphs if desired.
3956 \halign\bgroup &%
3957 \global\advance\colcount by 1
3958 \multistrut
3959 \vtop{%
3960 % Use the current \colcount to find the correct column width:
3961 \hsize=\expandafter\csname col\the\colcount\endcsname
3962 %
3963 % In order to keep entries from bumping into each other
3964 % we will add a \leftskip of \multitablecolspace to all columns after
3965 % the first one.
3966 %
3967 % If a template has been used, we will add \multitablecolspace
3968 % to the width of each template entry.
3969 %
3970 % If the user has set preamble in terms of percent of \hsize we will
3971 % use that dimension as the width of the column, and the \leftskip
3972 % will keep entries from bumping into each other. Table will start at
3973 % left margin and final column will justify at right margin.
3974 %
3975 % Make sure we don't inherit \rightskip from the outer environment.
3976 \rightskip=0pt
3977 \ifnum\colcount=1
3978 % The first column will be indented with the surrounding text.
3979 \advance\hsize by\leftskip
3980 \else
3981 \ifsetpercent \else
3982 % If user has not set preamble in terms of percent of \hsize
3983 % we will advance \hsize by \multitablecolspace.
3984 \advance\hsize by \multitablecolspace
3985 \fi
3986 % In either case we will make \leftskip=\multitablecolspace:
3987 \leftskip=\multitablecolspace
3988 \fi
3989 % Ignoring space at the beginning and end avoids an occasional spurious
3990 % blank line, when TeX decides to break the line at the space before the
3991 % box from the multistrut, so the strut ends up on a line by itself.
3992 % For example:
3993 % @multitable @columnfractions .11 .89
3994 % @item @code{#}
3995 % @tab Legal holiday which is valid in major parts of the whole country.
3996 % Is automatically provided with highlighting sequences respectively
3997 % marking characters.
3998 \noindent\ignorespaces##\unskip\multistrut
3999 }\cr
4000 }
4001 \def\Emultitable{%
4002 \crcr
4003 \egroup % end the \halign
4004 \global\setpercentfalse
4005 }
4006
4007 \def\setmultitablespacing{%
4008 \def\multistrut{\strut}% just use the standard line spacing
4009 %
4010 % Compute \multitablelinespace (if not defined by user) for use in
4011 % \multitableparskip calculation. We used define \multistrut based on
4012 % this, but (ironically) that caused the spacing to be off.
4013 % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
4014 \ifdim\multitablelinespace=0pt
4015 \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
4016 \global\advance\multitablelinespace by-\ht0
4017 \fi
4018 % Test to see if parskip is larger than space between lines of
4019 % table. If not, do nothing.
4020 % If so, set to same dimension as multitablelinespace.
4021 \ifdim\multitableparskip>\multitablelinespace
4022 \global\multitableparskip=\multitablelinespace
4023 \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
4024 % than skip between lines in the table.
4025 \fi%
4026 \ifdim\multitableparskip=0pt
4027 \global\multitableparskip=\multitablelinespace
4028 \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
4029 % than skip between lines in the table.
4030 \fi}
4031
4032
4033 \message{conditionals,}
4034
4035 % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
4036 % @ifnotxml always succeed. They currently do nothing; we don't
4037 % attempt to check whether the conditionals are properly nested. But we
4038 % have to remember that they are conditionals, so that @end doesn't
4039 % attempt to close an environment group.
4040 %
4041 \def\makecond#1{%
4042 \expandafter\let\csname #1\endcsname = \relax
4043 \expandafter\let\csname iscond.#1\endcsname = 1
4044 }
4045 \makecond{iftex}
4046 \makecond{ifnotdocbook}
4047 \makecond{ifnothtml}
4048 \makecond{ifnotinfo}
4049 \makecond{ifnotplaintext}
4050 \makecond{ifnotxml}
4051
4052 % Ignore @ignore, @ifhtml, @ifinfo, and the like.
4053 %
4054 \def\direntry{\doignore{direntry}}
4055 \def\documentdescription{\doignore{documentdescription}}
4056 \def\docbook{\doignore{docbook}}
4057 \def\html{\doignore{html}}
4058 \def\ifdocbook{\doignore{ifdocbook}}
4059 \def\ifhtml{\doignore{ifhtml}}
4060 \def\ifinfo{\doignore{ifinfo}}
4061 \def\ifnottex{\doignore{ifnottex}}
4062 \def\ifplaintext{\doignore{ifplaintext}}
4063 \def\ifxml{\doignore{ifxml}}
4064 \def\ignore{\doignore{ignore}}
4065 \def\menu{\doignore{menu}}
4066 \def\xml{\doignore{xml}}
4067
4068 % Ignore text until a line `@end #1', keeping track of nested conditionals.
4069 %
4070 % A count to remember the depth of nesting.
4071 \newcount\doignorecount
4072
4073 \def\doignore#1{\begingroup
4074 % Scan in ``verbatim'' mode:
4075 \obeylines
4076 \catcode`\@ = \other
4077 \catcode`\{ = \other
4078 \catcode`\} = \other
4079 %
4080 % Make sure that spaces turn into tokens that match what \doignoretext wants.
4081 \spaceisspace
4082 %
4083 % Count number of #1's that we've seen.
4084 \doignorecount = 0
4085 %
4086 % Swallow text until we reach the matching `@end #1'.
4087 \dodoignore{#1}%
4088 }
4089
4090 { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source.
4091 \obeylines %
4092 %
4093 \gdef\dodoignore#1{%
4094 % #1 contains the command name as a string, e.g., `ifinfo'.
4095 %
4096 % Define a command to find the next `@end #1'.
4097 \long\def\doignoretext##1^^M@end #1{%
4098 \doignoretextyyy##1^^M@#1\_STOP_}%
4099 %
4100 % And this command to find another #1 command, at the beginning of a
4101 % line. (Otherwise, we would consider a line `@c @ifset', for
4102 % example, to count as an @ifset for nesting.)
4103 \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
4104 %
4105 % And now expand that command.
4106 \doignoretext ^^M%
4107 }%
4108 }
4109
4110 \def\doignoreyyy#1{%
4111 \def\temp{#1}%
4112 \ifx\temp\empty % Nothing found.
4113 \let\next\doignoretextzzz
4114 \else % Found a nested condition, ...
4115 \advance\doignorecount by 1
4116 \let\next\doignoretextyyy % ..., look for another.
4117 % If we're here, #1 ends with ^^M\ifinfo (for example).
4118 \fi
4119 \next #1% the token \_STOP_ is present just after this macro.
4120 }
4121
4122 % We have to swallow the remaining "\_STOP_".
4123 %
4124 \def\doignoretextzzz#1{%
4125 \ifnum\doignorecount = 0 % We have just found the outermost @end.
4126 \let\next\enddoignore
4127 \else % Still inside a nested condition.
4128 \advance\doignorecount by -1
4129 \let\next\doignoretext % Look for the next @end.
4130 \fi
4131 \next
4132 }
4133
4134 % Finish off ignored text.
4135 { \obeylines%
4136 % Ignore anything after the last `@end #1'; this matters in verbatim
4137 % environments, where otherwise the newline after an ignored conditional
4138 % would result in a blank line in the output.
4139 \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
4140 }
4141
4142
4143 % @set VAR sets the variable VAR to an empty value.
4144 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
4145 %
4146 % Since we want to separate VAR from REST-OF-LINE (which might be
4147 % empty), we can't just use \parsearg; we have to insert a space of our
4148 % own to delimit the rest of the line, and then take it out again if we
4149 % didn't need it.
4150 % We rely on the fact that \parsearg sets \catcode`\ =10.
4151 %
4152 \parseargdef\set{\setyyy#1 \endsetyyy}
4153 \def\setyyy#1 #2\endsetyyy{%
4154 {%
4155 \makevalueexpandable
4156 \def\temp{#2}%
4157 \edef\next{\gdef\makecsname{SET#1}}%
4158 \ifx\temp\empty
4159 \next{}%
4160 \else
4161 \setzzz#2\endsetzzz
4162 \fi
4163 }%
4164 }
4165 % Remove the trailing space \setxxx inserted.
4166 \def\setzzz#1 \endsetzzz{\next{#1}}
4167
4168 % @clear VAR clears (i.e., unsets) the variable VAR.
4169 %
4170 \parseargdef\clear{%
4171 {%
4172 \makevalueexpandable
4173 \global\expandafter\let\csname SET#1\endcsname=\relax
4174 }%
4175 }
4176
4177 % @value{foo} gets the text saved in variable foo.
4178 \def\value{\begingroup\makevalueexpandable\valuexxx}
4179 \def\valuexxx#1{\expandablevalue{#1}\endgroup}
4180 {
4181 \catcode`\- = \active \catcode`\_ = \active
4182 %
4183 \gdef\makevalueexpandable{%
4184 \let\value = \expandablevalue
4185 % We don't want these characters active, ...
4186 \catcode`\-=\other \catcode`\_=\other
4187 % ..., but we might end up with active ones in the argument if
4188 % we're called from @code, as @code{@value{foo-bar_}}, though.
4189 % So \let them to their normal equivalents.
4190 \let-\normaldash \let_\normalunderscore
4191 }
4192 }
4193
4194 % We have this subroutine so that we can handle at least some @value's
4195 % properly in indexes (we call \makevalueexpandable in \indexdummies).
4196 % The command has to be fully expandable (if the variable is set), since
4197 % the result winds up in the index file. This means that if the
4198 % variable's value contains other Texinfo commands, it's almost certain
4199 % it will fail (although perhaps we could fix that with sufficient work
4200 % to do a one-level expansion on the result, instead of complete).
4201 %
4202 \def\expandablevalue#1{%
4203 \expandafter\ifx\csname SET#1\endcsname\relax
4204 {[No value for ``#1'']}%
4205 \message{Variable `#1', used in @value, is not set.}%
4206 \else
4207 \csname SET#1\endcsname
4208 \fi
4209 }
4210
4211 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
4212 % with @set.
4213 %
4214 % To get special treatment of `@end ifset,' call \makeond and the redefine.
4215 %
4216 \makecond{ifset}
4217 \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
4218 \def\doifset#1#2{%
4219 {%
4220 \makevalueexpandable
4221 \let\next=\empty
4222 \expandafter\ifx\csname SET#2\endcsname\relax
4223 #1% If not set, redefine \next.
4224 \fi
4225 \expandafter
4226 }\next
4227 }
4228 \def\ifsetfail{\doignore{ifset}}
4229
4230 % @ifclear VAR ... @end executes the `...' iff VAR has never been
4231 % defined with @set, or has been undefined with @clear.
4232 %
4233 % The `\else' inside the `\doifset' parameter is a trick to reuse the
4234 % above code: if the variable is not set, do nothing, if it is set,
4235 % then redefine \next to \ifclearfail.
4236 %
4237 \makecond{ifclear}
4238 \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
4239 \def\ifclearfail{\doignore{ifclear}}
4240
4241 % @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
4242 % without the @) is in fact defined. We can only feasibly check at the
4243 % TeX level, so something like `mathcode' is going to considered
4244 % defined even though it is not a Texinfo command.
4245 %
4246 \makecond{ifcommanddefined}
4247 \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
4248 %
4249 \def\doifcmddefined#1#2{{%
4250 \makevalueexpandable
4251 \let\next=\empty
4252 \expandafter\ifx\csname #2\endcsname\relax
4253 #1% If not defined, \let\next as above.
4254 \fi
4255 \expandafter
4256 }\next
4257 }
4258 \def\ifcmddefinedfail{\doignore{ifcommanddefined}}
4259
4260 % @ifcommandnotdefined CMD ... handled similar to @ifclear above.
4261 \makecond{ifcommandnotdefined}
4262 \def\ifcommandnotdefined{%
4263 \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}}
4264 \def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}}
4265
4266 % Set the `txicommandconditionals' variable, so documents have a way to
4267 % test if the @ifcommand...defined conditionals are available.
4268 \set txicommandconditionals
4269
4270 % @dircategory CATEGORY -- specify a category of the dir file
4271 % which this file should belong to. Ignore this in TeX.
4272 \let\dircategory=\comment
4273
4274 % @defininfoenclose.
4275 \let\definfoenclose=\comment
4276
4277
4278 \message{indexing,}
4279 % Index generation facilities
4280
4281 % Define \newwrite to be identical to plain tex's \newwrite
4282 % except not \outer, so it can be used within macros and \if's.
4283 \edef\newwrite{\makecsname{ptexnewwrite}}
4284
4285 % \newindex {foo} defines an index named foo.
4286 % It automatically defines \fooindex such that
4287 % \fooindex ...rest of line... puts an entry in the index foo.
4288 % It also defines \fooindfile to be the number of the output channel for
4289 % the file that accumulates this index. The file's extension is foo.
4290 % The name of an index should be no more than 2 characters long
4291 % for the sake of vms.
4292 %
4293 \def\newindex#1{%
4294 \iflinks
4295 \expandafter\newwrite \csname#1indfile\endcsname
4296 \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
4297 \fi
4298 \expandafter\xdef\csname#1index\endcsname{% % Define @#1index
4299 \noexpand\doindex{#1}}
4300 }
4301
4302 % @defindex foo == \newindex{foo}
4303 %
4304 \def\defindex{\parsearg\newindex}
4305
4306 % Define @defcodeindex, like @defindex except put all entries in @code.
4307 %
4308 \def\defcodeindex{\parsearg\newcodeindex}
4309 %
4310 \def\newcodeindex#1{%
4311 \iflinks
4312 \expandafter\newwrite \csname#1indfile\endcsname
4313 \openout \csname#1indfile\endcsname \jobname.#1
4314 \fi
4315 \expandafter\xdef\csname#1index\endcsname{%
4316 \noexpand\docodeindex{#1}}%
4317 }
4318
4319
4320 % @synindex foo bar makes index foo feed into index bar.
4321 % Do this instead of @defindex foo if you don't want it as a separate index.
4322 %
4323 % @syncodeindex foo bar similar, but put all entries made for index foo
4324 % inside @code.
4325 %
4326 \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
4327 \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
4328
4329 % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
4330 % #3 the target index (bar).
4331 \def\dosynindex#1#2#3{%
4332 % Only do \closeout if we haven't already done it, else we'll end up
4333 % closing the target index.
4334 \expandafter \ifx\csname donesynindex#2\endcsname \relax
4335 % The \closeout helps reduce unnecessary open files; the limit on the
4336 % Acorn RISC OS is a mere 16 files.
4337 \expandafter\closeout\csname#2indfile\endcsname
4338 \expandafter\let\csname donesynindex#2\endcsname = 1
4339 \fi
4340 % redefine \fooindfile:
4341 \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
4342 \expandafter\let\csname#2indfile\endcsname=\temp
4343 % redefine \fooindex:
4344 \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
4345 }
4346
4347 % Define \doindex, the driver for all \fooindex macros.
4348 % Argument #1 is generated by the calling \fooindex macro,
4349 % and it is "foo", the name of the index.
4350
4351 % \doindex just uses \parsearg; it calls \doind for the actual work.
4352 % This is because \doind is more useful to call from other macros.
4353
4354 % There is also \dosubind {index}{topic}{subtopic}
4355 % which makes an entry in a two-level index such as the operation index.
4356
4357 \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
4358 \def\singleindexer #1{\doind{\indexname}{#1}}
4359
4360 % like the previous two, but they put @code around the argument.
4361 \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
4362 \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
4363
4364 % Take care of Texinfo commands that can appear in an index entry.
4365 % Since there are some commands we want to expand, and others we don't,
4366 % we have to laboriously prevent expansion for those that we don't.
4367 %
4368 \def\indexdummies{%
4369 \escapechar = `\\ % use backslash in output files.
4370 \def\@{@}% change to @@ when we switch to @ as escape char in index files.
4371 \def\ {\realbackslash\space }%
4372 %
4373 % Need these unexpandable (because we define \tt as a dummy)
4374 % definitions when @{ or @} appear in index entry text. Also, more
4375 % complicated, when \tex is in effect and \{ is a \delimiter again.
4376 % We can't use \lbracecmd and \rbracecmd because texindex assumes
4377 % braces and backslashes are used only as delimiters. Perhaps we
4378 % should define @lbrace and @rbrace commands a la @comma.
4379 \def\{{{\tt\char123}}%
4380 \def\}{{\tt\char125}}%
4381 %
4382 % I don't entirely understand this, but when an index entry is
4383 % generated from a macro call, the \endinput which \scanmacro inserts
4384 % causes processing to be prematurely terminated. This is,
4385 % apparently, because \indexsorttmp is fully expanded, and \endinput
4386 % is an expandable command. The redefinition below makes \endinput
4387 % disappear altogether for that purpose -- although logging shows that
4388 % processing continues to some further point. On the other hand, it
4389 % seems \endinput does not hurt in the printed index arg, since that
4390 % is still getting written without apparent harm.
4391 %
4392 % Sample source (mac-idx3.tex, reported by Graham Percival to
4393 % help-texinfo, 22may06):
4394 % @macro funindex {WORD}
4395 % @findex xyz
4396 % @end macro
4397 % ...
4398 % @funindex commtest
4399 %
4400 % The above is not enough to reproduce the bug, but it gives the flavor.
4401 %
4402 % Sample whatsit resulting:
4403 % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
4404 %
4405 % So:
4406 \let\endinput = \empty
4407 %
4408 % Do the redefinitions.
4409 \commondummies
4410 }
4411
4412 % For the aux and toc files, @ is the escape character. So we want to
4413 % redefine everything using @ as the escape character (instead of
4414 % \realbackslash, still used for index files). When everything uses @,
4415 % this will be simpler.
4416 %
4417 \def\atdummies{%
4418 \def\@{@@}%
4419 \def\ {@ }%
4420 \let\{ = \lbraceatcmd
4421 \let\} = \rbraceatcmd
4422 %
4423 % Do the redefinitions.
4424 \commondummies
4425 \otherbackslash
4426 }
4427
4428 % Called from \indexdummies and \atdummies.
4429 %
4430 \def\commondummies{%
4431 %
4432 % \definedummyword defines \#1 as \string\#1\space, thus effectively
4433 % preventing its expansion. This is used only for control words,
4434 % not control letters, because the \space would be incorrect for
4435 % control characters, but is needed to separate the control word
4436 % from whatever follows.
4437 %
4438 % For control letters, we have \definedummyletter, which omits the
4439 % space.
4440 %
4441 % These can be used both for control words that take an argument and
4442 % those that do not. If it is followed by {arg} in the input, then
4443 % that will dutifully get written to the index (or wherever).
4444 %
4445 \def\definedummyword ##1{\def##1{\string##1\space}}%
4446 \def\definedummyletter##1{\def##1{\string##1}}%
4447 \let\definedummyaccent\definedummyletter
4448 %
4449 \commondummiesnofonts
4450 %
4451 \definedummyletter\_%
4452 \definedummyletter\-%
4453 %
4454 % Non-English letters.
4455 \definedummyword\AA
4456 \definedummyword\AE
4457 \definedummyword\DH
4458 \definedummyword\L
4459 \definedummyword\O
4460 \definedummyword\OE
4461 \definedummyword\TH
4462 \definedummyword\aa
4463 \definedummyword\ae
4464 \definedummyword\dh
4465 \definedummyword\exclamdown
4466 \definedummyword\l
4467 \definedummyword\o
4468 \definedummyword\oe
4469 \definedummyword\ordf
4470 \definedummyword\ordm
4471 \definedummyword\questiondown
4472 \definedummyword\ss
4473 \definedummyword\th
4474 %
4475 % Although these internal commands shouldn't show up, sometimes they do.
4476 \definedummyword\bf
4477 \definedummyword\gtr
4478 \definedummyword\hat
4479 \definedummyword\less
4480 \definedummyword\sf
4481 \definedummyword\sl
4482 \definedummyword\tclose
4483 \definedummyword\tt
4484 %
4485 \definedummyword\LaTeX
4486 \definedummyword\TeX
4487 %
4488 % Assorted special characters.
4489 \definedummyword\arrow
4490 \definedummyword\bullet
4491 \definedummyword\comma
4492 \definedummyword\copyright
4493 \definedummyword\registeredsymbol
4494 \definedummyword\dots
4495 \definedummyword\enddots
4496 \definedummyword\entrybreak
4497 \definedummyword\equiv
4498 \definedummyword\error
4499 \definedummyword\euro
4500 \definedummyword\expansion
4501 \definedummyword\geq
4502 \definedummyword\guillemetleft
4503 \definedummyword\guillemetright
4504 \definedummyword\guilsinglleft
4505 \definedummyword\guilsinglright
4506 \definedummyword\lbracechar
4507 \definedummyword\leq
4508 \definedummyword\minus
4509 \definedummyword\ogonek
4510 \definedummyword\pounds
4511 \definedummyword\point
4512 \definedummyword\print
4513 \definedummyword\quotedblbase
4514 \definedummyword\quotedblleft
4515 \definedummyword\quotedblright
4516 \definedummyword\quoteleft
4517 \definedummyword\quoteright
4518 \definedummyword\quotesinglbase
4519 \definedummyword\rbracechar
4520 \definedummyword\result
4521 \definedummyword\textdegree
4522 %
4523 % We want to disable all macros so that they are not expanded by \write.
4524 \macrolist
4525 %
4526 \normalturnoffactive
4527 %
4528 % Handle some cases of @value -- where it does not contain any
4529 % (non-fully-expandable) commands.
4530 \makevalueexpandable
4531 }
4532
4533 % \commondummiesnofonts: common to \commondummies and \indexnofonts.
4534 %
4535 \def\commondummiesnofonts{%
4536 % Control letters and accents.
4537 \definedummyletter\!%
4538 \definedummyaccent\"%
4539 \definedummyaccent\'%
4540 \definedummyletter\*%
4541 \definedummyaccent\,%
4542 \definedummyletter\.%
4543 \definedummyletter\/%
4544 \definedummyletter\:%
4545 \definedummyaccent\=%
4546 \definedummyletter\?%
4547 \definedummyaccent\^%
4548 \definedummyaccent\`%
4549 \definedummyaccent\~%
4550 \definedummyword\u
4551 \definedummyword\v
4552 \definedummyword\H
4553 \definedummyword\dotaccent
4554 \definedummyword\ogonek
4555 \definedummyword\ringaccent
4556 \definedummyword\tieaccent
4557 \definedummyword\ubaraccent
4558 \definedummyword\udotaccent
4559 \definedummyword\dotless
4560 %
4561 % Texinfo font commands.
4562 \definedummyword\b
4563 \definedummyword\i
4564 \definedummyword\r
4565 \definedummyword\sansserif
4566 \definedummyword\sc
4567 \definedummyword\slanted
4568 \definedummyword\t
4569 %
4570 % Commands that take arguments.
4571 \definedummyword\abbr
4572 \definedummyword\acronym
4573 \definedummyword\anchor
4574 \definedummyword\cite
4575 \definedummyword\code
4576 \definedummyword\command
4577 \definedummyword\dfn
4578 \definedummyword\dmn
4579 \definedummyword\email
4580 \definedummyword\emph
4581 \definedummyword\env
4582 \definedummyword\file
4583 \definedummyword\image
4584 \definedummyword\indicateurl
4585 \definedummyword\inforef
4586 \definedummyword\kbd
4587 \definedummyword\key
4588 \definedummyword\math
4589 \definedummyword\option
4590 \definedummyword\pxref
4591 \definedummyword\ref
4592 \definedummyword\samp
4593 \definedummyword\strong
4594 \definedummyword\tie
4595 \definedummyword\uref
4596 \definedummyword\url
4597 \definedummyword\var
4598 \definedummyword\verb
4599 \definedummyword\w
4600 \definedummyword\xref
4601 }
4602
4603 % \indexnofonts is used when outputting the strings to sort the index
4604 % by, and when constructing control sequence names. It eliminates all
4605 % control sequences and just writes whatever the best ASCII sort string
4606 % would be for a given command (usually its argument).
4607 %
4608 \def\indexnofonts{%
4609 % Accent commands should become @asis.
4610 \def\definedummyaccent##1{\let##1\asis}%
4611 % We can just ignore other control letters.
4612 \def\definedummyletter##1{\let##1\empty}%
4613 % All control words become @asis by default; overrides below.
4614 \let\definedummyword\definedummyaccent
4615 %
4616 \commondummiesnofonts
4617 %
4618 % Don't no-op \tt, since it isn't a user-level command
4619 % and is used in the definitions of the active chars like <, >, |, etc.
4620 % Likewise with the other plain tex font commands.
4621 %\let\tt=\asis
4622 %
4623 \def\ { }%
4624 \def\@{@}%
4625 \def\_{\normalunderscore}%
4626 \def\-{}% @- shouldn't affect sorting
4627 %
4628 % Unfortunately, texindex is not prepared to handle braces in the
4629 % content at all. So for index sorting, we map @{ and @} to strings
4630 % starting with |, since that ASCII character is between ASCII { and }.
4631 \def\{{|a}%
4632 \def\lbracechar{|a}%
4633 %
4634 \def\}{|b}%
4635 \def\rbracechar{|b}%
4636 %
4637 % Non-English letters.
4638 \def\AA{AA}%
4639 \def\AE{AE}%
4640 \def\DH{DZZ}%
4641 \def\L{L}%
4642 \def\OE{OE}%
4643 \def\O{O}%
4644 \def\TH{ZZZ}%
4645 \def\aa{aa}%
4646 \def\ae{ae}%
4647 \def\dh{dzz}%
4648 \def\exclamdown{!}%
4649 \def\l{l}%
4650 \def\oe{oe}%
4651 \def\ordf{a}%
4652 \def\ordm{o}%
4653 \def\o{o}%
4654 \def\questiondown{?}%
4655 \def\ss{ss}%
4656 \def\th{zzz}%
4657 %
4658 \def\LaTeX{LaTeX}%
4659 \def\TeX{TeX}%
4660 %
4661 % Assorted special characters.
4662 % (The following {} will end up in the sort string, but that's ok.)
4663 \def\arrow{->}%
4664 \def\bullet{bullet}%
4665 \def\comma{,}%
4666 \def\copyright{copyright}%
4667 \def\dots{...}%
4668 \def\enddots{...}%
4669 \def\equiv{==}%
4670 \def\error{error}%
4671 \def\euro{euro}%
4672 \def\expansion{==>}%
4673 \def\geq{>=}%
4674 \def\guillemetleft{<<}%
4675 \def\guillemetright{>>}%
4676 \def\guilsinglleft{<}%
4677 \def\guilsinglright{>}%
4678 \def\leq{<=}%
4679 \def\minus{-}%
4680 \def\point{.}%
4681 \def\pounds{pounds}%
4682 \def\print{-|}%
4683 \def\quotedblbase{"}%
4684 \def\quotedblleft{"}%
4685 \def\quotedblright{"}%
4686 \def\quoteleft{`}%
4687 \def\quoteright{'}%
4688 \def\quotesinglbase{,}%
4689 \def\registeredsymbol{R}%
4690 \def\result{=>}%
4691 \def\textdegree{o}%
4692 %
4693 \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
4694 \else \indexlquoteignore \fi
4695 %
4696 % We need to get rid of all macros, leaving only the arguments (if present).
4697 % Of course this is not nearly correct, but it is the best we can do for now.
4698 % makeinfo does not expand macros in the argument to @deffn, which ends up
4699 % writing an index entry, and texindex isn't prepared for an index sort entry
4700 % that starts with \.
4701 %
4702 % Since macro invocations are followed by braces, we can just redefine them
4703 % to take a single TeX argument. The case of a macro invocation that
4704 % goes to end-of-line is not handled.
4705 %
4706 \macrolist
4707 }
4708
4709 % Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
4710 % ignore left quotes in the sort term.
4711 {\catcode`\`=\active
4712 \gdef\indexlquoteignore{\let`=\empty}}
4713
4714 \let\indexbackslash=0 %overridden during \printindex.
4715 \let\SETmarginindex=\relax % put index entries in margin (undocumented)?
4716
4717 % Most index entries go through here, but \dosubind is the general case.
4718 % #1 is the index name, #2 is the entry text.
4719 \def\doind#1#2{\dosubind{#1}{#2}{}}
4720
4721 % Workhorse for all \fooindexes.
4722 % #1 is name of index, #2 is stuff to put there, #3 is subentry --
4723 % empty if called from \doind, as we usually are (the main exception
4724 % is with most defuns, which call us directly).
4725 %
4726 \def\dosubind#1#2#3{%
4727 \iflinks
4728 {%
4729 % Store the main index entry text (including the third arg).
4730 \toks0 = {#2}%
4731 % If third arg is present, precede it with a space.
4732 \def\thirdarg{#3}%
4733 \ifx\thirdarg\empty \else
4734 \toks0 = \expandafter{\the\toks0 \space #3}%
4735 \fi
4736 %
4737 \edef\writeto{\csname#1indfile\endcsname}%
4738 %
4739 \safewhatsit\dosubindwrite
4740 }%
4741 \fi
4742 }
4743
4744 % Write the entry in \toks0 to the index file:
4745 %
4746 \def\dosubindwrite{%
4747 % Put the index entry in the margin if desired.
4748 \ifx\SETmarginindex\relax\else
4749 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}%
4750 \fi
4751 %
4752 % Remember, we are within a group.
4753 \indexdummies % Must do this here, since \bf, etc expand at this stage
4754 \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
4755 % so it will be output as is; and it will print as backslash.
4756 %
4757 % Process the index entry with all font commands turned off, to
4758 % get the string to sort by.
4759 {\indexnofonts
4760 \edef\temp{\the\toks0}% need full expansion
4761 \xdef\indexsorttmp{\temp}%
4762 }%
4763 %
4764 % Set up the complete index entry, with both the sort key and
4765 % the original text, including any font commands. We write
4766 % three arguments to \entry to the .?? file (four in the
4767 % subentry case), texindex reduces to two when writing the .??s
4768 % sorted result.
4769 \edef\temp{%
4770 \write\writeto{%
4771 \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
4772 }%
4773 \temp
4774 }
4775
4776 % Take care of unwanted page breaks/skips around a whatsit:
4777 %
4778 % If a skip is the last thing on the list now, preserve it
4779 % by backing up by \lastskip, doing the \write, then inserting
4780 % the skip again. Otherwise, the whatsit generated by the
4781 % \write or \pdfdest will make \lastskip zero. The result is that
4782 % sequences like this:
4783 % @end defun
4784 % @tindex whatever
4785 % @defun ...
4786 % will have extra space inserted, because the \medbreak in the
4787 % start of the @defun won't see the skip inserted by the @end of
4788 % the previous defun.
4789 %
4790 % But don't do any of this if we're not in vertical mode. We
4791 % don't want to do a \vskip and prematurely end a paragraph.
4792 %
4793 % Avoid page breaks due to these extra skips, too.
4794 %
4795 % But wait, there is a catch there:
4796 % We'll have to check whether \lastskip is zero skip. \ifdim is not
4797 % sufficient for this purpose, as it ignores stretch and shrink parts
4798 % of the skip. The only way seems to be to check the textual
4799 % representation of the skip.
4800 %
4801 % The following is almost like \def\zeroskipmacro{0.0pt} except that
4802 % the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
4803 %
4804 \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname}
4805 %
4806 \newskip\whatsitskip
4807 \newcount\whatsitpenalty
4808 %
4809 % ..., ready, GO:
4810 %
4811 \def\safewhatsit#1{\ifhmode
4812 #1%
4813 \else
4814 % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
4815 \whatsitskip = \lastskip
4816 \edef\lastskipmacro{\the\lastskip}%
4817 \whatsitpenalty = \lastpenalty
4818 %
4819 % If \lastskip is nonzero, that means the last item was a
4820 % skip. And since a skip is discardable, that means this
4821 % -\whatsitskip glue we're inserting is preceded by a
4822 % non-discardable item, therefore it is not a potential
4823 % breakpoint, therefore no \nobreak needed.
4824 \ifx\lastskipmacro\zeroskipmacro
4825 \else
4826 \vskip-\whatsitskip
4827 \fi
4828 %
4829 #1%
4830 %
4831 \ifx\lastskipmacro\zeroskipmacro
4832 % If \lastskip was zero, perhaps the last item was a penalty, and
4833 % perhaps it was >=10000, e.g., a \nobreak. In that case, we want
4834 % to re-insert the same penalty (values >10000 are used for various
4835 % signals); since we just inserted a non-discardable item, any
4836 % following glue (such as a \parskip) would be a breakpoint. For example:
4837 % @deffn deffn-whatever
4838 % @vindex index-whatever
4839 % Description.
4840 % would allow a break between the index-whatever whatsit
4841 % and the "Description." paragraph.
4842 \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
4843 \else
4844 % On the other hand, if we had a nonzero \lastskip,
4845 % this make-up glue would be preceded by a non-discardable item
4846 % (the whatsit from the \write), so we must insert a \nobreak.
4847 \nobreak\vskip\whatsitskip
4848 \fi
4849 \fi}
4850
4851 % The index entry written in the file actually looks like
4852 % \entry {sortstring}{page}{topic}
4853 % or
4854 % \entry {sortstring}{page}{topic}{subtopic}
4855 % The texindex program reads in these files and writes files
4856 % containing these kinds of lines:
4857 % \initial {c}
4858 % before the first topic whose initial is c
4859 % \entry {topic}{pagelist}
4860 % for a topic that is used without subtopics
4861 % \primary {topic}
4862 % for the beginning of a topic that is used with subtopics
4863 % \secondary {subtopic}{pagelist}
4864 % for each subtopic.
4865
4866 % Define the user-accessible indexing commands
4867 % @findex, @vindex, @kindex, @cindex.
4868
4869 \def\findex {\fnindex}
4870 \def\kindex {\kyindex}
4871 \def\cindex {\cpindex}
4872 \def\vindex {\vrindex}
4873 \def\tindex {\tpindex}
4874 \def\pindex {\pgindex}
4875
4876 \def\cindexsub {\begingroup\obeylines\cindexsub}
4877 {\obeylines %
4878 \gdef\cindexsub "#1" #2^^M{\endgroup %
4879 \dosubind{cp}{#2}{#1}}}
4880
4881 % Define the macros used in formatting output of the sorted index material.
4882
4883 % @printindex causes a particular index (the ??s file) to get printed.
4884 % It does not print any chapter heading (usually an @unnumbered).
4885 %
4886 \parseargdef\printindex{\begingroup
4887 \dobreak \chapheadingskip{10000}%
4888 %
4889 \smallfonts \rm
4890 \tolerance = 9500
4891 \plainfrenchspacing
4892 \everypar = {}% don't want the \kern\-parindent from indentation suppression.
4893 %
4894 % See if the index file exists and is nonempty.
4895 % Change catcode of @ here so that if the index file contains
4896 % \initial {@}
4897 % as its first line, TeX doesn't complain about mismatched braces
4898 % (because it thinks @} is a control sequence).
4899 \catcode`\@ = 11
4900 \openin 1 \jobname.#1s
4901 \ifeof 1
4902 % \enddoublecolumns gets confused if there is no text in the index,
4903 % and it loses the chapter title and the aux file entries for the
4904 % index. The easiest way to prevent this problem is to make sure
4905 % there is some text.
4906 \putwordIndexNonexistent
4907 \else
4908 %
4909 % If the index file exists but is empty, then \openin leaves \ifeof
4910 % false. We have to make TeX try to read something from the file, so
4911 % it can discover if there is anything in it.
4912 \read 1 to \temp
4913 \ifeof 1
4914 \putwordIndexIsEmpty
4915 \else
4916 % Index files are almost Texinfo source, but we use \ as the escape
4917 % character. It would be better to use @, but that's too big a change
4918 % to make right now.
4919 \def\indexbackslash{\backslashcurfont}%
4920 \catcode`\\ = 0
4921 \escapechar = `\\
4922 \begindoublecolumns
4923 \input \jobname.#1s
4924 \enddoublecolumns
4925 \fi
4926 \fi
4927 \closein 1
4928 \endgroup}
4929
4930 % These macros are used by the sorted index file itself.
4931 % Change them to control the appearance of the index.
4932
4933 \def\initial#1{{%
4934 % Some minor font changes for the special characters.
4935 \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
4936 %
4937 % Remove any glue we may have, we'll be inserting our own.
4938 \removelastskip
4939 %
4940 % We like breaks before the index initials, so insert a bonus.
4941 \nobreak
4942 \vskip 0pt plus 3\baselineskip
4943 \penalty 0
4944 \vskip 0pt plus -3\baselineskip
4945 %
4946 % Typeset the initial. Making this add up to a whole number of
4947 % baselineskips increases the chance of the dots lining up from column
4948 % to column. It still won't often be perfect, because of the stretch
4949 % we need before each entry, but it's better.
4950 %
4951 % No shrink because it confuses \balancecolumns.
4952 \vskip 1.67\baselineskip plus .5\baselineskip
4953 \leftline{\secbf #1}%
4954 % Do our best not to break after the initial.
4955 \nobreak
4956 \vskip .33\baselineskip plus .1\baselineskip
4957 }}
4958
4959 % \entry typesets a paragraph consisting of the text (#1), dot leaders, and
4960 % then page number (#2) flushed to the right margin. It is used for index
4961 % and table of contents entries. The paragraph is indented by \leftskip.
4962 %
4963 % A straightforward implementation would start like this:
4964 % \def\entry#1#2{...
4965 % But this freezes the catcodes in the argument, and can cause problems to
4966 % @code, which sets - active. This problem was fixed by a kludge---
4967 % ``-'' was active throughout whole index, but this isn't really right.
4968 % The right solution is to prevent \entry from swallowing the whole text.
4969 % --kasal, 21nov03
4970 \def\entry{%
4971 \begingroup
4972 %
4973 % Start a new paragraph if necessary, so our assignments below can't
4974 % affect previous text.
4975 \par
4976 %
4977 % Do not fill out the last line with white space.
4978 \parfillskip = 0in
4979 %
4980 % No extra space above this paragraph.
4981 \parskip = 0in
4982 %
4983 % Do not prefer a separate line ending with a hyphen to fewer lines.
4984 \finalhyphendemerits = 0
4985 %
4986 % \hangindent is only relevant when the entry text and page number
4987 % don't both fit on one line. In that case, bob suggests starting the
4988 % dots pretty far over on the line. Unfortunately, a large
4989 % indentation looks wrong when the entry text itself is broken across
4990 % lines. So we use a small indentation and put up with long leaders.
4991 %
4992 % \hangafter is reset to 1 (which is the value we want) at the start
4993 % of each paragraph, so we need not do anything with that.
4994 \hangindent = 2em
4995 %
4996 % When the entry text needs to be broken, just fill out the first line
4997 % with blank space.
4998 \rightskip = 0pt plus1fil
4999 %
5000 % A bit of stretch before each entry for the benefit of balancing
5001 % columns.
5002 \vskip 0pt plus1pt
5003 %
5004 % When reading the text of entry, convert explicit line breaks
5005 % from @* into spaces. The user might give these in long section
5006 % titles, for instance.
5007 \def\*{\unskip\space\ignorespaces}%
5008 \def\entrybreak{\hfil\break}%
5009 %
5010 % Swallow the left brace of the text (first parameter):
5011 \afterassignment\doentry
5012 \let\temp =
5013 }
5014 \def\entrybreak{\unskip\space\ignorespaces}%
5015 \def\doentry{%
5016 \bgroup % Instead of the swallowed brace.
5017 \noindent
5018 \aftergroup\finishentry
5019 % And now comes the text of the entry.
5020 }
5021 \def\finishentry#1{%
5022 % #1 is the page number.
5023 %
5024 % The following is kludged to not output a line of dots in the index if
5025 % there are no page numbers. The next person who breaks this will be
5026 % cursed by a Unix daemon.
5027 \setbox\boxA = \hbox{#1}%
5028 \ifdim\wd\boxA = 0pt
5029 \ %
5030 \else
5031 %
5032 % If we must, put the page number on a line of its own, and fill out
5033 % this line with blank space. (The \hfil is overwhelmed with the
5034 % fill leaders glue in \indexdotfill if the page number does fit.)
5035 \hfil\penalty50
5036 \null\nobreak\indexdotfill % Have leaders before the page number.
5037 %
5038 % The `\ ' here is removed by the implicit \unskip that TeX does as
5039 % part of (the primitive) \par. Without it, a spurious underfull
5040 % \hbox ensues.
5041 \ifpdf
5042 \pdfgettoks#1.%
5043 \ \the\toksA
5044 \else
5045 \ #1%
5046 \fi
5047 \fi
5048 \par
5049 \endgroup
5050 }
5051
5052 % Like plain.tex's \dotfill, except uses up at least 1 em.
5053 \def\indexdotfill{\cleaders
5054 \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
5055
5056 \def\primary #1{\line{#1\hfil}}
5057
5058 \newskip\secondaryindent \secondaryindent=0.5cm
5059 \def\secondary#1#2{{%
5060 \parfillskip=0in
5061 \parskip=0in
5062 \hangindent=1in
5063 \hangafter=1
5064 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
5065 \ifpdf
5066 \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
5067 \else
5068 #2
5069 \fi
5070 \par
5071 }}
5072
5073 % Define two-column mode, which we use to typeset indexes.
5074 % Adapted from the TeXbook, page 416, which is to say,
5075 % the manmac.tex format used to print the TeXbook itself.
5076 \catcode`\@=11
5077
5078 \newbox\partialpage
5079 \newdimen\doublecolumnhsize
5080
5081 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
5082 % Grab any single-column material above us.
5083 \output = {%
5084 %
5085 % Here is a possibility not foreseen in manmac: if we accumulate a
5086 % whole lot of material, we might end up calling this \output
5087 % routine twice in a row (see the doublecol-lose test, which is
5088 % essentially a couple of indexes with @setchapternewpage off). In
5089 % that case we just ship out what is in \partialpage with the normal
5090 % output routine. Generally, \partialpage will be empty when this
5091 % runs and this will be a no-op. See the indexspread.tex test case.
5092 \ifvoid\partialpage \else
5093 \onepageout{\pagecontents\partialpage}%
5094 \fi
5095 %
5096 \global\setbox\partialpage = \vbox{%
5097 % Unvbox the main output page.
5098 \unvbox\PAGE
5099 \kern-\topskip \kern\baselineskip
5100 }%
5101 }%
5102 \eject % run that output routine to set \partialpage
5103 %
5104 % Use the double-column output routine for subsequent pages.
5105 \output = {\doublecolumnout}%
5106 %
5107 % Change the page size parameters. We could do this once outside this
5108 % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
5109 % format, but then we repeat the same computation. Repeating a couple
5110 % of assignments once per index is clearly meaningless for the
5111 % execution time, so we may as well do it in one place.
5112 %
5113 % First we halve the line length, less a little for the gutter between
5114 % the columns. We compute the gutter based on the line length, so it
5115 % changes automatically with the paper format. The magic constant
5116 % below is chosen so that the gutter has the same value (well, +-<1pt)
5117 % as it did when we hard-coded it.
5118 %
5119 % We put the result in a separate register, \doublecolumhsize, so we
5120 % can restore it in \pagesofar, after \hsize itself has (potentially)
5121 % been clobbered.
5122 %
5123 \doublecolumnhsize = \hsize
5124 \advance\doublecolumnhsize by -.04154\hsize
5125 \divide\doublecolumnhsize by 2
5126 \hsize = \doublecolumnhsize
5127 %
5128 % Double the \vsize as well. (We don't need a separate register here,
5129 % since nobody clobbers \vsize.)
5130 \vsize = 2\vsize
5131 }
5132
5133 % The double-column output routine for all double-column pages except
5134 % the last.
5135 %
5136 \def\doublecolumnout{%
5137 \splittopskip=\topskip \splitmaxdepth=\maxdepth
5138 % Get the available space for the double columns -- the normal
5139 % (undoubled) page height minus any material left over from the
5140 % previous page.
5141 \dimen@ = \vsize
5142 \divide\dimen@ by 2
5143 \advance\dimen@ by -\ht\partialpage
5144 %
5145 % box0 will be the left-hand column, box2 the right.
5146 \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
5147 \onepageout\pagesofar
5148 \unvbox255
5149 \penalty\outputpenalty
5150 }
5151 %
5152 % Re-output the contents of the output page -- any previous material,
5153 % followed by the two boxes we just split, in box0 and box2.
5154 \def\pagesofar{%
5155 \unvbox\partialpage
5156 %
5157 \hsize = \doublecolumnhsize
5158 \wd0=\hsize \wd2=\hsize
5159 \hbox to\pagewidth{\box0\hfil\box2}%
5160 }
5161 %
5162 % All done with double columns.
5163 \def\enddoublecolumns{%
5164 % The following penalty ensures that the page builder is exercised
5165 % _before_ we change the output routine. This is necessary in the
5166 % following situation:
5167 %
5168 % The last section of the index consists only of a single entry.
5169 % Before this section, \pagetotal is less than \pagegoal, so no
5170 % break occurs before the last section starts. However, the last
5171 % section, consisting of \initial and the single \entry, does not
5172 % fit on the page and has to be broken off. Without the following
5173 % penalty the page builder will not be exercised until \eject
5174 % below, and by that time we'll already have changed the output
5175 % routine to the \balancecolumns version, so the next-to-last
5176 % double-column page will be processed with \balancecolumns, which
5177 % is wrong: The two columns will go to the main vertical list, with
5178 % the broken-off section in the recent contributions. As soon as
5179 % the output routine finishes, TeX starts reconsidering the page
5180 % break. The two columns and the broken-off section both fit on the
5181 % page, because the two columns now take up only half of the page
5182 % goal. When TeX sees \eject from below which follows the final
5183 % section, it invokes the new output routine that we've set after
5184 % \balancecolumns below; \onepageout will try to fit the two columns
5185 % and the final section into the vbox of \pageheight (see
5186 % \pagebody), causing an overfull box.
5187 %
5188 % Note that glue won't work here, because glue does not exercise the
5189 % page builder, unlike penalties (see The TeXbook, pp. 280-281).
5190 \penalty0
5191 %
5192 \output = {%
5193 % Split the last of the double-column material. Leave it on the
5194 % current page, no automatic page break.
5195 \balancecolumns
5196 %
5197 % If we end up splitting too much material for the current page,
5198 % though, there will be another page break right after this \output
5199 % invocation ends. Having called \balancecolumns once, we do not
5200 % want to call it again. Therefore, reset \output to its normal
5201 % definition right away. (We hope \balancecolumns will never be
5202 % called on to balance too much material, but if it is, this makes
5203 % the output somewhat more palatable.)
5204 \global\output = {\onepageout{\pagecontents\PAGE}}%
5205 }%
5206 \eject
5207 \endgroup % started in \begindoublecolumns
5208 %
5209 % \pagegoal was set to the doubled \vsize above, since we restarted
5210 % the current page. We're now back to normal single-column
5211 % typesetting, so reset \pagegoal to the normal \vsize (after the
5212 % \endgroup where \vsize got restored).
5213 \pagegoal = \vsize
5214 }
5215 %
5216 % Called at the end of the double column material.
5217 \def\balancecolumns{%
5218 \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
5219 \dimen@ = \ht0
5220 \advance\dimen@ by \topskip
5221 \advance\dimen@ by-\baselineskip
5222 \divide\dimen@ by 2 % target to split to
5223 %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
5224 \splittopskip = \topskip
5225 % Loop until we get a decent breakpoint.
5226 {%
5227 \vbadness = 10000
5228 \loop
5229 \global\setbox3 = \copy0
5230 \global\setbox1 = \vsplit3 to \dimen@
5231 \ifdim\ht3>\dimen@
5232 \global\advance\dimen@ by 1pt
5233 \repeat
5234 }%
5235 %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
5236 \setbox0=\vbox to\dimen@{\unvbox1}%
5237 \setbox2=\vbox to\dimen@{\unvbox3}%
5238 %
5239 \pagesofar
5240 }
5241 \catcode`\@ = \other
5242
5243
5244 \message{sectioning,}
5245 % Chapters, sections, etc.
5246
5247 % Let's start with @part.
5248 \outer\parseargdef\part{\partzzz{#1}}
5249 \def\partzzz#1{%
5250 \chapoddpage
5251 \null
5252 \vskip.3\vsize % move it down on the page a bit
5253 \begingroup
5254 \noindent \titlefonts\rmisbold #1\par % the text
5255 \let\lastnode=\empty % no node to associate with
5256 \writetocentry{part}{#1}{}% but put it in the toc
5257 \headingsoff % no headline or footline on the part page
5258 \chapoddpage
5259 \endgroup
5260 }
5261
5262 % \unnumberedno is an oxymoron. But we count the unnumbered
5263 % sections so that we can refer to them unambiguously in the pdf
5264 % outlines by their "section number". We avoid collisions with chapter
5265 % numbers by starting them at 10000. (If a document ever has 10000
5266 % chapters, we're in trouble anyway, I'm sure.)
5267 \newcount\unnumberedno \unnumberedno = 10000
5268 \newcount\chapno
5269 \newcount\secno \secno=0
5270 \newcount\subsecno \subsecno=0
5271 \newcount\subsubsecno \subsubsecno=0
5272
5273 % This counter is funny since it counts through charcodes of letters A, B, ...
5274 \newcount\appendixno \appendixno = `\@
5275 %
5276 % \def\appendixletter{\char\the\appendixno}
5277 % We do the following ugly conditional instead of the above simple
5278 % construct for the sake of pdftex, which needs the actual
5279 % letter in the expansion, not just typeset.
5280 %
5281 \def\appendixletter{%
5282 \ifnum\appendixno=`A A%
5283 \else\ifnum\appendixno=`B B%
5284 \else\ifnum\appendixno=`C C%
5285 \else\ifnum\appendixno=`D D%
5286 \else\ifnum\appendixno=`E E%
5287 \else\ifnum\appendixno=`F F%
5288 \else\ifnum\appendixno=`G G%
5289 \else\ifnum\appendixno=`H H%
5290 \else\ifnum\appendixno=`I I%
5291 \else\ifnum\appendixno=`J J%
5292 \else\ifnum\appendixno=`K K%
5293 \else\ifnum\appendixno=`L L%
5294 \else\ifnum\appendixno=`M M%
5295 \else\ifnum\appendixno=`N N%
5296 \else\ifnum\appendixno=`O O%
5297 \else\ifnum\appendixno=`P P%
5298 \else\ifnum\appendixno=`Q Q%
5299 \else\ifnum\appendixno=`R R%
5300 \else\ifnum\appendixno=`S S%
5301 \else\ifnum\appendixno=`T T%
5302 \else\ifnum\appendixno=`U U%
5303 \else\ifnum\appendixno=`V V%
5304 \else\ifnum\appendixno=`W W%
5305 \else\ifnum\appendixno=`X X%
5306 \else\ifnum\appendixno=`Y Y%
5307 \else\ifnum\appendixno=`Z Z%
5308 % The \the is necessary, despite appearances, because \appendixletter is
5309 % expanded while writing the .toc file. \char\appendixno is not
5310 % expandable, thus it is written literally, thus all appendixes come out
5311 % with the same letter (or @) in the toc without it.
5312 \else\char\the\appendixno
5313 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
5314 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
5315
5316 % Each @chapter defines these (using marks) as the number+name, number
5317 % and name of the chapter. Page headings and footings can use
5318 % these. @section does likewise.
5319 \def\thischapter{}
5320 \def\thischapternum{}
5321 \def\thischaptername{}
5322 \def\thissection{}
5323 \def\thissectionnum{}
5324 \def\thissectionname{}
5325
5326 \newcount\absseclevel % used to calculate proper heading level
5327 \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
5328
5329 % @raisesections: treat @section as chapter, @subsection as section, etc.
5330 \def\raisesections{\global\advance\secbase by -1}
5331 \let\up=\raisesections % original BFox name
5332
5333 % @lowersections: treat @chapter as section, @section as subsection, etc.
5334 \def\lowersections{\global\advance\secbase by 1}
5335 \let\down=\lowersections % original BFox name
5336
5337 % we only have subsub.
5338 \chardef\maxseclevel = 3
5339 %
5340 % A numbered section within an unnumbered changes to unnumbered too.
5341 % To achieve this, remember the "biggest" unnum. sec. we are currently in:
5342 \chardef\unnlevel = \maxseclevel
5343 %
5344 % Trace whether the current chapter is an appendix or not:
5345 % \chapheadtype is "N" or "A", unnumbered chapters are ignored.
5346 \def\chapheadtype{N}
5347
5348 % Choose a heading macro
5349 % #1 is heading type
5350 % #2 is heading level
5351 % #3 is text for heading
5352 \def\genhead#1#2#3{%
5353 % Compute the abs. sec. level:
5354 \absseclevel=#2
5355 \advance\absseclevel by \secbase
5356 % Make sure \absseclevel doesn't fall outside the range:
5357 \ifnum \absseclevel < 0
5358 \absseclevel = 0
5359 \else
5360 \ifnum \absseclevel > 3
5361 \absseclevel = 3
5362 \fi
5363 \fi
5364 % The heading type:
5365 \def\headtype{#1}%
5366 \if \headtype U%
5367 \ifnum \absseclevel < \unnlevel
5368 \chardef\unnlevel = \absseclevel
5369 \fi
5370 \else
5371 % Check for appendix sections:
5372 \ifnum \absseclevel = 0
5373 \edef\chapheadtype{\headtype}%
5374 \else
5375 \if \headtype A\if \chapheadtype N%
5376 \errmessage{@appendix... within a non-appendix chapter}%
5377 \fi\fi
5378 \fi
5379 % Check for numbered within unnumbered:
5380 \ifnum \absseclevel > \unnlevel
5381 \def\headtype{U}%
5382 \else
5383 \chardef\unnlevel = 3
5384 \fi
5385 \fi
5386 % Now print the heading:
5387 \if \headtype U%
5388 \ifcase\absseclevel
5389 \unnumberedzzz{#3}%
5390 \or \unnumberedseczzz{#3}%
5391 \or \unnumberedsubseczzz{#3}%
5392 \or \unnumberedsubsubseczzz{#3}%
5393 \fi
5394 \else
5395 \if \headtype A%
5396 \ifcase\absseclevel
5397 \appendixzzz{#3}%
5398 \or \appendixsectionzzz{#3}%
5399 \or \appendixsubseczzz{#3}%
5400 \or \appendixsubsubseczzz{#3}%
5401 \fi
5402 \else
5403 \ifcase\absseclevel
5404 \chapterzzz{#3}%
5405 \or \seczzz{#3}%
5406 \or \numberedsubseczzz{#3}%
5407 \or \numberedsubsubseczzz{#3}%
5408 \fi
5409 \fi
5410 \fi
5411 \suppressfirstparagraphindent
5412 }
5413
5414 % an interface:
5415 \def\numhead{\genhead N}
5416 \def\apphead{\genhead A}
5417 \def\unnmhead{\genhead U}
5418
5419 % @chapter, @appendix, @unnumbered. Increment top-level counter, reset
5420 % all lower-level sectioning counters to zero.
5421 %
5422 % Also set \chaplevelprefix, which we prepend to @float sequence numbers
5423 % (e.g., figures), q.v. By default (before any chapter), that is empty.
5424 \let\chaplevelprefix = \empty
5425 %
5426 \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
5427 \def\chapterzzz#1{%
5428 % section resetting is \global in case the chapter is in a group, such
5429 % as an @include file.
5430 \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
5431 \global\advance\chapno by 1
5432 %
5433 % Used for \float.
5434 \gdef\chaplevelprefix{\the\chapno.}%
5435 \resetallfloatnos
5436 %
5437 % \putwordChapter can contain complex things in translations.
5438 \toks0=\expandafter{\putwordChapter}%
5439 \message{\the\toks0 \space \the\chapno}%
5440 %
5441 % Write the actual heading.
5442 \chapmacro{#1}{Ynumbered}{\the\chapno}%
5443 %
5444 % So @section and the like are numbered underneath this chapter.
5445 \global\let\section = \numberedsec
5446 \global\let\subsection = \numberedsubsec
5447 \global\let\subsubsection = \numberedsubsubsec
5448 }
5449
5450 \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
5451 %
5452 \def\appendixzzz#1{%
5453 \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
5454 \global\advance\appendixno by 1
5455 \gdef\chaplevelprefix{\appendixletter.}%
5456 \resetallfloatnos
5457 %
5458 % \putwordAppendix can contain complex things in translations.
5459 \toks0=\expandafter{\putwordAppendix}%
5460 \message{\the\toks0 \space \appendixletter}%
5461 %
5462 \chapmacro{#1}{Yappendix}{\appendixletter}%
5463 %
5464 \global\let\section = \appendixsec
5465 \global\let\subsection = \appendixsubsec
5466 \global\let\subsubsection = \appendixsubsubsec
5467 }
5468
5469 % normally unnmhead0 calls unnumberedzzz:
5470 \outer\parseargdef\unnumbered{\unnmhead0{#1}}
5471 \def\unnumberedzzz#1{%
5472 \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
5473 \global\advance\unnumberedno by 1
5474 %
5475 % Since an unnumbered has no number, no prefix for figures.
5476 \global\let\chaplevelprefix = \empty
5477 \resetallfloatnos
5478 %
5479 % This used to be simply \message{#1}, but TeX fully expands the
5480 % argument to \message. Therefore, if #1 contained @-commands, TeX
5481 % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
5482 % expanded @cite (which turns out to cause errors because \cite is meant
5483 % to be executed, not expanded).
5484 %
5485 % Anyway, we don't want the fully-expanded definition of @cite to appear
5486 % as a result of the \message, we just want `@cite' itself. We use
5487 % \the<toks register> to achieve this: TeX expands \the<toks> only once,
5488 % simply yielding the contents of <toks register>. (We also do this for
5489 % the toc entries.)
5490 \toks0 = {#1}%
5491 \message{(\the\toks0)}%
5492 %
5493 \chapmacro{#1}{Ynothing}{\the\unnumberedno}%
5494 %
5495 \global\let\section = \unnumberedsec
5496 \global\let\subsection = \unnumberedsubsec
5497 \global\let\subsubsection = \unnumberedsubsubsec
5498 }
5499
5500 % @centerchap is like @unnumbered, but the heading is centered.
5501 \outer\parseargdef\centerchap{%
5502 % Well, we could do the following in a group, but that would break
5503 % an assumption that \chapmacro is called at the outermost level.
5504 % Thus we are safer this way: --kasal, 24feb04
5505 \let\centerparametersmaybe = \centerparameters
5506 \unnmhead0{#1}%
5507 \let\centerparametersmaybe = \relax
5508 }
5509
5510 % @top is like @unnumbered.
5511 \let\top\unnumbered
5512
5513 % Sections.
5514 %
5515 \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
5516 \def\seczzz#1{%
5517 \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
5518 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
5519 }
5520
5521 % normally calls appendixsectionzzz:
5522 \outer\parseargdef\appendixsection{\apphead1{#1}}
5523 \def\appendixsectionzzz#1{%
5524 \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
5525 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
5526 }
5527 \let\appendixsec\appendixsection
5528
5529 % normally calls unnumberedseczzz:
5530 \outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
5531 \def\unnumberedseczzz#1{%
5532 \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
5533 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
5534 }
5535
5536 % Subsections.
5537 %
5538 % normally calls numberedsubseczzz:
5539 \outer\parseargdef\numberedsubsec{\numhead2{#1}}
5540 \def\numberedsubseczzz#1{%
5541 \global\subsubsecno=0 \global\advance\subsecno by 1
5542 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
5543 }
5544
5545 % normally calls appendixsubseczzz:
5546 \outer\parseargdef\appendixsubsec{\apphead2{#1}}
5547 \def\appendixsubseczzz#1{%
5548 \global\subsubsecno=0 \global\advance\subsecno by 1
5549 \sectionheading{#1}{subsec}{Yappendix}%
5550 {\appendixletter.\the\secno.\the\subsecno}%
5551 }
5552
5553 % normally calls unnumberedsubseczzz:
5554 \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
5555 \def\unnumberedsubseczzz#1{%
5556 \global\subsubsecno=0 \global\advance\subsecno by 1
5557 \sectionheading{#1}{subsec}{Ynothing}%
5558 {\the\unnumberedno.\the\secno.\the\subsecno}%
5559 }
5560
5561 % Subsubsections.
5562 %
5563 % normally numberedsubsubseczzz:
5564 \outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
5565 \def\numberedsubsubseczzz#1{%
5566 \global\advance\subsubsecno by 1
5567 \sectionheading{#1}{subsubsec}{Ynumbered}%
5568 {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
5569 }
5570
5571 % normally appendixsubsubseczzz:
5572 \outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
5573 \def\appendixsubsubseczzz#1{%
5574 \global\advance\subsubsecno by 1
5575 \sectionheading{#1}{subsubsec}{Yappendix}%
5576 {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
5577 }
5578
5579 % normally unnumberedsubsubseczzz:
5580 \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
5581 \def\unnumberedsubsubseczzz#1{%
5582 \global\advance\subsubsecno by 1
5583 \sectionheading{#1}{subsubsec}{Ynothing}%
5584 {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}%
5585 }
5586
5587 % These macros control what the section commands do, according
5588 % to what kind of chapter we are in (ordinary, appendix, or unnumbered).
5589 % Define them by default for a numbered chapter.
5590 \let\section = \numberedsec
5591 \let\subsection = \numberedsubsec
5592 \let\subsubsection = \numberedsubsubsec
5593
5594 % Define @majorheading, @heading and @subheading
5595
5596 \def\majorheading{%
5597 {\advance\chapheadingskip by 10pt \chapbreak }%
5598 \parsearg\chapheadingzzz
5599 }
5600
5601 \def\chapheading{\chapbreak \parsearg\chapheadingzzz}
5602 \def\chapheadingzzz#1{%
5603 \vbox{\chapfonts \raggedtitlesettings #1\par}%
5604 \nobreak\bigskip \nobreak
5605 \suppressfirstparagraphindent
5606 }
5607
5608 % @heading, @subheading, @subsubheading.
5609 \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{}
5610 \suppressfirstparagraphindent}
5611 \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{}
5612 \suppressfirstparagraphindent}
5613 \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
5614 \suppressfirstparagraphindent}
5615
5616 % These macros generate a chapter, section, etc. heading only
5617 % (including whitespace, linebreaking, etc. around it),
5618 % given all the information in convenient, parsed form.
5619
5620 % Args are the skip and penalty (usually negative)
5621 \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
5622
5623 % Parameter controlling skip before chapter headings (if needed)
5624 \newskip\chapheadingskip
5625
5626 % Define plain chapter starts, and page on/off switching for it.
5627 \def\chapbreak{\dobreak \chapheadingskip {-4000}}
5628 \def\chappager{\par\vfill\supereject}
5629 % Because \domark is called before \chapoddpage, the filler page will
5630 % get the headings for the next chapter, which is wrong. But we don't
5631 % care -- we just disable all headings on the filler page.
5632 \def\chapoddpage{%
5633 \chappager
5634 \ifodd\pageno \else
5635 \begingroup
5636 \headingsoff
5637 \null
5638 \chappager
5639 \endgroup
5640 \fi
5641 }
5642
5643 \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
5644
5645 \def\CHAPPAGoff{%
5646 \global\let\contentsalignmacro = \chappager
5647 \global\let\pchapsepmacro=\chapbreak
5648 \global\let\pagealignmacro=\chappager}
5649
5650 \def\CHAPPAGon{%
5651 \global\let\contentsalignmacro = \chappager
5652 \global\let\pchapsepmacro=\chappager
5653 \global\let\pagealignmacro=\chappager
5654 \global\def\HEADINGSon{\HEADINGSsingle}}
5655
5656 \def\CHAPPAGodd{%
5657 \global\let\contentsalignmacro = \chapoddpage
5658 \global\let\pchapsepmacro=\chapoddpage
5659 \global\let\pagealignmacro=\chapoddpage
5660 \global\def\HEADINGSon{\HEADINGSdouble}}
5661
5662 \CHAPPAGon
5663
5664 % Chapter opening.
5665 %
5666 % #1 is the text, #2 is the section type (Ynumbered, Ynothing,
5667 % Yappendix, Yomitfromtoc), #3 the chapter number.
5668 %
5669 % To test against our argument.
5670 \def\Ynothingkeyword{Ynothing}
5671 \def\Yomitfromtockeyword{Yomitfromtoc}
5672 \def\Yappendixkeyword{Yappendix}
5673 %
5674 \def\chapmacro#1#2#3{%
5675 % Insert the first mark before the heading break (see notes for \domark).
5676 \let\prevchapterdefs=\lastchapterdefs
5677 \let\prevsectiondefs=\lastsectiondefs
5678 \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
5679 \gdef\thissection{}}%
5680 %
5681 \def\temptype{#2}%
5682 \ifx\temptype\Ynothingkeyword
5683 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
5684 \gdef\thischapter{\thischaptername}}%
5685 \else\ifx\temptype\Yomitfromtockeyword
5686 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
5687 \gdef\thischapter{}}%
5688 \else\ifx\temptype\Yappendixkeyword
5689 \toks0={#1}%
5690 \xdef\lastchapterdefs{%
5691 \gdef\noexpand\thischaptername{\the\toks0}%
5692 \gdef\noexpand\thischapternum{\appendixletter}%
5693 % \noexpand\putwordAppendix avoids expanding indigestible
5694 % commands in some of the translations.
5695 \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
5696 \noexpand\thischapternum:
5697 \noexpand\thischaptername}%
5698 }%
5699 \else
5700 \toks0={#1}%
5701 \xdef\lastchapterdefs{%
5702 \gdef\noexpand\thischaptername{\the\toks0}%
5703 \gdef\noexpand\thischapternum{\the\chapno}%
5704 % \noexpand\putwordChapter avoids expanding indigestible
5705 % commands in some of the translations.
5706 \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
5707 \noexpand\thischapternum:
5708 \noexpand\thischaptername}%
5709 }%
5710 \fi\fi\fi
5711 %
5712 % Output the mark. Pass it through \safewhatsit, to take care of
5713 % the preceding space.
5714 \safewhatsit\domark
5715 %
5716 % Insert the chapter heading break.
5717 \pchapsepmacro
5718 %
5719 % Now the second mark, after the heading break. No break points
5720 % between here and the heading.
5721 \let\prevchapterdefs=\lastchapterdefs
5722 \let\prevsectiondefs=\lastsectiondefs
5723 \domark
5724 %
5725 {%
5726 \chapfonts \rmisbold
5727 %
5728 % Have to define \lastsection before calling \donoderef, because the
5729 % xref code eventually uses it. On the other hand, it has to be called
5730 % after \pchapsepmacro, or the headline will change too soon.
5731 \gdef\lastsection{#1}%
5732 %
5733 % Only insert the separating space if we have a chapter/appendix
5734 % number, and don't print the unnumbered ``number''.
5735 \ifx\temptype\Ynothingkeyword
5736 \setbox0 = \hbox{}%
5737 \def\toctype{unnchap}%
5738 \else\ifx\temptype\Yomitfromtockeyword
5739 \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
5740 \def\toctype{omit}%
5741 \else\ifx\temptype\Yappendixkeyword
5742 \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
5743 \def\toctype{app}%
5744 \else
5745 \setbox0 = \hbox{#3\enspace}%
5746 \def\toctype{numchap}%
5747 \fi\fi\fi
5748 %
5749 % Write the toc entry for this chapter. Must come before the
5750 % \donoderef, because we include the current node name in the toc
5751 % entry, and \donoderef resets it to empty.
5752 \writetocentry{\toctype}{#1}{#3}%
5753 %
5754 % For pdftex, we have to write out the node definition (aka, make
5755 % the pdfdest) after any page break, but before the actual text has
5756 % been typeset. If the destination for the pdf outline is after the
5757 % text, then jumping from the outline may wind up with the text not
5758 % being visible, for instance under high magnification.
5759 \donoderef{#2}%
5760 %
5761 % Typeset the actual heading.
5762 \nobreak % Avoid page breaks at the interline glue.
5763 \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe
5764 \unhbox0 #1\par}%
5765 }%
5766 \nobreak\bigskip % no page break after a chapter title
5767 \nobreak
5768 }
5769
5770 % @centerchap -- centered and unnumbered.
5771 \let\centerparametersmaybe = \relax
5772 \def\centerparameters{%
5773 \advance\rightskip by 3\rightskip
5774 \leftskip = \rightskip
5775 \parfillskip = 0pt
5776 }
5777
5778
5779 % I don't think this chapter style is supported any more, so I'm not
5780 % updating it with the new noderef stuff. We'll see. --karl, 11aug03.
5781 %
5782 \def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
5783 %
5784 \def\unnchfopen #1{%
5785 \chapoddpage
5786 \vbox{\chapfonts \raggedtitlesettings #1\par}%
5787 \nobreak\bigskip\nobreak
5788 }
5789 \def\chfopen #1#2{\chapoddpage {\chapfonts
5790 \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
5791 \par\penalty 5000 %
5792 }
5793 \def\centerchfopen #1{%
5794 \chapoddpage
5795 \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}%
5796 \nobreak\bigskip \nobreak
5797 }
5798 \def\CHAPFopen{%
5799 \global\let\chapmacro=\chfopen
5800 \global\let\centerchapmacro=\centerchfopen}
5801
5802
5803 % Section titles. These macros combine the section number parts and
5804 % call the generic \sectionheading to do the printing.
5805 %
5806 \newskip\secheadingskip
5807 \def\secheadingbreak{\dobreak \secheadingskip{-1000}}
5808
5809 % Subsection titles.
5810 \newskip\subsecheadingskip
5811 \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}}
5812
5813 % Subsubsection titles.
5814 \def\subsubsecheadingskip{\subsecheadingskip}
5815 \def\subsubsecheadingbreak{\subsecheadingbreak}
5816
5817
5818 % Print any size, any type, section title.
5819 %
5820 % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
5821 % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
5822 % section number.
5823 %
5824 \def\seckeyword{sec}
5825 %
5826 \def\sectionheading#1#2#3#4{%
5827 {%
5828 \checkenv{}% should not be in an environment.
5829 %
5830 % Switch to the right set of fonts.
5831 \csname #2fonts\endcsname \rmisbold
5832 %
5833 \def\sectionlevel{#2}%
5834 \def\temptype{#3}%
5835 %
5836 % Insert first mark before the heading break (see notes for \domark).
5837 \let\prevsectiondefs=\lastsectiondefs
5838 \ifx\temptype\Ynothingkeyword
5839 \ifx\sectionlevel\seckeyword
5840 \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
5841 \gdef\thissection{\thissectionname}}%
5842 \fi
5843 \else\ifx\temptype\Yomitfromtockeyword
5844 % Don't redefine \thissection.
5845 \else\ifx\temptype\Yappendixkeyword
5846 \ifx\sectionlevel\seckeyword
5847 \toks0={#1}%
5848 \xdef\lastsectiondefs{%
5849 \gdef\noexpand\thissectionname{\the\toks0}%
5850 \gdef\noexpand\thissectionnum{#4}%
5851 % \noexpand\putwordSection avoids expanding indigestible
5852 % commands in some of the translations.
5853 \gdef\noexpand\thissection{\noexpand\putwordSection{}
5854 \noexpand\thissectionnum:
5855 \noexpand\thissectionname}%
5856 }%
5857 \fi
5858 \else
5859 \ifx\sectionlevel\seckeyword
5860 \toks0={#1}%
5861 \xdef\lastsectiondefs{%
5862 \gdef\noexpand\thissectionname{\the\toks0}%
5863 \gdef\noexpand\thissectionnum{#4}%
5864 % \noexpand\putwordSection avoids expanding indigestible
5865 % commands in some of the translations.
5866 \gdef\noexpand\thissection{\noexpand\putwordSection{}
5867 \noexpand\thissectionnum:
5868 \noexpand\thissectionname}%
5869 }%
5870 \fi
5871 \fi\fi\fi
5872 %
5873 % Go into vertical mode. Usually we'll already be there, but we
5874 % don't want the following whatsit to end up in a preceding paragraph
5875 % if the document didn't happen to have a blank line.
5876 \par
5877 %
5878 % Output the mark. Pass it through \safewhatsit, to take care of
5879 % the preceding space.
5880 \safewhatsit\domark
5881 %
5882 % Insert space above the heading.
5883 \csname #2headingbreak\endcsname
5884 %
5885 % Now the second mark, after the heading break. No break points
5886 % between here and the heading.
5887 \let\prevsectiondefs=\lastsectiondefs
5888 \domark
5889 %
5890 % Only insert the space after the number if we have a section number.
5891 \ifx\temptype\Ynothingkeyword
5892 \setbox0 = \hbox{}%
5893 \def\toctype{unn}%
5894 \gdef\lastsection{#1}%
5895 \else\ifx\temptype\Yomitfromtockeyword
5896 % for @headings -- no section number, don't include in toc,
5897 % and don't redefine \lastsection.
5898 \setbox0 = \hbox{}%
5899 \def\toctype{omit}%
5900 \let\sectionlevel=\empty
5901 \else\ifx\temptype\Yappendixkeyword
5902 \setbox0 = \hbox{#4\enspace}%
5903 \def\toctype{app}%
5904 \gdef\lastsection{#1}%
5905 \else
5906 \setbox0 = \hbox{#4\enspace}%
5907 \def\toctype{num}%
5908 \gdef\lastsection{#1}%
5909 \fi\fi\fi
5910 %
5911 % Write the toc entry (before \donoderef). See comments in \chapmacro.
5912 \writetocentry{\toctype\sectionlevel}{#1}{#4}%
5913 %
5914 % Write the node reference (= pdf destination for pdftex).
5915 % Again, see comments in \chapmacro.
5916 \donoderef{#3}%
5917 %
5918 % Interline glue will be inserted when the vbox is completed.
5919 % That glue will be a valid breakpoint for the page, since it'll be
5920 % preceded by a whatsit (usually from the \donoderef, or from the
5921 % \writetocentry if there was no node). We don't want to allow that
5922 % break, since then the whatsits could end up on page n while the
5923 % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
5924 \nobreak
5925 %
5926 % Output the actual section heading.
5927 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
5928 \hangindent=\wd0 % zero if no section number
5929 \unhbox0 #1}%
5930 }%
5931 % Add extra space after the heading -- half of whatever came above it.
5932 % Don't allow stretch, though.
5933 \kern .5 \csname #2headingskip\endcsname
5934 %
5935 % Do not let the kern be a potential breakpoint, as it would be if it
5936 % was followed by glue.
5937 \nobreak
5938 %
5939 % We'll almost certainly start a paragraph next, so don't let that
5940 % glue accumulate. (Not a breakpoint because it's preceded by a
5941 % discardable item.) However, when a paragraph is not started next
5942 % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
5943 % or the negative glue will cause weirdly wrong output, typically
5944 % obscuring the section heading with something else.
5945 \vskip-\parskip
5946 %
5947 % This is so the last item on the main vertical list is a known
5948 % \penalty > 10000, so \startdefun, etc., can recognize the situation
5949 % and do the needful.
5950 \penalty 10001
5951 }
5952
5953
5954 \message{toc,}
5955 % Table of contents.
5956 \newwrite\tocfile
5957
5958 % Write an entry to the toc file, opening it if necessary.
5959 % Called from @chapter, etc.
5960 %
5961 % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
5962 % We append the current node name (if any) and page number as additional
5963 % arguments for the \{chap,sec,...}entry macros which will eventually
5964 % read this. The node name is used in the pdf outlines as the
5965 % destination to jump to.
5966 %
5967 % We open the .toc file for writing here instead of at @setfilename (or
5968 % any other fixed time) so that @contents can be anywhere in the document.
5969 % But if #1 is `omit', then we don't do anything. This is used for the
5970 % table of contents chapter openings themselves.
5971 %
5972 \newif\iftocfileopened
5973 \def\omitkeyword{omit}%
5974 %
5975 \def\writetocentry#1#2#3{%
5976 \edef\writetoctype{#1}%
5977 \ifx\writetoctype\omitkeyword \else
5978 \iftocfileopened\else
5979 \immediate\openout\tocfile = \jobname.toc
5980 \global\tocfileopenedtrue
5981 \fi
5982 %
5983 \iflinks
5984 {\atdummies
5985 \edef\temp{%
5986 \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
5987 \temp
5988 }%
5989 \fi
5990 \fi
5991 %
5992 % Tell \shipout to create a pdf destination on each page, if we're
5993 % writing pdf. These are used in the table of contents. We can't
5994 % just write one on every page because the title pages are numbered
5995 % 1 and 2 (the page numbers aren't printed), and so are the first
5996 % two pages of the document. Thus, we'd have two destinations named
5997 % `1', and two named `2'.
5998 \ifpdf \global\pdfmakepagedesttrue \fi
5999 }
6000
6001
6002 % These characters do not print properly in the Computer Modern roman
6003 % fonts, so we must take special care. This is more or less redundant
6004 % with the Texinfo input format setup at the end of this file.
6005 %
6006 \def\activecatcodes{%
6007 \catcode`\"=\active
6008 \catcode`\$=\active
6009 \catcode`\<=\active
6010 \catcode`\>=\active
6011 \catcode`\\=\active
6012 \catcode`\^=\active
6013 \catcode`\_=\active
6014 \catcode`\|=\active
6015 \catcode`\~=\active
6016 }
6017
6018
6019 % Read the toc file, which is essentially Texinfo input.
6020 \def\readtocfile{%
6021 \setupdatafile
6022 \activecatcodes
6023 \input \tocreadfilename
6024 }
6025
6026 \newskip\contentsrightmargin \contentsrightmargin=1in
6027 \newcount\savepageno
6028 \newcount\lastnegativepageno \lastnegativepageno = -1
6029
6030 % Prepare to read what we've written to \tocfile.
6031 %
6032 \def\startcontents#1{%
6033 % If @setchapternewpage on, and @headings double, the contents should
6034 % start on an odd page, unlike chapters. Thus, we maintain
6035 % \contentsalignmacro in parallel with \pagealignmacro.
6036 % From: Torbjorn Granlund <tege@matematik.su.se>
6037 \contentsalignmacro
6038 \immediate\closeout\tocfile
6039 %
6040 % Don't need to put `Contents' or `Short Contents' in the headline.
6041 % It is abundantly clear what they are.
6042 \chapmacro{#1}{Yomitfromtoc}{}%
6043 %
6044 \savepageno = \pageno
6045 \begingroup % Set up to handle contents files properly.
6046 \raggedbottom % Worry more about breakpoints than the bottom.
6047 \advance\hsize by -\contentsrightmargin % Don't use the full line length.
6048 %
6049 % Roman numerals for page numbers.
6050 \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
6051 }
6052
6053 % redefined for the two-volume lispref. We always output on
6054 % \jobname.toc even if this is redefined.
6055 %
6056 \def\tocreadfilename{\jobname.toc}
6057
6058 % Normal (long) toc.
6059 %
6060 \def\contents{%
6061 \startcontents{\putwordTOC}%
6062 \openin 1 \tocreadfilename\space
6063 \ifeof 1 \else
6064 \readtocfile
6065 \fi
6066 \vfill \eject
6067 \contentsalignmacro % in case @setchapternewpage odd is in effect
6068 \ifeof 1 \else
6069 \pdfmakeoutlines
6070 \fi
6071 \closein 1
6072 \endgroup
6073 \lastnegativepageno = \pageno
6074 \global\pageno = \savepageno
6075 }
6076
6077 % And just the chapters.
6078 \def\summarycontents{%
6079 \startcontents{\putwordShortTOC}%
6080 %
6081 \let\partentry = \shortpartentry
6082 \let\numchapentry = \shortchapentry
6083 \let\appentry = \shortchapentry
6084 \let\unnchapentry = \shortunnchapentry
6085 % We want a true roman here for the page numbers.
6086 \secfonts
6087 \let\rm=\shortcontrm \let\bf=\shortcontbf
6088 \let\sl=\shortcontsl \let\tt=\shortconttt
6089 \rm
6090 \hyphenpenalty = 10000
6091 \advance\baselineskip by 1pt % Open it up a little.
6092 \def\numsecentry##1##2##3##4{}
6093 \let\appsecentry = \numsecentry
6094 \let\unnsecentry = \numsecentry
6095 \let\numsubsecentry = \numsecentry
6096 \let\appsubsecentry = \numsecentry
6097 \let\unnsubsecentry = \numsecentry
6098 \let\numsubsubsecentry = \numsecentry
6099 \let\appsubsubsecentry = \numsecentry
6100 \let\unnsubsubsecentry = \numsecentry
6101 \openin 1 \tocreadfilename\space
6102 \ifeof 1 \else
6103 \readtocfile
6104 \fi
6105 \closein 1
6106 \vfill \eject
6107 \contentsalignmacro % in case @setchapternewpage odd is in effect
6108 \endgroup
6109 \lastnegativepageno = \pageno
6110 \global\pageno = \savepageno
6111 }
6112 \let\shortcontents = \summarycontents
6113
6114 % Typeset the label for a chapter or appendix for the short contents.
6115 % The arg is, e.g., `A' for an appendix, or `3' for a chapter.
6116 %
6117 \def\shortchaplabel#1{%
6118 % This space should be enough, since a single number is .5em, and the
6119 % widest letter (M) is 1em, at least in the Computer Modern fonts.
6120 % But use \hss just in case.
6121 % (This space doesn't include the extra space that gets added after
6122 % the label; that gets put in by \shortchapentry above.)
6123 %
6124 % We'd like to right-justify chapter numbers, but that looks strange
6125 % with appendix letters. And right-justifying numbers and
6126 % left-justifying letters looks strange when there is less than 10
6127 % chapters. Have to read the whole toc once to know how many chapters
6128 % there are before deciding ...
6129 \hbox to 1em{#1\hss}%
6130 }
6131
6132 % These macros generate individual entries in the table of contents.
6133 % The first argument is the chapter or section name.
6134 % The last argument is the page number.
6135 % The arguments in between are the chapter number, section number, ...
6136
6137 % Parts, in the main contents. Replace the part number, which doesn't
6138 % exist, with an empty box. Let's hope all the numbers have the same width.
6139 % Also ignore the page number, which is conventionally not printed.
6140 \def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
6141 \def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
6142 %
6143 % Parts, in the short toc.
6144 \def\shortpartentry#1#2#3#4{%
6145 \penalty-300
6146 \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
6147 \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
6148 }
6149
6150 % Chapters, in the main contents.
6151 \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
6152 %
6153 % Chapters, in the short toc.
6154 % See comments in \dochapentry re vbox and related settings.
6155 \def\shortchapentry#1#2#3#4{%
6156 \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
6157 }
6158
6159 % Appendices, in the main contents.
6160 % Need the word Appendix, and a fixed-size box.
6161 %
6162 \def\appendixbox#1{%
6163 % We use M since it's probably the widest letter.
6164 \setbox0 = \hbox{\putwordAppendix{} M}%
6165 \hbox to \wd0{\putwordAppendix{} #1\hss}}
6166 %
6167 \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
6168
6169 % Unnumbered chapters.
6170 \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
6171 \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
6172
6173 % Sections.
6174 \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
6175 \let\appsecentry=\numsecentry
6176 \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
6177
6178 % Subsections.
6179 \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
6180 \let\appsubsecentry=\numsubsecentry
6181 \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
6182
6183 % And subsubsections.
6184 \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
6185 \let\appsubsubsecentry=\numsubsubsecentry
6186 \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
6187
6188 % This parameter controls the indentation of the various levels.
6189 % Same as \defaultparindent.
6190 \newdimen\tocindent \tocindent = 15pt
6191
6192 % Now for the actual typesetting. In all these, #1 is the text and #2 is the
6193 % page number.
6194 %
6195 % If the toc has to be broken over pages, we want it to be at chapters
6196 % if at all possible; hence the \penalty.
6197 \def\dochapentry#1#2{%
6198 \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
6199 \begingroup
6200 \chapentryfonts
6201 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6202 \endgroup
6203 \nobreak\vskip .25\baselineskip plus.1\baselineskip
6204 }
6205
6206 \def\dosecentry#1#2{\begingroup
6207 \secentryfonts \leftskip=\tocindent
6208 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6209 \endgroup}
6210
6211 \def\dosubsecentry#1#2{\begingroup
6212 \subsecentryfonts \leftskip=2\tocindent
6213 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6214 \endgroup}
6215
6216 \def\dosubsubsecentry#1#2{\begingroup
6217 \subsubsecentryfonts \leftskip=3\tocindent
6218 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6219 \endgroup}
6220
6221 % We use the same \entry macro as for the index entries.
6222 \let\tocentry = \entry
6223
6224 % Space between chapter (or whatever) number and the title.
6225 \def\labelspace{\hskip1em \relax}
6226
6227 \def\dopageno#1{{\rm #1}}
6228 \def\doshortpageno#1{{\rm #1}}
6229
6230 \def\chapentryfonts{\secfonts \rm}
6231 \def\secentryfonts{\textfonts}
6232 \def\subsecentryfonts{\textfonts}
6233 \def\subsubsecentryfonts{\textfonts}
6234
6235
6236 \message{environments,}
6237 % @foo ... @end foo.
6238
6239 % @tex ... @end tex escapes into raw TeX temporarily.
6240 % One exception: @ is still an escape character, so that @end tex works.
6241 % But \@ or @@ will get a plain @ character.
6242
6243 \envdef\tex{%
6244 \setupmarkupstyle{tex}%
6245 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
6246 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
6247 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
6248 \catcode `\%=14
6249 \catcode `\+=\other
6250 \catcode `\"=\other
6251 \catcode `\|=\other
6252 \catcode `\<=\other
6253 \catcode `\>=\other
6254 \catcode`\`=\other
6255 \catcode`\'=\other
6256 \escapechar=`\\
6257 %
6258 % ' is active in math mode (mathcode"8000). So reset it, and all our
6259 % other math active characters (just in case), to plain's definitions.
6260 \mathactive
6261 %
6262 \let\b=\ptexb
6263 \let\bullet=\ptexbullet
6264 \let\c=\ptexc
6265 \let\,=\ptexcomma
6266 \let\.=\ptexdot
6267 \let\dots=\ptexdots
6268 \let\equiv=\ptexequiv
6269 \let\!=\ptexexclam
6270 \let\i=\ptexi
6271 \let\indent=\ptexindent
6272 \let\noindent=\ptexnoindent
6273 \let\{=\ptexlbrace
6274 \let\+=\tabalign
6275 \let\}=\ptexrbrace
6276 \let\/=\ptexslash
6277 \let\*=\ptexstar
6278 \let\t=\ptext
6279 \expandafter \let\csname top\endcsname=\ptextop % outer
6280 \let\frenchspacing=\plainfrenchspacing
6281 %
6282 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
6283 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
6284 \def\@{@}%
6285 }
6286 % There is no need to define \Etex.
6287
6288 % Define @lisp ... @end lisp.
6289 % @lisp environment forms a group so it can rebind things,
6290 % including the definition of @end lisp (which normally is erroneous).
6291
6292 % Amount to narrow the margins by for @lisp.
6293 \newskip\lispnarrowing \lispnarrowing=0.4in
6294
6295 % This is the definition that ^^M gets inside @lisp, @example, and other
6296 % such environments. \null is better than a space, since it doesn't
6297 % have any width.
6298 \def\lisppar{\null\endgraf}
6299
6300 % This space is always present above and below environments.
6301 \newskip\envskipamount \envskipamount = 0pt
6302
6303 % Make spacing and below environment symmetrical. We use \parskip here
6304 % to help in doing that, since in @example-like environments \parskip
6305 % is reset to zero; thus the \afterenvbreak inserts no space -- but the
6306 % start of the next paragraph will insert \parskip.
6307 %
6308 \def\aboveenvbreak{{%
6309 % =10000 instead of <10000 because of a special case in \itemzzz and
6310 % \sectionheading, q.v.
6311 \ifnum \lastpenalty=10000 \else
6312 \advance\envskipamount by \parskip
6313 \endgraf
6314 \ifdim\lastskip<\envskipamount
6315 \removelastskip
6316 % it's not a good place to break if the last penalty was \nobreak
6317 % or better ...
6318 \ifnum\lastpenalty<10000 \penalty-50 \fi
6319 \vskip\envskipamount
6320 \fi
6321 \fi
6322 }}
6323
6324 \let\afterenvbreak = \aboveenvbreak
6325
6326 % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
6327 % also clear it, so that its embedded environments do the narrowing again.
6328 \let\nonarrowing=\relax
6329
6330 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
6331 % environment contents.
6332 \font\circle=lcircle10
6333 \newdimen\circthick
6334 \newdimen\cartouter\newdimen\cartinner
6335 \newskip\normbskip\newskip\normpskip\newskip\normlskip
6336 \circthick=\fontdimen8\circle
6337 %
6338 \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
6339 \def\ctr{{\hskip 6pt\circle\char'010}}
6340 \def\cbl{{\circle\char'012\hskip -6pt}}
6341 \def\cbr{{\hskip 6pt\circle\char'011}}
6342 \def\carttop{\hbox to \cartouter{\hskip\lskip
6343 \ctl\leaders\hrule height\circthick\hfil\ctr
6344 \hskip\rskip}}
6345 \def\cartbot{\hbox to \cartouter{\hskip\lskip
6346 \cbl\leaders\hrule height\circthick\hfil\cbr
6347 \hskip\rskip}}
6348 %
6349 \newskip\lskip\newskip\rskip
6350
6351 \envdef\cartouche{%
6352 \ifhmode\par\fi % can't be in the midst of a paragraph.
6353 \startsavinginserts
6354 \lskip=\leftskip \rskip=\rightskip
6355 \leftskip=0pt\rightskip=0pt % we want these *outside*.
6356 \cartinner=\hsize \advance\cartinner by-\lskip
6357 \advance\cartinner by-\rskip
6358 \cartouter=\hsize
6359 \advance\cartouter by 18.4pt % allow for 3pt kerns on either
6360 % side, and for 6pt waste from
6361 % each corner char, and rule thickness
6362 \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
6363 % Flag to tell @lisp, etc., not to narrow margin.
6364 \let\nonarrowing = t%
6365 %
6366 % If this cartouche directly follows a sectioning command, we need the
6367 % \parskip glue (backspaced over by default) or the cartouche can
6368 % collide with the section heading.
6369 \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
6370 %
6371 \vbox\bgroup
6372 \baselineskip=0pt\parskip=0pt\lineskip=0pt
6373 \carttop
6374 \hbox\bgroup
6375 \hskip\lskip
6376 \vrule\kern3pt
6377 \vbox\bgroup
6378 \kern3pt
6379 \hsize=\cartinner
6380 \baselineskip=\normbskip
6381 \lineskip=\normlskip
6382 \parskip=\normpskip
6383 \vskip -\parskip
6384 \comment % For explanation, see the end of def\group.
6385 }
6386 \def\Ecartouche{%
6387 \ifhmode\par\fi
6388 \kern3pt
6389 \egroup
6390 \kern3pt\vrule
6391 \hskip\rskip
6392 \egroup
6393 \cartbot
6394 \egroup
6395 \checkinserts
6396 }
6397
6398
6399 % This macro is called at the beginning of all the @example variants,
6400 % inside a group.
6401 \newdimen\nonfillparindent
6402 \def\nonfillstart{%
6403 \aboveenvbreak
6404 \hfuzz = 12pt % Don't be fussy
6405 \sepspaces % Make spaces be word-separators rather than space tokens.
6406 \let\par = \lisppar % don't ignore blank lines
6407 \obeylines % each line of input is a line of output
6408 \parskip = 0pt
6409 % Turn off paragraph indentation but redefine \indent to emulate
6410 % the normal \indent.
6411 \nonfillparindent=\parindent
6412 \parindent = 0pt
6413 \let\indent\nonfillindent
6414 %
6415 \emergencystretch = 0pt % don't try to avoid overfull boxes
6416 \ifx\nonarrowing\relax
6417 \advance \leftskip by \lispnarrowing
6418 \exdentamount=\lispnarrowing
6419 \else
6420 \let\nonarrowing = \relax
6421 \fi
6422 \let\exdent=\nofillexdent
6423 }
6424
6425 \begingroup
6426 \obeyspaces
6427 % We want to swallow spaces (but not other tokens) after the fake
6428 % @indent in our nonfill-environments, where spaces are normally
6429 % active and set to @tie, resulting in them not being ignored after
6430 % @indent.
6431 \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
6432 \gdef\nonfillindentcheck{%
6433 \ifx\temp %
6434 \expandafter\nonfillindentgobble%
6435 \else%
6436 \leavevmode\nonfillindentbox%
6437 \fi%
6438 }%
6439 \endgroup
6440 \def\nonfillindentgobble#1{\nonfillindent}
6441 \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
6442
6443 % If you want all examples etc. small: @set dispenvsize small.
6444 % If you want even small examples the full size: @set dispenvsize nosmall.
6445 % This affects the following displayed environments:
6446 % @example, @display, @format, @lisp
6447 %
6448 \def\smallword{small}
6449 \def\nosmallword{nosmall}
6450 \let\SETdispenvsize\relax
6451 \def\setnormaldispenv{%
6452 \ifx\SETdispenvsize\smallword
6453 % end paragraph for sake of leading, in case document has no blank
6454 % line. This is redundant with what happens in \aboveenvbreak, but
6455 % we need to do it before changing the fonts, and it's inconvenient
6456 % to change the fonts afterward.
6457 \ifnum \lastpenalty=10000 \else \endgraf \fi
6458 \smallexamplefonts \rm
6459 \fi
6460 }
6461 \def\setsmalldispenv{%
6462 \ifx\SETdispenvsize\nosmallword
6463 \else
6464 \ifnum \lastpenalty=10000 \else \endgraf \fi
6465 \smallexamplefonts \rm
6466 \fi
6467 }
6468
6469 % We often define two environments, @foo and @smallfoo.
6470 % Let's do it in one command. #1 is the env name, #2 the definition.
6471 \def\makedispenvdef#1#2{%
6472 \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
6473 \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
6474 \expandafter\let\csname E#1\endcsname \afterenvbreak
6475 \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
6476 }
6477
6478 % Define two environment synonyms (#1 and #2) for an environment.
6479 \def\maketwodispenvdef#1#2#3{%
6480 \makedispenvdef{#1}{#3}%
6481 \makedispenvdef{#2}{#3}%
6482 }
6483 %
6484 % @lisp: indented, narrowed, typewriter font;
6485 % @example: same as @lisp.
6486 %
6487 % @smallexample and @smalllisp: use smaller fonts.
6488 % Originally contributed by Pavel@xerox.
6489 %
6490 \maketwodispenvdef{lisp}{example}{%
6491 \nonfillstart
6492 \tt\setupmarkupstyle{example}%
6493 \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
6494 \gobble % eat return
6495 }
6496 % @display/@smalldisplay: same as @lisp except keep current font.
6497 %
6498 \makedispenvdef{display}{%
6499 \nonfillstart
6500 \gobble
6501 }
6502
6503 % @format/@smallformat: same as @display except don't narrow margins.
6504 %
6505 \makedispenvdef{format}{%
6506 \let\nonarrowing = t%
6507 \nonfillstart
6508 \gobble
6509 }
6510
6511 % @flushleft: same as @format, but doesn't obey \SETdispenvsize.
6512 \envdef\flushleft{%
6513 \let\nonarrowing = t%
6514 \nonfillstart
6515 \gobble
6516 }
6517 \let\Eflushleft = \afterenvbreak
6518
6519 % @flushright.
6520 %
6521 \envdef\flushright{%
6522 \let\nonarrowing = t%
6523 \nonfillstart
6524 \advance\leftskip by 0pt plus 1fill\relax
6525 \gobble
6526 }
6527 \let\Eflushright = \afterenvbreak
6528
6529
6530 % @raggedright does more-or-less normal line breaking but no right
6531 % justification. From plain.tex.
6532 \envdef\raggedright{%
6533 \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
6534 }
6535 \let\Eraggedright\par
6536
6537 \envdef\raggedleft{%
6538 \parindent=0pt \leftskip0pt plus2em
6539 \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
6540 \hbadness=10000 % Last line will usually be underfull, so turn off
6541 % badness reporting.
6542 }
6543 \let\Eraggedleft\par
6544
6545 \envdef\raggedcenter{%
6546 \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
6547 \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
6548 \hbadness=10000 % Last line will usually be underfull, so turn off
6549 % badness reporting.
6550 }
6551 \let\Eraggedcenter\par
6552
6553
6554 % @quotation does normal linebreaking (hence we can't use \nonfillstart)
6555 % and narrows the margins. We keep \parskip nonzero in general, since
6556 % we're doing normal filling. So, when using \aboveenvbreak and
6557 % \afterenvbreak, temporarily make \parskip 0.
6558 %
6559 \makedispenvdef{quotation}{\quotationstart}
6560 %
6561 \def\quotationstart{%
6562 \indentedblockstart % same as \indentedblock, but increase right margin too.
6563 \ifx\nonarrowing\relax
6564 \advance\rightskip by \lispnarrowing
6565 \fi
6566 \parsearg\quotationlabel
6567 }
6568
6569 % We have retained a nonzero parskip for the environment, since we're
6570 % doing normal filling.
6571 %
6572 \def\Equotation{%
6573 \par
6574 \ifx\quotationauthor\thisisundefined\else
6575 % indent a bit.
6576 \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
6577 \fi
6578 {\parskip=0pt \afterenvbreak}%
6579 }
6580 \def\Esmallquotation{\Equotation}
6581
6582 % If we're given an argument, typeset it in bold with a colon after.
6583 \def\quotationlabel#1{%
6584 \def\temp{#1}%
6585 \ifx\temp\empty \else
6586 {\bf #1: }%
6587 \fi
6588 }
6589
6590 % @indentedblock is like @quotation, but indents only on the left and
6591 % has no optional argument.
6592 %
6593 \makedispenvdef{indentedblock}{\indentedblockstart}
6594 %
6595 \def\indentedblockstart{%
6596 {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
6597 \parindent=0pt
6598 %
6599 % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
6600 \ifx\nonarrowing\relax
6601 \advance\leftskip by \lispnarrowing
6602 \exdentamount = \lispnarrowing
6603 \else
6604 \let\nonarrowing = \relax
6605 \fi
6606 }
6607
6608 % Keep a nonzero parskip for the environment, since we're doing normal filling.
6609 %
6610 \def\Eindentedblock{%
6611 \par
6612 {\parskip=0pt \afterenvbreak}%
6613 }
6614 \def\Esmallindentedblock{\Eindentedblock}
6615
6616
6617 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
6618 % If we want to allow any <char> as delimiter,
6619 % we need the curly braces so that makeinfo sees the @verb command, eg:
6620 % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
6621 %
6622 % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
6623 %
6624 % [Knuth] p.344; only we need to do the other characters Texinfo sets
6625 % active too. Otherwise, they get lost as the first character on a
6626 % verbatim line.
6627 \def\dospecials{%
6628 \do\ \do\\\do\{\do\}\do\$\do\&%
6629 \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
6630 \do\<\do\>\do\|\do\@\do+\do\"%
6631 % Don't do the quotes -- if we do, @set txicodequoteundirected and
6632 % @set txicodequotebacktick will not have effect on @verb and
6633 % @verbatim, and ?` and !` ligatures won't get disabled.
6634 %\do\`\do\'%
6635 }
6636 %
6637 % [Knuth] p. 380
6638 \def\uncatcodespecials{%
6639 \def\do##1{\catcode`##1=\other}\dospecials}
6640 %
6641 % Setup for the @verb command.
6642 %
6643 % Eight spaces for a tab
6644 \begingroup
6645 \catcode`\^^I=\active
6646 \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
6647 \endgroup
6648 %
6649 \def\setupverb{%
6650 \tt % easiest (and conventionally used) font for verbatim
6651 \def\par{\leavevmode\endgraf}%
6652 \setupmarkupstyle{verb}%
6653 \tabeightspaces
6654 % Respect line breaks,
6655 % print special symbols as themselves, and
6656 % make each space count
6657 % must do in this order:
6658 \obeylines \uncatcodespecials \sepspaces
6659 }
6660
6661 % Setup for the @verbatim environment
6662 %
6663 % Real tab expansion.
6664 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
6665 %
6666 % We typeset each line of the verbatim in an \hbox, so we can handle
6667 % tabs. The \global is in case the verbatim line starts with an accent,
6668 % or some other command that starts with a begin-group. Otherwise, the
6669 % entire \verbbox would disappear at the corresponding end-group, before
6670 % it is typeset. Meanwhile, we can't have nested verbatim commands
6671 % (can we?), so the \global won't be overwriting itself.
6672 \newbox\verbbox
6673 \def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
6674 %
6675 \begingroup
6676 \catcode`\^^I=\active
6677 \gdef\tabexpand{%
6678 \catcode`\^^I=\active
6679 \def^^I{\leavevmode\egroup
6680 \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
6681 \divide\dimen\verbbox by\tabw
6682 \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
6683 \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw
6684 \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
6685 }%
6686 }
6687 \endgroup
6688
6689 % start the verbatim environment.
6690 \def\setupverbatim{%
6691 \let\nonarrowing = t%
6692 \nonfillstart
6693 \tt % easiest (and conventionally used) font for verbatim
6694 % The \leavevmode here is for blank lines. Otherwise, we would
6695 % never \starttabox and the \egroup would end verbatim mode.
6696 \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
6697 \tabexpand
6698 \setupmarkupstyle{verbatim}%
6699 % Respect line breaks,
6700 % print special symbols as themselves, and
6701 % make each space count.
6702 % Must do in this order:
6703 \obeylines \uncatcodespecials \sepspaces
6704 \everypar{\starttabbox}%
6705 }
6706
6707 % Do the @verb magic: verbatim text is quoted by unique
6708 % delimiter characters. Before first delimiter expect a
6709 % right brace, after last delimiter expect closing brace:
6710 %
6711 % \def\doverb'{'<char>#1<char>'}'{#1}
6712 %
6713 % [Knuth] p. 382; only eat outer {}
6714 \begingroup
6715 \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other
6716 \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
6717 \endgroup
6718 %
6719 \def\verb{\begingroup\setupverb\doverb}
6720 %
6721 %
6722 % Do the @verbatim magic: define the macro \doverbatim so that
6723 % the (first) argument ends when '@end verbatim' is reached, ie:
6724 %
6725 % \def\doverbatim#1@end verbatim{#1}
6726 %
6727 % For Texinfo it's a lot easier than for LaTeX,
6728 % because texinfo's \verbatim doesn't stop at '\end{verbatim}':
6729 % we need not redefine '\', '{' and '}'.
6730 %
6731 % Inspired by LaTeX's verbatim command set [latex.ltx]
6732 %
6733 \begingroup
6734 \catcode`\ =\active
6735 \obeylines %
6736 % ignore everything up to the first ^^M, that's the newline at the end
6737 % of the @verbatim input line itself. Otherwise we get an extra blank
6738 % line in the output.
6739 \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}%
6740 % We really want {...\end verbatim} in the body of the macro, but
6741 % without the active space; thus we have to use \xdef and \gobble.
6742 \endgroup
6743 %
6744 \envdef\verbatim{%
6745 \setupverbatim\doverbatim
6746 }
6747 \let\Everbatim = \afterenvbreak
6748
6749
6750 % @verbatiminclude FILE - insert text of file in verbatim environment.
6751 %
6752 \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
6753 %
6754 \def\doverbatiminclude#1{%
6755 {%
6756 \makevalueexpandable
6757 \setupverbatim
6758 \indexnofonts % Allow `@@' and other weird things in file names.
6759 \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
6760 \input #1
6761 \afterenvbreak
6762 }%
6763 }
6764
6765 % @copying ... @end copying.
6766 % Save the text away for @insertcopying later.
6767 %
6768 % We save the uninterpreted tokens, rather than creating a box.
6769 % Saving the text in a box would be much easier, but then all the
6770 % typesetting commands (@smallbook, font changes, etc.) have to be done
6771 % beforehand -- and a) we want @copying to be done first in the source
6772 % file; b) letting users define the frontmatter in as flexible order as
6773 % possible is very desirable.
6774 %
6775 \def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
6776 \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
6777 %
6778 \def\insertcopying{%
6779 \begingroup
6780 \parindent = 0pt % paragraph indentation looks wrong on title page
6781 \scanexp\copyingtext
6782 \endgroup
6783 }
6784
6785
6786 \message{defuns,}
6787 % @defun etc.
6788
6789 \newskip\defbodyindent \defbodyindent=.4in
6790 \newskip\defargsindent \defargsindent=50pt
6791 \newskip\deflastargmargin \deflastargmargin=18pt
6792 \newcount\defunpenalty
6793
6794 % Start the processing of @deffn:
6795 \def\startdefun{%
6796 \ifnum\lastpenalty<10000
6797 \medbreak
6798 \defunpenalty=10003 % Will keep this @deffn together with the
6799 % following @def command, see below.
6800 \else
6801 % If there are two @def commands in a row, we'll have a \nobreak,
6802 % which is there to keep the function description together with its
6803 % header. But if there's nothing but headers, we need to allow a
6804 % break somewhere. Check specifically for penalty 10002, inserted
6805 % by \printdefunline, instead of 10000, since the sectioning
6806 % commands also insert a nobreak penalty, and we don't want to allow
6807 % a break between a section heading and a defun.
6808 %
6809 % As a further refinement, we avoid "club" headers by signalling
6810 % with penalty of 10003 after the very first @deffn in the
6811 % sequence (see above), and penalty of 10002 after any following
6812 % @def command.
6813 \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi
6814 %
6815 % Similarly, after a section heading, do not allow a break.
6816 % But do insert the glue.
6817 \medskip % preceded by discardable penalty, so not a breakpoint
6818 \fi
6819 %
6820 \parindent=0in
6821 \advance\leftskip by \defbodyindent
6822 \exdentamount=\defbodyindent
6823 }
6824
6825 \def\dodefunx#1{%
6826 % First, check whether we are in the right environment:
6827 \checkenv#1%
6828 %
6829 % As above, allow line break if we have multiple x headers in a row.
6830 % It's not a great place, though.
6831 \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
6832 %
6833 % And now, it's time to reuse the body of the original defun:
6834 \expandafter\gobbledefun#1%
6835 }
6836 \def\gobbledefun#1\startdefun{}
6837
6838 % \printdefunline \deffnheader{text}
6839 %
6840 \def\printdefunline#1#2{%
6841 \begingroup
6842 % call \deffnheader:
6843 #1#2 \endheader
6844 % common ending:
6845 \interlinepenalty = 10000
6846 \advance\rightskip by 0pt plus 1fil\relax
6847 \endgraf
6848 \nobreak\vskip -\parskip
6849 \penalty\defunpenalty % signal to \startdefun and \dodefunx
6850 % Some of the @defun-type tags do not enable magic parentheses,
6851 % rendering the following check redundant. But we don't optimize.
6852 \checkparencounts
6853 \endgroup
6854 }
6855
6856 \def\Edefun{\endgraf\medbreak}
6857
6858 % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
6859 % the only thing remaining is to define \deffnheader.
6860 %
6861 \def\makedefun#1{%
6862 \expandafter\let\csname E#1\endcsname = \Edefun
6863 \edef\temp{\noexpand\domakedefun
6864 \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
6865 \temp
6866 }
6867
6868 % \domakedefun \deffn \deffnx \deffnheader
6869 %
6870 % Define \deffn and \deffnx, without parameters.
6871 % \deffnheader has to be defined explicitly.
6872 %
6873 \def\domakedefun#1#2#3{%
6874 \envdef#1{%
6875 \startdefun
6876 \doingtypefnfalse % distinguish typed functions from all else
6877 \parseargusing\activeparens{\printdefunline#3}%
6878 }%
6879 \def#2{\dodefunx#1}%
6880 \def#3%
6881 }
6882
6883 \newif\ifdoingtypefn % doing typed function?
6884 \newif\ifrettypeownline % typeset return type on its own line?
6885
6886 % @deftypefnnewline on|off says whether the return type of typed functions
6887 % are printed on their own line. This affects @deftypefn, @deftypefun,
6888 % @deftypeop, and @deftypemethod.
6889 %
6890 \parseargdef\deftypefnnewline{%
6891 \def\temp{#1}%
6892 \ifx\temp\onword
6893 \expandafter\let\csname SETtxideftypefnnl\endcsname
6894 = \empty
6895 \else\ifx\temp\offword
6896 \expandafter\let\csname SETtxideftypefnnl\endcsname
6897 = \relax
6898 \else
6899 \errhelp = \EMsimple
6900 \errmessage{Unknown @txideftypefnnl value `\temp',
6901 must be on|off}%
6902 \fi\fi
6903 }
6904
6905 % Untyped functions:
6906
6907 % @deffn category name args
6908 \makedefun{deffn}{\deffngeneral{}}
6909
6910 % @deffn category class name args
6911 \makedefun{defop}#1 {\defopon{#1\ \putwordon}}
6912
6913 % \defopon {category on}class name args
6914 \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
6915
6916 % \deffngeneral {subind}category name args
6917 %
6918 \def\deffngeneral#1#2 #3 #4\endheader{%
6919 % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
6920 \dosubind{fn}{\code{#3}}{#1}%
6921 \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
6922 }
6923
6924 % Typed functions:
6925
6926 % @deftypefn category type name args
6927 \makedefun{deftypefn}{\deftypefngeneral{}}
6928
6929 % @deftypeop category class type name args
6930 \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}}
6931
6932 % \deftypeopon {category on}class type name args
6933 \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
6934
6935 % \deftypefngeneral {subind}category type name args
6936 %
6937 \def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
6938 \dosubind{fn}{\code{#4}}{#1}%
6939 \doingtypefntrue
6940 \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
6941 }
6942
6943 % Typed variables:
6944
6945 % @deftypevr category type var args
6946 \makedefun{deftypevr}{\deftypecvgeneral{}}
6947
6948 % @deftypecv category class type var args
6949 \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}}
6950
6951 % \deftypecvof {category of}class type var args
6952 \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} }
6953
6954 % \deftypecvgeneral {subind}category type var args
6955 %
6956 \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
6957 \dosubind{vr}{\code{#4}}{#1}%
6958 \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
6959 }
6960
6961 % Untyped variables:
6962
6963 % @defvr category var args
6964 \makedefun{defvr}#1 {\deftypevrheader{#1} {} }
6965
6966 % @defcv category class var args
6967 \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}}
6968
6969 % \defcvof {category of}class var args
6970 \def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
6971
6972 % Types:
6973
6974 % @deftp category name args
6975 \makedefun{deftp}#1 #2 #3\endheader{%
6976 \doind{tp}{\code{#2}}%
6977 \defname{#1}{}{#2}\defunargs{#3\unskip}%
6978 }
6979
6980 % Remaining @defun-like shortcuts:
6981 \makedefun{defun}{\deffnheader{\putwordDeffunc} }
6982 \makedefun{defmac}{\deffnheader{\putwordDefmac} }
6983 \makedefun{defspec}{\deffnheader{\putwordDefspec} }
6984 \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} }
6985 \makedefun{defvar}{\defvrheader{\putwordDefvar} }
6986 \makedefun{defopt}{\defvrheader{\putwordDefopt} }
6987 \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
6988 \makedefun{defmethod}{\defopon\putwordMethodon}
6989 \makedefun{deftypemethod}{\deftypeopon\putwordMethodon}
6990 \makedefun{defivar}{\defcvof\putwordInstanceVariableof}
6991 \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof}
6992
6993 % \defname, which formats the name of the @def (not the args).
6994 % #1 is the category, such as "Function".
6995 % #2 is the return type, if any.
6996 % #3 is the function name.
6997 %
6998 % We are followed by (but not passed) the arguments, if any.
6999 %
7000 \def\defname#1#2#3{%
7001 \par
7002 % Get the values of \leftskip and \rightskip as they were outside the @def...
7003 \advance\leftskip by -\defbodyindent
7004 %
7005 % Determine if we are typesetting the return type of a typed function
7006 % on a line by itself.
7007 \rettypeownlinefalse
7008 \ifdoingtypefn % doing a typed function specifically?
7009 % then check user option for putting return type on its own line:
7010 \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
7011 \rettypeownlinetrue
7012 \fi
7013 \fi
7014 %
7015 % How we'll format the category name. Putting it in brackets helps
7016 % distinguish it from the body text that may end up on the next line
7017 % just below it.
7018 \def\temp{#1}%
7019 \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
7020 %
7021 % Figure out line sizes for the paragraph shape. We'll always have at
7022 % least two.
7023 \tempnum = 2
7024 %
7025 % The first line needs space for \box0; but if \rightskip is nonzero,
7026 % we need only space for the part of \box0 which exceeds it:
7027 \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
7028 %
7029 % If doing a return type on its own line, we'll have another line.
7030 \ifrettypeownline
7031 \advance\tempnum by 1
7032 \def\maybeshapeline{0in \hsize}%
7033 \else
7034 \def\maybeshapeline{}%
7035 \fi
7036 %
7037 % The continuations:
7038 \dimen2=\hsize \advance\dimen2 by -\defargsindent
7039 %
7040 % The final paragraph shape:
7041 \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2
7042 %
7043 % Put the category name at the right margin.
7044 \noindent
7045 \hbox to 0pt{%
7046 \hfil\box0 \kern-\hsize
7047 % \hsize has to be shortened this way:
7048 \kern\leftskip
7049 % Intentionally do not respect \rightskip, since we need the space.
7050 }%
7051 %
7052 % Allow all lines to be underfull without complaint:
7053 \tolerance=10000 \hbadness=10000
7054 \exdentamount=\defbodyindent
7055 {%
7056 % defun fonts. We use typewriter by default (used to be bold) because:
7057 % . we're printing identifiers, they should be in tt in principle.
7058 % . in languages with many accents, such as Czech or French, it's
7059 % common to leave accents off identifiers. The result looks ok in
7060 % tt, but exceedingly strange in rm.
7061 % . we don't want -- and --- to be treated as ligatures.
7062 % . this still does not fix the ?` and !` ligatures, but so far no
7063 % one has made identifiers using them :).
7064 \df \tt
7065 \def\temp{#2}% text of the return type
7066 \ifx\temp\empty\else
7067 \tclose{\temp}% typeset the return type
7068 \ifrettypeownline
7069 % put return type on its own line; prohibit line break following:
7070 \hfil\vadjust{\nobreak}\break
7071 \else
7072 \space % type on same line, so just followed by a space
7073 \fi
7074 \fi % no return type
7075 #3% output function name
7076 }%
7077 {\rm\enskip}% hskip 0.5 em of \tenrm
7078 %
7079 \boldbrax
7080 % arguments will be output next, if any.
7081 }
7082
7083 % Print arguments in slanted roman (not ttsl), inconsistently with using
7084 % tt for the name. This is because literal text is sometimes needed in
7085 % the argument list (groff manual), and ttsl and tt are not very
7086 % distinguishable. Prevent hyphenation at `-' chars.
7087 %
7088 \def\defunargs#1{%
7089 % use sl by default (not ttsl),
7090 % tt for the names.
7091 \df \sl \hyphenchar\font=0
7092 %
7093 % On the other hand, if an argument has two dashes (for instance), we
7094 % want a way to get ttsl. We used to recommend @var for that, so
7095 % leave the code in, but it's strange for @var to lead to typewriter.
7096 % Nowadays we recommend @code, since the difference between a ttsl hyphen
7097 % and a tt hyphen is pretty tiny. @code also disables ?` !`.
7098 \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
7099 #1%
7100 \sl\hyphenchar\font=45
7101 }
7102
7103 % We want ()&[] to print specially on the defun line.
7104 %
7105 \def\activeparens{%
7106 \catcode`\(=\active \catcode`\)=\active
7107 \catcode`\[=\active \catcode`\]=\active
7108 \catcode`\&=\active
7109 }
7110
7111 % Make control sequences which act like normal parenthesis chars.
7112 \let\lparen = ( \let\rparen = )
7113
7114 % Be sure that we always have a definition for `(', etc. For example,
7115 % if the fn name has parens in it, \boldbrax will not be in effect yet,
7116 % so TeX would otherwise complain about undefined control sequence.
7117 {
7118 \activeparens
7119 \global\let(=\lparen \global\let)=\rparen
7120 \global\let[=\lbrack \global\let]=\rbrack
7121 \global\let& = \&
7122
7123 \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
7124 \gdef\magicamp{\let&=\amprm}
7125 }
7126
7127 \newcount\parencount
7128
7129 % If we encounter &foo, then turn on ()-hacking afterwards
7130 \newif\ifampseen
7131 \def\amprm#1 {\ampseentrue{\bf\&#1 }}
7132
7133 \def\parenfont{%
7134 \ifampseen
7135 % At the first level, print parens in roman,
7136 % otherwise use the default font.
7137 \ifnum \parencount=1 \rm \fi
7138 \else
7139 % The \sf parens (in \boldbrax) actually are a little bolder than
7140 % the contained text. This is especially needed for [ and ] .
7141 \sf
7142 \fi
7143 }
7144 \def\infirstlevel#1{%
7145 \ifampseen
7146 \ifnum\parencount=1
7147 #1%
7148 \fi
7149 \fi
7150 }
7151 \def\bfafterword#1 {#1 \bf}
7152
7153 \def\opnr{%
7154 \global\advance\parencount by 1
7155 {\parenfont(}%
7156 \infirstlevel \bfafterword
7157 }
7158 \def\clnr{%
7159 {\parenfont)}%
7160 \infirstlevel \sl
7161 \global\advance\parencount by -1
7162 }
7163
7164 \newcount\brackcount
7165 \def\lbrb{%
7166 \global\advance\brackcount by 1
7167 {\bf[}%
7168 }
7169 \def\rbrb{%
7170 {\bf]}%
7171 \global\advance\brackcount by -1
7172 }
7173
7174 \def\checkparencounts{%
7175 \ifnum\parencount=0 \else \badparencount \fi
7176 \ifnum\brackcount=0 \else \badbrackcount \fi
7177 }
7178 % these should not use \errmessage; the glibc manual, at least, actually
7179 % has such constructs (when documenting function pointers).
7180 \def\badparencount{%
7181 \message{Warning: unbalanced parentheses in @def...}%
7182 \global\parencount=0
7183 }
7184 \def\badbrackcount{%
7185 \message{Warning: unbalanced square brackets in @def...}%
7186 \global\brackcount=0
7187 }
7188
7189
7190 \message{macros,}
7191 % @macro.
7192
7193 % To do this right we need a feature of e-TeX, \scantokens,
7194 % which we arrange to emulate with a temporary file in ordinary TeX.
7195 \ifx\eTeXversion\thisisundefined
7196 \newwrite\macscribble
7197 \def\scantokens#1{%
7198 \toks0={#1}%
7199 \immediate\openout\macscribble=\jobname.tmp
7200 \immediate\write\macscribble{\the\toks0}%
7201 \immediate\closeout\macscribble
7202 \input \jobname.tmp
7203 }
7204 \fi
7205
7206 \def\scanmacro#1{\begingroup
7207 \newlinechar`\^^M
7208 \let\xeatspaces\eatspaces
7209 %
7210 % Undo catcode changes of \startcontents and \doprintindex
7211 % When called from @insertcopying or (short)caption, we need active
7212 % backslash to get it printed correctly. Previously, we had
7213 % \catcode`\\=\other instead. We'll see whether a problem appears
7214 % with macro expansion. --kasal, 19aug04
7215 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
7216 %
7217 % ... and for \example:
7218 \spaceisspace
7219 %
7220 % The \empty here causes a following catcode 5 newline to be eaten as
7221 % part of reading whitespace after a control sequence. It does not
7222 % eat a catcode 13 newline. There's no good way to handle the two
7223 % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
7224 % would then have different behavior). See the Macro Details node in
7225 % the manual for the workaround we recommend for macros and
7226 % line-oriented commands.
7227 %
7228 \scantokens{#1\empty}%
7229 \endgroup}
7230
7231 \def\scanexp#1{%
7232 \edef\temp{\noexpand\scanmacro{#1}}%
7233 \temp
7234 }
7235
7236 \newcount\paramno % Count of parameters
7237 \newtoks\macname % Macro name
7238 \newif\ifrecursive % Is it recursive?
7239
7240 % List of all defined macros in the form
7241 % \definedummyword\macro1\definedummyword\macro2...
7242 % Currently is also contains all @aliases; the list can be split
7243 % if there is a need.
7244 \def\macrolist{}
7245
7246 % Add the macro to \macrolist
7247 \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
7248 \def\addtomacrolistxxx#1{%
7249 \toks0 = \expandafter{\macrolist\definedummyword#1}%
7250 \xdef\macrolist{\the\toks0}%
7251 }
7252
7253 % Utility routines.
7254 % This does \let #1 = #2, with \csnames; that is,
7255 % \let \csname#1\endcsname = \csname#2\endcsname
7256 % (except of course we have to play expansion games).
7257 %
7258 \def\cslet#1#2{%
7259 \expandafter\let
7260 \csname#1\expandafter\endcsname
7261 \csname#2\endcsname
7262 }
7263
7264 % Trim leading and trailing spaces off a string.
7265 % Concepts from aro-bend problem 15 (see CTAN).
7266 {\catcode`\@=11
7267 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
7268 \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
7269 \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
7270 \def\unbrace#1{#1}
7271 \unbrace{\gdef\trim@@@ #1 } #2@{#1}
7272 }
7273
7274 % Trim a single trailing ^^M off a string.
7275 {\catcode`\^^M=\other \catcode`\Q=3%
7276 \gdef\eatcr #1{\eatcra #1Q^^MQ}%
7277 \gdef\eatcra#1^^MQ{\eatcrb#1Q}%
7278 \gdef\eatcrb#1Q#2Q{#1}%
7279 }
7280
7281 % Macro bodies are absorbed as an argument in a context where
7282 % all characters are catcode 10, 11 or 12, except \ which is active
7283 % (as in normal texinfo). It is necessary to change the definition of \
7284 % to recognize macro arguments; this is the job of \mbodybackslash.
7285 %
7286 % Non-ASCII encodings make 8-bit characters active, so un-activate
7287 % them to avoid their expansion. Must do this non-globally, to
7288 % confine the change to the current group.
7289 %
7290 % It's necessary to have hard CRs when the macro is executed. This is
7291 % done by making ^^M (\endlinechar) catcode 12 when reading the macro
7292 % body, and then making it the \newlinechar in \scanmacro.
7293 %
7294 \def\scanctxt{% used as subroutine
7295 \catcode`\"=\other
7296 \catcode`\+=\other
7297 \catcode`\<=\other
7298 \catcode`\>=\other
7299 \catcode`\@=\other
7300 \catcode`\^=\other
7301 \catcode`\_=\other
7302 \catcode`\|=\other
7303 \catcode`\~=\other
7304 \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
7305 }
7306
7307 \def\scanargctxt{% used for copying and captions, not macros.
7308 \scanctxt
7309 \catcode`\\=\other
7310 \catcode`\^^M=\other
7311 }
7312
7313 \def\macrobodyctxt{% used for @macro definitions
7314 \scanctxt
7315 \catcode`\{=\other
7316 \catcode`\}=\other
7317 \catcode`\^^M=\other
7318 \usembodybackslash
7319 }
7320
7321 \def\macroargctxt{% used when scanning invocations
7322 \scanctxt
7323 \catcode`\\=0
7324 }
7325 % why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes"
7326 % for the single characters \ { }. Thus, we end up with the "commands"
7327 % that would be written @\ @{ @} in a Texinfo document.
7328 %
7329 % We already have @{ and @}. For @\, we define it here, and only for
7330 % this purpose, to produce a typewriter backslash (so, the @\ that we
7331 % define for @math can't be used with @macro calls):
7332 %
7333 \def\\{\normalbackslash}%
7334 %
7335 % We would like to do this for \, too, since that is what makeinfo does.
7336 % But it is not possible, because Texinfo already has a command @, for a
7337 % cedilla accent. Documents must use @comma{} instead.
7338 %
7339 % \anythingelse will almost certainly be an error of some kind.
7340
7341
7342 % \mbodybackslash is the definition of \ in @macro bodies.
7343 % It maps \foo\ => \csname macarg.foo\endcsname => #N
7344 % where N is the macro parameter number.
7345 % We define \csname macarg.\endcsname to be \realbackslash, so
7346 % \\ in macro replacement text gets you a backslash.
7347 %
7348 {\catcode`@=0 @catcode`@\=@active
7349 @gdef@usembodybackslash{@let\=@mbodybackslash}
7350 @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
7351 }
7352 \expandafter\def\csname macarg.\endcsname{\realbackslash}
7353
7354 \def\margbackslash#1{\char`\#1 }
7355
7356 \def\macro{\recursivefalse\parsearg\macroxxx}
7357 \def\rmacro{\recursivetrue\parsearg\macroxxx}
7358
7359 \def\macroxxx#1{%
7360 \getargs{#1}% now \macname is the macname and \argl the arglist
7361 \ifx\argl\empty % no arguments
7362 \paramno=0\relax
7363 \else
7364 \expandafter\parsemargdef \argl;%
7365 \if\paramno>256\relax
7366 \ifx\eTeXversion\thisisundefined
7367 \errhelp = \EMsimple
7368 \errmessage{You need eTeX to compile a file with macros with more than 256 arguments}
7369 \fi
7370 \fi
7371 \fi
7372 \if1\csname ismacro.\the\macname\endcsname
7373 \message{Warning: redefining \the\macname}%
7374 \else
7375 \expandafter\ifx\csname \the\macname\endcsname \relax
7376 \else \errmessage{Macro name \the\macname\space already defined}\fi
7377 \global\cslet{macsave.\the\macname}{\the\macname}%
7378 \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
7379 \addtomacrolist{\the\macname}%
7380 \fi
7381 \begingroup \macrobodyctxt
7382 \ifrecursive \expandafter\parsermacbody
7383 \else \expandafter\parsemacbody
7384 \fi}
7385
7386 \parseargdef\unmacro{%
7387 \if1\csname ismacro.#1\endcsname
7388 \global\cslet{#1}{macsave.#1}%
7389 \global\expandafter\let \csname ismacro.#1\endcsname=0%
7390 % Remove the macro name from \macrolist:
7391 \begingroup
7392 \expandafter\let\csname#1\endcsname \relax
7393 \let\definedummyword\unmacrodo
7394 \xdef\macrolist{\macrolist}%
7395 \endgroup
7396 \else
7397 \errmessage{Macro #1 not defined}%
7398 \fi
7399 }
7400
7401 % Called by \do from \dounmacro on each macro. The idea is to omit any
7402 % macro definitions that have been changed to \relax.
7403 %
7404 \def\unmacrodo#1{%
7405 \ifx #1\relax
7406 % remove this
7407 \else
7408 \noexpand\definedummyword \noexpand#1%
7409 \fi
7410 }
7411
7412 % This makes use of the obscure feature that if the last token of a
7413 % <parameter list> is #, then the preceding argument is delimited by
7414 % an opening brace, and that opening brace is not consumed.
7415 \def\getargs#1{\getargsxxx#1{}}
7416 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
7417 \def\getmacname#1 #2\relax{\macname={#1}}
7418 \def\getmacargs#1{\def\argl{#1}}
7419
7420 % For macro processing make @ a letter so that we can make Texinfo private macro names.
7421 \edef\texiatcatcode{\the\catcode`\@}
7422 \catcode `@=11\relax
7423
7424 % Parse the optional {params} list. Set up \paramno and \paramlist
7425 % so \defmacro knows what to do. Define \macarg.BLAH for each BLAH
7426 % in the params list to some hook where the argument si to be expanded. If
7427 % there are less than 10 arguments that hook is to be replaced by ##N where N
7428 % is the position in that list, that is to say the macro arguments are to be
7429 % defined `a la TeX in the macro body.
7430 %
7431 % That gets used by \mbodybackslash (above).
7432 %
7433 % We need to get `macro parameter char #' into several definitions.
7434 % The technique used is stolen from LaTeX: let \hash be something
7435 % unexpandable, insert that wherever you need a #, and then redefine
7436 % it to # just before using the token list produced.
7437 %
7438 % The same technique is used to protect \eatspaces till just before
7439 % the macro is used.
7440 %
7441 % If there are 10 or more arguments, a different technique is used, where the
7442 % hook remains in the body, and when macro is to be expanded the body is
7443 % processed again to replace the arguments.
7444 %
7445 % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
7446 % argument N value and then \edef the body (nothing else will expand because of
7447 % the catcode regime underwhich the body was input).
7448 %
7449 % If you compile with TeX (not eTeX), and you have macros with 10 or more
7450 % arguments, you need that no macro has more than 256 arguments, otherwise an
7451 % error is produced.
7452 \def\parsemargdef#1;{%
7453 \paramno=0\def\paramlist{}%
7454 \let\hash\relax
7455 \let\xeatspaces\relax
7456 \parsemargdefxxx#1,;,%
7457 % In case that there are 10 or more arguments we parse again the arguments
7458 % list to set new definitions for the \macarg.BLAH macros corresponding to
7459 % each BLAH argument. It was anyhow needed to parse already once this list
7460 % in order to count the arguments, and as macros with at most 9 arguments
7461 % are by far more frequent than macro with 10 or more arguments, defining
7462 % twice the \macarg.BLAH macros does not cost too much processing power.
7463 \ifnum\paramno<10\relax\else
7464 \paramno0\relax
7465 \parsemmanyargdef@@#1,;,% 10 or more arguments
7466 \fi
7467 }
7468 \def\parsemargdefxxx#1,{%
7469 \if#1;\let\next=\relax
7470 \else \let\next=\parsemargdefxxx
7471 \advance\paramno by 1
7472 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
7473 {\xeatspaces{\hash\the\paramno}}%
7474 \edef\paramlist{\paramlist\hash\the\paramno,}%
7475 \fi\next}
7476
7477 \def\parsemmanyargdef@@#1,{%
7478 \if#1;\let\next=\relax
7479 \else
7480 \let\next=\parsemmanyargdef@@
7481 \edef\tempb{\eatspaces{#1}}%
7482 \expandafter\def\expandafter\tempa
7483 \expandafter{\csname macarg.\tempb\endcsname}%
7484 % Note that we need some extra \noexpand\noexpand, this is because we
7485 % don't want \the to be expanded in the \parsermacbody as it uses an
7486 % \xdef .
7487 \expandafter\edef\tempa
7488 {\noexpand\noexpand\noexpand\the\toks\the\paramno}%
7489 \advance\paramno by 1\relax
7490 \fi\next}
7491
7492 % These two commands read recursive and nonrecursive macro bodies.
7493 % (They're different since rec and nonrec macros end differently.)
7494 %
7495
7496 \catcode `\@\texiatcatcode
7497 \long\def\parsemacbody#1@end macro%
7498 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
7499 \long\def\parsermacbody#1@end rmacro%
7500 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
7501 \catcode `\@=11\relax
7502
7503 \let\endargs@\relax
7504 \let\nil@\relax
7505 \def\nilm@{\nil@}%
7506 \long\def\nillm@{\nil@}%
7507
7508 % This macro is expanded during the Texinfo macro expansion, not during its
7509 % definition. It gets all the arguments values and assigns them to macros
7510 % macarg.ARGNAME
7511 %
7512 % #1 is the macro name
7513 % #2 is the list of argument names
7514 % #3 is the list of argument values
7515 \def\getargvals@#1#2#3{%
7516 \def\macargdeflist@{}%
7517 \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion.
7518 \def\paramlist{#2,\nil@}%
7519 \def\macroname{#1}%
7520 \begingroup
7521 \macroargctxt
7522 \def\argvaluelist{#3,\nil@}%
7523 \def\@tempa{#3}%
7524 \ifx\@tempa\empty
7525 \setemptyargvalues@
7526 \else
7527 \getargvals@@
7528 \fi
7529 }
7530
7531 %
7532 \def\getargvals@@{%
7533 \ifx\paramlist\nilm@
7534 % Some sanity check needed here that \argvaluelist is also empty.
7535 \ifx\argvaluelist\nillm@
7536 \else
7537 \errhelp = \EMsimple
7538 \errmessage{Too many arguments in macro `\macroname'!}%
7539 \fi
7540 \let\next\macargexpandinbody@
7541 \else
7542 \ifx\argvaluelist\nillm@
7543 % No more arguments values passed to macro. Set remaining named-arg
7544 % macros to empty.
7545 \let\next\setemptyargvalues@
7546 \else
7547 % pop current arg name into \@tempb
7548 \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}%
7549 \expandafter\@tempa\expandafter{\paramlist}%
7550 % pop current argument value into \@tempc
7551 \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}%
7552 \expandafter\@tempa\expandafter{\argvaluelist}%
7553 % Here \@tempb is the current arg name and \@tempc is the current arg value.
7554 % First place the new argument macro definition into \@tempd
7555 \expandafter\macname\expandafter{\@tempc}%
7556 \expandafter\let\csname macarg.\@tempb\endcsname\relax
7557 \expandafter\def\expandafter\@tempe\expandafter{%
7558 \csname macarg.\@tempb\endcsname}%
7559 \edef\@tempd{\long\def\@tempe{\the\macname}}%
7560 \push@\@tempd\macargdeflist@
7561 \let\next\getargvals@@
7562 \fi
7563 \fi
7564 \next
7565 }
7566
7567 \def\push@#1#2{%
7568 \expandafter\expandafter\expandafter\def
7569 \expandafter\expandafter\expandafter#2%
7570 \expandafter\expandafter\expandafter{%
7571 \expandafter#1#2}%
7572 }
7573
7574 % Replace arguments by their values in the macro body, and place the result
7575 % in macro \@tempa
7576 \def\macvalstoargs@{%
7577 % To do this we use the property that token registers that are \the'ed
7578 % within an \edef expand only once. So we are going to place all argument
7579 % values into respective token registers.
7580 %
7581 % First we save the token context, and initialize argument numbering.
7582 \begingroup
7583 \paramno0\relax
7584 % Then, for each argument number #N, we place the corresponding argument
7585 % value into a new token list register \toks#N
7586 \expandafter\putargsintokens@\saveparamlist@,;,%
7587 % Then, we expand the body so that argument are replaced by their
7588 % values. The trick for values not to be expanded themselves is that they
7589 % are within tokens and that tokens expand only once in an \edef .
7590 \edef\@tempc{\csname mac.\macroname .body\endcsname}%
7591 % Now we restore the token stack pointer to free the token list registers
7592 % which we have used, but we make sure that expanded body is saved after
7593 % group.
7594 \expandafter
7595 \endgroup
7596 \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
7597 }
7598
7599 \def\macargexpandinbody@{%
7600 %% Define the named-macro outside of this group and then close this group.
7601 \expandafter
7602 \endgroup
7603 \macargdeflist@
7604 % First the replace in body the macro arguments by their values, the result
7605 % is in \@tempa .
7606 \macvalstoargs@
7607 % Then we point at the \norecurse or \gobble (for recursive) macro value
7608 % with \@tempb .
7609 \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname
7610 % Depending on whether it is recursive or not, we need some tailing
7611 % \egroup .
7612 \ifx\@tempb\gobble
7613 \let\@tempc\relax
7614 \else
7615 \let\@tempc\egroup
7616 \fi
7617 % And now we do the real job:
7618 \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}%
7619 \@tempd
7620 }
7621
7622 \def\putargsintokens@#1,{%
7623 \if#1;\let\next\relax
7624 \else
7625 \let\next\putargsintokens@
7626 % First we allocate the new token list register, and give it a temporary
7627 % alias \@tempb .
7628 \toksdef\@tempb\the\paramno
7629 % Then we place the argument value into that token list register.
7630 \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname
7631 \expandafter\@tempb\expandafter{\@tempa}%
7632 \advance\paramno by 1\relax
7633 \fi
7634 \next
7635 }
7636
7637 % Save the token stack pointer into macro #1
7638 \def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}}
7639 % Restore the token stack pointer from number in macro #1
7640 \def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax}
7641 % newtoks that can be used non \outer .
7642 \def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi}
7643
7644 % Tailing missing arguments are set to empty
7645 \def\setemptyargvalues@{%
7646 \ifx\paramlist\nilm@
7647 \let\next\macargexpandinbody@
7648 \else
7649 \expandafter\setemptyargvaluesparser@\paramlist\endargs@
7650 \let\next\setemptyargvalues@
7651 \fi
7652 \next
7653 }
7654
7655 \def\setemptyargvaluesparser@#1,#2\endargs@{%
7656 \expandafter\def\expandafter\@tempa\expandafter{%
7657 \expandafter\def\csname macarg.#1\endcsname{}}%
7658 \push@\@tempa\macargdeflist@
7659 \def\paramlist{#2}%
7660 }
7661
7662 % #1 is the element target macro
7663 % #2 is the list macro
7664 % #3,#4\endargs@ is the list value
7665 \def\pop@#1#2#3,#4\endargs@{%
7666 \def#1{#3}%
7667 \def#2{#4}%
7668 }
7669 \long\def\longpop@#1#2#3,#4\endargs@{%
7670 \long\def#1{#3}%
7671 \long\def#2{#4}%
7672 }
7673
7674 % This defines a Texinfo @macro. There are eight cases: recursive and
7675 % nonrecursive macros of zero, one, up to nine, and many arguments.
7676 % Much magic with \expandafter here.
7677 % \xdef is used so that macro definitions will survive the file
7678 % they're defined in; @include reads the file inside a group.
7679 %
7680 \def\defmacro{%
7681 \let\hash=##% convert placeholders to macro parameter chars
7682 \ifrecursive
7683 \ifcase\paramno
7684 % 0
7685 \expandafter\xdef\csname\the\macname\endcsname{%
7686 \noexpand\scanmacro{\temp}}%
7687 \or % 1
7688 \expandafter\xdef\csname\the\macname\endcsname{%
7689 \bgroup\noexpand\macroargctxt
7690 \noexpand\braceorline
7691 \expandafter\noexpand\csname\the\macname xxx\endcsname}%
7692 \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
7693 \egroup\noexpand\scanmacro{\temp}}%
7694 \else
7695 \ifnum\paramno<10\relax % at most 9
7696 \expandafter\xdef\csname\the\macname\endcsname{%
7697 \bgroup\noexpand\macroargctxt
7698 \noexpand\csname\the\macname xx\endcsname}%
7699 \expandafter\xdef\csname\the\macname xx\endcsname##1{%
7700 \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
7701 \expandafter\expandafter
7702 \expandafter\xdef
7703 \expandafter\expandafter
7704 \csname\the\macname xxx\endcsname
7705 \paramlist{\egroup\noexpand\scanmacro{\temp}}%
7706 \else % 10 or more
7707 \expandafter\xdef\csname\the\macname\endcsname{%
7708 \noexpand\getargvals@{\the\macname}{\argl}%
7709 }%
7710 \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
7711 \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
7712 \fi
7713 \fi
7714 \else
7715 \ifcase\paramno
7716 % 0
7717 \expandafter\xdef\csname\the\macname\endcsname{%
7718 \noexpand\norecurse{\the\macname}%
7719 \noexpand\scanmacro{\temp}\egroup}%
7720 \or % 1
7721 \expandafter\xdef\csname\the\macname\endcsname{%
7722 \bgroup\noexpand\macroargctxt
7723 \noexpand\braceorline
7724 \expandafter\noexpand\csname\the\macname xxx\endcsname}%
7725 \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
7726 \egroup
7727 \noexpand\norecurse{\the\macname}%
7728 \noexpand\scanmacro{\temp}\egroup}%
7729 \else % at most 9
7730 \ifnum\paramno<10\relax
7731 \expandafter\xdef\csname\the\macname\endcsname{%
7732 \bgroup\noexpand\macroargctxt
7733 \expandafter\noexpand\csname\the\macname xx\endcsname}%
7734 \expandafter\xdef\csname\the\macname xx\endcsname##1{%
7735 \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
7736 \expandafter\expandafter
7737 \expandafter\xdef
7738 \expandafter\expandafter
7739 \csname\the\macname xxx\endcsname
7740 \paramlist{%
7741 \egroup
7742 \noexpand\norecurse{\the\macname}%
7743 \noexpand\scanmacro{\temp}\egroup}%
7744 \else % 10 or more:
7745 \expandafter\xdef\csname\the\macname\endcsname{%
7746 \noexpand\getargvals@{\the\macname}{\argl}%
7747 }%
7748 \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
7749 \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse
7750 \fi
7751 \fi
7752 \fi}
7753
7754 \catcode `\@\texiatcatcode\relax
7755
7756 \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
7757
7758 % \braceorline decides whether the next nonwhitespace character is a
7759 % {. If so it reads up to the closing }, if not, it reads the whole
7760 % line. Whatever was read is then fed to the next control sequence
7761 % as an argument (by \parsebrace or \parsearg).
7762 %
7763 \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
7764 \def\braceorlinexxx{%
7765 \ifx\nchar\bgroup\else
7766 \expandafter\parsearg
7767 \fi \macnamexxx}
7768
7769
7770 % @alias.
7771 % We need some trickery to remove the optional spaces around the equal
7772 % sign. Make them active and then expand them all to nothing.
7773 %
7774 \def\alias{\parseargusing\obeyspaces\aliasxxx}
7775 \def\aliasxxx #1{\aliasyyy#1\relax}
7776 \def\aliasyyy #1=#2\relax{%
7777 {%
7778 \expandafter\let\obeyedspace=\empty
7779 \addtomacrolist{#1}%
7780 \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
7781 }%
7782 \next
7783 }
7784
7785
7786 \message{cross references,}
7787
7788 \newwrite\auxfile
7789 \newif\ifhavexrefs % True if xref values are known.
7790 \newif\ifwarnedxrefs % True if we warned once that they aren't known.
7791
7792 % @inforef is relatively simple.
7793 \def\inforef #1{\inforefzzz #1,,,,**}
7794 \def\inforefzzz #1,#2,#3,#4**{%
7795 \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
7796 node \samp{\ignorespaces#1{}}}
7797
7798 % @node's only job in TeX is to define \lastnode, which is used in
7799 % cross-references. The @node line might or might not have commas, and
7800 % might or might not have spaces before the first comma, like:
7801 % @node foo , bar , ...
7802 % We don't want such trailing spaces in the node name.
7803 %
7804 \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse}
7805 %
7806 % also remove a trailing comma, in case of something like this:
7807 % @node Help-Cross, , , Cross-refs
7808 \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
7809 \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}}
7810
7811 \let\nwnode=\node
7812 \let\lastnode=\empty
7813
7814 % Write a cross-reference definition for the current node. #1 is the
7815 % type (Ynumbered, Yappendix, Ynothing).
7816 %
7817 \def\donoderef#1{%
7818 \ifx\lastnode\empty\else
7819 \setref{\lastnode}{#1}%
7820 \global\let\lastnode=\empty
7821 \fi
7822 }
7823
7824 % @anchor{NAME} -- define xref target at arbitrary point.
7825 %
7826 \newcount\savesfregister
7827 %
7828 \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
7829 \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
7830 \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
7831
7832 % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
7833 % anchor), which consists of three parts:
7834 % 1) NAME-title - the current sectioning name taken from \lastsection,
7835 % or the anchor name.
7836 % 2) NAME-snt - section number and type, passed as the SNT arg, or
7837 % empty for anchors.
7838 % 3) NAME-pg - the page number.
7839 %
7840 % This is called from \donoderef, \anchor, and \dofloat. In the case of
7841 % floats, there is an additional part, which is not written here:
7842 % 4) NAME-lof - the text as it should appear in a @listoffloats.
7843 %
7844 \def\setref#1#2{%
7845 \pdfmkdest{#1}%
7846 \iflinks
7847 {%
7848 \atdummies % preserve commands, but don't expand them
7849 \edef\writexrdef##1##2{%
7850 \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
7851 ##1}{##2}}% these are parameters of \writexrdef
7852 }%
7853 \toks0 = \expandafter{\lastsection}%
7854 \immediate \writexrdef{title}{\the\toks0 }%
7855 \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
7856 \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
7857 }%
7858 \fi
7859 }
7860
7861 % @xrefautosectiontitle on|off says whether @section(ing) names are used
7862 % automatically in xrefs, if the third arg is not explicitly specified.
7863 % This was provided as a "secret" @set xref-automatic-section-title
7864 % variable, now it's official.
7865 %
7866 \parseargdef\xrefautomaticsectiontitle{%
7867 \def\temp{#1}%
7868 \ifx\temp\onword
7869 \expandafter\let\csname SETxref-automatic-section-title\endcsname
7870 = \empty
7871 \else\ifx\temp\offword
7872 \expandafter\let\csname SETxref-automatic-section-title\endcsname
7873 = \relax
7874 \else
7875 \errhelp = \EMsimple
7876 \errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
7877 must be on|off}%
7878 \fi\fi
7879 }
7880
7881 %
7882 % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
7883 % the node name, #2 the name of the Info cross-reference, #3 the printed
7884 % node name, #4 the name of the Info file, #5 the name of the printed
7885 % manual. All but the node name can be omitted.
7886 %
7887 \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
7888 \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
7889 \def\ref#1{\xrefX[#1,,,,,,,]}
7890 %
7891 \newbox\toprefbox
7892 \newbox\printedrefnamebox
7893 \newbox\infofilenamebox
7894 \newbox\printedmanualbox
7895 %
7896 \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
7897 \unsepspaces
7898 %
7899 % Get args without leading/trailing spaces.
7900 \def\printedrefname{\ignorespaces #3}%
7901 \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
7902 %
7903 \def\infofilename{\ignorespaces #4}%
7904 \setbox\infofilenamebox = \hbox{\infofilename\unskip}%
7905 %
7906 \def\printedmanual{\ignorespaces #5}%
7907 \setbox\printedmanualbox = \hbox{\printedmanual\unskip}%
7908 %
7909 % If the printed reference name (arg #3) was not explicitly given in
7910 % the @xref, figure out what we want to use.
7911 \ifdim \wd\printedrefnamebox = 0pt
7912 % No printed node name was explicitly given.
7913 \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
7914 % Not auto section-title: use node name inside the square brackets.
7915 \def\printedrefname{\ignorespaces #1}%
7916 \else
7917 % Auto section-title: use chapter/section title inside
7918 % the square brackets if we have it.
7919 \ifdim \wd\printedmanualbox > 0pt
7920 % It is in another manual, so we don't have it; use node name.
7921 \def\printedrefname{\ignorespaces #1}%
7922 \else
7923 \ifhavexrefs
7924 % We (should) know the real title if we have the xref values.
7925 \def\printedrefname{\refx{#1-title}{}}%
7926 \else
7927 % Otherwise just copy the Info node name.
7928 \def\printedrefname{\ignorespaces #1}%
7929 \fi%
7930 \fi
7931 \fi
7932 \fi
7933 %
7934 % Make link in pdf output.
7935 \ifpdf
7936 {\indexnofonts
7937 \turnoffactive
7938 \makevalueexpandable
7939 % This expands tokens, so do it after making catcode changes, so _
7940 % etc. don't get their TeX definitions. This ignores all spaces in
7941 % #4, including (wrongly) those in the middle of the filename.
7942 \getfilename{#4}%
7943 %
7944 % This (wrongly) does not take account of leading or trailing
7945 % spaces in #1, which should be ignored.
7946 \edef\pdfxrefdest{#1}%
7947 \ifx\pdfxrefdest\empty
7948 \def\pdfxrefdest{Top}% no empty targets
7949 \else
7950 \txiescapepdf\pdfxrefdest % escape PDF special chars
7951 \fi
7952 %
7953 \leavevmode
7954 \startlink attr{/Border [0 0 0]}%
7955 \ifnum\filenamelength>0
7956 goto file{\the\filename.pdf} name{\pdfxrefdest}%
7957 \else
7958 goto name{\pdfmkpgn{\pdfxrefdest}}%
7959 \fi
7960 }%
7961 \setcolor{\linkcolor}%
7962 \fi
7963 %
7964 % Float references are printed completely differently: "Figure 1.2"
7965 % instead of "[somenode], p.3". We distinguish them by the
7966 % LABEL-title being set to a magic string.
7967 {%
7968 % Have to otherify everything special to allow the \csname to
7969 % include an _ in the xref name, etc.
7970 \indexnofonts
7971 \turnoffactive
7972 \expandafter\global\expandafter\let\expandafter\Xthisreftitle
7973 \csname XR#1-title\endcsname
7974 }%
7975 \iffloat\Xthisreftitle
7976 % If the user specified the print name (third arg) to the ref,
7977 % print it instead of our usual "Figure 1.2".
7978 \ifdim\wd\printedrefnamebox = 0pt
7979 \refx{#1-snt}{}%
7980 \else
7981 \printedrefname
7982 \fi
7983 %
7984 % If the user also gave the printed manual name (fifth arg), append
7985 % "in MANUALNAME".
7986 \ifdim \wd\printedmanualbox > 0pt
7987 \space \putwordin{} \cite{\printedmanual}%
7988 \fi
7989 \else
7990 % node/anchor (non-float) references.
7991 %
7992 % If we use \unhbox to print the node names, TeX does not insert
7993 % empty discretionaries after hyphens, which means that it will not
7994 % find a line break at a hyphen in a node names. Since some manuals
7995 % are best written with fairly long node names, containing hyphens,
7996 % this is a loss. Therefore, we give the text of the node name
7997 % again, so it is as if TeX is seeing it for the first time.
7998 %
7999 \ifdim \wd\printedmanualbox > 0pt
8000 % Cross-manual reference with a printed manual name.
8001 %
8002 \crossmanualxref{\cite{\printedmanual\unskip}}%
8003 %
8004 \else\ifdim \wd\infofilenamebox > 0pt
8005 % Cross-manual reference with only an info filename (arg 4), no
8006 % printed manual name (arg 5). This is essentially the same as
8007 % the case above; we output the filename, since we have nothing else.
8008 %
8009 \crossmanualxref{\code{\infofilename\unskip}}%
8010 %
8011 \else
8012 % Reference within this manual.
8013 %
8014 % _ (for example) has to be the character _ for the purposes of the
8015 % control sequence corresponding to the node, but it has to expand
8016 % into the usual \leavevmode...\vrule stuff for purposes of
8017 % printing. So we \turnoffactive for the \refx-snt, back on for the
8018 % printing, back off for the \refx-pg.
8019 {\turnoffactive
8020 % Only output a following space if the -snt ref is nonempty; for
8021 % @unnumbered and @anchor, it won't be.
8022 \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
8023 \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
8024 }%
8025 % output the `[mynode]' via the macro below so it can be overridden.
8026 \xrefprintnodename\printedrefname
8027 %
8028 % But we always want a comma and a space:
8029 ,\space
8030 %
8031 % output the `page 3'.
8032 \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
8033 \fi\fi
8034 \fi
8035 \endlink
8036 \endgroup}
8037
8038 % Output a cross-manual xref to #1. Used just above (twice).
8039 %
8040 % Only include the text "Section ``foo'' in" if the foo is neither
8041 % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply
8042 % "see The Foo Manual", the idea being to refer to the whole manual.
8043 %
8044 % But, this being TeX, we can't easily compare our node name against the
8045 % string "Top" while ignoring the possible spaces before and after in
8046 % the input. By adding the arbitrary 7sp below, we make it much less
8047 % likely that a real node name would have the same width as "Top" (e.g.,
8048 % in a monospaced font). Hopefully it will never happen in practice.
8049 %
8050 % For the same basic reason, we retypeset the "Top" at every
8051 % reference, since the current font is indeterminate.
8052 %
8053 \def\crossmanualxref#1{%
8054 \setbox\toprefbox = \hbox{Top\kern7sp}%
8055 \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
8056 \ifdim \wd2 > 7sp % nonempty?
8057 \ifdim \wd2 = \wd\toprefbox \else % same as Top?
8058 \putwordSection{} ``\printedrefname'' \putwordin{}\space
8059 \fi
8060 \fi
8061 #1%
8062 }
8063
8064 % This macro is called from \xrefX for the `[nodename]' part of xref
8065 % output. It's a separate macro only so it can be changed more easily,
8066 % since square brackets don't work well in some documents. Particularly
8067 % one that Bob is working on :).
8068 %
8069 \def\xrefprintnodename#1{[#1]}
8070
8071 % Things referred to by \setref.
8072 %
8073 \def\Ynothing{}
8074 \def\Yomitfromtoc{}
8075 \def\Ynumbered{%
8076 \ifnum\secno=0
8077 \putwordChapter@tie \the\chapno
8078 \else \ifnum\subsecno=0
8079 \putwordSection@tie \the\chapno.\the\secno
8080 \else \ifnum\subsubsecno=0
8081 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno
8082 \else
8083 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno
8084 \fi\fi\fi
8085 }
8086 \def\Yappendix{%
8087 \ifnum\secno=0
8088 \putwordAppendix@tie @char\the\appendixno{}%
8089 \else \ifnum\subsecno=0
8090 \putwordSection@tie @char\the\appendixno.\the\secno
8091 \else \ifnum\subsubsecno=0
8092 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno
8093 \else
8094 \putwordSection@tie
8095 @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
8096 \fi\fi\fi
8097 }
8098
8099 % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
8100 % If its value is nonempty, SUFFIX is output afterward.
8101 %
8102 \def\refx#1#2{%
8103 {%
8104 \indexnofonts
8105 \otherbackslash
8106 \expandafter\global\expandafter\let\expandafter\thisrefX
8107 \csname XR#1\endcsname
8108 }%
8109 \ifx\thisrefX\relax
8110 % If not defined, say something at least.
8111 \angleleft un\-de\-fined\angleright
8112 \iflinks
8113 \ifhavexrefs
8114 {\toks0 = {#1}% avoid expansion of possibly-complex value
8115 \message{\linenumber Undefined cross reference `\the\toks0'.}}%
8116 \else
8117 \ifwarnedxrefs\else
8118 \global\warnedxrefstrue
8119 \message{Cross reference values unknown; you must run TeX again.}%
8120 \fi
8121 \fi
8122 \fi
8123 \else
8124 % It's defined, so just use it.
8125 \thisrefX
8126 \fi
8127 #2% Output the suffix in any case.
8128 }
8129
8130 % This is the macro invoked by entries in the aux file. Usually it's
8131 % just a \def (we prepend XR to the control sequence name to avoid
8132 % collisions). But if this is a float type, we have more work to do.
8133 %
8134 \def\xrdef#1#2{%
8135 {% The node name might contain 8-bit characters, which in our current
8136 % implementation are changed to commands like @'e. Don't let these
8137 % mess up the control sequence name.
8138 \indexnofonts
8139 \turnoffactive
8140 \xdef\safexrefname{#1}%
8141 }%
8142 %
8143 \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
8144 %
8145 % Was that xref control sequence that we just defined for a float?
8146 \expandafter\iffloat\csname XR\safexrefname\endcsname
8147 % it was a float, and we have the (safe) float type in \iffloattype.
8148 \expandafter\let\expandafter\floatlist
8149 \csname floatlist\iffloattype\endcsname
8150 %
8151 % Is this the first time we've seen this float type?
8152 \expandafter\ifx\floatlist\relax
8153 \toks0 = {\do}% yes, so just \do
8154 \else
8155 % had it before, so preserve previous elements in list.
8156 \toks0 = \expandafter{\floatlist\do}%
8157 \fi
8158 %
8159 % Remember this xref in the control sequence \floatlistFLOATTYPE,
8160 % for later use in \listoffloats.
8161 \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
8162 {\safexrefname}}%
8163 \fi
8164 }
8165
8166 % Read the last existing aux file, if any. No error if none exists.
8167 %
8168 \def\tryauxfile{%
8169 \openin 1 \jobname.aux
8170 \ifeof 1 \else
8171 \readdatafile{aux}%
8172 \global\havexrefstrue
8173 \fi
8174 \closein 1
8175 }
8176
8177 \def\setupdatafile{%
8178 \catcode`\^^@=\other
8179 \catcode`\^^A=\other
8180 \catcode`\^^B=\other
8181 \catcode`\^^C=\other
8182 \catcode`\^^D=\other
8183 \catcode`\^^E=\other
8184 \catcode`\^^F=\other
8185 \catcode`\^^G=\other
8186 \catcode`\^^H=\other
8187 \catcode`\^^K=\other
8188 \catcode`\^^L=\other
8189 \catcode`\^^N=\other
8190 \catcode`\^^P=\other
8191 \catcode`\^^Q=\other
8192 \catcode`\^^R=\other
8193 \catcode`\^^S=\other
8194 \catcode`\^^T=\other
8195 \catcode`\^^U=\other
8196 \catcode`\^^V=\other
8197 \catcode`\^^W=\other
8198 \catcode`\^^X=\other
8199 \catcode`\^^Z=\other
8200 \catcode`\^^[=\other
8201 \catcode`\^^\=\other
8202 \catcode`\^^]=\other
8203 \catcode`\^^^=\other
8204 \catcode`\^^_=\other
8205 % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
8206 % in xref tags, i.e., node names. But since ^^e4 notation isn't
8207 % supported in the main text, it doesn't seem desirable. Furthermore,
8208 % that is not enough: for node names that actually contain a ^
8209 % character, we would end up writing a line like this: 'xrdef {'hat
8210 % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
8211 % argument, and \hat is not an expandable control sequence. It could
8212 % all be worked out, but why? Either we support ^^ or we don't.
8213 %
8214 % The other change necessary for this was to define \auxhat:
8215 % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
8216 % and then to call \auxhat in \setq.
8217 %
8218 \catcode`\^=\other
8219 %
8220 % Special characters. Should be turned off anyway, but...
8221 \catcode`\~=\other
8222 \catcode`\[=\other
8223 \catcode`\]=\other
8224 \catcode`\"=\other
8225 \catcode`\_=\other
8226 \catcode`\|=\other
8227 \catcode`\<=\other
8228 \catcode`\>=\other
8229 \catcode`\$=\other
8230 \catcode`\#=\other
8231 \catcode`\&=\other
8232 \catcode`\%=\other
8233 \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
8234 %
8235 % This is to support \ in node names and titles, since the \
8236 % characters end up in a \csname. It's easier than
8237 % leaving it active and making its active definition an actual \
8238 % character. What I don't understand is why it works in the *value*
8239 % of the xrdef. Seems like it should be a catcode12 \, and that
8240 % should not typeset properly. But it works, so I'm moving on for
8241 % now. --karl, 15jan04.
8242 \catcode`\\=\other
8243 %
8244 % Make the characters 128-255 be printing characters.
8245 {%
8246 \count1=128
8247 \def\loop{%
8248 \catcode\count1=\other
8249 \advance\count1 by 1
8250 \ifnum \count1<256 \loop \fi
8251 }%
8252 }%
8253 %
8254 % @ is our escape character in .aux files, and we need braces.
8255 \catcode`\{=1
8256 \catcode`\}=2
8257 \catcode`\@=0
8258 }
8259
8260 \def\readdatafile#1{%
8261 \begingroup
8262 \setupdatafile
8263 \input\jobname.#1
8264 \endgroup}
8265
8266
8267 \message{insertions,}
8268 % including footnotes.
8269
8270 \newcount \footnoteno
8271
8272 % The trailing space in the following definition for supereject is
8273 % vital for proper filling; pages come out unaligned when you do a
8274 % pagealignmacro call if that space before the closing brace is
8275 % removed. (Generally, numeric constants should always be followed by a
8276 % space to prevent strange expansion errors.)
8277 \def\supereject{\par\penalty -20000\footnoteno =0 }
8278
8279 % @footnotestyle is meaningful for Info output only.
8280 \let\footnotestyle=\comment
8281
8282 {\catcode `\@=11
8283 %
8284 % Auto-number footnotes. Otherwise like plain.
8285 \gdef\footnote{%
8286 \let\indent=\ptexindent
8287 \let\noindent=\ptexnoindent
8288 \global\advance\footnoteno by \@ne
8289 \edef\thisfootno{$^{\the\footnoteno}$}%
8290 %
8291 % In case the footnote comes at the end of a sentence, preserve the
8292 % extra spacing after we do the footnote number.
8293 \let\@sf\empty
8294 \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
8295 %
8296 % Remove inadvertent blank space before typesetting the footnote number.
8297 \unskip
8298 \thisfootno\@sf
8299 \dofootnote
8300 }%
8301
8302 % Don't bother with the trickery in plain.tex to not require the
8303 % footnote text as a parameter. Our footnotes don't need to be so general.
8304 %
8305 % Oh yes, they do; otherwise, @ifset (and anything else that uses
8306 % \parseargline) fails inside footnotes because the tokens are fixed when
8307 % the footnote is read. --karl, 16nov96.
8308 %
8309 \gdef\dofootnote{%
8310 \insert\footins\bgroup
8311 % We want to typeset this text as a normal paragraph, even if the
8312 % footnote reference occurs in (for example) a display environment.
8313 % So reset some parameters.
8314 \hsize=\pagewidth
8315 \interlinepenalty\interfootnotelinepenalty
8316 \splittopskip\ht\strutbox % top baseline for broken footnotes
8317 \splitmaxdepth\dp\strutbox
8318 \floatingpenalty\@MM
8319 \leftskip\z@skip
8320 \rightskip\z@skip
8321 \spaceskip\z@skip
8322 \xspaceskip\z@skip
8323 \parindent\defaultparindent
8324 %
8325 \smallfonts \rm
8326 %
8327 % Because we use hanging indentation in footnotes, a @noindent appears
8328 % to exdent this text, so make it be a no-op. makeinfo does not use
8329 % hanging indentation so @noindent can still be needed within footnote
8330 % text after an @example or the like (not that this is good style).
8331 \let\noindent = \relax
8332 %
8333 % Hang the footnote text off the number. Use \everypar in case the
8334 % footnote extends for more than one paragraph.
8335 \everypar = {\hang}%
8336 \textindent{\thisfootno}%
8337 %
8338 % Don't crash into the line above the footnote text. Since this
8339 % expands into a box, it must come within the paragraph, lest it
8340 % provide a place where TeX can split the footnote.
8341 \footstrut
8342 %
8343 % Invoke rest of plain TeX footnote routine.
8344 \futurelet\next\fo@t
8345 }
8346 }%end \catcode `\@=11
8347
8348 % In case a @footnote appears in a vbox, save the footnote text and create
8349 % the real \insert just after the vbox finished. Otherwise, the insertion
8350 % would be lost.
8351 % Similarly, if a @footnote appears inside an alignment, save the footnote
8352 % text to a box and make the \insert when a row of the table is finished.
8353 % And the same can be done for other insert classes. --kasal, 16nov03.
8354
8355 % Replace the \insert primitive by a cheating macro.
8356 % Deeper inside, just make sure that the saved insertions are not spilled
8357 % out prematurely.
8358 %
8359 \def\startsavinginserts{%
8360 \ifx \insert\ptexinsert
8361 \let\insert\saveinsert
8362 \else
8363 \let\checkinserts\relax
8364 \fi
8365 }
8366
8367 % This \insert replacement works for both \insert\footins{foo} and
8368 % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
8369 %
8370 \def\saveinsert#1{%
8371 \edef\next{\noexpand\savetobox \makeSAVEname#1}%
8372 \afterassignment\next
8373 % swallow the left brace
8374 \let\temp =
8375 }
8376 \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}}
8377 \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1}
8378
8379 \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
8380
8381 \def\placesaveins#1{%
8382 \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
8383 {\box#1}%
8384 }
8385
8386 % eat @SAVE -- beware, all of them have catcode \other:
8387 {
8388 \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-)
8389 \gdef\gobblesave @SAVE{}
8390 }
8391
8392 % initialization:
8393 \def\newsaveins #1{%
8394 \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
8395 \next
8396 }
8397 \def\newsaveinsX #1{%
8398 \csname newbox\endcsname #1%
8399 \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
8400 \checksaveins #1}%
8401 }
8402
8403 % initialize:
8404 \let\checkinserts\empty
8405 \newsaveins\footins
8406 \newsaveins\margin
8407
8408
8409 % @image. We use the macros from epsf.tex to support this.
8410 % If epsf.tex is not installed and @image is used, we complain.
8411 %
8412 % Check for and read epsf.tex up front. If we read it only at @image
8413 % time, we might be inside a group, and then its definitions would get
8414 % undone and the next image would fail.
8415 \openin 1 = epsf.tex
8416 \ifeof 1 \else
8417 % Do not bother showing banner with epsf.tex v2.7k (available in
8418 % doc/epsf.tex and on ctan).
8419 \def\epsfannounce{\toks0 = }%
8420 \input epsf.tex
8421 \fi
8422 \closein 1
8423 %
8424 % We will only complain once about lack of epsf.tex.
8425 \newif\ifwarnednoepsf
8426 \newhelp\noepsfhelp{epsf.tex must be installed for images to
8427 work. It is also included in the Texinfo distribution, or you can get
8428 it from ftp://tug.org/tex/epsf.tex.}
8429 %
8430 \def\image#1{%
8431 \ifx\epsfbox\thisisundefined
8432 \ifwarnednoepsf \else
8433 \errhelp = \noepsfhelp
8434 \errmessage{epsf.tex not found, images will be ignored}%
8435 \global\warnednoepsftrue
8436 \fi
8437 \else
8438 \imagexxx #1,,,,,\finish
8439 \fi
8440 }
8441 %
8442 % Arguments to @image:
8443 % #1 is (mandatory) image filename; we tack on .eps extension.
8444 % #2 is (optional) width, #3 is (optional) height.
8445 % #4 is (ignored optional) html alt text.
8446 % #5 is (ignored optional) extension.
8447 % #6 is just the usual extra ignored arg for parsing stuff.
8448 \newif\ifimagevmode
8449 \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
8450 \catcode`\^^M = 5 % in case we're inside an example
8451 \normalturnoffactive % allow _ et al. in names
8452 % If the image is by itself, center it.
8453 \ifvmode
8454 \imagevmodetrue
8455 \else \ifx\centersub\centerV
8456 % for @center @image, we need a vbox so we can have our vertical space
8457 \imagevmodetrue
8458 \vbox\bgroup % vbox has better behavior than vtop herev
8459 \fi\fi
8460 %
8461 \ifimagevmode
8462 \nobreak\medskip
8463 % Usually we'll have text after the image which will insert
8464 % \parskip glue, so insert it here too to equalize the space
8465 % above and below.
8466 \nobreak\vskip\parskip
8467 \nobreak
8468 \fi
8469 %
8470 % Leave vertical mode so that indentation from an enclosing
8471 % environment such as @quotation is respected.
8472 % However, if we're at the top level, we don't want the
8473 % normal paragraph indentation.
8474 % On the other hand, if we are in the case of @center @image, we don't
8475 % want to start a paragraph, which will create a hsize-width box and
8476 % eradicate the centering.
8477 \ifx\centersub\centerV\else \noindent \fi
8478 %
8479 % Output the image.
8480 \ifpdf
8481 \dopdfimage{#1}{#2}{#3}%
8482 \else
8483 % \epsfbox itself resets \epsf?size at each figure.
8484 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
8485 \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
8486 \epsfbox{#1.eps}%
8487 \fi
8488 %
8489 \ifimagevmode
8490 \medskip % space after a standalone image
8491 \fi
8492 \ifx\centersub\centerV \egroup \fi
8493 \endgroup}
8494
8495
8496 % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
8497 % etc. We don't actually implement floating yet, we always include the
8498 % float "here". But it seemed the best name for the future.
8499 %
8500 \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish}
8501
8502 % There may be a space before second and/or third parameter; delete it.
8503 \def\eatcommaspace#1, {#1,}
8504
8505 % #1 is the optional FLOATTYPE, the text label for this float, typically
8506 % "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
8507 % this float will not be numbered and cannot be referred to.
8508 %
8509 % #2 is the optional xref label. Also must be present for the float to
8510 % be referable.
8511 %
8512 % #3 is the optional positioning argument; for now, it is ignored. It
8513 % will somehow specify the positions allowed to float to (here, top, bottom).
8514 %
8515 % We keep a separate counter for each FLOATTYPE, which we reset at each
8516 % chapter-level command.
8517 \let\resetallfloatnos=\empty
8518 %
8519 \def\dofloat#1,#2,#3,#4\finish{%
8520 \let\thiscaption=\empty
8521 \let\thisshortcaption=\empty
8522 %
8523 % don't lose footnotes inside @float.
8524 %
8525 % BEWARE: when the floats start float, we have to issue warning whenever an
8526 % insert appears inside a float which could possibly float. --kasal, 26may04
8527 %
8528 \startsavinginserts
8529 %
8530 % We can't be used inside a paragraph.
8531 \par
8532 %
8533 \vtop\bgroup
8534 \def\floattype{#1}%
8535 \def\floatlabel{#2}%
8536 \def\floatloc{#3}% we do nothing with this yet.
8537 %
8538 \ifx\floattype\empty
8539 \let\safefloattype=\empty
8540 \else
8541 {%
8542 % the floattype might have accents or other special characters,
8543 % but we need to use it in a control sequence name.
8544 \indexnofonts
8545 \turnoffactive
8546 \xdef\safefloattype{\floattype}%
8547 }%
8548 \fi
8549 %
8550 % If label is given but no type, we handle that as the empty type.
8551 \ifx\floatlabel\empty \else
8552 % We want each FLOATTYPE to be numbered separately (Figure 1,
8553 % Table 1, Figure 2, ...). (And if no label, no number.)
8554 %
8555 \expandafter\getfloatno\csname\safefloattype floatno\endcsname
8556 \global\advance\floatno by 1
8557 %
8558 {%
8559 % This magic value for \lastsection is output by \setref as the
8560 % XREFLABEL-title value. \xrefX uses it to distinguish float
8561 % labels (which have a completely different output format) from
8562 % node and anchor labels. And \xrdef uses it to construct the
8563 % lists of floats.
8564 %
8565 \edef\lastsection{\floatmagic=\safefloattype}%
8566 \setref{\floatlabel}{Yfloat}%
8567 }%
8568 \fi
8569 %
8570 % start with \parskip glue, I guess.
8571 \vskip\parskip
8572 %
8573 % Don't suppress indentation if a float happens to start a section.
8574 \restorefirstparagraphindent
8575 }
8576
8577 % we have these possibilities:
8578 % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
8579 % @float Foo,lbl & no caption: Foo 1.1
8580 % @float Foo & @caption{Cap}: Foo: Cap
8581 % @float Foo & no caption: Foo
8582 % @float ,lbl & Caption{Cap}: 1.1: Cap
8583 % @float ,lbl & no caption: 1.1
8584 % @float & @caption{Cap}: Cap
8585 % @float & no caption:
8586 %
8587 \def\Efloat{%
8588 \let\floatident = \empty
8589 %
8590 % In all cases, if we have a float type, it comes first.
8591 \ifx\floattype\empty \else \def\floatident{\floattype}\fi
8592 %
8593 % If we have an xref label, the number comes next.
8594 \ifx\floatlabel\empty \else
8595 \ifx\floattype\empty \else % if also had float type, need tie first.
8596 \appendtomacro\floatident{\tie}%
8597 \fi
8598 % the number.
8599 \appendtomacro\floatident{\chaplevelprefix\the\floatno}%
8600 \fi
8601 %
8602 % Start the printed caption with what we've constructed in
8603 % \floatident, but keep it separate; we need \floatident again.
8604 \let\captionline = \floatident
8605 %
8606 \ifx\thiscaption\empty \else
8607 \ifx\floatident\empty \else
8608 \appendtomacro\captionline{: }% had ident, so need a colon between
8609 \fi
8610 %
8611 % caption text.
8612 \appendtomacro\captionline{\scanexp\thiscaption}%
8613 \fi
8614 %
8615 % If we have anything to print, print it, with space before.
8616 % Eventually this needs to become an \insert.
8617 \ifx\captionline\empty \else
8618 \vskip.5\parskip
8619 \captionline
8620 %
8621 % Space below caption.
8622 \vskip\parskip
8623 \fi
8624 %
8625 % If have an xref label, write the list of floats info. Do this
8626 % after the caption, to avoid chance of it being a breakpoint.
8627 \ifx\floatlabel\empty \else
8628 % Write the text that goes in the lof to the aux file as
8629 % \floatlabel-lof. Besides \floatident, we include the short
8630 % caption if specified, else the full caption if specified, else nothing.
8631 {%
8632 \atdummies
8633 %
8634 % since we read the caption text in the macro world, where ^^M
8635 % is turned into a normal character, we have to scan it back, so
8636 % we don't write the literal three characters "^^M" into the aux file.
8637 \scanexp{%
8638 \xdef\noexpand\gtemp{%
8639 \ifx\thisshortcaption\empty
8640 \thiscaption
8641 \else
8642 \thisshortcaption
8643 \fi
8644 }%
8645 }%
8646 \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
8647 \ifx\gtemp\empty \else : \gtemp \fi}}%
8648 }%
8649 \fi
8650 \egroup % end of \vtop
8651 %
8652 % place the captured inserts
8653 %
8654 % BEWARE: when the floats start floating, we have to issue warning
8655 % whenever an insert appears inside a float which could possibly
8656 % float. --kasal, 26may04
8657 %
8658 \checkinserts
8659 }
8660
8661 % Append the tokens #2 to the definition of macro #1, not expanding either.
8662 %
8663 \def\appendtomacro#1#2{%
8664 \expandafter\def\expandafter#1\expandafter{#1#2}%
8665 }
8666
8667 % @caption, @shortcaption
8668 %
8669 \def\caption{\docaption\thiscaption}
8670 \def\shortcaption{\docaption\thisshortcaption}
8671 \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
8672 \def\defcaption#1#2{\egroup \def#1{#2}}
8673
8674 % The parameter is the control sequence identifying the counter we are
8675 % going to use. Create it if it doesn't exist and assign it to \floatno.
8676 \def\getfloatno#1{%
8677 \ifx#1\relax
8678 % Haven't seen this figure type before.
8679 \csname newcount\endcsname #1%
8680 %
8681 % Remember to reset this floatno at the next chap.
8682 \expandafter\gdef\expandafter\resetallfloatnos
8683 \expandafter{\resetallfloatnos #1=0 }%
8684 \fi
8685 \let\floatno#1%
8686 }
8687
8688 % \setref calls this to get the XREFLABEL-snt value. We want an @xref
8689 % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
8690 % first read the @float command.
8691 %
8692 \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}%
8693
8694 % Magic string used for the XREFLABEL-title value, so \xrefX can
8695 % distinguish floats from other xref types.
8696 \def\floatmagic{!!float!!}
8697
8698 % #1 is the control sequence we are passed; we expand into a conditional
8699 % which is true if #1 represents a float ref. That is, the magic
8700 % \lastsection value which we \setref above.
8701 %
8702 \def\iffloat#1{\expandafter\doiffloat#1==\finish}
8703 %
8704 % #1 is (maybe) the \floatmagic string. If so, #2 will be the
8705 % (safe) float type for this float. We set \iffloattype to #2.
8706 %
8707 \def\doiffloat#1=#2=#3\finish{%
8708 \def\temp{#1}%
8709 \def\iffloattype{#2}%
8710 \ifx\temp\floatmagic
8711 }
8712
8713 % @listoffloats FLOATTYPE - print a list of floats like a table of contents.
8714 %
8715 \parseargdef\listoffloats{%
8716 \def\floattype{#1}% floattype
8717 {%
8718 % the floattype might have accents or other special characters,
8719 % but we need to use it in a control sequence name.
8720 \indexnofonts
8721 \turnoffactive
8722 \xdef\safefloattype{\floattype}%
8723 }%
8724 %
8725 % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
8726 \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax
8727 \ifhavexrefs
8728 % if the user said @listoffloats foo but never @float foo.
8729 \message{\linenumber No `\safefloattype' floats to list.}%
8730 \fi
8731 \else
8732 \begingroup
8733 \leftskip=\tocindent % indent these entries like a toc
8734 \let\do=\listoffloatsdo
8735 \csname floatlist\safefloattype\endcsname
8736 \endgroup
8737 \fi
8738 }
8739
8740 % This is called on each entry in a list of floats. We're passed the
8741 % xref label, in the form LABEL-title, which is how we save it in the
8742 % aux file. We strip off the -title and look up \XRLABEL-lof, which
8743 % has the text we're supposed to typeset here.
8744 %
8745 % Figures without xref labels will not be included in the list (since
8746 % they won't appear in the aux file).
8747 %
8748 \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
8749 \def\listoffloatsdoentry#1-title\finish{{%
8750 % Can't fully expand XR#1-lof because it can contain anything. Just
8751 % pass the control sequence. On the other hand, XR#1-pg is just the
8752 % page number, and we want to fully expand that so we can get a link
8753 % in pdf output.
8754 \toksA = \expandafter{\csname XR#1-lof\endcsname}%
8755 %
8756 % use the same \entry macro we use to generate the TOC and index.
8757 \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
8758 \writeentry
8759 }}
8760
8761
8762 \message{localization,}
8763
8764 % For single-language documents, @documentlanguage is usually given very
8765 % early, just after @documentencoding. Single argument is the language
8766 % (de) or locale (de_DE) abbreviation.
8767 %
8768 {
8769 \catcode`\_ = \active
8770 \globaldefs=1
8771 \parseargdef\documentlanguage{\begingroup
8772 \let_=\normalunderscore % normal _ character for filenames
8773 \tex % read txi-??.tex file in plain TeX.
8774 % Read the file by the name they passed if it exists.
8775 \openin 1 txi-#1.tex
8776 \ifeof 1
8777 \documentlanguagetrywithoutunderscore{#1_\finish}%
8778 \else
8779 \globaldefs = 1 % everything in the txi-LL files needs to persist
8780 \input txi-#1.tex
8781 \fi
8782 \closein 1
8783 \endgroup % end raw TeX
8784 \endgroup}
8785 %
8786 % If they passed de_DE, and txi-de_DE.tex doesn't exist,
8787 % try txi-de.tex.
8788 %
8789 \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
8790 \openin 1 txi-#1.tex
8791 \ifeof 1
8792 \errhelp = \nolanghelp
8793 \errmessage{Cannot read language file txi-#1.tex}%
8794 \else
8795 \globaldefs = 1 % everything in the txi-LL files needs to persist
8796 \input txi-#1.tex
8797 \fi
8798 \closein 1
8799 }
8800 }% end of special _ catcode
8801 %
8802 \newhelp\nolanghelp{The given language definition file cannot be found or
8803 is empty. Maybe you need to install it? Putting it in the current
8804 directory should work if nowhere else does.}
8805
8806 % This macro is called from txi-??.tex files; the first argument is the
8807 % \language name to set (without the "\lang@" prefix), the second and
8808 % third args are \{left,right}hyphenmin.
8809 %
8810 % The language names to pass are determined when the format is built.
8811 % See the etex.log file created at that time, e.g.,
8812 % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
8813 %
8814 % With TeX Live 2008, etex now includes hyphenation patterns for all
8815 % available languages. This means we can support hyphenation in
8816 % Texinfo, at least to some extent. (This still doesn't solve the
8817 % accented characters problem.)
8818 %
8819 \catcode`@=11
8820 \def\txisetlanguage#1#2#3{%
8821 % do not set the language if the name is undefined in the current TeX.
8822 \expandafter\ifx\csname lang@#1\endcsname \relax
8823 \message{no patterns for #1}%
8824 \else
8825 \global\language = \csname lang@#1\endcsname
8826 \fi
8827 % but there is no harm in adjusting the hyphenmin values regardless.
8828 \global\lefthyphenmin = #2\relax
8829 \global\righthyphenmin = #3\relax
8830 }
8831
8832 % Helpers for encodings.
8833 % Set the catcode of characters 128 through 255 to the specified number.
8834 %
8835 \def\setnonasciicharscatcode#1{%
8836 \count255=128
8837 \loop\ifnum\count255<256
8838 \global\catcode\count255=#1\relax
8839 \advance\count255 by 1
8840 \repeat
8841 }
8842
8843 \def\setnonasciicharscatcodenonglobal#1{%
8844 \count255=128
8845 \loop\ifnum\count255<256
8846 \catcode\count255=#1\relax
8847 \advance\count255 by 1
8848 \repeat
8849 }
8850
8851 % @documentencoding sets the definition of non-ASCII characters
8852 % according to the specified encoding.
8853 %
8854 \parseargdef\documentencoding{%
8855 % Encoding being declared for the document.
8856 \def\declaredencoding{\csname #1.enc\endcsname}%
8857 %
8858 % Supported encodings: names converted to tokens in order to be able
8859 % to compare them with \ifx.
8860 \def\ascii{\csname US-ASCII.enc\endcsname}%
8861 \def\latnine{\csname ISO-8859-15.enc\endcsname}%
8862 \def\latone{\csname ISO-8859-1.enc\endcsname}%
8863 \def\lattwo{\csname ISO-8859-2.enc\endcsname}%
8864 \def\utfeight{\csname UTF-8.enc\endcsname}%
8865 %
8866 \ifx \declaredencoding \ascii
8867 \asciichardefs
8868 %
8869 \else \ifx \declaredencoding \lattwo
8870 \setnonasciicharscatcode\active
8871 \lattwochardefs
8872 %
8873 \else \ifx \declaredencoding \latone
8874 \setnonasciicharscatcode\active
8875 \latonechardefs
8876 %
8877 \else \ifx \declaredencoding \latnine
8878 \setnonasciicharscatcode\active
8879 \latninechardefs
8880 %
8881 \else \ifx \declaredencoding \utfeight
8882 \setnonasciicharscatcode\active
8883 \utfeightchardefs
8884 %
8885 \else
8886 \message{Unknown document encoding #1, ignoring.}%
8887 %
8888 \fi % utfeight
8889 \fi % latnine
8890 \fi % latone
8891 \fi % lattwo
8892 \fi % ascii
8893 }
8894
8895 % A message to be logged when using a character that isn't available
8896 % the default font encoding (OT1).
8897 %
8898 \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
8899
8900 % Take account of \c (plain) vs. \, (Texinfo) difference.
8901 \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
8902
8903 % First, make active non-ASCII characters in order for them to be
8904 % correctly categorized when TeX reads the replacement text of
8905 % macros containing the character definitions.
8906 \setnonasciicharscatcode\active
8907 %
8908 % Latin1 (ISO-8859-1) character definitions.
8909 \def\latonechardefs{%
8910 \gdef^^a0{\tie}
8911 \gdef^^a1{\exclamdown}
8912 \gdef^^a2{\missingcharmsg{CENT SIGN}}
8913 \gdef^^a3{{\pounds}}
8914 \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
8915 \gdef^^a5{\missingcharmsg{YEN SIGN}}
8916 \gdef^^a6{\missingcharmsg{BROKEN BAR}}
8917 \gdef^^a7{\S}
8918 \gdef^^a8{\"{}}
8919 \gdef^^a9{\copyright}
8920 \gdef^^aa{\ordf}
8921 \gdef^^ab{\guillemetleft}
8922 \gdef^^ac{$\lnot$}
8923 \gdef^^ad{\-}
8924 \gdef^^ae{\registeredsymbol}
8925 \gdef^^af{\={}}
8926 %
8927 \gdef^^b0{\textdegree}
8928 \gdef^^b1{$\pm$}
8929 \gdef^^b2{$^2$}
8930 \gdef^^b3{$^3$}
8931 \gdef^^b4{\'{}}
8932 \gdef^^b5{$\mu$}
8933 \gdef^^b6{\P}
8934 %
8935 \gdef^^b7{$^.$}
8936 \gdef^^b8{\cedilla\ }
8937 \gdef^^b9{$^1$}
8938 \gdef^^ba{\ordm}
8939 %
8940 \gdef^^bb{\guillemetright}
8941 \gdef^^bc{$1\over4$}
8942 \gdef^^bd{$1\over2$}
8943 \gdef^^be{$3\over4$}
8944 \gdef^^bf{\questiondown}
8945 %
8946 \gdef^^c0{\`A}
8947 \gdef^^c1{\'A}
8948 \gdef^^c2{\^A}
8949 \gdef^^c3{\~A}
8950 \gdef^^c4{\"A}
8951 \gdef^^c5{\ringaccent A}
8952 \gdef^^c6{\AE}
8953 \gdef^^c7{\cedilla C}
8954 \gdef^^c8{\`E}
8955 \gdef^^c9{\'E}
8956 \gdef^^ca{\^E}
8957 \gdef^^cb{\"E}
8958 \gdef^^cc{\`I}
8959 \gdef^^cd{\'I}
8960 \gdef^^ce{\^I}
8961 \gdef^^cf{\"I}
8962 %
8963 \gdef^^d0{\DH}
8964 \gdef^^d1{\~N}
8965 \gdef^^d2{\`O}
8966 \gdef^^d3{\'O}
8967 \gdef^^d4{\^O}
8968 \gdef^^d5{\~O}
8969 \gdef^^d6{\"O}
8970 \gdef^^d7{$\times$}
8971 \gdef^^d8{\O}
8972 \gdef^^d9{\`U}
8973 \gdef^^da{\'U}
8974 \gdef^^db{\^U}
8975 \gdef^^dc{\"U}
8976 \gdef^^dd{\'Y}
8977 \gdef^^de{\TH}
8978 \gdef^^df{\ss}
8979 %
8980 \gdef^^e0{\`a}
8981 \gdef^^e1{\'a}
8982 \gdef^^e2{\^a}
8983 \gdef^^e3{\~a}
8984 \gdef^^e4{\"a}
8985 \gdef^^e5{\ringaccent a}
8986 \gdef^^e6{\ae}
8987 \gdef^^e7{\cedilla c}
8988 \gdef^^e8{\`e}
8989 \gdef^^e9{\'e}
8990 \gdef^^ea{\^e}
8991 \gdef^^eb{\"e}
8992 \gdef^^ec{\`{\dotless i}}
8993 \gdef^^ed{\'{\dotless i}}
8994 \gdef^^ee{\^{\dotless i}}
8995 \gdef^^ef{\"{\dotless i}}
8996 %
8997 \gdef^^f0{\dh}
8998 \gdef^^f1{\~n}
8999 \gdef^^f2{\`o}
9000 \gdef^^f3{\'o}
9001 \gdef^^f4{\^o}
9002 \gdef^^f5{\~o}
9003 \gdef^^f6{\"o}
9004 \gdef^^f7{$\div$}
9005 \gdef^^f8{\o}
9006 \gdef^^f9{\`u}
9007 \gdef^^fa{\'u}
9008 \gdef^^fb{\^u}
9009 \gdef^^fc{\"u}
9010 \gdef^^fd{\'y}
9011 \gdef^^fe{\th}
9012 \gdef^^ff{\"y}
9013 }
9014
9015 % Latin9 (ISO-8859-15) encoding character definitions.
9016 \def\latninechardefs{%
9017 % Encoding is almost identical to Latin1.
9018 \latonechardefs
9019 %
9020 \gdef^^a4{\euro}
9021 \gdef^^a6{\v S}
9022 \gdef^^a8{\v s}
9023 \gdef^^b4{\v Z}
9024 \gdef^^b8{\v z}
9025 \gdef^^bc{\OE}
9026 \gdef^^bd{\oe}
9027 \gdef^^be{\"Y}
9028 }
9029
9030 % Latin2 (ISO-8859-2) character definitions.
9031 \def\lattwochardefs{%
9032 \gdef^^a0{\tie}
9033 \gdef^^a1{\ogonek{A}}
9034 \gdef^^a2{\u{}}
9035 \gdef^^a3{\L}
9036 \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
9037 \gdef^^a5{\v L}
9038 \gdef^^a6{\'S}
9039 \gdef^^a7{\S}
9040 \gdef^^a8{\"{}}
9041 \gdef^^a9{\v S}
9042 \gdef^^aa{\cedilla S}
9043 \gdef^^ab{\v T}
9044 \gdef^^ac{\'Z}
9045 \gdef^^ad{\-}
9046 \gdef^^ae{\v Z}
9047 \gdef^^af{\dotaccent Z}
9048 %
9049 \gdef^^b0{\textdegree}
9050 \gdef^^b1{\ogonek{a}}
9051 \gdef^^b2{\ogonek{ }}
9052 \gdef^^b3{\l}
9053 \gdef^^b4{\'{}}
9054 \gdef^^b5{\v l}
9055 \gdef^^b6{\'s}
9056 \gdef^^b7{\v{}}
9057 \gdef^^b8{\cedilla\ }
9058 \gdef^^b9{\v s}
9059 \gdef^^ba{\cedilla s}
9060 \gdef^^bb{\v t}
9061 \gdef^^bc{\'z}
9062 \gdef^^bd{\H{}}
9063 \gdef^^be{\v z}
9064 \gdef^^bf{\dotaccent z}
9065 %
9066 \gdef^^c0{\'R}
9067 \gdef^^c1{\'A}
9068 \gdef^^c2{\^A}
9069 \gdef^^c3{\u A}
9070 \gdef^^c4{\"A}
9071 \gdef^^c5{\'L}
9072 \gdef^^c6{\'C}
9073 \gdef^^c7{\cedilla C}
9074 \gdef^^c8{\v C}
9075 \gdef^^c9{\'E}
9076 \gdef^^ca{\ogonek{E}}
9077 \gdef^^cb{\"E}
9078 \gdef^^cc{\v E}
9079 \gdef^^cd{\'I}
9080 \gdef^^ce{\^I}
9081 \gdef^^cf{\v D}
9082 %
9083 \gdef^^d0{\DH}
9084 \gdef^^d1{\'N}
9085 \gdef^^d2{\v N}
9086 \gdef^^d3{\'O}
9087 \gdef^^d4{\^O}
9088 \gdef^^d5{\H O}
9089 \gdef^^d6{\"O}
9090 \gdef^^d7{$\times$}
9091 \gdef^^d8{\v R}
9092 \gdef^^d9{\ringaccent U}
9093 \gdef^^da{\'U}
9094 \gdef^^db{\H U}
9095 \gdef^^dc{\"U}
9096 \gdef^^dd{\'Y}
9097 \gdef^^de{\cedilla T}
9098 \gdef^^df{\ss}
9099 %
9100 \gdef^^e0{\'r}
9101 \gdef^^e1{\'a}
9102 \gdef^^e2{\^a}
9103 \gdef^^e3{\u a}
9104 \gdef^^e4{\"a}
9105 \gdef^^e5{\'l}
9106 \gdef^^e6{\'c}
9107 \gdef^^e7{\cedilla c}
9108 \gdef^^e8{\v c}
9109 \gdef^^e9{\'e}
9110 \gdef^^ea{\ogonek{e}}
9111 \gdef^^eb{\"e}
9112 \gdef^^ec{\v e}
9113 \gdef^^ed{\'{\dotless{i}}}
9114 \gdef^^ee{\^{\dotless{i}}}
9115 \gdef^^ef{\v d}
9116 %
9117 \gdef^^f0{\dh}
9118 \gdef^^f1{\'n}
9119 \gdef^^f2{\v n}
9120 \gdef^^f3{\'o}
9121 \gdef^^f4{\^o}
9122 \gdef^^f5{\H o}
9123 \gdef^^f6{\"o}
9124 \gdef^^f7{$\div$}
9125 \gdef^^f8{\v r}
9126 \gdef^^f9{\ringaccent u}
9127 \gdef^^fa{\'u}
9128 \gdef^^fb{\H u}
9129 \gdef^^fc{\"u}
9130 \gdef^^fd{\'y}
9131 \gdef^^fe{\cedilla t}
9132 \gdef^^ff{\dotaccent{}}
9133 }
9134
9135 % UTF-8 character definitions.
9136 %
9137 % This code to support UTF-8 is based on LaTeX's utf8.def, with some
9138 % changes for Texinfo conventions. It is included here under the GPL by
9139 % permission from Frank Mittelbach and the LaTeX team.
9140 %
9141 \newcount\countUTFx
9142 \newcount\countUTFy
9143 \newcount\countUTFz
9144
9145 \gdef\UTFviiiTwoOctets#1#2{\expandafter
9146 \UTFviiiDefined\csname u8:#1\string #2\endcsname}
9147 %
9148 \gdef\UTFviiiThreeOctets#1#2#3{\expandafter
9149 \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname}
9150 %
9151 \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
9152 \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname}
9153
9154 \gdef\UTFviiiDefined#1{%
9155 \ifx #1\relax
9156 \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
9157 \else
9158 \expandafter #1%
9159 \fi
9160 }
9161
9162 \begingroup
9163 \catcode`\~13
9164 \catcode`\"12
9165
9166 \def\UTFviiiLoop{%
9167 \global\catcode\countUTFx\active
9168 \uccode`\~\countUTFx
9169 \uppercase\expandafter{\UTFviiiTmp}%
9170 \advance\countUTFx by 1
9171 \ifnum\countUTFx < \countUTFy
9172 \expandafter\UTFviiiLoop
9173 \fi}
9174
9175 \countUTFx = "C2
9176 \countUTFy = "E0
9177 \def\UTFviiiTmp{%
9178 \xdef~{\noexpand\UTFviiiTwoOctets\string~}}
9179 \UTFviiiLoop
9180
9181 \countUTFx = "E0
9182 \countUTFy = "F0
9183 \def\UTFviiiTmp{%
9184 \xdef~{\noexpand\UTFviiiThreeOctets\string~}}
9185 \UTFviiiLoop
9186
9187 \countUTFx = "F0
9188 \countUTFy = "F4
9189 \def\UTFviiiTmp{%
9190 \xdef~{\noexpand\UTFviiiFourOctets\string~}}
9191 \UTFviiiLoop
9192 \endgroup
9193
9194 \begingroup
9195 \catcode`\"=12
9196 \catcode`\<=12
9197 \catcode`\.=12
9198 \catcode`\,=12
9199 \catcode`\;=12
9200 \catcode`\!=12
9201 \catcode`\~=13
9202
9203 \gdef\DeclareUnicodeCharacter#1#2{%
9204 \countUTFz = "#1\relax
9205 %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
9206 \begingroup
9207 \parseXMLCharref
9208 \def\UTFviiiTwoOctets##1##2{%
9209 \csname u8:##1\string ##2\endcsname}%
9210 \def\UTFviiiThreeOctets##1##2##3{%
9211 \csname u8:##1\string ##2\string ##3\endcsname}%
9212 \def\UTFviiiFourOctets##1##2##3##4{%
9213 \csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
9214 \expandafter\expandafter\expandafter\expandafter
9215 \expandafter\expandafter\expandafter
9216 \gdef\UTFviiiTmp{#2}%
9217 \endgroup}
9218
9219 \gdef\parseXMLCharref{%
9220 \ifnum\countUTFz < "A0\relax
9221 \errhelp = \EMsimple
9222 \errmessage{Cannot define Unicode char value < 00A0}%
9223 \else\ifnum\countUTFz < "800\relax
9224 \parseUTFviiiA,%
9225 \parseUTFviiiB C\UTFviiiTwoOctets.,%
9226 \else\ifnum\countUTFz < "10000\relax
9227 \parseUTFviiiA;%
9228 \parseUTFviiiA,%
9229 \parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
9230 \else
9231 \parseUTFviiiA;%
9232 \parseUTFviiiA,%
9233 \parseUTFviiiA!%
9234 \parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
9235 \fi\fi\fi
9236 }
9237
9238 \gdef\parseUTFviiiA#1{%
9239 \countUTFx = \countUTFz
9240 \divide\countUTFz by 64
9241 \countUTFy = \countUTFz
9242 \multiply\countUTFz by 64
9243 \advance\countUTFx by -\countUTFz
9244 \advance\countUTFx by 128
9245 \uccode `#1\countUTFx
9246 \countUTFz = \countUTFy}
9247
9248 \gdef\parseUTFviiiB#1#2#3#4{%
9249 \advance\countUTFz by "#10\relax
9250 \uccode `#3\countUTFz
9251 \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
9252 \endgroup
9253
9254 \def\utfeightchardefs{%
9255 \DeclareUnicodeCharacter{00A0}{\tie}
9256 \DeclareUnicodeCharacter{00A1}{\exclamdown}
9257 \DeclareUnicodeCharacter{00A3}{\pounds}
9258 \DeclareUnicodeCharacter{00A8}{\"{ }}
9259 \DeclareUnicodeCharacter{00A9}{\copyright}
9260 \DeclareUnicodeCharacter{00AA}{\ordf}
9261 \DeclareUnicodeCharacter{00AB}{\guillemetleft}
9262 \DeclareUnicodeCharacter{00AD}{\-}
9263 \DeclareUnicodeCharacter{00AE}{\registeredsymbol}
9264 \DeclareUnicodeCharacter{00AF}{\={ }}
9265
9266 \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
9267 \DeclareUnicodeCharacter{00B4}{\'{ }}
9268 \DeclareUnicodeCharacter{00B8}{\cedilla{ }}
9269 \DeclareUnicodeCharacter{00BA}{\ordm}
9270 \DeclareUnicodeCharacter{00BB}{\guillemetright}
9271 \DeclareUnicodeCharacter{00BF}{\questiondown}
9272
9273 \DeclareUnicodeCharacter{00C0}{\`A}
9274 \DeclareUnicodeCharacter{00C1}{\'A}
9275 \DeclareUnicodeCharacter{00C2}{\^A}
9276 \DeclareUnicodeCharacter{00C3}{\~A}
9277 \DeclareUnicodeCharacter{00C4}{\"A}
9278 \DeclareUnicodeCharacter{00C5}{\AA}
9279 \DeclareUnicodeCharacter{00C6}{\AE}
9280 \DeclareUnicodeCharacter{00C7}{\cedilla{C}}
9281 \DeclareUnicodeCharacter{00C8}{\`E}
9282 \DeclareUnicodeCharacter{00C9}{\'E}
9283 \DeclareUnicodeCharacter{00CA}{\^E}
9284 \DeclareUnicodeCharacter{00CB}{\"E}
9285 \DeclareUnicodeCharacter{00CC}{\`I}
9286 \DeclareUnicodeCharacter{00CD}{\'I}
9287 \DeclareUnicodeCharacter{00CE}{\^I}
9288 \DeclareUnicodeCharacter{00CF}{\"I}
9289
9290 \DeclareUnicodeCharacter{00D0}{\DH}
9291 \DeclareUnicodeCharacter{00D1}{\~N}
9292 \DeclareUnicodeCharacter{00D2}{\`O}
9293 \DeclareUnicodeCharacter{00D3}{\'O}
9294 \DeclareUnicodeCharacter{00D4}{\^O}
9295 \DeclareUnicodeCharacter{00D5}{\~O}
9296 \DeclareUnicodeCharacter{00D6}{\"O}
9297 \DeclareUnicodeCharacter{00D8}{\O}
9298 \DeclareUnicodeCharacter{00D9}{\`U}
9299 \DeclareUnicodeCharacter{00DA}{\'U}
9300 \DeclareUnicodeCharacter{00DB}{\^U}
9301 \DeclareUnicodeCharacter{00DC}{\"U}
9302 \DeclareUnicodeCharacter{00DD}{\'Y}
9303 \DeclareUnicodeCharacter{00DE}{\TH}
9304 \DeclareUnicodeCharacter{00DF}{\ss}
9305
9306 \DeclareUnicodeCharacter{00E0}{\`a}
9307 \DeclareUnicodeCharacter{00E1}{\'a}
9308 \DeclareUnicodeCharacter{00E2}{\^a}
9309 \DeclareUnicodeCharacter{00E3}{\~a}
9310 \DeclareUnicodeCharacter{00E4}{\"a}
9311 \DeclareUnicodeCharacter{00E5}{\aa}
9312 \DeclareUnicodeCharacter{00E6}{\ae}
9313 \DeclareUnicodeCharacter{00E7}{\cedilla{c}}
9314 \DeclareUnicodeCharacter{00E8}{\`e}
9315 \DeclareUnicodeCharacter{00E9}{\'e}
9316 \DeclareUnicodeCharacter{00EA}{\^e}
9317 \DeclareUnicodeCharacter{00EB}{\"e}
9318 \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
9319 \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
9320 \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
9321 \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
9322
9323 \DeclareUnicodeCharacter{00F0}{\dh}
9324 \DeclareUnicodeCharacter{00F1}{\~n}
9325 \DeclareUnicodeCharacter{00F2}{\`o}
9326 \DeclareUnicodeCharacter{00F3}{\'o}
9327 \DeclareUnicodeCharacter{00F4}{\^o}
9328 \DeclareUnicodeCharacter{00F5}{\~o}
9329 \DeclareUnicodeCharacter{00F6}{\"o}
9330 \DeclareUnicodeCharacter{00F8}{\o}
9331 \DeclareUnicodeCharacter{00F9}{\`u}
9332 \DeclareUnicodeCharacter{00FA}{\'u}
9333 \DeclareUnicodeCharacter{00FB}{\^u}
9334 \DeclareUnicodeCharacter{00FC}{\"u}
9335 \DeclareUnicodeCharacter{00FD}{\'y}
9336 \DeclareUnicodeCharacter{00FE}{\th}
9337 \DeclareUnicodeCharacter{00FF}{\"y}
9338
9339 \DeclareUnicodeCharacter{0100}{\=A}
9340 \DeclareUnicodeCharacter{0101}{\=a}
9341 \DeclareUnicodeCharacter{0102}{\u{A}}
9342 \DeclareUnicodeCharacter{0103}{\u{a}}
9343 \DeclareUnicodeCharacter{0104}{\ogonek{A}}
9344 \DeclareUnicodeCharacter{0105}{\ogonek{a}}
9345 \DeclareUnicodeCharacter{0106}{\'C}
9346 \DeclareUnicodeCharacter{0107}{\'c}
9347 \DeclareUnicodeCharacter{0108}{\^C}
9348 \DeclareUnicodeCharacter{0109}{\^c}
9349 \DeclareUnicodeCharacter{0118}{\ogonek{E}}
9350 \DeclareUnicodeCharacter{0119}{\ogonek{e}}
9351 \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
9352 \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
9353 \DeclareUnicodeCharacter{010C}{\v{C}}
9354 \DeclareUnicodeCharacter{010D}{\v{c}}
9355 \DeclareUnicodeCharacter{010E}{\v{D}}
9356
9357 \DeclareUnicodeCharacter{0112}{\=E}
9358 \DeclareUnicodeCharacter{0113}{\=e}
9359 \DeclareUnicodeCharacter{0114}{\u{E}}
9360 \DeclareUnicodeCharacter{0115}{\u{e}}
9361 \DeclareUnicodeCharacter{0116}{\dotaccent{E}}
9362 \DeclareUnicodeCharacter{0117}{\dotaccent{e}}
9363 \DeclareUnicodeCharacter{011A}{\v{E}}
9364 \DeclareUnicodeCharacter{011B}{\v{e}}
9365 \DeclareUnicodeCharacter{011C}{\^G}
9366 \DeclareUnicodeCharacter{011D}{\^g}
9367 \DeclareUnicodeCharacter{011E}{\u{G}}
9368 \DeclareUnicodeCharacter{011F}{\u{g}}
9369
9370 \DeclareUnicodeCharacter{0120}{\dotaccent{G}}
9371 \DeclareUnicodeCharacter{0121}{\dotaccent{g}}
9372 \DeclareUnicodeCharacter{0124}{\^H}
9373 \DeclareUnicodeCharacter{0125}{\^h}
9374 \DeclareUnicodeCharacter{0128}{\~I}
9375 \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
9376 \DeclareUnicodeCharacter{012A}{\=I}
9377 \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
9378 \DeclareUnicodeCharacter{012C}{\u{I}}
9379 \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
9380
9381 \DeclareUnicodeCharacter{0130}{\dotaccent{I}}
9382 \DeclareUnicodeCharacter{0131}{\dotless{i}}
9383 \DeclareUnicodeCharacter{0132}{IJ}
9384 \DeclareUnicodeCharacter{0133}{ij}
9385 \DeclareUnicodeCharacter{0134}{\^J}
9386 \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
9387 \DeclareUnicodeCharacter{0139}{\'L}
9388 \DeclareUnicodeCharacter{013A}{\'l}
9389
9390 \DeclareUnicodeCharacter{0141}{\L}
9391 \DeclareUnicodeCharacter{0142}{\l}
9392 \DeclareUnicodeCharacter{0143}{\'N}
9393 \DeclareUnicodeCharacter{0144}{\'n}
9394 \DeclareUnicodeCharacter{0147}{\v{N}}
9395 \DeclareUnicodeCharacter{0148}{\v{n}}
9396 \DeclareUnicodeCharacter{014C}{\=O}
9397 \DeclareUnicodeCharacter{014D}{\=o}
9398 \DeclareUnicodeCharacter{014E}{\u{O}}
9399 \DeclareUnicodeCharacter{014F}{\u{o}}
9400
9401 \DeclareUnicodeCharacter{0150}{\H{O}}
9402 \DeclareUnicodeCharacter{0151}{\H{o}}
9403 \DeclareUnicodeCharacter{0152}{\OE}
9404 \DeclareUnicodeCharacter{0153}{\oe}
9405 \DeclareUnicodeCharacter{0154}{\'R}
9406 \DeclareUnicodeCharacter{0155}{\'r}
9407 \DeclareUnicodeCharacter{0158}{\v{R}}
9408 \DeclareUnicodeCharacter{0159}{\v{r}}
9409 \DeclareUnicodeCharacter{015A}{\'S}
9410 \DeclareUnicodeCharacter{015B}{\'s}
9411 \DeclareUnicodeCharacter{015C}{\^S}
9412 \DeclareUnicodeCharacter{015D}{\^s}
9413 \DeclareUnicodeCharacter{015E}{\cedilla{S}}
9414 \DeclareUnicodeCharacter{015F}{\cedilla{s}}
9415
9416 \DeclareUnicodeCharacter{0160}{\v{S}}
9417 \DeclareUnicodeCharacter{0161}{\v{s}}
9418 \DeclareUnicodeCharacter{0162}{\cedilla{t}}
9419 \DeclareUnicodeCharacter{0163}{\cedilla{T}}
9420 \DeclareUnicodeCharacter{0164}{\v{T}}
9421
9422 \DeclareUnicodeCharacter{0168}{\~U}
9423 \DeclareUnicodeCharacter{0169}{\~u}
9424 \DeclareUnicodeCharacter{016A}{\=U}
9425 \DeclareUnicodeCharacter{016B}{\=u}
9426 \DeclareUnicodeCharacter{016C}{\u{U}}
9427 \DeclareUnicodeCharacter{016D}{\u{u}}
9428 \DeclareUnicodeCharacter{016E}{\ringaccent{U}}
9429 \DeclareUnicodeCharacter{016F}{\ringaccent{u}}
9430
9431 \DeclareUnicodeCharacter{0170}{\H{U}}
9432 \DeclareUnicodeCharacter{0171}{\H{u}}
9433 \DeclareUnicodeCharacter{0174}{\^W}
9434 \DeclareUnicodeCharacter{0175}{\^w}
9435 \DeclareUnicodeCharacter{0176}{\^Y}
9436 \DeclareUnicodeCharacter{0177}{\^y}
9437 \DeclareUnicodeCharacter{0178}{\"Y}
9438 \DeclareUnicodeCharacter{0179}{\'Z}
9439 \DeclareUnicodeCharacter{017A}{\'z}
9440 \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
9441 \DeclareUnicodeCharacter{017C}{\dotaccent{z}}
9442 \DeclareUnicodeCharacter{017D}{\v{Z}}
9443 \DeclareUnicodeCharacter{017E}{\v{z}}
9444
9445 \DeclareUnicodeCharacter{01C4}{D\v{Z}}
9446 \DeclareUnicodeCharacter{01C5}{D\v{z}}
9447 \DeclareUnicodeCharacter{01C6}{d\v{z}}
9448 \DeclareUnicodeCharacter{01C7}{LJ}
9449 \DeclareUnicodeCharacter{01C8}{Lj}
9450 \DeclareUnicodeCharacter{01C9}{lj}
9451 \DeclareUnicodeCharacter{01CA}{NJ}
9452 \DeclareUnicodeCharacter{01CB}{Nj}
9453 \DeclareUnicodeCharacter{01CC}{nj}
9454 \DeclareUnicodeCharacter{01CD}{\v{A}}
9455 \DeclareUnicodeCharacter{01CE}{\v{a}}
9456 \DeclareUnicodeCharacter{01CF}{\v{I}}
9457
9458 \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
9459 \DeclareUnicodeCharacter{01D1}{\v{O}}
9460 \DeclareUnicodeCharacter{01D2}{\v{o}}
9461 \DeclareUnicodeCharacter{01D3}{\v{U}}
9462 \DeclareUnicodeCharacter{01D4}{\v{u}}
9463
9464 \DeclareUnicodeCharacter{01E2}{\={\AE}}
9465 \DeclareUnicodeCharacter{01E3}{\={\ae}}
9466 \DeclareUnicodeCharacter{01E6}{\v{G}}
9467 \DeclareUnicodeCharacter{01E7}{\v{g}}
9468 \DeclareUnicodeCharacter{01E8}{\v{K}}
9469 \DeclareUnicodeCharacter{01E9}{\v{k}}
9470
9471 \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
9472 \DeclareUnicodeCharacter{01F1}{DZ}
9473 \DeclareUnicodeCharacter{01F2}{Dz}
9474 \DeclareUnicodeCharacter{01F3}{dz}
9475 \DeclareUnicodeCharacter{01F4}{\'G}
9476 \DeclareUnicodeCharacter{01F5}{\'g}
9477 \DeclareUnicodeCharacter{01F8}{\`N}
9478 \DeclareUnicodeCharacter{01F9}{\`n}
9479 \DeclareUnicodeCharacter{01FC}{\'{\AE}}
9480 \DeclareUnicodeCharacter{01FD}{\'{\ae}}
9481 \DeclareUnicodeCharacter{01FE}{\'{\O}}
9482 \DeclareUnicodeCharacter{01FF}{\'{\o}}
9483
9484 \DeclareUnicodeCharacter{021E}{\v{H}}
9485 \DeclareUnicodeCharacter{021F}{\v{h}}
9486
9487 \DeclareUnicodeCharacter{0226}{\dotaccent{A}}
9488 \DeclareUnicodeCharacter{0227}{\dotaccent{a}}
9489 \DeclareUnicodeCharacter{0228}{\cedilla{E}}
9490 \DeclareUnicodeCharacter{0229}{\cedilla{e}}
9491 \DeclareUnicodeCharacter{022E}{\dotaccent{O}}
9492 \DeclareUnicodeCharacter{022F}{\dotaccent{o}}
9493
9494 \DeclareUnicodeCharacter{0232}{\=Y}
9495 \DeclareUnicodeCharacter{0233}{\=y}
9496 \DeclareUnicodeCharacter{0237}{\dotless{j}}
9497
9498 \DeclareUnicodeCharacter{02DB}{\ogonek{ }}
9499
9500 \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
9501 \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
9502 \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
9503 \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
9504 \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
9505 \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
9506 \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
9507 \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
9508 \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
9509 \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
9510 \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
9511 \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
9512
9513 \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
9514 \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
9515
9516 \DeclareUnicodeCharacter{1E20}{\=G}
9517 \DeclareUnicodeCharacter{1E21}{\=g}
9518 \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
9519 \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
9520 \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
9521 \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
9522 \DeclareUnicodeCharacter{1E26}{\"H}
9523 \DeclareUnicodeCharacter{1E27}{\"h}
9524
9525 \DeclareUnicodeCharacter{1E30}{\'K}
9526 \DeclareUnicodeCharacter{1E31}{\'k}
9527 \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
9528 \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
9529 \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
9530 \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
9531 \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
9532 \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
9533 \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
9534 \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
9535 \DeclareUnicodeCharacter{1E3E}{\'M}
9536 \DeclareUnicodeCharacter{1E3F}{\'m}
9537
9538 \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
9539 \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
9540 \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
9541 \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
9542 \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
9543 \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
9544 \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
9545 \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
9546 \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
9547 \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
9548
9549 \DeclareUnicodeCharacter{1E54}{\'P}
9550 \DeclareUnicodeCharacter{1E55}{\'p}
9551 \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
9552 \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
9553 \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
9554 \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
9555 \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
9556 \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
9557 \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
9558 \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
9559
9560 \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
9561 \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
9562 \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
9563 \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
9564 \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
9565 \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
9566 \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
9567 \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
9568 \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
9569 \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
9570
9571 \DeclareUnicodeCharacter{1E7C}{\~V}
9572 \DeclareUnicodeCharacter{1E7D}{\~v}
9573 \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
9574 \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
9575
9576 \DeclareUnicodeCharacter{1E80}{\`W}
9577 \DeclareUnicodeCharacter{1E81}{\`w}
9578 \DeclareUnicodeCharacter{1E82}{\'W}
9579 \DeclareUnicodeCharacter{1E83}{\'w}
9580 \DeclareUnicodeCharacter{1E84}{\"W}
9581 \DeclareUnicodeCharacter{1E85}{\"w}
9582 \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
9583 \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
9584 \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
9585 \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
9586 \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
9587 \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
9588 \DeclareUnicodeCharacter{1E8C}{\"X}
9589 \DeclareUnicodeCharacter{1E8D}{\"x}
9590 \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
9591 \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
9592
9593 \DeclareUnicodeCharacter{1E90}{\^Z}
9594 \DeclareUnicodeCharacter{1E91}{\^z}
9595 \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
9596 \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
9597 \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
9598 \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
9599 \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
9600 \DeclareUnicodeCharacter{1E97}{\"t}
9601 \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
9602 \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
9603
9604 \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
9605 \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
9606
9607 \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
9608 \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
9609 \DeclareUnicodeCharacter{1EBC}{\~E}
9610 \DeclareUnicodeCharacter{1EBD}{\~e}
9611
9612 \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
9613 \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
9614 \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
9615 \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
9616
9617 \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
9618 \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
9619
9620 \DeclareUnicodeCharacter{1EF2}{\`Y}
9621 \DeclareUnicodeCharacter{1EF3}{\`y}
9622 \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
9623
9624 \DeclareUnicodeCharacter{1EF8}{\~Y}
9625 \DeclareUnicodeCharacter{1EF9}{\~y}
9626
9627 \DeclareUnicodeCharacter{2013}{--}
9628 \DeclareUnicodeCharacter{2014}{---}
9629 \DeclareUnicodeCharacter{2018}{\quoteleft}
9630 \DeclareUnicodeCharacter{2019}{\quoteright}
9631 \DeclareUnicodeCharacter{201A}{\quotesinglbase}
9632 \DeclareUnicodeCharacter{201C}{\quotedblleft}
9633 \DeclareUnicodeCharacter{201D}{\quotedblright}
9634 \DeclareUnicodeCharacter{201E}{\quotedblbase}
9635 \DeclareUnicodeCharacter{2022}{\bullet}
9636 \DeclareUnicodeCharacter{2026}{\dots}
9637 \DeclareUnicodeCharacter{2039}{\guilsinglleft}
9638 \DeclareUnicodeCharacter{203A}{\guilsinglright}
9639 \DeclareUnicodeCharacter{20AC}{\euro}
9640
9641 \DeclareUnicodeCharacter{2192}{\expansion}
9642 \DeclareUnicodeCharacter{21D2}{\result}
9643
9644 \DeclareUnicodeCharacter{2212}{\minus}
9645 \DeclareUnicodeCharacter{2217}{\point}
9646 \DeclareUnicodeCharacter{2261}{\equiv}
9647 }% end of \utfeightchardefs
9648
9649
9650 % US-ASCII character definitions.
9651 \def\asciichardefs{% nothing need be done
9652 \relax
9653 }
9654
9655 % Make non-ASCII characters printable again for compatibility with
9656 % existing Texinfo documents that may use them, even without declaring a
9657 % document encoding.
9658 %
9659 \setnonasciicharscatcode \other
9660
9661
9662 \message{formatting,}
9663
9664 \newdimen\defaultparindent \defaultparindent = 15pt
9665
9666 \chapheadingskip = 15pt plus 4pt minus 2pt
9667 \secheadingskip = 12pt plus 3pt minus 2pt
9668 \subsecheadingskip = 9pt plus 2pt minus 2pt
9669
9670 % Prevent underfull vbox error messages.
9671 \vbadness = 10000
9672
9673 % Don't be very finicky about underfull hboxes, either.
9674 \hbadness = 6666
9675
9676 % Following George Bush, get rid of widows and orphans.
9677 \widowpenalty=10000
9678 \clubpenalty=10000
9679
9680 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're
9681 % using an old version of TeX, don't do anything. We want the amount of
9682 % stretch added to depend on the line length, hence the dependence on
9683 % \hsize. We call this whenever the paper size is set.
9684 %
9685 \def\setemergencystretch{%
9686 \ifx\emergencystretch\thisisundefined
9687 % Allow us to assign to \emergencystretch anyway.
9688 \def\emergencystretch{\dimen0}%
9689 \else
9690 \emergencystretch = .15\hsize
9691 \fi
9692 }
9693
9694 % Parameters in order: 1) textheight; 2) textwidth;
9695 % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
9696 % 7) physical page height; 8) physical page width.
9697 %
9698 % We also call \setleading{\textleading}, so the caller should define
9699 % \textleading. The caller should also set \parskip.
9700 %
9701 \def\internalpagesizes#1#2#3#4#5#6#7#8{%
9702 \voffset = #3\relax
9703 \topskip = #6\relax
9704 \splittopskip = \topskip
9705 %
9706 \vsize = #1\relax
9707 \advance\vsize by \topskip
9708 \outervsize = \vsize
9709 \advance\outervsize by 2\topandbottommargin
9710 \pageheight = \vsize
9711 %
9712 \hsize = #2\relax
9713 \outerhsize = \hsize
9714 \advance\outerhsize by 0.5in
9715 \pagewidth = \hsize
9716 %
9717 \normaloffset = #4\relax
9718 \bindingoffset = #5\relax
9719 %
9720 \ifpdf
9721 \pdfpageheight #7\relax
9722 \pdfpagewidth #8\relax
9723 % if we don't reset these, they will remain at "1 true in" of
9724 % whatever layout pdftex was dumped with.
9725 \pdfhorigin = 1 true in
9726 \pdfvorigin = 1 true in
9727 \fi
9728 %
9729 \setleading{\textleading}
9730 %
9731 \parindent = \defaultparindent
9732 \setemergencystretch
9733 }
9734
9735 % @letterpaper (the default).
9736 \def\letterpaper{{\globaldefs = 1
9737 \parskip = 3pt plus 2pt minus 1pt
9738 \textleading = 13.2pt
9739 %
9740 % If page is nothing but text, make it come out even.
9741 \internalpagesizes{607.2pt}{6in}% that's 46 lines
9742 {\voffset}{.25in}%
9743 {\bindingoffset}{36pt}%
9744 {11in}{8.5in}%
9745 }}
9746
9747 % Use @smallbook to reset parameters for 7x9.25 trim size.
9748 \def\smallbook{{\globaldefs = 1
9749 \parskip = 2pt plus 1pt
9750 \textleading = 12pt
9751 %
9752 \internalpagesizes{7.5in}{5in}%
9753 {-.2in}{0in}%
9754 {\bindingoffset}{16pt}%
9755 {9.25in}{7in}%
9756 %
9757 \lispnarrowing = 0.3in
9758 \tolerance = 700
9759 \hfuzz = 1pt
9760 \contentsrightmargin = 0pt
9761 \defbodyindent = .5cm
9762 }}
9763
9764 % Use @smallerbook to reset parameters for 6x9 trim size.
9765 % (Just testing, parameters still in flux.)
9766 \def\smallerbook{{\globaldefs = 1
9767 \parskip = 1.5pt plus 1pt
9768 \textleading = 12pt
9769 %
9770 \internalpagesizes{7.4in}{4.8in}%
9771 {-.2in}{-.4in}%
9772 {0pt}{14pt}%
9773 {9in}{6in}%
9774 %
9775 \lispnarrowing = 0.25in
9776 \tolerance = 700
9777 \hfuzz = 1pt
9778 \contentsrightmargin = 0pt
9779 \defbodyindent = .4cm
9780 }}
9781
9782 % Use @afourpaper to print on European A4 paper.
9783 \def\afourpaper{{\globaldefs = 1
9784 \parskip = 3pt plus 2pt minus 1pt
9785 \textleading = 13.2pt
9786 %
9787 % Double-side printing via postscript on Laserjet 4050
9788 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
9789 % To change the settings for a different printer or situation, adjust
9790 % \normaloffset until the front-side and back-side texts align. Then
9791 % do the same for \bindingoffset. You can set these for testing in
9792 % your texinfo source file like this:
9793 % @tex
9794 % \global\normaloffset = -6mm
9795 % \global\bindingoffset = 10mm
9796 % @end tex
9797 \internalpagesizes{673.2pt}{160mm}% that's 51 lines
9798 {\voffset}{\hoffset}%
9799 {\bindingoffset}{44pt}%
9800 {297mm}{210mm}%
9801 %
9802 \tolerance = 700
9803 \hfuzz = 1pt
9804 \contentsrightmargin = 0pt
9805 \defbodyindent = 5mm
9806 }}
9807
9808 % Use @afivepaper to print on European A5 paper.
9809 % From romildo@urano.iceb.ufop.br, 2 July 2000.
9810 % He also recommends making @example and @lisp be small.
9811 \def\afivepaper{{\globaldefs = 1
9812 \parskip = 2pt plus 1pt minus 0.1pt
9813 \textleading = 12.5pt
9814 %
9815 \internalpagesizes{160mm}{120mm}%
9816 {\voffset}{\hoffset}%
9817 {\bindingoffset}{8pt}%
9818 {210mm}{148mm}%
9819 %
9820 \lispnarrowing = 0.2in
9821 \tolerance = 800
9822 \hfuzz = 1.2pt
9823 \contentsrightmargin = 0pt
9824 \defbodyindent = 2mm
9825 \tableindent = 12mm
9826 }}
9827
9828 % A specific text layout, 24x15cm overall, intended for A4 paper.
9829 \def\afourlatex{{\globaldefs = 1
9830 \afourpaper
9831 \internalpagesizes{237mm}{150mm}%
9832 {\voffset}{4.6mm}%
9833 {\bindingoffset}{7mm}%
9834 {297mm}{210mm}%
9835 %
9836 % Must explicitly reset to 0 because we call \afourpaper.
9837 \globaldefs = 0
9838 }}
9839
9840 % Use @afourwide to print on A4 paper in landscape format.
9841 \def\afourwide{{\globaldefs = 1
9842 \afourpaper
9843 \internalpagesizes{241mm}{165mm}%
9844 {\voffset}{-2.95mm}%
9845 {\bindingoffset}{7mm}%
9846 {297mm}{210mm}%
9847 \globaldefs = 0
9848 }}
9849
9850 % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
9851 % Perhaps we should allow setting the margins, \topskip, \parskip,
9852 % and/or leading, also. Or perhaps we should compute them somehow.
9853 %
9854 \parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
9855 \def\pagesizesyyy#1,#2,#3\finish{{%
9856 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
9857 \globaldefs = 1
9858 %
9859 \parskip = 3pt plus 2pt minus 1pt
9860 \setleading{\textleading}%
9861 %
9862 \dimen0 = #1\relax
9863 \advance\dimen0 by \voffset
9864 %
9865 \dimen2 = \hsize
9866 \advance\dimen2 by \normaloffset
9867 %
9868 \internalpagesizes{#1}{\hsize}%
9869 {\voffset}{\normaloffset}%
9870 {\bindingoffset}{44pt}%
9871 {\dimen0}{\dimen2}%
9872 }}
9873
9874 % Set default to letter.
9875 %
9876 \letterpaper
9877
9878
9879 \message{and turning on texinfo input format.}
9880
9881 \def^^L{\par} % remove \outer, so ^L can appear in an @comment
9882
9883 % DEL is a comment character, in case @c does not suffice.
9884 \catcode`\^^? = 14
9885
9886 % Define macros to output various characters with catcode for normal text.
9887 \catcode`\"=\other \def\normaldoublequote{"}
9888 \catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
9889 \catcode`\+=\other \def\normalplus{+}
9890 \catcode`\<=\other \def\normalless{<}
9891 \catcode`\>=\other \def\normalgreater{>}
9892 \catcode`\^=\other \def\normalcaret{^}
9893 \catcode`\_=\other \def\normalunderscore{_}
9894 \catcode`\|=\other \def\normalverticalbar{|}
9895 \catcode`\~=\other \def\normaltilde{~}
9896
9897 % This macro is used to make a character print one way in \tt
9898 % (where it can probably be output as-is), and another way in other fonts,
9899 % where something hairier probably needs to be done.
9900 %
9901 % #1 is what to print if we are indeed using \tt; #2 is what to print
9902 % otherwise. Since all the Computer Modern typewriter fonts have zero
9903 % interword stretch (and shrink), and it is reasonable to expect all
9904 % typewriter fonts to have this, we can check that font parameter.
9905 %
9906 \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
9907
9908 % Same as above, but check for italic font. Actually this also catches
9909 % non-italic slanted fonts since it is impossible to distinguish them from
9910 % italic fonts. But since this is only used by $ and it uses \sl anyway
9911 % this is not a problem.
9912 \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
9913
9914 % Turn off all special characters except @
9915 % (and those which the user can use as if they were ordinary).
9916 % Most of these we simply print from the \tt font, but for some, we can
9917 % use math or other variants that look better in normal text.
9918
9919 \catcode`\"=\active
9920 \def\activedoublequote{{\tt\char34}}
9921 \let"=\activedoublequote
9922 \catcode`\~=\active
9923 \def~{{\tt\char126}}
9924 \chardef\hat=`\^
9925 \catcode`\^=\active
9926 \def^{{\tt \hat}}
9927
9928 \catcode`\_=\active
9929 \def_{\ifusingtt\normalunderscore\_}
9930 \let\realunder=_
9931 % Subroutine for the previous macro.
9932 \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
9933
9934 \catcode`\|=\active
9935 \def|{{\tt\char124}}
9936 \chardef \less=`\<
9937 \catcode`\<=\active
9938 \def<{{\tt \less}}
9939 \chardef \gtr=`\>
9940 \catcode`\>=\active
9941 \def>{{\tt \gtr}}
9942 \catcode`\+=\active
9943 \def+{{\tt \char 43}}
9944 \catcode`\$=\active
9945 \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
9946
9947 % If a .fmt file is being used, characters that might appear in a file
9948 % name cannot be active until we have parsed the command line.
9949 % So turn them off again, and have \everyjob (or @setfilename) turn them on.
9950 % \otherifyactive is called near the end of this file.
9951 \def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
9952
9953 % Used sometimes to turn off (effectively) the active characters even after
9954 % parsing them.
9955 \def\turnoffactive{%
9956 \normalturnoffactive
9957 \otherbackslash
9958 }
9959
9960 \catcode`\@=0
9961
9962 % \backslashcurfont outputs one backslash character in current font,
9963 % as in \char`\\.
9964 \global\chardef\backslashcurfont=`\\
9965 \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
9966
9967 % \realbackslash is an actual character `\' with catcode other, and
9968 % \doublebackslash is two of them (for the pdf outlines).
9969 {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
9970
9971 % In texinfo, backslash is an active character; it prints the backslash
9972 % in fixed width font.
9973 \catcode`\\=\active % @ for escape char from now on.
9974
9975 % The story here is that in math mode, the \char of \backslashcurfont
9976 % ends up printing the roman \ from the math symbol font (because \char
9977 % in math mode uses the \mathcode, and plain.tex sets
9978 % \mathcode`\\="026E). It seems better for @backslashchar{} to always
9979 % print a typewriter backslash, hence we use an explicit \mathchar,
9980 % which is the decimal equivalent of "715c (class 7, e.g., use \fam;
9981 % ignored family value; char position "5C). We can't use " for the
9982 % usual hex value because it has already been made active.
9983 @def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
9984 @let@backslashchar = @normalbackslash % @backslashchar{} is for user documents.
9985
9986 % On startup, @fixbackslash assigns:
9987 % @let \ = @normalbackslash
9988 % \rawbackslash defines an active \ to do \backslashcurfont.
9989 % \otherbackslash defines an active \ to be a literal `\' character with
9990 % catcode other. We switch back and forth between these.
9991 @gdef@rawbackslash{@let\=@backslashcurfont}
9992 @gdef@otherbackslash{@let\=@realbackslash}
9993
9994 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
9995 % the literal character `\'. Also revert - to its normal character, in
9996 % case the active - from code has slipped in.
9997 %
9998 {@catcode`- = @active
9999 @gdef@normalturnoffactive{%
10000 @let-=@normaldash
10001 @let"=@normaldoublequote
10002 @let$=@normaldollar %$ font-lock fix
10003 @let+=@normalplus
10004 @let<=@normalless
10005 @let>=@normalgreater
10006 @let\=@normalbackslash
10007 @let^=@normalcaret
10008 @let_=@normalunderscore
10009 @let|=@normalverticalbar
10010 @let~=@normaltilde
10011 @markupsetuplqdefault
10012 @markupsetuprqdefault
10013 @unsepspaces
10014 }
10015 }
10016
10017 % Make _ and + \other characters, temporarily.
10018 % This is canceled by @fixbackslash.
10019 @otherifyactive
10020
10021 % If a .fmt file is being used, we don't want the `\input texinfo' to show up.
10022 % That is what \eatinput is for; after that, the `\' should revert to printing
10023 % a backslash.
10024 %
10025 @gdef@eatinput input texinfo{@fixbackslash}
10026 @global@let\ = @eatinput
10027
10028 % On the other hand, perhaps the file did not have a `\input texinfo'. Then
10029 % the first `\' in the file would cause an error. This macro tries to fix
10030 % that, assuming it is called before the first `\' could plausibly occur.
10031 % Also turn back on active characters that might appear in the input
10032 % file name, in case not using a pre-dumped format.
10033 %
10034 @gdef@fixbackslash{%
10035 @ifx\@eatinput @let\ = @normalbackslash @fi
10036 @catcode`+=@active
10037 @catcode`@_=@active
10038 }
10039
10040 % Say @foo, not \foo, in error messages.
10041 @escapechar = `@@
10042
10043 % These (along with & and #) are made active for url-breaking, so need
10044 % active definitions as the normal characters.
10045 @def@normaldot{.}
10046 @def@normalquest{?}
10047 @def@normalslash{/}
10048
10049 % These look ok in all fonts, so just make them not special.
10050 % @hashchar{} gets its own user-level command, because of #line.
10051 @catcode`@& = @other @def@normalamp{&}
10052 @catcode`@# = @other @def@normalhash{#}
10053 @catcode`@% = @other @def@normalpercent{%}
10054
10055 @let @hashchar = @normalhash
10056
10057 @c Finally, make ` and ' active, so that txicodequoteundirected and
10058 @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
10059 @c don't make ` and ' active, @code will not get them as active chars.
10060 @c Do this last of all since we use ` in the previous @catcode assignments.
10061 @catcode`@'=@active
10062 @catcode`@`=@active
10063 @markupsetuplqdefault
10064 @markupsetuprqdefault
10065
10066 @c Local variables:
10067 @c eval: (add-hook 'write-file-hooks 'time-stamp)
10068 @c page-delimiter: "^\\\\message"
10069 @c time-stamp-start: "def\\\\texinfoversion{"
10070 @c time-stamp-format: "%:y-%02m-%02d.%02H"
10071 @c time-stamp-end: "}"
10072 @c End:
10073
10074 @c vim:sw=2:
10075
10076 @ignore
10077 arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
10078 @end ignore
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: version.c,v 1.18 2004/01/23 09:41:32 rob Exp $
19 */
20
21 # ifdef HAVE_CONFIG_H
22 # include "config.h"
23 # endif
24
25 # include "global.h"
26
27 # include <stdio.h>
28 # include <string.h>
29 # include <mad.h>
30 # include <id3tag.h>
31
32 # include "gettext.h"
33
34 # include "version.h"
35
36 # define STRINGIZE(str) #str
37 # define STRING(str) STRINGIZE(str)
38
39 # define COPYRIGHT "Copyright (C)"
40
41 char const madplay_version[] = "madplay " MADPLAY_VERSION;
42 char const madplay_copyright[] = COPYRIGHT " " MADPLAY_PUBLISHYEAR
43 " " MADPLAY_AUTHOR;
44 char const madplay_author[] = MADPLAY_AUTHOR " <" MADPLAY_EMAIL ">";
45
46 char const madplay_build[] = ""
47 # if defined(DEBUG)
48 "DEBUG "
49 # elif defined(NDEBUG)
50 "NDEBUG "
51 # endif
52
53 # if defined(EXPERIMENTAL)
54 "EXPERIMENTAL "
55 # endif
56
57 "AUDIO_DEFAULT=" STRING(AUDIO_DEFAULT) " "
58
59 # if defined(ENABLE_NLS)
60 "ENABLE_NLS "
61 # endif
62 ;
63
64 void ver_banner(FILE *stream)
65 {
66 fprintf(stream, "%s %s - %s %s %s et al.\n", _("MPEG Audio Decoder"),
67 MADPLAY_VERSION,
68 _("Copyright (C)"), MADPLAY_PUBLISHYEAR, MADPLAY_AUTHOR);
69
70 fflush(stream);
71 }
72
73 void copyright(FILE *stream, char const *str)
74 {
75 if (strstr(str, COPYRIGHT) == str)
76 fprintf(stream, " %s%s\n", _(COPYRIGHT), &str[sizeof(COPYRIGHT) - 1]);
77 else
78 fprintf(stream, " %s\n", str);
79 }
80
81 void ver_license(FILE *stream)
82 {
83 fputc('\n', stream);
84 fprintf(stream,
85 _("This program is free software; you can redistribute it and/or modify it\n"
86 "under the terms of the GNU General Public License as published by the\n"
87 "Free Software Foundation; either version 2 of the License, or (at your\n"
88 "option) any later version.\n\n"
89
90 "This program is distributed in the hope that it will be useful, but\n"
91 "WITHOUT ANY WARRANTY; without even the implied warranty of\n"
92 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n"
93 "General Public License for more details.\n\n"
94
95 "You should have received a copy of the GNU General Public License along\n"
96 "with this program; if not, write to the Free Software Foundation, Inc.,\n"
97 "59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n\n"
98
99 "Some portions of this program may be licensable under different terms.\n"
100 "To inquire about alternate licensing, contact: %s\n"), madplay_author);
101
102 fputc('\n', stream);
103 }
0 /*
1 * madplay - MPEG audio decoder and player
2 * Copyright (C) 2000-2004 Robert Leslie
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * $Id: version.h,v 1.31 2004/02/23 21:34:53 rob Exp $
19 */
20
21 # ifndef VERSION_H
22 # define VERSION_H
23
24 # include <stdio.h>
25
26 # define MADPLAY_VERSION "0.15.2 (beta)"
27
28 # define MADPLAY_PUBLISHYEAR "2000-2004"
29 # define MADPLAY_AUTHOR "Robert Leslie"
30 # define MADPLAY_EMAIL "rob@mars.org"
31
32 extern char const madplay_version[];
33 extern char const madplay_copyright[];
34 extern char const madplay_author[];
35 extern char const madplay_build[];
36
37 void ver_banner(FILE *);
38 void ver_license(FILE *);
39
40 # endif
0 #! /bin/sh
1 # ylwrap - wrapper for lex/yacc invocations.
2
3 scriptversion=2013-01-12.17; # UTC
4
5 # Copyright (C) 1996-2014 Free Software Foundation, Inc.
6 #
7 # Written by Tom Tromey <tromey@cygnus.com>.
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
12 # any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
22 # As a special exception to the GNU General Public License, if you
23 # distribute this file as part of a program that contains a
24 # configuration script generated by Autoconf, you may include it under
25 # the same distribution terms that you use for the rest of that program.
26
27 # This file is maintained in Automake, please report
28 # bugs to <bug-automake@gnu.org> or send patches to
29 # <automake-patches@gnu.org>.
30
31 get_dirname ()
32 {
33 case $1 in
34 */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';;
35 # Otherwise, we want the empty string (not ".").
36 esac
37 }
38
39 # guard FILE
40 # ----------
41 # The CPP macro used to guard inclusion of FILE.
42 guard ()
43 {
44 printf '%s\n' "$1" \
45 | sed \
46 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
47 -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \
48 -e 's/__*/_/g'
49 }
50
51 # quote_for_sed [STRING]
52 # ----------------------
53 # Return STRING (or stdin) quoted to be used as a sed pattern.
54 quote_for_sed ()
55 {
56 case $# in
57 0) cat;;
58 1) printf '%s\n' "$1";;
59 esac \
60 | sed -e 's|[][\\.*]|\\&|g'
61 }
62
63 case "$1" in
64 '')
65 echo "$0: No files given. Try '$0 --help' for more information." 1>&2
66 exit 1
67 ;;
68 --basedir)
69 basedir=$2
70 shift 2
71 ;;
72 -h|--h*)
73 cat <<\EOF
74 Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]...
75
76 Wrapper for lex/yacc invocations, renaming files as desired.
77
78 INPUT is the input file
79 OUTPUT is one file PROG generates
80 DESIRED is the file we actually want instead of OUTPUT
81 PROGRAM is program to run
82 ARGS are passed to PROG
83
84 Any number of OUTPUT,DESIRED pairs may be used.
85
86 Report bugs to <bug-automake@gnu.org>.
87 EOF
88 exit $?
89 ;;
90 -v|--v*)
91 echo "ylwrap $scriptversion"
92 exit $?
93 ;;
94 esac
95
96
97 # The input.
98 input=$1
99 shift
100 # We'll later need for a correct munging of "#line" directives.
101 input_sub_rx=`get_dirname "$input" | quote_for_sed`
102 case $input in
103 [\\/]* | ?:[\\/]*)
104 # Absolute path; do nothing.
105 ;;
106 *)
107 # Relative path. Make it absolute.
108 input=`pwd`/$input
109 ;;
110 esac
111 input_rx=`get_dirname "$input" | quote_for_sed`
112
113 # Since DOS filename conventions don't allow two dots,
114 # the DOS version of Bison writes out y_tab.c instead of y.tab.c
115 # and y_tab.h instead of y.tab.h. Test to see if this is the case.
116 y_tab_nodot=false
117 if test -f y_tab.c || test -f y_tab.h; then
118 y_tab_nodot=true
119 fi
120
121 # The parser itself, the first file, is the destination of the .y.c
122 # rule in the Makefile.
123 parser=$1
124
125 # A sed program to s/FROM/TO/g for all the FROM/TO so that, for
126 # instance, we rename #include "y.tab.h" into #include "parse.h"
127 # during the conversion from y.tab.c to parse.c.
128 sed_fix_filenames=
129
130 # Also rename header guards, as Bison 2.7 for instance uses its header
131 # guard in its implementation file.
132 sed_fix_header_guards=
133
134 while test $# -ne 0; do
135 if test x"$1" = x"--"; then
136 shift
137 break
138 fi
139 from=$1
140 # Handle y_tab.c and y_tab.h output by DOS
141 if $y_tab_nodot; then
142 case $from in
143 "y.tab.c") from=y_tab.c;;
144 "y.tab.h") from=y_tab.h;;
145 esac
146 fi
147 shift
148 to=$1
149 shift
150 sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;"
151 sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;"
152 done
153
154 # The program to run.
155 prog=$1
156 shift
157 # Make any relative path in $prog absolute.
158 case $prog in
159 [\\/]* | ?:[\\/]*) ;;
160 *[\\/]*) prog=`pwd`/$prog ;;
161 esac
162
163 dirname=ylwrap$$
164 do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret'
165 trap "ret=129; $do_exit" 1
166 trap "ret=130; $do_exit" 2
167 trap "ret=141; $do_exit" 13
168 trap "ret=143; $do_exit" 15
169 mkdir $dirname || exit 1
170
171 cd $dirname
172
173 case $# in
174 0) "$prog" "$input" ;;
175 *) "$prog" "$@" "$input" ;;
176 esac
177 ret=$?
178
179 if test $ret -eq 0; then
180 for from in *
181 do
182 to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"`
183 if test -f "$from"; then
184 # If $2 is an absolute path name, then just use that,
185 # otherwise prepend '../'.
186 case $to in
187 [\\/]* | ?:[\\/]*) target=$to;;
188 *) target=../$to;;
189 esac
190
191 # Do not overwrite unchanged header files to avoid useless
192 # recompilations. Always update the parser itself: it is the
193 # destination of the .y.c rule in the Makefile. Divert the
194 # output of all other files to a temporary file so we can
195 # compare them to existing versions.
196 if test $from != $parser; then
197 realtarget=$target
198 target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'`
199 fi
200
201 # Munge "#line" or "#" directives. Don't let the resulting
202 # debug information point at an absolute srcdir. Use the real
203 # output file name, not yy.lex.c for instance. Adjust the
204 # include guards too.
205 sed -e "/^#/!b" \
206 -e "s|$input_rx|$input_sub_rx|" \
207 -e "$sed_fix_filenames" \
208 -e "$sed_fix_header_guards" \
209 "$from" >"$target" || ret=$?
210
211 # Check whether files must be updated.
212 if test "$from" != "$parser"; then
213 if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
214 echo "$to is unchanged"
215 rm -f "$target"
216 else
217 echo "updating $to"
218 mv -f "$target" "$realtarget"
219 fi
220 fi
221 else
222 # A missing file is only an error for the parser. This is a
223 # blatant hack to let us support using "yacc -d". If -d is not
224 # specified, don't fail when the header file is "missing".
225 if test "$from" = "$parser"; then
226 ret=1
227 fi
228 fi
229 done
230 fi
231
232 # Remove the directory.
233 cd ..
234 rm -rf $dirname
235
236 exit $ret
237
238 # Local Variables:
239 # mode: shell-script
240 # sh-indentation: 2
241 # eval: (add-hook 'write-file-hooks 'time-stamp)
242 # time-stamp-start: "scriptversion="
243 # time-stamp-format: "%:y-%02m-%02d.%02H"
244 # time-stamp-time-zone: "UTC"
245 # time-stamp-end: "; # UTC"
246 # End:
00 /* paranoia.c
11 *
2 * Copyright (C)2015 J. Lemmens
2 * Copyright (C)2017 J. Lemmens
33 *
44 * This program is free software; you can redistribute it and/or modify it
55 * under the terms of the GNU General Public License as published by the
6262 pid_t play_track (misc_t *misc, char *out_file, char *type,
6363 lsn_t from)
6464 {
65 cdio_paranoia_free (misc->par);
6665 init_paranoia (misc);
6766 switch (misc->cdda_pid = fork ())
6867 {
+0
-10079
texinfo.tex less more
0 % texinfo.tex -- TeX macros to handle Texinfo files.
1 %
2 % Load plain if necessary, i.e., if running under initex.
3 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
4 %
5 \def\texinfoversion{2013-02-01.11}
6 %
7 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
8 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
9 % 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
10 %
11 % This texinfo.tex file is free software: you can redistribute it and/or
12 % modify it under the terms of the GNU General Public License as
13 % published by the Free Software Foundation, either version 3 of the
14 % License, or (at your option) any later version.
15 %
16 % This texinfo.tex file is distributed in the hope that it will be
17 % useful, but WITHOUT ANY WARRANTY; without even the implied warranty
18 % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 % General Public License for more details.
20 %
21 % You should have received a copy of the GNU General Public License
22 % along with this program. If not, see <http://www.gnu.org/licenses/>.
23 %
24 % As a special exception, when this file is read by TeX when processing
25 % a Texinfo source document, you may use the result without
26 % restriction. This Exception is an additional permission under section 7
27 % of the GNU General Public License, version 3 ("GPLv3").
28 %
29 % Please try the latest version of texinfo.tex before submitting bug
30 % reports; you can get the latest version from:
31 % http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or
32 % http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or
33 % http://www.gnu.org/software/texinfo/ (the Texinfo home page)
34 % The texinfo.tex in any given distribution could well be out
35 % of date, so if that's what you're using, please check.
36 %
37 % Send bug reports to bug-texinfo@gnu.org. Please include including a
38 % complete document in each bug report with which we can reproduce the
39 % problem. Patches are, of course, greatly appreciated.
40 %
41 % To process a Texinfo manual with TeX, it's most reliable to use the
42 % texi2dvi shell script that comes with the distribution. For a simple
43 % manual foo.texi, however, you can get away with this:
44 % tex foo.texi
45 % texindex foo.??
46 % tex foo.texi
47 % tex foo.texi
48 % dvips foo.dvi -o # or whatever; this makes foo.ps.
49 % The extra TeX runs get the cross-reference information correct.
50 % Sometimes one run after texindex suffices, and sometimes you need more
51 % than two; texi2dvi does it as many times as necessary.
52 %
53 % It is possible to adapt texinfo.tex for other languages, to some
54 % extent. You can get the existing language-specific files from the
55 % full Texinfo distribution.
56 %
57 % The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
58
59
60 \message{Loading texinfo [version \texinfoversion]:}
61
62 % If in a .fmt file, print the version number
63 % and turn on active characters that we couldn't do earlier because
64 % they might have appeared in the input file name.
65 \everyjob{\message{[Texinfo version \texinfoversion]}%
66 \catcode`+=\active \catcode`\_=\active}
67
68 \chardef\other=12
69
70 % We never want plain's \outer definition of \+ in Texinfo.
71 % For @tex, we can use \tabalign.
72 \let\+ = \relax
73
74 % Save some plain tex macros whose names we will redefine.
75 \let\ptexb=\b
76 \let\ptexbullet=\bullet
77 \let\ptexc=\c
78 \let\ptexcomma=\,
79 \let\ptexdot=\.
80 \let\ptexdots=\dots
81 \let\ptexend=\end
82 \let\ptexequiv=\equiv
83 \let\ptexexclam=\!
84 \let\ptexfootnote=\footnote
85 \let\ptexgtr=>
86 \let\ptexhat=^
87 \let\ptexi=\i
88 \let\ptexindent=\indent
89 \let\ptexinsert=\insert
90 \let\ptexlbrace=\{
91 \let\ptexless=<
92 \let\ptexnewwrite\newwrite
93 \let\ptexnoindent=\noindent
94 \let\ptexplus=+
95 \let\ptexraggedright=\raggedright
96 \let\ptexrbrace=\}
97 \let\ptexslash=\/
98 \let\ptexstar=\*
99 \let\ptext=\t
100 \let\ptextop=\top
101 {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
102
103 % If this character appears in an error message or help string, it
104 % starts a new line in the output.
105 \newlinechar = `^^J
106
107 % Use TeX 3.0's \inputlineno to get the line number, for better error
108 % messages, but if we're using an old version of TeX, don't do anything.
109 %
110 \ifx\inputlineno\thisisundefined
111 \let\linenumber = \empty % Pre-3.0.
112 \else
113 \def\linenumber{l.\the\inputlineno:\space}
114 \fi
115
116 % Set up fixed words for English if not already set.
117 \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
118 \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
119 \ifx\putworderror\undefined \gdef\putworderror{error}\fi
120 \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
121 \ifx\putwordin\undefined \gdef\putwordin{in}\fi
122 \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
123 \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
124 \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
125 \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
126 \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
127 \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
128 \ifx\putwordof\undefined \gdef\putwordof{of}\fi
129 \ifx\putwordon\undefined \gdef\putwordon{on}\fi
130 \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
131 \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
132 \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
133 \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
134 \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
135 \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
136 \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
137 %
138 \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
139 \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
140 \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
141 \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
142 \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
143 \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
144 \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
145 \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
146 \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
147 \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
148 \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
149 \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
150 %
151 \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
152 \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
153 \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
154 \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
155 \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
156
157 % Since the category of space is not known, we have to be careful.
158 \chardef\spacecat = 10
159 \def\spaceisspace{\catcode`\ =\spacecat}
160
161 % sometimes characters are active, so we need control sequences.
162 \chardef\ampChar = `\&
163 \chardef\colonChar = `\:
164 \chardef\commaChar = `\,
165 \chardef\dashChar = `\-
166 \chardef\dotChar = `\.
167 \chardef\exclamChar= `\!
168 \chardef\hashChar = `\#
169 \chardef\lquoteChar= `\`
170 \chardef\questChar = `\?
171 \chardef\rquoteChar= `\'
172 \chardef\semiChar = `\;
173 \chardef\slashChar = `\/
174 \chardef\underChar = `\_
175
176 % Ignore a token.
177 %
178 \def\gobble#1{}
179
180 % The following is used inside several \edef's.
181 \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
182
183 % Hyphenation fixes.
184 \hyphenation{
185 Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
186 ap-pen-dix bit-map bit-maps
187 data-base data-bases eshell fall-ing half-way long-est man-u-script
188 man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
189 par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
190 spell-ing spell-ings
191 stand-alone strong-est time-stamp time-stamps which-ever white-space
192 wide-spread wrap-around
193 }
194
195 % Margin to add to right of even pages, to left of odd pages.
196 \newdimen\bindingoffset
197 \newdimen\normaloffset
198 \newdimen\pagewidth \newdimen\pageheight
199
200 % For a final copy, take out the rectangles
201 % that mark overfull boxes (in case you have decided
202 % that the text looks ok even though it passes the margin).
203 %
204 \def\finalout{\overfullrule=0pt }
205
206 % Sometimes it is convenient to have everything in the transcript file
207 % and nothing on the terminal. We don't just call \tracingall here,
208 % since that produces some useless output on the terminal. We also make
209 % some effort to order the tracing commands to reduce output in the log
210 % file; cf. trace.sty in LaTeX.
211 %
212 \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
213 \def\loggingall{%
214 \tracingstats2
215 \tracingpages1
216 \tracinglostchars2 % 2 gives us more in etex
217 \tracingparagraphs1
218 \tracingoutput1
219 \tracingmacros2
220 \tracingrestores1
221 \showboxbreadth\maxdimen \showboxdepth\maxdimen
222 \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
223 \tracingscantokens1
224 \tracingifs1
225 \tracinggroups1
226 \tracingnesting2
227 \tracingassigns1
228 \fi
229 \tracingcommands3 % 3 gives us more in etex
230 \errorcontextlines16
231 }%
232
233 % @errormsg{MSG}. Do the index-like expansions on MSG, but if things
234 % aren't perfect, it's not the end of the world, being an error message,
235 % after all.
236 %
237 \def\errormsg{\begingroup \indexnofonts \doerrormsg}
238 \def\doerrormsg#1{\errmessage{#1}}
239
240 % add check for \lastpenalty to plain's definitions. If the last thing
241 % we did was a \nobreak, we don't want to insert more space.
242 %
243 \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
244 \removelastskip\penalty-50\smallskip\fi\fi}
245 \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
246 \removelastskip\penalty-100\medskip\fi\fi}
247 \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
248 \removelastskip\penalty-200\bigskip\fi\fi}
249
250 % Do @cropmarks to get crop marks.
251 %
252 \newif\ifcropmarks
253 \let\cropmarks = \cropmarkstrue
254 %
255 % Dimensions to add cropmarks at corners.
256 % Added by P. A. MacKay, 12 Nov. 1986
257 %
258 \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
259 \newdimen\cornerlong \cornerlong=1pc
260 \newdimen\cornerthick \cornerthick=.3pt
261 \newdimen\topandbottommargin \topandbottommargin=.75in
262
263 % Output a mark which sets \thischapter, \thissection and \thiscolor.
264 % We dump everything together because we only have one kind of mark.
265 % This works because we only use \botmark / \topmark, not \firstmark.
266 %
267 % A mark contains a subexpression of the \ifcase ... \fi construct.
268 % \get*marks macros below extract the needed part using \ifcase.
269 %
270 % Another complication is to let the user choose whether \thischapter
271 % (\thissection) refers to the chapter (section) in effect at the top
272 % of a page, or that at the bottom of a page. The solution is
273 % described on page 260 of The TeXbook. It involves outputting two
274 % marks for the sectioning macros, one before the section break, and
275 % one after. I won't pretend I can describe this better than DEK...
276 \def\domark{%
277 \toks0=\expandafter{\lastchapterdefs}%
278 \toks2=\expandafter{\lastsectiondefs}%
279 \toks4=\expandafter{\prevchapterdefs}%
280 \toks6=\expandafter{\prevsectiondefs}%
281 \toks8=\expandafter{\lastcolordefs}%
282 \mark{%
283 \the\toks0 \the\toks2
284 \noexpand\or \the\toks4 \the\toks6
285 \noexpand\else \the\toks8
286 }%
287 }
288 % \topmark doesn't work for the very first chapter (after the title
289 % page or the contents), so we use \firstmark there -- this gets us
290 % the mark with the chapter defs, unless the user sneaks in, e.g.,
291 % @setcolor (or @url, or @link, etc.) between @contents and the very
292 % first @chapter.
293 \def\gettopheadingmarks{%
294 \ifcase0\topmark\fi
295 \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
296 }
297 \def\getbottomheadingmarks{\ifcase1\botmark\fi}
298 \def\getcolormarks{\ifcase2\topmark\fi}
299
300 % Avoid "undefined control sequence" errors.
301 \def\lastchapterdefs{}
302 \def\lastsectiondefs{}
303 \def\prevchapterdefs{}
304 \def\prevsectiondefs{}
305 \def\lastcolordefs{}
306
307 % Main output routine.
308 \chardef\PAGE = 255
309 \output = {\onepageout{\pagecontents\PAGE}}
310
311 \newbox\headlinebox
312 \newbox\footlinebox
313
314 % \onepageout takes a vbox as an argument. Note that \pagecontents
315 % does insertions, but you have to call it yourself.
316 \def\onepageout#1{%
317 \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
318 %
319 \ifodd\pageno \advance\hoffset by \bindingoffset
320 \else \advance\hoffset by -\bindingoffset\fi
321 %
322 % Do this outside of the \shipout so @code etc. will be expanded in
323 % the headline as they should be, not taken literally (outputting ''code).
324 \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
325 \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
326 \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
327 \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
328 %
329 {%
330 % Have to do this stuff outside the \shipout because we want it to
331 % take effect in \write's, yet the group defined by the \vbox ends
332 % before the \shipout runs.
333 %
334 \indexdummies % don't expand commands in the output.
335 \normalturnoffactive % \ in index entries must not stay \, e.g., if
336 % the page break happens to be in the middle of an example.
337 % We don't want .vr (or whatever) entries like this:
338 % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
339 % "\acronym" won't work when it's read back in;
340 % it needs to be
341 % {\code {{\tt \backslashcurfont }acronym}
342 \shipout\vbox{%
343 % Do this early so pdf references go to the beginning of the page.
344 \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
345 %
346 \ifcropmarks \vbox to \outervsize\bgroup
347 \hsize = \outerhsize
348 \vskip-\topandbottommargin
349 \vtop to0pt{%
350 \line{\ewtop\hfil\ewtop}%
351 \nointerlineskip
352 \line{%
353 \vbox{\moveleft\cornerthick\nstop}%
354 \hfill
355 \vbox{\moveright\cornerthick\nstop}%
356 }%
357 \vss}%
358 \vskip\topandbottommargin
359 \line\bgroup
360 \hfil % center the page within the outer (page) hsize.
361 \ifodd\pageno\hskip\bindingoffset\fi
362 \vbox\bgroup
363 \fi
364 %
365 \unvbox\headlinebox
366 \pagebody{#1}%
367 \ifdim\ht\footlinebox > 0pt
368 % Only leave this space if the footline is nonempty.
369 % (We lessened \vsize for it in \oddfootingyyy.)
370 % The \baselineskip=24pt in plain's \makefootline has no effect.
371 \vskip 24pt
372 \unvbox\footlinebox
373 \fi
374 %
375 \ifcropmarks
376 \egroup % end of \vbox\bgroup
377 \hfil\egroup % end of (centering) \line\bgroup
378 \vskip\topandbottommargin plus1fill minus1fill
379 \boxmaxdepth = \cornerthick
380 \vbox to0pt{\vss
381 \line{%
382 \vbox{\moveleft\cornerthick\nsbot}%
383 \hfill
384 \vbox{\moveright\cornerthick\nsbot}%
385 }%
386 \nointerlineskip
387 \line{\ewbot\hfil\ewbot}%
388 }%
389 \egroup % \vbox from first cropmarks clause
390 \fi
391 }% end of \shipout\vbox
392 }% end of group with \indexdummies
393 \advancepageno
394 \ifnum\outputpenalty>-20000 \else\dosupereject\fi
395 }
396
397 \newinsert\margin \dimen\margin=\maxdimen
398
399 \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
400 {\catcode`\@ =11
401 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
402 % marginal hacks, juha@viisa.uucp (Juha Takala)
403 \ifvoid\margin\else % marginal info is present
404 \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
405 \dimen@=\dp#1\relax \unvbox#1\relax
406 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
407 \ifr@ggedbottom \kern-\dimen@ \vfil \fi}
408 }
409
410 % Here are the rules for the cropmarks. Note that they are
411 % offset so that the space between them is truly \outerhsize or \outervsize
412 % (P. A. MacKay, 12 November, 1986)
413 %
414 \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
415 \def\nstop{\vbox
416 {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
417 \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
418 \def\nsbot{\vbox
419 {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
420
421 % Parse an argument, then pass it to #1. The argument is the rest of
422 % the input line (except we remove a trailing comment). #1 should be a
423 % macro which expects an ordinary undelimited TeX argument.
424 %
425 \def\parsearg{\parseargusing{}}
426 \def\parseargusing#1#2{%
427 \def\argtorun{#2}%
428 \begingroup
429 \obeylines
430 \spaceisspace
431 #1%
432 \parseargline\empty% Insert the \empty token, see \finishparsearg below.
433 }
434
435 {\obeylines %
436 \gdef\parseargline#1^^M{%
437 \endgroup % End of the group started in \parsearg.
438 \argremovecomment #1\comment\ArgTerm%
439 }%
440 }
441
442 % First remove any @comment, then any @c comment.
443 \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
444 \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
445
446 % Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
447 %
448 % \argremovec might leave us with trailing space, e.g.,
449 % @end itemize @c foo
450 % This space token undergoes the same procedure and is eventually removed
451 % by \finishparsearg.
452 %
453 \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
454 \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
455 \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
456 \def\temp{#3}%
457 \ifx\temp\empty
458 % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
459 \let\temp\finishparsearg
460 \else
461 \let\temp\argcheckspaces
462 \fi
463 % Put the space token in:
464 \temp#1 #3\ArgTerm
465 }
466
467 % If a _delimited_ argument is enclosed in braces, they get stripped; so
468 % to get _exactly_ the rest of the line, we had to prevent such situation.
469 % We prepended an \empty token at the very beginning and we expand it now,
470 % just before passing the control to \argtorun.
471 % (Similarly, we have to think about #3 of \argcheckspacesY above: it is
472 % either the null string, or it ends with \^^M---thus there is no danger
473 % that a pair of braces would be stripped.
474 %
475 % But first, we have to remove the trailing space token.
476 %
477 \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
478
479 % \parseargdef\foo{...}
480 % is roughly equivalent to
481 % \def\foo{\parsearg\Xfoo}
482 % \def\Xfoo#1{...}
483 %
484 % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
485 % favourite TeX trick. --kasal, 16nov03
486
487 \def\parseargdef#1{%
488 \expandafter \doparseargdef \csname\string#1\endcsname #1%
489 }
490 \def\doparseargdef#1#2{%
491 \def#2{\parsearg#1}%
492 \def#1##1%
493 }
494
495 % Several utility definitions with active space:
496 {
497 \obeyspaces
498 \gdef\obeyedspace{ }
499
500 % Make each space character in the input produce a normal interword
501 % space in the output. Don't allow a line break at this space, as this
502 % is used only in environments like @example, where each line of input
503 % should produce a line of output anyway.
504 %
505 \gdef\sepspaces{\obeyspaces\let =\tie}
506
507 % If an index command is used in an @example environment, any spaces
508 % therein should become regular spaces in the raw index file, not the
509 % expansion of \tie (\leavevmode \penalty \@M \ ).
510 \gdef\unsepspaces{\let =\space}
511 }
512
513
514 \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
515
516 % Define the framework for environments in texinfo.tex. It's used like this:
517 %
518 % \envdef\foo{...}
519 % \def\Efoo{...}
520 %
521 % It's the responsibility of \envdef to insert \begingroup before the
522 % actual body; @end closes the group after calling \Efoo. \envdef also
523 % defines \thisenv, so the current environment is known; @end checks
524 % whether the environment name matches. The \checkenv macro can also be
525 % used to check whether the current environment is the one expected.
526 %
527 % Non-false conditionals (@iftex, @ifset) don't fit into this, so they
528 % are not treated as environments; they don't open a group. (The
529 % implementation of @end takes care not to call \endgroup in this
530 % special case.)
531
532
533 % At run-time, environments start with this:
534 \def\startenvironment#1{\begingroup\def\thisenv{#1}}
535 % initialize
536 \let\thisenv\empty
537
538 % ... but they get defined via ``\envdef\foo{...}'':
539 \long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
540 \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
541
542 % Check whether we're in the right environment:
543 \def\checkenv#1{%
544 \def\temp{#1}%
545 \ifx\thisenv\temp
546 \else
547 \badenverr
548 \fi
549 }
550
551 % Environment mismatch, #1 expected:
552 \def\badenverr{%
553 \errhelp = \EMsimple
554 \errmessage{This command can appear only \inenvironment\temp,
555 not \inenvironment\thisenv}%
556 }
557 \def\inenvironment#1{%
558 \ifx#1\empty
559 outside of any environment%
560 \else
561 in environment \expandafter\string#1%
562 \fi
563 }
564
565 % @end foo executes the definition of \Efoo.
566 % But first, it executes a specialized version of \checkenv
567 %
568 \parseargdef\end{%
569 \if 1\csname iscond.#1\endcsname
570 \else
571 % The general wording of \badenverr may not be ideal.
572 \expandafter\checkenv\csname#1\endcsname
573 \csname E#1\endcsname
574 \endgroup
575 \fi
576 }
577
578 \newhelp\EMsimple{Press RETURN to continue.}
579
580
581 % Be sure we're in horizontal mode when doing a tie, since we make space
582 % equivalent to this in @example-like environments. Otherwise, a space
583 % at the beginning of a line will start with \penalty -- and
584 % since \penalty is valid in vertical mode, we'd end up putting the
585 % penalty on the vertical list instead of in the new paragraph.
586 {\catcode`@ = 11
587 % Avoid using \@M directly, because that causes trouble
588 % if the definition is written into an index file.
589 \global\let\tiepenalty = \@M
590 \gdef\tie{\leavevmode\penalty\tiepenalty\ }
591 }
592
593 % @: forces normal size whitespace following.
594 \def\:{\spacefactor=1000 }
595
596 % @* forces a line break.
597 \def\*{\unskip\hfil\break\hbox{}\ignorespaces}
598
599 % @/ allows a line break.
600 \let\/=\allowbreak
601
602 % @. is an end-of-sentence period.
603 \def\.{.\spacefactor=\endofsentencespacefactor\space}
604
605 % @! is an end-of-sentence bang.
606 \def\!{!\spacefactor=\endofsentencespacefactor\space}
607
608 % @? is an end-of-sentence query.
609 \def\?{?\spacefactor=\endofsentencespacefactor\space}
610
611 % @frenchspacing on|off says whether to put extra space after punctuation.
612 %
613 \def\onword{on}
614 \def\offword{off}
615 %
616 \parseargdef\frenchspacing{%
617 \def\temp{#1}%
618 \ifx\temp\onword \plainfrenchspacing
619 \else\ifx\temp\offword \plainnonfrenchspacing
620 \else
621 \errhelp = \EMsimple
622 \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
623 \fi\fi
624 }
625
626 % @w prevents a word break. Without the \leavevmode, @w at the
627 % beginning of a paragraph, when TeX is still in vertical mode, would
628 % produce a whole line of output instead of starting the paragraph.
629 \def\w#1{\leavevmode\hbox{#1}}
630
631 % @group ... @end group forces ... to be all on one page, by enclosing
632 % it in a TeX vbox. We use \vtop instead of \vbox to construct the box
633 % to keep its height that of a normal line. According to the rules for
634 % \topskip (p.114 of the TeXbook), the glue inserted is
635 % max (\topskip - \ht (first item), 0). If that height is large,
636 % therefore, no glue is inserted, and the space between the headline and
637 % the text is small, which looks bad.
638 %
639 % Another complication is that the group might be very large. This can
640 % cause the glue on the previous page to be unduly stretched, because it
641 % does not have much material. In this case, it's better to add an
642 % explicit \vfill so that the extra space is at the bottom. The
643 % threshold for doing this is if the group is more than \vfilllimit
644 % percent of a page (\vfilllimit can be changed inside of @tex).
645 %
646 \newbox\groupbox
647 \def\vfilllimit{0.7}
648 %
649 \envdef\group{%
650 \ifnum\catcode`\^^M=\active \else
651 \errhelp = \groupinvalidhelp
652 \errmessage{@group invalid in context where filling is enabled}%
653 \fi
654 \startsavinginserts
655 %
656 \setbox\groupbox = \vtop\bgroup
657 % Do @comment since we are called inside an environment such as
658 % @example, where each end-of-line in the input causes an
659 % end-of-line in the output. We don't want the end-of-line after
660 % the `@group' to put extra space in the output. Since @group
661 % should appear on a line by itself (according to the Texinfo
662 % manual), we don't worry about eating any user text.
663 \comment
664 }
665 %
666 % The \vtop produces a box with normal height and large depth; thus, TeX puts
667 % \baselineskip glue before it, and (when the next line of text is done)
668 % \lineskip glue after it. Thus, space below is not quite equal to space
669 % above. But it's pretty close.
670 \def\Egroup{%
671 % To get correct interline space between the last line of the group
672 % and the first line afterwards, we have to propagate \prevdepth.
673 \endgraf % Not \par, as it may have been set to \lisppar.
674 \global\dimen1 = \prevdepth
675 \egroup % End the \vtop.
676 % \dimen0 is the vertical size of the group's box.
677 \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
678 % \dimen2 is how much space is left on the page (more or less).
679 \dimen2 = \pageheight \advance\dimen2 by -\pagetotal
680 % if the group doesn't fit on the current page, and it's a big big
681 % group, force a page break.
682 \ifdim \dimen0 > \dimen2
683 \ifdim \pagetotal < \vfilllimit\pageheight
684 \page
685 \fi
686 \fi
687 \box\groupbox
688 \prevdepth = \dimen1
689 \checkinserts
690 }
691 %
692 % TeX puts in an \escapechar (i.e., `@') at the beginning of the help
693 % message, so this ends up printing `@group can only ...'.
694 %
695 \newhelp\groupinvalidhelp{%
696 group can only be used in environments such as @example,^^J%
697 where each line of input produces a line of output.}
698
699 % @need space-in-mils
700 % forces a page break if there is not space-in-mils remaining.
701
702 \newdimen\mil \mil=0.001in
703
704 \parseargdef\need{%
705 % Ensure vertical mode, so we don't make a big box in the middle of a
706 % paragraph.
707 \par
708 %
709 % If the @need value is less than one line space, it's useless.
710 \dimen0 = #1\mil
711 \dimen2 = \ht\strutbox
712 \advance\dimen2 by \dp\strutbox
713 \ifdim\dimen0 > \dimen2
714 %
715 % Do a \strut just to make the height of this box be normal, so the
716 % normal leading is inserted relative to the preceding line.
717 % And a page break here is fine.
718 \vtop to #1\mil{\strut\vfil}%
719 %
720 % TeX does not even consider page breaks if a penalty added to the
721 % main vertical list is 10000 or more. But in order to see if the
722 % empty box we just added fits on the page, we must make it consider
723 % page breaks. On the other hand, we don't want to actually break the
724 % page after the empty box. So we use a penalty of 9999.
725 %
726 % There is an extremely small chance that TeX will actually break the
727 % page at this \penalty, if there are no other feasible breakpoints in
728 % sight. (If the user is using lots of big @group commands, which
729 % almost-but-not-quite fill up a page, TeX will have a hard time doing
730 % good page breaking, for example.) However, I could not construct an
731 % example where a page broke at this \penalty; if it happens in a real
732 % document, then we can reconsider our strategy.
733 \penalty9999
734 %
735 % Back up by the size of the box, whether we did a page break or not.
736 \kern -#1\mil
737 %
738 % Do not allow a page break right after this kern.
739 \nobreak
740 \fi
741 }
742
743 % @br forces paragraph break (and is undocumented).
744
745 \let\br = \par
746
747 % @page forces the start of a new page.
748 %
749 \def\page{\par\vfill\supereject}
750
751 % @exdent text....
752 % outputs text on separate line in roman font, starting at standard page margin
753
754 % This records the amount of indent in the innermost environment.
755 % That's how much \exdent should take out.
756 \newskip\exdentamount
757
758 % This defn is used inside fill environments such as @defun.
759 \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}
760
761 % This defn is used inside nofill environments such as @example.
762 \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount
763 \leftline{\hskip\leftskip{\rm#1}}}}
764
765 % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
766 % paragraph. For more general purposes, use the \margin insertion
767 % class. WHICH is `l' or `r'. Not documented, written for gawk manual.
768 %
769 \newskip\inmarginspacing \inmarginspacing=1cm
770 \def\strutdepth{\dp\strutbox}
771 %
772 \def\doinmargin#1#2{\strut\vadjust{%
773 \nobreak
774 \kern-\strutdepth
775 \vtop to \strutdepth{%
776 \baselineskip=\strutdepth
777 \vss
778 % if you have multiple lines of stuff to put here, you'll need to
779 % make the vbox yourself of the appropriate size.
780 \ifx#1l%
781 \llap{\ignorespaces #2\hskip\inmarginspacing}%
782 \else
783 \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
784 \fi
785 \null
786 }%
787 }}
788 \def\inleftmargin{\doinmargin l}
789 \def\inrightmargin{\doinmargin r}
790 %
791 % @inmargin{TEXT [, RIGHT-TEXT]}
792 % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
793 % else use TEXT for both).
794 %
795 \def\inmargin#1{\parseinmargin #1,,\finish}
796 \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
797 \setbox0 = \hbox{\ignorespaces #2}%
798 \ifdim\wd0 > 0pt
799 \def\lefttext{#1}% have both texts
800 \def\righttext{#2}%
801 \else
802 \def\lefttext{#1}% have only one text
803 \def\righttext{#1}%
804 \fi
805 %
806 \ifodd\pageno
807 \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
808 \else
809 \def\temp{\inleftmargin\lefttext}%
810 \fi
811 \temp
812 }
813
814 % @| inserts a changebar to the left of the current line. It should
815 % surround any changed text. This approach does *not* work if the
816 % change spans more than two lines of output. To handle that, we would
817 % have adopt a much more difficult approach (putting marks into the main
818 % vertical list for the beginning and end of each change). This command
819 % is not documented, not supported, and doesn't work.
820 %
821 \def\|{%
822 % \vadjust can only be used in horizontal mode.
823 \leavevmode
824 %
825 % Append this vertical mode material after the current line in the output.
826 \vadjust{%
827 % We want to insert a rule with the height and depth of the current
828 % leading; that is exactly what \strutbox is supposed to record.
829 \vskip-\baselineskip
830 %
831 % \vadjust-items are inserted at the left edge of the type. So
832 % the \llap here moves out into the left-hand margin.
833 \llap{%
834 %
835 % For a thicker or thinner bar, change the `1pt'.
836 \vrule height\baselineskip width1pt
837 %
838 % This is the space between the bar and the text.
839 \hskip 12pt
840 }%
841 }%
842 }
843
844 % @include FILE -- \input text of FILE.
845 %
846 \def\include{\parseargusing\filenamecatcodes\includezzz}
847 \def\includezzz#1{%
848 \pushthisfilestack
849 \def\thisfile{#1}%
850 {%
851 \makevalueexpandable % we want to expand any @value in FILE.
852 \turnoffactive % and allow special characters in the expansion
853 \indexnofonts % Allow `@@' and other weird things in file names.
854 \wlog{texinfo.tex: doing @include of #1^^J}%
855 \edef\temp{\noexpand\input #1 }%
856 %
857 % This trickery is to read FILE outside of a group, in case it makes
858 % definitions, etc.
859 \expandafter
860 }\temp
861 \popthisfilestack
862 }
863 \def\filenamecatcodes{%
864 \catcode`\\=\other
865 \catcode`~=\other
866 \catcode`^=\other
867 \catcode`_=\other
868 \catcode`|=\other
869 \catcode`<=\other
870 \catcode`>=\other
871 \catcode`+=\other
872 \catcode`-=\other
873 \catcode`\`=\other
874 \catcode`\'=\other
875 }
876
877 \def\pushthisfilestack{%
878 \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
879 }
880 \def\pushthisfilestackX{%
881 \expandafter\pushthisfilestackY\thisfile\StackTerm
882 }
883 \def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
884 \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
885 }
886
887 \def\popthisfilestack{\errthisfilestackempty}
888 \def\errthisfilestackempty{\errmessage{Internal error:
889 the stack of filenames is empty.}}
890 %
891 \def\thisfile{}
892
893 % @center line
894 % outputs that line, centered.
895 %
896 \parseargdef\center{%
897 \ifhmode
898 \let\centersub\centerH
899 \else
900 \let\centersub\centerV
901 \fi
902 \centersub{\hfil \ignorespaces#1\unskip \hfil}%
903 \let\centersub\relax % don't let the definition persist, just in case
904 }
905 \def\centerH#1{{%
906 \hfil\break
907 \advance\hsize by -\leftskip
908 \advance\hsize by -\rightskip
909 \line{#1}%
910 \break
911 }}
912 %
913 \newcount\centerpenalty
914 \def\centerV#1{%
915 % The idea here is the same as in \startdefun, \cartouche, etc.: if
916 % @center is the first thing after a section heading, we need to wipe
917 % out the negative parskip inserted by \sectionheading, but still
918 % prevent a page break here.
919 \centerpenalty = \lastpenalty
920 \ifnum\centerpenalty>10000 \vskip\parskip \fi
921 \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi
922 \line{\kern\leftskip #1\kern\rightskip}%
923 }
924
925 % @sp n outputs n lines of vertical space
926 %
927 \parseargdef\sp{\vskip #1\baselineskip}
928
929 % @comment ...line which is ignored...
930 % @c is the same as @comment
931 % @ignore ... @end ignore is another way to write a comment
932 %
933 \def\comment{\begingroup \catcode`\^^M=\other%
934 \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
935 \commentxxx}
936 {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
937 %
938 \let\c=\comment
939
940 % @paragraphindent NCHARS
941 % We'll use ems for NCHARS, close enough.
942 % NCHARS can also be the word `asis' or `none'.
943 % We cannot feasibly implement @paragraphindent asis, though.
944 %
945 \def\asisword{asis} % no translation, these are keywords
946 \def\noneword{none}
947 %
948 \parseargdef\paragraphindent{%
949 \def\temp{#1}%
950 \ifx\temp\asisword
951 \else
952 \ifx\temp\noneword
953 \defaultparindent = 0pt
954 \else
955 \defaultparindent = #1em
956 \fi
957 \fi
958 \parindent = \defaultparindent
959 }
960
961 % @exampleindent NCHARS
962 % We'll use ems for NCHARS like @paragraphindent.
963 % It seems @exampleindent asis isn't necessary, but
964 % I preserve it to make it similar to @paragraphindent.
965 \parseargdef\exampleindent{%
966 \def\temp{#1}%
967 \ifx\temp\asisword
968 \else
969 \ifx\temp\noneword
970 \lispnarrowing = 0pt
971 \else
972 \lispnarrowing = #1em
973 \fi
974 \fi
975 }
976
977 % @firstparagraphindent WORD
978 % If WORD is `none', then suppress indentation of the first paragraph
979 % after a section heading. If WORD is `insert', then do indent at such
980 % paragraphs.
981 %
982 % The paragraph indentation is suppressed or not by calling
983 % \suppressfirstparagraphindent, which the sectioning commands do.
984 % We switch the definition of this back and forth according to WORD.
985 % By default, we suppress indentation.
986 %
987 \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
988 \def\insertword{insert}
989 %
990 \parseargdef\firstparagraphindent{%
991 \def\temp{#1}%
992 \ifx\temp\noneword
993 \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
994 \else\ifx\temp\insertword
995 \let\suppressfirstparagraphindent = \relax
996 \else
997 \errhelp = \EMsimple
998 \errmessage{Unknown @firstparagraphindent option `\temp'}%
999 \fi\fi
1000 }
1001
1002 % Here is how we actually suppress indentation. Redefine \everypar to
1003 % \kern backwards by \parindent, and then reset itself to empty.
1004 %
1005 % We also make \indent itself not actually do anything until the next
1006 % paragraph.
1007 %
1008 \gdef\dosuppressfirstparagraphindent{%
1009 \gdef\indent{%
1010 \restorefirstparagraphindent
1011 \indent
1012 }%
1013 \gdef\noindent{%
1014 \restorefirstparagraphindent
1015 \noindent
1016 }%
1017 \global\everypar = {%
1018 \kern -\parindent
1019 \restorefirstparagraphindent
1020 }%
1021 }
1022
1023 \gdef\restorefirstparagraphindent{%
1024 \global \let \indent = \ptexindent
1025 \global \let \noindent = \ptexnoindent
1026 \global \everypar = {}%
1027 }
1028
1029
1030 % @refill is a no-op.
1031 \let\refill=\relax
1032
1033 % If working on a large document in chapters, it is convenient to
1034 % be able to disable indexing, cross-referencing, and contents, for test runs.
1035 % This is done with @novalidate (before @setfilename).
1036 %
1037 \newif\iflinks \linkstrue % by default we want the aux files.
1038 \let\novalidate = \linksfalse
1039
1040 % @setfilename is done at the beginning of every texinfo file.
1041 % So open here the files we need to have open while reading the input.
1042 % This makes it possible to make a .fmt file for texinfo.
1043 \def\setfilename{%
1044 \fixbackslash % Turn off hack to swallow `\input texinfo'.
1045 \iflinks
1046 \tryauxfile
1047 % Open the new aux file. TeX will close it automatically at exit.
1048 \immediate\openout\auxfile=\jobname.aux
1049 \fi % \openindices needs to do some work in any case.
1050 \openindices
1051 \let\setfilename=\comment % Ignore extra @setfilename cmds.
1052 %
1053 % If texinfo.cnf is present on the system, read it.
1054 % Useful for site-wide @afourpaper, etc.
1055 \openin 1 texinfo.cnf
1056 \ifeof 1 \else \input texinfo.cnf \fi
1057 \closein 1
1058 %
1059 \comment % Ignore the actual filename.
1060 }
1061
1062 % Called from \setfilename.
1063 %
1064 \def\openindices{%
1065 \newindex{cp}%
1066 \newcodeindex{fn}%
1067 \newcodeindex{vr}%
1068 \newcodeindex{tp}%
1069 \newcodeindex{ky}%
1070 \newcodeindex{pg}%
1071 }
1072
1073 % @bye.
1074 \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
1075
1076
1077 \message{pdf,}
1078 % adobe `portable' document format
1079 \newcount\tempnum
1080 \newcount\lnkcount
1081 \newtoks\filename
1082 \newcount\filenamelength
1083 \newcount\pgn
1084 \newtoks\toksA
1085 \newtoks\toksB
1086 \newtoks\toksC
1087 \newtoks\toksD
1088 \newbox\boxA
1089 \newcount\countA
1090 \newif\ifpdf
1091 \newif\ifpdfmakepagedest
1092
1093 % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
1094 % can be set). So we test for \relax and 0 as well as being undefined.
1095 \ifx\pdfoutput\thisisundefined
1096 \else
1097 \ifx\pdfoutput\relax
1098 \else
1099 \ifcase\pdfoutput
1100 \else
1101 \pdftrue
1102 \fi
1103 \fi
1104 \fi
1105
1106 % PDF uses PostScript string constants for the names of xref targets,
1107 % for display in the outlines, and in other places. Thus, we have to
1108 % double any backslashes. Otherwise, a name like "\node" will be
1109 % interpreted as a newline (\n), followed by o, d, e. Not good.
1110 %
1111 % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
1112 % related messages. The final outcome is that it is up to the TeX user
1113 % to double the backslashes and otherwise make the string valid, so
1114 % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
1115 % do this reliably, so we use it.
1116
1117 % #1 is a control sequence in which to do the replacements,
1118 % which we \xdef.
1119 \def\txiescapepdf#1{%
1120 \ifx\pdfescapestring\thisisundefined
1121 % No primitive available; should we give a warning or log?
1122 % Many times it won't matter.
1123 \else
1124 % The expandable \pdfescapestring primitive escapes parentheses,
1125 % backslashes, and other special chars.
1126 \xdef#1{\pdfescapestring{#1}}%
1127 \fi
1128 }
1129
1130 \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
1131 with PDF output, and none of those formats could be found. (.eps cannot
1132 be supported due to the design of the PDF format; use regular TeX (DVI
1133 output) for that.)}
1134
1135 \ifpdf
1136 %
1137 % Color manipulation macros based on pdfcolor.tex,
1138 % except using rgb instead of cmyk; the latter is said to render as a
1139 % very dark gray on-screen and a very dark halftone in print, instead
1140 % of actual black.
1141 \def\rgbDarkRed{0.50 0.09 0.12}
1142 \def\rgbBlack{0 0 0}
1143 %
1144 % k sets the color for filling (usual text, etc.);
1145 % K sets the color for stroking (thin rules, e.g., normal _'s).
1146 \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}}
1147 %
1148 % Set color, and create a mark which defines \thiscolor accordingly,
1149 % so that \makeheadline knows which color to restore.
1150 \def\setcolor#1{%
1151 \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
1152 \domark
1153 \pdfsetcolor{#1}%
1154 }
1155 %
1156 \def\maincolor{\rgbBlack}
1157 \pdfsetcolor{\maincolor}
1158 \edef\thiscolor{\maincolor}
1159 \def\lastcolordefs{}
1160 %
1161 \def\makefootline{%
1162 \baselineskip24pt
1163 \line{\pdfsetcolor{\maincolor}\the\footline}%
1164 }
1165 %
1166 \def\makeheadline{%
1167 \vbox to 0pt{%
1168 \vskip-22.5pt
1169 \line{%
1170 \vbox to8.5pt{}%
1171 % Extract \thiscolor definition from the marks.
1172 \getcolormarks
1173 % Typeset the headline with \maincolor, then restore the color.
1174 \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
1175 }%
1176 \vss
1177 }%
1178 \nointerlineskip
1179 }
1180 %
1181 %
1182 \pdfcatalog{/PageMode /UseOutlines}
1183 %
1184 % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
1185 \def\dopdfimage#1#2#3{%
1186 \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
1187 \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
1188 %
1189 % pdftex (and the PDF format) support .pdf, .png, .jpg (among
1190 % others). Let's try in that order, PDF first since if
1191 % someone has a scalable image, presumably better to use that than a
1192 % bitmap.
1193 \let\pdfimgext=\empty
1194 \begingroup
1195 \openin 1 #1.pdf \ifeof 1
1196 \openin 1 #1.PDF \ifeof 1
1197 \openin 1 #1.png \ifeof 1
1198 \openin 1 #1.jpg \ifeof 1
1199 \openin 1 #1.jpeg \ifeof 1
1200 \openin 1 #1.JPG \ifeof 1
1201 \errhelp = \nopdfimagehelp
1202 \errmessage{Could not find image file #1 for pdf}%
1203 \else \gdef\pdfimgext{JPG}%
1204 \fi
1205 \else \gdef\pdfimgext{jpeg}%
1206 \fi
1207 \else \gdef\pdfimgext{jpg}%
1208 \fi
1209 \else \gdef\pdfimgext{png}%
1210 \fi
1211 \else \gdef\pdfimgext{PDF}%
1212 \fi
1213 \else \gdef\pdfimgext{pdf}%
1214 \fi
1215 \closein 1
1216 \endgroup
1217 %
1218 % without \immediate, ancient pdftex seg faults when the same image is
1219 % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
1220 \ifnum\pdftexversion < 14
1221 \immediate\pdfimage
1222 \else
1223 \immediate\pdfximage
1224 \fi
1225 \ifdim \wd0 >0pt width \pdfimagewidth \fi
1226 \ifdim \wd2 >0pt height \pdfimageheight \fi
1227 \ifnum\pdftexversion<13
1228 #1.\pdfimgext
1229 \else
1230 {#1.\pdfimgext}%
1231 \fi
1232 \ifnum\pdftexversion < 14 \else
1233 \pdfrefximage \pdflastximage
1234 \fi}
1235 %
1236 \def\pdfmkdest#1{{%
1237 % We have to set dummies so commands such as @code, and characters
1238 % such as \, aren't expanded when present in a section title.
1239 \indexnofonts
1240 \turnoffactive
1241 \makevalueexpandable
1242 \def\pdfdestname{#1}%
1243 \txiescapepdf\pdfdestname
1244 \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
1245 }}
1246 %
1247 % used to mark target names; must be expandable.
1248 \def\pdfmkpgn#1{#1}
1249 %
1250 % by default, use a color that is dark enough to print on paper as
1251 % nearly black, but still distinguishable for online viewing.
1252 \def\urlcolor{\rgbDarkRed}
1253 \def\linkcolor{\rgbDarkRed}
1254 \def\endlink{\setcolor{\maincolor}\pdfendlink}
1255 %
1256 % Adding outlines to PDF; macros for calculating structure of outlines
1257 % come from Petr Olsak
1258 \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
1259 \else \csname#1\endcsname \fi}
1260 \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
1261 \advance\tempnum by 1
1262 \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
1263 %
1264 % #1 is the section text, which is what will be displayed in the
1265 % outline by the pdf viewer. #2 is the pdf expression for the number
1266 % of subentries (or empty, for subsubsections). #3 is the node text,
1267 % which might be empty if this toc entry had no corresponding node.
1268 % #4 is the page number
1269 %
1270 \def\dopdfoutline#1#2#3#4{%
1271 % Generate a link to the node text if that exists; else, use the
1272 % page number. We could generate a destination for the section
1273 % text in the case where a section has no node, but it doesn't
1274 % seem worth the trouble, since most documents are normally structured.
1275 \edef\pdfoutlinedest{#3}%
1276 \ifx\pdfoutlinedest\empty
1277 \def\pdfoutlinedest{#4}%
1278 \else
1279 \txiescapepdf\pdfoutlinedest
1280 \fi
1281 %
1282 % Also escape PDF chars in the display string.
1283 \edef\pdfoutlinetext{#1}%
1284 \txiescapepdf\pdfoutlinetext
1285 %
1286 \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
1287 }
1288 %
1289 \def\pdfmakeoutlines{%
1290 \begingroup
1291 % Read toc silently, to get counts of subentries for \pdfoutline.
1292 \def\partentry##1##2##3##4{}% ignore parts in the outlines
1293 \def\numchapentry##1##2##3##4{%
1294 \def\thischapnum{##2}%
1295 \def\thissecnum{0}%
1296 \def\thissubsecnum{0}%
1297 }%
1298 \def\numsecentry##1##2##3##4{%
1299 \advancenumber{chap\thischapnum}%
1300 \def\thissecnum{##2}%
1301 \def\thissubsecnum{0}%
1302 }%
1303 \def\numsubsecentry##1##2##3##4{%
1304 \advancenumber{sec\thissecnum}%
1305 \def\thissubsecnum{##2}%
1306 }%
1307 \def\numsubsubsecentry##1##2##3##4{%
1308 \advancenumber{subsec\thissubsecnum}%
1309 }%
1310 \def\thischapnum{0}%
1311 \def\thissecnum{0}%
1312 \def\thissubsecnum{0}%
1313 %
1314 % use \def rather than \let here because we redefine \chapentry et
1315 % al. a second time, below.
1316 \def\appentry{\numchapentry}%
1317 \def\appsecentry{\numsecentry}%
1318 \def\appsubsecentry{\numsubsecentry}%
1319 \def\appsubsubsecentry{\numsubsubsecentry}%
1320 \def\unnchapentry{\numchapentry}%
1321 \def\unnsecentry{\numsecentry}%
1322 \def\unnsubsecentry{\numsubsecentry}%
1323 \def\unnsubsubsecentry{\numsubsubsecentry}%
1324 \readdatafile{toc}%
1325 %
1326 % Read toc second time, this time actually producing the outlines.
1327 % The `-' means take the \expnumber as the absolute number of
1328 % subentries, which we calculated on our first read of the .toc above.
1329 %
1330 % We use the node names as the destinations.
1331 \def\numchapentry##1##2##3##4{%
1332 \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
1333 \def\numsecentry##1##2##3##4{%
1334 \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
1335 \def\numsubsecentry##1##2##3##4{%
1336 \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
1337 \def\numsubsubsecentry##1##2##3##4{% count is always zero
1338 \dopdfoutline{##1}{}{##3}{##4}}%
1339 %
1340 % PDF outlines are displayed using system fonts, instead of
1341 % document fonts. Therefore we cannot use special characters,
1342 % since the encoding is unknown. For example, the eogonek from
1343 % Latin 2 (0xea) gets translated to a | character. Info from
1344 % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
1345 %
1346 % TODO this right, we have to translate 8-bit characters to
1347 % their "best" equivalent, based on the @documentencoding. Too
1348 % much work for too little return. Just use the ASCII equivalents
1349 % we use for the index sort strings.
1350 %
1351 \indexnofonts
1352 \setupdatafile
1353 % We can have normal brace characters in the PDF outlines, unlike
1354 % Texinfo index files. So set that up.
1355 \def\{{\lbracecharliteral}%
1356 \def\}{\rbracecharliteral}%
1357 \catcode`\\=\active \otherbackslash
1358 \input \tocreadfilename
1359 \endgroup
1360 }
1361 {\catcode`[=1 \catcode`]=2
1362 \catcode`{=\other \catcode`}=\other
1363 \gdef\lbracecharliteral[{]%
1364 \gdef\rbracecharliteral[}]%
1365 ]
1366 %
1367 \def\skipspaces#1{\def\PP{#1}\def\D{|}%
1368 \ifx\PP\D\let\nextsp\relax
1369 \else\let\nextsp\skipspaces
1370 \addtokens{\filename}{\PP}%
1371 \advance\filenamelength by 1
1372 \fi
1373 \nextsp}
1374 \def\getfilename#1{%
1375 \filenamelength=0
1376 % If we don't expand the argument now, \skipspaces will get
1377 % snagged on things like "@value{foo}".
1378 \edef\temp{#1}%
1379 \expandafter\skipspaces\temp|\relax
1380 }
1381 \ifnum\pdftexversion < 14
1382 \let \startlink \pdfannotlink
1383 \else
1384 \let \startlink \pdfstartlink
1385 \fi
1386 % make a live url in pdf output.
1387 \def\pdfurl#1{%
1388 \begingroup
1389 % it seems we really need yet another set of dummies; have not
1390 % tried to figure out what each command should do in the context
1391 % of @url. for now, just make @/ a no-op, that's the only one
1392 % people have actually reported a problem with.
1393 %
1394 \normalturnoffactive
1395 \def\@{@}%
1396 \let\/=\empty
1397 \makevalueexpandable
1398 % do we want to go so far as to use \indexnofonts instead of just
1399 % special-casing \var here?
1400 \def\var##1{##1}%
1401 %
1402 \leavevmode\setcolor{\urlcolor}%
1403 \startlink attr{/Border [0 0 0]}%
1404 user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
1405 \endgroup}
1406 \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
1407 \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
1408 \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
1409 \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
1410 \def\maketoks{%
1411 \expandafter\poptoks\the\toksA|ENDTOKS|\relax
1412 \ifx\first0\adn0
1413 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
1414 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
1415 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
1416 \else
1417 \ifnum0=\countA\else\makelink\fi
1418 \ifx\first.\let\next=\done\else
1419 \let\next=\maketoks
1420 \addtokens{\toksB}{\the\toksD}
1421 \ifx\first,\addtokens{\toksB}{\space}\fi
1422 \fi
1423 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
1424 \next}
1425 \def\makelink{\addtokens{\toksB}%
1426 {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
1427 \def\pdflink#1{%
1428 \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
1429 \setcolor{\linkcolor}#1\endlink}
1430 \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
1431 \else
1432 % non-pdf mode
1433 \let\pdfmkdest = \gobble
1434 \let\pdfurl = \gobble
1435 \let\endlink = \relax
1436 \let\setcolor = \gobble
1437 \let\pdfsetcolor = \gobble
1438 \let\pdfmakeoutlines = \relax
1439 \fi % \ifx\pdfoutput
1440
1441
1442 \message{fonts,}
1443
1444 % Change the current font style to #1, remembering it in \curfontstyle.
1445 % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
1446 % italics, not bold italics.
1447 %
1448 \def\setfontstyle#1{%
1449 \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
1450 \csname ten#1\endcsname % change the current font
1451 }
1452
1453 % Select #1 fonts with the current style.
1454 %
1455 \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
1456
1457 \def\rm{\fam=0 \setfontstyle{rm}}
1458 \def\it{\fam=\itfam \setfontstyle{it}}
1459 \def\sl{\fam=\slfam \setfontstyle{sl}}
1460 \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
1461 \def\tt{\fam=\ttfam \setfontstyle{tt}}
1462
1463 % Unfortunately, we have to override this for titles and the like, since
1464 % in those cases "rm" is bold. Sigh.
1465 \def\rmisbold{\rm\def\curfontstyle{bf}}
1466
1467 % Texinfo sort of supports the sans serif font style, which plain TeX does not.
1468 % So we set up a \sf.
1469 \newfam\sffam
1470 \def\sf{\fam=\sffam \setfontstyle{sf}}
1471 \let\li = \sf % Sometimes we call it \li, not \sf.
1472
1473 % We don't need math for this font style.
1474 \def\ttsl{\setfontstyle{ttsl}}
1475
1476
1477 % Set the baselineskip to #1, and the lineskip and strut size
1478 % correspondingly. There is no deep meaning behind these magic numbers
1479 % used as factors; they just match (closely enough) what Knuth defined.
1480 %
1481 \def\lineskipfactor{.08333}
1482 \def\strutheightpercent{.70833}
1483 \def\strutdepthpercent {.29167}
1484 %
1485 % can get a sort of poor man's double spacing by redefining this.
1486 \def\baselinefactor{1}
1487 %
1488 \newdimen\textleading
1489 \def\setleading#1{%
1490 \dimen0 = #1\relax
1491 \normalbaselineskip = \baselinefactor\dimen0
1492 \normallineskip = \lineskipfactor\normalbaselineskip
1493 \normalbaselines
1494 \setbox\strutbox =\hbox{%
1495 \vrule width0pt height\strutheightpercent\baselineskip
1496 depth \strutdepthpercent \baselineskip
1497 }%
1498 }
1499
1500 % PDF CMaps. See also LaTeX's t1.cmap.
1501 %
1502 % do nothing with this by default.
1503 \expandafter\let\csname cmapOT1\endcsname\gobble
1504 \expandafter\let\csname cmapOT1IT\endcsname\gobble
1505 \expandafter\let\csname cmapOT1TT\endcsname\gobble
1506
1507 % if we are producing pdf, and we have \pdffontattr, then define cmaps.
1508 % (\pdffontattr was introduced many years ago, but people still run
1509 % older pdftex's; it's easy to conditionalize, so we do.)
1510 \ifpdf \ifx\pdffontattr\thisisundefined \else
1511 \begingroup
1512 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
1513 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
1514 %%DocumentNeededResources: ProcSet (CIDInit)
1515 %%IncludeResource: ProcSet (CIDInit)
1516 %%BeginResource: CMap (TeX-OT1-0)
1517 %%Title: (TeX-OT1-0 TeX OT1 0)
1518 %%Version: 1.000
1519 %%EndComments
1520 /CIDInit /ProcSet findresource begin
1521 12 dict begin
1522 begincmap
1523 /CIDSystemInfo
1524 << /Registry (TeX)
1525 /Ordering (OT1)
1526 /Supplement 0
1527 >> def
1528 /CMapName /TeX-OT1-0 def
1529 /CMapType 2 def
1530 1 begincodespacerange
1531 <00> <7F>
1532 endcodespacerange
1533 8 beginbfrange
1534 <00> <01> <0393>
1535 <09> <0A> <03A8>
1536 <23> <26> <0023>
1537 <28> <3B> <0028>
1538 <3F> <5B> <003F>
1539 <5D> <5E> <005D>
1540 <61> <7A> <0061>
1541 <7B> <7C> <2013>
1542 endbfrange
1543 40 beginbfchar
1544 <02> <0398>
1545 <03> <039B>
1546 <04> <039E>
1547 <05> <03A0>
1548 <06> <03A3>
1549 <07> <03D2>
1550 <08> <03A6>
1551 <0B> <00660066>
1552 <0C> <00660069>
1553 <0D> <0066006C>
1554 <0E> <006600660069>
1555 <0F> <00660066006C>
1556 <10> <0131>
1557 <11> <0237>
1558 <12> <0060>
1559 <13> <00B4>
1560 <14> <02C7>
1561 <15> <02D8>
1562 <16> <00AF>
1563 <17> <02DA>
1564 <18> <00B8>
1565 <19> <00DF>
1566 <1A> <00E6>
1567 <1B> <0153>
1568 <1C> <00F8>
1569 <1D> <00C6>
1570 <1E> <0152>
1571 <1F> <00D8>
1572 <21> <0021>
1573 <22> <201D>
1574 <27> <2019>
1575 <3C> <00A1>
1576 <3D> <003D>
1577 <3E> <00BF>
1578 <5C> <201C>
1579 <5F> <02D9>
1580 <60> <2018>
1581 <7D> <02DD>
1582 <7E> <007E>
1583 <7F> <00A8>
1584 endbfchar
1585 endcmap
1586 CMapName currentdict /CMap defineresource pop
1587 end
1588 end
1589 %%EndResource
1590 %%EOF
1591 }\endgroup
1592 \expandafter\edef\csname cmapOT1\endcsname#1{%
1593 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
1594 }%
1595 %
1596 % \cmapOT1IT
1597 \begingroup
1598 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
1599 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
1600 %%DocumentNeededResources: ProcSet (CIDInit)
1601 %%IncludeResource: ProcSet (CIDInit)
1602 %%BeginResource: CMap (TeX-OT1IT-0)
1603 %%Title: (TeX-OT1IT-0 TeX OT1IT 0)
1604 %%Version: 1.000
1605 %%EndComments
1606 /CIDInit /ProcSet findresource begin
1607 12 dict begin
1608 begincmap
1609 /CIDSystemInfo
1610 << /Registry (TeX)
1611 /Ordering (OT1IT)
1612 /Supplement 0
1613 >> def
1614 /CMapName /TeX-OT1IT-0 def
1615 /CMapType 2 def
1616 1 begincodespacerange
1617 <00> <7F>
1618 endcodespacerange
1619 8 beginbfrange
1620 <00> <01> <0393>
1621 <09> <0A> <03A8>
1622 <25> <26> <0025>
1623 <28> <3B> <0028>
1624 <3F> <5B> <003F>
1625 <5D> <5E> <005D>
1626 <61> <7A> <0061>
1627 <7B> <7C> <2013>
1628 endbfrange
1629 42 beginbfchar
1630 <02> <0398>
1631 <03> <039B>
1632 <04> <039E>
1633 <05> <03A0>
1634 <06> <03A3>
1635 <07> <03D2>
1636 <08> <03A6>
1637 <0B> <00660066>
1638 <0C> <00660069>
1639 <0D> <0066006C>
1640 <0E> <006600660069>
1641 <0F> <00660066006C>
1642 <10> <0131>
1643 <11> <0237>
1644 <12> <0060>
1645 <13> <00B4>
1646 <14> <02C7>
1647 <15> <02D8>
1648 <16> <00AF>
1649 <17> <02DA>
1650 <18> <00B8>
1651 <19> <00DF>
1652 <1A> <00E6>
1653 <1B> <0153>
1654 <1C> <00F8>
1655 <1D> <00C6>
1656 <1E> <0152>
1657 <1F> <00D8>
1658 <21> <0021>
1659 <22> <201D>
1660 <23> <0023>
1661 <24> <00A3>
1662 <27> <2019>
1663 <3C> <00A1>
1664 <3D> <003D>
1665 <3E> <00BF>
1666 <5C> <201C>
1667 <5F> <02D9>
1668 <60> <2018>
1669 <7D> <02DD>
1670 <7E> <007E>
1671 <7F> <00A8>
1672 endbfchar
1673 endcmap
1674 CMapName currentdict /CMap defineresource pop
1675 end
1676 end
1677 %%EndResource
1678 %%EOF
1679 }\endgroup
1680 \expandafter\edef\csname cmapOT1IT\endcsname#1{%
1681 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
1682 }%
1683 %
1684 % \cmapOT1TT
1685 \begingroup
1686 \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
1687 \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
1688 %%DocumentNeededResources: ProcSet (CIDInit)
1689 %%IncludeResource: ProcSet (CIDInit)
1690 %%BeginResource: CMap (TeX-OT1TT-0)
1691 %%Title: (TeX-OT1TT-0 TeX OT1TT 0)
1692 %%Version: 1.000
1693 %%EndComments
1694 /CIDInit /ProcSet findresource begin
1695 12 dict begin
1696 begincmap
1697 /CIDSystemInfo
1698 << /Registry (TeX)
1699 /Ordering (OT1TT)
1700 /Supplement 0
1701 >> def
1702 /CMapName /TeX-OT1TT-0 def
1703 /CMapType 2 def
1704 1 begincodespacerange
1705 <00> <7F>
1706 endcodespacerange
1707 5 beginbfrange
1708 <00> <01> <0393>
1709 <09> <0A> <03A8>
1710 <21> <26> <0021>
1711 <28> <5F> <0028>
1712 <61> <7E> <0061>
1713 endbfrange
1714 32 beginbfchar
1715 <02> <0398>
1716 <03> <039B>
1717 <04> <039E>
1718 <05> <03A0>
1719 <06> <03A3>
1720 <07> <03D2>
1721 <08> <03A6>
1722 <0B> <2191>
1723 <0C> <2193>
1724 <0D> <0027>
1725 <0E> <00A1>
1726 <0F> <00BF>
1727 <10> <0131>
1728 <11> <0237>
1729 <12> <0060>
1730 <13> <00B4>
1731 <14> <02C7>
1732 <15> <02D8>
1733 <16> <00AF>
1734 <17> <02DA>
1735 <18> <00B8>
1736 <19> <00DF>
1737 <1A> <00E6>
1738 <1B> <0153>
1739 <1C> <00F8>
1740 <1D> <00C6>
1741 <1E> <0152>
1742 <1F> <00D8>
1743 <20> <2423>
1744 <27> <2019>
1745 <60> <2018>
1746 <7F> <00A8>
1747 endbfchar
1748 endcmap
1749 CMapName currentdict /CMap defineresource pop
1750 end
1751 end
1752 %%EndResource
1753 %%EOF
1754 }\endgroup
1755 \expandafter\edef\csname cmapOT1TT\endcsname#1{%
1756 \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
1757 }%
1758 \fi\fi
1759
1760
1761 % Set the font macro #1 to the font named \fontprefix#2.
1762 % #3 is the font's design size, #4 is a scale factor, #5 is the CMap
1763 % encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit).
1764 % Example:
1765 % #1 = \textrm
1766 % #2 = \rmshape
1767 % #3 = 10
1768 % #4 = \mainmagstep
1769 % #5 = OT1
1770 %
1771 \def\setfont#1#2#3#4#5{%
1772 \font#1=\fontprefix#2#3 scaled #4
1773 \csname cmap#5\endcsname#1%
1774 }
1775 % This is what gets called when #5 of \setfont is empty.
1776 \let\cmap\gobble
1777 %
1778 % (end of cmaps)
1779
1780 % Use cm as the default font prefix.
1781 % To specify the font prefix, you must define \fontprefix
1782 % before you read in texinfo.tex.
1783 \ifx\fontprefix\thisisundefined
1784 \def\fontprefix{cm}
1785 \fi
1786 % Support font families that don't use the same naming scheme as CM.
1787 \def\rmshape{r}
1788 \def\rmbshape{bx} % where the normal face is bold
1789 \def\bfshape{b}
1790 \def\bxshape{bx}
1791 \def\ttshape{tt}
1792 \def\ttbshape{tt}
1793 \def\ttslshape{sltt}
1794 \def\itshape{ti}
1795 \def\itbshape{bxti}
1796 \def\slshape{sl}
1797 \def\slbshape{bxsl}
1798 \def\sfshape{ss}
1799 \def\sfbshape{ss}
1800 \def\scshape{csc}
1801 \def\scbshape{csc}
1802
1803 % Definitions for a main text size of 11pt. (The default in Texinfo.)
1804 %
1805 \def\definetextfontsizexi{%
1806 % Text fonts (11.2pt, magstep1).
1807 \def\textnominalsize{11pt}
1808 \edef\mainmagstep{\magstephalf}
1809 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
1810 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
1811 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
1812 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
1813 \setfont\textsl\slshape{10}{\mainmagstep}{OT1}
1814 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
1815 \setfont\textsc\scshape{10}{\mainmagstep}{OT1}
1816 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
1817 \font\texti=cmmi10 scaled \mainmagstep
1818 \font\textsy=cmsy10 scaled \mainmagstep
1819 \def\textecsize{1095}
1820
1821 % A few fonts for @defun names and args.
1822 \setfont\defbf\bfshape{10}{\magstep1}{OT1}
1823 \setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
1824 \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
1825 \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
1826
1827 % Fonts for indices, footnotes, small examples (9pt).
1828 \def\smallnominalsize{9pt}
1829 \setfont\smallrm\rmshape{9}{1000}{OT1}
1830 \setfont\smalltt\ttshape{9}{1000}{OT1TT}
1831 \setfont\smallbf\bfshape{10}{900}{OT1}
1832 \setfont\smallit\itshape{9}{1000}{OT1IT}
1833 \setfont\smallsl\slshape{9}{1000}{OT1}
1834 \setfont\smallsf\sfshape{9}{1000}{OT1}
1835 \setfont\smallsc\scshape{10}{900}{OT1}
1836 \setfont\smallttsl\ttslshape{10}{900}{OT1TT}
1837 \font\smalli=cmmi9
1838 \font\smallsy=cmsy9
1839 \def\smallecsize{0900}
1840
1841 % Fonts for small examples (8pt).
1842 \def\smallernominalsize{8pt}
1843 \setfont\smallerrm\rmshape{8}{1000}{OT1}
1844 \setfont\smallertt\ttshape{8}{1000}{OT1TT}
1845 \setfont\smallerbf\bfshape{10}{800}{OT1}
1846 \setfont\smallerit\itshape{8}{1000}{OT1IT}
1847 \setfont\smallersl\slshape{8}{1000}{OT1}
1848 \setfont\smallersf\sfshape{8}{1000}{OT1}
1849 \setfont\smallersc\scshape{10}{800}{OT1}
1850 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
1851 \font\smalleri=cmmi8
1852 \font\smallersy=cmsy8
1853 \def\smallerecsize{0800}
1854
1855 % Fonts for title page (20.4pt):
1856 \def\titlenominalsize{20pt}
1857 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
1858 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
1859 \setfont\titlesl\slbshape{10}{\magstep4}{OT1}
1860 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
1861 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
1862 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
1863 \let\titlebf=\titlerm
1864 \setfont\titlesc\scbshape{10}{\magstep4}{OT1}
1865 \font\titlei=cmmi12 scaled \magstep3
1866 \font\titlesy=cmsy10 scaled \magstep4
1867 \def\titleecsize{2074}
1868
1869 % Chapter (and unnumbered) fonts (17.28pt).
1870 \def\chapnominalsize{17pt}
1871 \setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
1872 \setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
1873 \setfont\chapsl\slbshape{10}{\magstep3}{OT1}
1874 \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
1875 \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
1876 \setfont\chapsf\sfbshape{17}{1000}{OT1}
1877 \let\chapbf=\chaprm
1878 \setfont\chapsc\scbshape{10}{\magstep3}{OT1}
1879 \font\chapi=cmmi12 scaled \magstep2
1880 \font\chapsy=cmsy10 scaled \magstep3
1881 \def\chapecsize{1728}
1882
1883 % Section fonts (14.4pt).
1884 \def\secnominalsize{14pt}
1885 \setfont\secrm\rmbshape{12}{\magstep1}{OT1}
1886 \setfont\secit\itbshape{10}{\magstep2}{OT1IT}
1887 \setfont\secsl\slbshape{10}{\magstep2}{OT1}
1888 \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
1889 \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
1890 \setfont\secsf\sfbshape{12}{\magstep1}{OT1}
1891 \let\secbf\secrm
1892 \setfont\secsc\scbshape{10}{\magstep2}{OT1}
1893 \font\seci=cmmi12 scaled \magstep1
1894 \font\secsy=cmsy10 scaled \magstep2
1895 \def\sececsize{1440}
1896
1897 % Subsection fonts (13.15pt).
1898 \def\ssecnominalsize{13pt}
1899 \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
1900 \setfont\ssecit\itbshape{10}{1315}{OT1IT}
1901 \setfont\ssecsl\slbshape{10}{1315}{OT1}
1902 \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
1903 \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
1904 \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
1905 \let\ssecbf\ssecrm
1906 \setfont\ssecsc\scbshape{10}{1315}{OT1}
1907 \font\sseci=cmmi12 scaled \magstephalf
1908 \font\ssecsy=cmsy10 scaled 1315
1909 \def\ssececsize{1200}
1910
1911 % Reduced fonts for @acro in text (10pt).
1912 \def\reducednominalsize{10pt}
1913 \setfont\reducedrm\rmshape{10}{1000}{OT1}
1914 \setfont\reducedtt\ttshape{10}{1000}{OT1TT}
1915 \setfont\reducedbf\bfshape{10}{1000}{OT1}
1916 \setfont\reducedit\itshape{10}{1000}{OT1IT}
1917 \setfont\reducedsl\slshape{10}{1000}{OT1}
1918 \setfont\reducedsf\sfshape{10}{1000}{OT1}
1919 \setfont\reducedsc\scshape{10}{1000}{OT1}
1920 \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
1921 \font\reducedi=cmmi10
1922 \font\reducedsy=cmsy10
1923 \def\reducedecsize{1000}
1924
1925 \textleading = 13.2pt % line spacing for 11pt CM
1926 \textfonts % reset the current fonts
1927 \rm
1928 } % end of 11pt text font size definitions, \definetextfontsizexi
1929
1930
1931 % Definitions to make the main text be 10pt Computer Modern, with
1932 % section, chapter, etc., sizes following suit. This is for the GNU
1933 % Press printing of the Emacs 22 manual. Maybe other manuals in the
1934 % future. Used with @smallbook, which sets the leading to 12pt.
1935 %
1936 \def\definetextfontsizex{%
1937 % Text fonts (10pt).
1938 \def\textnominalsize{10pt}
1939 \edef\mainmagstep{1000}
1940 \setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
1941 \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
1942 \setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
1943 \setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
1944 \setfont\textsl\slshape{10}{\mainmagstep}{OT1}
1945 \setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
1946 \setfont\textsc\scshape{10}{\mainmagstep}{OT1}
1947 \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
1948 \font\texti=cmmi10 scaled \mainmagstep
1949 \font\textsy=cmsy10 scaled \mainmagstep
1950 \def\textecsize{1000}
1951
1952 % A few fonts for @defun names and args.
1953 \setfont\defbf\bfshape{10}{\magstephalf}{OT1}
1954 \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
1955 \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
1956 \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
1957
1958 % Fonts for indices, footnotes, small examples (9pt).
1959 \def\smallnominalsize{9pt}
1960 \setfont\smallrm\rmshape{9}{1000}{OT1}
1961 \setfont\smalltt\ttshape{9}{1000}{OT1TT}
1962 \setfont\smallbf\bfshape{10}{900}{OT1}
1963 \setfont\smallit\itshape{9}{1000}{OT1IT}
1964 \setfont\smallsl\slshape{9}{1000}{OT1}
1965 \setfont\smallsf\sfshape{9}{1000}{OT1}
1966 \setfont\smallsc\scshape{10}{900}{OT1}
1967 \setfont\smallttsl\ttslshape{10}{900}{OT1TT}
1968 \font\smalli=cmmi9
1969 \font\smallsy=cmsy9
1970 \def\smallecsize{0900}
1971
1972 % Fonts for small examples (8pt).
1973 \def\smallernominalsize{8pt}
1974 \setfont\smallerrm\rmshape{8}{1000}{OT1}
1975 \setfont\smallertt\ttshape{8}{1000}{OT1TT}
1976 \setfont\smallerbf\bfshape{10}{800}{OT1}
1977 \setfont\smallerit\itshape{8}{1000}{OT1IT}
1978 \setfont\smallersl\slshape{8}{1000}{OT1}
1979 \setfont\smallersf\sfshape{8}{1000}{OT1}
1980 \setfont\smallersc\scshape{10}{800}{OT1}
1981 \setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
1982 \font\smalleri=cmmi8
1983 \font\smallersy=cmsy8
1984 \def\smallerecsize{0800}
1985
1986 % Fonts for title page (20.4pt):
1987 \def\titlenominalsize{20pt}
1988 \setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
1989 \setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
1990 \setfont\titlesl\slbshape{10}{\magstep4}{OT1}
1991 \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
1992 \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
1993 \setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
1994 \let\titlebf=\titlerm
1995 \setfont\titlesc\scbshape{10}{\magstep4}{OT1}
1996 \font\titlei=cmmi12 scaled \magstep3
1997 \font\titlesy=cmsy10 scaled \magstep4
1998 \def\titleecsize{2074}
1999
2000 % Chapter fonts (14.4pt).
2001 \def\chapnominalsize{14pt}
2002 \setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
2003 \setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
2004 \setfont\chapsl\slbshape{10}{\magstep2}{OT1}
2005 \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
2006 \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
2007 \setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
2008 \let\chapbf\chaprm
2009 \setfont\chapsc\scbshape{10}{\magstep2}{OT1}
2010 \font\chapi=cmmi12 scaled \magstep1
2011 \font\chapsy=cmsy10 scaled \magstep2
2012 \def\chapecsize{1440}
2013
2014 % Section fonts (12pt).
2015 \def\secnominalsize{12pt}
2016 \setfont\secrm\rmbshape{12}{1000}{OT1}
2017 \setfont\secit\itbshape{10}{\magstep1}{OT1IT}
2018 \setfont\secsl\slbshape{10}{\magstep1}{OT1}
2019 \setfont\sectt\ttbshape{12}{1000}{OT1TT}
2020 \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
2021 \setfont\secsf\sfbshape{12}{1000}{OT1}
2022 \let\secbf\secrm
2023 \setfont\secsc\scbshape{10}{\magstep1}{OT1}
2024 \font\seci=cmmi12
2025 \font\secsy=cmsy10 scaled \magstep1
2026 \def\sececsize{1200}
2027
2028 % Subsection fonts (10pt).
2029 \def\ssecnominalsize{10pt}
2030 \setfont\ssecrm\rmbshape{10}{1000}{OT1}
2031 \setfont\ssecit\itbshape{10}{1000}{OT1IT}
2032 \setfont\ssecsl\slbshape{10}{1000}{OT1}
2033 \setfont\ssectt\ttbshape{10}{1000}{OT1TT}
2034 \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
2035 \setfont\ssecsf\sfbshape{10}{1000}{OT1}
2036 \let\ssecbf\ssecrm
2037 \setfont\ssecsc\scbshape{10}{1000}{OT1}
2038 \font\sseci=cmmi10
2039 \font\ssecsy=cmsy10
2040 \def\ssececsize{1000}
2041
2042 % Reduced fonts for @acro in text (9pt).
2043 \def\reducednominalsize{9pt}
2044 \setfont\reducedrm\rmshape{9}{1000}{OT1}
2045 \setfont\reducedtt\ttshape{9}{1000}{OT1TT}
2046 \setfont\reducedbf\bfshape{10}{900}{OT1}
2047 \setfont\reducedit\itshape{9}{1000}{OT1IT}
2048 \setfont\reducedsl\slshape{9}{1000}{OT1}
2049 \setfont\reducedsf\sfshape{9}{1000}{OT1}
2050 \setfont\reducedsc\scshape{10}{900}{OT1}
2051 \setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
2052 \font\reducedi=cmmi9
2053 \font\reducedsy=cmsy9
2054 \def\reducedecsize{0900}
2055
2056 \divide\parskip by 2 % reduce space between paragraphs
2057 \textleading = 12pt % line spacing for 10pt CM
2058 \textfonts % reset the current fonts
2059 \rm
2060 } % end of 10pt text font size definitions, \definetextfontsizex
2061
2062
2063 % We provide the user-level command
2064 % @fonttextsize 10
2065 % (or 11) to redefine the text font size. pt is assumed.
2066 %
2067 \def\xiword{11}
2068 \def\xword{10}
2069 \def\xwordpt{10pt}
2070 %
2071 \parseargdef\fonttextsize{%
2072 \def\textsizearg{#1}%
2073 %\wlog{doing @fonttextsize \textsizearg}%
2074 %
2075 % Set \globaldefs so that documents can use this inside @tex, since
2076 % makeinfo 4.8 does not support it, but we need it nonetheless.
2077 %
2078 \begingroup \globaldefs=1
2079 \ifx\textsizearg\xword \definetextfontsizex
2080 \else \ifx\textsizearg\xiword \definetextfontsizexi
2081 \else
2082 \errhelp=\EMsimple
2083 \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
2084 \fi\fi
2085 \endgroup
2086 }
2087
2088
2089 % In order for the font changes to affect most math symbols and letters,
2090 % we have to define the \textfont of the standard families. Since
2091 % texinfo doesn't allow for producing subscripts and superscripts except
2092 % in the main text, we don't bother to reset \scriptfont and
2093 % \scriptscriptfont (which would also require loading a lot more fonts).
2094 %
2095 \def\resetmathfonts{%
2096 \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
2097 \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
2098 \textfont\ttfam=\tentt \textfont\sffam=\tensf
2099 }
2100
2101 % The font-changing commands redefine the meanings of \tenSTYLE, instead
2102 % of just \STYLE. We do this because \STYLE needs to also set the
2103 % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
2104 % \tenSTYLE to set the current font.
2105 %
2106 % Each font-changing command also sets the names \lsize (one size lower)
2107 % and \lllsize (three sizes lower). These relative commands are used in
2108 % the LaTeX logo and acronyms.
2109 %
2110 % This all needs generalizing, badly.
2111 %
2112 \def\textfonts{%
2113 \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
2114 \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
2115 \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
2116 \let\tenttsl=\textttsl
2117 \def\curfontsize{text}%
2118 \def\lsize{reduced}\def\lllsize{smaller}%
2119 \resetmathfonts \setleading{\textleading}}
2120 \def\titlefonts{%
2121 \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
2122 \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
2123 \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
2124 \let\tenttsl=\titlettsl
2125 \def\curfontsize{title}%
2126 \def\lsize{chap}\def\lllsize{subsec}%
2127 \resetmathfonts \setleading{27pt}}
2128 \def\titlefont#1{{\titlefonts\rmisbold #1}}
2129 \def\chapfonts{%
2130 \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
2131 \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
2132 \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
2133 \let\tenttsl=\chapttsl
2134 \def\curfontsize{chap}%
2135 \def\lsize{sec}\def\lllsize{text}%
2136 \resetmathfonts \setleading{19pt}}
2137 \def\secfonts{%
2138 \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
2139 \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
2140 \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
2141 \let\tenttsl=\secttsl
2142 \def\curfontsize{sec}%
2143 \def\lsize{subsec}\def\lllsize{reduced}%
2144 \resetmathfonts \setleading{16pt}}
2145 \def\subsecfonts{%
2146 \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
2147 \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
2148 \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
2149 \let\tenttsl=\ssecttsl
2150 \def\curfontsize{ssec}%
2151 \def\lsize{text}\def\lllsize{small}%
2152 \resetmathfonts \setleading{15pt}}
2153 \let\subsubsecfonts = \subsecfonts
2154 \def\reducedfonts{%
2155 \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
2156 \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
2157 \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
2158 \let\tenttsl=\reducedttsl
2159 \def\curfontsize{reduced}%
2160 \def\lsize{small}\def\lllsize{smaller}%
2161 \resetmathfonts \setleading{10.5pt}}
2162 \def\smallfonts{%
2163 \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
2164 \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
2165 \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
2166 \let\tenttsl=\smallttsl
2167 \def\curfontsize{small}%
2168 \def\lsize{smaller}\def\lllsize{smaller}%
2169 \resetmathfonts \setleading{10.5pt}}
2170 \def\smallerfonts{%
2171 \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
2172 \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
2173 \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
2174 \let\tenttsl=\smallerttsl
2175 \def\curfontsize{smaller}%
2176 \def\lsize{smaller}\def\lllsize{smaller}%
2177 \resetmathfonts \setleading{9.5pt}}
2178
2179 % Fonts for short table of contents.
2180 \setfont\shortcontrm\rmshape{12}{1000}{OT1}
2181 \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
2182 \setfont\shortcontsl\slshape{12}{1000}{OT1}
2183 \setfont\shortconttt\ttshape{12}{1000}{OT1TT}
2184
2185 % Define these just so they can be easily changed for other fonts.
2186 \def\angleleft{$\langle$}
2187 \def\angleright{$\rangle$}
2188
2189 % Set the fonts to use with the @small... environments.
2190 \let\smallexamplefonts = \smallfonts
2191
2192 % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
2193 % can fit this many characters:
2194 % 8.5x11=86 smallbook=72 a4=90 a5=69
2195 % If we use \scriptfonts (8pt), then we can fit this many characters:
2196 % 8.5x11=90+ smallbook=80 a4=90+ a5=77
2197 % For me, subjectively, the few extra characters that fit aren't worth
2198 % the additional smallness of 8pt. So I'm making the default 9pt.
2199 %
2200 % By the way, for comparison, here's what fits with @example (10pt):
2201 % 8.5x11=71 smallbook=60 a4=75 a5=58
2202 % --karl, 24jan03.
2203
2204 % Set up the default fonts, so we can use them for creating boxes.
2205 %
2206 \definetextfontsizexi
2207
2208
2209 \message{markup,}
2210
2211 % Check if we are currently using a typewriter font. Since all the
2212 % Computer Modern typewriter fonts have zero interword stretch (and
2213 % shrink), and it is reasonable to expect all typewriter fonts to have
2214 % this property, we can check that font parameter.
2215 %
2216 \def\ifmonospace{\ifdim\fontdimen3\font=0pt }
2217
2218 % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
2219 % define and register \INITMACRO to be called on markup style changes.
2220 % \INITMACRO can check \currentmarkupstyle for the innermost
2221 % style and the set of \ifmarkupSTYLE switches for all styles
2222 % currently in effect.
2223 \newif\ifmarkupvar
2224 \newif\ifmarkupsamp
2225 \newif\ifmarkupkey
2226 %\newif\ifmarkupfile % @file == @samp.
2227 %\newif\ifmarkupoption % @option == @samp.
2228 \newif\ifmarkupcode
2229 \newif\ifmarkupkbd
2230 %\newif\ifmarkupenv % @env == @code.
2231 %\newif\ifmarkupcommand % @command == @code.
2232 \newif\ifmarkuptex % @tex (and part of @math, for now).
2233 \newif\ifmarkupexample
2234 \newif\ifmarkupverb
2235 \newif\ifmarkupverbatim
2236
2237 \let\currentmarkupstyle\empty
2238
2239 \def\setupmarkupstyle#1{%
2240 \csname markup#1true\endcsname
2241 \def\currentmarkupstyle{#1}%
2242 \markupstylesetup
2243 }
2244
2245 \let\markupstylesetup\empty
2246
2247 \def\defmarkupstylesetup#1{%
2248 \expandafter\def\expandafter\markupstylesetup
2249 \expandafter{\markupstylesetup #1}%
2250 \def#1%
2251 }
2252
2253 % Markup style setup for left and right quotes.
2254 \defmarkupstylesetup\markupsetuplq{%
2255 \expandafter\let\expandafter \temp
2256 \csname markupsetuplq\currentmarkupstyle\endcsname
2257 \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
2258 }
2259
2260 \defmarkupstylesetup\markupsetuprq{%
2261 \expandafter\let\expandafter \temp
2262 \csname markupsetuprq\currentmarkupstyle\endcsname
2263 \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
2264 }
2265
2266 {
2267 \catcode`\'=\active
2268 \catcode`\`=\active
2269
2270 \gdef\markupsetuplqdefault{\let`\lq}
2271 \gdef\markupsetuprqdefault{\let'\rq}
2272
2273 \gdef\markupsetcodequoteleft{\let`\codequoteleft}
2274 \gdef\markupsetcodequoteright{\let'\codequoteright}
2275 }
2276
2277 \let\markupsetuplqcode \markupsetcodequoteleft
2278 \let\markupsetuprqcode \markupsetcodequoteright
2279 %
2280 \let\markupsetuplqexample \markupsetcodequoteleft
2281 \let\markupsetuprqexample \markupsetcodequoteright
2282 %
2283 \let\markupsetuplqkbd \markupsetcodequoteleft
2284 \let\markupsetuprqkbd \markupsetcodequoteright
2285 %
2286 \let\markupsetuplqsamp \markupsetcodequoteleft
2287 \let\markupsetuprqsamp \markupsetcodequoteright
2288 %
2289 \let\markupsetuplqverb \markupsetcodequoteleft
2290 \let\markupsetuprqverb \markupsetcodequoteright
2291 %
2292 \let\markupsetuplqverbatim \markupsetcodequoteleft
2293 \let\markupsetuprqverbatim \markupsetcodequoteright
2294
2295 % Allow an option to not use regular directed right quote/apostrophe
2296 % (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
2297 % The undirected quote is ugly, so don't make it the default, but it
2298 % works for pasting with more pdf viewers (at least evince), the
2299 % lilypond developers report. xpdf does work with the regular 0x27.
2300 %
2301 \def\codequoteright{%
2302 \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
2303 \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
2304 '%
2305 \else \char'15 \fi
2306 \else \char'15 \fi
2307 }
2308 %
2309 % and a similar option for the left quote char vs. a grave accent.
2310 % Modern fonts display ASCII 0x60 as a grave accent, so some people like
2311 % the code environments to do likewise.
2312 %
2313 \def\codequoteleft{%
2314 \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
2315 \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
2316 % [Knuth] pp. 380,381,391
2317 % \relax disables Spanish ligatures ?` and !` of \tt font.
2318 \relax`%
2319 \else \char'22 \fi
2320 \else \char'22 \fi
2321 }
2322
2323 % Commands to set the quote options.
2324 %
2325 \parseargdef\codequoteundirected{%
2326 \def\temp{#1}%
2327 \ifx\temp\onword
2328 \expandafter\let\csname SETtxicodequoteundirected\endcsname
2329 = t%
2330 \else\ifx\temp\offword
2331 \expandafter\let\csname SETtxicodequoteundirected\endcsname
2332 = \relax
2333 \else
2334 \errhelp = \EMsimple
2335 \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
2336 \fi\fi
2337 }
2338 %
2339 \parseargdef\codequotebacktick{%
2340 \def\temp{#1}%
2341 \ifx\temp\onword
2342 \expandafter\let\csname SETtxicodequotebacktick\endcsname
2343 = t%
2344 \else\ifx\temp\offword
2345 \expandafter\let\csname SETtxicodequotebacktick\endcsname
2346 = \relax
2347 \else
2348 \errhelp = \EMsimple
2349 \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
2350 \fi\fi
2351 }
2352
2353 % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
2354 \def\noligaturesquoteleft{\relax\lq}
2355
2356 % Count depth in font-changes, for error checks
2357 \newcount\fontdepth \fontdepth=0
2358
2359 % Font commands.
2360
2361 % #1 is the font command (\sl or \it), #2 is the text to slant.
2362 % If we are in a monospaced environment, however, 1) always use \ttsl,
2363 % and 2) do not add an italic correction.
2364 \def\dosmartslant#1#2{%
2365 \ifusingtt
2366 {{\ttsl #2}\let\next=\relax}%
2367 {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
2368 \next
2369 }
2370 \def\smartslanted{\dosmartslant\sl}
2371 \def\smartitalic{\dosmartslant\it}
2372
2373 % Output an italic correction unless \next (presumed to be the following
2374 % character) is such as not to need one.
2375 \def\smartitaliccorrection{%
2376 \ifx\next,%
2377 \else\ifx\next-%
2378 \else\ifx\next.%
2379 \else\ptexslash
2380 \fi\fi\fi
2381 \aftersmartic
2382 }
2383
2384 % Unconditional use \ttsl, and no ic. @var is set to this for defuns.
2385 \def\ttslanted#1{{\ttsl #1}}
2386
2387 % @cite is like \smartslanted except unconditionally use \sl. We never want
2388 % ttsl for book titles, do we?
2389 \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
2390
2391 \def\aftersmartic{}
2392 \def\var#1{%
2393 \let\saveaftersmartic = \aftersmartic
2394 \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
2395 \smartslanted{#1}%
2396 }
2397
2398 \let\i=\smartitalic
2399 \let\slanted=\smartslanted
2400 \let\dfn=\smartslanted
2401 \let\emph=\smartitalic
2402
2403 % Explicit font changes: @r, @sc, undocumented @ii.
2404 \def\r#1{{\rm #1}} % roman font
2405 \def\sc#1{{\smallcaps#1}} % smallcaps font
2406 \def\ii#1{{\it #1}} % italic font
2407
2408 % @b, explicit bold. Also @strong.
2409 \def\b#1{{\bf #1}}
2410 \let\strong=\b
2411
2412 % @sansserif, explicit sans.
2413 \def\sansserif#1{{\sf #1}}
2414
2415 % We can't just use \exhyphenpenalty, because that only has effect at
2416 % the end of a paragraph. Restore normal hyphenation at the end of the
2417 % group within which \nohyphenation is presumably called.
2418 %
2419 \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
2420 \def\restorehyphenation{\hyphenchar\font = `- }
2421
2422 % Set sfcode to normal for the chars that usually have another value.
2423 % Can't use plain's \frenchspacing because it uses the `\x notation, and
2424 % sometimes \x has an active definition that messes things up.
2425 %
2426 \catcode`@=11
2427 \def\plainfrenchspacing{%
2428 \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
2429 \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
2430 \def\endofsentencespacefactor{1000}% for @. and friends
2431 }
2432 \def\plainnonfrenchspacing{%
2433 \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
2434 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
2435 \def\endofsentencespacefactor{3000}% for @. and friends
2436 }
2437 \catcode`@=\other
2438 \def\endofsentencespacefactor{3000}% default
2439
2440 % @t, explicit typewriter.
2441 \def\t#1{%
2442 {\tt \rawbackslash \plainfrenchspacing #1}%
2443 \null
2444 }
2445
2446 % @samp.
2447 \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
2448
2449 % @indicateurl is \samp, that is, with quotes.
2450 \let\indicateurl=\samp
2451
2452 % @code (and similar) prints in typewriter, but with spaces the same
2453 % size as normal in the surrounding text, without hyphenation, etc.
2454 % This is a subroutine for that.
2455 \def\tclose#1{%
2456 {%
2457 % Change normal interword space to be same as for the current font.
2458 \spaceskip = \fontdimen2\font
2459 %
2460 % Switch to typewriter.
2461 \tt
2462 %
2463 % But `\ ' produces the large typewriter interword space.
2464 \def\ {{\spaceskip = 0pt{} }}%
2465 %
2466 % Turn off hyphenation.
2467 \nohyphenation
2468 %
2469 \rawbackslash
2470 \plainfrenchspacing
2471 #1%
2472 }%
2473 \null % reset spacefactor to 1000
2474 }
2475
2476 % We *must* turn on hyphenation at `-' and `_' in @code.
2477 % Otherwise, it is too hard to avoid overfull hboxes
2478 % in the Emacs manual, the Library manual, etc.
2479 %
2480 % Unfortunately, TeX uses one parameter (\hyphenchar) to control
2481 % both hyphenation at - and hyphenation within words.
2482 % We must therefore turn them both off (\tclose does that)
2483 % and arrange explicitly to hyphenate at a dash.
2484 % -- rms.
2485 {
2486 \catcode`\-=\active \catcode`\_=\active
2487 \catcode`\'=\active \catcode`\`=\active
2488 \global\let'=\rq \global\let`=\lq % default definitions
2489 %
2490 \global\def\code{\begingroup
2491 \setupmarkupstyle{code}%
2492 % The following should really be moved into \setupmarkupstyle handlers.
2493 \catcode\dashChar=\active \catcode\underChar=\active
2494 \ifallowcodebreaks
2495 \let-\codedash
2496 \let_\codeunder
2497 \else
2498 \let-\normaldash
2499 \let_\realunder
2500 \fi
2501 \codex
2502 }
2503 }
2504
2505 \def\codex #1{\tclose{#1}\endgroup}
2506
2507 \def\normaldash{-}
2508 \def\codedash{-\discretionary{}{}{}}
2509 \def\codeunder{%
2510 % this is all so @math{@code{var_name}+1} can work. In math mode, _
2511 % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
2512 % will therefore expand the active definition of _, which is us
2513 % (inside @code that is), therefore an endless loop.
2514 \ifusingtt{\ifmmode
2515 \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
2516 \else\normalunderscore \fi
2517 \discretionary{}{}{}}%
2518 {\_}%
2519 }
2520
2521 % An additional complication: the above will allow breaks after, e.g.,
2522 % each of the four underscores in __typeof__. This is bad.
2523 % @allowcodebreaks provides a document-level way to turn breaking at -
2524 % and _ on and off.
2525 %
2526 \newif\ifallowcodebreaks \allowcodebreakstrue
2527
2528 \def\keywordtrue{true}
2529 \def\keywordfalse{false}
2530
2531 \parseargdef\allowcodebreaks{%
2532 \def\txiarg{#1}%
2533 \ifx\txiarg\keywordtrue
2534 \allowcodebreakstrue
2535 \else\ifx\txiarg\keywordfalse
2536 \allowcodebreaksfalse
2537 \else
2538 \errhelp = \EMsimple
2539 \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
2540 \fi\fi
2541 }
2542
2543 % For @command, @env, @file, @option quotes seem unnecessary,
2544 % so use \code rather than \samp.
2545 \let\command=\code
2546 \let\env=\code
2547 \let\file=\code
2548 \let\option=\code
2549
2550 % @uref (abbreviation for `urlref') takes an optional (comma-separated)
2551 % second argument specifying the text to display and an optional third
2552 % arg as text to display instead of (rather than in addition to) the url
2553 % itself. First (mandatory) arg is the url.
2554 % (This \urefnobreak definition isn't used now, leaving it for a while
2555 % for comparison.)
2556 \def\urefnobreak#1{\dourefnobreak #1,,,\finish}
2557 \def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
2558 \unsepspaces
2559 \pdfurl{#1}%
2560 \setbox0 = \hbox{\ignorespaces #3}%
2561 \ifdim\wd0 > 0pt
2562 \unhbox0 % third arg given, show only that
2563 \else
2564 \setbox0 = \hbox{\ignorespaces #2}%
2565 \ifdim\wd0 > 0pt
2566 \ifpdf
2567 \unhbox0 % PDF: 2nd arg given, show only it
2568 \else
2569 \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
2570 \fi
2571 \else
2572 \code{#1}% only url given, so show it
2573 \fi
2574 \fi
2575 \endlink
2576 \endgroup}
2577
2578 % This \urefbreak definition is the active one.
2579 \def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
2580 \let\uref=\urefbreak
2581 \def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
2582 \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
2583 \unsepspaces
2584 \pdfurl{#1}%
2585 \setbox0 = \hbox{\ignorespaces #3}%
2586 \ifdim\wd0 > 0pt
2587 \unhbox0 % third arg given, show only that
2588 \else
2589 \setbox0 = \hbox{\ignorespaces #2}%
2590 \ifdim\wd0 > 0pt
2591 \ifpdf
2592 \unhbox0 % PDF: 2nd arg given, show only it
2593 \else
2594 \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
2595 \fi
2596 \else
2597 \urefcode{#1}% only url given, so show it
2598 \fi
2599 \fi
2600 \endlink
2601 \endgroup}
2602
2603 % Allow line breaks around only a few characters (only).
2604 \def\urefcatcodes{%
2605 \catcode\ampChar=\active \catcode\dotChar=\active
2606 \catcode\hashChar=\active \catcode\questChar=\active
2607 \catcode\slashChar=\active
2608 }
2609 {
2610 \urefcatcodes
2611 %
2612 \global\def\urefcode{\begingroup
2613 \setupmarkupstyle{code}%
2614 \urefcatcodes
2615 \let&\urefcodeamp
2616 \let.\urefcodedot
2617 \let#\urefcodehash
2618 \let?\urefcodequest
2619 \let/\urefcodeslash
2620 \codex
2621 }
2622 %
2623 % By default, they are just regular characters.
2624 \global\def&{\normalamp}
2625 \global\def.{\normaldot}
2626 \global\def#{\normalhash}
2627 \global\def?{\normalquest}
2628 \global\def/{\normalslash}
2629 }
2630
2631 % we put a little stretch before and after the breakable chars, to help
2632 % line breaking of long url's. The unequal skips make look better in
2633 % cmtt at least, especially for dots.
2634 \def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
2635 \def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
2636 %
2637 \def\urefcodeamp{\urefprestretch \&\urefpoststretch}
2638 \def\urefcodedot{\urefprestretch .\urefpoststretch}
2639 \def\urefcodehash{\urefprestretch \#\urefpoststretch}
2640 \def\urefcodequest{\urefprestretch ?\urefpoststretch}
2641 \def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
2642 {
2643 \catcode`\/=\active
2644 \global\def\urefcodeslashfinish{%
2645 \urefprestretch \slashChar
2646 % Allow line break only after the final / in a sequence of
2647 % slashes, to avoid line break between the slashes in http://.
2648 \ifx\next/\else \urefpoststretch \fi
2649 }
2650 }
2651
2652 % One more complication: by default we'll break after the special
2653 % characters, but some people like to break before the special chars, so
2654 % allow that. Also allow no breaking at all, for manual control.
2655 %
2656 \parseargdef\urefbreakstyle{%
2657 \def\txiarg{#1}%
2658 \ifx\txiarg\wordnone
2659 \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
2660 \else\ifx\txiarg\wordbefore
2661 \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
2662 \else\ifx\txiarg\wordafter
2663 \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
2664 \else
2665 \errhelp = \EMsimple
2666 \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
2667 \fi\fi\fi
2668 }
2669 \def\wordafter{after}
2670 \def\wordbefore{before}
2671 \def\wordnone{none}
2672
2673 \urefbreakstyle after
2674
2675 % @url synonym for @uref, since that's how everyone uses it.
2676 %
2677 \let\url=\uref
2678
2679 % rms does not like angle brackets --karl, 17may97.
2680 % So now @email is just like @uref, unless we are pdf.
2681 %
2682 %\def\email#1{\angleleft{\tt #1}\angleright}
2683 \ifpdf
2684 \def\email#1{\doemail#1,,\finish}
2685 \def\doemail#1,#2,#3\finish{\begingroup
2686 \unsepspaces
2687 \pdfurl{mailto:#1}%
2688 \setbox0 = \hbox{\ignorespaces #2}%
2689 \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
2690 \endlink
2691 \endgroup}
2692 \else
2693 \let\email=\uref
2694 \fi
2695
2696 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
2697 % `example' (@kbd uses ttsl only inside of @example and friends),
2698 % or `code' (@kbd uses normal tty font always).
2699 \parseargdef\kbdinputstyle{%
2700 \def\txiarg{#1}%
2701 \ifx\txiarg\worddistinct
2702 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
2703 \else\ifx\txiarg\wordexample
2704 \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
2705 \else\ifx\txiarg\wordcode
2706 \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
2707 \else
2708 \errhelp = \EMsimple
2709 \errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
2710 \fi\fi\fi
2711 }
2712 \def\worddistinct{distinct}
2713 \def\wordexample{example}
2714 \def\wordcode{code}
2715
2716 % Default is `distinct'.
2717 \kbdinputstyle distinct
2718
2719 % @kbd is like @code, except that if the argument is just one @key command,
2720 % then @kbd has no effect.
2721 \def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}}
2722
2723 \def\xkey{\key}
2724 \def\kbdsub#1#2#3\par{%
2725 \def\one{#1}\def\three{#3}\def\threex{??}%
2726 \ifx\one\xkey\ifx\threex\three \key{#2}%
2727 \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
2728 \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
2729 }
2730
2731 % definition of @key that produces a lozenge. Doesn't adjust to text size.
2732 %\setfont\keyrm\rmshape{8}{1000}{OT1}
2733 %\font\keysy=cmsy9
2734 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
2735 % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
2736 % \vbox{\hrule\kern-0.4pt
2737 % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
2738 % \kern-0.4pt\hrule}%
2739 % \kern-.06em\raise0.4pt\hbox{\angleright}}}}
2740
2741 % definition of @key with no lozenge. If the current font is already
2742 % monospace, don't change it; that way, we respect @kbdinputstyle. But
2743 % if it isn't monospace, then use \tt.
2744 %
2745 \def\key#1{{\setupmarkupstyle{key}%
2746 \nohyphenation
2747 \ifmonospace\else\tt\fi
2748 #1}\null}
2749
2750 % @clicksequence{File @click{} Open ...}
2751 \def\clicksequence#1{\begingroup #1\endgroup}
2752
2753 % @clickstyle @arrow (by default)
2754 \parseargdef\clickstyle{\def\click{#1}}
2755 \def\click{\arrow}
2756
2757 % Typeset a dimension, e.g., `in' or `pt'. The only reason for the
2758 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
2759 %
2760 \def\dmn#1{\thinspace #1}
2761
2762 % @l was never documented to mean ``switch to the Lisp font'',
2763 % and it is not used as such in any manual I can find. We need it for
2764 % Polish suppressed-l. --karl, 22sep96.
2765 %\def\l#1{{\li #1}\null}
2766
2767 % @acronym for "FBI", "NATO", and the like.
2768 % We print this one point size smaller, since it's intended for
2769 % all-uppercase.
2770 %
2771 \def\acronym#1{\doacronym #1,,\finish}
2772 \def\doacronym#1,#2,#3\finish{%
2773 {\selectfonts\lsize #1}%
2774 \def\temp{#2}%
2775 \ifx\temp\empty \else
2776 \space ({\unsepspaces \ignorespaces \temp \unskip})%
2777 \fi
2778 \null % reset \spacefactor=1000
2779 }
2780
2781 % @abbr for "Comput. J." and the like.
2782 % No font change, but don't do end-of-sentence spacing.
2783 %
2784 \def\abbr#1{\doabbr #1,,\finish}
2785 \def\doabbr#1,#2,#3\finish{%
2786 {\plainfrenchspacing #1}%
2787 \def\temp{#2}%
2788 \ifx\temp\empty \else
2789 \space ({\unsepspaces \ignorespaces \temp \unskip})%
2790 \fi
2791 \null % reset \spacefactor=1000
2792 }
2793
2794 % @asis just yields its argument. Used with @table, for example.
2795 %
2796 \def\asis#1{#1}
2797
2798 % @math outputs its argument in math mode.
2799 %
2800 % One complication: _ usually means subscripts, but it could also mean
2801 % an actual _ character, as in @math{@var{some_variable} + 1}. So make
2802 % _ active, and distinguish by seeing if the current family is \slfam,
2803 % which is what @var uses.
2804 {
2805 \catcode`\_ = \active
2806 \gdef\mathunderscore{%
2807 \catcode`\_=\active
2808 \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
2809 }
2810 }
2811 % Another complication: we want \\ (and @\) to output a math (or tt) \.
2812 % FYI, plain.tex uses \\ as a temporary control sequence (for no
2813 % particular reason), but this is not advertised and we don't care.
2814 %
2815 % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
2816 \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
2817 %
2818 \def\math{%
2819 \tex
2820 \mathunderscore
2821 \let\\ = \mathbackslash
2822 \mathactive
2823 % make the texinfo accent commands work in math mode
2824 \let\"=\ddot
2825 \let\'=\acute
2826 \let\==\bar
2827 \let\^=\hat
2828 \let\`=\grave
2829 \let\u=\breve
2830 \let\v=\check
2831 \let\~=\tilde
2832 \let\dotaccent=\dot
2833 $\finishmath
2834 }
2835 \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
2836
2837 % Some active characters (such as <) are spaced differently in math.
2838 % We have to reset their definitions in case the @math was an argument
2839 % to a command which sets the catcodes (such as @item or @section).
2840 %
2841 {
2842 \catcode`^ = \active
2843 \catcode`< = \active
2844 \catcode`> = \active
2845 \catcode`+ = \active
2846 \catcode`' = \active
2847 \gdef\mathactive{%
2848 \let^ = \ptexhat
2849 \let< = \ptexless
2850 \let> = \ptexgtr
2851 \let+ = \ptexplus
2852 \let' = \ptexquoteright
2853 }
2854 }
2855
2856 % ctrl is no longer a Texinfo command, but leave this definition for fun.
2857 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
2858
2859 % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
2860 % Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
2861 % except specified as a normal braced arg, so no newlines to worry about.
2862 %
2863 \def\outfmtnametex{tex}
2864 %
2865 \long\def\inlinefmt#1{\doinlinefmt #1,\finish}
2866 \long\def\doinlinefmt#1,#2,\finish{%
2867 \def\inlinefmtname{#1}%
2868 \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
2869 }
2870 % For raw, must switch into @tex before parsing the argument, to avoid
2871 % setting catcodes prematurely. Doing it this way means that, for
2872 % example, @inlineraw{html, foo{bar} gets a parse error instead of being
2873 % ignored. But this isn't important because if people want a literal
2874 % *right* brace they would have to use a command anyway, so they may as
2875 % well use a command to get a left brace too. We could re-use the
2876 % delimiter character idea from \verb, but it seems like overkill.
2877 %
2878 \long\def\inlineraw{\tex \doinlineraw}
2879 \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
2880 \def\doinlinerawtwo#1,#2,\finish{%
2881 \def\inlinerawname{#1}%
2882 \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
2883 \endgroup % close group opened by \tex.
2884 }
2885
2886
2887 \message{glyphs,}
2888 % and logos.
2889
2890 % @@ prints an @, as does @atchar{}.
2891 \def\@{\char64 }
2892 \let\atchar=\@
2893
2894 % @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
2895 % Unless we're in typewriter, use \ecfont because the CM text fonts do
2896 % not have braces, and we don't want to switch into math.
2897 \def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
2898 \def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
2899 \let\{=\mylbrace \let\lbracechar=\{
2900 \let\}=\myrbrace \let\rbracechar=\}
2901 \begingroup
2902 % Definitions to produce \{ and \} commands for indices,
2903 % and @{ and @} for the aux/toc files.
2904 \catcode`\{ = \other \catcode`\} = \other
2905 \catcode`\[ = 1 \catcode`\] = 2
2906 \catcode`\! = 0 \catcode`\\ = \other
2907 !gdef!lbracecmd[\{]%
2908 !gdef!rbracecmd[\}]%
2909 !gdef!lbraceatcmd[@{]%
2910 !gdef!rbraceatcmd[@}]%
2911 !endgroup
2912
2913 % @comma{} to avoid , parsing problems.
2914 \let\comma = ,
2915
2916 % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
2917 % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
2918 \let\, = \ptexc
2919 \let\dotaccent = \ptexdot
2920 \def\ringaccent#1{{\accent23 #1}}
2921 \let\tieaccent = \ptext
2922 \let\ubaraccent = \ptexb
2923 \let\udotaccent = \d
2924
2925 % Other special characters: @questiondown @exclamdown @ordf @ordm
2926 % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
2927 \def\questiondown{?`}
2928 \def\exclamdown{!`}
2929 \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
2930 \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
2931
2932 % Dotless i and dotless j, used for accents.
2933 \def\imacro{i}
2934 \def\jmacro{j}
2935 \def\dotless#1{%
2936 \def\temp{#1}%
2937 \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
2938 \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
2939 \else \errmessage{@dotless can be used only with i or j}%
2940 \fi\fi
2941 }
2942
2943 % The \TeX{} logo, as in plain, but resetting the spacing so that a
2944 % period following counts as ending a sentence. (Idea found in latex.)
2945 %
2946 \edef\TeX{\TeX \spacefactor=1000 }
2947
2948 % @LaTeX{} logo. Not quite the same results as the definition in
2949 % latex.ltx, since we use a different font for the raised A; it's most
2950 % convenient for us to use an explicitly smaller font, rather than using
2951 % the \scriptstyle font (since we don't reset \scriptstyle and
2952 % \scriptscriptstyle).
2953 %
2954 \def\LaTeX{%
2955 L\kern-.36em
2956 {\setbox0=\hbox{T}%
2957 \vbox to \ht0{\hbox{%
2958 \ifx\textnominalsize\xwordpt
2959 % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
2960 % Revert to plain's \scriptsize, which is 7pt.
2961 \count255=\the\fam $\fam\count255 \scriptstyle A$%
2962 \else
2963 % For 11pt, we can use our lllsize.
2964 \selectfonts\lllsize A%
2965 \fi
2966 }%
2967 \vss
2968 }}%
2969 \kern-.15em
2970 \TeX
2971 }
2972
2973 % Some math mode symbols.
2974 \def\bullet{$\ptexbullet$}
2975 \def\geq{\ifmmode \ge\else $\ge$\fi}
2976 \def\leq{\ifmmode \le\else $\le$\fi}
2977 \def\minus{\ifmmode -\else $-$\fi}
2978
2979 % @dots{} outputs an ellipsis using the current font.
2980 % We do .5em per period so that it has the same spacing in the cm
2981 % typewriter fonts as three actual period characters; on the other hand,
2982 % in other typewriter fonts three periods are wider than 1.5em. So do
2983 % whichever is larger.
2984 %
2985 \def\dots{%
2986 \leavevmode
2987 \setbox0=\hbox{...}% get width of three periods
2988 \ifdim\wd0 > 1.5em
2989 \dimen0 = \wd0
2990 \else
2991 \dimen0 = 1.5em
2992 \fi
2993 \hbox to \dimen0{%
2994 \hskip 0pt plus.25fil
2995 .\hskip 0pt plus1fil
2996 .\hskip 0pt plus1fil
2997 .\hskip 0pt plus.5fil
2998 }%
2999 }
3000
3001 % @enddots{} is an end-of-sentence ellipsis.
3002 %
3003 \def\enddots{%
3004 \dots
3005 \spacefactor=\endofsentencespacefactor
3006 }
3007
3008 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
3009 %
3010 % Since these characters are used in examples, they should be an even number of
3011 % \tt widths. Each \tt character is 1en, so two makes it 1em.
3012 %
3013 \def\point{$\star$}
3014 \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
3015 \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
3016 \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
3017 \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
3018 \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
3019
3020 % The @error{} command.
3021 % Adapted from the TeXbook's \boxit.
3022 %
3023 \newbox\errorbox
3024 %
3025 {\tentt \global\dimen0 = 3em}% Width of the box.
3026 \dimen2 = .55pt % Thickness of rules
3027 % The text. (`r' is open on the right, `e' somewhat less so on the left.)
3028 \setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
3029 %
3030 \setbox\errorbox=\hbox to \dimen0{\hfil
3031 \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
3032 \advance\hsize by -2\dimen2 % Rules.
3033 \vbox{%
3034 \hrule height\dimen2
3035 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
3036 \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
3037 \kern3pt\vrule width\dimen2}% Space to right.
3038 \hrule height\dimen2}
3039 \hfil}
3040 %
3041 \def\error{\leavevmode\lower.7ex\copy\errorbox}
3042
3043 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
3044 %
3045 \def\pounds{{\it\$}}
3046
3047 % @euro{} comes from a separate font, depending on the current style.
3048 % We use the free feym* fonts from the eurosym package by Henrik
3049 % Theiling, which support regular, slanted, bold and bold slanted (and
3050 % "outlined" (blackboard board, sort of) versions, which we don't need).
3051 % It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
3052 %
3053 % Although only regular is the truly official Euro symbol, we ignore
3054 % that. The Euro is designed to be slightly taller than the regular
3055 % font height.
3056 %
3057 % feymr - regular
3058 % feymo - slanted
3059 % feybr - bold
3060 % feybo - bold slanted
3061 %
3062 % There is no good (free) typewriter version, to my knowledge.
3063 % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
3064 % Hmm.
3065 %
3066 % Also doesn't work in math. Do we need to do math with euro symbols?
3067 % Hope not.
3068 %
3069 %
3070 \def\euro{{\eurofont e}}
3071 \def\eurofont{%
3072 % We set the font at each command, rather than predefining it in
3073 % \textfonts and the other font-switching commands, so that
3074 % installations which never need the symbol don't have to have the
3075 % font installed.
3076 %
3077 % There is only one designed size (nominal 10pt), so we always scale
3078 % that to the current nominal size.
3079 %
3080 % By the way, simply using "at 1em" works for cmr10 and the like, but
3081 % does not work for cmbx10 and other extended/shrunken fonts.
3082 %
3083 \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
3084 %
3085 \ifx\curfontstyle\bfstylename
3086 % bold:
3087 \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
3088 \else
3089 % regular:
3090 \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
3091 \fi
3092 \thiseurofont
3093 }
3094
3095 % Glyphs from the EC fonts. We don't use \let for the aliases, because
3096 % sometimes we redefine the original macro, and the alias should reflect
3097 % the redefinition.
3098 %
3099 % Use LaTeX names for the Icelandic letters.
3100 \def\DH{{\ecfont \char"D0}} % Eth
3101 \def\dh{{\ecfont \char"F0}} % eth
3102 \def\TH{{\ecfont \char"DE}} % Thorn
3103 \def\th{{\ecfont \char"FE}} % thorn
3104 %
3105 \def\guillemetleft{{\ecfont \char"13}}
3106 \def\guillemotleft{\guillemetleft}
3107 \def\guillemetright{{\ecfont \char"14}}
3108 \def\guillemotright{\guillemetright}
3109 \def\guilsinglleft{{\ecfont \char"0E}}
3110 \def\guilsinglright{{\ecfont \char"0F}}
3111 \def\quotedblbase{{\ecfont \char"12}}
3112 \def\quotesinglbase{{\ecfont \char"0D}}
3113 %
3114 % This positioning is not perfect (see the ogonek LaTeX package), but
3115 % we have the precomposed glyphs for the most common cases. We put the
3116 % tests to use those glyphs in the single \ogonek macro so we have fewer
3117 % dummy definitions to worry about for index entries, etc.
3118 %
3119 % ogonek is also used with other letters in Lithuanian (IOU), but using
3120 % the precomposed glyphs for those is not so easy since they aren't in
3121 % the same EC font.
3122 \def\ogonek#1{{%
3123 \def\temp{#1}%
3124 \ifx\temp\macrocharA\Aogonek
3125 \else\ifx\temp\macrochara\aogonek
3126 \else\ifx\temp\macrocharE\Eogonek
3127 \else\ifx\temp\macrochare\eogonek
3128 \else
3129 \ecfont \setbox0=\hbox{#1}%
3130 \ifdim\ht0=1ex\accent"0C #1%
3131 \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
3132 \fi
3133 \fi\fi\fi\fi
3134 }%
3135 }
3136 \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
3137 \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
3138 \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
3139 \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
3140 %
3141 % Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
3142 \def\ecfont{%
3143 % We can't distinguish serif/sans and italic/slanted, but this
3144 % is used for crude hacks anyway (like adding French and German
3145 % quotes to documents typeset with CM, where we lose kerning), so
3146 % hopefully nobody will notice/care.
3147 \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
3148 \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
3149 \ifmonospace
3150 % typewriter:
3151 \font\thisecfont = ectt\ecsize \space at \nominalsize
3152 \else
3153 \ifx\curfontstyle\bfstylename
3154 % bold:
3155 \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
3156 \else
3157 % regular:
3158 \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
3159 \fi
3160 \fi
3161 \thisecfont
3162 }
3163
3164 % @registeredsymbol - R in a circle. The font for the R should really
3165 % be smaller yet, but lllsize is the best we can do for now.
3166 % Adapted from the plain.tex definition of \copyright.
3167 %
3168 \def\registeredsymbol{%
3169 $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}%
3170 \hfil\crcr\Orb}}%
3171 }$%
3172 }
3173
3174 % @textdegree - the normal degrees sign.
3175 %
3176 \def\textdegree{$^\circ$}
3177
3178 % Laurent Siebenmann reports \Orb undefined with:
3179 % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
3180 % so we'll define it if necessary.
3181 %
3182 \ifx\Orb\thisisundefined
3183 \def\Orb{\mathhexbox20D}
3184 \fi
3185
3186 % Quotes.
3187 \chardef\quotedblleft="5C
3188 \chardef\quotedblright=`\"
3189 \chardef\quoteleft=`\`
3190 \chardef\quoteright=`\'
3191
3192
3193 \message{page headings,}
3194
3195 \newskip\titlepagetopglue \titlepagetopglue = 1.5in
3196 \newskip\titlepagebottomglue \titlepagebottomglue = 2pc
3197
3198 % First the title page. Must do @settitle before @titlepage.
3199 \newif\ifseenauthor
3200 \newif\iffinishedtitlepage
3201
3202 % Do an implicit @contents or @shortcontents after @end titlepage if the
3203 % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
3204 %
3205 \newif\ifsetcontentsaftertitlepage
3206 \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
3207 \newif\ifsetshortcontentsaftertitlepage
3208 \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
3209
3210 \parseargdef\shorttitlepage{%
3211 \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
3212 \endgroup\page\hbox{}\page}
3213
3214 \envdef\titlepage{%
3215 % Open one extra group, as we want to close it in the middle of \Etitlepage.
3216 \begingroup
3217 \parindent=0pt \textfonts
3218 % Leave some space at the very top of the page.
3219 \vglue\titlepagetopglue
3220 % No rule at page bottom unless we print one at the top with @title.
3221 \finishedtitlepagetrue
3222 %
3223 % Most title ``pages'' are actually two pages long, with space
3224 % at the top of the second. We don't want the ragged left on the second.
3225 \let\oldpage = \page
3226 \def\page{%
3227 \iffinishedtitlepage\else
3228 \finishtitlepage
3229 \fi
3230 \let\page = \oldpage
3231 \page
3232 \null
3233 }%
3234 }
3235
3236 \def\Etitlepage{%
3237 \iffinishedtitlepage\else
3238 \finishtitlepage
3239 \fi
3240 % It is important to do the page break before ending the group,
3241 % because the headline and footline are only empty inside the group.
3242 % If we use the new definition of \page, we always get a blank page
3243 % after the title page, which we certainly don't want.
3244 \oldpage
3245 \endgroup
3246 %
3247 % Need this before the \...aftertitlepage checks so that if they are
3248 % in effect the toc pages will come out with page numbers.
3249 \HEADINGSon
3250 %
3251 % If they want short, they certainly want long too.
3252 \ifsetshortcontentsaftertitlepage
3253 \shortcontents
3254 \contents
3255 \global\let\shortcontents = \relax
3256 \global\let\contents = \relax
3257 \fi
3258 %
3259 \ifsetcontentsaftertitlepage
3260 \contents
3261 \global\let\contents = \relax
3262 \global\let\shortcontents = \relax
3263 \fi
3264 }
3265
3266 \def\finishtitlepage{%
3267 \vskip4pt \hrule height 2pt width \hsize
3268 \vskip\titlepagebottomglue
3269 \finishedtitlepagetrue
3270 }
3271
3272 % Settings used for typesetting titles: no hyphenation, no indentation,
3273 % don't worry much about spacing, ragged right. This should be used
3274 % inside a \vbox, and fonts need to be set appropriately first. Because
3275 % it is always used for titles, nothing else, we call \rmisbold. \par
3276 % should be specified before the end of the \vbox, since a vbox is a group.
3277 %
3278 \def\raggedtitlesettings{%
3279 \rmisbold
3280 \hyphenpenalty=10000
3281 \parindent=0pt
3282 \tolerance=5000
3283 \ptexraggedright
3284 }
3285
3286 % Macros to be used within @titlepage:
3287
3288 \let\subtitlerm=\tenrm
3289 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
3290
3291 \parseargdef\title{%
3292 \checkenv\titlepage
3293 \vbox{\titlefonts \raggedtitlesettings #1\par}%
3294 % print a rule at the page bottom also.
3295 \finishedtitlepagefalse
3296 \vskip4pt \hrule height 4pt width \hsize \vskip4pt
3297 }
3298
3299 \parseargdef\subtitle{%
3300 \checkenv\titlepage
3301 {\subtitlefont \rightline{#1}}%
3302 }
3303
3304 % @author should come last, but may come many times.
3305 % It can also be used inside @quotation.
3306 %
3307 \parseargdef\author{%
3308 \def\temp{\quotation}%
3309 \ifx\thisenv\temp
3310 \def\quotationauthor{#1}% printed in \Equotation.
3311 \else
3312 \checkenv\titlepage
3313 \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
3314 {\secfonts\rmisbold \leftline{#1}}%
3315 \fi
3316 }
3317
3318
3319 % Set up page headings and footings.
3320
3321 \let\thispage=\folio
3322
3323 \newtoks\evenheadline % headline on even pages
3324 \newtoks\oddheadline % headline on odd pages
3325 \newtoks\evenfootline % footline on even pages
3326 \newtoks\oddfootline % footline on odd pages
3327
3328 % Now make TeX use those variables
3329 \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
3330 \else \the\evenheadline \fi}}
3331 \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
3332 \else \the\evenfootline \fi}\HEADINGShook}
3333 \let\HEADINGShook=\relax
3334
3335 % Commands to set those variables.
3336 % For example, this is what @headings on does
3337 % @evenheading @thistitle|@thispage|@thischapter
3338 % @oddheading @thischapter|@thispage|@thistitle
3339 % @evenfooting @thisfile||
3340 % @oddfooting ||@thisfile
3341
3342
3343 \def\evenheading{\parsearg\evenheadingxxx}
3344 \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish}
3345 \def\evenheadingyyy #1\|#2\|#3\|#4\finish{%
3346 \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3347
3348 \def\oddheading{\parsearg\oddheadingxxx}
3349 \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish}
3350 \def\oddheadingyyy #1\|#2\|#3\|#4\finish{%
3351 \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3352
3353 \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
3354
3355 \def\evenfooting{\parsearg\evenfootingxxx}
3356 \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish}
3357 \def\evenfootingyyy #1\|#2\|#3\|#4\finish{%
3358 \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
3359
3360 \def\oddfooting{\parsearg\oddfootingxxx}
3361 \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish}
3362 \def\oddfootingyyy #1\|#2\|#3\|#4\finish{%
3363 \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
3364 %
3365 % Leave some space for the footline. Hopefully ok to assume
3366 % @evenfooting will not be used by itself.
3367 \global\advance\pageheight by -12pt
3368 \global\advance\vsize by -12pt
3369 }
3370
3371 \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
3372
3373 % @evenheadingmarks top \thischapter <- chapter at the top of a page
3374 % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page
3375 %
3376 % The same set of arguments for:
3377 %
3378 % @oddheadingmarks
3379 % @evenfootingmarks
3380 % @oddfootingmarks
3381 % @everyheadingmarks
3382 % @everyfootingmarks
3383
3384 \def\evenheadingmarks{\headingmarks{even}{heading}}
3385 \def\oddheadingmarks{\headingmarks{odd}{heading}}
3386 \def\evenfootingmarks{\headingmarks{even}{footing}}
3387 \def\oddfootingmarks{\headingmarks{odd}{footing}}
3388 \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1}
3389 \headingmarks{odd}{heading}{#1} }
3390 \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1}
3391 \headingmarks{odd}{footing}{#1} }
3392 % #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
3393 \def\headingmarks#1#2#3 {%
3394 \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname
3395 \global\expandafter\let\csname get#1#2marks\endcsname \temp
3396 }
3397
3398 \everyheadingmarks bottom
3399 \everyfootingmarks bottom
3400
3401 % @headings double turns headings on for double-sided printing.
3402 % @headings single turns headings on for single-sided printing.
3403 % @headings off turns them off.
3404 % @headings on same as @headings double, retained for compatibility.
3405 % @headings after turns on double-sided headings after this page.
3406 % @headings doubleafter turns on double-sided headings after this page.
3407 % @headings singleafter turns on single-sided headings after this page.
3408 % By default, they are off at the start of a document,
3409 % and turned `on' after @end titlepage.
3410
3411 \def\headings #1 {\csname HEADINGS#1\endcsname}
3412
3413 \def\headingsoff{% non-global headings elimination
3414 \evenheadline={\hfil}\evenfootline={\hfil}%
3415 \oddheadline={\hfil}\oddfootline={\hfil}%
3416 }
3417
3418 \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
3419 \HEADINGSoff % it's the default
3420
3421 % When we turn headings on, set the page number to 1.
3422 % For double-sided printing, put current file name in lower left corner,
3423 % chapter name on inside top of right hand pages, document
3424 % title on inside top of left hand pages, and page numbers on outside top
3425 % edge of all pages.
3426 \def\HEADINGSdouble{%
3427 \global\pageno=1
3428 \global\evenfootline={\hfil}
3429 \global\oddfootline={\hfil}
3430 \global\evenheadline={\line{\folio\hfil\thistitle}}
3431 \global\oddheadline={\line{\thischapter\hfil\folio}}
3432 \global\let\contentsalignmacro = \chapoddpage
3433 }
3434 \let\contentsalignmacro = \chappager
3435
3436 % For single-sided printing, chapter title goes across top left of page,
3437 % page number on top right.
3438 \def\HEADINGSsingle{%
3439 \global\pageno=1
3440 \global\evenfootline={\hfil}
3441 \global\oddfootline={\hfil}
3442 \global\evenheadline={\line{\thischapter\hfil\folio}}
3443 \global\oddheadline={\line{\thischapter\hfil\folio}}
3444 \global\let\contentsalignmacro = \chappager
3445 }
3446 \def\HEADINGSon{\HEADINGSdouble}
3447
3448 \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
3449 \let\HEADINGSdoubleafter=\HEADINGSafter
3450 \def\HEADINGSdoublex{%
3451 \global\evenfootline={\hfil}
3452 \global\oddfootline={\hfil}
3453 \global\evenheadline={\line{\folio\hfil\thistitle}}
3454 \global\oddheadline={\line{\thischapter\hfil\folio}}
3455 \global\let\contentsalignmacro = \chapoddpage
3456 }
3457
3458 \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
3459 \def\HEADINGSsinglex{%
3460 \global\evenfootline={\hfil}
3461 \global\oddfootline={\hfil}
3462 \global\evenheadline={\line{\thischapter\hfil\folio}}
3463 \global\oddheadline={\line{\thischapter\hfil\folio}}
3464 \global\let\contentsalignmacro = \chappager
3465 }
3466
3467 % Subroutines used in generating headings
3468 % This produces Day Month Year style of output.
3469 % Only define if not already defined, in case a txi-??.tex file has set
3470 % up a different format (e.g., txi-cs.tex does this).
3471 \ifx\today\thisisundefined
3472 \def\today{%
3473 \number\day\space
3474 \ifcase\month
3475 \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
3476 \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
3477 \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
3478 \fi
3479 \space\number\year}
3480 \fi
3481
3482 % @settitle line... specifies the title of the document, for headings.
3483 % It generates no output of its own.
3484 \def\thistitle{\putwordNoTitle}
3485 \def\settitle{\parsearg{\gdef\thistitle}}
3486
3487
3488 \message{tables,}
3489 % Tables -- @table, @ftable, @vtable, @item(x).
3490
3491 % default indentation of table text
3492 \newdimen\tableindent \tableindent=.8in
3493 % default indentation of @itemize and @enumerate text
3494 \newdimen\itemindent \itemindent=.3in
3495 % margin between end of table item and start of table text.
3496 \newdimen\itemmargin \itemmargin=.1in
3497
3498 % used internally for \itemindent minus \itemmargin
3499 \newdimen\itemmax
3500
3501 % Note @table, @ftable, and @vtable define @item, @itemx, etc., with
3502 % these defs.
3503 % They also define \itemindex
3504 % to index the item name in whatever manner is desired (perhaps none).
3505
3506 \newif\ifitemxneedsnegativevskip
3507
3508 \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
3509
3510 \def\internalBitem{\smallbreak \parsearg\itemzzz}
3511 \def\internalBitemx{\itemxpar \parsearg\itemzzz}
3512
3513 \def\itemzzz #1{\begingroup %
3514 \advance\hsize by -\rightskip
3515 \advance\hsize by -\tableindent
3516 \setbox0=\hbox{\itemindicate{#1}}%
3517 \itemindex{#1}%
3518 \nobreak % This prevents a break before @itemx.
3519 %
3520 % If the item text does not fit in the space we have, put it on a line
3521 % by itself, and do not allow a page break either before or after that
3522 % line. We do not start a paragraph here because then if the next
3523 % command is, e.g., @kindex, the whatsit would get put into the
3524 % horizontal list on a line by itself, resulting in extra blank space.
3525 \ifdim \wd0>\itemmax
3526 %
3527 % Make this a paragraph so we get the \parskip glue and wrapping,
3528 % but leave it ragged-right.
3529 \begingroup
3530 \advance\leftskip by-\tableindent
3531 \advance\hsize by\tableindent
3532 \advance\rightskip by0pt plus1fil\relax
3533 \leavevmode\unhbox0\par
3534 \endgroup
3535 %
3536 % We're going to be starting a paragraph, but we don't want the
3537 % \parskip glue -- logically it's part of the @item we just started.
3538 \nobreak \vskip-\parskip
3539 %
3540 % Stop a page break at the \parskip glue coming up. However, if
3541 % what follows is an environment such as @example, there will be no
3542 % \parskip glue; then the negative vskip we just inserted would
3543 % cause the example and the item to crash together. So we use this
3544 % bizarre value of 10001 as a signal to \aboveenvbreak to insert
3545 % \parskip glue after all. Section titles are handled this way also.
3546 %
3547 \penalty 10001
3548 \endgroup
3549 \itemxneedsnegativevskipfalse
3550 \else
3551 % The item text fits into the space. Start a paragraph, so that the
3552 % following text (if any) will end up on the same line.
3553 \noindent
3554 % Do this with kerns and \unhbox so that if there is a footnote in
3555 % the item text, it can migrate to the main vertical list and
3556 % eventually be printed.
3557 \nobreak\kern-\tableindent
3558 \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
3559 \unhbox0
3560 \nobreak\kern\dimen0
3561 \endgroup
3562 \itemxneedsnegativevskiptrue
3563 \fi
3564 }
3565
3566 \def\item{\errmessage{@item while not in a list environment}}
3567 \def\itemx{\errmessage{@itemx while not in a list environment}}
3568
3569 % @table, @ftable, @vtable.
3570 \envdef\table{%
3571 \let\itemindex\gobble
3572 \tablecheck{table}%
3573 }
3574 \envdef\ftable{%
3575 \def\itemindex ##1{\doind {fn}{\code{##1}}}%
3576 \tablecheck{ftable}%
3577 }
3578 \envdef\vtable{%
3579 \def\itemindex ##1{\doind {vr}{\code{##1}}}%
3580 \tablecheck{vtable}%
3581 }
3582 \def\tablecheck#1{%
3583 \ifnum \the\catcode`\^^M=\active
3584 \endgroup
3585 \errmessage{This command won't work in this context; perhaps the problem is
3586 that we are \inenvironment\thisenv}%
3587 \def\next{\doignore{#1}}%
3588 \else
3589 \let\next\tablex
3590 \fi
3591 \next
3592 }
3593 \def\tablex#1{%
3594 \def\itemindicate{#1}%
3595 \parsearg\tabley
3596 }
3597 \def\tabley#1{%
3598 {%
3599 \makevalueexpandable
3600 \edef\temp{\noexpand\tablez #1\space\space\space}%
3601 \expandafter
3602 }\temp \endtablez
3603 }
3604 \def\tablez #1 #2 #3 #4\endtablez{%
3605 \aboveenvbreak
3606 \ifnum 0#1>0 \advance \leftskip by #1\mil \fi
3607 \ifnum 0#2>0 \tableindent=#2\mil \fi
3608 \ifnum 0#3>0 \advance \rightskip by #3\mil \fi
3609 \itemmax=\tableindent
3610 \advance \itemmax by -\itemmargin
3611 \advance \leftskip by \tableindent
3612 \exdentamount=\tableindent
3613 \parindent = 0pt
3614 \parskip = \smallskipamount
3615 \ifdim \parskip=0pt \parskip=2pt \fi
3616 \let\item = \internalBitem
3617 \let\itemx = \internalBitemx
3618 }
3619 \def\Etable{\endgraf\afterenvbreak}
3620 \let\Eftable\Etable
3621 \let\Evtable\Etable
3622 \let\Eitemize\Etable
3623 \let\Eenumerate\Etable
3624
3625 % This is the counter used by @enumerate, which is really @itemize
3626
3627 \newcount \itemno
3628
3629 \envdef\itemize{\parsearg\doitemize}
3630
3631 \def\doitemize#1{%
3632 \aboveenvbreak
3633 \itemmax=\itemindent
3634 \advance\itemmax by -\itemmargin
3635 \advance\leftskip by \itemindent
3636 \exdentamount=\itemindent
3637 \parindent=0pt
3638 \parskip=\smallskipamount
3639 \ifdim\parskip=0pt \parskip=2pt \fi
3640 %
3641 % Try typesetting the item mark that if the document erroneously says
3642 % something like @itemize @samp (intending @table), there's an error
3643 % right away at the @itemize. It's not the best error message in the
3644 % world, but it's better than leaving it to the @item. This means if
3645 % the user wants an empty mark, they have to say @w{} not just @w.
3646 \def\itemcontents{#1}%
3647 \setbox0 = \hbox{\itemcontents}%
3648 %
3649 % @itemize with no arg is equivalent to @itemize @bullet.
3650 \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
3651 %
3652 \let\item=\itemizeitem
3653 }
3654
3655 % Definition of @item while inside @itemize and @enumerate.
3656 %
3657 \def\itemizeitem{%
3658 \advance\itemno by 1 % for enumerations
3659 {\let\par=\endgraf \smallbreak}% reasonable place to break
3660 {%
3661 % If the document has an @itemize directly after a section title, a
3662 % \nobreak will be last on the list, and \sectionheading will have
3663 % done a \vskip-\parskip. In that case, we don't want to zero
3664 % parskip, or the item text will crash with the heading. On the
3665 % other hand, when there is normal text preceding the item (as there
3666 % usually is), we do want to zero parskip, or there would be too much
3667 % space. In that case, we won't have a \nobreak before. At least
3668 % that's the theory.
3669 \ifnum\lastpenalty<10000 \parskip=0in \fi
3670 \noindent
3671 \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
3672 %
3673 \vadjust{\penalty 1200}}% not good to break after first line of item.
3674 \flushcr
3675 }
3676
3677 % \splitoff TOKENS\endmark defines \first to be the first token in
3678 % TOKENS, and \rest to be the remainder.
3679 %
3680 \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
3681
3682 % Allow an optional argument of an uppercase letter, lowercase letter,
3683 % or number, to specify the first label in the enumerated list. No
3684 % argument is the same as `1'.
3685 %
3686 \envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
3687 \def\enumeratey #1 #2\endenumeratey{%
3688 % If we were given no argument, pretend we were given `1'.
3689 \def\thearg{#1}%
3690 \ifx\thearg\empty \def\thearg{1}\fi
3691 %
3692 % Detect if the argument is a single token. If so, it might be a
3693 % letter. Otherwise, the only valid thing it can be is a number.
3694 % (We will always have one token, because of the test we just made.
3695 % This is a good thing, since \splitoff doesn't work given nothing at
3696 % all -- the first parameter is undelimited.)
3697 \expandafter\splitoff\thearg\endmark
3698 \ifx\rest\empty
3699 % Only one token in the argument. It could still be anything.
3700 % A ``lowercase letter'' is one whose \lccode is nonzero.
3701 % An ``uppercase letter'' is one whose \lccode is both nonzero, and
3702 % not equal to itself.
3703 % Otherwise, we assume it's a number.
3704 %
3705 % We need the \relax at the end of the \ifnum lines to stop TeX from
3706 % continuing to look for a <number>.
3707 %
3708 \ifnum\lccode\expandafter`\thearg=0\relax
3709 \numericenumerate % a number (we hope)
3710 \else
3711 % It's a letter.
3712 \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
3713 \lowercaseenumerate % lowercase letter
3714 \else
3715 \uppercaseenumerate % uppercase letter
3716 \fi
3717 \fi
3718 \else
3719 % Multiple tokens in the argument. We hope it's a number.
3720 \numericenumerate
3721 \fi
3722 }
3723
3724 % An @enumerate whose labels are integers. The starting integer is
3725 % given in \thearg.
3726 %
3727 \def\numericenumerate{%
3728 \itemno = \thearg
3729 \startenumeration{\the\itemno}%
3730 }
3731
3732 % The starting (lowercase) letter is in \thearg.
3733 \def\lowercaseenumerate{%
3734 \itemno = \expandafter`\thearg
3735 \startenumeration{%
3736 % Be sure we're not beyond the end of the alphabet.
3737 \ifnum\itemno=0
3738 \errmessage{No more lowercase letters in @enumerate; get a bigger
3739 alphabet}%
3740 \fi
3741 \char\lccode\itemno
3742 }%
3743 }
3744
3745 % The starting (uppercase) letter is in \thearg.
3746 \def\uppercaseenumerate{%
3747 \itemno = \expandafter`\thearg
3748 \startenumeration{%
3749 % Be sure we're not beyond the end of the alphabet.
3750 \ifnum\itemno=0
3751 \errmessage{No more uppercase letters in @enumerate; get a bigger
3752 alphabet}
3753 \fi
3754 \char\uccode\itemno
3755 }%
3756 }
3757
3758 % Call \doitemize, adding a period to the first argument and supplying the
3759 % common last two arguments. Also subtract one from the initial value in
3760 % \itemno, since @item increments \itemno.
3761 %
3762 \def\startenumeration#1{%
3763 \advance\itemno by -1
3764 \doitemize{#1.}\flushcr
3765 }
3766
3767 % @alphaenumerate and @capsenumerate are abbreviations for giving an arg
3768 % to @enumerate.
3769 %
3770 \def\alphaenumerate{\enumerate{a}}
3771 \def\capsenumerate{\enumerate{A}}
3772 \def\Ealphaenumerate{\Eenumerate}
3773 \def\Ecapsenumerate{\Eenumerate}
3774
3775
3776 % @multitable macros
3777 % Amy Hendrickson, 8/18/94, 3/6/96
3778 %
3779 % @multitable ... @end multitable will make as many columns as desired.
3780 % Contents of each column will wrap at width given in preamble. Width
3781 % can be specified either with sample text given in a template line,
3782 % or in percent of \hsize, the current width of text on page.
3783
3784 % Table can continue over pages but will only break between lines.
3785
3786 % To make preamble:
3787 %
3788 % Either define widths of columns in terms of percent of \hsize:
3789 % @multitable @columnfractions .25 .3 .45
3790 % @item ...
3791 %
3792 % Numbers following @columnfractions are the percent of the total
3793 % current hsize to be used for each column. You may use as many
3794 % columns as desired.
3795
3796
3797 % Or use a template:
3798 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
3799 % @item ...
3800 % using the widest term desired in each column.
3801
3802 % Each new table line starts with @item, each subsequent new column
3803 % starts with @tab. Empty columns may be produced by supplying @tab's
3804 % with nothing between them for as many times as empty columns are needed,
3805 % ie, @tab@tab@tab will produce two empty columns.
3806
3807 % @item, @tab do not need to be on their own lines, but it will not hurt
3808 % if they are.
3809
3810 % Sample multitable:
3811
3812 % @multitable {Column 1 template} {Column 2 template} {Column 3 template}
3813 % @item first col stuff @tab second col stuff @tab third col
3814 % @item
3815 % first col stuff
3816 % @tab
3817 % second col stuff
3818 % @tab
3819 % third col
3820 % @item first col stuff @tab second col stuff
3821 % @tab Many paragraphs of text may be used in any column.
3822 %
3823 % They will wrap at the width determined by the template.
3824 % @item@tab@tab This will be in third column.
3825 % @end multitable
3826
3827 % Default dimensions may be reset by user.
3828 % @multitableparskip is vertical space between paragraphs in table.
3829 % @multitableparindent is paragraph indent in table.
3830 % @multitablecolmargin is horizontal space to be left between columns.
3831 % @multitablelinespace is space to leave between table items, baseline
3832 % to baseline.
3833 % 0pt means it depends on current normal line spacing.
3834 %
3835 \newskip\multitableparskip
3836 \newskip\multitableparindent
3837 \newdimen\multitablecolspace
3838 \newskip\multitablelinespace
3839 \multitableparskip=0pt
3840 \multitableparindent=6pt
3841 \multitablecolspace=12pt
3842 \multitablelinespace=0pt
3843
3844 % Macros used to set up halign preamble:
3845 %
3846 \let\endsetuptable\relax
3847 \def\xendsetuptable{\endsetuptable}
3848 \let\columnfractions\relax
3849 \def\xcolumnfractions{\columnfractions}
3850 \newif\ifsetpercent
3851
3852 % #1 is the @columnfraction, usually a decimal number like .5, but might
3853 % be just 1. We just use it, whatever it is.
3854 %
3855 \def\pickupwholefraction#1 {%
3856 \global\advance\colcount by 1
3857 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}%
3858 \setuptable
3859 }
3860
3861 \newcount\colcount
3862 \def\setuptable#1{%
3863 \def\firstarg{#1}%
3864 \ifx\firstarg\xendsetuptable
3865 \let\go = \relax
3866 \else
3867 \ifx\firstarg\xcolumnfractions
3868 \global\setpercenttrue
3869 \else
3870 \ifsetpercent
3871 \let\go\pickupwholefraction
3872 \else
3873 \global\advance\colcount by 1
3874 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
3875 % separator; typically that is always in the input, anyway.
3876 \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
3877 \fi
3878 \fi
3879 \ifx\go\pickupwholefraction
3880 % Put the argument back for the \pickupwholefraction call, so
3881 % we'll always have a period there to be parsed.
3882 \def\go{\pickupwholefraction#1}%
3883 \else
3884 \let\go = \setuptable
3885 \fi%
3886 \fi
3887 \go
3888 }
3889
3890 % multitable-only commands.
3891 %
3892 % @headitem starts a heading row, which we typeset in bold.
3893 % Assignments have to be global since we are inside the implicit group
3894 % of an alignment entry. \everycr resets \everytab so we don't have to
3895 % undo it ourselves.
3896 \def\headitemfont{\b}% for people to use in the template row; not changeable
3897 \def\headitem{%
3898 \checkenv\multitable
3899 \crcr
3900 \global\everytab={\bf}% can't use \headitemfont since the parsing differs
3901 \the\everytab % for the first item
3902 }%
3903 %
3904 % A \tab used to include \hskip1sp. But then the space in a template
3905 % line is not enough. That is bad. So let's go back to just `&' until
3906 % we again encounter the problem the 1sp was intended to solve.
3907 % --karl, nathan@acm.org, 20apr99.
3908 \def\tab{\checkenv\multitable &\the\everytab}%
3909
3910 % @multitable ... @end multitable definitions:
3911 %
3912 \newtoks\everytab % insert after every tab.
3913 %
3914 \envdef\multitable{%
3915 \vskip\parskip
3916 \startsavinginserts
3917 %
3918 % @item within a multitable starts a normal row.
3919 % We use \def instead of \let so that if one of the multitable entries
3920 % contains an @itemize, we don't choke on the \item (seen as \crcr aka
3921 % \endtemplate) expanding \doitemize.
3922 \def\item{\crcr}%
3923 %
3924 \tolerance=9500
3925 \hbadness=9500
3926 \setmultitablespacing
3927 \parskip=\multitableparskip
3928 \parindent=\multitableparindent
3929 \overfullrule=0pt
3930 \global\colcount=0
3931 %
3932 \everycr = {%
3933 \noalign{%
3934 \global\everytab={}%
3935 \global\colcount=0 % Reset the column counter.
3936 % Check for saved footnotes, etc.
3937 \checkinserts
3938 % Keeps underfull box messages off when table breaks over pages.
3939 %\filbreak
3940 % Maybe so, but it also creates really weird page breaks when the
3941 % table breaks over pages. Wouldn't \vfil be better? Wait until the
3942 % problem manifests itself, so it can be fixed for real --karl.
3943 }%
3944 }%
3945 %
3946 \parsearg\domultitable
3947 }
3948 \def\domultitable#1{%
3949 % To parse everything between @multitable and @item:
3950 \setuptable#1 \endsetuptable
3951 %
3952 % This preamble sets up a generic column definition, which will
3953 % be used as many times as user calls for columns.
3954 % \vtop will set a single line and will also let text wrap and
3955 % continue for many paragraphs if desired.
3956 \halign\bgroup &%
3957 \global\advance\colcount by 1
3958 \multistrut
3959 \vtop{%
3960 % Use the current \colcount to find the correct column width:
3961 \hsize=\expandafter\csname col\the\colcount\endcsname
3962 %
3963 % In order to keep entries from bumping into each other
3964 % we will add a \leftskip of \multitablecolspace to all columns after
3965 % the first one.
3966 %
3967 % If a template has been used, we will add \multitablecolspace
3968 % to the width of each template entry.
3969 %
3970 % If the user has set preamble in terms of percent of \hsize we will
3971 % use that dimension as the width of the column, and the \leftskip
3972 % will keep entries from bumping into each other. Table will start at
3973 % left margin and final column will justify at right margin.
3974 %
3975 % Make sure we don't inherit \rightskip from the outer environment.
3976 \rightskip=0pt
3977 \ifnum\colcount=1
3978 % The first column will be indented with the surrounding text.
3979 \advance\hsize by\leftskip
3980 \else
3981 \ifsetpercent \else
3982 % If user has not set preamble in terms of percent of \hsize
3983 % we will advance \hsize by \multitablecolspace.
3984 \advance\hsize by \multitablecolspace
3985 \fi
3986 % In either case we will make \leftskip=\multitablecolspace:
3987 \leftskip=\multitablecolspace
3988 \fi
3989 % Ignoring space at the beginning and end avoids an occasional spurious
3990 % blank line, when TeX decides to break the line at the space before the
3991 % box from the multistrut, so the strut ends up on a line by itself.
3992 % For example:
3993 % @multitable @columnfractions .11 .89
3994 % @item @code{#}
3995 % @tab Legal holiday which is valid in major parts of the whole country.
3996 % Is automatically provided with highlighting sequences respectively
3997 % marking characters.
3998 \noindent\ignorespaces##\unskip\multistrut
3999 }\cr
4000 }
4001 \def\Emultitable{%
4002 \crcr
4003 \egroup % end the \halign
4004 \global\setpercentfalse
4005 }
4006
4007 \def\setmultitablespacing{%
4008 \def\multistrut{\strut}% just use the standard line spacing
4009 %
4010 % Compute \multitablelinespace (if not defined by user) for use in
4011 % \multitableparskip calculation. We used define \multistrut based on
4012 % this, but (ironically) that caused the spacing to be off.
4013 % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
4014 \ifdim\multitablelinespace=0pt
4015 \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
4016 \global\advance\multitablelinespace by-\ht0
4017 \fi
4018 % Test to see if parskip is larger than space between lines of
4019 % table. If not, do nothing.
4020 % If so, set to same dimension as multitablelinespace.
4021 \ifdim\multitableparskip>\multitablelinespace
4022 \global\multitableparskip=\multitablelinespace
4023 \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
4024 % than skip between lines in the table.
4025 \fi%
4026 \ifdim\multitableparskip=0pt
4027 \global\multitableparskip=\multitablelinespace
4028 \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
4029 % than skip between lines in the table.
4030 \fi}
4031
4032
4033 \message{conditionals,}
4034
4035 % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
4036 % @ifnotxml always succeed. They currently do nothing; we don't
4037 % attempt to check whether the conditionals are properly nested. But we
4038 % have to remember that they are conditionals, so that @end doesn't
4039 % attempt to close an environment group.
4040 %
4041 \def\makecond#1{%
4042 \expandafter\let\csname #1\endcsname = \relax
4043 \expandafter\let\csname iscond.#1\endcsname = 1
4044 }
4045 \makecond{iftex}
4046 \makecond{ifnotdocbook}
4047 \makecond{ifnothtml}
4048 \makecond{ifnotinfo}
4049 \makecond{ifnotplaintext}
4050 \makecond{ifnotxml}
4051
4052 % Ignore @ignore, @ifhtml, @ifinfo, and the like.
4053 %
4054 \def\direntry{\doignore{direntry}}
4055 \def\documentdescription{\doignore{documentdescription}}
4056 \def\docbook{\doignore{docbook}}
4057 \def\html{\doignore{html}}
4058 \def\ifdocbook{\doignore{ifdocbook}}
4059 \def\ifhtml{\doignore{ifhtml}}
4060 \def\ifinfo{\doignore{ifinfo}}
4061 \def\ifnottex{\doignore{ifnottex}}
4062 \def\ifplaintext{\doignore{ifplaintext}}
4063 \def\ifxml{\doignore{ifxml}}
4064 \def\ignore{\doignore{ignore}}
4065 \def\menu{\doignore{menu}}
4066 \def\xml{\doignore{xml}}
4067
4068 % Ignore text until a line `@end #1', keeping track of nested conditionals.
4069 %
4070 % A count to remember the depth of nesting.
4071 \newcount\doignorecount
4072
4073 \def\doignore#1{\begingroup
4074 % Scan in ``verbatim'' mode:
4075 \obeylines
4076 \catcode`\@ = \other
4077 \catcode`\{ = \other
4078 \catcode`\} = \other
4079 %
4080 % Make sure that spaces turn into tokens that match what \doignoretext wants.
4081 \spaceisspace
4082 %
4083 % Count number of #1's that we've seen.
4084 \doignorecount = 0
4085 %
4086 % Swallow text until we reach the matching `@end #1'.
4087 \dodoignore{#1}%
4088 }
4089
4090 { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source.
4091 \obeylines %
4092 %
4093 \gdef\dodoignore#1{%
4094 % #1 contains the command name as a string, e.g., `ifinfo'.
4095 %
4096 % Define a command to find the next `@end #1'.
4097 \long\def\doignoretext##1^^M@end #1{%
4098 \doignoretextyyy##1^^M@#1\_STOP_}%
4099 %
4100 % And this command to find another #1 command, at the beginning of a
4101 % line. (Otherwise, we would consider a line `@c @ifset', for
4102 % example, to count as an @ifset for nesting.)
4103 \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
4104 %
4105 % And now expand that command.
4106 \doignoretext ^^M%
4107 }%
4108 }
4109
4110 \def\doignoreyyy#1{%
4111 \def\temp{#1}%
4112 \ifx\temp\empty % Nothing found.
4113 \let\next\doignoretextzzz
4114 \else % Found a nested condition, ...
4115 \advance\doignorecount by 1
4116 \let\next\doignoretextyyy % ..., look for another.
4117 % If we're here, #1 ends with ^^M\ifinfo (for example).
4118 \fi
4119 \next #1% the token \_STOP_ is present just after this macro.
4120 }
4121
4122 % We have to swallow the remaining "\_STOP_".
4123 %
4124 \def\doignoretextzzz#1{%
4125 \ifnum\doignorecount = 0 % We have just found the outermost @end.
4126 \let\next\enddoignore
4127 \else % Still inside a nested condition.
4128 \advance\doignorecount by -1
4129 \let\next\doignoretext % Look for the next @end.
4130 \fi
4131 \next
4132 }
4133
4134 % Finish off ignored text.
4135 { \obeylines%
4136 % Ignore anything after the last `@end #1'; this matters in verbatim
4137 % environments, where otherwise the newline after an ignored conditional
4138 % would result in a blank line in the output.
4139 \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
4140 }
4141
4142
4143 % @set VAR sets the variable VAR to an empty value.
4144 % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
4145 %
4146 % Since we want to separate VAR from REST-OF-LINE (which might be
4147 % empty), we can't just use \parsearg; we have to insert a space of our
4148 % own to delimit the rest of the line, and then take it out again if we
4149 % didn't need it.
4150 % We rely on the fact that \parsearg sets \catcode`\ =10.
4151 %
4152 \parseargdef\set{\setyyy#1 \endsetyyy}
4153 \def\setyyy#1 #2\endsetyyy{%
4154 {%
4155 \makevalueexpandable
4156 \def\temp{#2}%
4157 \edef\next{\gdef\makecsname{SET#1}}%
4158 \ifx\temp\empty
4159 \next{}%
4160 \else
4161 \setzzz#2\endsetzzz
4162 \fi
4163 }%
4164 }
4165 % Remove the trailing space \setxxx inserted.
4166 \def\setzzz#1 \endsetzzz{\next{#1}}
4167
4168 % @clear VAR clears (i.e., unsets) the variable VAR.
4169 %
4170 \parseargdef\clear{%
4171 {%
4172 \makevalueexpandable
4173 \global\expandafter\let\csname SET#1\endcsname=\relax
4174 }%
4175 }
4176
4177 % @value{foo} gets the text saved in variable foo.
4178 \def\value{\begingroup\makevalueexpandable\valuexxx}
4179 \def\valuexxx#1{\expandablevalue{#1}\endgroup}
4180 {
4181 \catcode`\- = \active \catcode`\_ = \active
4182 %
4183 \gdef\makevalueexpandable{%
4184 \let\value = \expandablevalue
4185 % We don't want these characters active, ...
4186 \catcode`\-=\other \catcode`\_=\other
4187 % ..., but we might end up with active ones in the argument if
4188 % we're called from @code, as @code{@value{foo-bar_}}, though.
4189 % So \let them to their normal equivalents.
4190 \let-\normaldash \let_\normalunderscore
4191 }
4192 }
4193
4194 % We have this subroutine so that we can handle at least some @value's
4195 % properly in indexes (we call \makevalueexpandable in \indexdummies).
4196 % The command has to be fully expandable (if the variable is set), since
4197 % the result winds up in the index file. This means that if the
4198 % variable's value contains other Texinfo commands, it's almost certain
4199 % it will fail (although perhaps we could fix that with sufficient work
4200 % to do a one-level expansion on the result, instead of complete).
4201 %
4202 \def\expandablevalue#1{%
4203 \expandafter\ifx\csname SET#1\endcsname\relax
4204 {[No value for ``#1'']}%
4205 \message{Variable `#1', used in @value, is not set.}%
4206 \else
4207 \csname SET#1\endcsname
4208 \fi
4209 }
4210
4211 % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
4212 % with @set.
4213 %
4214 % To get special treatment of `@end ifset,' call \makeond and the redefine.
4215 %
4216 \makecond{ifset}
4217 \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
4218 \def\doifset#1#2{%
4219 {%
4220 \makevalueexpandable
4221 \let\next=\empty
4222 \expandafter\ifx\csname SET#2\endcsname\relax
4223 #1% If not set, redefine \next.
4224 \fi
4225 \expandafter
4226 }\next
4227 }
4228 \def\ifsetfail{\doignore{ifset}}
4229
4230 % @ifclear VAR ... @end executes the `...' iff VAR has never been
4231 % defined with @set, or has been undefined with @clear.
4232 %
4233 % The `\else' inside the `\doifset' parameter is a trick to reuse the
4234 % above code: if the variable is not set, do nothing, if it is set,
4235 % then redefine \next to \ifclearfail.
4236 %
4237 \makecond{ifclear}
4238 \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
4239 \def\ifclearfail{\doignore{ifclear}}
4240
4241 % @ifcommandisdefined CMD ... @end executes the `...' if CMD (written
4242 % without the @) is in fact defined. We can only feasibly check at the
4243 % TeX level, so something like `mathcode' is going to considered
4244 % defined even though it is not a Texinfo command.
4245 %
4246 \makecond{ifcommanddefined}
4247 \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}}
4248 %
4249 \def\doifcmddefined#1#2{{%
4250 \makevalueexpandable
4251 \let\next=\empty
4252 \expandafter\ifx\csname #2\endcsname\relax
4253 #1% If not defined, \let\next as above.
4254 \fi
4255 \expandafter
4256 }\next
4257 }
4258 \def\ifcmddefinedfail{\doignore{ifcommanddefined}}
4259
4260 % @ifcommandnotdefined CMD ... handled similar to @ifclear above.
4261 \makecond{ifcommandnotdefined}
4262 \def\ifcommandnotdefined{%
4263 \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}}
4264 \def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}}
4265
4266 % Set the `txicommandconditionals' variable, so documents have a way to
4267 % test if the @ifcommand...defined conditionals are available.
4268 \set txicommandconditionals
4269
4270 % @dircategory CATEGORY -- specify a category of the dir file
4271 % which this file should belong to. Ignore this in TeX.
4272 \let\dircategory=\comment
4273
4274 % @defininfoenclose.
4275 \let\definfoenclose=\comment
4276
4277
4278 \message{indexing,}
4279 % Index generation facilities
4280
4281 % Define \newwrite to be identical to plain tex's \newwrite
4282 % except not \outer, so it can be used within macros and \if's.
4283 \edef\newwrite{\makecsname{ptexnewwrite}}
4284
4285 % \newindex {foo} defines an index named foo.
4286 % It automatically defines \fooindex such that
4287 % \fooindex ...rest of line... puts an entry in the index foo.
4288 % It also defines \fooindfile to be the number of the output channel for
4289 % the file that accumulates this index. The file's extension is foo.
4290 % The name of an index should be no more than 2 characters long
4291 % for the sake of vms.
4292 %
4293 \def\newindex#1{%
4294 \iflinks
4295 \expandafter\newwrite \csname#1indfile\endcsname
4296 \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
4297 \fi
4298 \expandafter\xdef\csname#1index\endcsname{% % Define @#1index
4299 \noexpand\doindex{#1}}
4300 }
4301
4302 % @defindex foo == \newindex{foo}
4303 %
4304 \def\defindex{\parsearg\newindex}
4305
4306 % Define @defcodeindex, like @defindex except put all entries in @code.
4307 %
4308 \def\defcodeindex{\parsearg\newcodeindex}
4309 %
4310 \def\newcodeindex#1{%
4311 \iflinks
4312 \expandafter\newwrite \csname#1indfile\endcsname
4313 \openout \csname#1indfile\endcsname \jobname.#1
4314 \fi
4315 \expandafter\xdef\csname#1index\endcsname{%
4316 \noexpand\docodeindex{#1}}%
4317 }
4318
4319
4320 % @synindex foo bar makes index foo feed into index bar.
4321 % Do this instead of @defindex foo if you don't want it as a separate index.
4322 %
4323 % @syncodeindex foo bar similar, but put all entries made for index foo
4324 % inside @code.
4325 %
4326 \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
4327 \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
4328
4329 % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
4330 % #3 the target index (bar).
4331 \def\dosynindex#1#2#3{%
4332 % Only do \closeout if we haven't already done it, else we'll end up
4333 % closing the target index.
4334 \expandafter \ifx\csname donesynindex#2\endcsname \relax
4335 % The \closeout helps reduce unnecessary open files; the limit on the
4336 % Acorn RISC OS is a mere 16 files.
4337 \expandafter\closeout\csname#2indfile\endcsname
4338 \expandafter\let\csname donesynindex#2\endcsname = 1
4339 \fi
4340 % redefine \fooindfile:
4341 \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
4342 \expandafter\let\csname#2indfile\endcsname=\temp
4343 % redefine \fooindex:
4344 \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
4345 }
4346
4347 % Define \doindex, the driver for all \fooindex macros.
4348 % Argument #1 is generated by the calling \fooindex macro,
4349 % and it is "foo", the name of the index.
4350
4351 % \doindex just uses \parsearg; it calls \doind for the actual work.
4352 % This is because \doind is more useful to call from other macros.
4353
4354 % There is also \dosubind {index}{topic}{subtopic}
4355 % which makes an entry in a two-level index such as the operation index.
4356
4357 \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
4358 \def\singleindexer #1{\doind{\indexname}{#1}}
4359
4360 % like the previous two, but they put @code around the argument.
4361 \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
4362 \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
4363
4364 % Take care of Texinfo commands that can appear in an index entry.
4365 % Since there are some commands we want to expand, and others we don't,
4366 % we have to laboriously prevent expansion for those that we don't.
4367 %
4368 \def\indexdummies{%
4369 \escapechar = `\\ % use backslash in output files.
4370 \def\@{@}% change to @@ when we switch to @ as escape char in index files.
4371 \def\ {\realbackslash\space }%
4372 %
4373 % Need these unexpandable (because we define \tt as a dummy)
4374 % definitions when @{ or @} appear in index entry text. Also, more
4375 % complicated, when \tex is in effect and \{ is a \delimiter again.
4376 % We can't use \lbracecmd and \rbracecmd because texindex assumes
4377 % braces and backslashes are used only as delimiters. Perhaps we
4378 % should define @lbrace and @rbrace commands a la @comma.
4379 \def\{{{\tt\char123}}%
4380 \def\}{{\tt\char125}}%
4381 %
4382 % I don't entirely understand this, but when an index entry is
4383 % generated from a macro call, the \endinput which \scanmacro inserts
4384 % causes processing to be prematurely terminated. This is,
4385 % apparently, because \indexsorttmp is fully expanded, and \endinput
4386 % is an expandable command. The redefinition below makes \endinput
4387 % disappear altogether for that purpose -- although logging shows that
4388 % processing continues to some further point. On the other hand, it
4389 % seems \endinput does not hurt in the printed index arg, since that
4390 % is still getting written without apparent harm.
4391 %
4392 % Sample source (mac-idx3.tex, reported by Graham Percival to
4393 % help-texinfo, 22may06):
4394 % @macro funindex {WORD}
4395 % @findex xyz
4396 % @end macro
4397 % ...
4398 % @funindex commtest
4399 %
4400 % The above is not enough to reproduce the bug, but it gives the flavor.
4401 %
4402 % Sample whatsit resulting:
4403 % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
4404 %
4405 % So:
4406 \let\endinput = \empty
4407 %
4408 % Do the redefinitions.
4409 \commondummies
4410 }
4411
4412 % For the aux and toc files, @ is the escape character. So we want to
4413 % redefine everything using @ as the escape character (instead of
4414 % \realbackslash, still used for index files). When everything uses @,
4415 % this will be simpler.
4416 %
4417 \def\atdummies{%
4418 \def\@{@@}%
4419 \def\ {@ }%
4420 \let\{ = \lbraceatcmd
4421 \let\} = \rbraceatcmd
4422 %
4423 % Do the redefinitions.
4424 \commondummies
4425 \otherbackslash
4426 }
4427
4428 % Called from \indexdummies and \atdummies.
4429 %
4430 \def\commondummies{%
4431 %
4432 % \definedummyword defines \#1 as \string\#1\space, thus effectively
4433 % preventing its expansion. This is used only for control words,
4434 % not control letters, because the \space would be incorrect for
4435 % control characters, but is needed to separate the control word
4436 % from whatever follows.
4437 %
4438 % For control letters, we have \definedummyletter, which omits the
4439 % space.
4440 %
4441 % These can be used both for control words that take an argument and
4442 % those that do not. If it is followed by {arg} in the input, then
4443 % that will dutifully get written to the index (or wherever).
4444 %
4445 \def\definedummyword ##1{\def##1{\string##1\space}}%
4446 \def\definedummyletter##1{\def##1{\string##1}}%
4447 \let\definedummyaccent\definedummyletter
4448 %
4449 \commondummiesnofonts
4450 %
4451 \definedummyletter\_%
4452 \definedummyletter\-%
4453 %
4454 % Non-English letters.
4455 \definedummyword\AA
4456 \definedummyword\AE
4457 \definedummyword\DH
4458 \definedummyword\L
4459 \definedummyword\O
4460 \definedummyword\OE
4461 \definedummyword\TH
4462 \definedummyword\aa
4463 \definedummyword\ae
4464 \definedummyword\dh
4465 \definedummyword\exclamdown
4466 \definedummyword\l
4467 \definedummyword\o
4468 \definedummyword\oe
4469 \definedummyword\ordf
4470 \definedummyword\ordm
4471 \definedummyword\questiondown
4472 \definedummyword\ss
4473 \definedummyword\th
4474 %
4475 % Although these internal commands shouldn't show up, sometimes they do.
4476 \definedummyword\bf
4477 \definedummyword\gtr
4478 \definedummyword\hat
4479 \definedummyword\less
4480 \definedummyword\sf
4481 \definedummyword\sl
4482 \definedummyword\tclose
4483 \definedummyword\tt
4484 %
4485 \definedummyword\LaTeX
4486 \definedummyword\TeX
4487 %
4488 % Assorted special characters.
4489 \definedummyword\arrow
4490 \definedummyword\bullet
4491 \definedummyword\comma
4492 \definedummyword\copyright
4493 \definedummyword\registeredsymbol
4494 \definedummyword\dots
4495 \definedummyword\enddots
4496 \definedummyword\entrybreak
4497 \definedummyword\equiv
4498 \definedummyword\error
4499 \definedummyword\euro
4500 \definedummyword\expansion
4501 \definedummyword\geq
4502 \definedummyword\guillemetleft
4503 \definedummyword\guillemetright
4504 \definedummyword\guilsinglleft
4505 \definedummyword\guilsinglright
4506 \definedummyword\lbracechar
4507 \definedummyword\leq
4508 \definedummyword\minus
4509 \definedummyword\ogonek
4510 \definedummyword\pounds
4511 \definedummyword\point
4512 \definedummyword\print
4513 \definedummyword\quotedblbase
4514 \definedummyword\quotedblleft
4515 \definedummyword\quotedblright
4516 \definedummyword\quoteleft
4517 \definedummyword\quoteright
4518 \definedummyword\quotesinglbase
4519 \definedummyword\rbracechar
4520 \definedummyword\result
4521 \definedummyword\textdegree
4522 %
4523 % We want to disable all macros so that they are not expanded by \write.
4524 \macrolist
4525 %
4526 \normalturnoffactive
4527 %
4528 % Handle some cases of @value -- where it does not contain any
4529 % (non-fully-expandable) commands.
4530 \makevalueexpandable
4531 }
4532
4533 % \commondummiesnofonts: common to \commondummies and \indexnofonts.
4534 %
4535 \def\commondummiesnofonts{%
4536 % Control letters and accents.
4537 \definedummyletter\!%
4538 \definedummyaccent\"%
4539 \definedummyaccent\'%
4540 \definedummyletter\*%
4541 \definedummyaccent\,%
4542 \definedummyletter\.%
4543 \definedummyletter\/%
4544 \definedummyletter\:%
4545 \definedummyaccent\=%
4546 \definedummyletter\?%
4547 \definedummyaccent\^%
4548 \definedummyaccent\`%
4549 \definedummyaccent\~%
4550 \definedummyword\u
4551 \definedummyword\v
4552 \definedummyword\H
4553 \definedummyword\dotaccent
4554 \definedummyword\ogonek
4555 \definedummyword\ringaccent
4556 \definedummyword\tieaccent
4557 \definedummyword\ubaraccent
4558 \definedummyword\udotaccent
4559 \definedummyword\dotless
4560 %
4561 % Texinfo font commands.
4562 \definedummyword\b
4563 \definedummyword\i
4564 \definedummyword\r
4565 \definedummyword\sansserif
4566 \definedummyword\sc
4567 \definedummyword\slanted
4568 \definedummyword\t
4569 %
4570 % Commands that take arguments.
4571 \definedummyword\abbr
4572 \definedummyword\acronym
4573 \definedummyword\anchor
4574 \definedummyword\cite
4575 \definedummyword\code
4576 \definedummyword\command
4577 \definedummyword\dfn
4578 \definedummyword\dmn
4579 \definedummyword\email
4580 \definedummyword\emph
4581 \definedummyword\env
4582 \definedummyword\file
4583 \definedummyword\image
4584 \definedummyword\indicateurl
4585 \definedummyword\inforef
4586 \definedummyword\kbd
4587 \definedummyword\key
4588 \definedummyword\math
4589 \definedummyword\option
4590 \definedummyword\pxref
4591 \definedummyword\ref
4592 \definedummyword\samp
4593 \definedummyword\strong
4594 \definedummyword\tie
4595 \definedummyword\uref
4596 \definedummyword\url
4597 \definedummyword\var
4598 \definedummyword\verb
4599 \definedummyword\w
4600 \definedummyword\xref
4601 }
4602
4603 % \indexnofonts is used when outputting the strings to sort the index
4604 % by, and when constructing control sequence names. It eliminates all
4605 % control sequences and just writes whatever the best ASCII sort string
4606 % would be for a given command (usually its argument).
4607 %
4608 \def\indexnofonts{%
4609 % Accent commands should become @asis.
4610 \def\definedummyaccent##1{\let##1\asis}%
4611 % We can just ignore other control letters.
4612 \def\definedummyletter##1{\let##1\empty}%
4613 % All control words become @asis by default; overrides below.
4614 \let\definedummyword\definedummyaccent
4615 %
4616 \commondummiesnofonts
4617 %
4618 % Don't no-op \tt, since it isn't a user-level command
4619 % and is used in the definitions of the active chars like <, >, |, etc.
4620 % Likewise with the other plain tex font commands.
4621 %\let\tt=\asis
4622 %
4623 \def\ { }%
4624 \def\@{@}%
4625 \def\_{\normalunderscore}%
4626 \def\-{}% @- shouldn't affect sorting
4627 %
4628 % Unfortunately, texindex is not prepared to handle braces in the
4629 % content at all. So for index sorting, we map @{ and @} to strings
4630 % starting with |, since that ASCII character is between ASCII { and }.
4631 \def\{{|a}%
4632 \def\lbracechar{|a}%
4633 %
4634 \def\}{|b}%
4635 \def\rbracechar{|b}%
4636 %
4637 % Non-English letters.
4638 \def\AA{AA}%
4639 \def\AE{AE}%
4640 \def\DH{DZZ}%
4641 \def\L{L}%
4642 \def\OE{OE}%
4643 \def\O{O}%
4644 \def\TH{ZZZ}%
4645 \def\aa{aa}%
4646 \def\ae{ae}%
4647 \def\dh{dzz}%
4648 \def\exclamdown{!}%
4649 \def\l{l}%
4650 \def\oe{oe}%
4651 \def\ordf{a}%
4652 \def\ordm{o}%
4653 \def\o{o}%
4654 \def\questiondown{?}%
4655 \def\ss{ss}%
4656 \def\th{zzz}%
4657 %
4658 \def\LaTeX{LaTeX}%
4659 \def\TeX{TeX}%
4660 %
4661 % Assorted special characters.
4662 % (The following {} will end up in the sort string, but that's ok.)
4663 \def\arrow{->}%
4664 \def\bullet{bullet}%
4665 \def\comma{,}%
4666 \def\copyright{copyright}%
4667 \def\dots{...}%
4668 \def\enddots{...}%
4669 \def\equiv{==}%
4670 \def\error{error}%
4671 \def\euro{euro}%
4672 \def\expansion{==>}%
4673 \def\geq{>=}%
4674 \def\guillemetleft{<<}%
4675 \def\guillemetright{>>}%
4676 \def\guilsinglleft{<}%
4677 \def\guilsinglright{>}%
4678 \def\leq{<=}%
4679 \def\minus{-}%
4680 \def\point{.}%
4681 \def\pounds{pounds}%
4682 \def\print{-|}%
4683 \def\quotedblbase{"}%
4684 \def\quotedblleft{"}%
4685 \def\quotedblright{"}%
4686 \def\quoteleft{`}%
4687 \def\quoteright{'}%
4688 \def\quotesinglbase{,}%
4689 \def\registeredsymbol{R}%
4690 \def\result{=>}%
4691 \def\textdegree{o}%
4692 %
4693 \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
4694 \else \indexlquoteignore \fi
4695 %
4696 % We need to get rid of all macros, leaving only the arguments (if present).
4697 % Of course this is not nearly correct, but it is the best we can do for now.
4698 % makeinfo does not expand macros in the argument to @deffn, which ends up
4699 % writing an index entry, and texindex isn't prepared for an index sort entry
4700 % that starts with \.
4701 %
4702 % Since macro invocations are followed by braces, we can just redefine them
4703 % to take a single TeX argument. The case of a macro invocation that
4704 % goes to end-of-line is not handled.
4705 %
4706 \macrolist
4707 }
4708
4709 % Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
4710 % ignore left quotes in the sort term.
4711 {\catcode`\`=\active
4712 \gdef\indexlquoteignore{\let`=\empty}}
4713
4714 \let\indexbackslash=0 %overridden during \printindex.
4715 \let\SETmarginindex=\relax % put index entries in margin (undocumented)?
4716
4717 % Most index entries go through here, but \dosubind is the general case.
4718 % #1 is the index name, #2 is the entry text.
4719 \def\doind#1#2{\dosubind{#1}{#2}{}}
4720
4721 % Workhorse for all \fooindexes.
4722 % #1 is name of index, #2 is stuff to put there, #3 is subentry --
4723 % empty if called from \doind, as we usually are (the main exception
4724 % is with most defuns, which call us directly).
4725 %
4726 \def\dosubind#1#2#3{%
4727 \iflinks
4728 {%
4729 % Store the main index entry text (including the third arg).
4730 \toks0 = {#2}%
4731 % If third arg is present, precede it with a space.
4732 \def\thirdarg{#3}%
4733 \ifx\thirdarg\empty \else
4734 \toks0 = \expandafter{\the\toks0 \space #3}%
4735 \fi
4736 %
4737 \edef\writeto{\csname#1indfile\endcsname}%
4738 %
4739 \safewhatsit\dosubindwrite
4740 }%
4741 \fi
4742 }
4743
4744 % Write the entry in \toks0 to the index file:
4745 %
4746 \def\dosubindwrite{%
4747 % Put the index entry in the margin if desired.
4748 \ifx\SETmarginindex\relax\else
4749 \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}%
4750 \fi
4751 %
4752 % Remember, we are within a group.
4753 \indexdummies % Must do this here, since \bf, etc expand at this stage
4754 \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
4755 % so it will be output as is; and it will print as backslash.
4756 %
4757 % Process the index entry with all font commands turned off, to
4758 % get the string to sort by.
4759 {\indexnofonts
4760 \edef\temp{\the\toks0}% need full expansion
4761 \xdef\indexsorttmp{\temp}%
4762 }%
4763 %
4764 % Set up the complete index entry, with both the sort key and
4765 % the original text, including any font commands. We write
4766 % three arguments to \entry to the .?? file (four in the
4767 % subentry case), texindex reduces to two when writing the .??s
4768 % sorted result.
4769 \edef\temp{%
4770 \write\writeto{%
4771 \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
4772 }%
4773 \temp
4774 }
4775
4776 % Take care of unwanted page breaks/skips around a whatsit:
4777 %
4778 % If a skip is the last thing on the list now, preserve it
4779 % by backing up by \lastskip, doing the \write, then inserting
4780 % the skip again. Otherwise, the whatsit generated by the
4781 % \write or \pdfdest will make \lastskip zero. The result is that
4782 % sequences like this:
4783 % @end defun
4784 % @tindex whatever
4785 % @defun ...
4786 % will have extra space inserted, because the \medbreak in the
4787 % start of the @defun won't see the skip inserted by the @end of
4788 % the previous defun.
4789 %
4790 % But don't do any of this if we're not in vertical mode. We
4791 % don't want to do a \vskip and prematurely end a paragraph.
4792 %
4793 % Avoid page breaks due to these extra skips, too.
4794 %
4795 % But wait, there is a catch there:
4796 % We'll have to check whether \lastskip is zero skip. \ifdim is not
4797 % sufficient for this purpose, as it ignores stretch and shrink parts
4798 % of the skip. The only way seems to be to check the textual
4799 % representation of the skip.
4800 %
4801 % The following is almost like \def\zeroskipmacro{0.0pt} except that
4802 % the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
4803 %
4804 \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname}
4805 %
4806 \newskip\whatsitskip
4807 \newcount\whatsitpenalty
4808 %
4809 % ..., ready, GO:
4810 %
4811 \def\safewhatsit#1{\ifhmode
4812 #1%
4813 \else
4814 % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
4815 \whatsitskip = \lastskip
4816 \edef\lastskipmacro{\the\lastskip}%
4817 \whatsitpenalty = \lastpenalty
4818 %
4819 % If \lastskip is nonzero, that means the last item was a
4820 % skip. And since a skip is discardable, that means this
4821 % -\whatsitskip glue we're inserting is preceded by a
4822 % non-discardable item, therefore it is not a potential
4823 % breakpoint, therefore no \nobreak needed.
4824 \ifx\lastskipmacro\zeroskipmacro
4825 \else
4826 \vskip-\whatsitskip
4827 \fi
4828 %
4829 #1%
4830 %
4831 \ifx\lastskipmacro\zeroskipmacro
4832 % If \lastskip was zero, perhaps the last item was a penalty, and
4833 % perhaps it was >=10000, e.g., a \nobreak. In that case, we want
4834 % to re-insert the same penalty (values >10000 are used for various
4835 % signals); since we just inserted a non-discardable item, any
4836 % following glue (such as a \parskip) would be a breakpoint. For example:
4837 % @deffn deffn-whatever
4838 % @vindex index-whatever
4839 % Description.
4840 % would allow a break between the index-whatever whatsit
4841 % and the "Description." paragraph.
4842 \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
4843 \else
4844 % On the other hand, if we had a nonzero \lastskip,
4845 % this make-up glue would be preceded by a non-discardable item
4846 % (the whatsit from the \write), so we must insert a \nobreak.
4847 \nobreak\vskip\whatsitskip
4848 \fi
4849 \fi}
4850
4851 % The index entry written in the file actually looks like
4852 % \entry {sortstring}{page}{topic}
4853 % or
4854 % \entry {sortstring}{page}{topic}{subtopic}
4855 % The texindex program reads in these files and writes files
4856 % containing these kinds of lines:
4857 % \initial {c}
4858 % before the first topic whose initial is c
4859 % \entry {topic}{pagelist}
4860 % for a topic that is used without subtopics
4861 % \primary {topic}
4862 % for the beginning of a topic that is used with subtopics
4863 % \secondary {subtopic}{pagelist}
4864 % for each subtopic.
4865
4866 % Define the user-accessible indexing commands
4867 % @findex, @vindex, @kindex, @cindex.
4868
4869 \def\findex {\fnindex}
4870 \def\kindex {\kyindex}
4871 \def\cindex {\cpindex}
4872 \def\vindex {\vrindex}
4873 \def\tindex {\tpindex}
4874 \def\pindex {\pgindex}
4875
4876 \def\cindexsub {\begingroup\obeylines\cindexsub}
4877 {\obeylines %
4878 \gdef\cindexsub "#1" #2^^M{\endgroup %
4879 \dosubind{cp}{#2}{#1}}}
4880
4881 % Define the macros used in formatting output of the sorted index material.
4882
4883 % @printindex causes a particular index (the ??s file) to get printed.
4884 % It does not print any chapter heading (usually an @unnumbered).
4885 %
4886 \parseargdef\printindex{\begingroup
4887 \dobreak \chapheadingskip{10000}%
4888 %
4889 \smallfonts \rm
4890 \tolerance = 9500
4891 \plainfrenchspacing
4892 \everypar = {}% don't want the \kern\-parindent from indentation suppression.
4893 %
4894 % See if the index file exists and is nonempty.
4895 % Change catcode of @ here so that if the index file contains
4896 % \initial {@}
4897 % as its first line, TeX doesn't complain about mismatched braces
4898 % (because it thinks @} is a control sequence).
4899 \catcode`\@ = 11
4900 \openin 1 \jobname.#1s
4901 \ifeof 1
4902 % \enddoublecolumns gets confused if there is no text in the index,
4903 % and it loses the chapter title and the aux file entries for the
4904 % index. The easiest way to prevent this problem is to make sure
4905 % there is some text.
4906 \putwordIndexNonexistent
4907 \else
4908 %
4909 % If the index file exists but is empty, then \openin leaves \ifeof
4910 % false. We have to make TeX try to read something from the file, so
4911 % it can discover if there is anything in it.
4912 \read 1 to \temp
4913 \ifeof 1
4914 \putwordIndexIsEmpty
4915 \else
4916 % Index files are almost Texinfo source, but we use \ as the escape
4917 % character. It would be better to use @, but that's too big a change
4918 % to make right now.
4919 \def\indexbackslash{\backslashcurfont}%
4920 \catcode`\\ = 0
4921 \escapechar = `\\
4922 \begindoublecolumns
4923 \input \jobname.#1s
4924 \enddoublecolumns
4925 \fi
4926 \fi
4927 \closein 1
4928 \endgroup}
4929
4930 % These macros are used by the sorted index file itself.
4931 % Change them to control the appearance of the index.
4932
4933 \def\initial#1{{%
4934 % Some minor font changes for the special characters.
4935 \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
4936 %
4937 % Remove any glue we may have, we'll be inserting our own.
4938 \removelastskip
4939 %
4940 % We like breaks before the index initials, so insert a bonus.
4941 \nobreak
4942 \vskip 0pt plus 3\baselineskip
4943 \penalty 0
4944 \vskip 0pt plus -3\baselineskip
4945 %
4946 % Typeset the initial. Making this add up to a whole number of
4947 % baselineskips increases the chance of the dots lining up from column
4948 % to column. It still won't often be perfect, because of the stretch
4949 % we need before each entry, but it's better.
4950 %
4951 % No shrink because it confuses \balancecolumns.
4952 \vskip 1.67\baselineskip plus .5\baselineskip
4953 \leftline{\secbf #1}%
4954 % Do our best not to break after the initial.
4955 \nobreak
4956 \vskip .33\baselineskip plus .1\baselineskip
4957 }}
4958
4959 % \entry typesets a paragraph consisting of the text (#1), dot leaders, and
4960 % then page number (#2) flushed to the right margin. It is used for index
4961 % and table of contents entries. The paragraph is indented by \leftskip.
4962 %
4963 % A straightforward implementation would start like this:
4964 % \def\entry#1#2{...
4965 % But this freezes the catcodes in the argument, and can cause problems to
4966 % @code, which sets - active. This problem was fixed by a kludge---
4967 % ``-'' was active throughout whole index, but this isn't really right.
4968 % The right solution is to prevent \entry from swallowing the whole text.
4969 % --kasal, 21nov03
4970 \def\entry{%
4971 \begingroup
4972 %
4973 % Start a new paragraph if necessary, so our assignments below can't
4974 % affect previous text.
4975 \par
4976 %
4977 % Do not fill out the last line with white space.
4978 \parfillskip = 0in
4979 %
4980 % No extra space above this paragraph.
4981 \parskip = 0in
4982 %
4983 % Do not prefer a separate line ending with a hyphen to fewer lines.
4984 \finalhyphendemerits = 0
4985 %
4986 % \hangindent is only relevant when the entry text and page number
4987 % don't both fit on one line. In that case, bob suggests starting the
4988 % dots pretty far over on the line. Unfortunately, a large
4989 % indentation looks wrong when the entry text itself is broken across
4990 % lines. So we use a small indentation and put up with long leaders.
4991 %
4992 % \hangafter is reset to 1 (which is the value we want) at the start
4993 % of each paragraph, so we need not do anything with that.
4994 \hangindent = 2em
4995 %
4996 % When the entry text needs to be broken, just fill out the first line
4997 % with blank space.
4998 \rightskip = 0pt plus1fil
4999 %
5000 % A bit of stretch before each entry for the benefit of balancing
5001 % columns.
5002 \vskip 0pt plus1pt
5003 %
5004 % When reading the text of entry, convert explicit line breaks
5005 % from @* into spaces. The user might give these in long section
5006 % titles, for instance.
5007 \def\*{\unskip\space\ignorespaces}%
5008 \def\entrybreak{\hfil\break}%
5009 %
5010 % Swallow the left brace of the text (first parameter):
5011 \afterassignment\doentry
5012 \let\temp =
5013 }
5014 \def\entrybreak{\unskip\space\ignorespaces}%
5015 \def\doentry{%
5016 \bgroup % Instead of the swallowed brace.
5017 \noindent
5018 \aftergroup\finishentry
5019 % And now comes the text of the entry.
5020 }
5021 \def\finishentry#1{%
5022 % #1 is the page number.
5023 %
5024 % The following is kludged to not output a line of dots in the index if
5025 % there are no page numbers. The next person who breaks this will be
5026 % cursed by a Unix daemon.
5027 \setbox\boxA = \hbox{#1}%
5028 \ifdim\wd\boxA = 0pt
5029 \ %
5030 \else
5031 %
5032 % If we must, put the page number on a line of its own, and fill out
5033 % this line with blank space. (The \hfil is overwhelmed with the
5034 % fill leaders glue in \indexdotfill if the page number does fit.)
5035 \hfil\penalty50
5036 \null\nobreak\indexdotfill % Have leaders before the page number.
5037 %
5038 % The `\ ' here is removed by the implicit \unskip that TeX does as
5039 % part of (the primitive) \par. Without it, a spurious underfull
5040 % \hbox ensues.
5041 \ifpdf
5042 \pdfgettoks#1.%
5043 \ \the\toksA
5044 \else
5045 \ #1%
5046 \fi
5047 \fi
5048 \par
5049 \endgroup
5050 }
5051
5052 % Like plain.tex's \dotfill, except uses up at least 1 em.
5053 \def\indexdotfill{\cleaders
5054 \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
5055
5056 \def\primary #1{\line{#1\hfil}}
5057
5058 \newskip\secondaryindent \secondaryindent=0.5cm
5059 \def\secondary#1#2{{%
5060 \parfillskip=0in
5061 \parskip=0in
5062 \hangindent=1in
5063 \hangafter=1
5064 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
5065 \ifpdf
5066 \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
5067 \else
5068 #2
5069 \fi
5070 \par
5071 }}
5072
5073 % Define two-column mode, which we use to typeset indexes.
5074 % Adapted from the TeXbook, page 416, which is to say,
5075 % the manmac.tex format used to print the TeXbook itself.
5076 \catcode`\@=11
5077
5078 \newbox\partialpage
5079 \newdimen\doublecolumnhsize
5080
5081 \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
5082 % Grab any single-column material above us.
5083 \output = {%
5084 %
5085 % Here is a possibility not foreseen in manmac: if we accumulate a
5086 % whole lot of material, we might end up calling this \output
5087 % routine twice in a row (see the doublecol-lose test, which is
5088 % essentially a couple of indexes with @setchapternewpage off). In
5089 % that case we just ship out what is in \partialpage with the normal
5090 % output routine. Generally, \partialpage will be empty when this
5091 % runs and this will be a no-op. See the indexspread.tex test case.
5092 \ifvoid\partialpage \else
5093 \onepageout{\pagecontents\partialpage}%
5094 \fi
5095 %
5096 \global\setbox\partialpage = \vbox{%
5097 % Unvbox the main output page.
5098 \unvbox\PAGE
5099 \kern-\topskip \kern\baselineskip
5100 }%
5101 }%
5102 \eject % run that output routine to set \partialpage
5103 %
5104 % Use the double-column output routine for subsequent pages.
5105 \output = {\doublecolumnout}%
5106 %
5107 % Change the page size parameters. We could do this once outside this
5108 % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
5109 % format, but then we repeat the same computation. Repeating a couple
5110 % of assignments once per index is clearly meaningless for the
5111 % execution time, so we may as well do it in one place.
5112 %
5113 % First we halve the line length, less a little for the gutter between
5114 % the columns. We compute the gutter based on the line length, so it
5115 % changes automatically with the paper format. The magic constant
5116 % below is chosen so that the gutter has the same value (well, +-<1pt)
5117 % as it did when we hard-coded it.
5118 %
5119 % We put the result in a separate register, \doublecolumhsize, so we
5120 % can restore it in \pagesofar, after \hsize itself has (potentially)
5121 % been clobbered.
5122 %
5123 \doublecolumnhsize = \hsize
5124 \advance\doublecolumnhsize by -.04154\hsize
5125 \divide\doublecolumnhsize by 2
5126 \hsize = \doublecolumnhsize
5127 %
5128 % Double the \vsize as well. (We don't need a separate register here,
5129 % since nobody clobbers \vsize.)
5130 \vsize = 2\vsize
5131 }
5132
5133 % The double-column output routine for all double-column pages except
5134 % the last.
5135 %
5136 \def\doublecolumnout{%
5137 \splittopskip=\topskip \splitmaxdepth=\maxdepth
5138 % Get the available space for the double columns -- the normal
5139 % (undoubled) page height minus any material left over from the
5140 % previous page.
5141 \dimen@ = \vsize
5142 \divide\dimen@ by 2
5143 \advance\dimen@ by -\ht\partialpage
5144 %
5145 % box0 will be the left-hand column, box2 the right.
5146 \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
5147 \onepageout\pagesofar
5148 \unvbox255
5149 \penalty\outputpenalty
5150 }
5151 %
5152 % Re-output the contents of the output page -- any previous material,
5153 % followed by the two boxes we just split, in box0 and box2.
5154 \def\pagesofar{%
5155 \unvbox\partialpage
5156 %
5157 \hsize = \doublecolumnhsize
5158 \wd0=\hsize \wd2=\hsize
5159 \hbox to\pagewidth{\box0\hfil\box2}%
5160 }
5161 %
5162 % All done with double columns.
5163 \def\enddoublecolumns{%
5164 % The following penalty ensures that the page builder is exercised
5165 % _before_ we change the output routine. This is necessary in the
5166 % following situation:
5167 %
5168 % The last section of the index consists only of a single entry.
5169 % Before this section, \pagetotal is less than \pagegoal, so no
5170 % break occurs before the last section starts. However, the last
5171 % section, consisting of \initial and the single \entry, does not
5172 % fit on the page and has to be broken off. Without the following
5173 % penalty the page builder will not be exercised until \eject
5174 % below, and by that time we'll already have changed the output
5175 % routine to the \balancecolumns version, so the next-to-last
5176 % double-column page will be processed with \balancecolumns, which
5177 % is wrong: The two columns will go to the main vertical list, with
5178 % the broken-off section in the recent contributions. As soon as
5179 % the output routine finishes, TeX starts reconsidering the page
5180 % break. The two columns and the broken-off section both fit on the
5181 % page, because the two columns now take up only half of the page
5182 % goal. When TeX sees \eject from below which follows the final
5183 % section, it invokes the new output routine that we've set after
5184 % \balancecolumns below; \onepageout will try to fit the two columns
5185 % and the final section into the vbox of \pageheight (see
5186 % \pagebody), causing an overfull box.
5187 %
5188 % Note that glue won't work here, because glue does not exercise the
5189 % page builder, unlike penalties (see The TeXbook, pp. 280-281).
5190 \penalty0
5191 %
5192 \output = {%
5193 % Split the last of the double-column material. Leave it on the
5194 % current page, no automatic page break.
5195 \balancecolumns
5196 %
5197 % If we end up splitting too much material for the current page,
5198 % though, there will be another page break right after this \output
5199 % invocation ends. Having called \balancecolumns once, we do not
5200 % want to call it again. Therefore, reset \output to its normal
5201 % definition right away. (We hope \balancecolumns will never be
5202 % called on to balance too much material, but if it is, this makes
5203 % the output somewhat more palatable.)
5204 \global\output = {\onepageout{\pagecontents\PAGE}}%
5205 }%
5206 \eject
5207 \endgroup % started in \begindoublecolumns
5208 %
5209 % \pagegoal was set to the doubled \vsize above, since we restarted
5210 % the current page. We're now back to normal single-column
5211 % typesetting, so reset \pagegoal to the normal \vsize (after the
5212 % \endgroup where \vsize got restored).
5213 \pagegoal = \vsize
5214 }
5215 %
5216 % Called at the end of the double column material.
5217 \def\balancecolumns{%
5218 \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
5219 \dimen@ = \ht0
5220 \advance\dimen@ by \topskip
5221 \advance\dimen@ by-\baselineskip
5222 \divide\dimen@ by 2 % target to split to
5223 %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
5224 \splittopskip = \topskip
5225 % Loop until we get a decent breakpoint.
5226 {%
5227 \vbadness = 10000
5228 \loop
5229 \global\setbox3 = \copy0
5230 \global\setbox1 = \vsplit3 to \dimen@
5231 \ifdim\ht3>\dimen@
5232 \global\advance\dimen@ by 1pt
5233 \repeat
5234 }%
5235 %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
5236 \setbox0=\vbox to\dimen@{\unvbox1}%
5237 \setbox2=\vbox to\dimen@{\unvbox3}%
5238 %
5239 \pagesofar
5240 }
5241 \catcode`\@ = \other
5242
5243
5244 \message{sectioning,}
5245 % Chapters, sections, etc.
5246
5247 % Let's start with @part.
5248 \outer\parseargdef\part{\partzzz{#1}}
5249 \def\partzzz#1{%
5250 \chapoddpage
5251 \null
5252 \vskip.3\vsize % move it down on the page a bit
5253 \begingroup
5254 \noindent \titlefonts\rmisbold #1\par % the text
5255 \let\lastnode=\empty % no node to associate with
5256 \writetocentry{part}{#1}{}% but put it in the toc
5257 \headingsoff % no headline or footline on the part page
5258 \chapoddpage
5259 \endgroup
5260 }
5261
5262 % \unnumberedno is an oxymoron. But we count the unnumbered
5263 % sections so that we can refer to them unambiguously in the pdf
5264 % outlines by their "section number". We avoid collisions with chapter
5265 % numbers by starting them at 10000. (If a document ever has 10000
5266 % chapters, we're in trouble anyway, I'm sure.)
5267 \newcount\unnumberedno \unnumberedno = 10000
5268 \newcount\chapno
5269 \newcount\secno \secno=0
5270 \newcount\subsecno \subsecno=0
5271 \newcount\subsubsecno \subsubsecno=0
5272
5273 % This counter is funny since it counts through charcodes of letters A, B, ...
5274 \newcount\appendixno \appendixno = `\@
5275 %
5276 % \def\appendixletter{\char\the\appendixno}
5277 % We do the following ugly conditional instead of the above simple
5278 % construct for the sake of pdftex, which needs the actual
5279 % letter in the expansion, not just typeset.
5280 %
5281 \def\appendixletter{%
5282 \ifnum\appendixno=`A A%
5283 \else\ifnum\appendixno=`B B%
5284 \else\ifnum\appendixno=`C C%
5285 \else\ifnum\appendixno=`D D%
5286 \else\ifnum\appendixno=`E E%
5287 \else\ifnum\appendixno=`F F%
5288 \else\ifnum\appendixno=`G G%
5289 \else\ifnum\appendixno=`H H%
5290 \else\ifnum\appendixno=`I I%
5291 \else\ifnum\appendixno=`J J%
5292 \else\ifnum\appendixno=`K K%
5293 \else\ifnum\appendixno=`L L%
5294 \else\ifnum\appendixno=`M M%
5295 \else\ifnum\appendixno=`N N%
5296 \else\ifnum\appendixno=`O O%
5297 \else\ifnum\appendixno=`P P%
5298 \else\ifnum\appendixno=`Q Q%
5299 \else\ifnum\appendixno=`R R%
5300 \else\ifnum\appendixno=`S S%
5301 \else\ifnum\appendixno=`T T%
5302 \else\ifnum\appendixno=`U U%
5303 \else\ifnum\appendixno=`V V%
5304 \else\ifnum\appendixno=`W W%
5305 \else\ifnum\appendixno=`X X%
5306 \else\ifnum\appendixno=`Y Y%
5307 \else\ifnum\appendixno=`Z Z%
5308 % The \the is necessary, despite appearances, because \appendixletter is
5309 % expanded while writing the .toc file. \char\appendixno is not
5310 % expandable, thus it is written literally, thus all appendixes come out
5311 % with the same letter (or @) in the toc without it.
5312 \else\char\the\appendixno
5313 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
5314 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
5315
5316 % Each @chapter defines these (using marks) as the number+name, number
5317 % and name of the chapter. Page headings and footings can use
5318 % these. @section does likewise.
5319 \def\thischapter{}
5320 \def\thischapternum{}
5321 \def\thischaptername{}
5322 \def\thissection{}
5323 \def\thissectionnum{}
5324 \def\thissectionname{}
5325
5326 \newcount\absseclevel % used to calculate proper heading level
5327 \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
5328
5329 % @raisesections: treat @section as chapter, @subsection as section, etc.
5330 \def\raisesections{\global\advance\secbase by -1}
5331 \let\up=\raisesections % original BFox name
5332
5333 % @lowersections: treat @chapter as section, @section as subsection, etc.
5334 \def\lowersections{\global\advance\secbase by 1}
5335 \let\down=\lowersections % original BFox name
5336
5337 % we only have subsub.
5338 \chardef\maxseclevel = 3
5339 %
5340 % A numbered section within an unnumbered changes to unnumbered too.
5341 % To achieve this, remember the "biggest" unnum. sec. we are currently in:
5342 \chardef\unnlevel = \maxseclevel
5343 %
5344 % Trace whether the current chapter is an appendix or not:
5345 % \chapheadtype is "N" or "A", unnumbered chapters are ignored.
5346 \def\chapheadtype{N}
5347
5348 % Choose a heading macro
5349 % #1 is heading type
5350 % #2 is heading level
5351 % #3 is text for heading
5352 \def\genhead#1#2#3{%
5353 % Compute the abs. sec. level:
5354 \absseclevel=#2
5355 \advance\absseclevel by \secbase
5356 % Make sure \absseclevel doesn't fall outside the range:
5357 \ifnum \absseclevel < 0
5358 \absseclevel = 0
5359 \else
5360 \ifnum \absseclevel > 3
5361 \absseclevel = 3
5362 \fi
5363 \fi
5364 % The heading type:
5365 \def\headtype{#1}%
5366 \if \headtype U%
5367 \ifnum \absseclevel < \unnlevel
5368 \chardef\unnlevel = \absseclevel
5369 \fi
5370 \else
5371 % Check for appendix sections:
5372 \ifnum \absseclevel = 0
5373 \edef\chapheadtype{\headtype}%
5374 \else
5375 \if \headtype A\if \chapheadtype N%
5376 \errmessage{@appendix... within a non-appendix chapter}%
5377 \fi\fi
5378 \fi
5379 % Check for numbered within unnumbered:
5380 \ifnum \absseclevel > \unnlevel
5381 \def\headtype{U}%
5382 \else
5383 \chardef\unnlevel = 3
5384 \fi
5385 \fi
5386 % Now print the heading:
5387 \if \headtype U%
5388 \ifcase\absseclevel
5389 \unnumberedzzz{#3}%
5390 \or \unnumberedseczzz{#3}%
5391 \or \unnumberedsubseczzz{#3}%
5392 \or \unnumberedsubsubseczzz{#3}%
5393 \fi
5394 \else
5395 \if \headtype A%
5396 \ifcase\absseclevel
5397 \appendixzzz{#3}%
5398 \or \appendixsectionzzz{#3}%
5399 \or \appendixsubseczzz{#3}%
5400 \or \appendixsubsubseczzz{#3}%
5401 \fi
5402 \else
5403 \ifcase\absseclevel
5404 \chapterzzz{#3}%
5405 \or \seczzz{#3}%
5406 \or \numberedsubseczzz{#3}%
5407 \or \numberedsubsubseczzz{#3}%
5408 \fi
5409 \fi
5410 \fi
5411 \suppressfirstparagraphindent
5412 }
5413
5414 % an interface:
5415 \def\numhead{\genhead N}
5416 \def\apphead{\genhead A}
5417 \def\unnmhead{\genhead U}
5418
5419 % @chapter, @appendix, @unnumbered. Increment top-level counter, reset
5420 % all lower-level sectioning counters to zero.
5421 %
5422 % Also set \chaplevelprefix, which we prepend to @float sequence numbers
5423 % (e.g., figures), q.v. By default (before any chapter), that is empty.
5424 \let\chaplevelprefix = \empty
5425 %
5426 \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
5427 \def\chapterzzz#1{%
5428 % section resetting is \global in case the chapter is in a group, such
5429 % as an @include file.
5430 \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
5431 \global\advance\chapno by 1
5432 %
5433 % Used for \float.
5434 \gdef\chaplevelprefix{\the\chapno.}%
5435 \resetallfloatnos
5436 %
5437 % \putwordChapter can contain complex things in translations.
5438 \toks0=\expandafter{\putwordChapter}%
5439 \message{\the\toks0 \space \the\chapno}%
5440 %
5441 % Write the actual heading.
5442 \chapmacro{#1}{Ynumbered}{\the\chapno}%
5443 %
5444 % So @section and the like are numbered underneath this chapter.
5445 \global\let\section = \numberedsec
5446 \global\let\subsection = \numberedsubsec
5447 \global\let\subsubsection = \numberedsubsubsec
5448 }
5449
5450 \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
5451 %
5452 \def\appendixzzz#1{%
5453 \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
5454 \global\advance\appendixno by 1
5455 \gdef\chaplevelprefix{\appendixletter.}%
5456 \resetallfloatnos
5457 %
5458 % \putwordAppendix can contain complex things in translations.
5459 \toks0=\expandafter{\putwordAppendix}%
5460 \message{\the\toks0 \space \appendixletter}%
5461 %
5462 \chapmacro{#1}{Yappendix}{\appendixletter}%
5463 %
5464 \global\let\section = \appendixsec
5465 \global\let\subsection = \appendixsubsec
5466 \global\let\subsubsection = \appendixsubsubsec
5467 }
5468
5469 % normally unnmhead0 calls unnumberedzzz:
5470 \outer\parseargdef\unnumbered{\unnmhead0{#1}}
5471 \def\unnumberedzzz#1{%
5472 \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
5473 \global\advance\unnumberedno by 1
5474 %
5475 % Since an unnumbered has no number, no prefix for figures.
5476 \global\let\chaplevelprefix = \empty
5477 \resetallfloatnos
5478 %
5479 % This used to be simply \message{#1}, but TeX fully expands the
5480 % argument to \message. Therefore, if #1 contained @-commands, TeX
5481 % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
5482 % expanded @cite (which turns out to cause errors because \cite is meant
5483 % to be executed, not expanded).
5484 %
5485 % Anyway, we don't want the fully-expanded definition of @cite to appear
5486 % as a result of the \message, we just want `@cite' itself. We use
5487 % \the<toks register> to achieve this: TeX expands \the<toks> only once,
5488 % simply yielding the contents of <toks register>. (We also do this for
5489 % the toc entries.)
5490 \toks0 = {#1}%
5491 \message{(\the\toks0)}%
5492 %
5493 \chapmacro{#1}{Ynothing}{\the\unnumberedno}%
5494 %
5495 \global\let\section = \unnumberedsec
5496 \global\let\subsection = \unnumberedsubsec
5497 \global\let\subsubsection = \unnumberedsubsubsec
5498 }
5499
5500 % @centerchap is like @unnumbered, but the heading is centered.
5501 \outer\parseargdef\centerchap{%
5502 % Well, we could do the following in a group, but that would break
5503 % an assumption that \chapmacro is called at the outermost level.
5504 % Thus we are safer this way: --kasal, 24feb04
5505 \let\centerparametersmaybe = \centerparameters
5506 \unnmhead0{#1}%
5507 \let\centerparametersmaybe = \relax
5508 }
5509
5510 % @top is like @unnumbered.
5511 \let\top\unnumbered
5512
5513 % Sections.
5514 %
5515 \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
5516 \def\seczzz#1{%
5517 \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
5518 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
5519 }
5520
5521 % normally calls appendixsectionzzz:
5522 \outer\parseargdef\appendixsection{\apphead1{#1}}
5523 \def\appendixsectionzzz#1{%
5524 \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
5525 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
5526 }
5527 \let\appendixsec\appendixsection
5528
5529 % normally calls unnumberedseczzz:
5530 \outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
5531 \def\unnumberedseczzz#1{%
5532 \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
5533 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
5534 }
5535
5536 % Subsections.
5537 %
5538 % normally calls numberedsubseczzz:
5539 \outer\parseargdef\numberedsubsec{\numhead2{#1}}
5540 \def\numberedsubseczzz#1{%
5541 \global\subsubsecno=0 \global\advance\subsecno by 1
5542 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
5543 }
5544
5545 % normally calls appendixsubseczzz:
5546 \outer\parseargdef\appendixsubsec{\apphead2{#1}}
5547 \def\appendixsubseczzz#1{%
5548 \global\subsubsecno=0 \global\advance\subsecno by 1
5549 \sectionheading{#1}{subsec}{Yappendix}%
5550 {\appendixletter.\the\secno.\the\subsecno}%
5551 }
5552
5553 % normally calls unnumberedsubseczzz:
5554 \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
5555 \def\unnumberedsubseczzz#1{%
5556 \global\subsubsecno=0 \global\advance\subsecno by 1
5557 \sectionheading{#1}{subsec}{Ynothing}%
5558 {\the\unnumberedno.\the\secno.\the\subsecno}%
5559 }
5560
5561 % Subsubsections.
5562 %
5563 % normally numberedsubsubseczzz:
5564 \outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
5565 \def\numberedsubsubseczzz#1{%
5566 \global\advance\subsubsecno by 1
5567 \sectionheading{#1}{subsubsec}{Ynumbered}%
5568 {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
5569 }
5570
5571 % normally appendixsubsubseczzz:
5572 \outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
5573 \def\appendixsubsubseczzz#1{%
5574 \global\advance\subsubsecno by 1
5575 \sectionheading{#1}{subsubsec}{Yappendix}%
5576 {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
5577 }
5578
5579 % normally unnumberedsubsubseczzz:
5580 \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
5581 \def\unnumberedsubsubseczzz#1{%
5582 \global\advance\subsubsecno by 1
5583 \sectionheading{#1}{subsubsec}{Ynothing}%
5584 {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}%
5585 }
5586
5587 % These macros control what the section commands do, according
5588 % to what kind of chapter we are in (ordinary, appendix, or unnumbered).
5589 % Define them by default for a numbered chapter.
5590 \let\section = \numberedsec
5591 \let\subsection = \numberedsubsec
5592 \let\subsubsection = \numberedsubsubsec
5593
5594 % Define @majorheading, @heading and @subheading
5595
5596 \def\majorheading{%
5597 {\advance\chapheadingskip by 10pt \chapbreak }%
5598 \parsearg\chapheadingzzz
5599 }
5600
5601 \def\chapheading{\chapbreak \parsearg\chapheadingzzz}
5602 \def\chapheadingzzz#1{%
5603 \vbox{\chapfonts \raggedtitlesettings #1\par}%
5604 \nobreak\bigskip \nobreak
5605 \suppressfirstparagraphindent
5606 }
5607
5608 % @heading, @subheading, @subsubheading.
5609 \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{}
5610 \suppressfirstparagraphindent}
5611 \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{}
5612 \suppressfirstparagraphindent}
5613 \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
5614 \suppressfirstparagraphindent}
5615
5616 % These macros generate a chapter, section, etc. heading only
5617 % (including whitespace, linebreaking, etc. around it),
5618 % given all the information in convenient, parsed form.
5619
5620 % Args are the skip and penalty (usually negative)
5621 \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
5622
5623 % Parameter controlling skip before chapter headings (if needed)
5624 \newskip\chapheadingskip
5625
5626 % Define plain chapter starts, and page on/off switching for it.
5627 \def\chapbreak{\dobreak \chapheadingskip {-4000}}
5628 \def\chappager{\par\vfill\supereject}
5629 % Because \domark is called before \chapoddpage, the filler page will
5630 % get the headings for the next chapter, which is wrong. But we don't
5631 % care -- we just disable all headings on the filler page.
5632 \def\chapoddpage{%
5633 \chappager
5634 \ifodd\pageno \else
5635 \begingroup
5636 \headingsoff
5637 \null
5638 \chappager
5639 \endgroup
5640 \fi
5641 }
5642
5643 \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
5644
5645 \def\CHAPPAGoff{%
5646 \global\let\contentsalignmacro = \chappager
5647 \global\let\pchapsepmacro=\chapbreak
5648 \global\let\pagealignmacro=\chappager}
5649
5650 \def\CHAPPAGon{%
5651 \global\let\contentsalignmacro = \chappager
5652 \global\let\pchapsepmacro=\chappager
5653 \global\let\pagealignmacro=\chappager
5654 \global\def\HEADINGSon{\HEADINGSsingle}}
5655
5656 \def\CHAPPAGodd{%
5657 \global\let\contentsalignmacro = \chapoddpage
5658 \global\let\pchapsepmacro=\chapoddpage
5659 \global\let\pagealignmacro=\chapoddpage
5660 \global\def\HEADINGSon{\HEADINGSdouble}}
5661
5662 \CHAPPAGon
5663
5664 % Chapter opening.
5665 %
5666 % #1 is the text, #2 is the section type (Ynumbered, Ynothing,
5667 % Yappendix, Yomitfromtoc), #3 the chapter number.
5668 %
5669 % To test against our argument.
5670 \def\Ynothingkeyword{Ynothing}
5671 \def\Yomitfromtockeyword{Yomitfromtoc}
5672 \def\Yappendixkeyword{Yappendix}
5673 %
5674 \def\chapmacro#1#2#3{%
5675 % Insert the first mark before the heading break (see notes for \domark).
5676 \let\prevchapterdefs=\lastchapterdefs
5677 \let\prevsectiondefs=\lastsectiondefs
5678 \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
5679 \gdef\thissection{}}%
5680 %
5681 \def\temptype{#2}%
5682 \ifx\temptype\Ynothingkeyword
5683 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
5684 \gdef\thischapter{\thischaptername}}%
5685 \else\ifx\temptype\Yomitfromtockeyword
5686 \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
5687 \gdef\thischapter{}}%
5688 \else\ifx\temptype\Yappendixkeyword
5689 \toks0={#1}%
5690 \xdef\lastchapterdefs{%
5691 \gdef\noexpand\thischaptername{\the\toks0}%
5692 \gdef\noexpand\thischapternum{\appendixletter}%
5693 % \noexpand\putwordAppendix avoids expanding indigestible
5694 % commands in some of the translations.
5695 \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
5696 \noexpand\thischapternum:
5697 \noexpand\thischaptername}%
5698 }%
5699 \else
5700 \toks0={#1}%
5701 \xdef\lastchapterdefs{%
5702 \gdef\noexpand\thischaptername{\the\toks0}%
5703 \gdef\noexpand\thischapternum{\the\chapno}%
5704 % \noexpand\putwordChapter avoids expanding indigestible
5705 % commands in some of the translations.
5706 \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
5707 \noexpand\thischapternum:
5708 \noexpand\thischaptername}%
5709 }%
5710 \fi\fi\fi
5711 %
5712 % Output the mark. Pass it through \safewhatsit, to take care of
5713 % the preceding space.
5714 \safewhatsit\domark
5715 %
5716 % Insert the chapter heading break.
5717 \pchapsepmacro
5718 %
5719 % Now the second mark, after the heading break. No break points
5720 % between here and the heading.
5721 \let\prevchapterdefs=\lastchapterdefs
5722 \let\prevsectiondefs=\lastsectiondefs
5723 \domark
5724 %
5725 {%
5726 \chapfonts \rmisbold
5727 %
5728 % Have to define \lastsection before calling \donoderef, because the
5729 % xref code eventually uses it. On the other hand, it has to be called
5730 % after \pchapsepmacro, or the headline will change too soon.
5731 \gdef\lastsection{#1}%
5732 %
5733 % Only insert the separating space if we have a chapter/appendix
5734 % number, and don't print the unnumbered ``number''.
5735 \ifx\temptype\Ynothingkeyword
5736 \setbox0 = \hbox{}%
5737 \def\toctype{unnchap}%
5738 \else\ifx\temptype\Yomitfromtockeyword
5739 \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
5740 \def\toctype{omit}%
5741 \else\ifx\temptype\Yappendixkeyword
5742 \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
5743 \def\toctype{app}%
5744 \else
5745 \setbox0 = \hbox{#3\enspace}%
5746 \def\toctype{numchap}%
5747 \fi\fi\fi
5748 %
5749 % Write the toc entry for this chapter. Must come before the
5750 % \donoderef, because we include the current node name in the toc
5751 % entry, and \donoderef resets it to empty.
5752 \writetocentry{\toctype}{#1}{#3}%
5753 %
5754 % For pdftex, we have to write out the node definition (aka, make
5755 % the pdfdest) after any page break, but before the actual text has
5756 % been typeset. If the destination for the pdf outline is after the
5757 % text, then jumping from the outline may wind up with the text not
5758 % being visible, for instance under high magnification.
5759 \donoderef{#2}%
5760 %
5761 % Typeset the actual heading.
5762 \nobreak % Avoid page breaks at the interline glue.
5763 \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe
5764 \unhbox0 #1\par}%
5765 }%
5766 \nobreak\bigskip % no page break after a chapter title
5767 \nobreak
5768 }
5769
5770 % @centerchap -- centered and unnumbered.
5771 \let\centerparametersmaybe = \relax
5772 \def\centerparameters{%
5773 \advance\rightskip by 3\rightskip
5774 \leftskip = \rightskip
5775 \parfillskip = 0pt
5776 }
5777
5778
5779 % I don't think this chapter style is supported any more, so I'm not
5780 % updating it with the new noderef stuff. We'll see. --karl, 11aug03.
5781 %
5782 \def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
5783 %
5784 \def\unnchfopen #1{%
5785 \chapoddpage
5786 \vbox{\chapfonts \raggedtitlesettings #1\par}%
5787 \nobreak\bigskip\nobreak
5788 }
5789 \def\chfopen #1#2{\chapoddpage {\chapfonts
5790 \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
5791 \par\penalty 5000 %
5792 }
5793 \def\centerchfopen #1{%
5794 \chapoddpage
5795 \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}%
5796 \nobreak\bigskip \nobreak
5797 }
5798 \def\CHAPFopen{%
5799 \global\let\chapmacro=\chfopen
5800 \global\let\centerchapmacro=\centerchfopen}
5801
5802
5803 % Section titles. These macros combine the section number parts and
5804 % call the generic \sectionheading to do the printing.
5805 %
5806 \newskip\secheadingskip
5807 \def\secheadingbreak{\dobreak \secheadingskip{-1000}}
5808
5809 % Subsection titles.
5810 \newskip\subsecheadingskip
5811 \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}}
5812
5813 % Subsubsection titles.
5814 \def\subsubsecheadingskip{\subsecheadingskip}
5815 \def\subsubsecheadingbreak{\subsecheadingbreak}
5816
5817
5818 % Print any size, any type, section title.
5819 %
5820 % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
5821 % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
5822 % section number.
5823 %
5824 \def\seckeyword{sec}
5825 %
5826 \def\sectionheading#1#2#3#4{%
5827 {%
5828 \checkenv{}% should not be in an environment.
5829 %
5830 % Switch to the right set of fonts.
5831 \csname #2fonts\endcsname \rmisbold
5832 %
5833 \def\sectionlevel{#2}%
5834 \def\temptype{#3}%
5835 %
5836 % Insert first mark before the heading break (see notes for \domark).
5837 \let\prevsectiondefs=\lastsectiondefs
5838 \ifx\temptype\Ynothingkeyword
5839 \ifx\sectionlevel\seckeyword
5840 \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
5841 \gdef\thissection{\thissectionname}}%
5842 \fi
5843 \else\ifx\temptype\Yomitfromtockeyword
5844 % Don't redefine \thissection.
5845 \else\ifx\temptype\Yappendixkeyword
5846 \ifx\sectionlevel\seckeyword
5847 \toks0={#1}%
5848 \xdef\lastsectiondefs{%
5849 \gdef\noexpand\thissectionname{\the\toks0}%
5850 \gdef\noexpand\thissectionnum{#4}%
5851 % \noexpand\putwordSection avoids expanding indigestible
5852 % commands in some of the translations.
5853 \gdef\noexpand\thissection{\noexpand\putwordSection{}
5854 \noexpand\thissectionnum:
5855 \noexpand\thissectionname}%
5856 }%
5857 \fi
5858 \else
5859 \ifx\sectionlevel\seckeyword
5860 \toks0={#1}%
5861 \xdef\lastsectiondefs{%
5862 \gdef\noexpand\thissectionname{\the\toks0}%
5863 \gdef\noexpand\thissectionnum{#4}%
5864 % \noexpand\putwordSection avoids expanding indigestible
5865 % commands in some of the translations.
5866 \gdef\noexpand\thissection{\noexpand\putwordSection{}
5867 \noexpand\thissectionnum:
5868 \noexpand\thissectionname}%
5869 }%
5870 \fi
5871 \fi\fi\fi
5872 %
5873 % Go into vertical mode. Usually we'll already be there, but we
5874 % don't want the following whatsit to end up in a preceding paragraph
5875 % if the document didn't happen to have a blank line.
5876 \par
5877 %
5878 % Output the mark. Pass it through \safewhatsit, to take care of
5879 % the preceding space.
5880 \safewhatsit\domark
5881 %
5882 % Insert space above the heading.
5883 \csname #2headingbreak\endcsname
5884 %
5885 % Now the second mark, after the heading break. No break points
5886 % between here and the heading.
5887 \let\prevsectiondefs=\lastsectiondefs
5888 \domark
5889 %
5890 % Only insert the space after the number if we have a section number.
5891 \ifx\temptype\Ynothingkeyword
5892 \setbox0 = \hbox{}%
5893 \def\toctype{unn}%
5894 \gdef\lastsection{#1}%
5895 \else\ifx\temptype\Yomitfromtockeyword
5896 % for @headings -- no section number, don't include in toc,
5897 % and don't redefine \lastsection.
5898 \setbox0 = \hbox{}%
5899 \def\toctype{omit}%
5900 \let\sectionlevel=\empty
5901 \else\ifx\temptype\Yappendixkeyword
5902 \setbox0 = \hbox{#4\enspace}%
5903 \def\toctype{app}%
5904 \gdef\lastsection{#1}%
5905 \else
5906 \setbox0 = \hbox{#4\enspace}%
5907 \def\toctype{num}%
5908 \gdef\lastsection{#1}%
5909 \fi\fi\fi
5910 %
5911 % Write the toc entry (before \donoderef). See comments in \chapmacro.
5912 \writetocentry{\toctype\sectionlevel}{#1}{#4}%
5913 %
5914 % Write the node reference (= pdf destination for pdftex).
5915 % Again, see comments in \chapmacro.
5916 \donoderef{#3}%
5917 %
5918 % Interline glue will be inserted when the vbox is completed.
5919 % That glue will be a valid breakpoint for the page, since it'll be
5920 % preceded by a whatsit (usually from the \donoderef, or from the
5921 % \writetocentry if there was no node). We don't want to allow that
5922 % break, since then the whatsits could end up on page n while the
5923 % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
5924 \nobreak
5925 %
5926 % Output the actual section heading.
5927 \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
5928 \hangindent=\wd0 % zero if no section number
5929 \unhbox0 #1}%
5930 }%
5931 % Add extra space after the heading -- half of whatever came above it.
5932 % Don't allow stretch, though.
5933 \kern .5 \csname #2headingskip\endcsname
5934 %
5935 % Do not let the kern be a potential breakpoint, as it would be if it
5936 % was followed by glue.
5937 \nobreak
5938 %
5939 % We'll almost certainly start a paragraph next, so don't let that
5940 % glue accumulate. (Not a breakpoint because it's preceded by a
5941 % discardable item.) However, when a paragraph is not started next
5942 % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out
5943 % or the negative glue will cause weirdly wrong output, typically
5944 % obscuring the section heading with something else.
5945 \vskip-\parskip
5946 %
5947 % This is so the last item on the main vertical list is a known
5948 % \penalty > 10000, so \startdefun, etc., can recognize the situation
5949 % and do the needful.
5950 \penalty 10001
5951 }
5952
5953
5954 \message{toc,}
5955 % Table of contents.
5956 \newwrite\tocfile
5957
5958 % Write an entry to the toc file, opening it if necessary.
5959 % Called from @chapter, etc.
5960 %
5961 % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
5962 % We append the current node name (if any) and page number as additional
5963 % arguments for the \{chap,sec,...}entry macros which will eventually
5964 % read this. The node name is used in the pdf outlines as the
5965 % destination to jump to.
5966 %
5967 % We open the .toc file for writing here instead of at @setfilename (or
5968 % any other fixed time) so that @contents can be anywhere in the document.
5969 % But if #1 is `omit', then we don't do anything. This is used for the
5970 % table of contents chapter openings themselves.
5971 %
5972 \newif\iftocfileopened
5973 \def\omitkeyword{omit}%
5974 %
5975 \def\writetocentry#1#2#3{%
5976 \edef\writetoctype{#1}%
5977 \ifx\writetoctype\omitkeyword \else
5978 \iftocfileopened\else
5979 \immediate\openout\tocfile = \jobname.toc
5980 \global\tocfileopenedtrue
5981 \fi
5982 %
5983 \iflinks
5984 {\atdummies
5985 \edef\temp{%
5986 \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
5987 \temp
5988 }%
5989 \fi
5990 \fi
5991 %
5992 % Tell \shipout to create a pdf destination on each page, if we're
5993 % writing pdf. These are used in the table of contents. We can't
5994 % just write one on every page because the title pages are numbered
5995 % 1 and 2 (the page numbers aren't printed), and so are the first
5996 % two pages of the document. Thus, we'd have two destinations named
5997 % `1', and two named `2'.
5998 \ifpdf \global\pdfmakepagedesttrue \fi
5999 }
6000
6001
6002 % These characters do not print properly in the Computer Modern roman
6003 % fonts, so we must take special care. This is more or less redundant
6004 % with the Texinfo input format setup at the end of this file.
6005 %
6006 \def\activecatcodes{%
6007 \catcode`\"=\active
6008 \catcode`\$=\active
6009 \catcode`\<=\active
6010 \catcode`\>=\active
6011 \catcode`\\=\active
6012 \catcode`\^=\active
6013 \catcode`\_=\active
6014 \catcode`\|=\active
6015 \catcode`\~=\active
6016 }
6017
6018
6019 % Read the toc file, which is essentially Texinfo input.
6020 \def\readtocfile{%
6021 \setupdatafile
6022 \activecatcodes
6023 \input \tocreadfilename
6024 }
6025
6026 \newskip\contentsrightmargin \contentsrightmargin=1in
6027 \newcount\savepageno
6028 \newcount\lastnegativepageno \lastnegativepageno = -1
6029
6030 % Prepare to read what we've written to \tocfile.
6031 %
6032 \def\startcontents#1{%
6033 % If @setchapternewpage on, and @headings double, the contents should
6034 % start on an odd page, unlike chapters. Thus, we maintain
6035 % \contentsalignmacro in parallel with \pagealignmacro.
6036 % From: Torbjorn Granlund <tege@matematik.su.se>
6037 \contentsalignmacro
6038 \immediate\closeout\tocfile
6039 %
6040 % Don't need to put `Contents' or `Short Contents' in the headline.
6041 % It is abundantly clear what they are.
6042 \chapmacro{#1}{Yomitfromtoc}{}%
6043 %
6044 \savepageno = \pageno
6045 \begingroup % Set up to handle contents files properly.
6046 \raggedbottom % Worry more about breakpoints than the bottom.
6047 \advance\hsize by -\contentsrightmargin % Don't use the full line length.
6048 %
6049 % Roman numerals for page numbers.
6050 \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
6051 }
6052
6053 % redefined for the two-volume lispref. We always output on
6054 % \jobname.toc even if this is redefined.
6055 %
6056 \def\tocreadfilename{\jobname.toc}
6057
6058 % Normal (long) toc.
6059 %
6060 \def\contents{%
6061 \startcontents{\putwordTOC}%
6062 \openin 1 \tocreadfilename\space
6063 \ifeof 1 \else
6064 \readtocfile
6065 \fi
6066 \vfill \eject
6067 \contentsalignmacro % in case @setchapternewpage odd is in effect
6068 \ifeof 1 \else
6069 \pdfmakeoutlines
6070 \fi
6071 \closein 1
6072 \endgroup
6073 \lastnegativepageno = \pageno
6074 \global\pageno = \savepageno
6075 }
6076
6077 % And just the chapters.
6078 \def\summarycontents{%
6079 \startcontents{\putwordShortTOC}%
6080 %
6081 \let\partentry = \shortpartentry
6082 \let\numchapentry = \shortchapentry
6083 \let\appentry = \shortchapentry
6084 \let\unnchapentry = \shortunnchapentry
6085 % We want a true roman here for the page numbers.
6086 \secfonts
6087 \let\rm=\shortcontrm \let\bf=\shortcontbf
6088 \let\sl=\shortcontsl \let\tt=\shortconttt
6089 \rm
6090 \hyphenpenalty = 10000
6091 \advance\baselineskip by 1pt % Open it up a little.
6092 \def\numsecentry##1##2##3##4{}
6093 \let\appsecentry = \numsecentry
6094 \let\unnsecentry = \numsecentry
6095 \let\numsubsecentry = \numsecentry
6096 \let\appsubsecentry = \numsecentry
6097 \let\unnsubsecentry = \numsecentry
6098 \let\numsubsubsecentry = \numsecentry
6099 \let\appsubsubsecentry = \numsecentry
6100 \let\unnsubsubsecentry = \numsecentry
6101 \openin 1 \tocreadfilename\space
6102 \ifeof 1 \else
6103 \readtocfile
6104 \fi
6105 \closein 1
6106 \vfill \eject
6107 \contentsalignmacro % in case @setchapternewpage odd is in effect
6108 \endgroup
6109 \lastnegativepageno = \pageno
6110 \global\pageno = \savepageno
6111 }
6112 \let\shortcontents = \summarycontents
6113
6114 % Typeset the label for a chapter or appendix for the short contents.
6115 % The arg is, e.g., `A' for an appendix, or `3' for a chapter.
6116 %
6117 \def\shortchaplabel#1{%
6118 % This space should be enough, since a single number is .5em, and the
6119 % widest letter (M) is 1em, at least in the Computer Modern fonts.
6120 % But use \hss just in case.
6121 % (This space doesn't include the extra space that gets added after
6122 % the label; that gets put in by \shortchapentry above.)
6123 %
6124 % We'd like to right-justify chapter numbers, but that looks strange
6125 % with appendix letters. And right-justifying numbers and
6126 % left-justifying letters looks strange when there is less than 10
6127 % chapters. Have to read the whole toc once to know how many chapters
6128 % there are before deciding ...
6129 \hbox to 1em{#1\hss}%
6130 }
6131
6132 % These macros generate individual entries in the table of contents.
6133 % The first argument is the chapter or section name.
6134 % The last argument is the page number.
6135 % The arguments in between are the chapter number, section number, ...
6136
6137 % Parts, in the main contents. Replace the part number, which doesn't
6138 % exist, with an empty box. Let's hope all the numbers have the same width.
6139 % Also ignore the page number, which is conventionally not printed.
6140 \def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
6141 \def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
6142 %
6143 % Parts, in the short toc.
6144 \def\shortpartentry#1#2#3#4{%
6145 \penalty-300
6146 \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
6147 \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
6148 }
6149
6150 % Chapters, in the main contents.
6151 \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
6152 %
6153 % Chapters, in the short toc.
6154 % See comments in \dochapentry re vbox and related settings.
6155 \def\shortchapentry#1#2#3#4{%
6156 \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
6157 }
6158
6159 % Appendices, in the main contents.
6160 % Need the word Appendix, and a fixed-size box.
6161 %
6162 \def\appendixbox#1{%
6163 % We use M since it's probably the widest letter.
6164 \setbox0 = \hbox{\putwordAppendix{} M}%
6165 \hbox to \wd0{\putwordAppendix{} #1\hss}}
6166 %
6167 \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
6168
6169 % Unnumbered chapters.
6170 \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
6171 \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
6172
6173 % Sections.
6174 \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
6175 \let\appsecentry=\numsecentry
6176 \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
6177
6178 % Subsections.
6179 \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
6180 \let\appsubsecentry=\numsubsecentry
6181 \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
6182
6183 % And subsubsections.
6184 \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
6185 \let\appsubsubsecentry=\numsubsubsecentry
6186 \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
6187
6188 % This parameter controls the indentation of the various levels.
6189 % Same as \defaultparindent.
6190 \newdimen\tocindent \tocindent = 15pt
6191
6192 % Now for the actual typesetting. In all these, #1 is the text and #2 is the
6193 % page number.
6194 %
6195 % If the toc has to be broken over pages, we want it to be at chapters
6196 % if at all possible; hence the \penalty.
6197 \def\dochapentry#1#2{%
6198 \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
6199 \begingroup
6200 \chapentryfonts
6201 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6202 \endgroup
6203 \nobreak\vskip .25\baselineskip plus.1\baselineskip
6204 }
6205
6206 \def\dosecentry#1#2{\begingroup
6207 \secentryfonts \leftskip=\tocindent
6208 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6209 \endgroup}
6210
6211 \def\dosubsecentry#1#2{\begingroup
6212 \subsecentryfonts \leftskip=2\tocindent
6213 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6214 \endgroup}
6215
6216 \def\dosubsubsecentry#1#2{\begingroup
6217 \subsubsecentryfonts \leftskip=3\tocindent
6218 \tocentry{#1}{\dopageno\bgroup#2\egroup}%
6219 \endgroup}
6220
6221 % We use the same \entry macro as for the index entries.
6222 \let\tocentry = \entry
6223
6224 % Space between chapter (or whatever) number and the title.
6225 \def\labelspace{\hskip1em \relax}
6226
6227 \def\dopageno#1{{\rm #1}}
6228 \def\doshortpageno#1{{\rm #1}}
6229
6230 \def\chapentryfonts{\secfonts \rm}
6231 \def\secentryfonts{\textfonts}
6232 \def\subsecentryfonts{\textfonts}
6233 \def\subsubsecentryfonts{\textfonts}
6234
6235
6236 \message{environments,}
6237 % @foo ... @end foo.
6238
6239 % @tex ... @end tex escapes into raw TeX temporarily.
6240 % One exception: @ is still an escape character, so that @end tex works.
6241 % But \@ or @@ will get a plain @ character.
6242
6243 \envdef\tex{%
6244 \setupmarkupstyle{tex}%
6245 \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
6246 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
6247 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
6248 \catcode `\%=14
6249 \catcode `\+=\other
6250 \catcode `\"=\other
6251 \catcode `\|=\other
6252 \catcode `\<=\other
6253 \catcode `\>=\other
6254 \catcode`\`=\other
6255 \catcode`\'=\other
6256 \escapechar=`\\
6257 %
6258 % ' is active in math mode (mathcode"8000). So reset it, and all our
6259 % other math active characters (just in case), to plain's definitions.
6260 \mathactive
6261 %
6262 \let\b=\ptexb
6263 \let\bullet=\ptexbullet
6264 \let\c=\ptexc
6265 \let\,=\ptexcomma
6266 \let\.=\ptexdot
6267 \let\dots=\ptexdots
6268 \let\equiv=\ptexequiv
6269 \let\!=\ptexexclam
6270 \let\i=\ptexi
6271 \let\indent=\ptexindent
6272 \let\noindent=\ptexnoindent
6273 \let\{=\ptexlbrace
6274 \let\+=\tabalign
6275 \let\}=\ptexrbrace
6276 \let\/=\ptexslash
6277 \let\*=\ptexstar
6278 \let\t=\ptext
6279 \expandafter \let\csname top\endcsname=\ptextop % outer
6280 \let\frenchspacing=\plainfrenchspacing
6281 %
6282 \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
6283 \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
6284 \def\@{@}%
6285 }
6286 % There is no need to define \Etex.
6287
6288 % Define @lisp ... @end lisp.
6289 % @lisp environment forms a group so it can rebind things,
6290 % including the definition of @end lisp (which normally is erroneous).
6291
6292 % Amount to narrow the margins by for @lisp.
6293 \newskip\lispnarrowing \lispnarrowing=0.4in
6294
6295 % This is the definition that ^^M gets inside @lisp, @example, and other
6296 % such environments. \null is better than a space, since it doesn't
6297 % have any width.
6298 \def\lisppar{\null\endgraf}
6299
6300 % This space is always present above and below environments.
6301 \newskip\envskipamount \envskipamount = 0pt
6302
6303 % Make spacing and below environment symmetrical. We use \parskip here
6304 % to help in doing that, since in @example-like environments \parskip
6305 % is reset to zero; thus the \afterenvbreak inserts no space -- but the
6306 % start of the next paragraph will insert \parskip.
6307 %
6308 \def\aboveenvbreak{{%
6309 % =10000 instead of <10000 because of a special case in \itemzzz and
6310 % \sectionheading, q.v.
6311 \ifnum \lastpenalty=10000 \else
6312 \advance\envskipamount by \parskip
6313 \endgraf
6314 \ifdim\lastskip<\envskipamount
6315 \removelastskip
6316 % it's not a good place to break if the last penalty was \nobreak
6317 % or better ...
6318 \ifnum\lastpenalty<10000 \penalty-50 \fi
6319 \vskip\envskipamount
6320 \fi
6321 \fi
6322 }}
6323
6324 \let\afterenvbreak = \aboveenvbreak
6325
6326 % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
6327 % also clear it, so that its embedded environments do the narrowing again.
6328 \let\nonarrowing=\relax
6329
6330 % @cartouche ... @end cartouche: draw rectangle w/rounded corners around
6331 % environment contents.
6332 \font\circle=lcircle10
6333 \newdimen\circthick
6334 \newdimen\cartouter\newdimen\cartinner
6335 \newskip\normbskip\newskip\normpskip\newskip\normlskip
6336 \circthick=\fontdimen8\circle
6337 %
6338 \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
6339 \def\ctr{{\hskip 6pt\circle\char'010}}
6340 \def\cbl{{\circle\char'012\hskip -6pt}}
6341 \def\cbr{{\hskip 6pt\circle\char'011}}
6342 \def\carttop{\hbox to \cartouter{\hskip\lskip
6343 \ctl\leaders\hrule height\circthick\hfil\ctr
6344 \hskip\rskip}}
6345 \def\cartbot{\hbox to \cartouter{\hskip\lskip
6346 \cbl\leaders\hrule height\circthick\hfil\cbr
6347 \hskip\rskip}}
6348 %
6349 \newskip\lskip\newskip\rskip
6350
6351 \envdef\cartouche{%
6352 \ifhmode\par\fi % can't be in the midst of a paragraph.
6353 \startsavinginserts
6354 \lskip=\leftskip \rskip=\rightskip
6355 \leftskip=0pt\rightskip=0pt % we want these *outside*.
6356 \cartinner=\hsize \advance\cartinner by-\lskip
6357 \advance\cartinner by-\rskip
6358 \cartouter=\hsize
6359 \advance\cartouter by 18.4pt % allow for 3pt kerns on either
6360 % side, and for 6pt waste from
6361 % each corner char, and rule thickness
6362 \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
6363 % Flag to tell @lisp, etc., not to narrow margin.
6364 \let\nonarrowing = t%
6365 %
6366 % If this cartouche directly follows a sectioning command, we need the
6367 % \parskip glue (backspaced over by default) or the cartouche can
6368 % collide with the section heading.
6369 \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi
6370 %
6371 \vbox\bgroup
6372 \baselineskip=0pt\parskip=0pt\lineskip=0pt
6373 \carttop
6374 \hbox\bgroup
6375 \hskip\lskip
6376 \vrule\kern3pt
6377 \vbox\bgroup
6378 \kern3pt
6379 \hsize=\cartinner
6380 \baselineskip=\normbskip
6381 \lineskip=\normlskip
6382 \parskip=\normpskip
6383 \vskip -\parskip
6384 \comment % For explanation, see the end of def\group.
6385 }
6386 \def\Ecartouche{%
6387 \ifhmode\par\fi
6388 \kern3pt
6389 \egroup
6390 \kern3pt\vrule
6391 \hskip\rskip
6392 \egroup
6393 \cartbot
6394 \egroup
6395 \checkinserts
6396 }
6397
6398
6399 % This macro is called at the beginning of all the @example variants,
6400 % inside a group.
6401 \newdimen\nonfillparindent
6402 \def\nonfillstart{%
6403 \aboveenvbreak
6404 \hfuzz = 12pt % Don't be fussy
6405 \sepspaces % Make spaces be word-separators rather than space tokens.
6406 \let\par = \lisppar % don't ignore blank lines
6407 \obeylines % each line of input is a line of output
6408 \parskip = 0pt
6409 % Turn off paragraph indentation but redefine \indent to emulate
6410 % the normal \indent.
6411 \nonfillparindent=\parindent
6412 \parindent = 0pt
6413 \let\indent\nonfillindent
6414 %
6415 \emergencystretch = 0pt % don't try to avoid overfull boxes
6416 \ifx\nonarrowing\relax
6417 \advance \leftskip by \lispnarrowing
6418 \exdentamount=\lispnarrowing
6419 \else
6420 \let\nonarrowing = \relax
6421 \fi
6422 \let\exdent=\nofillexdent
6423 }
6424
6425 \begingroup
6426 \obeyspaces
6427 % We want to swallow spaces (but not other tokens) after the fake
6428 % @indent in our nonfill-environments, where spaces are normally
6429 % active and set to @tie, resulting in them not being ignored after
6430 % @indent.
6431 \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
6432 \gdef\nonfillindentcheck{%
6433 \ifx\temp %
6434 \expandafter\nonfillindentgobble%
6435 \else%
6436 \leavevmode\nonfillindentbox%
6437 \fi%
6438 }%
6439 \endgroup
6440 \def\nonfillindentgobble#1{\nonfillindent}
6441 \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
6442
6443 % If you want all examples etc. small: @set dispenvsize small.
6444 % If you want even small examples the full size: @set dispenvsize nosmall.
6445 % This affects the following displayed environments:
6446 % @example, @display, @format, @lisp
6447 %
6448 \def\smallword{small}
6449 \def\nosmallword{nosmall}
6450 \let\SETdispenvsize\relax
6451 \def\setnormaldispenv{%
6452 \ifx\SETdispenvsize\smallword
6453 % end paragraph for sake of leading, in case document has no blank
6454 % line. This is redundant with what happens in \aboveenvbreak, but
6455 % we need to do it before changing the fonts, and it's inconvenient
6456 % to change the fonts afterward.
6457 \ifnum \lastpenalty=10000 \else \endgraf \fi
6458 \smallexamplefonts \rm
6459 \fi
6460 }
6461 \def\setsmalldispenv{%
6462 \ifx\SETdispenvsize\nosmallword
6463 \else
6464 \ifnum \lastpenalty=10000 \else \endgraf \fi
6465 \smallexamplefonts \rm
6466 \fi
6467 }
6468
6469 % We often define two environments, @foo and @smallfoo.
6470 % Let's do it in one command. #1 is the env name, #2 the definition.
6471 \def\makedispenvdef#1#2{%
6472 \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
6473 \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
6474 \expandafter\let\csname E#1\endcsname \afterenvbreak
6475 \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
6476 }
6477
6478 % Define two environment synonyms (#1 and #2) for an environment.
6479 \def\maketwodispenvdef#1#2#3{%
6480 \makedispenvdef{#1}{#3}%
6481 \makedispenvdef{#2}{#3}%
6482 }
6483 %
6484 % @lisp: indented, narrowed, typewriter font;
6485 % @example: same as @lisp.
6486 %
6487 % @smallexample and @smalllisp: use smaller fonts.
6488 % Originally contributed by Pavel@xerox.
6489 %
6490 \maketwodispenvdef{lisp}{example}{%
6491 \nonfillstart
6492 \tt\setupmarkupstyle{example}%
6493 \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
6494 \gobble % eat return
6495 }
6496 % @display/@smalldisplay: same as @lisp except keep current font.
6497 %
6498 \makedispenvdef{display}{%
6499 \nonfillstart
6500 \gobble
6501 }
6502
6503 % @format/@smallformat: same as @display except don't narrow margins.
6504 %
6505 \makedispenvdef{format}{%
6506 \let\nonarrowing = t%
6507 \nonfillstart
6508 \gobble
6509 }
6510
6511 % @flushleft: same as @format, but doesn't obey \SETdispenvsize.
6512 \envdef\flushleft{%
6513 \let\nonarrowing = t%
6514 \nonfillstart
6515 \gobble
6516 }
6517 \let\Eflushleft = \afterenvbreak
6518
6519 % @flushright.
6520 %
6521 \envdef\flushright{%
6522 \let\nonarrowing = t%
6523 \nonfillstart
6524 \advance\leftskip by 0pt plus 1fill\relax
6525 \gobble
6526 }
6527 \let\Eflushright = \afterenvbreak
6528
6529
6530 % @raggedright does more-or-less normal line breaking but no right
6531 % justification. From plain.tex.
6532 \envdef\raggedright{%
6533 \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
6534 }
6535 \let\Eraggedright\par
6536
6537 \envdef\raggedleft{%
6538 \parindent=0pt \leftskip0pt plus2em
6539 \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
6540 \hbadness=10000 % Last line will usually be underfull, so turn off
6541 % badness reporting.
6542 }
6543 \let\Eraggedleft\par
6544
6545 \envdef\raggedcenter{%
6546 \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
6547 \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
6548 \hbadness=10000 % Last line will usually be underfull, so turn off
6549 % badness reporting.
6550 }
6551 \let\Eraggedcenter\par
6552
6553
6554 % @quotation does normal linebreaking (hence we can't use \nonfillstart)
6555 % and narrows the margins. We keep \parskip nonzero in general, since
6556 % we're doing normal filling. So, when using \aboveenvbreak and
6557 % \afterenvbreak, temporarily make \parskip 0.
6558 %
6559 \makedispenvdef{quotation}{\quotationstart}
6560 %
6561 \def\quotationstart{%
6562 \indentedblockstart % same as \indentedblock, but increase right margin too.
6563 \ifx\nonarrowing\relax
6564 \advance\rightskip by \lispnarrowing
6565 \fi
6566 \parsearg\quotationlabel
6567 }
6568
6569 % We have retained a nonzero parskip for the environment, since we're
6570 % doing normal filling.
6571 %
6572 \def\Equotation{%
6573 \par
6574 \ifx\quotationauthor\thisisundefined\else
6575 % indent a bit.
6576 \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
6577 \fi
6578 {\parskip=0pt \afterenvbreak}%
6579 }
6580 \def\Esmallquotation{\Equotation}
6581
6582 % If we're given an argument, typeset it in bold with a colon after.
6583 \def\quotationlabel#1{%
6584 \def\temp{#1}%
6585 \ifx\temp\empty \else
6586 {\bf #1: }%
6587 \fi
6588 }
6589
6590 % @indentedblock is like @quotation, but indents only on the left and
6591 % has no optional argument.
6592 %
6593 \makedispenvdef{indentedblock}{\indentedblockstart}
6594 %
6595 \def\indentedblockstart{%
6596 {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
6597 \parindent=0pt
6598 %
6599 % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
6600 \ifx\nonarrowing\relax
6601 \advance\leftskip by \lispnarrowing
6602 \exdentamount = \lispnarrowing
6603 \else
6604 \let\nonarrowing = \relax
6605 \fi
6606 }
6607
6608 % Keep a nonzero parskip for the environment, since we're doing normal filling.
6609 %
6610 \def\Eindentedblock{%
6611 \par
6612 {\parskip=0pt \afterenvbreak}%
6613 }
6614 \def\Esmallindentedblock{\Eindentedblock}
6615
6616
6617 % LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
6618 % If we want to allow any <char> as delimiter,
6619 % we need the curly braces so that makeinfo sees the @verb command, eg:
6620 % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
6621 %
6622 % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
6623 %
6624 % [Knuth] p.344; only we need to do the other characters Texinfo sets
6625 % active too. Otherwise, they get lost as the first character on a
6626 % verbatim line.
6627 \def\dospecials{%
6628 \do\ \do\\\do\{\do\}\do\$\do\&%
6629 \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
6630 \do\<\do\>\do\|\do\@\do+\do\"%
6631 % Don't do the quotes -- if we do, @set txicodequoteundirected and
6632 % @set txicodequotebacktick will not have effect on @verb and
6633 % @verbatim, and ?` and !` ligatures won't get disabled.
6634 %\do\`\do\'%
6635 }
6636 %
6637 % [Knuth] p. 380
6638 \def\uncatcodespecials{%
6639 \def\do##1{\catcode`##1=\other}\dospecials}
6640 %
6641 % Setup for the @verb command.
6642 %
6643 % Eight spaces for a tab
6644 \begingroup
6645 \catcode`\^^I=\active
6646 \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
6647 \endgroup
6648 %
6649 \def\setupverb{%
6650 \tt % easiest (and conventionally used) font for verbatim
6651 \def\par{\leavevmode\endgraf}%
6652 \setupmarkupstyle{verb}%
6653 \tabeightspaces
6654 % Respect line breaks,
6655 % print special symbols as themselves, and
6656 % make each space count
6657 % must do in this order:
6658 \obeylines \uncatcodespecials \sepspaces
6659 }
6660
6661 % Setup for the @verbatim environment
6662 %
6663 % Real tab expansion.
6664 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
6665 %
6666 % We typeset each line of the verbatim in an \hbox, so we can handle
6667 % tabs. The \global is in case the verbatim line starts with an accent,
6668 % or some other command that starts with a begin-group. Otherwise, the
6669 % entire \verbbox would disappear at the corresponding end-group, before
6670 % it is typeset. Meanwhile, we can't have nested verbatim commands
6671 % (can we?), so the \global won't be overwriting itself.
6672 \newbox\verbbox
6673 \def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
6674 %
6675 \begingroup
6676 \catcode`\^^I=\active
6677 \gdef\tabexpand{%
6678 \catcode`\^^I=\active
6679 \def^^I{\leavevmode\egroup
6680 \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
6681 \divide\dimen\verbbox by\tabw
6682 \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
6683 \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw
6684 \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
6685 }%
6686 }
6687 \endgroup
6688
6689 % start the verbatim environment.
6690 \def\setupverbatim{%
6691 \let\nonarrowing = t%
6692 \nonfillstart
6693 \tt % easiest (and conventionally used) font for verbatim
6694 % The \leavevmode here is for blank lines. Otherwise, we would
6695 % never \starttabox and the \egroup would end verbatim mode.
6696 \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
6697 \tabexpand
6698 \setupmarkupstyle{verbatim}%
6699 % Respect line breaks,
6700 % print special symbols as themselves, and
6701 % make each space count.
6702 % Must do in this order:
6703 \obeylines \uncatcodespecials \sepspaces
6704 \everypar{\starttabbox}%
6705 }
6706
6707 % Do the @verb magic: verbatim text is quoted by unique
6708 % delimiter characters. Before first delimiter expect a
6709 % right brace, after last delimiter expect closing brace:
6710 %
6711 % \def\doverb'{'<char>#1<char>'}'{#1}
6712 %
6713 % [Knuth] p. 382; only eat outer {}
6714 \begingroup
6715 \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other
6716 \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
6717 \endgroup
6718 %
6719 \def\verb{\begingroup\setupverb\doverb}
6720 %
6721 %
6722 % Do the @verbatim magic: define the macro \doverbatim so that
6723 % the (first) argument ends when '@end verbatim' is reached, ie:
6724 %
6725 % \def\doverbatim#1@end verbatim{#1}
6726 %
6727 % For Texinfo it's a lot easier than for LaTeX,
6728 % because texinfo's \verbatim doesn't stop at '\end{verbatim}':
6729 % we need not redefine '\', '{' and '}'.
6730 %
6731 % Inspired by LaTeX's verbatim command set [latex.ltx]
6732 %
6733 \begingroup
6734 \catcode`\ =\active
6735 \obeylines %
6736 % ignore everything up to the first ^^M, that's the newline at the end
6737 % of the @verbatim input line itself. Otherwise we get an extra blank
6738 % line in the output.
6739 \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}%
6740 % We really want {...\end verbatim} in the body of the macro, but
6741 % without the active space; thus we have to use \xdef and \gobble.
6742 \endgroup
6743 %
6744 \envdef\verbatim{%
6745 \setupverbatim\doverbatim
6746 }
6747 \let\Everbatim = \afterenvbreak
6748
6749
6750 % @verbatiminclude FILE - insert text of file in verbatim environment.
6751 %
6752 \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
6753 %
6754 \def\doverbatiminclude#1{%
6755 {%
6756 \makevalueexpandable
6757 \setupverbatim
6758 \indexnofonts % Allow `@@' and other weird things in file names.
6759 \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
6760 \input #1
6761 \afterenvbreak
6762 }%
6763 }
6764
6765 % @copying ... @end copying.
6766 % Save the text away for @insertcopying later.
6767 %
6768 % We save the uninterpreted tokens, rather than creating a box.
6769 % Saving the text in a box would be much easier, but then all the
6770 % typesetting commands (@smallbook, font changes, etc.) have to be done
6771 % beforehand -- and a) we want @copying to be done first in the source
6772 % file; b) letting users define the frontmatter in as flexible order as
6773 % possible is very desirable.
6774 %
6775 \def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
6776 \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
6777 %
6778 \def\insertcopying{%
6779 \begingroup
6780 \parindent = 0pt % paragraph indentation looks wrong on title page
6781 \scanexp\copyingtext
6782 \endgroup
6783 }
6784
6785
6786 \message{defuns,}
6787 % @defun etc.
6788
6789 \newskip\defbodyindent \defbodyindent=.4in
6790 \newskip\defargsindent \defargsindent=50pt
6791 \newskip\deflastargmargin \deflastargmargin=18pt
6792 \newcount\defunpenalty
6793
6794 % Start the processing of @deffn:
6795 \def\startdefun{%
6796 \ifnum\lastpenalty<10000
6797 \medbreak
6798 \defunpenalty=10003 % Will keep this @deffn together with the
6799 % following @def command, see below.
6800 \else
6801 % If there are two @def commands in a row, we'll have a \nobreak,
6802 % which is there to keep the function description together with its
6803 % header. But if there's nothing but headers, we need to allow a
6804 % break somewhere. Check specifically for penalty 10002, inserted
6805 % by \printdefunline, instead of 10000, since the sectioning
6806 % commands also insert a nobreak penalty, and we don't want to allow
6807 % a break between a section heading and a defun.
6808 %
6809 % As a further refinement, we avoid "club" headers by signalling
6810 % with penalty of 10003 after the very first @deffn in the
6811 % sequence (see above), and penalty of 10002 after any following
6812 % @def command.
6813 \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi
6814 %
6815 % Similarly, after a section heading, do not allow a break.
6816 % But do insert the glue.
6817 \medskip % preceded by discardable penalty, so not a breakpoint
6818 \fi
6819 %
6820 \parindent=0in
6821 \advance\leftskip by \defbodyindent
6822 \exdentamount=\defbodyindent
6823 }
6824
6825 \def\dodefunx#1{%
6826 % First, check whether we are in the right environment:
6827 \checkenv#1%
6828 %
6829 % As above, allow line break if we have multiple x headers in a row.
6830 % It's not a great place, though.
6831 \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
6832 %
6833 % And now, it's time to reuse the body of the original defun:
6834 \expandafter\gobbledefun#1%
6835 }
6836 \def\gobbledefun#1\startdefun{}
6837
6838 % \printdefunline \deffnheader{text}
6839 %
6840 \def\printdefunline#1#2{%
6841 \begingroup
6842 % call \deffnheader:
6843 #1#2 \endheader
6844 % common ending:
6845 \interlinepenalty = 10000
6846 \advance\rightskip by 0pt plus 1fil\relax
6847 \endgraf
6848 \nobreak\vskip -\parskip
6849 \penalty\defunpenalty % signal to \startdefun and \dodefunx
6850 % Some of the @defun-type tags do not enable magic parentheses,
6851 % rendering the following check redundant. But we don't optimize.
6852 \checkparencounts
6853 \endgroup
6854 }
6855
6856 \def\Edefun{\endgraf\medbreak}
6857
6858 % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
6859 % the only thing remaining is to define \deffnheader.
6860 %
6861 \def\makedefun#1{%
6862 \expandafter\let\csname E#1\endcsname = \Edefun
6863 \edef\temp{\noexpand\domakedefun
6864 \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
6865 \temp
6866 }
6867
6868 % \domakedefun \deffn \deffnx \deffnheader
6869 %
6870 % Define \deffn and \deffnx, without parameters.
6871 % \deffnheader has to be defined explicitly.
6872 %
6873 \def\domakedefun#1#2#3{%
6874 \envdef#1{%
6875 \startdefun
6876 \doingtypefnfalse % distinguish typed functions from all else
6877 \parseargusing\activeparens{\printdefunline#3}%
6878 }%
6879 \def#2{\dodefunx#1}%
6880 \def#3%
6881 }
6882
6883 \newif\ifdoingtypefn % doing typed function?
6884 \newif\ifrettypeownline % typeset return type on its own line?
6885
6886 % @deftypefnnewline on|off says whether the return type of typed functions
6887 % are printed on their own line. This affects @deftypefn, @deftypefun,
6888 % @deftypeop, and @deftypemethod.
6889 %
6890 \parseargdef\deftypefnnewline{%
6891 \def\temp{#1}%
6892 \ifx\temp\onword
6893 \expandafter\let\csname SETtxideftypefnnl\endcsname
6894 = \empty
6895 \else\ifx\temp\offword
6896 \expandafter\let\csname SETtxideftypefnnl\endcsname
6897 = \relax
6898 \else
6899 \errhelp = \EMsimple
6900 \errmessage{Unknown @txideftypefnnl value `\temp',
6901 must be on|off}%
6902 \fi\fi
6903 }
6904
6905 % Untyped functions:
6906
6907 % @deffn category name args
6908 \makedefun{deffn}{\deffngeneral{}}
6909
6910 % @deffn category class name args
6911 \makedefun{defop}#1 {\defopon{#1\ \putwordon}}
6912
6913 % \defopon {category on}class name args
6914 \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
6915
6916 % \deffngeneral {subind}category name args
6917 %
6918 \def\deffngeneral#1#2 #3 #4\endheader{%
6919 % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
6920 \dosubind{fn}{\code{#3}}{#1}%
6921 \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
6922 }
6923
6924 % Typed functions:
6925
6926 % @deftypefn category type name args
6927 \makedefun{deftypefn}{\deftypefngeneral{}}
6928
6929 % @deftypeop category class type name args
6930 \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}}
6931
6932 % \deftypeopon {category on}class type name args
6933 \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
6934
6935 % \deftypefngeneral {subind}category type name args
6936 %
6937 \def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
6938 \dosubind{fn}{\code{#4}}{#1}%
6939 \doingtypefntrue
6940 \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
6941 }
6942
6943 % Typed variables:
6944
6945 % @deftypevr category type var args
6946 \makedefun{deftypevr}{\deftypecvgeneral{}}
6947
6948 % @deftypecv category class type var args
6949 \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}}
6950
6951 % \deftypecvof {category of}class type var args
6952 \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} }
6953
6954 % \deftypecvgeneral {subind}category type var args
6955 %
6956 \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
6957 \dosubind{vr}{\code{#4}}{#1}%
6958 \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
6959 }
6960
6961 % Untyped variables:
6962
6963 % @defvr category var args
6964 \makedefun{defvr}#1 {\deftypevrheader{#1} {} }
6965
6966 % @defcv category class var args
6967 \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}}
6968
6969 % \defcvof {category of}class var args
6970 \def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
6971
6972 % Types:
6973
6974 % @deftp category name args
6975 \makedefun{deftp}#1 #2 #3\endheader{%
6976 \doind{tp}{\code{#2}}%
6977 \defname{#1}{}{#2}\defunargs{#3\unskip}%
6978 }
6979
6980 % Remaining @defun-like shortcuts:
6981 \makedefun{defun}{\deffnheader{\putwordDeffunc} }
6982 \makedefun{defmac}{\deffnheader{\putwordDefmac} }
6983 \makedefun{defspec}{\deffnheader{\putwordDefspec} }
6984 \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} }
6985 \makedefun{defvar}{\defvrheader{\putwordDefvar} }
6986 \makedefun{defopt}{\defvrheader{\putwordDefopt} }
6987 \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
6988 \makedefun{defmethod}{\defopon\putwordMethodon}
6989 \makedefun{deftypemethod}{\deftypeopon\putwordMethodon}
6990 \makedefun{defivar}{\defcvof\putwordInstanceVariableof}
6991 \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof}
6992
6993 % \defname, which formats the name of the @def (not the args).
6994 % #1 is the category, such as "Function".
6995 % #2 is the return type, if any.
6996 % #3 is the function name.
6997 %
6998 % We are followed by (but not passed) the arguments, if any.
6999 %
7000 \def\defname#1#2#3{%
7001 \par
7002 % Get the values of \leftskip and \rightskip as they were outside the @def...
7003 \advance\leftskip by -\defbodyindent
7004 %
7005 % Determine if we are typesetting the return type of a typed function
7006 % on a line by itself.
7007 \rettypeownlinefalse
7008 \ifdoingtypefn % doing a typed function specifically?
7009 % then check user option for putting return type on its own line:
7010 \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
7011 \rettypeownlinetrue
7012 \fi
7013 \fi
7014 %
7015 % How we'll format the category name. Putting it in brackets helps
7016 % distinguish it from the body text that may end up on the next line
7017 % just below it.
7018 \def\temp{#1}%
7019 \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
7020 %
7021 % Figure out line sizes for the paragraph shape. We'll always have at
7022 % least two.
7023 \tempnum = 2
7024 %
7025 % The first line needs space for \box0; but if \rightskip is nonzero,
7026 % we need only space for the part of \box0 which exceeds it:
7027 \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
7028 %
7029 % If doing a return type on its own line, we'll have another line.
7030 \ifrettypeownline
7031 \advance\tempnum by 1
7032 \def\maybeshapeline{0in \hsize}%
7033 \else
7034 \def\maybeshapeline{}%
7035 \fi
7036 %
7037 % The continuations:
7038 \dimen2=\hsize \advance\dimen2 by -\defargsindent
7039 %
7040 % The final paragraph shape:
7041 \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2
7042 %
7043 % Put the category name at the right margin.
7044 \noindent
7045 \hbox to 0pt{%
7046 \hfil\box0 \kern-\hsize
7047 % \hsize has to be shortened this way:
7048 \kern\leftskip
7049 % Intentionally do not respect \rightskip, since we need the space.
7050 }%
7051 %
7052 % Allow all lines to be underfull without complaint:
7053 \tolerance=10000 \hbadness=10000
7054 \exdentamount=\defbodyindent
7055 {%
7056 % defun fonts. We use typewriter by default (used to be bold) because:
7057 % . we're printing identifiers, they should be in tt in principle.
7058 % . in languages with many accents, such as Czech or French, it's
7059 % common to leave accents off identifiers. The result looks ok in
7060 % tt, but exceedingly strange in rm.
7061 % . we don't want -- and --- to be treated as ligatures.
7062 % . this still does not fix the ?` and !` ligatures, but so far no
7063 % one has made identifiers using them :).
7064 \df \tt
7065 \def\temp{#2}% text of the return type
7066 \ifx\temp\empty\else
7067 \tclose{\temp}% typeset the return type
7068 \ifrettypeownline
7069 % put return type on its own line; prohibit line break following:
7070 \hfil\vadjust{\nobreak}\break
7071 \else
7072 \space % type on same line, so just followed by a space
7073 \fi
7074 \fi % no return type
7075 #3% output function name
7076 }%
7077 {\rm\enskip}% hskip 0.5 em of \tenrm
7078 %
7079 \boldbrax
7080 % arguments will be output next, if any.
7081 }
7082
7083 % Print arguments in slanted roman (not ttsl), inconsistently with using
7084 % tt for the name. This is because literal text is sometimes needed in
7085 % the argument list (groff manual), and ttsl and tt are not very
7086 % distinguishable. Prevent hyphenation at `-' chars.
7087 %
7088 \def\defunargs#1{%
7089 % use sl by default (not ttsl),
7090 % tt for the names.
7091 \df \sl \hyphenchar\font=0
7092 %
7093 % On the other hand, if an argument has two dashes (for instance), we
7094 % want a way to get ttsl. We used to recommend @var for that, so
7095 % leave the code in, but it's strange for @var to lead to typewriter.
7096 % Nowadays we recommend @code, since the difference between a ttsl hyphen
7097 % and a tt hyphen is pretty tiny. @code also disables ?` !`.
7098 \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
7099 #1%
7100 \sl\hyphenchar\font=45
7101 }
7102
7103 % We want ()&[] to print specially on the defun line.
7104 %
7105 \def\activeparens{%
7106 \catcode`\(=\active \catcode`\)=\active
7107 \catcode`\[=\active \catcode`\]=\active
7108 \catcode`\&=\active
7109 }
7110
7111 % Make control sequences which act like normal parenthesis chars.
7112 \let\lparen = ( \let\rparen = )
7113
7114 % Be sure that we always have a definition for `(', etc. For example,
7115 % if the fn name has parens in it, \boldbrax will not be in effect yet,
7116 % so TeX would otherwise complain about undefined control sequence.
7117 {
7118 \activeparens
7119 \global\let(=\lparen \global\let)=\rparen
7120 \global\let[=\lbrack \global\let]=\rbrack
7121 \global\let& = \&
7122
7123 \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
7124 \gdef\magicamp{\let&=\amprm}
7125 }
7126
7127 \newcount\parencount
7128
7129 % If we encounter &foo, then turn on ()-hacking afterwards
7130 \newif\ifampseen
7131 \def\amprm#1 {\ampseentrue{\bf\&#1 }}
7132
7133 \def\parenfont{%
7134 \ifampseen
7135 % At the first level, print parens in roman,
7136 % otherwise use the default font.
7137 \ifnum \parencount=1 \rm \fi
7138 \else
7139 % The \sf parens (in \boldbrax) actually are a little bolder than
7140 % the contained text. This is especially needed for [ and ] .
7141 \sf
7142 \fi
7143 }
7144 \def\infirstlevel#1{%
7145 \ifampseen
7146 \ifnum\parencount=1
7147 #1%
7148 \fi
7149 \fi
7150 }
7151 \def\bfafterword#1 {#1 \bf}
7152
7153 \def\opnr{%
7154 \global\advance\parencount by 1
7155 {\parenfont(}%
7156 \infirstlevel \bfafterword
7157 }
7158 \def\clnr{%
7159 {\parenfont)}%
7160 \infirstlevel \sl
7161 \global\advance\parencount by -1
7162 }
7163
7164 \newcount\brackcount
7165 \def\lbrb{%
7166 \global\advance\brackcount by 1
7167 {\bf[}%
7168 }
7169 \def\rbrb{%
7170 {\bf]}%
7171 \global\advance\brackcount by -1
7172 }
7173
7174 \def\checkparencounts{%
7175 \ifnum\parencount=0 \else \badparencount \fi
7176 \ifnum\brackcount=0 \else \badbrackcount \fi
7177 }
7178 % these should not use \errmessage; the glibc manual, at least, actually
7179 % has such constructs (when documenting function pointers).
7180 \def\badparencount{%
7181 \message{Warning: unbalanced parentheses in @def...}%
7182 \global\parencount=0
7183 }
7184 \def\badbrackcount{%
7185 \message{Warning: unbalanced square brackets in @def...}%
7186 \global\brackcount=0
7187 }
7188
7189
7190 \message{macros,}
7191 % @macro.
7192
7193 % To do this right we need a feature of e-TeX, \scantokens,
7194 % which we arrange to emulate with a temporary file in ordinary TeX.
7195 \ifx\eTeXversion\thisisundefined
7196 \newwrite\macscribble
7197 \def\scantokens#1{%
7198 \toks0={#1}%
7199 \immediate\openout\macscribble=\jobname.tmp
7200 \immediate\write\macscribble{\the\toks0}%
7201 \immediate\closeout\macscribble
7202 \input \jobname.tmp
7203 }
7204 \fi
7205
7206 \def\scanmacro#1{\begingroup
7207 \newlinechar`\^^M
7208 \let\xeatspaces\eatspaces
7209 %
7210 % Undo catcode changes of \startcontents and \doprintindex
7211 % When called from @insertcopying or (short)caption, we need active
7212 % backslash to get it printed correctly. Previously, we had
7213 % \catcode`\\=\other instead. We'll see whether a problem appears
7214 % with macro expansion. --kasal, 19aug04
7215 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
7216 %
7217 % ... and for \example:
7218 \spaceisspace
7219 %
7220 % The \empty here causes a following catcode 5 newline to be eaten as
7221 % part of reading whitespace after a control sequence. It does not
7222 % eat a catcode 13 newline. There's no good way to handle the two
7223 % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
7224 % would then have different behavior). See the Macro Details node in
7225 % the manual for the workaround we recommend for macros and
7226 % line-oriented commands.
7227 %
7228 \scantokens{#1\empty}%
7229 \endgroup}
7230
7231 \def\scanexp#1{%
7232 \edef\temp{\noexpand\scanmacro{#1}}%
7233 \temp
7234 }
7235
7236 \newcount\paramno % Count of parameters
7237 \newtoks\macname % Macro name
7238 \newif\ifrecursive % Is it recursive?
7239
7240 % List of all defined macros in the form
7241 % \definedummyword\macro1\definedummyword\macro2...
7242 % Currently is also contains all @aliases; the list can be split
7243 % if there is a need.
7244 \def\macrolist{}
7245
7246 % Add the macro to \macrolist
7247 \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
7248 \def\addtomacrolistxxx#1{%
7249 \toks0 = \expandafter{\macrolist\definedummyword#1}%
7250 \xdef\macrolist{\the\toks0}%
7251 }
7252
7253 % Utility routines.
7254 % This does \let #1 = #2, with \csnames; that is,
7255 % \let \csname#1\endcsname = \csname#2\endcsname
7256 % (except of course we have to play expansion games).
7257 %
7258 \def\cslet#1#2{%
7259 \expandafter\let
7260 \csname#1\expandafter\endcsname
7261 \csname#2\endcsname
7262 }
7263
7264 % Trim leading and trailing spaces off a string.
7265 % Concepts from aro-bend problem 15 (see CTAN).
7266 {\catcode`\@=11
7267 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
7268 \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
7269 \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
7270 \def\unbrace#1{#1}
7271 \unbrace{\gdef\trim@@@ #1 } #2@{#1}
7272 }
7273
7274 % Trim a single trailing ^^M off a string.
7275 {\catcode`\^^M=\other \catcode`\Q=3%
7276 \gdef\eatcr #1{\eatcra #1Q^^MQ}%
7277 \gdef\eatcra#1^^MQ{\eatcrb#1Q}%
7278 \gdef\eatcrb#1Q#2Q{#1}%
7279 }
7280
7281 % Macro bodies are absorbed as an argument in a context where
7282 % all characters are catcode 10, 11 or 12, except \ which is active
7283 % (as in normal texinfo). It is necessary to change the definition of \
7284 % to recognize macro arguments; this is the job of \mbodybackslash.
7285 %
7286 % Non-ASCII encodings make 8-bit characters active, so un-activate
7287 % them to avoid their expansion. Must do this non-globally, to
7288 % confine the change to the current group.
7289 %
7290 % It's necessary to have hard CRs when the macro is executed. This is
7291 % done by making ^^M (\endlinechar) catcode 12 when reading the macro
7292 % body, and then making it the \newlinechar in \scanmacro.
7293 %
7294 \def\scanctxt{% used as subroutine
7295 \catcode`\"=\other
7296 \catcode`\+=\other
7297 \catcode`\<=\other
7298 \catcode`\>=\other
7299 \catcode`\@=\other
7300 \catcode`\^=\other
7301 \catcode`\_=\other
7302 \catcode`\|=\other
7303 \catcode`\~=\other
7304 \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
7305 }
7306
7307 \def\scanargctxt{% used for copying and captions, not macros.
7308 \scanctxt
7309 \catcode`\\=\other
7310 \catcode`\^^M=\other
7311 }
7312
7313 \def\macrobodyctxt{% used for @macro definitions
7314 \scanctxt
7315 \catcode`\{=\other
7316 \catcode`\}=\other
7317 \catcode`\^^M=\other
7318 \usembodybackslash
7319 }
7320
7321 \def\macroargctxt{% used when scanning invocations
7322 \scanctxt
7323 \catcode`\\=0
7324 }
7325 % why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes"
7326 % for the single characters \ { }. Thus, we end up with the "commands"
7327 % that would be written @\ @{ @} in a Texinfo document.
7328 %
7329 % We already have @{ and @}. For @\, we define it here, and only for
7330 % this purpose, to produce a typewriter backslash (so, the @\ that we
7331 % define for @math can't be used with @macro calls):
7332 %
7333 \def\\{\normalbackslash}%
7334 %
7335 % We would like to do this for \, too, since that is what makeinfo does.
7336 % But it is not possible, because Texinfo already has a command @, for a
7337 % cedilla accent. Documents must use @comma{} instead.
7338 %
7339 % \anythingelse will almost certainly be an error of some kind.
7340
7341
7342 % \mbodybackslash is the definition of \ in @macro bodies.
7343 % It maps \foo\ => \csname macarg.foo\endcsname => #N
7344 % where N is the macro parameter number.
7345 % We define \csname macarg.\endcsname to be \realbackslash, so
7346 % \\ in macro replacement text gets you a backslash.
7347 %
7348 {\catcode`@=0 @catcode`@\=@active
7349 @gdef@usembodybackslash{@let\=@mbodybackslash}
7350 @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
7351 }
7352 \expandafter\def\csname macarg.\endcsname{\realbackslash}
7353
7354 \def\margbackslash#1{\char`\#1 }
7355
7356 \def\macro{\recursivefalse\parsearg\macroxxx}
7357 \def\rmacro{\recursivetrue\parsearg\macroxxx}
7358
7359 \def\macroxxx#1{%
7360 \getargs{#1}% now \macname is the macname and \argl the arglist
7361 \ifx\argl\empty % no arguments
7362 \paramno=0\relax
7363 \else
7364 \expandafter\parsemargdef \argl;%
7365 \if\paramno>256\relax
7366 \ifx\eTeXversion\thisisundefined
7367 \errhelp = \EMsimple
7368 \errmessage{You need eTeX to compile a file with macros with more than 256 arguments}
7369 \fi
7370 \fi
7371 \fi
7372 \if1\csname ismacro.\the\macname\endcsname
7373 \message{Warning: redefining \the\macname}%
7374 \else
7375 \expandafter\ifx\csname \the\macname\endcsname \relax
7376 \else \errmessage{Macro name \the\macname\space already defined}\fi
7377 \global\cslet{macsave.\the\macname}{\the\macname}%
7378 \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
7379 \addtomacrolist{\the\macname}%
7380 \fi
7381 \begingroup \macrobodyctxt
7382 \ifrecursive \expandafter\parsermacbody
7383 \else \expandafter\parsemacbody
7384 \fi}
7385
7386 \parseargdef\unmacro{%
7387 \if1\csname ismacro.#1\endcsname
7388 \global\cslet{#1}{macsave.#1}%
7389 \global\expandafter\let \csname ismacro.#1\endcsname=0%
7390 % Remove the macro name from \macrolist:
7391 \begingroup
7392 \expandafter\let\csname#1\endcsname \relax
7393 \let\definedummyword\unmacrodo
7394 \xdef\macrolist{\macrolist}%
7395 \endgroup
7396 \else
7397 \errmessage{Macro #1 not defined}%
7398 \fi
7399 }
7400
7401 % Called by \do from \dounmacro on each macro. The idea is to omit any
7402 % macro definitions that have been changed to \relax.
7403 %
7404 \def\unmacrodo#1{%
7405 \ifx #1\relax
7406 % remove this
7407 \else
7408 \noexpand\definedummyword \noexpand#1%
7409 \fi
7410 }
7411
7412 % This makes use of the obscure feature that if the last token of a
7413 % <parameter list> is #, then the preceding argument is delimited by
7414 % an opening brace, and that opening brace is not consumed.
7415 \def\getargs#1{\getargsxxx#1{}}
7416 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
7417 \def\getmacname#1 #2\relax{\macname={#1}}
7418 \def\getmacargs#1{\def\argl{#1}}
7419
7420 % For macro processing make @ a letter so that we can make Texinfo private macro names.
7421 \edef\texiatcatcode{\the\catcode`\@}
7422 \catcode `@=11\relax
7423
7424 % Parse the optional {params} list. Set up \paramno and \paramlist
7425 % so \defmacro knows what to do. Define \macarg.BLAH for each BLAH
7426 % in the params list to some hook where the argument si to be expanded. If
7427 % there are less than 10 arguments that hook is to be replaced by ##N where N
7428 % is the position in that list, that is to say the macro arguments are to be
7429 % defined `a la TeX in the macro body.
7430 %
7431 % That gets used by \mbodybackslash (above).
7432 %
7433 % We need to get `macro parameter char #' into several definitions.
7434 % The technique used is stolen from LaTeX: let \hash be something
7435 % unexpandable, insert that wherever you need a #, and then redefine
7436 % it to # just before using the token list produced.
7437 %
7438 % The same technique is used to protect \eatspaces till just before
7439 % the macro is used.
7440 %
7441 % If there are 10 or more arguments, a different technique is used, where the
7442 % hook remains in the body, and when macro is to be expanded the body is
7443 % processed again to replace the arguments.
7444 %
7445 % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
7446 % argument N value and then \edef the body (nothing else will expand because of
7447 % the catcode regime underwhich the body was input).
7448 %
7449 % If you compile with TeX (not eTeX), and you have macros with 10 or more
7450 % arguments, you need that no macro has more than 256 arguments, otherwise an
7451 % error is produced.
7452 \def\parsemargdef#1;{%
7453 \paramno=0\def\paramlist{}%
7454 \let\hash\relax
7455 \let\xeatspaces\relax
7456 \parsemargdefxxx#1,;,%
7457 % In case that there are 10 or more arguments we parse again the arguments
7458 % list to set new definitions for the \macarg.BLAH macros corresponding to
7459 % each BLAH argument. It was anyhow needed to parse already once this list
7460 % in order to count the arguments, and as macros with at most 9 arguments
7461 % are by far more frequent than macro with 10 or more arguments, defining
7462 % twice the \macarg.BLAH macros does not cost too much processing power.
7463 \ifnum\paramno<10\relax\else
7464 \paramno0\relax
7465 \parsemmanyargdef@@#1,;,% 10 or more arguments
7466 \fi
7467 }
7468 \def\parsemargdefxxx#1,{%
7469 \if#1;\let\next=\relax
7470 \else \let\next=\parsemargdefxxx
7471 \advance\paramno by 1
7472 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
7473 {\xeatspaces{\hash\the\paramno}}%
7474 \edef\paramlist{\paramlist\hash\the\paramno,}%
7475 \fi\next}
7476
7477 \def\parsemmanyargdef@@#1,{%
7478 \if#1;\let\next=\relax
7479 \else
7480 \let\next=\parsemmanyargdef@@
7481 \edef\tempb{\eatspaces{#1}}%
7482 \expandafter\def\expandafter\tempa
7483 \expandafter{\csname macarg.\tempb\endcsname}%
7484 % Note that we need some extra \noexpand\noexpand, this is because we
7485 % don't want \the to be expanded in the \parsermacbody as it uses an
7486 % \xdef .
7487 \expandafter\edef\tempa
7488 {\noexpand\noexpand\noexpand\the\toks\the\paramno}%
7489 \advance\paramno by 1\relax
7490 \fi\next}
7491
7492 % These two commands read recursive and nonrecursive macro bodies.
7493 % (They're different since rec and nonrec macros end differently.)
7494 %
7495
7496 \catcode `\@\texiatcatcode
7497 \long\def\parsemacbody#1@end macro%
7498 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
7499 \long\def\parsermacbody#1@end rmacro%
7500 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
7501 \catcode `\@=11\relax
7502
7503 \let\endargs@\relax
7504 \let\nil@\relax
7505 \def\nilm@{\nil@}%
7506 \long\def\nillm@{\nil@}%
7507
7508 % This macro is expanded during the Texinfo macro expansion, not during its
7509 % definition. It gets all the arguments values and assigns them to macros
7510 % macarg.ARGNAME
7511 %
7512 % #1 is the macro name
7513 % #2 is the list of argument names
7514 % #3 is the list of argument values
7515 \def\getargvals@#1#2#3{%
7516 \def\macargdeflist@{}%
7517 \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion.
7518 \def\paramlist{#2,\nil@}%
7519 \def\macroname{#1}%
7520 \begingroup
7521 \macroargctxt
7522 \def\argvaluelist{#3,\nil@}%
7523 \def\@tempa{#3}%
7524 \ifx\@tempa\empty
7525 \setemptyargvalues@
7526 \else
7527 \getargvals@@
7528 \fi
7529 }
7530
7531 %
7532 \def\getargvals@@{%
7533 \ifx\paramlist\nilm@
7534 % Some sanity check needed here that \argvaluelist is also empty.
7535 \ifx\argvaluelist\nillm@
7536 \else
7537 \errhelp = \EMsimple
7538 \errmessage{Too many arguments in macro `\macroname'!}%
7539 \fi
7540 \let\next\macargexpandinbody@
7541 \else
7542 \ifx\argvaluelist\nillm@
7543 % No more arguments values passed to macro. Set remaining named-arg
7544 % macros to empty.
7545 \let\next\setemptyargvalues@
7546 \else
7547 % pop current arg name into \@tempb
7548 \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}%
7549 \expandafter\@tempa\expandafter{\paramlist}%
7550 % pop current argument value into \@tempc
7551 \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}%
7552 \expandafter\@tempa\expandafter{\argvaluelist}%
7553 % Here \@tempb is the current arg name and \@tempc is the current arg value.
7554 % First place the new argument macro definition into \@tempd
7555 \expandafter\macname\expandafter{\@tempc}%
7556 \expandafter\let\csname macarg.\@tempb\endcsname\relax
7557 \expandafter\def\expandafter\@tempe\expandafter{%
7558 \csname macarg.\@tempb\endcsname}%
7559 \edef\@tempd{\long\def\@tempe{\the\macname}}%
7560 \push@\@tempd\macargdeflist@
7561 \let\next\getargvals@@
7562 \fi
7563 \fi
7564 \next
7565 }
7566
7567 \def\push@#1#2{%
7568 \expandafter\expandafter\expandafter\def
7569 \expandafter\expandafter\expandafter#2%
7570 \expandafter\expandafter\expandafter{%
7571 \expandafter#1#2}%
7572 }
7573
7574 % Replace arguments by their values in the macro body, and place the result
7575 % in macro \@tempa
7576 \def\macvalstoargs@{%
7577 % To do this we use the property that token registers that are \the'ed
7578 % within an \edef expand only once. So we are going to place all argument
7579 % values into respective token registers.
7580 %
7581 % First we save the token context, and initialize argument numbering.
7582 \begingroup
7583 \paramno0\relax
7584 % Then, for each argument number #N, we place the corresponding argument
7585 % value into a new token list register \toks#N
7586 \expandafter\putargsintokens@\saveparamlist@,;,%
7587 % Then, we expand the body so that argument are replaced by their
7588 % values. The trick for values not to be expanded themselves is that they
7589 % are within tokens and that tokens expand only once in an \edef .
7590 \edef\@tempc{\csname mac.\macroname .body\endcsname}%
7591 % Now we restore the token stack pointer to free the token list registers
7592 % which we have used, but we make sure that expanded body is saved after
7593 % group.
7594 \expandafter
7595 \endgroup
7596 \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
7597 }
7598
7599 \def\macargexpandinbody@{%
7600 %% Define the named-macro outside of this group and then close this group.
7601 \expandafter
7602 \endgroup
7603 \macargdeflist@
7604 % First the replace in body the macro arguments by their values, the result
7605 % is in \@tempa .
7606 \macvalstoargs@
7607 % Then we point at the \norecurse or \gobble (for recursive) macro value
7608 % with \@tempb .
7609 \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname
7610 % Depending on whether it is recursive or not, we need some tailing
7611 % \egroup .
7612 \ifx\@tempb\gobble
7613 \let\@tempc\relax
7614 \else
7615 \let\@tempc\egroup
7616 \fi
7617 % And now we do the real job:
7618 \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}%
7619 \@tempd
7620 }
7621
7622 \def\putargsintokens@#1,{%
7623 \if#1;\let\next\relax
7624 \else
7625 \let\next\putargsintokens@
7626 % First we allocate the new token list register, and give it a temporary
7627 % alias \@tempb .
7628 \toksdef\@tempb\the\paramno
7629 % Then we place the argument value into that token list register.
7630 \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname
7631 \expandafter\@tempb\expandafter{\@tempa}%
7632 \advance\paramno by 1\relax
7633 \fi
7634 \next
7635 }
7636
7637 % Save the token stack pointer into macro #1
7638 \def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}}
7639 % Restore the token stack pointer from number in macro #1
7640 \def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax}
7641 % newtoks that can be used non \outer .
7642 \def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi}
7643
7644 % Tailing missing arguments are set to empty
7645 \def\setemptyargvalues@{%
7646 \ifx\paramlist\nilm@
7647 \let\next\macargexpandinbody@
7648 \else
7649 \expandafter\setemptyargvaluesparser@\paramlist\endargs@
7650 \let\next\setemptyargvalues@
7651 \fi
7652 \next
7653 }
7654
7655 \def\setemptyargvaluesparser@#1,#2\endargs@{%
7656 \expandafter\def\expandafter\@tempa\expandafter{%
7657 \expandafter\def\csname macarg.#1\endcsname{}}%
7658 \push@\@tempa\macargdeflist@
7659 \def\paramlist{#2}%
7660 }
7661
7662 % #1 is the element target macro
7663 % #2 is the list macro
7664 % #3,#4\endargs@ is the list value
7665 \def\pop@#1#2#3,#4\endargs@{%
7666 \def#1{#3}%
7667 \def#2{#4}%
7668 }
7669 \long\def\longpop@#1#2#3,#4\endargs@{%
7670 \long\def#1{#3}%
7671 \long\def#2{#4}%
7672 }
7673
7674 % This defines a Texinfo @macro. There are eight cases: recursive and
7675 % nonrecursive macros of zero, one, up to nine, and many arguments.
7676 % Much magic with \expandafter here.
7677 % \xdef is used so that macro definitions will survive the file
7678 % they're defined in; @include reads the file inside a group.
7679 %
7680 \def\defmacro{%
7681 \let\hash=##% convert placeholders to macro parameter chars
7682 \ifrecursive
7683 \ifcase\paramno
7684 % 0
7685 \expandafter\xdef\csname\the\macname\endcsname{%
7686 \noexpand\scanmacro{\temp}}%
7687 \or % 1
7688 \expandafter\xdef\csname\the\macname\endcsname{%
7689 \bgroup\noexpand\macroargctxt
7690 \noexpand\braceorline
7691 \expandafter\noexpand\csname\the\macname xxx\endcsname}%
7692 \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
7693 \egroup\noexpand\scanmacro{\temp}}%
7694 \else
7695 \ifnum\paramno<10\relax % at most 9
7696 \expandafter\xdef\csname\the\macname\endcsname{%
7697 \bgroup\noexpand\macroargctxt
7698 \noexpand\csname\the\macname xx\endcsname}%
7699 \expandafter\xdef\csname\the\macname xx\endcsname##1{%
7700 \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
7701 \expandafter\expandafter
7702 \expandafter\xdef
7703 \expandafter\expandafter
7704 \csname\the\macname xxx\endcsname
7705 \paramlist{\egroup\noexpand\scanmacro{\temp}}%
7706 \else % 10 or more
7707 \expandafter\xdef\csname\the\macname\endcsname{%
7708 \noexpand\getargvals@{\the\macname}{\argl}%
7709 }%
7710 \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
7711 \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
7712 \fi
7713 \fi
7714 \else
7715 \ifcase\paramno
7716 % 0
7717 \expandafter\xdef\csname\the\macname\endcsname{%
7718 \noexpand\norecurse{\the\macname}%
7719 \noexpand\scanmacro{\temp}\egroup}%
7720 \or % 1
7721 \expandafter\xdef\csname\the\macname\endcsname{%
7722 \bgroup\noexpand\macroargctxt
7723 \noexpand\braceorline
7724 \expandafter\noexpand\csname\the\macname xxx\endcsname}%
7725 \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
7726 \egroup
7727 \noexpand\norecurse{\the\macname}%
7728 \noexpand\scanmacro{\temp}\egroup}%
7729 \else % at most 9
7730 \ifnum\paramno<10\relax
7731 \expandafter\xdef\csname\the\macname\endcsname{%
7732 \bgroup\noexpand\macroargctxt
7733 \expandafter\noexpand\csname\the\macname xx\endcsname}%
7734 \expandafter\xdef\csname\the\macname xx\endcsname##1{%
7735 \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
7736 \expandafter\expandafter
7737 \expandafter\xdef
7738 \expandafter\expandafter
7739 \csname\the\macname xxx\endcsname
7740 \paramlist{%
7741 \egroup
7742 \noexpand\norecurse{\the\macname}%
7743 \noexpand\scanmacro{\temp}\egroup}%
7744 \else % 10 or more:
7745 \expandafter\xdef\csname\the\macname\endcsname{%
7746 \noexpand\getargvals@{\the\macname}{\argl}%
7747 }%
7748 \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
7749 \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse
7750 \fi
7751 \fi
7752 \fi}
7753
7754 \catcode `\@\texiatcatcode\relax
7755
7756 \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
7757
7758 % \braceorline decides whether the next nonwhitespace character is a
7759 % {. If so it reads up to the closing }, if not, it reads the whole
7760 % line. Whatever was read is then fed to the next control sequence
7761 % as an argument (by \parsebrace or \parsearg).
7762 %
7763 \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
7764 \def\braceorlinexxx{%
7765 \ifx\nchar\bgroup\else
7766 \expandafter\parsearg
7767 \fi \macnamexxx}
7768
7769
7770 % @alias.
7771 % We need some trickery to remove the optional spaces around the equal
7772 % sign. Make them active and then expand them all to nothing.
7773 %
7774 \def\alias{\parseargusing\obeyspaces\aliasxxx}
7775 \def\aliasxxx #1{\aliasyyy#1\relax}
7776 \def\aliasyyy #1=#2\relax{%
7777 {%
7778 \expandafter\let\obeyedspace=\empty
7779 \addtomacrolist{#1}%
7780 \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
7781 }%
7782 \next
7783 }
7784
7785
7786 \message{cross references,}
7787
7788 \newwrite\auxfile
7789 \newif\ifhavexrefs % True if xref values are known.
7790 \newif\ifwarnedxrefs % True if we warned once that they aren't known.
7791
7792 % @inforef is relatively simple.
7793 \def\inforef #1{\inforefzzz #1,,,,**}
7794 \def\inforefzzz #1,#2,#3,#4**{%
7795 \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
7796 node \samp{\ignorespaces#1{}}}
7797
7798 % @node's only job in TeX is to define \lastnode, which is used in
7799 % cross-references. The @node line might or might not have commas, and
7800 % might or might not have spaces before the first comma, like:
7801 % @node foo , bar , ...
7802 % We don't want such trailing spaces in the node name.
7803 %
7804 \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse}
7805 %
7806 % also remove a trailing comma, in case of something like this:
7807 % @node Help-Cross, , , Cross-refs
7808 \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
7809 \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}}
7810
7811 \let\nwnode=\node
7812 \let\lastnode=\empty
7813
7814 % Write a cross-reference definition for the current node. #1 is the
7815 % type (Ynumbered, Yappendix, Ynothing).
7816 %
7817 \def\donoderef#1{%
7818 \ifx\lastnode\empty\else
7819 \setref{\lastnode}{#1}%
7820 \global\let\lastnode=\empty
7821 \fi
7822 }
7823
7824 % @anchor{NAME} -- define xref target at arbitrary point.
7825 %
7826 \newcount\savesfregister
7827 %
7828 \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
7829 \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
7830 \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
7831
7832 % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
7833 % anchor), which consists of three parts:
7834 % 1) NAME-title - the current sectioning name taken from \lastsection,
7835 % or the anchor name.
7836 % 2) NAME-snt - section number and type, passed as the SNT arg, or
7837 % empty for anchors.
7838 % 3) NAME-pg - the page number.
7839 %
7840 % This is called from \donoderef, \anchor, and \dofloat. In the case of
7841 % floats, there is an additional part, which is not written here:
7842 % 4) NAME-lof - the text as it should appear in a @listoffloats.
7843 %
7844 \def\setref#1#2{%
7845 \pdfmkdest{#1}%
7846 \iflinks
7847 {%
7848 \atdummies % preserve commands, but don't expand them
7849 \edef\writexrdef##1##2{%
7850 \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
7851 ##1}{##2}}% these are parameters of \writexrdef
7852 }%
7853 \toks0 = \expandafter{\lastsection}%
7854 \immediate \writexrdef{title}{\the\toks0 }%
7855 \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
7856 \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
7857 }%
7858 \fi
7859 }
7860
7861 % @xrefautosectiontitle on|off says whether @section(ing) names are used
7862 % automatically in xrefs, if the third arg is not explicitly specified.
7863 % This was provided as a "secret" @set xref-automatic-section-title
7864 % variable, now it's official.
7865 %
7866 \parseargdef\xrefautomaticsectiontitle{%
7867 \def\temp{#1}%
7868 \ifx\temp\onword
7869 \expandafter\let\csname SETxref-automatic-section-title\endcsname
7870 = \empty
7871 \else\ifx\temp\offword
7872 \expandafter\let\csname SETxref-automatic-section-title\endcsname
7873 = \relax
7874 \else
7875 \errhelp = \EMsimple
7876 \errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
7877 must be on|off}%
7878 \fi\fi
7879 }
7880
7881 %
7882 % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
7883 % the node name, #2 the name of the Info cross-reference, #3 the printed
7884 % node name, #4 the name of the Info file, #5 the name of the printed
7885 % manual. All but the node name can be omitted.
7886 %
7887 \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
7888 \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
7889 \def\ref#1{\xrefX[#1,,,,,,,]}
7890 %
7891 \newbox\toprefbox
7892 \newbox\printedrefnamebox
7893 \newbox\infofilenamebox
7894 \newbox\printedmanualbox
7895 %
7896 \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
7897 \unsepspaces
7898 %
7899 % Get args without leading/trailing spaces.
7900 \def\printedrefname{\ignorespaces #3}%
7901 \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}%
7902 %
7903 \def\infofilename{\ignorespaces #4}%
7904 \setbox\infofilenamebox = \hbox{\infofilename\unskip}%
7905 %
7906 \def\printedmanual{\ignorespaces #5}%
7907 \setbox\printedmanualbox = \hbox{\printedmanual\unskip}%
7908 %
7909 % If the printed reference name (arg #3) was not explicitly given in
7910 % the @xref, figure out what we want to use.
7911 \ifdim \wd\printedrefnamebox = 0pt
7912 % No printed node name was explicitly given.
7913 \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
7914 % Not auto section-title: use node name inside the square brackets.
7915 \def\printedrefname{\ignorespaces #1}%
7916 \else
7917 % Auto section-title: use chapter/section title inside
7918 % the square brackets if we have it.
7919 \ifdim \wd\printedmanualbox > 0pt
7920 % It is in another manual, so we don't have it; use node name.
7921 \def\printedrefname{\ignorespaces #1}%
7922 \else
7923 \ifhavexrefs
7924 % We (should) know the real title if we have the xref values.
7925 \def\printedrefname{\refx{#1-title}{}}%
7926 \else
7927 % Otherwise just copy the Info node name.
7928 \def\printedrefname{\ignorespaces #1}%
7929 \fi%
7930 \fi
7931 \fi
7932 \fi
7933 %
7934 % Make link in pdf output.
7935 \ifpdf
7936 {\indexnofonts
7937 \turnoffactive
7938 \makevalueexpandable
7939 % This expands tokens, so do it after making catcode changes, so _
7940 % etc. don't get their TeX definitions. This ignores all spaces in
7941 % #4, including (wrongly) those in the middle of the filename.
7942 \getfilename{#4}%
7943 %
7944 % This (wrongly) does not take account of leading or trailing
7945 % spaces in #1, which should be ignored.
7946 \edef\pdfxrefdest{#1}%
7947 \ifx\pdfxrefdest\empty
7948 \def\pdfxrefdest{Top}% no empty targets
7949 \else
7950 \txiescapepdf\pdfxrefdest % escape PDF special chars
7951 \fi
7952 %
7953 \leavevmode
7954 \startlink attr{/Border [0 0 0]}%
7955 \ifnum\filenamelength>0
7956 goto file{\the\filename.pdf} name{\pdfxrefdest}%
7957 \else
7958 goto name{\pdfmkpgn{\pdfxrefdest}}%
7959 \fi
7960 }%
7961 \setcolor{\linkcolor}%
7962 \fi
7963 %
7964 % Float references are printed completely differently: "Figure 1.2"
7965 % instead of "[somenode], p.3". We distinguish them by the
7966 % LABEL-title being set to a magic string.
7967 {%
7968 % Have to otherify everything special to allow the \csname to
7969 % include an _ in the xref name, etc.
7970 \indexnofonts
7971 \turnoffactive
7972 \expandafter\global\expandafter\let\expandafter\Xthisreftitle
7973 \csname XR#1-title\endcsname
7974 }%
7975 \iffloat\Xthisreftitle
7976 % If the user specified the print name (third arg) to the ref,
7977 % print it instead of our usual "Figure 1.2".
7978 \ifdim\wd\printedrefnamebox = 0pt
7979 \refx{#1-snt}{}%
7980 \else
7981 \printedrefname
7982 \fi
7983 %
7984 % If the user also gave the printed manual name (fifth arg), append
7985 % "in MANUALNAME".
7986 \ifdim \wd\printedmanualbox > 0pt
7987 \space \putwordin{} \cite{\printedmanual}%
7988 \fi
7989 \else
7990 % node/anchor (non-float) references.
7991 %
7992 % If we use \unhbox to print the node names, TeX does not insert
7993 % empty discretionaries after hyphens, which means that it will not
7994 % find a line break at a hyphen in a node names. Since some manuals
7995 % are best written with fairly long node names, containing hyphens,
7996 % this is a loss. Therefore, we give the text of the node name
7997 % again, so it is as if TeX is seeing it for the first time.
7998 %
7999 \ifdim \wd\printedmanualbox > 0pt
8000 % Cross-manual reference with a printed manual name.
8001 %
8002 \crossmanualxref{\cite{\printedmanual\unskip}}%
8003 %
8004 \else\ifdim \wd\infofilenamebox > 0pt
8005 % Cross-manual reference with only an info filename (arg 4), no
8006 % printed manual name (arg 5). This is essentially the same as
8007 % the case above; we output the filename, since we have nothing else.
8008 %
8009 \crossmanualxref{\code{\infofilename\unskip}}%
8010 %
8011 \else
8012 % Reference within this manual.
8013 %
8014 % _ (for example) has to be the character _ for the purposes of the
8015 % control sequence corresponding to the node, but it has to expand
8016 % into the usual \leavevmode...\vrule stuff for purposes of
8017 % printing. So we \turnoffactive for the \refx-snt, back on for the
8018 % printing, back off for the \refx-pg.
8019 {\turnoffactive
8020 % Only output a following space if the -snt ref is nonempty; for
8021 % @unnumbered and @anchor, it won't be.
8022 \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
8023 \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
8024 }%
8025 % output the `[mynode]' via the macro below so it can be overridden.
8026 \xrefprintnodename\printedrefname
8027 %
8028 % But we always want a comma and a space:
8029 ,\space
8030 %
8031 % output the `page 3'.
8032 \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
8033 \fi\fi
8034 \fi
8035 \endlink
8036 \endgroup}
8037
8038 % Output a cross-manual xref to #1. Used just above (twice).
8039 %
8040 % Only include the text "Section ``foo'' in" if the foo is neither
8041 % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply
8042 % "see The Foo Manual", the idea being to refer to the whole manual.
8043 %
8044 % But, this being TeX, we can't easily compare our node name against the
8045 % string "Top" while ignoring the possible spaces before and after in
8046 % the input. By adding the arbitrary 7sp below, we make it much less
8047 % likely that a real node name would have the same width as "Top" (e.g.,
8048 % in a monospaced font). Hopefully it will never happen in practice.
8049 %
8050 % For the same basic reason, we retypeset the "Top" at every
8051 % reference, since the current font is indeterminate.
8052 %
8053 \def\crossmanualxref#1{%
8054 \setbox\toprefbox = \hbox{Top\kern7sp}%
8055 \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}%
8056 \ifdim \wd2 > 7sp % nonempty?
8057 \ifdim \wd2 = \wd\toprefbox \else % same as Top?
8058 \putwordSection{} ``\printedrefname'' \putwordin{}\space
8059 \fi
8060 \fi
8061 #1%
8062 }
8063
8064 % This macro is called from \xrefX for the `[nodename]' part of xref
8065 % output. It's a separate macro only so it can be changed more easily,
8066 % since square brackets don't work well in some documents. Particularly
8067 % one that Bob is working on :).
8068 %
8069 \def\xrefprintnodename#1{[#1]}
8070
8071 % Things referred to by \setref.
8072 %
8073 \def\Ynothing{}
8074 \def\Yomitfromtoc{}
8075 \def\Ynumbered{%
8076 \ifnum\secno=0
8077 \putwordChapter@tie \the\chapno
8078 \else \ifnum\subsecno=0
8079 \putwordSection@tie \the\chapno.\the\secno
8080 \else \ifnum\subsubsecno=0
8081 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno
8082 \else
8083 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno
8084 \fi\fi\fi
8085 }
8086 \def\Yappendix{%
8087 \ifnum\secno=0
8088 \putwordAppendix@tie @char\the\appendixno{}%
8089 \else \ifnum\subsecno=0
8090 \putwordSection@tie @char\the\appendixno.\the\secno
8091 \else \ifnum\subsubsecno=0
8092 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno
8093 \else
8094 \putwordSection@tie
8095 @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
8096 \fi\fi\fi
8097 }
8098
8099 % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
8100 % If its value is nonempty, SUFFIX is output afterward.
8101 %
8102 \def\refx#1#2{%
8103 {%
8104 \indexnofonts
8105 \otherbackslash
8106 \expandafter\global\expandafter\let\expandafter\thisrefX
8107 \csname XR#1\endcsname
8108 }%
8109 \ifx\thisrefX\relax
8110 % If not defined, say something at least.
8111 \angleleft un\-de\-fined\angleright
8112 \iflinks
8113 \ifhavexrefs
8114 {\toks0 = {#1}% avoid expansion of possibly-complex value
8115 \message{\linenumber Undefined cross reference `\the\toks0'.}}%
8116 \else
8117 \ifwarnedxrefs\else
8118 \global\warnedxrefstrue
8119 \message{Cross reference values unknown; you must run TeX again.}%
8120 \fi
8121 \fi
8122 \fi
8123 \else
8124 % It's defined, so just use it.
8125 \thisrefX
8126 \fi
8127 #2% Output the suffix in any case.
8128 }
8129
8130 % This is the macro invoked by entries in the aux file. Usually it's
8131 % just a \def (we prepend XR to the control sequence name to avoid
8132 % collisions). But if this is a float type, we have more work to do.
8133 %
8134 \def\xrdef#1#2{%
8135 {% The node name might contain 8-bit characters, which in our current
8136 % implementation are changed to commands like @'e. Don't let these
8137 % mess up the control sequence name.
8138 \indexnofonts
8139 \turnoffactive
8140 \xdef\safexrefname{#1}%
8141 }%
8142 %
8143 \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
8144 %
8145 % Was that xref control sequence that we just defined for a float?
8146 \expandafter\iffloat\csname XR\safexrefname\endcsname
8147 % it was a float, and we have the (safe) float type in \iffloattype.
8148 \expandafter\let\expandafter\floatlist
8149 \csname floatlist\iffloattype\endcsname
8150 %
8151 % Is this the first time we've seen this float type?
8152 \expandafter\ifx\floatlist\relax
8153 \toks0 = {\do}% yes, so just \do
8154 \else
8155 % had it before, so preserve previous elements in list.
8156 \toks0 = \expandafter{\floatlist\do}%
8157 \fi
8158 %
8159 % Remember this xref in the control sequence \floatlistFLOATTYPE,
8160 % for later use in \listoffloats.
8161 \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
8162 {\safexrefname}}%
8163 \fi
8164 }
8165
8166 % Read the last existing aux file, if any. No error if none exists.
8167 %
8168 \def\tryauxfile{%
8169 \openin 1 \jobname.aux
8170 \ifeof 1 \else
8171 \readdatafile{aux}%
8172 \global\havexrefstrue
8173 \fi
8174 \closein 1
8175 }
8176
8177 \def\setupdatafile{%
8178 \catcode`\^^@=\other
8179 \catcode`\^^A=\other
8180 \catcode`\^^B=\other
8181 \catcode`\^^C=\other
8182 \catcode`\^^D=\other
8183 \catcode`\^^E=\other
8184 \catcode`\^^F=\other
8185 \catcode`\^^G=\other
8186 \catcode`\^^H=\other
8187 \catcode`\^^K=\other
8188 \catcode`\^^L=\other
8189 \catcode`\^^N=\other
8190 \catcode`\^^P=\other
8191 \catcode`\^^Q=\other
8192 \catcode`\^^R=\other
8193 \catcode`\^^S=\other
8194 \catcode`\^^T=\other
8195 \catcode`\^^U=\other
8196 \catcode`\^^V=\other
8197 \catcode`\^^W=\other
8198 \catcode`\^^X=\other
8199 \catcode`\^^Z=\other
8200 \catcode`\^^[=\other
8201 \catcode`\^^\=\other
8202 \catcode`\^^]=\other
8203 \catcode`\^^^=\other
8204 \catcode`\^^_=\other
8205 % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
8206 % in xref tags, i.e., node names. But since ^^e4 notation isn't
8207 % supported in the main text, it doesn't seem desirable. Furthermore,
8208 % that is not enough: for node names that actually contain a ^
8209 % character, we would end up writing a line like this: 'xrdef {'hat
8210 % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
8211 % argument, and \hat is not an expandable control sequence. It could
8212 % all be worked out, but why? Either we support ^^ or we don't.
8213 %
8214 % The other change necessary for this was to define \auxhat:
8215 % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
8216 % and then to call \auxhat in \setq.
8217 %
8218 \catcode`\^=\other
8219 %
8220 % Special characters. Should be turned off anyway, but...
8221 \catcode`\~=\other
8222 \catcode`\[=\other
8223 \catcode`\]=\other
8224 \catcode`\"=\other
8225 \catcode`\_=\other
8226 \catcode`\|=\other
8227 \catcode`\<=\other
8228 \catcode`\>=\other
8229 \catcode`\$=\other
8230 \catcode`\#=\other
8231 \catcode`\&=\other
8232 \catcode`\%=\other
8233 \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
8234 %
8235 % This is to support \ in node names and titles, since the \
8236 % characters end up in a \csname. It's easier than
8237 % leaving it active and making its active definition an actual \
8238 % character. What I don't understand is why it works in the *value*
8239 % of the xrdef. Seems like it should be a catcode12 \, and that
8240 % should not typeset properly. But it works, so I'm moving on for
8241 % now. --karl, 15jan04.
8242 \catcode`\\=\other
8243 %
8244 % Make the characters 128-255 be printing characters.
8245 {%
8246 \count1=128
8247 \def\loop{%
8248 \catcode\count1=\other
8249 \advance\count1 by 1
8250 \ifnum \count1<256 \loop \fi
8251 }%
8252 }%
8253 %
8254 % @ is our escape character in .aux files, and we need braces.
8255 \catcode`\{=1
8256 \catcode`\}=2
8257 \catcode`\@=0
8258 }
8259
8260 \def\readdatafile#1{%
8261 \begingroup
8262 \setupdatafile
8263 \input\jobname.#1
8264 \endgroup}
8265
8266
8267 \message{insertions,}
8268 % including footnotes.
8269
8270 \newcount \footnoteno
8271
8272 % The trailing space in the following definition for supereject is
8273 % vital for proper filling; pages come out unaligned when you do a
8274 % pagealignmacro call if that space before the closing brace is
8275 % removed. (Generally, numeric constants should always be followed by a
8276 % space to prevent strange expansion errors.)
8277 \def\supereject{\par\penalty -20000\footnoteno =0 }
8278
8279 % @footnotestyle is meaningful for Info output only.
8280 \let\footnotestyle=\comment
8281
8282 {\catcode `\@=11
8283 %
8284 % Auto-number footnotes. Otherwise like plain.
8285 \gdef\footnote{%
8286 \let\indent=\ptexindent
8287 \let\noindent=\ptexnoindent
8288 \global\advance\footnoteno by \@ne
8289 \edef\thisfootno{$^{\the\footnoteno}$}%
8290 %
8291 % In case the footnote comes at the end of a sentence, preserve the
8292 % extra spacing after we do the footnote number.
8293 \let\@sf\empty
8294 \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
8295 %
8296 % Remove inadvertent blank space before typesetting the footnote number.
8297 \unskip
8298 \thisfootno\@sf
8299 \dofootnote
8300 }%
8301
8302 % Don't bother with the trickery in plain.tex to not require the
8303 % footnote text as a parameter. Our footnotes don't need to be so general.
8304 %
8305 % Oh yes, they do; otherwise, @ifset (and anything else that uses
8306 % \parseargline) fails inside footnotes because the tokens are fixed when
8307 % the footnote is read. --karl, 16nov96.
8308 %
8309 \gdef\dofootnote{%
8310 \insert\footins\bgroup
8311 % We want to typeset this text as a normal paragraph, even if the
8312 % footnote reference occurs in (for example) a display environment.
8313 % So reset some parameters.
8314 \hsize=\pagewidth
8315 \interlinepenalty\interfootnotelinepenalty
8316 \splittopskip\ht\strutbox % top baseline for broken footnotes
8317 \splitmaxdepth\dp\strutbox
8318 \floatingpenalty\@MM
8319 \leftskip\z@skip
8320 \rightskip\z@skip
8321 \spaceskip\z@skip
8322 \xspaceskip\z@skip
8323 \parindent\defaultparindent
8324 %
8325 \smallfonts \rm
8326 %
8327 % Because we use hanging indentation in footnotes, a @noindent appears
8328 % to exdent this text, so make it be a no-op. makeinfo does not use
8329 % hanging indentation so @noindent can still be needed within footnote
8330 % text after an @example or the like (not that this is good style).
8331 \let\noindent = \relax
8332 %
8333 % Hang the footnote text off the number. Use \everypar in case the
8334 % footnote extends for more than one paragraph.
8335 \everypar = {\hang}%
8336 \textindent{\thisfootno}%
8337 %
8338 % Don't crash into the line above the footnote text. Since this
8339 % expands into a box, it must come within the paragraph, lest it
8340 % provide a place where TeX can split the footnote.
8341 \footstrut
8342 %
8343 % Invoke rest of plain TeX footnote routine.
8344 \futurelet\next\fo@t
8345 }
8346 }%end \catcode `\@=11
8347
8348 % In case a @footnote appears in a vbox, save the footnote text and create
8349 % the real \insert just after the vbox finished. Otherwise, the insertion
8350 % would be lost.
8351 % Similarly, if a @footnote appears inside an alignment, save the footnote
8352 % text to a box and make the \insert when a row of the table is finished.
8353 % And the same can be done for other insert classes. --kasal, 16nov03.
8354
8355 % Replace the \insert primitive by a cheating macro.
8356 % Deeper inside, just make sure that the saved insertions are not spilled
8357 % out prematurely.
8358 %
8359 \def\startsavinginserts{%
8360 \ifx \insert\ptexinsert
8361 \let\insert\saveinsert
8362 \else
8363 \let\checkinserts\relax
8364 \fi
8365 }
8366
8367 % This \insert replacement works for both \insert\footins{foo} and
8368 % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
8369 %
8370 \def\saveinsert#1{%
8371 \edef\next{\noexpand\savetobox \makeSAVEname#1}%
8372 \afterassignment\next
8373 % swallow the left brace
8374 \let\temp =
8375 }
8376 \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}}
8377 \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1}
8378
8379 \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
8380
8381 \def\placesaveins#1{%
8382 \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
8383 {\box#1}%
8384 }
8385
8386 % eat @SAVE -- beware, all of them have catcode \other:
8387 {
8388 \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-)
8389 \gdef\gobblesave @SAVE{}
8390 }
8391
8392 % initialization:
8393 \def\newsaveins #1{%
8394 \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
8395 \next
8396 }
8397 \def\newsaveinsX #1{%
8398 \csname newbox\endcsname #1%
8399 \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
8400 \checksaveins #1}%
8401 }
8402
8403 % initialize:
8404 \let\checkinserts\empty
8405 \newsaveins\footins
8406 \newsaveins\margin
8407
8408
8409 % @image. We use the macros from epsf.tex to support this.
8410 % If epsf.tex is not installed and @image is used, we complain.
8411 %
8412 % Check for and read epsf.tex up front. If we read it only at @image
8413 % time, we might be inside a group, and then its definitions would get
8414 % undone and the next image would fail.
8415 \openin 1 = epsf.tex
8416 \ifeof 1 \else
8417 % Do not bother showing banner with epsf.tex v2.7k (available in
8418 % doc/epsf.tex and on ctan).
8419 \def\epsfannounce{\toks0 = }%
8420 \input epsf.tex
8421 \fi
8422 \closein 1
8423 %
8424 % We will only complain once about lack of epsf.tex.
8425 \newif\ifwarnednoepsf
8426 \newhelp\noepsfhelp{epsf.tex must be installed for images to
8427 work. It is also included in the Texinfo distribution, or you can get
8428 it from ftp://tug.org/tex/epsf.tex.}
8429 %
8430 \def\image#1{%
8431 \ifx\epsfbox\thisisundefined
8432 \ifwarnednoepsf \else
8433 \errhelp = \noepsfhelp
8434 \errmessage{epsf.tex not found, images will be ignored}%
8435 \global\warnednoepsftrue
8436 \fi
8437 \else
8438 \imagexxx #1,,,,,\finish
8439 \fi
8440 }
8441 %
8442 % Arguments to @image:
8443 % #1 is (mandatory) image filename; we tack on .eps extension.
8444 % #2 is (optional) width, #3 is (optional) height.
8445 % #4 is (ignored optional) html alt text.
8446 % #5 is (ignored optional) extension.
8447 % #6 is just the usual extra ignored arg for parsing stuff.
8448 \newif\ifimagevmode
8449 \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
8450 \catcode`\^^M = 5 % in case we're inside an example
8451 \normalturnoffactive % allow _ et al. in names
8452 % If the image is by itself, center it.
8453 \ifvmode
8454 \imagevmodetrue
8455 \else \ifx\centersub\centerV
8456 % for @center @image, we need a vbox so we can have our vertical space
8457 \imagevmodetrue
8458 \vbox\bgroup % vbox has better behavior than vtop herev
8459 \fi\fi
8460 %
8461 \ifimagevmode
8462 \nobreak\medskip
8463 % Usually we'll have text after the image which will insert
8464 % \parskip glue, so insert it here too to equalize the space
8465 % above and below.
8466 \nobreak\vskip\parskip
8467 \nobreak
8468 \fi
8469 %
8470 % Leave vertical mode so that indentation from an enclosing
8471 % environment such as @quotation is respected.
8472 % However, if we're at the top level, we don't want the
8473 % normal paragraph indentation.
8474 % On the other hand, if we are in the case of @center @image, we don't
8475 % want to start a paragraph, which will create a hsize-width box and
8476 % eradicate the centering.
8477 \ifx\centersub\centerV\else \noindent \fi
8478 %
8479 % Output the image.
8480 \ifpdf
8481 \dopdfimage{#1}{#2}{#3}%
8482 \else
8483 % \epsfbox itself resets \epsf?size at each figure.
8484 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
8485 \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
8486 \epsfbox{#1.eps}%
8487 \fi
8488 %
8489 \ifimagevmode
8490 \medskip % space after a standalone image
8491 \fi
8492 \ifx\centersub\centerV \egroup \fi
8493 \endgroup}
8494
8495
8496 % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
8497 % etc. We don't actually implement floating yet, we always include the
8498 % float "here". But it seemed the best name for the future.
8499 %
8500 \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish}
8501
8502 % There may be a space before second and/or third parameter; delete it.
8503 \def\eatcommaspace#1, {#1,}
8504
8505 % #1 is the optional FLOATTYPE, the text label for this float, typically
8506 % "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
8507 % this float will not be numbered and cannot be referred to.
8508 %
8509 % #2 is the optional xref label. Also must be present for the float to
8510 % be referable.
8511 %
8512 % #3 is the optional positioning argument; for now, it is ignored. It
8513 % will somehow specify the positions allowed to float to (here, top, bottom).
8514 %
8515 % We keep a separate counter for each FLOATTYPE, which we reset at each
8516 % chapter-level command.
8517 \let\resetallfloatnos=\empty
8518 %
8519 \def\dofloat#1,#2,#3,#4\finish{%
8520 \let\thiscaption=\empty
8521 \let\thisshortcaption=\empty
8522 %
8523 % don't lose footnotes inside @float.
8524 %
8525 % BEWARE: when the floats start float, we have to issue warning whenever an
8526 % insert appears inside a float which could possibly float. --kasal, 26may04
8527 %
8528 \startsavinginserts
8529 %
8530 % We can't be used inside a paragraph.
8531 \par
8532 %
8533 \vtop\bgroup
8534 \def\floattype{#1}%
8535 \def\floatlabel{#2}%
8536 \def\floatloc{#3}% we do nothing with this yet.
8537 %
8538 \ifx\floattype\empty
8539 \let\safefloattype=\empty
8540 \else
8541 {%
8542 % the floattype might have accents or other special characters,
8543 % but we need to use it in a control sequence name.
8544 \indexnofonts
8545 \turnoffactive
8546 \xdef\safefloattype{\floattype}%
8547 }%
8548 \fi
8549 %
8550 % If label is given but no type, we handle that as the empty type.
8551 \ifx\floatlabel\empty \else
8552 % We want each FLOATTYPE to be numbered separately (Figure 1,
8553 % Table 1, Figure 2, ...). (And if no label, no number.)
8554 %
8555 \expandafter\getfloatno\csname\safefloattype floatno\endcsname
8556 \global\advance\floatno by 1
8557 %
8558 {%
8559 % This magic value for \lastsection is output by \setref as the
8560 % XREFLABEL-title value. \xrefX uses it to distinguish float
8561 % labels (which have a completely different output format) from
8562 % node and anchor labels. And \xrdef uses it to construct the
8563 % lists of floats.
8564 %
8565 \edef\lastsection{\floatmagic=\safefloattype}%
8566 \setref{\floatlabel}{Yfloat}%
8567 }%
8568 \fi
8569 %
8570 % start with \parskip glue, I guess.
8571 \vskip\parskip
8572 %
8573 % Don't suppress indentation if a float happens to start a section.
8574 \restorefirstparagraphindent
8575 }
8576
8577 % we have these possibilities:
8578 % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
8579 % @float Foo,lbl & no caption: Foo 1.1
8580 % @float Foo & @caption{Cap}: Foo: Cap
8581 % @float Foo & no caption: Foo
8582 % @float ,lbl & Caption{Cap}: 1.1: Cap
8583 % @float ,lbl & no caption: 1.1
8584 % @float & @caption{Cap}: Cap
8585 % @float & no caption:
8586 %
8587 \def\Efloat{%
8588 \let\floatident = \empty
8589 %
8590 % In all cases, if we have a float type, it comes first.
8591 \ifx\floattype\empty \else \def\floatident{\floattype}\fi
8592 %
8593 % If we have an xref label, the number comes next.
8594 \ifx\floatlabel\empty \else
8595 \ifx\floattype\empty \else % if also had float type, need tie first.
8596 \appendtomacro\floatident{\tie}%
8597 \fi
8598 % the number.
8599 \appendtomacro\floatident{\chaplevelprefix\the\floatno}%
8600 \fi
8601 %
8602 % Start the printed caption with what we've constructed in
8603 % \floatident, but keep it separate; we need \floatident again.
8604 \let\captionline = \floatident
8605 %
8606 \ifx\thiscaption\empty \else
8607 \ifx\floatident\empty \else
8608 \appendtomacro\captionline{: }% had ident, so need a colon between
8609 \fi
8610 %
8611 % caption text.
8612 \appendtomacro\captionline{\scanexp\thiscaption}%
8613 \fi
8614 %
8615 % If we have anything to print, print it, with space before.
8616 % Eventually this needs to become an \insert.
8617 \ifx\captionline\empty \else
8618 \vskip.5\parskip
8619 \captionline
8620 %
8621 % Space below caption.
8622 \vskip\parskip
8623 \fi
8624 %
8625 % If have an xref label, write the list of floats info. Do this
8626 % after the caption, to avoid chance of it being a breakpoint.
8627 \ifx\floatlabel\empty \else
8628 % Write the text that goes in the lof to the aux file as
8629 % \floatlabel-lof. Besides \floatident, we include the short
8630 % caption if specified, else the full caption if specified, else nothing.
8631 {%
8632 \atdummies
8633 %
8634 % since we read the caption text in the macro world, where ^^M
8635 % is turned into a normal character, we have to scan it back, so
8636 % we don't write the literal three characters "^^M" into the aux file.
8637 \scanexp{%
8638 \xdef\noexpand\gtemp{%
8639 \ifx\thisshortcaption\empty
8640 \thiscaption
8641 \else
8642 \thisshortcaption
8643 \fi
8644 }%
8645 }%
8646 \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
8647 \ifx\gtemp\empty \else : \gtemp \fi}}%
8648 }%
8649 \fi
8650 \egroup % end of \vtop
8651 %
8652 % place the captured inserts
8653 %
8654 % BEWARE: when the floats start floating, we have to issue warning
8655 % whenever an insert appears inside a float which could possibly
8656 % float. --kasal, 26may04
8657 %
8658 \checkinserts
8659 }
8660
8661 % Append the tokens #2 to the definition of macro #1, not expanding either.
8662 %
8663 \def\appendtomacro#1#2{%
8664 \expandafter\def\expandafter#1\expandafter{#1#2}%
8665 }
8666
8667 % @caption, @shortcaption
8668 %
8669 \def\caption{\docaption\thiscaption}
8670 \def\shortcaption{\docaption\thisshortcaption}
8671 \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
8672 \def\defcaption#1#2{\egroup \def#1{#2}}
8673
8674 % The parameter is the control sequence identifying the counter we are
8675 % going to use. Create it if it doesn't exist and assign it to \floatno.
8676 \def\getfloatno#1{%
8677 \ifx#1\relax
8678 % Haven't seen this figure type before.
8679 \csname newcount\endcsname #1%
8680 %
8681 % Remember to reset this floatno at the next chap.
8682 \expandafter\gdef\expandafter\resetallfloatnos
8683 \expandafter{\resetallfloatnos #1=0 }%
8684 \fi
8685 \let\floatno#1%
8686 }
8687
8688 % \setref calls this to get the XREFLABEL-snt value. We want an @xref
8689 % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
8690 % first read the @float command.
8691 %
8692 \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}%
8693
8694 % Magic string used for the XREFLABEL-title value, so \xrefX can
8695 % distinguish floats from other xref types.
8696 \def\floatmagic{!!float!!}
8697
8698 % #1 is the control sequence we are passed; we expand into a conditional
8699 % which is true if #1 represents a float ref. That is, the magic
8700 % \lastsection value which we \setref above.
8701 %
8702 \def\iffloat#1{\expandafter\doiffloat#1==\finish}
8703 %
8704 % #1 is (maybe) the \floatmagic string. If so, #2 will be the
8705 % (safe) float type for this float. We set \iffloattype to #2.
8706 %
8707 \def\doiffloat#1=#2=#3\finish{%
8708 \def\temp{#1}%
8709 \def\iffloattype{#2}%
8710 \ifx\temp\floatmagic
8711 }
8712
8713 % @listoffloats FLOATTYPE - print a list of floats like a table of contents.
8714 %
8715 \parseargdef\listoffloats{%
8716 \def\floattype{#1}% floattype
8717 {%
8718 % the floattype might have accents or other special characters,
8719 % but we need to use it in a control sequence name.
8720 \indexnofonts
8721 \turnoffactive
8722 \xdef\safefloattype{\floattype}%
8723 }%
8724 %
8725 % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
8726 \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax
8727 \ifhavexrefs
8728 % if the user said @listoffloats foo but never @float foo.
8729 \message{\linenumber No `\safefloattype' floats to list.}%
8730 \fi
8731 \else
8732 \begingroup
8733 \leftskip=\tocindent % indent these entries like a toc
8734 \let\do=\listoffloatsdo
8735 \csname floatlist\safefloattype\endcsname
8736 \endgroup
8737 \fi
8738 }
8739
8740 % This is called on each entry in a list of floats. We're passed the
8741 % xref label, in the form LABEL-title, which is how we save it in the
8742 % aux file. We strip off the -title and look up \XRLABEL-lof, which
8743 % has the text we're supposed to typeset here.
8744 %
8745 % Figures without xref labels will not be included in the list (since
8746 % they won't appear in the aux file).
8747 %
8748 \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
8749 \def\listoffloatsdoentry#1-title\finish{{%
8750 % Can't fully expand XR#1-lof because it can contain anything. Just
8751 % pass the control sequence. On the other hand, XR#1-pg is just the
8752 % page number, and we want to fully expand that so we can get a link
8753 % in pdf output.
8754 \toksA = \expandafter{\csname XR#1-lof\endcsname}%
8755 %
8756 % use the same \entry macro we use to generate the TOC and index.
8757 \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
8758 \writeentry
8759 }}
8760
8761
8762 \message{localization,}
8763
8764 % For single-language documents, @documentlanguage is usually given very
8765 % early, just after @documentencoding. Single argument is the language
8766 % (de) or locale (de_DE) abbreviation.
8767 %
8768 {
8769 \catcode`\_ = \active
8770 \globaldefs=1
8771 \parseargdef\documentlanguage{\begingroup
8772 \let_=\normalunderscore % normal _ character for filenames
8773 \tex % read txi-??.tex file in plain TeX.
8774 % Read the file by the name they passed if it exists.
8775 \openin 1 txi-#1.tex
8776 \ifeof 1
8777 \documentlanguagetrywithoutunderscore{#1_\finish}%
8778 \else
8779 \globaldefs = 1 % everything in the txi-LL files needs to persist
8780 \input txi-#1.tex
8781 \fi
8782 \closein 1
8783 \endgroup % end raw TeX
8784 \endgroup}
8785 %
8786 % If they passed de_DE, and txi-de_DE.tex doesn't exist,
8787 % try txi-de.tex.
8788 %
8789 \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
8790 \openin 1 txi-#1.tex
8791 \ifeof 1
8792 \errhelp = \nolanghelp
8793 \errmessage{Cannot read language file txi-#1.tex}%
8794 \else
8795 \globaldefs = 1 % everything in the txi-LL files needs to persist
8796 \input txi-#1.tex
8797 \fi
8798 \closein 1
8799 }
8800 }% end of special _ catcode
8801 %
8802 \newhelp\nolanghelp{The given language definition file cannot be found or
8803 is empty. Maybe you need to install it? Putting it in the current
8804 directory should work if nowhere else does.}
8805
8806 % This macro is called from txi-??.tex files; the first argument is the
8807 % \language name to set (without the "\lang@" prefix), the second and
8808 % third args are \{left,right}hyphenmin.
8809 %
8810 % The language names to pass are determined when the format is built.
8811 % See the etex.log file created at that time, e.g.,
8812 % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
8813 %
8814 % With TeX Live 2008, etex now includes hyphenation patterns for all
8815 % available languages. This means we can support hyphenation in
8816 % Texinfo, at least to some extent. (This still doesn't solve the
8817 % accented characters problem.)
8818 %
8819 \catcode`@=11
8820 \def\txisetlanguage#1#2#3{%
8821 % do not set the language if the name is undefined in the current TeX.
8822 \expandafter\ifx\csname lang@#1\endcsname \relax
8823 \message{no patterns for #1}%
8824 \else
8825 \global\language = \csname lang@#1\endcsname
8826 \fi
8827 % but there is no harm in adjusting the hyphenmin values regardless.
8828 \global\lefthyphenmin = #2\relax
8829 \global\righthyphenmin = #3\relax
8830 }
8831
8832 % Helpers for encodings.
8833 % Set the catcode of characters 128 through 255 to the specified number.
8834 %
8835 \def\setnonasciicharscatcode#1{%
8836 \count255=128
8837 \loop\ifnum\count255<256
8838 \global\catcode\count255=#1\relax
8839 \advance\count255 by 1
8840 \repeat
8841 }
8842
8843 \def\setnonasciicharscatcodenonglobal#1{%
8844 \count255=128
8845 \loop\ifnum\count255<256
8846 \catcode\count255=#1\relax
8847 \advance\count255 by 1
8848 \repeat
8849 }
8850
8851 % @documentencoding sets the definition of non-ASCII characters
8852 % according to the specified encoding.
8853 %
8854 \parseargdef\documentencoding{%
8855 % Encoding being declared for the document.
8856 \def\declaredencoding{\csname #1.enc\endcsname}%
8857 %
8858 % Supported encodings: names converted to tokens in order to be able
8859 % to compare them with \ifx.
8860 \def\ascii{\csname US-ASCII.enc\endcsname}%
8861 \def\latnine{\csname ISO-8859-15.enc\endcsname}%
8862 \def\latone{\csname ISO-8859-1.enc\endcsname}%
8863 \def\lattwo{\csname ISO-8859-2.enc\endcsname}%
8864 \def\utfeight{\csname UTF-8.enc\endcsname}%
8865 %
8866 \ifx \declaredencoding \ascii
8867 \asciichardefs
8868 %
8869 \else \ifx \declaredencoding \lattwo
8870 \setnonasciicharscatcode\active
8871 \lattwochardefs
8872 %
8873 \else \ifx \declaredencoding \latone
8874 \setnonasciicharscatcode\active
8875 \latonechardefs
8876 %
8877 \else \ifx \declaredencoding \latnine
8878 \setnonasciicharscatcode\active
8879 \latninechardefs
8880 %
8881 \else \ifx \declaredencoding \utfeight
8882 \setnonasciicharscatcode\active
8883 \utfeightchardefs
8884 %
8885 \else
8886 \message{Unknown document encoding #1, ignoring.}%
8887 %
8888 \fi % utfeight
8889 \fi % latnine
8890 \fi % latone
8891 \fi % lattwo
8892 \fi % ascii
8893 }
8894
8895 % A message to be logged when using a character that isn't available
8896 % the default font encoding (OT1).
8897 %
8898 \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
8899
8900 % Take account of \c (plain) vs. \, (Texinfo) difference.
8901 \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
8902
8903 % First, make active non-ASCII characters in order for them to be
8904 % correctly categorized when TeX reads the replacement text of
8905 % macros containing the character definitions.
8906 \setnonasciicharscatcode\active
8907 %
8908 % Latin1 (ISO-8859-1) character definitions.
8909 \def\latonechardefs{%
8910 \gdef^^a0{\tie}
8911 \gdef^^a1{\exclamdown}
8912 \gdef^^a2{\missingcharmsg{CENT SIGN}}
8913 \gdef^^a3{{\pounds}}
8914 \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
8915 \gdef^^a5{\missingcharmsg{YEN SIGN}}
8916 \gdef^^a6{\missingcharmsg{BROKEN BAR}}
8917 \gdef^^a7{\S}
8918 \gdef^^a8{\"{}}
8919 \gdef^^a9{\copyright}
8920 \gdef^^aa{\ordf}
8921 \gdef^^ab{\guillemetleft}
8922 \gdef^^ac{$\lnot$}
8923 \gdef^^ad{\-}
8924 \gdef^^ae{\registeredsymbol}
8925 \gdef^^af{\={}}
8926 %
8927 \gdef^^b0{\textdegree}
8928 \gdef^^b1{$\pm$}
8929 \gdef^^b2{$^2$}
8930 \gdef^^b3{$^3$}
8931 \gdef^^b4{\'{}}
8932 \gdef^^b5{$\mu$}
8933 \gdef^^b6{\P}
8934 %
8935 \gdef^^b7{$^.$}
8936 \gdef^^b8{\cedilla\ }
8937 \gdef^^b9{$^1$}
8938 \gdef^^ba{\ordm}
8939 %
8940 \gdef^^bb{\guillemetright}
8941 \gdef^^bc{$1\over4$}
8942 \gdef^^bd{$1\over2$}
8943 \gdef^^be{$3\over4$}
8944 \gdef^^bf{\questiondown}
8945 %
8946 \gdef^^c0{\`A}
8947 \gdef^^c1{\'A}
8948 \gdef^^c2{\^A}
8949 \gdef^^c3{\~A}
8950 \gdef^^c4{\"A}
8951 \gdef^^c5{\ringaccent A}
8952 \gdef^^c6{\AE}
8953 \gdef^^c7{\cedilla C}
8954 \gdef^^c8{\`E}
8955 \gdef^^c9{\'E}
8956 \gdef^^ca{\^E}
8957 \gdef^^cb{\"E}
8958 \gdef^^cc{\`I}
8959 \gdef^^cd{\'I}
8960 \gdef^^ce{\^I}
8961 \gdef^^cf{\"I}
8962 %
8963 \gdef^^d0{\DH}
8964 \gdef^^d1{\~N}
8965 \gdef^^d2{\`O}
8966 \gdef^^d3{\'O}
8967 \gdef^^d4{\^O}
8968 \gdef^^d5{\~O}
8969 \gdef^^d6{\"O}
8970 \gdef^^d7{$\times$}
8971 \gdef^^d8{\O}
8972 \gdef^^d9{\`U}
8973 \gdef^^da{\'U}
8974 \gdef^^db{\^U}
8975 \gdef^^dc{\"U}
8976 \gdef^^dd{\'Y}
8977 \gdef^^de{\TH}
8978 \gdef^^df{\ss}
8979 %
8980 \gdef^^e0{\`a}
8981 \gdef^^e1{\'a}
8982 \gdef^^e2{\^a}
8983 \gdef^^e3{\~a}
8984 \gdef^^e4{\"a}
8985 \gdef^^e5{\ringaccent a}
8986 \gdef^^e6{\ae}
8987 \gdef^^e7{\cedilla c}
8988 \gdef^^e8{\`e}
8989 \gdef^^e9{\'e}
8990 \gdef^^ea{\^e}
8991 \gdef^^eb{\"e}
8992 \gdef^^ec{\`{\dotless i}}
8993 \gdef^^ed{\'{\dotless i}}
8994 \gdef^^ee{\^{\dotless i}}
8995 \gdef^^ef{\"{\dotless i}}
8996 %
8997 \gdef^^f0{\dh}
8998 \gdef^^f1{\~n}
8999 \gdef^^f2{\`o}
9000 \gdef^^f3{\'o}
9001 \gdef^^f4{\^o}
9002 \gdef^^f5{\~o}
9003 \gdef^^f6{\"o}
9004 \gdef^^f7{$\div$}
9005 \gdef^^f8{\o}
9006 \gdef^^f9{\`u}
9007 \gdef^^fa{\'u}
9008 \gdef^^fb{\^u}
9009 \gdef^^fc{\"u}
9010 \gdef^^fd{\'y}
9011 \gdef^^fe{\th}
9012 \gdef^^ff{\"y}
9013 }
9014
9015 % Latin9 (ISO-8859-15) encoding character definitions.
9016 \def\latninechardefs{%
9017 % Encoding is almost identical to Latin1.
9018 \latonechardefs
9019 %
9020 \gdef^^a4{\euro}
9021 \gdef^^a6{\v S}
9022 \gdef^^a8{\v s}
9023 \gdef^^b4{\v Z}
9024 \gdef^^b8{\v z}
9025 \gdef^^bc{\OE}
9026 \gdef^^bd{\oe}
9027 \gdef^^be{\"Y}
9028 }
9029
9030 % Latin2 (ISO-8859-2) character definitions.
9031 \def\lattwochardefs{%
9032 \gdef^^a0{\tie}
9033 \gdef^^a1{\ogonek{A}}
9034 \gdef^^a2{\u{}}
9035 \gdef^^a3{\L}
9036 \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
9037 \gdef^^a5{\v L}
9038 \gdef^^a6{\'S}
9039 \gdef^^a7{\S}
9040 \gdef^^a8{\"{}}
9041 \gdef^^a9{\v S}
9042 \gdef^^aa{\cedilla S}
9043 \gdef^^ab{\v T}
9044 \gdef^^ac{\'Z}
9045 \gdef^^ad{\-}
9046 \gdef^^ae{\v Z}
9047 \gdef^^af{\dotaccent Z}
9048 %
9049 \gdef^^b0{\textdegree}
9050 \gdef^^b1{\ogonek{a}}
9051 \gdef^^b2{\ogonek{ }}
9052 \gdef^^b3{\l}
9053 \gdef^^b4{\'{}}
9054 \gdef^^b5{\v l}
9055 \gdef^^b6{\'s}
9056 \gdef^^b7{\v{}}
9057 \gdef^^b8{\cedilla\ }
9058 \gdef^^b9{\v s}
9059 \gdef^^ba{\cedilla s}
9060 \gdef^^bb{\v t}
9061 \gdef^^bc{\'z}
9062 \gdef^^bd{\H{}}
9063 \gdef^^be{\v z}
9064 \gdef^^bf{\dotaccent z}
9065 %
9066 \gdef^^c0{\'R}
9067 \gdef^^c1{\'A}
9068 \gdef^^c2{\^A}
9069 \gdef^^c3{\u A}
9070 \gdef^^c4{\"A}
9071 \gdef^^c5{\'L}
9072 \gdef^^c6{\'C}
9073 \gdef^^c7{\cedilla C}
9074 \gdef^^c8{\v C}
9075 \gdef^^c9{\'E}
9076 \gdef^^ca{\ogonek{E}}
9077 \gdef^^cb{\"E}
9078 \gdef^^cc{\v E}
9079 \gdef^^cd{\'I}
9080 \gdef^^ce{\^I}
9081 \gdef^^cf{\v D}
9082 %
9083 \gdef^^d0{\DH}
9084 \gdef^^d1{\'N}
9085 \gdef^^d2{\v N}
9086 \gdef^^d3{\'O}
9087 \gdef^^d4{\^O}
9088 \gdef^^d5{\H O}
9089 \gdef^^d6{\"O}
9090 \gdef^^d7{$\times$}
9091 \gdef^^d8{\v R}
9092 \gdef^^d9{\ringaccent U}
9093 \gdef^^da{\'U}
9094 \gdef^^db{\H U}
9095 \gdef^^dc{\"U}
9096 \gdef^^dd{\'Y}
9097 \gdef^^de{\cedilla T}
9098 \gdef^^df{\ss}
9099 %
9100 \gdef^^e0{\'r}
9101 \gdef^^e1{\'a}
9102 \gdef^^e2{\^a}
9103 \gdef^^e3{\u a}
9104 \gdef^^e4{\"a}
9105 \gdef^^e5{\'l}
9106 \gdef^^e6{\'c}
9107 \gdef^^e7{\cedilla c}
9108 \gdef^^e8{\v c}
9109 \gdef^^e9{\'e}
9110 \gdef^^ea{\ogonek{e}}
9111 \gdef^^eb{\"e}
9112 \gdef^^ec{\v e}
9113 \gdef^^ed{\'{\dotless{i}}}
9114 \gdef^^ee{\^{\dotless{i}}}
9115 \gdef^^ef{\v d}
9116 %
9117 \gdef^^f0{\dh}
9118 \gdef^^f1{\'n}
9119 \gdef^^f2{\v n}
9120 \gdef^^f3{\'o}
9121 \gdef^^f4{\^o}
9122 \gdef^^f5{\H o}
9123 \gdef^^f6{\"o}
9124 \gdef^^f7{$\div$}
9125 \gdef^^f8{\v r}
9126 \gdef^^f9{\ringaccent u}
9127 \gdef^^fa{\'u}
9128 \gdef^^fb{\H u}
9129 \gdef^^fc{\"u}
9130 \gdef^^fd{\'y}
9131 \gdef^^fe{\cedilla t}
9132 \gdef^^ff{\dotaccent{}}
9133 }
9134
9135 % UTF-8 character definitions.
9136 %
9137 % This code to support UTF-8 is based on LaTeX's utf8.def, with some
9138 % changes for Texinfo conventions. It is included here under the GPL by
9139 % permission from Frank Mittelbach and the LaTeX team.
9140 %
9141 \newcount\countUTFx
9142 \newcount\countUTFy
9143 \newcount\countUTFz
9144
9145 \gdef\UTFviiiTwoOctets#1#2{\expandafter
9146 \UTFviiiDefined\csname u8:#1\string #2\endcsname}
9147 %
9148 \gdef\UTFviiiThreeOctets#1#2#3{\expandafter
9149 \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname}
9150 %
9151 \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
9152 \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname}
9153
9154 \gdef\UTFviiiDefined#1{%
9155 \ifx #1\relax
9156 \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
9157 \else
9158 \expandafter #1%
9159 \fi
9160 }
9161
9162 \begingroup
9163 \catcode`\~13
9164 \catcode`\"12
9165
9166 \def\UTFviiiLoop{%
9167 \global\catcode\countUTFx\active
9168 \uccode`\~\countUTFx
9169 \uppercase\expandafter{\UTFviiiTmp}%
9170 \advance\countUTFx by 1
9171 \ifnum\countUTFx < \countUTFy
9172 \expandafter\UTFviiiLoop
9173 \fi}
9174
9175 \countUTFx = "C2
9176 \countUTFy = "E0
9177 \def\UTFviiiTmp{%
9178 \xdef~{\noexpand\UTFviiiTwoOctets\string~}}
9179 \UTFviiiLoop
9180
9181 \countUTFx = "E0
9182 \countUTFy = "F0
9183 \def\UTFviiiTmp{%
9184 \xdef~{\noexpand\UTFviiiThreeOctets\string~}}
9185 \UTFviiiLoop
9186
9187 \countUTFx = "F0
9188 \countUTFy = "F4
9189 \def\UTFviiiTmp{%
9190 \xdef~{\noexpand\UTFviiiFourOctets\string~}}
9191 \UTFviiiLoop
9192 \endgroup
9193
9194 \begingroup
9195 \catcode`\"=12
9196 \catcode`\<=12
9197 \catcode`\.=12
9198 \catcode`\,=12
9199 \catcode`\;=12
9200 \catcode`\!=12
9201 \catcode`\~=13
9202
9203 \gdef\DeclareUnicodeCharacter#1#2{%
9204 \countUTFz = "#1\relax
9205 %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
9206 \begingroup
9207 \parseXMLCharref
9208 \def\UTFviiiTwoOctets##1##2{%
9209 \csname u8:##1\string ##2\endcsname}%
9210 \def\UTFviiiThreeOctets##1##2##3{%
9211 \csname u8:##1\string ##2\string ##3\endcsname}%
9212 \def\UTFviiiFourOctets##1##2##3##4{%
9213 \csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
9214 \expandafter\expandafter\expandafter\expandafter
9215 \expandafter\expandafter\expandafter
9216 \gdef\UTFviiiTmp{#2}%
9217 \endgroup}
9218
9219 \gdef\parseXMLCharref{%
9220 \ifnum\countUTFz < "A0\relax
9221 \errhelp = \EMsimple
9222 \errmessage{Cannot define Unicode char value < 00A0}%
9223 \else\ifnum\countUTFz < "800\relax
9224 \parseUTFviiiA,%
9225 \parseUTFviiiB C\UTFviiiTwoOctets.,%
9226 \else\ifnum\countUTFz < "10000\relax
9227 \parseUTFviiiA;%
9228 \parseUTFviiiA,%
9229 \parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
9230 \else
9231 \parseUTFviiiA;%
9232 \parseUTFviiiA,%
9233 \parseUTFviiiA!%
9234 \parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
9235 \fi\fi\fi
9236 }
9237
9238 \gdef\parseUTFviiiA#1{%
9239 \countUTFx = \countUTFz
9240 \divide\countUTFz by 64
9241 \countUTFy = \countUTFz
9242 \multiply\countUTFz by 64
9243 \advance\countUTFx by -\countUTFz
9244 \advance\countUTFx by 128
9245 \uccode `#1\countUTFx
9246 \countUTFz = \countUTFy}
9247
9248 \gdef\parseUTFviiiB#1#2#3#4{%
9249 \advance\countUTFz by "#10\relax
9250 \uccode `#3\countUTFz
9251 \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
9252 \endgroup
9253
9254 \def\utfeightchardefs{%
9255 \DeclareUnicodeCharacter{00A0}{\tie}
9256 \DeclareUnicodeCharacter{00A1}{\exclamdown}
9257 \DeclareUnicodeCharacter{00A3}{\pounds}
9258 \DeclareUnicodeCharacter{00A8}{\"{ }}
9259 \DeclareUnicodeCharacter{00A9}{\copyright}
9260 \DeclareUnicodeCharacter{00AA}{\ordf}
9261 \DeclareUnicodeCharacter{00AB}{\guillemetleft}
9262 \DeclareUnicodeCharacter{00AD}{\-}
9263 \DeclareUnicodeCharacter{00AE}{\registeredsymbol}
9264 \DeclareUnicodeCharacter{00AF}{\={ }}
9265
9266 \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
9267 \DeclareUnicodeCharacter{00B4}{\'{ }}
9268 \DeclareUnicodeCharacter{00B8}{\cedilla{ }}
9269 \DeclareUnicodeCharacter{00BA}{\ordm}
9270 \DeclareUnicodeCharacter{00BB}{\guillemetright}
9271 \DeclareUnicodeCharacter{00BF}{\questiondown}
9272
9273 \DeclareUnicodeCharacter{00C0}{\`A}
9274 \DeclareUnicodeCharacter{00C1}{\'A}
9275 \DeclareUnicodeCharacter{00C2}{\^A}
9276 \DeclareUnicodeCharacter{00C3}{\~A}
9277 \DeclareUnicodeCharacter{00C4}{\"A}
9278 \DeclareUnicodeCharacter{00C5}{\AA}
9279 \DeclareUnicodeCharacter{00C6}{\AE}
9280 \DeclareUnicodeCharacter{00C7}{\cedilla{C}}
9281 \DeclareUnicodeCharacter{00C8}{\`E}
9282 \DeclareUnicodeCharacter{00C9}{\'E}
9283 \DeclareUnicodeCharacter{00CA}{\^E}
9284 \DeclareUnicodeCharacter{00CB}{\"E}
9285 \DeclareUnicodeCharacter{00CC}{\`I}
9286 \DeclareUnicodeCharacter{00CD}{\'I}
9287 \DeclareUnicodeCharacter{00CE}{\^I}
9288 \DeclareUnicodeCharacter{00CF}{\"I}
9289
9290 \DeclareUnicodeCharacter{00D0}{\DH}
9291 \DeclareUnicodeCharacter{00D1}{\~N}
9292 \DeclareUnicodeCharacter{00D2}{\`O}
9293 \DeclareUnicodeCharacter{00D3}{\'O}
9294 \DeclareUnicodeCharacter{00D4}{\^O}
9295 \DeclareUnicodeCharacter{00D5}{\~O}
9296 \DeclareUnicodeCharacter{00D6}{\"O}
9297 \DeclareUnicodeCharacter{00D8}{\O}
9298 \DeclareUnicodeCharacter{00D9}{\`U}
9299 \DeclareUnicodeCharacter{00DA}{\'U}
9300 \DeclareUnicodeCharacter{00DB}{\^U}
9301 \DeclareUnicodeCharacter{00DC}{\"U}
9302 \DeclareUnicodeCharacter{00DD}{\'Y}
9303 \DeclareUnicodeCharacter{00DE}{\TH}
9304 \DeclareUnicodeCharacter{00DF}{\ss}
9305
9306 \DeclareUnicodeCharacter{00E0}{\`a}
9307 \DeclareUnicodeCharacter{00E1}{\'a}
9308 \DeclareUnicodeCharacter{00E2}{\^a}
9309 \DeclareUnicodeCharacter{00E3}{\~a}
9310 \DeclareUnicodeCharacter{00E4}{\"a}
9311 \DeclareUnicodeCharacter{00E5}{\aa}
9312 \DeclareUnicodeCharacter{00E6}{\ae}
9313 \DeclareUnicodeCharacter{00E7}{\cedilla{c}}
9314 \DeclareUnicodeCharacter{00E8}{\`e}
9315 \DeclareUnicodeCharacter{00E9}{\'e}
9316 \DeclareUnicodeCharacter{00EA}{\^e}
9317 \DeclareUnicodeCharacter{00EB}{\"e}
9318 \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
9319 \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
9320 \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
9321 \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
9322
9323 \DeclareUnicodeCharacter{00F0}{\dh}
9324 \DeclareUnicodeCharacter{00F1}{\~n}
9325 \DeclareUnicodeCharacter{00F2}{\`o}
9326 \DeclareUnicodeCharacter{00F3}{\'o}
9327 \DeclareUnicodeCharacter{00F4}{\^o}
9328 \DeclareUnicodeCharacter{00F5}{\~o}
9329 \DeclareUnicodeCharacter{00F6}{\"o}
9330 \DeclareUnicodeCharacter{00F8}{\o}
9331 \DeclareUnicodeCharacter{00F9}{\`u}
9332 \DeclareUnicodeCharacter{00FA}{\'u}
9333 \DeclareUnicodeCharacter{00FB}{\^u}
9334 \DeclareUnicodeCharacter{00FC}{\"u}
9335 \DeclareUnicodeCharacter{00FD}{\'y}
9336 \DeclareUnicodeCharacter{00FE}{\th}
9337 \DeclareUnicodeCharacter{00FF}{\"y}
9338
9339 \DeclareUnicodeCharacter{0100}{\=A}
9340 \DeclareUnicodeCharacter{0101}{\=a}
9341 \DeclareUnicodeCharacter{0102}{\u{A}}
9342 \DeclareUnicodeCharacter{0103}{\u{a}}
9343 \DeclareUnicodeCharacter{0104}{\ogonek{A}}
9344 \DeclareUnicodeCharacter{0105}{\ogonek{a}}
9345 \DeclareUnicodeCharacter{0106}{\'C}
9346 \DeclareUnicodeCharacter{0107}{\'c}
9347 \DeclareUnicodeCharacter{0108}{\^C}
9348 \DeclareUnicodeCharacter{0109}{\^c}
9349 \DeclareUnicodeCharacter{0118}{\ogonek{E}}
9350 \DeclareUnicodeCharacter{0119}{\ogonek{e}}
9351 \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
9352 \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
9353 \DeclareUnicodeCharacter{010C}{\v{C}}
9354 \DeclareUnicodeCharacter{010D}{\v{c}}
9355 \DeclareUnicodeCharacter{010E}{\v{D}}
9356
9357 \DeclareUnicodeCharacter{0112}{\=E}
9358 \DeclareUnicodeCharacter{0113}{\=e}
9359 \DeclareUnicodeCharacter{0114}{\u{E}}
9360 \DeclareUnicodeCharacter{0115}{\u{e}}
9361 \DeclareUnicodeCharacter{0116}{\dotaccent{E}}
9362 \DeclareUnicodeCharacter{0117}{\dotaccent{e}}
9363 \DeclareUnicodeCharacter{011A}{\v{E}}
9364 \DeclareUnicodeCharacter{011B}{\v{e}}
9365 \DeclareUnicodeCharacter{011C}{\^G}
9366 \DeclareUnicodeCharacter{011D}{\^g}
9367 \DeclareUnicodeCharacter{011E}{\u{G}}
9368 \DeclareUnicodeCharacter{011F}{\u{g}}
9369
9370 \DeclareUnicodeCharacter{0120}{\dotaccent{G}}
9371 \DeclareUnicodeCharacter{0121}{\dotaccent{g}}
9372 \DeclareUnicodeCharacter{0124}{\^H}
9373 \DeclareUnicodeCharacter{0125}{\^h}
9374 \DeclareUnicodeCharacter{0128}{\~I}
9375 \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
9376 \DeclareUnicodeCharacter{012A}{\=I}
9377 \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
9378 \DeclareUnicodeCharacter{012C}{\u{I}}
9379 \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
9380
9381 \DeclareUnicodeCharacter{0130}{\dotaccent{I}}
9382 \DeclareUnicodeCharacter{0131}{\dotless{i}}
9383 \DeclareUnicodeCharacter{0132}{IJ}
9384 \DeclareUnicodeCharacter{0133}{ij}
9385 \DeclareUnicodeCharacter{0134}{\^J}
9386 \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
9387 \DeclareUnicodeCharacter{0139}{\'L}
9388 \DeclareUnicodeCharacter{013A}{\'l}
9389
9390 \DeclareUnicodeCharacter{0141}{\L}
9391 \DeclareUnicodeCharacter{0142}{\l}
9392 \DeclareUnicodeCharacter{0143}{\'N}
9393 \DeclareUnicodeCharacter{0144}{\'n}
9394 \DeclareUnicodeCharacter{0147}{\v{N}}
9395 \DeclareUnicodeCharacter{0148}{\v{n}}
9396 \DeclareUnicodeCharacter{014C}{\=O}
9397 \DeclareUnicodeCharacter{014D}{\=o}
9398 \DeclareUnicodeCharacter{014E}{\u{O}}
9399 \DeclareUnicodeCharacter{014F}{\u{o}}
9400
9401 \DeclareUnicodeCharacter{0150}{\H{O}}
9402 \DeclareUnicodeCharacter{0151}{\H{o}}
9403 \DeclareUnicodeCharacter{0152}{\OE}
9404 \DeclareUnicodeCharacter{0153}{\oe}
9405 \DeclareUnicodeCharacter{0154}{\'R}
9406 \DeclareUnicodeCharacter{0155}{\'r}
9407 \DeclareUnicodeCharacter{0158}{\v{R}}
9408 \DeclareUnicodeCharacter{0159}{\v{r}}
9409 \DeclareUnicodeCharacter{015A}{\'S}
9410 \DeclareUnicodeCharacter{015B}{\'s}
9411 \DeclareUnicodeCharacter{015C}{\^S}
9412 \DeclareUnicodeCharacter{015D}{\^s}
9413 \DeclareUnicodeCharacter{015E}{\cedilla{S}}
9414 \DeclareUnicodeCharacter{015F}{\cedilla{s}}
9415
9416 \DeclareUnicodeCharacter{0160}{\v{S}}
9417 \DeclareUnicodeCharacter{0161}{\v{s}}
9418 \DeclareUnicodeCharacter{0162}{\cedilla{t}}
9419 \DeclareUnicodeCharacter{0163}{\cedilla{T}}
9420 \DeclareUnicodeCharacter{0164}{\v{T}}
9421
9422 \DeclareUnicodeCharacter{0168}{\~U}
9423 \DeclareUnicodeCharacter{0169}{\~u}
9424 \DeclareUnicodeCharacter{016A}{\=U}
9425 \DeclareUnicodeCharacter{016B}{\=u}
9426 \DeclareUnicodeCharacter{016C}{\u{U}}
9427 \DeclareUnicodeCharacter{016D}{\u{u}}
9428 \DeclareUnicodeCharacter{016E}{\ringaccent{U}}
9429 \DeclareUnicodeCharacter{016F}{\ringaccent{u}}
9430
9431 \DeclareUnicodeCharacter{0170}{\H{U}}
9432 \DeclareUnicodeCharacter{0171}{\H{u}}
9433 \DeclareUnicodeCharacter{0174}{\^W}
9434 \DeclareUnicodeCharacter{0175}{\^w}
9435 \DeclareUnicodeCharacter{0176}{\^Y}
9436 \DeclareUnicodeCharacter{0177}{\^y}
9437 \DeclareUnicodeCharacter{0178}{\"Y}
9438 \DeclareUnicodeCharacter{0179}{\'Z}
9439 \DeclareUnicodeCharacter{017A}{\'z}
9440 \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
9441 \DeclareUnicodeCharacter{017C}{\dotaccent{z}}
9442 \DeclareUnicodeCharacter{017D}{\v{Z}}
9443 \DeclareUnicodeCharacter{017E}{\v{z}}
9444
9445 \DeclareUnicodeCharacter{01C4}{D\v{Z}}
9446 \DeclareUnicodeCharacter{01C5}{D\v{z}}
9447 \DeclareUnicodeCharacter{01C6}{d\v{z}}
9448 \DeclareUnicodeCharacter{01C7}{LJ}
9449 \DeclareUnicodeCharacter{01C8}{Lj}
9450 \DeclareUnicodeCharacter{01C9}{lj}
9451 \DeclareUnicodeCharacter{01CA}{NJ}
9452 \DeclareUnicodeCharacter{01CB}{Nj}
9453 \DeclareUnicodeCharacter{01CC}{nj}
9454 \DeclareUnicodeCharacter{01CD}{\v{A}}
9455 \DeclareUnicodeCharacter{01CE}{\v{a}}
9456 \DeclareUnicodeCharacter{01CF}{\v{I}}
9457
9458 \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
9459 \DeclareUnicodeCharacter{01D1}{\v{O}}
9460 \DeclareUnicodeCharacter{01D2}{\v{o}}
9461 \DeclareUnicodeCharacter{01D3}{\v{U}}
9462 \DeclareUnicodeCharacter{01D4}{\v{u}}
9463
9464 \DeclareUnicodeCharacter{01E2}{\={\AE}}
9465 \DeclareUnicodeCharacter{01E3}{\={\ae}}
9466 \DeclareUnicodeCharacter{01E6}{\v{G}}
9467 \DeclareUnicodeCharacter{01E7}{\v{g}}
9468 \DeclareUnicodeCharacter{01E8}{\v{K}}
9469 \DeclareUnicodeCharacter{01E9}{\v{k}}
9470
9471 \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
9472 \DeclareUnicodeCharacter{01F1}{DZ}
9473 \DeclareUnicodeCharacter{01F2}{Dz}
9474 \DeclareUnicodeCharacter{01F3}{dz}
9475 \DeclareUnicodeCharacter{01F4}{\'G}
9476 \DeclareUnicodeCharacter{01F5}{\'g}
9477 \DeclareUnicodeCharacter{01F8}{\`N}
9478 \DeclareUnicodeCharacter{01F9}{\`n}
9479 \DeclareUnicodeCharacter{01FC}{\'{\AE}}
9480 \DeclareUnicodeCharacter{01FD}{\'{\ae}}
9481 \DeclareUnicodeCharacter{01FE}{\'{\O}}
9482 \DeclareUnicodeCharacter{01FF}{\'{\o}}
9483
9484 \DeclareUnicodeCharacter{021E}{\v{H}}
9485 \DeclareUnicodeCharacter{021F}{\v{h}}
9486
9487 \DeclareUnicodeCharacter{0226}{\dotaccent{A}}
9488 \DeclareUnicodeCharacter{0227}{\dotaccent{a}}
9489 \DeclareUnicodeCharacter{0228}{\cedilla{E}}
9490 \DeclareUnicodeCharacter{0229}{\cedilla{e}}
9491 \DeclareUnicodeCharacter{022E}{\dotaccent{O}}
9492 \DeclareUnicodeCharacter{022F}{\dotaccent{o}}
9493
9494 \DeclareUnicodeCharacter{0232}{\=Y}
9495 \DeclareUnicodeCharacter{0233}{\=y}
9496 \DeclareUnicodeCharacter{0237}{\dotless{j}}
9497
9498 \DeclareUnicodeCharacter{02DB}{\ogonek{ }}
9499
9500 \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
9501 \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
9502 \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
9503 \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
9504 \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
9505 \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
9506 \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
9507 \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
9508 \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
9509 \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
9510 \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
9511 \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
9512
9513 \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
9514 \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
9515
9516 \DeclareUnicodeCharacter{1E20}{\=G}
9517 \DeclareUnicodeCharacter{1E21}{\=g}
9518 \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
9519 \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
9520 \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
9521 \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
9522 \DeclareUnicodeCharacter{1E26}{\"H}
9523 \DeclareUnicodeCharacter{1E27}{\"h}
9524
9525 \DeclareUnicodeCharacter{1E30}{\'K}
9526 \DeclareUnicodeCharacter{1E31}{\'k}
9527 \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
9528 \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
9529 \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
9530 \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
9531 \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
9532 \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
9533 \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
9534 \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
9535 \DeclareUnicodeCharacter{1E3E}{\'M}
9536 \DeclareUnicodeCharacter{1E3F}{\'m}
9537
9538 \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
9539 \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
9540 \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
9541 \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
9542 \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
9543 \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
9544 \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
9545 \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
9546 \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
9547 \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
9548
9549 \DeclareUnicodeCharacter{1E54}{\'P}
9550 \DeclareUnicodeCharacter{1E55}{\'p}
9551 \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
9552 \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
9553 \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
9554 \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
9555 \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
9556 \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
9557 \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
9558 \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
9559
9560 \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
9561 \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
9562 \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
9563 \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
9564 \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
9565 \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
9566 \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
9567 \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
9568 \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
9569 \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
9570
9571 \DeclareUnicodeCharacter{1E7C}{\~V}
9572 \DeclareUnicodeCharacter{1E7D}{\~v}
9573 \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
9574 \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
9575
9576 \DeclareUnicodeCharacter{1E80}{\`W}
9577 \DeclareUnicodeCharacter{1E81}{\`w}
9578 \DeclareUnicodeCharacter{1E82}{\'W}
9579 \DeclareUnicodeCharacter{1E83}{\'w}
9580 \DeclareUnicodeCharacter{1E84}{\"W}
9581 \DeclareUnicodeCharacter{1E85}{\"w}
9582 \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
9583 \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
9584 \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
9585 \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
9586 \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
9587 \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
9588 \DeclareUnicodeCharacter{1E8C}{\"X}
9589 \DeclareUnicodeCharacter{1E8D}{\"x}
9590 \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
9591 \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
9592
9593 \DeclareUnicodeCharacter{1E90}{\^Z}
9594 \DeclareUnicodeCharacter{1E91}{\^z}
9595 \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
9596 \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
9597 \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
9598 \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
9599 \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
9600 \DeclareUnicodeCharacter{1E97}{\"t}
9601 \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
9602 \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
9603
9604 \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
9605 \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
9606
9607 \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
9608 \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
9609 \DeclareUnicodeCharacter{1EBC}{\~E}
9610 \DeclareUnicodeCharacter{1EBD}{\~e}
9611
9612 \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
9613 \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
9614 \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
9615 \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
9616
9617 \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
9618 \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
9619
9620 \DeclareUnicodeCharacter{1EF2}{\`Y}
9621 \DeclareUnicodeCharacter{1EF3}{\`y}
9622 \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
9623
9624 \DeclareUnicodeCharacter{1EF8}{\~Y}
9625 \DeclareUnicodeCharacter{1EF9}{\~y}
9626
9627 \DeclareUnicodeCharacter{2013}{--}
9628 \DeclareUnicodeCharacter{2014}{---}
9629 \DeclareUnicodeCharacter{2018}{\quoteleft}
9630 \DeclareUnicodeCharacter{2019}{\quoteright}
9631 \DeclareUnicodeCharacter{201A}{\quotesinglbase}
9632 \DeclareUnicodeCharacter{201C}{\quotedblleft}
9633 \DeclareUnicodeCharacter{201D}{\quotedblright}
9634 \DeclareUnicodeCharacter{201E}{\quotedblbase}
9635 \DeclareUnicodeCharacter{2022}{\bullet}
9636 \DeclareUnicodeCharacter{2026}{\dots}
9637 \DeclareUnicodeCharacter{2039}{\guilsinglleft}
9638 \DeclareUnicodeCharacter{203A}{\guilsinglright}
9639 \DeclareUnicodeCharacter{20AC}{\euro}
9640
9641 \DeclareUnicodeCharacter{2192}{\expansion}
9642 \DeclareUnicodeCharacter{21D2}{\result}
9643
9644 \DeclareUnicodeCharacter{2212}{\minus}
9645 \DeclareUnicodeCharacter{2217}{\point}
9646 \DeclareUnicodeCharacter{2261}{\equiv}
9647 }% end of \utfeightchardefs
9648
9649
9650 % US-ASCII character definitions.
9651 \def\asciichardefs{% nothing need be done
9652 \relax
9653 }
9654
9655 % Make non-ASCII characters printable again for compatibility with
9656 % existing Texinfo documents that may use them, even without declaring a
9657 % document encoding.
9658 %
9659 \setnonasciicharscatcode \other
9660
9661
9662 \message{formatting,}
9663
9664 \newdimen\defaultparindent \defaultparindent = 15pt
9665
9666 \chapheadingskip = 15pt plus 4pt minus 2pt
9667 \secheadingskip = 12pt plus 3pt minus 2pt
9668 \subsecheadingskip = 9pt plus 2pt minus 2pt
9669
9670 % Prevent underfull vbox error messages.
9671 \vbadness = 10000
9672
9673 % Don't be very finicky about underfull hboxes, either.
9674 \hbadness = 6666
9675
9676 % Following George Bush, get rid of widows and orphans.
9677 \widowpenalty=10000
9678 \clubpenalty=10000
9679
9680 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're
9681 % using an old version of TeX, don't do anything. We want the amount of
9682 % stretch added to depend on the line length, hence the dependence on
9683 % \hsize. We call this whenever the paper size is set.
9684 %
9685 \def\setemergencystretch{%
9686 \ifx\emergencystretch\thisisundefined
9687 % Allow us to assign to \emergencystretch anyway.
9688 \def\emergencystretch{\dimen0}%
9689 \else
9690 \emergencystretch = .15\hsize
9691 \fi
9692 }
9693
9694 % Parameters in order: 1) textheight; 2) textwidth;
9695 % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
9696 % 7) physical page height; 8) physical page width.
9697 %
9698 % We also call \setleading{\textleading}, so the caller should define
9699 % \textleading. The caller should also set \parskip.
9700 %
9701 \def\internalpagesizes#1#2#3#4#5#6#7#8{%
9702 \voffset = #3\relax
9703 \topskip = #6\relax
9704 \splittopskip = \topskip
9705 %
9706 \vsize = #1\relax
9707 \advance\vsize by \topskip
9708 \outervsize = \vsize
9709 \advance\outervsize by 2\topandbottommargin
9710 \pageheight = \vsize
9711 %
9712 \hsize = #2\relax
9713 \outerhsize = \hsize
9714 \advance\outerhsize by 0.5in
9715 \pagewidth = \hsize
9716 %
9717 \normaloffset = #4\relax
9718 \bindingoffset = #5\relax
9719 %
9720 \ifpdf
9721 \pdfpageheight #7\relax
9722 \pdfpagewidth #8\relax
9723 % if we don't reset these, they will remain at "1 true in" of
9724 % whatever layout pdftex was dumped with.
9725 \pdfhorigin = 1 true in
9726 \pdfvorigin = 1 true in
9727 \fi
9728 %
9729 \setleading{\textleading}
9730 %
9731 \parindent = \defaultparindent
9732 \setemergencystretch
9733 }
9734
9735 % @letterpaper (the default).
9736 \def\letterpaper{{\globaldefs = 1
9737 \parskip = 3pt plus 2pt minus 1pt
9738 \textleading = 13.2pt
9739 %
9740 % If page is nothing but text, make it come out even.
9741 \internalpagesizes{607.2pt}{6in}% that's 46 lines
9742 {\voffset}{.25in}%
9743 {\bindingoffset}{36pt}%
9744 {11in}{8.5in}%
9745 }}
9746
9747 % Use @smallbook to reset parameters for 7x9.25 trim size.
9748 \def\smallbook{{\globaldefs = 1
9749 \parskip = 2pt plus 1pt
9750 \textleading = 12pt
9751 %
9752 \internalpagesizes{7.5in}{5in}%
9753 {-.2in}{0in}%
9754 {\bindingoffset}{16pt}%
9755 {9.25in}{7in}%
9756 %
9757 \lispnarrowing = 0.3in
9758 \tolerance = 700
9759 \hfuzz = 1pt
9760 \contentsrightmargin = 0pt
9761 \defbodyindent = .5cm
9762 }}
9763
9764 % Use @smallerbook to reset parameters for 6x9 trim size.
9765 % (Just testing, parameters still in flux.)
9766 \def\smallerbook{{\globaldefs = 1
9767 \parskip = 1.5pt plus 1pt
9768 \textleading = 12pt
9769 %
9770 \internalpagesizes{7.4in}{4.8in}%
9771 {-.2in}{-.4in}%
9772 {0pt}{14pt}%
9773 {9in}{6in}%
9774 %
9775 \lispnarrowing = 0.25in
9776 \tolerance = 700
9777 \hfuzz = 1pt
9778 \contentsrightmargin = 0pt
9779 \defbodyindent = .4cm
9780 }}
9781
9782 % Use @afourpaper to print on European A4 paper.
9783 \def\afourpaper{{\globaldefs = 1
9784 \parskip = 3pt plus 2pt minus 1pt
9785 \textleading = 13.2pt
9786 %
9787 % Double-side printing via postscript on Laserjet 4050
9788 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
9789 % To change the settings for a different printer or situation, adjust
9790 % \normaloffset until the front-side and back-side texts align. Then
9791 % do the same for \bindingoffset. You can set these for testing in
9792 % your texinfo source file like this:
9793 % @tex
9794 % \global\normaloffset = -6mm
9795 % \global\bindingoffset = 10mm
9796 % @end tex
9797 \internalpagesizes{673.2pt}{160mm}% that's 51 lines
9798 {\voffset}{\hoffset}%
9799 {\bindingoffset}{44pt}%
9800 {297mm}{210mm}%
9801 %
9802 \tolerance = 700
9803 \hfuzz = 1pt
9804 \contentsrightmargin = 0pt
9805 \defbodyindent = 5mm
9806 }}
9807
9808 % Use @afivepaper to print on European A5 paper.
9809 % From romildo@urano.iceb.ufop.br, 2 July 2000.
9810 % He also recommends making @example and @lisp be small.
9811 \def\afivepaper{{\globaldefs = 1
9812 \parskip = 2pt plus 1pt minus 0.1pt
9813 \textleading = 12.5pt
9814 %
9815 \internalpagesizes{160mm}{120mm}%
9816 {\voffset}{\hoffset}%
9817 {\bindingoffset}{8pt}%
9818 {210mm}{148mm}%
9819 %
9820 \lispnarrowing = 0.2in
9821 \tolerance = 800
9822 \hfuzz = 1.2pt
9823 \contentsrightmargin = 0pt
9824 \defbodyindent = 2mm
9825 \tableindent = 12mm
9826 }}
9827
9828 % A specific text layout, 24x15cm overall, intended for A4 paper.
9829 \def\afourlatex{{\globaldefs = 1
9830 \afourpaper
9831 \internalpagesizes{237mm}{150mm}%
9832 {\voffset}{4.6mm}%
9833 {\bindingoffset}{7mm}%
9834 {297mm}{210mm}%
9835 %
9836 % Must explicitly reset to 0 because we call \afourpaper.
9837 \globaldefs = 0
9838 }}
9839
9840 % Use @afourwide to print on A4 paper in landscape format.
9841 \def\afourwide{{\globaldefs = 1
9842 \afourpaper
9843 \internalpagesizes{241mm}{165mm}%
9844 {\voffset}{-2.95mm}%
9845 {\bindingoffset}{7mm}%
9846 {297mm}{210mm}%
9847 \globaldefs = 0
9848 }}
9849
9850 % @pagesizes TEXTHEIGHT[,TEXTWIDTH]
9851 % Perhaps we should allow setting the margins, \topskip, \parskip,
9852 % and/or leading, also. Or perhaps we should compute them somehow.
9853 %
9854 \parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
9855 \def\pagesizesyyy#1,#2,#3\finish{{%
9856 \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
9857 \globaldefs = 1
9858 %
9859 \parskip = 3pt plus 2pt minus 1pt
9860 \setleading{\textleading}%
9861 %
9862 \dimen0 = #1\relax
9863 \advance\dimen0 by \voffset
9864 %
9865 \dimen2 = \hsize
9866 \advance\dimen2 by \normaloffset
9867 %
9868 \internalpagesizes{#1}{\hsize}%
9869 {\voffset}{\normaloffset}%
9870 {\bindingoffset}{44pt}%
9871 {\dimen0}{\dimen2}%
9872 }}
9873
9874 % Set default to letter.
9875 %
9876 \letterpaper
9877
9878
9879 \message{and turning on texinfo input format.}
9880
9881 \def^^L{\par} % remove \outer, so ^L can appear in an @comment
9882
9883 % DEL is a comment character, in case @c does not suffice.
9884 \catcode`\^^? = 14
9885
9886 % Define macros to output various characters with catcode for normal text.
9887 \catcode`\"=\other \def\normaldoublequote{"}
9888 \catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
9889 \catcode`\+=\other \def\normalplus{+}
9890 \catcode`\<=\other \def\normalless{<}
9891 \catcode`\>=\other \def\normalgreater{>}
9892 \catcode`\^=\other \def\normalcaret{^}
9893 \catcode`\_=\other \def\normalunderscore{_}
9894 \catcode`\|=\other \def\normalverticalbar{|}
9895 \catcode`\~=\other \def\normaltilde{~}
9896
9897 % This macro is used to make a character print one way in \tt
9898 % (where it can probably be output as-is), and another way in other fonts,
9899 % where something hairier probably needs to be done.
9900 %
9901 % #1 is what to print if we are indeed using \tt; #2 is what to print
9902 % otherwise. Since all the Computer Modern typewriter fonts have zero
9903 % interword stretch (and shrink), and it is reasonable to expect all
9904 % typewriter fonts to have this, we can check that font parameter.
9905 %
9906 \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
9907
9908 % Same as above, but check for italic font. Actually this also catches
9909 % non-italic slanted fonts since it is impossible to distinguish them from
9910 % italic fonts. But since this is only used by $ and it uses \sl anyway
9911 % this is not a problem.
9912 \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
9913
9914 % Turn off all special characters except @
9915 % (and those which the user can use as if they were ordinary).
9916 % Most of these we simply print from the \tt font, but for some, we can
9917 % use math or other variants that look better in normal text.
9918
9919 \catcode`\"=\active
9920 \def\activedoublequote{{\tt\char34}}
9921 \let"=\activedoublequote
9922 \catcode`\~=\active
9923 \def~{{\tt\char126}}
9924 \chardef\hat=`\^
9925 \catcode`\^=\active
9926 \def^{{\tt \hat}}
9927
9928 \catcode`\_=\active
9929 \def_{\ifusingtt\normalunderscore\_}
9930 \let\realunder=_
9931 % Subroutine for the previous macro.
9932 \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
9933
9934 \catcode`\|=\active
9935 \def|{{\tt\char124}}
9936 \chardef \less=`\<
9937 \catcode`\<=\active
9938 \def<{{\tt \less}}
9939 \chardef \gtr=`\>
9940 \catcode`\>=\active
9941 \def>{{\tt \gtr}}
9942 \catcode`\+=\active
9943 \def+{{\tt \char 43}}
9944 \catcode`\$=\active
9945 \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
9946
9947 % If a .fmt file is being used, characters that might appear in a file
9948 % name cannot be active until we have parsed the command line.
9949 % So turn them off again, and have \everyjob (or @setfilename) turn them on.
9950 % \otherifyactive is called near the end of this file.
9951 \def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
9952
9953 % Used sometimes to turn off (effectively) the active characters even after
9954 % parsing them.
9955 \def\turnoffactive{%
9956 \normalturnoffactive
9957 \otherbackslash
9958 }
9959
9960 \catcode`\@=0
9961
9962 % \backslashcurfont outputs one backslash character in current font,
9963 % as in \char`\\.
9964 \global\chardef\backslashcurfont=`\\
9965 \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
9966
9967 % \realbackslash is an actual character `\' with catcode other, and
9968 % \doublebackslash is two of them (for the pdf outlines).
9969 {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
9970
9971 % In texinfo, backslash is an active character; it prints the backslash
9972 % in fixed width font.
9973 \catcode`\\=\active % @ for escape char from now on.
9974
9975 % The story here is that in math mode, the \char of \backslashcurfont
9976 % ends up printing the roman \ from the math symbol font (because \char
9977 % in math mode uses the \mathcode, and plain.tex sets
9978 % \mathcode`\\="026E). It seems better for @backslashchar{} to always
9979 % print a typewriter backslash, hence we use an explicit \mathchar,
9980 % which is the decimal equivalent of "715c (class 7, e.g., use \fam;
9981 % ignored family value; char position "5C). We can't use " for the
9982 % usual hex value because it has already been made active.
9983 @def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
9984 @let@backslashchar = @normalbackslash % @backslashchar{} is for user documents.
9985
9986 % On startup, @fixbackslash assigns:
9987 % @let \ = @normalbackslash
9988 % \rawbackslash defines an active \ to do \backslashcurfont.
9989 % \otherbackslash defines an active \ to be a literal `\' character with
9990 % catcode other. We switch back and forth between these.
9991 @gdef@rawbackslash{@let\=@backslashcurfont}
9992 @gdef@otherbackslash{@let\=@realbackslash}
9993
9994 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
9995 % the literal character `\'. Also revert - to its normal character, in
9996 % case the active - from code has slipped in.
9997 %
9998 {@catcode`- = @active
9999 @gdef@normalturnoffactive{%
10000 @let-=@normaldash
10001 @let"=@normaldoublequote
10002 @let$=@normaldollar %$ font-lock fix
10003 @let+=@normalplus
10004 @let<=@normalless
10005 @let>=@normalgreater
10006 @let\=@normalbackslash
10007 @let^=@normalcaret
10008 @let_=@normalunderscore
10009 @let|=@normalverticalbar
10010 @let~=@normaltilde
10011 @markupsetuplqdefault
10012 @markupsetuprqdefault
10013 @unsepspaces
10014 }
10015 }
10016
10017 % Make _ and + \other characters, temporarily.
10018 % This is canceled by @fixbackslash.
10019 @otherifyactive
10020
10021 % If a .fmt file is being used, we don't want the `\input texinfo' to show up.
10022 % That is what \eatinput is for; after that, the `\' should revert to printing
10023 % a backslash.
10024 %
10025 @gdef@eatinput input texinfo{@fixbackslash}
10026 @global@let\ = @eatinput
10027
10028 % On the other hand, perhaps the file did not have a `\input texinfo'. Then
10029 % the first `\' in the file would cause an error. This macro tries to fix
10030 % that, assuming it is called before the first `\' could plausibly occur.
10031 % Also turn back on active characters that might appear in the input
10032 % file name, in case not using a pre-dumped format.
10033 %
10034 @gdef@fixbackslash{%
10035 @ifx\@eatinput @let\ = @normalbackslash @fi
10036 @catcode`+=@active
10037 @catcode`@_=@active
10038 }
10039
10040 % Say @foo, not \foo, in error messages.
10041 @escapechar = `@@
10042
10043 % These (along with & and #) are made active for url-breaking, so need
10044 % active definitions as the normal characters.
10045 @def@normaldot{.}
10046 @def@normalquest{?}
10047 @def@normalslash{/}
10048
10049 % These look ok in all fonts, so just make them not special.
10050 % @hashchar{} gets its own user-level command, because of #line.
10051 @catcode`@& = @other @def@normalamp{&}
10052 @catcode`@# = @other @def@normalhash{#}
10053 @catcode`@% = @other @def@normalpercent{%}
10054
10055 @let @hashchar = @normalhash
10056
10057 @c Finally, make ` and ' active, so that txicodequoteundirected and
10058 @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
10059 @c don't make ` and ' active, @code will not get them as active chars.
10060 @c Do this last of all since we use ` in the previous @catcode assignments.
10061 @catcode`@'=@active
10062 @catcode`@`=@active
10063 @markupsetuplqdefault
10064 @markupsetuprqdefault
10065
10066 @c Local variables:
10067 @c eval: (add-hook 'write-file-hooks 'time-stamp)
10068 @c page-delimiter: "^\\\\message"
10069 @c time-stamp-start: "def\\\\texinfoversion{"
10070 @c time-stamp-format: "%:y-%02m-%02d.%02H"
10071 @c time-stamp-end: "}"
10072 @c End:
10073
10074 @c vim:sw=2:
10075
10076 @ignore
10077 arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
10078 @end ignore