On 8/28/2010 6:38 PM, Vincent Torri wrote: >> case ${with_sysroot} in #( >> yes) >> if test "$GCC" = yes; then >> - lt_sysroot=`$GCC --print-sysroot 2>/dev/null` >> + lt_sysroot=`$CC --print-sysroot 2>/dev/null` > > what is the interest of testing $GCC if you use $CC ?
$GCC != "gcc". It is "yes" if $CC contains some variant of gcc (like i686-pc-cygwin-gcc); "no" otherwise. So, IF the user specified --with-sysroot, but did not explicitly indicate where that sysroot is located (e.g. --with-sysroot=/some/path), THEN IF $CC is some variant of gcc (e.g. "$GCC" = "yes"), THEN invoke gcc (via $CC) and ask it where the compiled-in sysroot is located. You don't want to ask the executable "yes" where its sysroot is. -- Chuck