]> gitweb.michael.orlitzky.com - charm-bypass.git/commitdiff
configure.ac: fix all AC_PATH_PROG checks
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 25 Oct 2023 21:15:49 +0000 (17:15 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 25 Oct 2023 22:36:23 +0000 (18:36 -0400)
The third argument to AC_PATH_PROG is a value to set, not an action to
perform, when the test fails. So all of the existing checks were wrong
and failed to fail when the program is missing. I do this for a
living.

configure.ac

index 18411ea6adac751f8b0fd84c67d9c9f66a8c8a54..8f0f5968886c1624a228163264788e91db8a6e52 100644 (file)
@@ -5,27 +5,27 @@ AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz tar-ustar])
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_SRCDIR([tableau.svg])
 
-AC_PATH_PROG(
-  [BASE64],
-  [base64],
+AC_PATH_PROG([BASE64], [base64])
+AS_IF(
+  [test -z "${BASE64}"],
   [AC_MSG_ERROR([base64 program not found])]
 )
 
-AC_PATH_PROG(
-  [FONTFORGE],
-  [fontforge],
+AC_PATH_PROG([FONTFORGE], [fontforge])
+AS_IF(
+  [test -z "${FONTFORGE}"],
   [AC_MSG_ERROR([fontforge program not found])]
 )
 
-AC_PATH_PROG(
-  [SCOUR],
-  [scour],
+AC_PATH_PROG([SCOUR], [scour])
+AS_IF(
+  [test -z "${SCOUR}"],
   [AC_MSG_ERROR([scour program not found])]
 )
 
-AC_PATH_PROG(
-  [XSLTPROC],
-  [xsltproc],
+AC_PATH_PROG([XSLTPROC], [xsltproc])
+AS_IF(
+  [test -z "${XSLTPROC}"],
   [AC_MSG_ERROR([xsltproc program not found])]
 )