| 1 | #!/bin/csh
 | 
|---|
| 2 | #  SOPHYA configuration managment script 
 | 
|---|
| 3 | #  C. Magneville / R. Ansari   -      Mai 2005
 | 
|---|
| 4 | #     Updated : 2006, Avr/Mai , Oct 2007 , 2010 
 | 
|---|
| 5 | # Exemple: ./configure -sbase /laltmp/ansari/sbase/ -scxx cxx -extp /exp/planck/ExtLibs/Include/ \
 | 
|---|
| 6 | #              -extp /exp/planck/ExtLibs/OSF1-cxx/
 | 
|---|
| 7 | 
 | 
|---|
| 8 | #----------------------------------------------------------------------
 | 
|---|
| 9 | #### liste des modules
 | 
|---|
| 10 | set SOPMODOK = ( 1 1 1 1 1 1 1 1 1 )
 | 
|---|
| 11 | set SOPMOD = ( BaseTools SysTools SUtils TArray NTools HiStats SkyMap Samba SkyT )
 | 
|---|
| 12 | set ALLSOPLIBS = ( '-lBaseTools' '-lSysTools' '-lSUtils' '-lTArray' '-lNTools' '-lHiStats' '-lSkyMap' '-lSamba' '-lSkyT' )
 | 
|---|
| 13 | 
 | 
|---|
| 14 | set SOPPIOK = ( 1 1 1 )
 | 
|---|
| 15 | set SOPPI = ( PI PIext PIGcont )
 | 
|---|
| 16 | set ALLPILIBS = ( '-lPI' '-lPIext' '-lPIGcont' )
 | 
|---|
| 17 | 
 | 
|---|
| 18 | set SOPEXT     = ( FitsIOServer  IFFTW  LinAlg  XAstroPack )
 | 
|---|
| 19 | set EXTCURNAME = ( fits          fftw   lapack  astro      )
 | 
|---|
| 20 | set SOPEXTOK   = ( 1             1      1       1          )
 | 
|---|
| 21 | set EXTINCNAME = ( FitsIO/fitsio.h FFTW/fftw3.h  PASDEINC XAstro/astro.h )
 | 
|---|
| 22 | set EXTLIBNAME = ( libcfitsio.a libfftw3.a liblapack.a libxastro.a )
 | 
|---|
| 23 | set ALLEXTLIBS = ( '-lcfitsio' '-lfftw3' '-llapack -lblas' '-lxastro' )
 | 
|---|
| 24 | 
 | 
|---|
| 25 | #FFTW2: set EXTINCNAME = ( FitsIO/fitsio.h FFTW/fftw.h  PASDEINC XAstro/astro.h )
 | 
|---|
| 26 | #FFTW2: set EXTLIBNAME = ( libcfitsio.a libfftw.a liblapack.a libxastro.a )
 | 
|---|
| 27 | #FFTW2: set ALLEXTLIBS = ( '-lcfitsio' '-lfftw -lrfftw' '-llapack -lblas' '-lxastro' )
 | 
|---|
| 28 | 
 | 
|---|
| 29 | set defextinc = ( /usr/include /usr/local/include )
 | 
|---|
| 30 | set defextlib = ( /usr/lib /usr/local/lib )
 | 
|---|
| 31 | 
 | 
|---|
| 32 | set defepiinc = ( /usr/X11R6/include )
 | 
|---|
| 33 | set defepilib = ( /usr/X11R6/lib )
 | 
|---|
| 34 | 
 | 
|---|
| 35 | #----------------------------------------------------------------------
 | 
|---|
| 36 | #### Decodage arguments
 | 
|---|
| 37 | set cmdline = "$0 $*" 
 | 
|---|
| 38 | set extpath
 | 
|---|
| 39 | set extpathinc
 | 
|---|
| 40 | set extpathlib
 | 
|---|
| 41 | set followlink
 | 
|---|
| 42 | set avecEXT 
 | 
|---|
| 43 | unset incln
 | 
|---|
| 44 | unset mincname
 | 
|---|
| 45 | set compopt
 | 
|---|
| 46 | unset arch32
 | 
|---|
| 47 | unset arch64
 | 
|---|
| 48 | unset sasz64
 | 
|---|
| 49 | unset ssldble128 
 | 
|---|
| 50 | unset nofpic
 | 
|---|
| 51 | unset nothsafe
 | 
|---|
| 52 | unset boundcheck
 | 
|---|
| 53 | unset sodebug
 | 
|---|
| 54 | unset usefftw2
 | 
|---|
| 55 | unset uselapack2
 | 
|---|
| 56 | unset alsofftwfloat
 | 
|---|
| 57 | unset slballinone
 | 
|---|
| 58 | ## variables pour PI (librairie motif, GNU-readline ...)
 | 
|---|
| 59 | set epipath
 | 
|---|
| 60 | unset wgrdl 
 | 
|---|
| 61 | set avecPI
 | 
|---|
| 62 | 
 | 
|---|
| 63 | #### boucle de decodage des arguments :
 | 
