summaryrefslogtreecommitdiff
path: root/gnu/dist/autoconf/tests/foreign.at
blob: b618af9203a927fa73e5a679406a54b1fe4747d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#							-*- autoconf -*-

AT_BANNER([Compatibility with other tools.])

## -------------------- ##
## Autoconf & Libtool.  ##
## -------------------- ##

AT_SETUP([[Libtool]])

# Skip this test if there is no libtoolize.
AT_CHECK([libtoolize --version || exit 77],
         ignore, ignore, ignore)
# CVS Autoconf probably does not work with too old Libtools.
AT_CHECK([[
case `libtoolize --version |
      sed -n '/^.* \([0-9][0-9.a-z]*\)$/{s//\1/;p;q;}'` in
  0.*          ) exit 77;;
  1.[012]*     ) exit 77;;
  1.3.[01234]* ) exit 77;;
esac]],
         ignore, ignore, ignore)

# FIXME: Once Libtool `configure.ac' aware, change this.
# Using a configure.in, have libtoolize confess where libtool.m4 is.
AT_DATA([configure.in],
[[AC_INIT
# The other tests are relying on Autoconf's own copy of install-sh
# etc. via AC_CONFIG_AUX_DIR(..).  Don't do that here, since we don't
# want libtoolize to pollute Autoconf's srcdir.
AC_CONFIG_AUX_DIR(.)
AC_PROG_LIBTOOL
]])
AT_CHECK([libtoolize | sed -n ["s,^.*\`\(/[^']*\)'.*,\1,p"]],
         0, [stdout], ignore)

# Make sure at-path contains something valid, and let the test suite
# display it when verbose.  And fail, skipping would too easily hide
# problems.
AT_CHECK([grep . stdout], 0, [ignore])
AT_CHECK([test -f "`cat stdout`"])

# libtoolize installed everything but install-sh...
touch install-sh

# Build the concatenation of libtool.m4 and configure.ac.
cp `cat stdout` configure.in
cat >>configure.in <<_EOF
AC_INIT
AC_CONFIG_AUX_DIR(.)
AC_CANONICAL_SYSTEM
AC_PROG_LIBTOOL
_EOF

AT_CHECK_AUTOCONF

# Ignore stderr, because ltconfig always loads the cache, which is
# /dev/null, and some shells choke on this.  For instance with Bash
# 2.05, you get:
#
#   loading cache /dev/null within ltconfig
#   ./ltconfig: .: /dev/null: not a regular file
#
# But the script executes properly.
AT_CHECK_CONFIGURE([], [], [], [ignore])

AT_CLEANUP(install-sh ltconfig libtool at-path ltmain.sh config.guess config.sub)