dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)

AC_INIT([pois], [0.1.1], [ipp-support@ifa.hawaii.edu])
AC_CONFIG_SRCDIR([autogen.sh])

AM_INIT_AUTOMAKE([1.6 foreign dist-bzip2])
AM_CONFIG_HEADER([src/config.h])
AM_MAINTAINER_MODE

IPP_STDCFLAGS

AC_LANG(C)
AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_SYS_LARGEFILE

PKG_CHECK_MODULES([PSLIB], [pslib >= 1.0.0])

AC_C_BIGENDIAN([PS_BIGENDIAN=1],[PS_BIGENDIAN=0])

dnl AC_PROG_SWIG(1.3.24)
dnl SWIG_MULTI_MODULE_SUPPORT
dnl SWIG_PYTHON

dnl lifted from autoconf 2.59's configure.ac
AC_PATH_PROG([PERL], perl, no)
AC_SUBST([PERL])
if test "$PERL" = no; then
  AC_MSG_ERROR([perl is not found])
fi
$PERL -e 'require 5.005_03;' || {
   AC_MSG_ERROR([Perl 5.005_03 or better is required])
}

dnl Set CFLAGS for build
IPP_STDOPTS
CFLAGS="${CFLAGS=} -Wall -Werror"

AC_CONFIG_FILES([
  Makefile
  src/Makefile
])
dnl swig/Makefile
dnl python/Makefile

AC_OUTPUT
