annotate src/libsndfile-1.0.25/tests/pedantic-header-test.sh.in @ 124:e3d5853d5918

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