transform.m4 761 B

1234567891011121314151617181920212223
  1. # Copyright (C) 2015-2022 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. # GDB_AC_TRANSFORM([PROGRAM], [VAR])
  7. #
  8. # Transform a tool name to get the installed name of PROGRAM and store
  9. # it in the output variable VAR.
  10. #
  11. # This macro uses the SED command stored in $program_transform_name,
  12. # but it undoes the Makefile-like escaping of $s performed by
  13. # AC_ARG_PROGRAM.
  14. AC_DEFUN([GDB_AC_TRANSFORM], [
  15. gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/[\\$][\\$]/\\$/g'`
  16. $2=`echo $1 | sed -e "$gdb_ac_transform"`
  17. if test "x$$2" = x; then
  18. $2=$1
  19. fi
  20. AC_SUBST($2)
  21. ])