Commit 3fa2bee8 authored by Sam Hocevar's avatar Sam Hocevar

* configure.ac:

    + Detect <mozilla-config.h> on newer Mozilla versions.
  * mozilla/vlcpeer.cpp:
    + If neither NP_UNIX, NP_MACOSX nor NP_WIN are defined, default to NP_UNIX.
    + Use <mozilla-config.h> whenever possible.
parent 287b6a68
dnl Autoconf settings for vlc dnl Autoconf settings for vlc
dnl $Id: configure.ac,v 1.90 2003/10/22 17:12:30 gbazin Exp $ dnl $Id: configure.ac,v 1.91 2003/10/23 17:04:39 sam Exp $
AC_INIT(vlc,0.6.3-cvs) AC_INIT(vlc,0.6.3-cvs)
...@@ -3166,6 +3166,9 @@ then ...@@ -3166,6 +3166,9 @@ then
dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490 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_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`]) AX_ADD_LDFLAGS([mozilla],[`${MOZILLA_CONFIG} --libs plugin xpcom`])
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mozilla}"
AC_CHECK_HEADERS(mozilla-config.h)
CPPFLAGS="${CPPFLAGS_save}"
fi fi
dnl special case for mingw32 dnl special case for mingw32
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcpeer.cpp: scriptable peer descriptor * vlcpeer.cpp: scriptable peer descriptor
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: vlcpeer.cpp,v 1.8 2003/09/21 10:23:59 gbazin Exp $ * $Id: vlcpeer.cpp,v 1.9 2003/10/23 17:04:39 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include "config.h"
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef DEBUG #ifdef DEBUG
...@@ -31,10 +33,19 @@ ...@@ -31,10 +33,19 @@
# undef DEBUG # undef DEBUG
#endif #endif
#ifdef HAVE_MOZILLA_CONFIG_H
# include <mozilla-config.h>
#endif
#include <nsISupports.h> #include <nsISupports.h>
#include <nsMemory.h> #include <nsMemory.h>
#include <npapi.h> #include <npapi.h>
#if !defined(XP_MACOSX) && !defined(XP_UNIX) && !defined(XP_WIN)
#define XP_UNIX 1
#elif defined(XP_MACOSX)
#undef XP_UNIX
#endif
#include "vlcpeer.h" #include "vlcpeer.h"
#include "vlcplugin.h" #include "vlcplugin.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcplugin.cpp: a VLC plugin for Mozilla * vlcplugin.cpp: a VLC plugin for Mozilla
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: vlcplugin.cpp,v 1.5 2003/07/16 16:33:59 sam Exp $ * $Id: vlcplugin.cpp,v 1.6 2003/10/23 17:04:39 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -24,12 +24,23 @@ ...@@ -24,12 +24,23 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include "config.h"
#include <vlc/vlc.h> #include <vlc/vlc.h>
#ifdef HAVE_MOZILLA_CONFIG_H
# include <mozilla-config.h>
#endif
#include <nsISupports.h> #include <nsISupports.h>
#include <nsMemory.h> #include <nsMemory.h>
#include <npapi.h> #include <npapi.h>
#if !defined(XP_MACOSX) && !defined(XP_UNIX) && !defined(XP_WIN)
#define XP_UNIX 1
#elif defined(XP_MACOSX)
#undef XP_UNIX
#endif
#include "vlcpeer.h" #include "vlcpeer.h"
#include "vlcplugin.h" #include "vlcplugin.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcplugin.h: a VLC plugin for Mozilla * vlcplugin.h: a VLC plugin for Mozilla
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: vlcplugin.h,v 1.12 2003/08/14 12:38:03 garf Exp $ * $Id: vlcplugin.h,v 1.13 2003/10/23 17:04:40 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -25,11 +25,6 @@ ...@@ -25,11 +25,6 @@
* Instance state information about the plugin. * Instance state information about the plugin.
******************************************************************************/ ******************************************************************************/
/* No, I really don't want to use XP_UNIX stuff on MacOSX */
#ifdef XP_MACOSX
#undef XP_UNIX
#endif
class VlcPlugin class VlcPlugin
{ {
public: public:
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcshell.cpp: a VLC plugin for Mozilla * vlcshell.cpp: a VLC plugin for Mozilla
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: vlcshell.cpp,v 1.25 2003/10/15 07:34:25 gbazin Exp $ * $Id: vlcshell.cpp,v 1.26 2003/10/23 17:04:40 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include "config.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -37,9 +39,19 @@ ...@@ -37,9 +39,19 @@
#endif #endif
/* Mozilla stuff */ /* Mozilla stuff */
#ifdef HAVE_MOZILLA_CONFIG_H
# include <mozilla-config.h>
#endif
#include <nsISupports.h> #include <nsISupports.h>
#include <nsMemory.h> #include <nsMemory.h>
#include <npapi.h> #include <npapi.h>
#include <jri.h>
#if !defined(XP_MACOSX) && !defined(XP_UNIX) && !defined(XP_WIN)
#define XP_UNIX 1
#elif defined(XP_MACOSX)
#undef XP_UNIX
#endif
#ifdef XP_WIN #ifdef XP_WIN
/* Windows stuff */ /* Windows stuff */
...@@ -50,6 +62,13 @@ ...@@ -50,6 +62,13 @@
# include <Quickdraw.h> # include <Quickdraw.h>
#endif #endif
#ifdef XP_UNIX
/* X11 stuff */
# include <X11/Xlib.h>
# include <X11/Intrinsic.h>
# include <X11/StringDefs.h>
#endif
#include "vlcpeer.h" #include "vlcpeer.h"
#include "vlcplugin.h" #include "vlcplugin.h"
...@@ -59,18 +78,6 @@ ...@@ -59,18 +78,6 @@
# define WINDOW_TEXT "(no libvlc)" # define WINDOW_TEXT "(no libvlc)"
#endif #endif
/* No, I really don't want to use XP_UNIX stuff on MacOSX */
#ifdef XP_MACOSX
#undef XP_UNIX
#endif
#ifdef XP_UNIX
/* X11 stuff */
# include <X11/Xlib.h>
# include <X11/Intrinsic.h>
# include <X11/StringDefs.h>
#endif
/***************************************************************************** /*****************************************************************************
* Unix-only declarations * Unix-only declarations
******************************************************************************/ ******************************************************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment