Fix a small bug in header detection for Activex
authorChristophe Mutricy <xtophe@videolan.org>
Wed, 20 Dec 2006 17:01:34 +0000 (17:01 +0000)
committerChristophe Mutricy <xtophe@videolan.org>
Wed, 20 Dec 2006 17:01:34 +0000 (17:01 +0000)
configure.ac

index ba97239..2714e81 100644 (file)
@@ -5265,18 +5265,23 @@ then
        WIDL=no
     fi
     AC_LANG_PUSH(C++)
-    AC_CHECK_HEADERS(ole2.h olectl.h,
-      [ VLC_ADD_CPPFLAGS([activex],[-D_MIDL_USE_GUIDDEF_])
-        VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
-        VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi]) 
-        AC_CHECK_HEADERS(objsafe.h,
-          VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER]),,
-          [#if HAVE_OLE2_H
-           #   include <ole2.h>
-           #endif]
-        )
-        activex=:
-      ],
+    AC_CHECK_HEADERS(ole2.h, 
+      [AC_CHECK_HEADERS(olectl.h,
+        [ VLC_ADD_CPPFLAGS([activex],[-D_MIDL_USE_GUIDDEF_])
+          VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
+          VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi]) 
+          AC_CHECK_HEADERS(objsafe.h,
+            VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER]),,
+            [
+            #if HAVE_OLE2_H
+             #   include <ole2.h>
+             #endif
+            ]
+          )
+          activex=:
+        ],
+        [ AC_MSG_ERROR([required OLE headers are missing from your system]) ]
+      )],
       [ AC_MSG_ERROR([required OLE headers are missing from your system]) ]
     )
     AC_LANG_POP(C++)