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

dnl Initialize with some random file to ensure the source is here.
AC_INIT(Trie.cc)
AC_CONFIG_AUX_DIR(aux)

AM_INIT_AUTOMAKE(crossword, 0.1)

dnl Evaluate options.
AC_ARG_ENABLE(profile,
	[  --enable-profile        include profiling code],
	profile=yes
)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX

if test x"$profile" = xyes; then
   CXXFLAGS="$CXXFLAGS -g -pg"
fi

if test x"$ac_cv_prog_gxx" = xyes; then
   CXXFLAGS="$CXXFLAGS -W -Wall -Wno-sign-compare"
fi

AC_LANG_CPLUSPLUS
AC_CHECK_HEADERS(hash_map ext/hash_map sstream)

AC_MSG_CHECKING([for __attribute__ ((packed))])
AC_TRY_COMPILE([struct Foo { } __attribute__ ((packed));],[],
               [AC_MSG_RESULT(yes)
                AC_DEFINE(HAVE_ATTRIBUTE_PACKED)],
               [AC_MSG_RESULT(no)])

AC_OUTPUT(Makefile)
