Add support for cross-compiling to i386-mingw32.
Bug #222013 r=wtc git-svn-id: svn://10.0.0.236/trunk@154718 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -59,7 +59,7 @@ CSRCS += nsinstall.c
|
||||
PLSRCS = nfspwd.pl
|
||||
endif
|
||||
|
||||
ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
|
||||
ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2,$(OS_ARCH)))
|
||||
PROG_SUFFIX = .exe
|
||||
else
|
||||
PROG_SUFFIX =
|
||||
@@ -110,7 +110,7 @@ include $(topsrcdir)/config/rules.mk
|
||||
|
||||
PROGS = $(OBJDIR)/now$(PROG_SUFFIX)
|
||||
|
||||
ifeq (,$(filter-out OS2 WINNT,$(OS_ARCH)))
|
||||
ifeq (,$(CROSS_COMPILE)$(filter-out OS2 WINNT,$(OS_ARCH)))
|
||||
TARGETS = $(PROGS)
|
||||
else
|
||||
PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX)
|
||||
|
||||
@@ -80,7 +80,7 @@ ifeq ($(OS_ARCH),Darwin)
|
||||
PWD := $(shell pwd)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter WINNT OS2, $(OS_ARCH)))
|
||||
ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2, $(OS_ARCH)))
|
||||
INSTALL = $(NSINSTALL)
|
||||
else
|
||||
ifeq ($(NSDISTMODE),copy)
|
||||
@@ -99,7 +99,7 @@ else
|
||||
INSTALL = $(NSINSTALL) -R
|
||||
endif
|
||||
endif
|
||||
endif # WINNT || OS2
|
||||
endif # (WINNT || OS2) && !CROSS_COMPILE
|
||||
|
||||
DEPENDENCIES = $(OBJDIR)/.md
|
||||
|
||||
|
||||
403
mozilla/nsprpub/configure
vendored
403
mozilla/nsprpub/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -367,18 +367,16 @@ if test "$target" != "$host"; then
|
||||
_SAVE_LDFLAGS="$LDFLAGS"
|
||||
|
||||
AC_MSG_CHECKING([for $host compiler])
|
||||
AC_CHECK_PROGS(HOST_CC, $HOST_CC gcc cc /usr/ucb/cc, "")
|
||||
if test -z "$HOST_CC"; then
|
||||
AC_CHECK_PROGS(HOST_CC, gcc cc /usr/ucb/cc, "")
|
||||
if test -z "$HOST_CC"; then
|
||||
AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
fi
|
||||
AC_MSG_RESULT([$HOST_CC])
|
||||
if test -z "$HOST_CFLAGS"; then
|
||||
HOST_CFLAGS="$CFLAGS"
|
||||
HOST_CFLAGS="$CFLAGS"
|
||||
fi
|
||||
if test -z "$HOST_LDFLAGS"; then
|
||||
HOST_LDFLAGS="$LDFLAGS"
|
||||
HOST_LDFLAGS="$LDFLAGS"
|
||||
fi
|
||||
|
||||
CC="$HOST_CC"
|
||||
@@ -387,41 +385,25 @@ if test "$target" != "$host"; then
|
||||
|
||||
AC_MSG_CHECKING([whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works])
|
||||
AC_TRY_COMPILE([], [return(0);],
|
||||
[ac_cv_prog_host_cc_works=1 AC_MSG_RESULT([yes])],
|
||||
AC_MSG_ERROR([installation or configuration problem: $host compiler $HOST_CC cannot create executables.]) )
|
||||
|
||||
[ac_cv_prog_host_cc_works=1 AC_MSG_RESULT([yes])],
|
||||
AC_MSG_ERROR([installation or configuration problem: $host compiler $HOST_CC cannot create executables.]) )
|
||||
|
||||
CC=$_SAVE_CC
|
||||
CFLAGS=$_SAVE_CFLAGS
|
||||
LDFLAGS=$_SAVE_LDFLAGS
|
||||
|
||||
if test -z "$CC"; then
|
||||
AC_CHECK_PROGS(CC, "${target_alias}-gcc" "${target}-gcc", echo)
|
||||
fi
|
||||
AC_CHECK_PROGS(CC, $CC "${target_alias}-gcc" "${target}-gcc", echo)
|
||||
unset ac_cv_prog_CC
|
||||
AC_PROG_CC
|
||||
if test -z "$CXX"; then
|
||||
AC_CHECK_PROGS(CXX, "${target_alias}-g++" "${target}-g++", echo)
|
||||
fi
|
||||
AC_CHECK_PROGS(CXX, $CXX "${target_alias}-g++" "${target}-g++", echo)
|
||||
unset ac_cv_prog_CXX
|
||||
AC_PROG_CXX
|
||||
if test -z "$RANLIB"; then
|
||||
AC_CHECK_PROGS(RANLIB, "${target_alias}-ranlib" "${target}-ranlib", echo)
|
||||
fi
|
||||
if test -z "$AR"; then
|
||||
AC_CHECK_PROGS(AR, "${target_alias}-ar" "${target}-ar", echo)
|
||||
fi
|
||||
if test -z "$AS"; then
|
||||
AC_CHECK_PROGS(AS, "${target_alias}-as" "${target}-as", echo)
|
||||
fi
|
||||
if test -z "$LD"; then
|
||||
AC_CHECK_PROGS(LD, "${target_alias}-ld" "${target}-ld", echo)
|
||||
fi
|
||||
if test -z "$STRIP"; then
|
||||
AC_CHECK_PROGS(STRIP, "${target_alias}-strip" "${target}-strip", echo)
|
||||
fi
|
||||
if test -z "$WINDRES"; then
|
||||
AC_CHECK_PROGS(WINDRES, "${target_alias}-windres" "${target}-windres", echo)
|
||||
fi
|
||||
AC_CHECK_PROGS(RANLIB, $RANLIB "${target_alias}-ranlib" "${target}-ranlib", echo)
|
||||
AC_CHECK_PROGS(AR, $AR "${target_alias}-ar" "${target}-ar", echo)
|
||||
AC_CHECK_PROGS(AS, $AS "${target_alias}-as" "${target}-as", echo)
|
||||
AC_CHECK_PROGS(LD, $LD "${target_alias}-ld" "${target}-ld", echo)
|
||||
AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", echo)
|
||||
AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", echo)
|
||||
|
||||
else
|
||||
AC_PROG_CXX
|
||||
@@ -438,10 +420,10 @@ else
|
||||
AC_PATH_PROGS(STRIP, strip, echo not_strip)
|
||||
AC_PATH_PROGS(WINDRES, windres, echo not_windres)
|
||||
if test -z "$HOST_CC"; then
|
||||
HOST_CC="$CC"
|
||||
HOST_CC="$CC"
|
||||
fi
|
||||
if test -z "$HOST_CFLAGS"; then
|
||||
HOST_CFLAGS="$CFLAGS"
|
||||
HOST_CFLAGS="$CFLAGS"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -524,9 +506,20 @@ AR_FLAGS='cr $@'
|
||||
AS='$(CC)'
|
||||
ASFLAGS='$(CFLAGS)'
|
||||
|
||||
OS_ARCH=`uname -s | sed -e 's|/|_|g'`
|
||||
OS_RELEASE=`uname -r`
|
||||
OS_TEST=`uname -m`
|
||||
if test -n "$CROSS_COMPILE"; then
|
||||
OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
|
||||
OS_RELEASE=
|
||||
OS_TEST="${target_cpu}"
|
||||
case "${target_os}" in
|
||||
linux*) OS_ARCH=Linux ;;
|
||||
solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
|
||||
mingw*) OS_ARCH=WINNT ;;
|
||||
esac
|
||||
else
|
||||
OS_ARCH=`uname -s | sed -e 's|/|_|g'`
|
||||
OS_RELEASE=`uname -r`
|
||||
OS_TEST=`uname -m`
|
||||
fi
|
||||
|
||||
if test "$OS_ARCH" = "IRIX64"; then
|
||||
OS_ARCH=IRIX
|
||||
@@ -677,6 +670,10 @@ dnl Override of system specific host options
|
||||
dnl ========================================================
|
||||
case "$host" in
|
||||
*-mingw*|*-cygwin*|*-msvc*|*-mks*)
|
||||
NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
|
||||
if test `echo "${PATH}" | grep -c \;` = 0; then
|
||||
CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
|
||||
fi
|
||||
;;
|
||||
*-beos*)
|
||||
HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE"
|
||||
@@ -1237,10 +1234,6 @@ case "$target" in
|
||||
AC_DEFINE(WIN32)
|
||||
PR_MD_ARCH_DIR=windows
|
||||
RESOLVE_LINK_SYMBOLS=1
|
||||
NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
|
||||
if test `echo "${PATH}" | grep -c \;` = 0; then
|
||||
CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
|
||||
fi
|
||||
|
||||
if test -n "$GNU_CC"; then
|
||||
CC="$CC -mno-cygwin"
|
||||
|
||||
Reference in New Issue
Block a user