Debian Codegraph @

install/unix/install1

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 #! /bin/bashscip-shell filesystem . . `/bin/bash`.
2 # .COPYRIGHT: Copyright (c) 1988-2011 European Southern Observatory,
3 # all rights reserved
4 # .TYPE command
5 # .NAME install1.sh
6 # .LANGUAGE shell script
7 # .ENVIRONMENT Unix Systems. Executable under SHELL and C-SHELL
8 # .COMMENTS Installation procedure of the MIDAS system starting from
9 # scratch.
10 # Usage: install system [options]
11 #
12 # .AUTHOR Carlos Guirao
13 # .VERSION 1.1 25-Oct-1989: Implementation
14 # .VERSION 1.2 05-Dec-1989: Adding "echo" definition
15 # .VERSION 1.3 910219: Removing System name argument
16 # .VERSION 1.4 911004: Removing "set -x +x" ignored by some
17 # .VERSION 1.5 911118: Checking Fortran and C compiler.
18 # .VERSION 2.1 920324: Creating makemidas first.
19 # .VERSION 3.1 930325: Using default.mk. CG.
20 # .VERSION 4.1 940124: OS library does not require computer.h
21 # .VERSION 4.2 021028: Using -a argument for automatic
22 #
23 # 111116 last modif
24
25 # the install1 script is called with one parameter
26 # from script config (a) or autoconfig (b)
27 #
28 # par1 = auto - use automatic (default) compiler checks for setting
29 # up /midas/version/local/make_options
30 # and start Midas installation (a)
31 # = manual - use make_options file as it is, no further checks,
32 # and start Midas installation (a)
33 #
34 # or = -a - as 'auto' but with no interaction (b)
35 #
36 # this parameter is saved as option INSTALL_FLAG in
37 # the file /midas/version/local/make_options
38
39 INSTALL_FLAG=$1
40
41 echo=echo
42 if [scip-shell system . . `[`. "`echoscip-shell system . . echo. -n`" = "-n" ] ; then
43 SV_NONL="\c"
44 else
45 echo="echo -n"
46 fi
47
48 #
49 # First of all, goto the config directory MID_INSTALL
50 # <dirname> & <basename> commands emulated with <sed>
51 # cd `dirname $0`
52 # MIDVERS=`basename $VERSDIR`
53 # MIDASHOME=`dirname $VERSDIR`
54 #
55 if [scip-shell system . . `[`. -z "$MIDASHOME" -o -z "$MIDVERS" ] ; then
56 cd `echoscip-shell system . . echo. $0 | sedscip-shell system . . sed. -e 's/[^\/]*$//' -e 's/^$/./' -e 's/\/$//'`
57 MID_INSTALL=`pwdscip-shell system . . pwd.`
58 VERSDIR=`echoscip-shell system . . echo. $MID_INSTALL | sedscip-shell system . . sed. 's/\/install\/unix$//'`
59 MIDVERS=`echoscip-shell system . . echo. $VERSDIR | sedscip-shell system . . sed. -e 's/^.*\///'`
60 MIDASHOME=`echoscip-shell system . . echo. $VERSDIR | sedscip-shell system . . sed. -e 's/[^\/]*$//' -e 's/^$/./' -e 's/\/$//'`
61 else
62 cd $MIDASHOME/$MIDVERS/install/unix
63 fi
64
65 MID_INSTALL=$MIDASHOME/$MIDVERS/install/unix
66 MID_HOME=$MIDASHOME/$MIDVERS
67 PATH=$PATH:$MID_INSTALL
68 export MIDASHOME MIDVERS MID_HOME MID_INSTALL
69
70 clearscip-shell system . . clear.
71
72 # ************** make_options file already final *************
73 if [scip-shell system . . `[`. $INSTALL_FLAG = "67" ]; then
74 export SV_NONL CMND_YES
75 $MID_INSTALL/install3 manual
76 exit 0
77 fi
78 # ************************************************************
79
80 if [scip-shell system . . `[`. ! -f "$MID_HOME/local/default.mk" ] ; then
81 echoscip-shell system . . echo. "*** ERROR: File <$MID_HOME/local/default.mk> does not exist."
82 echoscip-shell system . . echo. "*** You need to run <preinstall> before continuing with <install>"
83 exit 1
84 fi
85
86 if [scip-shell system . . `[`. -f "$MID_HOME/local/make_options" ] ; then
87 echoscip-shell system . . echo. "Your current MAKE_OPTIONS:"
88 awkscip-shell system . . awk. -F# '{if ($1 != "") {printf "\t %s\n",$1} }' $MID_HOME/local/make_options
89 echoscip-shell system . . echo. ""
90 else
91 touchscip-shell system . . touch. $MID_HOME/local/make_options
92 fi
93
94 chmodscip-shell system . . chmod. +x $MID_HOME/local/make_shared
95
96 echoscip-shell system . . echo. "*** MIDAS INSTALLATION TESTS ***"
97
98 #*************** START: Checking existence of make, time commands *********
99
100 CMND_YES=1
101
102 whichscip-shell system . . which. time > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
103 if [scip-shell system . . `[`. $? = 1 ] ; then
104 echoscip-shell system . . echo. "*** WARNING: Unix command 'time' not found"
105 CMND_YES=2
106 fi
107
108 whichscip-shell system . . which. make > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
109 if [scip-shell system . . `[`. $? = 1 ] ; then
110 echoscip-shell system . . echo. "*** ERROR: Unix command 'make' not found"
111 CMND_YES=0
112 fi
113
114 if [scip-shell system . . `[`. $CMND_YES = 0 ] ; then
115 echoscip-shell system . . echo. ">>> Please install the missing command(s), and redo the installation."
116 exit 1
117 fi
118 #*************** END: Checking existence of make, time commands *********
119
120
121 # All test modules are in the test directory
122
123 cd test
124 makescip-shell system . . make. clean >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
125
126
127 #*************** START: Checking the C compiler ********************
128 $echo "*** Checking the C compiler...." $SV_NONL
129 rmscip-shell system . . rm. -f testc.o 2>/dev/nullscip-shell filesystem . . `/dev/null`.
130 if (makescip-shell system . . make. testc.o) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
131 then
132 echoscip-shell system . . echo. "OK."
133 else
134 CC=`ed_moptions get CC`
135 while :
136 do
137 echoscip-shell system . . echo. "NOT FOUND."
138 echoscip-shell system . . echo. ""
139 echoscip-shell system . . echo. "ERROR using CC=$CC (or no 'make' command installed)"
140 echoscip-shell system . . echo. "Type the name of your C compiler,"
141 echoscip-shell system . . echo. "or CR to exit."
142 $echo "C compiler: " $SV_NONL
143 unset answ
144 read answ
145 if [scip-shell system . . `[`. -z "$answ" ]; then
146 echoscip-shell system . . echo. "No C compiler -> No MIDAS. Exit."
147 $echo "Type return to exit: " $SV_NONL
148 read return
149 exit 1
150 fi
151 CC="$answ"
152 ed_moptions delete '^CC' >/dev/nullscip-shell filesystem . . `/dev/null`.
153 $echo "*** Checking the C compiler...." $SV_NONL
154 rmscip-shell system . . rm. -f testc.o 2>/dev/nullscip-shell filesystem . . `/dev/null`.
155 if (makescip-shell system . . make. CC="$CC" testc.o)
156 then
157 echoscip-shell system . . echo. "OK."
158 ed_moptions add CC="$CC" >/dev/nullscip-shell filesystem . . `/dev/null`.
159 break
160 fi
161 done
162 fi
163
164 # test, if we include <varargs.h> or <stdarg.h>
165
166 rmscip-shell system . . rm. -f testvar.o 2>/dev/nullscip-shell filesystem . . `/dev/null`.
167 if (makescip-shell system . . make. testvar.o) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
168 then
169 varargs=VARARGS
170 echoscip-shell system . . echo. "*** Use <varargs.h>"
171 else
172 varargs=NOVARARGS
173 echoscip-shell system . . echo. "*** Use <stdarg.h>"
174 fi
175
176 # adapt all potential ftoc_xyz files accordingly
177
178 rmscip-shell system . . rm. -f ./temp.out
179
180 for myfile in amd64 alfa alliant hp hpn hpr pc pc3 sun solaris
181 do
182 incfile=$MID_HOME/incl/ftoc_${myfile}.h
183 chmodscip-shell system . . chmod. +w $incfile
184 if [scip-shell system . . `[`. "$varargs" = "VARARGS" ]; then
185 sedscip-shell system . . sed. 's/stdarg.h/varargs.h/' $incfile > ./temp.out
186 else
187 sedscip-shell system . . sed. 's/varargs.h/stdarg.h/' $incfile > ./temp.out
188 fi
189 mvscip-shell system . . mv. ./temp.out $incfile
190 done
191
192 ed_moptions add "VARARGS=-D$varargs" >/dev/nullscip-shell filesystem . . `/dev/null`.
193
194 # link correct ftoc dir to good-ftoc
195 # and copy relevant .fc files (+ correct y123.for files)
196
197 $MID_INSTALL/install2
198
199
200 #*************** END: Checking the C compiler ********************
201
202 #*************** START: Checking the C linker ********************
203 $echo "*** Checking the C linker...." $SV_NONL
204 rmscip-shell system . . rm. -f testc.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
205 if (makescip-shell system . . make. testc.exe) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
206 then
207 echoscip-shell system . . echo. "OK."
208 else
209 LDCC=`ed_moptions get LDCC`
210 while :
211 do
212 echoscip-shell system . . echo. "NOT FOUND."
213 echoscip-shell system . . echo. ""
214 echoscip-shell system . . echo. "ERROR using LDCC=$LDCC"
215 echoscip-shell system . . echo. "Type the name of your C linker,"
216 echoscip-shell system . . echo. "or CR to exit."
217 $echo "C linker: " $SV_NONL
218 unset answ
219 read answ
220 if [scip-shell system . . `[`. -z "$answ" ]; then
221 echoscip-shell system . . echo. "No C linker no MIDAS. Exit."
222 $echo "Type return to exit: " $SV_NONL
223 read return
224 exit 1
225 fi
226 LDCC="$answ"
227 ed_moptions delete '^LDCC' >/dev/nullscip-shell filesystem . . `/dev/null`.
228 $echo "*** Checking the C linker...." $SV_NONL
229 rmscip-shell system . . rm. -f testc.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
230 if (makescip-shell system . . make. LDCC="$LDCC" testc.exe)
231 then
232 echoscip-shell system . . echo. "OK."
233 ed_moptions add LDCC="$LDCC" >/dev/nullscip-shell filesystem . . `/dev/null`.
234 break
235 fi
236 done
237 fi
238 #*************** END: Checking the C linker *******************
239
240 #*************** START: Checking oserror definition *****************
241 LSYS=""
242 while :
243 do
244 $echo "*** Checking the MIDAS oserror definition...." $SV_NONL
245 rmscip-shell system . . rm. -f oserror.o oserror.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
246 if (makescip-shell system . . make. LSYS="$LSYS" oserror.exe) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
247 then
248 echoscip-shell system . . echo. "OK."
249 if [scip-shell system . . `[`. -n "$LSYS" ] ; then
250 ed_moptions add SYS="$LSYS" >/dev/nullscip-shell filesystem . . `/dev/null`.
251 fi
252 break
253 else
254 if [scip-shell system . . `[`. -z "$LSYS" ]; then
255 echoscip-shell system . . echo. "NOT FOUND."
256 echoscip-shell system . . echo. "*** Trying now with LSYS=-DOSERROR_D option:"
257 LSYS="-DOSERROR_D"
258 else
259 echoscip-shell system . . echo. "NOT FOUND."
260 echoscip-shell system . . echo. "###############################################################"
261 echoscip-shell system . . echo. "# WARNING #"
262 echoscip-shell system . . echo. "# I could not run the following command: #"
263 echoscip-shell system . . echo. "# make LSYS=-DOSERROR_D oserror.exe #"
264 echoscip-shell system . . echo. "# #"
265 echoscip-shell system . . echo. "# For help contact ESO's Midas support: [email protected] #"
266 echoscip-shell system . . echo. "###############################################################"
267 $echo "Type return to exit: " $SV_NONL
268 read return
269 exit 1
270 fi
271 fi
272 done
273 #*************** END: Checking oserror definition *******************
274
275 #************* START: Checking for 32/64bit C compiler *************
276
277 cd $MIDASHOME/$MIDVERS/install/unix/test
278
279 echoscip-shell system . . echo. " "
280
281 X_OPT=`ed_moptions get C_OPT`
282 #echo X_OPT = [$X_OPT]
283
284 # if C_OPT=-O ... skip the "-O" substring
285 ksize=${#X_OPT} #length of X_OPT
286 c2=${X_OPT:0:2} #extract first 2 chars
287 #echo c2 = [$c2]
288 #echo ksize = $ksize
289
290 if [scip-shell system . . `[`. "$c2" = "-O" ]; then #extract chars from 3rd char. on
291 if [scip-shell system . . `[`. $ksize = 2 ]; then
292 X_OPT=" "
293 else
294 cafter=${X_OPT:2:$ksize}
295 X_OPT=$cafter #shift left over the first 2 chars...
296 fi
297 fi
298 #echo now X_OPT = [$X_OPT]
299
300 ed_moptions delete '^F77' >/dev/nullscip-shell filesystem . . `/dev/null`.
301 ed_moptions delete '^LD77_CMD' >/dev/nullscip-shell filesystem . . `/dev/null`.
302 ed_moptions delete '^E_OPT' >/dev/nullscip-shell filesystem . . `/dev/null`.
303 ed_moptions delete '^K_OPT' >/dev/nullscip-shell filesystem . . `/dev/null`.
304 ed_moptions delete '^INSTALL_FLAG' >/dev/nullscip-shell filesystem . . `/dev/null`.
305
306 ed_moptions add "K_OPT= $X_OPT" >/dev/nullscip-shell filesystem . . `/dev/null`.
307 ed_moptions add "INSTALL_FLAG=auto" >/dev/nullscip-shell filesystem . . `/dev/null`.
308
309
310 rmscip-shell system . . rm. -f testsiz.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
311
312 # here we use already the compiler chosen for Midas
313 if ! (makescip-shell system . . make. testsiz.exe) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
314 then
315 echoscip-shell system . . echo. " "
316 echoscip-shell system . . echo. "could not build testsiz.exe"
317 echoscip-shell system . . echo. "check directory $MID_HOME/install/unix/test !!"
318 exit 7
319 fi
320
321 ./testsiz.exe
322
323 #
324 # 32 bit compiler
325 if [scip-shell system . . `[`. $? = 4 ]; then
326 echoscip-shell system . . echo. installing Midas on a 32 bit system
327 MACH=" "
328 EO=" "
329 #
330 # 64 bit compiler
331 else
332 echoscip-shell system . . echo. installing Midas on a 64 bit system
333 MACH=" "
334 EO="-Z"
335 fi
336
•337 ed_moptions add "F77=${F77} $MACH" >/dev/nullscip-shell filesystem . . `/dev/null`.
338 ed_moptions add "LD77_CMD=${F77} $MACH $LDFLAGS" >/dev/nullscip-shell filesystem . . `/dev/null`.
339 #ed_moptions add "LDCC=gcc $LDFLAGS" >/dev/null
340 ed_moptions add "E_OPT= $EO" >/dev/nullscip-shell filesystem . . `/dev/null`.
341
342
343 #if [ $? = 4 ]; then
344 # echo installing Midas on a 32 bit system
345 # ed_moptions add "F77=gfortran" >/dev/null
346 # ed_moptions add "LD77_CMD=gfortran" >/dev/null
347 # ed_moptions add "C_OPT=-O -fPIC $X_OPT" >/dev/null
348 # ed_moptions add "K_OPT=-fPIC $X_OPT" >/dev/null
349 # ed_moptions add "E_OPT= " >/dev/null
350 # ed_moptions add "INSTALL_FLAG=auto" >/dev/null
351 #else
352 # echo installing Midas on a 64 bit system
353 # ed_moptions add "F77=gfortran -m64" >/dev/null
354 # ed_moptions add "LD77_CMD=gfortran -m64" >/dev/null
355 # ed_moptions add 'C_OPT=-m64 -O -fPIC $X_OPT' >/dev/null
356 # ed_moptions add "K_OPT=-m64 -fPIC $X_OPT" >/dev/null
357 # ed_moptions add "E_OPT=-Z" >/dev/null
358 # ed_moptions add "INSTALL_FLAG=auto" >/dev/null
359 #fi
360
361 echoscip-shell system . . echo. " "
362
363 #*************** END: Checking 32/64bit C compiler ****************
364
365
366 #*************** START: Checking the Fortran compiler ********************
367 $echo "*** Checking the Fortran compiler...." $SV_NONL
368 rmscip-shell system . . rm. -f testf.o 2>/dev/nullscip-shell filesystem . . `/dev/null`.
369 if (makescip-shell system . . make. testf.o) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
370 then
371 echoscip-shell system . . echo. "OK."
372 else
373 F77=`ed_moptions get F77`
374 while :
375 do
376 echoscip-shell system . . echo. "NOT FOUND."
377 echoscip-shell system . . echo. ""
378 echoscip-shell system . . echo. "ERROR using F77=$F77"
379 echoscip-shell system . . echo. "Type the name of your Fortran compiler,"
380 echoscip-shell system . . echo. "or CR to exit."
381 $echo "Fortran compiler: " $SV_NONL
382 unset answ
383 read answ
384 if [scip-shell system . . `[`. -z "$answ" ]; then
385 echoscip-shell system . . echo. "No Fortran compiler -> No MIDAS. Exit."
386 $echo "Type return to exit: " $SV_NONL
387 read return
388 exit 1
389 fi
390 F77="$answ"
391 ed_moptions delete '^F77' >/dev/nullscip-shell filesystem . . `/dev/null`.
392 $echo "*** Checking the Fortran compiler...." $SV_NONL
393 rmscip-shell system . . rm. -f testf.o 2>/dev/nullscip-shell filesystem . . `/dev/null`.
394 if (makescip-shell system . . make. F77="$F77" testf.o)
395 then
396 echoscip-shell system . . echo. "OK."
397 ed_moptions add F77="$F77" >/dev/nullscip-shell filesystem . . `/dev/null`.
398 break
399 fi
400 done
401 fi
402 #*************** END: Checking the Fortran compiler ********************
403
404 #*************** START: Checking the Fortran linker ********************
405 $echo "*** Checking the Fortran linker...." $SV_NONL
406 rmscip-shell system . . rm. -f testf.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
407 if (makescip-shell system . . make. testf.exe) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
408 then
409 echoscip-shell system . . echo. "OK."
410 else
411 LD77_CMD=`ed_moptions get LD77_CMD`
412 while :
413 do
414 echoscip-shell system . . echo. "NOT FOUND."
415 echoscip-shell system . . echo. ""
416 echoscip-shell system . . echo. "ERROR using LD77_CMD=$LD77_CMD"
417 echoscip-shell system . . echo. "Type the name of your Fortran linker,"
418 echoscip-shell system . . echo. "or CR to exit."
419 $echo "Fortran linker: " $SV_NONL
420 unset answ
421 read answ
422 if [scip-shell system . . `[`. -z "$answ" ]; then
423 echoscip-shell system . . echo. "No Fortran linker no MIDAS. Exit."
424 $echo "Type return to exit: " $SV_NONL
425 read return
426 exit 1
427 fi
428 LD77_CMD="$answ"
429 ed_moptions delete '^LD77_CMD' >/dev/nullscip-shell filesystem . . `/dev/null`.
430 $echo "*** Checking the Fortran linker...." $SV_NONL
431 rmscip-shell system . . rm. -f testf.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
432 if (makescip-shell system . . make. LD77_CMD="$LD77_CMD" testf.exe)
433 then
434 echoscip-shell system . . echo. "OK."
435 ed_moptions add LD77_CMD="$LD77_CMD" >/dev/nullscip-shell filesystem . . `/dev/null`.
436 break
437 fi
438 done
439 fi
440 #*************** END: Checking the Fortran linker *******************
441
442 #*************** START: Checking math routines *****************
443 $echo "*** Checking some standard math routines...." $SV_NONL
444 rmscip-shell system . . rm. -f mathc.o mathf.o math.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
445 ## if (make math.exe) >/dev/null 2>&1
446 if (makescip-shell system . . make. math.exe)
447 then
448 echoscip-shell system . . echo. "OK."
449 else
450 echoscip-shell system . . echo. "mathlib NOT FOUND."
451 echoscip-shell system . . echo. "*** Trying now with -lm option:"
452 SLIB_ORG=`ed_moptions delete '^SLIB'`
453 SLIB=`eval echo $SLIB_ORG -lm`
454 $echo "*** Checking some standard math routines...." $SV_NONL
455 rmscip-shell system . . rm. -f math.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
456 if (makescip-shell system . . make. SLIB="$SLIB" math.exe) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
457 then
458 ed_moptions add SLIB="$SLIB" >/dev/nullscip-shell filesystem . . `/dev/null`.
459 echoscip-shell system . . echo. "OK."
460 else
461 ed_moptions add SLIB="$SLIB_ORG" >/dev/nullscip-shell filesystem . . `/dev/null`.
462 echoscip-shell system . . echo. "mathlib NOT FOUND."
463 echoscip-shell system . . echo. "###############################################################"
464 echoscip-shell system . . echo. "# WARNING #"
465 echoscip-shell system . . echo. "# I could not run the following commands: #"
466 echoscip-shell system . . echo. "# make math.exe #"
467 echoscip-shell system . . echo. "# make SLIB=$SLIB math.exe #"
468 echoscip-shell system . . echo. "# a) probably the mathematical library libm.a is not found - #"
469 echoscip-shell system . . echo. "# edit the file $MID_HOME/local/make_options #"
470 echoscip-shell system . . echo. "# and set SLIB=<new libm.a path>. #"
471 echoscip-shell system . . echo. "# b) or if this happens on a Mac - #"
472 echoscip-shell system . . echo. "# maybe you have non-matching C compiler (gcc) and #"
473 echoscip-shell system . . echo. "# Fortran frontend (gfortran). #"
474 echoscip-shell system . . echo. "# E.g. 64bit C compiler and 32bit Fortran, in that case #"
475 echoscip-shell system . . echo. "# set in /midas/version/local/make_options: #"
476 echoscip-shell system . . echo. "# F77=gfortran -m64 #"
477 echoscip-shell system . . echo. "# LD77_CMD77=gfortran -m64 #"
478 echoscip-shell system . . echo. "# #"
479 echoscip-shell system . . echo. "# For help contact ESO's Midas support: [email protected] #"
480 echoscip-shell system . . echo. "###############################################################"
481 $echo "Type return to exit: " $SV_NONL
482 read return
483 exit 1
484 fi
485 fi
486 #*************** END: Checking math routines *******************
487
488 #*************** START: Checking the ln command *************
489 ed_moptions delete '^LN' >/dev/nullscip-shell filesystem . . `/dev/null`.
490 rmscip-shell system . . rm. -f aaa bbb 2>/dev/nullscip-shell filesystem . . `/dev/null`.
491 touchscip-shell system . . touch. aaa
492 $echo "*** Checking the ln command...." $SV_NONL
493 if (lnscip-shell system . . ln. -s aaa bbb ) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
494 then
495 echoscip-shell system . . echo. "(soft) OK."
496 else
497 if (lnscip-shell system . . ln. aaa bbb ) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
498 then
499 echoscip-shell system . . echo. "(hard) OK."
500 echoscip-shell system . . echo. "*** LN set to ln."
501 ed_moptions add LN="ln" >/dev/nullscip-shell filesystem . . `/dev/null`.
502 else
503 echoscip-shell system . . echo. "NOT FOUND."
504 echoscip-shell system . . echo. "###############################################################"
505 echoscip-shell system . . echo. "# WARNING #"
506 echoscip-shell system . . echo. "# I could neither set the hard nor symbolic link between #"
507 echoscip-shell system . . echo. "# files: ln -s aaa bbb #"
508 echoscip-shell system . . echo. "# ln aaa bbb #"
509 echoscip-shell system . . echo. "# Probably the command is not found or its path not included #"
510 echoscip-shell system . . echo. "# in the PATH variable. Without this command makefiles in #"
511 echoscip-shell system . . echo. "# proc and help directories will fail #"
512 echoscip-shell system . . echo. "# #"
513 echoscip-shell system . . echo. "# For help contact ESO's Midas support: [email protected] #"
514 echoscip-shell system . . echo. "###############################################################"
515 $echo "Type return to exit: " $SV_NONL
516 read return
517 exit 1
518 fi
519 fi
520 #*************** END: Checking the ln command **************
521
522 #*************** START: Checking the strip command *************
523 ed_moptions delete '^STRIP' >/dev/nullscip-shell filesystem . . `/dev/null`.
524 $echo "*** Checking the strip command...." $SV_NONL
525 before=`duscip-shell system . . du. -s testc.exe | awkscip-shell system . . awk. '{print $1}'`
526 if (stripscip-shell system . . strip. testc.exe) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
527 then
528 now=`duscip-shell system . . du. -s testc.exe | awkscip-shell system . . awk. '{print $1}'`
529 if [scip-shell system . . `[`. "$before" != "$now" ]; then
530 echoscip-shell system . . echo. "OK."
531 else
532 echoscip-shell system . . echo. "NOT STRIPPED."
533 echoscip-shell system . . echo. "*** STRIP set to echo."
534 ed_moptions add STRIP=echo >/dev/nullscip-shell filesystem . . `/dev/null`.
535 fi
536 else
537 echoscip-shell system . . echo. "NOT FOUND."
538 fi
539 echoscip-shell system . . echo. "*** STRIP set to echo."
540 ed_moptions add STRIP=echo >/dev/nullscip-shell filesystem . . `/dev/null`.
541 #*************** END: Checking the strip command **************
542
543 #*************** START: Checking the ranlib command ***********
544 ed_moptions delete '^RANLIB' >/dev/nullscip-shell filesystem . . `/dev/null`.
545 $echo "*** Checking the ranlib command...." $SV_NONL
546 rmscip-shell system . . rm. -f testlib.a 2>/dev/nullscip-shell filesystem . . `/dev/null`.
547 if (makescip-shell system . . make. testlib.a) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
548 then
549 before=`sumscip-shell system . . sum. testlib.a | awkscip-shell system . . awk. '{print $1}'`
550 sleepscip-shell system . . sleep. 1
551 if (ranlibscip-shell system . . ranlib. testlib.a) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
552 then
553 now=`sumscip-shell system . . sum. testlib.a | awkscip-shell system . . awk. '{print $1}'`
554 if [scip-shell system . . `[`. "$before" != "$now" ]; then
555 echoscip-shell system . . echo. "OK."
556 else
557 echoscip-shell system . . echo. "NO EFFECT."
558 echoscip-shell system . . echo. "*** RANLIB set to echo."
559 ed_moptions replace RANLIB=echo >/dev/nullscip-shell filesystem . . `/dev/null`.
560 fi
561 else
562 echoscip-shell system . . echo. "NOT FOUND."
563 echoscip-shell system . . echo. "*** RANLIB set to echo"
564 ed_moptions replace RANLIB=echo >/dev/nullscip-shell filesystem . . `/dev/null`.
565 fi
566 fi
567 #*************** END: Checking the ranlib command **************
568
569 #*************** START: Checking the ncurses development library *********
570 x11incl=""
571 $echo "*** Checking ncurses development library...." $SV_NONL
572
573 rmscip-shell system . . rm. -f testncurs.o 2>/dev/nullscip-shell filesystem . . `/dev/null`.
574 if (makescip-shell system . . make. testncurs.exe) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
575 then
576 echoscip-shell system . . echo. "OK."
577 ed_moptions replace "EDITSWITCH=-DEdit_dummy" >/dev/nullscip-shell filesystem . . `/dev/null`.
578 ed_moptions replace "EDITLIBS=-lreadline -lncurses" >/dev/nullscip-shell filesystem . . `/dev/null`.
579 else
580 echoscip-shell system . . echo. "Not found."
581 echoscip-shell system . . echo. "*** WARNING: You'll not be able to edit Midas commands in the monitor."
582
583 unset answ
584 if [scip-shell system . . `[`. "$1" != "-a" ]; then #interactive mode
585 echoscip-shell system . . echo. "*** If that's o.k., just continue."
586 echoscip-shell system . . echo. "*** Otherwise, quit and install first this development library."
587 echoscip-shell system . . echo. "*** Type 'c' or q' (without ') to continue or quit: " $SV_NONL
588 read answ
589 if [scip-shell system . . `[`. -z "$answ" ]; then #by default continue
590 answ="c"
591 fi
592 else #always continue for autoconfigure
593 answ="c"
594 fi
595
596 if [scip-shell system . . `[`. $answ = "c" -o $answ = "C" ]; then
597 ed_moptions replace "EDITSWITCH=-DNO_READLINE" >/dev/nullscip-shell filesystem . . `/dev/null`.
598 ed_moptions replace "EDITLIBS=-lreadline" >/dev/nullscip-shell filesystem . . `/dev/null`.
599 else
600 exit 1
601 fi
602 fi
603 #
604 #*************** END: Checking the ncurses development library ***********
605
606 #*************** START: Checking the X11 include directory *********
607 x11incl=""
608 $echo "*** Checking X11 include directory...." $SV_NONL
609 #
610 rmscip-shell system . . rm. -f testx11.o 2>/dev/nullscip-shell filesystem . . `/dev/null`.
611 if (makescip-shell system . . make. LSYS=-DONLY_INCLUDES testx11.o) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
612 then
613 echoscip-shell system . . echo. "OK."
614 x11incl="found"
615 else
616 ed_moptions delete '^X11INC' >/dev/nullscip-shell filesystem . . `/dev/null`.
617 x11inclpth='/usr/include/X11 /usr/include/X11R6 /usr/include/X11R5 /usr/X11R6/include /usr/X11R6/include/X11 /usr/X11R5/include /usr/local/include /include /usr/X/include /opt/X-local/includescip-shell filesystem . . `/usr/include/X11 /usr/include/X11R6 /usr/include/X11R5 /usr/X11R6/include /usr/X11R6/include/X11 /usr/X11R5/include /usr/local/include /include /usr/X/include /opt/X-local/include`.'
618 for dir in $x11inclpth
619 do
620 if [scip-shell system . . `[`. ! -d $dir ]; then
621 continue
622 fi
623 X11INC="X11INC=-I$dir"
624 rmscip-shell system . . rm. -f testx11.o 2>/dev/nullscip-shell filesystem . . `/dev/null`.
625 if (makescip-shell system . . make. "$X11INC" LSYS=-DONLY_INCLUDES testx11.o) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
626 then
627 echoscip-shell system . . echo. "OK."
628 ed_moptions add "$X11INC" >/dev/nullscip-shell filesystem . . `/dev/null`.
629 x11incl="found"
630 break;
631 fi
632 done
633 fi
634 #
635 # The X11 include file was not found in $x11inclpth, so ask the operator
636 # where it could be.
637 #
638 if [scip-shell system . . `[`. "$x11incl" != "found" ]; then
639 echoscip-shell system . . echo. "NOT FOUND."
640 echoscip-shell system . . echo. ""
641 echoscip-shell system . . echo. "*** WARNING: X11 include directory not found."
642 echoscip-shell system . . echo. "*** I checked in paths:"
643 echoscip-shell system . . echo. "$x11inclpth"
644 while :
645 do
646 echoscip-shell system . . echo. "":
647 echoscip-shell system . . echo. "Type the full pathname for the X11 include directory,"
648 echoscip-shell system . . echo. "or CR if you do not have any."
649 while :
650 do
651 $echo "Pathname: " $SV_NONL
652 unset answ
653 read answ
654 if [scip-shell system . . `[`. -z "$answ" -o -d "$answ" ]; then
655 break
656 else
657 echoscip-shell system . . echo. "$answ no such directory."
658 continue
659 fi
660 done
661 if [scip-shell system . . `[`. -z "$answ" ]; then
662 echoscip-shell system . . echo. "*** WARNING: MIDAS will be installed without X11."
663 break
664 fi
665 $echo "*** Checking X11 include files...." $SV_NONL
666 rmscip-shell system . . rm. -f testx11.o 2>/dev/nullscip-shell filesystem . . `/dev/null`.
667 answ=`echoscip-shell system . . echo. $answ | sedscip-shell system . . sed. -e 's/[^\/]*$//' -e 's/^$/./' -e 's/\/$//'`
668 X11INC="X11INC=-I$answ"
669 if (makescip-shell system . . make. "$X11INC" LSYS=-DONLY_INCLUDES testx11.o)
670 then
671 echoscip-shell system . . echo. "OK."
672 ed_moptions add "$X11INC" >/dev/nullscip-shell filesystem . . `/dev/null`.
673 x11incl="found"
674 break
675 else
676 echoscip-shell system . . echo. "NOT FOUND."
677 fi
678 done
679 fi
680 #*************** END: Checking the X11 include directory ***********
681
682 #*************** START: Checking the X11 libraries ***************
683 # Run this check only if include directory was found previosly
684 #
685 if [scip-shell system . . `[`. "$x11incl" = "found" ]; then
686 #
687 x11lib=""
688 $echo "*** Checking X11 libraries...." $SV_NONL
689 rmscip-shell system . . rm. -f testx11.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
690 if (makescip-shell system . . make. testx11.exe) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
691 then
692 X11RELEASE=`./testx11.exe`
693 echoscip-shell system . . echo. "OK."
694 echoscip-shell system . . echo. "*** X11 release $X11RELEASE found."
695 x11lib="found"
696 else
697 ed_moptions delete '^X11_LIBPATH' >/dev/nullscip-shell filesystem . . `/dev/null`.
698 x11libpth='/lib /usr/lib /usr/local/lib /usr/openwin/lib /usr/lib/X11R6 /usr/lib/X11R5 /usr/X11R6/lib64 /usr/X11R6/lib /usr/X11R5/lib /usr/lib/Motif1.2 /usr/X/lib /usr/X11/lib /usr/lpp/X11/lib /usr/lib/Motif1.1 /opt/X-local/libscip-shell filesystem . . `/lib /usr/lib /usr/local/lib /usr/openwin/lib /usr/lib/X11R6 /usr/lib/X11R5 /usr/X11R6/lib64 /usr/X11R6/lib /usr/X11R5/lib /usr/lib/Motif1.2 /usr/X/lib /usr/X11/lib /usr/lpp/X11/lib /usr/lib/Motif1.1 /opt/X-local/lib`.'
699 for dir in $x11libpth
700 do
701 if [scip-shell system . . `[`. ! -d $dir ]; then
702 continue
703 fi
704 X11_LIBPATH="X11_LIBPATH=-L$dir"
705 rmscip-shell system . . rm. -f testx11.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
706 if (makescip-shell system . . make. "$X11_LIBPATH" testx11.exe) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
707 then
708 X11RELEASE=`./testx11.exe`
709 echoscip-shell system . . echo. "OK."
710 echoscip-shell system . . echo. "*** X11 release $X11RELEASE found."
711 ed_moptions add "$X11_LIBPATH" >/dev/nullscip-shell filesystem . . `/dev/null`.
712 x11lib="found"
713 break
714 fi
715 done
716 fi
717 #
718 # The X11/Xt libraries not found in $x11libpth, so ask the operator
719 # where it could be.
720 #
721 if [scip-shell system . . `[`. "$x11lib" != "found" ]; then
722 echoscip-shell system . . echo. "NOT FOUND."
723 echoscip-shell system . . echo. "*** WARNING: X11 library not found."
724 echoscip-shell system . . echo. "*** I checked in paths:"
725 echoscip-shell system . . echo. "$x11libpth"
726 while :
727 do
728 echoscip-shell system . . echo. ""
729 echoscip-shell system . . echo. "Type the full pathname for the directory containing the X11 library,"
730 echoscip-shell system . . echo. "or CR if you do not have any."
731 while :
732 do
733 $echo "Pathname: " $SV_NONL
734 unset answ
735 read answ
736 if [scip-shell system . . `[`. -z "$answ" -o -d "$answ" ]; then
737 break
738 else
739 echoscip-shell system . . echo. "$answ no such directory."
740 continue
741 fi
742 done
743 if [scip-shell system . . `[`. -z "$answ" ]; then
744 echoscip-shell system . . echo. "*** WARNING: MIDAS will be installed without X11."
745 break
746 fi
747 X11_LIBPATH="X11_LIBPATH=-L$answ"
748 $echo "*** Checking X11 libraries...." $SV_NONL
749 rmscip-shell system . . rm. -f testx11.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
750 if (makescip-shell system . . make. "$X11_LIBPATH" testx11.exe)
751 then
752 X11RELEASE=`./testx11.exe`
753 echoscip-shell system . . echo. "OK."
754 echoscip-shell system . . echo. "*** X11 release $X11RELEASE found."
755 ed_moptions add "$X11_LIBPATH" >/dev/nullscip-shell filesystem . . `/dev/null`.
756 break
757 else
758 echoscip-shell system . . echo. "NOT FOUND."
759 fi
760 done
761 fi
762 fi
763 #*************** END: Checking the X11 library *******************
764
765 if [scip-shell system . . `[`. "$X11RELEASE" = "4" ]; then
766 MOTIF_RELEASE1="1001"
767 MOTIF_RELEASE2="1001"
768 MOTIF_RELEASE3="1001"
769 MOTIF_RELEASE4="1001"
770 MOTIF_RELEASE5="1001"
771 echoscip-shell system . . echo. "*** Motif release 1.1 ($MOTIF_RELEASE1) expected."
772 elif [scip-shell system . . `[`. "$X11RELEASE" = "5" ]; then
773 MOTIF_RELEASE1="1002"
774 MOTIF_RELEASE2="1002"
775 MOTIF_RELEASE3="1002"
776 MOTIF_RELEASE4="1002"
777 MOTIF_RELEASE5="1002"
778 echoscip-shell system . . echo. "*** Motif release 1.2 ($MOTIF_RELEASE1) expected."
779 elif [scip-shell system . . `[`. "$X11RELEASE" = "6" ]; then
780 MOTIF_RELEASE1="2000"
781 MOTIF_RELEASE2="2001"
782 MOTIF_RELEASE3="2002"
783 MOTIF_RELEASE4="2003"
784 # apparently used in Alpha/OSF4 in combination with X11 release 6
785 MOTIF_RELEASE5="1002"
786 echoscip-shell system . . echo. "*** Motif release 2.0 ($MOTIF_RELEASE1) expected."
787 else
788 X11RELEASE="UNKNOWN"
789 MOTIF_RELEASE1="UNKNOWN"
790 echoscip-shell system . . echo. "*** WARNING: X11 release 4, 5 or 6 expected"
791 fi
792
793 #*************** START: Checking the Motif include directory *********
794 if [scip-shell system . . `[`. "$x11incl" = "found" -a "$x11lib" = "found" ]; then
795 xmincl=""
796 $echo "*** Checking Motif Xm include directory...." $SV_NONL
797 #
798 rmscip-shell system . . rm. -f testxm.o motif_rel.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
799 if (makescip-shell system . . make. LSYS=-DONLY_INCLUDES motif_rel.exe) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
800 then
801 xmincl="found"
802 MOTIFRELEASE=`./motif_rel.exe`
803 fi
804 if [scip-shell system . . `[`. "$xmincl" = "found" -a \( "$MOTIFRELEASE" = "$MOTIF_RELEASE1" -o "$MOTIFRELEASE" = "$MOTIF_RELEASE2" -o "$MOTIFRELEASE" = "$MOTIF_RELEASE3" -o "$MOTIFRELEASE" = "$MOTIF_RELEASE4" -o "$MOTIFRELEASE" = "$MOTIF_RELEASE5" \) ]; then
805 echoscip-shell system . . echo. "OK."
806 echoscip-shell system . . echo. "*** Motif release $MOTIFRELEASE found."
807 else
808 xmincl=""
809 ed_moptions delete '^XMINC' >/dev/nullscip-shell filesystem . . `/dev/null`.
810 xminclpth='/usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/include/X11 /usr/include/Xm /usr/include/Motif1.2 usr/include/Motif1.1 /usr/local/include /include /usr/X/include /usr/X11/include /usr/X11R5/include /usr/X11R6/include /usr/dt/include /sw/include /sw/libscip-shell filesystem . . `/usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/include/X11 /usr/include/Xm /usr/include/Motif1.2 usr/include/Motif1.1 /usr/local/include /include /usr/X/include /usr/X11/include /usr/X11R5/include /usr/X11R6/include /usr/dt/include /sw/include /sw/lib`.'
811 for dir in $xminclpth
812 do
813 if [scip-shell system . . `[`. ! -d $dir ]; then
814 continue
815 fi
816 XMINC="XMINC=-I$dir"
817 rmscip-shell system . . rm. -f testxm.o motif_rel.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
818 if (makescip-shell system . . make. "$XMINC" LSYS=-DONLY_INCLUDES motif_rel.exe) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
819 then
820 xmincl="found"
821 MOTIFRELEASE=`./motif_rel.exe`
822 fi
823 if [scip-shell system . . `[`. "$xmincl" = "found" -a \( "$MOTIFRELEASE" = "$MOTIF_RELEASE1" -o "$MOTIFRELEASE" = "$MOTIF_RELEASE2" -o "$MOTIFRELEASE" = "$MOTIF_RELEASE3" -o "$MOTIFRELEASE" = "$MOTIF_RELEASE4" -o "$MOTIFRELEASE" = "$MOTIF_RELEASE5" \) ]; then
824 echoscip-shell system . . echo. "OK."
825 echoscip-shell system . . echo. "*** Motif release $MOTIFRELEASE found."
826 ed_moptions add "$XMINC" >/dev/nullscip-shell filesystem . . `/dev/null`.
827 xmincl="found"
828 break;
829 else
830 xmincl=""
831 fi
832 done
833 fi
834 #
835 # The Motif include file not found in $xminclpth, so ask the operator
836 # where it could be.
837 #
838 if [scip-shell system . . `[`. "$xmincl" != "found" ]; then
839 echoscip-shell system . . echo. "NOT FOUND."
840 echoscip-shell system . . echo. ""
841 echoscip-shell system . . echo. "*** WARNING: Motif release $MOTIF_RELEASE1 include directory Xm not found."
842 echoscip-shell system . . echo. "*** I checked in paths:"
843 echoscip-shell system . . echo. "$xminclpth"
844 while :
845 do
846 echoscip-shell system . . echo. ""
847 echoscip-shell system . . echo. "Type the full pathname for the Motif release $MOTIF_RELEASE1 include directory, e.g. /sw/include/"
848 echoscip-shell system . . echo. "or CR if you do not have any."
849 while :
850 do
851 $echo "Pathname: " $SV_NONL
852 unset answ
853 read answ
854 if [scip-shell system . . `[`. -z "$answ" -o -d "$answ" ]; then
855 break
856 else
857 echoscip-shell system . . echo. "$answ no such directory."
858 continue
859 fi
860 done
861 if [scip-shell system . . `[`. -z "$answ" ]; then
862 echoscip-shell system . . echo. "*** WARNING: MIDAS will be installed without Motif applications."
863 break
864 fi
865 $echo "*** Checking Motif include files...." $SV_NONL
866 rmscip-shell system . . rm. -f testxm.o motif_rel.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
867 answ=`echoscip-shell system . . echo. $answ | sedscip-shell system . . sed. -e 's/[^\/]*$//' -e 's/^$/./' -e 's/\/$//'`
868 XMINC="XMINC=-I$answ"
869 if (makescip-shell system . . make. "$XMINC" LSYS=-DONLY_INCLUDES motif_rel.exe)
870 then
871 xmincl="found"
872 MOTIFRELEASE=`./motif_rel.exe`
873 fi
874 if [scip-shell system . . `[`. "$xmincl" = "found" -a \( "$MOTIFRELEASE" = "$MOTIF_RELEASE1" -o "$MOTIFRELEASE" = "$MOTIF_RELEASE2" -o "$MOTIFRELEASE" = "$MOTIF_RELEASE3" -o "$MOTIFRELEASE" = "$MOTIF_RELEASE4" -o "$MOTIFRELEASE" = "$MOTIF_RELEASE5" \) ]; then
875 echoscip-shell system . . echo. "OK."
876 echoscip-shell system . . echo. "*** Motif release $MOTIFRELEASE found."
877 ed_moptions add "$XMINC" >/dev/nullscip-shell filesystem . . `/dev/null`.
878 xmincl="found"
879 break
880 else
881 xmincl=""
882 echoscip-shell system . . echo. "NOT FOUND."
883 fi
884 done
885 fi
886 fi
887 #*************** END: Checking the Motif include directory ***********
888
889 #*************** START: Checking the Motif library ***************
890 # Run this check only if include directory was found previosly
891 #
892 if [scip-shell system . . `[`. "$xmincl" = "found" ]; then
893 #
894 xmlib=""
895 $echo "*** Checking Motif library...." $SV_NONL
896 rmscip-shell system . . rm. -f testxm.o testxm.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
897 if (makescip-shell system . . make. testxm.exe) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
898 then
899 echoscip-shell system . . echo. "OK."
900 xmlib="found"
901 else
902 ed_moptions delete '^MOTIF_LIBPATH' >/dev/nullscip-shell filesystem . . `/dev/null`.
903 xmlibpth='/lib /usr/lib /usr/local/lib /usr/dt/lib /usr/lib/X11R6 /usr/lib/X11/R5 /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11/R4 /usr/lib/Motif1.2 /usr/X/lib /usr/X11/lib /usr/lpp/X11/lib /usr/lib/Motif1.1scip-shell filesystem . . `/lib /usr/lib /usr/local/lib /usr/dt/lib /usr/lib/X11R6 /usr/lib/X11/R5 /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11/R4 /usr/lib/Motif1.2 /usr/X/lib /usr/X11/lib /usr/lpp/X11/lib /usr/lib/Motif1.1`.'
904 for dir in $xmlibpth
905 do
906 if [scip-shell system . . `[`. ! -d $dir ]; then
907 continue
908 fi
909 MOTIF_LIBPATH="MOTIF_LIBPATH=-L$dir"
910 rmscip-shell system . . rm. -f testxm.o testxm.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
911 if (makescip-shell system . . make. "$MOTIF_LIBPATH" testxm.exe) >/dev/nullscip-shell filesystem . . `/dev/null`. 2>&1
912 then
913 echoscip-shell system . . echo. "OK."
914 ed_moptions add "$MOTIF_LIBPATH" >/dev/nullscip-shell filesystem . . `/dev/null`.
915 xmlib="found"
916 break
917 fi
918 done
919 fi
920 #
921 # The Xm library not found in $x11libpth, so ask the operator
922 # where it could be.
923 #
924 if [scip-shell system . . `[`. "$xmlib" != "found" ]; then
925 echoscip-shell system . . echo. "NOT FOUND."
926 echoscip-shell system . . echo. "*** WARNING: Motif library release $MOTIF_RELEASE not found."
927 echoscip-shell system . . echo. "*** I checked in paths:"
928 echoscip-shell system . . echo. "$xmlibpth"
929 while :
930 do
931 echoscip-shell system . . echo. "Type the full pathname for the directory containing the Motif library, e.g. /sw/lib/"
932 echoscip-shell system . . echo. "or CR if you do not have any."
933 while :
934 do
935 $echo "Pathname: " $SV_NONL
936 unset answ
937 read answ
938 if [scip-shell system . . `[`. -z "$answ" -o -d "$answ" ]; then
939 break
940 else
941 echoscip-shell system . . echo. "$answ no such directory."
942 continue
943 fi
944 done
945 if [scip-shell system . . `[`. -z "$answ" ]; then
946 echoscip-shell system . . echo. "*** WARNING: MIDAS will be installed without Motif applications."
947 break
948 fi
949 MOTIF_LIBPATH="MOTIF_LIBPATH=-L$answ"
950 $echo "*** Checking Motif library...." $SV_NONL
951 rmscip-shell system . . rm. -f testxm.exe 2>/dev/nullscip-shell filesystem . . `/dev/null`.
952 if (makescip-shell system . . make. "$MOTIF_LIBPATH" testxm.exe)
953 then
954 echoscip-shell system . . echo. "OK."
955 ed_moptions add "$MOTIF_LIBPATH" >/dev/nullscip-shell filesystem . . `/dev/null`.
956 break
957 else
958 echoscip-shell system . . echo. "NOT FOUND."
959 fi
960 done
961 fi
962 fi
963 #*************** END: Checking the Motif library *******************
964
965 #
966 # Default UIMX=uimxR4 in default.mk
967 # Set UIMX=uimxR5 in make_options if X11RELEASE=5
968 #
969 if [scip-shell system . . `[`. "$X11RELEASE" = "5" -o "$X11RELEASE" = "6" ]; then
970 ed_moptions delete '^UIMX' >/dev/nullscip-shell filesystem . . `/dev/null`.
971 ed_moptions add "UIMX=uimxR5" >/dev/nullscip-shell filesystem . . `/dev/null`.
972 fi
973
974 #*************** for manually edited MAKE_OPTIONS ***************
975
976 if [scip-shell system . . `[`. $INSTALL_FLAG = "own" ] ; then
977 ed_moptions delete '^INSTALL_FLAG' >/dev/nullscip-shell filesystem . . `/dev/null`.
978 ed_moptions add "INSTALL_FLAG=user-choice" >/dev/nullscip-shell filesystem . . `/dev/null`.
979 echoscip-shell system . . echo. " "
980 echoscip-shell system . . echo. "------------------------------------------------------------"
981 echoscip-shell system . . echo. "=== now, you can edit $MID_HOME/local/make_options"
982 echoscip-shell system . . echo. "=== and adapt it to your special needs"
983 echoscip-shell system . . echo. "=== to continue, use step 67 of the config script"
984 echoscip-shell system . . echo. "------------------------------------------------------------"
985 echoscip-shell system . . echo. " "
986 exit 0
987 fi
988
989 # ******** now the actual installation (in background) *********
990
991 export SV_NONL CMND_YES
992 $MID_INSTALL/install3 $1
993 exit 0
994
995