From d1484cf5435d3d4ca8e9c4ce6665ca745404bf31 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Wed, 21 Apr 2010 18:13:26 +1000 Subject: [PATCH] tests/pedantic-header-test.sh.in : New file to test whether sndfile.h can be compiled with gcc's -pedantic flag. --- ChangeLog | 6 ++++++ tests/pedantic-header-test.sh.in | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/pedantic-header-test.sh.in diff --git a/ChangeLog b/ChangeLog index e54fea05..f0f5899b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-04-21 Erik de Castro Lopo + + * tests/pedantic-header-test.sh.in + New file to test whether sndfile.h can be compiled with gcc's -pedantic + flag. + 2010-04-19 Erik de Castro Lopo * programs/sndfile-salvage.c programs/Makefile.am diff --git a/tests/pedantic-header-test.sh.in b/tests/pedantic-header-test.sh.in new file mode 100644 index 00000000..5779b1cd --- /dev/null +++ b/tests/pedantic-header-test.sh.in @@ -0,0 +1,22 @@ +#!/bin/bash + +echo -n " Pedantic header test : " + +# Only do this if the compiler is GCC. +if test -n "@GCC_MAJOR_VERSION@" ; then + + # Compile with -Werror and -pedantic. + @ac_ct_CC@ -Werror -pedantic -I@top_srcdir@/src -c sfversion.c -o /dev/null + + # Check compiler return status. + if test $? -ne 0 ; then + echo + exit 1 + fi + + echo "ok" +else + echo "n/a" + fi + +exit 0