Index: trunk/ArchTOIPipe/Kernel/Makefile.in
===================================================================
--- trunk/ArchTOIPipe/Kernel/Makefile.in	(revision 1729)
+++ trunk/ArchTOIPipe/Kernel/Makefile.in	(revision 1730)
@@ -18,9 +18,9 @@
 
 ifeq ($(USE_SOPHYA),1) 
- include $(DPCDEVREP)/Include/Makefile.h
+ include $(DPCBASEREP)/Include/MakefileUser.h
 
  ifdef NOSHLIB
-  LIBF =  $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a $(LIB)libPI.a $(LIB)libPIext.a 
-  LIBS = -L$(LIB) -lPIext -lPI -lSysTools -lNTools -lBlitz  -lm
+  LIBF =  $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a 
+  LIBS = -L$(LIB)  -lSysTools -lNTools -lBlitz  -lm
   ifeq ($(CXX),cxx)
    # librairie des instances de templates cxx
@@ -29,16 +29,19 @@
  else
   LIBF =  $(SLB)libsophya.so 
-  LIBS = -L$(SLB) -lPI -lextsophya -lsophya -lm 
+  LIBS = -L$(SLB)  -lextsophya -lsophya -lm 
   ifeq ($(MACHEROS),OSF1)
    LIBS := $(LIBS) -lfor
   endif
   ifeq ($(MACHEROS),Linux)
-   LIBS := $(LIBS) -ldl -lf2c
+#   LIBS := $(LIBS) -ldl -lf2c
   endif
  endif
  
- CPPFLAGS := -DWITH_SOPHYA $(CPPFLAGS)
+  CPPFLAGS := -DWITH_SOPHYA $(CPPFLAGS)
  ifeq ($(CXX), cxx)
    LIBS := $(LIBS) -pthread
+ endif
+ ifeq ($(MACHEROS),Linux)
+   LIBS := $(LIBS) -lpthread
  endif
 else
@@ -46,4 +49,7 @@
   CXXFLAGS := -O -g -D__USE_STD_IOSTREAM
   LIBS := $(LIBS) -pthread
+ endif
+ ifeq ($(MACHEROS),Linux)
+   LIBS := $(LIBS) -lpthread
  endif
 endif
Index: trunk/ArchTOIPipe/Makefile.in
===================================================================
--- trunk/ArchTOIPipe/Makefile.in	(revision 1729)
+++ trunk/ArchTOIPipe/Makefile.in	(revision 1730)
@@ -17,9 +17,9 @@
 
 ifeq ($(USE_SOPHYA),1) 
- include $(DPCDEVREP)/Include/Makefile.h
+ include $(DPCBASEREP)/Include/MakefileUser.h
 
  ifdef NOSHLIB
-  LIBF =  $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a $(LIB)libPI.a $(LIB)libPIext.a 
-  LIBS := -L$(LIB) -lPIext -lPI -lSysTools -lNTools -lBlitz  -lm
+  LIBF =  $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a
+  LIBS := -L$(LIB)  -lSysTools -lNTools -lBlitz  -lm
   ifeq ($(CXX),cxx)
    # librairie des instances de templates cxx
@@ -28,10 +28,10 @@
  else
   LIBF =  $(SLB)libsophya.so 
-  LIBS := -L$(SLB) -lPI -lextsophya -lsophya -lm 
+  LIBS := -L$(SLB)  -lextsophya -lsophya -lm 
   ifeq ($(MACHEROS),OSF1)
    LIBS := $(LIBS) -lfor
   endif
   ifeq ($(MACHEROS),Linux)
-   LIBS := $(LIBS) -ldl -lf2c
+#   LIBS := $(LIBS) -ldl -lf2c
   endif
  endif
Index: trunk/ArchTOIPipe/ProcWSophya/Makefile.in
===================================================================
--- trunk/ArchTOIPipe/ProcWSophya/Makefile.in	(revision 1729)
+++ trunk/ArchTOIPipe/ProcWSophya/Makefile.in	(revision 1730)
@@ -18,9 +18,9 @@
 
 ifeq ($(USE_SOPHYA),1) 
- include $(DPCDEVREP)/Include/Makefile.h
+ include $(DPCBASEREP)/Include/MakefileUser.h
 
  ifdef NOSHLIB
-  LIBF =  $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a $(LIB)libPI.a $(LIB)libPIext.a 
-  LIBS = -L$(LIB) -lPIext -lPI -lSysTools -lNTools -lBlitz  -lm
+  LIBF =  $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a
+  LIBS = -L$(LIB)  -lSysTools -lNTools -lBlitz  -lm
   ifeq ($(CXX),cxx)
    # librairie des instances de templates cxx
@@ -29,10 +29,10 @@
  else
   LIBF =  $(SLB)libsophya.so 
-  LIBS = -L$(SLB) -lPI -lextsophya -lsophya -lm 
+  LIBS = -L$(SLB) -lextsophya -lsophya -lm 
   ifeq ($(MACHEROS),OSF1)
    LIBS := $(LIBS) -lfor
   endif
   ifeq ($(MACHEROS),Linux)
