|
From: | Bob Friesenhahn |
Subject: | Re: Using $program_transform_name from ‘configure’ |
Date: | Wed, 23 Apr 2014 20:34:38 -0500 (CDT) |
User-agent: | Alpine 2.01 (GSO 1266 2009-07-14) |
On Wed, 23 Apr 2014, Ludovic Courtès wrote:
Hello, $program_transform_name is apparently meant to be used in makefiles only, as suggested in the manual and in this comment from ‘configure’: --8<---------------cut here---------------start------------->8--- # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` --8<---------------cut here---------------end--------------->8--- The doubled $ and \ make it impossible to use it directly within configure.ac. What’s the recommended way to use it in configure.ac?
This is what I do in GraphicsMagick: # # program_transform_name is formed for use in a Makefile, so create a # modified version for use in a shell script. configure_transform_name=`echo ${program_transform_name} | sed 's,\\$\\$,$,'` GMDelegateDefault=`echo gm | sed ${configure_transform_name}` As far as I am aware, it has never caused a problem. Bob -- Bob Friesenhahn address@hidden, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
[Prev in Thread] | Current Thread | [Next in Thread] |