summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcls%seawood.org <devnull@localhost>1999-07-14 07:03:55 +0000
committercls%seawood.org <devnull@localhost>1999-07-14 07:03:55 +0000
commit955d9470747918e33fa435480797bae3c1ee9c25 (patch)
tree1a9d00a1766fbcb180edc09182de4abaf49fe653
parent5d40988038b7559a504eb72cb17fcd5a5507d2c3 (diff)
downloadnspr-hg-955d9470747918e33fa435480797bae3c1ee9c25.tar.gz
Added detection for dlltool and windres which are needed to build dlls.
Changed rules.mk so MKSHLIB is now expected to contain the appropriate option to state what the object file is (ie, -o $*.so) Unhardcoded OBJ_SUFFIX, DLL_SUFFIX, & LIB_SUFFIX. Successfully compiled and linked a static nspr test program (alarm & fsync) using linux->mingw32 cross-compiler and successfully ran it on a win95 box.
-rw-r--r--configure.in30
1 files changed, 29 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 9370fefb..a82acf5a 100644
--- a/configure.in
+++ b/configure.in
@@ -69,7 +69,7 @@ AC_ARG_ENABLE(debug,
MOZ_DEBUG=1)
AC_ARG_ENABLE(target,
- [ --enable-target=\$t Turn on features for target \$t],
+ [ --enable-target=\$t Turn on features for target \$t when build has multiple targets],
MOZ_TARGET=`echo $enableval | tr A-Z a-z`,
MOZ_TARGET=)
@@ -131,11 +131,22 @@ if test "$target" != "$host"; then
if test -z "$AR"; then
AC_CHECK_PROGS(AR, "${target_alias}-ar" "${target}-ar", :)
fi
+ if test -z "$AS"; then
+ AC_CHECK_PROGS(AS, "${target_alias}-as" "${target}-as", :)
+ fi
+ if test -z "$DLLTOOL"; then
+ AC_CHECK_PROGS(DLLTOOL, "${target_alias}-dlltool" "${target}-dlltool", :)
+ fi
+ if test -z "$WINDRES"; then
+ AC_CHECK_PROGS(WINDRES, "${target_alias}-windres" "${target}-windres", :)
+ fi
else
AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
+ AC_PATH_PROGS(AS, as, $CC)
AC_PATH_PROGS(AR, ar, :)
+ AC_PATH_PROGS(DLLTOOL, dlltool, :)
if test -z "$HOSTCC"; then
HOSTCC="$CC"
fi
@@ -148,6 +159,12 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PATH_PROGS(PERL, perl5 perl, :)
+dnl Defaults
+OBJ_SUFFIX=o
+LIB_SUFFIX=a
+DLL_SUFFIX=so
+MKSHLIB='$(CCC) -shared -o $@'
+
case "$host" in
*-linux*)
HOSTCFLAGS="$HOSTCFLAGS -DXP_UNIX"
@@ -185,6 +202,10 @@ alpha-*-linux*)
DEFINES="$DEFINES -DXP_PC"
PR_MD_ASFILES=
PR_MD_ARCH_DIR=windows
+ OBJ_SUFFIX=obj
+ LIB_SUFFIX=lib
+ DLL_SUFFIX=dll
+ MKSHLIB='$(DLLTOOL) --as=$(AS) -k --dllname $*.dll --output-lib $@'
case "$MOZ_TARGET" in
winnt)
@@ -319,9 +340,16 @@ AC_SUBST(PR_MD_CSRCS)
AC_SUBST(PR_MD_ASFILES)
AC_SUBST(PR_MD_ARCH_DIR)
+AC_SUBST(OBJ_SUFFIX)
+AC_SUBST(LIB_SUFFIX)
+AC_SUBST(DLL_SUFFIX)
+AC_SUBST(MKSHLIB)
+
AC_SUBST(DEFINES)
AC_SUBST(DEFS)
AC_SUBST(AR)
+AC_SUBST(DLLTOOL)
+AC_SUBST(WINDRES)
AC_SUBST(RANLIB)
AC_SUBST(PERL)