Commit 11390074 authored by Rafaël Carré's avatar Rafaël Carré

Replaces check for xpidl by check for required mozilla headers

parent 4d4f72b8
...@@ -5279,17 +5279,21 @@ then ...@@ -5279,17 +5279,21 @@ then
VLC_ADD_LDFLAGS([mozilla],[`${MOZILLA_CONFIG} --libs plugin`]) VLC_ADD_LDFLAGS([mozilla],[`${MOZILLA_CONFIG} --libs plugin`])
fi fi
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mozilla}" CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mozilla}"
AC_CHECK_HEADERS(mozilla-config.h) MOZILLA_REQUIRED_HEADERS=1
CPPFLAGS="${CPPFLAGS_save}" AC_CHECK_HEADERS(mozilla-config.h,,MOZILLA_REQUIRED_HEADERS=0)
MOZILLA_SDK_PATH="`${MOZILLA_CONFIG} --prefix`" AC_CHECK_HEADERS(npapi.h,,MOZILLA_REQUIRED_HEADERS=0)
XPIDL_INCL="`${MOZILLA_CONFIG} --cflags plugin xpcom java` \ AC_CHECK_HEADERS(npruntime.h,,MOZILLA_REQUIRED_HEADERS=0,
`${MOZILLA_CONFIG} --idlflags plugin xpcom java` " [#if HAVE_NPAPI_H
if ${have_xul} # include <npapi.h>
#endif
])
if test "${MOZILLA_REQUIRED_HEADERS}" = "0"
then then
xpidl_path="`${MOZILLA_CONFIG} --prefix`/lib/xulrunner" AC_MSG_ERROR([Please install the Mozilla development tools, required headers were not found.])
else
xpidl_path="`${MOZILLA_CONFIG} --prefix`/bin"
fi fi
MOZILLA_REQUIRED_HEADERS=
CPPFLAGS="${CPPFLAGS_save}"
MOZILLA_SDK_PATH="`${MOZILLA_CONFIG} --prefix`"
dnl End of moz_sdk = "" dnl End of moz_sdk = ""
else else
dnl special case for mingw32 dnl special case for mingw32
...@@ -5304,7 +5308,19 @@ then ...@@ -5304,7 +5308,19 @@ then
real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`" real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`"
CPPFLAGS="${CPPFLAGS_save} -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include" CPPFLAGS="${CPPFLAGS_save} -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include"
AC_CHECK_HEADERS(mozilla-config.h, [ MOZILLA_REQUIRED_HEADERS=1
AC_CHECK_HEADERS(mozilla-config.h,,MOZILLA_REQUIRED_HEADERS=0)
AC_CHECK_HEADERS(npapi.h,,MOZILLA_REQUIRED_HEADERS=0)
AC_CHECK_HEADERS(npruntime.h,,MOZILLA_REQUIRED_HEADERS=0,
[#if HAVE_NPAPI_H
# include <npapi.h>
#endif
])
if test "${MOZILLA_REQUIRED_HEADERS}" = "0"
then
AC_MSG_ERROR([Please install the Mozilla development tools, required headers were not found.])
fi
MOZILLA_REQUIRED_HEADERS=
mozilla=: mozilla=:
VLC_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -DHAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include -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]) VLC_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -DHAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include -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])
if ${need_xpcom_libs}; then if ${need_xpcom_libs}; then
...@@ -5317,24 +5333,12 @@ then ...@@ -5317,24 +5333,12 @@ then
fi fi
fi fi
fi fi
MOZILLA_SDK_PATH="${real_mozilla_sdk}" MOZILLA_SDK_PATH="${real_mozilla_sdk}"
XPIDL_INCL="-I${real_mozilla_sdk}${mozilla_sdk_xpcom}/idl"
xpidl_path="${real_mozilla_sdk}${mozilla_sdk_xpcom}/bin"
if test -n "${CYGPATH}"; then if test -n "${CYGPATH}"; then
real_mozilla_sdk="`${CYGPATH} -w ${real_mozilla_sdk}`" real_mozilla_sdk="`${CYGPATH} -w ${real_mozilla_sdk}`"
XPIDL_INCL="${XPIDL_INCL} -I\"${real_mozilla_sdk}${mozilla_sdk_xpcom}/idl\""
fi ])
CPPFLAGS="${CPPFLAGS_save}"
fi
if test "${enable_mozilla}" != "false"
then
AC_PATH_PROG(XPIDL, xpidl, no, ${xpidl_path}:/usr/lib/mozilla:/usr/lib64/mozilla:/usr/lib/xulrunner:/usr/lib64/xulrunner)
if test "${XPIDL}" = "no"; then
AC_MSG_ERROR([Please install the Mozilla development tools, xpidl was not found.])
fi fi
CPPFLAGS="${CPPFLAGS_save}"
fi fi
fi fi
AM_CONDITIONAL(BUILD_MOZILLA,${mozilla}) AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
...@@ -5544,8 +5548,6 @@ AC_SUBST(UIC) ...@@ -5544,8 +5548,6 @@ AC_SUBST(UIC)
AC_SUBST(WINDRES) AC_SUBST(WINDRES)
AC_SUBST(MOZILLA_SDK_PATH) AC_SUBST(MOZILLA_SDK_PATH)
AC_SUBST(WINE_SDK_PATH) AC_SUBST(WINE_SDK_PATH)
AC_SUBST(XPIDL)
AC_SUBST(XPIDL_INCL)
AC_SUBST(LIBEXT) AC_SUBST(LIBEXT)
AC_SUBST(AM_CPPFLAGS) AC_SUBST(AM_CPPFLAGS)
AC_SUBST(ALL_LINGUAS) AC_SUBST(ALL_LINGUAS)
......
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