Commit f749fe6d authored by Jean-Paul Saman's avatar Jean-Paul Saman

Fix building mozilla on Linux en properly dectect firefox headerfiles.

parent 8f77cb70
...@@ -5313,27 +5313,35 @@ then ...@@ -5313,27 +5313,35 @@ then
dnl New firefox-1.5 SDK api dnl New firefox-1.5 SDK api
PKG_CHECK_MODULES([firefox], [firefox-plugin], PKG_CHECK_MODULES([firefox], [firefox-plugin],
[ [
firefox_include=`pkg-config --variable=includedir firefox-plugin` firefox_libs=`pkg-config --libs firefox-plugin`
firefox_libs=`pkg-config --variable=libdir firefox-plugin` firefox_cflags=`pkg-config --cflags firefox-plugin`
CPPFLAGS="${CPPFLAGS_save} -I${firefox_include} -I${firefox_include}/plugin ${MOZILLA_CPPFLAGS}" PKG_CHECK_MODULES([nspr], [nspr], [ ],
[
AC_MSG_ERROR([Please install the nspr development tools.])
]
)
CPPFLAGS="${CPPFLAGS_save} ${firefox_cflags} ${MOZILLA_CPPFLAGS}"
MOZILLA_REQUIRED_HEADERS=1 MOZILLA_REQUIRED_HEADERS=1
AC_CHECK_HEADERS(mozilla-config.h,,MOZILLA_REQUIRED_HEADERS=0) AC_CHECK_HEADERS(mozilla-config.h,,MOZILLA_REQUIRED_HEADERS=0)
dnl AC_CHECK_HEADERS(npapi.h,,MOZILLA_REQUIRED_HEADERS=0) AC_CHECK_HEADERS(npapi.h,,MOZILLA_REQUIRED_HEADERS=0)
dnl AC_CHECK_HEADERS(npruntime.h,,MOZILLA_REQUIRED_HEADERS=0, AC_CHECK_HEADERS(npruntime.h,,MOZILLA_REQUIRED_HEADERS=0,
dnl [#if HAVE_NPAPI_H [#if HAVE_NPAPI_H
dnl # include <npapi.h> # include <npapi.h>
dnl #endif #endif
dnl ]) ])
CPPFLAGS="${CPPFLAGS_save}" CPPFLAGS="${CPPFLAGS_save}"
if test "${MOZILLA_CONFIG_HEADERS}" = "0"; then if test "${MOZILLA_CONFIG_HEADERS}" = "0"; then
AC_MSG_ERROR([Please install the Firefox development tools; mozilla-config.h, plugin/npapi.h and plugin/npruntime.h were not found.]) AC_MSG_ERROR([Please install the Firefox development tools; mozilla-config.h, plugin/npapi.h and plugin/npruntime.h were not found.])
fi fi
MOZILLA_REQUIRED_HEADERS=
mozilla=:
firefox_include=`pkg-config --variable=includedir firefox-plugin`
MOZILLA_CONFIG_H="${firefox_include}/mozilla-config.h" MOZILLA_CONFIG_H="${firefox_include}/mozilla-config.h"
if grep '^#define HAVE_MOZ_X11 1' ${MOZILLA_CONFIG_H} 2>&1 > /dev/null ; then if grep '^#define MOZ_X11 1' ${MOZILLA_CONFIG_H} 2>&1 > /dev/null ; then
VLC_ADD_LDFLAGS([mozilla], [${X_LIBS} ${X_PRE_LIBS}]) VLC_ADD_LDFLAGS([mozilla], [-lX11 -lXt ${X_LIBS} ${X_PRE_LIBS}])
fi fi
VLC_ADD_CPPFLAGS([mozilla],[-I${firefox_include} -I${firefox_include}/plugin ${MOZILLA_CPPFLAGS}]) VLC_ADD_CPPFLAGS([mozilla],[${firefox_cflags} ${MOZILLA_CPPFLAGS}])
VLC_ADD_LDFLAGS([mozilla],[-L${firefox_libs}, ${MOZILLA_LDFLAGS}]) VLC_ADD_LDFLAGS([mozilla],[${firefox_libs} ${MOZILLA_LDFLAGS}])
VLC_ADD_PLUGINS([mozilla]) VLC_ADD_PLUGINS([mozilla])
MOZILLA_CONFIG= MOZILLA_CONFIG=
], ],
......
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