aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-11-09 22:13:45 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-11-09 22:13:45 +0000
commit8b748aed2a9ab4b964faa5722f7a182a060e475c (patch)
tree61bc3fd494c9230f44c3c84a4ac51a32711223ed
parent92e4b6a92716f8b2457376291171a6330d072b0d (diff)
downloadglibc-8b748aed2a9ab4b964faa5722f7a182a060e475c.tar.xz
glibc-8b748aed2a9ab4b964faa5722f7a182a060e475c.zip
Support --with-pkgversion and --with-bugurl.
-rw-r--r--ChangeLog94
-rw-r--r--INSTALL23
-rw-r--r--Makefile13
-rw-r--r--aclocal.m448
-rw-r--r--catgets/gencat.c9
-rw-r--r--config.h.in6
-rw-r--r--config.make.in6
-rwxr-xr-xconfigure66
-rw-r--r--configure.in7
-rw-r--r--csu/version.c4
-rw-r--r--debug/Makefile8
-rwxr-xr-xdebug/catchsegv.sh8
-rw-r--r--debug/pcprofiledump.c11
-rwxr-xr-xdebug/xtrace.sh7
-rw-r--r--elf/Makefile9
-rw-r--r--elf/dl-close.c2
-rw-r--r--elf/ldconfig.c9
-rw-r--r--elf/ldd.bash.in7
-rw-r--r--elf/pldd.c30
-rw-r--r--elf/sln.c6
-rwxr-xr-xelf/sotruss.ksh7
-rw-r--r--elf/sprof.c9
-rw-r--r--iconv/iconv_prog.c9
-rw-r--r--iconv/iconvconfig.c9
-rw-r--r--locale/programs/locale.c9
-rw-r--r--locale/programs/localedef.c16
-rw-r--r--login/programs/pt_chown.c17
-rw-r--r--malloc/Makefile8
-rwxr-xr-xmalloc/memusage.sh7
-rw-r--r--malloc/memusagestat.c15
-rw-r--r--malloc/mtrace.pl7
-rw-r--r--manual/Makefile16
-rw-r--r--manual/install.texi19
-rw-r--r--manual/libc.texinfo17
-rw-r--r--nscd/nscd.c9
-rw-r--r--nss/getent.c6
-rw-r--r--nss/makedb.c9
-rw-r--r--posix/getconf.c6
-rw-r--r--sunrpc/proto.h3
-rw-r--r--sunrpc/rpc_main.c6
-rw-r--r--sunrpc/rpcinfo.c6
-rw-r--r--sysdeps/unix/sysv/linux/lddlibc4.c6
42 files changed, 470 insertions, 119 deletions
diff --git a/ChangeLog b/ChangeLog
index 52bf3911e6..011e854ad6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,99 @@
2012-11-09 Joseph Myers <joseph@codesourcery.com>
+ * aclocal.m4 (ACX_PKGVERSION): New macro.
+ (ACX_BUGURL): Likewise.
+ * configure.in: Use ACX_PKGVERSION and ACX_BUGURL.
+ (PKGVERSION): New AC_DEFINE_UNQUOTED.
+ (REPORT_BUGS_TO): Likewise.
+ * configure: Regenerated.
+ * config.h.in (PKGVERSION): New macro.
+ (REPORT_BUGS_TO): Likewise.
+ * config.make.in (PKGVERSION): New variable.
+ (PKGVERSION_TEXI): Likewise.
+ (REPORT_BUGS_TO): Likewise.
+ (REPORT_BUGS_TEXI): Likewise.
+ * Makefile (format-me): Use -I$(common-objpfx)manual.
+ (INSTALL): Depend on $(common-objpfx)manual/pkgvers.texi.
+ ($(common-objpfx)manual/%): New target.
+ (manual/%): Remove target.
+ * catgets/gencat.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * csu/version.c (banner): Use PKGVERSION and REPORT_BUGS_TO.
+ * debug/Makefile ($(objpfx)catchsegv): Also substitute PKGVERSION
+ and REPORT_BUGS_TO.
+ ($(objpfx)xtrace): Likewise.
+ * debug/catchsegv.sh: Use PKGVERSION and REPORT_BUGS_TO.
+ * debug/pcprofiledump.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * debug/xtrace.sh (do_help): Use REPORT_BUGS_TO.
+ (do_version): Use PKGVERSION.
+ * elf/Makefile ($(objpfx)sotruss): Also substitute PKGVERSION and
+ REPORT_BUGS_TO.
+ (common-ldd-rewrite): Likewise.
+ * elf/dl-close.c (_dl_close_worker): Use REPORT_BUGS_TO.
+ * elf/ldconfig.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * elf/ldd.bash.in: Use PKGVERSION and REPORT_BUGS_TO.
+ * elf/pldd.c (argp_program_bug_address): Remove variable.
+ (more_help): New function.
+ (argp): Use more_help.
+ (print_version): Use PKGVERSION.
+ * elf/sln.c (main): Use PKGVERSION.
+ (usage): Use REPORT_BUGS_TO.
+ * elf/sotruss.ksh (do_help): Use REPORT_BUGS_TO.
+ (top level): Use PKGVERSION.
+ * elf/sprof.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * iconv/iconv_prog.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * iconv/iconvconfig.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * locale/programs/locale.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * locale/programs/localedef.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * login/programs/pt_chown.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * malloc/Makefile ($(objpfx)mtrace): Also substitute PKGVERSION
+ and BUGURL.
+ ($(objpfx)memusage): Likewise.
+ * malloc/memusage.sh (do_help): Use REPORT_BUGS_TO.
+ (do_version): Use PKGVERSION.
+ * malloc/memusagestat.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * malloc/mtrace.pl ($PACKAGE): Remove variable.
+ ($PKGVERSION): New variable.
+ ($REPORT_BUGS_TO): Likewise.
+ (usage): Use $REPORT_BUGS_TO.
+ (top level): Use $PKGVERSION.
+ * manual/Makefile (libc-texi-generated): Add pkgvers.texi.
+ ($(objpfx)pkgvers.texi): New rule.
+ ($(objpfx)stamp-pkgvers): Likewise.
+ * manual/install.texi: Include pkgvers.texi.
+ (--with-pkgversion): Document new configure option.
+ (--with-bugurl): Likewise.
+ (Reporting Bugs): Describe Bugzilla as upstream tracker rather
+ than necessarily for this particular distribution. Use
+ REPORT_BUGS_TO for where to report bugs.
+ * INSTALL: Regenerated.
+ * manual/libc.texinfo: Include pkgvers.texi.
+ [!PKGVERSION_DEFAULT]: Include PKGVERSION in version information.
+ * nscd/nscd.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * nss/getent.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * nss/makedb.c (more_help): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * posix/getconf.c (main): Use PKGVERSION and REPORT_BUGS_TO.
+ * sunrpc/proto.h [IS_IN_build] (_libc_intl_domainname): Remove
+ macro.
+ * sunrpc/rpc_main.c (options_usage): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * sunrpc/rpcinfo.c (usage): Use REPORT_BUGS_TO.
+ (print_version): Use PKGVERSION.
+ * sysdeps/unix/sysv/linux/lddlibc4.c (main): Use REPORT_BUGS_TO
+ and PKGVERSION.
+
* timezone/checktab.awk: Update from tzcode 2012i.
* timezone/ialloc.c: Likewise.
* timezone/private.h: Likewise.
diff --git a/INSTALL b/INSTALL
index d70019883a..9a0166b602 100644
--- a/INSTALL
+++ b/INSTALL
@@ -148,6 +148,19 @@ will be used, and CFLAGS sets optimization options for the compiler.
If you specify just `--build', `configure' will get confused.
+`--with-pkgversion=VERSION'
+ Specify a description, possibly including a build number or build
+ date, of the binaries being built, to be included in `--version'
+ output from programs installed with the GNU C Library. For
+ example, `--with-pkgversion='FooBar GNU/Linux glibc build 123''.
+ The default value is `GNU libc'.
+
+`--with-bugurl=URL'
+ Specify the URL that users should visit if they wish to report a
+ bug, to be included in `--help' output from programs installed with
+ the GNU C Library. The default value refers to the main
+ bug-reporting information for the GNU C Library.
+
To build the library and related programs, type `make'. This will
produce a lot of output, some of which may look like errors from `make'
but isn't. Look for error messages from `make' containing `***'.
@@ -404,10 +417,10 @@ remain unfixed for all eternity, if not longer.
It is a good idea to verify that the problem has not already been
reported. Bugs are documented in two places: The file `BUGS' describes
-a number of well known bugs and the bug tracking system has a WWW
-interface at `http://sourceware.org/bugzilla/'. The WWW interface
-gives you access to open and closed reports. A closed report normally
-includes a patch or a hint on solving the problem.
+a number of well known bugs and the central GNU C Library bug tracking
+system has a WWW interface at `http://sourceware.org/bugzilla/'. The
+WWW interface gives you access to open and closed reports. A closed
+report normally includes a patch or a hint on solving the problem.
To report a bug, first you must find it. With any luck, this will
be the hard part. Once you've found a bug, make sure it's really a
@@ -428,7 +441,7 @@ library, you really only need to narrow it down to one library function
call, if possible. This should not be too difficult.
The final step when you have a simple test case is to report the bug.
-Do this using the WWW interface to the bug database.
+Do this at `http://www.gnu.org/software/libc/bugs.html'.
If you are not sure how a function should behave, and this manual
doesn't tell you, that's a bug in the manual. Report that too! If the
diff --git a/Makefile b/Makefile
index 5617acce9e..78aaeb4d79 100644
--- a/Makefile
+++ b/Makefile
@@ -399,15 +399,18 @@ endif
define format-me
@rm -f $@
-makeinfo --no-validate --plaintext --no-number-sections $< -o $@
+makeinfo --no-validate --plaintext --no-number-sections \
+ -I$(common-objpfx)manual $< -o $@
-chmod a-w $@
endef
-INSTALL: manual/install.texi manual/macros.texi; $(format-me)
-manual/dir-add.texi manual/dir-add.info: FORCE
- $(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
+INSTALL: manual/install.texi manual/macros.texi \
+ $(common-objpfx)manual/pkgvers.texi
+ $(format-me)
+$(common-objpfx)manual/%: FORCE
+ $(MAKE) $(PARALLELMFLAGS) -C manual $@
FORCE:
-iconvdata/% localedata/% po/% manual/%: FORCE
+iconvdata/% localedata/% po/%: FORCE
$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
# glibc 2.0 contains some header files which aren't used with glibc 2.1
diff --git a/aclocal.m4 b/aclocal.m4
index 3e61dc83f3..b173e9e339 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -165,3 +165,51 @@ then
done
AC_MSG_RESULT()
fi])
+
+# These two macros are taken from GCC's config/acx.m4.
+dnl Support the --with-pkgversion configure option.
+dnl ACX_PKGVERSION(default-pkgversion)
+AC_DEFUN([ACX_PKGVERSION],[
+ AC_ARG_WITH(pkgversion,
+ AS_HELP_STRING([--with-pkgversion=PKG],
+ [Use PKG in the version string in place of "$1"]),
+ [case "$withval" in
+ yes) AC_MSG_ERROR([package version not specified]) ;;
+ no) PKGVERSION= ;;
+ *) PKGVERSION="($withval) " ;;
+ esac],
+ PKGVERSION="($1) "
+ )
+ PKGVERSION_TEXI=`echo "$PKGVERSION" | sed 's/@/@@/g'`
+ AC_SUBST(PKGVERSION)
+ AC_SUBST(PKGVERSION_TEXI)
+])
+
+dnl Support the --with-bugurl configure option.
+dnl ACX_BUGURL(default-bugurl)
+AC_DEFUN([ACX_BUGURL],[
+ AC_ARG_WITH(bugurl,
+ AS_HELP_STRING([--with-bugurl=URL],
+ [Direct users to URL to report a bug]),
+ [case "$withval" in
+ yes) AC_MSG_ERROR([bug URL not specified]) ;;
+ no) BUGURL=
+ ;;
+ *) BUGURL="$withval"
+ ;;
+ esac],
+ BUGURL="$1"
+ )
+ case ${BUGURL} in
+ "")
+ REPORT_BUGS_TO=
+ REPORT_BUGS_TEXI=
+ ;;
+ *)
+ REPORT_BUGS_TO="<$BUGURL>"
+ REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
+ ;;
+ esac;
+ AC_SUBST(REPORT_BUGS_TO)
+ AC_SUBST(REPORT_BUGS_TEXI)
+])
diff --git a/catgets/gencat.c b/catgets/gencat.c
index 26bb91d5d7..5078e3c828 100644
--- a/catgets/gencat.c
+++ b/catgets/gencat.c
@@ -227,13 +227,16 @@ parse_opt (int key, char *arg, struct argp_state *state)
static char *
more_help (int key, const char *text, void *input)
{
+ char *tp = NULL;
switch (key)
{
case ARGP_KEY_HELP_EXTRA:
/* We print some extra information. */
- return strdup (gettext ("\
+ if (asprintf (&tp, gettext ("\
For bug reporting instructions, please see:\n\
-<http://www.gnu.org/software/libc/bugs.html>.\n"));
+%s.\n"), REPORT_BUGS_TO) < 0)
+ return NULL;
+ return tp;
default:
break;
}
@@ -244,7 +247,7 @@ For bug reporting instructions, please see:\n\
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "gencat (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "gencat %s%s\n", PKGVERSION, VERSION);
fprintf (stream, gettext ("\
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
diff --git a/config.h.in b/config.h.in
index 653df54e56..f3fe6b88be 100644
--- a/config.h.in
+++ b/config.h.in
@@ -161,6 +161,12 @@
/* Define if __stack_chk_guard canary should be randomized at program startup. */
#undef ENABLE_STACKGUARD_RANDOMIZE
+/* Package description. */
+#undef PKGVERSION
+
+/* Bug reporting address. */
+#undef REPORT_BUGS_TO
+
/* Define if multi-arch DSOs should be generated. */
#undef USE_MULTIARCH
diff --git a/config.make.in b/config.make.in
index c22acf4a10..7f1bbb51d5 100644
--- a/config.make.in
+++ b/config.make.in
@@ -139,4 +139,10 @@ PERL = @PERL@
# Additional libraries.
LIBGD = @LIBGD@
+# Package versions and bug reporting configuration.
+PKGVERSION = @PKGVERSION@
+PKGVERSION_TEXI = @PKGVERSION_TEXI@
+REPORT_BUGS_TO = @REPORT_BUGS_TO@
+REPORT_BUGS_TEXI = @REPORT_BUGS_TEXI@
+
# More variables may be inserted below by configure.
diff --git a/configure b/configure
index 35b06c1473..980f25fffe 100755
--- a/configure
+++ b/configure
@@ -685,6 +685,10 @@ build_vendor
build_cpu
build
subdirs
+REPORT_BUGS_TEXI
+REPORT_BUGS_TO
+PKGVERSION_TEXI
+PKGVERSION
target_alias
host_alias
build_alias
@@ -726,6 +730,8 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+with_pkgversion
+with_bugurl
with_gd
with_gd_include
with_gd_lib
@@ -1417,6 +1423,8 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pkgversion=PKG Use PKG in the version string in place of "GNU libc"
+ --with-bugurl=URL Direct users to URL to report a bug
--with-gd=DIR find libgd include dir and library with prefix DIR
--with-gd-include=DIR find libgd include files in DIR
--with-gd-lib=DIR find libgd library files in DIR
@@ -2285,6 +2293,64 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Check whether --with-pkgversion was given.
+if test "${with_pkgversion+set}" = set; then :
+ withval=$with_pkgversion; case "$withval" in
+ yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
+ no) PKGVERSION= ;;
+ *) PKGVERSION="($withval) " ;;
+ esac
+else
+ PKGVERSION="(GNU libc) "
+
+fi
+
+ PKGVERSION_TEXI=`echo "$PKGVERSION" | sed 's/@/@@/g'`
+
+
+
+
+
+# Check whether --with-bugurl was given.
+if test "${with_bugurl+set}" = set; then :
+ withval=$with_bugurl; case "$withval" in
+ yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
+ no) BUGURL=
+ ;;
+ *) BUGURL="$withval"
+ ;;
+ esac
+else
+ BUGURL="http://www.gnu.org/software/libc/bugs.html"
+
+fi
+
+ case ${BUGURL} in
+ "")
+ REPORT_BUGS_TO=
+ REPORT_BUGS_TEXI=
+ ;;
+ *)
+ REPORT_BUGS_TO="<$BUGURL>"
+ REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
+ ;;
+ esac;
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define PKGVERSION "$PKGVERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
+_ACEOF
+
+
# Glibc should not depend on any header files
diff --git a/configure.in b/configure.in
index 5e35b98613..7c059039a6 100644
--- a/configure.in
+++ b/configure.in
@@ -5,6 +5,13 @@ AC_CONFIG_SRCDIR([include/features.h])