File: test-header-compile

package info (click to toggle)
gst-plugins-base1.0 1.26.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,840 kB
  • sloc: ansic: 398,488; cpp: 3,961; objc: 2,502; python: 292; sh: 66; makefile: 51
file content (88 lines) | stat: -rw-r--r-- 3,040 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#!/bin/bash

#prefix=/usr/local

fail_on_error=true
#fail_on_error=false

output=tail
#output=cat

set -e

for lib in allocators app audio fft pbutils riff rtp rtsp sdp tag video ; do
  #files=$(cd ${prefix}/include/gstreamer-1.0/ && find . -name '*.h')
  if test $lib = "allocators"; then
    files="allocators.h gstdmabuf.h"
  elif test $lib = "app"; then
    files="app.h gstappsrc.h gstappsink.h"
  elif test $lib = "audio"; then
    files="audio.h audio-format.h audio-channels.h audio-info.h \
           gstaudioringbuffer.h gstaudioclock.h gstaudiofilter.h \
           gstaudiocdsrc.h gstaudiodecoder.h gstaudioencoder.h \
           gstaudiobasesink.h gstaudiobasesrc.h gstaudiometa.h \
           gstaudiosink.h gstaudiosrc.h streamvolume.h gstaudioiec61937.h"
  elif test $lib = "fft"; then
    files="fft.h gstfft.h gstffts16.h gstffts32.h gstfftf32.h gstfftf64.h"
  elif test $lib = "pbutils"; then
    files="pbutils.h codec-utils.h descriptions.h  encoding-profile.h \
           encoding-target.h install-plugins.h missing-plugins.h \
           gstdiscoverer.h"
  elif test $lib = "riff"; then
    files="riff.h riff-ids.h riff-media.h riff-read.h"
  elif test $lib = "rtp"; then
    files="rtp.h gstrtpbuffer.h gstrtcpbuffer.h gstrtppayloads.h \
           gstrtphdrext.h gstrtpbaseaudiopayload.h gstrtpbasepayload.h \
           gstrtpbasedepayload.h"
  elif test $lib = "rtsp"; then
    files="rtsp.h gstrtsp.h gstrtsptransport.h gstrtspurl.h \
           gstrtspmessage.h gstrtspconnection.h gstrtspdefs.h \
           gstrtspextension.h gstrtsprange.h"
  elif test $lib = "sdp"; then
    files="sdp.h gstsdp.h gstsdpmessage.h"
  elif test $lib = "tag"; then
    files="tag.h gsttagdemux.h gsttagmux.h xmpwriter.h"
  elif test $lib = "video"; then
    files="colorbalance.h colorbalancechannel.h navigation.h video.h \
           video-event.h video-format.h video-chroma.h video-color.h \
           video-info.h video-frame.h gstvideosink.h gstvideofilter.h \
           gstvideometa.h gstvideopool.h videoorientation.h videooverlay.h \
           gstvideodecoder.h gstvideoencoder.h gstvideoutils.h \
           video-blend.h video-overlay-composition.h videodirection.h"
  fi

CFLAGS=`pkg-config --cflags gstreamer-1.0 gstreamer-$lib-1.0`
CFLAGS="$CFLAGS -DGST_USE_UNSTABLE_API"

for each in $files ; do
  each="gst/$lib/$each"
  echo Testing $each...
  rm -f test.o
  cat >test.c <<-EOF
#include <glib.h>
#include <gst/gst.h>
#include <$each>
EOF
  cc $CFLAGS -Wall -Werror -c test.c -o test.o 2>&1 | tail
  $fail_on_error && test ! -f test.o && exit 1

  echo Testing $each "(no gst)..."
  rm -f test.o
  cat >test.c <<-EOF
#include <glib.h>
#include <$each>
EOF
  cc $CFLAGS -Wall -Werror -c test.c -o test.o 2>&1 | tail
  $fail_on_error && test ! -f test.o && exit 1

  echo Testing $each "(no glib)..."
  rm -f test.o
  cat >test.c <<-EOF
#include <$each>
EOF
  cc $CFLAGS -Wall -Werror -c test.c -o test.o 2>&1 | tail
  $fail_on_error && test ! -f test.o && exit 1

done # for each file

done # for each lib