dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/comm.h)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(psmisc,20.2)


dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP

dnl Checks for libraries.
AC_CHECK_LIB(ncurses, tgetent, TERMCAP_LIB=-lncurses,
  AC_CHECK_LIB(termcap, tgetent, TERMCAP_LIB=-ltermcap, 
    AC_MSG_ERROR(Cannot find ncurses or termcap libraries) ) )
AC_SUBST(TERMCAP_LIB)

dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h unistd.h termcap.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_ST_RDEV
AC_TYPE_UID_T

dnl Check for language stuff
ALL_LINGUAS="en"
AM_GNU_GETTEXT

dnl Checks for library functions.
AC_CHECK_FUNCS(strdup strerror strtoul)

AC_OUTPUT(Makefile doc/Makefile src/Makefile intl/Makefile po/Makefile.in)
