File: Configure

package info (click to toggle)
ncl 6.2.0-3
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 194,248 kB
  • ctags: 70,659
  • sloc: ansic: 596,448; fortran: 439,513; sed: 11,221; csh: 8,350; yacc: 4,253; xml: 1,928; sh: 1,526; lex: 1,266; python: 1,067; f90: 641; perl: 479; java: 447; objc: 291; makefile: 104
file content (1455 lines) | stat: -rwxr-xr-x 40,521 bytes parent folder | download | duplicates (3)
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
#!/bin/csh -f
#
#      $Id: Configure,v 1.58.2.1 2010-05-02 16:55:13 haley Exp $
#
#########################################################################
#																		#
#			   Copyright (C)  1994										#
#	     University Corporation for Atmospheric Research				#
#			   All Rights Reserved										#
#########################################################################
#
#	File:		Configure		
#
#	Author:		Jeff W. Boote
#				National Center for Atmospheric Research
#				POB 3000, Boulder, Colorado
#
#	$Date: 2010-05-02 16:55:13 $
#
#	Description:	I took pieces of the old configure script to
#					build this one.

onintr cleanup

set cmd = $0
set cmddir = ${cmd:h}
set cmdname = ${cmd:t}
if (($cmddir != $cmdname) && ($cmddir != ".")) then
	echo "Must be at top of NCARG source tree."
	echo "cd to $cmddir and try again."
	goto cleanup
endif

if ((! -d config) || (! -x config/ymkmf)) then
	echo "Where is the config/ymkmf program???"
	echo "It should be at ./config/ymkmf"
	goto cleanup
endif

set ymkmfcmd=./config/ymkmf

