1 dnl *******************************************
2 dnl *** Initialize automake and set version ***
3 dnl *******************************************
6 AC_INIT(satsolver, 0.0.1)
7 AC_CONFIG_SRCDIR(src/solver.c)
8 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
10 AM_CONFIG_HEADER(config.h)
13 dnl ***************************
14 dnl *** Set debugging flags ***
15 dnl ***************************
20 # Declare --enable-* args and collect ac_help strings
22 [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,
23 enable_debug=$debug_default)
26 if test "x$enable_debug" = "xyes"; then
27 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
31 AC_CHECK_TYPE(ssize_t, int)
33 dnl ***************************
34 dnl *** Checks for programs ***
35 dnl ***************************
45 # Turn off the shared solver library until we have a stable API
51 # This isn't a program, but it doesn't fit anywhere else...
56 dnl ***********************
57 dnl *** expat and db43 ***
58 dnl ***********************
60 AC_CHECK_LIB([expat], [XML_ParserCreate], [], [AC_MSG_ERROR(Please install expat)])
62 AC_CHECK_LIB([db-4.3], [db_create], [], [AC_MSG_ERROR(Please install db43-devel)])
64 dnl ***********************
65 dnl *** Check for Win32 ***
66 dnl ***********************
68 AC_MSG_CHECKING([for Win32])
72 AC_CACHE_VAL(ac_cv_func_getaddrinfo, [ac_cv_func_getaddrinfo=yes])
73 AC_CACHE_VAL(ac_cv_func_getnameinfo, [ac_cv_func_getnameinfo=yes])
74 AC_CACHE_VAL(ac_cv_func_inet_pton, [ac_cv_func_inet_pton=yes])
75 AC_CACHE_VAL(ac_cv_func_inet_ntop, [ac_cv_func_inet_ntop=yes])
76 AC_CACHE_VAL(soup_cv_ipv6, [soup_cv_ipv6=yes])
82 AC_MSG_RESULT([$os_win32])
83 AM_CONDITIONAL(OS_WIN32, [test $os_win32 = yes])
85 dnl *******************
86 dnl *** Misc checks ***
87 dnl *******************
88 AC_CHECK_FUNCS(gmtime_r)
89 dnl ----------------------------------------------------------------------
90 AC_CHECK_HEADERS([inttypes.h stdlib.h])
92 AC_CHECK_SIZEOF(short)
95 AC_CHECK_SIZEOF(long long)
96 SIZEOF_SHORT=$ac_cv_sizeof_short
97 SIZEOF_INT=$ac_cv_sizeof_int
98 SIZEOF_LONG=$ac_cv_sizeof_long
99 SIZEOF_LONG_LONG=$ac_cv_sizeof_long_long
100 AC_SUBST(SIZEOF_SHORT)
102 AC_SUBST(SIZEOF_LONG)
103 AC_SUBST(SIZEOF_LONG_LONG)
105 if test "$prefix" = "NONE"; then
106 prefix=$ac_default_prefix;
109 dnl *************************************
110 dnl *** Warnings to show if using GCC ***
111 dnl *************************************
113 AC_ARG_ENABLE(more-warnings,
114 [ --disable-more-warnings Inhibit compiler warnings],
115 set_more_warnings=no)
117 if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
119 -Wall -Wstrict-prototypes -Wmissing-declarations \
120 -Wmissing-prototypes -Wnested-externs -Wpointer-arith \
124 if test "$os_win32" != yes; then
125 # Use reentrant functions (FIXME!)
126 CFLAGS="$CFLAGS -D_REENTRANT"
129 dnl *************************
130 dnl *** Output Everything ***
131 dnl *************************