|---|
| 64 | while ( $#argv > 0 )
 | 
|---|
| 65 | 
 | 
|---|
| 66 | if( "$1" == "-h" ) then
 | 
|---|
| 67 |   echo 'configure [-sbase SOPHYABASE] [-scxx SOPHYACXX] [-incln] '
 | 
|---|
| 68 |   echo "  [-minc mymake.inc]  [-compopt 'cc/cxxOptions'] "
 | 
|---|
| 69 |   echo '  [-arch64] [-arch32] [-sasz64] [-ldble128] '
 | 
|---|
| 70 |   echo '  [-nofpic] [-nothsafe] [-boundcheck] [-sodebug]'
 | 
|---|
| 71 |   echo '  [-extp dir1 -extp dir2 ...] [-extip dir1 -extip dir2 ... ]'
 | 
|---|
| 72 |   echo '  [-extlp dir1 -extlp dir2 ... ] [-followlink] '
 | 
|---|
| 73 |   echo '  [-noextlib] [-noext fits] [-noext fftw] [-noext lapack] [-noext astro]'
 | 
|---|
| 74 |   echo '  [-alsofftwfloat] [-usefftw2] [-uselapack2] '
 | 
|---|
| 75 |   echo '  [-wgrdl] [-epip mdir1 -epip mdir2 ...]  [-noPI] [-slballinone]'
 | 
|---|
| 76 |   echo '  (See SOPHYA manual/web pages for a detailed description of configure options)'
 | 
|---|
| 77 |   exit -1
 | 
|---|
| 78 | endif
 | 
|---|
| 79 | if( "$1" == "-sbase" ) then
 | 
|---|
| 80 |   setenv SOPHYABASE $2
 | 
|---|
| 81 |   shift
 | 
|---|
| 82 | endif
 | 
|---|
| 83 | if( "$1" == "-scxx" ) then
 | 
|---|
| 84 |   setenv SOPHYACXX $2
 | 
|---|
| 85 |   shift
 | 
|---|
| 86 | endif
 | 
|---|
| 87 | if( "$1" == "-incln" ) then
 | 
|---|
| 88 |   set incln
 | 
|---|
| 89 | endif
 | 
|---|
| 90 | if( "$1" == "-minc" ) then
 | 
|---|
| 91 |   set mincname = ( $2 )
 | 
|---|
| 92 |   shift
 | 
|---|
| 93 | endif
 | 
|---|
| 94 | if( "$1" == "-compopt" ) then
 | 
|---|
| 95 |   set compopt = ( $2 )
 | 
|---|
| 96 |   shift
 | 
|---|
| 97 | endif
 | 
|---|
| 98 | if( "$1" == "-extp" ) then
 | 
|---|
| 99 |   set extpath = ( $extpath $2 )
 | 
|---|
| 100 |   shift
 | 
|---|
| 101 | endif
 | 
|---|
| 102 | if( "$1" == "-extip" ) then
 | 
|---|
| 103 |   set extpathinc = ( $extpathinc $2 )
 | 
|---|
| 104 |   shift
 | 
|---|
| 105 | endif
 | 
|---|
| 106 | if( "$1" == "-extlp" ) then
 | 
|---|
| 107 |   set extpathlib = ( $extpathlib $2 )
 | 
|---|
| 108 |   shift
 | 
|---|
| 109 | endif
 | 
|---|
| 110 | if( "$1" == "-followlink" ) then
 | 
|---|
| 111 |   set followlink = '-L '
 | 
|---|
| 112 | endif
 | 
|---|
| 113 | if( "$1" == "-noextlib" ) then
 | 
|---|
| 114 |   set i = 0
 | 
|---|
| 115 |   while ( $i < $#SOPEXTOK )
 | 
|---|
| 116 |     @ i += 1
 | 
|---|
| 117 |     set SOPEXTOK[$i] = 0
 | 
|---|
| 118 |   end  
 | 
|---|
| 119 |   unset avecEXT
 | 
|---|
| 120 | endif
 | 
|---|
| 121 | if( "$1" == "-noext" ) then
 | 
|---|
| 122 |   set i = 0
 | 
|---|
| 123 |   while ( $i < $#EXTCURNAME )
 | 
|---|
| 124 |     @ i += 1
 | 
|---|
| 125 |     if( "$2" == "$EXTCURNAME[$i]" ) set SOPEXTOK[$i] = 0
 | 
|---|
| 126 |   end
 | 
|---|
| 127 |   shift
 | 
|---|
| 128 | endif
 | 
|---|
| 129 | if( "$1" == "-alsofftwfloat" ) then
 | 
|---|
| 130 | # On veut la version float de FFTW, en plus de double
 | 
|---|
| 131 |   set alsofftwfloat
 | 
|---|
| 132 |   set i = 0
 | 
|---|
| 133 |   while ( $i < $#EXTCURNAME )
 | 
|---|
| 134 |     @ i += 1
 | 
|---|
| 135 |     if( "fftw" == "$EXTCURNAME[$i]" ) then
 | 
|---|
| 136 |        set ALLEXTLIBS[$i] = '-lfftw3 -lfftw3f'
 | 
|---|
| 137 |     endif
 | 
|---|
| 138 |   end
 | 
|---|
| 139 | endif
 | 
|---|
| 140 | if( "$1" == "-usefftw2" ) then
 | 
|---|
| 141 | # version FFTW 2 au lieu de V3
 | 
|---|
| 142 |   set usefftw2
 | 
|---|
| 143 |   set i = 0
 | 
|---|
| 144 |   while ( $i < $#EXTCURNAME )
 | 
|---|
| 145 |     @ i += 1
 | 
|---|
| 146 |     if( "fftw" == "$EXTCURNAME[$i]" ) then
 | 
|---|
| 147 |        set EXTINCNAME[$i] = 'FFTW/fftw.h'
 | 
|---|
| 148 |        set EXTLIBNAME[$i] = 'libfftw.a'
 | 
|---|
| 149 |        set ALLEXTLIBS[$i] = '-lfftw -lrfftw'
 | 
|---|
| 150 |     endif
 | 
|---|
| 151 |   end
 | 
|---|
| 152 | endif
 | 
|---|
| 153 | if( "$1" == "-uselapack2" ) then
 | 
|---|
| 154 | # version LAPACK 2 au lieu de V3
 | 
|---|
| 155 |   set uselapack2
 | 
|---|
| 156 | endif
 | 
|---|
| 157 | ## Decodage arguments specifique PI
 | 
|---|
| 158 | if( "$1" == "-noPI" ) then
 | 
|---|
| 159 |   set SOPPIOK = ( 0 0 0 )
 | 
|---|
| 160 |   unset avecPI 
 | 
|---|
| 161 | endif
 | 
|---|
| 162 | ## compil piapp avec GNU-readline 
 | 
|---|
| 163 | if( "$1" == "-wgrdl" ) then
 | 
|---|
| 164 |   set wgrdl
 | 
|---|
| 165 | endif
 | 
|---|
| 166 | ## Chemin motif , readline ...
 | 
|---|
| 167 | if( "$1" == "-epip" ) then
 | 
|---|
| 168 |   set epipath = ( $epipath $2 )
 | 
|---|
| 169 |   shift
 | 
|---|
| 170 | endif
 | 
|---|
| 171 | if( "$1" == "-slballinone" ) then
 | 
|---|
| 172 | # Pour utiliser une seule librairie libsophyaPIext.so au lieu 
 | 
|---|
| 173 | #   des 3 libsophya.so libextsophya.so libPI.so
 | 
|---|
| 174 |   set slballinone
 | 
|---|
| 175 | endif
 | 
|---|
| 176 | #  Decodage options pour flags de machdefs.h 
 | 
|---|
| 177 | #  Liste de flags : SO_ARCH64 SO_NOFPIC SO_SASIZET64 SO_LDBLE128 SO_BOUNDCHECKING SOPHYA_DEBUG
 | 
|---|
| 178 | if( "$1" == "-arch64" ) then
 | 
|---|
| 179 |   set arch64
 | 
|---|
| 180 |   unset arch32
 | 
|---|
| 181 | endif
 | 
|---|
| 182 | if( "$1" == "-arch32" ) then
 | 
|---|
| 183 |   set arch32
 | 
|---|
| 184 |   unset arch64
 | 
|---|
| 185 |   unset sasz64
 | 
|---|
| 186 | endif
 | 
|---|
| 187 | if( "$1" == "-sasz64" ) then
 | 
|---|
| 188 |   set sasz64
 | 
|---|
| 189 | endif
 | 
|---|
| 190 | if( "$1" == "-ldble128" ) then
 | 
|---|
| 191 |   set ssldble128
 | 
|---|
| 192 | endif
 | 
|---|
| 193 | if( "$1" == "-nofpic" ) then
 | 
|---|
| 194 |   set nofpic
 | 
|---|
| 195 | endif
 | 
|---|
| 196 | if( "$1" == "-nothsafe" ) then
 | 
|---|
| 197 |   set nothsafe
 | 
|---|
| 198 | endif
 | 
|---|
| 199 | if( "$1" == "-boundcheck" ) then
 | 
|---|
| 200 |   set boundcheck
 | 
|---|
| 201 | endif
 | 
|---|
| 202 | if( "$1" == "-sodebug" ) then
 | 
|---|
| 203 |   set sodebug
 | 
|---|
| 204 | endif
 | 
|---|
| 205 | 
 | 
|---|
| 206 | 
 | 
|---|
| 207 | shift
 | 
|---|
| 208 | end
 | 
|---|
| 209 | 
 | 
|---|
| 210 | ## ------ Detection linux 64 bits, AIX, IRIX ---
 | 
|---|
| 211 | unset linux64
 | 
|---|
| 212 | if ( `uname`  == "Linux" ) then 
 | 
|---|
| 213 |   if ( `uname -m` == "x86_64" ) then 
 | 
|---|
| 214 |     echo ' ... Linux x86_64 (64 bits) ---> -arch64 ' 
 | 
|---|
| 215 |     set linux64
 | 
|---|
| 216 |     if ( ! $?arch32 ) set arch64
 | 
|---|
| 217 |   endif
 | 
|---|
| 218 | endif
 | 
|---|
| 219 | set sname = `uname`
 | 
|---|
| 220 | if ( ( "$sname" == "IRIX64" ) || ( "$sname" == "AIX" ) ) then 
 | 
|---|
| 221 |   if ( ! $?arch32 ) set arch64 
 | 
|---|
| 222 | endif
 | 
|---|
| 223 | 
 | 
|---|
| 224 | 
 | 
|---|
| 225 | #----------------------------------------------------------------------
 | 
|---|
| 226 | #### Verification generale
 | 
|---|
| 227 | if( ! $?SOPHYABASE ) then
 | 
|---|
| 228 |   echo ERROR: define SOPHYABASE or use script arguments
 | 
|---|
| 229 |   exit -2
 | 
|---|
| 230 | endif
 | 
|---|
| 231 | if( ! $?SOPHYACXX ) then
 | 
|---|
| 232 |   echo ERROR: define SOPHYACXX or use script arguments
 | 
|---|
| 233 |   echo "   SOPHYACXX define the name of the C++ compiler (ex: g++ cxx ...)"
 | 
|---|
| 234 |   exit -2
 | 
|---|
| 235 | endif
 | 
|---|
| 236 | if( ! $?TMPDIR ) setenv TMPDIR /tmp
 | 
|---|
| 237 | touch $TMPDIR/tmp_test
 | 
|---|
| 238 | if( $status != 0 ) then
 | 
|---|
| 239 |   echo ERROR: no write acces in temporary directory: $TMPDIR
 | 
|---|
| 240 |   echo '----> define TMPDIR environment variable: "setenv TMPDIR ..."'
 | 
|---|
| 241 |   exit -2
 | 
|---|
| 242 | endif
 | 
|---|
| 243 | rm -f $TMPDIR/tmp_test
 | 
|---|
| 244 | if( ! $?mincname ) then
 | 
|---|
| 245 |   set mincname = `uname`_${SOPHYACXX}_make.inc
 | 
|---|
| 246 | endif
 | 
|---|
| 247 | if( ! -e $mincname ) then
 | 
|---|
| 248 |   echo ERROR: file $mincname NOT found
 | 
|---|
| 249 |   exit -2
 | 
|---|
| 250 | endif
 | 
|---|
| 251 | if( ! -e ../BaseTools/machdefs_mkmf.h ) then
 | 
|---|
| 252 |   echo ERROR: file machdefs_mkmf.h NOT found in BaseTools
 | 
|---|
| 253 |   exit -2
 | 
|---|
| 254 | endif
 | 
|---|
| 255 | echo SOPEXTOK: $SOPEXTOK
 | 
|---|
| 256 | 
 | 
|---|
| 257 | ## Chemin de recherche en fonction de 64/32 bits sur linux
 | 
|---|
| 258 | if ( $?linux64 ) then 
 | 
|---|
| 259 |   if ( $?arch64 ) then 
 | 
|---|
| 260 |     set defextlib = ( /usr/lib64 /usr/local/ )
 | 
|---|
| 261 |     set defepilib = ( /usr/X11R6/lib64 )
 | 
|---|
| 262 |     echo ' linux 64 , arch64 defextlib = ' $defextlib ' defepilib=' $defepilib 
 | 
|---|
| 263 |   else
 | 
|---|
| 264 |     echo ' linux 64 , arch32 defextlib = ' $defextlib ' defepilib=' $defepilib 
 | 
|---|
| 265 |   endif
 | 
|---|
| 266 | endif
 | 
|---|
| 267 | 
 | 
|---|
| 268 | 
 | 
|---|
| 269 | #----------------------------------------------------------------------
 | 
|---|
| 270 | #### creation des variables chemins sophya core
 | 
|---|
| 271 | echo " "
 | 
|---|
| 272 | echo ">>>>>> 1/ Creating directory tree under $SOPHYABASE  "
 | 
|---|
| 273 | set sinc = $SOPHYABASE/include
 | 
|---|
| 274 | set slib = $SOPHYABASE/lib
 | 
|---|
| 275 | set sslb = $SOPHYABASE/slb
 | 
|---|
| 276 | set sobj = $SOPHYABASE/obj
 | 
|---|
| 277 | set sexe = $SOPHYABASE/exe
 | 
|---|
| 278 | set sconf = $sinc/SophyaConfInfo
 | 
|---|
| 279 | foreach d ( $sinc $slib $sslb $sobj $sexe $sconf )
 | 
|---|
| 280 |   if( ! -d $d ) then
 | 
|---|
| 281 |     mkdir $d
 | 
|---|
| 282 |     if( $status ) then
 | 
|---|
| 283 |       echo ERROR: creation of $d failed
 | 
|---|
| 284 |       exit -3
 | 
|---|
| 285 |     endif
 | 
|---|
| 286 |     echo Directory $d created
 | 
|---|
| 287 |   endif
 | 
|---|
| 288 |   touch $d/tmp_test
 | 
|---|
| 289 |   if( $status ) then
 | 
|---|
| 290 |     echo ERROR: no write acces to $d
 | 
|---|
| 291 |     exit -4
 | 
|---|
| 292 |   endif
 | 
|---|
| 293 |   rm -f $d/tmp_test
 | 
|---|
| 294 | end
 | 
|---|
| 295 | 
 | 
|---|
| 296 | 
 | 
|---|
| 297 | #----------------------------------------------------------------------
 | 
|---|
| 298 | #### Fichier confinfo - log de configure
 | 
|---|
| 299 | set conflog = $sconf/conf.log
 | 
|---|
| 300 | rm -f $conflog ; touch $conflog 
 | 
|---|
| 301 | echo ' --- Log of SOPHYA configure script - Date= ' `date` >> $conflog
 | 
|---|
| 302 | echo "$cmdline"  >> $conflog
 | 
|---|
| 303 | set inclistf = $sconf/include.list
 | 
|---|
| 304 | rm -f $inclistf ; touch $inclistf
 | 
|---|
| 305 | 
 | 
|---|
| 306 | 
 | 
|---|
| 307 | #----------------------------------------------------------------------
 | 
|---|
| 308 | #### liens ou copie des *.h
 | 
|---|
| 309 | echo " "
 | 
|---|
| 310 | if( $?incln ) then
 | 
|---|
| 311 |   echo ">>>>>> 2/ Creating symbolic link for include files in $sinc "
 | 
|---|
| 312 | else
 | 
|---|
| 313 |   echo ">>>>>> 2/ Copying include files to $sinc "
 | 
|---|
| 314 | endif
 | 
|---|
| 315 | 
 | 
|---|
| 316 | cd ../  > /dev/null
 | 
|---|
| 317 | set srcd = `pwd`
 | 
|---|
| 318 | set cpln = "cp -p "
 | 
|---|
| 319 | if( $?incln ) set cpln = "ln -s -f  "
 | 
|---|
| 320 | foreach d ( $SOPMOD $SOPEXT $SOPPI )
 | 
|---|
| 321 |   if ( -d $srcd/$d ) then
 | 
|---|
| 322 |     if ( $?incln ) then 
 | 
|---|
| 323 |       echo Creating link to include files for module $d
 | 
|---|
| 324 |     else 
 | 
|---|
| 325 |       echo Copying include files for module $d
 | 
|---|
| 326 |     endif
 | 
|---|
| 327 | 
 | 
|---|
| 328 |     cd $srcd/$d;
 | 
|---|
| 329 |     set file = ( *.h )
 | 
|---|
| 330 |     cd $sinc;  if( $status == 0 ) rm -f $file
 | 
|---|
| 331 |     # on vire le .h de $file si .h dans excludeinc du module
 | 
|---|
| 332 |     cd $srcd/$d
 | 
|---|
| 333 |     if( -e excludeinc ) then
 | 
|---|
| 334 |       if( `cat excludeinc | wc -l` > 0 ) then
 | 
|---|
| 335 |         set file
 | 
|---|
| 336 |         foreach f ( *.h )
 | 
|---|
| 337 |           grep -q "$f:r\.h" excludeinc
 | 
|---|
| 338 |           if( $status != 0 ) set file = ( $file $f )
 | 
|---|
| 339 |         end
 | 
|---|
| 340 |       endif
 | 
|---|
| 341 |     endif
 | 
|---|
| 342 |     # on copie ou link dans $sinc
 | 
|---|
| 343 |     if( `echo $file | wc -w` > 0 ) then
 | 
|---|
| 344 |       foreach f ( $file )
 | 
|---|
| 345 |         $cpln $srcd/$d/$f  $sinc/$f
 | 
|---|
| 346 |       end
 | 
|---|
| 347 |     endif
 | 
|---|
| 348 |     echo $file >> $inclistf
 | 
|---|
| 349 |   endif
 | 
|---|
| 350 | end
 | 
|---|
| 351 | rm -f $sinc/machdefs_ac.h $sinc/machdefs_mkmf.h 
 | 
|---|
| 352 | cd $srcd/BuildMgr/.
 | 
|---|
| 353 | 
 | 
|---|
| 354 | 
 | 
|---|
| 355 | #----------------------------------------------------------------------
 | 
|---|
| 356 | #### lien  des .h des librairies externes
 | 
|---|
| 357 | echo " "
 | 
|---|
| 358 | echo ">>>>>> 3.1/  Include files for external libraries "
 | 
|---|
| 359 | set i = 0
 | 
|---|
| 360 | while ( $i < $#SOPEXT )
 | 
|---|
| 361 |   @ i += 1
 | 
|---|
| 362 |   if( "$EXTINCNAME[$i]" == "PASDEINC" ) continue
 | 
|---|
| 363 |   if( $SOPEXTOK[$i] <= 0 ) continue
 | 
|---|
| 364 |   set nom = $EXTINCNAME[$i]:t
 | 
|---|
| 365 |   set rac = $EXTINCNAME[$i]:h
 | 
|---|
| 366 |   if( -d ../$SOPEXT[$i] ) then
 | 
|---|
| 367 |     echo "Searching include file for $SOPEXT[$i] ..."
 | 
|---|
| 368 |     foreach d ( $extpathinc $extpath $defextinc )
 | 
|---|
| 369 |       set duminc = `find $followlink $d -name $nom -print | head -1 `
 | 
|---|
| 370 |       set dumrep = $duminc:h
 | 
|---|
| 371 |       if ( "$dumrep" != "" ) then
 | 
|---|
| 372 |         rm -f $sinc/$rac
 | 
|---|
| 373 |         ln -f -s $dumrep $sinc/$rac
 | 
|---|
| 374 |         echo Includes for $SOPEXT[$i] found in $dumrep
 | 
|---|
| 375 |         break
 | 
|---|
| 376 |       endif
 | 
|---|
| 377 |     end
 | 
|---|
| 378 |     if ( "$dumrep" == "" ) then
 | 
|---|
| 379 |       echo WARNING: Includes for $SOPEXT[$i] NOT found
 | 
|---|
| 380 |       echo "    Compilation of module  $SOPEXT[$i] disabled"
 | 
|---|
| 381 |       set SOPEXTOK[$i] = 0
 | 
|---|
| 382 |     endif
 | 
|---|
| 383 |   endif
 | 
|---|
| 384 | end
 | 
|---|
| 385 | 
 | 
|---|
| 386 | ### recherche des .h Motif et si besoin readline 
 | 
|---|
| 387 | set piextinc 
 | 
|---|
| 388 | if ( $?avecPI ) then
 | 
|---|
| 389 |   echo " "
 | 
|---|
| 390 |   echo ">>>>>> 3.2/ searching include files for Motif "
 | 
|---|
| 391 |   foreach d ( $epipath $defepiinc $extpathinc $extpath $defextinc )
 | 
|---|
| 392 |     set duminc = `find $followlink $d -name Xm -print | head -1 `
 | 
|---|
| 393 |     set dumrep = $duminc:h
 | 
|---|
| 394 |     if ( "$dumrep" != "" ) then
 | 
|---|
| 395 |       echo Includes for Motif found in $dumrep
 | 
|---|
| 396 |       if ( ( "$dumrep" != "/usr/include" ) && ( "$dumrep" != "/usr/include/" ) )   set piextinc = "-I$dumrep"
 | 
|---|
| 397 |       break
 | 
|---|
| 398 |     endif
 | 
|---|
| 399 |   end
 | 
|---|
| 400 |   if ( "$dumrep" == "" ) then
 | 
|---|
| 401 |     echo WARNING: Includes for Motif NOT found
 | 
|---|
| 402 |     echo '    expect problems when compiling PI modules, check sophyamake.inc ... '
 | 
|---|
| 403 |   endif
 | 
|---|
| 404 |   if ( $?wgrdl ) then 
 | 
|---|
| 405 |     echo ">>>>>> 3.3/ searching include files for GNU readline "
 | 
|---|
| 406 |     foreach d ( $epipath $extpathinc $extpath $defextinc )
 | 
|---|
| 407 |       set duminc = `find $followlink $d -name readline -print | head -1 `
 | 
|---|
| 408 |       set dumrep2 = $duminc:h
 | 
|---|
| 409 |       if ( "$dumrep2" != "" ) then
 | 
|---|
| 410 |         echo Includes for readline found in $dumrep2
 | 
|---|
| 411 |         if ( "$dumrep2" != "$dumrep" )  then 
 | 
|---|
| 412 |           if ( ( "$dumrep2" != "/usr/include" ) && ( "$dumrep2" != "/usr/include/" ) )  set piextinc = "-I$dumrep2 $piextinc"
 | 
|---|
| 413 |         endif
 | 
|---|
| 414 |         break
 | 
|---|
| 415 |       endif
 | 
|---|
| 416 |     end
 | 
|---|
| 417 |     if ( "$dumrep2" == "" ) then
 | 
|---|
| 418 |       echo WARNING: Includes for readline NOT found
 | 
|---|
| 419 |       echo '    expect problems when compiling piapp, check sophyamake.inc ... '
 | 
|---|
| 420 |     endif
 | 
|---|
| 421 |   endif
 | 
|---|
| 422 | endif 
 | 
|---|
| 423 | 
 | 
|---|
| 424 | #----------------------------------------------------------------------
 | 
|---|
| 425 | #### liens des librairies externes
 | 
|---|
| 426 | echo " "
 | 
|---|
| 427 | echo ">>>>>> 4.1/  External libraries "
 | 
|---|
| 428 | set fpath = $TMPDIR/fpath
 | 
|---|
| 429 | rm -f $fpath; touch $fpath
 | 
|---|
| 430 | set extliblib
 | 
|---|
| 431 | set i = 0
 | 
|---|
| 432 | while ( $i < $#SOPEXT )
 | 
|---|
| 433 |   @ i += 1
 | 
|---|
| 434 |   if( "$EXTLIBNAME[$i]" == "PASDELIB" ) continue
 | 
|---|
| 435 |   if( $SOPEXTOK[$i] <= 0 ) continue
 | 
|---|
| 436 |   set nom = $EXTLIBNAME[$i]
 | 
|---|
| 437 |   if( -d ../$SOPEXT[$i] ) then
 | 
|---|
| 438 |     echo "Searching libraries path for $SOPEXT[$i] ..."
 | 
|---|
| 439 |     foreach d ( $extpathlib $extpath $defextlib )
 | 
|---|
| 440 |       set dumlib = `find $followlink $d -name $nom -print | head -1 `
 | 
|---|
| 441 |       if ( "$dumlib" != "" ) then
 | 
|---|
| 442 |         echo "-L$dumlib:h" >> $fpath
 | 
|---|
| 443 |         set extliblib = ( $extliblib $ALLEXTLIBS[$i] )
 | 
|---|
| 444 |         break
 | 
|---|
| 445 |       endif
 | 
|---|
| 446 |     end
 | 
|---|
| 447 |     if ( "$dumlib" == "" ) then
 | 
|---|
| 448 |       echo WARNING: Libraries for $SOPEXT[$i] NOT found
 | 
|---|
| 449 |       echo "    Check the generated make.inc file"
 | 
|---|
| 450 |     endif
 | 
|---|
| 451 |   endif
 | 
|---|
| 452 | end
 | 
|---|
| 453 | set extlibpath = `cat $fpath | sort -u`
 | 
|---|
| 454 | echo extlibpath= $extlibpath
 | 
|---|
| 455 | echo extliblib= $extliblib
 | 
|---|
| 456 | rm -f $fpath
 | 
|---|
| 457 | 
 | 
|---|
| 458 | ### recherche des librairies Motif et si besoin readline 
 | 
|---|
| 459 | set piextlib = "-L$defepilib -lXm"
 | 
|---|
| 460 | if ( $?avecPI ) then
 | 
|---|
| 461 |   echo " "
 | 
|---|
| 462 |   echo ">>>>>> 4.2/ searching library Motif (libXm.a) "
 | 
|---|
| 463 |   foreach d ( $epipath $defepilib $extpathlib $extpath $defextlib )
 | 
|---|
| 464 |     set dumlib = `find $followlink $d -name libXm.a -print | head -1 `
 | 
|---|
| 465 |     set dumrep = $dumlib:h
 | 
|---|
| 466 |     if ( "$dumrep" != "" ) then
 | 
|---|
| 467 |       echo Motif library found in $dumrep
 | 
|---|
| 468 |       if ( ( "$dumrep" != "/usr/lib" ) && ( "$dumrep" != "/usr/lib/" ) && \
 | 
|---|
| 469 |            ( "$dumrep" != "/usr/lib64" ) && ( "$dumrep" != "/usr/lib64/" ) && \
 | 
|---|
| 470 |            ( "$dumrep" != "/usr/X11R6/lib" ) && ( "$dumrep" != "/usr/X11R6/lib/" ) && \
 | 
|---|
| 471 |            ( "$dumrep" != "/usr/X11R6/lib64" ) && ( "$dumrep" != "/usr/X11R6/lib64/" ) )  set piextlib = "-L$dumrep -lXm"
 | 
|---|
| 472 |       break
 | 
|---|
| 473 |     endif
 | 
|---|
| 474 |     end
 | 
|---|
| 475 |     if ( "$dumrep" == "" ) then
 | 
|---|
| 476 |       echo WARNING: Motif library NOT found
 | 
|---|
| 477 |       echo '    expect problems when for linking with PI, check sophyamake.inc ... '
 | 
|---|
| 478 |     endif
 | 
|---|
| 479 |   if ( $?wgrdl ) then 
 | 
|---|
| 480 |     echo ">>>>>> 4.3/ searching libraries for GNU readline "
 | 
|---|
| 481 |   foreach d ( $epipath $extpathlib $extpath $defextlib )
 | 
|---|
| 482 |     set dumlib = `find $followlink $d -name libreadline.a -print | head -1 `
 | 
|---|
| 483 |     set dumrep2 = $dumlib:h
 | 
|---|
| 484 |     if ( "$dumrep2" != "" ) then
 | 
|---|
| 485 |       if ( ( "$dumrep2" != "$dumrep" )  && \
 | 
|---|
| 486 |            ( "$dumrep2" != "/usr/lib" ) && ( "$dumrep2" != "/usr/lib/" ) && \
 | 
|---|
| 487 |            ( "$dumrep2" != "/usr/lib64" ) && ( "$dumrep2" != "/usr/lib64/" ) && \
 | 
|---|
| 488 |            ( "$dumrep2" != "/usr/X11R6/lib" ) && ( "$dumrep2" != "/usr/X11R6/lib/" ) && \
 | 
|---|
| 489 |            ( "$dumrep2" != "/usr/X11R6/lib64" ) && ( "$dumrep2" != "/usr/X11R6/lib64/" ) )  then
 | 
|---|
| 490 |         set piextlib = "-L$dumrep2 -lreadline -lhistory -lcurses $piextlib "
 | 
|---|
| 491 |       else 
 | 
|---|
| 492 |         set piextlib = "$piextlib -lreadline -lhistory -lcurses "
 | 
|---|
| 493 |       endif
 | 
|---|
| 494 |       echo Libraries for readline found in $dumrep2
 | 
|---|
| 495 |       break
 | 
|---|
| 496 |     endif
 | 
|---|
| 497 |     end
 | 
|---|
| 498 |     if ( "$dumrep2" == "" ) then
 | 
|---|
| 499 |       set piextlib = "$piextlib -lreadline -lhistory -lcurses "
 | 
|---|
| 500 |       echo WARNING: libraries for readline NOT found
 | 
|---|
| 501 |       echo '    expect problems when linking piapp, check sophyamake.inc ... '
 | 
|---|
| 502 |     endif
 | 
|---|
| 503 |   endif
 | 
|---|
| 504 | endif 
 | 
|---|
| 505 | 
 | 
|---|
| 506 | #----------------------------------------------------------------------
 | 
|---|
| 507 | #### Identification des librairies archives Sophya
 | 
|---|
| 508 | echo " "
 | 
|---|
| 509 | echo ">>>>>> 4.4/  Sophya libraries archives "
 | 
|---|
| 510 | set sopmodlib
 | 
|---|
| 511 | set i = 0
 | 
|---|
| 512 | while ( $i < $#SOPMOD )
 | 
|---|
| 513 |   @ i += 1
 | 
|---|
| 514 |   if( $SOPMODOK[$i] <= 0 ) continue
 | 
|---|
| 515 |   if( -d ../$SOPMOD[$i] ) then
 | 
|---|
| 516 |     set sopmodlib = ( $sopmodlib $ALLSOPLIBS[$i] )
 | 
|---|
| 517 |   else
 | 
|---|
| 518 |     echo "WARNING: module "$SOPMOD[$i]" not found"
 | 
|---|
| 519 |   endif
 | 
|---|
| 520 | end
 | 
|---|
| 521 | echo sopmodlib= $sopmodlib
 | 
|---|
| 522 | 
 | 
|---|
| 523 | echo " "
 | 
|---|
| 524 | echo ">>>>>> 4.3/  PI-Sophya libraries archives "
 | 
|---|
| 525 | set soppilib
 | 
|---|
| 526 | set i = 0
 | 
|---|
| 527 | while ( $i < $#SOPPI )
 | 
|---|
| 528 |   @ i += 1
 | 
|---|
| 529 |   if( $SOPPIOK[$i] <= 0 ) continue
 | 
|---|
| 530 |   if( -d ../$SOPPI[$i] ) then
 | 
|---|
| 531 |     set soppilib = ( $soppilib $ALLPILIBS[$i] )
 | 
|---|
| 532 |   else
 | 
|---|
| 533 |     echo "WARNING: module "$SOPPI[$i]" not found"
 | 
|---|
| 534 |   endif
 | 
|---|
| 535 | end
 | 
|---|
| 536 | echo soppilib= $soppilib
 | 
|---|
| 537 | 
 | 
|---|
| 538 | #----------------------------------------------------------------------
 | 
|---|
| 539 | #### Generation de sophyamake.inc
 | 
|---|
| 540 | #  On le cree dans le repertoire temporaire d'abord 
 | 
|---|
| 541 | set mfile = $sinc/sophyamake.inc
 | 
|---|
| 542 | rm -f $mfile
 | 
|---|
| 543 | echo " "
 | 
|---|
| 544 | echo ">>>>>> 5/  Creating $mfile from $mincname "
 | 
|---|
| 545 | echo "# -----------------------------------------------" > $mfile
 | 
|---|
| 546 | echo "#  File make.inc - generated by SOPHYA configure" >> $mfile
 | 
|---|
| 547 | echo "#  Date" `date` >> $mfile 
 | 
|---|
| 548 | echo "#  Seed file : $mincname " >> $mfile 
 | 
|---|
| 549 | echo "# -----------------------------------------------" >> $mfile
 | 
|---|
| 550 | echo " " >> $mfile 
 | 
|---|
| 551 | echo "# SOPHYA Base installation directory " >> $mfile 
 | 
|---|
| 552 | echo "SOPHYABASE = $SOPHYABASE" >> $mfile
 | 
|---|
| 553 | echo " " >> $mfile 
 | 
|---|
| 554 | echo 'SOPHYAINCP = $(SOPHYABASE)/include/' >> $mfile
 | 
|---|
| 555 | echo 'SOPHYAOBJP = $(SOPHYABASE)/obj/' >> $mfile
 | 
|---|
| 556 | echo 'SOPHYALIBP = $(SOPHYABASE)/lib/' >> $mfile
 | 
|---|
| 557 | echo 'SOPHYASLBP = $(SOPHYABASE)/slb/' >> $mfile
 | 
|---|
| 558 | echo 'SOPHYAEXEP = $(SOPHYABASE)/exe/' >> $mfile
 | 
|---|
| 559 | 
 | 
|---|
| 560 | echo " " >> $mfile 
 | 
|---|
| 561 | echo "# module libraries  " >> $mfile
 | 
|---|
| 562 | echo "SOPMODLIBLIST = $sopmodlib" >> $mfile
 | 
|---|
| 563 | 
 | 
|---|
| 564 | echo " " >> $mfile 
 | 
|---|
| 565 | echo "# External libraries PATH  " >> $mfile
 | 
|---|
| 566 | echo "SOPEXTLIBP = $extlibpath"  >> $mfile
 | 
|---|
| 567 | echo "SOPEXTLIBLIST = $extliblib" >> $mfile
 | 
|---|
| 568 | 
 | 
|---|
| 569 | echo " " >> $mfile 
 | 
|---|
| 570 | echo "# PI libraries  " >> $mfile
 | 
|---|
| 571 | echo "SOPPILIBLIST = $soppilib" >> $mfile
 | 
|---|
| 572 | echo "PIEXTINC = $piextinc" >> $mfile
 | 
|---|
| 573 | echo "PIEXTLIB = $piextlib" >> $mfile
 | 
|---|
| 574 | echo "PIEXTINC = $piextinc" 
 | 
|---|
| 575 | echo "PIEXTLIB = $piextlib"
 | 
|---|
| 576 | 
 | 
|---|
| 577 | echo " " >> $mfile 
 | 
|---|
| 578 | cat $mincname >> $mfile
 | 
|---|
| 579 | 
 | 
|---|
| 580 | # --- Gestion des flags modifiants les options de compilation et liste de librairies (par sed)
 | 
|---|
| 581 | set sprgfile = $TMPDIR/compop.scom
 | 
|---|
| 582 | rm -f $sprgfile
 | 
|---|
| 583 | echo '{' > $sprgfile 
 | 
|---|
| 584 | set scmd = "/FLAGS/s/CNFPHFLF/ $compopt/g"
 | 
|---|
| 585 | if ( $?arch64 ) then
 | 
|---|
| 586 |   set a64cf = ' '
 | 
|---|
| 587 |   if ( ( "$sname" == "IRIX64" ) && ("$SOPHYACXX" == "CC" ) ) set a64cf = '-64'
 | 
|---|
| 588 |   if ( "$sname" == "AIX" ) then 
 | 
|---|
| 589 |     if ( ("$SOPHYACXX" == "xlC" ) || ("$SOPHYACXX" == "xlc" ) )  set a64cf = '-q64'
 | 
|---|
| 590 |     echo "/ARFLAGS/s/-rcs/-rcs -X 64/" >>  $sprgfile 
 | 
|---|
| 591 |   endif
 | 
|---|
| 592 |   set scmd = "/FLAGS/s/CNFPHFLF/$a64cf $compopt/g"
 | 
|---|
| 593 | endif
 | 
|---|
| 594 | if ( $?arch32 ) then
 | 
|---|
| 595 |   set a32cf = ' '
 | 
|---|
| 596 |   if ( ( "$sname" == "Linux" ) && ("$SOPHYACXX" == "g++" ) ) set a32cf = '-m32'
 | 
|---|
| 597 |   if ( "$sname" == "AIX" ) then 
 | 
|---|
| 598 |     if ( ("$SOPHYACXX" == "xlC" ) || ("$SOPHYACXX" == "xlc" ) )  set a32cf = '-q32'
 | 
|---|
| 599 |   endif
 | 
|---|
| 600 |   set scmd = "/FLAGS/s/CNFPHFLF/$a32cf $compopt/g"
 | 
|---|
| 601 | endif
 | 
|---|
| 602 | 
 | 
|---|
| 603 | echo $scmd >> $sprgfile
 | 
|---|
| 604 | if ( $?nofpic ) echo "s/-fPIC/ /g" >>  $sprgfile
 | 
|---|
| 605 | if( $?slballinone ) then 
 | 
|---|
| 606 |   echo "/SOPHYAALLSLBLIST/s/-lPI -lextsophya -lsophya/-lAsophyaextPI/" >>  $sprgfile 
 | 
|---|
| 607 |   echo "/SOPHYAEXTSLBLIST/s/-lextsophya -lsophya/-lAsophyaextPI/" >>  $sprgfile 
 | 
|---|
| 608 | endif
 | 
|---|
| 609 | if ( ! $?avecEXT ) then 
 | 
|---|
| 610 |   echo "/SOPHYAEXTSLBLIST/s/-lextsophya / /"  >>  $sprgfile 
 | 
|---|
| 611 |   echo "/SOPHYAALLSLBLIST/s/-lextsophya / /"  >>  $sprgfile 
 | 
|---|
| 612 | endif
 | 
|---|
| 613 | if ( ! $?avecPI ) then 
 | 
|---|
| 614 |   echo "/SOPHYAALLSLBLIST/s/-lPI / /"  >>  $sprgfile 
 | 
|---|
| 615 | endif
 | 
|---|
| 616 | if ( ( $?linux64 ) && ( $?arch64) ) then
 | 
|---|
| 617 |   echo "s?-L/usr/lib?-L/usr/lib64?g" >>  $sprgfile 
 | 
|---|
| 618 |   echo "s?-L/usr/X11R6/lib?-L/usr/X11R6/lib64?g" >>  $sprgfile 
 | 
|---|
| 619 | endif
 | 
|---|
| 620 | echo '}' >> $sprgfile 
 | 
|---|
| 621 | set mftmp = $TMPDIR/sopmake.inc
 | 
|---|
| 622 | cp $mfile $mftmp
 | 
|---|
| 623 | rm -f $mfile
 | 
|---|
| 624 | sed -f $sprgfile $mftmp >   $mfile
 | 
|---|
| 625 | rm -f $sprgfile $mftmp
 | 
|---|
| 626 | # --- FIN de gestion des flags modifiants les options de compilation (par sed)
 | 
|---|
| 627 | 
 | 
|---|
| 628 | rm -f $mfile:t
 | 
|---|
| 629 | ln -s $mfile $mfile:t
 | 
|---|
| 630 | 
 | 
|---|
| 631 | 
 | 
|---|
| 632 | #----------------------------------------------------------------------
 | 
|---|
| 633 | #### Copie de machdefs.h
 | 
|---|
| 634 | set mdefname = $TMPDIR/machdefs.h
 | 
|---|
| 635 | echo " "
 | 
|---|
| 636 | echo ">>>>>> 6.a/  Creating  machdefs.h from BaseTools/machdefs_mkmf.h"
 | 
|---|
| 637 | rm -f $mdefname; touch $mdefname
 | 
|---|
| 638 | echo "/*** machdefs.h generated by SOPHYA configure ***/" >> $mdefname
 | 
|---|
| 639 | echo "#ifndef MACHDEFS_SEEN" >> $mdefname
 | 
|---|
| 640 | echo "#define MACHDEFS_SEEN" >> $mdefname
 | 
|---|
| 641 | echo "/*------ Code generation switch ---- */" >> $mdefname
 | 
|---|
| 642 | echo "/*   System selector (uname) */" >> $mdefname
 | 
|---|
| 643 | # Fait avant - set sname = `uname`
 | 
|---|
| 644 | echo "#ifndef $sname" >> $mdefname
 | 
|---|
| 645 | echo "#define $sname 1 "  >> $mdefname
 | 
|---|
| 646 | echo "#endif" >> $mdefname
 | 
|---|
| 647 | 
 | 
|---|
| 648 | ## Definition de flags de compilation en fonction des options de configure 
 | 
|---|
| 649 | if ( $?arch64 )  echo "#define SO_ARCH64  1" >> $mdefname
 | 
|---|
| 650 | if ( $?sasz64 )  echo "#define SO_SASIZET64  1" >> $mdefname
 | 
|---|
| 651 | if ( $?ssldble128 ) echo "#define SO_LDBLE128  1" >> $mdefname
 | 
|---|
| 652 | if ( $?nofpic )  echo "#define SO_NOFPIC  1" >> $mdefname
 | 
|---|
| 653 | if ( $?nothsafe )  echo "#define SO_NOTHSAFE  1" >> $mdefname
 | 
|---|
| 654 | if ( $?boundcheck )  echo "#define SO_BOUNDCHECKING  1" >> $mdefname
 | 
|---|
| 655 | if ( $?sodebug )  echo "#define SOPHYA_DEBUG  1" >> $mdefname
 | 
|---|
| 656 | 
 | 
|---|
| 657 | if ( "$sname" == "IRIX64" ) then
 | 
|---|
| 658 |   if ( "$SOPHYACXX" == "CC" ) then
 | 
|---|
| 659 | #  __SGICC__ : flag indiquant que c'est le compilo CC de SGI 
 | 
|---|
| 660 |     echo "#define __SGICC__ 1" >> $mdefname
 | 
|---|
| 661 |   endif
 | 
|---|
| 662 | endif
 | 
|---|
| 663 | 
 | 
|---|
| 664 | 
 | 
|---|
| 665 | echo " " >> $mdefname 
 | 
|---|
| 666 | grep -v -e '#ifndef *MACHDEFS_SEEN' -e '#define *MACHDEFS_SEEN' ../BaseTools/machdefs_mkmf.h >> $mdefname
 | 
|---|
| 667 | #  On ne copie que si machdefs.h est different 
 | 
|---|
| 668 | if (-e $sinc/machdefs.h ) then 
 | 
|---|
| 669 |   diff $mdefname $sinc/machdefs.h >& /dev/null
 | 
|---|
| 670 |   if ($status != 0) then 
 | 
|---|
| 671 |     cp -f -p $mdefname $sinc/machdefs.h 
 | 
|---|
| 672 |     echo " file $sinc/machdefs.h changed -> replaced"    
 | 
|---|
| 673 |   else 
 | 
|---|
| 674 |     echo " file $sinc/machdefs.h has not changed -> kept"
 | 
|---|
| 675 |   endif
 | 
|---|
| 676 | else
 | 
|---|
| 677 |   cp -f -p $mdefname $sinc/machdefs.h  
 | 
|---|
| 678 |   echo " file $sinc/machdefs.h created"    
 | 
|---|
| 679 | endif
 | 
|---|
| 680 | rm -f $mdefname
 | 
|---|
| 681 | 
 | 
|---|
| 682 | 
 | 
|---|
| 683 | #### Creation de sspvflags.h
 | 
|---|
| 684 | echo " "
 | 
|---|
| 685 | echo ">>>>>> 6.b/  Creating  $sinc/sspvflags.h "
 | 
|---|
| 686 | rm -f $sinc/sspvflags.h; touch $sinc/sspvflags.h
 | 
|---|
| 687 | 
 | 
|---|
| 688 | echo "#ifndef SSPVFLAGS_SEEN" >> $sinc/sspvflags.h
 | 
|---|
| 689 | echo "#define SSPVFLAGS_SEEN" >> $sinc/sspvflags.h
 | 
|---|
| 690 | echo " " >> $sinc/sspvflags.h 
 | 
|---|
| 691 | echo "/*------ External libraries no-use flag ---- */" >> $sinc/sspvflags.h
 | 
|---|
| 692 | set i = 0
 | 
|---|
| 693 | while ( $i < $#SOPEXTOK )
 | 
|---|
| 694 |   @ i += 1
 | 
|---|
| 695 |   if( $SOPEXTOK[$i] > 0 ) continue
 | 
|---|
| 696 |   echo "#define SOPHYA_NO_$SOPEXT[$i]" >> $sinc/sspvflags.h
 | 
|---|
| 697 | end
 | 
|---|
| 698 | 
 | 
|---|
| 699 | echo " " >> $sinc/sspvflags.h 
 | 
|---|
| 700 | echo "/*------ SOPOHYA/ExtLibsvVersion selection flags ---- */" >> $sinc/sspvflags.h
 | 
|---|
| 701 | echo " " >> $sinc/sspvflags.h 
 | 
|---|
| 702 | if( $?alsofftwfloat ) then
 | 
|---|
| 703 |   echo "/*-- Compile ALSO float version of FFTWServer methods -- */" >> $sinc/sspvflags.h
 | 
|---|
| 704 |   echo "#define ALSO_FFTW_FLOAT_EXTSOP" >> $sinc/sspvflags.h
 | 
|---|
| 705 | endif
 | 
|---|
| 706 | if( $?usefftw2 ) then
 | 
|---|
| 707 |   echo "/*-- Use FFTW V2 instead of V3 -- */" >> $sinc/sspvflags.h
 | 
|---|
| 708 |   echo "#define FFTW_V2_EXTSOP" >> $sinc/sspvflags.h
 | 
|---|
| 709 | endif
 | 
|---|
| 710 | if( $?uselapack2 ) then
 | 
|---|
| 711 |   echo "/*-- Use LAPACK V2 instead of V3 -- */" >> $sinc/sspvflags.h
 | 
|---|
| 712 |   echo "#define LAPACK_V2_EXTSOP" >> $sinc/sspvflags.h
 | 
|---|
| 713 | endif
 | 
|---|
| 714 | if( $?wgrdl ) then
 | 
|---|
| 715 |   echo "/*-- Compile piapp with GNU-readline -- */" >> $sinc/sspvflags.h
 | 
|---|
| 716 |   echo "#define PIA_WITH_GNUREADLINE" >> $sinc/sspvflags.h
 | 
|---|
| 717 | endif
 | 
|---|
| 718 | if( $?slballinone ) then
 | 
|---|
| 719 |   echo "/*------ Use of single shared lib for SOPHYA+extlibs+PI ---- */" >> $sinc/sspvflags.h
 | 
|---|
| 720 |   echo "#define SO_SLBALLINONE " >> $sinc/sspvflags.h
 | 
|---|
| 721 | endif
 | 
|---|
| 722 | echo " " >> $sinc/sspvflags.h 
 | 
|---|
| 723 | echo "#endif " >> $sinc/sspvflags.h 
 | 
|---|
| 724 | 
 | 
|---|
| 725 | 
 | 
|---|
| 726 | #----------------------------------------------------------------------
 | 
|---|
| 727 | #### Creation des fichiers contenant les listes d'objets et d'includes
 | 
|---|
| 728 | echo " "
 | 
|---|
| 729 | echo ">>>>>> 7/  Creating object list files for shared library creation "
 | 
|---|
| 730 | set objlistname = $sconf/libsophya.objlist
 | 
|---|
| 731 | echo " 7.a/ Creating $objlistname "
 | 
|---|
| 732 | rm -f $objlistname ; touch $objlistname
 | 
|---|
| 733 | foreach d ( $SOPMOD )
 | 
|---|
| 734 |   rm -f $sconf/$d.conf
 | 
|---|
| 735 |   if ( ! -d ../$d ) continue 
 | 
|---|
| 736 |   cat ../$d/objlist.list >> $objlistname
 | 
|---|
| 737 |   touch $sconf/$d.conf
 | 
|---|
| 738 | end
 | 
|---|
| 739 | 
 | 
|---|
| 740 | set objlistname = $sconf/libextsophya.objlist
 | 
|---|
| 741 | echo " 7.b/ Creating $objlistname "
 | 
|---|
| 742 | rm -f $objlistname ; touch $objlistname
 | 
|---|
| 743 | set i = 0
 | 
|---|
| 744 | while ( $i < $#SOPEXT )
 | 
|---|
| 745 |   @ i += 1
 | 
|---|
| 746 |   set d = $SOPEXT[$i]
 | 
|---|
| 747 |   rm -f $sconf/$d.conf
 | 
|---|
| 748 |   if( $SOPEXTOK[$i] <= 0 ) continue
 | 
|---|
| 749 |   if ( ! -d ../$d ) continue
 | 
|---|
| 750 |   cat ../$d/objlist.list >> $objlistname
 | 
|---|
| 751 |   touch $sconf/$d.conf
 | 
|---|
| 752 | end  
 | 
|---|
| 753 | 
 | 
|---|
| 754 | set objlistname = $sconf/libPI.objlist
 | 
|---|
| 755 | echo " 7.c/ Creating $objlistname "
 | 
|---|
| 756 | rm -f $objlistname ; touch $objlistname
 | 
|---|
| 757 | set i = 0
 | 
|---|
| 758 | while ( $i < $#SOPPI )
 | 
|---|
| 759 |   @ i += 1
 | 
|---|
| 760 |   set d = $SOPPI[$i]
 | 
|---|
| 761 |   rm -f $sconf/$d.conf
 | 
|---|
| 762 |   if( $SOPPIOK[$i] <= 0 ) continue
 | 
|---|
| 763 |   if ( ! -d ../$d ) continue
 | 
|---|
| 764 |   cat ../$d/objlist.list >> $objlistname
 | 
|---|
| 765 |   touch $sconf/$d.conf
 | 
|---|
| 766 | end
 | 
|---|
| 767 | 
 | 
|---|
| 768 | 
 | 
|---|
| 769 | #----------------------------------------------------------------------
 | 
|---|
| 770 | exit 0
 | 
|---|