-   LIBS := $(LIBS) -ldl -lf2c
+#   LIBS := $(LIBS) -ldl -lf2c
   endif
  endif
@@ -42,8 +42,14 @@
    LIBS := $(LIBS) -pthread
  endif
+ ifeq ($(MACHEROS),Linux)
+   LIBS := $(LIBS) -lpthread
+ endif
 else
  ifeq ($(CXX), cxx)
   CXXFLAGS := -O -g -D__USE_STD_IOSTREAM
   LIBS := $(LIBS) -pthread
+ endif
+ ifeq ($(MACHEROS),Linux)
+   LIBS := $(LIBS) -lpthread
  endif
 endif
Index: trunk/ArchTOIPipe/Processors/Makefile.in
===================================================================
--- trunk/ArchTOIPipe/Processors/Makefile.in	(revision 1729)
+++ trunk/ArchTOIPipe/Processors/Makefile.in	(revision 1730)
@@ -18,9 +18,9 @@
 
 ifeq ($(USE_SOPHYA),1) 
- include $(DPCDEVREP)/Include/Makefile.h
+ include $(DPCBASEREP)/Include/MakefileUser.h
 
  ifdef NOSHLIB
-  LIBF =  $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a $(LIB)libPI.a $(LIB)libPIext.a 
-  LIBS = -L$(LIB) -lPIext -lPI -lSysTools -lNTools -lBlitz  -lm
+  LIBF =  $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a 
+  LIBS = -L$(LIB)  -lSysTools -lNTools -lBlitz  -lm
   ifeq ($(CXX),cxx)
    # librairie des instances de templates cxx
@@ -29,10 +29,10 @@
  else
   LIBF =  $(SLB)libsophya.so 
-  LIBS = -L$(SLB) -lPI -lextsophya -lsophya -lm 
+  LIBS = -L$(SLB) -lextsophya -lsophya -lm 
   ifeq ($(MACHEROS),OSF1)
    LIBS := $(LIBS) -lfor
   endif
   ifeq ($(MACHEROS),Linux)
-   LIBS := $(LIBS) -ldl -lf2c
+#   LIBS := $(LIBS) -ldl -lf2c
   endif
  endif
@@ -42,8 +42,14 @@
    LIBS := $(LIBS) -pthread
  endif
+ ifeq ($(MACHEROS),Linux)
+   LIBS := $(LIBS) -lpthread
+ endif
 else
  ifeq ($(CXX), cxx)
   CXXFLAGS := -O -g -D__USE_STD_IOSTREAM
   LIBS := $(LIBS) -pthread
+ endif
+ ifeq ($(MACHEROS),Linux)
+   LIBS := $(LIBS) -lpthread
  endif
 endif
Index: trunk/ArchTOIPipe/TestPipes/Makefile.in
===================================================================
--- trunk/ArchTOIPipe/TestPipes/Makefile.in	(revision 1729)
+++ trunk/ArchTOIPipe/TestPipes/Makefile.in	(revision 1730)
@@ -18,9 +18,9 @@
 
 ifeq ($(USE_SOPHYA),1) 
- include $(DPCDEVREP)/Include/Makefile.h
+ include $(DPCBASEREP)/Include/MakefileUser.h
 
  ifdef NOSHLIB
-  LIBF =  $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a $(LIB)libPI.a $(LIB)libPIext.a 
-  LIBS := -L$(LIB) -lPIext -lPI -lSysTools -lNTools -lBlitz  -lm
+  LIBF =  $(LIB)libSysTools.a $(LIB)libNTools.a $(LIB)libBlitz.a $(LIB)libFitsIOServer.a 
+  LIBS := -L$(LIB)  -lSysTools -lNTools -lBlitz  -lm
   ifeq ($(CXX),cxx)
    # librairie des instances de templates cxx
@@ -29,10 +29,10 @@
  else
   LIBF =  $(SLB)libsophya.so 
-  LIBS := -L$(SLB) -lPI -lextsophya -lsophya -lm 
+  LIBS := -L$(SLB)  -lextsophya -lsophya -lm 
   ifeq ($(MACHEROS),OSF1)
    LIBS := $(LIBS) -lfor
   endif
   ifeq ($(MACHEROS),Linux)
-   LIBS := $(LIBS) -ldl -lf2c
+#   LIBS := $(LIBS) -ldl -lf2c
   endif
  endif
@@ -42,8 +42,14 @@
    LIBS := $(LIBS) -pthread
  endif
+ ifeq ($(MACHEROS),Linux)
+   LIBS := $(LIBS) -lpthread
+ endif
 else
  ifeq ($(CXX), cxx)
   CXXFLAGS := -O -g -D__USE_STD_IOSTREAM
   LIBS := $(LIBS) -pthread
+ endif
+ ifeq ($(MACHEROS),Linux)
+   LIBS := $(LIBS) -lpthread
  endif
 endif
Index: trunk/ArchTOIPipe/configure
===================================================================
--- trunk/ArchTOIPipe/configure	(revision 1729)
+++ trunk/ArchTOIPipe/configure	(revision 1730)
@@ -1270,4 +1270,6 @@
 if test -f $ARCHBASEREP/$MACHDIR/Libs/libcfitsio.a; then
   cfitslibdir='-L$(ARCHBASEREP)/$(MACHDIR)/Libs'
