dnl Process this file with autoconf to produce a configure script.


AC_INIT()
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(include/config.h:config-h.in)
AM_MAINTAINER_MODE

PACKAGE=libgrid
VERSION=1.0
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)


dnl Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
dnl AC_PROG_RANLIB
AM_PROG_CC_STDC
AM_PROG_LIBTOOL

# Checks for libraries.
AC_CHECK_LIB(socket, main)
AC_CHECK_LIB(nsl, main)
AC_CHECK_LIB(ssl, main)
AC_CHECK_LIB(crypto, main)


# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([netinet/in.h stdlib.h string.h strings.h sys/socket.h])
AC_CHECK_HEADERS([openssl/crypto.h openssl/dh.h openssl/dsa.h openssl/err.h openssl/evp.h openssl/opensslv.h \
		  openssl/pem.h openssl/rand.h openssl/rsa.h openssl/ssl.h openssl/x509.h openssl/x509_vfy.h])

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

# Checks for library functions.
AC_PROG_GCC_TRADITIONAL

AC_CONFIG_FILES([Makefile
                 lib/Makefile
                 include/Makefile
		 sample/Makefile])

AC_OUTPUT
