This repository was archived by the owner on Apr 2, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
72 lines (57 loc) · 1.62 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
67
68
69
70
71
AC_INIT([wq], [1.0.0])
AC_PREREQ([2.67])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl Workaround for Automake 1.12
AC_PROG_CC
AC_PROG_LIBTOOL
AC_CACHE_VAL(lt_cv_deplibs_check_method,
[lt_cv_deplibs_check_method=pass_all])
MINGW32=no
DARWIN=no
case "${host_os}" in
*mingw32* )
MINGW32=yes
;;
darwin* )
DARWIN=yes
;;
esac
AM_CONDITIONAL(MINGW, [test "x$MINGW32" = "xyes"])
AC_CHECK_LIB([pthread], [pthread_create],,
AC_MSG_ERROR([*** Please install libpthread on your system ***]))
dnl check libraries
if test "x$MINGW32" = "xyes"; then
AC_LIBTOOL_WIN32_DLL
else
if test "x$DARWIN" != "xyes"; then
AC_CHECK_LIB([rt], [clock_gettime],,
AC_MSG_ERROR([*** Please install librt on your system ***]))
fi
fi
AM_CONDITIONAL(WQ_ENABLE_DOC, false)
ac_enable_examples=yes
AC_ARG_ENABLE(examples,
AS_HELP_STRING([--disable-examples], [Disable examples]),
[ ac_enable_examples=$enableval ], [ ac_enable_examples=yes] )
AM_CONDITIONAL(WQ_ENABLE_EXAMPLES, [test "x${ac_enable_examples}" != "xno"])
dnl Debug version
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[enable debugging, default: no]),
[case "${enableval}" in
yes) debug=true ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],
[debug=false])
AM_CONDITIONAL(WQ_ENABLE_DEBUG, test x"$debug" = x"true")
AC_SUBST([WQ_SO_VERSION], [1:0:1])
AC_OUTPUT([
Makefile
src/Makefile
doc/Makefile
examples/Makefile
])
AC_OUTPUT