[DebianGIS-dev] r2335 - in packages: . ncview ncview/branches ncview/branches/upstream ncview/branches/upstream/current ncview/branches/upstream/current/interface

magi-guest at alioth.debian.org magi-guest at alioth.debian.org
Mon Jul 13 09:25:36 UTC 2009


Author: magi-guest
Date: 2009-07-13 09:25:34 +0000 (Mon, 13 Jul 2009)
New Revision: 2335

Added:
   packages/ncview/
   packages/ncview/branches/
   packages/ncview/branches/upstream/
   packages/ncview/branches/upstream/current/
   packages/ncview/branches/upstream/current/3gauss.ncmap
   packages/ncview/branches/upstream/current/3saw.ncmap
   packages/ncview/branches/upstream/current/COPYING
   packages/ncview/branches/upstream/current/INSTALL
   packages/ncview/branches/upstream/current/Makefile.default
   packages/ncview/branches/upstream/current/Makefile.in
   packages/ncview/branches/upstream/current/Makefile.solaris
   packages/ncview/branches/upstream/current/Ncview-appdefaults
   packages/ncview/branches/upstream/current/README
   packages/ncview/branches/upstream/current/README.sgi
   packages/ncview/branches/upstream/current/README.solaris
   packages/ncview/branches/upstream/current/README_LOCAL
   packages/ncview/branches/upstream/current/README_WISH_LIST
   packages/ncview/branches/upstream/current/RELEASE_NOTES
   packages/ncview/branches/upstream/current/SciPlot.1
   packages/ncview/branches/upstream/current/SciPlot.c
   packages/ncview/branches/upstream/current/SciPlot.h
   packages/ncview/branches/upstream/current/SciPlotP.h
   packages/ncview/branches/upstream/current/bw.ncmap
   packages/ncview/branches/upstream/current/colormaps_3gauss.h
   packages/ncview/branches/upstream/current/colormaps_3saw.h
   packages/ncview/branches/upstream/current/colormaps_bw.h
   packages/ncview/branches/upstream/current/colormaps_default.h
   packages/ncview/branches/upstream/current/colormaps_detail.h
   packages/ncview/branches/upstream/current/colormaps_extrema.h
   packages/ncview/branches/upstream/current/colormaps_helix.h
   packages/ncview/branches/upstream/current/colormaps_helix2.h
   packages/ncview/branches/upstream/current/colormaps_hotres.h
   packages/ncview/branches/upstream/current/colormaps_ssec.h
   packages/ncview/branches/upstream/current/configure
   packages/ncview/branches/upstream/current/default.ncmap
   packages/ncview/branches/upstream/current/detail.ncmap
   packages/ncview/branches/upstream/current/do_buttons.c
   packages/ncview/branches/upstream/current/do_print.c
   packages/ncview/branches/upstream/current/do_print.orig.c
   packages/ncview/branches/upstream/current/epic_time.c
   packages/ncview/branches/upstream/current/file.c
   packages/ncview/branches/upstream/current/file_netcdf.c
   packages/ncview/branches/upstream/current/geteuid.c
   packages/ncview/branches/upstream/current/hotres.ncmap
   packages/ncview/branches/upstream/current/install-appdef
   packages/ncview/branches/upstream/current/install-sh
   packages/ncview/branches/upstream/current/interface/
   packages/ncview/branches/upstream/current/interface/RadioWidget.c
   packages/ncview/branches/upstream/current/interface/RadioWidget.h
   packages/ncview/branches/upstream/current/interface/cbar.c
   packages/ncview/branches/upstream/current/interface/closed_circle_bitmap.h
   packages/ncview/branches/upstream/current/interface/dataedit.c
   packages/ncview/branches/upstream/current/interface/display_info.c
   packages/ncview/branches/upstream/current/interface/fallback_resources.h
   packages/ncview/branches/upstream/current/interface/filesel.c
   packages/ncview/branches/upstream/current/interface/helvR08.h
   packages/ncview/branches/upstream/current/interface/interface.c
   packages/ncview/branches/upstream/current/interface/open_circle_bitmap.h
   packages/ncview/branches/upstream/current/interface/plot_range.c
   packages/ncview/branches/upstream/current/interface/plot_xy.c
   packages/ncview/branches/upstream/current/interface/printer_options.c
   packages/ncview/branches/upstream/current/interface/range.c
   packages/ncview/branches/upstream/current/interface/set_options.c
   packages/ncview/branches/upstream/current/interface/utils.c
   packages/ncview/branches/upstream/current/interface/widgets.h
   packages/ncview/branches/upstream/current/interface/x_interface.c
   packages/ncview/branches/upstream/current/interface/x_interface.dumpframes.c
   packages/ncview/branches/upstream/current/nc_overlay.earth.lat-lon.p8deg
   packages/ncview/branches/upstream/current/nc_overlay.earth.lat-lon.radians
   packages/ncview/branches/upstream/current/nc_overlay.lat-lon-grid.10x30
   packages/ncview/branches/upstream/current/nc_overlay.lat-lon-grid.20x60
   packages/ncview/branches/upstream/current/nc_overlay.usa
   packages/ncview/branches/upstream/current/ncview.1.sed
   packages/ncview/branches/upstream/current/ncview.bitmaps.h
   packages/ncview/branches/upstream/current/ncview.c
   packages/ncview/branches/upstream/current/ncview.defines.h
   packages/ncview/branches/upstream/current/ncview.includes.h
   packages/ncview/branches/upstream/current/ncview.protos.h
   packages/ncview/branches/upstream/current/overlay.c
   packages/ncview/branches/upstream/current/overlay.orig.c
   packages/ncview/branches/upstream/current/overlay_coasts_p08deg.h
   packages/ncview/branches/upstream/current/overlay_coasts_p8deg.h
   packages/ncview/branches/upstream/current/overlay_usa.h
   packages/ncview/branches/upstream/current/qsort.c
   packages/ncview/branches/upstream/current/udu.c
   packages/ncview/branches/upstream/current/utCalendar_cal.c
   packages/ncview/branches/upstream/current/utCalendar_cal.h
   packages/ncview/branches/upstream/current/util.c
   packages/ncview/branches/upstream/current/util_2009-01-01.c
   packages/ncview/branches/upstream/current/view.c
Log:
[svn-inject] Installing original source of ncview

Added: packages/ncview/branches/upstream/current/3gauss.ncmap
===================================================================
--- packages/ncview/branches/upstream/current/3gauss.ncmap	                        (rev 0)
+++ packages/ncview/branches/upstream/current/3gauss.ncmap	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,256 @@
+0 0 255
+0 0 255
+1 2 254
+2 4 253
+3 6 252
+4 9 251
+5 12 250
+6 16 249
+7 21 248
+8 26 247
+9 32 246
+10 39 245
+11 46 244
+12 53 243
+13 61 242
+14 69 241
+15 78 240
+16 87 239
+17 96 238
+18 105 237
+19 114 236
+20 123 235
+21 133 234
+22 142 233
+23 151 232
+24 160 231
+25 169 230
+26 178 229
+27 186 228
+28 194 227
+29 202 226
+30 209 225
+31 216 224
+32 223 223
+33 229 222
+34 234 221
+35 239 220
+36 243 219
+37 246 218
+38 249 217
+39 251 216
+40 253 215
+41 253 214
+42 253 213
+43 253 212
+44 252 211
+45 250 210
+46 247 209
+47 244 208
+48 240 207
+49 235 206
+50 230 205
+51 225 204
+52 218 203
+53 212 202
+54 205 201
+55 197 200
+56 189 199
+57 181 198
+58 172 197
+59 163 196
+60 154 195
+61 145 194
+62 136 193
+63 127 192
+64 117 191
+65 108 190
+66 99 189
+67 90 188
+68 81 187
+69 72 186
+70 64 185
+71 56 184
+72 48 183
+73 41 182
+74 35 181
+75 28 180
+76 23 179
+77 18 178
+78 13 177
+79 9 176
+80 6 175
+81 3 174
+82 1 173
+83 0 172
+84 0 171
+85 0 170
+86 0 169
+87 2 168
+88 4 167
+89 7 166
+90 10 165
+91 14 164
+92 19 163
+93 24 162
+94 30 161
+95 37 160
+96 44 159
+97 51 158
+98 59 157
+99 67 156
+100 75 155
+101 84 154
+102 93 153
+103 102 152
+104 111 151
+105 120 150
+106 130 149
+107 139 148
+108 148 147
+109 157 146
+110 166 145
+111 175 144
+112 184 143
+113 192 142
+114 200 141
+115 207 140
+116 214 139
+117 221 138
+118 227 137
+119 232 136
+120 237 135
+121 241 134
+122 245 133
+123 248 132
+124 250 131
+125 252 130
+126 253 129
+127 254 128
+128 253 127
+129 252 126
+130 250 125
+131 248 124
+132 245 123
+133 241 122
+134 237 121
+135 232 120
+136 227 119
+137 221 118
+138 214 117
+139 207 116
+140 200 115
+141 192 114
+142 184 113
+143 175 112
+144 166 111
+145 157 110
+146 148 109
+147 139 108
+148 130 107
+149 120 106
+150 111 105
+151 102 104
+152 93 103
+153 84 102
+154 75 101
+155 67 100
+156 59 99
+157 51 98
+158 44 97
+159 37 96
+160 30 95
+161 24 94
+162 19 93
+163 14 92
+164 10 91
+165 7 90
+166 4 89
+167 2 88
+168 0 87
+169 0 86
+170 0 85
+171 0 84
+172 1 83
+173 3 82
+174 6 81
+175 9 80
+176 13 79
+177 18 78
+178 23 77
+179 28 76
+180 35 75
+181 41 74
+182 48 73
+183 56 72
+184 64 71
+185 72 70
+186 81 69
+187 90 68
+188 99 67
+189 108 66
+190 117 65
+191 126 64
+192 136 63
+193 145 62
+194 154 61
+195 163 60
+196 172 59
+197 181 58
+198 189 57
+199 197 56
+200 205 55
+201 212 54
+202 218 53
+203 225 52
+204 230 51
+205 235 50
+206 240 49
+207 244 48
+208 247 47
+209 250 46
+210 252 45
+211 253 44
+212 253 43
+213 253 42
+214 253 41
+215 251 40
+216 249 39
+217 246 38
+218 243 37
+219 239 36
+220 234 35
+221 229 34
+222 223 33
+223 216 32
+224 209 31
+225 202 30
+226 194 29
+227 186 28
+228 178 27
+229 169 26
+230 160 25
+231 151 24
+232 142 23
+233 133 22
+234 123 21
+235 114 20
+236 105 19
+237 96 18
+238 87 17
+239 78 16
+240 69 15
+241 61 14
+242 53 13
+243 46 12
+244 39 11
+245 32 10
+246 26 9
+247 21 8
+248 16 7
+249 12 6
+250 8 5
+251 5 4
+252 3 3
+253 1 2
+255 0 1


Property changes on: packages/ncview/branches/upstream/current/3gauss.ncmap
___________________________________________________________________
Added: svn:executable
   + 

Added: packages/ncview/branches/upstream/current/3saw.ncmap
===================================================================
--- packages/ncview/branches/upstream/current/3saw.ncmap	                        (rev 0)
+++ packages/ncview/branches/upstream/current/3saw.ncmap	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,256 @@
+0 255 255
+1 251 255
+2 246 254
+3 241 253
+4 236 252
+5 231 251
+6 226 250
+7 221 249
+8 216 248
+9 211 247
+10 206 246
+11 201 245
+12 196 244
+13 191 243
+14 186 242
+15 181 241
+16 176 240
+17 171 239
+18 166 238
+19 161 237
+20 156 236
+21 151 235
+22 146 234
+23 141 233
+24 136 232
+25 131 231
+26 126 230
+27 121 229
+28 116 228
+29 111 227
+30 106 226
+31 101 225
+32 96 224
+33 91 223
+34 86 222
+35 81 221
+36 76 220
+37 71 219
+38 66 218
+39 61 217
+40 56 216
+41 51 215
+42 46 214
+43 41 213
+44 36 212
+45 31 211
+46 26 210
+47 21 209
+48 16 208
+49 11 207
+50 6 206
+51 1 205
+52 252 204
+53 247 203
+54 242 202
+55 237 201
+56 232 200
+57 227 199
+58 222 198
+59 217 197
+60 212 196
+61 207 195
+62 202 194
+63 197 193
+64 192 192
+65 187 191
+66 182 190
+67 177 189
+68 172 188
+69 167 187
+70 162 186
+71 157 185
+72 152 184
+73 147 183
+74 142 182
+75 137 181
+76 132 180
+77 127 179
+78 122 178
+79 117 177
+80 112 176
+81 107 175
+82 102 174
+83 97 173
+84 92 172
+85 87 171
+86 82 170
+87 77 169
+88 72 168
+89 67 167
+90 62 166
+91 57 165
+92 52 164
+93 47 163
+94 42 162
+95 37 161
+96 32 160
+97 27 159
+98 22 158
+99 17 157
+100 12 156
+101 7 155
+102 2 154
+103 253 153
+104 248 152
+105 243 151
+106 238 150
+107 233 149
+108 228 148
+109 223 147
+110 218 146
+111 213 145
+112 208 144
+113 203 143
+114 198 142
+115 193 141
+116 188 140
+117 183 139
+118 178 138
+119 173 137
+120 168 136
+121 163 135
+122 158 134
+123 153 133
+124 148 132
+125 143 131
+126 138 130
+127 133 129
+128 128 128
+129 123 127
+130 118 126
+131 113 125
+132 108 124
+133 103 123
+134 98 122
+135 93 121
+136 88 120
+137 83 119
+138 78 118
+139 73 117
+140 68 116
+141 63 115
+142 58 114
+143 53 113
+144 48 112
+145 43 111
+146 38 110
+147 33 109
+148 28 108
+149 23 107
+150 18 106
+151 13 105
+152 8 104
+153 3 103
+154 254 102
+155 249 101
+156 244 100
+157 239 99
+158 234 98
+159 229 97
+160 224 96
+161 219 95
+162 214 94
+163 209 93
+164 204 92
+165 199 91
+166 194 90
+167 189 89
+168 184 88
+169 179 87
+170 174 86
+171 169 85
+172 164 84
+173 159 83
+174 154 82
+175 149 81
+176 144 80
+177 139 79
+178 134 78
+179 129 77
+180 124 76
+181 119 75
+182 114 74
+183 109 73
+184 104 72
+185 99 71
+186 94 70
+187 89 69
+188 84 68
+189 79 67
+190 74 66
+191 69 65
+192 64 64
+193 59 63
+194 54 62
+195 49 61
+196 44 60
+197 39 59
+198 34 58
+199 29 57
+200 24 56
+201 19 55
+202 14 54
+203 9 53
+204 4 52
+205 255 51
+206 250 50
+207 245 49
+208 240 48
+209 235 47
+210 230 46
+211 225 45
+212 220 44
+213 215 43
+214 210 42
+215 205 41
+216 200 40
+217 195 39
+218 190 38
+219 185 37
+220 180 36
+221 175 35
+222 170 34
+223 165 33
+224 160 32
+225 155 31
+226 150 30
+227 145 29
+228 140 28
+229 135 27
+230 130 26
+231 125 25
+232 120 24
+233 115 23
+234 110 22
+235 105 21
+236 100 20
+237 95 19
+238 90 18
+239 85 17
+240 80 16
+241 75 15
+242 70 14
+243 65 13
+244 60 12
+245 55 11
+246 50 10
+247 45 9
+248 40 8
+249 35 7
+250 30 6
+251 25 5
+252 20 4
+253 15 3
+254 10 2
+255 5 1


Property changes on: packages/ncview/branches/upstream/current/3saw.ncmap
___________________________________________________________________
Added: svn:executable
   + 

Added: packages/ncview/branches/upstream/current/COPYING
===================================================================
--- packages/ncview/branches/upstream/current/COPYING	                        (rev 0)
+++ packages/ncview/branches/upstream/current/COPYING	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,190 @@
+		    GNU GENERAL PUBLIC LICENSE
+		     Version 1, February 1989
+
+ Copyright (C) 1989 Free Software Foundation, Inc.
+                    675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The license agreements of most software companies try to keep users
+at the mercy of those companies.  By contrast, our General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  The
+General Public License applies to the Free Software Foundation's
+software and to any other program whose authors commit to using it.
+You can use it for your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Specifically, the General Public License is designed to make
+sure that you have the freedom to give away or sell copies of free
+software, that you receive source code or can get it if you want it,
+that you can change the software or use pieces of it in new free
+programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of a such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must tell them their rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any program or other work which
+contains a notice placed by the copyright holder saying it may be
+distributed under the terms of this General Public License.  The
+"Program", below, refers to any such program or work, and a "work based
+on the Program" means either the Program or any work containing the
+Program or a portion of it, either verbatim or with modifications.  Each
+licensee is addressed as "you".
+
+  1. You may copy and distribute verbatim copies of the Program's source
+code as you receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice and
+disclaimer of warranty; keep intact all the notices that refer to this
+General Public License and to the absence of any warranty; and give any
+other recipients of the Program a copy of this General Public License
+along with the Program.  You may charge a fee for the physical act of
+transferring a copy.
+
+  2. You may modify your copy or copies of the Program or any portion of
+it, and copy and distribute such modifications under the terms of Paragraph
+1 above, provided that you also do the following:
+
+    a) cause the modified files to carry prominent notices stating that
+    you changed the files and the date of any change; and
+
+    b) cause the whole of any work that you distribute or publish, that
+    in whole or in part contains the Program or any part thereof, either
+    with or without modifications, to be licensed at no charge to all
+    third parties under the terms of this General Public License (except
+    that you may choose to grant warranty protection to some or all
+    third parties, at your option).
+
+    c) If the modified program normally reads commands interactively when
+    run, you must cause it, when started running for such interactive use
+    in the simplest and most usual way, to print or display an
+    announcement including an appropriate copyright notice and a notice
+    that there is no warranty (or else, saying that you provide a
+    warranty) and that users may redistribute the program under these
+    conditions, and telling the user how to view a copy of this General
+    Public License.
+
+    d) You may charge a fee for the physical act of transferring a
+    copy, and you may at your option offer warranty protection in
+    exchange for a fee.
+
+Mere aggregation of another independent work with the Program (or its
+derivative) on a volume of a storage or distribution medium does not bring
+the other work under the scope of these terms.
+
+  3. You may copy and distribute the Program (or a portion or derivative of
+it, under Paragraph 2) in object code or executable form under the terms of
+Paragraphs 1 and 2 above provided that you also do one of the following:
+
+    a) accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of
+    Paragraphs 1 and 2 above; or,
+
+    b) accompany it with a written offer, valid for at least three
+    years, to give any third party free (except for a nominal charge
+    for the cost of distribution) a complete machine-readable copy of the
+    corresponding source code, to be distributed under the terms of
+    Paragraphs 1 and 2 above; or,
+
+    c) accompany it with the information you received as to where the
+    corresponding source code may be obtained.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form alone.)
+
+Source code for a work means the preferred form of the work for making
+modifications to it.  For an executable file, complete source code means
+all the source code for all modules it contains; but, as a special
+exception, it need not include source code for modules which are standard
+libraries that accompany the operating system on which the executable
+file runs, or for standard header files or definitions files that
+accompany that operating system.
+
+  4. You may not copy, modify, sublicense, distribute or transfer the
+Program except as expressly provided under this General Public License.
+Any attempt otherwise to copy, modify, sublicense, distribute or transfer
+the Program is void, and will automatically terminate your rights to use
+the Program under this License.  However, parties who have received
+copies, or rights to use copies, from you under this General Public
+License will not have their licenses terminated so long as such parties
+remain in full compliance.
+
+  5. By copying, distributing or modifying the Program (or any work based
+on the Program) you indicate your acceptance of this license to do so,
+and all its terms and conditions.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the original
+licensor to copy, distribute or modify the Program subject to these
+terms and conditions.  You may not impose any further restrictions on the
+recipients' exercise of the rights granted herein.
+
+  7. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of the license which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+the license, you may choose any version ever published by the Free Software
+Foundation.
+
+  8. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS

Added: packages/ncview/branches/upstream/current/INSTALL
===================================================================
--- packages/ncview/branches/upstream/current/INSTALL	                        (rev 0)
+++ packages/ncview/branches/upstream/current/INSTALL	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,131 @@
+How to install ncview 
+---------------------
+
+NOTE: if you want support for udunits-style dates, then MAKE THE UDUNITS 
+LIBRARY FIRST.  I have included a copy of the source tar file for udunits
+as a convenience.  After you've made it, come back here and make ncview.  
+If you don't want support for udunits-style dates, then don't worry about it.
+Ncview runs OK without it, but ncview won't automatically format any udunits-style
+date string in a more readable format unless the udunits package is installed.
+
+
+Short version of installation instructions, presuming everything goes well:
+	1) ./configure
+	2) make
+	3) make install (easiest if you are super-user; otherwise, see below)
+
+
+Medium version of installation instructions, presuming a few directories
+are in unusual locations:
+	1) ./configure \
+		--with-netcdf_incdir=dir_with_netcdf.h \
+		--with-netcdf_libname=name_of_netcdf_library \
+		--with-netcdf_libdir=dir_with_netcdf_library \
+		--with-udunits_incdir=dir_with_udunits.h \
+		--with-udunits_libdir=dir_with_libunits.a 
+	You don't need to specify all of these, only the ones that
+	can't be found by the configure script.  The script will tell
+	you if it can't find the netCDF files, and stop.  If it can't
+	find the udunits files, then it will continue, but not build
+	that part of ncview.
+	2) make
+	3) make install (easiest if you are super-user; otherwise, see below)
+		
+
+Long version of installation instructions
+
+1) Decide whether you want support for the "udunits" package.
+   If you do, make it separately (source is included in the
+   ncview package, strictly as a convenience.  Udunits is
+   available from: http://www.unidata.ucar.edu/packages/udunits/index.html).
+   Make the package and set environmental variable UDUNITS_PATH
+   to the location of the "udunits.dat" file.  
+
+2) Run the configure script.  By default, everything will be installed
+   under the /usr/local directory hierarchy.  If you are NOT intending
+   to install as super-user -- for example, if you don't have super-user
+   permissions on the machine -- then you should run configure with 
+   the option "--prefix=$HOME".  This will install things under your home
+   directory instead of the /usr/local directory.
+
+   There are other useful options to configure.  In particular, you might
+   have the netCDF include and library files in non-standard places.  In
+   that case, you need to tell configure where they are, by using the
+   appropriate arguments to configure, as follows:
+
+./configure \
+	--with-netcdf_incdir=dir_with_netcdf.h \
+	--with-netcdf_libname=name_of_netcdf_library \
+	--with-netcdf_libdir=dir_with_netcdf_library \
+	--with-udunits_incdir=dir_with_udunits.h \
+
+   For example, if your netcdf include file (which is named netcdf.h) is
+   in directory /opt/src/netcdf/include and the library file is in
+   /opt/src/netcdf/lib then you would type:
+
+   ./configure  --with-netcdf_incdir=/opt/src/netcdf/include --with-netcdf_libdir=/opt/src/netcdf/lib
+
+3) Once configure runs without errors, type "make".
+
+4) Type "make install".
+
+5) Ncview puts copies of the colormap files (files with extension
+   ".ncmap") in a system-wide directory, whose location defaults to
+   "/usr/local/lib/ncview".  If you are installing in your home
+   directory, these files will end up in "$HOME/lib/ncview".
+
+A test netCDF data file is available from unidata.ucar.edu in file
+/pub/netcdf/sample_data/aP.nc.
+
+A manual entry is included in the distribution, ncview.1.  The
+'install' entry in the Makefile runs ncview.1.sed through sed to
+convert the generic references to the location of the ncview lib
+directory to the specific place applicable to your installation.
+
+To have the udunits part work, the udunits file must be in the proper
+place.  Look in the udunits documentation to find out more about this
+issue. In general, you can set the environmental variable UDUNITS_PATH 
+to the location of the file "udunits.dat", which generally lives in
+directory "etc" of the udunits source tree: "udunits-1.11.7/etc".
+
+To Install by Hand
+------------------
+You can also install by hand if you want.  A quick overview:
+        a) make a /usr/local/lib/ncview directory:
+                mkdir /usr/local/lib/ncview
+        b) put all the colormaps (*.ncmap) and overlays (nc_overlay.*)
+           into that directory:
+                cp *.ncmap nc_overlay.* /usr/local/lib/ncview/.
+        c) copy the Ncview app-defaults file over to the system app
+           defaults directory (usually /usr/lib/X11/app-defaults):
+                cp Ncview /usr/lib/X11/app-defaults/.
+        d) copy ncview itself to /usr/local/bin:
+                cp ncview /usr/local/bin/ncview
+
+Copying, etc.
+-------------
+Ncview is freely redistributable, but is not public domain.
+It is copyright (C) 1993 through 2008 David W. Pierce.
+This program  is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License version 3 as 
+published by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License, version 3, for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+The SciPlot widget is Copyright (c) 1995 Robert W. McMullen
+<rwmcm at orion.ae.utexas.edu>.  You can visit the SciPlot web page at
+http://www.ae.utexas.edu/~rwmcm/SciPlot.html.
+
+------------------------
+David W. Pierce
+6259 Caminito Carrena
+San Diego, CA  92122
+dpierce at ucsd.edu
+

Added: packages/ncview/branches/upstream/current/Makefile.default
===================================================================
--- packages/ncview/branches/upstream/current/Makefile.default	                        (rev 0)
+++ packages/ncview/branches/upstream/current/Makefile.default	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,122 @@
+# Generated automatically from Makefile.in by configure.
+## Makefile.in for ncview   D. Pierce   11/4/2000
+##
+
+################################################################
+## Edit these three to indicate the path for the netcdf include
+## file 'netcdf.h', the name of the netcdf library file, and the
+## path to that library file.
+################################################################
+NETCDFINCDIR = -I/usr/local/include
+NETCDFLIB    = -lnetcdf
+NETCDFLIBDIR = -L/usr/local/lib
+
+################################################################
+## If you DON'T want the udunits support, which will format
+## the time axis properly, then COMMENT OUT the following 
+## four lines.  If you DO want udunits support, set these to
+## the location of the udunits include and library directories.
+################################################################
+INC_UDUNITS   = -DINC_UDUNITS
+UDUNITSINCDIR = -I/usr/local/include
+UDUNITSLIBDIR = -L/usr/local/lib
+UDUNITSLIB    = -ludunits
+
+################################################################
+## Set these to the paths where you want the binary and man page
+## installed when you run "make install".
+################################################################
+BINDIR = /usr/local/bin
+MANDIR = /usr/local/man/man1
+
+#####################################################################
+## Set this to the directory where system-wide .ncmap (colormap) 
+## files will be kept and installed.  Comment this line out if
+## no such directory will be specified.
+#####################################################################
+NCVIEW_LIB_DIR = /usr/local/lib/ncview
+
+######################################################################
+## If needed, *add* here the names of any additional include or library 
+## directories that you requre.  In particular, if the Xaw include 
+## subdirectory isn't a subdirectory of the standard X include directory,
+## you will have to include the place where the the Xaw subdirectory 
+## is in NCVIEWINCDIR.  Generally this won't be a necessary.  Don't
+## delete the $(NETCDFINCDIR) and $(NETCDFLIBDIR) entries!
+################################################################
+OTHERINCDIRS = $(NETCDFINCDIR) $(UDUNITSINCDIR)
+OTHERLIBDIRS = $(NETCDFLIBDIR) $(UDUNITSLIBDIR)
+
+################################################################
+## X11 include directory -- will be something like
+## /opt/X11/include under Solaris, typically
+################################################################
+#INCDIR   = /usr/include/X11
+#INCDIR	= /opt/X11/include	# For Solaris?
+INCDIR =  -I/usr/X11R6/include
+
+################################################################
+## X11 libs needed
+################################################################
+XAWLIB   = -lXaw
+XMULIB   = -lXmu
+XTOOLLIB = -lXt
+XEXTLIB  = -lXext
+XLIB     = -lX11
+
+OBJS = 	ncview.o file.o util.o do_buttons.o		\
+	file_netcdf.o	view.o do_print.o		\
+	epic_time.o interface/interface.o		\
+	interface/x_interface.o interface/dataedit.o	\
+	interface/display_info.o interface/plot_xy.o	\
+	interface/utils.o interface/range.o		\
+	interface/printer_options.o overlay.o		\
+	interface/filesel.o interface/set_options.o	\
+	interface/plot_range.o udu.o SciPlot.o		\
+	interface/cbar.o
+
+HEADERS = ncview.bitmaps.h ncview.includes.h 		\
+	  ncview.defines.h ncview.protos.h		\
+	  nc_overlay.earth.lat-lon.p8deg		\
+	  nc_overlay.lat-lon-grid.10x30			\
+	  nc_overlay.lat-lon-grid.20x60
+
+COLORMAPS = 3gauss.ncmap 3saw.ncmap default.ncmap	\
+	  detail.ncmap hotres.ncmap			\
+	  nc_overlay.earth.lat-lon.p8deg		\
+	  nc_overlay.lat-lon-grid.20x60			\
+	  nc_overlay.lat-lon-grid.10x30
+
+CFLAGS =  -I/usr/X11R6/include $(OTHERFLAGS) $(INC_UDUNITS)
+
+SUFFIXES = 
+
+###########################################################################
+
+.c.o:	$<
+	gcc -g -O2 $(LDOPTIONS) -DNCVIEW_LIB_DIR=\"$(NCVIEW_LIB_DIR)\" \
+		-I. -I$(INCDIR) $(OTHERINCDIRS) -c -o $*.o $<
+
+###########################################################################
+
+all::	ncview
+
+clean::
+	-rm $(OBJS) Makefile 
+
+ncview: $(OBJS)
+	gcc -g -O2 -o ncview $(OBJS) $(LDOPTIONS) $(OTHERLIBDIRS) 	\
+		 -L/usr/X11R6/lib $(NETCDFLIB) $(UDUNITSLIB) $(XAWLIB) $(XMULIB) \
+		 -lSM -lICE $(XTOOLLIB) $(XEXTLIB) $(XLIB)  -lm
+
+ncview.1: ncview.1.sed
+	sed s=NCVIEW_LIB_DIR=$(NCVIEW_LIB_DIR)= < ncview.1.sed > ncview.1
+
+install:: ncview ncview.1 $(COLORMAPS) Ncview
+##	Is variable NCVIEW_LIB_DIR defined? If yes, then make the directory
+##	if it doesn't already exist, and copy the colormap files to it.
+	if test $(NCVIEW_LIB_DIR)x != x; then if test ! -d $(NCVIEW_LIB_DIR); then mkdir -p $(NCVIEW_LIB_DIR); fi; for i in $(COLORMAPS); do chown `whoami` $$i; $(INSTALL) $(INSTDATFLAGS) $$i $(NCVIEW_LIB_DIR); done; fi
+	$(INSTALL) $(INSTBINFLAGS) ncview   $(BINDIR)/ncview
+	$(INSTALL) $(INSTMANFLAGS) ncview.1 $(MANDIR)/ncview.1
+	$(INSTALL) $(INSTDATFLAGS) Ncview   $(XAPPLOADDIR)/Ncview
+

Added: packages/ncview/branches/upstream/current/Makefile.in
===================================================================
--- packages/ncview/branches/upstream/current/Makefile.in	                        (rev 0)
+++ packages/ncview/branches/upstream/current/Makefile.in	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,141 @@
+## Makefile.in for ncview   D. Pierce   11/4/2000
+##
+
+################################################################
+## Edit these three to indicate the path for the netcdf include
+## file 'netcdf.h', the name of the netcdf library file, and the
+## path to that library file.
+################################################################
+NETCDFINCDIR = -I at NETCDF_INCDIR@
+NETCDFLIB    = -l at NETCDF_LIBNAME@
+NETCDFLIBDIR = -L at NETCDF_LIBDIR@
+
+################################################################
+## If you DON'T want the udunits support, which will format
+## the time axis properly, then COMMENT OUT the following 
+## four lines.  If you DO want udunits support, set these to
+## the location of the udunits include and library directories.
+################################################################
+ at DO_UDUNITS_LINE@
+ at DO_UDUNITS_INCDIR@
+ at DO_UDUNITS_LIBDIR@
+ at DO_UDUNITS_LIBNAME@
+
+############################################################
+## If you DON'T want the PPM support (which can make frames
+## from the data you are viewing) then comment out the
+## following lines
+############################################################
+ at DO_PPM_LINE@
+ at DO_PPM_INCDIR@
+ at DO_PPM_LIBDIR@
+ at DO_PPM_LIBNAME@
+
+################################################################
+## Set these to the paths where you want the binary and man page
+## installed when you run "make install".
+################################################################
+BINDIR = @prefix@/bin
+MANDIR = @prefix@/man/man1
+
+#####################################################################
+## Set this to the directory where system-wide .ncmap (colormap) 
+## files will be kept and installed.  Comment this line out if
+## no such directory will be specified.
+#####################################################################
+NCVIEW_LIB_DIR = @prefix@/lib/ncview
+
+######################################################################
+## If needed, *add* here the names of any additional include or library 
+## directories that you requre.  In particular, if the Xaw include 
+## subdirectory isn't a subdirectory of the standard X include directory,
+## you will have to include the place where the the Xaw subdirectory 
+## is in NCVIEWINCDIR.  Generally this won't be a necessary.  Don't
+## delete the $(NETCDFINCDIR) and $(NETCDFLIBDIR) entries!
+################################################################
+OTHERINCDIRS = $(NETCDFINCDIR) $(UDUNITSINCDIR)
+OTHERLIBDIRS = $(NETCDFLIBDIR) $(UDUNITSLIBDIR)
+
+################################################################
+## X11 include directory -- will be something like
+## /opt/X11/include under Solaris, typically
+################################################################
+#INCDIR   = /usr/include/X11
+#INCDIR	= /opt/X11/include	# For Solaris?
+INCDIR = @X_CFLAGS@
+
+################################################################
+## X11 libs needed
+################################################################
+XAWLIB   = -lXaw
+XMULIB   = -lXmu
+XTOOLLIB = -lXt
+XEXTLIB  = -lXext
+XLIB     = -lX11
+
+# Note: do NOT include utCalendar_cal here, that file is #inclded as needed
+
+OBJS = 	ncview.o file.o util.o do_buttons.o		\
+	file_netcdf.o	view.o do_print.o		\
+	epic_time.o interface/interface.o		\
+	interface/x_interface.o interface/dataedit.o	\
+	interface/display_info.o interface/plot_xy.o	\
+	interface/utils.o interface/range.o		\
+	interface/printer_options.o overlay.o		\
+	interface/filesel.o interface/set_options.o	\
+	interface/plot_range.o udu.o SciPlot.o		\
+	interface/RadioWidget.o interface/cbar.o	
+
+HEADERS = ncview.bitmaps.h ncview.includes.h 		\
+	  ncview.defines.h ncview.protos.h		\
+	  nc_overlay.earth.lat-lon.p8deg		\
+	  nc_overlay.lat-lon-grid.10x30			\
+	  nc_overlay.lat-lon-grid.20x60
+
+MYCFLAGS = @CFLAGS@ @X_CFLAGS@ $(INC_UDUNITS) $(INC_PPM)
+
+SUFFIXES = 
+
+INSTALL = @INSTALL@
+
+###########################################################################
+
+.c.o:	$<
+	@CC@ $(MYCFLAGS) $(LDOPTIONS) -DNCVIEW_LIB_DIR=\"$(NCVIEW_LIB_DIR)\" \
+		-I. $(INCDIR) $(OTHERINCDIRS) -c -o $*.o $<
+
+###########################################################################
+
+all::	geteuid ncview
+
+geteuid: geteuid.o
+	@CC@ $(MYCFLAGS) -o geteuid geteuid.c
+
+clean::
+	-rm ncview ncview.exe $(OBJS) Makefile config.cache config.log config.status
+
+ncview: $(OBJS)
+	@CC@ $(MYCFLAGS) -o ncview $(OBJS) $(LDOPTIONS) $(OTHERLIBDIRS)	\
+		@X_LIBS@ $(NETCDFLIB) $(UDUNITSLIB) $(XAWLIB) $(XMULIB) \
+		$(PPMLIB) \
+		@X_PRE_LIBS@ $(XTOOLLIB) $(XEXTLIB) $(XLIB) @X_EXTRA_LIBS@ -lm
+
+ncview.1: ncview.1.sed
+	sed s=NCVIEW_LIB_DIR=$(NCVIEW_LIB_DIR)= < ncview.1.sed > ncview.1
+
+install:: ncview ncview.1 Ncview-appdefaults
+##	Is variable NCVIEW_LIB_DIR defined? If yes, then make the directory
+##	if it doesn't already exist, and copy the colormap files to it.
+	@echo "----------------------------------------------------"
+	@echo "Installing binary in directory $(BINDIR)"
+	@echo "----------------------------------------------------"
+	if test ! -d $(BINDIR); then  mkdir -p $(BINDIR); fi; $(INSTALL) $(INSTBINFLAGS) ncview   $(BINDIR)/ncview
+	@echo "--------------------------------------------------------"
+	@echo "Installing manual in directory $(MANDIR)"
+	@echo "--------------------------------------------------------"
+	if test ! -d $(MANDIR); then mkdir -p $(MANDIR); fi; $(INSTALL) $(INSTMANFLAGS) ncview.1 $(MANDIR)/ncview.1
+	@echo "------------------------------------"
+	@echo "Installing application defaults file"
+	@echo "------------------------------------"
+	/bin/sh ./install-appdef "$(INSTALL) $(INSTMANFLAGS)"
+

