forked from kalamara/plcemu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
74 lines (56 loc) · 1.78 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
72
73
74
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT(plcemu, 2.2, [email protected])
AM_INIT_AUTOMAKE
AM_INIT_AUTOMAKE([subdir-objects])
AC_CONFIG_SRCDIR([src/plcemu.c])
# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
# Checks for libraries.
LT_INIT
# Checks for libraries.
# a function in `-lm':
AC_CHECK_LIB(m, floor)
# a function in `-lcomedi':
AC_CHECK_LIB(comedi, comedi_close)
# a function in `-lyaml':
AC_CHECK_LIB(yaml, yaml_parser_initialize)
# a function in `-lpthread':
AC_CHECK_LIB(pthread, pthread_create)
# a function in `-lzmq':
AC_CHECK_LIB(zmq, zmq_socket)
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h pthread.h yaml.h comedi.h zmq.h])
# Checks for typedefs, structures, and compiler characteristics.
#AC_CHECK_HEADER_STDBOOL
# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([gettimeofday memset strchr strdup strrchr])
AC_ARG_ENABLE([sim],
[ --enable-sim simulated hardware],
[case "${enableval}" in
yes) sim=true ;;
no) sim=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-sim]) ;;
esac],[sim=true])
AM_CONDITIONAL([SIMULATION], [test x$sim = xtrue])
AC_ARG_ENABLE([comedi],
[ --enable-comedi comedi hw drivers],
[case "${enableval}" in
yes) comedi=true ;;
no) comedi=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-comedi]) ;;
esac],[comedi=false])
AM_CONDITIONAL([COMEDI], [test x$comedi = xtrue])
AC_ARG_ENABLE([ui],
[ --enable-ui user interface],
[case "${enableval}" in
yes) ui=true ;;
no) ui=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-ui]) ;;
esac],[ui=false])
AM_CONDITIONAL([UI], [test x$ui = xtrue])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT