-
Notifications
You must be signed in to change notification settings - Fork 98
/
configure.ac
1522 lines (1384 loc) · 43.5 KB
/
configure.ac
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
define([libint_mmm_version],[2.9.0])
define([libint_buildid],[])
define([libint_so_version],[2:3:0])
dnl --------- Begin ---------
dnl Process this file with autoconf to produce a configure script.
define([AC_CACHE_LOAD], )dnl for debugging configure.in
define([AC_CACHE_SAVE], )dnl for debugging configure.in
AC_PREREQ([2.68])
AC_INIT([Libint2],[libint_mmm_version],[libint@valeyev.net],[libint2])
AC_CONFIG_SRCDIR(src/bin/libint/rr.h)
AC_CONFIG_HEADERS(include/libint2/config.h)
AC_CONFIG_AUX_DIR(bin)
AC_CONFIG_MACRO_DIR([lib/autoconf])
dnl --- Compiling C++ only ---
AC_LANG(C++)
AC_CANONICAL_TARGET
AC_DEFINE_UNQUOTED(LIBINT_HOST_ARCH, "$host")
AC_DEFINE_UNQUOTED(LIBINT_TARGET_ARCH, "$target")
define([default_prefix_dash],ifelse(libint_buildid, ,[],[-]))
define([default_prefix],"/usr/local")
LIBINT_MMM_VERSION=libint_mmm_version
LIBINT_BUILDID=libint_buildid
AC_SUBST(LIBINT_MMM_VERSION)
AC_SUBST(LIBINT_BUILDID)
changequote(<<, >>)dnl
LIBINT_MAJOR_VERSION=`echo $LIBINT_MMM_VERSION|sed 's/\([0-9]*\)\.[0-9]*\.[0-9]*/\1/'`
LIBINT_MINOR_VERSION=`echo $LIBINT_MMM_VERSION|sed 's/[0-9]*\.\([0-9]*\)\.[0-9]*/\1/'`
LIBINT_MICRO_VERSION=`echo $LIBINT_MMM_VERSION|sed 's/[0-9]*\.[0-9]*\.\([0-9]*\)/\1/'`
changequote([, ])dnl
AC_DEFINE_UNQUOTED(LIBINT_MAJOR_VERSION,$LIBINT_MAJOR_VERSION)
AC_DEFINE_UNQUOTED(LIBINT_MINOR_VERSION,$LIBINT_MINOR_VERSION)
AC_DEFINE_UNQUOTED(LIBINT_MICRO_VERSION,$LIBINT_MICRO_VERSION)
AC_SUBST(LIBINT_MAJOR_VERSION)
AC_SUBST(LIBINT_MINOR_VERSION)
AC_SUBST(LIBINT_MICRO_VERSION)
LIBINT_SO_VERSION=libint_so_version
AC_SUBST(LIBINT_SO_VERSION)
dnl --------- Features ---------
AC_ARG_WITH(api-prefix,
AS_HELP_STRING([--with-api-prefix],[Prepend this string to every name in the library API (except for the types).]),
[
AC_DEFINE_UNQUOTED(LIBINT_API_PREFIX,"$withval")
echo Using API prefix: $withval
])
LIBINT_CGSHELL_ORDERING_STANDARD=1
LIBINT_CGSHELL_ORDERING_INTV3=2
LIBINT_CGSHELL_ORDERING_GAMESS=3
LIBINT_CGSHELL_ORDERING_ORCA=4
LIBINT_CGSHELL_ORDERING_BAGEL=5
libint_cgshell_ordering=standard
AC_ARG_WITH(cartgauss-ordering,
[ --with-cartgauss-ordering
Use one of the following known orderings for shells of cartesian Gaussians:
standard -- standard ordering (xxx, xxy, xxz, xyy, xyz, xzz, yyy, ...)
intv3 -- intv3 ordering (yyy, yyz, yzz, zzz, xyy, xyz, xzz, xxy, xxz, xxx)
gamess -- GAMESS ordering (xxx, yyy, zzz, xxy, xxz, yyx, yyz, zzx, zzy, xyz)
orca -- ORCA ordering (hydrid between GAMESS and standard)
bagel -- axis-permuted version of intv3 (xxx, xxy, xyy, yyy, xxz, xyz, yyz, xzz, yzz, zzz)
The default is standard.],
[
libint_cgshell_ordering=$withval
])
AC_MSG_RESULT([Using $libint_cgshell_ordering ordering of cartesian Gaussians])
case $libint_cgshell_ordering in
standard)
libint_cgshell_ordering=$LIBINT_CGSHELL_ORDERING_STANDARD
;;
intv3)
libint_cgshell_ordering=$LIBINT_CGSHELL_ORDERING_INTV3
;;
gamess)
libint_cgshell_ordering=$LIBINT_CGSHELL_ORDERING_GAMESS
;;
orca)
libint_cgshell_ordering=$LIBINT_CGSHELL_ORDERING_ORCA
;;
bagel)
libint_cgshell_ordering=$LIBINT_CGSHELL_ORDERING_BAGEL
;;
*)
AC_MSG_ERROR([Invalid value for --with-cartgauss-ordering ($withval)])
;;
esac
AC_DEFINE_UNQUOTED(LIBINT_CGSHELL_ORDERING,$libint_cgshell_ordering)
AC_DEFINE_UNQUOTED(LIBINT_CGSHELL_ORDERING_STANDARD,$LIBINT_CGSHELL_ORDERING_STANDARD)
AC_DEFINE_UNQUOTED(LIBINT_CGSHELL_ORDERING_INTV3,$LIBINT_CGSHELL_ORDERING_INTV3)
AC_DEFINE_UNQUOTED(LIBINT_CGSHELL_ORDERING_GAMESS,$LIBINT_CGSHELL_ORDERING_GAMESS)
AC_DEFINE_UNQUOTED(LIBINT_CGSHELL_ORDERING_ORCA,$LIBINT_CGSHELL_ORDERING_ORCA)
AC_DEFINE_UNQUOTED(LIBINT_CGSHELL_ORDERING_BAGEL,$LIBINT_CGSHELL_ORDERING_BAGEL)
LIBINT_SHGSHELL_ORDERING_STANDARD=1
LIBINT_SHGSHELL_ORDERING_GAUSSIAN=2
libint_shgshell_ordering=standard
AC_ARG_WITH(shgauss-ordering,
[ --with-shgauss-ordering
Use one of the following known orderings for shells of solid harmonic Gaussians:
standard -- standard ordering (-l, -l+1 ... l)
gaussian -- the Gaussian ordering (0, 1, -1, 2, -2, ... l, -l)
The default is standard.],
[
libint_shgshell_ordering=$withval
])
AC_MSG_RESULT([Using $libint_shgshell_ordering ordering of solid harmonic Gaussians])
case $libint_shgshell_ordering in
standard)
libint_shgshell_ordering=$LIBINT_SHGSHELL_ORDERING_STANDARD
;;
gaussian)
libint_shgshell_ordering=$LIBINT_SHGSHELL_ORDERING_GAUSSIAN
;;
*)
AC_MSG_ERROR([Invalid value for --with-solidharmgauss-ordering ($withval)])
;;
esac
AC_DEFINE_UNQUOTED(LIBINT_SHGSHELL_ORDERING,$libint_shgshell_ordering)
AC_DEFINE_UNQUOTED(LIBINT_SHGSHELL_ORDERING_STANDARD,$LIBINT_SHGSHELL_ORDERING_STANDARD)
AC_DEFINE_UNQUOTED(LIBINT_SHGSHELL_ORDERING_GAUSSIAN,$LIBINT_SHGSHELL_ORDERING_GAUSSIAN)
AC_SUBST(LIBINT_SHGSHELL_ORDERING_STANDARD)
AC_SUBST(LIBINT_SHGSHELL_ORDERING_GAUSSIAN)
AC_SUBST(LIBINT_SHGSHELL_ORDERING,$libint_shgshell_ordering)
LIBINT_SHELL_SET_STANDARD=1 AC_SUBST(LIBINT_SHELL_SET_STANDARD)
LIBINT_SHELL_SET_ORCA=2 AC_SUBST(LIBINT_SHELL_SET_ORCA)
libint_shell_set=standard
AC_ARG_WITH(shell-set,
[ --with-shell-set The library will support computation of shell sets sets subject to these restrictions:
standard -- standard ordering:
for (ab|cd):
l(a) >= l(b),
l(c) >= l(d),
l(a)+l(b) <= l(c)+l(d)
for (b|cd):
l(c) >= l(d)
orca -- ORCA ordering:
for (ab|cd):
l(a) <= l(b),
l(c) <= l(d),
l(a) < l(c) || (l(a) == l(c) && l(b) < l(d))
for (b|cd):
l(c) <= l(d)
The default is standard.],
[
libint_shell_set=$withval
])
AC_MSG_RESULT([Will generate $libint_shell_set shell quartet sets])
case $libint_shell_set in
standard)
libint_shell_set=$LIBINT_SHELL_SET_STANDARD
;;
orca)
libint_shell_set=$LIBINT_SHELL_SET_ORCA
;;
*)
AC_MSG_ERROR([Invalid value for --with-shell-set ($withval)])
;;
esac
LIBINT_SHELL_SET=$libint_shell_set AC_SUBST(LIBINT_SHELL_SET)
AC_DEFINE_UNQUOTED(LIBINT_SHELL_SET,$libint_shell_set)
AC_DEFINE_UNQUOTED(LIBINT_SHELL_SET_STANDARD,$LIBINT_SHELL_SET_STANDARD)
AC_DEFINE_UNQUOTED(LIBINT_SHELL_SET_ORCA,$LIBINT_SHELL_SET_ORCA)
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],[Compile with debugging options]),
[
case $enableval in
yes)
DEBUG=yes
;;
no)
DEBUG=no
;;
opt)
DEBUG=opt
;;
*)
AC_MSG_ERROR([Invalid value for --enable-debug ($enableval)])
;;
esac
],[
DEBUG=no
]
)
# can be used in the future to exclude source directories
EXCLUDED_DIRS=
AC_ARG_ENABLE(1body,
AS_HELP_STRING([--enable-1body=N],[Compile with support for up to N-th derivatives of 1-body integrals]),
[
case $enableval in
yes)
INCLUDE_ONEBODY=0
;;
no)
INCLUDE_ONEBODY=no
;;
*)
if test $enableval -lt 0; then
AC_MSG_ERROR([Invalid value for --enable-1body ($enableval)])
fi
INCLUDE_ONEBODY=$enableval
;;
esac
],[
INCLUDE_ONEBODY=0
]
)
DISABLE_ONEBODY_PROPERTY_DERIVS=1
AC_ARG_ENABLE(1body-property-derivs,
AS_HELP_STRING([--enable-1body-property-derivs],[Enable geometric derivatives of 1-body property integrals (all but overlap, kinetic, elecpot). These derivatives are disabled by default to save compile time.]),
[
case $enableval in
yes)
DISABLE_ONEBODY_PROPERTY_DERIVS=0
;;
esac
])
if test $DISABLE_ONEBODY_PROPERTY_DERIVS != 0; then
AC_DEFINE(DISABLE_ONEBODY_PROPERTY_DERIVS)
fi
AC_ARG_ENABLE(eri,
AS_HELP_STRING([--enable-eri=N],[Compile with support for up to N-th derivatives of electron repulsion integrals]),
[
case $enableval in
yes)
INCLUDE_ERI=0
;;
no)
INCLUDE_ERI=no
;;
*)
if test $enableval -lt 0; then
AC_MSG_ERROR([Invalid value for --enable-eri ($enableval)])
fi
INCLUDE_ERI=$enableval
;;
esac
],[
INCLUDE_ERI=0
]
)
AC_ARG_ENABLE(eri3,
AS_HELP_STRING([--enable-eri3=N],[Compile with support for up to N-th derivatives of 3-center electron repulsion integrals]),
[
case $enableval in
yes)
INCLUDE_ERI3=0
;;
no)
INCLUDE_ERI3=no
;;
*)
if test $enableval -lt 0; then
AC_MSG_ERROR([Invalid value for --enable-eri3 ($enableval)])
fi
INCLUDE_ERI3=$enableval
;;
esac
],[
INCLUDE_ERI3=no
]
)
AC_ARG_ENABLE(eri2,
AS_HELP_STRING([--enable-eri2=N],[Compile with support for up to N-th derivatives of 2-center electron repulsion integrals]),
[
case $enableval in
yes)
INCLUDE_ERI2=0
;;
no)
INCLUDE_ERI2=no
;;
*)
if test $enableval -lt 0; then
AC_MSG_ERROR([Invalid value for --enable-eri2 ($enableval)])
fi
INCLUDE_ERI2=$enableval
;;
esac
],[
INCLUDE_ERI2=no
]
)
AC_ARG_ENABLE(g12,
AS_HELP_STRING([--enable-g12=N],[Compile with support for N-th derivatives of MP2-F12 energies with Gaussian factors]),
[
case $enableval in
yes)
INCLUDE_G12=0
;;
no)
INCLUDE_G12=no
;;
*)
if test $enableval -lt 0; then
AC_MSG_ERROR([Invalid value for --enable-g12 ($enableval)])
fi
INCLUDE_G12=$enableval
;;
esac
],[
INCLUDE_G12=no
]
)
AC_ARG_ENABLE(g12dkh,
AS_HELP_STRING([--enable-g12dkh=N],[Compile with support for N-th derivatives of DKH-MP2-F12 energies with Gaussian factors]),
[
case $enableval in
yes)
INCLUDE_G12DKH=0
;;
no)
INCLUDE_G12DKH=no
;;
*)
if test $enableval -lt 0; then
AC_MSG_ERROR([Invalid value for --enable-g12dkh ($enableval)])
fi
INCLUDE_G12DKH=$enableval
;;
esac
],[
INCLUDE_G12DKH=no
]
)
LIBINT_HARD_MAX_AM=12
AC_DEFINE_UNQUOTED(LIBINT_HARD_MAX_AM,$LIBINT_HARD_MAX_AM)
LIBINT_MAX_AM=4
AC_ARG_WITH(max-am,
AS_HELP_STRING([--with-max-am=N],[Support Gaussians of angular momentum up to N. Can specify values for each derivative levels as a list N0,N1,N2...]),
[
case $withval in
*,*)
LIBINT_MAX_AM_LIST="$withval"
AC_SUBST(LIBINT_MAX_AM_LIST)
AC_DEFINE_UNQUOTED(LIBINT_MAX_AM_LIST, "$LIBINT_MAX_AM_LIST")
LIBINT_MAX_AM=`echo $LIBINT_MAX_AM_LIST | tr , "\n" | sort -n | tail -n1`
;;
*)
if test $withval -le 0; then
AC_MSG_ERROR([Invalid value for --with-max-am ($withval)])
else
LIBINT_MAX_AM=$withval
fi
if test $LIBINT_MAX_AM -ge $LIBINT_HARD_MAX_AM; then
AC_MSG_ERROR([Value for --with-max-am too high ($withval). Are you sure you know what you are doing?])
fi
;;
esac
]
)
AC_DEFINE_UNQUOTED(LIBINT_MAX_AM,$LIBINT_MAX_AM)
LIBINT_OPT_AM=$((($LIBINT_MAX_AM/2)+1))
AC_ARG_WITH(opt-am,
AS_HELP_STRING([--with-opt-am=N],[Optimize maximally for up to angular momentum N (N <= max-am).]),
[
case $withval in
*,*)
LIBINT_OPT_AM_LIST="$withval"
AC_SUBST(LIBINT_OPT_AM_LIST)
AC_DEFINE_UNQUOTED(LIBINT_OPT_AM_LIST, "$LIBINT_OPT_AM_LIST")
LIBINT_OPT_AM=`echo $LIBINT_OPT_AM_LIST | tr , "\n" | sort -n | tail -n1`
;;
*)
if test $withval -le $LIBINT_MAX_AM; then
LIBINT_OPT_AM=$withval
fi
;;
esac
]
)
AC_DEFINE_UNQUOTED(LIBINT_OPT_AM,$LIBINT_OPT_AM)
ERI_MAX_AM=$LIBINT_MAX_AM
AC_ARG_WITH(eri-max-am,
AS_HELP_STRING([--with-eri-max-am=N],[Support ERIs for Gaussians of angular momentum up to N. Can specify values for each derivative levels as a list N0,N1,N2...]),
[
case $withval in
*,*)
ERI_MAX_AM_LIST="$withval"
AC_SUBST(ERI_MAX_AM_LIST)
AC_DEFINE_UNQUOTED(ERI_MAX_AM_LIST, "$ERI_MAX_AM_LIST")
;;
*)
if test $withval -le 0; then
AC_MSG_ERROR([Invalid value for --with-eri-max-am ($withval)])
else
ERI_MAX_AM=$withval
fi
if test $ERI_MAX_AM -ge $LIBINT_HARD_MAX_AM; then
AC_MSG_ERROR([Value for --with-eri-max-am too high ($withval). Are you sure you know what you are doing?])
fi
AC_SUBST(ERI_MAX_AM)
AC_DEFINE_UNQUOTED(ERI_MAX_AM,$ERI_MAX_AM)
;;
esac
]
)
ERI_OPT_AM=$LIBINT_OPT_AM
AC_ARG_WITH(eri-opt-am,
AS_HELP_STRING([--with-eri-opt-am=N],[Optimize ERIs maximally for up to angular momentum N (N <= max-am). Can specify values for each derivative levels as a list N0,N1,N2...]),
[
case $withval in
*,*)
ERI_OPT_AM_LIST="$withval"
AC_SUBST(ERI_OPT_AM_LIST)
AC_DEFINE_UNQUOTED(ERI_OPT_AM_LIST, "$ERI_OPT_AM_LIST")
;;
*)
if test $withval -le $ERI_MAX_AM; then
ERI_OPT_AM=$withval
AC_SUBST(ERI_OPT_AM)
AC_DEFINE_UNQUOTED(ERI_OPT_AM,$ERI_OPT_AM)
fi
;;
esac
]
)
if test X$INCLUDE_ERI != Xno; then
AC_DEFINE_UNQUOTED(INCLUDE_ERI,$INCLUDE_ERI)
LIBINT_SUPPORTS_ERI=yes
AC_SUBST(LIBINT_SUPPORTS_ERI)
LIBINT_ERI_DERIV=$INCLUDE_ERI
AC_SUBST(LIBINT_ERI_DERIV)
fi
ONEBODY_MAX_AM=$LIBINT_MAX_AM
AC_ARG_WITH(1body-max-am,
AS_HELP_STRING([--with-1body-max-am=N],[Support 1-e ints for Gaussians of angular momentum up to N. Can specify values for each derivative levels as a list N0,N1,N2...]),
[
case $withval in
*,*)
ONEBODY_MAX_AM_LIST="$withval"
AC_SUBST(ONEBODY_MAX_AM_LIST)
AC_DEFINE_UNQUOTED(ONEBODY_MAX_AM_LIST, "$ONEBODY_MAX_AM_LIST")
;;
*)
if test $withval -le 0; then
AC_MSG_ERROR([Invalid value for --with-1body-max-am ($withval)])
else
ONEBODY_MAX_AM=$withval
fi
if test $ONEBODY_MAX_AM -ge $LIBINT_HARD_MAX_AM; then
AC_MSG_ERROR([Value for --with-1body-max-am too high ($withval). Are you sure you know what you are doing?])
fi
AC_SUBST(ONEBODY_MAX_AM)
AC_DEFINE_UNQUOTED(ONEBODY_MAX_AM,$ONEBODY_MAX_AM)
;;
esac
]
)
ONEBODY_OPT_AM=$LIBINT_OPT_AM
AC_ARG_WITH(1body-opt-am,
AS_HELP_STRING([--with-1body-opt-am=N],[Optimize 1-e ints maximally for up to angular momentum N (N <= max-am). Can specify values for each derivative levels as a list N0,N1,N2...]),
[
case $withval in
*,*)
ONEBODY_OPT_AM_LIST="$withval"
AC_SUBST(ONEBODY_OPT_AM_LIST)
AC_DEFINE_UNQUOTED(ONEBODY_OPT_AM_LIST, "$ONEBODY_OPT_AM_LIST")
;;
*)
if test $withval -le $ONEBODY_MAX_AM; then
ONEBODY_OPT_AM=$withval
AC_SUBST(ONEBODY_OPT_AM)
AC_DEFINE_UNQUOTED(ONEBODY_OPT_AM,$ONEBODY_OPT_AM)
fi
;;
esac
]
)
MULTIPOLE_MAX_ORDER=4
AC_ARG_WITH(multipole-max-order,
AS_HELP_STRING([--with-multipole-max-order=N],[Maximum order of spherical multipole integrals. The default is 4. There is no maximum]),
[
case $withval in
*)
MULTIPOLE_MAX_ORDER=$withval
;;
esac
]
)
AC_DEFINE_UNQUOTED(MULTIPOLE_MAX_ORDER,$MULTIPOLE_MAX_ORDER)
if test X$INCLUDE_ONEBODY != Xno; then
AC_DEFINE_UNQUOTED(INCLUDE_ONEBODY,$INCLUDE_ONEBODY)
LIBINT_SUPPORTS_ONEBODY=yes
AC_SUBST(LIBINT_SUPPORTS_ONEBODY)
LIBINT_ONEBODY_DERIV=$INCLUDE_ONEBODY
AC_SUBST(LIBINT_ONEBODY_DERIV)
fi
# check max am for 3-center ERIs, if needed
ERI3_MAX_AM=$LIBINT_MAX_AM
AC_ARG_WITH(eri3-max-am,
AS_HELP_STRING([--with-eri3-max-am=N],[Support 3-center ERIs for Gaussians of angular momentum up to N. Can specify values for each derivative levels as a list N0,N1,N2...]),
[
case $withval in
*,*)
ERI3_MAX_AM_LIST="$withval"
AC_SUBST(ERI3_MAX_AM_LIST)
AC_DEFINE_UNQUOTED(ERI3_MAX_AM_LIST, "$ERI3_MAX_AM_LIST")
;;
*)
if test $withval -le 0; then
AC_MSG_ERROR([Invalid value for --with-eri3-max-am ($withval)])
else
ERI3_MAX_AM=$withval
fi
if test $ERI3_MAX_AM -gt $LIBINT_HARD_MAX_AM; then
AC_MSG_ERROR([Value for --with-eri3-max-am too high ($withval). Are you sure you know what you are doing?])
fi
AC_SUBST(ERI3_MAX_AM)
AC_DEFINE_UNQUOTED(ERI3_MAX_AM,$ERI3_MAX_AM)
;;
esac
]
)
ERI3_OPT_AM=$LIBINT_OPT_AM
AC_ARG_WITH(eri3-opt-am,
AS_HELP_STRING([--with-eri3-opt-am=N],[Optimize 3-center ERIs maximally for up to angular momentum N (N <= max-am). Can specify values for each derivative levels as a list N0,N1,N2...]),
[
case $withval in
*,*)
ERI3_OPT_AM_LIST="$withval"
AC_SUBST(ERI3_OPT_AM_LIST)
AC_DEFINE_UNQUOTED(ERI3_OPT_AM_LIST, "$ERI3_OPT_AM_LIST")
;;
*)
if test $withval -le $ERI3_MAX_AM; then
ERI3_OPT_AM=$withval
AC_SUBST(ERI3_OPT_AM)
AC_DEFINE_UNQUOTED(ERI3_OPT_AM,$ERI3_OPT_AM)
fi
;;
esac
]
)
AC_ARG_ENABLE(eri3-pure-sh,
AS_HELP_STRING([--enable-eri3-pure-sh],[Assume the "unpaired" center of 3-center electron repulsion integrals will be transformed to pure solid harmonics]),
[
case $enableval in
yes)
ERI3_PURE_SH=yes
;;
no)
ERI3_PURE_SH=no
;;
esac
],[
ERI3_PURE_SH=no
]
)
if test X$INCLUDE_ERI3 != Xno; then
AC_DEFINE_UNQUOTED(INCLUDE_ERI3,$INCLUDE_ERI3)
if test X$ERI3_PURE_SH != Xno; then
AC_DEFINE(ERI3_PURE_SH)
fi
fi
# check max am for 2-center ERIs, if needed
ERI2_MAX_AM=$LIBINT_MAX_AM
AC_ARG_WITH(eri2-max-am,
AS_HELP_STRING([--with-eri2-max-am=N],[Support 2-center ERIs for Gaussians of angular momentum up to N. Can specify values for each derivative levels as a list N0,N1,N2...]),
[
case $withval in
*,*)
ERI2_MAX_AM_LIST="$withval"
AC_SUBST(ERI2_MAX_AM_LIST)
AC_DEFINE_UNQUOTED(ERI2_MAX_AM_LIST, "$ERI2_MAX_AM_LIST")
;;
*)
if test $withval -le 0; then
AC_MSG_ERROR([Invalid value for --with-eri2-max-am ($withval)])
else
ERI2_MAX_AM=$withval
fi
if test $ERI2_MAX_AM -gt $LIBINT_HARD_MAX_AM; then
AC_MSG_ERROR([Value for --with-eri2-max-am too high ($withval). Are you sure you know what you are doing?])
fi
AC_SUBST(ERI2_MAX_AM)
AC_DEFINE_UNQUOTED(ERI2_MAX_AM,$ERI2_MAX_AM)
;;
esac
]
)
ERI2_OPT_AM=$LIBINT_OPT_AM
AC_ARG_WITH(eri2-opt-am,
AS_HELP_STRING([--with-eri2-opt-am=N],[Optimize 2-center ERIs maximally for up to angular momentum N (N <= max-am). Can specify values for each derivative levels as a list N0,N1,N2...]),
[
case $withval in
*,*)
ERI2_OPT_AM_LIST="$withval"
AC_SUBST(ERI2_OPT_AM_LIST)
AC_DEFINE_UNQUOTED(ERI2_OPT_AM_LIST, "$ERI2_OPT_AM_LIST")
;;
*)
if test $withval -le $ERI2_MAX_AM; then
ERI2_OPT_AM=$withval
AC_SUBST(ERI2_OPT_AM)
AC_DEFINE_UNQUOTED(ERI2_OPT_AM,$ERI2_OPT_AM)
fi
;;
esac
]
)
AC_ARG_ENABLE(eri2-pure-sh,
AS_HELP_STRING([--enable-eri2-pure-sh],[Assume the 2-center electron repulsion integrals will be transformed to pure solid harmonics]),
[
case $enableval in
yes)
ERI2_PURE_SH=yes
;;
no)
ERI2_PURE_SH=no
;;
esac
],[
ERI2_PURE_SH=no
]
)
if test X$INCLUDE_ERI2 != Xno; then
AC_DEFINE_UNQUOTED(INCLUDE_ERI2,$INCLUDE_ERI2)
if test X$ERI2_PURE_SH != Xno; then
AC_DEFINE(ERI2_PURE_SH)
fi
fi
# check max am for G12 integrals, if needed
G12_MAX_AM=$LIBINT_MAX_AM
AC_ARG_WITH(g12-max-am,
AS_HELP_STRING([--with-g12-max-am=N],[Support integrals for G12 methods of angular momentum up to N.]),
if test $withval -le 0; then
AC_MSG_ERROR([Invalid value for --with-g12-max-am ($withval)])
else
G12_MAX_AM=$withval
fi
)
G12_OPT_AM=$LIBINT_OPT_AM
AC_ARG_WITH(g12-opt-am,
AS_HELP_STRING([--with-g12-opt-am=N],[Optimize G12 integrals for up to angular momentum N (N <= max-am).]),
if test $withval -le $G12_MAX_AM; then
G12_OPT_AM=$withval
fi
)
AC_ARG_ENABLE(t1g12-support,
AS_HELP_STRING([--disable-t1g12-support],[Libint will not support [Ti,G12] integrals]),
[
case $enableval in
yes)
SUPPORT_T1G12=1
;;
no)
SUPPORT_T1G12=0
;;
*)
SUPPORT_T1G12=$enableval
;;
esac
],[
SUPPORT_T1G12=1
]
)
AC_ARG_ENABLE(composite-evaluators,
AS_HELP_STRING([--disable-composite-evaluators],[Libint will not use composite evaluators (i.e. every evaluator wil compute one integral type only)]),
[
case $enableval in
yes)
LIBINT_USE_COMPOSITE_EVALUATORS=1
AC_MSG_RESULT([Will generate composite evaluators for multiple integral types])
;;
no)
LIBINT_USE_COMPOSITE_EVALUATORS=0
AC_MSG_RESULT([Will generate separate evaluators for each integral type])
;;
*)
LIBINT_USE_COMPOSITE_EVALUATORS=$enableval
;;
esac
],[
LIBINT_USE_COMPOSITE_EVALUATORS=1
AC_MSG_RESULT([Will generate composite evaluators for multiple integral types])
]
)
AC_DEFINE_UNQUOTED(LIBINT_USE_COMPOSITE_EVALUATORS,$LIBINT_USE_COMPOSITE_EVALUATORS)
if test "X$INCLUDE_G12" != "Xno"; then
AC_DEFINE_UNQUOTED(INCLUDE_G12,$INCLUDE_G12)
AC_SUBST(G12_MAX_AM)
AC_SUBST(G12_OPT_AM)
AC_SUBST(SUPPORT_T1G12)
AC_DEFINE_UNQUOTED(G12_MAX_AM,$G12_MAX_AM)
AC_DEFINE_UNQUOTED(G12_OPT_AM,$G12_OPT_AM)
AC_DEFINE_UNQUOTED(SUPPORT_T1G12,$SUPPORT_T1G12)
fi
# check max am for G12DKH integrals, if needed
G12DKH_MAX_AM=$LIBINT_MAX_AM
AC_ARG_WITH(g12dkh-max-am,
AS_HELP_STRING([--with-g12dkh-max-am=N],[Support integrals for relativistic G12 methods of angular momentum up to N.]),
if test $withval -le 0; then
AC_MSG_ERROR([Invalid value for --with-g12dkh-max-am ($withval)])
else
G12DKH_MAX_AM=$withval
fi
)
G12DKH_OPT_AM=$LIBINT_OPT_AM
AC_ARG_WITH(g12dkh-opt-am,
AS_HELP_STRING([--with-g12dkh-opt-am=N],[Optimize G12DKH integrals for up to angular momentum N (N <= max-am).]),
if test $withval -le $G12DKH_MAX_AM; then
G12DKH_OPT_AM=$withval
fi
)
if test "X$INCLUDE_G12DKH" != "Xno"; then
AC_DEFINE_UNQUOTED(INCLUDE_G12DKH,$INCLUDE_G12DKH)
AC_SUBST(G12DKH_MAX_AM)
AC_SUBST(G12DKH_OPT_AM)
AC_DEFINE_UNQUOTED(G12DKH_MAX_AM,$G12DKH_MAX_AM)
AC_DEFINE_UNQUOTED(G12DKH_OPT_AM,$G12DKH_OPT_AM)
fi
LIBINT_UNROLLING_THRESHOLD=100
AC_ARG_ENABLE(unrolling,
AS_HELP_STRING([--enable-unrolling],[Unroll shell sets into integrals (--enable-unrolling=S will unroll shell sets larger than S).]),
[
case $enableval in
yes)
LIBINT_UNROLLING_THRESHOLD=1000000000
;;
no)
LIBINT_UNROLLING_THRESHOLD=
AC_MSG_RESULT([Shell sets will not be unrolled])
;;
*)
LIBINT_UNROLLING_THRESHOLD=$enableval
;;
esac
])
if test X$LIBINT_UNROLLING_THRESHOLD != X; then
if test X$LIBINT_UNROLLING_THRESHOLD = X1000000000; then
AC_MSG_RESULT([All shell sets will be unrolled])
else
AC_MSG_RESULT([Shell sets will be unrolled up to size $LIBINT_UNROLLING_THRESHOLD])
fi
AC_DEFINE_UNQUOTED(LIBINT_ENABLE_UNROLLING, $LIBINT_UNROLLING_THRESHOLD)
fi
AC_ARG_ENABLE(generic-code,
AS_HELP_STRING([--enable-generic-code],[Use manually-written generic code.]),
[
case $enableval in
yes)
AC_DEFINE(LIBINT_ENABLE_GENERIC_CODE)
AC_MSG_RESULT([Generic RR code will be used])
;;
no)
AC_MSG_RESULT([Generic RR code will not be used])
;;
esac
])
LIBINT_VECTOR_LENGTH=1
AC_ARG_WITH(vector-length,
AS_HELP_STRING([--with-vector-length=N],[Compute integrals in vectors of length N.]),
[
if test $withval -gt 0; then
LIBINT_VECTOR_LENGTH=$withval
AC_DEFINE_UNQUOTED(LIBINT_VECTOR_LENGTH,$withval)
AC_MSG_RESULT([Using vector length: $withval])
fi
])
if test $LIBINT_VECTOR_LENGTH -gt 1; then
LIBINT_VECTOR_METHOD=block
AC_ARG_WITH(vector-method,
AS_HELP_STRING([--with-vector-method],[Specifies how to vectorize integrals. Allowed values are 'block' (default), and 'line'.]),
[
LIBINT_VECTOR_METHOD=$withval
])
case $LIBINT_VECTOR_METHOD in
block)
;;
line)
;;
*)
AC_MSG_ERROR([Unrecognized vector method: $LIBINT_VECTOR_METHOD])
;;
esac
AC_DEFINE_UNQUOTED(LIBINT_VECTOR_METHOD,"$LIBINT_VECTOR_METHOD")
AC_MSG_RESULT([Using vector method: $LIBINT_VECTOR_METHOD])
fi
AC_ARG_ENABLE(single-evaltype,
AS_HELP_STRING([--enable-single-evaltype],[Generate single evaluator type (i.e. all tasks use the same evaluator)]),
[
if test X$enableval = Xyes; then
enable_single_evaltype=1
else
enable_single_evaltype=0
fi
],
[
enable_single_evaltype=1
]
)
if test X$enable_single_evaltype = X1; then
AC_DEFINE(LIBINT_SINGLE_EVALTYPE)
AC_MSG_RESULT([Will generate single evaluator type])
else
AC_MSG_RESULT([Will generate specialized evaluator types for each task])
AC_MSG_ERROR([Cannot generate specialized evaluator types yet])
fi
libint_generate_gma=0
AC_ARG_ENABLE(fma,
AS_HELP_STRING([--enable-fma],[Generate FMA (fused multiply-add) instructions (CXXGEN must support C++11; to benefit must have FMA-capable hardware and compiler)]),
[
case $enableval in
yes)
libint_generate_gma=1
AC_DEFINE(LIBINT_GENERATE_FMA)
AC_MSG_RESULT([Will generate FMA instructions])
;;
no)
AC_MSG_RESULT([Will not generate FMA instructions])
;;
esac
],
[
AC_MSG_RESULT([Will not generate FMA instructions])
])
AC_ARG_ENABLE(accum-ints,
AS_HELP_STRING([--enable-accum-ints],[Accumulate integrals to the buffer, rather than copy.]),
[
case $enableval in
yes)
AC_DEFINE(LIBINT_ACCUM_INTS)
AC_MSG_RESULT([Will accumulate integrals to the buffer])
;;
no)
AC_MSG_RESULT([Will copy integrals to the buffer])
;;
esac
],
[
AC_MSG_RESULT([Will copy integrals to the buffer])
])
AC_ARG_ENABLE(flop-counter,
AS_HELP_STRING([--enable-flop-counter],[Support (approximate) FLOP counting by the library. CXXGEN must support C++11!]),
[
case $enableval in
yes)
AC_DEFINE(LIBINT_FLOP_COUNT)
AC_MSG_RESULT([FLOP counter will be supported])
;;
no)
AC_MSG_RESULT([FLOP counter will not be supported])
;;
esac
],
[
AC_MSG_RESULT([FLOP counter will not be supported])
])
AC_ARG_ENABLE(profile,
AS_HELP_STRING([--enable-profile],[Turn on profiling instrumentation of the library. CXXGEN must support C++11!]),
[
case $enableval in
yes)
AC_DEFINE(LIBINT_PROFILE)
AC_MSG_RESULT([Profiling instrumentation enabled (generated code will require C++11)])
;;
no)
AC_MSG_RESULT([Profiling instrumentation disabled])
;;
esac
],
[
AC_MSG_RESULT([Profiling instrumentation disabled])
])
acx_contracted_ints=yes
AC_ARG_ENABLE(contracted-ints,
AS_HELP_STRING([--enable-contracted-ints],[Turn on support for contracted integrals.]),
[
case $enableval in
no)
acx_contracted_ints=no
;;
esac
])
if test "X$acx_contracted_ints" = Xyes; then
AC_DEFINE(LIBINT_CONTRACTED_INTS)
AC_MSG_RESULT([Will support contracted integrals])
else
AC_MSG_RESULT([Will not support contracted integrals])
fi
AC_SUBST(LIBINT_CONTRACTED_INTS, $acx_contracted_ints)
dnl
dnl Preferred strategies for evaluation
dnl
AC_ARG_WITH(eri-strategy,
AS_HELP_STRING([--with-eri-strategy],[Compute ERIs using the following strategy. This option is for experts ONLY.]),
[
case $withval in
OS)
AC_DEFINE_UNQUOTED(LIBINT_ERI_STRATEGY,0)
;;
HGP)
AC_DEFINE_UNQUOTED(LIBINT_ERI_STRATEGY,1)
;;
HL)
AC_DEFINE_UNQUOTED(LIBINT_ERI_STRATEGY,2)
;;
esac
AC_MSG_RESULT([Using ERI strategy: $withval])
],
[AC_DEFINE(LIBINT_ERI_STRATEGY,1)]
)
BUILDID="libint_buildid"
AC_ARG_WITH(build-id,
AS_HELP_STRING([--with-build-id],[Gives an identifier for the build.]),
BUILDID=$withval
)
AC_SUBST(BUILDID)
AC_DEFINE_UNQUOTED(LIBINT_BUILDID,"$BUILDID")
if test "$BUILDID"; then
LIBINT_VERSION="$LIBINT_MMM_VERSION-$BUILDID"
else
LIBINT_VERSION="$LIBINT_MMM_VERSION"
fi
AC_DEFINE_UNQUOTED(LIBINT_VERSION, "$LIBINT_VERSION")
AC_SUBST(LIBINT_VERSION)
ac_default_prefix="/usr/local/libint/$LIBINT_VERSION"
AC_ARG_WITH(cxx,
AS_HELP_STRING([--with-cxx],[Gives the name of the C++ compiler to use.]),
CXX=$withval
)
CXXFLAGS_OPT=
AC_ARG_WITH(cxx-optflags,
AS_HELP_STRING([--with-cxx-optflags],[Gives optimization flags for the C++ compiler.]),
if test "X$withval" != "Xyes" -a "X$withval" != "Xno"; then
CXXFLAGS_OPT=$withval
fi
)
AC_ARG_WITH(cxxgen,
AS_HELP_STRING([--with-cxxgen],[Gives the name of the C++ compiler to compile generated code.]),
CXXGEN=$withval
)
CXXGENFLAGS_OPT=
AC_ARG_WITH(cxxgen-optflags,
AS_HELP_STRING([--with-cxxgen-optflags],[Gives optimization flags for the C++ compiler for generated source.]),
if test "X$withval" != "Xyes" -a "X$withval" != "Xno"; then
CXXGENFLAGS_OPT=$withval