[SCM] Implementation of the FITS WCS standard branch, upstream, updated. upstream/4.8.2-5-gec1da6d

Ole Streicher github at liska.ath.cx
Mon Dec 5 11:13:27 UTC 2011


The following commit has been merged in the upstream branch:
commit 7778e60586274bc21054bdcaba3b036210b3b0fb
Author: Ole Streicher <github at liska.ath.cx>
Date:   Mon Dec 5 12:12:22 2011 +0100

    Revert "New upstream version 4.8.4 -- except generated documentation"
    Imported the wrong tarball
    This reverts commit 2beb326ca4ef54fb6d268c4e51a7c7fbe41bc8d5.

diff --git a/C/GNUmakefile b/C/GNUmakefile
index f93e8c9..103ef5b 100644
--- a/C/GNUmakefile
+++ b/C/GNUmakefile
@@ -28,7 +28,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility
 # http://www.atnf.csiro.au/~mcalabre/index.html
-# $Id: GNUmakefile,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+# $Id: GNUmakefile,v 4.8.1.2 2011/09/16 04:41:29 cal103 Exp cal103 $
 #-----------------------------------------------------------------------------
 # Get configure settings.
 include ../makedefs
@@ -224,11 +224,15 @@ install : build
 	-  $(LN_S) $(WCSLIB) $(LIBDIR)/libwcs.a
 	-  if [ "$(SHRLIB)" != "" ] ; then \
 	     $(INSTALL) -m 644 $(SHRLIB) $(LIBDIR) ; \
+	     if [ -h "$(LIBDIR)/$(SONAME)" ] ; then \
+	       $(RM) $(LIBDIR)/$(SONAME) ; \
+	     fi ; \
+	     $(LN_S) $(SHRLIB) $(LIBDIR)/$(SONAME) ; \
 	     if [ "$(SHRLN)" != "" ] ; then \
 	       if [ -h "$(LIBDIR)/$(SHRLN)" ] ; then \
 	         $(RM) $(LIBDIR)/$(SHRLN) ; \
 	       fi ; \
-	       $(LN_S) $(SHRLIB) $(LIBDIR)/$(SHRLN) ; \
+	       $(LN_S) $(SONAME) $(LIBDIR)/$(SHRLN) ; \
 	     fi ; \
 	   fi
 	-  if [ ! -d "$(INCDIR)" ] ; then \
diff --git a/C/cel.c b/C/cel.c
index 18b779c..453cb75 100644
--- a/C/cel.c
+++ b/C/cel.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: cel.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: cel.c,v 4.8.1.2 2011/11/17 03:06:46 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <math.h>
@@ -152,7 +152,7 @@ const struct celprm *cel;
 
   WCSPRINTF_PTR("        err: ", cel->err, "\n");
   if (cel->err) {
-    wcserr_prt(cel->err, "");
+    wcserr_prt(cel->err, "             ");
   }
 
   wcsprintf("\n");
