summaryrefslogtreecommitdiff
path: root/configure.in
blob: 7b9f3b0310731f94ec9fd2227565ee0b0832961d (plain)
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
AC_INIT(module/cryptoki-log.c)
AM_INIT_AUTOMAKE(cryptoki-log, 0.2)

AC_CONFIG_HEADERS(config.h)
AM_PROG_LIBTOOL

# Debug mode
AC_ARG_ENABLE(debug,
		AC_HELP_STRING([--enable-debug],
		[Compile binaries in debug mode]))

if test "$enable_debug" = "yes"; then
  CFLAGS="$CFLAGS -g -O0 -Wall -Werror"
  AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode])
  echo "enabling debug compile mode"
else
  dnl AC_DEFINE_UNQUOTED(G_DISABLE_ASSERT, 1, [Disable glib assertions])
  echo "disabling debug compile mode"
fi

AC_CHECK_LIB(dl, dlopen, , [echo "ERROR: libdl not found."; exit 1])

# TODO: We don't need this once we switch to glib
dnl ACX_PTHREAD( , [echo "ERROR: Pthread support not found."; exit 1] )
dnl LIBS="$PTHREAD_LIBS $LIBS"
dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"

AC_OUTPUT([Makefile pkcs11/Makefile module/Makefile])