dnl Process this file with autoconf to produce a configure script. dnl AC_INIT AC_INIT AC_CANONICAL_TARGET AC_CONFIG_SRCDIR([configure.in]) LIBVEVO_MAJOR_VERSION=2 LIBVEVO_MINOR_VERSION=2 LIBVEVO_MICRO_VERSION=2 LIBVEVO_VERSION=$LIBVEVO_MAJOR_VERSION.$LIBVEVO_MINOR_VERSION.$LIBVEVO_MICRO_VERSION PACKAGE_VERSION=LIBVEVO_VERSION AM_INIT_AUTOMAKE( libvevo, $LIBVEVO_VERSION) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AM_OUTPUT_DEPENDENCY_COMMANDS dnl AM_ACLOCAL_INCLUDE(macros) AC_PROG_CC AM_PROG_AS AC_PROG_CPP AC_PROG_CXX AC_PROG_CXXCPP AC_PROG_GCC_TRADITIONAL AC_ISC_POSIX AC_HEADER_STDC LT_RELEASE=$LIBVEVO_MAJOR_VERSION.$LIBVEVO_MINOR_VERSION LT_CURRENT=$LIBVEVO_MICRO_VERSION LT_REVISION=$LIBVEVO_MICRO_VERSION LT_AGE=$LIBVEVO_MICRO_VERSION AC_SUBST(LT_RELEASE) AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) dnl ********************************************************************** dnl Options AC_ARG_ENABLE(assertions, [ --enable-assertions, Turn on runtime assertion checking.]) AC_ARG_ENABLE(compile-warnings, [ --enable-compile-warnings, Turn on compiler warnings.]) AC_ARG_ENABLE(warnings_as_errors, [ --enable-warnings_as_errors, Compiler warnings are errors.]) AC_ARG_ENABLE(memory-pool, [ --enable-memory-pool, Turn on vevo's memory allocator.]) AC_PROG_AWK AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_RANLIB AC_C_BIGENDIAN AC_C_CONST AC_C_INLINE dnl Initialize libtool AM_PROG_LIBTOOL AC_CHECK_HEADERS(fenv.h stdint.h inttypes.h sys/types.h stdbool.h getopt.h alloca.h sys/soundcard.h) dnl sizeof PRId64 etc... AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_TYPE_SIGNAL AC_CHECK_FUNCS([floot]) AC_CHECK_FUNCS([gettimeofday]) AC_CHECK_FUNCS([memset]) AC_CHECK_FUNCS([mkdir]) AC_CHECK_HEADERS([limits.h]) AC_CHECK_HEADERS([malloc.h]) AC_CHECK_HEADERS([stddef.h]) AC_CHECK_HEADERS([sys/time.h]) AC_FUNC_MALLOC AC_HEADER_TIME AC_HEADER_SYS_WAIT AC_HEADER_STDC AC_TYPE_SIZE_T AC_C_VOLATILE OS_ARCH=`uname -s | sed -e 's|/|_|g'` OS_RELEASE=`uname -r` OS_CPU=`uname -m` dnl ******************************************************************** dnl Check to see if __progname is provided by the system dnl ******************************************************************** AC_MSG_CHECKING(for __progname) AC_CACHE_VAL(ac_cv_extern__progname, AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[extern char *__progname; puts(__progname)]])],[ac_cv_extern___progname=yes],[ac_cv_extern___progname=no])) if test x$ac_cv_extern___progname = xyes ; then AC_DEFINE(HAVE___PROGNAME,,[Is __progname defined by system?]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi dnl ********************************************************************** dnl All the conditional stuff for the Makefiles dnl CFLAGS="$CFLAGS" AC_MSG_CHECKING(what warning flags to pass to the C compiler) warnCFLAGS= if test "x$enable_compile_warnings" != "xno" ; then if test "x$GCC" = "xyes" ; then case "$CFLAGS" in *-Wall*) ;; *) warnCFLAGS="-g -Wall -Wunused -std=c99 -pedantic" ;; esac if test "x$enable_compile_warnings" = "xyes" ; then warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wcast-align -Wwrite-strings -Wcast-qual" fi if test "x$enable_warnings_as_errors" = "xyes" ; then warnCFLAGS="$warnCFLAGS -Werror" fi fi fi if test "x$enable_assertions" != "xno"; then if test "x$GCC" = "xyes" ; then case "$CFLAGS" in *) warnCFLAGS="$warnCFLAGS -DSTRICT_CHECKING";; esac fi fi if test "x$enable_memory_pool" != "xno"; then if test "x$GCC" = "xyes" ; then case "$CFLAGS" in *) warnCFLAGS="$warnCFLAGS -DVEVO_MEMPOOL";; esac fi fi AC_MSG_RESULT($warnCFLAGS) if test "x$cflags_set" != "xyes" ; then CFLAGS="$CFLAGS $warnCFLAGS" cflags_set=yes fi AC_CONFIG_FILES([ Makefile src/Makefile include/Makefile examples/Makefile test/Makefile vevo-config ]) AC_OUTPUT AC_DEFINE(VERSION, ${VERSION})