diff --git a/C/cel.h b/C/cel.h
index e1c5d68..6192921 100644
--- a/C/cel.h
+++ b/C/cel.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: cel.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: cel.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement the FITS World Coordinate System
diff --git a/C/fitshdr.h b/C/fitshdr.h
index 5d1f3cb..c5b9c00 100644
--- a/C/fitshdr.h
+++ b/C/fitshdr.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: fitshdr.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: fitshdr.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * The Flexible Image Transport System (FITS), a data format widely used in
diff --git a/C/fitshdr.l b/C/fitshdr.l
index 634cfe6..535c7c8 100644
--- a/C/fitshdr.l
+++ b/C/fitshdr.l
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: fitshdr.l,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: fitshdr.l,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * fitshdr.l is a Flex description file containing a lexical scanner
diff --git a/C/flexed/fitshdr.c b/C/flexed/fitshdr.c
index 38c7274..8b9e797 100644
--- a/C/flexed/fitshdr.c
+++ b/C/flexed/fitshdr.c
@@ -10087,7 +10087,7 @@ char *fitshdrtext;
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: fitshdr.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: fitshdr.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * fitshdr.l is a Flex description file containing a lexical scanner
diff --git a/C/flexed/wcsbth.c b/C/flexed/wcsbth.c
index 1a1e6fe..429d2cd 100644
--- a/C/flexed/wcsbth.c
+++ b/C/flexed/wcsbth.c
@@ -16673,7 +16673,7 @@ char *wcsbthtext;
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsbth.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: wcsbth.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * wcsbth.l is a Flex description file containing the definition of a lexical
diff --git a/C/flexed/wcspih.c b/C/flexed/wcspih.c
index c5d0ca7..82e8510 100644
--- a/C/flexed/wcspih.c
+++ b/C/flexed/wcspih.c
@@ -8157,7 +8157,7 @@ char *wcspihtext;
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcspih.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: wcspih.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * wcspih.l is a Flex description file containing the definition of a lexical
diff --git a/C/flexed/wcsulex.c b/C/flexed/wcsulex.c
index 3178c8c..ad91451 100644
--- a/C/flexed/wcsulex.c
+++ b/C/flexed/wcsulex.c
@@ -6864,7 +6864,7 @@ char *wcsulextext;
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsulex.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: wcsulex.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * wcsulex.l is a Flex description file containing the definition of a
diff --git a/C/flexed/wcsutrn.c b/C/flexed/wcsutrn.c
index af7021c..4a6f72e 100644
--- a/C/flexed/wcsutrn.c
+++ b/C/flexed/wcsutrn.c
@@ -3986,7 +3986,7 @@ char *wcsutrntext;
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsutrn.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: wcsutrn.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * wcsutrn.l is a Flex description file containing the definition of a lexical
diff --git a/C/getwcstab.c b/C/getwcstab.c
index 49609e3..da10560 100644
--- a/C/getwcstab.c
+++ b/C/getwcstab.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: getwcstab.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: getwcstab.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdlib.h>
diff --git a/C/getwcstab.h b/C/getwcstab.h
index db58af2..29a0463 100644
--- a/C/getwcstab.h
+++ b/C/getwcstab.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: getwcstab.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: getwcstab.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * Summary of the getwcstab routines
diff --git a/C/lin.c b/C/lin.c
index 683d776..56754de 100644
--- a/C/lin.c
+++ b/C/lin.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: lin.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: lin.c,v 4.8.1.2 2011/11/17 03:07:49 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdio.h>
@@ -343,7 +343,7 @@ const struct linprm *lin;
 
   WCSPRINTF_PTR("        err: ", lin->err, "\n");
   if (lin->err) {
-    wcserr_prt(lin->err, "");
+    wcserr_prt(lin->err, "             ");
   }
 
   if (lin->piximg == 0x0) {
diff --git a/C/lin.h b/C/lin.h
index 0e0b193..e3066d2 100644
--- a/C/lin.h
+++ b/C/lin.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: lin.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: lin.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement the FITS World Coordinate System
diff --git a/C/log.c b/C/log.c
index 6e93e14..8d10ff6 100644
--- a/C/log.c
+++ b/C/log.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: log.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: log.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/log.h b/C/log.h
index 5fc0edb..babce82 100644
--- a/C/log.h
+++ b/C/log.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: log.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: log.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement logarithmic coordinate systems as
diff --git a/C/prj.c b/C/prj.c
index aa6ea74..f14f921 100644
--- a/C/prj.c
+++ b/C/prj.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: prj.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: prj.c,v 4.8.1.2 2011/11/17 03:08:29 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <math.h>
@@ -264,7 +264,7 @@ const struct prjprm *prj;
 
   WCSPRINTF_PTR("        err: ", prj->err, "\n");
   if (prj->err) {
-    wcserr_prt(prj->err, "");
+    wcserr_prt(prj->err, "             ");
   }
 
   wcsprintf("        w[]:");
diff --git a/C/prj.h b/C/prj.h
index 680a151..c42f8ec 100644
--- a/C/prj.h
+++ b/C/prj.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: prj.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: prj.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement the spherical map projections
diff --git a/C/spc.c b/C/spc.c
index e31271b..6837f2b 100644
--- a/C/spc.c
+++ b/C/spc.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: spc.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: spc.c,v 4.8.1.2 2011/11/17 03:09:12 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <math.h>
@@ -195,7 +195,7 @@ int spcprt(const struct spcprm *spc)
 
   WCSPRINTF_PTR("        err: ", spc->err, "\n");
   if (spc->err) {
-    wcserr_prt(spc->err, "");
+    wcserr_prt(spc->err, "             ");
   }
 
   wcsprintf("     spxX2P: %s\n",
diff --git a/C/spc.h b/C/spc.h
index 6389a3f..79fc8fa 100644
--- a/C/spc.h
+++ b/C/spc.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: spc.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: spc.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement the spectral coordinate systems
diff --git a/C/sph.c b/C/sph.c
index 25eace5..29b7d12 100644
--- a/C/sph.c
+++ b/C/sph.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: sph.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: sph.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/sph.h b/C/sph.h
index f218b41..caf890f 100644
--- a/C/sph.h
+++ b/C/sph.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: sph.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: sph.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement the spherical coordinate
diff --git a/C/spx.c b/C/spx.c
index 7b53ba8..8a88418 100644
--- a/C/spx.c
+++ b/C/spx.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: spx.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: spx.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/spx.h b/C/spx.h
index 9b3d7db..925aa61 100644
--- a/C/spx.h
+++ b/C/spx.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: spx.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: spx.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement the spectral coordinate systems
diff --git a/C/tab.c b/C/tab.c
index e6f573a..f872ada 100644
--- a/C/tab.c
+++ b/C/tab.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tab.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: tab.c,v 4.8.1.2 2011/11/17 03:09:49 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <math.h>
@@ -618,7 +618,7 @@ int tabprt(const struct tabprm *tab)
 
   WCSPRINTF_PTR("        err: ", tab->err, "\n");
   if (tab->err) {
-    wcserr_prt(tab->err, "");
+    wcserr_prt(tab->err, "             ");
   }
 
   /* Memory management. */
diff --git a/C/tab.h b/C/tab.h
index 72ae5c5..5ffd795 100644
--- a/C/tab.h
+++ b/C/tab.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tab.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: tab.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement tabular coordinate systems as
diff --git a/C/test/bth.keyrec b/C/test/bth.keyrec
index 18d8fd4..5ecb8b2 100644
--- a/C/test/bth.keyrec
+++ b/C/test/bth.keyrec
@@ -27,7 +27,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility
 # http://www.atnf.csiro.au/~mcalabre/index.html
-# $Id: bth.keyrec,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+# $Id: bth.keyrec,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 #-----------------------------------------------------------------------------
 # FITS header keyrecords used for testing by tbth1.
 #
diff --git a/C/test/pih.keyrec b/C/test/pih.keyrec
index d88ef83..6ebe340 100644
--- a/C/test/pih.keyrec
+++ b/C/test/pih.keyrec
@@ -27,7 +27,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility
 # http://www.atnf.csiro.au/~mcalabre/index.html
-# $Id: pih.keyrec,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+# $Id: pih.keyrec,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 #-----------------------------------------------------------------------------
 # FITS header keyrecords used for testing by tpih1, tpih2 and tfitshdr.
 #
diff --git a/C/test/tbth1.c b/C/test/tbth1.c
index 9e71da9..6b36180 100644
--- a/C/test/tbth1.c
+++ b/C/test/tbth1.c
@@ -27,7 +27,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tbth1.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tbth1.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tbth1 tests wcsbth(), the WCS FITS parser for binary table headers, and
diff --git a/C/test/tcel1.c b/C/test/tcel1.c
index 2b338d5..5a88ac9 100644
--- a/C/test/tcel1.c
+++ b/C/test/tcel1.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tcel1.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tcel1.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tcel1 tests the spherical projection driver routines supplied with WCSLIB by
diff --git a/C/test/tcel2.c b/C/test/tcel2.c
index c8cff90..60c5f70 100644
--- a/C/test/tcel2.c
+++ b/C/test/tcel2.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tcel2.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tcel2.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tcel2 thoroughly tests the WCSLIB celestial coordinate transformation
diff --git a/C/test/tfitshdr.c b/C/test/tfitshdr.c
index 7cf1a70..abf5208 100644
--- a/C/test/tfitshdr.c
+++ b/C/test/tfitshdr.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tfitshdr.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tfitshdr.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tfitshdr tests fitshdr(), the FITS parser for image headers, by reading a
diff --git a/C/test/tlin.c b/C/test/tlin.c
index 3a3cbfb..45d952c 100644
--- a/C/test/tlin.c
+++ b/C/test/tlin.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tlin.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tlin.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 *  tlin tests the linear transformation routines supplied with WCSLIB.
diff --git a/C/test/tlog.c b/C/test/tlog.c
index e79bb8f..569622a 100644
--- a/C/test/tlog.c
+++ b/C/test/tlog.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tlog.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tlog.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 *   tlog tests the logarithmic coordinate transformation routines for closure.
diff --git a/C/test/tofits.c b/C/test/tofits.c
index 6e7d456..aad908b 100644
--- a/C/test/tofits.c
+++ b/C/test/tofits.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tofits.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tofits.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tofits turns a list of FITS header keyrecords, one per line, into a proper
diff --git a/C/test/tpih1.c b/C/test/tpih1.c
index cb739ba..29154ce 100644
--- a/C/test/tpih1.c
+++ b/C/test/tpih1.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tpih1.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tpih1.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tpih1 tests wcspih(), the WCS FITS parser for image headers, and wcsfix(),
diff --git a/C/test/tpih2.c b/C/test/tpih2.c
index 1e3ddaf..da1b3ea 100644
--- a/C/test/tpih2.c
+++ b/C/test/tpih2.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tpih2.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tpih2.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tpih2 tests wcspih(), the WCS FITS parser for image headers, by reading a
diff --git a/C/test/tprj1.c b/C/test/tprj1.c
index 45ad3e0..8a7029b 100644
--- a/C/test/tprj1.c
+++ b/C/test/tprj1.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tprj1.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tprj1.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tproj1 tests spherical projections for closure.
diff --git a/C/test/tprj2.c b/C/test/tprj2.c
index a953813..99de091 100644
--- a/C/test/tprj2.c
+++ b/C/test/tprj2.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tprj2.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tprj2.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tproj2 tests projection routines by plotting test graticules using PGPLOT.
diff --git a/C/test/tspc.c b/C/test/tspc.c
index 48ae274..da27f24 100644
--- a/C/test/tspc.c
+++ b/C/test/tspc.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tspc.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tspc.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tspc tests the spectral transformation driver routines for closure.
diff --git a/C/test/tsph.c b/C/test/tsph.c
index 739080e..d4aee14 100644
--- a/C/test/tsph.c
+++ b/C/test/tsph.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tsph.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tsph.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tsph tests the spherical coordinate transformation routines for closure.
diff --git a/C/test/tsphdpa.c b/C/test/tsphdpa.c
index 6df6a44..39235ed 100644
--- a/C/test/tsphdpa.c
+++ b/C/test/tsphdpa.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tsphdpa.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tsphdpa.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tsphdpa tests sphdpa().
diff --git a/C/test/tspx.c b/C/test/tspx.c
index f3a82de..00dadef 100644
--- a/C/test/tspx.c
+++ b/C/test/tspx.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tspx.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tspx.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tspx tests the spectral transformation routines for closure.
diff --git a/C/test/ttab1.c b/C/test/ttab1.c
index 01ef603..da9c519 100644
--- a/C/test/ttab1.c
+++ b/C/test/ttab1.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: ttab1.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: ttab1.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * ttab1 tests the -TAB routines for closure.
diff --git a/C/test/ttab2.c b/C/test/ttab2.c
index 68ab7cd..333c439 100644
--- a/C/test/ttab2.c
+++ b/C/test/ttab2.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: ttab2.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: ttab2.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * ttab2 tests the -TAB routines using PGPLOT for graphical display.  It
diff --git a/C/test/ttab3.c b/C/test/ttab3.c
index a65eec6..b32c924 100644
--- a/C/test/ttab3.c
+++ b/C/test/ttab3.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: ttab3.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: ttab3.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * ttab3 tests the -TAB routines using PGPLOT for graphical display.  It
diff --git a/C/test/tunits.c b/C/test/tunits.c
index c45dde7..0381fd9 100644
--- a/C/test/tunits.c
+++ b/C/test/tunits.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tunits.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tunits.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * tunits tests wcsulex(), wcsutrn(), and wcsunits() the FITS units
diff --git a/C/test/twcs.c b/C/test/twcs.c
index 9861124..1add823 100644
--- a/C/test/twcs.c
+++ b/C/test/twcs.c
@@ -29,7 +29,7 @@
   Author: Mark Calabretta, Australia Telescope National Facility
      and: Michael Droetboom, Space Telescope Science Institute
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: twcs.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: twcs.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * twcs tests wcss2p() and wcsp2s() for closure on an oblique 2-D slice through
diff --git a/C/test/twcsfix.c b/C/test/twcsfix.c
index c447f73..881c512 100644
--- a/C/test/twcsfix.c
+++ b/C/test/twcsfix.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: twcsfix.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: twcsfix.c,v 4.8.1.2 2011/11/17 03:47:56 cal103 Exp cal103 $
 *=============================================================================
 *
 * twcsfix tests the translation routines for non-standard WCS keyvalues, the
@@ -40,8 +40,10 @@
 #include <string.h>
 
 #include <wcs.h>
-#include <wcsunits.h>
+#include <wcserr.h>
 #include <wcsfix.h>
+#include <wcsprintf.h>
+#include <wcsunits.h>
 
 
 void parser(struct wcsprm *);
@@ -72,42 +74,59 @@ int main()
   char ctypeS[9];
   int i, stat[NWCSFIX], status;
   struct wcsprm wcs;
+  struct wcserr info[NWCSFIX];
 
-  printf("Testing WCSLIB translator for non-standard usage (twcsfix.c)\n"
-         "------------------------------------------------------------\n\n");
+  wcsprintf("Testing WCSLIB translator for non-standard usage (twcsfix.c)\n"
+          "------------------------------------------------------------\n\n");
 
   wcs.flag = -1;
   parser(&wcs);
 
-  /* Print the unmodified struct. */
-  wcsprt(&wcs);
-  printf("\n------------------------------------"
-         "------------------------------------\n");
+  /* Note: to print the unfixed wcsprm struct using wcsprt() the struct
+     would first have to be initialized by wcsset().  However, if the struct
+     contains non-standard keyvalues then wcsset() will either fix them
+     itself or else fail (e.g. for non-standard units).  Thus, in general,
+     wcsprt() cannot be used to print the unmodified struct. */
 
   /* Fix non-standard WCS keyvalues. */
-  if ((status = wcsfix(7, 0, &wcs, stat))) {
-    printf("wcsfix error, status returns: (");
-    for (i = 0; i < NWCSFIX; i++) {
-      printf(i ? ", %d" : "%d", stat[i]);
-    }
-    printf(")\n");
+  wcserr_enable(1);
+  status = wcsfixi(7, 0, &wcs, stat, info);
+  wcsprintf("wcsfix status returns: (");
+  for (i = 0; i < NWCSFIX; i++) {
+    wcsprintf(i ? ", %d" : "%d", stat[i]);
+  }
+  wcsprintf(")\n");
+
+  if (status) {
+    wcsprintf("wcsfix error %d", status);
     return 1;
   }
 
+  if (info[UNITFIX].status == -2) {
+    wcsprintf("\n");
+    wcserr_prt(info+UNITFIX, 0x0);
+  }
+
+  /* Extract information from the FITS header. */
+  if (wcsset(&wcs)) {
+    wcsprintf("\n");
+    wcserr_prt(wcs.err, 0x0);
+  }
+
   wcsprt(&wcs);
-  printf("\n------------------------------------"
-         "------------------------------------\n");
+  wcsprintf("\n------------------------------------"
+            "------------------------------------\n");
 
   /* Should now have a 'VOPT-F2W' axis, translate it to frequency. */
   strcpy(ctypeS, "FREQ-???");
   i = -1;
-  if ((status = wcssptr(&wcs, &i, ctypeS))) {
-    printf("wcssptr ERROR %d: %s.n", status, wcs_errmsg[status]);
+  if (wcssptr(&wcs, &i, ctypeS)) {
+    wcserr_prt(wcs.err, 0x0);
     return 1;
   }
 
-  if ((status = wcsset(&wcs))) {
-    printf("wcsset ERROR %d: %s.\n", status, wcs_errmsg[status]);
+  if (wcsset(&wcs)) {
+    wcserr_prt(wcs.err, 0x0);
     return 1;
   }
 
@@ -125,7 +144,7 @@ void parser(wcs)
 struct wcsprm *wcs;
 
 {
-  int i, j, status;
+  int i, j;
   double *pcij;
 
   /* In practice a parser would read the FITS header until it encountered  */
@@ -178,16 +197,5 @@ struct wcsprm *wcs;
 
   strcpy(wcs->dateobs, DATEOBS);
 
-
-  /* Translate non-standard units specifications before wcsset(). */
-  for (i = 0; i < NAXIS; i++) {
-    wcsutrn(7, wcs->cunit[i]);
-  }
-
-  /* Extract information from the FITS header. */
-  if ((status = wcsset(wcs))) {
-    printf("wcsset ERROR %d: %s.\n", status, wcs_errmsg[status]);
-  }
-
   return;
 }
diff --git a/C/test/twcsfix.out b/C/test/twcsfix.out
index 105a000..43c8c9a 100644
--- a/C/test/twcsfix.out
+++ b/C/test/twcsfix.out
@@ -1,184 +1,9 @@
 Testing WCSLIB translator for non-standard usage (twcsfix.c)
 ------------------------------------------------------------
 
-       flag: 137
-      naxis: 3
-      crpix: 0x<address>
-               90           90           1         
-         pc: 0x<address>
-    pc[0][]:   1            0            0         
-    pc[1][]:   0            1            0         
-    pc[2][]:   0            0            1         
-      cdelt: 0x<address>
-              -0.00027778   0.00027778   19687     
-      crval: 0x<address>
-               265.62      -28.988       5.5693e+06
-      cunit: 0x<address>
-             "deg"
-             "deg"
-             "m/s"
-      ctype: 0x<address>
-             "RA---NCP"
-             "DEC--NCP"
-             "VOPT-F2W"
-    lonpole: 180.000000
-    latpole: -28.988500
-    restfrq: 1420405750.000000
-    restwav: 0.000000
-        npv: 1
-     npvmax: 2
-         pv: 0x<address>
-              -1  -1  -1         
-        nps: 0
-     npsmax: 8
-         ps: 0x<address>
-         cd: 0x<address>
-    cd[0][]:   0            0            0         
-    cd[1][]:   0            0            0         
-    cd[2][]:   0            0            0         
-      crota: 0x<address>
-               0            0            0         
-     altlin: 0
-     velref: 0
-        alt: ' '
-     colnum: 0
-      colax: 0x<address>
-                 0      0      0
-    wcsname: UNDEFINED
-      cname: 0x<address>
-             UNDEFINED
-             UNDEFINED
-             UNDEFINED
-      crder: 0x<address>
-             UNDEFINED     UNDEFINED     UNDEFINED   
-      csyer: 0x<address>
-             UNDEFINED     UNDEFINED     UNDEFINED   
-    radesys: UNDEFINED
-    equinox: UNDEFINED
-    specsys: "BARYCENT"
-    ssysobs: UNDEFINED
-    velosys: UNDEFINED
-    ssyssrc: UNDEFINED
-    zsource: UNDEFINED
-     obsgeo: UNDEFINED     UNDEFINED     UNDEFINED     
-    dateobs: "1957/02/15 01:10:00"
-    dateavg: UNDEFINED
-     mjdobs: UNDEFINED
-     mjdavg: UNDEFINED
-       ntab: 0
-        tab: 0x0
-       nwtb: 0
-        wtb: 0x0
-      types: 0x<address>
-            2200 2201 3300
-     lngtyp: "RA"
-     lattyp: "DEC"
-        lng: 0
-        lat: 1
-       spec: 2
-   cubeface: -1
-        err: 0x0
-        lin: (see below)
-        cel: (see below)
-        spc: (see below)
-     m_flag: 137
-    m_naxis: 3
-    m_crpix: 0x<address>  (= crpix)
-       m_pc: 0x<address>  (= pc)
-    m_cdelt: 0x<address>  (= cdelt)
-    m_crval: 0x<address>  (= crval)
-    m_cunit: 0x<address>  (= cunit)
-    m_ctype: 0x<address>  (= ctype)
-       m_pv: 0x<address>  (= pv)
-       m_ps: 0x<address>  (= ps)
-       m_cd: 0x<address>  (= cd)
-    m_crota: 0x<address>  (= crota)
+wcsfix status returns: (-1, 0, 0, 0, -1, -2)
 
-    m_colax: 0x<address>  (= colax)
-    m_cname: 0x<address>  (= cname)
-    m_crder: 0x<address>  (= crder)
-    m_csyer: 0x<address>  (= csyer)
-      m_tab: 0x0  (= tab)
-      m_wtb: 0x0  (= wtb)
-
-   lin.*
-       flag: 137
-      naxis: 3
-      crpix: 0x<address>
-               90           90           1         
-         pc: 0x<address>
-    pc[0][]:   1            0            0         
-    pc[1][]:   0            1            0         
-    pc[2][]:   0            0            1         
-      cdelt: 0x<address>
-              -0.00027778   0.00027778   19687     
-      unity: 1
-        err: 0x0
-     piximg: (nil)
-     imgpix: (nil)
-     m_flag: 0
-    m_naxis: 0
-    m_crpix: 0x0
-       m_pc: 0x0
-    m_cdelt: 0x0
-
-   cel.*
-      flag: 137
-     offset: 0
-       phi0:  0.000000
-     theta0: 90.000000
-       ref:   265.62      -28.988       180         -28.988    
-       prj: (see below)
-     euler:   265.62       118.99       180         -0.48463      0.87472   
-    latpreq: 0 (not required)
-     isolat: 0
-        err: 0x0
-
-   prj.*
-       flag: 105
-       code: "SIN"
-         r0: 57.295780
-         pv: (0)
-              0           -1.8049    
-       phi0:  0.000000
-     theta0: 90.000000
-     bounds: 1
-
-       name: "orthographic/synthesis"
-   category: 1 (zenithal)
-    pvrange: 102
-  simplezen: 0
-  equiareal: 0
-  conformal: 0
-     global: 0
-  divergent: 0
-         x0: 0.000000
-         y0: 0.000000
-        err: 0x0
-        w[]:   0.017453     3.2577       4.2577       2.2577       0         
-               0            0            0            0            0         
-          m: 0
-          n: 0
-     prjx2s: 0x<address>
-     prjs2x: 0x<address>
-
-   spc.*
-       flag: 111
-       type: "VOPT"
-       code: "F2W"
-      crval:  5.569e+06 
-    restfrq: 1420405750.000000
-    restwav: 0.000000
-         pv: (not used)
-          w:   0.2111       1.395e+09   -4.567       (remainder unused)
-    isGrism: 0
-        err: 0x0
-     spxX2P: 0x<address>
-     spxP2S: 0x<address>
-     spxS2P: 0x<address>
-     spxP2X: 0x<address>
-
-------------------------------------------------------------------------
+Translated units: 'ARCSEC' -> 'arcsec', 'ARCSEC' -> 'arcsec', 'KM/SEC' -> 'km/s'.
        flag: 137
       naxis: 3
       crpix: 0x<address>
diff --git a/C/test/twcshdr.c b/C/test/twcshdr.c
index 11644a4..5957585 100644
--- a/C/test/twcshdr.c
+++ b/C/test/twcshdr.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: twcshdr.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: twcshdr.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * twcshdr illustrates the steps required to read WCS information (including
diff --git a/C/test/twcsmix.c b/C/test/twcsmix.c
index 290b227..85f6f4f 100644
--- a/C/test/twcsmix.c
+++ b/C/test/twcsmix.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: twcsmix.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: twcsmix.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * twcsmix tests wcsmix() for closure on the 1 degree celestial graticule for
diff --git a/C/test/twcssub.c b/C/test/twcssub.c
index 353d364..63454eb 100644
--- a/C/test/twcssub.c
+++ b/C/test/twcssub.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: twcssub.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: twcssub.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * twcssub tests wcssub() which extracts the coordinate description for a
diff --git a/C/test/twcstab.c b/C/test/twcstab.c
index 7b9060d..da2a149 100644
--- a/C/test/twcstab.c
+++ b/C/test/twcstab.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: twcstab.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: twcstab.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * twcstab tests wcstab() and also provides sample code for using it in
diff --git a/C/test/wcstab.keyrec b/C/test/wcstab.keyrec
index ced51ad..08f2674 100644
--- a/C/test/wcstab.keyrec
+++ b/C/test/wcstab.keyrec
@@ -28,7 +28,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility
 # http://www.atnf.csiro.au/~mcalabre/index.html
-# $Id: wcstab.keyrec,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+# $Id: wcstab.keyrec,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 #-----------------------------------------------------------------------------
 # List of FITS header keyrecords used by 'twcstab' to construct a FITS file
 # for testing wcstab() and fits_read_wcstab().  The coordinate arrays and
diff --git a/C/wcs.c b/C/wcs.c
index d1887f0..6f33ef5 100644
--- a/C/wcs.c
+++ b/C/wcs.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcs.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcs.c,v 4.8.1.2 2011/11/17 03:10:27 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <math.h>
@@ -1320,7 +1320,7 @@ int wcsprt(const struct wcsprm *wcs)
 
   WCSPRINTF_PTR("        err: ", wcs->err, "\n");
   if (wcs->err) {
-    wcserr_prt(wcs->err, "");
+    wcserr_prt(wcs->err, "             ");
   }
 
   wcsprintf("        lin: (see below)\n");
diff --git a/C/wcs.h b/C/wcs.h
index 23f5446..7164e14 100644
--- a/C/wcs.h
+++ b/C/wcs.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcs.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcs.h,v 4.8.1.2 2011/11/17 03:26:50 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement the FITS World Coordinate System
@@ -1217,7 +1217,8 @@
 * All members of this struct are to be set by the user.
 *
 *   int i
-*     (Given) Axis number (1-relative), as in the FITS PVi_ma keyword.
+*     (Given) Axis number (1-relative), as in the FITS PVi_ma keyword.  If
+*     i == 0, wcsset() will replace it with the latitude axis number.
 *
 *   int m
 *     (Given) Parameter number (non-negative), as in the FITS PVi_ma keyword.
diff --git a/C/wcsbth.l b/C/wcsbth.l
index dfb7540..3c297a6 100644
--- a/C/wcsbth.l
+++ b/C/wcsbth.l
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsbth.l,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcsbth.l,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * wcsbth.l is a Flex description file containing the definition of a lexical
diff --git a/C/wcserr.c b/C/wcserr.c
index 86755ee..618e78e 100644
--- a/C/wcserr.c
+++ b/C/wcserr.c
@@ -29,7 +29,7 @@
   Author: Mark Calabretta, Australia Telescope National Facility
   Module author: Michael Droettboom
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcserr.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcserr.c,v 4.8.1.2 2011/11/17 03:15:21 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdarg.h>
@@ -52,6 +52,50 @@ int wcserr_enable(int enable)
 
 /*--------------------------------------------------------------------------*/
 
+int wcserr_prt(
+  const struct wcserr *err,
+  const char *prefix)
+
+{
+  if (!wcserr_enabled) {
+    wcsprintf("Error messaging is not enabled, use wcserr_enable().\n");
+    return 2;
+  }
+
+  if (err == 0x0) {
+    return 0;
+  }
+
+  if (err->status) {
+    if (prefix == 0x0) prefix = "";
+
+    if (err->status > 0) {
+      wcsprintf("%sERROR %d in %s() at line %d of file %s:\n%s%s.\n",
+        prefix, err->status, err->function, err->line_no, err->file, prefix,
+        err->msg);
+    } else {
+      /* An informative message only. */
+      wcsprintf("%s%s.\n", prefix, err->msg);
+    }
+  }
+
+  return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+
+int wcserr_clear(
+  struct wcserr **err)
+
+{
+  if (*err) free(*err);
+  *err = 0x0;
+
+  return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+
 int wcserr_set(
   struct wcserr **err,
   int status,
@@ -112,29 +156,3 @@ int wcserr_copy(
 
   return src->status;
 }
-
-/*--------------------------------------------------------------------------*/
-
-int wcserr_prt(
-  const struct wcserr *err,
-  const char *prefix)
-
-{
-  if (!wcserr_enabled) {
-    wcsprintf("Error messaging is not enabled, use wcserr_enable().\n");
-    return 2;
-  }
-
-  if (err == 0x0) {
-    return 0;
-  }
-
-  if (err->status) {
-    if (prefix == 0x0) prefix = "";
-
-    wcsprintf("%sERROR %d in %s() at line %d of file %s:\n%s  %s.\n", prefix,
-      err->status, err->function, err->line_no, err->file, prefix, err->msg);
-  }
-
-  return 0;
-}
diff --git a/C/wcserr.h b/C/wcserr.h
index f09fa72..f148913 100644
--- a/C/wcserr.h
+++ b/C/wcserr.h
@@ -29,7 +29,7 @@
   Author: Mark Calabretta, Australia Telescope National Facility
   Module author: Michael Droettboom
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcserr.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcserr.h,v 4.8.1.2 2011/11/17 03:13:24 cal103 Exp cal103 $
 *=============================================================================
 *
 * Summary of the wcserr routines
@@ -43,10 +43,11 @@
 * For example:
 *
 =     struct prjprm prj;
+=     wcserr_enable(1);
 =     if (prjini(&prj)) {
 =       // Print the error message to stderr.
 =       wcsprintf_set(stderr);
-=       wcserr_prt(prj.err);
+=       wcserr_prt(prj.err, 0x0);
 =     }
 *
 * A number of utility functions used in managing the wcserr struct are for
@@ -117,6 +118,20 @@
 *                         2: Error messaging is not enabled.
 *
 *
+* wcserr_clear() - Clear a wcserr struct
+* --------------------------------------
+* wcserr_clear() clears the error (if any) contained in a wcserr struct.
+*
+* Given and returned:
+*   err       struct wcserr**
+*                       The error object.  If NULL, nothing is done.  Set to
+*                       NULL on return.
+*
+* Function return value:
+*             int       Status return value:
+*                         0: Success.
+*
+*
 * wcserr_set() - Fill in the contents of an error object
 * ------------------------------------------------------
 * INTERNAL USE ONLY.
@@ -178,7 +193,7 @@
 *
 * Given:
 *   src       const struct wcserr*
-*                       Source error object.  If src is NULL, returns 1.
+*                       Source error object.  If src is NULL, dst is cleared.
 *
 * Returned:
 *   dst       struct wcserr*
@@ -220,6 +235,8 @@ int wcserr_enable(int enable);
 
 int wcserr_prt(const struct wcserr *err, const char *prefix);
 
+int wcserr_clear(struct wcserr **err);
+
 
 /* INTERNAL USE ONLY -------------------------------------------------------*/
 
diff --git a/C/wcsfix.c b/C/wcsfix.c
index 65083e8..7d3871e 100644
--- a/C/wcsfix.c
+++ b/C/wcsfix.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsfix.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcsfix.c,v 4.8.1.2 2011/11/17 03:19:58 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <math.h>
@@ -111,58 +111,40 @@ int wcsfixi(int ctrl, const int naxis[], struct wcsprm *wcs, int stat[],
 
 {
   int status = 0;
-  struct wcserr *err;
 
-  err = info + CDFIX;
   if ((stat[CDFIX] = cdfix(wcs)) > 0) {
-    wcserr_copy(wcs->err, err);
     status = 1;
-  } else {
-    wcserr_copy(0x0, err);
   }
+  wcserr_copy(wcs->err, info+CDFIX);
 
-  err = info + DATFIX;
   if ((stat[DATFIX] = datfix(wcs)) > 0) {
-    wcserr_copy(wcs->err, err);
     status = 1;
-  } else {
-    wcserr_copy(0x0, err);
   }
+  wcserr_copy(wcs->err, info+DATFIX);
 
-  err = info + UNITFIX;
   if ((stat[UNITFIX] = unitfix(ctrl, wcs)) > 0) {
-    wcserr_copy(wcs->err, err);
     status = 1;
-  } else {
-    wcserr_copy(0x0, err);
   }
+  wcserr_copy(wcs->err, info+UNITFIX);
 
-  err = info + CELFIX;
   if ((stat[CELFIX] = celfix(wcs)) > 0) {
-    wcserr_copy(wcs->err, err);
     status = 1;
-  } else {
-    wcserr_copy(0x0, err);
   }
+  wcserr_copy(wcs->err, info+CELFIX);
 
-  err = info + SPCFIX;
   if ((stat[SPCFIX] = spcfix(wcs)) > 0) {
-    wcserr_copy(wcs->err, err);
     status = 1;
-  } else {
-    wcserr_copy(0x0, err);
   }
+  wcserr_copy(wcs->err, info+SPCFIX);
 
-  err = info + CYLFIX;
-  wcserr_copy(0x0, err);
   if (naxis) {
     if ((stat[CYLFIX] = cylfix(naxis, wcs)) > 0) {
-      err = info + CYLFIX;
-      wcserr_copy(wcs->err, err);
       status = 1;
     }
+    wcserr_copy(wcs->err, info+CYLFIX);
   } else {
     stat[CYLFIX] = -2;
+    wcserr_copy(0x0, info+CYLFIX);
   }
 
   if (wcs->err) free(wcs->err);
@@ -378,16 +360,32 @@ int datfix(struct wcsprm *wcs)
 int unitfix(int ctrl, struct wcsprm *wcs)
 
 {
-  int  i, status = FIXERR_NO_CHANGE;
+  int  i, k, status = FIXERR_NO_CHANGE;
+  char orig_unit[80], msg[WCSERR_MSG_LENGTH];
+  const char *function = "unitfix";
+  struct wcserr **err;
 
   if (wcs == 0x0) return FIXERR_NULL_POINTER;
+  err = &(wcs->err);
 
+  strcpy(msg, "Translated units: ");
   for (i = 0; i < wcs->naxis; i++) {
+    strncpy(orig_unit, wcs->cunit[i], 80);
     if (wcsutrne(ctrl, wcs->cunit[i], &(wcs->err)) == 0) {
-      status = FIXERR_SUCCESS;
+      k = strlen(msg);
+      sprintf(msg+k, "'%s' -> '%s', ", orig_unit, wcs->cunit[i]);
+      status = FIXERR_UNITS_ALIAS;
     }
   }
 
+  if (status == FIXERR_UNITS_ALIAS) {
+    k = strlen(msg) - 2;
+    msg[k] = '\0';
+    wcserr_set(WCSERR_SET(FIXERR_UNITS_ALIAS), msg);
+
+    status = FIXERR_SUCCESS;
+  }
+
   return status;
 }
 
@@ -552,7 +550,7 @@ int spcfix(struct wcsprm *wcs)
   wcsutil_null_fill(72, wcs->ctype[i]);
   wcsutil_null_fill(72, wcs->specsys);
 
-  return 0;
+  return FIXERR_SUCCESS;
 }
 
 /*--------------------------------------------------------------------------*/
diff --git a/C/wcsfix.h b/C/wcsfix.h
index d346a41..096c614 100644
--- a/C/wcsfix.h
+++ b/C/wcsfix.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsfix.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcsfix.h,v 4.8.1.2 2011/11/17 03:23:16 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement the FITS World Coordinate System
@@ -221,9 +221,13 @@
 * Function return value:
 *             int       Status return value:
 *                        -1: No change required (not an error).
-*                         0: Success.
+*                         0: Success (an alias was applied).
 *                         1: Null wcsprm pointer passed.
 *
+*                       When units are translated (i.e. status 0), status -2
+*                       is set in the wcserr struct to allow an informative
+*                       message to be returned.
+*
 *
 * celfix() - Translate AIPS-convention celestial projection types
 * ---------------------------------------------------------------
@@ -349,6 +353,7 @@ extern const char *wcsfix_errmsg[];
 #define cylfix_errmsg wcsfix_errmsg
 
 enum wcsfix_errmsg_enum {
+  FIXERR_UNITS_ALIAS      = -2,	/* Units alias translation. */
   FIXERR_NO_CHANGE        = -1,	/* No change. */
   FIXERR_SUCCESS          =  0,	/* Success. */
   FIXERR_NULL_POINTER     =  1,	/* Null wcsprm pointer passed. */
diff --git a/C/wcshdr.c b/C/wcshdr.c
index 5925b5b..31b3032 100644
--- a/C/wcshdr.c
+++ b/C/wcshdr.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcshdr.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcshdr.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <ctype.h>
diff --git a/C/wcshdr.h b/C/wcshdr.h
index 8d242cb..78885a6 100644
--- a/C/wcshdr.h
+++ b/C/wcshdr.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcshdr.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcshdr.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement the FITS World Coordinate System
diff --git a/C/wcslib.h b/C/wcslib.h
index 10dc1d4..19d3dd3 100644
--- a/C/wcslib.h
+++ b/C/wcslib.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcslib.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcslib.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement the FITS World Coordinate System
diff --git a/C/wcsmath.h b/C/wcsmath.h
index 6db25c7..911b6b9 100644
--- a/C/wcsmath.h
+++ b/C/wcsmath.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsmath.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcsmath.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * Summary of wcsmath.h
diff --git a/C/wcspih.l b/C/wcspih.l
index 7d838ae..1aab01f 100644
--- a/C/wcspih.l
+++ b/C/wcspih.l
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcspih.l,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcspih.l,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * wcspih.l is a Flex description file containing the definition of a lexical
diff --git a/C/wcsprintf.c b/C/wcsprintf.c
index ee22bc1..13ecca2 100644
--- a/C/wcsprintf.c
+++ b/C/wcsprintf.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsprintf.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcsprintf.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdarg.h>
diff --git a/C/wcsprintf.h b/C/wcsprintf.h
index bfa9d2e..58d2889 100644
--- a/C/wcsprintf.h
+++ b/C/wcsprintf.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsprintf.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcsprintf.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement the FITS World Coordinate System
diff --git a/C/wcstrig.c b/C/wcstrig.c
index 101ab25..734e15c 100644
--- a/C/wcstrig.c
+++ b/C/wcstrig.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcstrig.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcstrig.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/wcstrig.h b/C/wcstrig.h
index fa2fe80..7474205 100644
--- a/C/wcstrig.h
+++ b/C/wcstrig.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcstrig.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcstrig.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * Summary of the wcstrig routines
diff --git a/C/wcsulex.l b/C/wcsulex.l
index 556a382..f3b9a74 100644
--- a/C/wcsulex.l
+++ b/C/wcsulex.l
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsulex.l,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcsulex.l,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * wcsulex.l is a Flex description file containing the definition of a
diff --git a/C/wcsunits.c b/C/wcsunits.c
index 880f55b..012b742 100644
--- a/C/wcsunits.c
+++ b/C/wcsunits.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsunits.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcsunits.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/wcsunits.h b/C/wcsunits.h
index 0110aad..85f30fd 100644
--- a/C/wcsunits.h
+++ b/C/wcsunits.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsunits.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcsunits.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * WCSLIB 4.8 - C routines that implement the FITS World Coordinate System
diff --git a/C/wcsutil.c b/C/wcsutil.c
index 053c818..371d72b 100644
--- a/C/wcsutil.c
+++ b/C/wcsutil.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsutil.c,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcsutil.c,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/C/wcsutil.h b/C/wcsutil.h
index b2296a5..b2fed00 100644
--- a/C/wcsutil.h
+++ b/C/wcsutil.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsutil.h,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcsutil.h,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * Summary of the wcsutil routines
diff --git a/C/wcsutrn.l b/C/wcsutrn.l
index 3789fa2..a8ac11f 100644
--- a/C/wcsutrn.l
+++ b/C/wcsutrn.l
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsutrn.l,v 4.8 2011/08/15 08:05:53 cal103 Exp $
+  $Id: wcsutrn.l,v 4.8.1.1 2011/08/15 08:07:06 cal103 Exp cal103 $
 *=============================================================================
 *
 * wcsutrn.l is a Flex description file containing the definition of a lexical
diff --git a/CHANGES b/CHANGES
index d3a9764..72f9c1d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,13 +1,61 @@
+WCSLIB version 4.8.3 (2011/11/17)
+---------------------------------
+
+* C library
+
+  - Minor generalization of the wcserr diagnostics to allow the return
+    of informative messages which are associated with negative status
+    values.  wcserr_prt() will now recognize and print them as such.
+    Added wcserr_clear() to reset (clear) a wcserr struct.
+
+    Modified unitfix() to return an informative message if a units
+    alias is applied, and wcsfixi() to allow such messages to be
+    propagated through the info array (from Michael Droettboom).
+
+    Modified twcsfix.c to use wcserr diagnostics, in particular to
+    report units alias translations.
+
+* Fortran wrappers
+
+  - In wcsfix_(), interpret *naxis == 0 as meaning naxis == 0x0, thus
+    causing cylfix() to be skipped.
+
+  - Modified twcsfix.f to reflect changes made to twcsfix.c.
+
+
+WCSLIB version 4.8.2 (2011/10/04)
+---------------------------------
+
+* Installation
+
+  - Changes for Debian package generation contributed by Ole Streicher:
+    - Corrections to 'configure' reported by 'lintian'.
+    - Generate man pages for the utility programs and install them.
+
+
+WCSLIB version 4.8.1 (2011/09/19)
+---------------------------------
+
+* Installation
+
+  - Set SONAME in the sharable library in accordance with
+    tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
+    (reported by Ole Streicher, Debian package maintainer).  The
+    sharable library will again be installed with full release number
+    and with a symbolic link from SONAME pointing to it.  If defined,
+    SHRLN will point to SONAME.
+
+
 WCSLIB version 4.8 (2011/08/15)
 -------------------------------
 
 * C library
 
-  - New error diagnostics mechanism contributed by Michael Droetboom:
+  - New error diagnostics mechanism contributed by Michael Droettboom:
 
     Most functions that return a numeric status (error) code now also
-    fill in a detailed error message to a wcserr struct attached to
-    the passed-in *prm struct.  See wcserr.h for more information.
+    write a detailed error message to a wcserr struct attached to the
+    passed-in *prm struct.  See wcserr.h for more information.
 
     Functions that didn't have a *prm struct as an argument have no
     direct way to return an error message.  Therefore, these functions
@@ -1761,4 +1809,4 @@ WCSLIB version 1.0 (1995/01/31)
   Initial release.
 
 ------------------------------------------------------------------------
-$Id: CHANGES,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+$Id: CHANGES,v 4.8.1.4 2011/11/17 05:32:10 cal103 Exp cal103 $
diff --git a/Fortran/GNUmakefile b/Fortran/GNUmakefile
index 0be2dc9..531c4d6 100644
--- a/Fortran/GNUmakefile
+++ b/Fortran/GNUmakefile
@@ -34,7 +34,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility
 # http://www.atnf.csiro.au/~mcalabre/index.html
-# $Id: GNUmakefile,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+# $Id: GNUmakefile,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 #-----------------------------------------------------------------------------
 # Get configure settings.
 include ../makedefs
diff --git a/Fortran/cel.inc b/Fortran/cel.inc
index 67c64b4..3e15bf6 100644
--- a/Fortran/cel.inc
+++ b/Fortran/cel.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: cel.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: cel.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/cel_data.f b/Fortran/cel_data.f
index 6578878..ed0aae6 100644
--- a/Fortran/cel_data.f
+++ b/Fortran/cel_data.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: cel_data.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: cel_data.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       BLOCK DATA CEL_BLOCK_DATA
diff --git a/Fortran/cel_f.c b/Fortran/cel_f.c
index 5c7066d..25381f9 100644
--- a/Fortran/cel_f.c
+++ b/Fortran/cel_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: cel_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: cel_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/fitshdr.inc b/Fortran/fitshdr.inc
index 7b44106..9d42243 100644
--- a/Fortran/fitshdr.inc
+++ b/Fortran/fitshdr.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: fitshdr.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: fitshdr.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/fitshdr_data.f b/Fortran/fitshdr_data.f
index fa4cc2c..a79b5a4 100644
--- a/Fortran/fitshdr_data.f
+++ b/Fortran/fitshdr_data.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: fitshdr_data.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: fitshdr_data.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       BLOCK DATA FITSHDR_BLOCK_DATA
diff --git a/Fortran/fitshdr_f.c b/Fortran/fitshdr_f.c
index 19b58a7..ff238da 100644
--- a/Fortran/fitshdr_f.c
+++ b/Fortran/fitshdr_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: fitshdr_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: fitshdr_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/getwcstab.inc b/Fortran/getwcstab.inc
index 97e6543..6e7c99f 100644
--- a/Fortran/getwcstab.inc
+++ b/Fortran/getwcstab.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: getwcstab.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: getwcstab.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/getwcstab_f.c b/Fortran/getwcstab_f.c
index 2273e88..1aaacf7 100644
--- a/Fortran/getwcstab_f.c
+++ b/Fortran/getwcstab_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: getwcstab_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: getwcstab_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <getwcstab.h>
diff --git a/Fortran/lin.inc b/Fortran/lin.inc
index ea76bc2..3eba808 100644
--- a/Fortran/lin.inc
+++ b/Fortran/lin.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: lin.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: lin.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/lin_data.f b/Fortran/lin_data.f
index 011bb65..6db9097 100644
--- a/Fortran/lin_data.f
+++ b/Fortran/lin_data.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: lin_data.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: lin_data.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       BLOCK DATA LIN_BLOCK_DATA
diff --git a/Fortran/lin_f.c b/Fortran/lin_f.c
index 967b744..b93e7a9 100644
--- a/Fortran/lin_f.c
+++ b/Fortran/lin_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: lin_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: lin_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/log.inc b/Fortran/log.inc
index 0f4b9c3..e5af92f 100644
--- a/Fortran/log.inc
+++ b/Fortran/log.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: log.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: log.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/log_data.f b/Fortran/log_data.f
index 1e60323..a89a786 100644
--- a/Fortran/log_data.f
+++ b/Fortran/log_data.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: log_data.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: log_data.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       BLOCK DATA LOG_BLOCK_DATA
diff --git a/Fortran/log_f.c b/Fortran/log_f.c
index b83fcf4..111f279 100644
--- a/Fortran/log_f.c
+++ b/Fortran/log_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: log_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: log_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <log.h>
diff --git a/Fortran/prj.inc b/Fortran/prj.inc
index 9c62a40..40d12d6 100644
--- a/Fortran/prj.inc
+++ b/Fortran/prj.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: prj.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: prj.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/prj_data.f b/Fortran/prj_data.f
index 55a1810..eee1e72 100644
--- a/Fortran/prj_data.f
+++ b/Fortran/prj_data.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: prj_data.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: prj_data.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       BLOCK DATA PRJ_BLOCK_DATA
diff --git a/Fortran/prj_f.c b/Fortran/prj_f.c
index 753e902..393d448 100644
--- a/Fortran/prj_f.c
+++ b/Fortran/prj_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: prj_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: prj_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/spc.inc b/Fortran/spc.inc
index cbc9e23..4f19d65 100644
--- a/Fortran/spc.inc
+++ b/Fortran/spc.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: spc.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: spc.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/spc_data.f b/Fortran/spc_data.f
index 83d0bff..84c954c 100644
--- a/Fortran/spc_data.f
+++ b/Fortran/spc_data.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: spc_data.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: spc_data.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       BLOCK DATA SPC_BLOCK_DATA
diff --git a/Fortran/spc_f.c b/Fortran/spc_f.c
index b0491a8..219bc29 100644
--- a/Fortran/spc_f.c
+++ b/Fortran/spc_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: spc_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: spc_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/sph.inc b/Fortran/sph.inc
index c286966..eced8af 100644
--- a/Fortran/sph.inc
+++ b/Fortran/sph.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: sph.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: sph.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/sph_f.c b/Fortran/sph_f.c
index 66a0b83..22b70d6 100644
--- a/Fortran/sph_f.c
+++ b/Fortran/sph_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: sph_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: sph_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <sph.h>
diff --git a/Fortran/spx.inc b/Fortran/spx.inc
index b12ebd3..3e48902 100644
--- a/Fortran/spx.inc
+++ b/Fortran/spx.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: spx.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: spx.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/spx_data.f b/Fortran/spx_data.f
index 20615c3..9345585 100644
--- a/Fortran/spx_data.f
+++ b/Fortran/spx_data.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: spx_data.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: spx_data.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       BLOCK DATA SPX_BLOCK_DATA
diff --git a/Fortran/spx_f.c b/Fortran/spx_f.c
index 8cf2f88..9049070 100644
--- a/Fortran/spx_f.c
+++ b/Fortran/spx_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: spx_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: spx_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <string.h>
diff --git a/Fortran/tab.inc b/Fortran/tab.inc
index b7f6ba2..bcadba8 100644
--- a/Fortran/tab.inc
+++ b/Fortran/tab.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tab.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tab.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/tab_data.f b/Fortran/tab_data.f
index c74564b..55d3e6d 100644
--- a/Fortran/tab_data.f
+++ b/Fortran/tab_data.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tab_data.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tab_data.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       BLOCK DATA TAB_BLOCK_DATA
diff --git a/Fortran/tab_f.c b/Fortran/tab_f.c
index 2e9fec5..d4591ca 100644
--- a/Fortran/tab_f.c
+++ b/Fortran/tab_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: tab_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: tab_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/test/tcel1.f b/Fortran/test/tcel1.f
index a736b31..ee5e5f6 100644
--- a/Fortran/test/tcel1.f
+++ b/Fortran/test/tcel1.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tcel1.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tcel1.f,v 4.8.1.2 2011/08/16 01:34:41 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TCEL1
@@ -46,6 +46,9 @@
      :          X(361), Y(361)
       CHARACTER TEXT*72
 
+*     On some systems, such as Sun Sparc, the structs MUST be aligned
+*     on a double precision boundary, done here using a equivalences.
+*     Failure to do this may result in mysterious "bus errors".
       INCLUDE 'cel.inc'
       INCLUDE 'prj.inc'
       INTEGER   CEL(CELLEN)
diff --git a/Fortran/test/tfitshdr.f b/Fortran/test/tfitshdr.f
index cd9f289..f68bb8b 100644
--- a/Fortran/test/tfitshdr.f
+++ b/Fortran/test/tfitshdr.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tfitshdr.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tfitshdr.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TFITSHDR
diff --git a/Fortran/test/tlin.f b/Fortran/test/tlin.f
index af4139a..573dc1a 100644
--- a/Fortran/test/tlin.f
+++ b/Fortran/test/tlin.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tlin.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tlin.f,v 4.8.1.2 2011/08/16 01:34:41 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TLIN
@@ -37,8 +37,6 @@
 * TLIN tests the linear transformation routines supplied with WCSLIB.
 *
 *-----------------------------------------------------------------------
-      INCLUDE 'lin.inc'
-
       DOUBLE PRECISION TOL
       PARAMETER (TOL = 1D-13)
 
@@ -50,7 +48,11 @@
      :          PC(NAXIS,NAXIS), PIX0(NELEM,2), PIX(NELEM,2), RESID,
      :          RESIDMAX
 
-      INTEGER LIN(LINLEN)
+*     On some systems, such as Sun Sparc, the struct MUST be aligned
+*     on a double precision boundary, done here using an equivalence.
+*     Failure to do this may result in mysterious "bus errors".
+      INCLUDE 'lin.inc'
+      INTEGER   LIN(LINLEN)
       DOUBLE PRECISION DUMMY
       EQUIVALENCE (LIN,DUMMY)
 
diff --git a/Fortran/test/tlog.f b/Fortran/test/tlog.f
index 2a59bfd..7fbc199 100644
--- a/Fortran/test/tlog.f
+++ b/Fortran/test/tlog.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tlog.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tlog.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TLOG
diff --git a/Fortran/test/tpih1.f b/Fortran/test/tpih1.f
index 4648b55..9f95179 100644
--- a/Fortran/test/tpih1.f
+++ b/Fortran/test/tpih1.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tpih1.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tpih1.f,v 4.8.1.2 2011/08/16 01:34:41 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TPIH1
@@ -49,10 +49,13 @@
      :          RELAX, WCSP(2)
       CHARACTER CALTS(0:26)*2, KEYREC*80, HEADER*288001, INFILE*9
 
+*     On some systems, such as Sun Sparc, the struct MUST be aligned
+*     on a double precision boundary, done here using an equivalence.
+*     Failure to do this may result in mysterious "bus errors".
       INCLUDE 'wcshdr.inc'
       INCLUDE 'wcs.inc'
       INCLUDE 'wcsfix.inc'
-      INTEGER WCS(WCSLEN), STAT(WCSFIX_NWCS)
+      INTEGER   WCS(WCSLEN), STAT(WCSFIX_NWCS)
       DOUBLE PRECISION DUMMY
       EQUIVALENCE (WCS,DUMMY)
 
diff --git a/Fortran/test/tpih2.f b/Fortran/test/tpih2.f
index 6a78fcb..d83a451 100644
--- a/Fortran/test/tpih2.f
+++ b/Fortran/test/tpih2.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tpih2.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tpih2.f,v 4.8.1.2 2011/08/16 01:34:41 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TPIH2
@@ -52,9 +52,12 @@
       CHARACTER KEYREC*80, DEVTYP*16, HEADER*28801, IDENTS(3)*80,
      :          INFILE*9, NLCPRM(1)*1, OPT(2)*1, WCSNAME*72
 
+*     On some systems, such as Sun Sparc, the struct MUST be aligned
+*     on a double precision boundary, done here using an equivalence.
+*     Failure to do this may result in mysterious "bus errors".
       INCLUDE 'wcshdr.inc'
       INCLUDE 'wcs.inc'
-      INTEGER WCS(WCSLEN)
+      INTEGER   WCS(WCSLEN)
       DOUBLE PRECISION DUMMY
       EQUIVALENCE (WCS,DUMMY)
 
diff --git a/Fortran/test/tprj1.f b/Fortran/test/tprj1.f
index 8a7dd0b..558e8a6 100644
--- a/Fortran/test/tprj1.f
+++ b/Fortran/test/tprj1.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tprj1.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tprj1.f,v 4.8.1.2 2011/08/16 01:34:41 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TPRJ1
@@ -217,6 +217,9 @@
      :          TOL, X(361), X1(361), X2(361), Y(361), Y1(361), Y2(361)
       CHARACTER PCODE*3
 
+*     On some systems, such as Sun Sparc, the struct MUST be aligned
+*     on a double precision boundary, done here using an equivalence.
+*     Failure to do this may result in mysterious "bus errors".
       INCLUDE 'prj.inc'
       INTEGER   PRJ(PRJLEN)
       DOUBLE PRECISION DUMMY
diff --git a/Fortran/test/tprj2.f b/Fortran/test/tprj2.f
index 5736908..71db0e3 100644
--- a/Fortran/test/tprj2.f
+++ b/Fortran/test/tprj2.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tprj2.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tprj2.f,v 4.8.1.2 2011/08/16 01:34:41 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TPRJ2
@@ -234,6 +234,9 @@
      :          Y0
       CHARACTER PCODE*3
 
+*     On some systems, such as Sun Sparc, the struct MUST be aligned
+*     on a double precision boundary, done here using an equivalence.
+*     Failure to do this may result in mysterious "bus errors".
       INCLUDE 'prj.inc'
       INTEGER   PRJ(PRJLEN)
       DOUBLE PRECISION DUMMY
diff --git a/Fortran/test/tspc.f b/Fortran/test/tspc.f
index 88217ba..6fa477c 100644
--- a/Fortran/test/tspc.f
+++ b/Fortran/test/tspc.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tspc.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tspc.f,v 4.8.1.2 2011/08/16 01:34:41 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TSPC
@@ -261,6 +261,9 @@
       CHARACTER CTYPES*8, PTYPE, SCODE*3, SNAME*21, STYPE*4, TITLE*80,
      :          UNITS*7, XTYPE, YLAB*80
 
+*     On some systems, such as Sun Sparc, the struct MUST be aligned
+*     on a double precision boundary, done here using an equivalence.
+*     Failure to do this may result in mysterious "bus errors".
       INCLUDE 'spx.inc'
       INCLUDE 'spc.inc'
       INTEGER   SPC(SPCLEN)
diff --git a/Fortran/test/tsph.f b/Fortran/test/tsph.f
index 6d9ea02..0371757 100644
--- a/Fortran/test/tsph.f
+++ b/Fortran/test/tsph.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tsph.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tsph.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TSPH
diff --git a/Fortran/test/tspx.f b/Fortran/test/tspx.f
index ed4418e..d9bbf7c 100644
--- a/Fortran/test/tspx.f
+++ b/Fortran/test/tspx.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tspx.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tspx.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TSPX
diff --git a/Fortran/test/ttab1.f b/Fortran/test/ttab1.f
index 0133efa..6826a69 100644
--- a/Fortran/test/ttab1.f
+++ b/Fortran/test/ttab1.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: ttab1.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: ttab1.f,v 4.8.1.2 2011/08/16 01:34:41 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TTAB1
@@ -56,6 +56,9 @@
      :          WORLD(M,11,11), XT0(12), XT1(12), X0(M,11,11),
      :          X1(M,11,11), Z
 
+*     On some systems, such as Sun Sparc, the struct MUST be aligned
+*     on a double precision boundary, done here using an equivalence.
+*     Failure to do this may result in mysterious "bus errors".
       INCLUDE 'tab.inc'
       INTEGER   TAB(TABLEN)
       DOUBLE PRECISION DUMMY
diff --git a/Fortran/test/ttab2.f b/Fortran/test/ttab2.f
index 425055f..8597d93 100644
--- a/Fortran/test/ttab2.f
+++ b/Fortran/test/ttab2.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: ttab2.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: ttab2.f,v 4.8.1.2 2011/08/16 01:34:41 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TTAB2
@@ -62,6 +62,9 @@
       DOUBLE PRECISION X(M,NP,NP), WORLD(M,NP,NP)
       CHARACTER TEXT*80
 
+*     On some systems, such as Sun Sparc, the struct MUST be aligned
+*     on a double precision boundary, done here using an equivalence.
+*     Failure to do this may result in mysterious "bus errors".
       INCLUDE 'tab.inc'
       INTEGER   TAB(TABLEN)
       DOUBLE PRECISION DUMMY
diff --git a/Fortran/test/ttab3.f b/Fortran/test/ttab3.f
index 077d40b..8bbf129 100644
--- a/Fortran/test/ttab3.f
+++ b/Fortran/test/ttab3.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: ttab3.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: ttab3.f,v 4.8.1.2 2011/08/16 01:34:41 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TTAB3
@@ -55,6 +55,9 @@
       DOUBLE PRECISION COORD(M,K1,K2), WORLD(M,361), X(K1), XY(M,361),
      :          Y(K2)
 
+*     On some systems, such as Sun Sparc, the structs MUST be aligned
+*     on a double precision boundary, done here using equivalences.
+*     Failure to do this may result in mysterious "bus errors".
       INCLUDE 'prj.inc'
       INCLUDE 'tab.inc'
       INTEGER   PRJ(PRJLEN), TAB(TABLEN)
diff --git a/Fortran/test/tunits.f b/Fortran/test/tunits.f
index 51f4aff..c6a740e 100644
--- a/Fortran/test/tunits.f
+++ b/Fortran/test/tunits.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: tunits.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: tunits.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TUNITS
diff --git a/Fortran/test/twcs.f b/Fortran/test/twcs.f
index 3d40a19..2205521 100644
--- a/Fortran/test/twcs.f
+++ b/Fortran/test/twcs.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: twcs.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: twcs.f,v 4.8.1.2 2011/08/16 01:43:12 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TWCS
@@ -53,12 +53,17 @@
 
       INTEGER   CHECK_ERROR, ETEST, I, J, K, LAT, LATIDX, LNG, LNGIDX,
      :          NFAIL1, NFAIL2, SPCIDX, STAT(0:360), STATUS,
-     :          TEST_ERRORS, WCS(WCSLEN)
-      DOUBLE PRECISION DUMMY, FREQ, IMG(NELEM,0:360), LAT1, LNG1,
-     :          PHI(0:360), PIXEL1(NELEM,0:360), PIXEL2(NELEM,0:360), R,
-     :          RESID, RESMAX, THETA(0:360), TIME, WORLD1(NELEM,0:360),
+     :          TEST_ERRORS
+      DOUBLE PRECISION FREQ, IMG(NELEM,0:360), LAT1, LNG1, PHI(0:360),
+     :          PIXEL1(NELEM,0:360), PIXEL2(NELEM,0:360), R, RESID,
+     :          RESMAX, THETA(0:360), TIME, WORLD1(NELEM,0:360),
      :          WORLD2(NELEM,0:360)
 
+*     On some systems, such as Sun Sparc, the struct MUST be aligned
+*     on a double precision boundary, done here using an equivalence.
+*     Failure to do this may result in mysterious "bus errors".
+      INTEGER   WCS(WCSLEN)
+      DOUBLE PRECISION DUMMY
       EQUIVALENCE (WCS,DUMMY)
 
 *     Number of axes.
@@ -320,9 +325,15 @@
 *-----------------------------------------------------------------------
       INTEGER FUNCTION TEST_ERRORS()
 *-----------------------------------------------------------------------
-      INCLUDE 'wcs.inc'
+      INTEGER   CHECK_ERROR, ETEST, NFAIL, STATUS
 
-      INTEGER   CHECK_ERROR, ETEST, NFAIL, STATUS, WCS(WCSLEN)
+*     On some systems, such as Sun Sparc, the struct MUST be aligned
+*     on a double precision boundary, done here using an equivalence.
+*     Failure to do this may result in mysterious "bus errors".
+      INCLUDE 'wcs.inc'
+      INTEGER   WCS(WCSLEN)
+      DOUBLE PRECISION DUMMY
+      EQUIVALENCE (WCS,DUMMY)
 
       COMMON /ERRTST/ ETEST
 *-----------------------------------------------------------------------
@@ -376,10 +387,17 @@
       INCLUDE 'wcs.inc'
       INCLUDE 'wcserr.inc'
 
-      INTEGER   EXSTATUS, ILEN, ISTAT, ETEST, STATUS, WCS(WCSLEN),
-     :          WCSERR(ERRLEN)
+      INTEGER   EXSTATUS, ILEN, ISTAT, ETEST, STATUS, WCS(WCSLEN)
       CHARACTER ERRMSG*(WCSERR_MSG_LENGTH), EXMSG*(*)
 
+*     On some systems, such as Sun Sparc, the structs MUST be aligned
+*     on a double precision boundary.  As a dummy argument, WCS should
+*     already be aligned.  WCSERR is aligned here using an equivalence.
+*     Failure to do this may result in mysterious "bus errors".
+      INTEGER   WCSERR(ERRLEN)
+      DOUBLE PRECISION DUMMY
+      EQUIVALENCE (WCSERR,DUMMY)
+
       COMMON /ERRTST/ ETEST
 *-----------------------------------------------------------------------
       IF (STATUS.NE.0) THEN
diff --git a/Fortran/test/twcsfix.f b/Fortran/test/twcsfix.f
index 4708e5d..01259da 100644
--- a/Fortran/test/twcsfix.f
+++ b/Fortran/test/twcsfix.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: twcsfix.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: twcsfix.f,v 4.8.1.3 2011/11/17 05:02:54 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TWCSFIX
@@ -59,6 +59,17 @@
       COMMON /HEADER/ CRPIX, PC, CDELT, CRVAL, RESTFRQ, RESTWAV, NAXIS
       COMMON /HEADCH/ CTYPE, CUNIT, DATEOBS
 
+*     On some systems, such as Sun Sparc, the struct MUST be aligned
+*     on a double precision boundary, done here using an equivalence.
+*     Failure to do this may result in mysterious "bus errors".
+      INCLUDE 'wcs.inc'
+      INCLUDE 'wcsfix.inc'
+      INTEGER   STAT(WCSFIX_NWCS), STATUS
+      CHARACTER CTYPES*8
+      INTEGER   WCS(WCSLEN)
+      DOUBLE PRECISION DUMMY
+      EQUIVALENCE (WCS,DUMMY)
+
       DATA NAXIS   /N/
       DATA (CRPIX(J), J=1,N)
      :             /90D0,   90D0,   1D0/
@@ -79,14 +90,6 @@
 
 *     N.B. non-standard, corresponding to MJD 35884.04861111
       DATA DATEOBS /'1957/02/15 01:10:00'/
-
-      INCLUDE 'wcs.inc'
-      INCLUDE 'wcsfix.inc'
-      INTEGER   STAT(WCSFIX_NWCS), STATUS
-      CHARACTER CTYPES*8
-      INTEGER   WCS(WCSLEN)
-      DOUBLE PRECISION DUMMY
-      EQUIVALENCE (WCS,DUMMY)
 *-----------------------------------------------------------------------
       WRITE (*, 10)
  10   FORMAT ('Testing WCSLIB translator for non-standard usage ',
@@ -98,39 +101,44 @@
       STATUS = WCSPUT (WCS, WCS_FLAG, -1, 0, 0)
       CALL PARSER (WCS)
 
-*     Print the unmodified struct.
-      CALL FLUSH(6)
-      STATUS = WCSPRT (WCS)
-      WRITE (*, 20)
- 20   FORMAT (/,'------------------------------------',
-     :          '------------------------------------')
-
 *     Fix non-standard WCS keyvalues.
       STATUS = WCSFIX (7, 0, WCS, STAT)
+      WRITE (*, 20) (STAT(I), I=1,WCSFIX_NWCS)
+ 20   FORMAT ('WCSFIX status returns: (',I2,5(',',I2),')',/)
+
       IF (STATUS.NE.0) THEN
-        WRITE (*, 30) (STAT(I), I=1,WCSFIX_NWCS)
- 30     FORMAT ('WCSFIX ERROR, status returns: (',(I2,:,','),')')
+        WRITE (*, 30) STATUS
+ 30     FORMAT ('WCSFIX ERROR',I2,'.')
         GO TO 999
       END IF
 
+*     Extract information from the FITS header.
+      STATUS = WCSSET (WCS)
+      IF (STATUS.NE.0) THEN
+        WRITE (*, 40) STATUS
+ 40     FORMAT (/,'WCSSET ERROR',I2,'.')
+      END IF
+
       CALL FLUSH(6)
       STATUS = WCSPRT (WCS)
-      WRITE (*, 20)
+      WRITE (*, 50)
+ 50   FORMAT (/,'------------------------------------',
+     :          '------------------------------------')
 
 *     Should now have a 'VOPT-F2W' axis, translate it to frequency.
       CTYPES = 'FREQ-???'
       I = -1
       STATUS = WCSSPTR (WCS, I, CTYPES)
       IF (STATUS.NE.0) THEN
-        WRITE (*, 40) STATUS
- 40     FORMAT ('WCSPTR ERROR',I2,'.')
+        WRITE (*, 60) STATUS
+ 60     FORMAT ('WCSPTR ERROR',I2,'.')
         GO TO 999
       END IF
 
       STATUS = WCSSET (WCS)
       IF (STATUS.NE.0) THEN
-        WRITE (*, 50) STATUS
- 50     FORMAT ('WCSSET ERROR',I2,'.')
+        WRITE (*, 70) STATUS
+ 70     FORMAT ('WCSSET ERROR',I2,'.')
         GO TO 999
       END IF
 
@@ -180,11 +188,7 @@
  10     CONTINUE
 
         STATUS = WCSPUT (WCS, WCS_CDELT, CDELT(I), I, 0)
-
-*       Translate non-standard units specifications.
-        STATUS = WCSUTRN (7, CUNIT(I))
         STATUS = WCSPUT (WCS, WCS_CUNIT, CUNIT(I), I, 0)
-
         STATUS = WCSPUT (WCS, WCS_CTYPE, CTYPE(I), I, 0)
         STATUS = WCSPUT (WCS, WCS_CRVAL, CRVAL(I), I, 0)
  20   CONTINUE
@@ -197,12 +201,5 @@
 
       STATUS = WCSPUT (WCS, WCS_DATEOBS, DATEOBS, 0, 0)
 
-*     Extract information from the FITS header.
-      STATUS = WCSSET (WCS)
-      IF (STATUS.NE.0) THEN
-        WRITE (*, 30) STATUS
- 30     FORMAT (/,'WCSSET ERROR',I3,'.')
-      END IF
-
       RETURN
       END
diff --git a/Fortran/test/twcsfix.out b/Fortran/test/twcsfix.out
index 5928d35..efbcfa7 100644
--- a/Fortran/test/twcsfix.out
+++ b/Fortran/test/twcsfix.out
@@ -1,184 +1,8 @@
 Testing WCSLIB translator for non-standard usage (twcsfix.f)
 ------------------------------------------------------------
 
-       flag: 137
-      naxis: 3
-      crpix: 0x<address>
-               90           90           1         
-         pc: 0x<address>
-    pc[0][]:   1            0            0         
-    pc[1][]:   0            1            0         
-    pc[2][]:   0            0            1         
-      cdelt: 0x<address>
-              -0.00027778   0.00027778   19687     
-      crval: 0x<address>
-               265.62      -28.988       5.5693e+06
-      cunit: 0x<address>
-             "deg"
-             "deg"
-             "m/s"
-      ctype: 0x<address>
-             "RA---NCP"
-             "DEC--NCP"
-             "VOPT-F2W"
-    lonpole: 180.000000
-    latpole: -28.988500
-    restfrq: 1420405750.000000
-    restwav: 0.000000
-        npv: 1
-     npvmax: 2
-         pv: 0x<address>
-              -1  -1  -1         
-        nps: 0
-     npsmax: 8
-         ps: 0x<address>
-         cd: 0x<address>
-    cd[0][]:   0            0            0         
-    cd[1][]:   0            0            0         
-    cd[2][]:   0            0            0         
-      crota: 0x<address>
-               0            0            0         
-     altlin: 0
-     velref: 0
-        alt: ' '
-     colnum: 0
-      colax: 0x<address>
-                 0      0      0
-    wcsname: UNDEFINED
-      cname: 0x<address>
-             UNDEFINED
-             UNDEFINED
-             UNDEFINED
-      crder: 0x<address>
-             UNDEFINED     UNDEFINED     UNDEFINED   
-      csyer: 0x<address>
-             UNDEFINED     UNDEFINED     UNDEFINED   
-    radesys: UNDEFINED
-    equinox: UNDEFINED
-    specsys: "BARYCENT"
-    ssysobs: UNDEFINED
-    velosys: UNDEFINED
-    ssyssrc: UNDEFINED
-    zsource: UNDEFINED
-     obsgeo: UNDEFINED     UNDEFINED     UNDEFINED     
-    dateobs: "1957/02/15 01:10:00"
-    dateavg: UNDEFINED
-     mjdobs: UNDEFINED
-     mjdavg: UNDEFINED
-       ntab: 0
-        tab: 0x0
-       nwtb: 0
-        wtb: 0x0
-      types: 0x<address>
-            2200 2201 3300
-     lngtyp: "RA"
-     lattyp: "DEC"
-        lng: 0
-        lat: 1
-       spec: 2
-   cubeface: -1
-        err: 0x0
-        lin: (see below)
-        cel: (see below)
-        spc: (see below)
-     m_flag: 137
-    m_naxis: 3
-    m_crpix: 0x<address>  (= crpix)
-       m_pc: 0x<address>  (= pc)
-    m_cdelt: 0x<address>  (= cdelt)
-    m_crval: 0x<address>  (= crval)
-    m_cunit: 0x<address>  (= cunit)
-    m_ctype: 0x<address>  (= ctype)
-       m_pv: 0x<address>  (= pv)
-       m_ps: 0x<address>  (= ps)
-       m_cd: 0x<address>  (= cd)
-    m_crota: 0x<address>  (= crota)
+WCSFIX status returns: (-1, 0, 0, 0,-1,-2)
 
-    m_colax: 0x<address>  (= colax)
-    m_cname: 0x<address>  (= cname)
-    m_crder: 0x<address>  (= crder)
-    m_csyer: 0x<address>  (= csyer)
-      m_tab: 0x0  (= tab)
-      m_wtb: 0x0  (= wtb)
-
-   lin.*
-       flag: 137
-      naxis: 3
-      crpix: 0x<address>
-               90           90           1         
-         pc: 0x<address>
-    pc[0][]:   1            0            0         
-    pc[1][]:   0            1            0         
-    pc[2][]:   0            0            1         
-      cdelt: 0x<address>
-              -0.00027778   0.00027778   19687     
-      unity: 1
-        err: 0x0
-     piximg: (nil)
-     imgpix: (nil)
-     m_flag: 0
-    m_naxis: 0
-    m_crpix: 0x0
-       m_pc: 0x0
-    m_cdelt: 0x0
-
-   cel.*
-      flag: 137
-     offset: 0
-       phi0:  0.000000
-     theta0: 90.000000
-       ref:   265.62      -28.988       180         -28.988    
-       prj: (see below)
-     euler:   265.62       118.99       180         -0.48463      0.87472   
-    latpreq: 0 (not required)
-     isolat: 0
-        err: 0x0
-
-   prj.*
-       flag: 105
-       code: "SIN"
-         r0: 57.295780
-         pv: (0)
-              0           -1.8049    
-       phi0:  0.000000
-     theta0: 90.000000
-     bounds: 1
-
-       name: "orthographic/synthesis"
-   category: 1 (zenithal)
-    pvrange: 102
-  simplezen: 0
-  equiareal: 0
-  conformal: 0
-     global: 0
-  divergent: 0
-         x0: 0.000000
-         y0: 0.000000
-        err: 0x0
-        w[]:   0.017453     3.2577       4.2577       2.2577       0         
-               0            0            0            0            0         
-          m: 0
-          n: 0
-     prjx2s: 0x<address>
-     prjs2x: 0x<address>
-
-   spc.*
-       flag: 111
-       type: "VOPT"
-       code: "F2W"
-      crval:  5.569e+06 
-    restfrq: 1420405750.000000
-    restwav: 0.000000
-         pv: (not used)
-          w:   0.2111       1.395e+09   -4.567       (remainder unused)
-    isGrism: 0
-        err: 0x0
-     spxX2P: 0x<address>
-     spxP2S: 0x<address>
-     spxS2P: 0x<address>
-     spxP2X: 0x<address>
-
-------------------------------------------------------------------------
        flag: 137
       naxis: 3
       crpix: 0x<address>
diff --git a/Fortran/test/twcsmix.f b/Fortran/test/twcsmix.f
index 12710ff..9f65d23 100644
--- a/Fortran/test/twcsmix.f
+++ b/Fortran/test/twcsmix.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: twcsmix.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: twcsmix.f,v 4.8.1.2 2011/08/16 01:34:41 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TWCS2
@@ -227,6 +227,9 @@
      :          WORLD(4)
       CHARACTER PCODE*3
 
+*     On some systems, such as Sun Sparc, the structs MUST be aligned
+*     on a double precision boundary, done here using equivalences.
+*     Failure to do this may result in mysterious "bus errors".
       INCLUDE 'wcs.inc'
       INCLUDE 'cel.inc'
       INCLUDE 'prj.inc'
@@ -408,6 +411,11 @@
       DOUBLE PRECISION EULER(5), LNG1, LAT1, PHI, PIXLAT, PIXLNG, THETA
       CHARACTER PCODE*3
 
+*     On some systems, such as Sun Sparc, the structs MUST be aligned
+*     on a double precision boundary.  As a dummy argument, WCS should
+*     already be aligned.  The others are aligned here using
+*     equivalences.  Failure to do this may result in mysterious "bus
+*     errors".
       INCLUDE 'wcs.inc'
       INCLUDE 'cel.inc'
       INCLUDE 'prj.inc'
@@ -456,6 +464,11 @@
      :          WORLD(NELEM,0:360)
       CHARACTER PCODE*3, TEXT*80
 
+*     On some systems, such as Sun Sparc, the structs MUST be aligned
+*     on a double precision boundary.  As a dummy argument, WCS should
+*     already be aligned.  The others are aligned here using
+*     equivalences.  Failure to do this may result in mysterious "bus
+*     errors".
       INCLUDE 'wcs.inc'
       INCLUDE 'cel.inc'
       INCLUDE 'prj.inc'
diff --git a/Fortran/test/twcssub.f b/Fortran/test/twcssub.f
index c27855b..61e79ef 100644
--- a/Fortran/test/twcssub.f
+++ b/Fortran/test/twcssub.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: twcssub.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: twcssub.f,v 4.8.1.2 2011/08/16 01:34:41 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TWCSSUB
@@ -50,9 +50,11 @@
       CHARACTER CNAME(NAXIS)*72, CTYPE(NAXIS)*72, CUNIT(NAXIS)*72,
      :          PS(10)*72
 
+*     On some systems, such as Sun Sparc, the structs MUST be aligned
+*     on a double precision boundary, done here using equivalences.
+*     Failure to do this may result in mysterious "bus errors".
       INCLUDE 'wcs.inc'
       INCLUDE 'wcserr.inc'
-
       INTEGER   WCS(WCSLEN), WCSEXT(WCSLEN)
       DOUBLE PRECISION DUMMY1, DUMMY2
       EQUIVALENCE (WCS,DUMMY1), (WCSEXT,DUMMY2)
diff --git a/Fortran/test/twcstab.f b/Fortran/test/twcstab.f
index a63d3a8..73f6299 100644
--- a/Fortran/test/twcstab.f
+++ b/Fortran/test/twcstab.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: twcstab.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: twcstab.f,v 4.8.1.2 2011/08/16 01:34:41 cal103 Exp cal103 $
 *=======================================================================
 
       PROGRAM TWCSTAB
@@ -52,6 +52,9 @@
      :          NWTB, STATUS, WCSP(2), WTB(2)
       CHARACTER KEYREC*80, HEADER*28801, INFILE*16
 
+*     On some systems, such as Sun Sparc, the struct MUST be aligned
+*     on a double precision boundary, done here using an equivalence.
+*     Failure to do this may result in mysterious "bus errors".
       INCLUDE 'wcs.inc'
       INCLUDE 'wcshdr.inc'
       INCLUDE 'wcsfix.inc'
diff --git a/Fortran/wcs.inc b/Fortran/wcs.inc
index 0b3db83..4b0a75d 100644
--- a/Fortran/wcs.inc
+++ b/Fortran/wcs.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: wcs.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: wcs.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/wcs_data.f b/Fortran/wcs_data.f
index ae4c193..3f8193e 100644
--- a/Fortran/wcs_data.f
+++ b/Fortran/wcs_data.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: wcs_data.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: wcs_data.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       BLOCK DATA WCS_BLOCK_DATA
diff --git a/Fortran/wcs_f.c b/Fortran/wcs_f.c
index ca23eb2..42e1f07 100644
--- a/Fortran/wcs_f.c
+++ b/Fortran/wcs_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcs_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: wcs_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/wcserr.inc b/Fortran/wcserr.inc
index b6b88ec..97db46c 100644
--- a/Fortran/wcserr.inc
+++ b/Fortran/wcserr.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: wcserr.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: wcserr.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/wcserr_f.c b/Fortran/wcserr_f.c
index 38136e6..87e6050 100644
--- a/Fortran/wcserr_f.c
+++ b/Fortran/wcserr_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcserr_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: wcserr_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/wcsfix.inc b/Fortran/wcsfix.inc
index 1e18557..1fd0047 100644
--- a/Fortran/wcsfix.inc
+++ b/Fortran/wcsfix.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: wcsfix.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: wcsfix.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/wcsfix_data.f b/Fortran/wcsfix_data.f
index 8172e29..c55e07d 100644
--- a/Fortran/wcsfix_data.f
+++ b/Fortran/wcsfix_data.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: wcsfix_data.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: wcsfix_data.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       BLOCK DATA WCSFIX_BLOCK_DATA
diff --git a/Fortran/wcsfix_f.c b/Fortran/wcsfix_f.c
index 45a5a1b..a0ae312 100644
--- a/Fortran/wcsfix_f.c
+++ b/Fortran/wcsfix_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsfix_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: wcsfix_f.c,v 4.8.1.2 2011/11/17 05:01:01 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <wcsfix.h>
@@ -48,6 +48,7 @@
 int wcsfix_(int *ctrl, const int naxis[], int *wcs, int stat[])
 
 {
+  if (*naxis == 0) naxis = 0x0;
   return wcsfix(*ctrl, naxis, (struct wcsprm *)wcs, stat);
 }
 
diff --git a/Fortran/wcshdr.inc b/Fortran/wcshdr.inc
index cf8a991..e1e5681 100644
--- a/Fortran/wcshdr.inc
+++ b/Fortran/wcshdr.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: wcshdr.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: wcshdr.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/wcshdr_data.f b/Fortran/wcshdr_data.f
index f6072b3..3310cee 100644
--- a/Fortran/wcshdr_data.f
+++ b/Fortran/wcshdr_data.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: wcshdr_data.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: wcshdr_data.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       BLOCK DATA WCSHDR_BLOCK_DATA
diff --git a/Fortran/wcshdr_f.c b/Fortran/wcshdr_f.c
index 5047d09..4dee46d 100644
--- a/Fortran/wcshdr_f.c
+++ b/Fortran/wcshdr_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcshdr_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: wcshdr_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/wcsmath.inc b/Fortran/wcsmath.inc
index df40932..125d0fa 100644
--- a/Fortran/wcsmath.inc
+++ b/Fortran/wcsmath.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: wcsmath.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: wcsmath.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     The value used to represent an undefined parameter.
diff --git a/Fortran/wcsunits.inc b/Fortran/wcsunits.inc
index 65068e5..4341a85 100644
--- a/Fortran/wcsunits.inc
+++ b/Fortran/wcsunits.inc
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: wcsunits.inc,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: wcsunits.inc,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/wcsunits_data.f b/Fortran/wcsunits_data.f
index 025b4d5..bba9bbf 100644
--- a/Fortran/wcsunits_data.f
+++ b/Fortran/wcsunits_data.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: wcsunits_data.f,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+* $Id: wcsunits_data.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 
       BLOCK DATA WCSUNITS_BLOCK_DATA
diff --git a/Fortran/wcsunits_f.c b/Fortran/wcsunits_f.c
index ff86d85..6d56390 100644
--- a/Fortran/wcsunits_f.c
+++ b/Fortran/wcsunits_f.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsunits_f.c,v 4.8 2011/08/15 08:05:54 cal103 Exp $
+  $Id: wcsunits_f.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/GNUmakefile b/GNUmakefile
index 34a3907..cefd058 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -15,11 +15,11 @@
 #              programmers' manual.
 #   distclean (or realclean): Recursively delete all platform-dependent files
 #              generated during the build, preserving only the programmers'
-#              manual (which is normally provided pre-built).  It is the one
-#              to use between builds for multiple platforms.
+#              manual and man pages (which are normally provided pre-built).
+#              It is the one to use between builds for multiple platforms.
 #   cleanest:  Like distclean, but deletes everything that can be regenerated
-#              from the source files, including the programmers' manual, but
-#              excluding 'configure'.
+#              from the source files, including the programmers' manual and
+#              man pages, but excluding 'configure'.
 #   show:      Print the values of important variables used in this and the
 #              other makefiles.
 #   writable:  Run chmod recursively to make all sources writable.
@@ -32,7 +32,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility
 # http://www.atnf.csiro.au/~mcalabre/index.html
-# $Id: GNUmakefile,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+# $Id: GNUmakefile,v 4.8.1.2 2011/10/04 07:49:19 cal103 Exp cal103 $
 #-----------------------------------------------------------------------------
 # Get configure settings.
 include makedefs
@@ -139,6 +139,7 @@ config.status : configure
 
 dist :
 	   $(MAKE) -C doxygen cleanest build
+	   $(MAKE) -C utils man
 	   $(MAKE) distclean
 	-@ echo $(WCSLIBPKG)/C/RCS        >  wcslib.X
 	-@ echo $(WCSLIBPKG)/C/flexed/RCS >> wcslib.X
diff --git a/INSTALL b/INSTALL
index 22a134c..10e2360 100644
--- a/INSTALL
+++ b/INSTALL
@@ -93,7 +93,7 @@ The INSTALL file provided with GNU autoconf 2.53 is appended without change.
 
 Author: Mark Calabretta, Australia Telescope National Facility
 http://www.atnf.csiro.au/~mcalabre/index.html
-$Id: INSTALL,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+$Id: INSTALL,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 
 ==============================================================================
 
diff --git a/README b/README
index fc3a2c8..e925aaa 100644
--- a/README
+++ b/README
@@ -46,4 +46,4 @@ Please refer to
 
 Author: Mark Calabretta, Australia Telescope National Facility
 http://www.atnf.csiro.au/~mcalabre/index.html
-$Id: README,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+$Id: README,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
diff --git a/THANKS b/THANKS
index 5920a37..4839c8e 100644
--- a/THANKS
+++ b/THANKS
@@ -63,6 +63,7 @@ Boud Roukema
 Keith A. Scollick
 Arno Schoenmakers
 Hanno Spreeuw
+Ole Streicher (Debian maintainer)
 Hans Terlouw
 Peter Teuben
 Harro Verkouter
@@ -77,4 +78,4 @@ Daren Scot Wilson
 Tony Wong
 
 
-$Id: THANKS,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+$Id: THANKS,v 4.8.1.2 2011/09/16 04:48:44 cal103 Exp cal103 $
diff --git a/VALIDATION b/VALIDATION
index 6491d07..98adfda 100644
--- a/VALIDATION
+++ b/VALIDATION
@@ -17,6 +17,13 @@ WCSLIB version 4.8 (2011/08/15)
   gfortran --version: GNU Fortran (Debian 4.3.2-1.1) 4.3.2
 
 
+* Marvell SheevaPlug (Feroceon 88FR131 rev 1 ARM v5L), Debian linux 6.0 
+  (squeeze)
+  uname -r (kernel version): 2.6.32-5-kirkwood
+  gcc --version: gcc (Debian 4.4.5-8) 4.4.5
+  gfortran --version: GNU Fortran (Debian 4.4.5-8) 4.4.5
+
+
 * Mac mini (Intel Core 2 Duo) running Mac OS X 10.6.2 (10C540)
   uname -r (Darwin kernel version): 10.2.0
   gcc --version: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1
@@ -178,4 +185,4 @@ WCSLIB version 4.4 (2009/08/06)
           2004/04/23
 
 ------------------------------------------------------------------------------
-$Id: VALIDATION,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+$Id: VALIDATION,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
diff --git a/config/config.guess b/config/config.guess
index 500ee74..43f0cdb 100755
--- a/config/config.guess
+++ b/config/config.guess
@@ -1,9 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011 Free Software Foundation, Inc.
 
-timestamp='2003-10-03'
+timestamp='2011-10-01'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -17,23 +18,25 @@ timestamp='2003-10-03'
 #
 # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Originally written by Per Bothner <per at bothner.com>.
-# Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches at gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -53,8 +56,9 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -66,11 +70,11 @@ Try \`$me --help' for more information."
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -104,7 +108,7 @@ set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 : ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -123,7 +127,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
 	;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+esac ; set_cc_for_build= ;'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi at noc.rutgers.edu 1994-08-24)
@@ -158,6 +162,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
@@ -166,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
+			| grep -q __ELF__
 		then
 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
 		    # Return netbsd for either.  FIX?
@@ -176,7 +181,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		fi
 		;;
 	    *)
-	        os=netbsd
+		os=netbsd
 		;;
 	esac
 	# The OS release
@@ -196,50 +201,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
-	exit 0 ;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    macppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvmeppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mipseb-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sun3:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
     alpha:OSF1:*:*)
-	if test $UNAME_RELEASE = "V4.0"; then
+	case $UNAME_RELEASE in
+	*4.0)
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-	fi
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
 	# According to Compaq, /usr/sbin/psrinfo has been available on
 	# OSF/1 and Tru64 systems produced since 1995.  I hope that
 	# covers most systems running today.  This code pipes the CPU
@@ -277,42 +264,52 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	    "EV7.9 (21364A)")
 		UNAME_MACHINE="alphaev79" ;;
 	esac
+	# A Pn.n version is a patched version.
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit 0 ;;
-    Alpha*:OpenVMS:*:*)
-	echo alpha-hp-vms
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# Should we change UNAME_MACHINE based on the output of uname instead
 	# of the specific Alpha model?
 	echo alpha-pc-interix
-	exit 0 ;;
+	exit ;;
     21064:Windows_NT:50:3)
 	echo alpha-dec-winnt3.5
-	exit 0 ;;
+	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
-	exit 0;;
+	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit 0 ;;
+	exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-morphos
-	exit 0 ;;
+	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
-	exit 0 ;;
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+	echo powerpc-ibm-os400
+	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 	echo hppa1.1-hitachi-hiuxmpp
-	exit 0;;
+	exit ;;
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
 	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -320,32 +317,51 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	else
 		echo pyramid-pyramid-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
-	exit 0 ;;
+	exit ;;
     DRS?6000:unix:4.0:6*)
 	echo sparc-icl-nx6
-	exit 0 ;;
-    DRS?6000:UNIX_SV:4.2*:7*)
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
 	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    i86pc:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 	# it's likely to be more like Solaris than SunOS4.
 	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
 	    Series*|S4*)
@@ -354,10 +370,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
+	exit ;;
     sun3*:SunOS:*:*)
 	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
@@ -369,10 +385,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 		echo sparc-sun-sunos${UNAME_RELEASE}
 		;;
 	esac
-	exit 0 ;;
+	exit ;;
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
     # "atarist" or "atariste" at least should have a processor
@@ -382,38 +398,41 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit 0 ;;
+	exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit 0 ;;
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit 0 ;;
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
+	exit ;;
     RISC*:ULTRIX:*:*)
 	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     VAX*:ULTRIX*:*:*)
 	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
 	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -437,35 +456,36 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c \
