Index: /trunk/SophyaLib/BuildMgr/configure
===================================================================
--- /trunk/SophyaLib/BuildMgr/configure	(revision 3842)
+++ /trunk/SophyaLib/BuildMgr/configure	(revision 3843)
@@ -2,5 +2,5 @@
 #  SOPHYA configuration managment script 
 #  C. Magneville / R. Ansari   -      Mai 2005
-#     Updated : 2006, Avr/Mai , Oct 2007
+#     Updated : 2006, Avr/Mai , Oct 2007 , 2010 
 # Exemple: ./configure -sbase /laltmp/ansari/sbase/ -scxx cxx -extp /exp/planck/ExtLibs/Include/ \
 #              -extp /exp/planck/ExtLibs/OSF1-cxx/
@@ -39,4 +39,5 @@
 set extpathinc
 set extpathlib
+set followlink
 set avecEXT 
 unset incln
@@ -66,6 +67,8 @@
   echo 'configure [-sbase SOPHYABASE] [-scxx SOPHYACXX] [-incln] '
   echo "  [-minc mymake.inc]  [-compopt 'cc/cxxOptions'] "
-  echo '  [-arch64] [-arch32] [-sasz64] [-ldble128] [-nofpic] [-nothsafe] [-boundcheck] [-sodebug]'
-  echo '  [-extp dir1 -extp dir2 ...] [-extip dir1 -extip dir2 ... ] [-extlp dir1 -extlp dir2 ... ]'
+  echo '  [-arch64] [-arch32] [-sasz64] [-ldble128] '
+  echo '  [-nofpic] [-nothsafe] [-boundcheck] [-sodebug]'
+  echo '  [-extp dir1 -extp dir2 ...] [-extip dir1 -extip dir2 ... ]'
+  echo '  [-extlp dir1 -extlp dir2 ... ] [-followlink] '
   echo '  [-noextlib] [-noext fits] [-noext fftw] [-noext lapack] [-noext astro]'
   echo '  [-alsofftwfloat] [-usefftw2] [-uselapack2] '
@@ -104,4 +107,7 @@
   set extpathlib = ( $extpathlib $2 )
   shift
+endif
+if( "$1" == "-followlink" ) then
+  set followlink = '-L '
 endif
 if( "$1" == "-noextlib" ) then
@@ -276,5 +282,5 @@
 
 #----------------------------------------------------------------------
-#### Fichier confinfo - log e configure
+#### Fichier confinfo - log de configure
 set conflog = $sconf/conf.log
 rm -f $conflog ; touch $conflog 
@@ -347,5 +353,5 @@
     echo "Searching include file for $SOPEXT[$i] ..."
     foreach d ( $extpathinc $extpath $defextinc )
-      set duminc = `find $d -name $nom -print -follow | head -1 `
+      set duminc = `find $followlink $d -name $nom -print | head -1 `
       set dumrep = $duminc:h
       if ( "$dumrep" != "" ) then
@@ -370,23 +376,22 @@
   echo ">>>>>> 3.2/ searching include files for Motif "
   foreach d ( $epipath /usr/X11R6/include )
-    set duminc = `find $d -name Xm -print -follow | head -1 `
+    set duminc = `find $followlink $d -name Xm -print | head -1 `
     set dumrep = $duminc:h
     if ( "$dumrep" != "" ) then
-        set piextinc = "-I$dumrep"
-        echo Includes for Motif found in $dumrep
-        break
-      endif
-    end
-    if ( "$dumrep" == "" ) then
-      echo WARNING: Includes for Motif NOT found
-      echo '    expect problems when compiling PI modules, check sophyamake.inc ... '
-    endif
+      set piextinc = "-I$dumrep"
+      echo Includes for Motif found in $dumrep
+      break
+    endif
+  end
+  if ( "$dumrep" == "" ) then
+    echo WARNING: Includes for Motif NOT found
+    echo '    expect problems when compiling PI modules, check sophyamake.inc ... '
   endif
   if ( $?wgrdl ) then 
     echo ">>>>>> 3.3/ searching include files for GNU readline "
