aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check_config_h.rb47
-rwxr-xr-xscripts/test.sh3
2 files changed, 50 insertions, 0 deletions
diff --git a/scripts/check_config_h.rb b/scripts/check_config_h.rb
new file mode 100755
index 000000000..2619984e4
--- /dev/null
+++ b/scripts/check_config_h.rb
@@ -0,0 +1,47 @@
+#!/usr/bin/env ruby
+#
+# This script verifies that every source includes config.h first.
+# This is very important for consistent Large File Support.
+#
+
+def check_file(file)
+ first = true
+ file.each_line do |line|
+ if line =~ /^\#include\s+(\S+)/ then
+ if $1 == '"config.h"'
+ unless first
+ puts "#{file.path}: config.h included too late"
+ end
+ else
+ if first
+ puts "#{file.path}: config.h missing"
+ end
+ end
+ first = false
+ end
+ end
+end
+
+def check_path(path)
+ File.open(path) do |file|
+ check_file(file)
+ end
+end
+
+if ARGV.empty?
+ Dir["src/*.c"].each do |path|
+ check_path(path)
+ end
+
+ Dir["src/*/*.c"].each do |path|
+ check_path(path)
+ end
+
+ Dir["test/*.c"].each do |path|
+ check_path(path)
+ end
+else
+ ARGV.each do |path|
+ check_path(path)
+ end
+end
diff --git a/scripts/test.sh b/scripts/test.sh
index 170e247fa..739a8a6e7 100755
--- a/scripts/test.sh
+++ b/scripts/test.sh
@@ -18,6 +18,7 @@ test -x configure || NOCONFIGURE=1 ./autogen.sh
./configure --prefix=$PREFIX/full \
--disable-dependency-tracking --enable-debug --enable-werror \
--enable-un \
+ --enable-modplug \
--enable-ao --enable-mikmod --enable-mvp
$MAKE install
$MAKE distclean
@@ -47,6 +48,7 @@ $MAKE install
$MAKE distclean
# shout: ogg without mp3
+# sndfile instead of modplug
./configure --prefix=$PREFIX/shout_ogg \
--disable-dependency-tracking --disable-debug --enable-werror \
--disable-tcp \
@@ -56,6 +58,7 @@ $MAKE distclean
--enable-shout-ogg --disable-shout-mp3 --disable-lame-encoder \
--disable-ffmpeg --disable-wavpack --disable-mpc --disable-aac \
--disable-flac --enable-vorbis --disable-oggflac --disable-audiofile \
+ --disable-modplug --enable-sndfile \
--with-zeroconf=no
$MAKE install
$MAKE distclean