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)