if ($#argv > 0) then
	while ($#argv)
		switch($argv[1])
		case "-debug":
			set verbose
			breaksw
		case "-v":
			set verbose_option
			breaksw
		case "-ncar":
			set ncar_option
			breaksw
		default:
			echo "Error: Unknown command-line argument."
			exit 1
			breaksw
		endsw
		shift
	end
endif

foreach dir ($path)
	if (-x $dir/make) then
		set makecmd=$dir/make
		break
	endif
end

if (! $?makecmd) then
	echo "This Configure Script depends upon the 'make' program."
	echo "It doesn't appear to be available.  Please check your PATH"
	echo "and restart this script."
	goto cleanup
endif

foreach dir ($path)
	if (-x $dir/makedepend) then
		set makedependcmd=$dir/makedepend
		break
	endif
end

if(! $?makedependcmd) set nomakedepend

if (-e ./config/Site.local) then
	echo "	*** WARNING:There is a previous configuration saved."
	echo ""
	echo "Overwrite existing configuration? (n)"
	echo -n "Enter Return(default), y(yes), n(no), or q(quit) > "
	set answer="$<"
	if ("$answer" == "q") goto cleanup
	if ("$answer" == "y") then
		if ($?ncar_option) then
			rm ./config/Site.local
		endif
		goto overwrite
	endif
	goto shortcut
endif

overwrite:

if ($?ncar_option) goto shortcut

onintr extra_cleanup

echo "/* Default Config */" > config/Site.local
echo "#define EmptySite" >> config/Site.local
if ($?nomakedepend) echo "#define NoMakeDepend" >> config/Site.local

echo ""
echo "Building top-level Makefile to determine System defaults"
echo ""
$ymkmfcmd
if ($status) then
	echo "Unable to build Makefile - fix above errors and re-run."
	goto cleanup
endif
echo ""
echo "Makefile built, checking defaults..."
echo ""
echo ""

set parentdir=`$makecmd ROOT`
echo -n "..."
set tmpdir=`$makecmd TROOT`
echo -n "..."
set loclib=`$makecmd LSEARCH`
echo -n "..."
set locinc=`$makecmd ISEARCH`
echo -n "..."
#
# The python stuff is commented out for now. One should use
# the "setup.py" method for building python software, and not
# the ymake system.
#
set buildncl=`$makecmd NCLSTUFF`
echo -n "..."
# set pythondir=`$makecmd PYTHONDIR`
# echo -n "..."
# set pythonversion=`$makecmd PYTHONVERS`
# echo -n "..."
set buildxlibstuff=`$makecmd XSTUFF`
echo -n "..."
set buildtriangle=`$makecmd TRIANGLESTUFF`
echo -n "..."
# set buildpng=`$makecmd PNGSTUFF`
# echo -n "..."
set buildnc4support=`$makecmd NC4STUFF`
echo -n "..."
set buildgdal=`$makecmd GDALSTUFF`
echo -n "..."
set buildhdf4=`$makecmd HDF5STUFF`
echo -n "..."
set buildrasterhdf=`$makecmd RASTERHDFSTUFF`
echo -n "..."
set buildnetcdf4=`$makecmd NETCDF4STUFF`
echo -n "..."
set buildudunits=`$makecmd UDUNITSSTUFF`
echo -n "..."
set buildhdfeos=`$makecmd HDFEOSSTUFF`
echo -n "..."
echo -n "..."
set buildhdfeos5=`$makecmd HDFEOS5STUFF`
echo -n "..."
echo -n "..."
set buildhdf5=`$makecmd HDF5STUFF`
echo -n "..."
set buildgrib2=`$makecmd GRIB2STUFF`
echo -n "..."
set buildv5d=`$makecmd V5DSTUFF`
echo -n "..."
# set buildpyngl=`$makecmd PYNGLSTUFF`
# echo -n "..."
set buildgridspec=`$makecmd GRIDSPECSTUFF`
echo -n "..."
set ncargversion=`$makecmd NGVERS`
echo -n "..."
set nclversion=`$makecmd NCLVERS`
echo ""
/bin/rm Makefile

onintr cleanup

QuestionAndAnswer:
echo ""
echo "*** Configuration Procedure for NCL and NCAR Graphics V$nclversion ***"
echo ""

if ($?verbose_option) then
  cat <<"EOF"
======================================================================

	This question and answer session will allow you to configure
	NCL and NCAR Graphics for installation.  It creates a file
	"Site.local" in the "config" directory that defines Site
	specific information.  This procedure will also check that the
	directories specified are accessible and that the required
	system support is available.

======================================================================
"EOF"

  echo -n "Enter Return to continue, or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup

  cat <<"EOF"
======================================================================

	Informational text (like the paragraph you are reading) is
	indented by one tab stop.  Questions are left justified;
	usually, the default answer is in parentheses at the end of
	the question.  At the prompt, you may select the default by
	entering a Return (carriage return) or you may enter any of
	the other valid responses.

======================================================================
"EOF"

endif

if (! $?verbose_option) then
  echo "======================================================================"
  echo "Run 'Configure -v' if you want more information about the"
  echo "questions that follow."
  echo "======================================================================"
endif

echo -n "Enter Return to continue, or q(quit) > "
set answer="$<"
if ("$answer" == "q") goto cleanup


#
# Whether to build NCL or not.
#
if (-e ni) then
  if ($?verbose_option) then
    cat <<"EOF"
======================================================================

	The NCAR Command Language (NCL) is a free interpreted language
	designed specifically for scientific data processing and
	visualization. NCL has robust file input and output. It can
	read in netCDF, HDF4, HDF-EOS2, HDF-EOS5, HDF5, GRIB 1/2, binary
	and ASCII data.

	It requires some external packages (like netCDF),
	and has several optional packages you can build in (HDF4, UDUNITS2,
	Triangle, HDF-EOS2, HDF-EOS5, HDF5, and Vis5D functions).

	NCL is a separate software package from NCAR Graphics. You
	don't don't need it in order to build or use NCAR Graphics.

======================================================================
"EOF"
  endif

  echo ""
  echo "Build NCL ($buildncl)?"
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildncl")) then
    set buildncl = $answer
    set newbuildncl
    set altered
  endif
else
#  echo ""
#  echo "Not building NCL...source code directory is not available."
  set buildncl = "n"
  set buildudunits = "n"
  set buildtriangle = "n"
  set newbuildncl
  set altered
endif

#
# Parent installation directory for NCL/NCAR Graphics.
#

proc_parent:
if ($?verbose_option) then
  cat <<"EOF"
======================================================================

	The NCL/NCAR Graphics software must be installed in a parent 
	directory containing subdirectiries 'bin', 'include', 'lib',
	and 'man'. This procedure will make sure that these
	directories are writable by the installation process.

======================================================================
"EOF"
endif

echo ""
echo "Parent installation directory : $parentdir"
echo -n "Enter Return (default), new directory, or q(quit) > "
set answer="$<"
if ("$answer" == "q") goto cleanup
if ("$answer" != "") then
  set parentdir="$answer"
  set altered
endif

if (-d $parentdir) then
  if (! -w "$parentdir") then
    echo "<$parentdir> is not writable."
    echo "New directory name? (y)"
    echo -n "Enter Return(default), y(yes), n(no), or q(quit) > "
    set answer="$<"
    if ("$answer" == "q") goto cleanup
    if ("$answer" == "y" || "$answer" == "") goto proc_parent
  endif
endif

#
# Make sure subdirs bin, include, lib, and man are writable.
#

set instdirs = ("bin" "include" "lib" "man")

foreach d($instdirs)
  set dir = "$parentdir/$d"
  if (-d "$dir") then
    if (! -w "$dir") then
      echo "<$dir> is not writable"
      echo "New parent directory name? (y)"
      echo -n "Enter Return(default), y(yes), n(no), or q(quit) > "
      set answer="$<"
      if ("$answer" == "q") goto cleanup
      if ("$answer" == "y" || "$answer" == "") goto proc_parent
    endif
  endif
end

#
# Temp space directory.
#

proc_tmp:

if ($?verbose_option) then
  cat <<"EOF"
======================================================================

	A couple of the translators make use of temporary
	file space.  On most systems, the directory "/tmp" is the
	logical choice.  You may specify a different directory to
	use for this purpose.  The directory must be writable by
	NCL/NCAR Graphics users.  This procedure will check only to
	make sure that the directory specified is writable by the
	installation process.

======================================================================
"EOF"
endif

echo ""
echo "System temp space directory   : $tmpdir"
echo -n "Enter Return (default), new directory, or q(quit) > "
set answer="$<"
if ("$answer" == "q") goto cleanup
if ("$answer" != "") then
  set tmpdir="$answer"
  set newtmp
  set altered
endif

if (-d "$tmpdir") then
  if (! -w "$tmpdir") then
    echo "<$tmpdir> is not writable"
    echo "New directory name? (y)"
    echo -n "Enter Return(default), y(yes), n(no), or q(quit) > "
    set answer="$<"
    if ("$answer" == "q") goto cleanup
    if ("$answer" == "y" || "$answer" == "") goto proc_tmp
  endif
endif

#
# NCAR View stuff.
#

if ($?verbose_option) then
  cat <<"EOF"
======================================================================

	The next few questions concern some of the applications in
	NCAR Graphics that allow the user to manipulate and view
	NCAR Graphics Computer Graphics	Metafiles (NCGM's).  For
	example, "ctrans" is an NCGM translator that can support the
	X Window System, PostScript, and many other graphics
	devices, and "idt" is an X window interactive image display
	tool which allows the user to do animation among other
	things.  There are also several raster applications which
	allow you to convert from one raster format to another,
	split raster files, and view raster files.

	In order to build pieces of these applications, you need the
	basic X11 libraries.  If you don't have these libraries,
	answer "n" to the next question.

======================================================================
"EOF"
endif

#
# NetCDF 4 support.
#
if ($?verbose_option) then
  cat <<"EOF"
======================================================================

	If you want access to some new NetCDF 4 features.
	This is experimental for now,
	so unless you know what you're doing,
	answer "n" to this question.

======================================================================
"EOF"
endif

echo ""
echo "Build NetCDF4 feature support (optional)? ($buildnc4support)"
echo "Requires the NetCDF version 4.1.2 or later."
echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
set answer="$<"
if ("$answer" == "q") goto cleanup
if (("$answer" != "") && ("$answer" != "$buildnc4support")) then
	set buildnc4support = $answer
	set newbuildnc4support
    echo "Setting support for NetCDF 4..."
    set altered
endif

#
# Don't ask about PNG support here, because PNG support is now
# part of cairo.
#
# PNG
#
# if ($?verbose_option) then
#   cat <<"EOF"
# ======================================================================
# 
# 	There's some experimental code in the GKS library in NCAR
# 	Graphics that allows you to create PNG files in the
# 	same way that you can output to an NCGM, PS, or PDF file. 
# 	If you want to try this code, then you'll need to download
# 	and install the png and zlib source code and link against
# 	their libraries whenever you link an NCAR Graphics program.
# 
# ======================================================================
# "EOF"
# endif
# 
# echo ""
# echo "Build png/zlib support (optional) into GKS library? ($buildpng)"
# echo "(Requires the external png/zlib libraries available from"
# echo "http://www.libpng.org/pub/png/libpng.html and http://www.zlib.net/) "
# echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
# set answer="$<"
# if ("$answer" == "q") goto cleanup
# if (("$answer" != "") && ("$answer" != "$buildpng")) then
# 	set buildpng = $answer
# 	set newbuildpng
#     set altered
# endif

#
# HDF4 is now optional for NCL. Nevertheless because it is also an option 
# for the raster library, ask about it here prior to the NCL-only section. 
#
if ($?verbose_option) then
  cat <<"EOF"
======================================================================

	NCL can optionally provide read/write access to HDF4 and and 
        read access to HDF-EOS2 files. If you answered yes to the 
        "build NCL?" question, and you want HDF4 and/or HDF-EOS2 file
        support then you must build the HDF libraries according to 
        the NCL/NCAR Graphics source code installation instructions at:

	http://www.ncl.ucar.edu/Download/build_from_src.shtml#HDF-4

	If you try to build HDF without reading these instructions,
	you will run into problems with trying to link against the
	HDF libraries and include files.

	If you are not building NCL, and are only interested in building
	NCAR Graphics, then you only need to build HDF if you need
	HDF support built into the NCAR Graphics raster library.

======================================================================
"EOF"
endif

if ("$buildncl" == "y" || "$buildncl" == "Y") then
  echo ""
  echo "Build HDF4 support (optional) into NCL? ($buildhdf4)"
  echo "Informational note: HDF4 is no longer required to build NCL,"
  echo "but it is a prerequisite if you need HDF-EOS2 support."
  echo "(Requires external HDF-4 libraries available from "
  echo "http://www.hdfgroup.org/release4/obtain.html)"
  echo "Please see the instructions at"
  echo "http://www.ncl.ucar.edu/Download/build_from_src.shtml#HDF-4"
  echo "to make sure your HDF software is built according to NCL requirements."
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildhdf4")) then
      set buildhdf4 = $answer
      set newbuildhdf4
      set altered
  endif
  echo ""
  echo "Also build HDF4 support (optional) into raster library? ($buildrasterhdf)"
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildrasterhdf")) then
      set buildrasterhdf = $answer
      set newbuildrasterhdf
      set altered
  endif
else
  echo ""
  echo "Build HDF4 support (optional) into raster library? ($buildrasterhdf)"
  echo "(Requires the external HDF4 libraries available from http://www.hdfgroup.org/release4/obtain.html) "
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildhdf4")) then
    set buildrasterhdf = $answer
    set newbuildrasterhdf
    set altered
  endif
endif
set hdfwithszip = "n"
if (("$buildhdf4" == "y") || ("$buildhdf4" == "Y") || \
    ("$buildrasterhdf" == "y") || ("$buildrasterhdf" == "Y")) then
    echo ""
    echo "Did you build HDF4 with szip support? ($hdfwithszip)"
    echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
    set answer="$<"
    if ("$answer" == "q") goto cleanup
    if (("$answer" != "") && ("$answer" != "$hdfwithszip")) then
        set hdfwithszip = "$answer"
        set hdflib = "-lmfhdf -ldf -ljpeg -lz -lsz"
    endif
endif

#
# Only ask about NetCDF- UDUNITS, HDF-EOS2, HDF-EOS5, HDF5, Triangle, Vis5d+, and
# other external software support if we are actually planning to
# build NCL.
#
if ("$buildncl" == "y" || "$buildncl" == "Y") then
#
# Triangle
#
  if ($?verbose_option) then
    cat <<"EOF"
======================================================================

	The Triangle code is what allows you to generate triangular
	meshes so that you can contour non-uniform grids.
	In order to have this functionality, you must download the
	Triangle code from http://www.cs.cmu.edu/~quake/triangle.html
	and agree to Jonathan Shewchuk's license restrictions that
	are mentioned on that page. Once you download the code
	('triangle.c' and 'triangle.h'), put these two files in the 
	ni/src/lib/hlu subdirectory, answer "y" to this question,
	and you should be set.

======================================================================
"EOF"
  endif

  echo ""
  echo "Build Triangle support (optional) into NCL ($buildtriangle)"
  echo "Requires 'triangle.c' and 'triangle.h' code from"
  echo "http://www.cs.cmu.edu/~quake/triangle.html"
  echo "You must agree to the license restrictions in the above URL,"
  echo "download these two files, and put them in ni/src/lib/hlu"
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildtriangle")) then
	set buildtriangle = $answer
	set newbuildtriangle
        set altered
  endif


#
# NetCdf-4
#
  if ($?verbose_option) then
    cat <<"EOF"
======================================================================

	Linking with the netCDF-4 enabled library currently provides
	you with compression support, and the ability to write netCDF-4
	classic files. Not all aspects of netCDF-4 files are fully
	supported yet, like multiple-unlimited dimensions and
	new types.

	If you built NetCDF V4.1, then you additionally can get
	Udunits and OPeNDAP support.

	THIS LIBRARY IS NOT NEEDED FOR BUILDING NCAR GRAPHICS.

	If you built your NetCDF-4 library with the "--enable-netcdf-4"
	option, then you should answer "y" to this question.

======================================================================
"EOF"
  endif

  echo ""
  echo "If you are using NetCDF V4.x, did you enable NetCDF-4 support ($buildnetcdf4)?"
  echo "(Requires compiling NetCDF-4 library available from"
  echo "http://www.unidata.ucar.edu/software/netcdf/"
  echo "and building with '--enable-netcdf-4') "
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildnetcdf4")) then
	set buildnetcdf4 = $answer
	set newbuildnetcdf4
        set altered
  endif

  if ($?verbose_option) then
    cat <<"EOF"
======================================================================

	OPeNDAP is a protocol for requesting and transporting data
	across the web.  The current OPeNDAP Data Access Protocol
	(DAP) simplifies all aspects of scientific data networking,
	allowing simple access to remote data. Local data can be made
	accessible to remote locations regardless of local storage
	format.  In order to have this functionality, you must have
	built NetCDF V4.1 or later with OPeNDAP support enabled (the
	default).

	If you built the NetCDF-4.1 software library with OPeNDAP
	support explicitly turned off, or if you built NetCDF 4.0.x
        or earlier, you should answer "n" to this question.

======================================================================
"EOF"
  endif

  set netcdfwithdap = "y"
  echo ""
  echo "Did you build NetCDF with OPeNDAP support ($netcdfwithdap)?"
  echo "(OPeNDAP support is only available for NetCDF 4.1 or later)"
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$netcdfwithdap")) then
      set netcdfwithdap = "$answer"
      set netcdflib = "-lnetcdf"
  endif


#
# GDAL
#
  if ($?verbose_option) then
    cat <<"EOF"
======================================================================

	If you want to be able to read shapefiles, then you'll need to
	download GDAL and supporting packages (PROJ4).

	THIS LIBRARY IS NOT NEEDED FOR BUILDING NCAR GRAPHICS.

======================================================================
"EOF"
  endif

  echo ""
  echo "Build GDAL support (optional) into NCL? ($buildgdal)"
  echo "(Requires GDAL and PROJ4 from http://www.gdal.org/ and "
  echo "http://trac.osgeo.org/proj/) "
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildgdal")) then
      set buildgdal = $answer
      set newbuildgdal
      set altered
  endif

#
# GRIDSPEC
#
  if(0) then
  if ($?verbose_option) then
    cat <<"EOF"
======================================================================

	If you want to use the experimental interface to gridspec, you 
	will need to link to the CF library. This library is now built 
        as part of NetCDF V4.1 and later if '--with-libcf' is set.  

	THIS LIBRARY IS NOT NEEDED FOR BUILDING NCAR GRAPHICS.

======================================================================
"EOF"
  endif

  echo ""
  echo "Build experimental gridspec support (optional) into NCL? ($buildgridspec)"
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildgridspec")) then
      set buildgridspec = $answer
      set newbuildgridspec
      set altered
  endif
  endif

#
# Udunits
#
  if ($?verbose_option) then
    cat <<"EOF"
======================================================================

	The udunits-2 library supports many different time formats, and
	some of its functionality is available as built-in functions
	in NCL. In order to have this functionality, you must have the
	V2.x (not V1.x) libudunits2.a library installed on your system.

	This library is now built as part of NetCDF V4.1 and later
	if --with-udunits is set.

	THIS LIBRARY IS NOT NEEDED FOR BUILDING NCAR GRAPHICS.

======================================================================
"EOF"
  endif

  echo ""
  echo "Build Udunits-2 support (optional) into NCL ($buildudunits)"
  echo "(Requires the external V2.x Udunits [not V1.x] library available from"
  echo "http://www.unidata.ucar.edu/software/udunits/udunits-2/udunits2.html) "
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildudunits")) then
	set buildudunits = $answer
	set newbuildudunits
        set altered
  endif

#
# Vis5d+
#
  if ($?verbose_option) then
    cat <<"EOF"
======================================================================

	The Vis5d+ library supports OpenGL-based volumetric
	visualization for scientific datasets in 3+ dimensions.
	Enabling this option will allow for writing Vis5d+ files.  It
	DOES NOT enable NCL or NCAR GRAPHICS to visualize such files.
	In order to have this functionality, you must have the
	NCAR-supplied libraries installed on your system.

	THIS LIBRARY IS NOT NEEDED FOR BUILDING NCAR GRAPHICS.

======================================================================
"EOF"
  endif

  echo ""
  echo "Build Vis5d+ support (optional) into NCL ($buildv5d)"
  echo "(Requires the external Vis5d+ software available from"
  echo "http://vis5d.sourceforge.net/) "
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildv5d")) then
	set buildv5d = $answer
	set newbuildv5d
        set altered
  endif

#
# HDF-EOS2
#
  if ($?verbose_option) then
    cat <<"EOF"
======================================================================

	The hdfeos library supports the HDF-EOS2 data format, and NCL
	has some capability to read these files in. In order to have
	this functionality, you must have the HDF-EOS2 libraries
	installed on your system. You must also have answered yes to
        including support for HDF4 in NCL.

	THIS LIBRARY IS NOT NEEDED FOR BUILDING NCAR GRAPHICS.

======================================================================
"EOF"
  endif

  echo ""
  echo "Build HDF-EOS2 support (optional) into NCL ($buildhdfeos)"
  echo "(Requires the external HDF-EOS2 libraries available from"
  echo "http://newsroom.gsfc.nasa.gov/sdptoolkit/toolkit.html. You"
  echo "must also have included support for HDF4.) "
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildhdfeos")) then
  	set buildhdfeos = $answer
  	set newbuildhdfeos
        set altered
  endif


#
# HDF5
#
  if ($?verbose_option) then
    cat <<"EOF"
======================================================================

	The hdf5 library supports the HDF5 data format, and NCL
	has some capability to read these files in. In order to have
	this functionality, you must have the HDF5 library
	installed on your system. 

	THIS LIBRARY IS NOT NEEDED FOR BUILDING NCAR GRAPHICS.

======================================================================
"EOF"
  endif

  echo ""
  echo "Build HDF5 support (optional) into NCL ($buildhdf5)"
  echo "(Requires the external HDF5 library available from"
  echo "http://www.hdfgroup.org/ftp/HDF5/current/src/ "
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildhdf5")) then
  	set buildhdf5 = $answer
  	set newbuildhdf5
        set altered
  endif

#
# HDF-EOS5
#
  if ($?verbose_option) then
    cat <<"EOF"
======================================================================

	The hdfeos5 library supports the HDF-EOS5 data format, and NCL
	has some capability to read these files in. In order to have
	this functionality, you must have the HDF-EOS5 library
	installed on your system. 

	THIS LIBRARY IS NOT NEEDED FOR BUILDING NCAR GRAPHICS.

======================================================================
"EOF"
  endif

  echo ""
  echo "Build HDF-EOS5 support (optional) into NCL ($buildhdfeos5)"
  echo "(Requires the external HDF-EOS5 library available from"
  echo "ftp://edhs1.gsfc.nasa.gov/pub)"
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildhdfeos5")) then
  	set buildhdfeos5 = $answer
  	set newbuildhdfeos5
        set altered
  endif

#
# GRIB2
#
  if ($?verbose_option) then
    cat <<"EOF"
======================================================================

	In order to have support for reading GRIB2 files with NCL, you
	must have both the NCEP GRIB2 decoder library and the jasper
	JPEG2000 library installed on your system.  THESE LIBRARIES ARE
	NOT NEEDED FOR BUILDING NCAR GRAPHICS.

======================================================================
"EOF"
  endif

  echo ""
  echo "Build GRIB2 support (optional) into NCL ($buildgrib2)"
  echo "(Requires the GRIB2 decoder (g2clib) library and jasper from"
  echo "http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2/ and"
  echo "http://www.ece.uvic.ca/~mdadams/jasper/) "
  echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
  set answer="$<"
  if ("$answer" == "q") goto cleanup
  if (("$answer" != "") && ("$answer" != "$buildgrib2")) then
  	set buildgrib2 = $answer
  	set newbuildgrib2
        set altered
  endif

else
  set buildhdfeos  = "n"
  set buildhdfeos5 = "n"
  set buildhdf4 = "n"
  set buildhdf5 = "n"
  set buildnetcdf4 = "n"
  set buildtriangle = "n"
  set buildudunits = "n"
  set buildgrib2 = "n"
  set buildnc4support = "n"
  set buildv5d = "n"
  set buildgridspec = "n"
  set netcdfwithdap = "n"
  set netcdflib = ""
  set newbuildhdfeos
  set newbuildhdfeos5
  set newbuildhdf5
  set newbuildnetcdf4
  set newbuildtriangle
  set newbuildudunits
  set newbuildgrib2
  set newbuildnc4support
  set newbuildv5d
  set newbuildgridspec
  set altered
endif

#
# The python stuff is commented out for now. One should use
# the "setup.py" method for building python software, and not
# the ymake system.
#
# PyNGL
#
# if (-e pyngl) then
#   if ($?verbose_option) then
#     cat <<"EOF"
# 
#     PyNGL is a Python module that allows you to access NCL's graphical
#     library.  Enabling this option will	cause PyNGL to be built, but
#     not installed.  In order to have this functionality, you must
#     have Python and Numeric installed on your system.
# 
# "EOF"
#   endif
# 
#   echo ""
#   echo "Build PyNGL ($buildpyngl)"
#   echo "(Requires Python from python.org and Numeric from www.pfdubois.com/numpy/"
#   echo -n "Enter Return (default), y(yes), n(no), or q(quit) > "
#   set answer="$<"
#   if ("$answer" == "q") goto cleanup
#   if (("$answer" != "") && ("$answer" != "$buildpyngl")) then
# 	set buildpyngl = $answer
# 	set newbuildpyngl
#         set altered
#   endif
#   if ("$buildpyngl" == "y") then
# 
# #
# # Get Python version
# # 
#     set pythonversion = "$pythonversion"
# proc_pythonversion:
#     echo ""
#     echo "Enter Python version : $pythonversion"
#     echo -n "Enter Return (default), new version, or q(quit) > "
#     set answer="$<"
# 
#     if ("$answer" == "q") goto cleanup
#     if ("$answer" != "") then
#       set pythonversion = "$answer"
#       set npythonvers
#       set altered
#     endif
# #
# # Get Python path. This must be the path leading up to the lib, bin, 
# # and include directories associated with Python.
# # 
#     set pythondir = "$pythondir"
# proc_pythondir:
#     echo ""
#     echo "Enter Python path : $pythondir"
#     echo "(enter path leading up to Python's lib, bin, and include directories.)"
#     echo -n "Enter Return (default), new directory, or q(quit) > "
#     set answer="$<"
# 
#     if ("$answer" == "q") goto cleanup
#     if ("$answer" != "") then
#       set pythondir = "$answer"
#       set npythondir
#       set altered
#     endif
#     if ("$pythondir" != "") then
#       if (! -d $pythondir) then
#         echo "  *** Warning: <$pythondir> does not exist"
#         echo ""
#         goto proc_pythondir
#       endif
#     endif
#     set pythonincdir = "$pythondir/include/python$pythonversion"
#     set pythonlibdir  = $pythondir/lib
#     set pythonbindir  = $pythondir/bin
#     set pythonpkgs   = "$pythonlibdir/python$pythonversion/site-packages"
#     if (! -d $pythonbindir || ! -d $pythonpkgs || ! -d $pythonincdir) then
#       echo "  *** Warning: <$pythonpkgs> and/or <$pythonincdir> does not exist"
#       echo ""
#       goto proc_pythondir
#     endif
#     set pythonlib = "-L$pythonlibdir"
#     set pythoninc = "-I$pythonincdir"
# # 
# # Decide whether to use Numeric or NumPy.
# # 
#     set usenumpy = 0
#     echo ""
#     echo "Use Numeric (0) or NumPy (1)? : $usenumpy "
#     echo -n "Enter Return (default), (0) Numeric, (1) NumPy, or q(quit) > "
#     set answer="$<"
# 
#     if ("$answer" == "q") goto cleanup
#     if ("$answer" != "") then
#       set usenumpy = "$answer"
#       set altered
#     endif
#   endif 
# endif

#
#  Library Search Path
#

if ($?verbose_option) then
  cat <<"EOF"

	Please enter the list of local libraries you wish to have
	on your library search path.  If building X applications,
	include the pathname of your X11 libraries.  If building
        support for any other packages, like HDF-EOS5, cairo, etc, 
        then enter each	library pathname with a space between.

"EOF"
endif

set loclibdir = `echo "$loclib" | sed -e 's/-L//g'`

proc_loclibdir:
echo ""
echo "Enter local library search path(s) : $loclibdir"
echo -n "Enter Return (default), new directories, or q(quit) > "
set answer="$<"

if ("$answer" == "q") goto cleanup
if ("$answer" != "") then
  set loclibdir = "$answer"
  set nloclib
  set altered
endif
if ("$loclibdir" != "") then
  set libs = ($loclibdir:x)
  set newloclib=""
  while ($#libs > 0)
    if (! -d $libs[1]) then
      echo "  *** Warning: <$libs[1]> does not exist"
      echo ""
      goto proc_loclibdir
    else 
      set newloclib = ($newloclib "-L$libs[1]")
    endif
    shift libs
  end
  set loclib = "$newloclib"
endif

#
# X11 include files.
#

if ($?verbose_option) then
  cat <<"EOF"

	Please enter the list of local include paths you wish to have
	on your include search path.  If building X applications,
	include the pathname to your X11 include files. If building
	support for any other packages, like HDF-EOS5, cairo, etc,
	then enter each include pathname with a space between.

        If including cairo support, be sure to include the path
        to the freetype2 include files, for example,
        "/usr/local/include/freetype2".
"EOF"
endif



set locincdir = `echo "$locinc" | sed -e 's/-I//g'`

proc_locincdir:
echo ""
echo "Enter local include search path(s) : $locincdir"
echo -n "Enter Return (default), new directories, or q(quit) > "
set answer="$<"
if ("$answer" == "q") goto cleanup
if ("$answer" != "") then
  set locincdir = "$answer"
  set nlocinc
  set altered
endif
if ("$locincdir" != "") then
  set incs = ($locincdir:x)
  set newlocinc=""
  while ($#incs > 0)
    if (! -d $incs[1]) then
      echo "  *** Warning: <$incs[1]> does not exist"
      echo ""
      goto proc_locincdir
    else 
      set newlocinc = ($newlocinc "-I$incs[1]")
    endif
    shift incs
  end
  set locinc = "$newlocinc"
endif

#
# Summarize configuration
#
cat <<EOF

	Every user of NCL and NCAR Graphics will need to set
	the following environment variable:

	setenv NCARG_ROOT $parentdir

EOF
	
endif

echo ""
echo "Go back and make more changes or review? (n) "
echo -n "Enter Return(default), y(yes), n(no), or q(quit) > "
set answer="$<"
if ("$answer" == "q") goto cleanup
if ("$answer" == "y") goto QuestionAndAnswer

#
# Save the configuration
#

proc_save:
echo ""
echo "Save current configuration ? (y) "
echo -n "Enter Return(default), y(yes), or q(quit) > "
set answer="$<"
if ("$answer" == "q") goto cleanup

if ("$answer" != "y" && "$answer" != "") then
	echo "Invalid response"
	goto proc_save
endif

if (! $?altered) goto shortcut

cd config

echo "/*" > Site.local
echo " *	This file was created by the Configure script." >> Site.local
echo " */" >> Site.local
echo "" >> Site.local
echo "#ifdef FirstSite" >> Site.local
echo "" >> Site.local
echo "#endif /* FirstSite */" >> Site.local
echo "" >> Site.local
echo "" >> Site.local
echo "#ifdef SecondSite" >> Site.local
echo "" >> Site.local

echo "#define YmakeRoot $parentdir" >> Site.local

if ($?newtmp) then
	echo "#define TmpRoot $tmpdir" >> Site.local
endif

echo "" >> Site.local

if ("$netcdfwithdap" == "n") then
    echo "#define NetCDFlib $netcdflib" >> Site.local
    echo "" >> Site.local
endif

if ("$hdfwithszip" == "y") then
    echo "#define HDFlib $hdflib" >> Site.local
    echo "" >> Site.local
endif


if ($?nloclib) then
	echo "#define LibSearch $loclib" >> Site.local
endif
if ($?nlocinc) then
	echo "#define IncSearch $locinc" >> Site.local
endif

echo "" >> Site.local

if ($?npythonvers) then
	echo "#define PythonVersion $pythonversion" >> Site.local
endif
if ($?npythonvers || $?npythondir) then
	echo "#define PythonDir $pythondir" >> Site.local
	echo "#define PythonBinDir $pythonbindir" >> Site.local
	echo "#define PythonPkgsDir $pythonpkgs" >> Site.local
	echo "#define PythonLibSearch $pythonlib" >> Site.local
	echo "#define PythonIncSearch $pythoninc" >> Site.local
endif

echo "" >> Site.local

if ($?newbuildncl) then
	if ("$buildncl" == "y") then
		echo "#define BuildNCL 1" >> Site.local
	else
		echo "#define BuildNCL 0" >> Site.local
	endif
endif

echo "" >> Site.local

if ($?newbuildrasterhdf) then
	if ("$buildrasterhdf" == "y") then
		echo "#define BuildRasterHDF 1" >> Site.local
	else
		echo "#define BuildRasterHDF 0" >> Site.local
		if ($buildhdf4 != "y") then
		    echo "#define HDFlib" >> Site.local
	        endif
	endif
endif

if ($?newbuildhdf4) then
	if ("$buildhdf4" == "y") then
		echo "#define BuildHDF4 1" >> Site.local
	else
		echo "#define BuildHDF4 0" >> Site.local
		if ($buildrasterhdf != "y") then
		    echo "#define HDFlib" >> Site.local
	        endif
	endif
endif


#
# This is the old PNG stuff. Commented out for now.
#
# if ($?newbuildpng) then
# 	if ("$buildpng" == "y") then
# 		echo "#define BuildPNG 1" >> Site.local
# 	else
# 		echo "#define BuildPNG 0" >> Site.local
# 		echo "#define PNGlib" >> Site.local
# 	endif
# endif


if ($?newbuildnc4support) then
	if ("$buildnc4support" == "y") then
	    echo "#define UseNetCDF4Features 1" >> Site.local
	else
	    echo "#define UseNetCDF4Features 0" >> Site.local
	endif
endif

if ($?newbuildnetcdf4) then
	if ("$buildnetcdf4" == "y") then
		echo "#define BuildNetCDF4 1" >> Site.local
	else
		echo "#define BuildNetCDF4 0" >> Site.local
		echo "#define NetCDF4lib" >> Site.local
	endif
endif

if ($?newbuildgdal && "$buildgdal" == "y") then
	echo "#define BuildGDAL 1" >> Site.local
endif

if ($?newbuildgridspec && "$buildgridspec" == "y") then
	echo "#define BuildGRIDSPEC 1" >> Site.local
endif

if ($?newbuildtriangle) then
	if ("$buildtriangle" == "y") then
		echo "#define BuildTRIANGLE 1" >> Site.local
	else
		echo "#define BuildTRIANGLE 0" >> Site.local
	endif
endif

if ($?newbuildudunits) then
	if ("$buildudunits" == "y") then
		echo "#define BuildUdunits 1" >> Site.local
	else
		echo "#define BuildUdunits 0" >> Site.local
		echo "#define UdUnitslib" >> Site.local
	endif
endif

if ($?newbuildhdfeos) then
	if ("$buildhdfeos" == "y") then
		echo "#define BuildHDFEOS 1" >> Site.local
	else
		echo "#define BuildHDFEOS 0" >> Site.local
		echo "#define HDFEOSlib" >> Site.local
	endif
endif

if ($?newbuildhdfeos5) then
	if ("$buildhdfeos5" == "y") then
		echo "#define BuildHDFEOS5 1" >> Site.local
	else
		echo "#define BuildHDFEOS5 0" >> Site.local
		echo "#define HDFEOS5lib" >> Site.local
	endif
endif

if ($?newbuildhdf5) then
	if ("$buildhdf5" == "y") then
		echo "#define BuildHDF5 1" >> Site.local
	else
		echo "#define BuildHDF5 0" >> Site.local
		echo "#define HDF5lib" >> Site.local
	endif
endif

if ($?newbuildgrib2) then
	if ("$buildgrib2" == "y") then
		echo "#define BuildGRIB2 1" >> Site.local
	else
		echo "#define BuildGRIB2 0" >> Site.local
		echo "#define GRIB2lib" >> Site.local
	endif
endif

if ($?newbuildv5d) then
	if ("$buildv5d" == "y") then
		echo "#define BuildV5D 1" >> Site.local
	else
		echo "#define BuildV5D 0" >> Site.local
		echo "#define V5Dlib" >> Site.local
	endif
endif

if ($?newbuildpyngl) then
	if ("$buildpyngl" == "y") then
		echo "#define BuildPyNGL 1" >> Site.local
	else
		echo "#define BuildPyNGL 0" >> Site.local
		echo "#define PYNGLlib" >> Site.local
	endif
	if ("$usenumpy" == 1) then
		echo "#define UseNumpy 1" >> Site.local
	endif
endif

echo "" >> Site.local
if ($?nomakedepend) echo "#define NoMakeDepend" >> Site.local
echo "" >> Site.local
echo "#endif /* SecondSite */" >> Site.local

cd ..

shortcut:
if ($?ncar_option) then
	set conf_type = "ncar local"
else
	set conf_type = "current"
endif
echo ""
echo "Building Top-level Makefile with $conf_type configuration options"
echo ""
$ymkmfcmd
if ($status) then
	echo "Unable to build Makefile - fix above errors and re-run."
	goto cleanup
endif

#
# Installation step
#

proc_install:
cat <<"EOF"

	You have completed the configuration process. Once you exit this
	program you may initiate the installation procedure by typing:

		make Everything >& make-output &

	You can watch the output with:

		tail -f make-output

"EOF"

if ($?verbose_option) then
cat <<"EOF"
	If this is not your first installation attempt, and you simply 
	made some changes in the configuration, restart the process using:

		make All >>& make-output &
	
	This command does not erase object code that has already
	been compiled.

	Both of these commands run the installation procedure
	in the background, and you can track its progress
	by periodically examining the file "make-output" while 
	the installation proceeds.

"EOF"
endif

exit 0

extra_cleanup:
rm -f Makefile
rm -f config/Site.local

cleanup:
echo ""
echo "Terminating configuration procedure"
exit 0