-	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && exit 0
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
 	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
-	exit 0 ;;
+	exit ;;
     Motorola:*:4.3:PL8-*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
+	exit ;;
     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
+	exit ;;
     Night_Hawk:Power_UNIX:*:*)
 	echo powerpc-harris-powerunix
-	exit 0 ;;
+	exit ;;
     m88k:CX/UX:7*:*)
 	echo m88k-harris-cxux7
-	exit 0 ;;
+	exit ;;
     m88k:*:4*:R4*)
 	echo m88k-motorola-sysv4
-	exit 0 ;;
+	exit ;;
     m88k:*:3*:R3*)
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
 	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
 	then
 	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
@@ -478,29 +498,29 @@ EOF
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit 0 ;;
+	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
-	exit 0 ;;
+	exit ;;
     M88*:*:R3*:*)
 	# Delta 88k system running SVR3
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
 	echo m88k-tektronix-sysv3
-	exit 0 ;;
+	exit ;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
 	echo m68k-tektronix-bsd
-	exit 0 ;;
+	exit ;;
     *:IRIX*:*:*)
 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
+	exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
 	echo i386-ibm-aix
-	exit 0 ;;
+	exit ;;
     ia64:AIX:*:*)
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
@@ -508,7 +528,7 @@ EOF
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
 		eval $set_cc_for_build
