* configure.ac, mozilla/*: the win32 mozilla plugin compiles again (most likely won't yet work).

Added a --with-mozilla-sdk-path option (win32 only) to ./configure so you can pass the path of your mozilla sdk tree.
 You also need to set the XPIDL env var to the the path of the xpidl mozilla compiler when ./configuring.
This commit is contained in:
Gildas Bazin 2003-09-20 13:52:23 +00:00
parent 50f7bdc974
commit 973cf0496f
3 changed files with 45 additions and 25 deletions

View File

@ -1,5 +1,5 @@
dnl Autoconf settings for vlc
dnl $Id: configure.ac,v 1.74 2003/09/09 12:54:19 jpsaman Exp $
dnl $Id: configure.ac,v 1.75 2003/09/20 13:52:23 gbazin Exp $
AC_INIT(vlc,0.6.3-cvs)
@ -3050,7 +3050,7 @@ dnl
mozilla=false
AC_ARG_ENABLE(mozilla,
[ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)])
if test "${enable_mozilla}" = "yes"
if test "${enable_mozilla}" = "yes" -a "${SYS}" != "mingw32"
then
AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
if test "${MOZILLA_CONFIG}" = "no"
@ -3068,12 +3068,36 @@ then
dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
AX_ADD_CPPFLAGS([mozilla],[[`${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`]])
AX_ADD_LDFLAGS([mozilla],[`${MOZILLA_CONFIG} --libs plugin xpcom`])
dnl Not necessarily in ${PATH}
if test -z "${XPIDL}" -o ! -x "${XPIDL}"
then
XPIDL="/usr/lib/mozilla/xpidl"
fi
fi
dnl special case for mingw32
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)
mozilla=:
AX_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -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])
else
dnl The given path is incorrect
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${real_mozilla_sdk}/mozilla-config.h])
fi
])
fi
dnl Not necessarily in ${PATH}
if test -z "${XPIDL}" -o ! -x "${XPIDL}"; then
XPIDL="/usr/lib/mozilla/xpidl"
fi
AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})

View File

@ -35,12 +35,9 @@
*
* ***** END LICENSE BLOCK ***** */
#ifndef _NPAPI_H_
#include "nscore.h"
#include "npapi.h"
#endif
#ifndef _NPUPP_H_
#include "npupp.h"
#endif
//\\// DEFINE
#define NP_EXPORT
@ -131,7 +128,7 @@ extern "C" NPError
#else
NPError WINAPI NP_EXPORT
#endif
NP_Initialize(NPNetscapeFuncs* pFuncs)
NP_Initialize(NPNetscapeFuncs* pFuncs, NPPluginFuncs*)
{
// trap a NULL ptr
if(pFuncs == NULL)

View File

@ -2,7 +2,7 @@
* vlcshell.cpp: a VLC plugin for Mozilla
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: vlcshell.cpp,v 1.21 2003/08/27 08:44:28 garf Exp $
* $Id: vlcshell.cpp,v 1.22 2003/09/20 13:52:23 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
@ -99,20 +99,19 @@ static void Redraw( Widget w, XtPointer closure, XEvent *event );
HINSTANCE g_hDllInstance = NULL;
BOOL WINAPI
DllMain( HINSTANCE hinstDLL, // handle of DLL module
DWORD fdwReason, // reason for calling function
LPVOID lpvReserved)
BOOL WINAPI DllMain( HINSTANCE hinstDLL, /* handle of DLL module */
DWORD fdwReason, /* reason for calling the function */
LPVOID lpvReserved )
{
switch (fdwReason)
switch( fdwReason )
{
case DLL_PROCESS_ATTACH:
g_hDllInstance = hinstDLL;
break;
case DLL_THREAD_ATTACH:
case DLL_PROCESS_DETACH:
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_ATTACH:
g_hDllInstance = hinstDLL;
break;
case DLL_THREAD_ATTACH:
case DLL_PROCESS_DETACH:
case DLL_THREAD_DETACH:
break;
}
return TRUE;
}