[project @ 2002-01-17 09:52:18 by sof]
authorsof <unknown>
Thu, 17 Jan 2002 09:52:19 +0000 (09:52 +0000)
committersof <unknown>
Thu, 17 Jan 2002 09:52:19 +0000 (09:52 +0000)
For AR and LD, transform "/cygdrive/<drive>/..." paths to "<drive>:\..." --
enables the use of mingw-based GNU Make.

aclocal.m4
configure.in

index ccb9a64..f5485cc 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: aclocal.m4,v 1.92 2002/01/07 20:46:52 sof Exp $
+dnl $Id: aclocal.m4,v 1.93 2002/01/17 09:52:18 sof Exp $
 dnl 
 dnl Extra autoconf macros for the Glasgow fptools
 dnl
@@ -321,34 +321,41 @@ dnl On Digital UNIX, we test for the -Z (compress) and
 dnl -input (take list of files from external file) flags.
 dnl 
 AC_DEFUN(FPTOOLS_PROG_AR_AND_RANLIB,
-[AC_PATH_PROG(ArCmd,ar)
-if test -z "$ArCmd"; then
+[AC_PATH_PROG(ArCmdRaw,ar)
+if test -z "$ArCmdRaw"; then
     echo "You don't seem to have ar in your PATH...I have no idea how to make a library"
     exit 1;
 fi
-if $ArCmd clqsZ conftest.a >/dev/null 2>/dev/null; then
-    ArCmd="$ArCmd clqsZ"
+if $ArCmdRaw clqsZ conftest.a >/dev/null 2>/dev/null; then
+    ArCmdArgs="clqsZ"
     NeedRanLib=''
-elif $ArCmd clqs conftest.a >/dev/null 2>/dev/null; then
-    ArCmd="$ArCmd clqs"
+elif $ArCmdRaw clqs conftest.a >/dev/null 2>/dev/null; then
+    ArCmdArgs="clqs"
     NeedRanLib=''
-elif $ArCmd cqs conftest.a >/dev/null 2>/dev/null; then
-    ArCmd="$ArCmd cqs"
+elif $ArCmdRaw cqs conftest.a >/dev/null 2>/dev/null; then
+    ArCmdArgs="cqs"
     NeedRanLib=''
-elif $ArCmd clq conftest.a >/dev/null 2>/dev/null; then
-    ArCmd="$ArCmd clq"
+elif $ArCmdRaw clq conftest.a >/dev/null 2>/dev/null; then
+    ArCmdArgs="clq"
     NeedRanLib='YES'
-elif $ArCmd cq conftest.a >/dev/null 2>/dev/null; then
-    ArCmd="$ArCmd cq"
+elif $ArCmdRaw cq conftest.a >/dev/null 2>/dev/null; then
+    ArCmdArgs="cq"
     NeedRanLib='YES'
-elif $ArCmd cq conftest.a 2>&1 | grep 'no archive members specified' >/dev/null 2>/dev/null; then
-    ArCmd="$ArCmd cq"
+elif $ArCmdRaw cq conftest.a 2>&1 | grep 'no archive members specified' >/dev/null 2>/dev/null; then
+    ArCmdArgs="cq"
     NeedRanLib='YES'
 else
     echo "I can't figure out how to use your $ArCmd"
     exit 1
 fi
 rm -rf conftest*
+case $HostPlatform in
+ *mingw32) 
+         ArCmd="`cygpath -w ${ArCmdRaw} | sed -e 's@\\\\@/@g' ` ${ArCmdArgs}"
+         ;;
+ *) ArCmd="${ArCmdRaw} ${ArCmdArgs}"
+    ;;
+esac
 test -n "$ArCmd" && test -n "$verbose" && echo "        setting ArCmd to $ArCmd"
 AC_SUBST(ArCmd)
 if $ArCmd conftest.a -input /dev/null >/dev/null 2>/dev/null; then
index 7bb7ab9..af910e2 100644 (file)
@@ -579,7 +579,6 @@ AC_DEFINE(HAVE_BIN_SH)
 dnl ** how to invoke `ar' and `ranlib'
 FPTOOLS_PROG_AR_AND_RANLIB
 
-
 dnl ** Check to see whether ln -s works
 AC_PROG_LN_S
 
@@ -1008,7 +1007,14 @@ dnl ** code before data?
 FPTOOLS_CODE_BEFORE_DATA
 
 dnl ** check for ld, and whether ld has -x option
-AC_PATH_PROG(LdCmd, ld)
+AC_PATH_PROG(LdCmdRaw, ld)
+case $HostOS_CPP in
+ mingw32) LdCmd=`cygpath -w ${LdCmdRaw} | sed -e 's@\\\\@/@g' `
+          ;;
+ *) LdCmd=${LdCmdRaw}
+    ;;
+esac
+AC_SUBST(LdCmd)
 FPTOOLS_LD_X
 
 AC_OUTPUT(mk/config.mk, echo timestamp > mk/stamp-h )