dnl     Autoconf requirements
dnl     `AC_INIT(PACKAGE, VERSION, BUG-REPORT-ADDRESS)'
dnl     information on the package
dnl     checks for programs
dnl     checks for libraries
dnl     checks for header files
dnl     checks for types
dnl     checks for structures
dnl     checks for compiler characteristics
dnl     checks for library functions
dnl     checks for system services
dnl     `AC_CONFIG_FILES([FILE...])'
dnl     `AC_OUTPUT'

AC_INIT([bist],[0.5.2],[cage@katamail.com],[bist])

AC_CONFIG_MACRO_DIR([m4])

AC_USE_SYSTEM_EXTENSIONS

AM_INIT_AUTOMAKE([-Wall foreign])

AC_SUBST([VERSION],AC_PACKAGE_VERSION)
AC_SUBST([TARNAME],AC_PACKAGE_TARNAME)

AC_LANG([C++])

AC_PROG_CXX([g++-4.3 g++-4.2 g++-4.1 g++ c++])

AC_PATH_PROG([SHELL],[bash])

AC_LIBTOOL_DLOPEN
AC_DISABLE_STATIC

AC_PROG_LIBTOOL


AC_SUBST([CPPFLAGS],[$CPPFLAGS\ -I../../include\ -I.\ `fltk-config --cxxflags`])

AC_SUBST([CPPFLAGS],[$CPPFLAGS\ `pkg-config --cflags cairo`])

AC_SUBST([CPPFLAGS],[$CPPFLAGS\ `pkg-config --cflags pangocairo`])

opt=`echo "$CPPFLAGS" | grep  Wall`

if [[[ $opt = "" ]]]; then
AC_SUBST([CPPFLAGS],[$CPPFLAGS\ -Wall])	
fi


AC_CHECK_PROG([CURL], [curl-config], [TRUE],
          [FALSE], [$PATH:/usr/libexec:/usr/sbin:/usr/etc:etc], [])


if [[ $CURL = "FALSE" ]]; then
	AC_MSG_ERROR([cannot find 'curl-config', please install libcurl if you want to use this plug-in!], [1])
fi

AC_SUBST([LIBS],[$LIBS\ `curl-config --libs`])	




AC_CONFIG_FILES([Makefile])
AC_OUTPUT	


