Index: /trunk/ArchTOIPipe/Kernel/Makefile.in
===================================================================
--- /trunk/ArchTOIPipe/Kernel/Makefile.in	(revision 1787)
+++ /trunk/ArchTOIPipe/Kernel/Makefile.in	(revision 1788)
@@ -7,4 +7,5 @@
 CXX=@CXX@
 AR=@AR@
+ARFLAGS=@ARFLAGS@
 RANLIB=@RANLIB@
 CXXFLAGS=-O -g
@@ -61,6 +62,5 @@
 
 libatkern.a: $(FILES)
-	$(AR) -cr libatkern.a $(FILES)
-	$(RANLIB) libatkern.a
+	$(AR) $(ARFLAGS) libatkern.a $(FILES)
 	ln -sf kernel/libatkern.a ../libatkern.a
 
Index: /trunk/ArchTOIPipe/Makefile.in
===================================================================
--- /trunk/ArchTOIPipe/Makefile.in	(revision 1787)
+++ /trunk/ArchTOIPipe/Makefile.in	(revision 1788)
@@ -8,4 +8,5 @@
 CXX=@CXX@
 AR=@AR@
+ARFLAGS=@ARFLAGS@
 LIBS=@LIBS@
 CXXFLAGS=-O -g
Index: /trunk/ArchTOIPipe/ProcWSophya/Makefile.in
===================================================================
--- /trunk/ArchTOIPipe/ProcWSophya/Makefile.in	(revision 1787)
+++ /trunk/ArchTOIPipe/ProcWSophya/Makefile.in	(revision 1788)
@@ -7,4 +7,5 @@
 CXX=@CXX@
 AR=@AR@
+ARFLAGS=@ARFLAGS@
 RANLIB=@RANLIB@
 CXXFLAGS=-O -g
@@ -52,6 +53,5 @@
 
 libatsop.a: $(FILES)
-	$(AR) -cr libatsop.a $(FILES) 
-	$(RANLIB) libatsop.a
+	$(AR) $(ARFLAGS) libatsop.a $(FILES) 
 	ln -sf sophya/libatsop.a ../libatsop.a
 
Index: /trunk/ArchTOIPipe/Processors/Makefile.in
===================================================================
--- /trunk/ArchTOIPipe/Processors/Makefile.in	(revision 1787)
+++ /trunk/ArchTOIPipe/Processors/Makefile.in	(revision 1788)
@@ -7,4 +7,5 @@
 CXX=@CXX@
 AR=@AR@
+ARFLAGS=@ARFLAGS@
 RANLIB=@RANLIB@
 CXXFLAGS=-O -g
@@ -54,6 +55,5 @@
 
 libatproc.a: $(FILES)
-	$(AR) -cr libatproc.a $(FILES)  
-	$(RANLIB) libatproc.a
+	$(AR) $(ARFLAGS) libatproc.a $(FILES)  
 	ln -sf processors/libatproc.a ../libatproc.a
 
Index: /trunk/ArchTOIPipe/TestPipes/Makefile.in
===================================================================
--- /trunk/ArchTOIPipe/TestPipes/Makefile.in	(revision 1787)
+++ /trunk/ArchTOIPipe/TestPipes/Makefile.in	(revision 1788)
@@ -7,4 +7,5 @@
 CXX=@CXX@
 AR=@AR@
+ARFLAGS=@ARFLAGS@
 RANLIB=@RANLIB@
 LIBS=@LIBS@
Index: /trunk/ArchTOIPipe/configure
===================================================================
--- /trunk/ArchTOIPipe/configure	(revision 1787)
+++ /trunk/ArchTOIPipe/configure	(revision 1788)
@@ -554,5 +554,5 @@
 
 if test `uname` = Linux -a -f /usr/bin/g++; then
-  CXX=g++
+  CXX=/usr/bin/g++
 fi
 
@@ -922,9 +922,19 @@
 fi
 
-if test -x /usr/bin/ar; then
-# Extract the first word of "ar", so it can be a program name with args.
+if test `uname` = "Darwin"; then
+  AR=libtool
+  ARFLAGS="-static -o"
+  RANLIB=":"
+  
+  
+  
+else
+  ARFLAGS="-cr"
+  
+  if test -x /usr/bin/ar; then
+    # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:929: checking for $ac_word" >&5
+echo "configure:939: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -959,9 +969,9 @@
 fi
  
-else
-# Extract the first word of "ar", so it can be a program name with args.
+  else
+    # Extract the first word of "ar", so it can be a program name with args.
 set dummy ar; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:966: checking for $ac_word" >&5
+echo "configure:976: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -989,10 +999,10 @@
 fi
 
