Commit 40625cb7 authored by Damien Fouilleul's avatar Damien Fouilleul

configure.ac: updated for version 1.7 of gecko-sdk (only tested on cygwin)

parent ca02d3dd
......@@ -4778,8 +4778,10 @@ AC_ARG_ENABLE(mozilla,
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}" = ""
if test "${enable_mozilla}" = "yes"
then
if test "${with_mozilla_sdk_path}" = ""
then
AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
if test "${MOZILLA_CONFIG}" = "no"
then
......@@ -4801,50 +4803,55 @@ then
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mozilla}"
AC_CHECK_HEADERS(mozilla-config.h)
CPPFLAGS="${CPPFLAGS_save}"
XPIDL_INCL="`${MOZILLA_CONFIG} --cflags plugin xpcom java` \
`${MOZILLA_CONFIG} --idlflags plugin xpcom java` "
xpidl_path="`${MOZILLA_CONFIG} --prefix`/bin"
fi
dnl special case for mingw32
elif test "${enable_mozilla}" = "yes"
then
if test "${SYS}" = "mingw32"; then
else
dnl special case for mingw32
if test "${SYS}" = "mingw32"
then
AC_CHECK_TOOL(CYGPATH, cygpath, "")
dnl latest gecko sdk does not have an xpcom directory
if test -d "${with_mozilla_sdk_path}/xpcom"; then
mozilla_sdk_xpcom="/xpcom"
fi
fi
real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`"
CPPFLAGS="${CPPFLAGS_save} -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include"
AC_CHECK_HEADERS(mozilla-config.h, [
mozilla=:
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_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_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])
if test "${SYS}" = "mingw32"; then
LDFLAGS="${LDFLAGS_save} -L${x_libraries}"
dnl latest gecko sdk does not have embedstring
if test -d "${real_mozilla_sdk}/embedstring/bin"
then
VLC_ADD_LDFLAGS([mozilla],[-lembedstring -Wl,--kill-at])
fi
fi
XPIDL_INCL="-I${real_mozilla_sdk}${mozilla_sdk_xpcom}/idl"
XPIDL="${real_mozilla_sdk}${mozilla_sdk_xpcom}/bin/xpidl"
xpidl_path="${real_mozilla_sdk}${mozilla_sdk_xpcom}/bin"
if test -n "${CYGPATH}"; then
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
dnl Not necessarily in ${PATH}
if test -z "${XPIDL}" -o ! -x "${XPIDL}"; then
XPIDL="/usr/lib/mozilla/xpidl"
fi
AS_IF([test "${MOZILLA_CONFIG}"], [
if test -z "${XPIDL_INCL}"; then
XPIDL_INCL="`${MOZILLA_CONFIG} --cflags plugin xpcom java` \
`${MOZILLA_CONFIG} --idlflags plugin xpcom java` "
fi
])
AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
if test "${mozilla}" != "false"
then
AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
if test "${mozilla}" != "false"
then
build_pic=yes
AC_PATH_PROG(XPIDL, xpidl, no, ${xpidl_path} /usr/lib/mozilla)
if test "${XPIDL}" = "no"; then
AC_MSG_ERROR([Please install the Mozilla development tools, xpidl was not found.])
fi
fi
fi
dnl
......
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