commit | author | age
|
d7639a
|
1 |
# -*- Autoconf -*- |
SP |
2 |
# Process this file with autoconf to produce a configure script. |
|
3 |
|
aec47d
|
4 |
AC_PREREQ([2.67]) |
d7639a
|
5 |
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS]) |
SP |
6 |
AC_CONFIG_SRCDIR([config.h.in]) |
|
7 |
AC_CONFIG_HEADERS([config.h]) |
aec47d
|
8 |
AM_INIT_AUTOMAKE |
d7639a
|
9 |
# Checks for programs. |
SP |
10 |
AC_PROG_CC |
|
11 |
|
|
12 |
# Checks for libraries. |
aec47d
|
13 |
# FIXME: Replace `main' with a function in `-lconfuse': |
SP |
14 |
AC_CHECK_LIB([confuse], [cfg_parse]) |
|
15 |
# FIXME: Replace `main' with a function in `-lm': |
|
16 |
AC_CHECK_LIB([m], [pow]) |
c9884c
|
17 |
AC_CHECK_LIB([pthread], [pthread_create]) |
d7639a
|
18 |
|
SP |
19 |
# Checks for header files. |
aec47d
|
20 |
AC_CHECK_HEADERS([stdlib.h string.h]) |
d7639a
|
21 |
|
SP |
22 |
# Checks for typedefs, structures, and compiler characteristics. |
aec47d
|
23 |
AC_C_INLINE |
SP |
24 |
|
|
25 |
dnl Check if we have enable debug support. |
|
26 |
AC_MSG_CHECKING(whether to enable debugging) |
|
27 |
debug_default="yes" |
|
28 |
AC_ARG_ENABLE(debug, [ --enable-debug=[no/yes] turn on debugging |
|
29 |
[default=$debug_default]],, enable_debug=$debug_default) |
|
30 |
dnl Yes, shell scripts can be used |
|
31 |
if test "x$enable_debug" = "xyes"; then |
|
32 |
CFLAGS="-g -O2 -DDEBUG" |
|
33 |
AC_MSG_RESULT(yes) |
|
34 |
else |
|
35 |
CFLAGS="-O3 -ffast-math" |
|
36 |
AC_MSG_RESULT(no) |
|
37 |
fi |
d7639a
|
38 |
|
SP |
39 |
# Checks for library functions. |
|
40 |
AC_FUNC_MALLOC |
aec47d
|
41 |
AC_FUNC_REALLOC |
SP |
42 |
AC_CHECK_FUNCS([pow sqrt strndup]) |
d7639a
|
43 |
|
SP |
44 |
AC_CONFIG_FILES([Makefile |
|
45 |
src/Makefile |
|
46 |
test/Makefile]) |
|
47 |
AC_OUTPUT |