-fi
-if test -x /usr/bin/ranlib; then
-# Extract the first word of "ranlib", so it can be a program name with args.
+  fi
+  if test -x /usr/bin/ranlib; then
+    # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:997: checking for $ac_word" >&5
+echo "configure:1007: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1027,9 +1037,9 @@
 fi
  
-else
-# Extract the first word of "ranlib", so it can be a program name with args.
+  else
+    # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1034: checking for $ac_word" >&5
+echo "configure:1044: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1058,5 +1068,7 @@
 fi
 
-fi
+  fi
+fi
+
 ac_aux_dir=
 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
@@ -1090,5 +1102,5 @@
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1093: checking for a BSD compatible install" >&5
+echo "configure:1105: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
@@ -1151,5 +1163,5 @@
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:1154: checking size of short" >&5
+echo "configure:1166: checking size of short" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1159,5 +1171,5 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 1162 "configure"
+#line 1174 "configure"
 #include "confdefs.h"
 #include <stdio.h>
@@ -1170,5 +1182,5 @@
 }
 EOF
-if { (eval echo configure:1173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_short=`cat conftestval`
@@ -1190,5 +1202,5 @@
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1193: checking size of int" >&5
+echo "configure:1205: checking size of int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1198,5 +1210,5 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 1201 "configure"
+#line 1213 "configure"
 #include "confdefs.h"
 #include <stdio.h>
@@ -1209,5 +1221,5 @@
 }
 EOF
-if { (eval echo configure:1212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_int=`cat conftestval`
@@ -1229,5 +1241,5 @@
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1232: checking size of long" >&5
+echo "configure:1244: checking size of long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1237,5 +1249,5 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 1240 "configure"
+#line 1252 "configure"
 #include "confdefs.h"
 #include <stdio.h>
@@ -1248,5 +1260,5 @@
 }
 EOF
-if { (eval echo configure:1251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long=`cat conftestval`
@@ -1268,5 +1280,5 @@
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:1271: checking size of long long" >&5
+echo "configure:1283: checking size of long long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1276,5 +1288,5 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 1279 "configure"
+#line 1291 "configure"
 #include "confdefs.h"
 #include <stdio.h>
@@ -1287,5 +1299,5 @@
 }
 EOF
-if { (eval echo configure:1290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long_long=`cat conftestval`
@@ -1307,5 +1319,5 @@
 
 echo $ac_n "checking size of float""... $ac_c" 1>&6
-echo "configure:1310: checking size of float" >&5
+echo "configure:1322: checking size of float" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1315,5 +1327,5 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 1318 "configure"
+#line 1330 "configure"
 #include "confdefs.h"
 #include <stdio.h>
@@ -1326,5 +1338,5 @@
 }
 EOF
-if { (eval echo configure:1329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_float=`cat conftestval`
@@ -1346,5 +1358,5 @@
 
 echo $ac_n "checking size of double""... $ac_c" 1>&6
-echo "configure:1349: checking size of double" >&5
+echo "configure:1361: checking size of double" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1354,5 +1366,5 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 1357 "configure"
+#line 1369 "configure"
 #include "confdefs.h"
 #include <stdio.h>
@@ -1365,5 +1377,5 @@
 }
 EOF
-if { (eval echo configure:1368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_double=`cat conftestval`
@@ -1385,5 +1397,5 @@
 
 echo $ac_n "checking size of long double""... $ac_c" 1>&6
-echo "configure:1388: checking size of long double" >&5
+echo "configure:1400: checking size of long double" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1393,5 +1405,5 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 1396 "configure"
+#line 1408 "configure"
 #include "confdefs.h"
 #include <stdio.h>
@@ -1404,5 +1416,5 @@
 }
 EOF
-if { (eval echo configure:1407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_sizeof_long_double=`cat conftestval`
@@ -1425,8 +1437,7 @@
 
 
+echo $ac_n "checking "for cfitsio lib"""... $ac_c" 1>&6
+echo "configure:1441: checking "for cfitsio lib"" >&5
 MACHDIR=`uname`-$CXX
-echo MACHDIR= $MACHDIR
-echo $ac_n "checking "for cfitsio lib"""... $ac_c" 1>&6
-echo "configure:1429: checking "for cfitsio lib"" >&5
 if test -f $ARCHBASEREP/$MACHDIR/Libs/libcfitsio.a; then
   cfitslibdir='-L$(ARCHBASEREP)/$(MACHDIR)/Libs'
@@ -1454,5 +1465,5 @@
 
 echo $ac_n "checking "for cfitsio includes"""... $ac_c" 1>&6
-echo "configure:1456: checking "for cfitsio includes"" >&5
+echo "configure:1468: checking "for cfitsio includes"" >&5
 if test -f $CFITSIODIR/fitsio.h; then
   cfitsincdir='-I$(CFITSIODIR)'
@@ -1468,5 +1479,5 @@
 
 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:1470: checking for sin in -lm" >&5
+echo "configure:1482: checking for sin in -lm" >&5
 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1476,5 +1487,5 @@
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1478 "configure"
+#line 1490 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1487,5 +1498,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1515,5 +1526,5 @@
 
 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:1517: checking for pthread_create in -lpthread" >&5
+echo "configure:1529: checking for pthread_create in -lpthread" >&5
 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1523,5 +1534,5 @@
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1525 "configure"
+#line 1537 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1534,5 +1545,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1562,5 +1573,5 @@
 
 echo $ac_n "checking for scopy_ in -lblas""... $ac_c" 1>&6
-echo "configure:1564: checking for scopy_ in -lblas" >&5
+echo "configure:1576: checking for scopy_ in -lblas" >&5
 ac_lib_var=`echo blas'_'scopy_ | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1570,5 +1581,5 @@
 LIBS="-lblas  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1572 "configure"
+#line 1584 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1581,5 +1592,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1609,5 +1620,5 @@
 
 echo $ac_n "checking for s_copy in -lg2c""... $ac_c" 1>&6
-echo "configure:1611: checking for s_copy in -lg2c" >&5
+echo "configure:1623: checking for s_copy in -lg2c" >&5
 ac_lib_var=`echo g2c'_'s_copy | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
@@ -1617,5 +1628,5 @@
 LIBS="-lg2c  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1619 "configure"
+#line 1631 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1628,5 +1639,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
@@ -1657,5 +1668,5 @@
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1659: checking how to run the C preprocessor" >&5
+echo "configure:1671: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
@@ -1672,5 +1683,5 @@
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1674 "configure"
+#line 1686 "configure"
 #include "confdefs.h"
 #include <assert.h>
@@ -1678,5 +1689,5 @@
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -1689,5 +1700,5 @@
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1691 "configure"
+#line 1703 "configure"
 #include "confdefs.h"
 #include <assert.h>
@@ -1695,5 +1706,5 @@
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -1706,5 +1717,5 @@
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1708 "configure"
+#line 1720 "configure"
 #include "confdefs.h"
 #include <assert.h>
@@ -1712,5 +1723,5 @@
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -1737,10 +1748,10 @@
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1739: checking for ANSI C header files" >&5
+echo "configure:1751: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1744 "configure"
+#line 1756 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
@@ -1750,5 +1761,5 @@
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -1767,5 +1778,5 @@
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1769 "configure"
+#line 1781 "configure"
 #include "confdefs.h"
 #include <string.h>
@@ -1785,5 +1796,5 @@
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1787 "configure"
+#line 1799 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
@@ -1806,5 +1817,5 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 1808 "configure"
+#line 1820 "configure"
 #include "confdefs.h"
 #include <ctype.h>
@@ -1817,5 +1828,5 @@
 
 EOF
-if { (eval echo configure:1819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
@@ -1844,15 +1855,15 @@
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1846: checking for $ac_hdr" >&5
+echo "configure:1858: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1851 "configure"
+#line 1863 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
@@ -2023,4 +2034,5 @@
 s%@CXX@%$CXX%g
 s%@AR@%$AR%g
+s%@ARFLAGS@%$ARFLAGS%g
 s%@RANLIB@%$RANLIB%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Index: /trunk/ArchTOIPipe/configure.in
===================================================================
--- /trunk/ArchTOIPipe/configure.in	(revision 1787)
+++ /trunk/ArchTOIPipe/configure.in	(revision 1788)
@@ -31,14 +31,26 @@
 AC_PROG_CC
 AC_PROG_CXX
-if test -x /usr/bin/ar; then
-AC_PATH_PROG(AR, ar, /usr/bin/ar, /usr/bin:$PATH) 
+if test `uname` = "Darwin"; then
+  AR=libtool
+  ARFLAGS="-static -o"
+  RANLIB=":"
+  AC_SUBST(AR)
+  AC_SUBST(ARFLAGS)
+  AC_SUBST(RANLIB)
 else
-AC_CHECK_PROG(AR, ar)
+  ARFLAGS="-cr"
+  AC_SUBST(ARFLAGS)
+  if test -x /usr/bin/ar; then
+    AC_PATH_PROG(AR, ar, /usr/bin/ar, /usr/bin:$PATH) 
+  else
+    AC_CHECK_PROG(AR, ar)
+  fi
+  if test -x /usr/bin/ranlib; then
+    AC_PATH_PROG(RANLIB, ranlib, /usr/bin/ranlib, /usr/bin:$PATH) 
+  else
+    AC_PROG_RANLIB
+  fi
 fi
-if test -x /usr/bin/ranlib; then
-AC_PATH_PROG(RANLIB, ranlib, /usr/bin/ranlib, /usr/bin:$PATH) 
-else
-AC_PROG_RANLIB
-fi
+
 AC_PROG_INSTALL
 
