: ${SED="sed"}
test set = ${ECHO+'set'} = set || ECHO='printf %s\n'
-basename="$SED -e "'s|^.*/||'
+basename='s|^.*/||'
nl='
'
progpath=$0
-progname=`$ECHO "$progpath" |$basename`
+progname=`$ECHO "$progpath" |$SED -e "$basename"`
log_file=$1
export log_file
cd $my_xdir || exit $?
darwin_archive=$my_xabs
darwin_curdir=`pwd`
- darwin_base_archive=`basename "$darwin_archive"`
+ func_basename "$darwin_archive"
+ darwin_base_archive=$func_basename_result
darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
if test -n "$darwin_arches"; then
darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
debug_cmd=${debug_cmd-":"}
exit_cmd=:
-dirname="$SED -e "'s|/[^/]*$||'
-basename="$SED -e "'s|^.*/||'
+dirname='s|/[^/]*$||'
+basename='s|^.*/||'
nl='
'
progpath=$0
# The name of this program.
-progname=`echo "$progpath" |$basename`
+progname=`echo "$progpath" |$SED "$basename"`
## ------------------------- ##
else :; \
fi || :
+# Use a consistent dirname and basename idiom.
+sc_prohibit_bare_basename:
+ @prohibit='\|[ ]*\$$(base|dir)name' \
+ halt='use `|$$SED "$$basename"'\'' instead of `|$$basename'\' \
+ $(_sc_search_regexp)
+
+sc_prohibit_basename_with_dollar_sed:
+ @prohibit='(base|dir)name="?(\$$SED|sed)[ "]' \
+ halt='use `basename='\''s|^.*/||'\'' instead of `basename="$$SED...' \
+ $(_sc_search_regexp)
+
# Check for using `[' instead of `test'.
exclude_file_name_regexp--sc_prohibit_bracket_as_test = ^cfg.mk$$
sc_prohibit_bracket_as_test:
# We do not want to fail if all we got was a Fortran 77 compiler.
func_configure_nofail
if test "$conf_status" -eq "$EXIT_FAILURE"; then
- case `echo $FC | $SED $basename` in
+ case `echo $FC | $SED "$basename"` in
g77* | f77* | xlf | xlf[_-]* | frt* | pgf77* | cf77* | fort77* | fl32* | af77*)
func_skip "The FC fortran tests do not work with Fortran 77 compilers" ;;
*) exit $EXIT_FAILURE
# We do not want to fail if all we got was a Fortran 77 compiler.
func_configure_nofail "--disable-static"
if test "$conf_status" -eq "$EXIT_FAILURE"; then
- case `echo $FC | $SED $basename` in
+ case `echo $FC | $SED "$basename"` in
g77* | f77* | xlf | xlf[_-]* | frt* | pgf77* | cf77* | fort77* | fl32* | af77*)
func_skip "The FC fortran tests do not work with Fortran 77 compilers" ;;
*) exit $EXIT_FAILURE
# We do not want to fail if all we got was a Fortran 77 compiler.
func_configure_nofail "--disable-shared"
if test "$conf_status" -eq "$EXIT_FAILURE"; then
- case `echo $FC | $SED $basename` in
+ case `echo $FC | $SED "$basename"` in
g77* | f77* | xlf | xlf[_-]* | frt* | pgf77* | cf77* | fort77* | fl32* | af77*)
func_skip "The FC fortran tests do not work with Fortran 77 compilers" ;;
*) exit $EXIT_FAILURE
: ${GREP="grep"}
: ${SED="sed"}
-basename="$SED -e s,^.*/,,"
+basename='s,^.*/,,'
# func_grep expression filename
# Check whether EXPRESSION matches any line of FILENAME, without output.
my_serial=
if test -z "$my_macro_regex" ||
test "$my_filename" = aclocal.m4 ||
- test "$my_macro_regex" = `echo "$my_filename" | $basename` ||
+ test "$my_macro_regex" = `echo "$my_filename" | $SED "$basename"` ||
func_grep '^AC_DEFUN(\@<:@'"$my_macro_regex" "$my_filename"
then
my_serial=`$SED -e "$my_sed_serial" "$my_filename"`