@@ -523,15 +543,19 @@ EOF
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-		echo rs6000-ibm-aix3.2.5
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
 	else
 		echo rs6000-ibm-aix3.2
 	fi
-	exit 0 ;;
-    *:AIX:*:[45])
+	exit ;;
+    *:AIX:*:[4567])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
@@ -544,28 +568,28 @@ EOF
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
-	exit 0 ;;
+	exit ;;
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 	echo romp-ibm-bsd4.4
-	exit 0 ;;
+	exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
+	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
-	exit 0 ;;
+	exit ;;
     DPX/2?00:B.O.S.:*:*)
 	echo m68k-bull-sysv3
-	exit 0 ;;
+	exit ;;
     9000/[34]??:4.3bsd:1.*:*)
 	echo m68k-hp-bsd
-	exit 0 ;;
+	exit ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
-	exit 0 ;;
+	exit ;;
     9000/[34678]??:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	case "${UNAME_MACHINE}" in
@@ -574,52 +598,52 @@ EOF
 	    9000/[678][0-9][0-9])
 		if [ -x /usr/bin/getconf ]; then
 		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
 			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
+			esac ;;
+		    esac
 		fi
 		if [ "${HP_ARCH}" = "" ]; then
 		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
+		    sed 's/^		//' << EOF >$dummy.c
 
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
 
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
 
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
 EOF
 		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
 		    test -z "$HP_ARCH" && HP_ARCH=hppa
