| dnl Process this file with autoconf to produce a configure script. |
| AC_INIT(kme.c) |
| AM_INIT_AUTOMAKE(kme, 2.0.0) |
| |
| dnl AM_PROG_LIBTOOL |
| AM_CONFIG_HEADER(config.h) |
| |
| dnl Checks for programs. |
| AC_PROG_CC |
| AC_PROG_MAKE_SET |
| AC_PROG_INSTALL |
| |
| dnl 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 |
| |
| dnl Checks for header files. |
| AC_HEADER_STDC |
| AC_CHECK_HEADERS(libelf/nlist.h nlist.h elf.h getopt.h string.h strings.h fcntl.h stropts.h sys/ksym.h sys/ptrace.h sys/time.h stdlib.h termio.h unistd.h wait.h) |
| |
| dnl Checks for typedefs, structures, and compiler characteristics. |
| AC_TYPE_OFF_T |
| AC_HEADER_TIME |
| |
| dnl Checks for library functions. |
| AC_PROG_GCC_TRADITIONAL |
| AC_FUNC_MMAP |
| AC_TYPE_SIGNAL |
| AC_CHECK_FUNCS(getksym nlist ptrace select socket strtoul) |
| |
| dnl Test for miscellaneous files |
| test -r /proc/ksyms && AC_DEFINE(HAVE_PROC_KSYMS, 1, /proc/ksyms exists) |
| test -r /dev/ksyms && AC_DEFINE(HAVE_DEV_KSYMS, 1, /dev/ksyms exists) |
| |
| dnl Test for features we can't automatically configure |
| if test "$ac_cv_lib_dl_dlopen" = "yes"; then |
| if test $ac_cv_prog_gcc = yes; then |
| DYNAMIC="-rdynamic" |
| else |
| # Really should go into a per-OS case statement. Here, we just |
| # default to the OSR5/SVR4/SVR5 standard. |
| DYNAMIC="-Bexport" |
| fi |
| fi |
| |
| AC_SUBST(DYNAMIC) |
| |
| AC_OUTPUT(Makefile) |