Changeset 3840 in Sophya for trunk/SophyaLib/BuildMgr


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

Location:
trunk/SophyaLib/BuildMgr
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BuildMgr/AIX_xlC_make.inc

    r3497 r3840  
    1111
    1212#  Chemin et librairie pour PI
    13 PIINC =
    14 PILIBS = -lXm -lXt -lX11
     13PIINC = $(PIEXTINC) -I/usr/include/
     14PILIBS = $(PIEXTLIB) -L/usr/lib/ -lXt -lX11
     15
    1516
    1617#  Flag preprocesseur
  • trunk/SophyaLib/BuildMgr/Darwin_g++_make.inc

    r3250 r3840  
    55
    66#  Chemin et librairie pour PI
    7 PIINC = -I/usr/X11R6/include/ -I/sw/include
    8 PILIBS = -L/sw/lib -lXm -L/usr/X11R6/lib -lXt -lX11
     7PIINC = $(PIEXTINC) -I/usr/X11R6/include/
     8PILIBS = $(PIEXTLIB) -L/usr/X11R6/lib/ -lXt -lX11
    99
    1010
  • trunk/SophyaLib/BuildMgr/IRIX64_CC_make.inc

    r3265 r3840  
    55
    66#  Chemin et librairie pour PI
    7 PIINC =
    8 PILIBS = -lXm -lXt -lX11
     7PIINC = $(PIEXTINC) -I/usr/include/
     8PILIBS = $(PIEXTLIB) -L/usr/lib/ -lXt -lX11
    99
    1010
  • trunk/SophyaLib/BuildMgr/Linux_g++_make.inc

    r3820 r3840  
    66
    77#  Chemin et librairie pour PI
    8 PIINC = -I/usr/X11R6/include/
    9 PILIBS = -L/usr/X11R6/lib/ -lXm -lXt -lX11
     8PIINC = $(PIEXTINC) -I/usr/X11R6/include/
     9PILIBS = $(PIEXTLIB) -L/usr/X11R6/lib/ -lXt -lX11
    1010
    1111
  • trunk/SophyaLib/BuildMgr/Linux_icc_make.inc

    r3834 r3840  
    55
    66#  Chemin et librairie pour PI
    7 PIINC = -I/usr/X11R6/include/
    8 PILIBS = -L/usr/X11R6/lib/ -lXm -lXt -lX11
     7PIINC = $(PIEXTINC) -I/usr/X11R6/include/
     8PILIBS = $(PIEXTLIB) -L/usr/X11R6/lib/ -lXt -lX11
    99
    1010
  • trunk/SophyaLib/BuildMgr/OSF1_cxx_make.inc

    r3210 r3840  
    55
    66#  Chemin et librairie pour PI
    7 PIINC =
    8 PILIBS = -lXm -lXt -lX11
     7PIINC = $(PIEXTINC) -I/usr/include/
     8PILIBS = $(PIEXTLIB) -L/usr/lib/ -lXt -lX11
    99
    1010
  • trunk/SophyaLib/BuildMgr/README

    r3401 r3840  
    22== Code Management scripts / top level makefile for SOPHYA ====
    33===============================================================
    4               (C) LAL-IN2P3/CNRS   1998-2007
    5               (C) DAPNIA/CEA       1998-2007
     4           (C) LAL-IN2P3/CNRS         1998-2010
     5           (C) Universite Paris Sud   1998-2010
     6           (C) IRFU/CEA               1998-2010
    67===============================================================
    78
     
    1718csh> cd BuildMgr/
    1819csh> ./configure -h
     20configure [-sbase SOPHYABASE] [-scxx SOPHYACXX] [-incln]
     21  [-minc mymake.inc]  [-compopt 'cc/cxxOptions']
     22  [-arch64] [-arch32] [-sasz64] [-ldble128] [-nofpic] [-nothsafe] [-boundcheck] [-sodebug]
     23  [-extp dir1 -extp dir2 ...] [-extip dir1 -extip dir2 ... ] [-extlp dir1 -extlp dir2 ... ]
     24  [-noextlib] [-noext fits] [-noext fftw] [-noext lapack] [-noext astro]
     25  [-alsofftwfloat] [-usefftw2] [-uselapack2]
     26  [-wgrdl] [-epip mdir1 -motp mdir2 ...]  [-noPI] [-slballinone]
     27  (See SOPHYA manual/web pages for a detailed description of configure options)
     28
     29###  Configuration example :
    1930# configure with c-fitsio, installed in /usr/local/include and /usr/local/lib,
    2031# with g++ as cxx compiler. The target installation directory is $HOME/SObjs/
     
    53646/ Currently tested on the following platform/compilers
    5465-------------------------------------------------------------------------
    55 Linux 2.4 , 2.6              g++ 3.x 4.0     (GNU g++ compiler)             
     66Linux kernel 2.6             g++ 4.1 4.4     (GNU g++ compiler)   
     67Linux kernel 2.6             icc 10.1        (Intel compiler)                           
    5668MacOSX/Darwin 10.3/10.4      g++ 3.3,4.0     (Apple/GNU compiler)
    57 Linux 2.4                    icc 9.0         (Intel compiler)                 
     69MacOSX/Darwin 10.5           g++ 4.0         (Apple/GNU compiler)
     70MacOSX/Darwin 10.6           g++ 4.2         (Apple/GNU compiler)
     71IBM AIX 5.3                  xlC 8.0         (AIX native compiler)
    5872HP/Compaq/DEC OSF 5.x        cxx 6.x         (native Tru64/OSF compiler)
    59 SGI IRIX64                   CC  7.30        (IRIX-64 native compiler)
    60 IBM AIX (5.3)                xlC 8.0         (AIX native compiler)
    6173-------------------------------------------------------------------------
    6274
     
    119131* Tests/         Simple test programs
    120132
    121 * PMixer/        skymixer and utility main programs
     133* PMixer/        skymixer and utility main programs (obsolete)
    122134
    123135* PrgUtil/       Utility main programs
  • 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.