-
Notifications
You must be signed in to change notification settings - Fork 7
/
configure.ac
67 lines (58 loc) · 1.97 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
AC_INIT([ora], [0.0.3],
[http://github.com/bloq/ora/])
AC_PREREQ(2.60)
AC_CONFIG_SRCDIR([src/sandbox.cc])
AM_INIT_AUTOMAKE([gnu])
AC_CONFIG_HEADERS([ora-config.h])
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXXCPP
AC_PROG_INSTALL
AC_PROG_OBJC
AC_PROG_LN_S
AC_PROG_MKDIR_P
AC_PROG_SED
AM_PROG_AS
AC_PATH_TOOL(AR, ar)
AC_PATH_TOOL(RANLIB, ranlib)
AC_PATH_TOOL(STRIP, strip)
AC_CHECK_PROG(MOX_AS, moxiebox-as, moxiebox-as, no)
AC_CHECK_PROG(MOX_AR, moxiebox-ar, moxiebox-ar, no)
AC_CHECK_PROG(MOX_GCC, moxiebox-gcc, moxiebox-gcc, no)
PKG_PROG_PKG_CONFIG
if test x"$MOX_AR" = x"no"; then
AC_MSG_ERROR([moxiebox-ar is required to build this package])
fi
if test x"$MOX_AS" = x"no"; then
AC_MSG_ERROR([moxiebox-as is required to build this package])
fi
if test x"$MOX_GCC" = x"no"; then
AC_MSG_ERROR([moxiebox-gcc is required to build this package])
fi
AC_LANG_PUSH([C++])
AC_CHECK_LIB(elf, elf_getphdrnum, ELF_LIBS=-lelf,AC_MSG_ERROR([Libelf is required to build this package!]))
AC_CHECK_LIB(crypto, SHA256_Update, CRYPTO_LIBS=-lcrypto,AC_MSG_ERROR([Libcrypto is required to build this package!]))
AC_CHECK_LIB(ssl, SSL_new, SSL_LIBS=-lssl,AC_MSG_ERROR([Libssl is required to build this package!]))
AC_CHECK_LIB(event_core, event_base_new, EVENT_LIBS=-levent_core,AC_MSG_ERROR([libevent is required to build this package!]))
AC_CHECK_LIB(event_extra, evhttp_new, EVENT_LIBS="$EVENT_LIBS -levent_extra",AC_MSG_ERROR([libevent_extra is required to build this package!]))
AC_CHECK_LIB(event_openssl, bufferevent_openssl_filter_new, EVENT_LIBS="$EVENT_LIBS -levent_openssl",AC_MSG_ERROR([libevent_openssl is required to build this package!]))
# TODO: improve
UNIVALUE_LIBS="-lunivalue"
PROTOBUF_LIBS="-lprotobuf"
AC_SUBST(ELF_LIBS)
AC_SUBST(CRYPTO_LIBS)
AC_SUBST(SSL_LIBS)
AC_SUBST(EVENT_LIBS)
AC_SUBST(UNIVALUE_LIBS)
AC_SUBST(PROTOBUF_LIBS)
AC_SUBST(MOX_AS)
AC_SUBST(MOX_AR)
AC_SUBST(MOX_GCC)
AC_CONFIG_FILES([
Makefile
lib/Makefile
runtime/Makefile
src/Makefile
tests/Makefile])
AC_OUTPUT