-
Notifications
You must be signed in to change notification settings - Fork 12
/
configure.ac
68 lines (53 loc) · 1.55 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
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
# change version number here and below in LIB_*, following the rules in:
#
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
#
# (Ignore the warning on that page against making them the same -- make them the
# same; this package is all about the library, and it makes no sense to use
# e.g. semantic versioning here.)
#
AC_INIT([librabinpoly], [0.12.0])
AC_CONFIG_SRCDIR([src/rabinpoly.c])
AC_CONFIG_HEADER([config.h])
# http://www.freesoftwaremagazine.com/articles/building_shared_libraries_once_using_autotools
LIB_CURRENT=0
LIB_REVISION=12
LIB_AGE=0
AC_SUBST(LIB_CURRENT)
AC_SUBST(LIB_REVISION)
AC_SUBST(LIB_AGE)
AC_SUBST(VERSION)
# Checks for programs.
AC_PROG_CXX
AC_PROG_AWK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_MKDIR_P
LT_INIT
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h openssl/md5.h])
AC_SEARCH_LIBS([MD5_Update], [crypto])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([bzero])
AC_CONFIG_FILES([Makefile
python/Makefile
src/Makefile
examples/Makefile
test/Makefile])
AC_MSG_CHECKING(whether compiler understands -Wall)
old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
AC_TRY_COMPILE([],[],
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)
CFLAGS="$old_CFLAGS")
AM_INIT_AUTOMAKE
AC_OUTPUT