+2000-07-06 Lars J. Aas <larsa@sim.no>
+
+ * acgeneral.m4 (_AC_SHELL_DIRNAME): New macro.
+ (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_OUTPUT_LINKS):
+ Use _AC_SHELL_DIRNAME.
+
2000-07-04 Martin Wilck <martin@tropos.de>
* aclang.m4 (AC_PROG_F77): Add two compilers,
])# AC_SHELL_MKDIR_P
+# _AC_SHELL_DIRNAME(PATHNAME)
+# ---------------------------
+# Remove last slash and trailing text.
+# Not all systems have dirname, so we emulate it with sed.
+# This macro must be usable from inside ` `.
+define([_AC_SHELL_DIRNAME],
+[echo $1 | sed 's%/[[^/][^/]]*$%%'])
+
+
+
## --------------------------------------------------- ##
## Common m4/sh handling of variables (indirections). ##
## --------------------------------------------------- ##
esac
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo "$ac_file" | sed 's%/[[^/][^/]]*$%%'`
+ ac_dir=`_AC_SHELL_DIRNAME("$ac_file")`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
AC_SHELL_MKDIR_P("$ac_dir")
ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
echo "$ac_file is unchanged"
else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo "$ac_file" | sed 's%/[[^/][^/]]*$%%'`
+ ac_dir=`_AC_SHELL_DIRNAME("$ac_file")`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
AC_SHELL_MKDIR_P("$ac_dir")
fi
rm -f $ac_dest
# Make relative symlinks.
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dest_dir=`echo $ac_dest | sed 's%/[[^/][^/]]*$%%'`
+ ac_dest_dir=`_AC_SHELL_DIRNAME("$ac_dest")`
if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
AC_SHELL_MKDIR_P("$ac_dest_dir")
ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
])# AC_SHELL_MKDIR_P
+# _AC_SHELL_DIRNAME(PATHNAME)
+# ---------------------------
+# Remove last slash and trailing text.
+# Not all systems have dirname, so we emulate it with sed.
+# This macro must be usable from inside ` `.
+define([_AC_SHELL_DIRNAME],
+[echo $1 | sed 's%/[[^/][^/]]*$%%'])
+
+
+
## --------------------------------------------------- ##
## Common m4/sh handling of variables (indirections). ##
## --------------------------------------------------- ##
esac
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo "$ac_file" | sed 's%/[[^/][^/]]*$%%'`
+ ac_dir=`_AC_SHELL_DIRNAME("$ac_file")`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
AC_SHELL_MKDIR_P("$ac_dir")
ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
echo "$ac_file is unchanged"
else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo "$ac_file" | sed 's%/[[^/][^/]]*$%%'`
+ ac_dir=`_AC_SHELL_DIRNAME("$ac_file")`
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
AC_SHELL_MKDIR_P("$ac_dir")
fi
rm -f $ac_dest
# Make relative symlinks.
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dest_dir=`echo $ac_dest | sed 's%/[[^/][^/]]*$%%'`
+ ac_dest_dir=`_AC_SHELL_DIRNAME("$ac_dest")`
if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
AC_SHELL_MKDIR_P("$ac_dest_dir")
ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"