]> git.sesse.net Git - vlc/commitdiff
* configure.ac: check for mozilla-config.h on win32 as well.
authorGildas Bazin <gbazin@videolan.org>
Sun, 26 Oct 2003 16:12:35 +0000 (16:12 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sun, 26 Oct 2003 16:12:35 +0000 (16:12 +0000)
* mozilla/support/npwin.cpp: some mozilla sdk don't include mozilla-config.h explicitly so do it ourselves.

configure.ac
mozilla/support/npwin.cpp

index dc6d1b4e9c2ed01b9b17079b14d3418649260f9d..4c54e9bceea4ac6ef7b1a9316d8c28240d55072f 100644 (file)
@@ -1,5 +1,5 @@
 dnl Autoconf settings for vlc
-dnl $Id: configure.ac,v 1.96 2003/10/26 12:49:24 gbazin Exp $
+dnl $Id: configure.ac,v 1.97 2003/10/26 16:12:34 gbazin Exp $
 
 AC_INIT(vlc,0.6.3-cvs)
 
@@ -3199,24 +3199,14 @@ elif test "${enable_mozilla}" = "yes"
 then
   AC_ARG_WITH(mozilla-sdk-path,
     [    --with-mozilla-sdk-path=PATH path to win32 mozilla sdk], [
-    AC_MSG_CHECKING(for mozilla-config.h in ${with_mozilla_sdk_path})
     real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`"
-    if test -z "${real_mozilla_sdk}"; then
-      dnl  The given directory can't be found
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot cd to ${with_mozilla_sdk_path}])
-    fi
-    if test -f "${real_mozilla_sdk}/mozilla-config.h"; then
-      AC_MSG_RESULT(${real_mozilla_sdk}/mozilla-config.h)
+    CPPFLAGS="${CPPFLAGS_save} ${real_mozilla_sdk}"
+    AC_CHECK_HEADERS(mozilla-config.h, [
       mozilla=:
       AX_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -I${real_mozilla_sdk} -I${real_mozilla_sdk}/embedstring/include -I${real_mozilla_sdk}/xpcom/include -I${real_mozilla_sdk}/nspr/include -I${real_mozilla_sdk}/string/include -I${real_mozilla_sdk}/plugin/include -I${real_mozilla_sdk}/java/include])
       AX_ADD_LDFLAGS([mozilla],[-L${real_mozilla_sdk}/embedstring/bin -L${real_mozilla_sdk}/xpcom/bin -L${real_mozilla_sdk}/nspr/bin -L${real_mozilla_sdk}/string/bin -lnspr4 -lplds4 -lplc4 -lembedstring -lxpcomglue -Wl,--kill-at])
-      XPIDL_INCL="-I${real_mozilla_sdk}/xpcom/idl"
-    else
-      dnl  The given path is incorrect
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot find ${real_mozilla_sdk}/mozilla-config.h])
-    fi
+      XPIDL_INCL="-I${real_mozilla_sdk}/xpcom/idl" ])
+    CPPFLAGS="${CPPFLAGS_save}"
   ])
 fi
 
index 9f369cc6a3071592bb8d47df03251607219bf659..3b06c2148c97c5ce61c0f44de408e78075f065db 100644 (file)
  *
  * ***** END LICENSE BLOCK ***** */
 
+#include "config.h"
+
+#ifdef HAVE_MOZILLA_CONFIG_H
+#   include <mozilla-config.h>
+#endif
+
 #include "nscore.h"
 #include "npapi.h"
 #include "npupp.h"