This repository has been archived by the owner on Sep 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·1079 lines (1027 loc) · 32.5 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/sh
# Copyright (C) 2010, 2011, Steffen Knollmann
# Released under the terms of the GNU General Public License version 3.
# This file is part of `ginnungagap'.
# Get aroud the $ECHO quirks
ECHO=/bin/echo
# Get a bunch of informative things
if test -e version.h
then
PROPER_VERSION_INFO="yes"
VERSIONFILE=version.h
else
PROPER_VERSION_INFO="no"
VERSIONFILE=version.h.in
fi
PACKAGE_NAME=` grep 'define PACKAGE_NAME' $VERSIONFILE \
| awk '{print $3}' | sed s/\"//g`
PACKAGE_OWNER=` grep 'define PACKAGE_OWNER' $VERSIONFILE \
| awk -F\" '{print $2}'`
PACKAGE_BUG_EMAIL=` grep 'define PACKAGE_BUG_EMAIL' $VERSIONFILE \
| awk '{print $3}' | sed s/\"//g`
PACKAGE_VERSION_MAJOR=` grep 'define PACKAGE_VERSION_MAJOR' $VERSIONFILE \
| awk '{print $3}' | sed s/\"//g`
PACKAGE_VERSION_MINOR=` grep 'define PACKAGE_VERSION_MINOR' $VERSIONFILE \
| awk '{print $3}' | sed s/\"//g`
PACKAGE_VERSION_MICRO=` grep 'define PACKAGE_VERSION_MICRO' $VERSIONFILE \
| awk '{print $3}' | sed s/\"//g`
# Initialise the options
SHOW_HELP=false
SHOW_VERSION=false
SYSTEMTYPE=none
PREFIX=auto
EPREFIX=auto
BINDIR=auto
TOOLCHAIN=gnu
WITH_OPENMP=false
WITH_MPI=false
WITH_MPI_BIN_DIR=auto
MPICC=auto
WITH_SPRNG=true
WITH_SPRNG_PREFIX=auto
WITH_SPRNG_INC_DIR=auto
WITH_SPRNG_LIB_DIR=auto
WITH_SPRNG_LIBS=auto
WITH_FFT=fftw3
WITH_FFT_PREFIX=auto
WITH_FFT_INC_DIR=auto
WITH_FFT_LIB_DIR=auto
WITH_FFT_LIBS=auto
WITH_SILO=false
WITH_SILO_BACKEND=standard
WITH_SILO_PREFIX=auto
WITH_SILO_INC_DIR=auto
WITH_SILO_LIB_DIR=auto
WITH_SILO_LIBS=auto
WITH_HDF5=false
WITH_HDF5_PREFIX=auto
WITH_HDF5_INC_DIR=auto
WITH_HDF5_LIB_DIR=auto
WITH_HDF5_LIBS=auto
WITH_GSL_PREFIX=auto
WITH_GSL_BIN_DIR=auto
WITH_GSL_INC_DIR=auto
WITH_GSL_LIB_DIR=auto
WITH_GSL_LIBS=auto
WITH_MPITRACE=false
WITH_MPITRACE_PREFIX=auto
WITH_MPITRACE_INC_DIR=auto
WITH_MPITRACE_LIB_DIR=auto
WITH_PROC_DIR=false
ENABLE_DOUBLE=false
ENABLE_WRITING=true
ENABLE_DEBUG=false
ENABLE_PROFILE=false
NDIM_VALUE=3
# Parse the options
for ac_option
do
case $ac_option in
*=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
*) ac_optarg=yes ;;
esac
case $ac_option in
--system)
$ECHO "Error: --system requires an argument"
exit 1
;;
--system=*)
SYSTEMTYPE=$ac_optarg
# Check for a pre-defined system
if test "x$SYSTEMTYPE" != "xnone"
then
# Sources the file that deals with the setting of
# predefined things, if the systemtype is unknown, this
# will terminate the configure script.
. ./configure.systems
fi
;;
--prefix)
$ECHO "Error: --prefix requires an argument"
exit 1
;;
--prefix=*)
PREFIX=$ac_optarg
;;
--exec-prefix)
$ECHO "Error: --exec-prefix requires an argument"
exit 1
;;
--exec-prefix=*)
EPREFIX=$ac_optarg
;;
--bindir)
$ECHO "Error: --bindir requires an argument"
exit 1
;;
--bindir=*)
BINDIR=$ac_optarg
;;
--toolchain)
$ECHO -n "Error: --toolchain requires an argument; "
$ECHO "use, e.g., --toolchain=gnu"
exit 1
;;
--toolchain=*)
TOOLCHAIN=$ac_optarg
;;
--with-openmp | --with-openmp=*)
if test "x$ac_optarg" = "xyes"
then
WITH_OPENMP=true
else
WITH_OPENMP=false
fi
;;
--without-openmp)
WITH_OPENMP=false
;;
# MPI things
--with-mpi | --with-mpi=*)
if test "x$ac_optarg" = "xyes"
then
WITH_MPI=true
elif test "x$ac_optarg" = "xno"
then
WITH_MPI=false
else
WITH_MPI=true
MPICC=$ac_optarg
fi
;;
--without-mpi | --without-mpi=*)
WITH_MPI=false
;;
--with-mpi-bin-dir)
$ECHO "Error: --with-mpi-bin-dir requires an argument."
exit 1
;;
--with-mpi-bin-dir=*)
WITH_MPI_BIN_DIR=$ac_optarg
;;
# SPRNG stuff
--with-sprng | --with-sprng=*)
if test "x$ac_optarg" = "xyes"
then
WITH_SPRNG=true
elif test "x$ac_optarg" = "xno"
then
WITH_SPRNG=false
else
WITH_SPRNG=true
fi
;;
--without-sprng | --without-sprng=*)
WITH_SPRNG=false
;;
--with-sprng-prefix)
$ECHO "Error: --with-sprng-prefix requires an argument."
exit 1
;;
--with-sprng-prefix=*)
WITH_SPRNG_PREFIX="$ac_optarg"
;;
--with-sprng-inc-dir)
$ECHO "Error: --with-sprng-inc-dir requires an argument."
exit 1
;;
--with-sprng-inc-dir=*)
WITH_SPRNG_INC_DIR="$ac_optarg"
;;
--with-sprng-lib-dir)
$ECHO "Error: --with-sprng-lib-dir requires an argument."
exit 1
;;
--with-sprng-lib-dir=*)
WITH_SPRNG_LIB_DIR="$ac_optarg"
;;
--with-sprng-libs)
$ECHO "Error: --with-sprng-libs requires an argument."
exit 1
;;
--with-sprng-libs=*)
WITH_SPRNG_LIBS="$ac_optarg"
;;
# FFT stuff
--with-fft)
$ECHO "Error: --with-fft requires an argument."
exit 1
;;
--with-fft=*)
if test "x$ac_optarg" = "xfftw3"
then
WHT_FFT=fftw3
elif test "x$ac_optarg" = "xfftw2"
then
WITH_FFT=fftw2
else
$ECHO "Error: Unkown argument for --with-fft."
exit 1
fi
;;
--with-fft-prefix)
$ECHO "Error: --with-fft-prefix requires an argument."
exit 1
;;
--with-fft-prefix=*)
WITH_FFT_PREFIX="$ac_optarg"
;;
--with-fft-inc-dir)
$ECHO "Error: --with-fft-inc-dir requires an argument."
exit 1
;;
--with-fft-inc-dir=*)
WITH_FFT_INC_DIR="$ac_optarg"
;;
--with-fft-lib-dir)
$ECHO "Error: --with-fft-lib-dir requires an argument."
exit 1
;;
--with-fft-lib-dir=*)
WITH_FFT_LIB_DIR="$ac_optarg"
;;
--with-fft-libs)
$ECHO "Error: --with-fft-libs requires an argument."
exit 1
;;
--with-fft-libs=*)
WITH_FFT_LIBS="$ac_optarg"
;;
# SILO stuff
--with-silo | --with-silo=*)
if test "x$ac_optarg" = "xyes"
then
WITH_SILO=true
WITH_SILO_BACKEND=standard
elif test "x$ac_optarg" = "xno"
then
WITH_SILO=false
else
WITH_SILO=true
WITH_SILO_BACKEND=hdf5
fi
;;
--without-silo | --without-silo=*)
WITH_SILO=false
;;
--with-silo-prefix)
$ECHO "Error: --with-silo-prefix requires an argument."
exit 1
;;
--with-silo-prefix=*)
WITH_SILO_PREFIX="$ac_optarg"
;;
--with-silo-inc-dir)
$ECHO "Error: --with-silo-inc-dir requires an argument."
exit 1
;;
--with-silo-inc-dir=*)
WITH_SILO_INC_DIR="$ac_optarg"
;;
--with-silo-lib-dir)
$ECHO "Error: --with-silo-lib-dir requires an argument."
exit 1
;;
--with-silo-lib-dir=*)
WITH_SILO_LIB_DIR="$ac_optarg"
;;
--with-silo-libs)
$ECHO "Error: --with-silo-libs requires an argument."
exit 1
;;
--with-silo-libs=*)
WITH_SILO_LIBS="$ac_optarg"
;;
# HDF5 stuff
--with-hdf5 | --with-hdf5=*)
if test "x$ac_optarg" = "xyes"
then
WITH_HDF5=true
elif test "x$ac_optarg" = "xno"
then
WITH_HDF5=false
else
WITH_HDF5=true
fi
;;
--without-hdf5 | --without-hdf5=*)
WITH_HDF5=false;
;;
--with-hdf5-prefix)
$ECHO "Error: --with-hdf5-prefix requires an argument."
exit 1
;;
--with-hdf5-prefix=*)
WITH_HDF5_PREFIX="$ac_optarg"
;;
--with-hdf5-inc-dir)
$ECHO "Error: --with-hdf5-inc-dir requires an argument."
exit 1
;;
--with-hdf5-inc-dir=*)
WITH_HDF5_INC_DIR="$ac_optarg"
;;
--with-hdf5-lib-dir)
$ECHO "Error: --with-hdf5-lib-dir requires an argument."
exit 1
;;
--with-hdf5-lib-dir=*)
WITH_HDF5_LIB_DIR="$ac_optarg"
;;
--with-hdf5-libs)
$ECHO "Error: --with-hdf5-libs requires an argument."
exit 1
;;
--with-hdf5-libs=*)
WITH_HDF5_LIBS="$ac_optarg"
;;
# GSL stuff
--with-gsl-prefix)
$ECHO i"Error: --with-gsl-prefix requires an argument."
exit 1
;;
--with-gsl-prefix=*)
WITH_GSL_PREFIX="$ac_optarg"
;;
--with-gsl-bin-dir)
$ECHO i"Error: --with-gsl-bin-dir requires an argument."
exit 1
;;
--with-gsl-bin-dir=*)
WITH_GSL_BIN_DIR="$ac_optarg"
;;
--with-gsl-inc-dir)
$ECHO i"Error: --with-gsl-inc-dir requires an argument."
exit 1
;;
--with-gsl-inc-dir=*)
WITH_GSL_INC_DIR="$ac_optarg"
;;
--with-gsl-lib-dir)
$ECHO i"Error: --with-gsl-lib-dir requires an argument."
exit 1
;;
--with-gsl-lib-dir=*)
WITH_GSL_LIB_DIR="$ac_optarg"
;;
--with-gsl-libs)
$ECHO "Error: --with-gsl-libs requires an argument."
exit 1
;;
--with-gsl-libs=*)
WITH_GSL_LIBS="$ac_optarg"
;;
# MPItrace stuff
--with-mpitrace | --enable-mpitrace=*)
if test "x$ac_optarg" = "xyes"
then
WITH_MPITRACE=true
else
WITH_MPITRACE=false
fi
;;
--without-mpitrace | --without-mpitrace=*)
WITH_MPITRACE=false
;;
--with-mpitrace-prefix)
$ECHO "Error: --with-mpitrace-prefix requires an argument"
exit 1
;;
--with-mpitrace-prefix=*)
WITH_MPITRACE_PREFIX="$ac_optarg"
;;
--with-mpitrace-inc-dir)
$ECHO "Error: --with-mpitrace-inc-dir requires an argument"
exit 1
;;
--with-mpitrace-inc-dir=*)
WITH_MPITRACE_INC_DIR="$ac_optarg"
;;
--with-mpitrace-lib-dir)
$ECHO "Error: --with-mpitrace-lib-dir requires an argument"
exit 1
;;
--with-mpitrace-lib-dir=*)
WITH_MPITRACE_LIB_DIR="$ac_optarg"
;;
# More Stuff
--with-proc-dir | --with-proc-dir=*)
if test "x$ac_optarg" = "xyes"
then
WITH_PROC_DIR=true
elif test "x$ac_optarg" = "xno"
then
WITH_PROC_DIR=false
else
WITH_PROC_DIR=true
fi
;;
--without-proc-dir | --without-proc-dir=*)
WITH_PROC_DIR=false
;;
--enable-double | --enable-double=*)
if test "x$ac_optarg" = "xyes"
then
ENABLE_DOUBLE=true
else
ENABLE_DOUBLE=false
fi
;;
--disable-double | --disable-double=*)
ENABLE_DOUBLE=false
;;
--enable-writing | --enable-writing=*)
if test "x$ac_optarg" = "xyes"
then
ENABLE_WRITING=true
else
ENABLE_WRITING=false
fi
;;
--disable-writing | --disable-writing=*)
ENABLE_WRITING=false
;;
--ndim)
$ECHO -n "Error: --ndim requires an argumet; "
$ECHO "use either --ndim=2 or --ndim=3"
exit 1
;;
--ndim=*)
if test "x$ac_optarg" = "x3"
then
NDIM_VALUE=3
elif test "x$ac_optarg" = "x2"
then
NDIM_VALUE=2
else
$ECHO -n "Error: --ndim accepts only 2 and 3 "
$ECHO "as arguments"
exit 1
fi
;;
--enable-debug | --enable-debug=*)
if test "x$ac_optarg" = "xyes"
then
ENABLE_DEBUG=true
else
ENABLE_DEBUG=false
fi
;;
--disable-debug | --disable-debug=*)
ENABLE_DEBUG=false
;;
--enable-profile | --enable-profile=*)
if test "x$ac_optarg" = "xyes"
then
ENABLE_PROFILE=true
else
ENABLE_PROFILE=false
fi
;;
--disable-profile | --disable-debug=*)
ENABLE_PROFILE=false
;;
-h | --help*)
SHOW_HELP=true
;;
-V | --version*)
SHOW_VERSION=true
;;
-* | --*)
$ECHO "Unknown option $ac_option."
$ECHO "Try \`$0 --help' to get a list of allowed options."
exit 1
;;
*)
$ECHO "Unknown parameter $ac_option"
$ECHO "Try \`$0 --help' to get a list of allowed options."
exit 1
;;
esac
done
# Print the help screen and exit, if requested
if test "x$SHOW_HELP" = "xtrue"
then
cat <<_HELP_EOF
\`configure' offers an easy way to configure the features and the build
system of $PACKAGE_NAME $PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_MICRO.
This script will use the distributed Makefile.config.in and config.h.in
to generate the actual Makefile.config and config.h, respectively.
Usage: $0 [OPTION]... [VAR=VALUE]
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help Print this help screen.
-V, --version Print a version info and exit.
--system=SYS Sets some configure options as required for given
machines. It is possible to specify any combination of
SYS and other configure options, the ones appearing
later will overwrite the earlier ones.
See configure.systems for the actual definition of the
systems and explanation for how to add your own
systems.
Note that this will only set compile time things, to
execute the code, it might be required to source
proper modules and/or set LD_LIBRARY_PATH to find
shared libraries. Try \`ldd EXECUTABLE' to check that
all libraries are found.
Installation directories:
--prefix=PREFIX Install architecture-independent files into
PREFIX.
Default: $PREFIX
--exec-prefix=EPREFIX Install architecture-dependent files into
EPREFIX.
Default: $PREFIX
--bindir=DIR Directory for user-executables.
Default: $EPREFIX/bin
Build options:
--toolchain[=TOOLCHAIN] Sets the toolchain used to build $PACKAGE_NAME.
This defaults to \`gnu', using gcc, ld and ar.
Another option is to specify \`intel', then
icc, xild and xiar are used in the toolchain.
You can define further toolchains by
modifying Makefile.config.in accordingly.
Please note the comment at the end of this
help screen concerning environment variables.
Possible values: gnu, intel, ibm
Optional features:
--with-FEATURE[=ARG] Use FEATURE. [ARG=yes]
--without-FEATURE Do not use FEATURE. This is the same as
--with-FEATURE=no.
--with-openmp Uses the OpenMP directives. Default: no.
--with-mpi[=MPICC] Use MPI. Note that if you use MPI, it is
your duty to make sure that mpicc uses a
C compiler that fits to your selected
toolchain. MPICC defaults to \`mpicc'
unless explicitly changed.
Default: no.
--with-mpi-bin-dir=DIR Gives the directory in which MPICC can be
found. This is only required if \`mpicc'
cannot be found in the PATH (or the wrong
one is picked up there).
Default: auto.
--with-sprng This can be used to toggle the usage of SPRNG
to generate random numbers. Note that if
SPRNG is not used, than random numbers have
to be provided by means of a white noise
file. Default: yes.
--with-sprng-prefix=DIR Use this to direct to the directory where
SPRNG is installed on your system. This
assumes that header files are in DIR/include
and libraries are in DIR/lib. You can
specify the special value 'auto', it is
then presumed that everything can be found
using the CPPFLAGS/LDFLAGS environment
variables. Default: auto.
--with-sprng-inc-dir=DIR This can be used to directly set the
directory where the include files for SPRNG
can be found. If the argument is 'auto',
the include directory is either constructed
from the install prefix, or, if this is also
'auto', it is assumed that the include dir
is provided in the CPPFLAGS. Default: auto.
--with-sprng-lib-dir=DIR This is like --with-sprng-inc-dir, but for
the directory which contains the library.
The same rules apply. Default: auto.
--with-sprng-libs=LIBS Can be used to specify the SPRNG libraries,
it should normally not be required and
defaults to:
-lsprng
--with-fft=ARG This selects the FFT backend that will be
used. Possible options are (note that single
and double precision versions are required):
fftw2 Version 2 of FFTW
fftw3 (*) Version 3 of FFTW
The default choice is marked.
--with-fft-prefix=DIR See description of --with-sprng-prefix.
Default: auto.
--with-fft-inc-dir=DIR See description of --with-sprng-inc-dir.
Default: auto.
--with-fft-lib-dir=DIR See description of --with-sprng-lib-dir.
Default: auto.
--with-fft-libs=LIBS See description of --with-sprng-libs.
Default: auto.
--with-silo[=ARG] Use the SILO library to write visualisation
outputs. If ARG is set to 'yes' Silo
will be used without external
dependencies, if ARG is 'hdf5', Silo
needs to be compiled with the HDF5
backend. See '--with-hdf5-*' for details
on how to select the proper HDF5
installation.
Default: no.
--with-silo-prefix=DIR See description of --with-sprng-prefix.
Default: auto.
--with-silo-inc-dir=DIR See description of --with-sprng-inc-dir.
Default: auto.
--with-silo-lib-dir=DIR See description of --with-sprng-lib-dir.
Default: auto.
--with-silo-libs=LIBS This can be used to specify the required
libraries for using Silo. If Silo is
actually used, it defaults to:
-lsilo -lz
in the non-HDF5 situation and to
-lsiloh5 \$WITH_HDF5_LIBS -lstdc++
for HDF5 enabled code (see --with-hdf5).
--with-hdf5 Switches on (or off) HDF5 support.
Default: false.
--with-hdf5-prefix=DIR See description of --with-hdf5-prefix.
Default: auto.
--with-hdf5-inc-dir=DIR See description of --with-sprng-inc-dir.
Default: auto.
--with-hdf5-lib-dir=DIR See description of --with-sprng-lib-dir.
Default: auto.
--with-hdf5-libs=LIBS See description of --with-sprng-lib-dir.
Default: auto (-lhdf5 -lz -lm).
--with-gsl-prefix=DIR See description of --with-sprng-prefix. Note
that this can be used to specify which
gsl-config will be used.
Default: auto.
--with-gsl-bin-dir=DIR Works as --with-sprng-inc-dir, but specifies
the directory in which gsl-config can be
found.
Default: auto.
--with-gsl-inc-dir=DIR See description of --with-sprng-inc-dir.
Default: auto.
--with-gsl-lib-dir=DIR See description of --with-sprng-lib-dir.
Default: auto.
--with gsl-libs=LIBS See description of --with-sprng-libs. This
should not be necessary, as gsl-config will
be queried to provide the required libraries.
Default: auto.
--with-mpitrace Instrument the code with MPItrace calls.
Default: no.
--with-mpitrace-prefix=DIR Give the directory where MPItrace is installed.
Default: auto.
--with-mpitrace-inc-dir=DIR See description of --with-sprng-inc-dir.
Default: auto.
--with-mpitrace-lib-dir=DIR See description of --with-sprng-lib-dir.
Default: auto.
--with-proc-dir If the code can use /proc/self/statm to query
its memory usage (true at least on Linux),
the you may use this option to allow the code
to retrieve memory information at runtime.
Default: no.
Code properties:
--enable-FEATURE[=ARG] Switch on a feature. [ARG=YES]
--disable-FEATURE Do not use FEATURE. This is the same as
--enable-FEATURE=no.
--enable-double This switches on the usage of double
precision floating point variables instead of
single precision for fields and particle
properties. Default: No.
--enable-writing Only if enable-writing is set, the resulting
files will be written to disc. This is only
meant to disable the expensive IO for
benchmarking. Default: Yes.
--ndim=VALUE Sets the dimensionality of the code. Allowed
values are 2 and 3. Default: 3.
Extra features:
--enable-debug Activates the debugging flags and forces the
compiler flags to build debugging symbols.
Default: no.
--enable-profile Will built the code with profiling output for
usage with performance analysis tools.
Default: no.
Some influential environment variables:
CC The C compiler to use.
CFLAGS C compiler flags.
CPPFLAGS Additional directives for the preprocessor, e.g.
\`-L/opt/include'
DEPCC This is the C preprocessor that will be used to
auto-generate dependencies. No code will be generated
with that compiler!
LD The linker.
LDFLAGS Flags required to find libraries, e.g. \`-L/opt/lib'
AR The archiver.
MAKE The make command that will be used.
Note that theses variables are set by selecting a specific toolchain.
You can use these variables to override the choices made by \`configure'
or to help it to find libraries and programs with nonstandard
names/locations.
Please report bugs to $PACKAGE_BUG_EMAIL.
_HELP_EOF
exit 0
fi
# Print the version screen and exit, if requested
if test "x$SHOW_VERSION" = "xtrue"
then
cat <<_VERSION_EOF
This is $PACKAGE_NAME $PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_MICRO
Copyright (C) 2010, $PACKAGE_OWNER
This is free software; see the attached COPYING document for copying
conditions. There is NO warranty; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PUSPOSE.
Please send bugreports to $PACKAGE_BUG_EMAIL
_VERSION_EOF
exit 0
fi
# Deal with install directories
if test "x$PREFIX" = "xauto"
then
PREFIX=`pwd`
fi
if test "x$EPREFIX" = "xauto"
then
EPREFIX=$PREFIX
fi
if test "x$BINDIR" = "xauto"
then
BINDIR=$EPREFIX/bin
fi
# Set MPICC if required
if test "x$WITH_MPI" = "xtrue"
then
if test "x$MPICC" = "xauto"
then
MPICC=mpicc
fi
if test "x$WITH_MPI_BIN_DIR" = "xauto"
then
MPICC=`which $MPICC`
WITH_MPI_BIN_DIR=`dirname $MPICC`
else
MPICC=$WITH_MPI_BIN_DIR/$MPICC
fi
else
MPICC=
fi
# Now set all the (possibly) deferred libraries
if test "x$WITH_SPRNG_LIBS" = "xauto"
then
WITH_SPRNG_LIBS="-lsprng"
fi
if test "x$WITH_FFT_LIBS" = "xauto"
then
case $WITH_FFT in
fftw3)
if test "x$WITH_OPENMP" = "xtrue"
then
WITH_FFT_LIBS="-lfftw3_threads -lfftw3 -lfftw3f_threads -lfftw3f"
else
WITH_FFT_LIBS="-lfftw3 -lfftw3f"
fi
;;
fftw2)
WITH_FFT_LIBS="-ldrfftw -ldfftw -lsrfftw -lsfftw"
esac
fi
if test "x$WITH_HDF5_LIBS" = "xauto"
then
WITH_HDF5_LIBS="-lhdf5 -lz -lm"
fi
if test "x$WITH_SILO_LIBS" = "xauto"
then
if test "x$WITH_SILO_BACKEND" = "xhdf5"
then
WITH_SILO_LIBS="-lsiloh5 $WITH_HDF5_LIBS -lstdc++"
elif test "x$WITH_SILO_BACKEND" = "xstandard"
then
WITH_SILO_LIBS="-lsilo -lz"
fi
fi
if test "x$WITH_GSL_LIBS" = "xauto"
then
if test "x$WITH_GSL_PREFIX" = "xauto"
then
if test "x$WITH_GSL_BIN_DIR" = "xauto"
then
THIS_GSL_CONFIG=`gsl-config --prefix`/bin/gsl-config
else
THIS_GSL_CONFIG=$WITH_GSL_BIN_DIR/gsl-config
fi
else
if test "x$WITH_GSL_BIN_DIR" = "xauto"
then
THIS_GSL_CONFIG=$WITH_GSL_PREFIX/bin/gsl-config
else
THIS_GSL_CONFIG=$WITH_GSL_BIN_DIR/gsl-config
fi
fi
if test -x $THIS_GSL_CONFIG
then
WITH_GSL_LIBS=`$THIS_GSL_CONFIG --libs`
else
$ECHO "Error: $THIS_GSL_CONFIG is not available"
exit 1
fi
fi
# Now lets actually do something.
# Say hello
$ECHO "Configuring $PACKAGE_NAME $PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_MICRO" | tee config.log
# Generate Makefile.config
$ECHO -ne "\to generating \`Makefile.config'... " | tee -a config.log
$ECHO "# Makefile.config generated from Makefile.config.in by configure" > Makefile.config
$ECHO "" >> Makefile.config
cat Makefile.config.in >> Makefile.config
sed -i.bak s@__PREFIX__@$PREFIX@ Makefile.config
sed -i.bak s@__EPREFIX__@$EPREFIX@ Makefile.config
sed -i.bak s@__BINDIR__@$BINDIR@ Makefile.config
sed -i.bak s/__TOOLCHAIN__/$TOOLCHAIN/ Makefile.config
if test "x$WITH_OPENMP" = "xtrue"
then
sed -i.bak s/__WITH_OPENMP__/true/ Makefile.config
else
sed -i.bak s/__WITH_OPENMP__/false/ Makefile.config
fi
if test "x$WITH_MPI" = "xtrue"
then
sed -i.bak s/__WITH_MPI__/true/ Makefile.config
sed -i.bak s@__MPICC__@$MPICC@ Makefile.config
sed -i.bak s@__WITH_MPI_BIN_DIR__@$WITH_MPI_BIN_DIR@ Makefile.config
else
sed -i.bak s/__WITH_MPI__/false/ Makefile.config
sed -i.bak s@__MPICC__@@ Makefile.config
fi
if test "x$WITH_SPRNG" = "xtrue"
then
sed -i.bak s/__WITH_SPRNG__/true/ Makefile.config
else
sed -i.bak s/__WITH_SPRNG__/false/ Makefile.config
fi
if test "x$WITH_SILO" = "xtrue"
then
sed -i.bak s/__WITH_SILO__/true/ Makefile.config
else
sed -i.bak s/__WITH_SILO__/false/ Makefile.config
fi
if test "x$WITH_HDF5" = "xtrue"
then
sed -i.bak s/__WITH_HDF5__/true/ Makefile.config
else
sed -i.bak s/__WITH_HDF5__/false/ Makefile.config
fi
if test "x$WITH_MPITRACE" = "xtrue"
then
sed -i.bak s/__WITH_MPITRACE__/true/ Makefile.config
else
sed -i.bak s/__WITH_MPITRACE__/false/ Makefile.config
fi
if test "x$ENABLE_DEBUG" = "xtrue"
then
sed -i.bak s/__ENABLE_DEBUG__/true/ Makefile.config
else
sed -i.bak s/__ENABLE_DEBUG__/false/ Makefile.config
fi
if test "x$ENABLE_DOUBLE" = "xtrue"
then
sed -i.bak s/__ENABLE_DOUBLE__/true/ Makefile.config
else
sed -i.bak s/__ENABLE_DOUBLE__/false/ Makefile.config
fi
if test "x$ENABLE_PROFILE" = "xtrue"
then
sed -i.bak s/__ENABLE_PROFILE__/true/ Makefile.config
else
sed -i.bak s/__ENABLE_PROFILE__/false/ Makefile.config
fi
sed -i.bak -e "s@__WITH_FFT__@$WITH_FFT@" Makefile.config
sed -i.bak -e "s@__CC__@$CC@" Makefile.config
sed -i.bak -e "s@__CFLAGS__@$CFLAGS@" Makefile.config
sed -i.bak -e "s@__CPPFLAGS__@$CPPFLAGS@" Makefile.config
sed -i.bak -e "s@__DEPCC__@$DEPCC@" Makefile.config
sed -i.bak -e "s@__LD__@$LD@" Makefile.config
sed -i.bak -e "s@__LDFLAGS__@$LDFLAGS@" Makefile.config
sed -i.bak -e "s@__AR__@$AR@" Makefile.config
sed -i.bak -e "s@__MAKE__@$MAKE@" Makefile.config
sed -i.bak -e "s@__WITH_SPRNG_PREFIX__@$WITH_SPRNG_PREFIX@" Makefile.config
sed -i.bak -e "s@__WITH_SPRNG_INC_DIR__@$WITH_SPRNG_INC_DIR@" Makefile.config
sed -i.bak -e "s@__WITH_SPRNG_LIB_DIR__@$WITH_SPRNG_LIB_DIR@" Makefile.config
sed -i.bak -e "s@__WITH_SPRNG_LIBS__@$WITH_SPRNG_LIBS@" Makefile.config
sed -i.bak -e "s@__WITH_FFT_PREFIX__@$WITH_FFT_PREFIX@" Makefile.config
sed -i.bak -e "s@__WITH_FFT_INC_DIR__@$WITH_FFT_INC_DIR@" Makefile.config
sed -i.bak -e "s@__WITH_FFT_LIB_DIR__@$WITH_FFT_LIB_DIR@" Makefile.config
sed -i.bak -e "s@__WITH_FFT_LIBS__@$WITH_FFT_LIBS@" Makefile.config
sed -i.bak -e "s@__WITH_SILO_PREFIX__@$WITH_SILO_PREFIX@" Makefile.config
sed -i.bak -e "s@__WITH_SILO_INC_DIR__@$WITH_SILO_INC_DIR@" Makefile.config
sed -i.bak -e "s@__WITH_SILO_LIB_DIR__@$WITH_SILO_LIB_DIR@" Makefile.config
sed -i.bak -e "s@__WITH_SILO_LIBS__@$WITH_SILO_LIBS@" Makefile.config
sed -i.bak -e "s@__WITH_HDF5_PREFIX__@$WITH_HDF5_PREFIX@" Makefile.config
sed -i.bak -e "s@__WITH_HDF5_INC_DIR__@$WITH_HDF5_INC_DIR@" Makefile.config
sed -i.bak -e "s@__WITH_HDF5_LIB_DIR__@$WITH_HDF5_LIB_DIR@" Makefile.config
sed -i.bak -e "s@__WITH_HDF5_LIBS__@$WITH_HDF5_LIBS@" Makefile.config
sed -i.bak -e "s@__WITH_GSL_PREFIX__@$WITH_GSL_PREFIX@" Makefile.config
sed -i.bak -e "s@__WITH_GSL_INC_DIR__@$WITH_GSL_INC_DIR@" Makefile.config
sed -i.bak -e "s@__WITH_GSL_LIB_DIR__@$WITH_GSL_LIB_DIR@" Makefile.config
sed -i.bak -e "s@__WITH_GSL_LIBS__@$WITH_GSL_LIBS@" Makefile.config
sed -i.bak -e "s@__WITH_MPITRACE_DIR__@$WITH_MPITRACE_DIR@" Makefile.config
$ECHO "done" | tee -a config.log
rm -f Makefile.config.bak
# Generate config.h
$ECHO -ne "\to generating \`config.h'... " | tee -a config.log
$ECHO "/* config.h generated from config.h.in by configure */" > config.h
$ECHO "" >> config.h
cat config.h.in >> config.h
if test "x$WITH_OPENMP" = "xtrue"
then
sed -i.bak -e 's/#undef WITH_OPENMP/#define WITH_OPENMP 1/' config.h
fi
if test "x$WITH_MPI" = "xtrue"
then
sed -i.bak -e 's/#undef WITH_MPI$/#define WITH_MPI 1/' config.h
fi
if test "x$WITH_SPRNG" = "xtrue"
then
sed -i.bak -e 's/#undef WITH_SPRNG/#define WITH_SPRNG 1/' config.h
fi
if test "x$WITH_FFT" = "xfftw2"
then
sed -i.bak -e 's/#undef WITH_FFT_FFTW2/#define WITH_FFT_FFTW2 1/' config.h
elif test "x$WITH_FFT" = "xfftw3"
then
sed -i.bak -e 's/#undef WITH_FFT_FFTW3/#define WITH_FFT_FFTW3 1/' config.h
fi
if test "x$WITH_SILO" = "xtrue"
then
sed -i.bak -e 's/#undef WITH_SILO/#define WITH_SILO 1/' config.h
fi
if test "x$WITH_HDF5" = "xtrue"
then
sed -i.bak -e 's/#undef WITH_HDF5/#define WITH_HDF5 1/' config.h
fi
if test "x$WITH_MPITRACE" = "xtrue"
then
sed -i.bak -e 's/undef WITH_MPITRACE/define WITH_MPITRACE 1/' config.h
fi
if test "x$WITH_PROC_DIR" = "xtrue"
then
sed -i.bak -e 's/undef WITH_PROC_DIR/define WITH_PROC_DIR 1/' config.h
fi
if test "x$ENABLE_DOUBLE" = "xtrue"
then
sed -i.bak -e 's/undef ENABLE_DOUBLE/define ENABLE_DOUBLE 1/' config.h
fi
if test "x$ENABLE_WRITING" = "xtrue"
then
sed -i.bak -e 's/undef ENABLE_WRITING/define ENABLE_WRITING 1/' config.h