OK to apply? Thanks, Ralf
2008-04-10 Ralf Wildenhues <[EMAIL PROTECTED]> * libltdl/m4/libtool.m4 (_LT_PROG_XSI_SHELLFNS) <func_xform>: New function. * libltdl/config/ltmain.m4sh (func_mode_compile): Use it to avoid two forks with XSI shells. Index: libltdl/config/ltmain.m4sh =================================================================== RCS file: /cvsroot/libtool/libtool/libltdl/config/ltmain.m4sh,v retrieving revision 1.102 diff -u -r1.102 ltmain.m4sh --- libltdl/config/ltmain.m4sh 16 Mar 2008 08:34:25 -0000 1.102 +++ libltdl/config/ltmain.m4sh 9 Apr 2008 23:20:40 -0000 @@ -1361,27 +1361,16 @@ # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.[fF][09]?) xform='[fF][09].' ;; - *.for) xform=for ;; - *.java) xform=java ;; - *.obj) xform=obj ;; - *.sx) xform=sx ;; + *.[cCFSifmso] | \ + *.ada | *.adb | *.ads | *.asm | \ + *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ + *.[fF][09]? | *.for | *.java | *.obj | *.sx) + func_xform "$libobj" + libobj=$func_xform_result + ;; esac - libobj=`$ECHO "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) Index: libltdl/m4/libtool.m4 =================================================================== RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v retrieving revision 1.146 diff -u -r1.146 libtool.m4 --- libltdl/m4/libtool.m4 1 Apr 2008 18:23:19 -0000 1.146 +++ libltdl/m4/libtool.m4 9 Apr 2008 23:20:42 -0000 @@ -7098,6 +7098,7 @@ [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" + # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. @@ -7165,10 +7166,18 @@ *) func_lo2o_result=${1} ;; esac } + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=${1%.*}.lo +} + _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" + # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. @@ -7245,6 +7254,12 @@ { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "X${1}" | $Xsed -e "s/\.[[^.]]*/.lo/"` +} _LT_EOF esac @@ -7269,6 +7284,7 @@ { eval "$[1]=\$$[1]\$[2]" } + _LT_EOF ;; esac