AC_INIT(p2psim/p2psim.h) AM_INIT_AUTOMAKE(p2psim, 0.3) AM_CONFIG_HEADER(config.h) AC_CANONICAL_HOST AC_PROG_CC AM_PROG_AS AC_PROG_CPP AC_PROG_CXX AC_PROG_RANLIB AC_PATH_PROGS(M4, gm4 gnum4 m4, '$(top_srcdir)/missing') dnl Check for GTK and allow conditional Makefile.am statements dnl AM_PATH_GTK(1.2.0,,AC_MSG_WARN(gtk not available; vis will not be built)) dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 2.0, AC_MSG_WARN([Found GTK...]), AC_MSG_WARN([You don't have GTK. Vis won't be built])) dnl AM_CONDITIONAL(GTK_AVAILABLE, test "$GSTUFF_CFLAGS") dnl AC_SUBST(GSTUFF_CFLAGS) dnl AC_SUBST(GSTUFF_LIBS) dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_namespaces.html dnl AC_DEFUN([AC_CXX_NAMESPACES], [AC_CACHE_CHECK(whether the compiler implements namespaces, ac_cv_cxx_namespaces, [AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}], [using namespace Outer::Inner; return i;], ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_namespaces" = yes; then AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces]) fi ]) AC_CXX_NAMESPACES dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_ext_hash_map.html dnl AC_DEFUN([AC_CXX_HAVE_EXT_HASH_MAP], [AC_CACHE_CHECK(whether the compiler has ext/hash_map, ac_cv_cxx_have_ext_hash_map, [AC_REQUIRE([AC_CXX_NAMESPACES]) AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_TRY_COMPILE([#include #ifdef HAVE_NAMESPACES using namespace __gnu_cxx; #endif],[hash_map t; return 0;], ac_cv_cxx_have_ext_hash_map=yes, ac_cv_cxx_have_ext_hash_map=no) AC_LANG_RESTORE ]) if test "$ac_cv_cxx_have_ext_hash_map" = yes; then AC_DEFINE(HAVE_EXT_HASH_MAP,,[define if the compiler has ext/hash_map]) fi ]) AC_CXX_HAVE_EXT_HASH_MAP AM_WITH_DMALLOC AM_WITH_TMGDMALLOC AC_PROG_INSTALL AC_PROG_LN_S dnl let directories share header files CPPFLAGS="-I"'$(top_srcdir)'" $CPPFLAGS" AC_LANG_SAVE AC_LANG_C CPFSAVE=$CPPFLAGS CPPFLAGS="-L/usr/local/lib $CPPFLAGS" LIBSSAVE=$LIBS dnl Check for standford graph base and build gtitm if available AC_CHECK_LIB(gb,restore_graph,,AC_MSG_WARN([Stanford graph base not available. gtitm topology will not be built])) CPPFLAGS=$CPFSAVE GBLIBS=$LIBS AC_SUBST(GBLIBS) LIBS=$LIBSSAVE AC_LANG_RESTORE dnl Check for openssl/sha.h dnl AC_CHECK_HEADER(openssl/sha.h,,AC_MSG_ERROR([openssl/sha.h header file required.])) LIBSSAVE=$LIBS CHECK_SSL SSLLIBS=$LIBS LIBS=$LIBSSAVE AC_OUTPUT(Makefile eventgenerators/Makefile p2psim/Makefile observers/Makefile protocols/Makefile failuremodels/Makefile topologies/Makefile events/Makefile libtask/Makefile misc/Makefile)