Tag
Hash :
6a8d042c
Author :
Date :
2002-01-14T00:29:31
2002-01-13 Tom Tromey <tromey@redhat.com> For PR automake/288: * automake.in (lang_c_rewrite): Set value for de_ansi_files entry to directory. (lang_c_finish): Likewise. Also, use directory information from de_ansi_files. 2002-01-13 Kevin Ryde <user42@zip.com.au> For PR automake/288: * tests/Makefile.am (TESTS): Added ansi6.test. * tests/ansi6.test: New file.
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
#! /bin/sh
# Check ansi2knr on a source file in subdirectory.
# From Kevin Ryde.
required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
AC_INIT(ansi6, 1.0)
AM_INIT_AUTOMAKE
AC_PROG_CC
AM_C_PROTOTYPES
AC_EXEEXT
AC_OBJEXT
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = ansi2knr
bin_PROGRAMS = hello
hello_SOURCES = hello.c sub/dir.c
END
cat > hello.c << 'END'
#include <stdio.h>
extern int foo ();
int
main (int argc, char **argv)
{
printf ("%d\n", foo ());
}
END
mkdir sub
cat > sub/dir.c << 'END'
int
foo ()
{
return 23;
}
END
set -e
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
./configure am_cv_prog_cc_stdc=no
$MAKE