Added: packages/ncview/branches/upstream/current/Makefile.solaris
===================================================================
--- packages/ncview/branches/upstream/current/Makefile.solaris	                        (rev 0)
+++ packages/ncview/branches/upstream/current/Makefile.solaris	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,110 @@
+##
+## Makefile for ncview     D. Pierce   13 Aug 2003
+##
+
+################################################################
+## Edit these three to indicate the path for the netcdf include
+## file 'netcdf.h', the name of the netcdf library file, and the
+## path to that library file.
+################################################################
+
+NC_ROOT      = /opt
+
+NETCDFINCDIR = $(NC_ROOT)/include
+NETCDFLIBDIR = $(NC_ROOT)/lib
+
+NETCDFLIB    = -lnetcdf
+
+################################################################
+## Set these to the paths where you want the binary and man page
+## installed when you run "make install".
+################################################################
+BINDIR = $(NC_ROOT)/bin
+
+#MANDIR = /usr/man/man1
+MANDIR = /opt/man/man1
+
+#####################################################################
+## Set this to the directory where system-wide .ncmap (colormap) 
+## files will be kept and installed.  Comment this line out if
+## no such directory will be specified.
+#####################################################################
+NCVIEW_LIB_DIR = $(NETCDFLIBDIR)/ncview
+
+######################################################################
+## If needed, *add* here the names of any additional include or library 
+## directories that you requre.  In particular, if the Xaw include 
+## subdirectory isn't a subdirectory of the standard X include directory,
+## you will have to include the place where the the Xaw subdirectory 
+## is in NCVIEWINCDIR.  Generally this won't be a necessary.  Don't
+## delete the $(NETCDFINCDIR) and $(NETCDFLIBDIR) entries!
+################################################################
+OTHERINCDIRS = -I$(NETCDFINCDIR) -I/usr/openwin/include -I/usr/openwin/include/X11
+OTHERLIBDIRS = -L$(NETCDFLIBDIR) -L/usr/openwin/lib -lnsl
+
+################################################################
+## If you want to use GNU's C compiler instead of your machine's
+## default C compiler, then uncomment the following line.
+################################################################
+#CC	= gcc
+
+############################################################
+## You should not have to edit anything below this line
+############################################################
+
+SRCS	= ncview.c file.c util.c do_buttons.c		\
+	  interface.c x_interface.c file_netcdf.c	\
+	  view.c SciPlot.c epic_time.c
+
+OBJS = 	ncview.o file.o util.o do_buttons.o		\
+	file_netcdf.o	view.o do_print.o		\
+	interface/interface.o 				\
+	interface/x_interface.o interface/dataedit.o	\
+	interface/display_info.o interface/plot_xy.o	\
+	interface/utils.o interface/range.o		\
+	interface/printer_options.o overlay.o		\
+	interface/filesel.o interface/set_options.o	\
+	interface/plot_range.o udu.o SciPlot.o		\
+	epic_time.o interface/cbar.o
+
+HEADERS = ncview.bitmaps.h ncview.includes.h 		\
+	  ncview.defines.h ncview.protos.h
+
+COLORMAPS = 3gauss.ncmap 3saw.ncmap default.ncmap	\
+	  detail.ncmap hotres.ncmap
+
+XAWLIB   = -lXaw
+XMULIB   = -lXmu
+XTOOLLIB = -lXt
+XEXTLIB  = -lXext
+XLIB     = -lX11
+
+INCDIR   = /usr/openwin/include/X11
+
+##########################################################################
+
+.c.o:	$<
+	$(CC) $(CFLAGS) $(ARCHFLAG) -DNCVIEW_LIB_DIR=\"$(NCVIEW_LIB_DIR)\" \
+			-I$(INCDIR) $(OTHERINCDIRS) -c  -o $*.o $<
+
+##########################################################################
+
+all:	ncview
+
+clean:	
+	@rm -f $(OBJS)
+
+ncview: $(OBJS)
+	$(CC) -o ncview $(OBJS) $(LDOPTIONS) $(OTHERLIBDIRS) $(NETCDFLIB) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XEXTLIB) $(XLIB) -lm
+
+ncview.1: ncview.1.sed
+	sed s=NCVIEW_LIB_DIR=$(NCVIEW_LIB_DIR)= < ncview.1.sed > ncview.1
+
+install:: ncview ncview.1 $(COLORMAPS) Ncview
+##	Is variable NCVIEW_LIB_DIR defined? If yes, then make the directory
+##	if it doesn't already exist, and copy the colormap files to it.
+	if test $(NCVIEW_LIB_DIR)x != x; then if test ! -d $(NCVIEW_LIB_DIR); then mkdir -p $(NCVIEW_LIB_DIR); fi; for i in $(COLORMAPS); do chown `whoami` $$i; $(INSTALL) $(INSTDATFLAGS) $$i $(NCVIEW_LIB_DIR); done; fi
+	$(INSTALL) $(INSTBINFLAGS) ncview   $(BINDIR)/ncview
+	$(INSTALL) $(INSTMANFLAGS) ncview.1 $(MANDIR)/ncview.1
+	$(INSTALL) $(INSTDATFLAGS) Ncview   $(XAPPLOADDIR)/Ncview
+

Added: packages/ncview/branches/upstream/current/Ncview-appdefaults
===================================================================
--- packages/ncview/branches/upstream/current/Ncview-appdefaults	                        (rev 0)
+++ packages/ncview/branches/upstream/current/Ncview-appdefaults	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,129 @@
+!
+! app-defaults file for Ncview 
+!
+! David W. Pierce   20 January 2006	dpierce at ucsd.edu
+!
+! If this does not match the version of ncview being run, an error
+! is generated.  This helps to make sure that the proper app-defaults
+! file is being used.
+Ncview*version:		1.93
+!
+! If this is 1, then ncview will code the dimensionality of the displayable
+! variables (in a list) by setting their color to the colors below.  If this
+! is 0, then no color coding of the dimensionality of the variable is done.
+Ncview*varColors:	1
+!
+Ncview*foreground1d:	grey
+Ncview*foreground2d:	lightblue3
+Ncview*foreground3d:	pink2
+Ncview*foreground4d:	yellow
+Ncview*foreground5d:	white
+!
+! If this is 1, then ncview will attempt to automatically put on coastlines
+! if it "thinks" the data is geographical atmospheric data.
+Ncview*autoOverlay:	1
+!
+! Width of the information-giving labels.  If you like wordy titles and
+! long names, you might want to set this to be larger; conversely, if
+! your descriptions are terse, you might want to set this smaller.
+Ncview*labelWidth:	555
+!
+! Default size, in PIXELS, to set a newly opening window to.
+Ncview*blowupDefaultSize:  300
+!
+! Width of the dimension name buttons.  If you use a 
+! large font, or long dimension names, you might want 
+! to increase this.
+Ncview*dimLabelWidth:	95
+!
+! Width of the variable name buttons.  If you use a 
+! large font, or long variable names, you might want 
+! to increase this.
+Ncview*varLabelWidth:	114
+!
+! Number of variables per row of the variable selection box.
+! Might want to reduce if you increased 'dimLabelWidth'
+Ncview*nVarsPerRow:	4
+!
+! Some people like "exit"
+Ncview*quit*label:	Quit
+!
+! It may be desirable to set these, depending on what colors
+! you typically have loaded:
+Ncview*foreground:	azure
+Ncview*background:	SteelBlue
+Ncview*PlotXY_canvas*background: LightSteelBlue
+!
+Ncview*font:			-*-helvetica-*-r-*-*-14-*-*-*-*-*-*-*
+!
+Ncview*ccontour*borderWidth: 	0
+!
+Ncview*label2.justify:	Left
+Ncview*label3.justify:	Left
+Ncview*label4.justify:	Left
+Ncview*label5.justify:	Left
+!
+Ncview*label2*borderWidth:	0
+Ncview*label3*borderWidth:	0
+Ncview*label4*borderWidth:	0
+Ncview*label5*borderWidth:	0
+!
+!*optionbox.borderWidth:	0
+!
+!*varselectform.borderWidth:	0
+Ncview*varlist_label*borderWidth:	0
+!
+Ncview*label_row.borderWidth:		0
+Ncview*label_name.borderWidth:	0
+Ncview*label_dimension.borderWidth:	0
+Ncview*label_min.borderWidth:		0
+Ncview*label_cur.borderWidth:		0
+Ncview*label_max.borderWidth:		0
+Ncview*label_units.borderWidth:	0
+!
+Ncview*ydimselectbox.borderWidth:	0
+Ncview*ydimlist_label.borderWidth:	0
+!
+Ncview*xdimselectbox.borderWidth:	0
+Ncview*xdimlist_label.borderWidth:	0
+!
+! Modifications to standard button presses.  My convention
+! is that mouse button3 indicates a reversal of standard procedure,
+! whereas holding down the control key while pressing a mouse button 
+! indicates an accelerated version of the standard procedure.  You 
+! might prefer something different.  '_mod2' versions are
+! the accelerated version of the standard routines, '_mod3'
+! are backwards versions of the standards, and '_mod4' are
+! accelerated backwards versions of the standard routines.  
+! '_mod1' are the standard versions themselves.  
+!
+! backup actions
+Ncview*cmap.translations:   #augment <Btn3Down>,<Btn3Up>: cmap_mod3()
+Ncview*Range.translations:  #augment <Btn3Down>,<Btn3Up>: range_mod3()
+!
+! accelerated actions
+Ncview*reverse.translations:     #override Ctrl<Btn1Down>,<Btn1Up>: reverse_mod2()
+Ncview*back.translations:        #override Ctrl<Btn1Down>,<Btn1Up>: back_mod2()
+Ncview*forward.translations:     #override Ctrl<Btn1Down>,<Btn1Up>: forward_mod2()
+Ncview*fastforward.translations: #override Ctrl<Btn1Down>,<Btn1Up>: fastforward_mod2()
+!
+! Accelerated, backwards, and accelerated backwards actions
+Ncview*blowup.translations: #override Ctrl<Btn3Down>,<Btn3Up>: blowup_mod4()\n\
+				<Btn3Down>,<Btn3Up>: blowup_mod3()\n\
+				Ctrl<Btn1Down>,<Btn1Up>: blowup_mod2()
+! Add our own redraw routine
+!*ccontour.translations:	   #override <Expose>: redraw_ccontour()
+!
+Ncview*scrollspeed.translations: #override <Btn1Down>:StartScroll(Continuous) MoveThumb() NotifyThumb() \n\
+					<Btn1Motion>:MoveThumb() NotifyThumb()
+!
+! Various actions you can do in the color contour window.
+Ncview*ccontour.translations:	   #augment\n\
+				Ctrl<Btn1Up>: do_set_min_from_curdata()\n\
+				<Key>q: do_quit_app()\n\
+				<Btn1Up>: do_plot_xy()\n\
+				Ctrl<Btn1Motion>: do_set_min_from_curdata()\n\
+				Ctrl<Btn3Up>: do_set_max_from_curdata()\n\
+				Ctrl<Btn3Motion>: do_set_max_from_curdata()\n\
+				<Btn2Up>: do_set_dataedit_place()\n\
+				<Btn2Motion>: do_set_dataedit_place()


Property changes on: packages/ncview/branches/upstream/current/Ncview-appdefaults
___________________________________________________________________
Added: svn:executable
   + 

Added: packages/ncview/branches/upstream/current/README
===================================================================
--- packages/ncview/branches/upstream/current/README	                        (rev 0)
+++ packages/ncview/branches/upstream/current/README	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,66 @@
+Ncview 1.93d  June 13, 2008 -- (C) David W. Pierce
+--------------------------------------------------
+
+Overview: What Ncview *is*.
+---------------------------
+This is the source for "ncview", a X Windows (Release 4 or higher) 
+visual browser for netCDF data format files.  Ncview displays a 
+2-dimensional, color representation of data in a netCDF file.  You 
+can animate the data in time (making simple movies), flip or enlarge 
+the picture, scan through various axes, change colormaps, etc.  You
+can also plot the data in X-Y plots and then print those, courtesy 
+of the SciPlot widget from Robert W. McMullen <rwmcm at orion.ae.utexas.edu>.
+
+What Ncview *isn't*.
+--------------------
+Ncview is *not* an analysis package.  There are several excellent 
+commercial packages available for that.  Rather, its purpose in life 
+is to view movies or simple plots of data stored in netCDF format
+files quickly, easily, and simply.  To view your data in a 'movie',
+all you do is fire Ncview up and press a couple buttons--that's it!  To
+make a plot, just click on the movie!  By contrast, analysis programs 
+often require a lot of overhead massaging the data before you can do 
+much.
+
+I've tested this on DEC 5000s and DEC Alphas, IBM RS/6000s, SGI
+workstations, and Linux machines.  It should also work with Suns now.
+If you port it to a new platform, please mail me any changes which 
+are required!  
+
+Getting ncview
+--------------
+The latest version of Ncview is available for anonymous ftp from
+cirrus.ucsd.edu:/pub/ncview.
+If you can't compile it, and need binaries, e-mail me and I'll 
+see if I can find binaries for your platform.
+
+Building ncview
+---------------
+see file "INSTALL"
+
+Copying, etc.
+-------------
+Ncview is freely redistributable, but is not public domain.
+It is copyright (C) 1993 through 2003 David W. Pierce.
+This program  is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License version 1 as 
+published by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License, version 1, for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+The SciPlot widget is Copyright (c) 1995 Robert W. McMullen
+<rwmcm at orion.ae.utexas.edu>.  You can visit the SciPlot web page at
+http://www.ae.utexas.edu/~rwmcm/SciPlot.html.
+
+------------------------
+David W. Pierce
+6259 Caminito Carrena
+San Diego, CA  92122
+dpierce at ucsd.edu

Added: packages/ncview/branches/upstream/current/README.sgi
===================================================================
--- packages/ncview/branches/upstream/current/README.sgi	                        (rev 0)
+++ packages/ncview/branches/upstream/current/README.sgi	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,7 @@
+Note:  At the moment this only compiles under the 32 bit ("-32")
+compiler.  I hope to fix this in the future.  For now, you need
+to have a 32 bit version of the netcdf library to link to if you
+want to build from scratch.  Otherwise, you can contact me about
+getting a pre-made binary version for IRIX 6.2.
+
+dpierce at ucsd.edu

Added: packages/ncview/branches/upstream/current/README.solaris
===================================================================
--- packages/ncview/branches/upstream/current/README.solaris	                        (rev 0)
+++ packages/ncview/branches/upstream/current/README.solaris	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,26 @@
+Solaris machines seem to have everything in weird
+places, if you are used to any other kind of Unix.
+The distribution includes two files, "Makefile.solaris", 
+and "Makefile.solaris.old".  The first was provided
+curtesy of R. Zagar of the College of Marine Studies,
+University of Delaware, and the second was one that
+I hacked up some time ago when I had access to a
+Solaris machine.  Try the "Makefile.solaris" first.
+
+If you have a Solaris machine and you want to make
+ncview, do the following:
+
+type "cp Makefile.solaris Makefile"  (or "cp Makefile.solaris.old Makefile")
+type "make"
+type "make install"
+
+I found on the machine I had access to, to run 
+ncview, I have to set the following environmental
+variable:
+
+ setenv LD_LIBRARY_PATH /usr/openwin/lib
+
+Otherwise, I got an error like this:
+
+ld.so.1: ncview: fatal: libXaw.so.5: can't open file: errno=2
+

Added: packages/ncview/branches/upstream/current/README_LOCAL
===================================================================
--- packages/ncview/branches/upstream/current/README_LOCAL	                        (rev 0)
+++ packages/ncview/branches/upstream/current/README_LOCAL	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1 @@
+./configure --x-libraries=/usr/X11R6/lib64

Added: packages/ncview/branches/upstream/current/README_WISH_LIST
===================================================================
--- packages/ncview/branches/upstream/current/README_WISH_LIST	                        (rev 0)
+++ packages/ncview/branches/upstream/current/README_WISH_LIST	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,11 @@
+x-y transpose
+
+dynamic scale_fact/add_offset (i.e., change in every file)
+
+use http client if available?  www.innovation.ch/java/HTTPClient/
+
+better heurestic on setting displayed data range (i.e., center it if substantially around zero)
+
+button to make range "smaller around zero"
+
+ability to display colorbar when '-extra' specified

