3 .
scripts
/configure.sh ||
exit 1
9 check_cc_flag
-std=gnu99
-pipe -Wall -Wshadow -Wcast-align -Wpointer-arith \
10 -Wwrite-strings -Wundef -Wmissing-prototypes -Wredundant-decls
12 for i
in -Wdeclaration-after-statement -Wold-style-definition -Wno-pointer-sign
21 if check_library NCURSES
"" -lncursesw
26 if check_library NCURSES
"" -lncurses || check_library NCURSES
"" -lcurses
29 msg_error
"Your ncurses does not support wide characters!"
30 msg_error
"Install ncursesw if you need wide character support,"
31 msg_error
"you can ignore this warning otherwise."
39 check_library MPC
"" "-lmpcdec"
45 check_library FLAC
"" "-lFLAC -lm"
51 pkg_config MAD
"mad" "" "-lmad -lm"
57 pkg_config MODPLUG
"libmodplug" "-I/usr/include/libmodplug" "-lmodplug -lstdc++ -lm"
63 if test "$CONFIG_TREMOR" = y
65 pkg_config VORBIS
"vobisidec" "" "-lvorbisidec -lm"
68 pkg_config VORBIS
"vorbisfile" "" "-lvorbisfile -lvorbis -lm -logg"
75 # the alsa.pc file should be always available
76 pkg_config ALSA
"alsa"
82 pkg_config AO
"ao" "" "-lao"
88 app_config ARTS artsc-config
98 check_library OSS
"" "-lossaudio"
108 msg_checking
"for header <sys/soundcard.h>"
109 if test -f /usr
/include
/sys
/soundcard.h
112 makefile_vars OSS_CFLAGS OSS_LIBS
122 msg_checking
"for header <sys/audioio.h>"
123 if test -f /usr
/include
/sys
/audioio.h
137 # unset CONFIG_* variables: if check succeeds 'y', otherwise 'n'
141 prefix Installation prefix [$prefix]
142 bindir User executables [\$prefix/bin]
143 datadir Read-only data [\$prefix/share]
144 libdir Libraries [\$prefix/lib]
145 mandir Man pages [\$datadir/man]
146 DEBUG Debugging level (0-2) [$DEBUG]
148 Optional Features: y/n
149 CONFIG_FLAC FLAC (Free Lossless Audio Codec) support [auto]
150 CONFIG_MAD MPEG Audio Decoder (libmad) support [auto]
151 CONFIG_MODPLUG libmodplug (mod, x3m, ...) support [auto]
152 CONFIG_MPC libmpcdec (Musepack .mpc) support [auto]
153 CONFIG_VORBIS Ogg/Vorbis support [auto]
154 CONFIG_TREMOR Use Tremor as Ogg/Vorbis input plugin [n]
155 CONFIG_WAV WAV support [y]
156 CONFIG_ALSA ALSA support [auto]
157 CONFIG_AO Libao cross-platform audio library [auto]
158 CONFIG_ARTS ARTS support [auto]
159 CONFIG_OSS Open Sound System support [auto]
160 CONFIG_SUN Sun Audio support [auto]
162 Also many standard variables like CC are recognized."
164 parse_command_line
"$@"
170 die
"DEBUG must be 0-2"
174 var_default bindir
"${prefix}/bin"
175 var_default datadir
"${prefix}/share"
176 var_default libdir
"${prefix}/lib"
177 var_default mandir
"${datadir}/man"
181 check check_cc_depgen
182 check check_endianness
188 check check_flac CONFIG_FLAC
189 check check_mad CONFIG_MAD
190 check check_modplug CONFIG_MODPLUG
191 check check_mpc CONFIG_MPC
192 check check_vorbis CONFIG_VORBIS
193 # nothing to check, just validate the variable values
194 check true CONFIG_TREMOR
195 check true CONFIG_WAV
196 check check_alsa CONFIG_ALSA
197 check check_ao CONFIG_AO
198 check check_arts CONFIG_ARTS
199 check check_oss CONFIG_OSS
200 check check_sun CONFIG_SUN
202 test "$WORDS_BIGENDIAN" = y
&& CFLAGS
="${CFLAGS} -DWORDS_BIGENDIAN"
207 config_header config
/version.h VERSION
208 config_header config
/datadir.h DATADIR
209 config_header config
/libdir.h LIBDIR
210 config_header config
/debug.h DEBUG
211 config_header config
/tremor.h CONFIG_TREMOR
213 makefile_vars VERSION bindir datadir libdir mandir
214 makefile_vars CONFIG_FLAC CONFIG_MAD CONFIG_MODPLUG CONFIG_MPC CONFIG_VORBIS CONFIG_WAV
215 makefile_vars CONFIG_ALSA CONFIG_AO CONFIG_ARTS CONFIG_OSS CONFIG_SUN