From 8b748aed2a9ab4b964faa5722f7a182a060e475c Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 9 Nov 2012 22:13:45 +0000 Subject: Support --with-pkgversion and --with-bugurl. --- aclocal.m4 | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'aclocal.m4') 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) +]) -- cgit v1.2.3