AC_INIT AC_CONFIG_SRCDIR([src/ev_dispatch.cc]) AM_INIT_AUTOMAKE(libdispatch,0.1) AC_CONFIG_HEADERS([config.h]) AM_MAINTAINER_MODE # Checks for programs. AC_PROG_CC AC_PROG_CXX # set C++ compiling and linkage AC_LANG(C++) AC_PROG_INSTALL AC_PROG_LIBTOOL if test "x$GCC" = xyes ; then CXXFLAGS="$CXXFLAGS -O3" fi #if( test `uname -m | grep -ci i386 ` && test `uname | grep -ci darwin`); then # CXXFLAGS="$CXXFLAGS -arch ppc -arch i386" #fi libev=`pwd`/libev-3.31/ AC_SUBST(LIBEV_PATH,$libev) AC_CHECK_HEADERS(curl/curl.h) # TODO: abort if the libcurl version isn't met AC_CHECK_TYPES([curl_socket_t],[],["libcurl is too old!"],[#include "curl/curl.h"]) AC_CHECK_PROGS([curl-config]) # include libev's m4 macros for config.h m4_include([libev-3.31/libev.m4]) AC_CONFIG_FILES([Makefile src/Makefile test/Makefile]) AC_OUTPUT if( ! test -d ${libev}/.libs ); then echo "Building libev... in ${libev}"; cd $libev; ./configure --disable-shared; make; fi