+elif test -f $EXTLIBDIR/$MACHDIR/Libs/libcfitsio.a; then
+  cfitslibdir='-L$(EXTLIBDIR)/$(MACHDIR)/Libs'
 elif test -f $CFITSIOLIBDIR/$MACHDIR/Libs/libcfitsio.a; then
   cfitslibdir='-L$(CFITSIOLIBDIR)/$(MACHDIR)/Libs'
@@ -1291,7 +1293,9 @@
 
 echo $ac_n "checking "for cfitsio includes"""... $ac_c" 1>&6
-echo "configure:1294: checking "for cfitsio includes"" >&5
+echo "configure:1296: checking "for cfitsio includes"" >&5
 if test -f $CFITSIODIR/fitsio.h; then
   cfitsincdir='-I$(CFITSIODIR)'
+elif test -f $EXTLIBDIR/Include/FitsIO/fitsio.h; then
+  cfitsincdir='-I$(EXTLIBDIR)/Include/FitsIO/fitsio.h'
 elif test -f /usr/local/include/fitsio.h; then
   cfitsincdir=""
@@ -1303,5 +1307,5 @@
 
 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:1306: checking for sin in -lm" >&5
+echo "configure:1310: 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
@@ -1311,5 +1315,5 @@
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 1314 "configure"
+#line 1318 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
@@ -1322,5 +1326,5 @@
 ; return 0; }
 EOF
-if { (eval echo configure:1325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1329: \"$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"
@@ -1351,5 +1355,5 @@
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1354: checking how to run the C preprocessor" >&5
+echo "configure:1358: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
@@ -1366,5 +1370,5 @@
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1369 "configure"
+#line 1373 "configure"
 #include "confdefs.h"
 #include <assert.h>
@@ -1372,5 +1376,5 @@
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1379: \"$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
@@ -1383,5 +1387,5 @@
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1386 "configure"
+#line 1390 "configure"
 #include "confdefs.h"
 #include <assert.h>
@@ -1389,5 +1393,5 @@
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1396: \"$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
@@ -1400,5 +1404,5 @@
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1403 "configure"
+#line 1407 "configure"
 #include "confdefs.h"
 #include <assert.h>
@@ -1406,5 +1410,5 @@
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1413: \"$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
@@ -1431,10 +1435,10 @@
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1434: checking for ANSI C header files" >&5
+echo "configure:1438: 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 1439 "configure"
+#line 1443 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
@@ -1444,5 +1448,5 @@
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1451: \"$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
@@ -1461,5 +1465,5 @@
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1464 "configure"
+#line 1468 "configure"
 #include "confdefs.h"
 #include <string.h>
@@ -1479,5 +1483,5 @@
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1482 "configure"
+#line 1486 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
@@ -1500,5 +1504,5 @@
 else
   cat > conftest.$ac_ext <<EOF
-#line 1503 "configure"
+#line 1507 "configure"
 #include "confdefs.h"
 #include <ctype.h>
@@ -1511,5 +1515,5 @@
 
 EOF
-if { (eval echo configure:1514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
@@ -1538,15 +1542,15 @@
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1541: checking for $ac_hdr" >&5
+echo "configure:1545: 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 1546 "configure"
+#line 1550 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1555: \"$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
Index: trunk/ArchTOIPipe/configure.in
===================================================================
--- trunk/ArchTOIPipe/configure.in	(revision 1729)
+++ trunk/ArchTOIPipe/configure.in	(revision 1730)
@@ -43,4 +43,6 @@
 if test -f $ARCHBASEREP/$MACHDIR/Libs/libcfitsio.a; then
   cfitslibdir='-L$(ARCHBASEREP)/$(MACHDIR)/Libs'
+elif test -f $EXTLIBDIR/$MACHDIR/Libs/libcfitsio.a; then
+  cfitslibdir='-L$(EXTLIBDIR)/$(MACHDIR)/Libs'
 elif test -f $CFITSIOLIBDIR/$MACHDIR/Libs/libcfitsio.a; then
   cfitslibdir='-L$(CFITSIOLIBDIR)/$(MACHDIR)/Libs'
@@ -66,4 +68,6 @@
 if test -f $CFITSIODIR/fitsio.h; then
   cfitsincdir='-I$(CFITSIODIR)'
+elif test -f $EXTLIBDIR/Include/FitsIO/fitsio.h; then
+  cfitsincdir='-I$(EXTLIBDIR)/Include/FitsIO/fitsio.h'
 elif test -f /usr/local/include/fitsio.h; then
   cfitsincdir=""
Index: trunk/ArchTOIPipe/fan_copy
===================================================================
--- trunk/ArchTOIPipe/fan_copy	(revision 1729)
+++ trunk/ArchTOIPipe/fan_copy	(revision 1730)
@@ -4,4 +4,5 @@
   echo ""
   echo "****" $d
+  mkdir -p $d
   foreach f (`cat files_$d`)
    echo $f
