autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFH] zsh shell function portability issue


From: Paolo Bonzini
Subject: Re: [RFH] zsh shell function portability issue
Date: Fri, 17 Oct 2008 10:06:44 +0200
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

Paolo Bonzini wrote:
>> Right.  Might want to explicitly discourage touching those variables.
>> (This is hopefully not common today, but probably not so uncommon in
>> legacy code.)
> 
> I'll look at
> 
> http://www.google.com/codesearch?q=ac_(compile|link|cpp)%3D+file%3Aconfigure.ac
> http://www.google.com/codesearch?q=ac_(compile|link|cpp)%3D+file%3Aconfigure.in
> 
> but the results in the first few result pages seem safe.

I got bored after 28 pages of results...  The most "interesting"
manipulations I saw are:

dnl use libtool to compile checks (particularly lib checks), mostly so
dnl we don't have to worry about how/if the os supports -R
ac_link="${SHELL} ${srcdir}/libtool --mode=link $ac_link"


LINK_PREFIX=`$PERL -MConfig -e 'print $Config{shrpenv}'`
ac_link="$LINK_PREFIX $ac_link"


ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $X_CFLAGS $LDFLAGS
conftest.$ac_ext $LIBS $XPM_LIBS $X_LIBS $USE_LIBS $TERM_LIBS
$X_EXTRA_LIBS 1>&5; ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $X_CFLAGS
$LDFLAGS conftest.$ac_ext $LIBS $XPM_LIBS $X_LIBS $USE_LIBS $TERM_LIBS
$X_EXTRA_LIBS 1>&5 2>&5'


ac_link='rm -rf SunWS_cache; ${CXX-g++} -o conftest${ac_exeext}
$CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'


ac_ext=c
ac_cpp='$OCTMEX $CPPFLAGS'
ac_compile='$OCTMEX -c conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
ac_link='$OCTMEX conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
save_ac_exeext=$ac_exeext
ac_exeext=.oct


old_ac_link="[$]ac_link"
ac_link="[$]old_ac_link 2>conftezt.out.2"
...
CXXFLAGS="[$]OLD_CXXFLAGS"
ac_link="[$]old_ac_link"
if grep -i 'unrecognized option' <conftezt.out.2 >/dev/null; then


ac_link='libtool --silent --mode=link ${CXX-g++} ...


Otherwise, it's mostly people that want to add flags to all the
compilation command lines but not to the CFLAGS/CPPFLAGS variables.
Does not seem harmful, and we may want to provide an API for that.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]