dnl Process this file with autoconf to produce a configure script. AC_INIT(vehicle.hh) AM_INIT_AUTOMAKE(xbraitenberg, 0.9) AM_CONFIG_HEADER(config.h) AC_PROG_CC AC_C_CONST AC_C_INLINE AC_PROG_CXX if test -n "$GCC" ; then CC="$CC -Wall" ; CXX="$CXX -Wall" ; fi AC_PATH_XTRA dnl dnl Check for strerror() dnl AC_REPLACE_FUNCS(strerror) dnl dnl dependencies dnl AC_ARG_ENABLE(dependencies, [ --enable-dependencies track dependencies (requires GCC, G++ and GNU Make)], [CC="$CC -MMD"; CXX="$CXX -MMD" AUTODEPENDENCIES='DEPFILES := $(wildcard *.d)\ ifneq ($(DEPFILES),)\ include $(DEPFILES)\ endif']) AC_SUBST(AUTODEPENDENCIES) dnl dnl Check for X11 double buffering extension dnl save="$CPPFLAGS"; CPPFLAGS="$CPPFLAGS $X_CFLAGS" AC_CHECK_HEADERS([X11/extensions/Xdbe.h], [], [], [#include ]) AC_CHECK_LIB(Xext, XdbeQueryExtension, [X_LIBS="-lXext $X_LIBS" AC_DEFINE(HAVE_LIBXEXT, 1, [Define to 1 if you have the `Xext' library (-lXext).])], [], [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS]) CPPFLAGS="$save" dnl dnl Check for -fpermissive dnl if test "$GXX" = yes; then AC_LANG_CPLUSPLUS AC_CACHE_CHECK(whether -fpermissive is needed, ac_cv_fpermissive, [AC_TRY_COMPILE([f(void); int f(void) { }], [f();], ac_cv_fpermissive=no, ac_cv_fpermissive=yes)]) if test "$ac_cv_fpermissive" = yes; then CXXFLAGS="$CXXFLAGS -fpermissive" fi AC_LANG_C fi dnl dnl and/or dnl AC_LANG_CPLUSPLUS AC_CACHE_CHECK(whether works, ac_cv_good_new_hdr, AC_TRY_LINK([#include ], [ int a; int *b = new(&a) int; return 0; ], ac_cv_good_new_hdr=yes, ac_cv_good_new_hdr=no)) if test "$ac_cv_good_new_hdr" = yes; then AC_DEFINE(HAVE_NEW_HDR, 1, [Define if exists and works.]) fi AC_CHECK_HEADERS(new.h) dnl dnl gettimeofday() dnl AC_CACHE_CHECK(for gettimeofday prototype, ac_cv_gettimeofday, [AC_TRY_COMPILE([#include #include ], [gettimeofday((void *)0, (void *)0);], [AC_TRY_COMPILE([#include #include ], [gettimeofday((void *)0);], ac_cv_gettimeofday=0, ac_cv_gettimeofday=2)], ac_cv_gettimeofday=1)]) AC_DEFINE_UNQUOTED(GETTIMEOFDAY_PROTO, $ac_cv_gettimeofday, [Define to the number of arguments taken by gettimeofday().]) dnl dnl Output dnl AC_OUTPUT(Makefile)