#! /bin/sh # Copyright (C) 2002, 2003 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Check that subdir sources, and file compiled using per-target flags # can still be deansified. # Report from Paul D. Smith. required=gcc . ./defs || Exit 1 set -e cat >>configure.in < Makefile.am << 'END' AUTOMAKE_OPTIONS = ansi2knr subdir-objects noinst_PROGRAMS = loadavg sub/sub loadavg_SOURCES = loadavg.c loadavg_CFLAGS = -DTEST sub_sub_SOURCES = sub/sub.c END cat > loadavg.c << 'END' int main () { return 0; } END mkdir sub cp loadavg.c sub/sub.c $ACLOCAL $AUTOCONF $AUTOMAKE --add-missing -Wno-override $FGREP 'loadavg-loadavg$U.o: loadavg$U.c' Makefile.in # The following rule should not exist, because the # default .o.c: inference rule is enough. $FGREP 'sub/sub$U.o: sub/sub$U.c' Makefile.in && Exit 1 # Force ansi2knr's use, regardless of the compiler. ./configure ac_cv_prog_cc_stdc=no $MAKE sub/sub_.c