File: configure

package info (click to toggle)
fort 0.4.2-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 76 kB
  • ctags: 65
  • sloc: ml: 330; makefile: 73; sh: 51
file content (79 lines) | stat: -rwxr-xr-x 1,284 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#! /bin/sh

# $Id: configure,v 1.4 2001/11/12 05:05:06 pdoane Exp $

prefix=/usr/local
bindir=''
libdir=''
exec_suffix=''

# Parse command-line arguments

while : ; do
    case "$1" in
	"") break;;
	-prefix|--prefix)
	    prefix=$2; shift;;
        -bindir|--bindir)
	    bindir=$2; shift;;
	-libdir|--libdir)
	    libdir=$2; shift;;
         *)
	    echo "Unknown option \"$1\"." 1>&2
	    exit 1
	    ;;
    esac
    shift
done

echo -n "Checking for cygwin... "
u=`uname`
case "$u" in
    CYGWIN*)
      echo "found"
      exec_suffix=".exe"
      ;;
    *)
      echo "not found"
      ;;
esac


# Defaults

if test "$bindir" = ""; then
  bindir="$prefix/bin"
fi

if test "$libdir" = ""; then
  libdir="$prefix/lib/ocaml"
fi

# Where to install

echo "# Makefile.config written by configure" >>Makefile.config
cat <<EOF > Makefile.config
# Where fort binaries are to be installed
BINDIR=$bindir

# Where fort libraries are to be installed
LIBDIR=$libdir

# Any suffix required for executables
EXEC_SUFFIX=$exec_suffix
EOF

# Print a summary

cat <<EOF

** Configuration summary **

Directories where FORT will be installed:
        binaries.................. $bindir
        libraries................. $libdir

OS information:
        executable suffix......... $exec_suffix
EOF