dnl Process this file with autoconf to produce a configure script.
AC_INIT(Makefile.am)

AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE(dia2code,0.8.3)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB

PKG_PROG_PKG_CONFIG

dnl Checks for libraries.
PKG_CHECK_MODULES([XML], [libxml-2.0])
LIBS="$LIBS $XML_LIBS"

dnl Checks for header files.

AC_CHECK_HEADERS(dlfcn.h)

AC_CHECK_LIB(dl, dlopen,[LDFLAGS="$LDFLAGS -rdynamic"; LIBS="$LIBS -ldl"; CPPFLAGS="$CPPFLAGS -DDSO"])

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.

AC_OUTPUT(Makefile dia2code/Makefile dia2code/docs/Makefile dia2code/docs/en/Makefile )
