dnl
dnl This file was generated by glueforge 1.04
dnl
dnl Do NOT directly edit this file.
dnl

AC_PREREQ(2.61)

AC_INIT([ippdb], [1.1.39], [pan-starrs.ifa.hawaii.edu])
AC_CONFIG_SRCDIR([ippdb.pc.in])

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

AC_CONFIG_TESTDIR([tests])
AC_CONFIG_FILES([tests/Makefile])
AM_MISSING_PROG([AUTOM4TE], [autom4te])

AC_LANG(C)
AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_LIBTOOL

PKG_CHECK_MODULES([PSLIB], [pslib >= 0.9.0]) 
 
dnl check to make sure that pslib declares HAVE_PSDB
TMP_CFLAGS=${CFLAGS}
CFLAGS="${CFLAGS=} ${PSLIB_CFLAGS}"

AC_MSG_CHECKING([pslib's psDB support])
AC_RUN_IFELSE(
  [AC_LANG_PROGRAM([], [dnl
#ifndef HAVE_PSDB
    return 1;
#endif])],
  [AC_MSG_RESULT([yes])],
  [AC_MSG_FAILURE([pslib was built without psDB support (HAVE_PSDB)])])

CFLAGS=${TMP_CFLAGS}


AC_PATH_PROG([PERL], [perl], [missing])
if test "$PERL" = "missing" ; then
  AC_MSG_ERROR([perl is required])
fi

AC_PATH_PROG([DOXYGEN], [doxygen], [])
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])

dnl is this the best was to setup recursive CFLAGS?
IPP_STDOPTS
dnl -Werror causes problems on OSX as inttypes.h uses some non standard C types
ippdb_CFLAGS="-Wall -pedantic -fno-strict-aliasing"
AC_SUBST([ippdb_CFLAGS])

AC_CONFIG_FILES([
  Makefile
  src/Makefile
  ippdb.pc
  Doxyfile
])
AC_OUTPUT
