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