annotate src/libsndfile-1.0.27/tests/pedantic-header-test.sh.in @ 84:08ae793730bd

Add null config files
author Chris Cannam
date Mon, 02 Mar 2020 14:03:47 +0000
parents 1df64224f5ac
children
rev   line source
Chris@40 1 #!/bin/bash
Chris@40 2
Chris@40 3 # Copyright (C) 2010-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
Chris@40 4 #
Chris@40 5 # All rights reserved.
Chris@40 6 #
Chris@40 7 # Redistribution and use in source and binary forms, with or without
Chris@40 8 # modification, are permitted provided that the following conditions are
Chris@40 9 # met:
Chris@40 10 #
Chris@40 11 # * Redistributions of source code must retain the above copyright
Chris@40 12 # notice, this list of conditions and the following disclaimer.
Chris@40 13 # * Redistributions in binary form must reproduce the above copyright
Chris@40 14 # notice, this list of conditions and the following disclaimer in
Chris@40 15 # the documentation and/or other materials provided with the
Chris@40 16 # distribution.
Chris@40 17 # * Neither the author nor the names of any contributors may be used
Chris@40 18 # to endorse or promote products derived from this software without
Chris@40 19 # specific prior written permission.
Chris@40 20 #
Chris@40 21 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
Chris@40 22 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
Chris@40 23 # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
Chris@40 24 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
Chris@40 25 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
Chris@40 26 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
Chris@40 27 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
Chris@40 28 # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
Chris@40 29 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
Chris@40 30 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
Chris@40 31 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Chris@40 32
Chris@40 33
Chris@40 34 if test ! -f @top_srcdir@/tests/sfversion.c ; then
Chris@40 35 exit 0
Chris@40 36 fi
Chris@40 37
Chris@40 38 echo -n " Pedantic header test : "
Chris@40 39
Chris@40 40 # Only do this if the compiler is GCC.
Chris@40 41 if test -n "@GCC_MAJOR_VERSION@" ; then
Chris@40 42
Chris@40 43 CC=`echo "@CC@" | sed "s/.*shave cc //"`
Chris@40 44 # Compile with -Werror and -pedantic.
Chris@40 45 $CC -std=c99 -Werror -pedantic -I@top_builddir@/src -c @top_srcdir@/tests/sfversion.c -o /dev/null
Chris@40 46
Chris@40 47 # Check compiler return status.
Chris@40 48 if test $? -ne 0 ; then
Chris@40 49 echo
Chris@40 50 exit 1
Chris@40 51 fi
Chris@40 52
Chris@40 53 echo "ok"
Chris@40 54 else
Chris@40 55 echo "n/a"
Chris@40 56 fi
Chris@40 57
Chris@40 58 exit 0