Bug 559854 - Compile target xpidl only if libIDL is configured when cross compiling. [r=ted]
(transplanted from 0388c837c9867762bcc10a1fb88428050d158479) --HG-- extra : transplant_source : %03%88%C87%C9%86wb%BC%C1%0A%1F%B8%84%28%05%0D%15%84y
This commit is contained in:
Родитель
bfa4ea6422
Коммит
ae3b9b39ba
|
@ -18,14 +18,14 @@ AC_ARG_ENABLE(libIDLtest, [ --disable-libIDLtest Do not try to compile and r
|
|||
|
||||
if test x$libIDL_config_exec_prefix != x ; then
|
||||
libIDL_config_args="$libIDL_config_args --exec-prefix=$libIDL_config_exec_prefix"
|
||||
if test x${LIBIDL_CONFIG+set} != xset ; then
|
||||
LIBIDL_CONFIG=$libIDL_config_exec_prefix/bin/libIDL-config
|
||||
if test x${HOST_LIBIDL_CONFIG+set} != xset ; then
|
||||
HOST_LIBIDL_CONFIG=$libIDL_config_exec_prefix/bin/libIDL-config
|
||||
fi
|
||||
fi
|
||||
if test x$libIDL_config_prefix != x ; then
|
||||
libIDL_config_args="$libIDL_config_args --prefix=$libIDL_config_prefix"
|
||||
if test x${LIBIDL_CONFIG+set} != xset ; then
|
||||
LIBIDL_CONFIG=$libIDL_config_prefix/bin/libIDL-config
|
||||
if test x${HOST_LIBIDL_CONFIG+set} != xset ; then
|
||||
HOST_LIBIDL_CONFIG=$libIDL_config_prefix/bin/libIDL-config
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -34,30 +34,26 @@ AC_ARG_ENABLE(libIDLtest, [ --disable-libIDLtest Do not try to compile and r
|
|||
dnl Force a version check to keep upgraded versions from being overridden by the cached value.
|
||||
unset ac_cv_path_LIBIDL_CONFIG
|
||||
|
||||
AC_PATH_PROG(LIBIDL_CONFIG, libIDL-config, no)
|
||||
AC_PATH_PROG(HOST_LIBIDL_CONFIG, libIDL-config, no)
|
||||
min_libIDL_version=ifelse([$1], ,0.6.0,$1)
|
||||
AC_MSG_CHECKING(for libIDL - version >= $min_libIDL_version)
|
||||
no_libIDL=""
|
||||
if test "$LIBIDL_CONFIG" = "no" ; then
|
||||
if test "$HOST_LIBIDL_CONFIG" = "no" ; then
|
||||
no_libIDL=yes
|
||||
else
|
||||
LIBIDL_CFLAGS=`$LIBIDL_CONFIG $libIDL_config_args --cflags`
|
||||
LIBIDL_LIBS=`$LIBIDL_CONFIG $libIDL_config_args --libs`
|
||||
# hack to allow us to keep using libIDL 0.6.3-0.6.7. Anyone may remove
|
||||
# this after we start requiring libIDL 0.6.8 or anything higher
|
||||
LIBIDL_CFLAGS="$GLIB_CFLAGS $LIBIDL_CFLAGS"
|
||||
LIBIDL_LIBS="$GLIB_LIBS $LIBIDL_LIBS"
|
||||
libIDL_config_major_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
|
||||
HOST_LIBIDL_CFLAGS=`$HOST_LIBIDL_CONFIG $libIDL_config_args --cflags`
|
||||
HOST_LIBIDL_LIBS=`$HOST_LIBIDL_CONFIG $libIDL_config_args --libs`
|
||||
libIDL_config_major_version=`$HOST_LIBIDL_CONFIG $libIDL_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
libIDL_config_minor_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
|
||||
libIDL_config_minor_version=`$HOST_LIBIDL_CONFIG $libIDL_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
libIDL_config_micro_version=`$LIBIDL_CONFIG $libIDL_config_args --version | \
|
||||
libIDL_config_micro_version=`$HOST_LIBIDL_CONFIG $libIDL_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_libIDLtest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
|
||||
LIBS="$LIBIDL_LIBS $LIBS"
|
||||
CFLAGS="$CFLAGS $HOST_LIBIDL_CFLAGS"
|
||||
LIBS="$HOST_LIBIDL_LIBS $LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed LIBIDL is sufficiently new.
|
||||
dnl
|
||||
|
@ -154,7 +150,7 @@ main ()
|
|||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$LIBIDL_CONFIG" = "no" ; then
|
||||
if test "$HOST_LIBIDL_CONFIG" = "no" ; then
|
||||
echo "*** The libIDL-config script installed by libIDL could not be found"
|
||||
echo "*** If libIDL was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the LIBIDL_CONFIG environment variable to the"
|
||||
|
@ -164,8 +160,8 @@ main ()
|
|||
:
|
||||
else
|
||||
echo "*** Could not run libIDL test program, checking why..."
|
||||
CFLAGS="$CFLAGS $LIBIDL_CFLAGS"
|
||||
LIBS="$LIBS $LIBIDL_LIBS"
|
||||
CFLAGS="$CFLAGS $HOST_LIBIDL_CFLAGS"
|
||||
LIBS="$LIBS $HOST_LIBIDL_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -188,11 +184,11 @@ main ()
|
|||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
LIBIDL_CFLAGS=""
|
||||
LIBIDL_LIBS=""
|
||||
HOST_LIBIDL_CFLAGS=""
|
||||
HOST_LIBIDL_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
AC_SUBST(LIBIDL_CFLAGS)
|
||||
AC_SUBST(LIBIDL_LIBS)
|
||||
AC_SUBST(HOST_LIBIDL_CFLAGS)
|
||||
AC_SUBST(HOST_LIBIDL_LIBS)
|
||||
rm -f conf.libIDLtest
|
||||
])
|
||||
|
|
250
configure.in
250
configure.in
|
@ -2293,9 +2293,6 @@ ia64*-hpux*)
|
|||
XARGS=xargs
|
||||
XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xpcom.lib $(LIBXUL_DIST)/lib/mozalloc.lib'
|
||||
ZIP=zip
|
||||
LIBIDL_CFLAGS="-I$MOZ_TOOLS_DIR/include ${GLIB_CFLAGS}"
|
||||
LIBIDL_LIBS="$MOZ_TOOLS_DIR/lib/libidl-0.6_s.lib $MOZ_TOOLS_DIR/lib/glib-1.2_s.lib"
|
||||
STATIC_LIBIDL=1
|
||||
MOZ_TREE_FREETYPE=1
|
||||
|
||||
AC_DEFINE(HAVE_SNPRINTF)
|
||||
|
@ -2474,84 +2471,7 @@ ia64*-hpux*)
|
|||
AC_MSG_ERROR([\$MOZ_TOOLS\\bin must be in your path.])
|
||||
fi
|
||||
MOZ_TOOLS_DIR=`$CYGPATH_W $MOZ_TOOLS_DIR | $CYGPATH_S`
|
||||
|
||||
if test -n "$GLIB_PREFIX"; then
|
||||
_GLIB_PREFIX_DIR=`cd $GLIB_PREFIX && pwd -W`
|
||||
if test "$?" = "0"; then
|
||||
if test `echo ${PATH}: | grep -ic "$_GLIB_PREFIX_DIR/bin:"` = 0; then
|
||||
AC_MSG_ERROR([GLIB_PREFIX must be in your \$PATH.])
|
||||
fi
|
||||
_GLIB_PREFIX_DIR=`$CYGPATH_W $_GLIB_PREFIX_DIR | $CYGPATH_S`
|
||||
else
|
||||
AC_MSG_ERROR([GLIB_PREFIX is set but "${GLIB_PREFIX}" is not a directory.])
|
||||
fi
|
||||
else
|
||||
_GLIB_PREFIX_DIR=$MOZ_TOOLS_DIR
|
||||
fi
|
||||
if test ! -f "${_GLIB_PREFIX_DIR}/include/glib.h"; then
|
||||
AC_MSG_ERROR([Cannot find $_GLIB_PREFIX_DIR/include/glib.h .])
|
||||
fi
|
||||
GLIB_CFLAGS="-I${_GLIB_PREFIX_DIR}/include"
|
||||
if test -f "${_GLIB_PREFIX_DIR}/lib/glib-1.2_s.lib"; then
|
||||
GLIB_LIBS="${_GLIB_PREFIX_DIR}/lib/glib-1.2_s.lib"
|
||||
elif test -f "${_GLIB_PREFIX_DIR}/lib/glib-1.2.lib"; then
|
||||
GLIB_LIBS="${_GLIB_PREFIX_DIR}/lib/glib-1.2.lib"
|
||||
else
|
||||
AC_MSG_ERROR([Cannot find $_GLIB_PREFIX_DIR/lib/glib-1.2.lib or $_GLIB_PREFIX_DIR/lib/glib-1.2_s.lib])
|
||||
fi
|
||||
|
||||
if test -n "$LIBIDL_PREFIX"; then
|
||||
_LIBIDL_PREFIX_DIR=`cd $LIBIDL_PREFIX && pwd -W`
|
||||
if test "$?" = "0"; then
|
||||
if test `echo ${PATH}: | grep -ic "$_LIBIDL_PREFIX_DIR/bin:"` = 0; then
|
||||
AC_MSG_ERROR([LIBIDL_PREFIX must be in your \$PATH.])
|
||||
fi
|
||||
_LIBIDL_PREFIX_DIR=`$CYGPATH_W $_LIBIDL_PREFIX_DIR | $CYGPATH_S`
|
||||
else
|
||||
AC_MSG_ERROR([LIBIDL_PREFIX is set but "${LIBIDL_PREFIX}" is not a directory.])
|
||||
fi
|
||||
else
|
||||
_LIBIDL_PREFIX_DIR=$MOZ_TOOLS_DIR
|
||||
fi
|
||||
if test ! -f "${_LIBIDL_PREFIX_DIR}/include/libIDL/IDL.h"; then
|
||||
AC_MSG_ERROR([Cannot find $_LIBIDL_PREFIX_DIR/include/libIDL/IDL.h .])
|
||||
fi
|
||||
LIBIDL_CFLAGS="-I${_LIBIDL_PREFIX_DIR}/include ${GLIB_CFLAGS}"
|
||||
if test -f "${_LIBIDL_PREFIX_DIR}/lib/libidl-0.6_s.lib"; then
|
||||
LIBIDL_LIBS="${_LIBIDL_PREFIX_DIR}/lib/libidl-0.6_s.lib"
|
||||
STATIC_LIBIDL=1
|
||||
elif test -f "${_LIBIDL_PREFIX_DIR}/lib/libidl-0.6.lib"; then
|
||||
LIBIDL_LIBS="${_LIBIDL_PREFIX_DIR}/lib/libidl-0.6.lib"
|
||||
else
|
||||
AC_MSG_ERROR([Cannot find $_LIBIDL_PREFIX_DIR/lib/libidl-0.6.lib or $_LIBIDL_PREFIX_DIR/lib/libidl-0.6_s.lib])
|
||||
fi
|
||||
LIBIDL_LIBS="${LIBIDL_LIBS} ${GLIB_LIBS}"
|
||||
;;
|
||||
|
||||
*) # else cross-compiling
|
||||
if test -n "$GLIB_PREFIX"; then
|
||||
GLIB_CFLAGS="-I${GLIB_PREFIX}/include"
|
||||
if test -f "${GLIB_PREFIX}/lib/glib-1.2_s.lib"; then
|
||||
GLIB_LIBS="${GLIB_PREFIX}/lib/glib-1.2_s.lib"
|
||||
elif test -f "${GLIB_PREFIX}/lib/glib-1.2.lib"; then
|
||||
GLIB_LIBS="${GLIB_PREFIX}/lib/glib-1.2.lib"
|
||||
else
|
||||
AC_MSG_ERROR([Cannot find $GLIB_PREFIX/lib/glib-1.2.lib or $GLIB_PREFIX/lib/glib-1.2_s.lib])
|
||||
fi
|
||||
fi
|
||||
if test -n "$LIBIDL_PREFIX"; then
|
||||
LIBIDL_CFLAGS="-I${LIBIDL_PREFIX}/include ${GLIB_CFLAGS}"
|
||||
if test -f "${LIBIDL_PREFIX}/lib/libIDL-0.6_s.lib"; then
|
||||
LIBIDL_LIBS="${LIBIDL_PREFIX}/lib/libIDL-0.6_s.lib"
|
||||
STATIC_LIBIDL=1
|
||||
elif test -f "${LIBIDL_PREFIX}/lib/libIDL-0.6.lib"; then
|
||||
LIBIDL_LIBS="${LIBIDL_PREFIX}/lib/libIDL-0.6.lib"
|
||||
else
|
||||
AC_MSG_ERROR([Cannot find $LIBIDL_PREFIX/lib/libIDL-0.6.lib or $LIBIDL_PREFIX/lib/libIDL-0.6_s.lib])
|
||||
fi
|
||||
fi
|
||||
LIBIDL_LIBS="${LIBIDL_LIBS} ${GLIB_LIBS}"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
@ -7987,14 +7907,7 @@ MOZ_ARG_HEADER(Standalone module options (Not for building Mozilla))
|
|||
|
||||
dnl Check for GLib and libIDL.
|
||||
dnl ========================================================
|
||||
case "$target_os" in
|
||||
msvc*|mks*|cygwin*|mingw*|wince*|winmo*)
|
||||
SKIP_IDL_CHECK="yes"
|
||||
;;
|
||||
*)
|
||||
SKIP_IDL_CHECK="no"
|
||||
;;
|
||||
esac
|
||||
SKIP_IDL_CHECK="no"
|
||||
|
||||
if test -z "$COMPILE_ENVIRONMENT"; then
|
||||
SKIP_IDL_CHECK="yes"
|
||||
|
@ -8005,33 +7918,100 @@ MOZ_ARG_WITHOUT_BOOL(libIDL,
|
|||
[ --without-libIDL Skip check for libIDL (standalone modules only)],
|
||||
SKIP_IDL_CHECK="yes")
|
||||
|
||||
if test -z "$CROSS_COMPILE"; then
|
||||
if test -z "$HOST_LIBIDL_CONFIG"; then
|
||||
HOST_LIBIDL_CONFIG="$LIBIDL_CONFIG"
|
||||
fi
|
||||
if test -z "$HOST_LIBIDL_PREFIX"; then
|
||||
HOST_LIBIDL_PREFIX="$LIBIDL_PREFIX"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$SKIP_IDL_CHECK" = "no"
|
||||
then
|
||||
_LIBIDL_FOUND=
|
||||
if test "$MACOS_SDK_DIR"; then
|
||||
dnl xpidl, and therefore libIDL, is only needed on the build host.
|
||||
dnl Don't build it against the SDK, as that causes problems.
|
||||
_MACSAVE_CFLAGS="$CFLAGS"
|
||||
_MACSAVE_LIBS="$LIBS"
|
||||
_MACSAVE_LDFLAGS="$LDFLAGS"
|
||||
_MACSAVE_NEXT_ROOT="$NEXT_ROOT"
|
||||
changequote(,)
|
||||
CFLAGS=`echo $CFLAGS|sed -E -e "s%((-I|-isystem )${MACOS_SDK_DIR}/usr/(include|lib/gcc)[^ ]*)|-F${MACOS_SDK_DIR}(/System)?/Library/Frameworks[^ ]*|-nostdinc[^ ]*|-isysroot ${MACOS_SDK_DIR}%%g"`
|
||||
LIBS=`echo $LIBS|sed -e "s?-L${MACOS_SDK_DIR}/usr/lib[^ ]*??g"`
|
||||
LDFLAGS=`echo $LDFLAGS|sed -e "s?-Wl,-syslibroot,${MACOS_SDK_DIR}??g"`
|
||||
changequote([,])
|
||||
unset NEXT_ROOT
|
||||
case "$host" in
|
||||
*-mingw*|*-cygwin*|*-msvc*|*-mks*)
|
||||
if test -n "$GLIB_PREFIX"; then
|
||||
_GLIB_PREFIX_DIR=`cd $GLIB_PREFIX && pwd -W`
|
||||
if test "$?" = "0"; then
|
||||
if test `echo ${PATH}: | grep -ic "$_GLIB_PREFIX_DIR/bin:"` = 0; then
|
||||
AC_MSG_ERROR([GLIB_PREFIX must be in your \$PATH.])
|
||||
fi
|
||||
_GLIB_PREFIX_DIR=`$CYGPATH_W $_GLIB_PREFIX_DIR | $CYGPATH_S`
|
||||
else
|
||||
AC_MSG_ERROR([GLIB_PREFIX is set but "${GLIB_PREFIX}" is not a directory.])
|
||||
fi
|
||||
else
|
||||
_GLIB_PREFIX_DIR=$MOZ_TOOLS_DIR
|
||||
fi
|
||||
if test ! -f "${_GLIB_PREFIX_DIR}/include/glib.h"; then
|
||||
AC_MSG_ERROR([Cannot find $_GLIB_PREFIX_DIR/include/glib.h .])
|
||||
fi
|
||||
GLIB_CFLAGS="-I${_GLIB_PREFIX_DIR}/include"
|
||||
if test -f "${_GLIB_PREFIX_DIR}/lib/glib-1.2_s.lib"; then
|
||||
GLIB_LIBS="${_GLIB_PREFIX_DIR}/lib/glib-1.2_s.lib"
|
||||
elif test -f "${_GLIB_PREFIX_DIR}/lib/glib-1.2.lib"; then
|
||||
GLIB_LIBS="${_GLIB_PREFIX_DIR}/lib/glib-1.2.lib"
|
||||
else
|
||||
AC_MSG_ERROR([Cannot find $_GLIB_PREFIX_DIR/lib/glib-1.2.lib or $_GLIB_PREFIX_DIR/lib/glib-1.2_s.lib])
|
||||
fi
|
||||
|
||||
if test -n "$HOST_LIBIDL_PREFIX"; then
|
||||
_LIBIDL_PREFIX_DIR=`cd $HOST_LIBIDL_PREFIX && pwd -W`
|
||||
if test "$?" = "0"; then
|
||||
if test `echo ${PATH}: | grep -ic "$_LIBIDL_PREFIX_DIR/bin:"` = 0; then
|
||||
AC_MSG_ERROR([LIBIDL_PREFIX must be in your \$PATH.])
|
||||
fi
|
||||
_LIBIDL_PREFIX_DIR=`$CYGPATH_W $_LIBIDL_PREFIX_DIR | $CYGPATH_S`
|
||||
else
|
||||
AC_MSG_ERROR([LIBIDL_PREFIX is set but "${LIBIDL_PREFIX}" is not a directory.])
|
||||
fi
|
||||
else
|
||||
_LIBIDL_PREFIX_DIR=$MOZ_TOOLS_DIR
|
||||
fi
|
||||
if test ! -f "${_LIBIDL_PREFIX_DIR}/include/libIDL/IDL.h"; then
|
||||
AC_MSG_ERROR([Cannot find $_LIBIDL_PREFIX_DIR/include/libIDL/IDL.h .])
|
||||
fi
|
||||
HOST_LIBIDL_CFLAGS="-I${_LIBIDL_PREFIX_DIR}/include ${GLIB_CFLAGS}"
|
||||
if test -f "${_LIBIDL_PREFIX_DIR}/lib/libidl-0.6_s.lib"; then
|
||||
HOST_LIBIDL_LIBS="${_LIBIDL_PREFIX_DIR}/lib/libidl-0.6_s.lib"
|
||||
STATIC_LIBIDL=1
|
||||
elif test -f "${_LIBIDL_PREFIX_DIR}/lib/libidl-0.6.lib"; then
|
||||
HOST_LIBIDL_LIBS="${_LIBIDL_PREFIX_DIR}/lib/libidl-0.6.lib"
|
||||
else
|
||||
AC_MSG_ERROR([Cannot find $_LIBIDL_PREFIX_DIR/lib/libidl-0.6.lib or $_LIBIDL_PREFIX_DIR/lib/libidl-0.6_s.lib])
|
||||
fi
|
||||
HOST_LIBIDL_LIBS="${HOST_LIBIDL_LIBS} ${GLIB_LIBS}"
|
||||
_LIBIDL_FOUND=1
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$_LIBIDL_FOUND"; then
|
||||
if test "$MACOS_SDK_DIR"; then
|
||||
dnl xpidl, and therefore libIDL, is only needed on the build host.
|
||||
dnl Don't build it against the SDK, as that causes problems.
|
||||
_MACSAVE_CFLAGS="$CFLAGS"
|
||||
_MACSAVE_LIBS="$LIBS"
|
||||
_MACSAVE_LDFLAGS="$LDFLAGS"
|
||||
_MACSAVE_NEXT_ROOT="$NEXT_ROOT"
|
||||
changequote(,)
|
||||
CFLAGS=`echo $CFLAGS|sed -E -e "s%((-I|-isystem )${MACOS_SDK_DIR}/usr/(include|lib/gcc)[^ ]*)|-F${MACOS_SDK_DIR}(/System)?/Library/Frameworks[^ ]*|-nostdinc[^ ]*|-isysroot ${MACOS_SDK_DIR}%%g"`
|
||||
LIBS=`echo $LIBS|sed -e "s?-L${MACOS_SDK_DIR}/usr/lib[^ ]*??g"`
|
||||
LDFLAGS=`echo $LDFLAGS|sed -e "s?-Wl,-syslibroot,${MACOS_SDK_DIR}??g"`
|
||||
changequote([,])
|
||||
unset NEXT_ROOT
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(HOST_LIBIDL, libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0, _LIBIDL_FOUND=1,_LIBIDL_FOUND=)
|
||||
fi
|
||||
|
||||
if test "$MOZ_ENABLE_GTK2"; then
|
||||
PKG_CHECK_MODULES(LIBIDL, libIDL-2.0 >= 0.8.0 glib-2.0 gobject-2.0, _LIBIDL_FOUND=1,_LIBIDL_FOUND=)
|
||||
fi
|
||||
dnl if no gtk/libIDL1 or gtk2/libIDL2 combination was found, fall back
|
||||
dnl to either libIDL1 or libIDL2.
|
||||
if test -z "$_LIBIDL_FOUND"; then
|
||||
AM_PATH_LIBIDL($LIBIDL_VERSION,_LIBIDL_FOUND=1)
|
||||
if test -z "$_LIBIDL_FOUND"; then
|
||||
PKG_CHECK_MODULES(LIBIDL, libIDL-2.0 >= 0.8.0,_LIBIDL_FOUND=1)
|
||||
PKG_CHECK_MODULES(HOST_LIBIDL, libIDL-2.0 >= 0.8.0,_LIBIDL_FOUND=1)
|
||||
fi
|
||||
fi
|
||||
dnl
|
||||
|
@ -8046,13 +8026,13 @@ then
|
|||
_ORBIT_LIBS=`${ORBIT_CONFIG} client --libs`
|
||||
_ORBIT_INC_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-I/); } }' -- ${_ORBIT_CFLAGS}`
|
||||
_ORBIT_LIB_PATH=`${PERL} -e '{ for $f (@ARGV) { print "$f " if ($f =~ m/^-L/); } }' -- ${_ORBIT_LIBS}`
|
||||
LIBIDL_CFLAGS="$_ORBIT_INC_PATH"
|
||||
LIBIDL_LIBS="$_ORBIT_LIB_PATH -lIDL -lglib"
|
||||
LIBIDL_CONFIG=
|
||||
HOST_LIBIDL_CFLAGS="$_ORBIT_INC_PATH"
|
||||
HOST_LIBIDL_LIBS="$_ORBIT_LIB_PATH -lIDL -lglib"
|
||||
HOST_LIBIDL_CONFIG=
|
||||
_SAVE_CFLAGS="$CFLAGS"
|
||||
_SAVE_LIBS="$LIBS"
|
||||
CFLAGS="$LIBIDL_CFLAGS $CFLAGS"
|
||||
LIBS="$LIBIDL_LIBS $LIBS"
|
||||
CFLAGS="$HOST_LIBIDL_CFLAGS $CFLAGS"
|
||||
LIBS="$HOST_LIBIDL_LIBS $LIBS"
|
||||
AC_TRY_RUN([
|
||||
#include <stdlib.h>
|
||||
#include <libIDL/IDL.h>
|
||||
|
@ -8066,8 +8046,8 @@ int main() {
|
|||
}
|
||||
], [_LIBIDL_FOUND=1
|
||||
result="yes"],
|
||||
[LIBIDL_CFLAGS=
|
||||
LIBIDL_LIBS=
|
||||
[HOST_LIBIDL_CFLAGS=
|
||||
HOST_LIBIDL_LIBS=
|
||||
result="no"],
|
||||
[_LIBIDL_FOUND=1
|
||||
result="maybe"] )
|
||||
|
@ -8091,16 +8071,42 @@ int main() {
|
|||
fi
|
||||
|
||||
if test -n "$CROSS_COMPILE"; then
|
||||
if test -z "$HOST_LIBIDL_CONFIG"; then
|
||||
HOST_LIBIDL_CONFIG="$LIBIDL_CONFIG"
|
||||
fi
|
||||
if test -n "$HOST_LIBIDL_CONFIG" && test "$HOST_LIBIDL_CONFIG" != "no"; then
|
||||
HOST_LIBIDL_CFLAGS=`${HOST_LIBIDL_CONFIG} --cflags`
|
||||
HOST_LIBIDL_LIBS=`${HOST_LIBIDL_CONFIG} --libs`
|
||||
else
|
||||
HOST_LIBIDL_CFLAGS="$LIBIDL_CFLAGS"
|
||||
HOST_LIBIDL_LIBS="$LIBIDL_LIBS"
|
||||
fi
|
||||
case "$target" in
|
||||
*-mingw*|*-cygwin*|*-msvc*|*-mks*)
|
||||
if test -n "$GLIB_PREFIX"; then
|
||||
GLIB_CFLAGS="-I${GLIB_PREFIX}/include"
|
||||
if test -f "${GLIB_PREFIX}/lib/glib-1.2_s.lib"; then
|
||||
GLIB_LIBS="${GLIB_PREFIX}/lib/glib-1.2_s.lib"
|
||||
elif test -f "${GLIB_PREFIX}/lib/glib-1.2.lib"; then
|
||||
GLIB_LIBS="${GLIB_PREFIX}/lib/glib-1.2.lib"
|
||||
else
|
||||
AC_MSG_ERROR([Cannot find $GLIB_PREFIX/lib/glib-1.2.lib or $GLIB_PREFIX/lib/glib-1.2_s.lib])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$LIBIDL_PREFIX"; then
|
||||
LIBIDL_CFLAGS="-I${LIBIDL_PREFIX}/include ${GLIB_CFLAGS}"
|
||||
if test -f "${LIBIDL_PREFIX}/lib/libIDL-0.6_s.lib"; then
|
||||
LIBIDL_LIBS="${LIBIDL_PREFIX}/lib/libIDL-0.6_s.lib"
|
||||
STATIC_LIBIDL=1
|
||||
elif test -f "${LIBIDL_PREFIX}/lib/libIDL-0.6.lib"; then
|
||||
LIBIDL_LIBS="${LIBIDL_PREFIX}/lib/libIDL-0.6.lib"
|
||||
else
|
||||
AC_MSG_ERROR([Cannot find $LIBIDL_PREFIX/lib/libIDL-0.6.lib or $LIBIDL_PREFIX/lib/libIDL-0.6_s.lib])
|
||||
fi
|
||||
fi
|
||||
LIBIDL_LIBS="${LIBIDL_LIBS} ${GLIB_LIBS}"
|
||||
;;
|
||||
*)
|
||||
if test -n "LIBIDL_CONFIG" && test "LIBIDL_CONFIG" != "no"; then
|
||||
LIBIDL_CFLAGS=`${LIBIDL_CONFIG} --cflags`
|
||||
LIBIDL_LIBS=`${LIBIDL_CONFIG} --libs`
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
LIBIDL_CFLAGS="$HOST_LIBIDL_CFLAGS"
|
||||
LIBIDL_LIBS="$HOST_LIBIDL_LIBS"
|
||||
fi
|
||||
|
||||
if test -z "$SKIP_PATH_CHECKS"; then
|
||||
|
|
|
@ -44,20 +44,12 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
MODULE = xpcom
|
||||
|
||||
# there's no reason to build a target xpidl, why do we do this at all?
|
||||
##ifneq (,$(filter-out WINCE SYMBIAN,$(OS_ARCH)))
|
||||
### Sadly, the code here is too smart for the WinCE/Symbian compiler's brain
|
||||
ifndef CROSS_COMPILE
|
||||
PROGRAM = xpidl$(BIN_SUFFIX)
|
||||
SDK_BINARY = $(PROGRAM)
|
||||
endif
|
||||
|
||||
INTERNAL_TOOLS = 1
|
||||
|
||||
# glib and libIDL link against the non-debug msvcrt
|
||||
MOZ_NO_DEBUG_RTL=1
|
||||
|
||||
CSRCS = \
|
||||
XPIDL_CSRCS = \
|
||||
xpidl.c \
|
||||
xpidl_idl.c \
|
||||
xpidl_util.c \
|
||||
|
@ -68,11 +60,30 @@ CSRCS = \
|
|||
$(NULL)
|
||||
|
||||
ifdef CROSS_COMPILE
|
||||
|
||||
HOST_PROGRAM = host_xpidl$(HOST_BIN_SUFFIX)
|
||||
HOST_CSRCS = $(CSRCS)
|
||||
HOST_CSRCS = $(XPIDL_CSRCS)
|
||||
|
||||
ifdef WINCE
|
||||
HOST_LDFLAGS += -ladvapi32.lib
|
||||
endif
|
||||
|
||||
ifdef LIBIDL_LIBS
|
||||
BUILD_TARGET = 1
|
||||
endif
|
||||
|
||||
else # CROSS_COMPILE
|
||||
|
||||
BUILD_TARGET = 1
|
||||
|
||||
endif # CROSS_COMPILE
|
||||
|
||||
ifdef BUILD_TARGET
|
||||
PROGRAM = xpidl$(BIN_SUFFIX)
|
||||
CSRCS = $(XPIDL_CSRCS)
|
||||
SDK_BINARY = $(PROGRAM)
|
||||
CFLAGS += LIBIDL_CFLAGS
|
||||
LIBS += LIBIDL_LIBS
|
||||
endif
|
||||
|
||||
USE_STATIC_LIBS = 1
|
||||
|
@ -84,37 +95,7 @@ ifeq ($(OS_ARCH),Darwin)
|
|||
# case in order to successfully link. Because the target xpidl isn't
|
||||
# currently built in a cross compile, though, this point is moot for the
|
||||
# time being.
|
||||
|
||||
ifndef CROSS_COMPILE
|
||||
# When doing a native build, don't build xpidl against the SDK. libIDL
|
||||
# was most likely configured for the system headers, and bringing in the
|
||||
# SDK's headers instead will cause problems.
|
||||
_STRIP_SDK = 1
|
||||
else
|
||||
|
||||
# Cross-compiling
|
||||
|
||||
# Don't build xpidl for the target. This is not intended to be a permanent
|
||||
# solution. It's necessary because it is presently difficult to build
|
||||
# xpidl's prerequisites (libIDL and glib) as fat and suitable for a cross.
|
||||
# This will be fixed. -mm
|
||||
PROGRAM=
|
||||
|
||||
# Since only host_xpidl will be built for now, always strip out the SDK
|
||||
# (as above).
|
||||
_STRIP_SDK=1
|
||||
|
||||
# When fat xpidl prerequisites are available, the PROGRAM= and _STRIP_SDK=1
|
||||
# above are expected to disappear, and be replaced with the following
|
||||
# conditonal.
|
||||
|
||||
# ifeq (86_powerpc,$(findstring 86,$(host_cpu))_$(TARGET_CPU))
|
||||
# # When cross-compiling from x86 to ppc, an old (10.2-ish) SDK might be in
|
||||
# # use, and libIDL will have been configured for new (10.4-ish) headers.
|
||||
# _STRIP_SDK = 1
|
||||
# endif
|
||||
|
||||
endif # CROSS_COMPILE
|
||||
|
||||
ifneq (,$(_STRIP_SDK)$(MACOS_SDK_DIR))
|
||||
# libIDL is configured for the system's headers, with no SDK involved.
|
||||
|
|
Загрузка…
Ссылка в новой задаче