| 1 |
# version-etc.m4 |
| 2 |
# serial 2 |
| 3 |
dnl Copyright (C) 2009-2026 Free Software Foundation, Inc. |
| 4 |
dnl This file is free software; the Free Software Foundation |
| 5 |
dnl gives unlimited permission to copy and/or distribute it, |
| 6 |
dnl with or without modifications, as long as this notice is preserved. |
| 7 |
dnl This file is offered as-is, without any warranty. |
| 8 |
|
| 9 |
dnl $1 - configure flag and define name |
| 10 |
dnl $2 - human readable description |
| 11 |
m4_define([gl_VERSION_ETC_FLAG], |
| 12 |
[dnl |
| 13 |
AC_ARG_WITH([$1], [AS_HELP_STRING([[--with-]$1], [$2])], |
| 14 |
[dnl |
| 15 |
case $withval in |
| 16 |
yes|no) ;; |
| 17 |
*) AC_DEFINE_UNQUOTED(AS_TR_CPP([PACKAGE_$1]), ["$withval"], [$2]) ;; |
| 18 |
esac |
| 19 |
]) |
| 20 |
]) |
| 21 |
|
| 22 |
AC_DEFUN([gl_VERSION_ETC], |
| 23 |
[dnl |
| 24 |
gl_VERSION_ETC_FLAG([packager], |
| 25 |
[String identifying the packager of this software]) |
| 26 |
gl_VERSION_ETC_FLAG([packager-version], |
| 27 |
[Packager-specific version information]) |
| 28 |
gl_VERSION_ETC_FLAG([packager-bug-reports], |
| 29 |
[Packager info for bug reports (URL/e-mail/...)]) |
| 30 |
if test "X$with_packager" = "X" && \ |
| 31 |
test "X$with_packager_version$with_packager_bug_reports" != "X" |
| 32 |
then |
| 33 |
AC_MSG_ERROR([The --with-packager-{bug-reports,version} options require --with-packager]) |
| 34 |
fi |
| 35 |
]) |