@@ -627,9 +651,19 @@ EOF
 	esac
 	if [ ${HP_ARCH} = "hppa2.0w" ]
 	then
-	    # avoid double evaluation of $set_cc_for_build
-	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
 	    then
 		HP_ARCH="hppa2.0w"
 	    else
@@ -637,11 +671,11 @@ EOF
 	    fi
 	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     ia64:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	echo ia64-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     3050*:HI-UX:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -669,211 +703,256 @@ EOF
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
 	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
+	exit ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
 	echo hppa1.1-hp-bsd
-	exit 0 ;;
+	exit ;;
     9000/8??:4.3bsd:*:*)
 	echo hppa1.0-hp-bsd
-	exit 0 ;;
+	exit ;;
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
 	echo hppa1.0-hp-mpeix
-	exit 0 ;;
+	exit ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
 	echo hppa1.1-hp-osf
-	exit 0 ;;
+	exit ;;
     hp8??:OSF1:*:*)
 	echo hppa1.0-hp-osf
-	exit 0 ;;
+	exit ;;
     i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
 	    echo ${UNAME_MACHINE}-unknown-osf1mk
 	else
 	    echo ${UNAME_MACHINE}-unknown-osf1
 	fi
-	exit 0 ;;
+	exit ;;
     parisc*:Lites*:*:*)
 	echo hppa1.1-hp-lites
