-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathconfigure.ac
84 lines (72 loc) · 2.47 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
75
76
77
78
79
80
81
82
83
84
AC_INIT([ser2net],[4.6.3],[[email protected]])
AM_INIT_AUTOMAKE([-Wall])
AC_PROG_CC
AM_PROG_AR
LT_INIT
use_pthreads=yes
use_pthreads_set=false
AC_ARG_WITH(pthreads,
[ --with-pthreads=yes|no Argument is ignore.],
AC_MSG_WARN([--with-pthreads is no longer used])
)
use_pam=check
AC_ARG_WITH(pam,
[ --with-pam=yes|no Support PAM authentication or not.],
if test "x$withval" = "xyes"; then
use_pam=yes
elif test "x$withval" = "xno"; then
use_pam=no
else
[AC_MSG_FAILURE([Unknown option to --with-pam, use yes or no])]
fi,
)
if test "$use_pam" != "no"; then
have_pam=yes
AC_CHECK_HEADER(security/pam_appl.h, [], [have_pam=no])
if test "$have_pam" = "yes"; then
AC_CHECK_LIB(pam, pam_start, [], [have_pam=no])
fi
if test "$use_pam" = "yes" -a "$have_pam" = "no"; then
AC_MSG_ERROR([Pam enabled, but no pam support found])
fi
use_pam=$have_pam
fi
if test "x$use_pam" != "xno"; then
LIBS="$LIBS -lpam"
AC_DEFINE([USE_PAM], [], [Enable PAM support])
fi
AC_ARG_WITH(sysfs-led-support,
[ --with-sysfs-led-support Enable LED support (Linux only)],
sysfs_led_support_flag="$withval",
sysfs_led_support_flag=check)
if test "x$sysfs_led_support_flag" = "xcheck"; then
case "$host_os" in
linux*) sysfs_led_support_flag=yes ;;
*) sysfs_led_support_flag=no ;;
esac
fi
if test "x$sysfs_led_support_flag" = "xyes"; then
AC_DEFINE(USE_SYSFS_LED_FEATURE)
fi
# enable silent build
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_MACRO_DIR([m4])
AC_CHECK_LIB(nsl,main)
AC_CHECK_HEADERS([wordexp.h])
AC_CHECK_FUNCS(wordexp)
AC_CHECK_HEADER(gensio/gensio.h, [],
[AC_MSG_ERROR([gensio.h not found, please install gensio dev package])])
AC_CHECK_LIB(gensio, str_to_gensio, [],
[AC_MSG_ERROR([libgensio won't link, please install gensio dev package])])
AC_CHECK_LIB(gensio, gensio_list_add_tail, [],
[AC_CHECK_LIB(gensioosh, gensio_list_add_tail, [],
[AC_MSG_ERROR([libgensioosh won't link, please install gensio dev package])])])
AC_CHECK_LIB(gensio, gensio_alloc_mdns, [],
[AC_CHECK_LIB(gensiomdns, gensio_alloc_mdns, [],
[AC_MSG_ERROR([libgensiomdns won't link, please install gensio dev package])])])
AC_CHECK_HEADER(yaml.h, [],
[AC_MSG_ERROR([yaml.h not found, please install libyaml dev package])])
AC_CHECK_LIB(yaml, yaml_document_initialize, [],
[AC_MSG_ERROR([libyaml won't link, please install libyaml dev package])])
AC_CONFIG_FILES([Makefile tests/Makefile])
AC_OUTPUT