dnl AUTOCONF configuration for regex
dnl Bruno Haible 18.4.1995
dnl Sam Steingold 2003-07-28

AC_PREREQ(2.57)
AC_INIT(regexp, 1.0, clisp-list)
AC_CONFIG_SRCDIR(regexp.lisp)
AC_CONFIG_HEADERS(config.h)

AC_MSG_NOTICE([* Regexp (Checks)])
AC_PROG_CC
AC_PROG_CPP
AC_AIX
RL_VOID
AC_HEADER_STDC
CL_STDC_HEADERS
AC_FUNC_ALLOCA
AC_CHECK_HEADERS(regex.h string.h sys/types.h)
AC_CHECK_FUNCS(regcomp regexec regfree regerror)
# can we use the system-wide regex implementation?
if test "$ac_cv_header_regex_h" = yes -a "$ac_cv_func_regcomp" = yes -a "$ac_cv_func_regexec" = yes -a "$ac_cv_func_regfree" = yes -a "$ac_cv_func_regerror" = yes ; then
  REGEX_H=""
  REGEX_O=""
else
  REGEX_H="regex.h"
  REGEX_O="regex.o"
fi
AC_SUBST(REGEX_O)
AC_SUBST(REGEX_H)
AC_MSG_NOTICE([* Regexp (Output)])
AC_CONFIG_FILES(Makefile link.sh)
AC_OUTPUT

AC_MSG_NOTICE([* Regexp (Done)])
