forked from HunterZ/pixelserv
-
Notifications
You must be signed in to change notification settings - Fork 23
/
configure.ac
35 lines (30 loc) · 873 Bytes
/
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
AC_INIT([pixelserv-tls], [2.0.0], [])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CANONICAL_HOST
AC_PROG_CC
AC_CONFIG_HEADERS([config.h])
AC_CHECK_LIB([dl], [dlopen], [], [])
AC_CHECK_LIB([rt], [clock_gettime], [], [])
AC_CHECK_LIB([pthread], [main], [],
AC_MSG_ERROR([libpthread not found]))
AC_CHECK_LIB([crypto], [EVP_EncryptInit], [],
AC_MSG_FAILURE([can't find openssl crypto lib]))
AC_CHECK_LIB([ssl], [SSL_CTX_new], [],
AC_MSG_FAILURE([can't find openssl ssl lib]))
AC_ARG_ENABLE([static], AS_HELP_STRING([--enable-static], [Build static binary]))
AS_IF([test "x$enable_static" = "xyes"], [
EXTRA_LDFLAGS="-static"
])
case "${host_os}" in
darwin*)
EXTRA_LDFLAGS+=" -Wl,-dead_strip"
;;
linux* | *)
EXTRA_LDFLAGS+=" -Wl,--gc-sections -s"
;;
esac
AC_SUBST([EXTRA_LDFLAGS])
AC_CONFIG_FILES([
Makefile
])
AC_OUTPUT