Added: packages/ncview/branches/upstream/current/RELEASE_NOTES
===================================================================
--- packages/ncview/branches/upstream/current/RELEASE_NOTES	                        (rev 0)
+++ packages/ncview/branches/upstream/current/RELEASE_NOTES	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,26 @@
+1.93d: 13 June 2008
+
+* Thanks to Seth Olsen for contributing the code to sort the variables 
+  menus.
+
+1.75: 20 March 1999
+
+* This release adds much improved support for Linux boxes.  In general,
+  any depth of your server should work -- 8, 16, 24, or 32 bits.
+  Let me know if you have a problem with this.
+
+* Support has been added for converting the indicated time to a calendar
+  date IF the netCDF file's time axis has a "units" attribute that follows
+  the udunits conventions (see info on udunits at: 
+  http://www.unidata.ucar.edu/packages/udunits/index.html).  Time units 
+  in this syntax are typically something like "days since 1990-01-01".
+  If your data file follows these conventions, then the day number will
+  automatically be shown as a calendar date rather than the (not useful)
+  day number.  I.e., "10 Jan 1995" will be shown instead of "Day 3783" 
+  (or whatever).  This should work in the X-Y popup graph as well, but
+  not yet in the range-setting popups.
+
+* Compilation on Crays now works out of the box.
+
+* Fixed but that caused core dumps after selecting variables that
+  have all 0 as all their entries.

Added: packages/ncview/branches/upstream/current/SciPlot.1
===================================================================
--- packages/ncview/branches/upstream/current/SciPlot.1	                        (rev 0)
+++ packages/ncview/branches/upstream/current/SciPlot.1	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,685 @@
+.TH "SciPlot Widget" 3X "23 Feb 1995" "Version 1.12"
+.SH NAME
+SciPlot \- a Widget to display scientific plots
+.SH OVERVIEW
+The SciPlot Widget is a widget capable of plotting cartesian or polar graphs,
+including logarithmic axes in cartesian plots.  The widget is subclassed
+directly from the Core widget class, which means that it does not depend upon
+any other widget set.  It may be freely used with Athena, Motif, or the Open
+Look/Xview widget sets.  (If the SciPlot widget is compiled with the flag
+"MOTIF" defined, the widget will be subclassed from XmPrimitive, allowing
+keyboard traversal of the widget.  If "MOTIF" is not defined, the widget will
+still operate with Motif, but will not respond to events.)
+.SH FEATURES
+Features provided in the widget include the following:
+.sp
+.TS
+center;
+l.
+Cartesian or Polar plots
+Automatic or manual axis scales
+Logarithmic scales for cartesian plot
+Degrees or radians for polar angles
+Axis labeling
+Legend drawing
+Multiple lines per plot
+Various symbols and line styles
+Color support
+User font selection
+PostScript (EPS) output
+.TE
+.sp
+.SH USAGE
+To use the SciPlot widget in an application, include the three source code
+files SciPlot.c, SciPlot.h, and SciPlotP.h with the rest of the source code
+for the application.  Include the object SciPlot.o in the Makefile rule that
+compiles the application.
+
+If it is important for the widget to respond to Motif keyboard traversal or
+any events while in a Motif program, define the keyword "MOTIF" for the C
+compiler.  In a Makefile, a commom place to put this definition is in a
+variable called "DEFINES".  The line in the Makefile would look like this:
+.sp
+.nf
+	DEFINES=-DMOTIF
+.fi
+.sp
+In source code that uses the SciPlot widget, include the following two header
+files before references to the plot widget:
+.sp
+.nf
+#include <X11/Intrinsic.h>
+#include "SciPlot.h"
+.fi
+.sp
+To create the SciPlot widget, use the following code as an example:
+.sp
+.nf
+plotWidget=XtVaCreateManagedWidget("plot2",sciplotWidgetClass,parent,
+		XtNheight, 250,
+		XtNwidth, 250,
+		XtNplotTitle, "Demo of Plot Widget",
+		XtNxLabel, "X Axis (units)",
+		XtNyLabel, "Y Axis (units)",
+		XtNchartType, XtPOLAR,
+		XtNdegrees, True,
+		NULL);
+.fi
+.sp
+This example creates a 250x250 polar plot widget as a child of parent,
+using degrees as the angle measurement unit.
+
+Data is plotted on the graph in groups called \fIlists\fP.  Each \fIlist\fP
+consists of a group of coordinates that will be connected together by a drawn
+line, and share the same point style, point color, line style, line color and
+legend label.  Data is added to the widget using convenience functions only. 
+There is no current provision to add data via the argument list.
+
+An example using one of the convenience functions is given below:
+.sp
+.nf
+double rlist[]={14.,18.,22.,26.,30.,34.,38.,42.};
+double tlist[]={30.,60.,90.,120.,150.,180.,270.,355.};
+int line1;
+.fi
+.sp
+
+.nf
+line1=SciPlotListCreateFromDouble(plotWidget,
+		8,rlist,tlist,"List 1");
+.fi
+.sp
+
+The variable line1 is the identifier of the \fIlist\fP that will be needed to
+modify the \fIlist\fP by the other convenience functions that operate on
+\fIlists\fP.
+
+This example adds a \fIlist\fP to be plotted in plotWidget.  If plotWidget was
+created using the call to XtVaCreateManagedWidget above, the line would be
+added to a polar plot, where the angles in tlist would be interpreted as
+degrees.
+
+There are other convenience functions to specify colors and styles of the
+points and lines drawn in the Plot widget, as well as functions to pick
+the colors used and others to update previously defined \fIlists\fP.  See the
+section "PUBLIC FUNCTIONS" below for descriptions of all of the convenience
+functions.
+.SH COLOR
+The SciPlot widget fully supports color on displays which also support color.
+By default, two colors are allocated at creation time:  black for the
+foreground, and white for the background.  For the SciPlot widget to use any
+other color, one of the color convenience functions must be used to allocate
+a color in the global colormap.
+
+Colors are indicated by an integer returned from the color allocation
+convenience functions.  The two default colors occupy the first two spaces
+in the color table, where the default background (white) is number 0, and the
+default foreground (black) is number 1.
+.SH FONTS
+Fonts used by the SciPlot widget are referenced using special notation.  This
+non-standard notation was used to be able to easily convert between PostScript
+and X11 notation, and as a result, only a subset of the fonts that are
+available in both X11 and PostScript are available.
+
+Fonts are referenced by using predefined keywords to indicate the typeface,
+style, and point size.  Each keyword is an integer value defined in SciPlot.h,
+and a complete font definition is created by logically or-ing keywords together.
+
+Supported fonts and styles are listed below:
+.sp
+.TS
+center;
+c c
+l l.
+Font Name	Description
+.sp
+XtFONT_TIMES	Times
+XtFONT_COURIER	Courier (monospaced font)
+XtFONT_HELVETICA	Helvetica
+XtFONT_LUCIDA	Lucida
+XtFONT_LUCIDASANS	Lucida Sans Serif
+XtFONT_NCSCHOOLBOOK	New Century Schoolbook
+.TE
+.sp
+.TS
+center;
+c c
+l l.
+Style Name	Description
+.sp
+XtFONT_BOLD	Bold
+XtFONT_ITALIC	Italic
+XtFONT_BOLD_ITALIC	Bold and Italic
+.TE
+.sp
+A font is specified by or-ing together these keywords, plus the size in points.
+Some examples follow:
+.sp
+.nf
+12 point Times, bold:
+	XtFONT_TIMES|XtFONT_BOLD|12
+	
+10 point Courier:
+	XtFONT_COURIER|10
+	
+16 point Lucida, bold and italic:
+	XtFONT_LUCIDA|XtFONT_BOLD_ITALIC|16
+.fi
+.sp
+Note that XtFONT_BOLD_ITALIC is simply shorthand for XtFONT_BOLD|XtFONT_ITALIC
+.SH POINT STYLES
+The SciPlot widget is capable of drawing markers at each data point.  There are
+19 predefined point marker definitions:
+.sp
+.TS
+center;
+c c
+l l.
+Style Name	Description
+.sp
+XtMARKER_NONE	no point marker drawn
+XtMARKER_CIRCLE	open circle
+XtMARKER_SQUARE	square
+XtMARKER_UTRIANGLE	triangle (pointing up)
+XtMARKER_DTRIANGLE	triangle (pointing down)
+XtMARKER_LTRIANGLE	triangle (pointing left)
+XtMARKER_RTRIANGLE	triangle (pointing right)
+XtMARKER_DIAMOND	diamond
+XtMARKER_HOURGLASS	hourglass shape
+XtMARKER_BOWTIE	bowtie shape
+XtMARKER_FCIRCLE	filled variants of the above...
+XtMARKER_FSQUARE	
+XtMARKER_FUTRIANGLE	
+XtMARKER_FDTRIANGLE	
+XtMARKER_FLTRIANGLE	
+XtMARKER_FRTRIANGLE	
+XtMARKER_FDIAMOND	
+XtMARKER_FHOURGLASS	
+XtMARKER_FBOWTIE	
+.TE
+.SH LINE STYLES
+For each \fIlist\fP in the SciPlot widget, one of the following styles may be used to
+draw the lines that connect each point in the \fIlist\fP:
+.sp
+.TS
+center;
+c c
+l l.
+Style Name	Description
+.sp
+XtLINE_NONE	no line (only points drawn)
+XtLINE_SOLID	solid line (the default)
+XtLINE_DOTTED	dotted line
+XtLINE_WIDEDOT	widely spaced dotted line
+.TE
+.SH POSTSCRIPT OUTPUT
+Encapsulated PostScript (EPS) files of the plot displayed in the SciPlot widget
+may be generated.  These files are suitable for printing or importing into
+documents that can handle the EPS format.  Color is ignored when creating the
+EPS files, however.
+.SH NEW RESOURCES
+Resources for the SciPlot widget are documented below, also showing the default
+values.
+.sp
+.TS
+center;
+c c c c
+l l l l.
+Name	Class	Type	Default
+.sp
+XtNaxisFont	XtCSciPlotFont	int	*1
+XtNchartType	XtCMargin	int	XtCARTESIAN
+XtNdegrees	XtCBoolean	Boolean	True
+XtNdrawMajor	XtCBoolean	Boolean	True
+XtNdrawMajorTics	XtCBoolean	Boolean	True
+XtNdrawMinor	XtCBoolean	Boolean		True
+XtNdrawMinorTics	XtCBoolean	Boolean	True
+XtNlabelFont	XtCSciPlotFont	int	*2
+XtNlegendLineSize	XtCMargin	int	16
+XtNlegendMargin	XtCMargin	int	3
+XtNmargin	XtCMargin	int	5
+XtNplotTitle	XtCString	String	"Plot"
+XtNshowLegend	XtCBoolean	Boolean	True
+XtNshowTitle	XtCBoolean	Boolean	True
+XtNshowXLabel	XtCBoolean	Boolean	True
+XtNshowYLabel	XtCBoolean	Boolean	True
+XtNtitleFont	XtCSciPlotFont	int	*3
+XtNtitleMargin	XtCMargin	int	8
+XtNxLabel	XtCString	String	"X Axis"
+XtNyLabel	XtCString	String	"Y Axis"
+XtNxLog	XtCBoolean	Boolean	False
+XtNyLog	XtCBoolean	Boolean	False
+XtNxOrigin	XtCBoolean	Boolean	False
+XtNyOrigin	XtCBoolean	Boolean	False
+.TE
+.sp
+.nf
+Notes:
+*1:	10 point Times
+*2:	18 point Times
+*3:	24 point Helvetica
+.fi
+.sp
+
+.IP XtNchartType
+Specifies a the type of chart to be drawn.  Currently, two types are
+available:  XtCARTESIAN = cartesian (X-Y) plot, XtPOLAR = polar plot.
+
+.IP XtNdegrees
+Sets the type of angular unit measurement:  True=degrees,
+False=radians.
+
+.IP XtNdrawMajor
+Controls the display of major gridlines.
+
+.IP XtNdrawMajorTics
+Controls the display of major tic marks on the axes.
+
+.IP XtNdrawMinor
+Controls the display of minor gridlines.
+
+.IP XtNdrawMinorTics
+Controls the display of minor tic marks on the axes.
+
+.IP XtNlabelFont
+Names the font for use on the axis labels, as well as the numbers
+that mark the scale for each axis.
+
+.IP XtNlegendLineSize
+The length (in pixels) of the small lines used to show the line style
+and color in the legend box.
+
+.IP XtNlegendMargin
+Sets the border margin (in pixels) between the legend box outline and
+anything contained in it. Also controls the spacing between the line
+sample and the text, and the vertical spacing between legend entries.
+
+.IP XtNmargin
+The spacing (in pixels) of the plot with the border of the widget.
+
+.IP XtNplotTitle
+This is the title of the plot that is drawn along the lower border of
+the widget.
+
+.IP XtNshowLegend
+If True, the legend block is drawn.
+
+.IP XtNshowTitle
+If True, the plot title is drawn.
+
+.IP XtNshowXLabel
+If True, the X axis (or the polar axis) label is drawn.
+
+.IP XtNshowYLabel
+If True, the Y axis label is drawn.
+
+.IP XtNtitleFont
+This font is used for the title of the plot.
+
+.IP XtNtitleMargin
+Spacing (in pixels) between the plot and the title.
+
+.RS
+.RE
+.nf
+XtNxLabel
+XtNyLabel
+(Cartesian only.)
+.fi
+.RS
+Sets the label for each axis.
+.RE
+.sp
+.nf
+XtNxLog
+XtNyLog
+(Cartesian only.)
+.fi
+.RS
+Controls the logarithmic scales of the X and Y axes.  If either of
+the resources is set to True, the corresponding axis will display in
+logarithmic units.  Note that log axes cannot display numbers less
+than or equal to zero, so only points with values on that axis greater
+than zero will be plotted.
+.RE
+.sp
+.nf
+XtNxOrigin
+XtNyOrigin
+(Cartesian only.)
+.fi
+.RS
+If True, these resources force the origin of their respective axes to
+be included in the plot.  If False, the displayed range only shows
+data between the minimum and maximum values along the named axis.
+.RE
+
+.SH PUBLIC FUNCTIONS
+The SciPlot widget uses an abstracted type "real" for its internal
+representation of floating point values.  By default, it is typedeffed to
+float.  Some of the convenience functions may depend on this real data type,
+but in general, separate functions will be provided depending upon a data
+type of float or double.
+
+Note that any changes to the widget are not reflected until a call to the
+public function SciPlotUpdate().  This includes any of the functions that
+add or remove \fIlists\fP, or change plot styles.  Any changes accomplished
+through XtVaSetValues, however, automatically updates the widget.
+
+.nf
+int
+SciPlotAllocNamedColor(w,name)
+Widget w;
+char *name;
+.fi
+.RS
+Attempts to allocate a color in the widget's colormap by using the
+standard X color name database.
+.sp	
+Returns a unique integer color ID greater than 1 if successful in
+allocating the named color.  If unsuccessful, it returns a 1, which
+is the default foreground color black.
+.RE
+
+.nf
+int
+SciPlotAllocRGBColor(w,r,g,b)
+Widget w;
+int r,g,b;
+.fi
+.RS
+Tries to allocate the color named by the r, g, and b parameters.  Note
+that these are integers ranging from 0 to 255, not 0 to 65535 as in
+X functions.
+.sp	
+As the previous function, it returns a number greater than 1 indicating
+that it found and allocated the new color.  If it returns 1, it could
+not allocate the color, and returned the value for the default
+foreground.
+.RE
+
+.nf
+void
+SciPlotExportData(w,fd)
+Widget w;
+FILE *fd;
+.fi
+.RS
+Writes to the file (must already by opened) referenced by fd a summary of
+the state of the SciPlot widget.  The columns of data are separated by tab
+characters, so with minor editing, the file generated should be importable by
+many commercial graphing programs.
+.RE
+
+.nf
+int
+SciPlotListCreateFromDouble(w,num,xlist,ylist,legend)
+Widget w;
+int num;
+double *xlist,*ylist;
+char *legend;
+.fi
+.RS
+Creates a \fIlist\fP from the data given in the arrays xlist and ylist.
+Both arrays must have num entries.  The parameter legend is the name
+of this \fIlist\fP, and is drawn in the legend box.  The initial colors (for
+both the points and the line) are set to black, the initial point
+style is set to a square, and the initial line style is solid.
+.sp	
+Returns an ID number for the newly created \fIlist\fP.  (Don't forget to
+call SciPlotUpdate().)
+.RE	
+
+.nf
+int
+SciPlotListCreateFromFloat(w,num,xlist,ylist,legend)
+Widget w;
+int num;
+float *xlist,*ylist;
+char *legend;
+.fi
+.RS
+Same as SciPlotListCreateFromDouble, except takes arrays of type float.
+.sp	
+Returns an ID number for the newly created \fIlist\fP.  (Don't forget to
+call SciPlotUpdate().)
+.RE
+
+.nf
+int
+SciPlotListDelete(w,list_id)
+Widget w;
+int list_id;
+.fi
+.RS
+Deletes the \fIlist\fP referenced by the ID number list_id.  (Don't forget to
+call SciPlotUpdate().)
+.RE
+
+.nf
+void
+SciPlotListSetStyle(w,list_id,pcolor,pstyle,lcolor,lstyle)
+Widget w;
+int list_id;
+int pstyle,pcolor,lstyle,lcolor;
+.fi
+.RS
+Sets the styles of the \fIlist\fP with an ID number of list_id.  See the
+sections COLOR, POINT STYLES and LINE_STYLES for descriptions of the
+available options.  (Don't forget to call SciPlotUpdate().)
+.RE
+
+.nf
+void
+SciPlotListUpdateFromDouble(w,list_id,num,xlist,ylist)
+Widget w;
+int list_id,num;
+double *xlist,*ylist;
+.fi
+.RS
+Replaces the data in the \fIlist\fP referenced by list_id with the new data
+contained in the arrays xlist and ylist.  Both xlist and ylist must
+be arrays of type double, and have num parameters.
+
+Note that the \fIlist\fP to be updated may have been originally created with
+any of the creation convenience functions, not only with the functions that
+require type double.  (Don't forget to call SciPlotUpdate().)
+.RE
+
+.nf
+void
+SciPlotListUpdateFromFloat(w,list_id,num,xlist,ylist)
+Widget w;
+int list_id,num;
+float *xlist,*ylist;
+.fi
+.RS
+Same as SciPlotListUpdateFromDouble, but takes arrays of type float.
+(Don't forget to call SciPlotUpdate().)
+.RE
+
+.nf
+void
+SciPlotSetBackgroundColor(w,color)
+Widget w;
+int color;
+.fi
+.RS
+Sets the background color of the widget to the color specified.  Note that
+the color ID number is obtained from one of the two functions
+SciPlotAllocNamedColor or SciPlotAllocRGBColor.
+.RE
+
+.nf
+void
+SciPlotSetForegroundColor(w,color)
+Widget w;
+int color;
+.fi
+.RS
+Sets the default foreground color to the color specified.  (See the note about
+color IDs above.)  This color is used as the default for the axis and legend
+box lines, as well as all of the text that appears in the widget.  PostScript
+output remains in monochrome, however.
+.RE
+
+.nf
+void
+SciPlotSetXAutoScale(w)
+Widget w;
+
+(Cartesian only.)
+.fi
+.RS
+Forces the widget to automatically scale the X axis based on the minimum
+and maximum values determined from all of the \fIlists\fP.
+(Don't forget to call SciPlotUpdate().)
+.RE
+
+.nf
+void
+SciPlotSetXUserScale(w,min,max)
+Widget w;
+float min,max;
+
+(Cartesian only, and not in logarithmic mode.)
+.fi
+.RS
+Forces the widget to display the X axis range based on the specified minimum
+and maximum values.
+(Don't forget to call SciPlotUpdate().)
+.RE
+
+.nf
+void
+SciPlotSetYAutoScale(w)
+Widget w;
+
+(Cartesian only.)
+.fi
+.RS
+Forces the widget to automatically scale the Y axis based on the minimum
+and maximum values determined from all of the \fIlists\fP.
+(Don't forget to call SciPlotUpdate().)
+.RE
+
+.nf
+void
+SciPlotSetYUserScale(w,min,max)
+Widget w;
+float min,max;
+
+(Cartesian only, and not in logarithmic mode.)
+.fi
+.RS
+Forces the widget to display the Y axis range based on the specified minimum
+and maximum values.
+(Don't forget to call SciPlotUpdate().)
+.RE
+
+.nf
+void
+SciPlotUpdate(w)
+Widget w;
+.fi
+.RS
+This function simply causes a recalculation of all internal parameters,
+and redraws the plot.  Call this function after adding, deleting,
+or changing \fIlists\fP to force the Widget to redraw itself.
+.RE
+
+.nf
+Boolean
+SciPlotPSCreate(w,filename)
+Widget w;
+char *filename;
+.fi
+.RS
+This function generates an Encapsulated PostScript file of the
+current contents of the plot widget, sized to fit on an entire page.  
+Colors are ignored, producing a PostScript file that is black and
+white only.
+.sp
+The filename parameter should include the pathname, if required.
+.sp
+Returns True indicating that the file was successfully created.  Any
+error in file creation or in the subsequent writes to the file will
+cause the subroutine to return False.
+.RE	
+
+.SH NOTES
+This code was developed on an IBM RS/6000 running AIX 3.2.4 and X11R5.  It
+was also tested on two other machines: a DEC Alpha/AXP running OSF/1 3.0
+with X11R5; and an SGI Indigo running IRIX 4.0.5 with X11R4.  I have had
+reports versions running on HP-UX systems, but have not personally
+tested this widget on machines other those listed.
+
+The vertical text drawing routine is based on the "fill stippled" idea that
+I first saw in the code xvertext-5.0 by Alan Richardson
+(mppa3 at syma.sussex.ac.uk).
+
+The first X11 plotting widget that I saw was the libXG package
+written by Sundar Narasimhan (sundar at ai.mit.edu).  The libXG plotting widget
+Graph is based on a much more general widget called Display, which provides
+device independent 2D (and 3D) graphics.
+
+My attempts to change the Graph widget to do what I liked it to do led me to
+start from scratch and write this SciPlot widget.  I didn't need (or want) to
+include the sort of functionality present in the Display widget, so I wrote
+the SciPlot widget as a self-contained widget that uses printer points as
+the basis of the graphics.  Nevertheless, some of the techniques that I used
+are similar to those found in the Graph widget, so Sundar Narasimhan does
+deserve mention for the excellent libXG package.
+.SH BUGS
+The font selection algorithm isn't as robust as it should be when trying to
+choose a replacement for a font; specifically, when the user requests
+a font or a size that doesn't exist in the X server.
+.SH SOURCE LOCATION
+Source code for the SciPlot Widget is available in the archives of
+comp.sources.x, as well as via anonymous ftp on ftp.x.org in /contrib/widgets
+as SciPlot-?.?.tar.gz.
+.SH AUTHOR
+Robert W. McMullen <rwmcm at orion.ae.utexas.edu>
+
+This widget is supplied as freeware, in the hope that it will be useful for
+developers in the X community.  If you do use this widget, I do request that
+you include mention of the SciPlot widget in the documentation.  Also,
+remember to include a copy of the entire copyright and permission notice!
+Thanks.
+
+Patches, improvements, suggestions, and bug reports are welcome at the above
+e-mail address.  I will periodically post patches and improvements to
+ftp.x.org.
+.SH THANKS
+Thanks to the following people for providing fixes and suggestions:
+
+.nf
+Todd Smith <mtsmith at vision1.engr.utk.edu>
+Walter Underwood <wunder at msd.hpl.hp.com>
+Michael Katzmann <michael%vk2bea at secondsource.com>
+John Moyer <jrm at questconsult.com>
+Mike Kienenberger <FXMLK at aurora.alaska.edu>
+.fi
+.SH COPYRIGHT
+Copyright (c) 1995 Robert W. McMullen
+
+Portions of the SciPlot Widget source code, as marked, are:
+.nf
+  Copyright (c) 1993 Alan Richardson (mppa3 at syma.sussex.ac.uk)
+.fi
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that copyright
+notice and this permission notice appear in supporting documentation.  All
+work developed as a consequence of the use of this program should duly
+acknowledge such use.  The author makes no representations about the
+suitability of this software for any purpose.  It is provided "as is" without
+express or implied warranty.
+
+THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
+DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Added: packages/ncview/branches/upstream/current/SciPlot.c
===================================================================
--- packages/ncview/branches/upstream/current/SciPlot.c	                        (rev 0)
+++ packages/ncview/branches/upstream/current/SciPlot.c	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,3475 @@
+/*	define DEBUG_SCIPLOT */
+/*-----------------------------------------------------------------------------
+** SciPlot.c	A generalized plotting widget
+**
+** Widget source code
+**
+** Copyright (c) 1995 Robert W. McMullen
+**
+** Permission to use, copy, modify, distribute, and sell this software and its
+** documentation for any purpose is hereby granted without fee, provided that
+** the above copyright notice appear in all copies and that both that
+** copyright notice and this permission notice appear in supporting
+** documentation.  The author makes no representations about the suitability
+** of this software for any purpose.  It is provided "as is" without express
+** or implied warranty.
+**
+** THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+** ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL
+** THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+** ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+** SOFTWARE.
+*/
+
+#include <math.h>
+
+#include <X11/IntrinsicP.h>
+#include <X11/StringDefs.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "SciPlotP.h"
+
+
+#define offset(field) XtOffsetOf(SciPlotRec, plot.field)
+static XtResource resources[] = {
+	{XtNchartType, XtCMargin, XtRInt, sizeof(int),
+		offset(ChartType), XtRImmediate, (XtPointer)XtCARTESIAN},
+	{XtNdegrees, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(Degrees), XtRString, "TRUE"},
+	{XtNdrawMajor, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(DrawMajor), XtRString, "TRUE"},
+	{XtNdrawMajorTics, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(DrawMajorTics), XtRString, "TRUE"},
+	{XtNdrawMinor, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(DrawMinor), XtRString, "TRUE"},
+	{XtNdrawMinorTics, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(DrawMinorTics), XtRString, "TRUE"},
+	{XtNshowLegend, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(ShowLegend), XtRString, "TRUE"},
+	{XtNshowTitle, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(ShowTitle), XtRString, "TRUE"},
+	{XtNshowXLabel, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(ShowXLabel), XtRString, "TRUE"},
+	{XtNshowYLabel, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(ShowYLabel), XtRString, "TRUE"},
+	{XtNxLabel, XtCString, XtRString, sizeof(String),
+		offset(TransientXLabel), XtRString, "X Axis"},
+	{XtNyLabel, XtCString, XtRString, sizeof(String),
+		offset(TransientYLabel), XtRString, "Y Axis"},
+	{XtNplotTitle, XtCString, XtRString, sizeof(String),
+		offset(TransientPlotTitle), XtRString, "Plot"},
+	{XtNmargin, XtCMargin, XtRInt, sizeof(int),
+		offset(Margin), XtRString, "5"},
+	{XtNtitleMargin, XtCMargin, XtRInt, sizeof(int),
+		offset(TitleMargin), XtRString, "16"},
+	{XtNlegendLineSize, XtCMargin, XtRInt, sizeof(int),
+		offset(LegendLineSize), XtRString, "16"},
+	{XtNlegendMargin, XtCMargin, XtRInt, sizeof(int),
+		offset(LegendMargin), XtRString, "3"},
+	{XtNtitleFont, XtCMargin, XtRInt, sizeof(int),
+		offset(TitleFont), XtRImmediate,
+		(XtPointer)(XtFONT_HELVETICA|24)},
+	{XtNlabelFont, XtCMargin, XtRInt, sizeof(int),
+		offset(LabelFont), XtRImmediate,
+		(XtPointer)(XtFONT_TIMES|18)},
+	{XtNaxisFont, XtCMargin, XtRInt, sizeof(int),
+		offset(AxisFont), XtRImmediate,
+		(XtPointer)(XtFONT_TIMES|10)},
+	{XtNxAutoScale, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(XAutoScale), XtRString, "TRUE"},
+	{XtNyAutoScale, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(YAutoScale), XtRString, "TRUE"},
+	{XtNxLog, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(XLog), XtRString, "FALSE"},
+	{XtNyLog, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(YLog), XtRString, "FALSE"},
+	{XtNxOrigin, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(XOrigin), XtRString, "FALSE"},
+	{XtNyOrigin, XtCBoolean, XtRBoolean, sizeof(Boolean),
+		offset(YOrigin), XtRString, "FALSE"},
+};
+
+static SciPlotFontDesc font_desc_table[]={
+	{XtFONT_TIMES,		"Times",	"times",	False,True},
+	{XtFONT_COURIER,	"Courier",	"courier",	True,False},
+	{XtFONT_HELVETICA,	"Helvetica",	"helvetica",	True,False},
+	{XtFONT_LUCIDA,		"Lucida",	"lucidabright",	False,False},
+	{XtFONT_LUCIDASANS,	"LucidaSans",	"lucida",	False,False},
+	{XtFONT_NCSCHOOLBOOK,	"NewCenturySchlbk",
+					"new century schoolbook",False,True},
+	{-1,NULL,NULL,False,False},
+};
+
+/*
+** Private function declarations
+*/
+
+static void Redisplay();
+static void Resize();
+static Boolean SetValues();
+static void Initialize();
+static void Destroy();
+
+static void ComputeAll();
+static void ComputeAllDimensions();
+static void DrawAll();
+static void ItemDrawAll();
+static void ItemDraw();
+static void EraseAll();
+static void FontInit();
+static int ColorStore();
+static int FontStore();
+static int FontnumReplace();
+
+
+
+SciPlotClassRec sciplotClassRec = {
+    {
+    /* core_class fields	*/
+#ifdef MOTIF
+    /* superclass		*/ (WidgetClass) &xmPrimitiveClassRec,
+#else
+    /* superclass		*/ (WidgetClass) &widgetClassRec,
+#endif
+    /* class_name		*/ "SciPlot",
+    /* widget_size		*/ sizeof(SciPlotRec),
+    /* class_initialize		*/ NULL,
+    /* class_part_initialize	*/ NULL,
+    /* class_inited		*/ False,
+    /* initialize		*/ Initialize,
+    /* initialize_hook		*/ NULL,
+    /* realize			*/ XtInheritRealize,
+    /* actions			*/ NULL,
+    /* num_actions		*/ 0,
+    /* resources		*/ resources,
+    /* num_resources		*/ XtNumber(resources),
+    /* xrm_class		*/ NULLQUARK,
+    /* compress_motion		*/ True,
+    /* compress_exposure	*/ XtExposeCompressMultiple,
+    /* compress_enterleave	*/ True,
+    /* visible_interest		*/ True,
+    /* destroy			*/ Destroy,
+    /* resize			*/ Resize,
+    /* expose			*/ Redisplay,
+    /* set_values		*/ SetValues,
+    /* set_values_hook		*/ NULL,
+    /* set_values_almost	*/ XtInheritSetValuesAlmost,
+    /* get_values_hook		*/ NULL,
+    /* accept_focus		*/ NULL,
+    /* version			*/ XtVersion,
+    /* callback_private		*/ NULL,
+    /* tm_table			*/ NULL,
+    /* query_geometry		*/ NULL,
+    /* display_accelerator	*/ XtInheritDisplayAccelerator,
+    /* extension		*/ NULL
+    },
+#ifdef MOTIF
+    {
+    /* primitive_class fields	*/
+    /* border_highlight		*/ (XtWidgetProc)_XtInherit,
+    /* border_unhighligh	*/ (XtWidgetProc)_XtInherit,
+    /* translations		*/ XtInheritTranslations,
+    /* arm_and_activate		*/ (XtWidgetProc)_XtInherit,
+    /* syn_resources		*/ NULL,
+    /* num_syn_resources	*/ 0,
+    /* extension		*/ NULL
+    },
+#endif
+    {
+    /* plot_class fields	*/
+    /* dummy			*/ 0
+    /* (some stupid compilers barf on empty structures) */
+    }
+};
+
+WidgetClass sciplotWidgetClass = (WidgetClass)&sciplotClassRec;
+
+void
+get_number_format( char *numberformat, int precision, real val )
+{
+	/*sprintf(numberformat,"%%.%df",precision);*/
+	sprintf(numberformat,"%%%dg",precision);
+}
+
+int
+my_nint( double d )
+{
+	if( d >= 0.0 ) 
+		return( (int)(d+0.4999) );
+
+	return( (int)(d-0.4999) );
+}
+
+static void
+Initialize(treq,tnew,args,num)
+Widget treq,tnew;
+ArgList args;
+Cardinal *num;
+{
+SciPlotWidget new;
+XGCValues values;
+XtGCMask mask;
+long	colorsave;
+
+	new=(SciPlotWidget) tnew;
+	
+	new->plot.plotlist=NULL;
+	new->plot.alloc_plotlist=0;
+	new->plot.num_plotlist=0;
+	
+	new->plot.alloc_drawlist=NUMPLOTITEMALLOC;
+	new->plot.drawlist=(SciPlotItem *)XtCalloc(new->plot.alloc_drawlist,
+		sizeof(SciPlotItem));
+	new->plot.num_drawlist=0;
+
+	new->plot.cmap = DefaultColormap(XtDisplay(new),
+		DefaultScreen(XtDisplay(new)));
+	
+	new->plot.xlabel=(char *)XtMalloc(strlen(new->plot.TransientXLabel)+1);
+	strcpy(new->plot.xlabel,new->plot.TransientXLabel);
+	new->plot.ylabel=(char *)XtMalloc(strlen(new->plot.TransientYLabel)+1);
+	strcpy(new->plot.ylabel,new->plot.TransientYLabel);
+	new->plot.plotTitle=(char *)XtMalloc(strlen(new->plot.TransientPlotTitle)+1);
+	strcpy(new->plot.plotTitle,new->plot.TransientPlotTitle);
+
+	new->plot.XFmtCallback=NULL;
+	new->plot.colors=NULL;
+	new->plot.num_colors=0;
+	new->plot.fonts=NULL;
+	new->plot.num_fonts=0;
+	
+	new->plot.update=FALSE;
+	new->plot.UserMin.x=new->plot.UserMin.y=0.0;
+	new->plot.UserMax.x=new->plot.UserMax.y=10.0;
+
+	values.line_style=LineSolid;
+	values.line_width=0;
+	values.fill_style=FillSolid;
+	values.background=WhitePixelOfScreen(XtScreen(new));
+	new->plot.BackgroundColor=ColorStore(new,values.background);
+#ifdef MOTIF
+	new->core.background_pixel=values.background;
+#endif
+	values.foreground=colorsave=BlackPixelOfScreen(XtScreen(new));
+	new->plot.ForegroundColor=ColorStore(new,values.foreground);
+
+	mask=GCLineStyle|GCLineWidth|GCFillStyle|GCForeground|GCBackground;
+	new->plot.defaultGC=XtGetGC((Widget)new,mask,&values);
+
+	values.foreground=colorsave;
+	values.line_style=LineOnOffDash;
+	new->plot.dashGC=XtGetGC((Widget)new,mask,&values);
+	
+	new->plot.titleFont=FontStore(new,new->plot.TitleFont);
+	new->plot.labelFont=FontStore(new,new->plot.LabelFont);
+	new->plot.axisFont=FontStore(new,new->plot.AxisFont);
+}
+
+static void
+Destroy(w)
+SciPlotWidget w;
+{
+int i;
+SciPlotFont *pf;
+SciPlotList *p;
+
+	XtReleaseGC((Widget)w,w->plot.defaultGC);
+	XtReleaseGC((Widget)w,w->plot.dashGC);
+	XtFree((char *)w->plot.xlabel);
+	XtFree((char *)w->plot.ylabel);
+	XtFree((char *)w->plot.plotTitle);
+
+	for (i=0; i<w->plot.num_fonts; i++) {
+		pf=&w->plot.fonts[i];
+		XFreeFont(XtDisplay((Widget)w),pf->font);
+	}
+	XtFree((char *)w->plot.fonts);
+
+	XtFree((char *)w->plot.colors);
+
+	for (i=0; i<w->plot.alloc_plotlist; i++) {
+		p=w->plot.plotlist+i;
+		if (p->allocated>0) XtFree((char *)p->data);
+		if (p->legend) XtFree(p->legend);
+	}
+	if (w->plot.alloc_plotlist>0)
+		XtFree((char *)w->plot.plotlist);
+		
+	EraseAll(w);
+	XtFree((char *)w->plot.drawlist);
+}
+
+static Boolean
+SetValues(current, request, new, args, nargs)
+SciPlotWidget current, request, new;
+ArgList args;
+Cardinal *nargs;
+{
+Boolean redisplay=FALSE;
+
+	if (current->plot.XLog!=new->plot.XLog) redisplay=TRUE;
+	else if (current->plot.YLog!=new->plot.YLog) redisplay=TRUE;
+	else if (current->plot.XOrigin!=new->plot.XOrigin) redisplay=TRUE;
+	else if (current->plot.YOrigin!=new->plot.YOrigin) redisplay=TRUE;
+	else if (current->plot.DrawMajor!=new->plot.DrawMajor) redisplay=TRUE;
+	else if (current->plot.DrawMajorTics!=new->plot.DrawMajorTics) redisplay=TRUE;
+	else if (current->plot.DrawMinor!=new->plot.DrawMinor) redisplay=TRUE;
+	else if (current->plot.DrawMinorTics!=new->plot.DrawMinorTics) redisplay=TRUE;
+	else if (current->plot.ChartType!=new->plot.ChartType) redisplay=TRUE;
+	else if (current->plot.Degrees!=new->plot.Degrees) redisplay=TRUE;
+	else if (current->plot.ShowLegend!=new->plot.ShowLegend) redisplay=TRUE;
+	else if (current->plot.ShowTitle!=new->plot.ShowTitle) redisplay=TRUE;
+	else if (current->plot.ShowXLabel!=new->plot.ShowXLabel) redisplay=TRUE;
+	else if (current->plot.ShowYLabel!=new->plot.ShowYLabel) redisplay=TRUE;
+	else if (current->plot.ShowTitle!=new->plot.ShowTitle) redisplay=TRUE;
+	if (current->plot.TransientXLabel!=new->plot.TransientXLabel) {
+		redisplay=TRUE;
+		XtFree(current->plot.xlabel);
+		new->plot.xlabel=(char *)XtMalloc(strlen(new->plot.TransientXLabel)+1);
+		strcpy(new->plot.xlabel,new->plot.TransientXLabel);
+	}
+	if (current->plot.TransientYLabel!=new->plot.TransientYLabel) {
+		redisplay=TRUE;
+		XtFree(current->plot.ylabel);
+		new->plot.ylabel=(char *)XtMalloc(strlen(new->plot.TransientYLabel)+1);
+		strcpy(new->plot.ylabel,new->plot.TransientYLabel);
+	}
+	if (current->plot.TransientPlotTitle!=new->plot.TransientPlotTitle) {
+		redisplay=TRUE;
+		XtFree(current->plot.plotTitle);
+		new->plot.plotTitle=(char *)XtMalloc(strlen(new->plot.TransientPlotTitle)+1);
+		strcpy(new->plot.plotTitle,new->plot.TransientPlotTitle);
+	}
+	if (current->plot.AxisFont!=new->plot.AxisFont) {
+		redisplay=TRUE;
+		FontnumReplace(new,new->plot.axisFont,new->plot.AxisFont);
+	}
+	if (current->plot.TitleFont!=new->plot.TitleFont) {
+		redisplay=TRUE;
+		FontnumReplace(new,new->plot.titleFont,new->plot.TitleFont);
+	}
+	if (current->plot.LabelFont!=new->plot.LabelFont) {
+		redisplay=TRUE;
+		FontnumReplace(new,new->plot.labelFont,new->plot.LabelFont);
+	}
+
+	new->plot.update=redisplay;
+	
+	return redisplay;
+}
+
+static void Redisplay(w)
+SciPlotWidget w;
+{
+	if (w->plot.update) {
+		Resize(w);
+		w->plot.update=FALSE;
+	}
+	else {
+		ItemDrawAll(w);
+	}
+}
+
+static void Resize(w)
+SciPlotWidget w;
+{
+	EraseAll(w);
+	ComputeAll(w);
+	DrawAll(w);
+}
+
+
+/*
+** Private SciPlot utility functions --------------------------------------------
+**
+*/
+
+
+
+static int
+ColorStore(w,color)
+SciPlotWidget w;
+Pixel color;
+{
+	w->plot.num_colors++;
+	if (w->plot.colors)
+		w->plot.colors=(Pixel *)XtRealloc((char *)w->plot.colors,
+			sizeof(Pixel)*w->plot.num_colors);
+	else
+		w->plot.colors=(Pixel *)XtCalloc(1,sizeof(Pixel));
+	w->plot.colors[w->plot.num_colors-1]=color;
+	return w->plot.num_colors-1;
+}
+
+static void
+FontnumStore(w,fontnum,flag)
+SciPlotWidget w;
+int fontnum,flag;
+{
+SciPlotFont *pf;
+int fontflag,sizeflag,attrflag;
+
+	pf=&w->plot.fonts[fontnum];
+	
+	fontflag=flag&XtFONT_NAME_MASK;
+	sizeflag=flag&XtFONT_SIZE_MASK;
+	attrflag=flag&XtFONT_ATTRIBUTE_MASK;
+	
+	switch (fontflag) {
+	case XtFONT_TIMES:
+	case XtFONT_COURIER:
+	case XtFONT_HELVETICA:
+	case XtFONT_LUCIDA:
+	case XtFONT_LUCIDASANS:
+	case XtFONT_NCSCHOOLBOOK:
+		break;
+	default:
+		fontflag=XtFONT_NAME_DEFAULT;
+		break;
+	}
+	
+	if (sizeflag<1) sizeflag=XtFONT_SIZE_DEFAULT;
+	
+	switch (attrflag) {
+	case XtFONT_BOLD:
+	case XtFONT_ITALIC:
+	case XtFONT_BOLD_ITALIC:
+		break;
+	default:
+		attrflag=XtFONT_ATTRIBUTE_DEFAULT;
+		break;
+	}
+	pf->id=flag;
+	FontInit(w,pf);
+}
+
+static int
+FontnumReplace(w,fontnum,flag)
+SciPlotWidget w;
+int fontnum,flag;
+{
+SciPlotFont *pf;
+
+	pf=&w->plot.fonts[fontnum];
+	XFreeFont(XtDisplay(w),pf->font);
+	
+	FontnumStore(w,fontnum,flag);
+	
+	return fontnum;
+}
+
+static int
+FontStore(w,flag)
+SciPlotWidget w;
+int flag;
+{
+int fontnum;
+
+	w->plot.num_fonts++;
+	if (w->plot.fonts)
+		w->plot.fonts=(SciPlotFont *)XtRealloc((char *)w->plot.fonts,
+			sizeof(SciPlotFont)*w->plot.num_fonts);
+	else
+		w->plot.fonts=(SciPlotFont *)XtCalloc(1,sizeof(SciPlotFont));
+	fontnum=w->plot.num_fonts-1;
+	
+	FontnumStore(w,fontnum,flag);
+	
+	return fontnum;
+}
+
+static SciPlotFontDesc *
+FontDescLookup(flag)
+int flag;
+{
+SciPlotFontDesc *pfd;
+	
+	pfd=font_desc_table;
+	while (pfd->flag>=0) {
+#ifdef DEBUG_SCIPLOT
+		printf("checking if %d == %d (font %s)\n",
+			flag&XtFONT_NAME_MASK,pfd->flag,pfd->PostScript);
+#endif
+		if ((flag&XtFONT_NAME_MASK)==pfd->flag) return pfd;
+		pfd++;
+	}
+	return NULL;
+}
+
+
+static void
+FontnumPostScriptString(w,fontnum,str,str_len)
+SciPlotWidget w;
+int fontnum;
+char *str;
+int str_len;
+{
+char temp[128];
+int flag,bold,italic;
+SciPlotFontDesc *pfd;
+
+	flag=w->plot.fonts[fontnum].id;
+	pfd=FontDescLookup(flag);
+	if (pfd) {
+		strcpy(temp,pfd->PostScript);
+		bold=False;
+		italic=False;
+		if (flag&XtFONT_BOLD) {
+			bold=True;
+			strcat(temp,"-Bold");
+		}
+		if (flag&XtFONT_ITALIC) {
+			italic=True;
+			if (!bold) strcat(temp,"-");
+			if (pfd->PSUsesOblique) strcat(temp,"Oblique");
+			else strcat(temp,"Italic");
+		}
+		if (!bold && !italic && pfd->PSUsesRoman) {
+			strcat(temp,"-Roman");
+		}
+
+		if( (strlen(temp) + strlen("/ findfont 999999999 scalefont    ")) > str_len ) {
+			fprintf( stderr, "Error, font name too long for internal buffer.  Font name:%s\n",
+				temp );
+			exit(-1);
+			}
+		sprintf(str,"/%s findfont %d scalefont",
+			temp,
+			(flag&XtFONT_SIZE_MASK));
+	}
+	else sprintf(str,"/Courier findfond 10 scalefont");
+}
+
+static void
+FontX11String(flag,str)
+int flag;
+char *str;
+{
+SciPlotFontDesc *pfd;
+
+	pfd=FontDescLookup(flag);
+	if (pfd) {
+		sprintf(str,"-*-%s-%s-%s-*-*-%d-*-*-*-*-*-*-*",
+			pfd->X11,
+			(flag&XtFONT_BOLD?"bold":"medium"),
+			(flag&XtFONT_ITALIC?(pfd->PSUsesOblique?"o":"i"):"r"),
+			(flag&XtFONT_SIZE_MASK));
+	}
+	else sprintf(str,"fixed");
+#ifdef DEBUG_SCIPLOT
+	printf("font string=%s\n",str);
+#endif
+}
+
+static void
+FontInit(w,pf)
+SciPlotWidget w;
+SciPlotFont *pf;
+{
+char str[256],**list;
+int num;
+
+	FontX11String(pf->id,str);
+	list=XListFonts(XtDisplay(w),str,100,&num);
+#ifdef DEBUG_SCIPLOT
+	if (1) {
+	int i;
+		i=0;
+		while (i<num) {
+			printf("Found font: %s\n",list[i]);
+			i++;
+		}
+	}
+#endif
+	if (num<=0) {
+		pf->id&=~XtFONT_ATTRIBUTE_MASK;
+		pf->id|=XtFONT_ATTRIBUTE_DEFAULT;
+		FontX11String(pf->id,str);
+		list=XListFonts(XtDisplay(w),str,100,&num);
+#ifdef DEBUG_SCIPLOT
+	if (1) {
+	int i;
+		i=0;
+		while (i<num) {
+			printf("Attr reset: found: %s\n",list[i]);
+			i++;
+		}
+	}
+#endif
+	}
+	if (num<=0) {
+		pf->id&=~XtFONT_NAME_MASK;
+		pf->id|=XtFONT_NAME_DEFAULT;
+		FontX11String(pf->id,str);
+		list=XListFonts(XtDisplay(w),str,100,&num);
+#ifdef DEBUG_SCIPLOT
+	if (1) {
+	int i;
+		i=0;
+		while (i<num) {
+			printf("Name reset: found: %s\n",list[i]);
+			i++;
+		}
+	}
+#endif
+	}
+	if (num<=0) {
+		pf->id&=~XtFONT_SIZE_MASK;
+		pf->id|=XtFONT_SIZE_DEFAULT;
+		FontX11String(pf->id,str);
+		list=XListFonts(XtDisplay(w),str,100,&num);
+#ifdef DEBUG_SCIPLOT
+	if (1) {
+	int i;
+		i=0;
+		while (i<num) {
+			printf("Size reset: found: %s\n",list[i]);
+			i++;
+		}
+	}
+#endif
+	}
+	if (num<=0)
+		strcpy(str,"fixed");
+	else
+		XFreeFontNames(list);
+	pf->font=XLoadQueryFont(XtDisplay(w),str);
+}
+
+static XFontStruct
+*FontFromFontnum(w,fontnum)
+SciPlotWidget w;
+int fontnum;
+{
+XFontStruct *f;
+
+	if (fontnum>=w->plot.num_fonts) fontnum=0;
+	f=w->plot.fonts[fontnum].font;
+	return f;
+}
+
+static real
+FontHeight(f)
+XFontStruct *f;
+{
+	return (real)(f->max_bounds.ascent+f->max_bounds.descent);
+}
+
+static real
+FontnumHeight(w,fontnum)
+SciPlotWidget w;
+int fontnum;
+{
+XFontStruct *f;
+
+	f=FontFromFontnum(w,fontnum);
+	return FontHeight(f);
+}
+
+static real
+FontDescent(f)
+XFontStruct *f;
+{
+	return (real)(f->max_bounds.descent);
+}
+
+static real
+FontnumDescent(w,fontnum)
+SciPlotWidget w;
+int fontnum;
+{
+XFontStruct *f;
+
+	f=FontFromFontnum(w,fontnum);
+	return FontDescent(f);
+}
+
+static real
+FontAscent(f)
+XFontStruct *f;
+{
+	return (real)(f->max_bounds.ascent);
+}
+
+static real
+FontnumAscent(w,fontnum)
+SciPlotWidget w;
+int fontnum;
+{
+XFontStruct *f;
+
+	f=FontFromFontnum(w,fontnum);
+	return FontAscent(f);
+}
+
+static real
+FontTextWidth(f,c)
+XFontStruct *f;
+char *c;
+{
+	return (real)XTextWidth(f,c,strlen(c));
+}
+
+static real
+FontnumTextWidth(w,fontnum,c)
+SciPlotWidget w;
+int fontnum;
+char *c;
+{
+XFontStruct *f;
+
+	f=FontFromFontnum(w,fontnum);
+	return FontTextWidth(f,c);
+}
+
+static void
+ItemDrawAll(w)
+SciPlotWidget w;
+{
+SciPlotItem	*item;
+int	i;
+
+	if (!XtIsRealized((Widget)w)) return;
+	item=w->plot.drawlist;
+	i=0;
+	while (i<w->plot.num_drawlist) {
+		ItemDraw(w,item);
+		i++;
+		item++;
+	}
+}
+
+
+/*
+** Private SciPlot functions -------------------------------------------------
+**
+*/
+
+
+/* The following vertical text drawing routine uses the "Fill Stippled" idea
+** found in xvertext-5.0, by Alan Richardson (mppa3 at syma.sussex.ac.uk).
+**
+** The following code is my interpretation of his idea, including some
+** hacked together excerpts from his source.  The credit for the clever bits
+** belongs to him.
+**
+** To be complete, portions of the subroutine XDrawVString are
+**  Copyright (c) 1993 Alan Richardson (mppa3 at syma.sussex.ac.uk)
+*/
+static void
+XDrawVString(display,win,gc,x,y,str,len,f)
+Display *display;
+Window win;
+GC gc;
+int x,y;
+char *str;
+int len;
+XFontStruct *f;
+{
+XImage *before,*after;
+char *dest,*source;
+int xloop,yloop,xdest,ydest;
+Pixmap pix,rotpix;
+int width,height;
+GC drawGC;
+
+	width=(int)FontTextWidth(f,str);
+	height=(int)FontHeight(f);
+
+	pix=XCreatePixmap(display,win,width,height,1);
+	rotpix=XCreatePixmap(display,win,height,width,1);
+
+	drawGC=XCreateGC(display,pix,0L,NULL);
+	XSetBackground(display,drawGC,0);
+	XSetFont(display,drawGC,f->fid);
+	XSetForeground(display,drawGC,0);
+	XFillRectangle(display,pix,drawGC,0,0,width,height);
+	XFillRectangle(display,rotpix,drawGC,0,0,height,width);
+	XSetForeground(display,drawGC,1);
+
+	XDrawImageString(display,pix,drawGC,0,(int)FontAscent(f),
+		str,strlen(str));
+
+	source=(char *)calloc((((width+7)/8)*height),1);
+	before=XCreateImage(display,DefaultVisual(display,DefaultScreen(display)),
+		1,XYPixmap,0,source,width,height,8,0);
+	before->byte_order=before->bitmap_bit_order=MSBFirst;
+	XGetSubImage(display,pix,0,0,width,height,1L,XYPixmap,before,0,0);
+	source=(char *)calloc((((height+7)/8)*width),1);
+	after=XCreateImage(display,DefaultVisual(display,DefaultScreen(display)),
+		1,XYPixmap,0,source,height,width,8,0);
+	after->byte_order=after->bitmap_bit_order=MSBFirst;
+
+	for (yloop=0; yloop<height; yloop++) {
+		for (xloop=0; xloop<width; xloop++) {
+			source=before->data+(xloop/8)+
+				(yloop*before->bytes_per_line);
+			if (*source&(128>>(xloop%8))) {
+				dest=after->data+(yloop/8)+
+					((width-1-xloop)*after->bytes_per_line);
+				*dest|=(128>>(yloop%8));
+			}
+		}
+	}
+	
+#ifdef DEBUG_SCIPLOT_VTEXT
+	if (1) {
+	char sourcebit;
+		for (yloop=0; yloop<before->height; yloop++) {
+			for (xloop=0; xloop<before->width; xloop++) {
+				source=before->data+(xloop/8)+
+					(yloop*before->bytes_per_line);
+				sourcebit=*source&(128>>(xloop%8));
+				if (sourcebit) putchar('X');
+				else putchar('.');
+			}
+			putchar('\n');
+		}
+	
+		for (yloop=0; yloop<after->height; yloop++) {
+			for (xloop=0; xloop<after->width; xloop++) {
+				source=after->data+(xloop/8)+
+					(yloop*after->bytes_per_line);
+				sourcebit=*source&(128>>(xloop%8));
+				if (sourcebit) putchar('X');
+				else putchar('.');
+			}
+			putchar('\n');
+		}
+	}
+#endif
+
+	xdest=x-(int)FontAscent(f);
+	if (xdest<0) xdest=0;
+	ydest=y-width;
+
+	XPutImage(display,rotpix,drawGC,after,0,0,0,0,
+		after->width,after->height);
+	
+	XSetFillStyle(display,gc,FillStippled);
+	XSetStipple(display,gc,rotpix);
+	XSetTSOrigin(display,gc,xdest,ydest);
+	XFillRectangle(display,win,gc,xdest,ydest,after->width,after->height);
+	XSetFillStyle(display,gc,FillSolid);
+
+	XFreeGC(display,drawGC);
+	XDestroyImage(before);
+	XDestroyImage(after);
+	XFreePixmap(display,pix);
+	XFreePixmap(display,rotpix);
+}
+
+static char dots[]={2,1,1},widedots[]={2,1,4};
+
+static GC
+ItemGetGC(w,item)
+SciPlotWidget w;
+SciPlotItem *item;
+{
+GC gc;
+short color;
+
+	switch (item->kind.any.style) {
+	case XtLINE_SOLID:
+		gc=w->plot.defaultGC;
+		break;
+	case XtLINE_DOTTED:
+		XSetDashes(XtDisplay(w),w->plot.dashGC,0,&dots[1],
+			(int)dots[0]);
+		gc=w->plot.dashGC;
+		break;
+	case XtLINE_WIDEDOT:
+		XSetDashes(XtDisplay(w),w->plot.dashGC,0,&widedots[1],
+			(int)widedots[0]);
+		gc=w->plot.dashGC;
+		break;
+	default:
+		return NULL;
+		break;
+	}
+	if (item->kind.any.color>=w->plot.num_colors)
+		color=w->plot.ForegroundColor;
+	else
+		color=item->kind.any.color;
+	XSetForeground(XtDisplay(w),gc,w->plot.colors[color]);
+	return gc;
+}
+
+static GC
+ItemGetFontGC(w,item)
+SciPlotWidget w;
+SciPlotItem *item;
+{
+GC gc;
+short color,fontnum;
+
+	gc=w->plot.dashGC;
+	if (item->kind.any.color>=w->plot.num_colors)
+		color=w->plot.ForegroundColor;
+	else
+		color=item->kind.any.color;
+	XSetForeground(XtDisplay(w),gc,w->plot.colors[color]);
+	if (item->kind.text.font>=w->plot.num_fonts) fontnum=0;
+	else fontnum=item->kind.text.font;
+
+/*
+** fontnum==0 hack:  0 is supposed to be the default font, but the program
+** can't seem to get the default font ID from the GC for some reason.  So,
+** use a different GC where the default font still exists.
+*/
+	XSetFont(XtDisplay(w),gc,w->plot.fonts[fontnum].font->fid);
+	return gc;
+}
+
+static void
+ItemDraw(w,item)
+SciPlotWidget w;
+SciPlotItem *item;
+{
+XPoint point[8];
+XSegment seg;
+XRectangle rect;
+int i;
+GC gc;
+
+	if (!XtIsRealized((Widget)w)) return;
+	if ((item->type>SciPlotStartTextTypes)&&(item->type<SciPlotEndTextTypes))
+		gc=ItemGetFontGC(w,item);
+	else
+		gc=ItemGetGC(w,item);
+	if (!gc) return;
+	switch (item->type) {
+	case SciPlotLine:
+		seg.x1=(short)item->kind.line.x1;
+		seg.y1=(short)item->kind.line.y1;
+		seg.x2=(short)item->kind.line.x2;
+		seg.y2=(short)item->kind.line.y2;
+		XDrawSegments(XtDisplay(w),XtWindow(w),gc,
+			&seg,1);
+		break;
+	case SciPlotRect:
+		XDrawRectangle(XtDisplay(w),XtWindow(w),gc,
+			(int)(item->kind.rect.x),
+			(int)(item->kind.rect.y),
+			(unsigned int)(item->kind.rect.w),
+			(unsigned int)(item->kind.rect.h));
+		break;
+	case SciPlotFRect:
+		XFillRectangle(XtDisplay(w),XtWindow(w),gc,
+			(int)(item->kind.rect.x),
+			(int)(item->kind.rect.y),
+			(unsigned int)(item->kind.rect.w),
+			(unsigned int)(item->kind.rect.h));
+		XDrawRectangle(XtDisplay(w),XtWindow(w),gc,
+			(int)(item->kind.rect.x),
+			(int)(item->kind.rect.y),
+			(unsigned int)(item->kind.rect.w),
+			(unsigned int)(item->kind.rect.h));
+		break;
+	case SciPlotPoly:
+		i=0;
+		while (i<item->kind.poly.count) {
+			point[i].x=(int)item->kind.poly.x[i];
+			point[i].y=(int)item->kind.poly.y[i];
+			i++;
+		}
+		point[i].x=(int)item->kind.poly.x[0];
+		point[i].y=(int)item->kind.poly.y[0];
+		XDrawLines(XtDisplay(w),XtWindow(w),gc,
+			point,i+1,CoordModeOrigin);
+		break;
+	case SciPlotFPoly:
+		i=0;
+		while (i<item->kind.poly.count) {
+			point[i].x=(int)item->kind.poly.x[i];
+			point[i].y=(int)item->kind.poly.y[i];
+			i++;
+		}
+		point[i].x=(int)item->kind.poly.x[0];
+		point[i].y=(int)item->kind.poly.y[0];
+		XFillPolygon(XtDisplay(w),XtWindow(w),gc,
+			point,i+1,Complex,CoordModeOrigin);
+		XDrawLines(XtDisplay(w),XtWindow(w),gc,
+			point,i+1,CoordModeOrigin);
+		break;
+	case SciPlotCircle:
+		XDrawArc(XtDisplay(w),XtWindow(w),gc,
+			(int)(item->kind.circ.x-item->kind.circ.r),
+			(int)(item->kind.circ.y-item->kind.circ.r),
+			(unsigned int)(item->kind.circ.r*2),
+			(unsigned int)(item->kind.circ.r*2),
+			0*64,360*64);
+		break;
+	case SciPlotFCircle:
+		XFillArc(XtDisplay(w),XtWindow(w),gc,
+			(int)(item->kind.circ.x-item->kind.circ.r),
+			(int)(item->kind.circ.y-item->kind.circ.r),
+			(unsigned int)(item->kind.circ.r*2),
+			(unsigned int)(item->kind.circ.r*2),
+			0*64,360*64);
+		break;
+	case SciPlotText:
+		XDrawString(XtDisplay(w),XtWindow(w),gc,
+			(int)(item->kind.text.x),(int)(item->kind.text.y),
+			item->kind.text.text,
+			(int)item->kind.text.length);
+		break;
+	case SciPlotVText:
+		XDrawVString(XtDisplay(w),XtWindow(w),gc,
+			(int)(item->kind.text.x),(int)(item->kind.text.y),
+			item->kind.text.text,
+			(int)item->kind.text.length,
+			FontFromFontnum(w,item->kind.text.font));
+		break;
+	case SciPlotClipRegion:
+		rect.x=(short)item->kind.line.x1;
+		rect.y=(short)item->kind.line.y1;
+		rect.width=(short)item->kind.line.x2;
+		rect.height=(short)item->kind.line.y2;
+		XSetClipRectangles(XtDisplay(w),w->plot.dashGC,0,0,&rect,1,Unsorted);
+		XSetClipRectangles(XtDisplay(w),w->plot.defaultGC,0,0,&rect,1,Unsorted);
+		break;
+	case SciPlotClipClear:
+		XSetClipMask(XtDisplay(w),w->plot.dashGC,None);
+		XSetClipMask(XtDisplay(w),w->plot.defaultGC,None);
+		break;
+	default:
+		break;
+	}
+}
+
+
+
+/*
+** PostScript (r) functions ------------------------------------------------
+**
+*/
+typedef struct {
+	char *command;
+	char *prolog;
+} PScommands;
+
+static PScommands psc[]={
+	{"ma",		"moveto"},
+	{"da",		"lineto stroke newpath"},
+	{"la",		"lineto"},
+	{"poly",	"closepath stroke newpath"},
+	{"fpoly",	"closepath fill newpath"},
+	{"box",		"1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath stroke newpath"},
+	{"fbox",	"1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill newpath"},
+	{"clipbox",	"gsave 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath clip newpath"},
+	{"unclip",	"grestore"},
+	{"cr",		"0 360 arc stroke newpath"},
+	{"fcr",		"0 360 arc fill newpath"},
+	{"vma",		"gsave moveto 90 rotate"},
+	{"norm",	"grestore"},
+	{"solid",	"[] 0 setdash"},
+	{"dot",		"[.25 2] 0 setdash"},
+	{"widedot",	"[.25 8] 0 setdash"},
+	{NULL,NULL}
+};
+
+enum PSenums {
+	PSmoveto,PSlineto,
+	PSpolyline,PSendpoly,PSendfill,
+	PSbox,PSfbox,
+	PSclipbox,PSunclip,
+	PScircle,PSfcircle,
+	PSvmoveto,PSnormal,
+	PSsolid,PSdot,PSwidedot
+};
+
+static void
+ItemPSDrawAll(w,fd,yflip)
+SciPlotWidget w;
+FILE *fd;
+float yflip;
+{
+int i,loopcount;
+SciPlotItem	*item;
+int previousfont,previousline,currentline;
+
+	item=w->plot.drawlist;
+	loopcount=0;
+	previousfont=0;
+	previousline=XtLINE_SOLID;
+	while (loopcount<w->plot.num_drawlist) {
+
+/* 2 switch blocks:  1st sets up defaults, 2nd actually draws things. */
+		currentline=previousline;
+		switch (item->type) {
+		case SciPlotLine:
+		case SciPlotCircle:
+			currentline=item->kind.any.style;
+			break;
+		default:
+			break;
+	       	}
+	       	if (currentline!=XtLINE_NONE) {
+	       		if (currentline!=previousline) {
+				switch (item->kind.any.style) {
+					case XtLINE_SOLID:
+	       					fprintf(fd,"%s ",psc[PSsolid].command);
+						break;
+					case XtLINE_DOTTED:
+	       					fprintf(fd,"%s ",psc[PSdot].command);
+						break;
+					case XtLINE_WIDEDOT:
+	       					fprintf(fd,"%s ",psc[PSwidedot].command);
+						break;
+				}
+				previousline=currentline;
+	       		}
+	       		
+			switch (item->type) {
+			case SciPlotLine:
+	       			fprintf(fd,"%.2f %.2f %s %.2f %.2f %s\n",
+ 					item->kind.line.x1,yflip-item->kind.line.y1,
+ 						psc[PSmoveto].command,
+					item->kind.line.x2,yflip-item->kind.line.y2,
+						psc[PSlineto].command);
+				break;
+			case SciPlotRect:
+        			fprintf(fd,"%.2f %.2f %s %.2f %.2f %s\n",
+ 					item->kind.rect.x,
+ 					yflip-item->kind.rect.y-(item->kind.rect.h-1.0),
+ 						psc[PSmoveto].command,
+					item->kind.rect.w-1.0,item->kind.rect.h-1.0,
+						psc[PSbox].command);
+				break;
+			case SciPlotFRect:
+        			fprintf(fd,"%.2f %.2f %s %.2f %.2f %s\n",
+ 					item->kind.rect.x,
+ 					yflip-item->kind.rect.y-(item->kind.rect.h-1.0),
+ 						psc[PSmoveto].command,
+					item->kind.rect.w-1.0,item->kind.rect.h-1.0,
+						psc[PSfbox].command);
+				break;
+			case SciPlotPoly:
+				fprintf(fd,"%.2f %.2f %s ",
+					item->kind.poly.x[0],yflip-item->kind.poly.y[0],
+						psc[PSmoveto].command);
+				for (i=1; i<item->kind.poly.count; i++) {
+					fprintf(fd,"%.2f %.2f %s ",
+ 						item->kind.poly.x[i],
+ 						yflip-item->kind.poly.y[i],
+							psc[PSpolyline].command);
+				}
+				fprintf(fd,"%s\n",psc[PSendpoly].command);
+				break;
+			case SciPlotFPoly:
+				fprintf(fd,"%.2f %.2f %s ",
+					item->kind.poly.x[0],yflip-item->kind.poly.y[0],
+						psc[PSmoveto].command);
+				for (i=1; i<item->kind.poly.count; i++) {
+					fprintf(fd,"%.2f %.2f %s ",
+ 						item->kind.poly.x[i],
+ 						yflip-item->kind.poly.y[i],
+							psc[PSpolyline].command);
+				}
+				fprintf(fd,"%s\n",psc[PSendfill].command);
+				break;
+			case SciPlotCircle:
+        			fprintf(fd,"%.2f %.2f %.2f %s\n",
+ 					item->kind.circ.x,yflip-item->kind.circ.y,
+ 					item->kind.circ.r,
+ 						psc[PScircle].command);
+				break;
+			case SciPlotFCircle:
+        			fprintf(fd,"%.2f %.2f %.2f %s\n",
+ 					item->kind.circ.x,yflip-item->kind.circ.y,
+ 					item->kind.circ.r,
+ 						psc[PSfcircle].command);
+				break;
+			case SciPlotText:
+        			fprintf(fd,"font-%d %.2f %.2f %s (%s) show\n",
+        				item->kind.text.font,
+ 					item->kind.text.x,yflip-item->kind.text.y,
+ 						psc[PSmoveto].command,
+ 					item->kind.text.text);
+				break;
+			case SciPlotVText:
+        			fprintf(fd,"font-%d %.2f %.2f %s (%s) show %s\n",
+        				item->kind.text.font,
+ 					item->kind.text.x,yflip-item->kind.text.y,
+ 						psc[PSvmoveto].command,
+ 					item->kind.text.text,
+ 						psc[PSnormal].command);
+				break;
+			case SciPlotClipRegion:
+        			fprintf(fd,"%.2f %.2f %s %.2f %.2f %s\n",
+ 					item->kind.line.x1,
+ 					yflip-item->kind.line.y1-item->kind.line.y2,
+ 						psc[PSmoveto].command,
+					item->kind.line.x2,item->kind.line.y2,
+						psc[PSclipbox].command);
+				break;
+			case SciPlotClipClear:
+				fprintf(fd,"%s\n",psc[PSunclip].command);
+				break;
+			default:
+				break;
+			}
+		}
+		loopcount++;
+		item++;
+	}
+}
+
+Boolean
+SciPlotPSCreateFancy(w,filename,drawborder,titles)
+SciPlotWidget w;
+char *filename;
+int drawborder;
+char *titles;
+{
+FILE *fd;
+float scale,xoff,yoff,xmax,ymax,yflip,aspect,border,titlefontsize;
+int	i;
+PScommands *p;
+char fontname[128];
+
+	if (!(fd = fopen(filename, "w"))) {
+		XtWarning("Unable to open postscript file.");
+		return False;
+	}
+
+	aspect=(float)w->core.width/(float)w->core.height;
+	border=36.0;
+	if (aspect>(612.0/792.0)) {
+		scale=(612.0-(2*border))/(float)w->core.width;
+		xoff=border;
+		yoff=(792.0-(2*border)-scale*(float)w->core.height)/2.0;
+		xmax=xoff+scale*(float)w->core.width;
+		ymax=yoff+scale*(float)w->core.height;
+	}
+	else {
+		scale=(792.0-(2*border))/(float)w->core.height;
+		yoff=border;
+		xoff=(612.0-(2*border)-scale*(float)w->core.width)/2.0;
+		xmax=xoff+scale*(float)w->core.width;
+		ymax=yoff+scale*(float)w->core.height;
+	}
+	yflip=w->core.height;
+	fprintf(fd,"%s\n%s %.2f  %s\n%s %f %f %f %f\n%s\n",
+		"%!PS-ADOBE-3.0 EPSF-3.0",
+		"%%Creator: SciPlot Widget",
+		_SCIPLOT_WIDGET_VERSION,
+		"Copyright (c) 1994 Robert W. McMullen",
+		"%%BoundingBox:",xoff,yoff,xmax,ymax,
+		"%%EndComments");
+	
+	p=psc;
+	while (p->command) {
+		fprintf(fd,"/%s {%s} bind def\n",p->command,p->prolog);
+		p++;
+	}
+
+	for (i=0; i<w->plot.num_fonts; i++) {
+		FontnumPostScriptString(w,i,fontname,128);	/* last number here (128) is length of 'fontname' */
+		fprintf(fd,"/font-%d {%s setfont} bind def\n",
+			i,fontname);
+	}
+	titlefontsize=10.0;
+	fprintf(fd,"/font-title {/%s findfont %f scalefont setfont} bind def\n",
+		"Times-Roman",titlefontsize);
+	fprintf(fd,"%f setlinewidth\n",0.001);
+	fprintf(fd,"newpath gsave\n%f %f translate %f %f scale\n",
+		xoff,yoff,scale,scale);
+
+	ItemPSDrawAll(w,fd,yflip);
+
+	fprintf(fd,"grestore\n");
+	
+	if (drawborder) {
+		fprintf(fd,"%.2f %.2f %s %.2f %.2f %s\n",
+			border,border,
+				psc[PSmoveto].command,
+			612.0-2.0*border,792.0-2.0*border,
+				psc[PSbox].command);
+	}
+	if (titles) {
+	char *ptr;
+	char buf[256];
+	int len,i,j;
+	float x,y;
+	
+		x=border+titlefontsize;
+		y=792.0-border-(2.0*titlefontsize);
+		len=strlen(titles);
+		ptr=titles;
+		i=0;
+		while (i<len) {
+			j=0;
+			while ((*ptr!='\n') && (i<len)) {
+				if ((*ptr=='(')||(*ptr==')'))
+					buf[j++]='\\';
+				buf[j++]=*ptr;
+				ptr++;
+				i++;
+			}
+			buf[j]='\0';
+			ptr++;
+			i++;
+        		fprintf(fd,"font-title %.2f %.2f %s (%s) show\n",
+        			x,y,psc[PSmoveto].command,buf);
+			y-=titlefontsize*1.5;
+		}
+		if (border) {
+			y+=titlefontsize*0.5;
+	       		fprintf(fd,"%.2f %.2f %s %.2f %.2f %s\n",
+ 				border,y,
+ 					psc[PSmoveto].command,
+				612.0-border,y,
+					psc[PSlineto].command);
+		}
+	}
+	
+	fprintf(fd,"showpage\n");
+	fclose(fd);
+	return True;
+}
+
+Boolean
+SciPlotPSCreate(wi,filename)
+Widget wi;
+char *filename;
+{
+SciPlotWidget w;
+
+	w=(SciPlotWidget)wi;
+	return SciPlotPSCreateFancy(w,filename,False,NULL);
+}
+
+
+/*
+** Private device independent drawing functions ----------------------------
+**
+*/
+
+static void
+EraseAll(w)
+SciPlotWidget w;
+{
+SciPlotItem	*item;
+int	i;
+
+	item=w->plot.drawlist;
+	i=0;
+	while (i<w->plot.num_drawlist) {
+		if ((item->type>SciPlotStartTextTypes)&&
+		    (item->type<SciPlotEndTextTypes))
+			XtFree(item->kind.text.text);
+		i++;
+		item++;
+	}
+	w->plot.num_drawlist=0;
+	if (XtIsRealized((Widget)w)) XClearWindow(XtDisplay(w),XtWindow(w));
+}
+
+static SciPlotItem *
+ItemGetNew(w)
+SciPlotWidget w;
+{
+SciPlotItem	*item;
+
+	w->plot.num_drawlist++;
+	if (w->plot.num_drawlist>=w->plot.alloc_drawlist) {
+		w->plot.alloc_drawlist+=NUMPLOTITEMEXTRA;
+		w->plot.drawlist=(SciPlotItem *)XtRealloc((char *)w->plot.drawlist,
+			w->plot.alloc_drawlist*sizeof(SciPlotItem));
+		if (!w->plot.drawlist) {
+			printf("Can't realloc memory for SciPlotItem list\n");
+			exit(1);
+		}
+#ifdef DEBUG_SCIPLOT
+		printf("Alloced #%d for drawlist\n",w->plot.alloc_drawlist);
+#endif
+	}
+	item=w->plot.drawlist+(w->plot.num_drawlist-1);
+	item->type=SciPlotFALSE;
+	return item;
+}
+
+
+static void
+LineSet(w,x1,y1,x2,y2,color,style)
+SciPlotWidget w;
+real x1,y1,x2,y2;
+int color,style;
+{
+SciPlotItem	*item;
+
+	item=ItemGetNew(w);
+	item->kind.any.color=(short)color;
+	item->kind.any.style=(short)style;
+	item->kind.line.x1=(real)x1;
+	item->kind.line.y1=(real)y1;
+	item->kind.line.x2=(real)x2;
+	item->kind.line.y2=(real)y2;
+	item->type=SciPlotLine;
+	ItemDraw(w,item);
+}
+
+static void
+RectSet(w,x1,y1,x2,y2,color,style)
+SciPlotWidget w;
+real x1,y1,x2,y2;
+int color,style;
+{
+SciPlotItem	*item;
+real x,y,width,height;
+
+	if (x1<x2) x=x1,width=(x2-x1+1);
+	else x=x2,width=(x1-x2+1);
+	if (y1<y2) y=y1,height=(y2-y1+1);
+	else y=y2,height=(y1-y2+1);
+
+	item=ItemGetNew(w);
+	item->kind.any.color=(short)color;
+	item->kind.any.style=(short)style;
+	item->kind.rect.x=(real)x;
+	item->kind.rect.y=(real)y;
+	item->kind.rect.w=(real)width;
+	item->kind.rect.h=(real)height;
+	item->type=SciPlotRect;
+	ItemDraw(w,item);
+}
+
+static void
+FilledRectSet(w,x1,y1,x2,y2,color,style)
+SciPlotWidget w;
+real x1,y1,x2,y2;
+int color,style;
+{
+SciPlotItem	*item;
+real x,y,width,height;
+
+	if (x1<x2) x=x1,width=(x2-x1+1);
+	else x=x2,width=(x1-x2+1);
+	if (y1<y2) y=y1,height=(y2-y1+1);
+	else y=y2,height=(y1-y2+1);
+
+	item=ItemGetNew(w);
+	item->kind.any.color=(short)color;
+	item->kind.any.style=(short)style;
+	item->kind.rect.x=(real)x;
+	item->kind.rect.y=(real)y;
+	item->kind.rect.w=(real)width;
+	item->kind.rect.h=(real)height;
+	item->type=SciPlotFRect;
+	ItemDraw(w,item);
+}
+
+static void
+TriSet(w,x1,y1,x2,y2,x3,y3,color,style)
+SciPlotWidget w;
+real x1,y1,x2,y2,x3,y3;
+int color,style;
+{
+SciPlotItem	*item;
+
+	item=ItemGetNew(w);
+	item->kind.any.color=(short)color;
+	item->kind.any.style=(short)style;
+	item->kind.poly.count=3;
+	item->kind.poly.x[0]=(real)x1;
+	item->kind.poly.y[0]=(real)y1;
+	item->kind.poly.x[1]=(real)x2;
+	item->kind.poly.y[1]=(real)y2;
+	item->kind.poly.x[2]=(real)x3;
+	item->kind.poly.y[2]=(real)y3;
+	item->type=SciPlotPoly;
+	ItemDraw(w,item);
+}
+
+static void
+FilledTriSet(w,x1,y1,x2,y2,x3,y3,color,style)
+SciPlotWidget w;
+real x1,y1,x2,y2,x3,y3;
+int color,style;
+{
+SciPlotItem	*item;
+
+	item=ItemGetNew(w);
+	item->kind.any.color=(short)color;
+	item->kind.any.style=(short)style;
+	item->kind.poly.count=3;
+	item->kind.poly.x[0]=(real)x1;
+	item->kind.poly.y[0]=(real)y1;
+	item->kind.poly.x[1]=(real)x2;
+	item->kind.poly.y[1]=(real)y2;
+	item->kind.poly.x[2]=(real)x3;
+	item->kind.poly.y[2]=(real)y3;
+	item->type=SciPlotFPoly;
+	ItemDraw(w,item);
+}
+
+static void
+QuadSet(w,x1,y1,x2,y2,x3,y3,x4,y4,color,style)
+SciPlotWidget w;
+real x1,y1,x2,y2,x3,y3,x4,y4;
+int color,style;
+{
+SciPlotItem	*item;
+
+	item=ItemGetNew(w);
+	item->kind.any.color=(short)color;
+	item->kind.any.style=(short)style;
+	item->kind.poly.count=4;
+	item->kind.poly.x[0]=(real)x1;
+	item->kind.poly.y[0]=(real)y1;
+	item->kind.poly.x[1]=(real)x2;
+	item->kind.poly.y[1]=(real)y2;
+	item->kind.poly.x[2]=(real)x3;
+	item->kind.poly.y[2]=(real)y3;
+	item->kind.poly.x[3]=(real)x4;
+	item->kind.poly.y[3]=(real)y4;
+	item->type=SciPlotPoly;
+	ItemDraw(w,item);
+}
+
+static void
+FilledQuadSet(w,x1,y1,x2,y2,x3,y3,x4,y4,color,style)
+SciPlotWidget w;
+real x1,y1,x2,y2,x3,y3,x4,y4;
+int color,style;
+{
+SciPlotItem	*item;
+
+	item=ItemGetNew(w);
+	item->kind.any.color=(short)color;
+	item->kind.any.style=(short)style;
+	item->kind.poly.count=4;
+	item->kind.poly.x[0]=(real)x1;
+	item->kind.poly.y[0]=(real)y1;
+	item->kind.poly.x[1]=(real)x2;
+	item->kind.poly.y[1]=(real)y2;
+	item->kind.poly.x[2]=(real)x3;
+	item->kind.poly.y[2]=(real)y3;
+	item->kind.poly.x[3]=(real)x4;
+	item->kind.poly.y[3]=(real)y4;
+	item->type=SciPlotFPoly;
+	ItemDraw(w,item);
+}
+
+static void
+CircleSet(w,x,y,r,color,style)
+SciPlotWidget w;
+real x,y,r;
+int color,style;
+{
+SciPlotItem	*item;
+
+	item=ItemGetNew(w);
+	item->kind.any.color=(short)color;
+	item->kind.any.style=(short)style;
+	item->kind.circ.x=(real)x;
+	item->kind.circ.y=(real)y;
+	item->kind.circ.r=(real)r;
+	item->type=SciPlotCircle;
+	ItemDraw(w,item);
+}
+
+static void
+FilledCircleSet(w,x,y,r,color,style)
+SciPlotWidget w;
+real x,y,r;
+int color,style;
+{
+SciPlotItem	*item;
+
+	item=ItemGetNew(w);
+	item->kind.any.color=(short)color;
+	item->kind.any.style=(short)style;
+	item->kind.circ.x=(real)x;
+	item->kind.circ.y=(real)y;
+	item->kind.circ.r=(real)r;
+	item->type=SciPlotFCircle;
+	ItemDraw(w,item);
+}
+
+static void
+TextSet(w,x,y,text,color,font)
+SciPlotWidget w;
+real x,y;
+char *text;
+int color,font;
+{
+SciPlotItem	*item;
+
+	item=ItemGetNew(w);
+	item->kind.any.color=(short)color;
+	item->kind.any.style=0;
+	item->kind.text.x=(real)x;
+	item->kind.text.y=(real)y;
+	item->kind.text.length=strlen(text);
+	item->kind.text.text=XtMalloc((int)item->kind.text.length+1);
+	item->kind.text.font=font;
+	strcpy(item->kind.text.text,text);
+	item->type=SciPlotText;
+	ItemDraw(w,item);
+#ifdef DEBUG_SCIPLOT_TEXT
+	if (1) {
+	real x1,y1;
+	
+		y-=FontnumAscent(w,font);
+		y1=y+FontnumHeight(w,font)-1.0;
+		x1=x+FontnumTextWidth(w,font,text)-1.0;
+		RectSet(w,x,y,x1,y1,color,XtLINE_SOLID);
+	}
+#endif
+}
+
+static void
+TextCenter(w,x,y,text,color,font)
+SciPlotWidget w;
+real x,y;
+char *text;
+int color,font;
+{
+	x-=FontnumTextWidth(w,font,text)/2.0;
+	y+=FontnumHeight(w,font)/2.0 - FontnumDescent(w,font);
+	TextSet(w,x,y,text,color,font);
+}
+
+static void
+VTextSet(w,x,y,text,color,font)
+SciPlotWidget w;
+real x,y;
+char *text;
+int color,font;
+{
+SciPlotItem	*item;
+
+	item=ItemGetNew(w);
+	item->kind.any.color=(short)color;
+	item->kind.any.style=0;
+	item->kind.text.x=(real)x;
+	item->kind.text.y=(real)y;
+	item->kind.text.length=strlen(text);
+	item->kind.text.text=XtMalloc((int)item->kind.text.length+1);
+	item->kind.text.font=font;
+	strcpy(item->kind.text.text,text);
+	item->type=SciPlotVText;
+	ItemDraw(w,item);
+#ifdef DEBUG_SCIPLOT_TEXT
+	if (1) {
+	real x1,y1;
+
+		x+=FontnumDescent(w,font);
+		x1=x-FontnumHeight(w,font)-1.0;
+		y1=y-FontnumTextWidth(w,font,text)-1.0;
+		RectSet(w,x,y,x1,y1,color,XtLINE_SOLID);
+	}
+#endif
+}
+
+static void
+VTextCenter(w,x,y,text,color,font)
+SciPlotWidget w;
+real x,y;
+char *text;
+int color,font;
+{
+	x+=FontnumHeight(w,font)/2.0 - FontnumDescent(w,font);
+	y+=FontnumTextWidth(w,font,text)/2.0;
+	VTextSet(w,x,y,text,color,font);
+}
+
+static void
+ClipSet(w)
+SciPlotWidget w;
+{
+SciPlotItem	*item;
+
+	if (w->plot.ChartType==XtCARTESIAN) {
+		item=ItemGetNew(w);
+		item->kind.any.style=XtLINE_SOLID;
+		item->kind.any.color=1;
+		item->kind.line.x1=w->plot.x.Origin;
+		item->kind.line.x2=w->plot.x.Size;
+		item->kind.line.y1=w->plot.y.Origin;
+		item->kind.line.y2=w->plot.y.Size;
+#ifdef DEBUG_SCIPLOT
+		printf("clipping region: x=%f y=%f w=%f h=%f\n",
+			item->kind.line.x1,
+			item->kind.line.y1,
+			item->kind.line.x2,
+			item->kind.line.y2
+		);
+#endif
+		item->type=SciPlotClipRegion;
+		ItemDraw(w,item);
+	}
+}
+
+static void
+ClipClear(w)
+SciPlotWidget w;
+{
+SciPlotItem	*item;
+
+	if (w->plot.ChartType==XtCARTESIAN) {
+		item=ItemGetNew(w);
+		item->kind.any.style=XtLINE_SOLID;
+		item->kind.any.color=1;
+		item->type=SciPlotClipClear;
+		ItemDraw(w,item);
+	}
+}
+
+
+/*
+** Private List functions -------------------------------------------------
+**
+*/
+
+static int
+List_New(w)
+SciPlotWidget w;
+{
+int index;
+SciPlotList *p;
+Boolean found;
+
+/* First check to see if there is any free space in the index */
+	found=FALSE;
+	for (index=0; index<w->plot.num_plotlist; index++) {
+		p=w->plot.plotlist+index;
+		if (!p->used) {
+			found=TRUE;
+			break;
+		}
+	}
+	
+/* If no space is found, increase the size of the index */
+	if (!found) {
+		w->plot.num_plotlist++;
+		if (w->plot.alloc_plotlist==0) {
+			w->plot.alloc_plotlist=NUMPLOTLINEALLOC;
+			w->plot.plotlist=(SciPlotList *)XtCalloc(w->plot.alloc_plotlist,sizeof(SciPlotList));
+			if (!w->plot.plotlist) {
+				printf("Can't calloc memory for SciPlotList\n");
+				exit(1);
+			}
+			w->plot.alloc_plotlist=NUMPLOTLINEALLOC;
+		}
+		else if (w->plot.num_plotlist>w->plot.alloc_plotlist) {
+			w->plot.alloc_plotlist+=NUMPLOTLINEALLOC;
+			w->plot.plotlist=(SciPlotList *)XtRealloc((char *)w->plot.plotlist,
+			w->plot.alloc_plotlist*sizeof(SciPlotList));
+			if (!w->plot.plotlist) {
+				printf("Can't realloc memory for SciPlotList\n");
+				exit(1);
+			}
+		}
+		index=w->plot.num_plotlist-1;
+		p=w->plot.plotlist+index;
+	}
+	
+	p->LineStyle=p->LineColor=p->PointStyle=p->PointColor=0;
+	p->number=p->allocated=0;
+	p->data=NULL;
+	p->legend=NULL;
+	p->draw=p->used=TRUE;
+	return index;
+}
+
+static void
+List_Delete(p)
+SciPlotList *p;
+{
+	p->draw=p->used=FALSE;
+	p->number=p->allocated=0;
+	if (p->data) free(p->data);
+	p->data=NULL;
+	if (p->legend) free(p->legend);
+	p->legend=NULL;
+}
+
+static SciPlotList *
+List_Find(w,id)
+SciPlotWidget w;
+int id;
+{
+SciPlotList *p;
+
+	if ((id>=0)&&(id<w->plot.num_plotlist)) {
+		p=w->plot.plotlist+id;
+		if (p->used) return p;
+	}
+	return NULL;
+}
+
+static void
+List_SetStyle(p,pcolor,pstyle,lcolor,lstyle)
+SciPlotList *p;
+int pstyle,pcolor,lstyle,lcolor;
+{
+/* Note!  Do checks in here later on... */
+
+	if (lstyle>=0) p->LineStyle=lstyle;
+	if (lcolor>=0) p->LineColor=lcolor;
+	if (pstyle>=0) p->PointStyle=pstyle;
+	if (pcolor>=0) p->PointColor=pcolor;
+}
+
+static void
+List_SetLegend(p,legend)
+SciPlotList *p;
+char *legend;
+{
+/* Note!  Do checks in here later on... */
+
+	p->legend=(char *)XtMalloc(strlen(legend)+1);
+	strcpy(p->legend,legend);
+}
+
+static void
+List_AllocData(p,num)
+SciPlotList *p;
+int num;
+{
+	if (p->data) {
+		free(p->data);
+		p->allocated=0;
+	}
+	p->allocated=num+NUMPLOTDATAEXTRA;
+	p->data=(realpair *)XtCalloc(p->allocated,sizeof(realpair));
+	if (!p->data) {
+		p->number=p->allocated=0;
+	}
+}
+
+static void
+List_SetReal(p,num,xlist,ylist)
+SciPlotList *p;
+int num;
+real *xlist,*ylist;
+{
+int i;
+
+	if ((!p->data)||(p->allocated<num)) List_AllocData(p,num);
+	if (p->data) {
+		p->number=num;
+		for (i=0; i<num; i++) {
+			p->data[i].x=xlist[i];
+			p->data[i].y=ylist[i];
+		}
+	}
+}
+
+static void
+List_SetFloat(p,num,xlist,ylist)
+SciPlotList *p;
+int num;
+float *xlist,*ylist;
+{
+int i;
+
+	if ((!p->data)||(p->allocated<num)) List_AllocData(p,num);
+	if (p->data) {
+		p->number=num;
+		for (i=0; i<num; i++) {
+			p->data[i].x=(real)xlist[i];
+			p->data[i].y=(real)ylist[i];
+		}
+	}
+}
+
+static void
+List_SetDouble(p,num,xlist,ylist)
+SciPlotList *p;
+int num;
+double *xlist,*ylist;
+{
+int i;
+
+	if ((!p->data)||(p->allocated<num)) List_AllocData(p,num);
+	if (p->data) {
+		p->number=num;
+		for (i=0; i<num; i++) {
+			p->data[i].x=(real)xlist[i];
+			p->data[i].y=(real)ylist[i];
+		}
+	}
+}
+
+
+/*
+** Private data point to screen location converters -------------------------
+**
+*/
+
+static real
+PlotX(w,xin)
+SciPlotWidget w;
+real xin;
+{
+real xout;
+
+	xin *= w->plot.x.Scalefact;
+	if (w->plot.XLog) xout=w->plot.x.Origin +
+		((log10(xin) - log10(w->plot.x.DrawOrigin)) *
+		(w->plot.x.Size / w->plot.x.DrawSize));
+	else xout=w->plot.x.Origin +
+		((xin - w->plot.x.DrawOrigin*w->plot.x.Scalefact) *
+		(w->plot.x.Size / (w->plot.x.DrawSize*w->plot.x.Scalefact)));
+	return xout;
+}
+
+static real
+PlotY(w,yin)
+SciPlotWidget w;
+real yin;
+{
+real yout;
+
+	yin *= w->plot.y.Scalefact;
+	if (w->plot.YLog) {
+		yout=w->plot.y.Origin + w->plot.y.Size -
+			((log10(yin) - log10(w->plot.y.DrawOrigin)) *
+			(w->plot.y.Size / w->plot.y.DrawSize));
+		}
+	else yout=w->plot.y.Origin + w->plot.y.Size -
+		((yin - w->plot.y.DrawOrigin*w->plot.y.Scalefact) *
+		(w->plot.y.Size / (w->plot.y.DrawSize*w->plot.y.Scalefact)));
+
+	return yout;
+}
+
+static void
+PlotRTRadians(w,r,t,xout,yout)
+SciPlotWidget w;
+real r,t,*xout,*yout;
+{
+	*xout=w->plot.x.Center + (r*(real)cos(t) /
+		w->plot.PolarScale*w->plot.x.Size/2.0);
+	*yout=w->plot.y.Center + (-r*(real)sin(t) /
+		w->plot.PolarScale*w->plot.x.Size/2.0);
+}
+
+static void
+PlotRTDegrees(w,r,t,xout,yout)
+SciPlotWidget w;
+real r,t,*xout,*yout;
+{
+	t*=DEG2RAD;
+	PlotRTRadians(w,r,t,xout,yout);
+}
+
+static void
+PlotRT(w,r,t,xout,yout)
+SciPlotWidget w;
+real r,t,*xout,*yout;
+{
+	if (w->plot.Degrees) t*=DEG2RAD;
+	PlotRTRadians(w,r,t,xout,yout);
+}
+
+
+/*
+** Private calculation utilities for axes ---------------------------------
+**
+*/
+
+#define NUMBER_MINOR	8
+#define MAX_MAJOR	8
+static float CAdeltas[8]={0.1, 0.2, 0.25, 0.5, 1.0, 2.0, 2.5, 5.0};
+static int CAdecimals[8]={  0,   0,    1,   0,   0,   0,   1,   0};
+static int CAminors[8]  ={  4,   4,    4,   5,   4,   4,   4,   5};
+
+static void
+ComputeAxis(axis,min,max,log)
+SciPlotAxis *axis;
+real min,max;
+Boolean log;
+{ 
+double range,rnorm,delta,calcmin,calcmax,base,expon,maxabs;
+int nexp,majornum,minornum,majordecimals,decimals,i;
+
+	axis->Scalefact = 1.0;
+	axis->Scale_expon = 0;
+	range=max-min;
+	if (log) {
+		calcmin=pow(10.0,(double)((int)floor(log10(min))));
+		calcmax=pow(10.0,(double)((int)ceil(log10(max))));
+		delta=10.0;
+		
+		axis->DrawOrigin=(real)calcmin;
+		axis->DrawMax=(real)calcmax;
+		axis->DrawSize=(real)(log10(calcmax)-log10(calcmin));
+		axis->MajorInc=(real)delta;
+		axis->MajorNum=(int)(log10(calcmax)-log10(calcmin))+1;
+		axis->MinorNum=10;
+		axis->Precision=-(int)(log10(calcmin)*1.0001);
+#ifdef DEBUG_SCIPLOT
+	printf("calcmin=%e log=%e (int)log=%d  Precision=%d\n",
+		calcmin,log10(calcmin),(int)(log10(calcmin)*1.0001),axis->Precision);
+#endif
+		if (axis->Precision<0) axis->Precision=0;
+	}
+	else {
+		nexp=(int)(floor(log10(range)));
+		rnorm=range/pow(10.0,(double)nexp);
+		for (i=0; i<NUMBER_MINOR; i++) {
+			delta=CAdeltas[i];
+			minornum=CAminors[i];
+			majornum=(int)((rnorm+0.9999999*delta)/delta);
+			majordecimals=CAdecimals[i];
+			if (majornum<=MAX_MAJOR) break;
+		}
+		delta*=pow(10.0,(double)nexp);
+#ifdef DEBUG_SCIPLOT
+	printf("nexp=%d range=%f rnorm=%f delta=%f\n",nexp,range,rnorm,delta);
+#endif
+
+		if (min<0.0)
+			calcmin=((double)((int)((min-.9999999*delta)/delta)))*delta;
+		else if ((min>0.0)&&(min<1.0))
+			calcmin=((double)((int)((1.0000001*min)/delta)))*delta;
+		else if (min>=1.0)
+			calcmin=((double)((int)((.9999999*min)/delta)))*delta;
+		else
+			calcmin=min;
+		if (max<0.0)
+			calcmax=((double)((int)((.9999999*max)/delta)))*delta;
+		else if (max>0.0)
+			calcmax=((double)((int)((max+.9999999*delta)/delta)))*delta;
+		else
+			calcmax=max;
+		
+maxabs = (fabs(calcmax) > fabs(calcmin)) ? fabs(calcmax) : fabs(calcmin);
+expon = log10( maxabs );
+expon = my_nint(expon);
+base = 10.0;
+expon = -1.0*expon;
+if( expon > 3.0 )
+	axis->Scalefact = pow( base, expon );
+else if( expon < -3.0 ) 
+	{
+	expon += 1.0;
+	axis->Scalefact = pow( base, expon );
+	}
+else
+	expon = 0.0;
+axis->Scale_expon = my_nint(expon);
+		axis->DrawOrigin=(real)calcmin;
+		axis->DrawMax=(real)calcmax;
+		axis->DrawSize=(real)(calcmax-calcmin);
+		axis->MajorInc=(real)delta;
+		axis->MajorNum=majornum;
+		axis->MinorNum=minornum;
+
+		delta=log10(axis->MajorInc*axis->Scalefact);
+		if (delta>0.0)
+			decimals=-(int)floor(delta)+majordecimals;
+		else
+			decimals=(int)ceil(-delta)+majordecimals;
+		if (decimals<0) decimals=0;
+#ifdef DEBUG_SCIPLOT
+	printf("delta=%f majordecimals=%d decimals=%d\n",
+		delta,majordecimals,decimals);
+#endif
+		axis->Precision=decimals;
+	}
+	
+#ifdef DEBUG_SCIPLOT
+	printf("Tics: min=%f max=%f size=%f  major inc=%f #major=%d #minor=%d decimals=%d\n",
+		axis->DrawOrigin,axis->DrawMax,axis->DrawSize,
+		axis->MajorInc,axis->MajorNum,axis->MinorNum,axis->Precision);
+#endif
+}
+
+static void
+ComputeDrawingRange(w)
+SciPlotWidget w;
+{
+	if (w->plot.ChartType==XtCARTESIAN) {
+		ComputeAxis(&w->plot.x,w->plot.Min.x,w->plot.Max.x,
+			w->plot.XLog);
+		ComputeAxis(&w->plot.y,w->plot.Min.y,w->plot.Max.y,
+			w->plot.YLog);
+	}
+	else {
+		ComputeAxis(&w->plot.x,(real)0.0,w->plot.Max.x,
+			(Boolean)FALSE);
+		w->plot.PolarScale=w->plot.x.DrawMax;
+	}
+}
+
+static void
+ComputeMinMax(w)
+SciPlotWidget w;
+{
+register int i,j;
+register SciPlotList *p;
+register real val;
+Boolean firstx,firsty;
+
+	w->plot.Min.x=w->plot.Min.y=w->plot.Max.x=w->plot.Max.y=1.0;
+	firstx=True;
+	firsty=True;
+	
+	for (i=0; i<w->plot.num_plotlist; i++) {
+		p=w->plot.plotlist+i;
+		if (p->draw) {
+			for (j=0; j<p->number; j++) {
+				val=p->data[j].x;
+				if (!w->plot.XLog||(w->plot.XLog&&(val>0.0))) {
+					if (firstx) {
+						w->plot.Min.x=w->plot.Max.x=val;
+						firstx=False;
+					}
+					else {
+						if (val>w->plot.Max.x)
+							w->plot.Max.x=val;
+						else if (val<w->plot.Min.x)
+							w->plot.Min.x=val;
+					}
+				}
+
+				val=p->data[j].y;
+				if (!w->plot.YLog||(w->plot.YLog&&(val>0.0))) {
+					if (firsty) {
+						w->plot.Min.y=w->plot.Max.y=val;
+						firsty=False;
+					}
+					else {
+						if (val>w->plot.Max.y)
+							w->plot.Max.y=val;
+						else if (val<w->plot.Min.y)
+							w->plot.Min.y=val;
+					}
+				}
+			}
+		}
+	}
+	if (firstx) {
+		if (w->plot.XLog) {
+			w->plot.Min.x=1.0;
+			w->plot.Max.x=10.0;
+		}
+		else {
+			w->plot.Min.x=0.0;
+			w->plot.Max.x=10.0;
+		}
+	}
+	if (firsty) {
+		if (w->plot.YLog) {
+			w->plot.Min.y=1.0;
+			w->plot.Max.y=10.0;
+		}
+		else {
+			w->plot.Min.y=0.0;
+			w->plot.Max.y=10.0;
+		}
+	}
+	if (w->plot.ChartType==XtCARTESIAN) {
+		if (!w->plot.XLog) {
+			if (!w->plot.XAutoScale) {
+				w->plot.Min.x=w->plot.UserMin.x;
+				w->plot.Max.x=w->plot.UserMax.x;
+			}
+			else if (w->plot.XOrigin) {
+				if (w->plot.Min.x>0.0) w->plot.Min.x=0.0;
+				if (w->plot.Max.x<0.0) w->plot.Max.x=0.0;
+			}
+		}
+		if (!w->plot.YLog) {
+			if (!w->plot.YAutoScale) {
+				w->plot.Min.y=w->plot.UserMin.y;
+				w->plot.Max.y=w->plot.UserMax.y;
+			}
+			else if (w->plot.YOrigin) {
+				if (w->plot.Min.y>0.0) w->plot.Min.y=0.0;
+				if (w->plot.Max.y<0.0) w->plot.Max.y=0.0;
+			}
+		}
+	}
+	else {
+		if (fabs(w->plot.Min.x)>fabs(w->plot.Max.x))
+			w->plot.Max.x=fabs(w->plot.Min.x);
+	}
+	
+#ifdef DEBUG_SCIPLOT
+printf("Min: (%f,%f)\tMax: (%f,%f)\n",
+	w->plot.Min.x,w->plot.Min.y,
+	w->plot.Max.x,w->plot.Max.y);
+#endif
+}
+
+static void
+ComputeLegendDimensions(w)
+SciPlotWidget w;
+{
+real current,xmax,ymax;
+int i;
+SciPlotList *p;
+
+	if (w->plot.ShowLegend) {
+		xmax=0.0;
+		ymax=2.0*(real)w->plot.LegendMargin;
+		
+		for (i=0; i<w->plot.num_plotlist; i++) {
+			p=w->plot.plotlist+i;
+			if (p->draw) {
+				current=(real)w->plot.Margin +
+					(real)w->plot.LegendMargin*3.0 +
+					(real)w->plot.LegendLineSize +
+					FontnumTextWidth(w,w->plot.axisFont,p->legend);
+				if (current>xmax) xmax=current;
+				ymax+=FontnumHeight(w,w->plot.axisFont);
+			}
+		}
+		
+		w->plot.x.LegendSize=xmax;
+		w->plot.x.LegendPos=(real)w->plot.Margin;
+		w->plot.y.LegendSize=ymax;
+		w->plot.y.LegendPos=0.0;
+	}
+	else {
+		w->plot.x.LegendSize=
+		w->plot.x.LegendPos=
+		w->plot.y.LegendSize=
+		w->plot.y.LegendPos=0.0;
+	}
+}
+
+static void
+ComputeDimensions(w)
+SciPlotWidget w;
+{
+real x,y,width,height,axisnumbersize,axisXlabelsize,axisYlabelsize;
+
+/* x,y is the origin of the upper left corner of the drawing area inside
+** the widget.  Doesn't necessarily have to be (Margin,Margin) as it is now.
+*/
+	x=(real)w->plot.Margin;
+	y=(real)w->plot.Margin;
+
+/* width = (real)w->core.width - (real)w->plot.Margin - x -
+**		legendwidth - AxisFontHeight
+*/
+	width=(real)w->core.width - (real)w->plot.Margin - x -
+		w->plot.x.LegendSize;
+
+/* height = (real)w->core.height - (real)w->plot.Margin - y
+**		- Height of axis numbers (including margin)
+**		- Height of axis label (including margin)
+**		- Height of Title (including margin)
+*/
+	height=(real)w->core.height - (real)w->plot.Margin - y;
+
+	w->plot.x.Origin=x;
+	w->plot.y.Origin=y;
+
+/* Adjust the size depending upon what sorts of text are visible. */
+	if (w->plot.ShowTitle)
+		height-=(real)w->plot.TitleMargin+
+			FontnumHeight(w,w->plot.titleFont);
+
+	if (w->plot.ChartType==XtCARTESIAN) {
+		axisnumbersize=(real)w->plot.Margin+
+			FontnumHeight(w,w->plot.axisFont);
+		height-=axisnumbersize;
+		width-=axisnumbersize;
+		w->plot.x.Origin+=axisnumbersize;
+		
+		if (w->plot.ShowXLabel) {
+			axisXlabelsize=(real)w->plot.Margin+
+				FontnumHeight(w,w->plot.labelFont);
+			height-=axisXlabelsize;
+		}
+		if (w->plot.ShowYLabel) {
+			axisYlabelsize=(real)w->plot.Margin+
+				FontnumHeight(w,w->plot.labelFont);
+			width-=axisYlabelsize;
+			w->plot.x.Origin+=axisYlabelsize;
+		}
+	}
+	
+	w->plot.x.Size=width;
+	w->plot.y.Size=height;
+
+/* Adjust parameters for polar plot */
+	if (w->plot.ChartType==XtPOLAR) {
+		if (height<width) w->plot.x.Size=height;
+	}
+	w->plot.x.Center=w->plot.x.Origin+(width/2.0);
+	w->plot.y.Center=w->plot.y.Origin+(height/2.0);
+	
+}
+
+static void
+AdjustDimensions(w)
+SciPlotWidget w;
+{
+real xextra,yextra,val;
+real x,y,width,height,axisnumbersize,axisXlabelsize,axisYlabelsize;
+char numberformat[160],label[160];
+int precision;
+
+/* Compute xextra and yextra, which are the extra distances that the text
+** labels on the axes stick outside of the graph.
+*/
+	xextra=yextra=0.0;
+	if (w->plot.ChartType==XtCARTESIAN) {
+		precision=w->plot.x.Precision;
+		if (w->plot.XLog) {
+			val=w->plot.x.DrawMax;
+			precision-=w->plot.x.MajorNum;
+			if (precision<0) precision=0;
+		}
+		else
+			val=w->plot.x.DrawOrigin+floor(w->plot.x.DrawSize/
+				w->plot.x.MajorInc)*w->plot.x.MajorInc;
+		x=PlotX(w,val);
+		val /= w->plot.x.Scalefact;
+		get_number_format( numberformat, precision, val );
+		sprintf(label,numberformat,val);
+		x+=FontnumTextWidth(w,w->plot.axisFont,label);
+		if ((int)x>w->core.width) {
+			xextra=ceil(x-w->core.width+w->plot.Margin);
+			if (xextra<0.0) xextra=0.0;
+		}
+
+		precision=w->plot.y.Precision;
+		if (w->plot.YLog) {
+			val=w->plot.y.DrawMax;
+			precision-=w->plot.y.MajorNum;
+			if (precision<0) precision=0;
+		}
+		else
+			val=w->plot.y.DrawOrigin+floor(w->plot.y.DrawSize/
+				w->plot.y.MajorInc*1.0001)*w->plot.y.MajorInc;
+		y=PlotY(w,val);
+		val /= w->plot.y.Scalefact;
+		get_number_format( numberformat, precision, val );
+		sprintf(label,numberformat,val);
+#ifdef DEBUG_SCIPLOT
+		printf("ylabel=%s\n",label);
+#endif
+		y-=FontnumTextWidth(w,w->plot.axisFont,label);
+		if ((int)y<=0) {
+			yextra=ceil(w->plot.Margin-y);
+			if (yextra<0.0) yextra=0.0;
+		}
+	}
+	else {
+		val=w->plot.PolarScale;
+		PlotRTDegrees(w,val,0.0,&x,&y);
+		get_number_format( numberformat, w->plot.x.Precision, val );
+		sprintf(label,numberformat,val);
+		x+=FontnumTextWidth(w,w->plot.axisFont,label);
+		if ((int)x>w->core.width) {
+			xextra=x-w->core.width+w->plot.Margin;
+			if (xextra<0.0) xextra=0.0;
+		}
+		yextra=0.0;
+	}
+
+
+/* x,y is the origin of the upper left corner of the drawing area inside
+** the widget.  Doesn't necessarily have to be (Margin,Margin) as it is now.
+*/
+	x=(real)w->plot.Margin;
+	y=(real)w->plot.Margin+yextra;
+
+/* width = (real)w->core.width - (real)w->plot.Margin - x -
+**		legendwidth - AxisFontHeight
+*/
+	width=(real)w->core.width - (real)w->plot.Margin - x - xextra -
+		w->plot.x.LegendSize;
+
+/* height = (real)w->core.height - (real)w->plot.Margin - y
+**		- Height of axis numbers (including margin)
+**		- Height of axis label (including margin)
+**		- Height of Title (including margin)
+*/
+	height=(real)w->core.height - (real)w->plot.Margin - y;
+
+	w->plot.x.Origin=x;
+	w->plot.y.Origin=y;
+
+/* Adjust the size depending upon what sorts of text are visible. */
+	if (w->plot.ShowTitle)
+		height-=(real)w->plot.TitleMargin+
+			FontnumHeight(w,w->plot.titleFont);
+
+	axisnumbersize=0.0;
+	axisXlabelsize=0.0;
+	axisYlabelsize=0.0;
+	if (w->plot.ChartType==XtCARTESIAN) {
+		axisnumbersize=(real)w->plot.Margin+
+			FontnumHeight(w,w->plot.axisFont);
+		height-=axisnumbersize;
+		width-=axisnumbersize;
+		w->plot.x.Origin+=axisnumbersize;
+		
+		if (w->plot.ShowXLabel) {
+			axisXlabelsize=(real)w->plot.Margin+
+				FontnumHeight(w,w->plot.labelFont);
+			height-=axisXlabelsize;
+		}
+		if (w->plot.ShowYLabel) {
+			axisYlabelsize=(real)w->plot.Margin+
+				FontnumHeight(w,w->plot.labelFont);
+			width-=axisYlabelsize;
+			w->plot.x.Origin+=axisYlabelsize;
+		}
+	}
+	
+	w->plot.x.Size=width;
+	w->plot.y.Size=height;
+
+/* Move legend position to the right of the plot */
+	w->plot.x.LegendPos+=w->plot.x.Origin+w->plot.x.Size;
+	w->plot.y.LegendPos+=w->plot.y.Origin;
+	
+/* Adjust parameters for polar plot */
+	if (w->plot.ChartType==XtPOLAR) {
+		if (height<width) w->plot.x.Size=height;
+	}
+	w->plot.x.Center=w->plot.x.Origin+(width/2.0);
+	w->plot.y.Center=w->plot.y.Origin+(height/2.0);
+	
+	w->plot.y.AxisPos=w->plot.y.Origin+w->plot.y.Size+
+		(real)w->plot.Margin+
+		FontnumAscent(w,w->plot.axisFont);
+	w->plot.x.AxisPos=w->plot.x.Origin-
+		(real)w->plot.Margin-
+		FontnumDescent(w,w->plot.axisFont);
+	
+	w->plot.y.LabelPos=w->plot.y.Origin+w->plot.y.Size+
+		axisnumbersize+(real)w->plot.Margin+
+		(FontnumHeight(w,w->plot.labelFont)/2.0);
+	w->plot.x.LabelPos=w->plot.x.Origin-
+		axisnumbersize-(real)w->plot.Margin-
+		(FontnumHeight(w,w->plot.labelFont)/2.0);
+	
+	w->plot.y.TitlePos=w->plot.y.Origin+w->plot.y.Size+
+		axisnumbersize+axisXlabelsize+(real)w->plot.TitleMargin+
+		FontnumAscent(w,w->plot.titleFont);
+	w->plot.x.TitlePos=x;
+	
+#ifdef DEBUG_SCIPLOT
+	printf("y.Origin:		%f\n",w->plot.y.Origin);
+	printf("y.Size:			%f\n",w->plot.y.Size);
+	printf("axisnumbersize:		%f\n",axisnumbersize);
+	printf("y.axisLabelSize:	%f\n",axisYlabelsize);
+	printf("y.TitleSize:		%f\n",
+		(real)w->plot.TitleMargin+FontnumHeight(w,w->plot.titleFont));
+	printf("y.Margin:		%f\n",(real)w->plot.Margin);
+	printf("total-------------------%f\n",w->plot.y.Origin+w->plot.y.Size+
+		axisnumbersize+axisYlabelsize+(real)w->plot.Margin+
+		(real)w->plot.TitleMargin+FontnumHeight(w,w->plot.titleFont));
+	printf("total should be---------%f\n",(real)w->core.height);
+#endif
+}
+
+static void
+ComputeAllDimensions(w)
+SciPlotWidget w;
+{
+	ComputeLegendDimensions(w);
+	ComputeDimensions(w);
+	ComputeDrawingRange(w);
+	AdjustDimensions(w);
+}
+
+static void
+ComputeAll(w)
+SciPlotWidget w;
+{
+	ComputeMinMax(w);
+	ComputeAllDimensions(w);
+}
+
+
+/*
+** Private drawing routines -------------------------------------------------
+**
+*/
+
+static void
+DrawMarker(w,xpaper,ypaper,size,color,style)
+SciPlotWidget w;
+real xpaper,ypaper,size;
+int style,color;
+{
+real sizex,sizey;
+
+	switch(style) {
+	case XtMARKER_CIRCLE:
+		CircleSet(w,xpaper,ypaper,size,color,XtLINE_SOLID);
+		break;
+	case XtMARKER_FCIRCLE:
+		FilledCircleSet(w,xpaper,ypaper,size,color,XtLINE_SOLID);
+		break;
+	case XtMARKER_SQUARE:
+		size-=.5;
+		RectSet(w,xpaper-size,ypaper-size,
+			xpaper+size,ypaper+size,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_FSQUARE:
+		size-=.5;
+		FilledRectSet(w,xpaper-size,ypaper-size,
+			xpaper+size,ypaper+size,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_UTRIANGLE:
+		sizex=size*.866;
+		sizey=size/2.0;
+		TriSet(w,xpaper,ypaper-size,
+			xpaper+sizex,ypaper+sizey,
+			xpaper-sizex,ypaper+sizey,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_FUTRIANGLE:
+		sizex=size*.866;
+		sizey=size/2.0;
+		FilledTriSet(w,xpaper,ypaper-size,
+			xpaper+sizex,ypaper+sizey,
+			xpaper-sizex,ypaper+sizey,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_DTRIANGLE:
+		sizex=size*.866;
+		sizey=size/2.0;
+		TriSet(w,xpaper,ypaper+size,
+			xpaper+sizex,ypaper-sizey,
+			xpaper-sizex,ypaper-sizey,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_FDTRIANGLE:
+		sizex=size*.866;
+		sizey=size/2.0;
+		FilledTriSet(w,xpaper,ypaper+size,
+			xpaper+sizex,ypaper-sizey,
+			xpaper-sizex,ypaper-sizey,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_RTRIANGLE:
+		sizey=size*.866;
+		sizex=size/2.0;
+		TriSet(w,xpaper+size,ypaper,
+			xpaper-sizex,ypaper+sizey,
+			xpaper-sizex,ypaper-sizey,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_FRTRIANGLE:
+		sizey=size*.866;
+		sizex=size/2.0;
+		FilledTriSet(w,xpaper+size,ypaper,
+			xpaper-sizex,ypaper+sizey,
+			xpaper-sizex,ypaper-sizey,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_LTRIANGLE:
+		sizey=size*.866;
+		sizex=size/2.0;
+		TriSet(w,xpaper-size,ypaper,
+			xpaper+sizex,ypaper+sizey,
+			xpaper+sizex,ypaper-sizey,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_FLTRIANGLE:
+		sizey=size*.866;
+		sizex=size/2.0;
+		FilledTriSet(w,xpaper-size,ypaper,
+			xpaper+sizex,ypaper+sizey,
+			xpaper+sizex,ypaper-sizey,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_DIAMOND:
+		QuadSet(w,xpaper,ypaper-size,
+			xpaper+size,ypaper,
+			xpaper,ypaper+size,
+			xpaper-size,ypaper,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_FDIAMOND:
+		FilledQuadSet(w,xpaper,ypaper-size,
+			xpaper+size,ypaper,
+			xpaper,ypaper+size,
+			xpaper-size,ypaper,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_HOURGLASS:
+		QuadSet(w,xpaper-size,ypaper-size,
+			xpaper+size,ypaper-size,
+			xpaper-size,ypaper+size,
+			xpaper+size,ypaper+size,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_FHOURGLASS:
+		FilledQuadSet(w,xpaper-size,ypaper-size,
+			xpaper+size,ypaper-size,
+			xpaper-size,ypaper+size,
+			xpaper+size,ypaper+size,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_BOWTIE:
+		QuadSet(w,xpaper-size,ypaper-size,
+			xpaper-size,ypaper+size,
+			xpaper+size,ypaper-size,
+			xpaper+size,ypaper+size,
+			color,XtLINE_SOLID);
+		break;
+	case XtMARKER_FBOWTIE:
+		FilledQuadSet(w,xpaper-size,ypaper-size,
+			xpaper-size,ypaper+size,
+			xpaper+size,ypaper-size,
+			xpaper+size,ypaper+size,
+			color,XtLINE_SOLID);
+		break;
+
+	default:
+		break;
+	}
+}
+
+static void
+DrawLegend(w)
+SciPlotWidget w;
+{
+real x,y,len,height,height2,len2,ascent;
+int i;
+SciPlotList *p;
+
+	if (w->plot.ShowLegend) {
+		x=w->plot.x.LegendPos;
+		y=w->plot.y.LegendPos;
+		len=(real)w->plot.LegendLineSize;
+		len2=len/2.0;
+		height=FontnumHeight(w,w->plot.axisFont);
+		height2=height/2.0;
+		ascent=FontnumAscent(w,w->plot.axisFont);
+		RectSet(w,x,y,
+			x+w->plot.x.LegendSize-1.0-(real)w->plot.Margin,
+			y+w->plot.y.LegendSize-1.0,
+			w->plot.ForegroundColor,XtLINE_SOLID);
+		x+=(real)w->plot.LegendMargin;
+		y+=(real)w->plot.LegendMargin;
+		
+		for (i=0; i<w->plot.num_plotlist; i++) {
+			p=w->plot.plotlist+i;
+			if (p->draw) {
+				LineSet(w,x,y+height2,x+len,y+height2,
+					p->LineColor,p->LineStyle);
+				DrawMarker(w,x+len2,y+height2,(real)3.0,
+					p->PointColor,p->PointStyle);
+				TextSet(w,x+len+(real)w->plot.LegendMargin,
+					y+ascent,
+					p->legend,w->plot.ForegroundColor,
+					w->plot.axisFont);
+				y+=height;
+			}
+		}
+	}
+}
+
+static void
+DrawCartesianAxes(w)
+SciPlotWidget w;
+{
+double x,y,x1,y1,x2,y2,tic,val,height,majorval;
+int j,precision;
+char numberformat[16],label[512],tlabel[512];
+
+	height=FontnumHeight(w,w->plot.labelFont);
+	
+	/* The w->plot.x.DrawOrigin and so on are in user data units.
+	 * the x1, y1, x2, y2 are in pixels 
+	 */
+	x1=PlotX(w,w->plot.x.DrawOrigin);
+	y1=PlotY(w,w->plot.y.DrawOrigin);
+	x2=PlotX(w,w->plot.x.DrawMax);
+	y2=PlotY(w,w->plot.y.DrawMax);
+
+	LineSet(w,x1,y1,x2,y1,w->plot.ForegroundColor,XtLINE_SOLID);
+	LineSet(w,x1,y1,x1,y2,w->plot.ForegroundColor,XtLINE_SOLID);
+
+	precision=w->plot.x.Precision;
+	if (w->plot.XLog) {
+		val=w->plot.x.DrawOrigin;
+		if (precision>0) precision--;	
+	}
+	else {
+		val=w->plot.x.DrawOrigin;
+	}
+	x=PlotX(w,val);
+	if (w->plot.DrawMajorTics)
+		LineSet(w,x,y1+5,x,y1-5,w->plot.ForegroundColor,XtLINE_SOLID);
+
+	get_number_format( numberformat, precision, val*w->plot.x.Scalefact );
+	if( w->plot.XFmtCallback != NULL )
+		(*(w->plot.XFmtCallback))((Widget)w,val,label);
+	else
+		sprintf(label,numberformat,val*w->plot.x.Scalefact);
+	TextSet(w,x,w->plot.y.AxisPos,label,w->plot.ForegroundColor,
+		w->plot.axisFont);
+	
+	majorval=val;
+	while ((majorval*1.00000001)<w->plot.x.DrawMax) {
+		if (w->plot.XLog) {
+
+/* Hack to make sure that 9.99999e? still gets interpreted as 10.0000e? */
+			if (majorval*1.1>w->plot.x.DrawMax) break;
+			tic=majorval;
+			if (w->plot.DrawMinor||w->plot.DrawMinorTics) {
+				for (j=2; j<w->plot.x.MinorNum; j++) {
+					val=tic*(real)j;
+					x=PlotX(w,val);
+					if (w->plot.DrawMinor)
+						LineSet(w,x,y1,x,y2,
+							w->plot.ForegroundColor,
+							XtLINE_WIDEDOT);
+					if (w->plot.DrawMinorTics)
+						LineSet(w,x,y1,x,y1-3,
+							w->plot.ForegroundColor,
+							XtLINE_SOLID);
+				}
+			}
+			val=tic*(real)w->plot.x.MinorNum;
+			if (precision>0) precision--;	
+		}
+		else {
+			tic=majorval;
+			if (w->plot.DrawMinor||w->plot.DrawMinorTics) {
+				for (j=1; j<w->plot.x.MinorNum; j++) {
+					val=tic+w->plot.x.MajorInc*(real)j/
+						w->plot.x.MinorNum;
+					x=PlotX(w,val);
+					if (w->plot.DrawMinor)
+						LineSet(w,x,y1,x,y2,
+							w->plot.ForegroundColor,
+							XtLINE_WIDEDOT);
+					if (w->plot.DrawMinorTics)
+						LineSet(w,x,y1,x,y1-3,
+							w->plot.ForegroundColor,
+							XtLINE_SOLID);
+				}
+			}
+			val=tic+w->plot.x.MajorInc;
+		}
+		x=PlotX(w,val);
+		if (w->plot.DrawMajor)
+			LineSet(w,x,y1,x,y2,w->plot.ForegroundColor,
+				XtLINE_DOTTED);
+		if (w->plot.DrawMajorTics)
+			LineSet(w,x,y1+5,x,y1-5,w->plot.ForegroundColor,
+				XtLINE_SOLID);
+		get_number_format( numberformat, precision, val*w->plot.x.Scalefact );
+		if( w->plot.XFmtCallback != NULL )
+			(*(w->plot.XFmtCallback))((Widget)w,val,label);
+		else
+			sprintf(label,numberformat,val*w->plot.x.Scalefact);
+		TextSet(w,x,w->plot.y.AxisPos,label,w->plot.ForegroundColor,
+			w->plot.axisFont);
+		majorval=val;
+	}
+
+	precision=w->plot.y.Precision;
+	if (w->plot.YLog) {
+		val=w->plot.y.DrawOrigin;
+		if (precision>0) precision--;
+	}
+	else {
+		val=w->plot.y.DrawOrigin;
+	}
+	y=PlotY(w,val);
+	if (w->plot.DrawMajorTics)
+		LineSet(w,x1+5,y,x1-5,y,w->plot.ForegroundColor,XtLINE_SOLID);
+
+	get_number_format( numberformat, precision, val*w->plot.y.Scalefact );
+	sprintf(label,numberformat,val*w->plot.y.Scalefact);
+	VTextSet(w,w->plot.x.AxisPos,y,label,w->plot.ForegroundColor,
+		w->plot.axisFont);
+	
+	majorval=val;
+
+/* majorval*1.0001 is a fudge to get rid of rounding errors that seem to
+** occur when continuing to add the major axis increment. */
+	while ((majorval*1.000001)<w->plot.y.DrawMax) {
+		if (w->plot.YLog) {
+
+/* Hack to make sure that 9.99999e? still gets interpreted as 10.0000e? */
+			if (majorval*1.1>w->plot.y.DrawMax) break;
+			tic=majorval;
+			if (w->plot.DrawMinor||w->plot.DrawMinorTics) {
+				for (j=2; j<w->plot.y.MinorNum; j++) {
+					val=tic*(real)j;
+					y=PlotY(w,val);
+					if (w->plot.DrawMinor)
+						LineSet(w,x1,y,x2,y,
+							w->plot.ForegroundColor,
+							XtLINE_WIDEDOT);
+					if (w->plot.DrawMinorTics)
+						LineSet(w,x1,y,x1+3,y,
+							w->plot.ForegroundColor,
+							XtLINE_SOLID);
+				}
+			}
+			val=tic*(real)w->plot.y.MinorNum;
+			if (precision>0) precision--;	
+		}
+		else {
+			tic=majorval;
+			if (w->plot.DrawMinor||w->plot.DrawMinorTics) {
+				for (j=1; j<w->plot.y.MinorNum; j++) {
+					val=tic+w->plot.y.MajorInc*(real)j/
+						w->plot.y.MinorNum;
+					y=PlotY(w,val);
+					if (w->plot.DrawMinor)
+						LineSet(w,x1,y,x2,y,
+							w->plot.ForegroundColor,
+							XtLINE_WIDEDOT);
+					if (w->plot.DrawMinorTics)
+						LineSet(w,x1,y,x1+3,y,
+							w->plot.ForegroundColor,
+							XtLINE_SOLID);
+				}
+			}
+			val=tic+w->plot.y.MajorInc;
+		}
+		y=PlotY(w,val);
+		if (w->plot.DrawMajor)
+			LineSet(w,x1,y,x2,y,w->plot.ForegroundColor,
+				XtLINE_DOTTED);
+		if (w->plot.DrawMajorTics)
+			LineSet(w,x1-5,y,x1+5,y,w->plot.ForegroundColor,
+				XtLINE_SOLID);
+		get_number_format( numberformat, precision, val*w->plot.y.Scalefact );
+		sprintf(label,numberformat,val*w->plot.y.Scalefact);
+		VTextSet(w,w->plot.x.AxisPos,y,label,w->plot.ForegroundColor,
+			w->plot.axisFont);
+		majorval=val;
+	}
+	if (w->plot.ShowTitle)
+		TextSet(w,w->plot.x.TitlePos,w->plot.y.TitlePos,
+			w->plot.plotTitle,w->plot.ForegroundColor,
+			w->plot.titleFont);
+	if (w->plot.ShowXLabel)
+		TextCenter(w,w->plot.x.Origin+(w->plot.x.Size/2.0),
+			w->plot.y.LabelPos,w->plot.xlabel,
+			w->plot.ForegroundColor,w->plot.labelFont);
+	if (w->plot.ShowYLabel) {
+		if( w->plot.y.Scale_expon == 0. ) 
+			sprintf( tlabel, "%s", w->plot.ylabel );
+		else
+			sprintf( tlabel, "%s/10**%d", w->plot.ylabel, -(w->plot.y.Scale_expon) );
+		VTextCenter(w,w->plot.x.LabelPos,
+			w->plot.y.Origin+(w->plot.y.Size/2.0),
+			tlabel,w->plot.ForegroundColor,
+			w->plot.labelFont);
+		}
+}
+
+static void
+DrawCartesianPlot(w)
+SciPlotWidget w;
+{
+int i,j,jstart;
+SciPlotList *p;
+
+	ClipSet(w);
+	for (i=0; i<w->plot.num_plotlist; i++) {
+		p=w->plot.plotlist+i;
+		if (p->draw) {
+		real x1,y1,x2,y2;
+		
+			jstart=1;
+			if (((w->plot.XLog&&(p->data[0].x<=0.0))||
+			      (w->plot.YLog&&(p->data[0].y<=0.0)))) {
+				while ((jstart<p->number)&&
+				       (((w->plot.XLog&&(p->data[jstart].x<=0.0))||
+				        (w->plot.YLog&&(p->data[jstart].y<=0.0)))))
+					jstart++;
+				if (jstart<p->number) {
+					x1=PlotX(w,p->data[jstart].x);
+					y1=PlotY(w,p->data[jstart].y);
+				}
+			}
+			else {
+				x1=PlotX(w,p->data[0].x);
+				y1=PlotY(w,p->data[0].y);
+			}
+			for (j=jstart; j<p->number; j++) {
+				if (!((w->plot.XLog&&(p->data[j].x<=0.0))||
+				      (w->plot.YLog&&(p->data[j].y<=0.0)))) {
+					x2=PlotX(w,p->data[j].x);
+					y2=PlotY(w,p->data[j].y);
+					LineSet(w,x1,y1,x2,y2,
+						p->LineColor,p->LineStyle);
+					x1=x2;
+					y1=y2;
+				}
+			}
+		}
+	}
+	ClipClear(w);
+	for (i=0; i<w->plot.num_plotlist; i++) {
+		p=w->plot.plotlist+i;
+		if (p->draw) {
+		real x2,y2;
+	
+			for (j=0; j<p->number; j++) {
+				if (!((w->plot.XLog&&(p->data[j].x<=0.0))||
+				      (w->plot.YLog&&(p->data[j].y<=0.0)))) {
+					x2=PlotX(w,p->data[j].x);
+					y2=PlotY(w,p->data[j].y);
+					if ((x2>=w->plot.x.Origin)&&
+					    (x2<=w->plot.x.Origin+w->plot.x.Size)&&
+					    (y2>=w->plot.y.Origin)&&
+					    (y2<=w->plot.y.Origin+w->plot.y.Size)) {
+						DrawMarker(w,x2,y2,
+							(real)3.0,
+							p->PointColor,
+							p->PointStyle);
+						}
+				}
+			}
+		}
+	}
+}
+
+static void
+DrawPolarAxes(w)
+SciPlotWidget w;
+{
+real x1,y1,x2,y2,max,tic,val,height;
+int i,j;
+char numberformat[160],label[16];
+
+	height=FontnumHeight(w,w->plot.labelFont);
+	max=w->plot.PolarScale;
+	PlotRTDegrees(w,0.0,0.0,&x1,&y1);
+	PlotRTDegrees(w,max,0.0,&x2,&y2);
+	LineSet(w,x1,y1,x2,y2,1,XtLINE_SOLID);
+	for (i=45; i<360; i+=45) {
+		PlotRTDegrees(w,max,(real)i,&x2,&y2);
+		LineSet(w,x1,y1,x2,y2,w->plot.ForegroundColor,XtLINE_DOTTED);
+	}
+	for (i=1; i<=w->plot.x.MajorNum; i++) {
+		tic=w->plot.PolarScale*
+			(real)i/(real)w->plot.x.MajorNum;
+		if (w->plot.DrawMinor||w->plot.DrawMinorTics) {
+			for (j=1; j<w->plot.x.MinorNum; j++) {
+				val=tic-w->plot.x.MajorInc*(real)j/
+					w->plot.x.MinorNum;
+				PlotRTDegrees(w,val,0.0,&x2,&y2);
+				if (w->plot.DrawMinor)
+					CircleSet(w,x1,y1,x2-x1,
+						w->plot.ForegroundColor,XtLINE_WIDEDOT);
+				if (w->plot.DrawMinorTics)
+					LineSet(w,x2,y2-2.5,x2,y2+2.5,
+						w->plot.ForegroundColor,XtLINE_SOLID);
+			}
+		}
+		PlotRTDegrees(w,tic,0.0,&x2,&y2);
+		if (w->plot.DrawMajor)
+			CircleSet(w,x1,y1,x2-x1,w->plot.ForegroundColor,XtLINE_DOTTED);
+		if (w->plot.DrawMajorTics)
+			LineSet(w,x2,y2-5.0,x2,y2+5.0,w->plot.ForegroundColor,XtLINE_SOLID);
+		get_number_format( numberformat, w->plot.x.Precision, tic );
+		sprintf(label,numberformat,tic);
+		TextSet(w,x2,y2+height,label,w->plot.ForegroundColor,w->plot.axisFont);
+	}
+	if (w->plot.ShowTitle)
+		TextSet(w,w->plot.x.TitlePos,w->plot.y.TitlePos,
+			w->plot.plotTitle,w->plot.ForegroundColor,w->plot.titleFont);
+}
+
+static void
+DrawPolarPlot(w)
+SciPlotWidget w;
+{
+int i,j;
+SciPlotList *p;
+
+	for (i=0; i<w->plot.num_plotlist; i++) {
+		p=w->plot.plotlist+i;
+		if (p->draw) {
+		real x1,y1,x2,y2;
+		
+			PlotRT(w,p->data[0].x,p->data[0].y,&x1,&y1);
+			DrawMarker(w,x1,y1,(real)3.0,
+				p->PointColor,p->PointStyle);
+			for (j=1; j<p->number; j++) {
+				PlotRT(w,p->data[j].x,p->data[j].y,&x2,&y2);
+				LineSet(w,x1,y1,x2,y2,
+					p->LineColor,p->LineStyle);
+				DrawMarker(w,x2,y2,(real)3.0,
+					p->PointColor,p->PointStyle);
+				x1=x2;
+				y1=y2;
+			}
+		}
+	}
+}
+
+static void
+DrawAll(w)
+SciPlotWidget w;
+{
+	if (w->plot.ChartType==XtCARTESIAN) {
+		DrawCartesianAxes(w);
+		DrawLegend(w);
+		DrawCartesianPlot(w);
+	}
+	else {
+		DrawPolarAxes(w);
+		DrawLegend(w);
+		DrawPolarPlot(w);
+	}
+}
+
+
+/*
+** Public Plot functions -------------------------------------------------
+**
+*/
+
+real
+SciPlotScreenToDataX(wi,xscreen)
+Widget wi;
+int xscreen;
+{
+	real xdata;
+	double t;
+
+	SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return(0.0);
+
+	w=(SciPlotWidget)wi;
+
+	t = (float)w->plot.x.DrawSize/(float)w->plot.x.Size*(
+		(float)xscreen - (float)w->plot.x.Origin);
+
+	if (w->plot.XLog) {
+		t = pow(10.0,t);
+		xdata = (float)w->plot.x.DrawOrigin * t;
+		}
+	else
+		xdata = (float)w->plot.x.DrawOrigin + t;
+
+	return xdata;
+}
+
+real
+SciPlotScreenToDataY(wi,yscreen)
+Widget wi;
+int yscreen;
+{
+	real ydata;
+	SciPlotWidget w;
+	double t;
+
+	if (!XtIsSciPlot(wi)) return(0.0);
+
+	w=(SciPlotWidget)wi;
+
+	t = -(float)w->plot.y.DrawSize/(float)w->plot.y.Size*(
+		(float)yscreen - (float)w->plot.y.Origin - (float)w->plot.y.Size);
+
+	if (w->plot.YLog) {
+		t = pow(10.0,t);
+		ydata = w->plot.y.DrawOrigin * t;
+		}
+	else
+		ydata = w->plot.y.DrawOrigin + t;
+
+	return ydata;
+}
+
+int
+SciPlotAllocNamedColor(wi,name)
+Widget wi;
+char *name;
+{
+XColor used,exact;
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return -1;
+
+	w=(SciPlotWidget)wi;
+
+	if (!XAllocNamedColor(XtDisplay(w),w->plot.cmap,name,&used,&exact))
+		return 1;
+	return ColorStore(w,used.pixel);
+}
+
+int
+SciPlotAllocRGBColor(wi,r,g,b)
+Widget wi;
+int r,g,b;
+{
+XColor used;
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return -1;
+
+	w=(SciPlotWidget)wi;
+
+	used.pixel=0;
+	r*=256;
+	g*=256;
+	b*=256;
+	if (r>65535) r=65535;
+	if (g>65535) g=65535;
+	if (b>65535) b=65535;
+	used.red=(unsigned short)r;
+	used.green=(unsigned short)g;
+	used.blue=(unsigned short)b;
+	if (!XAllocColor(XtDisplay(w),w->plot.cmap,&used)) return 1;
+	return ColorStore(w,used.pixel);
+}
+
+void
+SciPlotSetBackgroundColor(wi,color)
+Widget wi;
+int color;
+{
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+	if (color<w->plot.num_colors) {
+		w->plot.BackgroundColor=color;
+		w->core.background_pixel=w->plot.colors[color];
+	}
+}
+
+void
+SciPlotSetForegroundColor(wi,color)
+Widget wi;
+int color;
+{
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+	if (color<w->plot.num_colors) w->plot.ForegroundColor=color;
+}
+
+int
+SciPlotListCreateFromData(wi,num,xlist,ylist,legend,pcolor,pstyle,lcolor,lstyle)
+Widget wi;
+int num;
+real *xlist,*ylist;
+char *legend;
+int pstyle,pcolor,lstyle,lcolor;
+{
+int id;
+SciPlotList *p;
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return -1;
+
+	w=(SciPlotWidget)wi;
+
+	id=List_New(w);
+	p=w->plot.plotlist+id;
+	List_SetReal(p,num,xlist,ylist);
+	List_SetLegend(p,legend);
+	List_SetStyle(p,pcolor,pstyle,lcolor,lstyle);
+	return id;
+}
+
+int
+SciPlotListCreateFromFloat(wi,num,xlist,ylist,legend)
+Widget wi;
+int num;
+float *xlist,*ylist;
+char *legend;
+{
+int id;
+SciPlotList *p;
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return -1;
+
+	w=(SciPlotWidget)wi;
+
+	id=List_New(w);
+	p=w->plot.plotlist+id;
+	List_SetFloat(p,num,xlist,ylist);
+	List_SetLegend(p,legend);
+	List_SetStyle(p,1,XtMARKER_CIRCLE,1,XtLINE_SOLID);
+	return id;
+}
+
+void
+SciPlotListDelete(wi,id)
+Widget wi;
+int id;
+{
+SciPlotList *p;
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+
+	p=List_Find(w,id);
+	if (p) List_Delete(p);
+}
+
+void
+SciPlotListUpdateFromFloat(wi,id,num,xlist,ylist)
+Widget wi;
+int id,num;
+float *xlist,*ylist;
+{
+SciPlotList *p;
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+
+	p=List_Find(w,id);
+	if (p) List_SetFloat(p,num,xlist,ylist);
+}
+
+int
+SciPlotListCreateFromDouble(wi,num,xlist,ylist,legend)
+Widget wi;
+int num;
+double *xlist,*ylist;
+char *legend;
+{
+int id;
+SciPlotList *p;
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return -1;
+
+	w=(SciPlotWidget)wi;
+
+	id=List_New(w);
+	p=w->plot.plotlist+id;
+	List_SetDouble(p,num,xlist,ylist);
+	List_SetLegend(p,legend);
+	List_SetStyle(p,1,XtMARKER_CIRCLE,1,XtLINE_SOLID);
+	return id;
+}
+
+void
+SciPlotListUpdateFromDouble(wi,id,num,xlist,ylist)
+Widget wi;
+int id,num;
+double *xlist,*ylist;
+{
+SciPlotList *p;
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+
+	p=List_Find(w,id);
+	if (p) List_SetDouble(p,num,xlist,ylist);
+}
+
+void
+SciPlotListSetStyle(wi,id,pcolor,pstyle,lcolor,lstyle)
+Widget wi;
+int id;
+int pstyle,pcolor,lstyle,lcolor;
+{
+SciPlotList *p;
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+
+	p=List_Find(w,id);
+	if (p) List_SetStyle(p,pcolor,pstyle,lcolor,lstyle);
+}
+
+void
+SciPlotSetXAutoScale(wi)
+Widget wi;
+{
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+	w->plot.XAutoScale=True;
+}
+
+void
+SciPlotSetXUserScale(wi,min,max)
+Widget wi;
+float min,max;
+{
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+	if (min<max) {
+		w->plot.XAutoScale=False;
+		w->plot.UserMin.x=(real)min;
+		w->plot.UserMax.x=(real)max;
+	}
+}
+
+void
+SciPlotSetYAutoScale(wi)
+Widget wi;
+{
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+	w->plot.YAutoScale=True;
+}
+
+void
+SciPlotSetYUserScale(wi,min,max)
+Widget wi;
+float min,max;
+{
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+	if (min<max) {
+		w->plot.YAutoScale=False;
+		w->plot.UserMin.y=(real)min;
+		w->plot.UserMax.y=(real)max;
+	}
+}
+
+void
+SciPlotQueryXScale(wi,min,max)
+Widget wi;
+float *min,*max;
+{
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+	*min = (float)(w->plot.x.DrawOrigin);
+	*max = (float)(w->plot.x.DrawMax);
+}
+
+void
+SciPlotQueryYScale(wi,min,max)
+Widget wi;
+float *min,*max;
+{
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+	*min = (float)(w->plot.y.DrawOrigin);
+	*max = (float)(w->plot.y.DrawMax);
+}
+
+void
+SciPlotPrintStatistics(wi)
+Widget wi;
+{
+int i,j;
+SciPlotList *p;
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+
+	printf("Title=%s\nxlabel=%s\tylabel=%s\n",
+		w->plot.plotTitle,w->plot.xlabel,w->plot.ylabel);
+	printf("ChartType=%d\n",w->plot.ChartType);
+	printf("Degrees=%d\n",w->plot.Degrees);
+	printf("XLog=%d\tYLog=%d\n",w->plot.XLog,w->plot.YLog);
+	printf("XAutoScale=%d\tYAutoScale=%d\n",
+		w->plot.XAutoScale,w->plot.YAutoScale);
+	for (i=0; i<w->plot.num_plotlist; i++) {
+		p=w->plot.plotlist+i;
+		if (p->draw) {
+			printf("\nLegend=%s\n",p->legend);
+			printf("Styles: point=%d line=%d  Color: point=%d line=%d\n",
+				p->PointStyle,p->LineStyle,p->PointColor,p->LineColor);
+			for (j=0; j<p->number; j++)
+				printf("%f\t%f\n",p->data[j].x,p->data[j].y);
+			printf("\n");
+		}
+	}
+}
+
+void
+SciPlotExportData(wi,fd)
+Widget wi;
+FILE *fd;
+{
+int i,j;
+SciPlotList *p;
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+
+	fprintf(fd,"Title=%s\n\n",w->plot.plotTitle);
+	for (i=0; i<w->plot.num_plotlist; i++) {
+		p=w->plot.plotlist+i;
+		if (p->draw) {
+			fprintf(fd,"Legend=%s\n%s\t%s\n",
+				p->legend,w->plot.xlabel,w->plot.ylabel);
+			for (j=0; j<p->number; j++)
+				fprintf(fd,"%f\t%f\n",p->data[j].x,p->data[j].y);
+			fprintf(fd,"\n");
+		}
+	}
+}
+
+void
+SciPlotAddXAxisCallback(wi,cb)
+Widget wi;
+void (*cb)(Widget wi, float val, char *s);
+{
+SciPlotWidget w;
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+	w->plot.XFmtCallback = cb;
+}
+
+void
+SciPlotUpdate(wi)
+Widget wi;
+{
+SciPlotWidget w;
+
+	if (!XtIsSciPlot(wi)) return;
+
+	w=(SciPlotWidget)wi;
+	EraseAll(w);
+#ifdef DEBUG_SCIPLOT
+	SciPlotPrintStatistics(w);
+#endif
+	ComputeAll(w);
+	DrawAll(w);
+}
+

Added: packages/ncview/branches/upstream/current/SciPlot.h
===================================================================
--- packages/ncview/branches/upstream/current/SciPlot.h	                        (rev 0)
+++ packages/ncview/branches/upstream/current/SciPlot.h	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,166 @@
+/*-----------------------------------------------------------------------------
+** SciPlot.h	A generalized plotting widget
+**
+** Public header file
+**
+** Copyright (c) 1994 Robert W. McMullen
+**
+** Permission to use, copy, modify, distribute, and sell this software and its
+** documentation for any purpose is hereby granted without fee, provided that
+** the above copyright notice appear in all copies and that both that
+** copyright notice and this permission notice appear in supporting
+** documentation.  The author makes no representations about the suitability
+** of this software for any purpose.  It is provided "as is" without express
+** or implied warranty.
+**
+** THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+** ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL
+** THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+** ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+** SOFTWARE.
+*/
+
+#ifndef _SCIPLOT_H
+#define _SCIPLOT_H
+
+#include <X11/Core.h>
+
+#define _SCIPLOT_WIDGET_VERSION	1.11
+
+#ifndef XtIsSciPlot
+#define XtIsSciPlot(w) XtIsSubclass((Widget)w, sciplotWidgetClass)
+#endif 
+
+
+typedef float real;
+
+typedef struct {
+	real x,y;
+} realpair;
+
+
+#define XtNchartType	"chartType"
+#define XtNdegrees	"degrees"
+#define XtNdrawMajor	"drawMajor"
+#define XtNdrawMajorTics	"drawMajorTics"
+#define XtNdrawMinor	"drawMinor"
+#define XtNdrawMinorTics	"drawMinorTics"
+#define XtNxAutoScale	"xAutoScale"
+#define XtNyAutoScale	"yAutoScale"
+#define XtNxLog		"xLog"
+#define XtNyLog		"yLog"
+#define XtNxOrigin	"xOrigin"
+#define XtNyOrigin	"yOrigin"
+#define XtNxLabel	"xLabel"
+#define XtNyLabel	"yLabel"
+#define XtNplotTitle	"plotTitle"
+#define XtNmargin	"margin"
+#define XtNtitleMargin	"titleMargin"
+#define XtNshowLegend	"showLegend"
+#define XtNshowTitle	"showTitle"
+#define XtNshowXLabel	"showXLabel"
+#define XtNshowYLabel	"showYLabel"
+#define XtNlegendLineSize	"legendLineSize"
+#define XtNlegendMargin	"legendMargin"
+#define XtNtitleFont	"titleFont"
+#define XtNlabelFont	"labelFont"
+#define XtNaxisFont	"axisFont"
+
+#define XtPOLAR		0
+#define XtCARTESIAN	1
+
+#define XtMARKER_NONE		0
+#define XtMARKER_CIRCLE		1
+#define XtMARKER_SQUARE		2
+#define XtMARKER_UTRIANGLE	3
+#define XtMARKER_DTRIANGLE	4
+#define XtMARKER_LTRIANGLE	5
+#define XtMARKER_RTRIANGLE	6
+#define XtMARKER_DIAMOND	7
+#define XtMARKER_HOURGLASS	8
+#define XtMARKER_BOWTIE		9
+#define XtMARKER_FCIRCLE	10
+#define XtMARKER_FSQUARE	11
+#define XtMARKER_FUTRIANGLE	12
+#define XtMARKER_FDTRIANGLE	13
+#define XtMARKER_FLTRIANGLE	14
+#define XtMARKER_FRTRIANGLE	15
+#define XtMARKER_FDIAMOND	16
+#define XtMARKER_FHOURGLASS	17
+#define XtMARKER_FBOWTIE	18
+
+#define XtFONT_SIZE_MASK	0xff
+#define XtFONT_SIZE_DEFAULT	12
+
+#define XtFONT_NAME_MASK	0xf00
+#define XtFONT_TIMES		0x000
+#define XtFONT_COURIER		0x100
+#define XtFONT_HELVETICA	0x200
+#define XtFONT_LUCIDA		0x300
+#define XtFONT_LUCIDASANS	0x400
+#define XtFONT_NCSCHOOLBOOK	0x500
+#define XtFONT_NAME_DEFAULT	XtFONT_TIMES
+
+#define XtFONT_ATTRIBUTE_MASK	0xf000
+#define XtFONT_BOLD		0x1000
+#define XtFONT_ITALIC		0x2000
+#define XtFONT_BOLD_ITALIC	0x3000
+#define XtFONT_ATTRIBUTE_DEFAULT 0
+
+
+#define XtLINE_NONE	0
+#define XtLINE_SOLID	1
+#define XtLINE_DOTTED	2
+#define XtLINE_WIDEDOT	3
+#define XtLINE_USERDASH	4
+
+extern WidgetClass sciplotWidgetClass;
+
+typedef struct _SciPlotClassRec *SciPlotWidgetClass;
+typedef struct _SciPlotRec      *SciPlotWidget;
+
+
+/*
+** Public function declarations
+*/
+
+#if __STDC__ || defined(__cplusplus)
+#define P_(s) s
+#else
+#define P_(s) ()
+#endif
+
+/* SciPlot.c */
+Boolean SciPlotPSCreateFancy P_((SciPlotWidget w, char *filename, int drawborder, char *titles));
+Boolean SciPlotPSCreate P_((Widget wi, char *filename));
+int SciPlotAllocNamedColor P_((Widget wi, char *name));
+int SciPlotAllocRGBColor P_((Widget wi, int r, int g, int b));
+void SciPlotSetBackgroundColor P_((Widget wi, int color));
+void SciPlotSetForegroundColor P_((Widget wi, int color));
+int SciPlotListCreateFromData P_((Widget wi, int num, real *xlist, real *ylist, char *legend, int pcolor, int pstyle, int lcolor, int lstyle));
+int SciPlotListCreateFromFloat P_((Widget wi, int num, float *xlist, float *ylist, char *legend));
+void SciPlotListDelete P_((Widget wi, int id));
+void SciPlotListUpdateFromFloat P_((Widget wi, int id, int num, float *xlist, float *ylist));
+int SciPlotListCreateFromDouble P_((Widget wi, int num, double *xlist, double *ylist, char *legend));
+void SciPlotListUpdateFromDouble P_((Widget wi, int id, int num, double *xlist, double *ylist));
+void SciPlotListSetStyle P_((Widget wi, int id, int pcolor, int pstyle, int lcolor, int lstyle));
+void SciPlotSetXAutoScale P_((Widget wi));
+void SciPlotSetXUserScale P_((Widget wi, double min, double max));
+void SciPlotSetYAutoScale P_((Widget wi));
+void SciPlotSetYUserScale P_((Widget wi, double min, double max));
+void SciPlotPrintStatistics P_((Widget wi));
+void SciPlotExportData P_((Widget wi, FILE *fd));
+void SciPlotUpdate P_((Widget wi));
+void SciPlotQueryXScale P_((Widget wi, float *min, float *max));
+void SciPlotQueryYScale P_((Widget wi, float *min, float *max));
+void SciPlotQueryXAxisValues( Widget w, int *nvals, float **values);
+void SciPlotSetXAxisLabels(Widget wi,int nlabels, char **labels);
+float SciPlotScreenToDataX(Widget wi,int xscreen);
+float SciPlotScreenToDataY(Widget wi,int yscreen);
+void  SciPlotAddXAxisCallback(Widget wi, void (*cb)(Widget,float,char*) );
+
+#undef P_
+
+#endif /* _SCIPLOT_H */

Added: packages/ncview/branches/upstream/current/SciPlotP.h
===================================================================
--- packages/ncview/branches/upstream/current/SciPlotP.h	                        (rev 0)
+++ packages/ncview/branches/upstream/current/SciPlotP.h	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,251 @@
+/*-----------------------------------------------------------------------------
+** SciPlotP.h	A generalized plotting widget
+**
+** Private header file
+**
+** Copyright (c) 1995 Robert W. McMullen
+**
+** Permission to use, copy, modify, distribute, and sell this software and its
+** documentation for any purpose is hereby granted without fee, provided that
+** the above copyright notice appear in all copies and that both that
+** copyright notice and this permission notice appear in supporting
+** documentation.  The author makes no representations about the suitability
+** of this software for any purpose.  It is provided "as is" without express
+** or implied warranty.
+**
+** THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
+** ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL
+** THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
+** ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+** WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+** ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+** SOFTWARE.
+*/
+
+#ifndef _SCIPLOTP_H
+#define _SCIPLOTP_H
+
+#include <X11/CoreP.h>
+#ifdef MOTIF
+#if XmVersion == 1001
+#include <Xm/XmP.h>
+#else
+#include <Xm/PrimitiveP.h>
+#endif
+#endif
+#include <math.h>
+#ifdef  __sgi
+#include <sys/types.h>
+#include <malloc.h>
+#endif  /* __sgi */
+
+#include "SciPlot.h"
+#define powi(a,i)	(real)pow(a,(double)((int)i))
+
+#define NUMPLOTLINEALLOC	5
+#define NUMPLOTDATAEXTRA	25
+#define NUMPLOTITEMALLOC	256
+#define NUMPLOTITEMEXTRA	64
+#define DEG2RAD       (3.1415926535897931160E0/180.0)
+
+typedef struct {
+	int	dummy;	/* keep compiler happy with dummy field */
+} SciPlotClassPart;
+
+
+typedef struct _SciPlotClassRec {
+	CoreClassPart		core_class;
+#ifdef MOTIF
+	XmPrimitiveClassPart	primitive_class;
+#endif
+	SciPlotClassPart	plot_class;
+} SciPlotClassRec;
+
+extern SciPlotClassRec sciplotClassRec;
+
+typedef enum {
+	SciPlotFALSE,
+	SciPlotPoint,
+	SciPlotLine,
+	SciPlotRect,
+	SciPlotFRect,
+	SciPlotCircle,
+	SciPlotFCircle,
+	SciPlotStartTextTypes,
+	SciPlotText,
+	SciPlotVText,
+	SciPlotEndTextTypes,
+	SciPlotPoly,
+	SciPlotFPoly,
+	SciPlotClipRegion,
+	SciPlotClipClear,
+	SciPlotENDOFLIST
+} SciPlotTypeEnum;
+
+typedef struct _SciPlotItem {
+	SciPlotTypeEnum	type;
+	union {
+		struct {
+			short color;
+			short style;
+			real x,y;
+		} pt;
+		struct {
+			short color;
+			short style;
+			real x1,y1,x2,y2;
+		} line;
+		struct {
+			short color;
+			short style;
+			real x,y,w,h;
+		} rect;
+		struct {
+			short color;
+			short style;
+			real x,y,r;
+		} circ;
+		struct {
+			short color;
+			short style;
+			short count;
+			real x[4],y[4];
+		} poly;
+		struct {
+			short color;
+			short style;
+			short font;
+			short length;
+			real x,y;
+			char *text;
+		} text;
+		struct {
+			short color;
+			short style;
+		} any;
+			
+	} kind;
+	short individually_allocated;
+	struct _SciPlotItem *next;
+} SciPlotItem;
+
+typedef struct {
+	int		LineStyle;
+	int		LineColor;
+	int		PointStyle;
+	int		PointColor;
+	int		number;
+	int		allocated;
+	realpair	*data;
+	char		*legend;
+	realpair	min,max;
+	Boolean		draw,used;
+} SciPlotList;
+
+typedef struct {
+	real		Origin;
+	real		Size;
+	real		Center;
+	real		TitlePos;
+	real		AxisPos;
+	real		LabelPos;
+	real		LegendPos;
+	real		LegendSize;
+	real		DrawOrigin;
+	real		DrawSize;
+	real		DrawMax;
+	real		MajorInc;
+	int		MajorNum;
+	int		MinorNum;
+	int		Precision;
+	double		Scalefact;
+	int		Scale_expon;
+} SciPlotAxis;
+
+typedef struct {
+	int		id;
+	XFontStruct	*font;
+} SciPlotFont;
+
+typedef struct {
+	int		flag;
+	char		*PostScript;
+	char		*X11;
+	Boolean		PSUsesOblique;
+	Boolean		PSUsesRoman;
+} SciPlotFontDesc;
+
+typedef struct {
+	/* Public stuff ... */
+	char		*TransientPlotTitle;
+	char		*TransientXLabel;
+	char		*TransientYLabel;
+	int		Margin;
+	int		TitleMargin;
+	int		LegendMargin;
+	int		LegendLineSize;
+	int		MajorTicSize;
+	int		ChartType;
+	Boolean		ScaleToFit;
+	Boolean		Degrees;
+	Boolean		XLog;
+	Boolean		YLog;
+	Boolean		XAutoScale;
+	Boolean		YAutoScale;
+	Boolean		XOrigin;
+	Boolean		YOrigin;
+	Boolean		DrawMajor;
+	Boolean		DrawMinor;
+	Boolean		DrawMajorTics;
+	Boolean		DrawMinorTics;
+	Boolean		ShowLegend;
+	Boolean		ShowTitle;
+	Boolean		ShowXLabel;
+	Boolean		ShowYLabel;
+	Font		TitleFID;
+	int		TitleFont;
+	int		LabelFont;
+	int		AxisFont;
+	int		BackgroundColor;
+	int		ForegroundColor;
+
+	/* Private stuff ... */
+	char		*plotTitle;
+	char		*xlabel;
+	char		*ylabel;
+	realpair	Min,Max;
+	realpair	UserMin,UserMax;
+	real		PolarScale;
+	SciPlotAxis	x,y;
+	int		titleFont;
+	int		labelFont;
+	int		axisFont;
+	void		(*XFmtCallback)(Widget w, float f, char *s);
+
+	GC		defaultGC;
+	GC		dashGC;
+	Colormap	cmap;
+	Pixel		*colors;
+	int		num_colors;
+	SciPlotFont	*fonts;
+	int		num_fonts;
+
+	int		alloc_plotlist;
+	int		num_plotlist;
+	SciPlotList	*plotlist;
+	int		alloc_drawlist;
+	int		num_drawlist;
+	SciPlotItem	*drawlist;
+	Boolean		update;
+} SciPlotPart;
+
+typedef struct _SciPlotRec {
+	CorePart	core;
+#ifdef MOTIF
+	XmPrimitivePart	primitive;
+#endif
+	SciPlotPart	plot;
+} SciPlotRec;
+
+
+#endif /* _SCIPLOTP_H */

Added: packages/ncview/branches/upstream/current/bw.ncmap
===================================================================
--- packages/ncview/branches/upstream/current/bw.ncmap	                        (rev 0)
+++ packages/ncview/branches/upstream/current/bw.ncmap	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,256 @@
+0 0 0
+1 1 1
+2 2 2
+3 3 3
+4 4 4
+5 5 5
+6 6 6
+7 7 7
+8 8 8
+9 9 9
+10 10 10
+11 11 11
+12 12 12
+13 13 13
+14 14 14
+15 15 15
+16 16 16
+17 17 17
+18 18 18
+19 19 19
+20 20 20
+21 21 21
+22 22 22
+23 23 23
+24 24 24
+25 25 25
+26 26 26
+27 27 27
+28 28 28
+29 29 29
+30 30 30
+31 31 31
+32 32 32
+33 33 33
+34 34 34
+35 35 35
+36 36 36
+37 37 37
+38 38 38
+39 39 39
+40 40 40
+41 41 41
+42 42 42
+43 43 43
+44 44 44
+45 45 45
+46 46 46
+47 47 47
+48 48 48
+49 49 49
+50 50 50
+51 51 51
+52 52 52
+53 53 53
+54 54 54
+55 55 55
+56 56 56
+57 57 57
+58 58 58
+59 59 59
+60 60 60
+61 61 61
+62 62 62
+63 63 63
+64 64 64
+65 65 65
+66 66 66
+67 67 67
+68 68 68
+69 69 69
+70 70 70
+71 71 71
+72 72 72
+73 73 73
+74 74 74
+75 75 75
+76 76 76
+77 77 77
+78 78 78
+79 79 79
+80 80 80
+81 81 81
+82 82 82
+83 83 83
+84 84 84
+85 85 85
+86 86 86
+87 87 87
+88 88 88
+89 89 89
+90 90 90
+91 91 91
+92 92 92
+93 93 93
+94 94 94
+95 95 95
+96 96 96
+97 97 97
+98 98 98
+99 99 99
+100 100 100
+101 101 101
+102 102 102
+103 103 103
+104 104 104
+105 105 105
+106 106 106
+107 107 107
+108 108 108
+109 109 109
+110 110 110
+111 111 111
+112 112 112
+113 113 113
+114 114 114
+115 115 115
+116 116 116
+117 117 117
+118 118 118
+119 119 119
+120 120 120
+121 121 121
+122 122 122
+123 123 123
+124 124 124
+125 125 125
+126 126 126
+127 127 127
+128 128 128
+129 129 129
+130 130 130
+131 131 131
+132 132 132
+133 133 133
+134 134 134
+135 135 135
+136 136 136
+137 137 137
+138 138 138
+139 139 139
+140 140 140
+141 141 141
+142 142 142
+143 143 143
+144 144 144
+145 145 145
+146 146 146
+147 147 147
+148 148 148
+149 149 149
+150 150 150
+151 151 151
+152 152 152
+153 153 153
+154 154 154
+155 155 155
+156 156 156
+157 157 157
+158 158 158
+159 159 159
+160 160 160
+161 161 161
+162 162 162
+163 163 163
+164 164 164
+165 165 165
+166 166 166
+167 167 167
+168 168 168
+169 169 169
+170 170 170
+171 171 171
+172 172 172
+173 173 173
+174 174 174
+175 175 175
+176 176 176
+177 177 177
+178 178 178
+179 179 179
+180 180 180
+181 181 181
+182 182 182
+183 183 183
+184 184 184
+185 185 185
+186 186 186
+187 187 187
+188 188 188
+189 189 189
+190 190 190
+191 191 191
+192 192 192
+193 193 193
+194 194 194
+195 195 195
+196 196 196
+197 197 197
+198 198 198
+199 199 199
+200 200 200
+201 201 201
+202 202 202
+203 203 203
+204 204 204
+205 205 205
+206 206 206
+207 207 207
+208 208 208
+209 209 209
+210 210 210
+211 211 211
+212 212 212
+213 213 213
+214 214 214
+215 215 215
+216 216 216
+217 217 217
+218 218 218
+219 219 219
+220 220 220
+221 221 221
+222 222 222
+223 223 223
+224 224 224
+225 225 225
+226 226 226
+227 227 227
+228 228 228
+229 229 229
+230 230 230
+231 231 231
+232 232 232
+233 233 233
+234 234 234
+235 235 235
+236 236 236
+237 237 237
+238 238 238
+239 239 239
+240 240 240
+241 241 241
+242 242 242
+243 243 243
+244 244 244
+245 245 245
+246 246 246
+247 247 247
+248 248 248
+249 249 249
+250 250 250
+251 251 251
+252 252 252
+253 253 253
+254 254 254
+255 255 255

Added: packages/ncview/branches/upstream/current/colormaps_3gauss.h
===================================================================
--- packages/ncview/branches/upstream/current/colormaps_3gauss.h	                        (rev 0)
+++ packages/ncview/branches/upstream/current/colormaps_3gauss.h	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,56 @@
+/*
+ * Ncview by David W. Pierce.  A visual netCDF file viewer.
+ * Copyright (C) 1993 through 2009 David W. Pierce
+ *
+ * This program  is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as 
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License, version 3, for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * David W. Pierce
+ * 6259 Caminito Carrean
+ * San Diego, CA   92122
+ * pierce at cirrus.ucsd.edu
+ */
+
+static int cmap_3gauss[] = {
+	0,0,255, 0,0,255, 1,2,254, 2,4,253, 3,6,252, 4,9,251, 5,12,250, 6,16,249, 
+	7,21,248, 8,26,247, 9,32,246, 10,39,245, 11,46,244, 12,53,243, 13,61,242, 14,69,241, 
+	15,78,240, 16,87,239, 17,96,238, 18,105,237, 19,114,236, 20,123,235, 21,133,234, 22,142,233, 
+	23,151,232, 24,160,231, 25,169,230, 26,178,229, 27,186,228, 28,194,227, 29,202,226, 30,209,225, 
+	31,216,224, 32,223,223, 33,229,222, 34,234,221, 35,239,220, 36,243,219, 37,246,218, 38,249,217, 
+	39,251,216, 40,253,215, 41,253,214, 42,253,213, 43,253,212, 44,252,211, 45,250,210, 46,247,209, 
+	47,244,208, 48,240,207, 49,235,206, 50,230,205, 51,225,204, 52,218,203, 53,212,202, 54,205,201, 
+	55,197,200, 56,189,199, 57,181,198, 58,172,197, 59,163,196, 60,154,195, 61,145,194, 62,136,193, 
+	63,127,192, 64,117,191, 65,108,190, 66,99,189, 67,90,188, 68,81,187, 69,72,186, 70,64,185, 
+	71,56,184, 72,48,183, 73,41,182, 74,35,181, 75,28,180, 76,23,179, 77,18,178, 78,13,177, 
+	79,9,176, 80,6,175, 81,3,174, 82,1,173, 83,0,172, 84,0,171, 85,0,170, 86,0,169, 
+	87,2,168, 88,4,167, 89,7,166, 90,10,165, 91,14,164, 92,19,163, 93,24,162, 94,30,161, 
+	95,37,160, 96,44,159, 97,51,158, 98,59,157, 99,67,156, 100,75,155, 101,84,154, 102,93,153, 
+	103,102,152, 104,111,151, 105,120,150, 106,130,149, 107,139,148, 108,148,147, 109,157,146, 110,166,145, 
+	111,175,144, 112,184,143, 113,192,142, 114,200,141, 115,207,140, 116,214,139, 117,221,138, 118,227,137, 
+	119,232,136, 120,237,135, 121,241,134, 122,245,133, 123,248,132, 124,250,131, 125,252,130, 126,253,129, 
+	127,254,128, 128,253,127, 129,252,126, 130,250,125, 131,248,124, 132,245,123, 133,241,122, 134,237,121, 
+	135,232,120, 136,227,119, 137,221,118, 138,214,117, 139,207,116, 140,200,115, 141,192,114, 142,184,113, 
+	143,175,112, 144,166,111, 145,157,110, 146,148,109, 147,139,108, 148,130,107, 149,120,106, 150,111,105, 
+	151,102,104, 152,93,103, 153,84,102, 154,75,101, 155,67,100, 156,59,99, 157,51,98, 158,44,97, 
+	159,37,96, 160,30,95, 161,24,94, 162,19,93, 163,14,92, 164,10,91, 165,7,90, 166,4,89, 
+	167,2,88, 168,0,87, 169,0,86, 170,0,85, 171,0,84, 172,1,83, 173,3,82, 174,6,81, 
+	175,9,80, 176,13,79, 177,18,78, 178,23,77, 179,28,76, 180,35,75, 181,41,74, 182,48,73, 
+	183,56,72, 184,64,71, 185,72,70, 186,81,69, 187,90,68, 188,99,67, 189,108,66, 190,117,65, 
+	191,126,64, 192,136,63, 193,145,62, 194,154,61, 195,163,60, 196,172,59, 197,181,58, 198,189,57, 
+	199,197,56, 200,205,55, 201,212,54, 202,218,53, 203,225,52, 204,230,51, 205,235,50, 206,240,49, 
+	207,244,48, 208,247,47, 209,250,46, 210,252,45, 211,253,44, 212,253,43, 213,253,42, 214,253,41, 
+	215,251,40, 216,249,39, 217,246,38, 218,243,37, 219,239,36, 220,234,35, 221,229,34, 222,223,33, 
+	223,216,32, 224,209,31, 225,202,30, 226,194,29, 227,186,28, 228,178,27, 229,169,26, 230,160,25, 
+	231,151,24, 232,142,23, 233,133,22, 234,123,21, 235,114,20, 236,105,19, 237,96,18, 238,87,17, 
+	239,78,16, 240,69,15, 241,61,14, 242,53,13, 243,46,12, 244,39,11, 245,32,10, 246,26,9, 
+	247,21,8, 248,16,7, 249,12,6, 250,8,5, 251,5,4, 252,3,3, 253,1,2, 255,0,1};

Added: packages/ncview/branches/upstream/current/colormaps_3saw.h
===================================================================
--- packages/ncview/branches/upstream/current/colormaps_3saw.h	                        (rev 0)
+++ packages/ncview/branches/upstream/current/colormaps_3saw.h	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,56 @@
+/*
+ * Ncview by David W. Pierce.  A visual netCDF file viewer.
+ * Copyright (C) 1993 through 2009 David W. Pierce
+ *
+ * This program  is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as 
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License, version 3, for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * David W. Pierce
+ * 6259 Caminito Carrean
+ * San Diego, CA   92122
+ * pierce at cirrus.ucsd.edu
+ */
+
+static int cmap_3saw[] = {
+	0,255,255, 1,251,255, 2,246,254, 3,241,253, 4,236,252, 5,231,251, 6,226,250, 7,221,249, 
+	8,216,248, 9,211,247, 10,206,246, 11,201,245, 12,196,244, 13,191,243, 14,186,242, 15,181,241, 
+	16,176,240, 17,171,239, 18,166,238, 19,161,237, 20,156,236, 21,151,235, 22,146,234, 23,141,233, 
+	24,136,232, 25,131,231, 26,126,230, 27,121,229, 28,116,228, 29,111,227, 30,106,226, 31,101,225, 
+	32,96,224, 33,91,223, 34,86,222, 35,81,221, 36,76,220, 37,71,219, 38,66,218, 39,61,217, 
+	40,56,216, 41,51,215, 42,46,214, 43,41,213, 44,36,212, 45,31,211, 46,26,210, 47,21,209, 
+	48,16,208, 49,11,207, 50,6,206, 51,1,205, 52,252,204, 53,247,203, 54,242,202, 55,237,201, 
+	56,232,200, 57,227,199, 58,222,198, 59,217,197, 60,212,196, 61,207,195, 62,202,194, 63,197,193, 
+	64,192,192, 65,187,191, 66,182,190, 67,177,189, 68,172,188, 69,167,187, 70,162,186, 71,157,185, 
+	72,152,184, 73,147,183, 74,142,182, 75,137,181, 76,132,180, 77,127,179, 78,122,178, 79,117,177, 
+	80,112,176, 81,107,175, 82,102,174, 83,97,173, 84,92,172, 85,87,171, 86,82,170, 87,77,169, 
+	88,72,168, 89,67,167, 90,62,166, 91,57,165, 92,52,164, 93,47,163, 94,42,162, 95,37,161, 
+	96,32,160, 97,27,159, 98,22,158, 99,17,157, 100,12,156, 101,7,155, 102,2,154, 103,253,153, 
+	104,248,152, 105,243,151, 106,238,150, 107,233,149, 108,228,148, 109,223,147, 110,218,146, 111,213,145, 
+	112,208,144, 113,203,143, 114,198,142, 115,193,141, 116,188,140, 117,183,139, 118,178,138, 119,173,137, 
+	120,168,136, 121,163,135, 122,158,134, 123,153,133, 124,148,132, 125,143,131, 126,138,130, 127,133,129, 
+	128,128,128, 129,123,127, 130,118,126, 131,113,125, 132,108,124, 133,103,123, 134,98,122, 135,93,121, 
+	136,88,120, 137,83,119, 138,78,118, 139,73,117, 140,68,116, 141,63,115, 142,58,114, 143,53,113, 
+	144,48,112, 145,43,111, 146,38,110, 147,33,109, 148,28,108, 149,23,107, 150,18,106, 151,13,105, 
+	152,8,104, 153,3,103, 154,254,102, 155,249,101, 156,244,100, 157,239,99, 158,234,98, 159,229,97, 
+	160,224,96, 161,219,95, 162,214,94, 163,209,93, 164,204,92, 165,199,91, 166,194,90, 167,189,89, 
+	168,184,88, 169,179,87, 170,174,86, 171,169,85, 172,164,84, 173,159,83, 174,154,82, 175,149,81, 
+	176,144,80, 177,139,79, 178,134,78, 179,129,77, 180,124,76, 181,119,75, 182,114,74, 183,109,73, 
+	184,104,72, 185,99,71, 186,94,70, 187,89,69, 188,84,68, 189,79,67, 190,74,66, 191,69,65, 
+	192,64,64, 193,59,63, 194,54,62, 195,49,61, 196,44,60, 197,39,59, 198,34,58, 199,29,57, 
+	200,24,56, 201,19,55, 202,14,54, 203,9,53, 204,4,52, 205,255,51, 206,250,50, 207,245,49, 
+	208,240,48, 209,235,47, 210,230,46, 211,225,45, 212,220,44, 213,215,43, 214,210,42, 215,205,41, 
+	216,200,40, 217,195,39, 218,190,38, 219,185,37, 220,180,36, 221,175,35, 222,170,34, 223,165,33, 
+	224,160,32, 225,155,31, 226,150,30, 227,145,29, 228,140,28, 229,135,27, 230,130,26, 231,125,25, 
+	232,120,24, 233,115,23, 234,110,22, 235,105,21, 236,100,20, 237,95,19, 238,90,18, 239,85,17, 
+	240,80,16, 241,75,15, 242,70,14, 243,65,13, 244,60,12, 245,55,11, 246,50,10, 247,45,9, 
+	248,40,8, 249,35,7, 250,30,6, 251,25,5, 252,20,4, 253,15,3, 254,10,2, 255,5,1};

Added: packages/ncview/branches/upstream/current/colormaps_bw.h
===================================================================
--- packages/ncview/branches/upstream/current/colormaps_bw.h	                        (rev 0)
+++ packages/ncview/branches/upstream/current/colormaps_bw.h	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,56 @@
+/*
+ * Ncview by David W. Pierce.  A visual netCDF file viewer.
+ * Copyright (C) 1993 through 2009 David W. Pierce
+ *
+ * This program  is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as 
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License, version 3, for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * David W. Pierce
+ * 6259 Caminito Carrean
+ * San Diego, CA   92122
+ * pierce at cirrus.ucsd.edu
+ */
+
+static int cmap_bw[] = {
+	0,0,0, 1,1,1, 2,2,2, 3,3,3, 4,4,4, 5,5,5, 6,6,6, 7,7,7, 
+	8,8,8, 9,9,9, 10,10,10, 11,11,11, 12,12,12, 13,13,13, 14,14,14, 15,15,15, 
+	16,16,16, 17,17,17, 18,18,18, 19,19,19, 20,20,20, 21,21,21, 22,22,22, 23,23,23, 
+	24,24,24, 25,25,25, 26,26,26, 27,27,27, 28,28,28, 29,29,29, 30,30,30, 31,31,31, 
+	32,32,32, 33,33,33, 34,34,34, 35,35,35, 36,36,36, 37,37,37, 38,38,38, 39,39,39, 
+	40,40,40, 41,41,41, 42,42,42, 43,43,43, 44,44,44, 45,45,45, 46,46,46, 47,47,47, 
+	48,48,48, 49,49,49, 50,50,50, 51,51,51, 52,52,52, 53,53,53, 54,54,54, 55,55,55, 
+	56,56,56, 57,57,57, 58,58,58, 59,59,59, 60,60,60, 61,61,61, 62,62,62, 63,63,63, 
+	64,64,64, 65,65,65, 66,66,66, 67,67,67, 68,68,68, 69,69,69, 70,70,70, 71,71,71, 
+	72,72,72, 73,73,73, 74,74,74, 75,75,75, 76,76,76, 77,77,77, 78,78,78, 79,79,79, 
+	80,80,80, 81,81,81, 82,82,82, 83,83,83, 84,84,84, 85,85,85, 86,86,86, 87,87,87, 
+	88,88,88, 89,89,89, 90,90,90, 91,91,91, 92,92,92, 93,93,93, 94,94,94, 95,95,95, 
+	96,96,96, 97,97,97, 98,98,98, 99,99,99, 100,100,100, 101,101,101, 102,102,102, 103,103,103, 
+	104,104,104, 105,105,105, 106,106,106, 107,107,107, 108,108,108, 109,109,109, 110,110,110, 111,111,111, 
+	112,112,112, 113,113,113, 114,114,114, 115,115,115, 116,116,116, 117,117,117, 118,118,118, 119,119,119, 
+	120,120,120, 121,121,121, 122,122,122, 123,123,123, 124,124,124, 125,125,125, 126,126,126, 127,127,127, 
+	128,128,128, 129,129,129, 130,130,130, 131,131,131, 132,132,132, 133,133,133, 134,134,134, 135,135,135, 
+	136,136,136, 137,137,137, 138,138,138, 139,139,139, 140,140,140, 141,141,141, 142,142,142, 143,143,143, 
+	144,144,144, 145,145,145, 146,146,146, 147,147,147, 148,148,148, 149,149,149, 150,150,150, 151,151,151, 
+	152,152,152, 153,153,153, 154,154,154, 155,155,155, 156,156,156, 157,157,157, 158,158,158, 159,159,159, 
+	160,160,160, 161,161,161, 162,162,162, 163,163,163, 164,164,164, 165,165,165, 166,166,166, 167,167,167, 
+	168,168,168, 169,169,169, 170,170,170, 171,171,171, 172,172,172, 173,173,173, 174,174,174, 175,175,175, 
+	176,176,176, 177,177,177, 178,178,178, 179,179,179, 180,180,180, 181,181,181, 182,182,182, 183,183,183, 
+	184,184,184, 185,185,185, 186,186,186, 187,187,187, 188,188,188, 189,189,189, 190,190,190, 191,191,191, 
+	192,192,192, 193,193,193, 194,194,194, 195,195,195, 196,196,196, 197,197,197, 198,198,198, 199,199,199, 
+	200,200,200, 201,201,201, 202,202,202, 203,203,203, 204,204,204, 205,205,205, 206,206,206, 207,207,207, 
+	208,208,208, 209,209,209, 210,210,210, 211,211,211, 212,212,212, 213,213,213, 214,214,214, 215,215,215, 
+	216,216,216, 217,217,217, 218,218,218, 219,219,219, 220,220,220, 221,221,221, 222,222,222, 223,223,223, 
+	224,224,224, 225,225,225, 226,226,226, 227,227,227, 228,228,228, 229,229,229, 230,230,230, 231,231,231, 
+	232,232,232, 233,233,233, 234,234,234, 235,235,235, 236,236,236, 237,237,237, 238,238,238, 239,239,239, 
+	240,240,240, 241,241,241, 242,242,242, 243,243,243, 244,244,244, 245,245,245, 246,246,246, 247,247,247, 
+	248,248,248, 249,249,249, 250,250,250, 251,251,251, 252,252,252, 253,253,253, 254,254,254, 255,255,255};

Added: packages/ncview/branches/upstream/current/colormaps_default.h
===================================================================
--- packages/ncview/branches/upstream/current/colormaps_default.h	                        (rev 0)
+++ packages/ncview/branches/upstream/current/colormaps_default.h	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,56 @@
+/*
+ * Ncview by David W. Pierce.  A visual netCDF file viewer.
+ * Copyright (C) 1993 through 2009 David W. Pierce
+ *
+ * This program  is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as 
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License, version 3, for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * David W. Pierce
+ * 6259 Caminito Carrean
+ * San Diego, CA   92122
+ * pierce at cirrus.ucsd.edu
+ */
+
+static int cmap_default[] = {
+	131,0,255, 128,0,255, 125,0,254, 122,0,254, 119,0,254, 116,0,253, 113,1,253, 110,2,252, 
+	108,3,252, 106,3,252, 103,4,251, 101,5,251, 99,6,250, 96,7,250, 94,8,249, 92,9,249, 
+	90,10,248, 87,12,247, 85,13,247, 83,14,246, 81,16,245, 79,18,244, 76,19,243, 74,21,242, 
+	72,23,241, 70,24,240, 68,26,239, 66,28,238, 64,30,237, 62,32,236, 60,35,235, 58,37,233, 
+	56,39,232, 54,41,231, 52,44,229, 50,46,228, 48,48,227, 47,51,225, 45,53,224, 43,56,222, 
+	41,59,221, 39,61,219, 38,64,217, 36,67,216, 35,69,214, 33,72,212, 31,75,211, 30,78,209, 
+	28,81,207, 27,84,205, 25,87,203, 24,90,202, 23,93,200, 21,96,198, 20,99,196, 19,102,194, 
+	18,105,192, 16,108,190, 15,111,188, 14,114,186, 13,117,184, 12,120,182, 11,123,179, 10,126,177, 
+	9,130,175, 8,133,173, 7,136,171, 7,139,169, 6,142,166, 5,145,164, 5,148,162, 4,151,160, 
+	3,154,157, 3,157,155, 2,160,153, 2,163,151, 1,166,148, 1,169,146, 1,172,144, 0,175,141, 
+	0,178,139, 0,181,137, 0,184,134, 0,186,132, 0,189,130, 0,192,127, 0,194,125, 0,197,123, 
+	0,200,120, 0,202,118, 0,205,116, 0,207,113, 0,209,111, 1,212,109, 1,214,106, 2,216,104, 
+	2,218,102, 2,221,99, 3,223,97, 3,225,95, 4,227,93, 5,229,90, 5,230,88, 6,232,86, 
+	7,234,84, 8,235,82, 9,237,79, 9,239,77, 10,240,75, 11,241,73, 12,243,71, 13,244,69, 
+	14,245,67, 16,246,65, 17,247,63, 18,248,61, 19,249,59, 20,250,57, 22,250,55, 23,251,53, 
+	24,252,51, 26,252,49, 27,253,47, 29,253,45, 30,253,44, 32,253,42, 33,253,40, 35,254,38, 
+	37,253,37, 38,253,35, 40,253,33, 42,253,32, 44,253,30, 45,252,29, 47,252,27, 49,251,26, 
+	51,250,24, 53,250,23, 55,249,22, 57,248,20, 59,247,19, 61,246,18, 63,245,17, 65,244,16, 
+	67,243,14, 69,241,13, 71,240,12, 73,239,11, 75,237,10, 77,235,9, 79,234,9, 82,232,8, 
+	84,230,7, 86,229,6, 88,227,5, 90,225,5, 93,223,4, 95,221,3, 97,218,3, 99,216,2, 
+	102,214,2, 104,212,2, 106,209,1, 109,207,1, 111,205,0, 113,202,0, 116,200,0, 118,197,0, 
+	120,194,0, 123,192,0, 125,189,0, 127,186,0, 130,184,0, 132,181,0, 134,178,0, 137,175,0, 
+	139,172,0, 141,169,0, 144,166,1, 146,163,1, 148,160,1, 151,157,2, 153,154,2, 155,151,3, 
+	157,148,3, 160,145,4, 162,142,5, 164,139,5, 166,136,6, 169,133,7, 171,130,7, 173,126,8, 
+	175,123,9, 177,120,10, 179,117,11, 182,114,12, 184,111,13, 186,108,14, 188,105,15, 190,102,16, 
+	192,99,18, 194,96,19, 196,93,20, 198,90,21, 200,87,23, 202,84,24, 203,81,25, 205,78,27, 
+	207,75,28, 209,72,30, 211,69,31, 212,67,33, 214,64,35, 216,61,36, 217,59,38, 219,56,39, 
+	221,53,41, 222,51,43, 224,48,45, 225,46,47, 227,44,48, 228,41,50, 229,39,52, 231,37,54, 
+	232,35,56, 233,32,58, 235,30,60, 236,28,62, 237,26,64, 238,24,66, 239,23,68, 240,21,70, 
+	241,19,72, 242,18,74, 243,16,76, 244,14,79, 245,13,81, 246,12,83, 247,10,85, 247,9,87, 
+	248,8,90, 249,7,92, 249,6,94, 250,5,96, 250,4,99, 251,3,101, 251,3,103, 252,2,106, 
+	252,1,108, 252,1,110, 253,0,113, 253,0,115, 253,0,117, 253,0,119, 253,0,122, 254,0,125};

Added: packages/ncview/branches/upstream/current/colormaps_detail.h
===================================================================
--- packages/ncview/branches/upstream/current/colormaps_detail.h	                        (rev 0)
+++ packages/ncview/branches/upstream/current/colormaps_detail.h	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,56 @@
+/*
+ * Ncview by David W. Pierce.  A visual netCDF file viewer.
+ * Copyright (C) 1993 through 2009 David W. Pierce
+ *
+ * This program  is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as 
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License, version 3, for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * David W. Pierce
+ * 6259 Caminito Carrean
+ * San Diego, CA   92122
+ * pierce at cirrus.ucsd.edu
+ */
+
+static int cmap_detail[] = {
+	0,0,255, 0,10,255, 1,20,254, 2,40,253, 3,60,252, 4,80,251, 5,114,250, 6,145,249, 
+	7,175,248, 8,202,247, 9,225,246, 10,241,245, 11,251,244, 12,253,243, 13,248,242, 14,235,241, 
+	15,216,240, 16,192,239, 17,163,238, 18,133,237, 19,102,236, 20,72,235, 21,46,234, 22,24,233, 
+	23,9,232, 24,1,231, 25,0,230, 26,7,229, 27,21,228, 28,41,227, 29,67,226, 30,96,225, 
+	31,126,224, 32,157,223, 33,186,222, 34,212,221, 35,232,220, 36,246,219, 37,253,218, 38,252,217, 
+	39,244,216, 40,229,215, 41,207,214, 42,181,213, 43,151,212, 44,120,211, 45,90,210, 46,61,209, 
+	47,37,208, 48,18,207, 49,5,206, 50,0,205, 51,2,204, 52,12,203, 53,28,202, 54,51,201, 
+	55,78,200, 56,108,199, 57,139,198, 58,169,197, 59,197,196, 60,221,195, 61,239,194, 62,250,193, 
+	63,254,192, 64,250,191, 65,239,190, 66,221,189, 67,197,188, 68,169,187, 69,139,186, 70,108,185, 
+	71,78,184, 72,51,183, 73,28,182, 74,12,181, 75,2,180, 76,0,179, 77,5,178, 78,18,177, 
+	79,37,176, 80,61,175, 81,90,174, 82,120,173, 83,151,172, 84,181,171, 85,207,170, 86,229,169, 
+	87,244,168, 88,252,167, 89,253,166, 90,246,165, 91,232,164, 92,212,163, 93,186,162, 94,157,161, 
+	95,127,160, 96,96,159, 97,67,158, 98,41,157, 99,21,156, 100,7,155, 101,0,154, 102,1,153, 
+	103,9,152, 104,24,151, 105,46,150, 106,72,149, 107,102,148, 108,133,147, 109,163,146, 110,192,145, 
+	111,216,144, 112,235,143, 113,248,142, 114,253,141, 115,251,140, 116,241,139, 117,225,138, 118,202,137, 
+	119,175,136, 120,145,135, 121,114,134, 122,84,133, 123,56,132, 124,32,131, 125,14,130, 126,3,129, 
+	127,0,128, 128,3,127, 129,14,126, 130,32,125, 131,56,124, 132,84,123, 133,114,122, 134,145,121, 
+	135,175,120, 136,202,119, 137,225,118, 138,241,117, 139,251,116, 140,253,115, 141,248,114, 142,235,113, 
+	143,216,112, 144,192,111, 145,163,110, 146,133,109, 147,102,108, 148,72,107, 149,46,106, 150,24,105, 
+	151,9,104, 152,1,103, 153,0,102, 154,7,101, 155,21,100, 156,41,99, 157,67,98, 158,96,97, 
+	159,126,96, 160,157,95, 161,186,94, 162,212,93, 163,232,92, 164,246,91, 165,253,90, 166,252,89, 
+	167,244,88, 168,229,87, 169,207,86, 170,181,85, 171,151,84, 172,120,83, 173,90,82, 174,61,81, 
+	175,37,80, 176,18,79, 177,5,78, 178,0,77, 179,2,76, 180,12,75, 181,28,74, 182,51,73, 
+	183,78,72, 184,108,71, 185,139,70, 186,169,69, 187,197,68, 188,221,67, 189,239,66, 190,250,65, 
+	191,254,64, 192,250,63, 193,239,62, 194,221,61, 195,197,60, 196,169,59, 197,139,58, 198,108,57, 
+	199,78,56, 200,51,55, 201,28,54, 202,12,53, 203,2,52, 204,0,51, 205,5,50, 206,18,49, 
+	207,37,48, 208,61,47, 209,90,46, 210,120,45, 211,151,44, 212,181,43, 213,207,42, 214,229,41, 
+	215,244,40, 216,252,39, 217,253,38, 218,246,37, 219,232,36, 220,212,35, 221,186,34, 222,157,33, 
+	223,127,32, 224,96,31, 225,67,30, 226,41,29, 227,21,28, 228,7,27, 229,0,26, 230,1,25, 
+	231,9,24, 232,24,23, 233,46,22, 234,72,21, 235,102,20, 236,133,19, 237,163,18, 238,192,17, 
+	239,216,16, 240,235,15, 241,248,14, 242,253,13, 243,251,12, 244,241,11, 245,225,10, 246,202,9, 
+	247,175,8, 248,145,7, 249,114,6, 250,84,5, 251,56,4, 252,32,3, 253,14,2, 255,0,1};

Added: packages/ncview/branches/upstream/current/colormaps_extrema.h
===================================================================
--- packages/ncview/branches/upstream/current/colormaps_extrema.h	                        (rev 0)
+++ packages/ncview/branches/upstream/current/colormaps_extrema.h	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,56 @@
+/*
+ * Ncview by David W. Pierce.  A visual netCDF file viewer.
+ * Copyright (C) 1993 through 2009 David W. Pierce
+ *
+ * This program  is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as 
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License, version 3, for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * David W. Pierce
+ * 6259 Caminito Carrean
+ * San Diego, CA   92122
+ * pierce at cirrus.ucsd.edu
+ */
+
+static int cmap_extrema[] = {
+	0,0,255, 2,0,252, 5,0,249, 8,1,246, 11,3,243, 14,9,240, 17,20,237, 19,39,235, 
+	22,67,232, 25,105,229, 27,149,227, 30,193,224, 32,229,222, 35,251,219, 37,253,217, 39,238,215, 
+	42,208,212, 44,171,210, 46,133,208, 48,99,206, 50,74,204, 53,59,201, 55,54,199, 57,61,197, 
+	59,77,195, 61,101,193, 62,130,192, 64,162,190, 66,194,188, 68,221,186, 70,241,184, 72,252,182, 
+	73,254,181, 75,246,179, 77,231,177, 78,209,176, 80,184,174, 81,158,173, 83,132,171, 84,109,170, 
+	86,89,168, 87,74,167, 88,63,166, 90,56,164, 91,54,163, 92,57,162, 93,63,161, 95,72,159, 
+	96,84,158, 97,99,157, 98,116,156, 99,133,155, 100,151,154, 101,169,153, 102,187,152, 103,203,151, 
+	104,217,150, 105,229,149, 106,239,148, 107,247,147, 108,252,146, 109,254,145, 110,254,144, 110,253,144, 
+	111,249,143, 112,244,142, 113,237,141, 113,229,141, 114,221,140, 115,211,139, 115,202,139, 116,192,138, 
+	116,182,138, 117,173,137, 117,163,137, 118,154,136, 118,146,136, 119,137,135, 119,130,135, 120,122,134, 
+	120,116,134, 121,109,133, 121,104,133, 121,98,133, 122,93,132, 122,89,132, 122,85,132, 123,81,131, 
+	123,78,131, 123,75,131, 124,73,130, 124,70,130, 124,68,130, 124,66,130, 125,65,129, 125,63,129, 
+	125,62,129, 125,61,129, 125,60,129, 126,59,128, 126,59,128, 126,58,128, 126,57,128, 126,57,128, 
+	126,57,128, 126,56,128, 126,56,128, 126,56,128, 127,56,127, 127,55,127, 127,55,127, 127,55,127, 
+	127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 
+	127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 
+	127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 
+	127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,55,127, 127,54,127, 
+	127,54,127, 127,54,127, 127,54,127, 127,54,127, 127,54,127, 128,54,126, 128,54,126, 128,54,126, 
+	128,55,126, 128,55,126, 128,55,126, 128,55,126, 128,55,126, 128,56,126, 129,56,125, 129,57,125, 
+	129,57,125, 129,58,125, 129,59,125, 130,60,124, 130,61,124, 130,63,124, 130,64,124, 131,66,123, 
+	131,69,123, 131,71,123, 132,74,122, 132,78,122, 132,81,122, 133,85,121, 133,90,121, 133,95,121, 
+	134,101,120, 134,107,120, 135,114,119, 135,121,119, 136,129,118, 136,137,118, 137,146,117, 137,155,117, 
+	138,165,116, 138,175,116, 139,185,115, 139,196,115, 140,206,114, 141,216,113, 141,225,113, 142,234,112, 
+	143,241,111, 144,247,110, 144,252,110, 145,254,109, 146,254,108, 147,252,107, 148,247,106, 149,240,105, 
+	150,230,104, 151,218,103, 152,203,102, 153,186,101, 154,169,100, 155,150,99, 156,132,98, 157,114,97, 
+	158,97,96, 159,82,95, 161,70,93, 162,61,92, 163,56,91, 164,54,90, 166,58,88, 167,65,87, 
+	168,78,86, 170,95,84, 171,116,83, 173,140,81, 174,167,80, 176,193,78, 177,218,77, 179,238,75, 
+	181,250,73, 182,255,72, 184,249,70, 186,233,68, 188,209,66, 190,179,64, 192,147,62, 193,115,61, 
+	195,88,59, 197,68,57, 199,56,55, 201,55,53, 204,65,50, 206,86,48, 208,116,46, 210,153,44, 
+	212,192,42, 215,226,39, 217,249,37, 219,254,35, 222,240,32, 224,209,30, 227,167,27, 229,121,25, 
+	232,80,22, 235,48,19, 237,26,17, 240,12,14, 243,5,11, 246,2,8, 249,0,5, 252,0,2};

Added: packages/ncview/branches/upstream/current/colormaps_helix.h
===================================================================
--- packages/ncview/branches/upstream/current/colormaps_helix.h	                        (rev 0)
+++ packages/ncview/branches/upstream/current/colormaps_helix.h	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,56 @@
+/*
+ * Ncview by David W. Pierce.  A visual netCDF file viewer.
+ * Copyright (C) 1993 through 2009 David W. Pierce
+ *
+ * This program  is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as 
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License, version 3, for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * David W. Pierce
+ * 6259 Caminito Carrean
+ * San Diego, CA   92122
+ * pierce at cirrus.ucsd.edu
+ */
+
+static int cmap_helix[] = {
+	0,0,0, 0,0,0, 1,1,0, 2,1,0, 3,2,0, 4,2,0, 5,3,0, 6,4,0, 
+	7,4,0, 7,5,0, 8,6,0, 9,6,0, 10,7,0, 10,8,0, 11,9,0, 12,10,0, 
+	12,11,0, 13,11,0, 14,12,0, 14,13,0, 15,14,0, 15,15,0, 16,16,0, 16,17,0, 
+	17,18,0, 17,19,0, 18,20,0, 18,21,0, 18,22,0, 19,23,0, 19,25,0, 19,26,0, 
+	20,27,0, 20,28,0, 20,29,0, 20,30,0, 20,31,1, 21,33,1, 21,34,1, 21,35,1, 
+	21,36,2, 21,37,2, 21,39,2, 21,40,2, 21,41,3, 21,42,3, 21,43,4, 21,44,4, 
+	20,46,4, 20,47,5, 20,48,5, 20,49,6, 20,50,7, 19,52,7, 19,53,8, 19,54,8, 
+	18,55,9, 18,56,10, 18,57,10, 17,58,11, 17,59,12, 17,60,13, 16,61,14, 16,62,15, 
+	16,63,15, 15,64,16, 15,65,17, 14,66,18, 14,67,19, 13,68,21, 13,69,22, 12,70,23, 
+	12,71,24, 11,72,25, 11,72,26, 10,73,28, 10,74,29, 9,75,30, 9,75,32, 8,76,33, 
+	8,76,34, 7,77,36, 7,78,37, 6,78,39, 6,79,40, 5,79,42, 5,79,43, 4,80,45, 
+	4,80,46, 4,80,48, 3,81,50, 3,81,51, 2,81,53, 2,81,55, 2,81,56, 1,81,58, 
+	1,81,60, 1,81,62, 1,81,63, 0,81,65, 0,81,67, 0,81,69, 0,81,71, 0,81,73, 
+	0,80,74, 0,80,76, 0,80,78, 0,79,80, 0,79,82, 0,79,84, 0,78,86, 0,77,88, 
+	0,77,90, 0,76,91, 0,76,93, 1,75,95, 1,74,97, 1,74,99, 2,73,101, 2,72,103, 
+	3,71,105, 3,70,106, 4,69,108, 4,69,110, 5,68,112, 6,67,114, 6,66,115, 7,65,117, 
+	8,64,119, 9,62,121, 10,61,122, 11,60,124, 12,59,126, 13,58,127, 14,57,129, 15,55,130, 
+	16,54,132, 18,53,133, 19,52,135, 20,50,136, 22,49,138, 23,48,139, 25,47,140, 26,45,142, 
+	28,44,143, 29,43,144, 31,41,145, 33,40,146, 34,39,147, 36,37,148, 38,36,149, 40,35,150, 
+	42,33,151, 44,32,152, 46,31,153, 48,29,154, 50,28,154, 52,27,155, 54,25,156, 57,24,156, 
+	59,23,157, 61,22,157, 63,20,158, 66,19,158, 68,18,158, 71,17,158, 73,16,159, 75,15,159, 
+	78,14,159, 81,13,159, 83,12,159, 86,11,159, 88,10,159, 91,9,158, 94,8,158, 96,7,158, 
+	99,6,157, 102,5,157, 104,5,156, 107,4,156, 110,3,155, 113,3,155, 115,2,154, 118,2,153, 
+	121,1,152, 124,1,151, 127,1,150, 129,0,149, 132,0,148, 135,0,147, 138,0,146, 141,0,145, 
+	143,0,143, 146,0,142, 149,0,141, 152,0,139, 155,0,138, 157,0,136, 160,1,135, 163,1,133, 
+	165,1,132, 168,2,130, 171,3,128, 173,3,126, 176,4,125, 179,5,123, 181,6,121, 184,6,119, 
+	186,7,117, 188,8,115, 191,10,113, 193,11,111, 196,12,109, 198,13,107, 200,15,105, 202,16,103, 
+	204,18,100, 206,19,98, 209,21,96, 211,23,94, 212,24,92, 214,26,89, 216,28,87, 218,30,85, 
+	220,32,83, 221,34,80, 223,37,78, 224,39,76, 226,41,73, 227,44,71, 229,46,69, 230,48,66, 
+	231,51,64, 232,54,62, 233,56,60, 234,59,57, 235,62,55, 236,65,53, 237,68,51, 238,71,49, 
+	238,74,46, 239,77,44, 240,80,42, 240,83,40, 240,86,38, 241,89,36, 241,93,34, 241,96,32, 
+	241,99,30, 241,103,28, 241,106,27, 241,110,25, 240,113,23, 240,117,21, 239,120,20, 239,124,18};

Added: packages/ncview/branches/upstream/current/colormaps_helix2.h
===================================================================
--- packages/ncview/branches/upstream/current/colormaps_helix2.h	                        (rev 0)
+++ packages/ncview/branches/upstream/current/colormaps_helix2.h	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,56 @@
+/*
+ * Ncview by David W. Pierce.  A visual netCDF file viewer.
+ * Copyright (C) 1993 through 2009 David W. Pierce
+ *
+ * This program  is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as 
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License, version 3, for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * David W. Pierce
+ * 6259 Caminito Carrean
+ * San Diego, CA   92122
+ * pierce at cirrus.ucsd.edu
+ */
+
+static int cmap_helix2[] = {
+	0,0,0, 0,0,0, 1,1,1, 2,1,1, 3,2,2, 4,2,2, 5,3,3, 6,4,4, 
+	7,4,4, 7,5,5, 8,6,6, 9,6,6, 10,7,7, 10,8,8, 11,9,9, 12,10,10, 
+	12,11,11, 13,11,11, 14,12,12, 14,13,13, 15,14,14, 15,15,15, 16,16,16, 16,17,17, 
+	17,18,18, 17,19,19, 18,20,20, 18,21,21, 18,22,22, 19,23,23, 19,25,25, 19,26,26, 
+	20,27,27, 20,28,28, 20,29,29, 20,30,30, 20,31,31, 21,33,33, 21,34,34, 21,35,35, 
+	21,36,36, 21,37,37, 21,39,39, 21,40,40, 21,41,41, 21,42,42, 21,43,43, 21,44,44, 
+	20,46,46, 20,47,47, 20,48,48, 20,49,49, 20,50,50, 19,52,52, 19,53,53, 19,54,54, 
+	18,55,55, 18,56,56, 18,57,57, 17,58,58, 17,59,59, 17,60,60, 16,61,61, 16,62,62, 
+	16,63,63, 15,64,64, 15,65,65, 14,66,66, 14,67,67, 13,68,68, 13,69,69, 12,70,70, 
+	12,71,71, 11,72,72, 11,72,72, 10,73,73, 10,74,74, 9,75,75, 9,75,75, 8,76,76, 
+	8,76,76, 7,77,77, 7,78,78, 6,78,78, 6,79,79, 5,79,79, 5,79,79, 4,80,80, 
+	4,80,80, 4,80,80, 3,81,81, 3,81,81, 2,81,81, 2,81,81, 2,81,81, 1,81,81, 
+	1,81,81, 1,81,81, 1,81,81, 0,81,81, 0,81,81, 0,81,81, 0,81,81, 0,81,81, 
+	0,80,80, 0,80,80, 0,80,80, 0,79,79, 0,79,79, 0,79,79, 0,78,78, 0,77,77, 
+	0,77,77, 0,76,76, 0,76,76, 1,75,75, 1,74,74, 1,74,74, 2,73,73, 2,72,72, 
+	3,71,71, 3,70,70, 4,69,69, 4,69,69, 5,68,68, 6,67,67, 6,66,66, 7,65,65, 
+	8,64,64, 9,62,62, 10,61,61, 11,60,60, 12,59,59, 13,58,58, 14,57,57, 15,55,55, 
+	16,54,54, 18,53,53, 19,52,52, 20,50,50, 22,49,49, 23,48,48, 25,47,47, 26,45,45, 
+	28,44,44, 29,43,43, 31,41,41, 33,40,40, 34,39,39, 36,37,37, 38,36,36, 40,35,35, 
+	42,33,33, 44,32,32, 46,31,31, 48,29,29, 50,28,28, 52,27,27, 54,25,25, 57,24,24, 
+	59,23,23, 61,22,22, 63,20,20, 66,19,19, 68,18,18, 71,17,17, 73,16,16, 75,15,15, 
+	78,14,14, 81,13,13, 83,12,12, 86,11,11, 88,10,10, 91,9,9, 94,8,8, 96,7,7, 
+	99,6,6, 102,5,5, 104,5,5, 107,4,4, 110,3,3, 113,3,3, 115,2,2, 118,2,2, 
+	121,1,1, 124,1,1, 127,1,1, 129,0,0, 132,0,0, 135,0,0, 138,0,0, 141,0,0, 
+	143,0,0, 146,0,0, 149,0,0, 152,0,0, 155,0,0, 157,0,0, 160,1,1, 163,1,1, 
+	165,1,1, 168,2,2, 171,3,3, 173,3,3, 176,4,4, 179,5,5, 181,6,6, 184,6,6, 
+	186,7,7, 188,8,8, 191,10,10, 193,11,11, 196,12,12, 198,13,13, 200,15,15, 202,16,16, 
+	204,18,18, 206,19,19, 209,21,21, 211,23,23, 212,24,24, 214,26,26, 216,28,28, 218,30,30, 
+	220,32,32, 221,34,34, 223,37,37, 224,39,39, 226,41,41, 227,44,44, 229,46,46, 230,48,48, 
+	231,51,51, 232,54,54, 233,56,56, 234,59,59, 235,62,62, 236,65,65, 237,68,68, 238,71,71, 
+	238,74,74, 239,77,77, 240,80,80, 240,83,83, 240,86,86, 241,89,89, 241,93,93, 241,96,96, 
+	241,99,99, 241,103,103, 241,106,106, 241,110,110, 240,113,113, 240,117,117, 239,120,120, 239,124,124};

Added: packages/ncview/branches/upstream/current/colormaps_hotres.h
===================================================================
--- packages/ncview/branches/upstream/current/colormaps_hotres.h	                        (rev 0)
+++ packages/ncview/branches/upstream/current/colormaps_hotres.h	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,56 @@
+/*
+ * Ncview by David W. Pierce.  A visual netCDF file viewer.
+ * Copyright (C) 1993 through 2009 David W. Pierce
+ *
+ * This program  is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as 
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License, version 3, for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * David W. Pierce
+ * 6259 Caminito Carrean
+ * San Diego, CA   92122
+ * pierce at cirrus.ucsd.edu
+ */
+
+static int cmap_hotres[] = {
+	1,5,70, 8,25,100, 15,53,130, 23,68,160, 31,83,190, 39,98,220, 47,112,250, 55,127,253, 
+	62,140,250, 69,153,244, 75,164,235, 82,174,224, 88,184,212, 95,193,199, 101,201,186, 107,208,173, 
+	112,215,160, 118,221,147, 123,226,135, 128,231,123, 134,235,112, 139,239,102, 143,242,93, 148,245,84, 
+	153,247,76, 157,249,69, 161,250,62, 165,251,56, 169,252,50, 173,253,45, 177,253,40, 181,253,36, 
+	184,252,32, 188,252,29, 191,251,25, 194,250,23, 197,248,20, 200,247,18, 203,245,16, 206,243,14, 
+	208,241,12, 211,239,11, 213,237,10, 216,235,9, 218,232,8, 220,230,7, 222,227,6, 224,225,5, 
+	226,222,4, 228,219,4, 230,216,3, 232,213,3, 233,210,3, 235,207,2, 236,204,2, 238,201,2, 
+	239,198,1, 240,195,1, 241,192,1, 242,189,1, 243,186,1, 244,183,0, 245,180,0, 246,177,0, 
+	247,173,0, 248,170,0, 248,167,0, 249,164,0, 250,161,0, 250,158,0, 251,155,0, 251,152,0, 
+	251,149,0, 252,147,0, 252,144,0, 252,141,0, 252,138,0, 253,135,0, 253,132,0, 253,130,0, 
+	253,127,0, 253,124,0, 253,122,0, 253,119,0, 252,117,0, 252,114,0, 252,112,0, 252,109,0, 
+	252,107,0, 251,105,0, 251,102,0, 251,100,0, 250,98,0, 250,96,0, 249,93,0, 249,91,0, 
+	248,89,0, 248,87,0, 247,85,0, 247,83,0, 246,81,0, 245,79,0, 245,78,0, 244,76,0, 
+	243,74,0, 243,72,0, 242,71,0, 241,69,0, 240,67,0, 240,66,0, 239,64,0, 238,62,0, 
+	237,61,0, 236,59,0, 235,58,0, 235,57,0, 234,55,0, 233,54,0, 232,53,0, 231,51,0, 
+	230,50,0, 229,49,0, 228,47,0, 227,46,0, 226,45,0, 225,44,0, 224,43,0, 223,42,0, 
+	222,41,0, 221,40,0, 220,39,0, 219,38,0, 218,37,0, 217,36,0, 216,35,0, 214,34,0, 
+	213,33,0, 212,32,0, 211,31,0, 210,31,0, 209,30,0, 208,29,0, 207,28,0, 205,27,0, 
+	204,27,0, 203,26,0, 202,25,0, 201,25,0, 200,24,0, 199,23,0, 197,23,0, 196,22,0, 
+	195,21,0, 194,21,0, 193,20,0, 192,20,0, 191,19,0, 189,19,0, 188,18,0, 187,18,0, 
+	186,17,0, 185,17,0, 184,16,0, 182,16,0, 181,15,0, 180,15,0, 179,15,0, 178,14,0, 
+	177,14,0, 175,13,0, 174,13,0, 173,13,0, 172,12,0, 171,12,0, 170,12,0, 168,11,0, 
+	167,11,0, 166,11,0, 165,10,0, 164,10,0, 163,10,0, 162,9,0, 161,9,0, 159,9,0, 
+	158,9,0, 157,8,0, 156,8,0, 155,8,0, 154,8,0, 153,7,0, 152,7,0, 150,7,0, 
+	149,7,0, 148,7,0, 147,6,0, 146,6,0, 145,6,0, 144,6,0, 143,6,0, 142,6,0, 
+	141,5,0, 140,5,0, 139,5,0, 138,5,0, 137,5,0, 136,5,0, 135,4,0, 133,4,0, 
+	132,4,0, 131,4,0, 130,4,0, 129,4,0, 128,4,0, 127,4,0, 126,3,0, 125,3,0, 
+	124,3,0, 123,3,0, 122,3,0, 122,3,0, 121,3,0, 120,3,0, 119,3,0, 118,3,0, 
+	117,2,0, 116,2,0, 115,2,0, 114,2,0, 113,2,0, 112,2,0, 111,2,0, 110,2,0, 
+	109,2,0, 108,2,0, 108,2,0, 107,2,0, 106,2,0, 105,2,0, 104,1,0, 103,1,0, 
+	102,1,0, 101,1,0, 101,1,0, 100,1,0, 99,1,0, 98,1,0, 97,1,0, 96,1,0, 
+	96,1,0, 95,1,0, 94,1,0, 93,1,0, 92,1,0, 92,1,0, 91,1,0, 90,0,0};

Added: packages/ncview/branches/upstream/current/colormaps_ssec.h
===================================================================
--- packages/ncview/branches/upstream/current/colormaps_ssec.h	                        (rev 0)
+++ packages/ncview/branches/upstream/current/colormaps_ssec.h	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,56 @@
+/*
+ * Ncview by David W. Pierce.  A visual netCDF file viewer.
+ * Copyright (C) 1993 through 2009 David W. Pierce
+ *
+ * This program  is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as 
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License, version 3, for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * David W. Pierce
+ * 6259 Caminito Carrean
+ * San Diego, CA   92122
+ * pierce at cirrus.ucsd.edu
+ */
+
+static int cmap_ssec[] = {
+	0,0,45, 0,1,46, 0,2,47, 0,3,48, 0,5,49, 0,6,50, 0,7,51, 0,9,52, 
+	0,10,53, 0,11,54, 0,13,55, 0,14,56, 0,15,57, 0,17,58, 0,18,59, 0,19,60, 
+	0,21,62, 0,22,63, 0,23,64, 0,25,65, 0,26,66, 0,27,67, 0,29,68, 0,30,69, 
+	0,31,70, 0,33,71, 0,34,72, 0,35,73, 0,37,74, 0,38,75, 0,39,76, 0,40,77, 
+	0,42,79, 0,43,80, 0,44,81, 0,46,82, 0,47,83, 0,48,84, 0,50,85, 0,51,86, 
+	0,52,87, 0,54,88, 0,55,89, 0,56,90, 0,58,91, 0,59,92, 0,60,93, 0,62,94, 
+	0,63,96, 0,64,97, 0,66,98, 0,67,99, 0,68,100, 0,70,101, 0,71,102, 0,72,103, 
+	0,74,104, 0,75,105, 0,76,106, 0,77,107, 0,79,108, 0,80,109, 0,81,110, 0,83,111, 
+	0,84,113, 0,85,114, 0,87,115, 0,88,116, 0,89,117, 0,91,118, 0,92,119, 0,93,120, 
+	0,95,121, 0,96,122, 0,97,123, 0,99,124, 0,100,125, 0,101,126, 0,103,127, 0,104,128, 
+	0,105,130, 0,107,131, 0,108,132, 0,109,133, 0,111,134, 0,112,135, 0,113,136, 0,114,137, 
+	0,116,138, 0,117,139, 0,118,140, 0,120,141, 0,121,142, 0,122,143, 0,124,144, 0,125,145, 
+	0,126,147, 0,128,148, 0,129,149, 0,130,150, 0,132,151, 0,133,152, 0,134,153, 0,136,154, 
+	0,137,155, 0,138,156, 0,140,157, 0,141,158, 0,142,159, 0,144,160, 0,145,161, 0,146,162, 
+	0,148,164, 0,149,165, 0,150,166, 0,151,167, 0,153,168, 0,154,169, 0,155,170, 0,157,171, 
+	0,158,172, 0,159,173, 0,161,174, 0,162,175, 0,163,176, 0,165,177, 0,166,178, 0,167,180, 
+	0,169,181, 0,170,182, 0,171,183, 0,173,184, 0,174,185, 0,175,186, 0,177,187, 0,178,188, 
+	0,179,189, 0,181,190, 0,182,191, 0,183,192, 0,185,193, 0,186,194, 0,187,195, 0,188,197, 
+	0,190,198, 0,191,199, 0,192,200, 0,194,201, 0,195,202, 0,196,203, 0,198,204, 0,199,205, 
+	0,200,206, 0,202,207, 0,203,208, 0,204,209, 0,206,210, 0,207,211, 0,208,212, 0,210,214, 
+	0,211,215, 0,212,216, 0,214,217, 0,215,218, 0,216,219, 0,218,220, 0,219,221, 0,220,222, 
+	0,222,223, 0,223,224, 0,224,225, 0,225,226, 0,227,227, 0,228,228, 0,229,229, 8,230,222, 
+	17,231,214, 26,232,206, 34,233,198, 43,234,190, 52,235,182, 61,236,174, 70,236,166, 78,237,158, 
+	87,238,150, 96,239,143, 105,240,135, 114,241,127, 122,242,119, 131,242,111, 140,243,103, 149,244,95, 
+	157,245,87, 166,246,79, 175,247,71, 184,248,63, 193,248,55, 201,249,47, 210,250,39, 219,251,32, 
+	228,252,24, 237,253,16, 245,254,8, 254,254,0, 255,250,0, 255,245,0, 255,240,0, 255,236,0, 
+	255,231,0, 255,226,0, 255,221,0, 255,217,0, 255,212,0, 255,207,0, 255,202,0, 255,198,0, 
+	255,193,0, 255,188,0, 255,183,0, 255,179,0, 255,174,0, 255,169,0, 255,164,0, 255,160,0, 
+	255,155,0, 255,150,0, 255,145,0, 255,141,0, 255,136,0, 255,131,0, 255,126,0, 255,122,0, 
+	253,117,0, 249,113,0, 246,109,0, 242,105,0, 239,101,0, 236,97,0, 232,93,0, 229,89,0, 
+	225,85,0, 222,81,0, 219,77,0, 215,73,0, 212,69,0, 208,65,0, 205,61,0, 202,57,0, 
+	198,53,0, 195,49,0, 191,45,0, 188,41,0, 185,37,0, 181,33,0, 178,29,0, 175,24,0};

Added: packages/ncview/branches/upstream/current/configure
===================================================================
--- packages/ncview/branches/upstream/current/configure	                        (rev 0)
+++ packages/ncview/branches/upstream/current/configure	2009-07-13 09:25:34 UTC (rev 2335)
@@ -0,0 +1,9143 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+  LC_TELEPHONE LC_TIME
+do
+  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)$' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\/\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  echo "#! /bin/sh" >conf$$.sh
+  echo  "exit 0"   >>conf$$.sh
+  chmod +x conf$$.sh
+  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+    PATH_SEPARATOR=';'
+  else
+    PATH_SEPARATOR=:
+  fi
+  rm -f conf$$.sh
+fi
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  case $0 in
+    *[\\/]* ) as_myself=$0 ;;
+    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+       ;;
+  esac
+  # We did not find ourselves, most probably we were run as `sh COMMAND'
+  # in which case we are not to be found in the path.
+  if test "x$as_myself" = x; then
+    as_myself=$0
+  fi
+  if test ! -f "$as_myself"; then
+    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, and appends trailing '-' during
+  # substitution so that $LINENO is not a special case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+  as_ln_s=ln
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="ncview.c"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS NETCDF_INCDIR NETCDF_LIBDIR NETCDF_LIBNAME UDUNITS_INCDIR UDUNITS_LIBDIR UDUNITS_LIBNAME DO_UDUNITS_LINE DO_UDUNITS_INCDIR DO_UDUNITS_LIBDIR DO_UDUNITS_LIBNAME PPM_INCDIR PPM_LIBDIR PPM_LIBNAME DO_PPM_LINE DO_PPM_INCDIR DO_PPM_LIBDIR DO_PPM_LIBNAME INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PREFIX X_INCLUDES LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+	      localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$0" : 'X\(//\)[^/]' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| \
+	 .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+			  [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+			  [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+X features:
+  --x-includes=DIR    X include files are in DIR
+  --x-libraries=DIR   X library files are in DIR
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+  cat <<\_ACEOF
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-x                use the X Window System
+ --with-netcdf_incdir=dir directory containing netCDF includes
+--with-netcdf_libname=fname name of netcdf library file libnetcdf.a
+ --with-netcdf_libdir=dir directory containing netCDF library
+ --with-udunits_incdir=dir directory containing udunits includes
+ --with-udunits_libdir=dir directory containing udunits library
+ --with-ppm_incdir=dir directory containing ppm includes
+ --with-ppm_libdir=dir directory containing ppm library
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+  case "$ac_dir" in
+  .) ac_abs_builddir=`pwd`;;
+  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+  *) ac_abs_builddir=`pwd`/"$ac_dir";;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+  case ${ac_top_builddir}. in
+  .) ac_abs_top_builddir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+  case $ac_srcdir in
+  .) ac_abs_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+  esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+  case $ac_top_srcdir in
+  .) ac_abs_top_srcdir=$ac_abs_builddir;;
+  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+  esac;;
+esac
+
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+	   test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
+
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+	echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+	ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+	;;
+    conftest.$ac_ext )
+	# This is the source file.
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	# FIXME: I believe we export ac_cv_exeext for Libtool,
+	# but it would be cool to find out if it's true.  Does anybody
+	# maintain Libtool? --akim.
+	export ac_cv_exeext
+	break;;
+    * )
+	break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  export ac_cv_exeext
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std1 is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std1.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   '' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char strerror ();
+int
+main ()
+{
+strerror ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_search_strerror="none required"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_strerror" = no; then
+  for ac_lib in cposix; do
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char strerror ();
+int
+main ()
+{
+strerror ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_search_strerror="-l$ac_lib"
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+  done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
+  test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
+
+
+echo "$as_me:$LINENO: checking for X" >&5
+echo $ECHO_N "checking for X... $ECHO_C" >&6
+
+
+# Check whether --with-x or --without-x was given.
+if test "${with_x+set}" = set; then
+  withval="$with_x"
+
+fi;
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+  # The user explicitly disabled X.
+  have_x=disabled
+else
+  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
+    # Both variables are already set.
+    have_x=yes
+  else
+    if test "${ac_cv_have_x+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -fr conftest.dir
+if mkdir conftest.dir; then
+  cd conftest.dir
+  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
+  cat >Imakefile <<'_ACEOF'
+acfindx:
+	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
+_ACEOF
+  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+    for ac_extension in a so sl; do
+      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
+	 test -f $ac_im_libdir/libX11.$ac_extension; then
+	ac_im_usrlibdir=$ac_im_libdir; break
+      fi
+    done
+    # Screen out bogus values from the imake configuration.  They are
+    # bogus both because they are the default anyway, and because
+    # using them would break gcc on systems where it needs fixed includes.
+    case $ac_im_incroot in
+	/usr/include) ;;
+	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+    esac
+    case $ac_im_usrlibdir in
+	/usr/lib | /lib) ;;
+	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+    esac
+  fi
+  cd ..
+  rm -fr conftest.dir
+fi
+
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+  # Guess where to find include files, by looking for Intrinsic.h.
+  # First, try using that file with no special directory specified.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <X11/Intrinsic.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  for ac_dir in $ac_x_header_dirs; do
+  if test -r "$ac_dir/X11/Intrinsic.h"; then
+    ac_x_includes=$ac_dir
+    break
+  fi
+done
+fi
+rm -f conftest.err conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+  # Check for the libraries.
+  # See if we find them without any special options.
+  # Don't add to $LIBS permanently.
+  ac_save_LIBS=$LIBS
+  LIBS="-lXt $LIBS"
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <X11/Intrinsic.h>
+int
+main ()
+{
+XtMalloc (0)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+LIBS=$ac_save_LIBS
+for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+  # Don't even attempt the hair of trying to link an X program!
+  for ac_extension in a so sl; do
+    if test -r $ac_dir/libXt.$ac_extension; then
+      ac_x_libraries=$ac_dir
+      break 2
+    fi
+  done
+done
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
+  # Didn't find X anywhere.  Cache the known absence of X.
+  ac_cv_have_x="have_x=no"
+else
+  # Record where we found X for the cache.
+  ac_cv_have_x="have_x=yes \
+		ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi
+fi
+
+  fi
+  eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+  echo "$as_me:$LINENO: result: $have_x" >&5
+echo "${ECHO_T}$have_x" >&6
+  no_x=yes
+else
+  # If each of the values was on the command line, it overrides each guess.
+  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+  # Update the cache value to reflect the command line values.
+  ac_cv_have_x="have_x=yes \
+		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+  echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
+echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
+fi
+
+if test "x$no_x" == "xyes"; then
+	echo "Error, the X libraries and development headers must be installed for ncview to work!"
+	exit -1
+fi
+if test "$no_x" = yes; then
+  # Not all programs may use this symbol, but it does not hurt to define it.
+
+cat >>confdefs.h <<\_ACEOF
+#define X_DISPLAY_MISSING 1
+_ACEOF
+
+  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+  if test -n "$x_includes"; then
+    X_CFLAGS="$X_CFLAGS -I$x_includes"
+  fi
+
+  # It would also be nice to do this for all -L options, not just this one.
+  if test -n "$x_libraries"; then
+    X_LIBS="$X_LIBS -L$x_libraries"
+    # For Solaris; some versions of Sun CC require a space after -R and
+    # others require no space.  Words are not sufficient . . . .
+    case `(uname -sr) 2>/dev/null` in
+    "SunOS 5"*)
+      echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
+echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
+      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_R_nospace=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_R_nospace=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+      if test $ac_R_nospace = yes; then
+	echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+	X_LIBS="$X_LIBS -R$x_libraries"
+      else
+	LIBS="$ac_xsave_LIBS -R $x_libraries"
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_R_space=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_R_space=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+	if test $ac_R_space = yes; then
+	  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+	  X_LIBS="$X_LIBS -R $x_libraries"
+	else
+	  echo "$as_me:$LINENO: result: neither works" >&5
+echo "${ECHO_T}neither works" >&6
+	fi
+      fi
+      LIBS=$ac_xsave_LIBS
+    esac
+  fi
+
+  # Check for system-dependent libraries X programs must link with.
+  # Do this before checking for the system-independent R6 libraries
+  # (-lICE), since we may need -lsocket or whatever for X linking.
+
+  if test "$ISC" = yes; then
+    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+  else
+    # Martyn Johnson says this is needed for Ultrix, if the X
+    # libraries were built with DECnet support.  And Karl Berry says
+    # the Alpha needs dnet_stub (dnet does not exist).
+    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char XOpenDisplay ();
+int
+main ()
+{
+XOpenDisplay ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
+echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
+if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dnet_ntoa ();
+int
+main ()
+{
+dnet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dnet_dnet_ntoa=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dnet_dnet_ntoa=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
+if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+fi
+
+    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+      echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
+echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
+if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet_stub  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char dnet_ntoa ();
+int
+main ()
+{
+dnet_ntoa ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_dnet_stub_dnet_ntoa=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dnet_stub_dnet_ntoa=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
+if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+fi
+
+    fi
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+    LIBS="$ac_xsave_LIBS"
+
+    # msh at cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+    # to get the SysV transport functions.
+    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
+    # needs -lnsl.
+    # The nsl library prevents programs from opening the X display
+    # on Irix 5.2, according to T.E. Dickey.
+    # The functions gethostbyname, getservbyname, and inet_addr are
+    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
+    echo "$as_me:$LINENO: checking for gethostbyname" >&5
+echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
+if test "${ac_cv_func_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define gethostbyname innocuous_gethostbyname
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char gethostbyname (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef gethostbyname
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gethostbyname ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+char (*f) () = gethostbyname;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != gethostbyname;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_gethostbyname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
+
+    if test $ac_cv_func_gethostbyname = no; then
+      echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_nsl_gethostbyname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
+if test $ac_cv_lib_nsl_gethostbyname = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+fi
+
+      if test $ac_cv_lib_nsl_gethostbyname = no; then
+	echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
+echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
+if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_bsd_gethostbyname=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_bsd_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
+if test $ac_cv_lib_bsd_gethostbyname = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
+fi
+
+      fi
+    fi
+
+    # lieder at skyler.mavd.honeywell.com says without -lsocket,
+    # socket/setsockopt and other routines are undefined under SCO ODT
+    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
+    # on later versions), says Simon Leinen: it contains gethostby*
+    # variants that don't use the name server (or something).  -lsocket
+    # must be given before -lnsl if both are needed.  We assume that
+    # if connect needs -lnsl, so does gethostbyname.
+    echo "$as_me:$LINENO: checking for connect" >&5
+echo $ECHO_N "checking for connect... $ECHO_C" >&6
+if test "${ac_cv_func_connect+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define connect to an innocuous variant, in case <limits.h> declares connect.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char connect (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef connect
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char connect ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_connect) || defined (__stub___connect)
+choke me
+#else
+char (*f) () = connect;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != connect;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_connect=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+echo "${ECHO_T}$ac_cv_func_connect" >&6
+
+    if test $ac_cv_func_connect = no; then
+      echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
+echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_connect+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char connect ();
+int
+main ()
+{
+connect ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_socket_connect=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
+if test $ac_cv_lib_socket_connect = yes; then
+  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+fi
+
+    fi
+
+    # Guillermo Gomez says -lposix is necessary on A/UX.
+    echo "$as_me:$LINENO: checking for remove" >&5
+echo $ECHO_N "checking for remove... $ECHO_C" >&6
+if test "${ac_cv_func_remove+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define remove to an innocuous variant, in case <limits.h> declares remove.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define remove innocuous_remove
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char remove (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef remove
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char remove ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_remove) || defined (__stub___remove)
+choke me
+#else
+char (*f) () = remove;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != remove;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_remove=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_remove=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
+echo "${ECHO_T}$ac_cv_func_remove" >&6
+
+    if test $ac_cv_func_remove = no; then
+      echo "$as_me:$LINENO: checking for remove in -lposix" >&5
+echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
+if test "${ac_cv_lib_posix_remove+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char remove ();
+int
+main ()
+{
+remove ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_posix_remove=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_posix_remove=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
+echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
+if test $ac_cv_lib_posix_remove = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+fi
+
+    fi
+
+    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+    echo "$as_me:$LINENO: checking for shmat" >&5
+echo $ECHO_N "checking for shmat... $ECHO_C" >&6
+if test "${ac_cv_func_shmat+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shmat innocuous_shmat
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shmat (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shmat
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shmat ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shmat) || defined (__stub___shmat)
+choke me
+#else
+char (*f) () = shmat;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shmat;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_func_shmat=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shmat=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
+echo "${ECHO_T}$ac_cv_func_shmat" >&6
+
+    if test $ac_cv_func_shmat = no; then
+      echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
+echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
+if test "${ac_cv_lib_ipc_shmat+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lipc  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char shmat ();
+int
+main ()
+{
+shmat ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_ipc_shmat=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ipc_shmat=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
+echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
+if test $ac_cv_lib_ipc_shmat = yes; then
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+fi
+
+    fi
+  fi
+
+  # Check for libraries that X11R6 Xt/Xaw programs need.
+  ac_save_LDFLAGS=$LDFLAGS
+  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+  # check for ICE first), but we must link in the order -lSM -lICE or
+  # we get undefined symbols.  So assume we have SM if we have ICE.
+  # These have to be linked with before -lX11, unlike the other
+  # libraries we check for below, so use a different variable.
+  # John Interrante, Karl Berry
+  echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
+echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
+if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char IceConnectionNumber ();
+int
+main ()
+{
+IceConnectionNumber ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_ICE_IceConnectionNumber=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ICE_IceConnectionNumber=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
+if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
+  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+fi
+
+  LDFLAGS=$ac_save_LDFLAGS
+
+fi
+
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+# Check whether --with-netcdf_incdir or --without-netcdf_incdir was given.
+if test "${with_netcdf_incdir+set}" = set; then
+  withval="$with_netcdf_incdir"
+  NETCDF_INCDIR=$withval
+fi;
+err=0
+if test x$NETCDF_INCDIR != x; then
+        as_ac_Header=`echo "ac_cv_header_$NETCDF_INCDIR/netcdf.h" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $NETCDF_INCDIR/netcdf.h" >&5
+echo $ECHO_N "checking for $NETCDF_INCDIR/netcdf.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $NETCDF_INCDIR/netcdf.h usability" >&5
+echo $ECHO_N "checking $NETCDF_INCDIR/netcdf.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$NETCDF_INCDIR/netcdf.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $NETCDF_INCDIR/netcdf.h presence" >&5
+echo $ECHO_N "checking $NETCDF_INCDIR/netcdf.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$NETCDF_INCDIR/netcdf.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $NETCDF_INCDIR/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $NETCDF_INCDIR/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $NETCDF_INCDIR/netcdf.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $NETCDF_INCDIR/netcdf.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $NETCDF_INCDIR/netcdf.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $NETCDF_INCDIR/netcdf.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $NETCDF_INCDIR/netcdf.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $NETCDF_INCDIR/netcdf.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $NETCDF_INCDIR/netcdf.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $NETCDF_INCDIR/netcdf.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $NETCDF_INCDIR/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $NETCDF_INCDIR/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $NETCDF_INCDIR/netcdf.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $NETCDF_INCDIR/netcdf.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $NETCDF_INCDIR/netcdf.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $NETCDF_INCDIR/netcdf.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $NETCDF_INCDIR/netcdf.h" >&5
+echo $ECHO_N "checking for $NETCDF_INCDIR/netcdf.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  echo "Using user-specified netCDF include dir=$NETCDF_INCDIR"
+else
+  err=1
+fi
+
+
+fi
+if test $err -eq 1; then
+        echo "Error: user specified netCDF include directory does not have netcdf.h!"
+        exit -1
+fi
+if test x$NETCDF_INCDIR = x; then
+        if test "${ac_cv_header_netcdf_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for netcdf.h" >&5
+echo $ECHO_N "checking for netcdf.h... $ECHO_C" >&6
+if test "${ac_cv_header_netcdf_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_netcdf_h" >&5
+echo "${ECHO_T}$ac_cv_header_netcdf_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking netcdf.h usability" >&5
+echo $ECHO_N "checking netcdf.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <netcdf.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking netcdf.h presence" >&5
+echo $ECHO_N "checking netcdf.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <netcdf.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netcdf.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: netcdf.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: netcdf.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: netcdf.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netcdf.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: netcdf.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netcdf.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: netcdf.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netcdf.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: netcdf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netcdf.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: netcdf.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: netcdf.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: netcdf.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for netcdf.h" >&5
+echo $ECHO_N "checking for netcdf.h... $ECHO_C" >&6
+if test "${ac_cv_header_netcdf_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_netcdf_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_netcdf_h" >&5
+echo "${ECHO_T}$ac_cv_header_netcdf_h" >&6
+
+fi
+if test $ac_cv_header_netcdf_h = yes; then
+  NETCDF_INCDIR=.
+fi
+
+
+fi
+if test x$NETCDF_INCDIR = x; then
+        if test "${ac_cv_header__usr_local_include_netcdf_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for /usr/local/include/netcdf.h" >&5
+echo $ECHO_N "checking for /usr/local/include/netcdf.h... $ECHO_C" >&6
+if test "${ac_cv_header__usr_local_include_netcdf_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_netcdf_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_local_include_netcdf_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking /usr/local/include/netcdf.h usability" >&5
+echo $ECHO_N "checking /usr/local/include/netcdf.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include </usr/local/include/netcdf.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking /usr/local/include/netcdf.h presence" >&5
+echo $ECHO_N "checking /usr/local/include/netcdf.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include </usr/local/include/netcdf.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /usr/local/include/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/netcdf.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /usr/local/include/netcdf.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/netcdf.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /usr/local/include/netcdf.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/netcdf.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /usr/local/include/netcdf.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/netcdf.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /usr/local/include/netcdf.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /usr/local/include/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/netcdf.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /usr/local/include/netcdf.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/netcdf.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /usr/local/include/netcdf.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for /usr/local/include/netcdf.h" >&5
+echo $ECHO_N "checking for /usr/local/include/netcdf.h... $ECHO_C" >&6
+if test "${ac_cv_header__usr_local_include_netcdf_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header__usr_local_include_netcdf_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_netcdf_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_local_include_netcdf_h" >&6
+
+fi
+if test $ac_cv_header__usr_local_include_netcdf_h = yes; then
+  NETCDF_INCDIR=/usr/local/include
+fi
+
+
+fi
+if test x$NETCDF_INCDIR = x; then
+        if test "${ac_cv_header__usr_include_netcdf_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for /usr/include/netcdf.h" >&5
+echo $ECHO_N "checking for /usr/include/netcdf.h... $ECHO_C" >&6
+if test "${ac_cv_header__usr_include_netcdf_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_netcdf_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_include_netcdf_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking /usr/include/netcdf.h usability" >&5
+echo $ECHO_N "checking /usr/include/netcdf.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include </usr/include/netcdf.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking /usr/include/netcdf.h presence" >&5
+echo $ECHO_N "checking /usr/include/netcdf.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include </usr/include/netcdf.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: /usr/include/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /usr/include/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/netcdf.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /usr/include/netcdf.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: /usr/include/netcdf.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /usr/include/netcdf.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/netcdf.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /usr/include/netcdf.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/netcdf.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /usr/include/netcdf.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /usr/include/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/netcdf.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /usr/include/netcdf.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/netcdf.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /usr/include/netcdf.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for /usr/include/netcdf.h" >&5
+echo $ECHO_N "checking for /usr/include/netcdf.h... $ECHO_C" >&6
+if test "${ac_cv_header__usr_include_netcdf_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header__usr_include_netcdf_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_netcdf_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_include_netcdf_h" >&6
+
+fi
+if test $ac_cv_header__usr_include_netcdf_h = yes; then
+  NETCDF_INCDIR=/usr/include
+fi
+
+
+fi
+if test x$NETCDF_INCDIR = x; then
+        as_ac_Header=`echo "ac_cv_header_$HOME/include/netcdf.h" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $HOME/include/netcdf.h" >&5
+echo $ECHO_N "checking for $HOME/include/netcdf.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $HOME/include/netcdf.h usability" >&5
+echo $ECHO_N "checking $HOME/include/netcdf.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$HOME/include/netcdf.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $HOME/include/netcdf.h presence" >&5
+echo $ECHO_N "checking $HOME/include/netcdf.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$HOME/include/netcdf.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $HOME/include/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/netcdf.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $HOME/include/netcdf.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/netcdf.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $HOME/include/netcdf.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/netcdf.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $HOME/include/netcdf.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/netcdf.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $HOME/include/netcdf.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $HOME/include/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/netcdf.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $HOME/include/netcdf.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/netcdf.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $HOME/include/netcdf.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $HOME/include/netcdf.h" >&5
+echo $ECHO_N "checking for $HOME/include/netcdf.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  NETCDF_INCDIR=$HOME/include
+fi
+
+
+fi
+if test x$NETCDF_INCDIR = x; then
+        as_ac_Header=`echo "ac_cv_header_$HOME/src/netcdf/netcdf.h" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $HOME/src/netcdf/netcdf.h" >&5
+echo $ECHO_N "checking for $HOME/src/netcdf/netcdf.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $HOME/src/netcdf/netcdf.h usability" >&5
+echo $ECHO_N "checking $HOME/src/netcdf/netcdf.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$HOME/src/netcdf/netcdf.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $HOME/src/netcdf/netcdf.h presence" >&5
+echo $ECHO_N "checking $HOME/src/netcdf/netcdf.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$HOME/src/netcdf/netcdf.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $HOME/src/netcdf/netcdf.h" >&5
+echo $ECHO_N "checking for $HOME/src/netcdf/netcdf.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  NETCDF_INCDIR=$HOME/src/netcdf
+fi
+
+
+fi
+if test x$NETCDF_INCDIR = x; then
+        as_ac_Header=`echo "ac_cv_header_$HOME/src/netcdf/netcdf-3.4/netcdf.h" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $HOME/src/netcdf/netcdf-3.4/netcdf.h" >&5
+echo $ECHO_N "checking for $HOME/src/netcdf/netcdf-3.4/netcdf.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $HOME/src/netcdf/netcdf-3.4/netcdf.h usability" >&5
+echo $ECHO_N "checking $HOME/src/netcdf/netcdf-3.4/netcdf.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$HOME/src/netcdf/netcdf-3.4/netcdf.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $HOME/src/netcdf/netcdf-3.4/netcdf.h presence" >&5
+echo $ECHO_N "checking $HOME/src/netcdf/netcdf-3.4/netcdf.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$HOME/src/netcdf/netcdf-3.4/netcdf.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/netcdf.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $HOME/src/netcdf/netcdf-3.4/netcdf.h" >&5
+echo $ECHO_N "checking for $HOME/src/netcdf/netcdf-3.4/netcdf.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  NETCDF_INCDIR=$HOME/src/netcdfnetcdf-3.4
+fi
+
+
+fi
+if test x$NETCDF_INCDIR = x; then
+        as_ac_Header=`echo "ac_cv_header_$HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h" >&5
+echo $ECHO_N "checking for $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h usability" >&5
+echo $ECHO_N "checking $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h presence" >&5
+echo $ECHO_N "checking $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h" >&5
+echo $ECHO_N "checking for $HOME/src/netcdf/netcdf-3.4/src/libsrc/netcdf.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  NETCDF_INCDIR=$HOME/src/netcdfnetcdf-3.4/src/libsrc
+fi
+
+
+fi
+if test x$NETCDF_INCDIR = x; then
+        if test "${ac_cv_header__sw_include_netcdf_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for /sw/include/netcdf.h" >&5
+echo $ECHO_N "checking for /sw/include/netcdf.h... $ECHO_C" >&6
+if test "${ac_cv_header__sw_include_netcdf_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header__sw_include_netcdf_h" >&5
+echo "${ECHO_T}$ac_cv_header__sw_include_netcdf_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking /sw/include/netcdf.h usability" >&5
+echo $ECHO_N "checking /sw/include/netcdf.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include </sw/include/netcdf.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking /sw/include/netcdf.h presence" >&5
+echo $ECHO_N "checking /sw/include/netcdf.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include </sw/include/netcdf.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: /sw/include/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /sw/include/netcdf.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/netcdf.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /sw/include/netcdf.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: /sw/include/netcdf.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /sw/include/netcdf.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/netcdf.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /sw/include/netcdf.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/netcdf.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /sw/include/netcdf.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /sw/include/netcdf.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/netcdf.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /sw/include/netcdf.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/netcdf.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /sw/include/netcdf.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for /sw/include/netcdf.h" >&5
+echo $ECHO_N "checking for /sw/include/netcdf.h... $ECHO_C" >&6
+if test "${ac_cv_header__sw_include_netcdf_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header__sw_include_netcdf_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header__sw_include_netcdf_h" >&5
+echo "${ECHO_T}$ac_cv_header__sw_include_netcdf_h" >&6
+
+fi
+if test $ac_cv_header__sw_include_netcdf_h = yes; then
+  NETCDF_INCDIR=/sw/include
+fi
+
+
+fi
+if test x$NETCDF_INCDIR = x; then
+	echo " "
+        echo "Fatal error: I cannot find the directory that holds the netcdf include file netcdf.h!"
+	echo "You can specify it as follows:"
+	echo "      ./configure --with-netcdf_incdir=directory_with_file_netcdf.h"
+	echo " "
+	echo " *** Special note for R CMD INSTALL users: *********************************"
+	echo "     The syntax for specifying multiple --configure-args does not seem to be"
+	echo "     well documented in R.  If you have installed the netcdf include and library"
+	echo "     directories in some non-standard location, you can specify BOTH these"
+	echo "     during the R CMD INSTALL process using the following syntax:"
+	echo " "
+	echo "   R CMD INSTALL --configure-args=\"-with-netcdf_incdir=/path/to/netcdf/incdir -with-netcdf_libdir=/path/to/netcdf/libdir\" ncdf_1.1.tar.gz"
+	echo " "
+	echo "     where you should, of course, specify your own netcdf include and library"
+	echo "     directories, and the actual package name."
+	echo " ***************************************************************************"
+	echo " "
+        exit -1
+fi
+echo "Found netcdf.h in: $NETCDF_INCDIR"
+NETCDF_LIBNAME=libnetcdf.a
+
+# Check whether --with-netcdf_libname or --without-netcdf_libname was given.
+if test "${with_netcdf_libname+set}" = set; then
+  withval="$with_netcdf_libname"
+  NETCDF_LIBNAME=$withval
+fi;
+
+# Check whether --with-netcdf_libdir or --without-netcdf_libdir was given.
+if test "${with_netcdf_libdir+set}" = set; then
+  withval="$with_netcdf_libdir"
+  NETCDF_LIBDIR=$withval
+fi;
+err=0
+if test x$NETCDF_LIBDIR != x; then
+        as_ac_File=`echo "ac_cv_file_$NETCDF_LIBDIR/$NETCDF_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $NETCDF_LIBDIR/$NETCDF_LIBNAME" >&5
+echo $ECHO_N "checking for $NETCDF_LIBDIR/$NETCDF_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "$NETCDF_LIBDIR/$NETCDF_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  echo "Using user-specified netCDF library dir=$NETCDF_LIBDIR"
+else
+  err=1
+fi
+
+fi
+if test $err -eq 1; then
+        echo "Error: user specified netCDF library directory does not have $NETCDF_LIBNAME !"
+        exit -1
+fi
+if test x$NETCDF_LIBDIR = x; then
+        echo "$as_me:$LINENO: checking for nc_open in -lnetcdf" >&5
+echo $ECHO_N "checking for nc_open in -lnetcdf... $ECHO_C" >&6
+if test "${ac_cv_lib_netcdf_nc_open+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnetcdf  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char nc_open ();
+int
+main ()
+{
+nc_open ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_netcdf_nc_open=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_netcdf_nc_open=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_netcdf_nc_open" >&5
+echo "${ECHO_T}$ac_cv_lib_netcdf_nc_open" >&6
+if test $ac_cv_lib_netcdf_nc_open = yes; then
+  NETCDF_LIBDIR=.
+fi
+
+fi
+if test x$NETCDF_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/usr/local/lib/$NETCDF_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for /usr/local/lib/$NETCDF_LIBNAME" >&5
+echo $ECHO_N "checking for /usr/local/lib/$NETCDF_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/usr/local/lib/$NETCDF_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  NETCDF_LIBDIR=/usr/local/lib
+fi
+
+fi
+if test x$NETCDF_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/usr/local/lib32/r4i4/$NETCDF_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for /usr/local/lib32/r4i4/$NETCDF_LIBNAME" >&5
+echo $ECHO_N "checking for /usr/local/lib32/r4i4/$NETCDF_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/usr/local/lib32/r4i4/$NETCDF_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  NETCDF_LIBDIR=/usr/local/lib32/r4i4
+fi
+
+fi
+if test x$NETCDF_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/usr/lib/$NETCDF_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for /usr/lib/$NETCDF_LIBNAME" >&5
+echo $ECHO_N "checking for /usr/lib/$NETCDF_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/usr/lib/$NETCDF_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  NETCDF_LIBDIR=/usr/lib
+fi
+
+fi
+if test x$NETCDF_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/lib/$NETCDF_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for /lib/$NETCDF_LIBNAME" >&5
+echo $ECHO_N "checking for /lib/$NETCDF_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/lib/$NETCDF_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  NETCDF_LIBDIR=/lib
+fi
+
+fi
+if test x$NETCDF_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_$HOME/lib/$NETCDF_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $HOME/lib/$NETCDF_LIBNAME" >&5
+echo $ECHO_N "checking for $HOME/lib/$NETCDF_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "$HOME/lib/$NETCDF_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  NETCDF_LIBDIR=$HOME/lib
+fi
+
+fi
+if test x$NETCDF_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_$HOME/src/netcdf/$NETCDF_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $HOME/src/netcdf/$NETCDF_LIBNAME" >&5
+echo $ECHO_N "checking for $HOME/src/netcdf/$NETCDF_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "$HOME/src/netcdf/$NETCDF_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  NETCDF_LIBDIR=$HOME/src/netcdf
+fi
+
+fi
+if test x$NETCDF_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_$HOME/src/netcdf/netcdf-3.4/src/libsrc/$NETCDF_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $HOME/src/netcdf/netcdf-3.4/src/libsrc/$NETCDF_LIBNAME" >&5
+echo $ECHO_N "checking for $HOME/src/netcdf/netcdf-3.4/src/libsrc/$NETCDF_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "$HOME/src/netcdf/netcdf-3.4/src/libsrc/$NETCDF_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  NETCDF_LIBDIR=$HOME/src/netcdf/netcdf-3.4/src/libsrc/
+fi
+
+fi
+if test x$NETCDF_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/sw/lib/$NETCDF_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for /sw/lib/$NETCDF_LIBNAME" >&5
+echo $ECHO_N "checking for /sw/lib/$NETCDF_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/sw/lib/$NETCDF_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  NETCDF_LIBDIR=/sw/lib/
+fi
+
+fi
+if test x$NETCDF_LIBDIR = x; then
+        echo "Fatal error: I cannot find the directory that holds the netcdf library file $NETCDF_LIBNAME !"
+        echo "The default library file is named libnetcdf.a."
+	echo "If I should look for a netcdf library file with a different name than the"
+	echo "default, you can specify it as follows:"
+	echo "      ./configure --with-netcdf_libname=lib_file_name.a"
+	echo "If I should look in a different directory for the library file,"
+        echo "you can specify it as follows:"
+	echo "      ./configure --with-netcdf_libdir=directory_with_library_file"
+	echo " "
+	echo " *** Special note for R CMD INSTALL users: *********************************"
+	echo "     The syntax for specifying multiple --configure-args does not seem to be"
+	echo "     well documented in R.  If you have installed the netcdf include and library"
+	echo "     directories in some non-standard location, you can specify BOTH these"
+	echo "     during the R CMD INSTALL process using the following syntax:"
+	echo " "
+	echo "   R CMD INSTALL --configure-args=\"-with-netcdf_incdir=/path/to/netcdf/incdir -with-netcdf_libdir=/path/to/netcdf/libdir\" ncdf_1.1.tar.gz"
+	echo " "
+	echo "     where you should, of course, specify your own netcdf include and library"
+	echo "     directories, and the actual package name."
+	echo " ***************************************************************************"
+	echo " "
+        exit -1
+fi
+echo "Found netcdf library file $NETCDF_LIBNAME in directory $NETCDF_LIBDIR"
+NETCDF_LIBNAME=`echo $NETCDF_LIBNAME | sed s/lib// | sed s/\.a//`
+
+
+
+
+
+# Handle udunits
+
+
+# Check whether --with-udunits_incdir or --without-udunits_incdir was given.
+if test "${with_udunits_incdir+set}" = set; then
+  withval="$with_udunits_incdir"
+  UDUNITS_INCDIR=$withval
+fi;
+err=0
+if test x$UDUNITS_INCDIR != x; then
+        as_ac_Header=`echo "ac_cv_header_$UDUNITS_INCDIR/udunits.h" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $UDUNITS_INCDIR/udunits.h" >&5
+echo $ECHO_N "checking for $UDUNITS_INCDIR/udunits.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $UDUNITS_INCDIR/udunits.h usability" >&5
+echo $ECHO_N "checking $UDUNITS_INCDIR/udunits.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$UDUNITS_INCDIR/udunits.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $UDUNITS_INCDIR/udunits.h presence" >&5
+echo $ECHO_N "checking $UDUNITS_INCDIR/udunits.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$UDUNITS_INCDIR/udunits.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $UDUNITS_INCDIR/udunits.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $UDUNITS_INCDIR/udunits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $UDUNITS_INCDIR/udunits.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $UDUNITS_INCDIR/udunits.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $UDUNITS_INCDIR/udunits.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $UDUNITS_INCDIR/udunits.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $UDUNITS_INCDIR/udunits.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $UDUNITS_INCDIR/udunits.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $UDUNITS_INCDIR/udunits.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $UDUNITS_INCDIR/udunits.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $UDUNITS_INCDIR/udunits.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $UDUNITS_INCDIR/udunits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $UDUNITS_INCDIR/udunits.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $UDUNITS_INCDIR/udunits.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $UDUNITS_INCDIR/udunits.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $UDUNITS_INCDIR/udunits.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $UDUNITS_INCDIR/udunits.h" >&5
+echo $ECHO_N "checking for $UDUNITS_INCDIR/udunits.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  echo "Using user-specified udunits include dir=$UDUNITS_INCDIR"
+else
+  err=1
+fi
+
+
+fi
+if test $err -eq 1; then
+        echo "Error: user specified udunits include directory does not have udunits.h!"
+        exit -1
+fi
+if test x$UDUNITS_INCDIR = x; then
+        if test "${ac_cv_header_udunits_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for udunits.h" >&5
+echo $ECHO_N "checking for udunits.h... $ECHO_C" >&6
+if test "${ac_cv_header_udunits_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_udunits_h" >&5
+echo "${ECHO_T}$ac_cv_header_udunits_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking udunits.h usability" >&5
+echo $ECHO_N "checking udunits.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <udunits.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking udunits.h presence" >&5
+echo $ECHO_N "checking udunits.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <udunits.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: udunits.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: udunits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: udunits.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: udunits.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: udunits.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: udunits.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: udunits.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: udunits.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: udunits.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: udunits.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: udunits.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: udunits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: udunits.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: udunits.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: udunits.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: udunits.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for udunits.h" >&5
+echo $ECHO_N "checking for udunits.h... $ECHO_C" >&6
+if test "${ac_cv_header_udunits_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_udunits_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_udunits_h" >&5
+echo "${ECHO_T}$ac_cv_header_udunits_h" >&6
+
+fi
+if test $ac_cv_header_udunits_h = yes; then
+  UDUNITS_INCDIR=.
+fi
+
+
+fi
+if test x$UDUNITS_INCDIR = x; then
+        if test "${ac_cv_header__usr_local_include_udunits_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for /usr/local/include/udunits.h" >&5
+echo $ECHO_N "checking for /usr/local/include/udunits.h... $ECHO_C" >&6
+if test "${ac_cv_header__usr_local_include_udunits_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_udunits_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_local_include_udunits_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking /usr/local/include/udunits.h usability" >&5
+echo $ECHO_N "checking /usr/local/include/udunits.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include </usr/local/include/udunits.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking /usr/local/include/udunits.h presence" >&5
+echo $ECHO_N "checking /usr/local/include/udunits.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include </usr/local/include/udunits.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/udunits.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /usr/local/include/udunits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/udunits.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /usr/local/include/udunits.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/udunits.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /usr/local/include/udunits.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/udunits.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /usr/local/include/udunits.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/udunits.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /usr/local/include/udunits.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/udunits.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /usr/local/include/udunits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/udunits.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /usr/local/include/udunits.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/udunits.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /usr/local/include/udunits.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for /usr/local/include/udunits.h" >&5
+echo $ECHO_N "checking for /usr/local/include/udunits.h... $ECHO_C" >&6
+if test "${ac_cv_header__usr_local_include_udunits_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header__usr_local_include_udunits_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_udunits_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_local_include_udunits_h" >&6
+
+fi
+if test $ac_cv_header__usr_local_include_udunits_h = yes; then
+  UDUNITS_INCDIR=/usr/local/include
+fi
+
+
+fi
+if test x$UDUNITS_INCDIR = x; then
+        if test "${ac_cv_header__usr_include_udunits_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for /usr/include/udunits.h" >&5
+echo $ECHO_N "checking for /usr/include/udunits.h... $ECHO_C" >&6
+if test "${ac_cv_header__usr_include_udunits_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_udunits_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_include_udunits_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking /usr/include/udunits.h usability" >&5
+echo $ECHO_N "checking /usr/include/udunits.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include </usr/include/udunits.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking /usr/include/udunits.h presence" >&5
+echo $ECHO_N "checking /usr/include/udunits.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include </usr/include/udunits.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: /usr/include/udunits.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /usr/include/udunits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/udunits.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /usr/include/udunits.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: /usr/include/udunits.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /usr/include/udunits.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/udunits.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /usr/include/udunits.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/udunits.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /usr/include/udunits.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/udunits.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /usr/include/udunits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/udunits.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /usr/include/udunits.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/include/udunits.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /usr/include/udunits.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for /usr/include/udunits.h" >&5
+echo $ECHO_N "checking for /usr/include/udunits.h... $ECHO_C" >&6
+if test "${ac_cv_header__usr_include_udunits_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header__usr_include_udunits_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header__usr_include_udunits_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_include_udunits_h" >&6
+
+fi
+if test $ac_cv_header__usr_include_udunits_h = yes; then
+  UDUNITS_INCDIR=/usr/include
+fi
+
+
+fi
+if test x$UDUNITS_INCDIR = x; then
+        as_ac_Header=`echo "ac_cv_header_$HOME/include/udunits.h" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $HOME/include/udunits.h" >&5
+echo $ECHO_N "checking for $HOME/include/udunits.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $HOME/include/udunits.h usability" >&5
+echo $ECHO_N "checking $HOME/include/udunits.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$HOME/include/udunits.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $HOME/include/udunits.h presence" >&5
+echo $ECHO_N "checking $HOME/include/udunits.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$HOME/include/udunits.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/udunits.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $HOME/include/udunits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/udunits.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $HOME/include/udunits.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/udunits.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $HOME/include/udunits.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/udunits.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $HOME/include/udunits.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/udunits.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $HOME/include/udunits.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/udunits.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $HOME/include/udunits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/udunits.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $HOME/include/udunits.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $HOME/include/udunits.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $HOME/include/udunits.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $HOME/include/udunits.h" >&5
+echo $ECHO_N "checking for $HOME/include/udunits.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  UDUNITS_INCDIR=$HOME/include
+fi
+
+
+fi
+if test x$UDUNITS_INCDIR = x; then
+        if test "${ac_cv_header__sw_include_udunits_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for /sw/include/udunits.h" >&5
+echo $ECHO_N "checking for /sw/include/udunits.h... $ECHO_C" >&6
+if test "${ac_cv_header__sw_include_udunits_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header__sw_include_udunits_h" >&5
+echo "${ECHO_T}$ac_cv_header__sw_include_udunits_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking /sw/include/udunits.h usability" >&5
+echo $ECHO_N "checking /sw/include/udunits.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include </sw/include/udunits.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking /sw/include/udunits.h presence" >&5
+echo $ECHO_N "checking /sw/include/udunits.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include </sw/include/udunits.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: /sw/include/udunits.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /sw/include/udunits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/udunits.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /sw/include/udunits.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: /sw/include/udunits.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /sw/include/udunits.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/udunits.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /sw/include/udunits.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/udunits.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /sw/include/udunits.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/udunits.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: /sw/include/udunits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/udunits.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: /sw/include/udunits.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /sw/include/udunits.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: /sw/include/udunits.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for /sw/include/udunits.h" >&5
+echo $ECHO_N "checking for /sw/include/udunits.h... $ECHO_C" >&6
+if test "${ac_cv_header__sw_include_udunits_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header__sw_include_udunits_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header__sw_include_udunits_h" >&5
+echo "${ECHO_T}$ac_cv_header__sw_include_udunits_h" >&6
+
+fi
+if test $ac_cv_header__sw_include_udunits_h = yes; then
+  UDUNITS_INCDIR=/sw/include
+fi
+
+
+fi
+UDUNITS_LIBNAME=libudunits.a
+
+# Check whether --with-udunits_libdir or --without-udunits_libdir was given.
+if test "${with_udunits_libdir+set}" = set; then
+  withval="$with_udunits_libdir"
+  UDUNITS_LIBDIR=$withval
+fi;
+err=0
+if test x$UDUNITS_LIBDIR != x; then
+        as_ac_File=`echo "ac_cv_file_$UDUNITS_LIBDIR/$UDUNITS_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $UDUNITS_LIBDIR/$UDUNITS_LIBNAME" >&5
+echo $ECHO_N "checking for $UDUNITS_LIBDIR/$UDUNITS_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "$UDUNITS_LIBDIR/$UDUNITS_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  echo "Using user-specified udunits library dir=$UDUNITS_LIBDIR"
+else
+  err=1
+fi
+
+fi
+if test $err -eq 1; then
+        echo "Error: user specified udunits library directory does not have $UDUNITS_LIBNAME !"
+        exit -1
+fi
+if test x$NETCDF_LIBDIR = x; then
+        echo "$as_me:$LINENO: checking for utInit in -ludunits" >&5
+echo $ECHO_N "checking for utInit in -ludunits... $ECHO_C" >&6
+if test "${ac_cv_lib_udunits_utInit+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ludunits  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char utInit ();
+int
+main ()
+{
+utInit ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_udunits_utInit=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_udunits_utInit=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_udunits_utInit" >&5
+echo "${ECHO_T}$ac_cv_lib_udunits_utInit" >&6
+if test $ac_cv_lib_udunits_utInit = yes; then
+  UDUNITS_LIBDIR=.
+fi
+
+fi
+if test x$UDUNITS_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/usr/local/lib/$UDUNITS_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for /usr/local/lib/$UDUNITS_LIBNAME" >&5
+echo $ECHO_N "checking for /usr/local/lib/$UDUNITS_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/usr/local/lib/$UDUNITS_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  UDUNITS_LIBDIR=/usr/local/lib
+fi
+
+fi
+if test x$UDUNITS_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/usr/lib/$UDUNITS_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for /usr/lib/$UDUNITS_LIBNAME" >&5
+echo $ECHO_N "checking for /usr/lib/$UDUNITS_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/usr/lib/$UDUNITS_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  UDUNITS_LIBDIR=/usr/lib
+fi
+
+fi
+if test x$UDUNITS_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/lib/$UDUNITS_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for /lib/$UDUNITS_LIBNAME" >&5
+echo $ECHO_N "checking for /lib/$UDUNITS_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/lib/$UDUNITS_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  UDUNITS_LIBDIR=/lib
+fi
+
+fi
+if test x$UDUNITS_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_$HOME/lib/$UDUNITS_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $HOME/lib/$UDUNITS_LIBNAME" >&5
+echo $ECHO_N "checking for $HOME/lib/$UDUNITS_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "$HOME/lib/$UDUNITS_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  UDUNITS_LIBDIR=$HOME/lib
+fi
+
+fi
+if test x$UDUNITS_LIBDIR = x; then
+        as_ac_File=`echo "ac_cv_file_/sw/lib/$UDUNITS_LIBNAME" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for /sw/lib/$UDUNITS_LIBNAME" >&5
+echo $ECHO_N "checking for /sw/lib/$UDUNITS_LIBNAME... $ECHO_C" >&6
+if eval "test \"\${$as_ac_File+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  test "$cross_compiling" = yes &&
+  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
+echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
+   { (exit 1); exit 1; }; }
+if test -r "/sw/lib/$UDUNITS_LIBNAME"; then
+  eval "$as_ac_File=yes"
+else
+  eval "$as_ac_File=no"
+fi
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
+if test `eval echo '${'$as_ac_File'}'` = yes; then
+  UDUNITS_LIBDIR=/sw/lib
+fi
+
+fi
+UDUNITS_LIBNAME=`echo $UDUNITS_LIBNAME | sed s/lib// | sed s/\.a//`
+
+
+
+
+do_udunits=false
+if test x$UDUNITS_INCDIR != x; then
+	if test x$UDUNITS_LIBDIR != x; then
+		do_udunits=true
+	fi
+fi
+if test $do_udunits = true; then
+	echo "****************************************************************************"
+	echo "Udunits support enabled.   Note: Udunits did not used to work with MAC OS X"
+	echo "If you are using Mac OS X and have trouble, make sure you are using the"
+	echo "latest udunits package.  If it still doesn't work, remove the udunits library and remake ncview"
+	echo "udunits dirs: include: $UDUNITS_INCDIR  library: $UDUNITS_LIBDIR  libname: $UDUNITS_LIBNAME"
+	echo "****************************************************************************"
+	DO_UDUNITS_LINE="INC_UDUNITS   = -DINC_UDUNITS"
+	DO_UDUNITS_INCDIR="UDUNITSINCDIR = -I$UDUNITS_INCDIR"
+	DO_UDUNITS_LIBDIR="UDUNITSLIBDIR = -L$UDUNITS_LIBDIR"
+	DO_UDUNITS_LIBNAME="UDUNITSLIB = -l$UDUNITS_LIBNAME"
+else
+	echo "************************************************************************"
+	echo "Note: udunits support is NOT enabled, because I could not find the "
+	echo "location of the udunits include file 'udunits.h' or library file"
+	echo "'libudunits.a'.  Ncview uses the udunits package to format date strings"
+	echo "with units of the form 'days since 1900-01-01'.  If you do not use"
+	echo "these udunits-standard date formats, then don't worry about the lack"
+	echo "of udunits support.  If you DO use udunits format date strings, and"
+	echo "you want the udunits support, then you must tell me where to find"
+	echo "the udunits package by giving arguments to configure, as follows:"
+	echo "  ./configure -with-udunits_incdir=include_directory -with-udunits_libdir=library_directory"
+	echo "NOTE: udunits does >>not<< work under Mac OS X, so don't try using it on that platform!"
+	echo "************************************************************************"
+	DO_UDUNITS_LINE="#INC_UDUNITS   = -DINC_UDUNITS"
+	DO_UDUNITS_INCDIR="#UDUNITSINCDIR = -I$UDUNITS_INCDIR"
+	DO_UDUNITS_LIBDIR="#UDUNITSLIBDIR = -I$UDUNITS_LIBDIR"
+	DO_UDUNITS_LIBNAME="#UDUNITSLIB = -l$UDUNITS_LIBNAME"
+fi
+
+
+
+
+
+# Handle ppm
+
+
+# Check whether --with-ppm_incdir or --without-ppm_incdir was given.
+if test "${with_ppm_incdir+set}" = set; then
+  withval="$with_ppm_incdir"
+  PPM_INCDIR=$withval
+fi;
+err=0
+if test x$PPM_INCDIR != x; then
+        as_ac_Header=`echo "ac_cv_header_$PPM_INCDIR/ppm.h" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $PPM_INCDIR/ppm.h" >&5
+echo $ECHO_N "checking for $PPM_INCDIR/ppm.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $PPM_INCDIR/ppm.h usability" >&5
+echo $ECHO_N "checking $PPM_INCDIR/ppm.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$PPM_INCDIR/ppm.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $PPM_INCDIR/ppm.h presence" >&5
+echo $ECHO_N "checking $PPM_INCDIR/ppm.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$PPM_INCDIR/ppm.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $PPM_INCDIR/ppm.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $PPM_INCDIR/ppm.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $PPM_INCDIR/ppm.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $PPM_INCDIR/ppm.h: in the future, the compiler will take precedence" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists.  ##
+## ------------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $PPM_INCDIR/ppm.h" >&5
+echo $ECHO_N "checking for $PPM_INCDIR/ppm.h... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  echo "Using user-specified ppm include dir=$PPM_INCDIR"
+else
+  err=1
+fi
+
+
+fi
+if test $err -eq 1; then
+        echo "Error: user specified ppm include directory does not have ppm.h!"
+        exit -1
+fi
+if test x$PPM_INCDIR = x; then
+        if test "${ac_cv_header__usr_local_include_ppm_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for /usr/local/include/ppm.h" >&5
+echo $ECHO_N "checking for /usr/local/include/ppm.h... $ECHO_C" >&6
+if test "${ac_cv_header__usr_local_include_ppm_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_ppm_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_local_include_ppm_h" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking /usr/local/include/ppm.h usability" >&5
+echo $ECHO_N "checking /usr/local/include/ppm.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include </usr/local/include/ppm.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking /usr/local/include/ppm.h presence" >&5
+echo $ECHO_N "checking /usr/local/include/ppm.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include </usr/local/include/ppm.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: /usr/local/include/ppm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: /usr/local/include/ppm.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: /usr/local/include/ppm.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: /usr/local/include/ppm.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: /usr/local/include/ppm.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: /usr/local/include/ppm.h:     section \"Present But Cannot Be Compiled\&quo