3 .
scripts
/configure.sh ||
exit 1
7 check_cc_flag
-std=gnu99
-pipe -Wall -Wshadow -Wcast-align -Wpointer-arith \
8 -Wwrite-strings -Wundef -Wmissing-prototypes -Wredundant-decls
10 for i
in -Wdeclaration-after-statement -Wold-style-definition -Wno-pointer-sign
23 try_link
-lsocket && COMPAT_LIBS
="$COMPAT_LIBS -lsocket"
26 try_link
-lnsl && COMPAT_LIBS
="$COMPAT_LIBS -lnsl"
31 COMPAT_LIBS
="$COMPAT_LIBS -lrt"
32 elif try_link
-lposix4
34 COMPAT_LIBS
="$COMPAT_LIBS -lposix4"
39 makefile_vars CONFIG_CYGWIN
41 makefile_vars COMPAT_LIBS
46 if check_library NCURSES
"" -lncursesw
51 if check_library NCURSES
"" -lncurses || check_library NCURSES
"" -lcurses
54 msg_error
"Your ncurses does not support wide characters!"
55 msg_error
"Install ncursesw if you need wide character support,"
56 msg_error
"you can ignore this warning otherwise."
64 check_library MPC
"" "-lmpcdec"
70 check_library FLAC
"" "-lFLAC -lm" && return 0
71 check_library FLAC
"" "-lFLAC -lvorbisfile -lm"
77 pkg_config MAD
"mad" "" "-lmad -lm"
83 check_library MIKMOD
"" "-lmikmod"
89 pkg_config MODPLUG
"libmodplug" "-I/usr/include/libmodplug" "-lmodplug -lstdc++ -lm"
95 if test "$CONFIG_TREMOR" = y
97 pkg_config VORBIS
"vorbisidec" "" "-lvorbisidec -lm"
100 pkg_config VORBIS
"vorbisfile" "" "-lvorbisfile -lvorbis -lm -logg"
107 # the alsa.pc file should be always available
108 pkg_config ALSA
"alsa >= 1.0.11"
114 pkg_config AO
"ao" "" "-lao"
120 app_config ARTS artsc-config
130 check_library OSS
"" "-lossaudio"
140 msg_checking
"for header <sys/soundcard.h>"
141 if test -f /usr
/include
/sys
/soundcard.h
144 makefile_vars OSS_CFLAGS OSS_LIBS
154 msg_checking
"for header <sys/audioio.h>"
155 if test -f /usr
/include
/sys
/audioio.h
169 check_library WAVEOUT
"" "-lwinmm"
177 check_header faad.h
&&
178 check_library MP4
"" "-lmp4v2 -lfaad -lm"
184 check_header faad.h
&&
185 check_library AAC
"" "-lfaad -lm"
191 pkg_config FFMPEG
"libavformat"
200 # unset CONFIG_* variables: if check succeeds 'y', otherwise 'n'
204 prefix Installation prefix [$prefix]
205 bindir User executables [\$prefix/bin]
206 datadir Read-only data [\$prefix/share]
207 libdir Libraries [\$prefix/lib]
208 mandir Man pages [\$datadir/man]
209 DEBUG Debugging level (0-2) [$DEBUG]
211 Optional Features: y/n
212 CONFIG_FLAC Free Lossless Audio Codec (.flac, .fla) [auto]
213 CONFIG_MAD MPEG Audio Decoder (.mp3, .mp2, streams) [auto]
214 CONFIG_MODPLUG libmodplug (.mod, .x3m, ...) [auto]
215 CONFIG_MIKMOD libmikmod (.mod, .x3m, ...) [n]
216 CONFIG_MPC libmpcdec (Musepack .mpc, .mpp, .mp+) [auto]
217 CONFIG_VORBIS Ogg/Vorbis (.ogg, application/ogg, audio/x-ogg) [auto]
218 CONFIG_TREMOR Use Tremor as Ogg/Vorbis input plugin [n]
220 CONFIG_MP4 MPEG-4 AAC (.mp4, .m4a, .m4b) [auto]
221 CONFIG_AAC AAC (.aac, audio/aac, audio/aacp) [auto]
222 CONFIG_FFMPEG FFMPEG (.shn, .wma) [auto]
223 CONFIG_ALSA ALSA [auto]
224 CONFIG_AO Libao cross-platform audio library [auto]
225 CONFIG_ARTS ARTS [auto]
226 CONFIG_OSS Open Sound System [auto]
227 CONFIG_SUN Sun Audio [auto]
228 CONFIG_WAVEOUT Windows Wave Out [auto]
230 Also many standard variables like CC are recognized."
232 parse_command_line
"$@"
238 die
"DEBUG must be 0-2"
242 var_default bindir
"${prefix}/bin"
243 var_default datadir
"${prefix}/share"
244 var_default libdir
"${prefix}/lib"
245 var_default mandir
"${datadir}/man"
249 check check_cc_depgen
250 check check_endianness
257 check check_flac CONFIG_FLAC
258 check check_mad CONFIG_MAD
259 check check_mikmod CONFIG_MIKMOD
260 check check_modplug CONFIG_MODPLUG
261 check check_mpc CONFIG_MPC
262 check check_vorbis CONFIG_VORBIS
263 check check_mp4 CONFIG_MP4
264 check check_aac CONFIG_AAC
265 check check_ffmpeg CONFIG_FFMPEG
266 # nothing to check, just validate the variable values
267 check true CONFIG_TREMOR
268 check true CONFIG_WAV
269 check check_alsa CONFIG_ALSA
270 check check_ao CONFIG_AO
271 check check_arts CONFIG_ARTS
272 check check_oss CONFIG_OSS
273 check check_sun CONFIG_SUN
274 check check_waveout CONFIG_WAVEOUT
276 test "$WORDS_BIGENDIAN" = y
&& CFLAGS
="${CFLAGS} -DWORDS_BIGENDIAN"
281 config_header config
/datadir.h DATADIR
282 config_header config
/libdir.h LIBDIR
283 config_header config
/debug.h DEBUG
284 config_header config
/tremor.h CONFIG_TREMOR
286 makefile_vars bindir datadir libdir mandir
287 makefile_vars CONFIG_FLAC CONFIG_MAD CONFIG_MIKMOD CONFIG_MODPLUG CONFIG_MPC CONFIG_VORBIS CONFIG_WAV CONFIG_MP4 CONFIG_AAC CONFIG_FFMPEG
288 makefile_vars CONFIG_ALSA CONFIG_AO CONFIG_ARTS CONFIG_OSS CONFIG_SUN CONFIG_WAVEOUT