AC_INIT(Makefile.am)
AC_PREREQ(2.12)
AC_REVISION($Id: configure.in,v 1.30 2001/04/15 01:10:41 frankc Exp $)dnl

dnl ----------------------------------------------------------------------
dnl PACKAGE+VERSION
dnl stole in gtk configure.in
dnl  ----------------------------------------------------------------------

CORELINUX_MAJOR_VERSION=0
CORELINUX_MINOR_VERSION=4
CORELINUX_MICRO_VERSION=32

dnl

CORELINUX_VERSION=$CORELINUX_MAJOR_VERSION.$CORELINUX_MINOR_VERSION.$CORELINUX_MICRO_VERSION
AC_SUBST(CORELINUX_MAJOR_VERSION)
AC_SUBST(CORELINUX_MINOR_VERSION)
AC_SUBST(CORELINUX_MICRO_VERSION)
AC_SUBST(CORELINUX_VERSION)

dnl libtool versioning

#
# +1 : ? : +1  == new interface that does not break old one
# +1 : ? : 0   == new interface that breaks old one
#  ? : ? : 0   == no new interfaces, but breaks apps
#  ? :+1 : ?   == just some internal changes, nothing breaks but might work 
#                 better
# CURRENT: REVISION : AGE

LIBCORELINUX_SO_VERSION=2:0:1
AC_SUBST(LIBCORELINUX_SO_VERSION)

LIBEXMPLSUPP_SO_VERSION=1:0:0
AC_SUBST(LIBEXMPLSUPP_SO_VERSION)

dnl LT_RELEASE=$CORELINUX_MAJOR_VERSION.$CORELINUX_MINOR_VERSION
dnl LT_CURRENT=$CORELINUX_MICRO_VERSION
dnl LT_REVISION=$CORELINUX_MINOR_VERSION
dnl LT_AGE=0
dnl AC_SUBST(LT_RELEASE)
dnl AC_SUBST(LT_CURRENT)
dnl AC_SUBST(LT_REVISION)
dnl AC_SUBST(LT_AGE)
dnl

PACKAGE=libcorelinux
VERSION=$CORELINUX_VERSION

dnl Where are the files for the configure script
AC_CONFIG_AUX_DIR(admin)

# init automake
AM_INIT_AUTOMAKE(${PACKAGE},${VERSION})
AM_CONFIG_HEADER(config.h)


dnl Checks for programs.
AC_PROG_CXX
CORELINUX_CHECK_COMPILERS

AC_PROG_LN_S
AC_PROG_RANLIB 
AC_PROG_MAKE_SET

# check for install
AC_PROG_INSTALL

# Turn off shared libraries during beta-testing, since they
# make the build process take too long.
#AC_DISABLE_SHARED
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_STDC

dnl Checks for typedefs, structures, and compiler characteristics.
CPPFLAGS="${CPPFLAGS}  -I\$(top_srcdir)/corelinux/  -I\$(top_srcdir)/ -I\$(top_srcdir)/src/testdrivers/include -I\$(srcdir)/include "
dnl Checks for library functions.

AC_OUTPUT(Makefile \
	  corelinux.spec \
 	  admin/Makefile \
 	  debian/Makefile \
	  doc/Makefile \
	  doc/corelinux.cfg \
 	  corelinux/Makefile \
          src/Makefile \
	  src/classlibs/Makefile \
          src/classlibs/corelinux/Makefile \
	  src/utils/Makefile \
	  src/utils/csamon/Makefile \
	  src/testdrivers/Makefile \
	  src/testdrivers/include/Makefile \
	  src/testdrivers/exmplsupport/Makefile \
	  src/testdrivers/ex1/Makefile \
	  src/testdrivers/ex1/include/Makefile \
	  src/testdrivers/ex2/Makefile \
	  src/testdrivers/ex3/Makefile \
	  src/testdrivers/ex3/include/Makefile \
	  src/testdrivers/ex4/Makefile \
	  src/testdrivers/ex4/include/Makefile \
	  src/testdrivers/ex5/Makefile \
	  src/testdrivers/ex6/Makefile \
	  src/testdrivers/ex6/include/Makefile \
	  src/testdrivers/ex7/Makefile \
	  src/testdrivers/ex7/include/Makefile \
	  src/testdrivers/ex8/Makefile \
	  src/testdrivers/ex8/include/Makefile \
	  src/testdrivers/ex9/Makefile \
	  src/testdrivers/ex10/Makefile \
	  src/testdrivers/ex11/Makefile \
	  src/testdrivers/ex11/include/Makefile \
	  src/testdrivers/ex12/Makefile \
	  src/testdrivers/ex12/include/Makefile \
	  src/testdrivers/ex13/Makefile \
	  src/testdrivers/ex14/Makefile \
	  src/testdrivers/ex15/Makefile \
	  src/testdrivers/ex15/include/Makefile \
          src/testdrivers/ex16/Makefile \
	  src/testdrivers/ex17/Makefile \
	  src/testdrivers/ex17/include/Makefile \
	  src/testdrivers/ex18/Makefile \
          src/testdrivers/ex18/include/Makefile \
          src/testdrivers/ex19/Makefile \
          src/testdrivers/ex19/include/Makefile
	  src/testdrivers/ex20/Makefile \
	  src/testdrivers/ex20/include/Makefile \
	  src/testdrivers/ex21/Makefile \
	  src/testdrivers/ex21/include/Makefile \
	  src/testdrivers/ex22/Makefile \
          src/testdrivers/ex22/include/Makefile , [ chmod +x debian/rules ] )
