# gendocs.sh -- generate a GNU manual in many formats. This script is
# mentioned in maintain.texi. See the help message below for usage details.
-scriptversion=2006-07-15.08
+scriptversion=2007-04-02.15
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
#
scripturl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs.sh"
templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs_template"
+: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
: ${MAKEINFO="makeinfo"}
: ${TEXI2DVI="texi2dvi -t @finalout"}
: ${DVIPS="dvips"}
-: ${DOCBOOK2TXT="docbook2txt"}
: ${DOCBOOK2HTML="docbook2html"}
: ${DOCBOOK2PDF="docbook2pdf"}
: ${DOCBOOK2PS="docbook2ps"}
+: ${DOCBOOK2TXT="docbook2txt"}
: ${GENDOCS_TEMPLATE_DIR="."}
unset CDPATH
version="gendocs.sh $scriptversion
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2007 Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING."
directory with -o each time. Then write (by hand) an overall index.html
with links to them all.
+If a manual's texinfo sources are spread across several directories,
+first copy or symlink all Texinfo sources into a single directory.
+(Part of the script's work is to make a tar.gz of the sources.)
+
You can set the environment variables MAKEINFO, TEXI2DVI, and DVIPS to
control the programs that get executed, and GENDOCS_TEMPLATE_DIR to
-control where the gendocs_template file is looked for.
+control where the gendocs_template file is looked for. (With --docbook,
+the environment variables DOCBOOK2HTML, DOCBOOK2PDF, DOCBOOK2PS, and
+DOCBOOK2TXT are also respected.)
+
+By default, makeinfo is run in the default (English) locale, since
+that's the language of most Texinfo manuals. If you happen to have a
+non-English manual and non-English web site, check the SETLANG setting
+in the source.
Email bug reports or enhancement requests to bug-texinfo@gnu.org.
"
echo Generating output formats for $srcfile
-cmd="${MAKEINFO} -o $PACKAGE.info \"$srcfile\""
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.info \"$srcfile\""
echo "Generating info files... ($cmd)"
eval "$cmd"
mkdir -p $outdir/
pdf_size=`calcsize $PACKAGE.pdf`
mv $PACKAGE.pdf $outdir/
-cmd="${MAKEINFO} -o $PACKAGE.txt --no-split --no-headers \"$srcfile\""
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.txt --no-split --no-headers \"$srcfile\""
echo "Generating ASCII... ($cmd)"
eval "$cmd"
ascii_size=`calcsize $PACKAGE.txt`
ascii_gz_size=`calcsize $outdir/$PACKAGE.txt.gz`
mv $PACKAGE.txt $outdir/
-cmd="${MAKEINFO} --no-split --html -o $PACKAGE.html $html \"$srcfile\""
+cmd="$SETLANG $MAKEINFO --no-split --html -o $PACKAGE.html $html \"$srcfile\""
echo "Generating monolithic html... ($cmd)"
rm -rf $PACKAGE.html # in case a directory is left over
eval "$cmd"
html_mono_gz_size=`calcsize $outdir/$PACKAGE.html.gz`
mv $PACKAGE.html $outdir/
-cmd="${MAKEINFO} --html -o $PACKAGE.html $html \"$srcfile\""
+cmd="$SETLANG $MAKEINFO --html -o $PACKAGE.html $html \"$srcfile\""
echo "Generating html by node... ($cmd)"
eval "$cmd"
split_html_dir=$PACKAGE.html
texi_tgz_size=`calcsize $outdir/$PACKAGE.texi.tar.gz`
if test -n "$docbook"; then
- cmd="${MAKEINFO} -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml"
+ cmd="$SETLANG $MAKEINFO -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml"
echo "Generating docbook XML... $(cmd)"
eval "$cmd"
docbook_xml_size=`calcsize $PACKAGE-db.xml`
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifndef _STDBOOL_H
-#define _STDBOOL_H
+#ifndef _GL_STDBOOL_H
+#define _GL_STDBOOL_H
/* ISO C 99 <stdbool.h> for platforms that lack it. */
#define true 1
#define __bool_true_false_are_defined 1
-#endif /* _STDBOOL_H */
+#endif /* _GL_STDBOOL_H */
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=lgl gc gc-arcfour gc-arctwo gc-des gc-hmac-md5 gc-md2 gc-md4 gc-md5 gc-pbkdf2-sha1 gc-random gc-rijndael gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
+# Reproduce by: gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=lgl crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
AUTOMAKE_OPTIONS = 1.5 gnits
## end gnulib module alloca-opt
-## begin gnulib module gc
+## begin gnulib module crypto/gc
if GL_COND_LIBTOOL
liblgnu_la_LDFLAGS += $(LTLIBGCRYPT)
EXTRA_liblgnu_la_SOURCES += gc-gnulib.c gc-libgcrypt.c
-## end gnulib module gc
+## end gnulib module crypto/gc
-## begin gnulib module gc-arcfour
+## begin gnulib module crypto/gc-arcfour
EXTRA_DIST += arcfour.c arcfour.h
EXTRA_liblgnu_la_SOURCES += arcfour.c
-## end gnulib module gc-arcfour
+## end gnulib module crypto/gc-arcfour
-## begin gnulib module gc-arctwo
+## begin gnulib module crypto/gc-arctwo
EXTRA_DIST += arctwo.c arctwo.h
EXTRA_liblgnu_la_SOURCES += arctwo.c
-## end gnulib module gc-arctwo
+## end gnulib module crypto/gc-arctwo
-## begin gnulib module gc-des
+## begin gnulib module crypto/gc-des
EXTRA_DIST += des.c des.h
EXTRA_liblgnu_la_SOURCES += des.c
-## end gnulib module gc-des
+## end gnulib module crypto/gc-des
-## begin gnulib module gc-hmac-md5
+## begin gnulib module crypto/gc-hmac-md5
EXTRA_DIST += hmac-md5.c hmac.h md5.c md5.h memxor.c memxor.h
EXTRA_liblgnu_la_SOURCES += hmac-md5.c md5.c memxor.c
-## end gnulib module gc-hmac-md5
+## end gnulib module crypto/gc-hmac-md5
-## begin gnulib module gc-hmac-sha1
+## begin gnulib module crypto/gc-hmac-sha1
EXTRA_DIST += hmac-sha1.c hmac.h memxor.c memxor.h sha1.c sha1.h
EXTRA_liblgnu_la_SOURCES += hmac-sha1.c memxor.c sha1.c
-## end gnulib module gc-hmac-sha1
+## end gnulib module crypto/gc-hmac-sha1
-## begin gnulib module gc-md4
+## begin gnulib module crypto/gc-md4
EXTRA_DIST += md4.c md4.h
EXTRA_liblgnu_la_SOURCES += md4.c
-## end gnulib module gc-md4
+## end gnulib module crypto/gc-md4
-## begin gnulib module gc-md5
+## begin gnulib module crypto/gc-md5
liblgnu_la_SOURCES += md5.h
EXTRA_liblgnu_la_SOURCES += md5.c
-## end gnulib module gc-md5
+## end gnulib module crypto/gc-md5
-## begin gnulib module gc-pbkdf2-sha1
+## begin gnulib module crypto/gc-pbkdf2-sha1
EXTRA_DIST += gc-pbkdf2-sha1.c
EXTRA_liblgnu_la_SOURCES += gc-pbkdf2-sha1.c
-## end gnulib module gc-pbkdf2-sha1
+## end gnulib module crypto/gc-pbkdf2-sha1
-## begin gnulib module gc-rijndael
+## begin gnulib module crypto/gc-rijndael
EXTRA_DIST += rijndael-alg-fst.c rijndael-alg-fst.h rijndael-api-fst.c rijndael-api-fst.h
EXTRA_liblgnu_la_SOURCES += rijndael-alg-fst.c rijndael-api-fst.c
-## end gnulib module gc-rijndael
+## end gnulib module crypto/gc-rijndael
-## begin gnulib module gc-sha1
+## begin gnulib module crypto/gc-sha1
EXTRA_DIST += sha1.c sha1.h
EXTRA_liblgnu_la_SOURCES += sha1.c
-## end gnulib module gc-sha1
+## end gnulib module crypto/gc-sha1
+
+## begin gnulib module crypto/md2
+
+
+EXTRA_DIST += md2.c md2.h
+
+EXTRA_liblgnu_la_SOURCES += md2.c
+
+## end gnulib module crypto/md2
## begin gnulib module gettext
## end gnulib module link-warning
-## begin gnulib module md2
-
-
-EXTRA_DIST += md2.c md2.h
-
-EXTRA_liblgnu_la_SOURCES += md2.c
-
-## end gnulib module md2
-
## begin gnulib module memmem
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001, 2002, 2003, 2004, 2006 Free Software
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2007 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
means there is a real alloca function. */
-#ifndef _GNULIB_ALLOCA_H
-# define _GNULIB_ALLOCA_H
+#ifndef _GL_ALLOCA_H
+#define _GL_ALLOCA_H
/* alloca (N) returns a pointer to N bytes of memory
allocated on the stack, which will last until the function returns.
# endif
#endif
-#endif /* _GNULIB_ALLOCA_H */
+#endif /* _GL_ALLOCA_H */
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
#include <config.h>
/* Specification. */
-#include <stdio.h>
+#ifdef IN_LIBASPRINTF
+# include "vasprintf.h"
+#else
+# include <stdio.h>
+#endif
#include <stdarg.h>
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=lgl gc gc-arcfour gc-arctwo gc-des gc-hmac-md5 gc-md2 gc-md4 gc-md5 gc-pbkdf2-sha1 gc-random gc-rijndael gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
+# gnulib-tool --import --dir=. --lib=liblgnu --source-base=lgl --m4-base=lgl/m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=lgl crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
-gl_MODULES([gc gc-arcfour gc-arctwo gc-des gc-hmac-md5 gc-md2 gc-md4 gc-md5 gc-pbkdf2-sha1 gc-random gc-rijndael gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf])
+gl_MODULES([crypto/gc crypto/gc-arcfour crypto/gc-arctwo crypto/gc-des crypto/gc-hmac-md5 crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-pbkdf2-sha1 crypto/gc-random crypto/gc-rijndael crypto/gc-sha1 gettext memmem memmove minmax read-file snprintf socklen stdint strverscmp sys_socket sys_stat time_r unistd vasprintf])
gl_AVOID([])
gl_SOURCE_BASE([lgl])
gl_M4_BASE([lgl/m4])
gl_MODULE_INDICATOR([gc-rijndael])
gl_GC_SHA1
gl_MODULE_INDICATOR([gc-sha1])
+ gl_MD2
dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
AM_GNU_GETTEXT_VERSION([0.16.1])
- gl_MD2
gl_FUNC_MEMMEM
gl_STRING_MODULE_INDICATOR([memmem])
gl_FUNC_MEMMOVE
-# iconv.m4 serial AM4 (gettext-0.11.3)
-dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+# iconv.m4 serial AM5 (gettext-0.16.2)
+dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
[
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed).
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
dnl accordingly.
am_save_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
- AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+ AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
AC_TRY_LINK([#include <stdlib.h>
fi
])
if test "$am_cv_func_iconv" = yes; then
- AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
+ dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+ [case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac])
+ LIBS="$am_save_LIBS"
+ ])
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1,
+ [Define if you have the iconv() function and it works.])
fi
if test "$am_cv_lib_iconv" = yes; then
AC_MSG_CHECKING([how to link with libiconv])
AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
gt_cv_int_divbyzero_sigfpe,
[
- AC_TRY_RUN([
+ gt_cv_int_divbyzero_sigfpe=
+changequote(,)dnl
+ case "$host_os" in
+ macos* | darwin[6-9]* | darwin[1-9][0-9]*)
+ # On MacOS X 10.2 or newer, just assume the same as when cross-
+ # compiling. If we were to perform the real test, 1 Crash Report
+ # dialog window would pop up.
+ case "$host_cpu" in
+ i[34567]86 | x86_64)
+ gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
+ esac
+ ;;
+ esac
+changequote([,])dnl
+ if test -z "$gt_cv_int_divbyzero_sigfpe"; then
+ AC_TRY_RUN([
#include <stdlib.h>
#include <signal.h>
exit (1);
}
], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
- [
- # Guess based on the CPU.
+ [
+ # Guess based on the CPU.
changequote(,)dnl
- case "$host_cpu" in
- alpha* | i[34567]86 | m68k | s390*)
- gt_cv_int_divbyzero_sigfpe="guessing yes";;
- *)
- gt_cv_int_divbyzero_sigfpe="guessing no";;
- esac
+ case "$host_cpu" in
+ alpha* | i[34567]86 | x86_64 | m68k | s390*)
+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
+ *)
+ gt_cv_int_divbyzero_sigfpe="guessing no";;
+ esac
changequote([,])dnl
- ])
+ ])
+ fi
])
case "$gt_cv_int_divbyzero_sigfpe" in
*yes) value=1;;
/* Provide a more complete sys/stat header file.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */
-#ifndef _gl_SYS_STAT_H
-#define _gl_SYS_STAT_H
+#ifndef _GL_SYS_STAT_H
+#define _GL_SYS_STAT_H
/* This file is supposed to be used on platforms where <sys/stat.h> is
incomplete. It is intended to provide definitions and prototypes
# define mkdir rpl_mkdir
#endif
-#endif /* _gl_SYS_STAT_H */
+#endif /* _GL_SYS_STAT_H */
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifndef _STDBOOL_H
-#define _STDBOOL_H
+#ifndef _GL_STDBOOL_H
+#define _GL_STDBOOL_H
/* ISO C 99 <stdbool.h> for platforms that lack it. */
#define true 1
#define __bool_true_false_are_defined 1
-#endif /* _STDBOOL_H */
+#endif /* _GL_STDBOOL_H */
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
#include <config.h>
/* Specification. */
-#include <stdio.h>
+#ifdef IN_LIBASPRINTF
+# include "vasprintf.h"
+#else
+# include <stdio.h>
+#endif
#include <errno.h>
#include <limits.h>