AC_INIT(src/edit.c)
AM_INIT_AUTOMAKE(Editor, 2.4)

AC_PROG_CC
AC_PROG_INSTALL
  
AC_MINIX
AC_ISC_POSIX

AC_PROG_RANLIB
AC_PROG_CXX

AC_HEADER_STDC
AC_HEADER_DIRENT

AC_PATH_XTRA

builtin(include, offix.m4)dnl

OFFIX_CHECK_DND

AC_CHECK_LIB(Xpm,main,[AC_DEFINE(XPM) X_PRE_LIBS="-lXpm $X_PRE_LIBS"],,$X_LIBS -lX11 $X_EXTRA_LIBS)

dnl -------  path for xpm
AC_ARG_WITH(xpm-inc,
    [  ]--with-xpm-inc=value    where to find xpm include,
    [AC_DEFINE(XPM) X_CFLAGS="$X_CFLAGS -I$withval"],)
AC_ARG_WITH(xpm-lib,
    [  ]--with-xpm-lib=value    where to find xpm library,
    [X_PRE_LIBS="-lXpm $X_PRE_LIBS" LDFLAGS="$LDFLAGS -L$withval"],)

dnl -------  use package mutekeys in Editor
AC_ARG_WITH(mutekeys,
    [  ]--with-mutekeys         accents in a typewriter-like manner,
    if test "$withval" = yes; then 
	  AC_DEFINE(MUTEKEYS)
    fi,
	AC_DEFINE(MUTEKEYS))

dnl -------  strchr
AC_CHECK_FUNCS(strchr)


AC_OUTPUT(Makefile src/Makefile libit/Makefile) 


