forked from ThomasHabets/openssl-tpm-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
57 lines (47 loc) · 1.42 KB
/
configure.in
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
#
# configure.in for the OpenSSL TPM engine project
#
AC_INIT(openssl-tpm-engine, 0.4.2, [email protected])
AM_INIT_AUTOMAKE(1.6.3)
# Debugging support
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug], [turn on all debugging flags [default is off]]),
[enable_debug="yes"
AC_MSG_RESULT([*** Enabling debugging at user request ***])],)
# If the user has not set CFLAGS, do something appropriate
test_CFLAGS=${CFLAGS+set}
if test "$test_CFLAGS" != set; then
if test "x$enable_debug" == "xyes"; then
CFLAGS="-O0 -g -DDEBUG"
else
CFLAGS="-O2"
fi
fi
#if test "${OPENSSL_LIB_DIR+set}" != set; then
# OPENSSL_LIB_DIR="/usr/local/ssl/lib"
#fi
#if test "${OPENSSL_INCLUDE_DIR+set}" != set; then
# OPENSSL_INCLUDE_DIR="/usr/local/ssl/include"
#fi
# Non-standard OpenSSL
AC_MSG_CHECKING([Non-standard OpenSSL])
AC_ARG_WITH(openssl,
[--with-openssl=PATH Location of openssl libs/includes],
[OPENSSL_INCLUDE_DIR="$withval/include"
OPENSSL_LIB_DIR="$withval/lib"
if [[ ! -d $OPENSSL_INCLUDE_DIR -o ! -d $OPENSSL_LIB_DIR ]]; then
AC_MSG_ERROR([$OPENSSL_INCLUDE_DIR or $OPENSSL_LIB_DIR doen't exist!])
else
AC_MSG_RESULT([yes])
CFLAGS="$CFLAGS -L$OPENSSL_LIB_DIR -I$OPENSSL_INCLUDE_DIR"
fi],
[AC_MSG_RESULT([no])
AC_SUBST(OPENSSL_LIB_DIR)
AC_SUBST(OPENSSL_INCLUDE_DIR)])
AC_DISABLE_STATIC
AC_PROG_CC
AC_PROG_LIBTOOL
CFLAGS="$CFLAGS -Wall"
AC_SUBST(CFLAGS)
AC_OUTPUT(Makefile test/Makefile)
echo "CFLAGS=$CFLAGS"