annotate src/libsndfile-1.0.27/tests/pedantic-header-test.sh.in @ 168:ceec0dd9ec9c

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