-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathConfigure
executable file
·103 lines (87 loc) · 1.93 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
99
100
101
102
103
#! /bin/sh
source_dir=`pwd`
if [ -f "config.status" ]; then
. config.status
fi
if [ "$#" -gt 0 ]; then
echo "Usage: ./Configure"
exit 1
fi
echo -n "Where OpenPegasus sources are located [ $source_dir ] "
read input
if [ -z "$input" ]; then
input=$source_dir
fi
source_dir=$input
build_dir=$source_dir/BUILD
echo -n "Where OpenPegasus should be built [ $build_dir ] "
read input
if [ -z "$input" ]; then
input=$build_dir
fi
build_dir=$input
install_dir="$build_dir/install"
binaries_dir="$build_dir/binaries"
mkdir -p $install_dir
mkdir -p $binaries_dir
system=`uname -s`
machine=`uname -m | sed -e 's/\/[0-9,a-z,A-Z]*//'`
case "$system:$machine" in
SunOS:*)
#Check for GNU compiler
if [ -e "`which gcc`" ]; then
platform="SOLARIS_SPARC_GNU";
else
platform="SOLARIS_SPARC_CC";
fi
;;
AIX:*)
platform="AIX_RS_IBMCXX"
;;
HP-UX:ia64)
platform="HPUX_IA64_ACC"
;;
HP-UX:9000)
platform="HPUX_PARISC_ACC"
;;
HP-UX:*)
platform="HPUX_ACC"
;;
Linux:i686)
platform="LINUX_IX86_GNU"
;;
Linux:i486)
platform="LINUX_IX86_GNU"
;;
Linux:ppc64)
platform="LINUX_IX86_GNU"
;;
Linux:ppc)
platform="LINUX_PPC_GNU"
;;
Linux:*)
platform="LINUX_PPC_GNU"
;;
*)
platform="Unknown"
;;
esac
echo -n "Determined that your platform is "
echo $platform
echo "Enter a new platform if incorrect, otherwise press Enter [ $platform ] "
read input
if [ -z "$input" ]; then
input=$platform
fi
platform=$input
echo "source_dir=$source_dir" > config.status
echo "install_dir=$install_dir" >> config.status
echo "binaries_dir=$binaries_dir" >> config.status
echo "platform=$platform" >> config.status
sed -e "s%@SOURCEDIR@%$source_dir%g" \
-e "s%@BINARIESDIR@%$binaries_dir%g" \
-e "s%@INSTALLDIR@%$install_dir%g" \
-e "s%@PLATFORM@%$platform%g" \
rpm/lsb-pegasus.xml.in > rpm/lsb-pegasus.xml
sed -e "s%@INSTALLDIR@%$install_dir%g" \
rpm/lsb-pegasus.spec.in > rpm/lsb-pegasus.spec