dnl
dnl	ORBit-C++: C++ bindings for ORBit.
dnl
dnl	Copyright (C) 1998-2000 Phil Dawes
dnl
dnl	This library is free software; you can redistribute it and/or
dnl	modify it under the terms of the GNU Library General Public
dnl	License as published by the Free Software Foundation; either
dnl	version 2 of the License, or (at your option) any later version.
dnl
dnl	This library is distributed in the hope that it will be useful,
dnl	but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
dnl	Library General Public License for more details.
dnl
dnl	You should have received a copy of the GNU Library General Public
dnl	License along with this library; if not, write to the Free
dnl	Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
dnl	Author: Phil Dawes <philipd@users.sourceforge.net>
dnl		Andreas Kloeckner <ak@ixion.net>
dnl

dnl Process this file with autoconf to produce a configure script.




dnl initialization and versioning ---------------------------------------------

AC_INIT()

ORBITCPP_MAJOR_VERSION=0
ORBITCPP_MINOR_VERSION=30
ORBITCPP_MICRO_VERSION=2
ORBITCPP_INTERFACE_AGE=0
ORBITCPP_BINARY_AGE=0
ORBITCPP_VERSION=$ORBITCPP_MAJOR_VERSION.$ORBITCPP_MINOR_VERSION.$ORBITCPP_MICRO_VERSION

AC_SUBST(ORBITCPP_MAJOR_VERSION)
AC_SUBST(ORBITCPP_MINOR_VERSION)
AC_SUBST(ORBITCPP_MICRO_VERSION)
AC_SUBST(ORBITCPP_VERSION)

LT_RELEASE=$ORBITCPP_VERSION
LT_CURRENT=$ORBITCPP_MINOR_VERSION
LT_REVISION=$ORBITCPP_MICRO_VERSION
LT_AGE=$ORBITCPP_MINOR_VERSION

AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)

PACKAGE=orbitcpp
VERSION=$ORBITCPP_MAJOR_VERSION.$ORBITCPP_MINOR_VERSION.$ORBITCPP_MICRO_VERSION

AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
AM_MAINTAINER_MODE




dnl argument parsing ----------------------------------------------------------
AC_ARG_ENABLE(debug,
  [  --disable-debug          dont imbed debug info and use compiler optimizations],
  ,
  CXXFLAGS="-g -Wall"
  CFLAGS="-g"
  AC_DEFINE(ORBITCPP_DEBUG,1,[Whether debug code should be compiled in.])
)  



dnl checks --------------------------------------------------------------------
AM_PROG_LIBTOOL

AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL

AM_PATH_ORBIT(0.5.10)
AM_PATH_LIBIDL(0.6.8)

ORBIT_NAME_CFLAGS=`$ORBIT_CONFIG --use-service=name --cflags client`
ORBIT_NAME_LIBS=`$ORBIT_CONFIG --use-service=name --libs client`
AC_SUBST(ORBIT_NAME_CFLAGS)
AC_SUBST(ORBIT_NAME_LIBS)


AC_HEADER_STDC

ORBITCPP_CHECK_BAD_CAST

ORBITCPP_CHECK_ORBIT_IDL_SUPPORTS_BACKENDDIR
AM_CONDITIONAL(USE_BACKENDDIR,test x$orbit_idl_supports_backenddir = xtrue)
AM_CONDITIONAL(ENABLE_TESTS,test x$orbit_idl_supports_backenddir = xtrue)

dnl output --------------------------------------------------------------------
idlbackenddir="$libdir/orbit-idl"
AC_SUBST(idlbackenddir)

AM_CONFIG_HEADER(orb/orbitcpp_config.hh)
AC_OUTPUT([Makefile 
	orb/Makefile 
	orb/orbitcpp_constants.hh
	compiler/Makefile 
	services/Makefile
	services/name/Makefile
	test/Makefile 
	test/basic/Makefile 
	test/basic/generated/Makefile 
	test/everything/Makefile
	test/everything/generated/Makefile
	test/name/Makefile
	test/name/generated/Makefile
	test/any/Makefile
	test/any/generated/Makefile
	orbitcpp-config],
	[chmod +x orbitcpp-config]
)
# temporarily removed for 0.29
#	test/everything-typedef/Makefile
#	test/everything-typedef/generated/Makefile


#	test/idl-torture/Makefile 
	
