dnl Process this file with autoconf to produce a configure script.
dnl ====================================================================
dnl
dnl     configure.in
dnl
dnl     Top-level configure script for eCos host-side software.
dnl
dnl ====================================================================
dnl####COPYRIGHTBEGIN####
dnl                                                                         
dnl ----------------------------------------------------------------------------
dnl Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.
dnl
dnl This file is part of the eCos host tools.
dnl
dnl This program is free software; you can redistribute it and/or modify it 
dnl under the terms of the GNU General Public License as published by the Free 
dnl Software Foundation; either version 2 of the License, or (at your option) 
dnl any later version.
dnl 
dnl This program is distributed in the hope that it will be useful, but WITHOUT 
dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
dnl FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
dnl more details.
dnl 
dnl You should have received a copy of the GNU General Public License along with
dnl this program; if not, write to the Free Software Foundation, Inc., 
dnl 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
dnl
dnl ----------------------------------------------------------------------------
dnl                                                                          
dnl####COPYRIGHTEND####
dnl ====================================================================
dnl#####DESCRIPTIONBEGIN####
dnl
dnl Author(s):	bartv
dnl Contact(s):	bartv
dnl Date:	1998/12/17
dnl Version:	0.01
dnl
dnl####DESCRIPTIONEND####
dnl ====================================================================

AC_INIT(config.guess)
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE(eCos,2.0,0)
AM_MAINTAINER_MODE

dnl Some of the decisions made depend on the compiler that is being used,
dnl so the usual set of compiler-related macros is needed here.
AC_PROG_MAKE_SET
AC_CYGWIN
AC_PROG_CC
AC_PROG_CXX
AC_OBJEXT
AC_EXEEXT
CYG_AC_PROG_MSVC

dnl Allow the usual assertion and trace related options.
CYG_AC_ARG_INFRASTRUCTURE

dnl What version of Tcl should be used?
CYG_AC_PATH_TCL

dnl Some of the packages are compulsory and do not depend on the compiler
dnl that is being used. Other packages are only applicable to specific
dnl compilers, and in addition it should be possible to enable or
dnl disable them as convenient.
dnl
dnl The host-side infrastructure and libcdl are always needed.
ECOS_DIRS="infra libcdl"

dnl --------------------------------------------------------------------
dnl Add any other directories that are autoconfiscated and present

dnl  ---- Delete the dnl column below to configure ser_filter on Linux ----
dnl if test -f ${srcdir}/tools/Utils/common/configure; then
dnl   ECOS_DIRS="${ECOS_DIRS} tools/Utils/common"
dnl   AC_OUTPUT_COMMANDS([
dnl 	    test -d tools 			     || mkdir tools
dnl 	    test -d tools/Utils 		     || mkdir tools/Utils
dnl 	    test -d tools/Utils/common 	     || mkdir tools/Utils/common
dnl   ])
dnl fi
dnl 
dnl if test -f ${srcdir}/tools/ecostest/common/configure; then
dnl   ECOS_DIRS="${ECOS_DIRS} tools/ecostest/common"
dnl   AC_OUTPUT_COMMANDS([
dnl 	test -d tools 			     || mkdir tools
dnl 	test -d tools/ecostest 		     || mkdir tools/ecostest
dnl 	test -d tools/ecostest/common 	     || mkdir tools/ecostest/common
dnl   ])
dnl fi

if test -d ${srcdir}/tools/configtool/standalone/common; then
  ECOS_DIRS="${ECOS_DIRS} tools/configtool/standalone/common"
  AC_OUTPUT_COMMANDS([
    test -d tools   			       || mkdir tools
    test -d tools/configtool                   || mkdir tools/configtool
    test -d tools/configtool/standalone        || mkdir tools/configtool/standalone
    test -d tools/configtool/standalone/common || mkdir tools/configtool/standalone/common
  ])
fi

AC_SUBST(ECOS_DIRS)
AC_CONFIG_SUBDIRS(${ECOS_DIRS})
AC_OUTPUT(Makefile)
