]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (_AC_SHELL_DIRNAME): New macro.
authorAkim Demaille <akim@epita.fr>
Thu, 6 Jul 2000 08:57:37 +0000 (08:57 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 6 Jul 2000 08:57:37 +0000 (08:57 +0000)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_OUTPUT_LINKS):
Use _AC_SHELL_DIRNAME.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4

index be50082e03a7f168723a772a80b10e2e7927b720..2d8a86aec9af566802df3c995c75bec634c3198a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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,
index 956a998dd4ddeabf4e4f5bcb2d41bad254197699..b79e353215f469b1bed21ab84cbdd5eb805a424a 100644 (file)
@@ -772,6 +772,16 @@ done; }
 ])# 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).  ##
 ## --------------------------------------------------- ##
@@ -4514,9 +4524,7 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
   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%^\./%%'`"
@@ -4782,8 +4790,7 @@ cat >>$CONFIG_STATUS <<\EOF
   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
@@ -4830,8 +4837,7 @@ for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
   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%^\./%%'`"
index 956a998dd4ddeabf4e4f5bcb2d41bad254197699..b79e353215f469b1bed21ab84cbdd5eb805a424a 100644 (file)
@@ -772,6 +772,16 @@ done; }
 ])# 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).  ##
 ## --------------------------------------------------- ##
@@ -4514,9 +4524,7 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
   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%^\./%%'`"
@@ -4782,8 +4790,7 @@ cat >>$CONFIG_STATUS <<\EOF
   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
@@ -4830,8 +4837,7 @@ for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
   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%^\./%%'`"