From f9312a8076ec8968445afcf98fd9831e4be2a20d Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Tue, 8 Jun 1999 15:00:17 +0000 Subject: [PATCH] * ltconfig.in (objext): Accept, in order of decreasing preference: the cached value; the result of a test object compilation. --- ChangeLog | 3 +++ ltconfig.in | 48 ++++++++++++++++++++++++++++-------------------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index d0a3c4654..20e0b58d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 1999-06-08 Gary V. Vaughan + * ltconfig.in (objext): Accept, in order of decreasing preference: + the cached value; the result of a test object compilation. + * ltconfig.in (RANLIB): Accept, in order of decreasing preference: the cached value; an environment setting; the first file called ``ranlib'' in the user's path. diff --git a/ltconfig.in b/ltconfig.in index 314e72b03..dcf5d5235 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -604,35 +604,43 @@ set dummy $CC compiler="$2" echo $ac_n "checking for object suffix... $ac_c" 1>&6 -$rm conftest* -echo 'int i = 1;' > conftest.c -echo "$progname:@LINENO@: checking for object suffix" >& 5 -if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then - # Append any warnings to the config.log. - cat conftest.err 1>&5 - - for ac_file in conftest.*; do - case $ac_file in - *.c) ;; - *) objext=`echo $ac_file | sed -e s/conftest.//` ;; - esac - done +echo "$progname:@LINENO@: checking for object suffix" 1>&5 +if test X`echo ${ac_cv_objext+set}` = Xset; then + echo $ac_n "(cached) $ac_c" 1>&6 else - cat conftest.err 1>&5 - echo "$progname: failed program was:" >&5 - cat conftest.c >&5 + ac_cv_objext="none" + $rm conftest* + echo 'int i = 1;' > conftest.c + if { (eval echo $progname:@LINENO@: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then + # Append any warnings to the config.log. + cat conftest.err 1>&5 + + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done + else + cat conftest.err 1>&5 + echo "$progname: failed program was:" >&5 + cat conftest.c >&5 + fi + $rm conftest* fi -$rm conftest* -echo "$ac_t$objext" 1>&6 +if test X$ac_cv_objext != Xnone; then + objext="$ac_cv_objext" +fi +echo "$ac_t$ac_cv_objext" 1>&6 echo $ac_n "checking for executable suffix... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then +echo "$progname:@LINENO@: checking for executable suffix" 1>&5 +if test X`echo ${ac_cv_exeext+set}` = Xset; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_exeext="none" $rm conftest* echo 'main () { return 0; }' > conftest.c - echo "$progname:@LINENO@: checking for executable suffix" >& 5 if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then # Append any warnings to the config.log. cat conftest.err 1>&5 -- 2.47.3