www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/01/10/13:28:35

Message-Id: <199901101828.SAA47446@out1.ibm.net>
From: "Mark E." <snowball3 AT usa DOT net>
To: djgpp-workers AT delorie DOT com
Date: Sun, 10 Jan 1999 13:28:38 -0500
MIME-Version: 1.0
Subject: Re: shell utils 1.16 question
References: <199901101550 DOT PAA86044 AT out1 DOT ibm DOT net>
In-reply-to: <Pine.SUN.3.91.990110185059.3155A-100000@is>
X-mailer: Pegasus Mail for Win32 (v3.01d)
Reply-To: djgpp-workers AT delorie DOT com

> Since several maintainers of GNU packages were very happy with this 
> solution, I cannot grasp the reason for saying it's ``against the spirit
> of Autoconf''.  (Unless quite a few GNU maintainers are also against that
> spirit.)

I think the reason it violated the 'spirit of autoconf' was because the 
COMSPEC variable is an OS-specific feature and that's why it was 
rejected. If there's an autoconf list archive then you can look there. But 
I'll ask again if want to know more. However, in a later message a 
solution that will also work was proposed:

> define a macro:
> 
> AC_DEFUN(AC_TEST_X,
> [
> AC_CACHE_CHECK([whether test -x works], ac_test_x,
> [
> ac_test_x = "no"
> test -x configure && ! (test -x configure.in) && ac_test_x = "yes"
> ])
> ])
> 
> Then, in something like AC_CHECK_PROG, you would insert:
> 
> AC_REQUIRE([AC_TEST_X])
> 
> at the top, and then test -x for $ac_dir/$ac_word (or whatever) by:
> 
> test_x_result = "no"
> if test $ac_test_x = "yes"; then
>  test -x $ac_dir/$ac_word && test_x_result = "yes"
> else
>  test -f $ac_dir/$ac_word && test_x_result = "yes"
> fi
> if test $test_x_result = "yes"; then
>  dnl TRUE: Do whatever here...
> else
>  dnl FALSE: Do whatever here...
> fi
> 

Looks good to me, how 'about you guys?

--- 
Mark Elbrecht snowball3 AT usa DOT net
http://members.xoom.com/snowball3/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019