Commit f36ca544 authored by Gildas Bazin's avatar Gildas Bazin

* configure.ac: allow building vlc's mozilla plugin against gecko-sdk. Patch...

* configure.ac: allow building vlc's mozilla plugin against gecko-sdk. Patch by Diego Petteno (flameeyes at gentoo) + modifications by me.
parent 76abefb3
...@@ -4309,7 +4309,10 @@ dnl ...@@ -4309,7 +4309,10 @@ dnl
mozilla=false mozilla=false
AC_ARG_ENABLE(mozilla, AC_ARG_ENABLE(mozilla,
[ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)]) [ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)])
if test "${enable_mozilla}" = "yes" -a "${SYS}" != "mingw32" AC_ARG_WITH(mozilla-sdk-path,
[ --with-mozilla-sdk-path=PATH path to mozilla sdk])
if test "${enable_mozilla}" = "yes" -a "${with_mozilla_sdk_path}" = ""
then then
AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no) AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
if test "${MOZILLA_CONFIG}" = "no" if test "${MOZILLA_CONFIG}" = "no"
...@@ -4337,23 +4340,29 @@ then ...@@ -4337,23 +4340,29 @@ then
dnl special case for mingw32 dnl special case for mingw32
elif test "${enable_mozilla}" = "yes" elif test "${enable_mozilla}" = "yes"
then then
if test "${SYS}" = "mingw32"; then
AC_CHECK_TOOL(CYGPATH, cygpath, "") AC_CHECK_TOOL(CYGPATH, cygpath, "")
AC_ARG_WITH(mozilla-sdk-path, mozilla_sdk_xpcom="/xpcom"
[ --with-mozilla-sdk-path=PATH path to win32 mozilla sdk], [ fi
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} ${real_mozilla_sdk}" CPPFLAGS="${CPPFLAGS_save} -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include"
AC_CHECK_HEADERS(mozilla-config.h, [ AC_CHECK_HEADERS(mozilla-config.h, [
mozilla=: mozilla=:
VLC_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]) VLC_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -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_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]) VLC_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 -L${real_mozilla_sdk}/lib -lnspr4 -lplds4 -lplc4 -lxpcomglue])
XPIDL_INCL="-I${real_mozilla_sdk}/xpcom/idl" if test "${SYS}" = "mingw32"; then
VLC_ADD_LDFLAGS([mozilla],[-lembedstring -Wl,--kill-at])
fi
XPIDL_INCL="-I${real_mozilla_sdk}${mozilla_sdk_xpcom}/idl"
XPIDL="${real_mozilla_sdk}${mozilla_sdk_xpcom}/bin/xpidl"
if test -n "${CYGPATH}"; then if test -n "${CYGPATH}"; then
XPIDL="${real_mozilla_sdk}/xpcom/bin/xpidl"
real_mozilla_sdk="`${CYGPATH} -w ${real_mozilla_sdk}`" real_mozilla_sdk="`${CYGPATH} -w ${real_mozilla_sdk}`"
XPIDL_INCL="${XPIDL_INCL} -I\"${real_mozilla_sdk}/xpcom/idl\"" XPIDL_INCL="${XPIDL_INCL} -I\"${real_mozilla_sdk}${mozilla_sdk_xpcom}/idl\""
fi ]) fi ])
CPPFLAGS="${CPPFLAGS_save}" CPPFLAGS="${CPPFLAGS_save}"
])
fi fi
dnl Not necessarily in ${PATH} dnl Not necessarily in ${PATH}
......
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