3 # Test the operation of the _AM_DIRNAME macro from m4/header.m4
5 .
$srcdir/defs ||
exit 1
7 cat > configure.
in << 'END'
9 echo "1 /a/path/to/a/file = _AM_DIRNAME([/a/path/to/a/file])"
10 echo "2 another/path/to/a/file = _AM_DIRNAME([another/path/to/a/file])"
11 echo "3 file = _AM_DIRNAME([file])"
12 echo "4 // = _AM_DIRNAME([//])"
13 echo "5 //file = _AM_DIRNAME([//file])"
14 echo "6 / = _AM_DIRNAME([/])"
15 echo "7 /file = _AM_DIRNAME([/file])"
18 # Fail gracefully if no autoconf.
24 # fail gracefully if autoconf didn't support AC_PLAIN_SCRIPT, because it won't
25 # support our regexps anyhow
26 test -s configure ||
exit 77
28 $SHELL .
/configure
>got ||
exit 1
31 1 /a/path/to/a/file = /a/path/to/a
32 2 another/path/to/a/file = another/path/to/a
40 diff -u wanted got ||
exit 1