dnl Process this file with autoconf to produce a configure script. AC_INIT(bvi.c) AC_CONFIG_HEADER(config.h) AC_CANONICAL_HOST dnl On SunOS4 systems you have to use the /usr/5bin/cc compiler dnl to get the SYSV curses library: case "$host_os" in sunos4*) AC_MSG_RESULT("using /usr/5bin/cc") CC="/usr/5bin/cc" ;; *) AC_PROG_CC ;; esac dnl Some curses specials dnl Solaris needs for tputs 'putc(char)' instead of 'putc(int)' case "$host_os" in solaris*) CPPFLAGS="${CPPFLAGS} -D_MSE_INT_H" AC_DEFINE(NEED_PUTC_CHAR) ;; hpux9*) DEFS=${DEFS-"-DMINICURSES"} ;; esac dnl Checks for programs. AC_PROG_INSTALL dnl Check for typedefs AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(void *) AC_CHECK_TYPE(size_t, unsigned int) AC_CHECK_TYPE(off_t, int) AC_CHECK_TYPE(mode_t, u_short) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h termcap.h termio.h termios.h unistd.h) dnl Check if ncurses requested _cppflags="${CPPFLAGS}" _ldflags="${LDFLAGS}" AC_ARG_WITH(ncurses, [ --with-ncurses[=DIR] path to ncurses],[ if test "$withval" != "no"; then CPPFLAGS="${CPPFLAGS} -I$withval/include -I$withval/include/ncurses" LDFLAGS="${LDFLAGS} -L$withval/lib" fi ]) AC_CHECK_HEADER(ncurses.h, AC_CHECK_LIB(ncurses, initscr, AC_DEFINE(HAVE_NCURSES_H) LIBS="${LIBS} -lncurses", AC_CHECK_LIB(curses, initscr, AC_DEFINE(HAVE_CURSES_H) LIBS="${LIBS} -lcurses", AC_MSG_ERROR([bvi requires the curses library]))), AC_CHECK_HEADER(curses.h, AC_CHECK_LIB(curses, initscr, AC_DEFINE(HAVE_CURSES_H) LIBS="${LIBS} -lcurses", AC_MSG_ERROR([bvi requires the curses library])), AC_MSG_ERROR([bvi requires the curses library]))) dnl Checks for typedefs, structures, and compiler characteristics. dnl AC_TYPE_SIZE_T dnl Checks for library functions. dnl AC_TYPE_SIGNAL AC_CHECK_FUNCS(strdup strtol memmove) AC_EGREP_HEADER(sys_errlist, stdio.h, errl=ok, errl=no) AC_EGREP_HEADER(sys_errlist, errno.h, errl=ok,) AC_EGREP_HEADER(sys_errlist, sys/types.h, errl=ok,) if test $errl = no; then AC_DEFINE(NO_SYSERRL) fi AC_PROG_INSTALL AC_OUTPUT(Makefile)