-  foreach d ( $epipath /usr/local )
-    set duminc = `find $d -name readline -print -follow | head -1 `
-    set dumrep2 = $duminc:h
-    if ( "$dumrep2" != "" ) then
+    foreach d ( $epipath /usr/local )
+      set duminc = `find $followlink $d -name readline -print | head -1 `
+      set dumrep2 = $duminc:h
+      if ( "$dumrep2" != "" ) then
         if ( "$dumrep2" != "$dumrep" )  set piextinc = "-I$dumrep2 $piextinc"
         echo Includes for readline found in $dumrep
@@ -399,6 +404,4 @@
     endif
   endif
-
-  endif 
 endif 
 
@@ -419,5 +422,5 @@
     echo "Searching libraries path for $SOPEXT[$i] ..."
     foreach d ( $extpathlib $extpath $defextlib )
-      set dumlib = `find $d -name $nom -print -follow | head -1 `
+      set dumlib = `find $followlink $d -name $nom -print | head -1 `
       if ( "$dumlib" != "" ) then
         echo "-L$dumlib:h" >> $fpath
@@ -443,11 +446,11 @@
   echo ">>>>>> 4.2/ searching library Motif (libXm.a) "
   foreach d ( $epipath /usr/X11R6/lib )
-    set dumlib = `find $d -name libXm.a -print -follow | head -1 `
+    set dumlib = `find $followlink $d -name libXm.a -print | head -1 `
     set dumrep = $dumlib:h
     if ( "$dumrep" != "" ) then
-        set piextlib = "-L$dumrep -lXm"
-        echo Motif library found in $dumrep
-        break
-      endif
+      set piextlib = "-L$dumrep -lXm"
+      echo Motif library found in $dumrep
+      break
+    endif
     end
     if ( "$dumrep" == "" ) then
@@ -455,19 +458,18 @@
       echo '    expect problems when for linking with PI, check sophyamake.inc ... '
     endif
-  endif
   if ( $?wgrdl ) then 
     echo ">>>>>> 4.3/ searching libraries for GNU readline "
   foreach d ( $epipath /usr/local )
-    set dumlib = `find $d -name libreadline.a -print -follow | head -1 `
+    set dumlib = `find $followlink $d -name libreadline.a -print | head -1 `
     set dumrep2 = $dumlib:h
     if ( "$dumrep2" != "" ) then
-        if ( "$dumrep2" != "$dumrep" )  then 
-          set piextlib = "$piextlib -L$dumrep -lreadline -lhistory "
-        else 
-          set piextlib = "$piextlib -lreadline -lhistory "
-        endif
-        echo Libraries for readline found in $dumrep
-        break
+      if ( "$dumrep2" != "$dumrep" )  then 
+        set piextlib = "$piextlib -L$dumrep -lreadline -lhistory "
+      else 
+        set piextlib = "$piextlib -lreadline -lhistory "
       endif
+      echo Libraries for readline found in $dumrep
+      break
+    endif
     end
     if ( "$dumrep" == "" ) then
@@ -476,7 +478,5 @@
     endif
   endif
-  endif 
 endif 
-
 
 #----------------------------------------------------------------------
@@ -584,9 +584,9 @@
 endif
 if ( ! $?avecEXT ) then 
-  echo "/SOPHYAEXTSLBLIST/s/-lextsophya/ /"  >>  $sprgfile 
-  echo "/SOPHYAALLSLBLIST/s/-lextsophya/ /"  >>  $sprgfile 
+  echo "/SOPHYAEXTSLBLIST/s/-lextsophya / /"  >>  $sprgfile 
+  echo "/SOPHYAALLSLBLIST/s/-lextsophya / /"  >>  $sprgfile 
 endif
 if ( ! $?avecPI ) then 
-  echo "/SOPHYAALLSLBLIST/s/-lPI/ /"  >>  $sprgfile 
+  echo "/SOPHYAALLSLBLIST/s/-lPI / /"  >>  $sprgfile 
 endif
 if ( ( $?linux64 ) && ( $?arch64) ) then
