-
Notifications
You must be signed in to change notification settings - Fork 6
/
configure
executable file
·98 lines (72 loc) · 2.06 KB
/
configure
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/sh
#
# This is the bootstrapping configuration script for Ganymede. The
# only thing we count on to run this script is that /bin/sh works.
#
# Get enough information from the user to be able to find Perl 5 and
# run scripts/configurator.perl. We'll set a bunch of environment variables
# for configurator.perl to use to do its thing.
#
# Last Revision Changed: $Rev$
# Last Changed By: $Author$
# Last Mod Date: $Date$
# SVN URL: $HeadURL$
#
###############################################################################
echo "Ganymede configure script"
echo
#
# Figure out how to do an echo without trailing newline
#
case "`echo 'x\c'`" in
'x\c') echo="echo -n" nnl= ;; # BSD
x) echo="echo" nnl="\c" ;; # Sys V
*) echo "$0 quitting: Can't set up echo." 1>&2; exit 1 ;;
esac
# Find the source files, if location was not specified.
# Try the directory containing this script, then its parent.
prog=$0
GROOTDIR=`echo $prog|sed 's%/[^/][^/]*$%%'`
# if the program name is the same as the srcdir name, we have no path
# set.. must be .
#test "x$GROOTDIR" = "x$prog" && GROOTDIR=.
#if test ! -d $GROOTDIR/build/src/classes; then
# echo "configure: error: can not find sources in $rootdir" 1>&2; exit 1;
#fi
export GROOTDIR
# Find perl (GPERL)
guessperl=`which perl`> /dev/null 2>&1
if `$guessperl $GROOTDIR/scripts/versiontest.pl > /dev/null 2>&1`; then
GPERL=$guessperl
else
$echo "Where is perl 5 installed? [$guessperl] ${nnl}"
read userperl
if test ! -z "$userperl"; then
GPERL=$userperl
else
GPERL=$guessperl
fi
fi
export GPERL
# Find java
guessjava=`which java`
guessjava=`dirname ${guessjava}`
$echo "What is the location of the directory where java is installed? [$guessjava] ${nnl}"
read userjava
if test ! -z "$userjava"; then
GJAVA=$userjava
else
GJAVA=$guessjava
fi
export GJAVA
# Find ant
guessant=`which ant`
$echo "Where is Apache Ant located? [$guessant] ${nnl}"
read userant
if test ! -z "$userant"; then
GANT=$userant
else
GANT=$guessant
fi
export GANT
$GPERL $GROOTDIR/scripts/configurator.perl