dnl Process this file with autoconf to produce a configure script. AC_INIT(include/divine.h) AC_PREREQ(2.52) # # Making releases: # DIVINE_MICRO_VERSION += 1; # DIVINE_INTERFACE_AGE += 1; # DIVINE_BINARY_AGE += 1; # if any functions have been added, set DIVINE_INTERFACE_AGE to 0. # if backwards compatibility has been broken, # set DIVINE_BINARY_AGE and DIVINE_INTERFACE_AGE to 0. # DIVINE_MAJOR_VERSION=0 DIVINE_MINOR_VERSION=4 DIVINE_MICRO_VERSION=0 DIVINE_INTERFACE_AGE=0 DIVINE_BINARY_AGE=0 DIVINE_VERSION=$DIVINE_MAJOR_VERSION.$DIVINE_MINOR_VERSION.$DIVINE_MICRO_VERSION AC_SUBST(DIVINE_MAJOR_VERSION) AC_SUBST(DIVINE_MINOR_VERSION) AC_SUBST(DIVINE_MICRO_VERSION) AC_SUBST(DIVINE_INTERFACE_AGE) AC_SUBST(DIVINE_BINARY_AGE) AC_SUBST(DIVINE_VERSION) AC_DEFINE_UNQUOTED(DIVINE_VERSION, "$DIVINE_VERSION", [DiVine Version]) AC_DEFINE_UNQUOTED(DIVINE_MAJOR_VERSION, $DIVINE_MAJOR_VERSION, [DiVine major version number]) AC_DEFINE_UNQUOTED(DIVINE_MINOR_VERSION, $DIVINE_MINOR_VERSION, [DiVine minor version number]) # libtool versioning LT_RELEASE=$DIVINE_MAJOR_VERSION.$DIVINE_MINOR_VERSION LT_CURRENT=`expr $DIVINE_MICRO_VERSION - $DIVINE_INTERFACE_AGE` LT_REVISION=$DIVINE_INTERFACE_AGE LT_AGE=`expr $DIVINE_BINARY_AGE - $DIVINE_INTERFACE_AGE` AC_SUBST(LT_RELEASE) AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) # For automake. VERSION=$DIVINE_VERSION PACKAGE=DiVine AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AC_DISABLE_STATIC AC_PROG_CC AM_PROG_LIBTOOL AM_SANITY_CHECK AC_ISC_POSIX AC_PROG_INSTALL AC_PROG_MAKE_SET AC_HEADER_STDC dnl Clear default CFLAGS if test x"$CFLAGS" = x"-g -O2"; then CFLAGS= fi CFLAGS="-O3 -pipe $CFLAGS" if test "x$GCC" = xyes; then CFLAGS="-Wall $CFLAGS" fi AM_CONDITIONAL(BUILD_STATIC, test "$enable_static" = "yes") # # Find pkg-config # AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test x$PKG_CONFIG = xno ; then AC_MSG_ERROR([*** pkg-config not found. See http://pkgconfig.sourceforge.net]) fi if ! pkg-config --atleast-pkgconfig-version 0.9 ; then AC_MSG_ERROR([*** pkg-config too old; version 0.9 or better required.]) fi # # Check for DirectFB # DIRECTFB_REQUIRED_VERSION=1.0.0 AC_MSG_CHECKING(for DirectFB) if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb` DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb` AC_MSG_RESULT(found) else AC_MSG_ERROR([*** DirectFB $DIRECTFB_REQUIRED_VERSION or newer is required. ]) fi # # Check for DirectFB-Internal # AC_MSG_CHECKING(for DirectFB-Internal) if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb-internal ; then MODULEDIR=$libdir/`$PKG_CONFIG --variable=moduledirname directfb-internal` DIRECTFB_INTERNAL_CFLAGS=`$PKG_CONFIG --cflags directfb-internal` AC_MSG_RESULT(found) else AC_MSG_ERROR([*** DirectFB-Internal $DIRECTFB_REQUIRED_VERSION or newer is required. ]) fi AC_SUBST(DIRECTFB_CFLAGS) AC_SUBST(DIRECTFB_LIBS) AC_SUBST(MODULEDIR) AC_SUBST(DIRECTFB_INTERNAL_CFLAGS) CFLAGS="$CFLAGS -Werror-implicit-function-declaration" AC_OUTPUT([ divine-config divine.pc Makefile driver/Makefile examples/Makefile lib/Makefile include/Makefile proxy/Makefile proxy/dispatcher/Makefile proxy/requestor/Makefile rules/Makefile ], [chmod +x divine-config])