aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
blob: 4474d404619301b66a55dde0f8fed8bd9665f07b (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(potd, 1.0, matzeton@googlemail.com)
AC_CONFIG_HEADERS([src/config.h])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_CC_STDC

AC_TYPE_SIZE_T

AC_CHECK_LIB(socket, connect)
AC_CHECK_LIB(pthread, pthread_create)

PKG_CHECK_MODULES([libssh], [libssh >= 0.7.3])
AC_SUBST([libssh_CFLAGS])
AC_SUBST([libssh_LIBS])

dnl Check for header files that do not exist on all platforms
AC_CHECK_HEADERS([libutil.h pthread.h pty.h strings.h syslog.h sys/prctl.h \
                  sys/uio.h util.h])

dnl Most systems require linking against libutil.so in order to get login_tty()
AC_CHECK_FUNCS(login_tty, [],
               [AC_CHECK_LIB(util, login_tty,
               [LIBS="-lutil $LIBS"
                AC_DEFINE(HAVE_LOGIN_TTY)])])

AC_OUTPUT(Makefile src/Makefile)