From 39cde3c5c692a7593e7a54f741833271c10d3e77 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 8 Jun 2009 13:50:09 +0200 Subject: [PATCH] Update gnulib files. --- NEWS | 5 +++++ gl/m4/gnulib-comp.m4 | 2 ++ gl/m4/version-etc.m4 | 33 +++++++++++++++++++++++++++++++++ gl/version-etc.c | 13 +++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 gl/m4/version-etc.m4 diff --git a/NEWS b/NEWS index d771c6a..b60c8e8 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,11 @@ GNU Libtasn1 NEWS -*- outline -*- - Fixed warning in ASN1.y. - Use "Software libraries" info dircategory. - Drop GPL/LGPL copies from the manual (not needed there). +- New configure parameters to set packaging specific information. + The parameters are --with-packager, --with-packager-version, and + --with-packager-bug-reports. See + for more + details. * Noteworthy changes in release 2.2 (2009-05-20) [stable] - Change how the ASN1_API decorator is used in libtasn1.h, for GTK-DOC. diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index a716362..3fae312 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -68,6 +68,7 @@ AC_DEFUN([gl_INIT], gl_STDINT_H gl_STDLIB_H gl_UNISTD_H + gl_VERSION_ETC AC_SUBST([WARN_CFLAGS]) gl_WCHAR_H m4_ifval(gl_LIBSOURCES_LIST, [ @@ -240,6 +241,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/stdint.m4 m4/stdlib_h.m4 m4/unistd_h.m4 + m4/version-etc.m4 m4/warnings.m4 m4/wchar.m4 m4/wint_t.m4 diff --git a/gl/m4/version-etc.m4 b/gl/m4/version-etc.m4 new file mode 100644 index 0000000..14d6eb6 --- /dev/null +++ b/gl/m4/version-etc.m4 @@ -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 +]) diff --git a/gl/version-etc.c b/gl/version-etc.c index 2258c2e..c3b0289 100644 --- a/gl/version-etc.c +++ b/gl/version-etc.c @@ -59,6 +59,15 @@ version_etc_va (FILE *stream, else fprintf (stream, "%s %s\n", package, version); +#ifdef PACKAGE_PACKAGER +# ifdef PACKAGE_PACKAGER_VERSION + fprintf (stream, _("Packaged by %s (%s)\n"), PACKAGE_PACKAGER, + PACKAGE_PACKAGER_VERSION); +# else + fprintf (stream, _("Packaged by %s\n"), PACKAGE_PACKAGER); +# endif +#endif + /* TRANSLATORS: Translate "(C)" to the copyright symbol (C-in-a-circle), if this symbol is available in the user's locale. Otherwise, do not translate "(C)"; leave it as-is. */ @@ -179,6 +188,10 @@ emit_bug_reporting_address (void) "Report translation bugs to <...>\n" with the address for translation bugs (typically your translation team's web or email address). */ printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); +#ifdef PACKAGE_PACKAGER_BUG_REPORTS + printf (_("Report %s bugs to <%s>.\n"), PACKAGE_PACKAGER, + PACKAGE_PACKAGER_BUG_REPORTS); +#endif printf (_("%s home page: .\n"), PACKAGE_NAME, PACKAGE); fputs (_("General help using GNU software: .\n"), -- 2.7.4