#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.56)
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AM_INIT_AUTOMAKE(blokish,.92)
AC_CONFIG_SRCDIR([src/ai.cpp])
AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_MAKE_SET

AC_PATH_XTRA

# Checks for libraries.
AC_CHECK_LIB(GL, glLoadIdentity, , AC_CHECK_LIB(opengl32, main, , AC_MSG_ERROR(Not found.  Need OpenGL libraries.)))

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST

# Checks for library functions.
AC_CHECK_FUNCS([sqrt])

# Check for wxWidgets
vers=`wx-config --version | awk 'BEGIN { FS = "."; } { printf "% d", ($1 * 1000 + $2) * 1000 + $3;}'`
AC_MSG_CHECKING(for wxWidgets 2.6.0 or later)
if test "$vers" -lt 2006000; then
  AC_MSG_ERROR(no)
else
  AC_MSG_RESULT(yes)
fi

AC_CONFIG_FILES([makefile])
AC_OUTPUT
