blob: 245d8902d0550af227cdbfcb5065d748e46e4ab1 [file] [log] [blame] [raw]
AC_PREREQ(2.59)
AC_INIT([kme],[2.1.0],[kme-misc@lists.sourceforge.net])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([asciiz.c])
AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CC
# Checks for libraries.
AC_CHECK_LIB(elf, nlist)
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, gethostbyname)
AC_CHECK_LIB(dl, dlopen)
AC_CHECK_LIB(ncurses, initscr)
case "$LIBS" in
*ncurses*);;
*) AC_CHECK_LIB(curses, initscr);;
esac
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h elf.h fcntl.h getopt.h inttypes.h libelf.h libelf/libelf.h libelf/nlist.h malloc.h nlist.h netdb.h netinet/in.h nlist.h stdlib.h string.h strings.h stropts.h sys/ksym.h sys/ptrace.h sys/socket.h sys/time.h termio.h termios.h unistd.h sys/ioctl.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_CHECK_TYPES([unsigned long long, uintmax_t])
# Checks for library functions.
AC_FUNC_FORK
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_CHECK_FUNCS([alarm getksym gethostbyname gettimeofday isascii memset munmap nlist ptrace select socket strchr strstr strtoul])
AC_CHECK_FILE([/proc/ksyms], AC_DEFINE([HAVE_PROC_KSYMS], 1, "/proc/ksyms exists"))
AC_CHECK_FILE([/dev/ksyms], AC_DEFINE([HAVE_DEV_KSYMS], 1, "/dev/ksyms exists"))
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
AC_OUTPUT