source: Sophya/trunk/SophyaLib/BuildMgr/configure@ 3820

Last change on this file since 3820 was 3818, checked in by ansari, 15 years ago

introduction du flag -arch32 ds le script configure, Reza 26/07/2010

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