source: vendor/automake/1.4-p6/tests/ansi3.test

Last change on this file was 3124, checked in by bird, 18 years ago

automake 1.4-p6

File size: 831 bytes
Line 
1#! /bin/sh
2
3# Actual test of ansi2knr functionality. Relies on existence
4# of working gcc.
5
6. $srcdir/defs || exit 1
7
8cat > configure.in << 'END'
9AC_INIT(hello.c)
10AM_INIT_AUTOMAKE(hello,0.23)
11AC_PROG_CC
12AM_C_PROTOTYPES
13AC_OUTPUT(Makefile)
14END
15
16cat > Makefile.am << 'END'
17AUTOMAKE_OPTIONS = ansi2knr
18bin_PROGRAMS = hello
19END
20
21cat > hello.c << 'END'
22#include <stdio.h>
23int
24main (int argc, char *argv[])
25{
26 printf ("yeah, yeah\n");
27 return 0;
28}
29END
30
31# Fail gracefully if no autoconf.
32(autoconf --version) > /dev/null 2>&1 || exit 0
33
34# Likewise for gcc.
35(gcc -v) > /dev/null 2>&1 || exit 0
36
37# We use gcc and not gcc -traditional as the latter fails on some
38# Linux boxes (Red Hat 5.1 in particular).
39$ACLOCAL \
40 && autoconf \
41 && $AUTOMAKE -a \
42 && CC='gcc' ./configure \
43 && $MAKE ANSI2KNR=./ansi2knr U=_ \
44 && ./hello
Note: See TracBrowser for help on using the repository browser.