work on exprs, driver, util
[cvc5.git] / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.63])
5 AC_INIT([src/include/cvc4.h])
6 AC_CONFIG_AUX_DIR([config])
7 #AC_CONFIG_LIBOBJ_DIR([lib])
8 AC_CONFIG_MACRO_DIR([config])
9 AM_INIT_AUTOMAKE(cvc4, prerelease)
10 AC_CONFIG_HEADERS([config.h])
11 LT_INIT
12
13 AC_LIBTOOL_WIN32_DLL
14
15 # Features requested by the user
16 AC_MSG_CHECKING([whether to do a debug build of CVC4])
17 AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug] ,[do a debug build of CVC4])])
18 if test -z "${enable_debug+set}"; then
19 enable_debug=no
20 fi
21 AC_MSG_RESULT([$enable_debug])
22
23 AC_MSG_CHECKING([whether to include assertions in build])
24 AC_ARG_ENABLE([assertions], [AS_HELP_STRING([--disable-assertions],[turn off assertions in build])])
25 if test -z "${enable_assertions+set}"; then
26 enable_assertions=yes
27 fi
28 AC_MSG_RESULT([$enable_assertions])
29
30 if test "$enable_assertions" = no -a "$enable_debug" = yes; then
31 AC_MSG_FAILURE([when debugging is on, so must assertions be.])
32 fi
33
34 # Checks for programs.
35 AC_PROG_CC
36 AC_PROG_CXX
37 AC_PROG_INSTALL
38 AC_PROG_LIBTOOL
39 AM_PROG_LEX
40 AC_PROG_YACC
41
42 AC_CHECK_PROG(DOXYGEN, doxygen, doxygen, [])
43 if test -z "$DOXYGEN"; then
44 AC_MSG_WARN([documentation targets require doxygen. Set your PATH appropriately or set DOXYGEN to point to a valid doxygen binary.])
45 fi
46
47 # Checks for libraries.
48 AC_CHECK_LIB(gmp, __gmpz_init, , [AC_MSG_ERROR([GNU MP not found, see http://gmplib.org/])])
49
50 # Checks for header files.
51 AC_CHECK_HEADERS([getopt.h unistd.h])
52
53 # Checks for typedefs, structures, and compiler characteristics.
54 AC_HEADER_STDBOOL
55 AC_TYPE_UINT16_T
56 AC_TYPE_UINT32_T
57 AC_TYPE_UINT64_T
58 AC_TYPE_SIZE_T
59
60 # Checks for library functions.
61
62 # Some definitions for config.h
63 if test "$enable_debug" = yes; then
64 AC_DEFINE([CVC4_DEBUG], [], [Whether or not to include debugging code.])
65 fi
66
67 if test "$enable_assertions" = yes; then
68 AC_DEFINE([CVC4_ASSERTIONS], [], [Whether or not assertions are enabled.])
69 fi
70
71 # Prepare configure output
72
73 AC_CONFIG_FILES([
74 Makefile
75 contrib/Makefile
76 doc/Makefile
77 src/Makefile
78 src/expr/Makefile
79 src/smt/Makefile
80 src/main/Makefile
81 src/prop/minisat/Makefile
82 src/prop/Makefile
83 src/util/Makefile
84 src/context/Makefile
85 src/parser/Makefile
86 src/theory/Makefile
87 ])
88
89 AC_OUTPUT
90
91 # Final information to the user
92 debug=debug
93 if test "$enable_debug" = no; then
94 debug=non-debug
95 fi
96 withassertions=with
97 if test "$enable_assertions" = no; then
98 withassertions=without
99 fi
100
101 cat <<EOF
102
103 CVC4 $VERSION will be built as a $debug build $withassertions assertions.
104
105 Now just type make, followed by make check or make install, as you like.
106
107 EOF