1# Copyright (C) 2015-2021 Free Software Foundation, Inc. 2# 3# This file is free software; the Free Software Foundation gives 4# unlimited permission to copy and/or distribute it, with or without 5# modifications, as long as this notice is preserved. 6 7# GDB_AC_TRANSFORM([PROGRAM], [VAR]) 8# 9# Transform a tool name to get the installed name of PROGRAM and store 10# it in the output variable VAR. 11# 12# This macro uses the SED command stored in $program_transform_name, 13# but it undoes the Makefile-like escaping of $s performed by 14# AC_ARG_PROGRAM. 15 16AC_DEFUN([GDB_AC_TRANSFORM], [ 17 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/[\\$][\\$]/\\$/g'` 18 $2=`echo $1 | sed -e "$gdb_ac_transform"` 19 if test "x$$2" = x; then 20 $2=$1 21 fi 22 AC_SUBST($2) 23]) 24