743c8e392673551049e6fb24e1c8a566a2f5ef50
[platform/upstream/automake.git] / tests / link_f_c_cxx.test
1 #! /bin/sh
2
3 # Test to make sure the C++ linker is used when appropriate.
4 # Matthew D. Langston <langston@SLAC.Stanford.EDU>
5
6 . $srcdir/defs || exit 1
7
8 cat >> configure.in << 'END'
9 AC_PROG_CC
10 AC_PROG_CXX
11 AC_PROG_F77
12 END
13
14 cat > Makefile.am << 'END'
15 bin_PROGRAMS = lavalamp
16 lavalamp_SOURCES = lava.c lamp.cxx lamp2.f
17 END
18
19 : > lava.c
20 : > lamp.cxx
21 : > lamp2.f
22
23 $ACLOCAL || exit 1
24 $AUTOMAKE || exit 1
25
26
27 # We should only see the C++ linker in the rules of `Makefile.in'.
28
29 # Look for this macro not at the beginning of any line; that will have
30 # to be good enough for now.
31 grep '.\$(CXXLINK)' Makefile.in  || exit 1
32
33 # We should not see these patterns:
34 grep '.\$(F77LINK)' Makefile.in && exit 1
35 grep '.\$(LINK)'    Makefile.in && exit 1
36
37 exit 0