-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconfigure.ac
More file actions
44 lines (37 loc) · 1.06 KB
/
configure.ac
File metadata and controls
44 lines (37 loc) · 1.06 KB
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
AC_INIT(bip39c, 1.2.0, david@ciwise.com)
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_PROG_CC
AM_PROG_CC_C_O
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile src/Makefile])
# Custom Define
MY_CFLAGS="-O2 -Iinclude -I/usr/local/opt/openssl/include -std=gnu99"
AC_CHECK_LIB(pthread, pthread_spin_trylock)
AC_CHECK_LIB(rt,pthread_attr_setdetachstate)
AC_CHECK_LIB(m,exp)
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
# Checks for typedefs and compiler characteristics.
AC_C_BIGENDIAN
AC_TYPE_UID_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_CHECK_HEADERS(unistd.h fcntl.h strings.h pthread.h)
AC_MSG_CHECKING(for usleep)
AH_TEMPLATE(HAVE_USLEEP)
AC_EGREP_HEADER(usleep, unistd.h, is_usleep=yes, is_usleep=no)
if test $is_usleep = yes; then
AC_DEFINE(HAVE_USLEEP)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
# Set localized define flags enable verbosity Define
AC_ARG_ENABLE([verbosity],[ --enable-verbosity Enable message verbosity])
if test "x$enable_verbosity" = xyes; then
MY_CFLAGS+=" -DVERBOSITY"
fi
AC_SUBST(MY_CFLAGS)
AC_OUTPUT