File: configure.ac

package info (click to toggle)
erlang-p1-tls 1.1.13-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 468 kB
  • sloc: ansic: 2,386; erlang: 584; makefile: 32
file content (73 lines) | stat: -rw-r--r-- 1,933 bytes parent folder | download | duplicates (7)
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
68
69
70
71
72
73
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.53)
AC_PACKAGE_VERSION(1.0.10)
AC_INIT(tls, 1.0.10, [], [])

# Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET

if test "x$GCC" = "xyes"; then
    CFLAGS="$CFLAGS -Wall"
fi

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

# Checks for library functions.
AC_FUNC_MALLOC
AC_HEADER_STDC

# Checks Erlang runtime and compiler
AC_ERLANG_NEED_ERL
AC_ERLANG_NEED_ERLC

# Checks and sets ERLANG_ROOT_DIR and ERLANG_LIB_DIR variable
# AC_ERLANG_SUBST_ROOT_DIR
# AC_ERLANG_SUBST_LIB_DIR

AC_CHECK_LIB(ssl, SSL_free, [SSL_LIB=yes], [], [])
AC_CHECK_LIB(crypto, SHA1_Init, [CRYPTO_LIB=yes], [], [])
AC_CHECK_HEADER(openssl/ssl.h, [SSL_HEADER=yes], [], [])
AC_CHECK_HEADER(openssl/err.h, [ERR_HEADER=yes], [], [])
AC_CHECK_HEADER(openssl/sha.h, [SHA_HEADER=yes], [], [])
AC_CHECK_HEADER(openssl/opensslv.h, [OPENSSLV_HEADER=yes], [], [])

if test "x$SSL_LIB" = "x"; then
   AC_MSG_ERROR([OpenSSL 'ssl' library was not found])
fi

if test "x$CRYPTO_LIB" = "x"; then
   AC_MSG_ERROR([OpenSSL 'crypto' library was not found])
fi

if test "x$SSL_HEADER" = "x"; then
   AC_MSG_ERROR([OpenSSL header file "openssl/ssl.h" was not found])
fi

if test "x$ERR_HEADER" = "x"; then
   AC_MSG_ERROR([OpenSSL header file "openssl/err.h" was not found])
fi

if test "x$SHA_HEADER" = "x"; then
   AC_MSG_ERROR([OpenSSL header file "openssl/sha.h" was not found])
fi

if test "x$OPENSSLV_HEADER" = "x"; then
   AC_MSG_ERROR([OpenSSL header file "openssl/opensslv.h" was not found])
fi

AC_ARG_ENABLE(gcov,
[AC_HELP_STRING([--enable-gcov], [compile with gcov enabled (default: no)])],
[case "${enableval}" in
  yes) gcov=true ;;
  no)  gcov=false ;;
  *) AC_MSG_ERROR(bad value ${enableval} for --enable-gcov) ;;
esac],[gcov=false])

AC_SUBST(gcov)

AC_CONFIG_FILES([vars.config])
AC_OUTPUT