From a11cc13e77e96cf40b6060dd8384a00ff110b846 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Wed, 4 Aug 2010 20:31:06 +0200 Subject: [PATCH] Fix AC_LANG_SOURCE and AC_LANG_PROGRAM tests. * tests/compile.at (AC_LANG_SOURCE example) (AC_LANG_PROGRAM example): Fix broken sed script for extracting the interesting part of the conftest.c file. Fixes test failure on Haiku. * THANKS: Update. Report by Scott McCreary. Signed-off-by: Ralf Wildenhues --- ChangeLog | 10 ++++++++++ THANKS | 1 + tests/compile.at | 18 ++++++++---------- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7184742e..d5973dce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-08-04 Ralf Wildenhues + + Fix AC_LANG_SOURCE and AC_LANG_PROGRAM tests. + * tests/compile.at (AC_LANG_SOURCE example) + (AC_LANG_PROGRAM example): Fix broken sed script for + extracting the interesting part of the conftest.c file. + Fixes test failure on Haiku. + * THANKS: Update. + Report by Scott McCreary. + 2010-08-03 Eric Blake docs: mention bash bug with word splitting diff --git a/THANKS b/THANKS index a621844d..fc5a9b75 100644 --- a/THANKS +++ b/THANKS @@ -350,6 +350,7 @@ Sam Varshavchik mrsam@courier-mta.com Sander Niemeijer niemeijer@science-and-technology.nl santilín listas@gestiong.org Scott Bambrough scottb@corelcomputer.com +Scott McCreary scottmc2@gmail.com Scott Stanton stanton@scriptics.com Sebastian Freundt hroptatyr@gna.org Sergey Poznyakoff ? diff --git a/tests/compile.at b/tests/compile.at index 028f4563..6a1092b0 100644 --- a/tests/compile.at +++ b/tests/compile.at @@ -190,12 +190,11 @@ gcc -E -dD conftest.c || AS_EXIT([77]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([], [], [stdout]) # Taken from autoconf.texi:Generating Sources. -# Note that the output may contain more than one line matching +# Note that the output may contain more defines and lines matching # # 1 "conftest.c" -# so delete everything until the last one. -AT_CHECK([sed '1,/# 1 "conftest\.c"/d' stdout], [], -[[ -#define PACKAGE_NAME "Hello" +# so delete everything before the interesting output. +AT_CHECK([sed -n '/#define PACKAGE/,$p' stdout], [], +[[#define PACKAGE_NAME "Hello" #define PACKAGE_TARNAME "hello" #define PACKAGE_VERSION "1.0" #define PACKAGE_STRING "Hello 1.0" @@ -236,12 +235,11 @@ gcc -E -dD conftest.c || AS_EXIT([77]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([], [], [stdout]) # Taken from autoconf.texi:Generating Sources. -# Note that the output may contain more than one line matching +# Note that the output may contain more defines and lines matching # # 1 "conftest.c" -# so delete everything until the last one. -AT_CHECK([sed '1,/# 1 "conftest\.c"/d' stdout], [], -[[ -#define PACKAGE_NAME "Hello" +# so delete everything before the interesting output. +AT_CHECK([sed -n '/#define PACKAGE/,$p' stdout], [], +[[#define PACKAGE_NAME "Hello" #define PACKAGE_TARNAME "hello" #define PACKAGE_VERSION "1.0" #define PACKAGE_STRING "Hello 1.0" -- 2.47.2