Date: Wed, 27 Nov 2002 08:25:58 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Ed Manlove cc: djgpp AT delorie DOT com Subject: Re: Expansion of "$srcdir" and '${DJDIR}' in gnu\binutl-2.121\build.djg\djconfig.sh In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 26 Nov 2002, Ed Manlove wrote: > How does the configure script expand or what results from the expansion > of --srcdir="$srcdir" --prefix='${DJDIR}' in the configure script for > binutils, gnu\binutl-2.121\build.djg\djconfig.sh? This is a normal expansion of environment variables, where ${DJDIR} stands for the value of the variable DJDIR. This variable is set by the startup code of any DJGPP program from the value of the DJGPP variable. That is, if you have set DJGPP=c:\foo\bar\djgpp.env, the startup code will read djgpp.env and set DJDIR to c:/foo/bar. > I want to add the --with-headers parameter to gcc configure script. The > directory I wish to add is > /dev/env/DJDIR/lib/gcc-lib/h8300-hitachi-hms/2.952/include. The "/dev/env" trick will only work with the DJGPP programs, not with Unix programs. It works because the library functions from DJGPP's libc.a treat /dev/env/FOO specially: they expand this into the value of the environment variable FOO and substitute that value instead of /dev/env/FOO. > I an trying to > understand how the above terms are expanded by configure and the difference > between the single quotes '' and the double quotes"". '${DJDIR}' in single quotes is not expanded by the shell, while in double quotes it _is_ expanded immediatly.