-	exit 0 ;;
+	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit 0 ;;
+	exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit 0 ;;
+	exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit 0 ;;
+	exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit 0 ;;
+	exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit 0 ;;
+	exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*[A-Z]90:*:*:*)
 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
 	      -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*TS:*:*:*)
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*T3E:*:*:*)
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     *:UNICOS/mp:*:*)
-	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sparc*:BSD/OS:*:*)
 	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:BSD/OS:*:*)
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
-	# Determine whether the default compiler uses glibc.
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#if __GLIBC__ >= 2
-	LIBC=gnu
-	#else
-	LIBC=
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	# GNU/FreeBSD systems have a "k" prefix to indicate we are using
-	# FreeBSD's kernel, but not the complete OS.
-	case ${LIBC} in gnu) kernel_only='k' ;; esac
-	echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
-	exit 0 ;;
+	exit ;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
-	exit 0 ;;
-    i*:MINGW*:*)
+	exit ;;
+    *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
-	exit 0 ;;
+	exit ;;
+    i*:windows32*:*)
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
-	exit 0 ;;
-    x86:Interix*:[34]*)
-	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
-	exit 0 ;;
+	exit ;;
+    *:Interix*:*)
+	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 	echo i${UNAME_MACHINE}-pc-mks
-	exit 0 ;;
+	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
 	# UNAME_MACHINE based on the output of uname instead of i386?
 	echo i586-pc-interix
-	exit 0 ;;
+	exit ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
-	exit 0 ;;
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
     p*:CYGWIN*:*)
 	echo powerpcle-unknown-cygwin
-	exit 0 ;;
+	exit ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     *:GNU:*:*)
+	# the GNU system
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
-	exit 0 ;;
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
     arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+	    fi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     cris:Linux:*:*)
 	echo cris-axis-linux-gnu
-	exit 0 ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    mips:Linux:*:*)
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+	echo frv-unknown-linux-gnu
+	exit ;;
+    hexagon:Linux:*:*)
+	echo hexagon-unknown-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	LIBC=gnu
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips
-	#undef mipsel
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
-	#else
-	CPU=
-	#endif
+	#ifdef __dietlibc__
+	LIBC=dietlibc
 	#endif
 EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
-	;;
-    mips64:Linux:*:*)
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
 	#undef CPU
-	#undef mips64
-	#undef mips64el
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
 	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mips64el
+	CPU=${UNAME_MACHINE}el
 	#else
 	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips64
+	CPU=${UNAME_MACHINE}
 	#else
 	CPU=
 	#endif
 	#endif
 EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 	;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit 0 ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit 0 ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit 0 ;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-gnu
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -881,112 +960,71 @@ EOF
 	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
 	  *)    echo hppa-unknown-linux-gnu ;;
 	esac
-	exit 0 ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux
-	exit 0 ;;
+	exit ;;
     sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     sh*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
     x86_64:Linux:*:*)
 	echo x86_64-unknown-linux-gnu
-	exit 0 ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit 0 ;;
-	  coff-i386)
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit 0 ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit 0 ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#ifdef __INTEL_COMPILER
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
-	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
-	;;
+	exit ;;
+    xtensa*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
 	# earlier versions are messed up and put the nodename in both
 	# sysname and nodename.
 	echo i386-sequent-sysv4
-	exit 0 ;;
+	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
 	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
+	# Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit 0 ;;
+	exit ;;
     i*86:OS/2:*:*)
 	# If we were able to find `uname', then EMX Unix compatibility
 	# is probably installed.
 	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit 0 ;;
+	exit ;;
     i*86:XTS-300:*:STOP)
 	echo ${UNAME_MACHINE}-unknown-stop
-	exit 0 ;;
+	exit ;;
     i*86:atheos:*:*)
 	echo ${UNAME_MACHINE}-unknown-atheos
-	exit 0 ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
 	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     i*86:*DOS:*:*)
 	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
+	exit ;;
     i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
 	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -994,15 +1032,16 @@ EOF
 	else
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
 	fi
-	exit 0 ;;
-    i*86:*:5:[78]*)
+	exit ;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
 	    *486*)	     UNAME_MACHINE=i486 ;;
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
 	esac
 	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit 0 ;;
+	exit ;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1020,73 +1059,86 @@ EOF
 	else
 		echo ${UNAME_MACHINE}-pc-sysv32
 	fi
-	exit 0 ;;
+	exit ;;
     pc:*:*:*)
 	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit 0 ;;
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
+	exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
-	exit 0 ;;
+	exit ;;
     paragon:*:*:*)
 	echo i860-intel-osf1
-	exit 0 ;;
+	exit ;;
     i860:*:4.*:*) # i860-SVR4
 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
 	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
 	else # Add other i860-SVR4 vendors below as they are discovered.
 	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
 	fi
-	exit 0 ;;
+	exit ;;
     mini*:CTIX:SYS*5:*)
 	# "miniframe"
 	echo m68010-convergent-sysv
-	exit 0 ;;
+	exit ;;
     mc68k:UNIX:SYSTEM5:3.51m)
 	echo m68k-convergent-sysv
-	exit 0 ;;
+	exit ;;
     M680?0:D-NIX:5.3:*)
 	echo m68k-diab-dnix
-	exit 0 ;;
-    M68*:*:R3V[567]*:*)
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
-	exit 0 ;;
+	exit ;;
     TSUNAMI:LynxOS:2.*:*)
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     rs6000:LynxOS:2.*:*)
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SM[BE]S:UNIX_SV:*:*)
 	echo mips-dde-sysv${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RM*:ReliantUNIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     RM*:SINIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     *:SINIX-*:*:*)
 	if uname -p 2>/dev/null >/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1094,68 +1146,94 @@ EOF
 	else
 		echo ns32k-sni-sysv
 	fi
-	exit 0 ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel at ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit 0 ;;
+	exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel at ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes at openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
 	echo hppa1.1-stratus-sysv4
-	exit 0 ;;
+	exit ;;
     *:*:*:FTX*)
 	# From seanf at swdc.stratus.com.
 	echo i860-stratus-sysv4
-	exit 0 ;;
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
     *:VOS:*:*)
 	# From Paul.Green at stratus.com.
 	echo hppa1.1-stratus-vos
-	exit 0 ;;
+	exit ;;
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
-	exit 0 ;;
+	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
+		echo mips-nec-sysv${UNAME_RELEASE}
 	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
+		echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
-        exit 0 ;;
+	exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
-	exit 0 ;;
+	exit ;;
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
 	echo powerpc-apple-beos
-	exit 0 ;;
+	exit ;;
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
-	exit 0 ;;
+	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-5:SUPER-UX:*:*)
 	echo sx5-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-6:SUPER-UX:*:*)
 	echo sx6-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Rhapsody:*:*)
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Darwin:*:*)
-	case `uname -p` in
-	    *86) UNAME_PROCESSOR=i686 ;;
-	    powerpc) UNAME_PROCESSOR=powerpc ;;
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		      grep IS_64BIT_ARCH >/dev/null
+		  then
+		      UNAME_PROCESSOR="x86_64"
+		  fi
+		fi ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
 	esac
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
 	if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1163,22 +1241,28 @@ EOF
 		UNAME_MACHINE=pc
 	fi
 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
-	exit 0 ;;
-    NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*)
+	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:NonStop-UX:*:*)
 	echo mips-compaq-nonstopux
-	exit 0 ;;
+	exit ;;
     BS2000:POSIX*:*:*)
 	echo bs2000-siemens-sysv
