export targetarch=
export amd64=false
+# Define the compiler used in tests (gcc is not installed everywhere)
+: ${CC:=gcc}
+
# Iterate through arguments
for i in "$@"
do
[ $help = 0 ] && echo "Configuring `basename $i`:"
olddir=`pwd`
cd src/$i
- ./configure "$@"
+ CC="$CC" ./configure "$@"
[ $? != 0 ] && exit 1
cd $olddir
fi
echo > config.mak
if [ "$(uname -s)" = "FreeBSD" ]
then
- printf "#include <sys/param.h>\n int main(){ return 0;}" | gcc -c -x c - >/dev/null 2>&1
+ printf "#include <sys/param.h>\n int main(){ return 0;}" | $CC -c -x c - >/dev/null 2>&1
[ "$?" -eq 0 ] && echo "HAVE_SYS_PARAM_H=1" >> config.mak
fi
exit 0
if [ "$vdpau" = "true" ]
then
- printf "#include <libavcodec/vdpau.h>\n int main(){ VdpBitstreamBuffer test; test.struct_version; return 0;}" | gcc -I"$static_ffmpeg" $CFLAGS -c -x c - >/dev/null 2>&1
+ printf "#include <libavcodec/vdpau.h>\n int main(){ VdpBitstreamBuffer test; test.struct_version; return 0;}" | $CC -I"$static_ffmpeg" $CFLAGS -c -x c - >/dev/null 2>&1
[ "$x11" = "0" -a "$?" = "0" ] && echo "VDPAU=1" >> config.mak
fi
else
if [ "$vdpau" = "true" ]
then
- printf "#include <libavcodec/vdpau.h>\n int main(){ VdpBitstreamBuffer test; test.struct_version; return 0;}" | gcc -I"$(pkg-config --cflags libavformat)" -I"$shared_ffmpeg/include" $CFLAGS -c -x c - >/dev/null 2>&1
+ printf "#include <libavcodec/vdpau.h>\n int main(){ VdpBitstreamBuffer test; test.struct_version; return 0;}" | $CC -I"$(pkg-config --cflags libavformat)" -I"$shared_ffmpeg/include" $CFLAGS -c -x c - >/dev/null 2>&1
[ "$x11" = "0" -a "$?" = "0" ] && echo "VDPAU=1" >> config.mak
fi
else
if [ "$help" != "1" ]
then
- echo "#include <frei0r.h> int main(){ f0r_plugin_info_t test; test.name;return 0;}"| gcc $CFLAGS -c -x c - >/dev/null 2>&1
+ echo "#include <frei0r.h> int main(){ f0r_plugin_info_t test; test.name;return 0;}"| $CC $CFLAGS -c -x c - >/dev/null 2>&1
if [ "$?" = "1" ]
then