Ticket #13465: patch-configure

File patch-configure, 1.8 KB (added by x07simbj@…, 17 years ago)
Line 
1--- configure.orig      2007-11-28 15:29:21.000000000 +0100
2+++ configure   2007-12-01 00:31:29.000000000 +0100
3@@ -9,6 +9,8 @@
4 HEAP_SUFFIX=
5 DEBUGLIB=librml_g.a
6 PROFLIB=librml_p.a
7+SMLNJPATH=
8+DESTROOT=
9 
10 if [ -r ./config.cache ]; then
11   . ./config.cache
12@@ -31,6 +33,12 @@
13     --prefix=*)
14        PREFIX=`echo $arg | sed 's/--prefix=//'`
15        ;;
16+    --destroot=*)
17+       DESTROOT=`echo $arg | sed 's/--destroot=//'`
18+       ;;
19+    --smlnj-path=*)
20+       SMLNJPATH=`echo $arg | sed 's/--smlnj-path=//'`
21+       ;;
22     --nosmlnj)
23        SMLCM=nosmlnj
24        MLLEX=nosmlnj
25@@ -55,6 +63,8 @@
26        echo valid options are:
27        echo '--build=<cpu-os-compiler>'
28        echo '--prefix=<path>'
29+       echo '--destroot=<path>'
30+       echo '--smlnj-path=<path>'
31        echo '--nosmlnj'
32        echo '--{disable,enable}-{debug,profile}'
33        exit 1
34@@ -102,11 +112,16 @@
35        ;;
36   *)
37        BIN_DIR=`grep BIN_DIR= $SMLCM | head -1`
38-       if [ "$?" != 0 -o -z "$BIN_DIR" ]; then
39-         echo ./configure: unable to determine SML/NJ installation directory
40-         exit 1
41+#      if [ "$?" != 0 -o -z "$BIN_DIR" ]; then
42+#        echo ./configure: unable to determine SML/NJ installation directory
43+#        exit 1
44+#      fi
45+#      eval $BIN_DIR
46+       if [ -z "$SMLNJPATH" ]; then
47+               eval $BIN_DIR
48+               SMLNJPATH=$BIN_DIR
49        fi
50-       eval $BIN_DIR
51+       BIN_DIR=$SMLNJPATH
52        ARCH_OPSYS_HEAPSUFFIX=`$BIN_DIR/.arch-n-opsys`
53        if [ "$?" != 0 ]; then
54          echo ./configure: unable to determine SML/NJ heap suffix
55@@ -120,10 +135,20 @@
56 if [ -z "$PREFIX" ]; then
57   PREFIX=`pwd`/$TARGET
58   echo ./configure: PREFIX is $PREFIX
59+else
60+  echo ./configure: PREFIX is $PREFIX
61+fi
62+
63+if [ -z "$DESTROOT" ]; then
64+  DESTROOT=$PREFIX
65+  echo ./configure: DESTROOT is $DESTROOT
66+else
67+  echo ./configure: DESTROOT is $DESTROOT
68 fi
69 
70 echo TARGET=$TARGET > ./config.cache
71 echo PREFIX=$PREFIX >> ./config.cache
72+echo DESTROOT=$DESTROOT >> ./config.cache
73 case "$TARGET" in
74   x86-mingw32-gcc)
75        SMLDIR=`etc/which_dir sml.bat`