-
Notifications
You must be signed in to change notification settings - Fork 3
/
oldrunconfig.sh
executable file
·147 lines (127 loc) · 3.14 KB
/
oldrunconfig.sh
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/bin/sh
######################################################################
#
# File: runconfig.sh
#
# Purpose: Script to determine most options. User specifies rest.
#
# Version: $Id: runconfig.sh 1781 2001-11-07 20:08:01Z cary $
#
# XGRAFIX
#
######################################################################
#
# Find location of this file and, hence, configure
#
shfile=$0
srcdir=`dirname $shfile`
builddir=`pwd`
lineopts="$*"
haveprefix=`echo $lineopts | grep -- --prefix=`
# echo lineopts = $lineopts
#
# Determine the host
#
if [ -f /usr/ucb/hostname ]; then
hostnm=`/usr/ucb/hostname`
else
hostnm=`hostname`
fi
#
# Look for seaborg
#
isseaborg=`echo $hostnm | grep s00`
if test "$isseaborg"; then hostnm=seaborg.nersc.gov; fi
echo host is $hostnm
#
# Offer parallel choice on some platforms
#
case $hostnm in
mcurie | mcurie.nersc.gov)
prl="y"
;;
*)
echo "Build parallel (y/n)?"
read prl
;;
esac
#
# Offer to fix Makefile.in's
#
echo "Fix Makefile.in's? (y/n)"
read fixit
if test "$fixit" = yes -o "$fixit" = y; then
cd $srcdir
config/automake.sh
cd $builddir
fi
#
# Known options
#
case $hostnm in
seaborg | seaborg.nersc.gov)
echo assuming host is seaborg.nersc.gov
confopts="--with-CC=cc --with-CXX=mpCC_r --with-MPICC=mpcc_r --with-MPICXX=mpCC_r --enable-MPI --with-XGmini=yes"
if test ! "$haveprefix"; then
confopts="$confopts --prefix=$HOME/unicos2.0"
fi
;;
mcurie | mcurie.nersc.gov)
echo assuming host is mcurie.nersc.gov
confopts="--with-CC=cc --with-CXX=CC --enable-MPI --with-MPICXX=CC --with-XGmini=yes"
if test ! "$haveprefix"; then
confopts="$confopts --prefix=$HOME/unicos2.0"
fi
;;
quad.txcorp.com | tech-x.txcorp.com | minotaur.colorado.edu | penguin.colorado.edu)
if test "$prl" = y -o "$prl" = yes; then
confopts="--enable-MPI --with-xpm=/usr/X11R6/lib --with-XGmini=yes"
else
confopts="--with-xpm=/usr/X11R6/lib"
fi
if test ! "$haveprefix"; then
confopts="$confopts --prefix=/usr/local/xoopic"
fi
;;
*)
echo Machine not known. Will try on basis of OS.
case `uname` in
Linux)
if test "$prl" = y -o "$prl" = yes; then
confopts="--enable-MPI --with-xpm=/usr/X11R6/lib --with-XGmini=yes"
else
confopts="--with-xpm=/usr/X11R6/lib"
fi
if test ! "$haveprefix"; then
confopts="$confopts --prefix=/usr/local/xoopic"
fi
;;
*)
echo OS not known. Will try fallback.
if test "$prl" = y -o "$prl" = yes; then
confopts="--enable-MPI --with-xpm=/usr/X11R6/lib"
else
confopts="--with-xpm=/usr/X11R6/lib"
fi
if test ! "$haveprefix"; then
confopts="$confopts --prefix=/usr/local/xoopic"
fi
;;
esac
esac
confopts="$confopts $lineopts"
#
# Allow additional options
#
echo configure options: $confopts
echo
echo "Other options (e.g., --enable-optimize)? Or type \"quit\" to quit."
read otheropts
if test "$otheropts" = quit; then exit; fi
confopts="$confopts $otheropts"
#
# Will now run configure
#
cmd="$srcdir/configure $confopts"
echo $cmd
$cmd