Changeset 3840 in Sophya for trunk/SophyaLib/BuildMgr/configure


Ignore:
Timestamp:
Aug 10, 2010, 12:25:04 AM (15 years ago)
Author:
ansari
Message:

Amelioration du script configure (ajout flags -wgrdl -epip mdir1 ..., Reza 09/08/2010

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BuildMgr/configure

    r3818 r3840  
    3030set defextlib = ( /usr/lib /usr/local/lib )
    3131
     32set defepiinc = ( /usr/X11R6/include )
     33set defepilib = ( /usr/X11R6/lib )
    3234
    3335#----------------------------------------------------------------------
     
    3739set extpathinc
    3840set extpathlib
     41set avecEXT
    3942unset incln
    4043unset mincname
     
    5255unset alsofftwfloat
    5356unset slballinone
     57## variables pour PI (librairie motif, GNU-readline ...)
     58set epipath
     59unset wgrdl
     60set avecPI
     61
     62#### boucle de decodage des arguments :
    5463while ( $#argv > 0 )
    5564
     
    6069  echo '  [-extp dir1 -extp dir2 ...] [-extip dir1 -extip dir2 ... ] [-extlp dir1 -extlp dir2 ... ]'
    6170  echo '  [-noextlib] [-noext fits] [-noext fftw] [-noext lapack] [-noext astro]'
    62   echo '  [-noPI] [-slballinone]'
    6371  echo '  [-alsofftwfloat] [-usefftw2] [-uselapack2] '
     72  echo '  [-wgrdl] [-epip mdir1 -motp mdir2 ...]  [-noPI] [-slballinone]'
    6473  echo '  (See SOPHYA manual/web pages for a detailed description of configure options)'
    6574  exit -1
     
    102111    set SOPEXTOK[$i] = 0
    103112  end 
     113  unset avecEXT
    104114endif
    105115if( "$1" == "-noext" ) then
     
    110120  end
    111121  shift
    112 endif
    113 if( "$1" == "-PI" ) then
    114   set SOPPIOK = ( 0 0 0 )
    115122endif
    116123if( "$1" == "-alsofftwfloat" ) then
     
    142149  set uselapack2
    143150endif
     151## Decodage arguments specifique PI
     152if( "$1" == "-noPI" ) then
     153  set SOPPIOK = ( 0 0 0 )
     154  unset avecPI
     155endif
     156## compil piapp avec GNU-readline
     157if( "$1" == "-wgrdl" ) then
     158  set wgrdl
     159endif
     160## Chemin motif , readline ...
     161if( "$1" == "-epip" ) then
     162  set epipath = ( $epipath $2 )
     163  shift
     164endif
    144165if( "$1" == "-slballinone" ) then
    145166# Pour utiliser une seule librairie libsophyaPIext.so au lieu
     
    181202end
    182203
    183 ## ------ Detection linux 64 bits ---
     204## ------ Detection linux 64 bits, AIX, IRIX ---
    184205unset linux64
    185206if ( `uname`  == "Linux" ) then
     
    190211  endif
    191212endif
     213set sname = `uname`
     214if ( ( "$sname" == "IRIX64" ) || ( "$sname" == "AIX" ) ) set arch64
    192215
    193216
     
    313336#### lien  des .h des librairies externes
    314337echo " "
    315 echo ">>>>>> 3/  Include files for external libraries "
     338echo ">>>>>> 3.1/  Include files for external libraries "
    316339set i = 0
    317340while ( $i < $#SOPEXT )
     
    341364end
    342365
     366### recherche des .h Motif et si besoin readline
     367set piextinc
     368if ( $?avecPI ) then
     369  echo " "
     370  echo ">>>>>> 3.2/ searching include files for Motif "
     371  foreach d ( $epipath /usr/X11R6/include )
     372    set duminc = `find $d -name Xm -print -follow | head -1 `
     373    set dumrep = $duminc:h
     374    if ( "$dumrep" != "" ) then
     375        set piextinc = "-I$dumrep"
     376        echo Includes for Motif found in $dumrep
     377        break
     378      endif
     379    end
     380    if ( "$dumrep" == "" ) then
     381      echo WARNING: Includes for Motif NOT found
     382      echo '    expect problems when compiling PI modules, check sophyamake.inc ... '
     383    endif
     384  endif
     385  if ( $?wgrdl ) then
     386    echo ">>>>>> 3.3/ searching include files for GNU readline "
     387  foreach d ( $epipath /usr/local )
     388    set duminc = `find $d -name readline -print -follow | head -1 `
     389    set dumrep2 = $duminc:h
     390    if ( "$dumrep2" != "" ) then
     391        if ( "$dumrep2" != "$dumrep" )  set piextinc = "-I$dumrep2 $piextinc"
     392        echo Includes for readline found in $dumrep
     393        break
     394      endif
     395    end
     396    if ( "$dumrep2" == "" ) then
     397      echo WARNING: Includes for readline NOT found
     398      echo '    expect problems when compiling piapp, check sophyamake.inc ... '
     399    endif
     400  endif
     401
     402  endif
     403endif
    343404
    344405#----------------------------------------------------------------------
     
    376437rm -f $fpath
    377438
     439### recherche des librairies Motif et si besoin readline
     440set piextlib = '-L/usr/X11R6/lib -lXm'
     441if ( $?avecPI ) then
     442  echo " "
     443  echo ">>>>>> 4.2/ searching library Motif (libXm.a) "
     444  foreach d ( $epipath /usr/X11R6/lib )
     445    set dumlib = `find $d -name libXm.a -print -follow | head -1 `
     446    set dumrep = $dumlib:h
     447    if ( "$dumrep" != "" ) then
     448        set piextlib = "-L$dumrep -lXm"
     449        echo Motif library found in $dumrep
     450        break
     451      endif
     452    end
     453    if ( "$dumrep" == "" ) then
     454      echo WARNING: Motif library NOT found
     455      echo '    expect problems when for linking with PI, check sophyamake.inc ... '
     456    endif
     457  endif
     458  if ( $?wgrdl ) then
     459    echo ">>>>>> 4.3/ searching libraries for GNU readline "
     460  foreach d ( $epipath /usr/local )
     461    set dumlib = `find $d -name libreadline.a -print -follow | head -1 `
     462    set dumrep2 = $dumlib:h
     463    if ( "$dumrep2" != "" ) then
     464        if ( "$dumrep2" != "$dumrep" )  then
     465          set piextlib = "$piextlib -L$dumrep -lreadline -lhistory "
     466        else
     467          set piextlib = "$piextlib -lreadline -lhistory "
     468        endif
     469        echo Libraries for readline found in $dumrep
     470        break
     471      endif
     472    end
     473    if ( "$dumrep" == "" ) then
     474      echo WARNING: libraries for readline NOT found
     475      echo '    expect problems for linking piapp, check sophyamake.inc ... '
     476    endif
     477  endif
     478  endif
     479endif
     480
    378481
    379482#----------------------------------------------------------------------
    380483#### Identification des librairies archives Sophya
    381484echo " "
    382 echo ">>>>>> 4.2/  Sophya libraries archives "
     485echo ">>>>>> 4.4/  Sophya libraries archives "
    383486set sopmodlib
    384487set i = 0
     
    443546echo "# PI libraries  " >> $mfile
    444547echo "SOPPILIBLIST = $soppilib" >> $mfile
     548echo "PIEXTINC = $piextinc" >> $mfile
     549echo "PIEXTLIB = $piextlib" >> $mfile
     550echo "PIEXTINC = $piextinc"
     551echo "PIEXTLIB = $piextlib"
    445552
    446553echo " " >> $mfile
     
    448555
    449556# --- Gestion des flags modifiants les options de compilation et liste de librairies (par sed)
    450 set sname = `uname`
    451557set sprgfile = $TMPDIR/compop.scom
    452558rm -f $sprgfile
     
    477583  echo "/SOPHYAEXTSLBLIST/s/-lextsophya -lsophya/-lAsophyaextPI/" >>  $sprgfile
    478584endif
    479 if ( $?linux64 ) then
     585if ( ! $?avecEXT ) then
     586  echo "/SOPHYAEXTSLBLIST/s/-lextsophya/ /"  >>  $sprgfile
     587  echo "/SOPHYAALLSLBLIST/s/-lextsophya/ /"  >>  $sprgfile
     588endif
     589if ( ! $?avecPI ) then
     590  echo "/SOPHYAALLSLBLIST/s/-lPI/ /"  >>  $sprgfile
     591endif
     592if ( ( $?linux64 ) && ( $?arch64) ) then
    480593  echo "s?-L/usr/X11R6/lib?-L/usr/X11R6/lib64?g" >>  $sprgfile
    481594endif
     
    574687  echo "#define LAPACK_V2_EXTSOP" >> $sinc/sspvflags.h
    575688endif
    576 echo " " >> $sinc/sspvflags.h
     689if( $?wgrdl ) then
     690  echo "/*-- Compile piapp with GNU-readline -- */" >> $sinc/sspvflags.h
     691  echo "#define PIA_WITH_GNUREADLINE" >> $sinc/sspvflags.h
     692endif
    577693if( $?slballinone ) then
    578694  echo "/*------ Use of single shared lib for SOPHYA+extlibs+PI ---- */" >> $sinc/sspvflags.h
Note: See TracChangeset for help on using the changeset viewer.