dnl Copyright (C) 1999, 2002, 2003, 2004, 2005 Free Software Foundation,
dnl Inc.
dnl
dnl This file is part of GNU libmatheval
dnl
dnl GNU libmatheval is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU General Public License as
dnl published by the Free Software Foundation; either version 2, or (at
dnl your option) any later version.
dnl
dnl GNU libmatheval is distributed in the hope that it will be useful, 
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with program; see the file COPYING. If not, write to the Free
dnl Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.

dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)
AC_INIT([libmatheval],[1.1.2],[asamardzic@matf.bg.ac.yu])
AC_CONFIG_AUX_DIR([config])
AC_SUBST([ac_aux_dir])
AM_INIT_AUTOMAKE([libmatheval], [1.1.2])
AC_CONFIG_SRCDIR([configure.in])
AM_CONFIG_HEADER([config.h])

dnl Initialize the test suite.
AC_CONFIG_TESTDIR([tests])
AC_CONFIG_FILES([tests/matheval.sh], [chmod +x tests/matheval.sh])
AC_CONFIG_FILES([tests/Makefile])

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AM_PROG_LEX
AC_PROG_LN_S
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
AC_PROG_YACC
AM_MISSING_PROG([AUTOM4TE], [autom4te])
GUILE_FLAGS

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([math.h strings.h stddef.h])
AC_CREATE_STDINT_H

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T

dnl Checks for library functions.
AC_CHECK_FUNCS([bzero memset], [break])

dnl Additional Guile feature checks.
AC_CHECK_TYPE([scm_t_bits], [AC_DEFINE([HAVE_SCM_T_BITS], [1], [Define to 1 if you have the `scm_t_bits' type.])], [], [#include <libguile.h>])
AC_CHECK_LIB([guile], [scm_c_define_gsubr], [AC_DEFINE([HAVE_SCM_C_DEFINE_GSUBR], [1], [Define to 1 if you have the `scm_c_define_gsubr' function.])])
AC_CHECK_LIB([guile], [scm_make_gsubr], [AC_DEFINE([HAVE_SCM_MAKE_GSUBR], [1], [Define to 1 if you have the `scm_make_gsubr' function.])])
AC_CHECK_LIB([guile], [scm_num2dbl], [AC_DEFINE([HAVE_SCM_NUM2DBL], [1], [Define to 1 if you have the `scm_num2dbl' function.])])

AC_CONFIG_FILES([Makefile doc/Makefile lib/Makefile])
AC_OUTPUT
