--- libltdl/m4/libtool.m4 | 56 +++++++++++++++++++++++++++++++++++------------- 1 files changed, 41 insertions(+), 15 deletions(-)
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4 index 0638091..ef4aa0f 100644 --- a/libltdl/m4/libtool.m4 +++ b/libltdl/m4/libtool.m4 @@ -166,6 +166,7 @@ _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PROVIDE_SHELLFNS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl @@ -749,7 +750,7 @@ _LT_EOF sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) - _LT_PROG_XSI_SHELLFNS + _LT_PROG_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) @@ -7133,15 +7134,11 @@ _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES -# _LT_PROG_XSI_SHELLFNS +# _LT_SH_XSI_SHELLFNS # --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement +# XSI compatible variants of some useful shell functions. +m4_defun([_LT_SH_XSI_SHELLFNS], +[# func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () @@ -7227,13 +7224,13 @@ func_len () { func_len_result=${#1} } +]) -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement +# _LT_SH_BOURNE_SHELLFNS +# --------------------- +# Bourne compatible variants of some useful shell functions. +m4_defun([_LT_SH_BOURNE_SHELLFNS], +[# func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () @@ -7306,8 +7303,37 @@ func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } +]) + +# _LT_PROVIDE_SHELLFNS +# --------------------- +# Define Bourne or XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROVIDE_SHELLFNS], +[m4_require([_LT_CHECK_SHELL_FEATURES])dnl +case $xsi_shell in + yes) +_LT_SH_XSI_SHELLFNS + ;; + *) # Bourne compatible functions. +_LT_SH_BOURNE_SHELLFNS + ;; +esac]) +# _LT_PROG_SHELLFNS +# --------------------- +# Write Bourne or XSI compatible variants of some useful shell functions. +m4_defun([_LT_PROG_SHELLFNS], +[case $xsi_shell in + yes) + cat << \_LT_EOF >> "$cfgfile" +_LT_SH_XSI_SHELLFNS _LT_EOF + ;; + *) # Bourne compatible functions. + cat << \_LT_EOF >> "$cfgfile" +_LT_SH_BOURNE_SHELLFNS +_LT_EOF + ;; esac case $lt_shell_append in -- 1.7.1