diff --git a/macros/openvg.m4 b/macros/openvg.m4
index 8bd23bb..f12d768 100644
--- a/macros/openvg.m4
+++ b/macros/openvg.m4
@@ -22,7 +22,7 @@ AC_DEFUN([GNASH_PATH_OPENVG],
   AC_ARG_WITH(openvg_includes, AC_HELP_STRING([--with-openvg-includes], [directory where Openvg headers are]), with_openvg_includes=${withval})
   AC_CACHE_VAL(ac_cv_path_openvg_includes,[
     if test x"${with_openvg_includes}" != x; then
-      if test -f ${with_openvg_includes}/openvg.h; then
+      if test -f ${with_openvg_includes}/VG/openvg.h; then
         ac_cv_path_openvg_includes="`(cd ${with_openvg_includes}; pwd)`"
       else
         AC_MSG_ERROR([${with_openvg_includes} directory doesn't contain VG/openvg.h])
@@ -60,11 +60,7 @@ AC_DEFUN([GNASH_PATH_OPENVG],
   dnl   AC_CHECK_HEADER([VG/openvg.h], [ac_cv_path_openvg_includes=""])
   dnl fi
 
-  if test x"${mesavg}" = xyes; then
-    OPENVG_CFLAGS="${ac_cv_path_openvg_includes}"
-  else
-    OPENVG_CFLAGS="-DOPENVG_STATIC_LIBRARY ${ac_cv_path_openvg_includes}"
-  fi
+  OPENVG_CFLAGS="-I${ac_cv_path_openvg_includes}"
   AC_MSG_RESULT(${ac_cv_path_openvg_includes})
 
   dnl Look for the libraries.
