forked from sile-typesetter/sile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(build): Adapt custom macro for upstreaming to autoconf-archive
Since I seem to use this on every project I touch now, I went ahead and spruced it up in a way that should make it acceptable as a contribution to autoconf-archive. As of tihs writing it has been PR'ed but not morged, so consider the exact script with this serial still fungable. autoconf-archive/autoconf-archive#324
- Loading branch information
Showing
8 changed files
with
89 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# =========================================================================== | ||
# https://www.gnu.org/software/autoconf-archive/ax_require_prog.html | ||
# =========================================================================== | ||
# | ||
# SYNOPSIS | ||
# | ||
# AX_REQUIRE_PROG([EXECUTABLE], [VARIABLE]) | ||
# | ||
# DESCRIPTION | ||
# | ||
# Locates an installed binary program that is a prerequisite to continue. | ||
# Uses AX_WITH_PROG under the hood, but follows up the check with an error | ||
# if no executable could be located. | ||
# | ||
# Example usage: | ||
# | ||
# AX_REQUIRE_PROG(git-warp-time) | ||
# | ||
# Note: If the second argument is not provided, a default value of | ||
# VARIABLE is automatically derived from the executable name by upper | ||
# casing it and substituting any dashes or periods with underscores. In | ||
# the example above the resulting precious variable would be | ||
# GIT_WARP_TIME. | ||
# | ||
# LICENSE | ||
# | ||
# Copyright (c) 2021 Caleb Maclennan <[email protected]> | ||
# | ||
# Copying and distribution of this file, with or without modification, are | ||
# permitted in any medium without royalty provided the copyright notice | ||
# and this notice are preserved. This file is offered as-is, without any | ||
# warranty. | ||
|
||
#serial 1 | ||
|
||
AC_DEFUN([AX_REQUIRE_PROG], [ | ||
AC_PREREQ([2.61]) | ||
pushdef([EXECUTABLE],$1) | ||
pushdef([VARIABLE],m4_default($2,m4_toupper(m4_translit($1,-.,__)))) | ||
AX_WITH_PROG(VARIABLE,EXECUTABLE) | ||
AS_IF([test "x$with_$1" != xno && test -z "$VARIABLE"], [ | ||
AC_MSG_ERROR([EXECUTABLE is required]) | ||
]) | ||
popdef([VARIABLE]) | ||
popdef([EXECUTABLE]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters