-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
1496 lines (1307 loc) · 53 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
m4_define(_CVC4_MAJOR, 1) dnl version (major)
m4_define(_CVC4_MINOR, 5) dnl version (minor)
m4_define(_CVC4_RELEASE, 0) dnl version (alpha)
m4_define(_CVC4_EXTRAVERSION, [-prerelease]) dnl version (extra)
m4_define(_CVC4_RELEASE_STRING, _CVC4_MAJOR[.]_CVC4_MINOR[]m4_if(_CVC4_RELEASE,[0],,[.]_CVC4_RELEASE)_CVC4_EXTRAVERSION) dnl version string
dnl Preprocess CL args. Defined in config/cvc4.m4
CVC4_AC_INIT
AC_PREREQ([2.61])
AC_INIT([cvc4], _CVC4_RELEASE_STRING, [[email protected]])
AC_CONFIG_SRCDIR([src/include/cvc4_public.h])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_MACRO_DIR([config])
AC_CONFIG_LIBOBJ_DIR([src/lib])
AC_CONFIG_SUBDIRS([proofs/lfsc_checker])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
CVC4_MAJOR=_CVC4_MAJOR
CVC4_MINOR=_CVC4_MINOR
CVC4_RELEASE=_CVC4_RELEASE
CVC4_EXTRAVERSION=_CVC4_EXTRAVERSION
CVC4_RELEASE_STRING=_CVC4_RELEASE_STRING
# Libtool version numbers for libraries
# Version numbers are in the form current:revision:age
#
# current -
# increment if interfaces have been added, removed or changed
# revision -
# increment if source code has changed
# set to zero if current is incremented
# age -
# increment if interfaces have been added
# set to zero if interfaces have been removed
# or changed
#
# For more information, see:
# http://www.gnu.org/software/libtool/manual/libtool.html#Versioning
# For guidance on when to change the version number, refer to the
# developer's guide.
m4_define([library_version], [m4_esyscmd([grep -F "$(grep -v '^#' library_versions | awk '{print$][1}' | sed 's,\\,\\\\\\,g' | (while read r; do if echo "]_CVC4_RELEASE_STRING[" | grep -q "^$r\$"; then echo "$r"; exit; fi; done; echo NO_MATCH_FOUND)) " library_versions | awk 'BEGIN {FS=":";OFS=":";RS=" "} /^$1:/ {print$][2,$][3,$][4}' | head -1])])
m4_define(_CVC4_LIBRARY_VERSION, library_version([libcvc4]))dnl
m4_define(_CVC4_PARSER_LIBRARY_VERSION, library_version([libcvc4parser]))dnl
m4_define(_CVC4_COMPAT_LIBRARY_VERSION, library_version([libcvc4compat]))dnl
m4_define(_CVC4_BINDINGS_LIBRARY_VERSION, library_version([libcvc4bindings]))dnl
m4_define([fatal_error], [m4_errprint(__program__:__file__:__line__[: fatal error: $*
])m4_exit(1)])dnl
m4_ifblank(_CVC4_LIBRARY_VERSION,[fatal_error([no CVC4_LIBRARY_VERSION defined for release version "]_CVC4_RELEASE_STRING[" in library_versions file])])dnl
m4_ifblank(_CVC4_PARSER_LIBRARY_VERSION,[fatal_error([no CVC4_PARSER_LIBRARY_VERSION defined for release version "]_CVC4_RELEASE_STRING[" in library_versions file])])dnl
m4_ifblank(_CVC4_COMPAT_LIBRARY_VERSION,[fatal_error([no CVC4_COMPAT_LIBRARY_VERSION defined for release version "]_CVC4_RELEASE_STRING[" in library_versions file])])dnl
m4_ifblank(_CVC4_BINDINGS_LIBRARY_VERSION,[fatal_error([no CVC4_BINDINGS_LIBRARY_VERSION defined for release version "]_CVC4_RELEASE_STRING[" in library_versions file])])dnl
CVC4_LIBRARY_VERSION=_CVC4_LIBRARY_VERSION
CVC4_PARSER_LIBRARY_VERSION=_CVC4_PARSER_LIBRARY_VERSION
CVC4_COMPAT_LIBRARY_VERSION=_CVC4_COMPAT_LIBRARY_VERSION
CVC4_BINDINGS_LIBRARY_VERSION=_CVC4_BINDINGS_LIBRARY_VERSION
# Using the AC_CANONICAL_* macros destroy the command line you get
# from $@, which we want later for determining the build profile. So
# we save it. (We can't do our build profile stuff here, or it's not
# included in the output... autoconf overrides us on the orderings of
# some things.)
config_cmdline=("$@")
cvc4_config_cmdline="${config_cmdline[[@]]}"
# remember if the user set these explicitly (or whether autoconf does)
user_specified_enable_or_disable_static=${enable_static+yes}
user_specified_enable_or_disable_shared=${enable_shared+yes}
if test -e src/include/cvc4_public.h; then
CVC4_CONFIGURE_AT_TOP_LEVEL=yes
else
CVC4_CONFIGURE_AT_TOP_LEVEL=no
fi
# override autoconf: we don't want it giving us CFLAGS/CXXFLAGS, but we do
# want to respect the user's flags
if test -z "${CFLAGS+set}"; then CFLAGS=; fi
if test -z "${CXXFLAGS+set}"; then CXXFLAGS=; fi
# on by default
AM_MAINTAINER_MODE([enable])
# turn off static lib building by default
AC_ENABLE_SHARED
AC_DISABLE_STATIC
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
as_me=configure
if test "$enable_shared" = no -a "$user_specified_enable_or_disable_shared" = yes; then
enable_static=yes
fi
# Features requested by the user
AC_MSG_CHECKING([for requested build profile])
AC_ARG_WITH([build],
[AS_HELP_STRING([--with-build=profile],
[for profile in {production,debug,competition,personal}])])
if test -z "${with_build+set}"; then
with_build=production
fi
if test -z "${enable_optimized+set}" -a -z "${enable_debug_symbols+set}" -a -z "${enable_assertions+set}" -a -z "${enable_tracing+set}" -a -z "${enable_dumping+set}" -a -z "${enable_muzzle+set}" -a -z "${enable_coverage+set}" -a -z "${enable_profiling+set}" -a -z "${enable_statistics+set}" -a -z "${enable_replay+set}" -a -z "${with_gmp+set}" -a -z "${with_cln+set}" -a -z "${with_glpk+set}" -a -z "${with_abc+set}"; then
custom_build_profile=no
else
custom_build_profile=yes
fi
btargs=
if test -n "${enable_optimized+set}"; then
if test "$enable_optimized" = yes; then
btargs="$btargs optimized"
else
btargs="$btargs nooptimized"
fi
fi
# --enable-staticbinary is an alias for --enable-static-binary
if test -n "${enable_staticbinary+set}"; then
enable_static_binary="$enable_staticbinary"
fi
if test -n "${enable_static_binary+set}"; then
if test "$enable_static_binary" = yes; then
btargs="$btargs staticbinary"
else
btargs="$btargs nostaticbinary"
fi
fi
if test -n "${enable_debug_symbols+set}"; then
if test "$enable_debug_symbols" = yes; then
btargs="$btargs debugsymbols"
else
btargs="$btargs nodebugsymbols"
fi
fi
if test -n "${enable_assertions+set}"; then
if test "$enable_assertions" = yes; then
btargs="$btargs assertions"
else
btargs="$btargs noassertions"
fi
fi
if test -n "${enable_proof+set}"; then
if test "$enable_proof" = yes; then
btargs="$btargs proof"
else
btargs="$btargs noproof"
fi
fi
if test -n "${enable_tracing+set}"; then
if test "$enable_tracing" = yes; then
btargs="$btargs tracing"
else
btargs="$btargs notracing"
fi
fi
if test -n "${enable_dumping+set}"; then
if test "$enable_dumping" = yes; then
btargs="$btargs dumping"
else
btargs="$btargs nodumping"
fi
fi
if test -n "${enable_muzzle+set}"; then
if test "$enable_muzzle" = yes; then
btargs="$btargs muzzle"
else
btargs="$btargs nomuzzle"
fi
fi
if test -n "${enable_coverage+set}"; then
if test "$enable_coverage" = yes; then
btargs="$btargs coverage"
else
btargs="$btargs nocoverage"
fi
fi
if test -n "${enable_profiling+set}"; then
if test "$enable_profiling" = yes; then
btargs="$btargs profiling"
else
btargs="$btargs noprofiling"
fi
fi
if test -n "${enable_statistics+set}"; then
if test "$enable_statistics" = yes; then
btargs="$btargs statistics"
else
btargs="$btargs nostatistics"
fi
fi
if test -n "${enable_replay+set}"; then
if test "$enable_replay" = yes; then
btargs="$btargs replay"
else
btargs="$btargs noreplay"
fi
fi
if test -n "${with_glpk+set}"; then
if test "$with_glpk" = yes; then
btargs="$btargs glpk"
fi
fi
if test -n "${with_abc+set}"; then
if test "$with_abc" = yes; then
btargs="$btargs abc"
fi
fi
AC_MSG_RESULT([$with_build])
AM_INIT_AUTOMAKE([1.11 no-define tar-pax parallel-tests color-tests subdir-objects])
AC_CONFIG_HEADERS([cvc4autoconfig.h])
# automake 1.12 changes the test driver mechanism in a way that is
# completely incompatible with 1.11. We figure out here which version
# we're using in order to set up test makefiles correctly.
# See http://lists.gnu.org/archive/html/automake/2012-04/msg00060.html
if test -z "$am__api_version"; then
AC_MSG_ERROR([Cannot determine automake API version ?!])
fi
case "$am__api_version" in
1.11*) automake111=true ;;
*) automake111=false ;;
esac
AM_CONDITIONAL([AUTOMAKE_1_11], [$automake111])
# Initialize libtool's configuration options.
# we're not DLL-clean yet (i.e., don't properly use dllexport and dllimport)
# _LT_SET_OPTION([LT_INIT],[win32-dll])
LT_INIT
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
CVC4_GCC_VERSION
cvc4_use_gmp=2
cvc4_use_cln=2
AC_ARG_WITH(
[cln],
AS_HELP_STRING(
[--with-cln],
[use CLN instead of GMP]
),
[case "$withval" in
y|ye|yes|Y|YE|YES) cvc4_use_cln=1 ;;
n|no|N|NO) cvc4_use_cln=0 ;;
esac
]
)
AC_ARG_WITH(
[gmp],
AS_HELP_STRING(
[--with-gmp],
[use GMP instead of CLN]
),
[case "$withval" in
y|ye|yes|Y|YE|YES) cvc4_use_gmp=1 ;;
n|no|N|NO) cvc4_use_gmp=0 ;;
esac
]
)
if test $cvc4_use_cln = 1 -a $cvc4_use_gmp = 1 || test $cvc4_use_cln = 0 -a $cvc4_use_gmp = 0; then
AC_MSG_ERROR([You must use either CLN and GMP. Please pick one.])
fi
if test $cvc4_use_gmp = 1; then
cvc4_use_cln=0
elif test $cvc4_use_gmp = 0; then
cvc4_use_cln=1
elif test $cvc4_use_cln = 1; then
cvc4_use_gmp=0
elif test $cvc4_use_cln = 0; then
cvc4_use_gmp=1
fi
# try GMP, fail if not found; GMP is required for both CLN and for GMP
# versions of CVC4
AC_CHECK_LIB(gmp, __gmpz_init, , [AC_MSG_ERROR([GNU MP (libgmp) not found, see http://gmplib.org/])])
if test $cvc4_use_cln = 2; then
if test "$CVC4_BSD_LICENSED_CODE_ONLY" = 1 -o "$with_portfolio" = yes; then
cvc4_use_cln=0
cvc4_use_gmp=1
fi
fi
if test $cvc4_use_cln != 0; then
# [mdeters] The PKG_CHECK_MODULES macro isn't customizable and doesn't fail
# gracefully. You can only specify it once for a given library name. That
# is, even on separate if/else branches, you can't put
# PKG_CHECK_MODULES([CLN], ...). That's why things are so convoluted here,
# we have to have PKG_CHECK_MODULES _exactly_ once in configure.ac !
PKG_CHECK_MODULES([CLN], [cln >= 1.2.2],
[AC_LANG_PUSH([C++])
save_LIBS="$LIBS"
save_CXXFLAGS="$CXXFLAGS"
LIBS="$CLN_LIBS $LIBS"
CXXFLAGS="$CLN_CFLAGS $CXXFLAGS"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <cln/cln.h>]], [[cln::cl_F pi = "3.1415926";]])], [
cvc4_use_cln=1
], [
if test $cvc4_use_cln = 1; then
# fail
AC_MSG_ERROR([CLN installation missing, too old, or not functional for this architecture])
else
# fall back to GMP
AC_MSG_NOTICE([CLN installation missing, too old, or not functional for this architecture, will use gmp instead])
cvc4_use_cln=0
cvc4_use_gmp=1
fi
])
CXXFLAGS="$save_CXXFLAGS"
LIBS="$save_LIBS"
AC_LANG_POP([C++])
],
[if test $cvc4_use_cln = 1; then
# fail
AC_MSG_ERROR([CLN not installed (or too old) or pkgconfig missing])
else
# fall back to GMP
AC_MSG_NOTICE([CLN not installed (or too old) or pkgconfig missing, will use gmp])
cvc4_use_cln=0
cvc4_use_gmp=1
fi
]
)
fi
if test $cvc4_use_cln = 0; then
# try GMPXX, fail if not found; don't need to link against it, only need its header
AC_LANG_PUSH([C++])
AC_CHECK_HEADER([gmpxx.h], , [AC_MSG_ERROR([GNU MP C++ library header (gmpxx.h) required but not found, see http://gmplib.org/])])
AC_LANG_POP([C++])
cvc4_cln_or_gmp=gmp
else
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }$CLN_CFLAGS"
CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }$CLN_CFLAGS"
CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }$CLN_CFLAGS"
LIBS="$CLN_LIBS${LIBS:+ $LIBS}"
cvc4_cln_or_gmp=cln
fi
if test $cvc4_cln_or_gmp = cln; then
AC_DEFINE_UNQUOTED(CVC4_CLN_IMP, [], [Defined if using the CLN multi-precision arithmetic library.])
else
AC_DEFINE_UNQUOTED(CVC4_GMP_IMP, [], [Defined if using the GMP multi-precision arithmetic library.])
fi
AM_CONDITIONAL([CVC4_CLN_IMP], [test $cvc4_cln_or_gmp = cln])
AM_CONDITIONAL([CVC4_GMP_IMP], [test $cvc4_cln_or_gmp = gmp])
# construct the build string
AC_MSG_CHECKING([for appropriate build string])
if test -z "$ac_confdir"; then
ac_confdir="$srcdir"
fi
build_type=`$ac_confdir/config/build-type $with_build $btargs $cvc4_cln_or_gmp`
AC_MSG_RESULT($build_type)
# Require building in target and build-specific build directory:
#
# If the configure script is invoked from the top-level source
# directory, it creates a suitable build directory (based on the build
# architecture and build profile from $build_type), changes into it,
# and reinvokes itself. CVC4_CONFIGURE_IN_BUILDS is an envariable
# that breaks any possibility of infinite recursion in this process.
AC_MSG_CHECKING([what dir to configure])
if test "$CVC4_CONFIGURE_IN_BUILDS" = yes; then
AC_MSG_RESULT([this one (in builds/)])
elif test "$CVC4_CONFIGURE_AT_TOP_LEVEL" = yes; then
AC_MSG_RESULT([builds/$target/$build_type])
$as_echo
if test -z "$ac_srcdir"; then
mkbuilddir=./config/mkbuilddir
else
mkbuilddir=$ac_srcdir/config/mkbuilddir
fi
$as_echo "$mkbuilddir $target $build_type"
source $mkbuilddir "$target" "$build_type"
$as_echo "cd builds/$target/$build_type"
cd "builds/$target/$build_type"
CVC4_CONFIGURE_IN_BUILDS=yes; export CVC4_CONFIGURE_IN_BUILDS
# Runs the single recursive configure invocation using a relative path.
# See https://lists.gnu.org/archive/html/autoconf/2011-04/msg00060.html
echo "$SHELL ../../../configure ${config_cmdline[[@]]}"
"$SHELL" "../../../configure" "${config_cmdline[[@]]}"
exitval=$?
cd ../../..
if test $exitval -eq 0; then
cat >config.reconfig <<EOF
[#!/bin/bash
# Generated by configure, `date`
# This script is part of CVC4.
cd "\`dirname \\"\$0\\"\`"
if test -d builds; then :; else echo 'No builds/ directory!' >&2; exit; fi
current=(\`grep '^CURRENT_BUILD' builds/current | sed 's,^CURRENT_BUILD *= *\([^/]*\\)/\\(.*\\),\\1 \\2,'\`)
arch=\${current[0]}
build=\${current[1]}
echo "reconfiguring in builds/\$arch/\$build..."
cd "builds/\$arch/\$build"
echo ./config.status "\$@"
./config.status "\$@"]
EOF
chmod +x config.reconfig
fi
ln -sf "$target/$build_type/config.log" "builds/config.log"
exit $exitval
else
AC_MSG_RESULT([this one (user-specified)])
fi
as_me=configure
# Unpack standard build types. Any particular options can be overriden with
# --enable/disable-X options
# Tim: This needs to keep CVC4CPPFLAGS, CVC4CXXFLAGS, etc. set by earlier checks
case "$with_build" in
production) # highly optimized, no assertions, no tracing, dumping
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }"
CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }"
CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }"
CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }"
FLAG_VISIBILITY_HIDDEN='-fvisibility=hidden'
if test -z "${OPTLEVEL+set}" ; then OPTLEVEL=3 ; fi
if test -z "${enable_optimized+set}" ; then enable_optimized=yes ; fi
if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=yes ; fi
if test -z "${enable_statistics+set}" ; then enable_statistics=yes ; fi
if test -z "${enable_replay+set}" ; then enable_replay=no ; fi
if test -z "${enable_assertions+set}" ; then enable_assertions=no ; fi
if test -z "${enable_proof+set}" ; then enable_proof=yes ; fi
if test -z "${enable_tracing+set}" ; then enable_tracing=no ; fi
if test -z "${enable_dumping+set}" ; then enable_dumping=yes ; fi
if test -z "${enable_muzzle+set}" ; then enable_muzzle=no ; fi
;;
debug) # unoptimized, debug symbols, assertions, tracing, dumping
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_DEBUG"
CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-fno-inline"
CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-fno-inline"
CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }"
FLAG_VISIBILITY_HIDDEN=
if test -z "${enable_optimized+set}" ; then enable_optimized=no ; fi
if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=yes ; fi
if test -z "${enable_statistics+set}" ; then enable_statistics=yes ; fi
if test -z "${enable_replay+set}" ; then enable_replay=yes ; fi
if test -z "${enable_assertions+set}" ; then enable_assertions=yes ; fi
if test -z "${enable_proof+set}" ; then enable_proof=yes ; fi
if test -z "${enable_tracing+set}" ; then enable_tracing=yes ; fi
if test -z "${enable_dumping+set}" ; then enable_dumping=yes ; fi
if test -z "${enable_muzzle+set}" ; then enable_muzzle=no ; fi
;;
default) # moderately optimized, assertions, tracing, dumping
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }"
CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }"
CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }"
CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }"
FLAG_VISIBILITY_HIDDEN='-fvisibility=hidden'
if test -z "${OPTLEVEL+set}" ; then OPTLEVEL=2 ; fi
if test -z "${enable_optimized+set}" ; then enable_optimized=yes ; fi
if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=yes ; fi
if test -z "${enable_statistics+set}" ; then enable_statistics=yes ; fi
if test -z "${enable_replay+set}" ; then enable_replay=yes ; fi
if test -z "${enable_assertions+set}" ; then enable_assertions=yes ; fi
if test -z "${enable_proof+set}" ; then enable_proof=yes ; fi
if test -z "${enable_tracing+set}" ; then enable_tracing=yes ; fi
if test -z "${enable_dumping+set}" ; then enable_dumping=yes ; fi
if test -z "${enable_muzzle+set}" ; then enable_muzzle=no ; fi
;;
competition) # maximally optimized, no assertions, no tracing, no dumping, muzzled
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_COMPETITION_MODE"
CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-funroll-all-loops -fexpensive-optimizations -fno-enforce-eh-specs"
CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-funroll-all-loops -fexpensive-optimizations -fno-enforce-eh-specs"
CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }"
FLAG_VISIBILITY_HIDDEN='-fvisibility=hidden'
if test -z "${OPTLEVEL+set}" ; then OPTLEVEL=9 ; fi
if test -z "${enable_optimized+set}" ; then enable_optimized=yes ; fi
if test -z "${enable_debug_symbols+set}"; then enable_debug_symbols=no ; fi
if test -z "${enable_statistics+set}" ; then enable_statistics=no ; fi
if test -z "${enable_replay+set}" ; then enable_replay=no ; fi
if test -z "${enable_assertions+set}" ; then enable_assertions=no ; fi
if test -z "${enable_proof+set}" ; then enable_proof=no ; fi
if test -z "${enable_tracing+set}" ; then enable_tracing=no ; fi
if test -z "${enable_dumping+set}" ; then enable_dumping=no ; fi
if test -z "${enable_muzzle+set}" ; then enable_muzzle=yes ; fi
if test -z "${user_specified_enable_or_disable_shared}"; then enable_shared=no; fi
if test -z "${user_specified_enable_or_disable_static}"; then enable_static=yes; fi
if test -z "${enable_static_binary+set}"; then enable_static_binary=yes ; fi
;;
*)
AC_MSG_FAILURE([unknown build profile: $with_build])
;;
esac
if test -z "${OPTLEVEL+set}"; then OPTLEVEL=3; fi
AM_CONDITIONAL([CVC4_BUILD_PROFILE_PRODUCTION], [test "$with_build" = production])
AM_CONDITIONAL([CVC4_BUILD_PROFILE_DEBUG], [test "$with_build" = debug])
AM_CONDITIONAL([CVC4_BUILD_PROFILE_DEFAULT], [test "$with_build" = default])
AM_CONDITIONAL([CVC4_BUILD_PROFILE_COMPETITION], [test "$with_build" = competition])
# permit a static binary
AC_MSG_CHECKING([whether to build a static binary])
AC_ARG_ENABLE([static-binary],
[AS_HELP_STRING([--enable-static-binary],
[build a fully statically-linked binary [default=no]])])
if test -z "${enable_static_binary+set}"; then
enable_static_binary=no
fi
AC_MSG_RESULT([$enable_static_binary])
if test "$enable_static_binary" = yes; then
if test "$target_vendor" = apple; then
if test -z "$MAC_STATIC_BINARY_MANUAL_OVERRIDE"; then
AC_MSG_ERROR([[Statically-linked binaries are not supported on Mac OS. See https://developer.apple.com/library/mac/#qa/qa2001/qa1118.html . (If you ABSOLUTELY insist on this going forward and you know what you are doing, set MAC_STATIC_BINARY_MANUAL_OVERRIDE=1)]])
else
AC_MSG_WARN([MAC_STATIC_BINARY_MANUAL_OVERRIDE was set!])
AC_MSG_WARN([Will make a static binary during this build. Note that it may fail!])
fi
fi
if test "$enable_static" != yes; then
enable_static=yes
AC_MSG_WARN([forcing static-library building, --enable-static-binary given])
fi
fi
AC_MSG_CHECKING([whether to support proofs in libcvc4])
AC_ARG_ENABLE([proof],
[AS_HELP_STRING([--disable-proof],
[do not support proof generation])])
if test -z "${enable_proof+set}"; then
enable_proof=yes
fi
AC_MSG_RESULT([$enable_proof])
if test "$enable_proof" = yes; then
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_PROOF"
fi
AM_CONDITIONAL([CVC4_PROOF], [test "$enable_proof" = yes])
AC_MSG_CHECKING([whether to optimize libcvc4])
AC_ARG_ENABLE([optimized],
[AS_HELP_STRING([--enable-optimized],
[optimize the build])])
if test -z "${enable_optimized+set}"; then
enable_optimized=no
fi
AC_MSG_RESULT([$enable_optimized])
if test "$enable_optimized" = yes; then
CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-O$OPTLEVEL"
CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-O$OPTLEVEL"
else
CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-O0"
CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-O0"
fi
AC_MSG_CHECKING([whether to include debugging symbols in libcvc4])
AC_ARG_ENABLE([debug-symbols],
[AS_HELP_STRING([--disable-debug-symbols],
[do not include debug symbols in libcvc4])])
if test -z "${enable_debug_symbols+set}"; then
enable_debug_symbols=yes
fi
AC_MSG_RESULT([$enable_debug_symbols])
if test "$enable_debug_symbols" = yes; then
CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-ggdb3"
CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-ggdb3"
fi
AC_MSG_CHECKING([whether to include statistics are turned on in libcvc4])
AC_ARG_ENABLE([statistics],
[AS_HELP_STRING([--disable-statistics],
[do not include statistics in libcvc4])])
if test -z "${enable_statistics+set}"; then
enable_statistics=yes
fi
AC_MSG_RESULT([$enable_statistics])
if test "$enable_statistics" = yes; then
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_STATISTICS_ON"
fi
AC_MSG_CHECKING([whether the replay feature should be turned on in libcvc4])
AC_ARG_ENABLE([replay],
[AS_HELP_STRING([--disable-replay],
[turn off the replay feature in libcvc4])])
if test -z "${enable_replay+set}"; then
enable_replay=yes
fi
AC_MSG_RESULT([$enable_replay])
if test "$enable_replay" = yes; then
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_REPLAY"
fi
AC_MSG_CHECKING([whether to include assertions in build])
AC_ARG_ENABLE([assertions],
[AS_HELP_STRING([--disable-assertions],
[turn off assertions in build])])
if test -z "${enable_assertions+set}"; then
enable_assertions=yes
fi
AC_MSG_RESULT([$enable_assertions])
if test "$enable_assertions" = yes; then
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_ASSERTIONS"
else
# turn off regular C assert() also
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DNDEBUG"
fi
AC_MSG_CHECKING([whether to do a traceable build of CVC4])
AC_ARG_ENABLE([tracing],
[AS_HELP_STRING([--disable-tracing],
[remove all tracing code from CVC4])])
if test -z "${enable_tracing+set}"; then
enable_tracing=yes
fi
AC_MSG_RESULT([$enable_tracing])
if test "$enable_tracing" = yes; then
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_TRACING"
fi
AC_MSG_CHECKING([whether to do a dump-capable build of CVC4])
AC_ARG_ENABLE([dumping],
[AS_HELP_STRING([--disable-dumping],
[remove all dumping code from CVC4])])
if test -z "${enable_dumping+set}"; then
enable_dumping=yes
fi
AC_MSG_RESULT([$enable_dumping])
if test "$enable_dumping" = yes; then
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_DUMPING"
fi
AC_MSG_CHECKING([whether to do a muzzled build of CVC4])
AC_ARG_ENABLE([muzzle],
[AS_HELP_STRING([--enable-muzzle],
[completely silence CVC4; remove ALL non-result output from build])])
if test -z "${enable_muzzle+set}"; then
enable_muzzle=no
fi
AC_MSG_RESULT([$enable_muzzle])
if test "$enable_muzzle" = yes; then
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_MUZZLE"
fi
AC_MSG_CHECKING([whether to do a gcov-enabled build of CVC4])
AC_ARG_ENABLE([coverage],
[AS_HELP_STRING([--enable-coverage],
[build with support for gcov coverage testing])])
if test -z "${enable_coverage+set}"; then
enable_coverage=no
fi
AC_MSG_RESULT([$enable_coverage])
if test "$enable_coverage" = yes; then
# For coverage testing, we prefer:
# --enable-static --disable-shared --disable-static-binary
# If the user didn't specify these, we force them here. If the
# user specified them in opposite phase, give warnings that they
# shouldn't do that, or bomb out.
if test "$user_specified_enable_or_disable_shared" != yes; then
enable_shared=no
AC_MSG_WARN([turning off shared library building due to --enable-coverage])
elif test "$enable_shared" = yes; then
AC_MSG_WARN([])
AC_MSG_WARN([It is not recommended to configure with --enable-coverage --enable-shared])
AC_MSG_WARN([gcov does not support shared libraries, so only your static libraries will be coverage-testable.])
AC_MSG_WARN([Your cvc4 driver and testing binaries will not be coverage-testable.])
AC_MSG_WARN([])
fi
if test "${enable_static_binary+set}" = set -a "$enable_static_binary" = yes; then
AC_MSG_WARN([])
AC_MSG_WARN([It is not recommended to configure with --enable-coverage --enable-static-binary])
AC_MSG_WARN([Your cvc4 driver and testing binaries will be fully-statically linked and may not be coverage-testable.])
AC_MSG_WARN([])
fi
if test "$user_specified_enable_or_disable_static" != yes; then
enable_static=yes
AC_MSG_WARN([turning on static library building due to --enable-coverage])
elif test "$enable_static" != yes; then
AC_MSG_ERROR([--enable-coverage and --disable-static are incompatible; gcov only supports static libraries.])
fi
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_COVERAGE"
CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }--coverage"
CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }--coverage"
CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }--coverage"
fi
AC_MSG_CHECKING([whether to do a profiling-enabled build of CVC4])
AC_ARG_ENABLE([profiling],
[AS_HELP_STRING([--enable-profiling],
[build with support for gprof profiling])])
if test -z "${enable_profiling+set}"; then
enable_profiling=no
fi
AC_MSG_RESULT([$enable_profiling])
if test "$enable_profiling" = yes; then
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_PROFILING"
CVC4CXXFLAGS="${CVC4CXXFLAGS:+$CVC4CXXFLAGS }-pg"
CVC4CFLAGS="${CVC4CFLAGS:+$CVC4CFLAGS }-pg"
CVC4LDFLAGS="${CVC4LDFLAGS:+$CVC4LDFLAGS }-pg"
fi
# Check for libglpk (defined in config/glpk.m4)
AC_ARG_WITH([glpk],
[AS_HELP_STRING([--with-glpk],
[use GLPK simplex solver])], [], [with_glpk=])
CVC4_CHECK_FOR_GLPK
if test $have_libglpk -eq 1; then
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_USE_GLPK"
fi
AM_CONDITIONAL([CVC4_USE_GLPK], [test $have_libglpk -eq 1])
AC_SUBST([GLPK_LDFLAGS])
AC_SUBST([GLPK_LIBS])
# Build with libabc (defined in config/abc.m4)
AC_ARG_WITH([abc],
[AS_HELP_STRING([--with-abc],
[use the ABC AIG library])], [], [with_abc=])
CVC4_CHECK_FOR_ABC
if test $have_libabc -eq 1; then
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_USE_ABC"
fi
AM_CONDITIONAL([CVC4_USE_ABC], [test $have_libabc -eq 1])
AC_SUBST([ABC_LDFLAGS])
AC_SUBST([ABC_LIBS])
# Check to see if this version/architecture of GNU C++ explicitly
# instantiates __gnu_cxx::hash<uint64_t> or not. Some do, some don't.
# See src/util/hash.h.
AC_MSG_CHECKING([whether __gnu_cxx::hash<uint64_t> is already specialized])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <stdint.h>
#include <ext/hash_map>
namespace __gnu_cxx { template<> struct hash<uint64_t> {}; }])],
[AC_MSG_RESULT([no]); CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-DCVC4_NEED_HASH_UINT64_T"],
[AC_MSG_RESULT([yes])])
AC_LANG_POP([C++])
# Check whether "long" and "int64_t" are distinct types w.r.t. overloading.
# Even if they have the same size, they can be distinct, and some platforms
# can have problems with ambiguous function calls when auto-converting
# int64_t to long, and others will complain if you overload a function
# that takes an int64_t with one that takes a long (giving a redefinition
# error). So we have to keep both happy. Probably the same underlying
# issue as the hash specialization above, but let's check separately
# for flexibility.
AC_MSG_CHECKING([for the relationship between long and int64_t])
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <stdint.h>
void foo(long) {}
void foo(int64_t) {}])],
[AC_MSG_RESULT([no relationship detected]); CVC4_NEED_INT64_T_OVERLOADS=1],
[AC_MSG_RESULT([typedef or similar]); CVC4_NEED_INT64_T_OVERLOADS=0])
AC_LANG_POP([C++])
AC_SUBST([CVC4_NEED_INT64_T_OVERLOADS])
# Check for ANTLR runantlr script (defined in config/antlr.m4)
AC_PROG_ANTLR
CVC4_CXX_OPTION([-Werror], [WERROR])
CVC4_C_OPTION([-Werror], [C_WERROR])
CVC4_CXX_OPTION([-Wno-deprecated], [WNO_DEPRECATED])
CVC4_C_OPTION([-Wno-deprecated], [C_WNO_DEPRECATED])
CVC4_CXX_OPTION([-Wno-conversion-null], [WNO_CONVERSION_NULL])
CVC4_CXX_OPTION([-Wno-tautological-compare], [WNO_TAUTOLOGICAL_COMPARE])
CVC4_CXX_OPTION([-Wno-parentheses], [WNO_PARENTHESES])
CVC4_CXX_OPTION([-Wno-uninitialized], [WNO_UNINITIALIZED])
CVC4_CXX_OPTION([-Wno-unused-variable], [WNO_UNUSED_VARIABLE])
CVC4_CXX_OPTION([-fno-strict-aliasing], [FNO_STRICT_ALIASING])
AC_SUBST([WERROR])
AC_SUBST([WNO_CONVERSION_NULL])
AC_SUBST([WNO_TAUTOLOGICAL_COMPARE])
AC_SUBST([WNO_PARENTHESES])
AC_SUBST([WNO_UNINITIALIZED])
AC_SUBST([WNO_UNUSED_VARIABLE])
AC_SUBST([FNO_STRICT_ALIASING])
# On Mac, we have to fix the visibility of standard library symbols.
# Otherwise, exported template instantiations---even though explicitly
# CVC4_PUBLIC, can be generated as symbols with internal-only linkage.
# Presumably, Apple is distributing a libstdc++ that is built *without*
# --enable-libstdcxx-visibility (?)
if test "$target_vendor" = apple; then
CVC4CPPFLAGS="${CVC4CPPFLAGS:+$CVC4CPPFLAGS }-D_GLIBCXX_VISIBILITY_DEFAULT=\"__attribute__((__visibility__(\\\"default\\\")))\""
fi
# Tell top-level Makefile to include $(top_srcdir)/personal.mk
AC_ARG_ENABLE([personal-make-rules],
[AS_HELP_STRING([--enable-personal-make-rules],
[include top-level personal.mk (if it exists)])])
if test "$enable_personal_make_rules" = yes; then
# This allows us to include a personal.mk makefile from every
# generated makefile. Named zz_* in order to make sure this
# comes last, so it gets other definitions (in particular top_srcdir).
zz_cvc4_use_personal_make_rules='yes
all:;
include $(top_srcdir)/personal.mk
$(top_srcdir)/personal.mk:; @touch "$@"'
AC_SUBST([zz_cvc4_use_personal_make_rules])
fi
# Doxygen configuration
AC_ARG_ENABLE([internals-documentation],
[AS_HELP_STRING([--enable-internals-documentation],
[build Doxygen documentation for static and private member functions])])
if test "$enable_internals_documentation" = yes; then
DOXYGEN_EXTRACT_PRIVATE=YES
DOXYGEN_EXTRACT_STATIC=YES
else
DOXYGEN_EXTRACT_PRIVATE=NO
DOXYGEN_EXTRACT_STATIC=NO
fi
AC_SUBST([DOXYGEN_EXTRACT_PRIVATE])
AC_SUBST([DOXYGEN_EXTRACT_STATIC])
DX_MAN_FEATURE(OFF)
DX_PDF_FEATURE(OFF)
DX_PS_FEATURE(OFF)
DX_DOT_FEATURE(OFF)
DX_INIT_DOXYGEN($PACKAGE_NAME, config/doxygen.cfg, $srcdir/doc/doxygen)
AC_ARG_ENABLE([unit-testing], AS_HELP_STRING([--disable-unit-testing], [don't build support for unit testing, even if available]), , [enable_unit_testing=check])
AC_ARG_VAR(CXXTEST, [path to CxxTest installation])
AC_SUBST([CXXTEST])
AC_ARG_WITH([cxxtest-dir],
[AS_HELP_STRING([--with-cxxtest-dir=DIR], [path to CxxTest installation])],
[CXXTEST="$withval"])
# In the case of "./configure --with-cxxtest-dir=../cxxtest" (or other
# relative path) and having switched the configure directory (see above),
# search with respect to the top source dir, not the build dir
if test "$CVC4_CONFIGURE_IN_BUILDS" = yes -a -n "$CXXTEST"; then
case "$CXXTEST" in
/*) ;;
*) CXXTEST="$srcdir/$CXXTEST" ;;
esac
fi
TESTS_ENVIRONMENT=
RUN_REGRESSION_ARGS=
if test "$enable_proof" = yes; then
RUN_REGRESSION_ARGS="${RUN_REGRESSION_ARGS:+$RUN_REGRESSION_ARGS }--proof"
fi
AC_SUBST([TESTS_ENVIRONMENT])
AC_SUBST([RUN_REGRESSION_ARGS])
CXXTESTGEN=
AC_PATH_PROG(CXXTESTGEN, cxxtestgen.pl, [], [$CXXTEST:$PATH])
if test -z "$CXXTESTGEN"; then
AC_PATH_PROG(CXXTESTGEN, cxxtestgen.py, [], [$CXXTEST:$PATH])
fi
if test -z "$CXXTESTGEN"; then
AC_PATH_PROG(CXXTESTGEN, cxxtestgen, [], [$CXXTEST:$PATH])
fi
# The latest version of cxxtest distributed from the git repository places
# cxxtest under <cxxtest-root>/bin/cxxtest
if test -z "$CXXTESTGEN"; then
AC_PATH_PROG(CXXTESTGEN, cxxtestgen, [], [$CXXTEST/bin:$PATH])
fi
if test "$enable_unit_testing" = "no"; then
AC_MSG_NOTICE([unit tests disabled by user request.])
CXXTESTGEN=
CXXTEST=
elif test -z "$CXXTESTGEN"; then
AC_MSG_NOTICE([unit tests disabled, could not find cxxtestgen.pl or cxxtestgen.py or cxxtestgen])
elif test -z "$CXXTEST"; then
CXXTEST=`dirname "$CXXTESTGEN"`
AC_MSG_CHECKING([for location of CxxTest headers])
if test -e "$CXXTEST/cxxtest/TestRunner.h"; then
AC_MSG_RESULT([$CXXTEST])
else
if test -e "/usr/include/cxxtest/TestRunner.h"; then
AC_MSG_RESULT([/usr/include])
else
AC_MSG_RESULT([not found])
AC_MSG_WARN([unit tests disabled, CxxTest headers not found.])
CXXTESTGEN=
CXXTEST=
fi
fi
fi
if test "$enable_unit_testing" = yes -a -z "$CXXTESTGEN"; then
AC_MSG_ERROR([--enable-unit-testing given but cxxtest not found.])
fi
AM_CONDITIONAL([HAVE_CXXTESTGEN], [test -n "$CXXTESTGEN"])
AC_ARG_VAR(TEST_CPPFLAGS, [CPPFLAGS to use when testing (default=$CPPFLAGS)])
AC_ARG_VAR(TEST_CXXFLAGS, [CXXFLAGS to use when testing (default=$CXXFLAGS)])
AC_ARG_VAR(TEST_LDFLAGS, [LDFLAGS to use when testing (default=$LDFLAGS)])
AC_ARG_VAR(PERL, [PERL interpreter (used when testing)])
if test -n "$CXXTEST"; then
if test -z "$PERL"; then
AC_CHECK_PROGS(PERL, perl, perl, [])
else
AC_CHECK_PROG(PERL, "$PERL", "$PERL", [])
fi
if test -z "$PERL"; then
AC_MSG_WARN([unit tests disabled, perl not found.])
CXXTESTGEN=
CXXTEST=
fi
fi
AC_ARG_VAR(PYTHON, [PYTHON interpreter (used for building legacy Java library interface)])
if test -z "$PYTHON"; then
AC_CHECK_PROGS(PYTHON, python, python, [])
else
AC_CHECK_PROG(PYTHON, "$PYTHON", "$PYTHON", [])
fi
if test -z "$PYTHON"; then
AC_MSG_WARN([python not found, cannot build libcvc4compat_java (the legacy Java interface).])
CXXTESTGEN=
CXXTEST=
fi
# Checks for libraries.
AC_SEARCH_LIBS([clock_gettime], [rt],
[AC_DEFINE([HAVE_CLOCK_GETTIME], [1],
[Defined to 1 if clock_gettime() is supported by the platform.])],
[AC_LIBOBJ([clock_gettime])])
AC_CHECK_FUNC([strtok_r], [AC_DEFINE([HAVE_STRTOK_R], [1],
[Defined to 1 if strtok_r() is supported by the platform.])],
[AC_LIBOBJ([strtok_r])])
AC_CHECK_FUNC([ffs], [AC_DEFINE([HAVE_FFS], [1],
[Defined to 1 if ffs() is supported by the platform.])],
[AC_LIBOBJ([ffs])])
# Check for antlr C++ runtime (defined in config/antlr.m4)
AC_LIB_ANTLR
# Check for user preferences for language bindings to build, and for
# build support. The arg list is the default set if unspecified by
# the user (the actual built set is the subset that appears to be
# supported by the build host).
CVC4_CHECK_BINDINGS([c java])dnl csharp perl php python ruby tcl ocaml])