}
EOF
-ac_link='g++ `avifile-config --cflags` `avifile-config --libs` conftest.$ac_ext -o conftest${ac_exeext}'
+ac_link='$CXX $CPPFLAGS $CXXFLAGS `avifile-config --cflags` `avifile-config --libs` conftest.$ac_ext -o conftest${ac_exeext}'
if {(eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
echo "$ac_t""yes" 1>&6
AVIFILE=true