ax_dirname.m4 | ax_dirname.m4 | |||
---|---|---|---|---|
dnl @* AX_DIRNAME(PATHNAME) | dnl @* AX_DIRNAME(PATHNAME) | |||
dnl | dnl | |||
dnl Parts of the implementation have been taken from AS_DIRNAME from the | dnl Parts of the implementation have been taken from AS_DIRNAME from the | |||
dnl main autoconf package in generation 2.5x. However, we do only use | dnl main autoconf package in generation 2.5x. However, we do only use | |||
dnl "sed" to cut out the dirname, and we do additionally clean up some | dnl "sed" to cut out the dirname, and we do additionally clean up some | |||
dnl dir/.. parts in the resulting pattern. | dnl dir/.. parts in the resulting pattern. | |||
dnl | dnl | |||
dnl this macro may be used in autoconf 2.13 scripts as well. | dnl this macro may be used in autoconf 2.13 scripts as well. | |||
dnl | dnl | |||
dnl @$Id: ax_dirname.m4,v 1.1 2004/04/17 10:15:43 patricg Exp $ | dnl @$Id$ | |||
AC_DEFUN([AX_DIRNAME], | AC_DEFUN([AX_DIRNAME], | |||
[echo X[]$1 | | [echo X[]$1 | | |||
sed ['s/\/[^\/:][^\/:]*\/..\//\//g | sed ['s/\/[^\/:][^\/:]*\/..\//\//g | |||
s/\/[^\/:][^\/:]*\/..\//\//g | s/\/[^\/:][^\/:]*\/..\//\//g | |||
s/\/[^\/:][^\/:]*\/..\//\//g | s/\/[^\/:][^\/:]*\/..\//\//g | |||
s/\/[^\/:][^\/:]*\/..\//\//g | s/\/[^\/:][^\/:]*\/..\//\//g | |||
/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | /^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } | |||
/^X\(\/\/\)[^/].*/{ s//\1/; q; } | /^X\(\/\/\)[^/].*/{ s//\1/; q; } | |||
/^X\(\/\/\)$/{ s//\1/; q; } | /^X\(\/\/\)$/{ s//\1/; q; } | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |