+
+AC_CHECK_PROGS([AVIFILE_CONFIG], [avifile-config])
+
+if test "x$AVIFILE_CONFIG" '!=' "x";then
+ OLDCPPFLAGS="$CPPFLAGS"
+ # temporarily add avifile paths to CPPFLAGS...
+ CPPFLAGS="$CPPFLAGS $CXXFLAGS "`$AVIFILE_CONFIG --cflags`
+ AC_CHECK_HEADERS(avifile/version.h version.h)
+ # ... and reset
+ CPPFLAGS="$OLDCPPFLAGS"
+fi
+