-	exit 0 ;;
+	exit ;;
     DS/*:UNIX_System_V:*:*)
 	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Plan9:*:*)
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
@@ -1189,28 +1273,50 @@ EOF
 	    UNAME_MACHINE="$cputype"
 	fi
 	echo ${UNAME_MACHINE}-unknown-plan9
-	exit 0 ;;
+	exit ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
-	exit 0 ;;
+	exit ;;
     *:TENEX:*:*)
 	echo pdp10-unknown-tenex
-	exit 0 ;;
+	exit ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
 	echo pdp10-dec-tops20
-	exit 0 ;;
+	exit ;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
 	echo pdp10-xkl-tops20
-	exit 0 ;;
+	exit ;;
     *:TOPS-20:*:*)
 	echo pdp10-unknown-tops20
-	exit 0 ;;
+	exit ;;
     *:ITS:*:*)
 	echo pdp10-unknown-its
-	exit 0 ;;
+	exit ;;
     SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-	exit 0 ;;
+	echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1233,16 +1339,16 @@ main ()
 #include <sys/param.h>
   printf ("m68k-sony-newsos%s\n",
 #ifdef NEWSOS4
-          "4"
+	"4"
 #else
-	  ""
+	""
 #endif
-         ); exit (0);
+	); exit (0);
 #endif
 #endif
 
 #if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
+  printf ("arm-acorn-riscix\n"); exit (0);
 #endif
 
 #if defined (hp300) && !defined (hpux)
@@ -1331,11 +1437,12 @@ main ()
 }
 EOF
 
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
 
 # Apollos put the system type in the environment.
 
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
 
 # Convex versions that predate uname can use getsysinfo(1)
 
@@ -1344,22 +1451,22 @@ then
     case `getsysinfo -f cpu_type` in
     c1*)
 	echo c1-convex-bsd
-	exit 0 ;;
+	exit ;;
     c2*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     c34*)
 	echo c34-convex-bsd
-	exit 0 ;;
+	exit ;;
     c38*)
 	echo c38-convex-bsd
-	exit 0 ;;
+	exit ;;
     c4*)
 	echo c4-convex-bsd
-	exit 0 ;;
+	exit ;;
     esac
 fi
 
@@ -1370,7 +1477,9 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-    ftp://ftp.gnu.org/pub/gnu/config/
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
diff --git a/config/config.sub b/config/config.sub
index 1f31816..0d2cdde 100755
--- a/config/config.sub
+++ b/config/config.sub
@@ -1,9 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011 Free Software Foundation, Inc.
 
-timestamp='2003-08-18'
+timestamp='2011-09-09'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,22 +22,26 @@ timestamp='2003-08-18'
 #
 # 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., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+
 # Please send patches to <config-patches at gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -70,8 +75,9 @@ Report bugs and patches to <config-patches at gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -83,11 +89,11 @@ Try \`$me --help' for more information."
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -99,7 +105,7 @@ while test $# -gt 0 ; do
     *local*)
        # First pass through any local machine types.
        echo $1
-       exit 0;;
+       exit ;;
 
     * )
        break ;;
@@ -118,7 +124,11 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -144,10 +154,13 @@ case $os in
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis)
+	-apple | -axis | -knuth | -cray | -microblaze)
 		os=
 		basic_machine=$1
 		;;
+	-bluegene*)
+		os=-cnk
+		;;
 	-sim | -cisco | -oki | -wec | -winbond)
 		os=
 		basic_machine=$1
@@ -162,13 +175,17 @@ case $os in
 		os=-chorusos
 		basic_machine=$1
 		;;
- 	-chorusrdb)
- 		os=-chorusrdb
+	-chorusrdb)
+		os=-chorusrdb
 		basic_machine=$1
- 		;;
+		;;
 	-hiux*)
 		os=-hiuxwe2
 		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-sco5)
 		os=-sco3.2v5
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -185,6 +202,10 @@ case $os in
 		# Don't forget version if it is 3.2v4 or newer.
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-sco*)
 		os=-sco3.2v2
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -229,22 +250,31 @@ case $basic_machine in
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+        | be32 | be64 \
+	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
-	| fr30 | frv \
+	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
-	| m32r | m68000 | m68k | m88k | mcore \
+	| le32 | le64 \
+	| lm32 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep | metag \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
-	| mips64vr | mips64vrel \
+	| mips64octeon | mips64octeonel \
 	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
 	| mips64vr4100 | mips64vr4100el \
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
 	| mipsisa32 | mipsisa32el \
 	| mipsisa32r2 | mipsisa32r2el \
 	| mipsisa64 | mipsisa64el \
@@ -253,30 +283,63 @@ case $basic_machine in
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
+	| moxie \
+	| mt \
 	| msp430 \
+	| nds32 | nds32le | nds32be \
+	| nios | nios2 \
 	| ns16k | ns32k \
-	| openrisc | or32 \
+	| open8 \
+	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
 	| pyramid \
-	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| rx \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
-	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
-	| strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
-	| v850 | v850e \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
 	| we32k \
-	| x86 | xscale | xstormy16 | xtensa \
-	| z8k)
+	| x86 | xc16x | xstormy16 | xtensa \
+	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
 		# Motorola 68HC11/12.
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
 	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
 		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
 
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
@@ -296,28 +359,35 @@ case $basic_machine in
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* \
-	| bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | cydra-* \
+	| avr-* | avr32-* \
+	| be32-* | be64-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
+	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
-	| m32r-* \
+	| le32-* | le64-* \
+	| lm32-* \
+	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | mcore-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
-	| mips64vr-* | mips64vrel-* \
+	| mips64octeon-* | mips64octeonel-* \
 	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
 	| mips64vr4100-* | mips64vr4100el-* \
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
 	| mipsisa32-* | mipsisa32el-* \
 	| mipsisa32r2-* | mipsisa32r2el-* \
 	| mipsisa64-* | mipsisa64el-* \
@@ -325,26 +395,39 @@ case $basic_machine in
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
 	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
 	| msp430-* \
-	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+	| nds32-* | nds32le-* | nds32be-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
 	| pyramid-* \
-	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| romp-* | rs6000-* | rx-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
-	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
 	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
 	| tron-* \
-	| v850-* | v850e-* | vax-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
-	| xtensa-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
+	| xstormy16-* | xtensa*-* \
 	| ymp-* \
-	| z8k-*)
+	| z8k-* | z80-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
 		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
@@ -362,6 +445,9 @@ case $basic_machine in
 		basic_machine=a29k-amd
 		os=-udi
 		;;
+	abacus)
+		basic_machine=abacus-unknown
+		;;
 	adobe68k)
 		basic_machine=m68010-adobe
 		os=-scout
@@ -379,6 +465,9 @@ case $basic_machine in
 	amd64)
 		basic_machine=x86_64-pc
 		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	amdahl)
 		basic_machine=580-amdahl
 		os=-sysv
@@ -402,6 +491,10 @@ case $basic_machine in
 		basic_machine=m68k-apollo
 		os=-bsd
 		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -410,10 +503,35 @@ case $basic_machine in
 		basic_machine=ns32k-sequent
 		os=-dynix
 		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
 		;;
+	cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
 	convex-c1)
 		basic_machine=c1-convex
 		os=-bsd
@@ -438,12 +556,27 @@ case $basic_machine in
 		basic_machine=j90-cray
 		os=-unicos
 		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16 | cr16-*)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
 	crds | unos)
 		basic_machine=m68k-crds
 		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
 	cris | cris-* | etrax*)
 		basic_machine=cris-axis
 		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
 	da30 | da30-*)
 		basic_machine=m68k-da30
 		;;
@@ -466,6 +599,14 @@ case $basic_machine in
 		basic_machine=m88k-motorola
 		os=-sysv3
 		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
 	dpx20 | dpx20-*)
 		basic_machine=rs6000-bull
 		os=-bosx
@@ -616,6 +757,14 @@ case $basic_machine in
 		basic_machine=m68k-isi
 		os=-sysv
 		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	m88k-omron*)
 		basic_machine=m88k-omron
 		;;
@@ -627,10 +776,17 @@ case $basic_machine in
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
+	microblaze)
+		basic_machine=microblaze-xilinx
+		;;
 	mingw32)
 		basic_machine=i386-pc
 		os=-mingw32
 		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
@@ -644,10 +800,6 @@ case $basic_machine in
 	mips3*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
 		;;
-	mmix*)
-		basic_machine=mmix-knuth
-		os=-mmixware
-		;;
 	monitor)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -660,10 +812,17 @@ case $basic_machine in
 		basic_machine=i386-pc
 		os=-msdos
 		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
 		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
 	ncr3000)
 		basic_machine=i486-ncr
 		os=-sysv4
@@ -728,9 +887,11 @@ case $basic_machine in
 	np1)
 		basic_machine=np1-gould
 		;;
-	nv1)
-		basic_machine=nv1-cray
-		os=-unicosmp
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
 		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
@@ -739,9 +900,12 @@ case $basic_machine in
 		basic_machine=hppa1.1-oki
 		os=-proelf
 		;;
-	or32 | or32-*)
+	openrisc | openrisc-*)
 		basic_machine=or32-unknown
-		os=-coff
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
 		;;
 	OSE68000 | ose68000)
 		basic_machine=m68000-ericsson
@@ -759,6 +923,14 @@ case $basic_machine in
 		basic_machine=i860-intel
 		os=-osf
 		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	pbd)
 		basic_machine=sparc-tti
 		;;
@@ -768,6 +940,12 @@ case $basic_machine in
 	pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	pentium | p5 | k5 | k6 | nexgen | viac3)
 		basic_machine=i586-pc
 		;;
@@ -797,9 +975,10 @@ case $basic_machine in
 		;;
 	power)	basic_machine=power-ibm
 		;;
-	ppc)	basic_machine=powerpc-unknown
+	ppc | ppcbe)	basic_machine=powerpc-unknown
 		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
 		;;
 	ppcle | powerpclittle | ppc-le | powerpc-little)
 		basic_machine=powerpcle-unknown
@@ -824,6 +1003,10 @@ case $basic_machine in
 		basic_machine=i586-unknown
 		os=-pw32
 		;;
+	rdos)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
 	rom68k)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -850,6 +1033,10 @@ case $basic_machine in
 	sb1el)
 		basic_machine=mipsisa64sb1el-unknown
 		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
 	sei)
 		basic_machine=mips-sei
 		os=-seiux
@@ -861,6 +1048,9 @@ case $basic_machine in
 		basic_machine=sh-hitachi
 		os=-hms
 		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
 	sh64)
 		basic_machine=sh64-unknown
 		;;
@@ -882,6 +1072,9 @@ case $basic_machine in
 		basic_machine=i860-stratus
 		os=-sysv4
 		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	sun2)
 		basic_machine=m68000-sun
 		;;
@@ -938,17 +1131,9 @@ case $basic_machine in
 		basic_machine=t90-cray
 		os=-unicos
 		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
+	tile*)
+		basic_machine=$basic_machine-unknown
+		os=-linux-gnu
 		;;
 	tx39)
 		basic_machine=mipstx39-unknown
@@ -963,6 +1148,10 @@ case $basic_machine in
 	tower | tower-32)
 		basic_machine=m68k-ncr
 		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
 	udi29k)
 		basic_machine=a29k-amd
 		os=-udi
@@ -1006,9 +1195,16 @@ case $basic_machine in
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
 	ymp)
 		basic_machine=ymp-cray
 		os=-unicos
@@ -1017,6 +1213,10 @@ case $basic_machine in
 		basic_machine=z8k-unknown
 		os=-sim
 		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
 	none)
 		basic_machine=none-none
 		os=-none
@@ -1036,6 +1236,9 @@ case $basic_machine in
 	romp)
 		basic_machine=romp-ibm
 		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
 	rs6000)
 		basic_machine=rs6000-ibm
 		;;
@@ -1052,13 +1255,10 @@ case $basic_machine in
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparc | sparcv9 | sparcv9b)
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
 		basic_machine=sparc-sun
 		;;
 	cydra)
@@ -1102,9 +1302,12 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
+	# First match some system type aliases
+	# that might get confused with valid system types.
 	# -solaris* is a basic system type, with this one exception.
+	-auroraux)
+		os=-auroraux
+		;;
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
 		;;
@@ -1125,25 +1328,31 @@ case $os in
 	# Each alternative MUST END IN A *, to match a version number.
 	# -sysv* is not here because it comes later, after sysvr4.
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
+	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -mingw32* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1161,7 +1370,7 @@ case $os in
 		os=`echo $os | sed -e 's|nto|nto-qnx|'`
 		;;
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
 	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 		;;
 	-mac*)
@@ -1182,6 +1391,9 @@ case $os in
 	-opened*)
 		os=-openedition
 		;;
+	-os400*)
+		os=-os400
+		;;
 	-wince*)
 		os=-wince
 		;;
@@ -1203,6 +1415,9 @@ case $os in
 	-atheos*)
 		os=-atheos
 		;;
+	-syllable*)
+		os=-syllable
+		;;
 	-386bsd)
 		os=-bsd
 		;;
@@ -1225,6 +1440,9 @@ case $os in
 	-sinix*)
 		os=-sysv4
 		;;
+	-tpf*)
+		os=-tpf
+		;;
 	-triton*)
 		os=-sysv3
 		;;
@@ -1261,6 +1479,14 @@ case $os in
 	-kaos*)
 		os=-kaos
 		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-dicos*)
+		os=-dicos
+		;;
+	-nacl*)
+		;;
 	-none)
 		;;
 	*)
@@ -1283,6 +1509,12 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
+	score-*)
+		os=-elf
+		;;
+	spu-*)
+		os=-elf
+		;;
 	*-acorn)
 		os=-riscix1.2
 		;;
@@ -1292,9 +1524,18 @@ case $basic_machine in
 	arm*-semi)
 		os=-aout
 		;;
-    c4x-* | tic4x-*)
-        os=-coff
-        ;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
+		;;
 	# This must come before the *-dec entry.
 	pdp10-*)
 		os=-tops20
@@ -1320,6 +1561,9 @@ case $basic_machine in
 	m68*-cisco)
 		os=-aout
 		;;
+	mep-*)
+		os=-elf
+		;;
 	mips*-cisco)
 		os=-elf
 		;;
@@ -1338,9 +1582,15 @@ case $basic_machine in
 	*-be)
 		os=-beos
 		;;
+	*-haiku)
+		os=-haiku
+		;;
 	*-ibm)
 		os=-aix
 		;;
+	*-knuth)
+		os=-mmixware
+		;;
 	*-wec)
 		os=-proelf
 		;;
@@ -1443,7 +1693,7 @@ case $basic_machine in
 			-sunos*)
 				vendor=sun
 				;;
-			-aix*)
+			-cnk*|-aix*)
 				vendor=ibm
 				;;
 			-beos*)
@@ -1473,9 +1723,15 @@ case $basic_machine in
 			-mvs* | -opened*)
 				vendor=ibm
 				;;
+			-os400*)
+				vendor=ibm
+				;;
 			-ptx*)
 				vendor=sequent
 				;;
+			-tpf*)
+				vendor=ibm
+				;;
 			-vxsim* | -vxworks* | -windiss*)
 				vendor=wrs
 				;;
@@ -1500,7 +1756,7 @@ case $basic_machine in
 esac
 
 echo $basic_machine$os
-exit 0
+exit
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/configure b/configure
index 057558b..85675a3 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
-# From configure.ac Revision: 4.8 .
+# From configure.ac Revision: 4.8.1.6 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for WCSLIB 4.8.
+# Generated by GNU Autoconf 2.61 for WCSLIB 4.8.3.
 #
 # Report bugs to <mcalabre at atnf.csiro.au>.
 #
@@ -574,9 +574,9 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
 PACKAGE_NAME='WCSLIB'
-PACKAGE_TARNAME='wcslib-4.8'
-PACKAGE_VERSION='4.8'
-PACKAGE_STRING='WCSLIB 4.8'
+PACKAGE_TARNAME='wcslib-4.8.3'
+PACKAGE_VERSION='4.8.3'
+PACKAGE_STRING='WCSLIB 4.8.3'
 PACKAGE_BUGREPORT='mcalabre at atnf.csiro.au'
 
 ac_unique_file="C/wcs.h"
@@ -677,6 +677,7 @@ ac_ct_F77
 FLIBS
 RANLIB
 SHRLIB
+SONAME
 SHRFLAGS
 SHRLD
 SHRSFX
@@ -1210,7 +1211,7 @@ 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 WCSLIB 4.8 to adapt to many kinds of systems.
+\`configure' configures WCSLIB 4.8.3 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1258,7 +1259,7 @@ Fine tuning of the installation directories:
   --infodir=DIR          info documentation [DATAROOTDIR/info]
   --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
   --mandir=DIR           man documentation [DATAROOTDIR/man]
-  --docdir=DIR           documentation root [DATAROOTDIR/doc/wcslib-4.8]
+  --docdir=DIR           documentation root [DATAROOTDIR/doc/wcslib-4.8.3]
   --htmldir=DIR          html documentation [DOCDIR]
   --dvidir=DIR           dvi documentation [DOCDIR]
   --pdfdir=DIR           pdf documentation [DOCDIR]
@@ -1278,7 +1279,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of WCSLIB 4.8:";;
+     short | recursive ) echo "Configuration of WCSLIB 4.8.3:";;
    esac
   cat <<\_ACEOF
 
@@ -1378,7 +1379,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-WCSLIB configure 4.8
+WCSLIB configure 4.8.3
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1392,7 +1393,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by WCSLIB $as_me 4.8, which was
+It was created by WCSLIB $as_me 4.8.3, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -1754,8 +1755,8 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-# Remove the patch number from the library version.
-LIBVER=`echo "$PACKAGE_VERSION" | sed -e '{s/\./-/;s/\.[0-9]*$//;s/-/./;}'`
+# Library version number, same as package version.
+LIBVER="$PACKAGE_VERSION"
 
 
 
@@ -9824,6 +9825,8 @@ fi
 
 # Shared library generation.
 if test "x$ac_cv_c_compiler_gnu" = xyes ; then
+  SHVER=`echo "$LIBVER" | sed -e 's/\..*$//'`
+
   # Note that -fPIC is on by default for Macs, this just makes it obvious.
   SHRFLAGS="-fPIC"
   SHRLD="\$(CC) \$(SHRFLAGS)"
@@ -9831,13 +9834,14 @@ if test "x$ac_cv_c_compiler_gnu" = xyes ; then
   case "$build_os" in
   darwin*)
     SHRLIB="libwcs.$LIBVER.dylib"
+    SONAME="libwcs.$SHVER.dylib"
     SHRLD="$SHRLD -dynamiclib -single_module"
-    SHRLD="$SHRLD -compatibility_version $LIBVER -current_version $LIBVER"
+    SHRLD="$SHRLD -compatibility_version $SHVER -current_version $LIBVER"
     SHRLN=
 
     case "$build_cpu" in
     powerpc*)
-      # Switch off -fPIC (not applicable for Intel Macs).
+      # Switch off -fPIC (not applicable for PowerPC Macs).
       CFLAGS="$CFLAGS -mdynamic-no-pic"
       ;;
     esac
@@ -9845,13 +9849,15 @@ if test "x$ac_cv_c_compiler_gnu" = xyes ; then
   *)
     # Covers Linux and Solaris at least.
     SHRLIB="libwcs.so.$LIBVER"
-    SHRLD="$SHRLD -shared -Wl,-h\$(SHRLIB)"
+    SONAME="libwcs.so.$SHVER"
+    SHRLD="$SHRLD -shared -Wl,-h\$(SONAME) -lm"
     SHRLN="libwcs.so"
     ;;
   esac
 
 else
   SHRLIB=
+  SONAME=
   SHRFLAGS=
   SHRLD=
   SHRSFX=
@@ -9864,6 +9870,7 @@ fi
 
 
 
+
 # Installation utilities.
 { echo "$as_me:$LINENO: checking whether ln -s works" >&5
 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
@@ -12508,7 +12515,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by WCSLIB $as_me 4.8, which was
+This file was extended by WCSLIB $as_me 4.8.3, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -12557,7 +12564,7 @@ Report bugs to <bug-autoconf at gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-WCSLIB config.status 4.8
+WCSLIB config.status 4.8.3
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -12793,6 +12800,7 @@ ac_ct_F77!$ac_ct_F77$ac_delim
 FLIBS!$FLIBS$ac_delim
 RANLIB!$RANLIB$ac_delim
 SHRLIB!$SHRLIB$ac_delim
+SONAME!$SONAME$ac_delim
 SHRFLAGS!$SHRFLAGS$ac_delim
 SHRLD!$SHRLD$ac_delim
 SHRSFX!$SHRSFX$ac_delim
@@ -12813,7 +12821,7 @@ INSTDIR!$INSTDIR$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 79; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 80; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/configure.ac b/configure.ac
index ed89c4b..865d9e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,23 +2,23 @@
 # Process this file with autoconf-2.53 or later to produce a configure script.
 #-----------------------------------------------------------------------------
 # N.B. it is necessary to run autoconf on a Mac in order for configure to
-# locate the X11 dylibs for PGPLOT.  Use autoconf-2.61 in MacOSX 10.6.2 to
-# avoid spurious messages about deleting conftest.dSYM when configuring in
-# MacOSX 10.6.
+# locate the X11 dylibs for PGPLOT.  Use autoconf-2.61 in MacOSX 10.6.2 or
+# later to avoid spurious messages about deleting conftest.dSYM when
+# configuring in MacOSX 10.6.
 #
 # Author: Mark Calabretta, Australia Telescope National Facility
 # http://www.atnf.csiro.au/~mcalabre/index.html
-# $Id: configure.ac,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+# $Id: configure.ac,v 4.8.1.6 2011/11/17 05:32:10 cal103 Exp cal103 $
 #-----------------------------------------------------------------------------
 
-AC_INIT([WCSLIB], [4.8], [mcalabre at atnf.csiro.au], [wcslib-4.8])
+AC_INIT([WCSLIB], [4.8.3], [mcalabre at atnf.csiro.au], [wcslib-4.8.3])
 AC_PREREQ([2.53])
-AC_REVISION([$Revision: 4.8 $])
+AC_REVISION([$Revision: 4.8.1.6 $])
 AC_SUBST([PACKAGE_VERSION])
 AC_DEFINE_UNQUOTED([WCSLIB_VERSION], [$PACKAGE_VERSION], [Define wcslib version])
 
-# Remove the patch number from the library version.
-LIBVER=`echo "$PACKAGE_VERSION" | sed -e '{s/\./-/;s/\.[[0-9]]*$//;s/-/./;}'`
+# Library version number, same as package version.
+LIBVER="$PACKAGE_VERSION"
 AC_SUBST([LIBVER])
 
 AC_CONFIG_SRCDIR([C/wcs.h])
@@ -236,6 +236,8 @@ AC_PROG_RANLIB
 
 # Shared library generation.
 if test "x$ac_cv_c_compiler_gnu" = xyes ; then
+  SHVER=`echo "$LIBVER" | sed -e 's/\..*$//'`
+
   # Note that -fPIC is on by default for Macs, this just makes it obvious.
   SHRFLAGS="-fPIC"
   SHRLD="\$(CC) \$(SHRFLAGS)"
@@ -243,13 +245,14 @@ if test "x$ac_cv_c_compiler_gnu" = xyes ; then
   case "$build_os" in
   darwin*)
     SHRLIB="libwcs.$LIBVER.dylib"
+    SONAME="libwcs.$SHVER.dylib"
     SHRLD="$SHRLD -dynamiclib -single_module"
-    SHRLD="$SHRLD -compatibility_version $LIBVER -current_version $LIBVER"
+    SHRLD="$SHRLD -compatibility_version $SHVER -current_version $LIBVER"
     SHRLN=
 
     case "$build_cpu" in
     powerpc*)
-      # Switch off -fPIC (not applicable for Intel Macs).
+      # Switch off -fPIC (not applicable for PowerPC Macs).
       CFLAGS="$CFLAGS -mdynamic-no-pic"
       ;;
     esac
@@ -257,13 +260,15 @@ if test "x$ac_cv_c_compiler_gnu" = xyes ; then
   *)
     # Covers Linux and Solaris at least.
     SHRLIB="libwcs.so.$LIBVER"
-    SHRLD="$SHRLD -shared -Wl,-h\$(SHRLIB)"
+    SONAME="libwcs.so.$SHVER"
+    SHRLD="$SHRLD -shared -Wl,-h\$(SONAME) -lm"
     SHRLN="libwcs.so"
     ;;
   esac
 
 else
   SHRLIB=
+  SONAME=
   SHRFLAGS=
   SHRLD=
   SHRSFX=
@@ -271,6 +276,7 @@ else
 fi
 
 AC_SUBST([SHRLIB])
+AC_SUBST([SONAME])
 AC_SUBST([SHRFLAGS])
 AC_SUBST([SHRLD])
 AC_SUBST([SHRSFX])
@@ -512,6 +518,5 @@ AC_MSG_NOTICE([End of auxiliary configuration.
 # Do it.
 AC_MSG_NOTICE([Configuring files...])
 AC_CONFIG_FILES([makedefs wcslib.pc])
-AC_CONFIG_HEADERS([wcsconfig.h wcsconfig_f77.h wcsconfig_tests.h
-                   wcsconfig_utils.h])
+AC_CONFIG_HEADERS([wcsconfig.h wcsconfig_f77.h wcsconfig_tests.h wcsconfig_utils.h])
 AC_OUTPUT
diff --git a/doxygen/Doxyfile b/doxygen/Doxyfile
index ad8b008..3be660e 100644
--- a/doxygen/Doxyfile
+++ b/doxygen/Doxyfile
@@ -17,7 +17,7 @@
 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded
 # by quotes) that should identify the project.
 
-PROJECT_NAME           = "WCSLIB 4.8"
+PROJECT_NAME           = "WCSLIB 4.8.3"
 
 # The PROJECT_NUMBER tag can be used to enter a project or revision number.
 # This could be handy for archiving the generated documentation or
diff --git a/doxygen/GNUmakefile b/doxygen/GNUmakefile
index b36736e..5c0e4e3 100644
--- a/doxygen/GNUmakefile
+++ b/doxygen/GNUmakefile
@@ -15,7 +15,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility
 # http://www.atnf.csiro.au/~mcalabre/index.html
-# $Id: GNUmakefile,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+# $Id: GNUmakefile,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 #-----------------------------------------------------------------------------
 # Get configure settings.
 include ../makedefs
diff --git a/doxygen/README b/doxygen/README
index 13d5365..82ec9bf 100644
--- a/doxygen/README
+++ b/doxygen/README
@@ -26,4 +26,4 @@ generated latex manual.
 
 Author: Mark Calabretta, Australia Telescope National Facility
 http://www.atnf.csiro.au/~mcalabre/index.html
-$Id: README,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+$Id: README,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
diff --git a/doxygen/doxextr.l b/doxygen/doxextr.l
index 2ba8d78..fc1a217 100644
--- a/doxygen/doxextr.l
+++ b/doxygen/doxextr.l
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: doxextr.l,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+  $Id: doxextr.l,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=============================================================================
 *
 * doxextr.l is a Flex description file containing a lexical scanner definition
diff --git a/doxygen/mainpage.dox b/doxygen/mainpage.dox
index 2f19307..c6cd991 100644
--- a/doxygen/mainpage.dox
+++ b/doxygen/mainpage.dox
@@ -1,4 +1,4 @@
-/** @mainpage WCSLIB 4.8 and PGSBOX 4.8
+/** @mainpage WCSLIB 4.8.3 and PGSBOX 4.8.3
 
 @image html Bonne.gif "Bonne's projection"
 
@@ -977,5 +977,5 @@ g77.
 /*
 Author: Mark Calabretta, Australia Telescope National Facility
 http://www.atnf.csiro.au/~mcalabre/index.html
-$Id: mainpage.dox,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+$Id: mainpage.dox,v 4.8.1.4 2011/11/17 05:31:36 cal103 Exp cal103 $
 */
diff --git a/flavours b/flavours
index b52610a..1541823 100644
--- a/flavours
+++ b/flavours
@@ -12,7 +12,7 @@
 #
 # Reminder: add '-d' to FLFLAGS for debugging.
 #
-# $Id: flavours,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+# $Id: flavours,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 #-----------------------------------------------------------------------------
 
 # The list of FLAVOURs can be set on the command line.
diff --git a/makedefs.in b/makedefs.in
index 856d40b..f6d14cc 100644
--- a/makedefs.in
+++ b/makedefs.in
@@ -74,7 +74,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility
 # http://www.atnf.csiro.au/~mcalabre/index.html
-# $Id: makedefs.in,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+# $Id: makedefs.in,v 4.8.1.3 2011/10/04 07:55:20 cal103 Exp cal103 $
 #-----------------------------------------------------------------------------
 # Version.
   LIBVER    := @LIBVER@
@@ -106,6 +106,7 @@
 
 # Shared (dynamic) library (see note 3 above).
   SHRLIB   := @SHRLIB@
+  SONAME   := @SONAME@
   SHRFLAGS := @SHRFLAGS@
   SHRLD    := @SHRLD@
   SHRLN    := @SHRLN@
@@ -135,6 +136,7 @@
   DOCDIR   := $(DESTDIR)@docdir@
   HTMLDIR  := $(DESTDIR)@htmldir@
   PDFDIR   := $(DESTDIR)@pdfdir@
+  MANDIR   := $(DESTDIR)@mandir@
 
 # For putting timestamps in the build log.
   TIMER    := date +"%a %Y/%m/%d %X %z, executing on $$HOST"
@@ -200,6 +202,7 @@ show :: wcsconfig.h
 	-@ echo '  WCSLIB      := $(WCSLIB)'
 	-@ echo '  RANLIB      := $(RANLIB)'
 	-@ echo '  SHRLIB      := $(SHRLIB)'
+	-@ echo '  SONAME      := $(SONAME)'
 	-@ echo '  SHRFLAGS    := $(SHRFLAGS)'
 	-@ echo '  SHRLD       := $(SHRLD)'
 	-@ echo '  SHRLN       := $(SHRLN)'
@@ -212,6 +215,7 @@ show :: wcsconfig.h
 	-@ echo '  DOCDIR      := $(DOCDIR)'
 	-@ echo '  HTMLDIR     := $(HTMLDIR)'
 	-@ echo '  PDFDIR      := $(PDFDIR)'
+	-@ echo '  MANDIR      := $(MANDIR)'
 	-@ echo '  TIMER       := $(TIMER)'
 	-@ echo ''
 	-@ echo 'Important wcsconfig.h defines...'
diff --git a/pgsbox/GNUmakefile b/pgsbox/GNUmakefile
index be9c0cd..3164b5a 100644
--- a/pgsbox/GNUmakefile
+++ b/pgsbox/GNUmakefile
@@ -31,7 +31,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility
 # http://www.atnf.csiro.au/~mcalabre/index.html
-# $Id: GNUmakefile,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+# $Id: GNUmakefile,v 4.8.1.2 2011/09/16 04:41:29 cal103 Exp cal103 $
 #-----------------------------------------------------------------------------
 # Get configure settings.
 include ../makedefs
@@ -48,6 +48,7 @@ WCSLIB   := ../C/$(WCSLIB)
 PICLIB := libpgsbox-PIC.a
 WCSSHR := ../C/$(SHRLIB)
 SHRLIB := $(subst libwcs,libpgsbox,$(SHRLIB))
