Move the Autoconf independent shell macros into the file
`shell.m4' and the name space `AS_*'.
* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.
* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
2000-10-26 01:51:10 +08:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
|
|
|
|
cat <<EOF
|
|
|
|
|
2000-11-14 18:40:42 +08:00
|
|
|
M4sh.
|
Move the Autoconf independent shell macros into the file
`shell.m4' and the name space `AS_*'.
* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.
* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
2000-10-26 01:51:10 +08:00
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|
## ----------------------------- ##
|
|
|
|
## AS_DIRNAME & AS_DIRNAME_SED. ##
|
|
|
|
## ----------------------------- ##
|
|
|
|
|
|
|
|
# Build nested dirs.
|
|
|
|
|
2000-11-10 22:43:33 +08:00
|
|
|
AT_SETUP([AS_DIRNAME & AS_DIRNAME_SED])
|
Move the Autoconf independent shell macros into the file
`shell.m4' and the name space `AS_*'.
* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.
* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
2000-10-26 01:51:10 +08:00
|
|
|
|
|
|
|
AT_DATA(configure.in,
|
2000-11-14 18:40:42 +08:00
|
|
|
[[define([AS_DIRNAME_TEST],
|
Move the Autoconf independent shell macros into the file
`shell.m4' and the name space `AS_*'.
* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.
* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
2000-10-26 01:51:10 +08:00
|
|
|
[dir=`AS_DIRNAME([$1])`
|
|
|
|
test "$dir" = "$2" ||
|
2000-11-14 18:40:42 +08:00
|
|
|
echo "dirname($1) = $dir instead of $2" >&2
|
|
|
|
|
|
|
|
dir=`AS_DIRNAME_SED([$1])`
|
Move the Autoconf independent shell macros into the file
`shell.m4' and the name space `AS_*'.
* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.
* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
2000-10-26 01:51:10 +08:00
|
|
|
test "$dir" = "$2" ||
|
|
|
|
echo "dirname_sed($1) = $dir instead of $2" >&2])
|
|
|
|
|
|
|
|
AC_PLAIN_SCRIPT
|
|
|
|
AS_DIRNAME_TEST([//1], [//])
|
|
|
|
AS_DIRNAME_TEST([/1], [/])
|
|
|
|
AS_DIRNAME_TEST([./1], [.])
|
|
|
|
AS_DIRNAME_TEST([../../2], [../..])
|
|
|
|
AS_DIRNAME_TEST([//1/], [//])
|
|
|
|
AS_DIRNAME_TEST([/1/], [/])
|
|
|
|
AS_DIRNAME_TEST([./1/], [.])
|
|
|
|
AS_DIRNAME_TEST([../../2], [../..])
|
|
|
|
AS_DIRNAME_TEST([//1/3], [//1])
|
|
|
|
AS_DIRNAME_TEST([/1/3], [/1])
|
|
|
|
AS_DIRNAME_TEST([./1/3], [./1])
|
|
|
|
AS_DIRNAME_TEST([../../2/3], [../../2])
|
|
|
|
AS_DIRNAME_TEST([//1/3///], [//1])
|
|
|
|
AS_DIRNAME_TEST([/1/3///], [/1])
|
|
|
|
AS_DIRNAME_TEST([./1/3///], [./1])
|
|
|
|
AS_DIRNAME_TEST([../../2/3///], [../../2])
|
|
|
|
AS_DIRNAME_TEST([//1//3/], [//1])
|
|
|
|
AS_DIRNAME_TEST([/1//3/], [/1])
|
|
|
|
AS_DIRNAME_TEST([./1//3/], [./1])
|
|
|
|
AS_DIRNAME_TEST([../../2//3/], [../../2])
|
2000-11-02 03:57:54 +08:00
|
|
|
AS_EXIT(0)
|
Move the Autoconf independent shell macros into the file
`shell.m4' and the name space `AS_*'.
* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.
* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
2000-10-26 01:51:10 +08:00
|
|
|
]])
|
|
|
|
|
2000-11-10 18:14:44 +08:00
|
|
|
AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])
|
Move the Autoconf independent shell macros into the file
`shell.m4' and the name space `AS_*'.
* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.
* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
2000-10-26 01:51:10 +08:00
|
|
|
AT_CHECK([./configure], 0)
|
|
|
|
|
|
|
|
AT_CLEANUP(configure)
|
2000-11-10 18:14:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## ------------ ##
|
|
|
|
## AS_MKDIR_P. ##
|
|
|
|
## ------------ ##
|
|
|
|
|
|
|
|
# Build nested dirs.
|
|
|
|
|
2000-11-14 18:40:42 +08:00
|
|
|
AT_SETUP([AS_MKDIR_P])
|
2000-11-10 18:14:44 +08:00
|
|
|
|
|
|
|
AT_DATA(configure.in,
|
|
|
|
[[AC_PLAIN_SCRIPT
|
|
|
|
pwd=`pwd`
|
|
|
|
set -e
|
|
|
|
# Absolute
|
|
|
|
AS_MKDIR_P(["$pwd/1/2/3/4/5/6"])
|
|
|
|
test -d "$pwd/1/2/3/4/5/6" ||
|
|
|
|
AC_MSG_ERROR([$pwd/1/2/3/4/5/6 has not been properly created])
|
|
|
|
# Relative
|
|
|
|
AS_MKDIR_P(["a/b/c/d/e/f"])
|
|
|
|
test -d a/b/c/d/e/f ||
|
|
|
|
AC_MSG_ERROR([a/b/c/d/e/f has not been properly created])
|
|
|
|
AS_EXIT(0)
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])
|
|
|
|
AT_CHECK([./configure], 0)
|
|
|
|
|
|
|
|
AT_CLEANUP(configure 1 a)
|
2000-11-10 22:43:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## ----------------------------- ##
|
|
|
|
## Negated classes in globbing. ##
|
|
|
|
## ----------------------------- ##
|
|
|
|
|
|
|
|
# It is known that `[^...]' is not universally supported, but it is
|
|
|
|
# unknown for `[!...]'.
|
|
|
|
|
|
|
|
AT_SETUP([Negated classes in globbing])
|
|
|
|
|
|
|
|
AT_DATA(configure.in,
|
|
|
|
[[AC_PLAIN_SCRIPT
|
|
|
|
case 'with!two!bangs' in
|
|
|
|
*[[!a-z]]*) ;;
|
|
|
|
*) AC_MSG_ERROR([[`*[!a-z]*' didn't match `with!two!bangs']]);;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case without in
|
|
|
|
*[[!a-z]]*) AC_MSG_ERROR([[`*[!a-z]*' matched `without']]);;
|
|
|
|
esac
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 0, [], [])
|
|
|
|
AT_CHECK([./configure], 0)
|
|
|
|
|
|
|
|
AT_CLEANUP(configure)
|