3 # This script will automates the steps used to producing a static win32
6 # It requires cygwin with gcc and zip packages installed. Also, it
7 # requires to already have several external libraries already installed
10 # And last, it will optional package a wget compiled with VC++ instead
11 # of cygwin version (which has no DLL's to distribute) if found
12 # in wget-1.11.4 directory. If not found, it will distribute the
13 # cygwin version and various DLL's it requires.
17 # Script makes use of "-static" option to tell compiler to prefer static
18 # external libraries so that we do not need to distribute DLL's.
20 # Libtool will get confused with this flag for external libraries
21 # that have a libtool lib*.la file and support shared libraries as
22 # well as static libraries (but usually only if that library
23 # further depends on other external libraries with lib*.la files).
24 # Libtool may ignore -static option or it may link first external
25 # library as static but other dependent libraries as shared (usually
26 # because it follows $dependency_libs and that ignores -static option).
28 # Work arounds include to only install static libraries, delete the lib*.la
29 # file, or edit the lib*.la file and set dlnames and library_names variables
30 # to empty string ("").
32 # The following command lines were used to generate the static external
33 # libraries SoX ships with.
35 # libpng.la will have libtool issue because depends on libz
36 # which has a libz.la file. Must edit libpng.la to
37 # prevent needing to distribute cygzlib1.dll.
39 # ./configure --disable-shared --enable-static;make;sudo make install
41 # cd ../wavpack-4.60.1
42 # ./configure --disable-shared --enable-static;make;sudo make install
45 # ./configure --disable-shared --enable-static;make;sudo make install
48 # ./configure --disable-shared --enable-static;make;sudo make install
50 # cd ../libvorbis-1.2.0
51 # ./configure --disable-shared --enable-static;make;sudo make install
53 # cd ../libsndfile-1.0.20
54 # ./configure --disable-shared --enable-static;make;sudo make install
56 # cd ../libid3tag-0.15.1b
57 # ./configure --disable-shared --enable-static;make;sudo make install
59 # To get MP3 header files used to enable MP3 support (no libraries used):
62 # ./configure --enable-shared --disable-static;make;sudo make install
64 [ ! -x configure
] && autoreconf
-i
66 # Some versions of autoconf (2.63?) seem to get easily confused about
67 # CPP variable. If you see warning messages about header files
68 # rejected by preprocessor then its most likely from that.
69 # Force the value of CPP=cpp works around that bug.
70 # static versions of libsndfile do not advertise when they have
71 # FLAC or ogg vorbis support. Need to force the link ourselves.
72 if [ $# -ne 0 -o ! -r Makefile
]; then
76 --enable-dl-lame --enable-dl-mad --enable-dl-amrnb --enable-dl-amrwb \
78 CPPFLAGS
=-I/usr
/local
/include \
79 LDFLAGS
="-L/usr/local/lib" \
80 SNDFILE_LIBS
="-lsndfile -lFLAC -lvorbisenc -lvorbisfile -lvorbis -logg" \
84 make -s all pdf txt ||
exit 1
86 dir
=sox-
`grep Version: sox.pc | cut -d ' ' -f 2`
87 rm -rf $dir $dir-cygwin32.
zip
90 for f
in ChangeLog LICENSE.GPL README README.win32
; do
97 [ ! -r "../wget-1.11.4/wget.exe" -a -r /usr
/bin
/wget
] && binaries
+=" /usr/bin/wget"
99 binaries
=$
(for f
in `cygcheck $binaries|dos2unix`
100 do cygpath
-u $f; done|
sort|
uniq|
grep -v ^
/cygdrive
/)
107 scripts
/batch-example.bat \
110 unix2dos
$dir/batch-example.bat
112 if test -r "../wget-1.11.4/wget.exe"; then
113 cp ..
/wget-1.11
.4/wget.exe
$dir
114 cp ..
/wget-1.11
.4/wget.ini
$dir
116 if test -r /usr
/bin
/wget
-a -r /etc
/wgetrc
; then
117 cp -p /etc
/wgetrc
$dir/wget.ini
118 chmod +r
$dir/wget.ini
122 zip -r $dir-cygwin32.
zip $dir