+SONAME := $(subst libwcs,libpgsbox,$(SONAME))
 SHRLD  := $(subst libwcs,libpgsbox,$(SHRLD))
 SHRLN  := $(subst libwcs,libpgsbox,$(SHRLN))
 
@@ -129,11 +130,15 @@ install : build
 	   $(LN_S) $(PGSBOXLIB) $(LIBDIR)/libpgsbox.a
 	-  if [ "$(SHRLIB)" != "" ] ; then \
 	     $(INSTALL) -m 644 $(SHRLIB) $(LIBDIR) ; \
+	     if [ -h "$(LIBDIR)/$(SONAME)" ] ; then \
+	       $(RM) $(LIBDIR)/$(SONAME) ; \
+	     fi ; \
+	     $(LN_S) $(SHRLIB) $(LIBDIR)/$(SONAME) ; \
 	     if [ "$(SHRLN)" != "" ] ; then \
 	       if [ -h "$(LIBDIR)/$(SHRLN)" ] ; then \
 	         $(RM) $(LIBDIR)/$(SHRLN) ; \
 	       fi ; \
-	       $(LN_S) $(SHRLIB) $(LIBDIR)/$(SHRLN) ; \
+	       $(LN_S) $(SONAME) $(LIBDIR)/$(SHRLN) ; \
 	     fi ; \
 	   fi
 	   $(INSTALL) -m 444 *.h $(INCDIR)
@@ -201,6 +206,7 @@ show ::
 	-@ echo '  PICLIB      := $(PICLIB)'
 	-@ echo '  WCSSHR      := $(WCSSHR)'
 	-@ echo '  SHRLIB      := $(SHRLIB)'
+	-@ echo '  SONAME      := $(SONAME)'
 	-@ echo '  SHRFLAGS    := $(SHRFLAGS)'
 	-@ echo '  SHRLD       := $(SHRLD)'
 	-@ echo '  SHRLN       := $(SHRLN)'
diff --git a/pgsbox/cpgsbox.c b/pgsbox/cpgsbox.c
index 06d7a86..46dfa62 100644
--- a/pgsbox/cpgsbox.c
+++ b/pgsbox/cpgsbox.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: cpgsbox.c,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+  $Id: cpgsbox.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <string.h>
diff --git a/pgsbox/cpgsbox.h b/pgsbox/cpgsbox.h
index c447216..cf593da 100644
--- a/pgsbox/cpgsbox.h
+++ b/pgsbox/cpgsbox.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: cpgsbox.h,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+  $Id: cpgsbox.h,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=============================================================================
 *
 * cpgsbox() and cpglbox() are C wrappers for PGSBOX and PGLBOX.  Refer to the
diff --git a/pgsbox/cpgtest.c b/pgsbox/cpgtest.c
index d7aee3d..84eff5d 100644
--- a/pgsbox/cpgtest.c
+++ b/pgsbox/cpgtest.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: cpgtest.c,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+  $Id: cpgtest.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=============================================================================
 *
 *   cpgtest
diff --git a/pgsbox/fscan.f b/pgsbox/fscan.f
index 140a464..65ad7cc 100644
--- a/pgsbox/fscan.f
+++ b/pgsbox/fscan.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: fscan.f,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+* $Id: fscan.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 *
 * FSCAN defines an azimuth/frequency coordinate system for PGSBOX.
diff --git a/pgsbox/lngvel.f b/pgsbox/lngvel.f
index 631f8ec..0a3b7a8 100644
--- a/pgsbox/lngvel.f
+++ b/pgsbox/lngvel.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: lngvel.f,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+* $Id: lngvel.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 *
 * LNGVEL defines a longitude/velocity coordinate system for PGSBOX.
diff --git a/pgsbox/pgcrfn.f b/pgsbox/pgcrfn.f
index 363eda3..01920e5 100644
--- a/pgsbox/pgcrfn.f
+++ b/pgsbox/pgcrfn.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: pgcrfn.f,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+* $Id: pgcrfn.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 *
 * PGCRFN defines separable pairs of non-linear coordinate systems for
diff --git a/pgsbox/pgcrvl.f b/pgsbox/pgcrvl.f
index 094497b..0e3a25d 100644
--- a/pgsbox/pgcrvl.f
+++ b/pgsbox/pgcrvl.f
@@ -21,7 +21,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: pgcrvl.f,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+* $Id: pgcrvl.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
       SUBROUTINE PGCRVL (AXEN, IDENTS, OPT, LABCTL, LABDEN, CI, GCODE,
      :   TIKLEN, NG1, GRID1, NG2, GRID2, DOEQ, NLFUNC, NLC, NLI, NLD,
diff --git a/pgsbox/pgsbox.f b/pgsbox/pgsbox.f
index ef1c8fe..ee951fb 100644
--- a/pgsbox/pgsbox.f
+++ b/pgsbox/pgsbox.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: pgsbox.f,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+* $Id: pgsbox.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
 *
 * PGSBOX draws and labels a curvilinear coordinate grid.  The caller
diff --git a/pgsbox/pgtest.f b/pgsbox/pgtest.f
index 2e5491a..be326a2 100644
--- a/pgsbox/pgtest.f
+++ b/pgsbox/pgtest.f
@@ -28,7 +28,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility
 * http://www.atnf.csiro.au/~mcalabre/index.html
-* $Id: pgtest.f,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+* $Id: pgtest.f,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=======================================================================
       PROGRAM PGTEST
 *=======================================================================
diff --git a/pgsbox/pgwcsl.c b/pgsbox/pgwcsl.c
index eb57924..84c8469 100644
--- a/pgsbox/pgwcsl.c
+++ b/pgsbox/pgwcsl.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: pgwcsl.c,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+  $Id: pgwcsl.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/pgsbox/pgwcsl.h b/pgsbox/pgwcsl.h
index dcba6f8..ee5461a 100644
--- a/pgsbox/pgwcsl.h
+++ b/pgsbox/pgwcsl.h
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: pgwcsl.h,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+  $Id: pgwcsl.h,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=============================================================================
 *
 *   pgwcsl_() is an NLFUNC for PGSBOX that defines curvilinear celestial
diff --git a/utils/GNUmakefile b/utils/GNUmakefile
index 959fcbf..19eef63 100644
--- a/utils/GNUmakefile
+++ b/utils/GNUmakefile
@@ -5,8 +5,8 @@
 # ---------------------------
 #   build:     Build all utilities.
 #   clean (or cleaner): Delete intermediate object files.
-#   cleanest (distclean, or realclean): cleaner, and also delete the
-#              executables.
+#   distclean (or realclean): cleaner, and also delete the executables.
+#   cleanest: distclean, and also delete the man pages.
 #
 # Notes:
 #   1: If you need to make changes then preferably modify ../makedefs.in
@@ -17,7 +17,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility
 # http://www.atnf.csiro.au/~mcalabre/index.html
-# $Id: GNUmakefile,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+# $Id: GNUmakefile,v 4.8.1.2 2011/10/04 07:54:06 cal103 Exp cal103 $
 #-----------------------------------------------------------------------------
 # Get configure settings.
 include ../makedefs
@@ -36,6 +36,8 @@ ifneq "$(CFITSIOLIB)" ""
 endif
 endif
 
+MAN := $(addsuffix .1,$(UTILS))
+
 WCSLIB    := ../C/$(WCSLIB)
 PGSBOXLIB := ../pgsbox/libpgsbox-$(LIBVER).a
 
@@ -52,7 +54,7 @@ vpath %.in ..
 # Static and static pattern rules
 #--------------------------------
 
-.PHONY : build clean cleaner cleanest distclean install realclean
+.PHONY : build clean cleaner cleanest distclean install man realclean
 
 build : $(UTILS)
 
@@ -90,9 +92,12 @@ wcsgrid : wcsgrid.c $(PGSBOXLIB) $(GETWCSTAB) $(WCSLIB)
 clean cleaner :
 	-  $(RM) -r *.o *.i a.out core *.dSYM $(EXTRA_CLEAN)
 
-cleanest distclean realclean : cleaner
+distclean realclean : cleaner
 	-  $(RM) $(UTILS)
 
+cleanest : distclean
+	-  $(RM) $(MAN)
+
 $(PGSBOXLIB) :
 	-@ echo ''
 	   $(MAKE) -C ../pgsbox lib
@@ -106,6 +111,10 @@ install : build
 	     $(INSTALL) -d -m 2775 $(BINDIR) ; \
 	   fi
 	   $(INSTALL) -m 755 $(UTILS) $(BINDIR)
+	-  if [ ! -d "$(MANDIR)" ] ; then \
+	     $(INSTALL) -d -m 2775 $(MANDIR)/man1 ; \
+	   fi
+	   $(INSTALL) -m 755 $(MAN) $(MANDIR)/man1
 
 GNUmakefile : ../makedefs ;
 
@@ -114,6 +123,25 @@ GNUmakefile : ../makedefs ;
 	-@ $(RM) ../wcsconfig.h ../wcsconfig_utils.h
 	   cd .. && ./config.status
 
+man : $(MAN)
+
+fitshdr.1 : fitshdr
+	help2man --no-discard-stderr --version-string=$(LIBVER) \
+	  -n "List headers from a FITS file" -N ./$< > $@
+
+wcsware.1 : wcsware
+	help2man --no-discard-stderr --version-string=$(LIBVER) \
+	  -n "Extract WCS keywords for an image" -N ./$< > $@
+
+wcsgrid.1 : wcsgrid
+	help2man --no-discard-stderr --version-string=$(LIBVER) \
+	  -n "Extract WCS keywords for an image" -N ./$< > $@
+
+HPXcvt.1 : HPXcvt
+	help2man --no-discard-stderr --version-string=$(LIBVER) \
+	  -n "Reorganise HEALPix data into a 2-D FITS image" -N ./$< > $@
+
+# Dependency lists.
 fitshdr : wcsconfig.h wcsconfig_utils.h
 wcsware : getwcstab.h wcs.h wcsfix.h wcshdr.h
 wcsgrid : cpgsbox.h getwcstab.h wcs.h wcsfix.h wcshdr.h
diff --git a/utils/HPXcvt.1 b/utils/HPXcvt.1
new file mode 100644
index 0000000..6b7bf41
--- /dev/null
+++ b/utils/HPXcvt.1
@@ -0,0 +1,38 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
+.TH HPXCVT "1" "November 2011" "HPXcvt 4.8.3" "User Commands"
+.SH NAME
+HPXcvt \- Reorganise HEALPix data into a 2-D FITS image
+.SH SYNOPSIS
+.B HPXcvt
+[\fI-C<col>\fR] [\fI-c<sys>\fR] [\fI-n|-r\fR] [\fI-q<quad>\fR] [\fI-x<n|s>\fR]
+.SH DESCRIPTION
+.IP
+[<infile> [<outfile>]]
+.PP
+HPXcvt reorganises HEALPix data into a 2\-D FITS image with HPX coordinate
+system.  The input data may be stored in a FITS file as a primary image
+or image extension, or as a binary table extension.  Both NESTED and RING
+pixel indices are supported.  The input and output files may be omitted or
+specified as "\-" to indicate stdin and stdout respectively.
+.SH OPTIONS
+.TP
+\fB\-C\fR<col>
+Binary table column number from which to read data,
+default 1 (n.b. WMAP exclusion masks are in column 2).
+.TP
+\fB\-c\fR<sys>
+Specify the coordinate system to be used to label the
+output map if the COORDSYS keyword is absent from the input
+FITS header.  Recognised values are g (galactic),
+e (ecliptic) or q (equatorial).
+.TP
+\fB\-n\fR|\-r
+Assume n(ested) or r(ing) organization if the ORDERING
+keyword is absent from the input FITS header.
+.TP
+\fB\-q\fR<quad>
+Recentre longitude at quad(mod 4) x 90 degrees, where
+quad(rant) is an integer.
+.TP
+\fB\-x\fR<n|s>
+Use a north\-polar or south\-polar layout.
diff --git a/utils/HPXcvt.c b/utils/HPXcvt.c
index fc2f53e..3559dbe 100644
--- a/utils/HPXcvt.c
+++ b/utils/HPXcvt.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: HPXcvt.c,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+  $Id: HPXcvt.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=============================================================================
 *
 * HPXcvt reorganises HEALPix data into a 2-D FITS image.  Refer to the usage
diff --git a/utils/fitshdr.1 b/utils/fitshdr.1
new file mode 100644
index 0000000..818de00
--- /dev/null
+++ b/utils/fitshdr.1
@@ -0,0 +1,15 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
+.TH FITSHDR "1" "November 2011" "fitshdr 4.8.3" "User Commands"
+.SH NAME
+fitshdr \- List headers from a FITS file
+.SH SYNOPSIS
+.B fitshdr
+[\fI-q N\fR] [\fI<infile>\fR]
+.SH DESCRIPTION
+List headers from a FITS file specified on the command line, or else on
+stdin, printing them as 80\-character keyrecords without trailing blanks.
+.SH OPTIONS
+.TP
+\fB\-q\fR N
+Quit after reading the Nth header, where N is an integer
+(optional space between \fB\-q\fR and N).
diff --git a/utils/fitshdr.c b/utils/fitshdr.c
index ff1afca..864a129 100644
--- a/utils/fitshdr.c
+++ b/utils/fitshdr.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: fitshdr.c,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+  $Id: fitshdr.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=============================================================================
 * Usage: fitshdr [infile]
 *-----------------------------------------------------------------------------
diff --git a/utils/wcsgrid.1 b/utils/wcsgrid.1
new file mode 100644
index 0000000..fbb6139
--- /dev/null
+++ b/utils/wcsgrid.1
@@ -0,0 +1,27 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
+.TH WCSGRID "1" "November 2011" "wcsgrid 4.8.3" "User Commands"
+.SH NAME
+wcsgrid \- Extract WCS keywords for an image
+.SH SYNOPSIS
+.B wcsgrid
+[\fI-a<alt>\fR] [\fI-d<pgdev>\fR] [\fI-h<hdu>\fR] [\fI<fitsfile>\fR]
+.SH DESCRIPTION
+wcsgrid extracts the WCS keywords for an image from the specified FITS
+file and uses pgsbox() to plot a 2\-D coordinate graticule for each
+alternate representation found.
+.PP
+The FITS file may be specified according to the syntax understood by
+cfitsio, for example "file.fits.gz+1" refers to the first extension of
+a gzip'd FITS file.  Use "\-" or omit the file name for input from stdin.
+.SH OPTIONS
+.TP
+\fB\-a\fR<alt>
+Plot a graticule only for the alternate representation
+specified (ignored if there is only one).
+.TP
+\fB\-d\fR<pgdev>
+PGPLOT device type (default XWINDOW, use "?" for list).
+.TP
+\fB\-h\fR<hdu>
+Move to HDU number (1\-relative) which is expected to
+contain an image array.  (Useful for input from stdin.)
diff --git a/utils/wcsgrid.c b/utils/wcsgrid.c
index d715339..b189121 100644
--- a/utils/wcsgrid.c
+++ b/utils/wcsgrid.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsgrid.c,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+  $Id: wcsgrid.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=============================================================================
 *
 * wcsgrid extracts the WCS keywords for an image from the specified FITS file
diff --git a/utils/wcsware.1 b/utils/wcsware.1
new file mode 100644
index 0000000..e266556
--- /dev/null
+++ b/utils/wcsware.1
@@ -0,0 +1,38 @@
+.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
+.TH WCSWARE "1" "November 2011" "wcsware 4.8.3" "User Commands"
+.SH NAME
+wcsware \- Extract WCS keywords for an image
+.SH SYNOPSIS
+.B wcsware
+[\fI-a<alt>\fR] [\fI-f\fR] [\fI-h<hdu>\fR] [\fI-p\fR] [\fI-x\fR] [\fI<fitsfile>\fR]
+.SH DESCRIPTION
+wcsware extracts the WCS keywords for an image from the specified FITS
+file, constructs wcsprm structs for each coordinate representation found
+and performs a variety of operations using them.
+.PP
+The FITS file may be specified according to the syntax understood by
+cfitsio, for example "file.fits.gz+1" refers to the first extension of
+a gzip'd FITS file.  Use "\-" or omit the file name for input from stdin.
+.SH OPTIONS
+.TP
+\fB\-a\fR<alt>
+Specify an alternate coordinate representation to be used
+(ignored if there is only one).
+.TP
+\fB\-f\fR
+Apply wcsfix() to the header.
+.TP
+\fB\-h\fR<hdu>
+Move to HDU number (1\-relative) which is expected to
+contain an image array.  (Useful for input from stdin.)
+.TP
+\fB\-p\fR
+Print the struct(s) using wcsprt() (default operation).
+.TP
+\fB\-x\fR
+Convert pixel coordinates, obtained from stdin, to world
+coordinates using wcsp2s().
+.TP
+\fB\-w\fR
+Convert world coordinates, obtained from stdin, to pixel
+coordinates using wcss2p().
diff --git a/utils/wcsware.c b/utils/wcsware.c
index 437702b..16d4b00 100644
--- a/utils/wcsware.c
+++ b/utils/wcsware.c
@@ -28,7 +28,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility
   http://www.atnf.csiro.au/~mcalabre/index.html
-  $Id: wcsware.c,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+  $Id: wcsware.c,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *=============================================================================
 * wcsware extracts the WCS keywords for an image from the specified FITS file,
 * constructs wcsprm structs for each coordinate representation found and
diff --git a/wcsconfig.h.in b/wcsconfig.h.in
index 6d67bb7..7ed5e83 100644
--- a/wcsconfig.h.in
+++ b/wcsconfig.h.in
@@ -5,7 +5,7 @@
 *
 *   Author: Mark Calabretta, Australia Telescope National Facility
 *   http://www.atnf.csiro.au/~mcalabre/index.html
-*   $Id: wcsconfig.h.in,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+*   $Id: wcsconfig.h.in,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 /* WCSLIB library version number. */
diff --git a/wcsconfig_f77.h.in b/wcsconfig_f77.h.in
index a3dd2e4..be754a0 100644
--- a/wcsconfig_f77.h.in
+++ b/wcsconfig_f77.h.in
@@ -6,7 +6,7 @@
 *
 *   Author: Mark Calabretta, Australia Telescope National Facility
 *   http://www.atnf.csiro.au/~mcalabre/index.html
-*   $Id: wcsconfig_f77.h.in,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+*   $Id: wcsconfig_f77.h.in,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 /* Integer array type large enough to hold an address.  Set here to int[2] for
diff --git a/wcsconfig_tests.h.in b/wcsconfig_tests.h.in
index c9f61d4..c42f63d 100644
--- a/wcsconfig_tests.h.in
+++ b/wcsconfig_tests.h.in
@@ -6,7 +6,7 @@
 *
 *   Author: Mark Calabretta, Australia Telescope National Facility
 *   http://www.atnf.csiro.au/~mcalabre/index.html
-*   $Id: wcsconfig_tests.h.in,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+*   $Id: wcsconfig_tests.h.in,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <wcsconfig.h>
diff --git a/wcsconfig_utils.h.in b/wcsconfig_utils.h.in
index be07a61..0194048 100644
--- a/wcsconfig_utils.h.in
+++ b/wcsconfig_utils.h.in
@@ -6,7 +6,7 @@
 *
 *   Author: Mark Calabretta, Australia Telescope National Facility
 *   http://www.atnf.csiro.au/~mcalabre/index.html
-*   $Id: wcsconfig_utils.h.in,v 4.8 2011/08/15 08:05:55 cal103 Exp $
+*   $Id: wcsconfig_utils.h.in,v 4.8.1.1 2011/08/15 08:07:07 cal103 Exp cal103 $
 *===========================================================================*/
 
 #include <wcsconfig.h>

-- 
Implementation of the FITS WCS standard



More information about the debian-science-commits mailing list