From: "Tim Van Holder" To: Subject: Re: New bash 2.04 beta release Date: Tue, 10 Apr 2001 18:54:22 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <7263-Tue10Apr2001104531+0300-eliz@is.elta.co.il> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > > Note that the ac_executable_extensions is a hack to avoid depending on > > smart 'test -f' handling (EMX's bash doesn't have it). > > Could you please tell more about this? I don't think I understood > what's that list for, exactly. Before, the typical way of locating executables in autoconf was (in pseudo-script): : looking for foo for dir in $PATH; do if test -f $dir/foo; then echo yay! foo is in $dir/foo break fi done I sent in a patch which ac_executable_exts variable that holds the executable extensions for the host system. A search then does: : looking for foo for dir in $PATH; do if test -f $dir/foo; then echo yay! foo is in $dir/foo break elif test -n "$ac_executable_exts"; then for ext in $ac_executable_exts; do if test -f $dir/foo$ext; then echo yay! foo is in $dir/foo break fi done fi done This is definitely not optimal, but it worked just fine, even with a bash that doesn't handle test -f specially. This patch won't be in 2.50, though it will likely be in my DJGPP package for 2.50. autoconf 2.51 will have a) a way to build such a list itself, instead of relying on config.site to set it, and b) a cleaner way of dealing with it (avoiding the duplicated 'if found' code). One suggestion was to have a variable 'ac_executable_forms' instead, which would default to '${base}'. : looking for foo for dir in $PATH; do forms=`base=foo eval echo $ac_executable_forms` for form in $forms; do if test -f $dir/$form; then echo yay! foo is in $dir/$form break fi done done That way, 'foo' would be found on Unixy systems; with the var set to 'i386-pc-msdosdjgpp-${base} ${base}' cross-compiling is made easy; and with '${base} ${base}.exe ${base}.com ${base}.sh ${base}.pl ${base}.bat' we get proper operation on DOS. Hope this explains everything Eli :-)