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,73 +4778,80 @@ AC_ARG_ENABLE(mozilla, ...@@ -4778,73 +4778,80 @@ AC_ARG_ENABLE(mozilla,
AC_ARG_WITH(mozilla-sdk-path, AC_ARG_WITH(mozilla-sdk-path,
[ --with-mozilla-sdk-path=PATH path to mozilla sdk]) [ --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 then
AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no) if test "${with_mozilla_sdk_path}" = ""
if test "${MOZILLA_CONFIG}" = "no"
then then
AC_MSG_ERROR([Please install the Mozilla development tools, mozilla-config was not found.]) AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
if test "${MOZILLA_CONFIG}" = "no"
then
AC_MSG_ERROR([Please install the Mozilla development tools, mozilla-config was not found.])
else
if test "${SYS}" != "mingw32"; then
LDFLAGS="${LDFLAGS_save} -L${x_libraries}"
AC_CHECK_LIB(Xt,XtStrings,
[VLC_ADD_LDFLAGS([mozilla],[-L${x_libraries} -lXt -lX11 -lSM -lICE])],
[],
[[-L${x_libraries} -lX11 -lSM -lICE]
])
LDFLAGS="${LDFLAGS_save}"
fi
mozilla=:
dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
VLC_ADD_CPPFLAGS([mozilla],[[`${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`]])
VLC_ADD_LDFLAGS([mozilla],[`${MOZILLA_CONFIG} --libs plugin xpcom`])
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
else else
if test "${SYS}" != "mingw32"; then dnl special case for mingw32
LDFLAGS="${LDFLAGS_save} -L${x_libraries}" if test "${SYS}" = "mingw32"
AC_CHECK_LIB(Xt,XtStrings, then
[VLC_ADD_LDFLAGS([mozilla],[-L${x_libraries} -lXt -lX11 -lSM -lICE])], AC_CHECK_TOOL(CYGPATH, cygpath, "")
[], dnl latest gecko sdk does not have an xpcom directory
[[-L${x_libraries} -lX11 -lSM -lICE] if test -d "${with_mozilla_sdk_path}/xpcom"; then
]) mozilla_sdk_xpcom="/xpcom"
LDFLAGS="${LDFLAGS_save}" fi
fi fi
mozilla=:
dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490 real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`"
VLC_ADD_CPPFLAGS([mozilla],[[`${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`]]) CPPFLAGS="${CPPFLAGS_save} -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include"
VLC_ADD_LDFLAGS([mozilla],[`${MOZILLA_CONFIG} --libs plugin xpcom`]) AC_CHECK_HEADERS(mozilla-config.h, [
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_mozilla}" mozilla=:
AC_CHECK_HEADERS(mozilla-config.h) 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_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}" CPPFLAGS="${CPPFLAGS_save}"
fi fi
dnl special case for mingw32 AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
elif test "${enable_mozilla}" = "yes" if test "${mozilla}" != "false"
then then
if test "${SYS}" = "mingw32"; then build_pic=yes
AC_CHECK_TOOL(CYGPATH, cygpath, "") AC_PATH_PROG(XPIDL, xpidl, no, ${xpidl_path} /usr/lib/mozilla)
mozilla_sdk_xpcom="/xpcom" if test "${XPIDL}" = "no"; then
fi AC_MSG_ERROR([Please install the Mozilla development tools, xpidl was not found.])
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_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
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"
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 fi
])
AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
if test "${mozilla}" != "false"
then
build_pic=yes
fi fi
dnl 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