mhd_check_prog_abs.m4 (1060B)
1 # SPDX-License-Identifier: FSFAP 2 # 3 # SYNOPSIS 4 # 5 # MHD_CHECK_PROG_ABS([VAR],[ABS_FILENAME]) 6 # 7 # DESCRIPTION 8 # 9 # If VAR is NOT already set, check whether ABS_FILENAME is executable 10 # tool. On success set VAR to ABS_FILENAME. 11 # 12 # Example usage: 13 # 14 # MHD_CHECK_TOOL_ABS([NM],["/usr/bin/special-nm"]) 15 # 16 # LICENSE 17 # 18 # Copyright (c) 2026 Karlson2k (Evgeny Grin) <k2k@drgrin.dev> 19 # 20 # Copying and distribution of this file, with or without modification, are 21 # permitted in any medium without royalty provided the copyright notice 22 # and this notice are preserved. This file is offered as-is, without any 23 # warranty. 24 25 #serial 1 26 27 AC_DEFUN([MHD_CHECK_PROG_ABS],[dnl 28 m4_newline([[# Expansion of $0 macro starts here]]) 29 AS_VAR_SET_IF([$1],[], 30 [ 31 mhd_check_prog_abs_tool_check=$2 32 AC_MSG_CHECKING([fo][r tool ${mhd_check_prog_abs_tool_check}]) 33 AS_IF([MHD_IS_FILE_EXEC([$2])],[$1=$2]) 34 AS_VAR_SET_IF([$1],[AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no])]) 35 ] 36 ) 37 m4_newline([[# Expansion of $0 macro ends here]]) 38 ])dnl AC_DEFUN MHD_CHECK_TOOL_ABS