1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-22 19:44:10 +02:00

Use Gnulib's version-etc-fsf' for --version' and `--help' output.

* m4/gnulib-cache.m4: Add `version-etc-fsf'.  Switch to LGPLv3+.

* GUILE-VERSION (PACKAGE): Change to "GNU Guile".

* Makefile.am (distdir): New variable.

* libguile/script.c (scm_shell_usage): Improve formatting.  Use
  `emit_bug_reporting_address ()'.
  (scm_compile_shell_switches): Use `version_etc ()'.
This commit is contained in:
Ludovic Courtès 2009-11-17 22:03:13 +01:00
parent 8bcecbd302
commit 4f02b98d0e
18 changed files with 899 additions and 50 deletions

View file

@ -1,10 +1,10 @@
# environ.m4 serial 2
# environ.m4 serial 3
dnl Copyright (C) 2001-2004, 2006-2009 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.
AC_DEFUN([gl_ENVIRON],
AC_DEFUN_ONCE([gl_ENVIRON],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
dnl Persuade glibc <unistd.h> to declare environ.

View file

@ -15,7 +15,7 @@
# Specification in the form of a command-line invocation:
# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl --no-vc-files alignof alloca-opt autobuild byteswap canonicalize-lgpl environ extensions flock fpieee full-read full-write havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string verify vsnprintf warnings
# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=3 --libtool --macro-prefix=gl --no-vc-files alignof alloca-opt autobuild byteswap canonicalize-lgpl environ extensions flock fpieee full-read full-write havelib iconv_open-utf inet_ntop inet_pton lib-symbol-versions lib-symbol-visibility libunistring putenv stdlib strcase strftime striconveh string verify version-etc-fsf vsnprintf warnings
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
@ -45,6 +45,7 @@ gl_MODULES([
striconveh
string
verify
version-etc-fsf
vsnprintf
warnings
])
@ -55,7 +56,7 @@ gl_PO_BASE([])
gl_DOC_BASE([doc])
gl_TESTS_BASE([tests])
gl_LIB([libgnu])
gl_LGPL
gl_LGPL([3])
gl_MAKEFILE_NAME([])
gl_LIBTOOL
gl_MACRO_PREFIX([gl])

View file

@ -29,6 +29,11 @@ AC_DEFUN([gl_EARLY],
AB_INIT
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_FP_IEEE])
dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC
dnl shouldn't hurt, though installers are on their own to set c99 mode.
AC_REQUIRE([AC_PROG_CC_STDC])
])
# This macro should be invoked from ./configure.ac, in the section
@ -58,6 +63,8 @@ AC_DEFUN([gl_INIT],
gl_FLOAT_H
gl_FUNC_FLOCK
gl_HEADER_SYS_FILE_MODULE_INDICATOR([flock])
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
AM_ICONV
gl_ICONV_H
gl_FUNC_ICONV_OPEN
@ -101,6 +108,7 @@ AC_DEFUN([gl_INIT],
gt_TYPE_SSIZE_T
gl_FUNC_STAT
gl_SYS_STAT_MODULE_INDICATOR([stat])
gl_STDARG_H
AM_STDBOOL_H
gl_STDDEF_H
gl_STDINT_H
@ -128,6 +136,7 @@ AC_DEFUN([gl_INIT],
gl_MODULE_INDICATOR([unistr/u8-mbtoucr])
gl_MODULE_INDICATOR([unistr/u8-uctomb])
gl_FUNC_VASNPRINTF
gl_VERSION_ETC
gl_FUNC_VSNPRINTF
gl_STDIO_MODULE_INDICATOR([vsnprintf])
AC_SUBST([WARN_CFLAGS])
@ -286,6 +295,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/full-read.h
lib/full-write.c
lib/full-write.h
lib/gettext.h
lib/iconv.c
lib/iconv.in.h
lib/iconv_close.c
@ -326,6 +336,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/safe-write.h
lib/size_max.h
lib/stat.c
lib/stdarg.in.h
lib/stdbool.in.h
lib/stddef.in.h
lib/stdint.in.h
@ -360,6 +371,9 @@ AC_DEFUN([gl_FILE_LIST], [
lib/vasnprintf.c
lib/vasnprintf.h
lib/verify.h
lib/version-etc-fsf.c
lib/version-etc.c
lib/version-etc.h
lib/vsnprintf.c
lib/wchar.in.h
lib/write.c
@ -424,6 +438,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/sockpfaf.m4
m4/ssize_t.m4
m4/stat.m4
m4/stdarg.m4
m4/stdbool.m4
m4/stddef_h.m4
m4/stdint.m4
@ -442,6 +457,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/tm_gmtoff.m4
m4/unistd_h.m4
m4/vasnprintf.m4
m4/version-etc.m4
m4/visibility.m4
m4/vsnprintf.m4
m4/warnings.m4

67
m4/stdarg.m4 Normal file
View file

@ -0,0 +1,67 @@
# stdarg.m4 serial 3
dnl Copyright (C) 2006, 2008-2009 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 From Bruno Haible.
dnl Provide a working va_copy in combination with <stdarg.h>.
AC_DEFUN([gl_STDARG_H],
[
STDARG_H=''; AC_SUBST([STDARG_H])
NEXT_STDARG_H='<stdarg.h>'; AC_SUBST([NEXT_STDARG_H])
AC_MSG_CHECKING([for va_copy])
AC_CACHE_VAL([gl_cv_func_va_copy], [
AC_TRY_COMPILE([#include <stdarg.h>], [
#ifndef va_copy
void (*func) (va_list, va_list) = va_copy;
#endif
],
[gl_cv_func_va_copy=yes], [gl_cv_func_va_copy=no])])
AC_MSG_RESULT([$gl_cv_func_va_copy])
if test $gl_cv_func_va_copy = no; then
dnl Provide a substitute.
dnl Usually a simple definition in <config.h> is enough. Not so on AIX 5
dnl with some versions of the /usr/vac/bin/cc compiler. It has an <stdarg.h>
dnl which does '#undef va_copy', leading to a missing va_copy symbol. For
dnl this platform, we use an <stdarg.h> substitute. But we cannot use this
dnl approach on other platforms, because <stdarg.h> often defines only
dnl preprocessor macros and gl_ABSOLUTE_HEADER, gl_CHECK_NEXT_HEADERS do
dnl not work in this situation.
AC_EGREP_CPP([vaccine],
[#if defined _AIX && !defined __GNUC__
AIX vaccine
#endif
], [gl_aixcc=yes], [gl_aixcc=no])
if test $gl_aixcc = yes; then
dnl Provide a substitute <stdarg.h> file.
STDARG_H=stdarg.h
gl_CHECK_NEXT_HEADERS([stdarg.h])
dnl Fallback for the case when <stdarg.h> contains only macro definitions.
if test "$gl_cv_next_stdarg_h" = '""'; then
gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
NEXT_STDARG_H="$gl_cv_next_stdarg_h"
fi
else
dnl Provide a substitute in <config.h>, either __va_copy or as a simple
dnl assignment.
gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [
AC_TRY_COMPILE([#include <stdarg.h>], [
#ifndef __va_copy
error, bail out
#endif
],
[gl_cv_func___va_copy=yes], [gl_cv_func___va_copy=no])])
if test $gl_cv_func___va_copy = yes; then
AC_DEFINE([va_copy], [__va_copy],
[Define as a macro for copying va_list variables.])
else
AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */
#define gl_va_copy(a,b) ((a) = (b))])
AC_DEFINE([va_copy], [gl_va_copy],
[Define as a macro for copying va_list variables.])
fi
fi
fi
])

View file

@ -80,6 +80,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
VOID_UNSETENV=0; AC_SUBST([VOID_UNSETENV])
REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV])
])

33
m4/version-etc.m4 Normal file
View file

@ -0,0 +1,33 @@
# version-etc.m4 serial 1
# Copyright (C) 2009 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
dnl $1 - configure flag and define name
dnl $2 - human readable description
m4_define([gl_VERSION_ETC_FLAG],
[dnl
AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1], [$2])],
[dnl
case $withval in
yes|no) ;;
*) AC_DEFINE_UNQUOTED(AS_TR_CPP([PACKAGE_$1]), ["$withval"], [$2]) ;;
esac
])
])
AC_DEFUN([gl_VERSION_ETC],
[dnl
gl_VERSION_ETC_FLAG([packager],
[String identifying the packager of this software])
gl_VERSION_ETC_FLAG([packager-version],
[Packager-specific version information])
gl_VERSION_ETC_FLAG([packager-bug-reports],
[Packager info for bug reports (URL/e-mail/...)])
if test "X$with_packager" = "X" && \
test "X$with_packager_version$with_packager_bug_reports" != "X"
then
AC_MSG_ERROR([The --with-packager-{bug-reports,version} options require --with-packager])
fi
])