This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Move bugurl and pkgversion support to config/acx.m4


The --with-bugurl and --with-pkgversion support now has all the features I 
want: it includes the text in both --version and --help output, following 
the GNU Coding Standards, and in the user manuals.  This patch moves the 
configure support, hopefully now more or less stable, to macros in 
config/acx.m4 that may then in future be used by GCC.  OK to commit?

bfd:
2007-03-23  Joseph Myers  <joseph@codesourcery.com>

	* configure.in: Use ACX_PKGVERSION and ACX_BUGURL.

config:
2007-03-23  Joseph Myers  <joseph@codesourcery.com>

	* acx.m4 (ACX_PKGVERSION, ACX_BUGURL): Define.

Index: bfd/configure.in
===================================================================
RCS file: /cvs/src/src/bfd/configure.in,v
retrieving revision 1.225
diff -u -r1.225 configure.in
--- bfd/configure.in	22 Mar 2007 21:18:29 -0000	1.225
+++ bfd/configure.in	23 Mar 2007 01:46:43 -0000
@@ -63,37 +63,8 @@
     [Define if we should default to creating read-only plt entries])
 fi
 
-# Package version.  For an official FSF release, it is empty.
-AC_ARG_WITH(pkgversion,
-  AS_HELP_STRING([--with-pkgversion=PKG],
-                 [Add PKG to the version string]),
-  [case "$withval" in
-    yes) AC_MSG_ERROR([package version not specified]) ;;
-    no)  PKGVERSION= ;;
-    *)   PKGVERSION="($withval) " ;;
-   esac],
-  PKGVERSION="(GNU Binutils) "
-)
-AC_SUBST(PKGVERSION)
-
-# The location to which bugs should be reported.
-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)  REPORT_BUGS_TO="";
-	 REPORT_BUGS_TEXI=""
-	 ;;
-    *)   REPORT_BUGS_TO="<$withval>"
-	 REPORT_BUGS_TEXI="@uref{`echo $withval | sed 's/@/@@/g'`}"
-	 ;;
-   esac],
-   REPORT_BUGS_TO="<http://www.sourceware.org/bugzilla/>"
-   REPORT_BUGS_TEXI="@uref{http://www.sourceware.org/bugzilla/}";
-)
-AC_SUBST(REPORT_BUGS_TO)
-AC_SUBST(REPORT_BUGS_TEXI)
+ACX_PKGVERSION([GNU Binutils])
+ACX_BUGURL([http://www.sourceware.org/bugzilla/])
 
 AM_BINUTILS_WARNINGS
 
Index: config/acx.m4
===================================================================
RCS file: /cvs/src/src/config/acx.m4,v
retrieving revision 1.22
diff -u -r1.22 acx.m4
--- config/acx.m4	7 Mar 2007 14:02:20 -0000	1.22
+++ config/acx.m4	23 Mar 2007 01:46:43 -0000
@@ -552,3 +552,41 @@
     $1="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing $2"
   fi
 ])
+
+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) "
+  )
+  AC_SUBST(PKGVERSION)
+])
+
+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)  REPORT_BUGS_TO="";
+	   REPORT_BUGS_TEXI=""
+	   ;;
+      *)   REPORT_BUGS_TO="<$withval>"
+	   REPORT_BUGS_TEXI="@uref{`echo $withval | sed 's/@/@@/g'`}"
+	   ;;
+     esac],
+     REPORT_BUGS_TO="<$1>"
+     REPORT_BUGS_TEXI="@uref{$1}"
+  )
+  AC_SUBST(REPORT_BUGS_TO)
+  AC_SUBST(REPORT_BUGS_TEXI)
+])

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]