This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

host-side configury update


This is an attempt to bring the host-side configury up to date. The
version of autoconf used goes from 2.13 to 2.69, and automake goes
from 1.4 to 1.10. This required non-trivial updates to the eCos
autoconf macros and the various Makefile.am and configure.in files, as
below. I have also imported the latest versions of the support files
config.guess etc. into acsupport, which means that e.g. the configury
should now recognize hosts like ia64. All the Makefile.in and
configure scripts have been regenerated. I have not included all those
in the patch below, the changes were massive.

The top-level configure script now detects attempts to e.g. configure
with --target=arm-elf, by people who fail to read any of the
documentation and think that the configure script can be used to build
eCos itself instead of the host-side tools. A suitable text will now
be generated.

I have also done some work on the Tcl/Tk detection, hopefully making
it more robust.

The changes have been tested against an up-to-date Fedora 9 and
against an old install of cygwin. Testing the latter takes a very long
time. Hopefully I have not broken other hosts.

Bart

Index: Makefile.am
===================================================================
RCS file: /cvs/ecos/ecos/Makefile.am,v
retrieving revision 1.2
diff -u -p -w -r1.2 Makefile.am
--- Makefile.am	11 Aug 2002 21:40:50 -0000	1.2
+++ Makefile.am	18 Aug 2008 09:25:20 -0000
@@ -39,6 +39,6 @@
 ######DESCRIPTIONEND####
 ## =====================================================================
 
-AUTOMAKE_OPTIONS = 1.3 foreign
-SUBDIRS          = @SUBDIRS@
+AUTOMAKE_OPTIONS = 1.10 foreign
+SUBDIRS          = @subdirs@
 
Index: configure.in
===================================================================
RCS file: /cvs/ecos/ecos/configure.in,v
retrieving revision 1.3
diff -u -p -w -r1.3 configure.in
--- configure.in	27 Mar 2003 23:42:26 -0000	1.3
+++ configure.in	18 Aug 2008 09:25:27 -0000
@@ -131,6 +131,31 @@ AC_CONFIG_AUX_DIR(acsupport)
 AC_CANONICAL_HOST
 AM_INIT_AUTOMAKE(eCos,2.0,0)
 AM_MAINTAINER_MODE
+
+dnl Detect attempts at cross-compilation. Usually this is the result
+dnl of somebody failing to read the documentation or the README.host
+dnl file.
+if test "${target_alias}x" != "x" ; then
+  AC_MSG_ERROR("
+================================================================
+You have specified a target ${target_alias}.
+This configure script is for building the eCos host-side support
+tools which are independent of the target architecture. It is not
+used for building eCos itself.
+
+If your intention is to build eCos itself then you should first
+read the relevant documentation starting with the User's Guide.
+
+If your intention is to rebuild the host-side support tools then
+there is no need to specify --target.
+
+If your intention is to cross-compile the host-side support tools
+then you should be using --host instead of --target.
+================================================================
+")
+fi  
+
+dnl Make sure the source and build trees are kept separate.
 ECOS_CHECK_BUILD_ne_SRC
 
 dnl Nothing actually gets built in this directory, so there should be no
@@ -142,11 +167,11 @@ dnl     With the 2.0 release system the 
 dnl     tools/src
 		     
 if test -f "${srcdir}/host/configure" ; then
-   SUBDIRS="host"
+   ecos_subdirs="host"
 elif test -f "${srcdir}/tools/src/configure" ; then
-   SUBDIRS="tools/src"
+   ecos_subdirs="tools/src"
 else   
-   SUBDIRS=""
+   ecos_subdirs=""
 fi   
 
 dnl  2) any package which has a configure script in a
@@ -164,32 +189,39 @@ dnl     This is a good thing because pac
 dnl     whenever possible. Interaction between packages is typically handled
 dnl     at the Tcl level at run-time, so there are no build-time complications.
 
-PKGHOSTDIRS=""
-FOUND_CONFIGURES=""
-FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/host/configure"
-FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/*/host/configure"
-FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/*/*/host/configure"
-FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/*/*/*/host/configure"
-FOUND_CONFIGURES="${FOUND_CONFIGURES} ${srcdir}/packages/*/*/*/*/*/*/host/configure"
-for configure in ${FOUND_CONFIGURES}; do
+AC_MSG_NOTICE([searching for configure scripts in eCos packages'
+host subdirectories. This operation can take a long time.
+If running on Windows and the eCos repository is accessed
+over a network then it may take some hours.])
+ecos_hostdirs=""
+ecos_configure_scripts="${srcdir}/packages/*/*/host/configure"
+ecos_configure_scripts="${ecos_configure_scripts} ${srcdir}/packages/*/*/*/host/configure"
+ecos_configure_scripts="${ecos_configure_scripts} ${srcdir}/packages/*/*/*/*/host/configure"
+ecos_configure_scripts="${ecos_configure_scripts} ${srcdir}/packages/*/*/*/*/*/host/configure"
+ecos_configure_scripts="${ecos_configure_scripts} ${srcdir}/packages/*/*/*/*/*/*/host/configure"
+for configure in ${ecos_configure_scripts}; do
     if test -f ${configure}; then
         dnl A configure script has been found in the source tree.
         dnl First turn it into a directory, then replace the absolute path
         dnl with a relative one.
         hostdir=`dirname ${configure}`
         hostdir=`echo ${hostdir} | sed -e "s:^${srcdir}/::"`
-        PKGHOSTDIRS="${PKGHOSTDIRS} ${hostdir}"
+        ecos_hostdirs="${ecos_hostdirs} ${hostdir}"
     fi
 done
-
-SUBDIRS="${SUBDIRS} ${PKGHOSTDIRS}"
+AC_MSG_NOTICE([found configure scripts in
+${ecos_hostdirs}])
+ecos_subdirs="${ecos_subdirs} ${ecos_hostdirs}"
 
 dnl Because the eCos directory layout does not conform to GNU conventions
 dnl it is necessary to create various levels of intermediate directories.
 dnl This happens via config.status, prior to the recursion into the
 dnl appropriate directories.
-AC_OUTPUT_COMMANDS([${CONFIG_SHELL-/bin/sh} ${top_srcdir}/acsupport/mkinstalldirs ${REQUIRED_DIRS}],REQUIRED_DIRS="${SUBDIRS}")
+AC_OUTPUT_COMMANDS([${CONFIG_SHELL-/bin/sh} ${ac_top_srcdir}/acsupport/mkinstalldirs ${REQUIRED_DIRS}],REQUIRED_DIRS="${ecos_subdirs}")
 
-AC_SUBST(SUBDIRS)
-AC_CONFIG_SUBDIRS(${SUBDIRS})
+dnl This causes warnings with current versions of configure which
+dnl want literal arguments. Since this script deliberately searches
+dnl for subdirectories there is no obvious way to eliminate those
+dnl warnings.
+AC_CONFIG_SUBDIRS(${ecos_subdirs})
 AC_OUTPUT(Makefile)
Index: acsupport/acinclude.m4
===================================================================
RCS file: /cvs/ecos/ecos/acsupport/acinclude.m4,v
retrieving revision 1.5
diff -u -p -w -r1.5 acinclude.m4
--- acsupport/acinclude.m4	12 Feb 2003 17:22:12 -0000	1.5
+++ acsupport/acinclude.m4	18 Aug 2008 09:25:29 -0000
@@ -48,7 +48,7 @@ dnl that a separate build tree has been 
 dnl necessary at the time of writing but may become so in future, and
 dnl is good practice.
 
-AC_DEFUN(ECOS_CHECK_BUILD_ne_SRC,[
+AC_DEFUN([ECOS_CHECK_BUILD_ne_SRC],[
     AC_MSG_CHECKING([that a separate build tree is being used])
     ecos_cwd=`/bin/pwd`
     if test "${srcdir}" = "." ; then
@@ -58,7 +58,7 @@ AC_DEFUN(ECOS_CHECK_BUILD_ne_SRC,[
         AC_MSG_RESULT([no])
         AC_MSG_ERROR([This configure script should not be run inside the source tree. Instead please use a separate build tree])
     else
-        AC_MSG_RESULT(yes)
+    AC_MSG_RESULT([yes])
     fi
 ])
 
@@ -68,10 +68,10 @@ dnl package's version number. Unfortunat
 dnl hard to share if several different packages are involved, so this
 dnl macro is used to define an alternative symbol
 
-AC_DEFUN(ECOS_SUBST_VERSION,[
+AC_DEFUN([ECOS_SUBST_VERSION],[
     AC_REQUIRE([AM_INIT_AUTOMAKE])
     ifelse($#,1,,AC_MSG_ERROR([Invalid number of arguments passed to ECOS SUBST_VERSION]))
-    AC_DEFINE_UNQUOTED($1, "$VERSION")
+  AC_DEFINE_UNQUOTED($1, "$VERSION", "eCos host-side package version")
 ])
 
 dnl --------------------------------------------------------------------
@@ -80,8 +80,8 @@ dnl still invoked from bash and cygwin's
 dnl the cygpath utility and then translating any backslashes into
 dnl forward slashes to avoid confusing make.
 
-AC_DEFUN(ECOS_MSVC_PATH, [
-    AC_REQUIRE([ECOS_PROG_MSVC])
+AC_DEFUN([ECOS_MSVC_PATH], [
+dnl    AC_REQUIRE([ECOS_PROG_MSVC])
     ifelse($#, 1, , AC_MSG_ERROR("Invalid number of arguments passed to ECOS MSVC_PATH"))
     if test "${MSVC}" = "yes" ; then
       $1=`cygpath -w ${$1} | tr \\\\\\\\ /`
@@ -93,7 +93,7 @@ dnl An internal utility to define eCos v
 dnl related flags. The aim is to avoid messing with CFLAGS, LIBS, and
 dnl so on because those are used for feature tests as well as for
 dnl passing on to the application.
-AC_DEFUN(ECOS_PROG_DEFINE_COMPILER_FLAGS,[
+AC_DEFUN([ECOS_PROG_DEFINE_COMPILER_FLAGS],[
     ecos_CFLAGS=""
     ecos_CXXFLAGS=""
     ecos_LDADD=""
@@ -116,7 +116,7 @@ dnl conditional thus allowing the makefi
 dnl compiler being used. Finally it fills in the ECOS_INCLUDES,
 dnl ECOS_LIBS and ECOS_LDADD variables with suitable initial values.
 
-AC_DEFUN(ECOS_PROG_MSVC,[
+AC_DEFUN([ECOS_PROG_MSVC],[
     AC_REQUIRE([AC_PROG_CC])
     AC_REQUIRE([AC_PROG_CXX])
     AC_REQUIRE([ECOS_PROG_DEFINE_COMPILER_FLAGS])
@@ -155,7 +155,7 @@ dnl be more expensive than doing the wor
 dnl
 dnl For now the only supported compilers are gcc/g++ and VC++. Attempts
 dnl to use another compiler will result in an error at configure-time.
-AC_DEFUN(ECOS_PROG_STANDARD_COMPILER_FLAGS, [
+AC_DEFUN([ECOS_PROG_STANDARD_COMPILER_FLAGS], [
     AC_REQUIRE([AC_PROG_CC])
     AC_REQUIRE([AC_PROG_CXX])
     AC_REQUIRE([ECOS_PROG_DEFINE_COMPILER_FLAGS])
@@ -188,7 +188,7 @@ AC_DEFUN(ECOS_PROG_STANDARD_COMPILER_FLA
     dnl Now we know what the user is after.
     if test "${GCC}" = "yes" ; then
         ecos_CFLAGS="${ecos_CFLAGS} -pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs"
-        ecos_CXXFLAGS="${ecos_CXXFLAGS} -pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Woverloaded-virtual"
+    ecos_CXXFLAGS="${ecos_CXXFLAGS} -pipe -Wall -Wpointer-arith -Wcast-qual -Woverloaded-virtual"
     elif test "${MSVC}" = "yes" ; then
         ecos_CFLAGS="${ecos_CFLAGS} -nologo -W3"
         ecos_CXXFLAGS="${ecos_CXXFLAGS} -nologo -W3 -GR -GX"
@@ -206,13 +206,11 @@ AC_DEFUN(ECOS_PROG_STANDARD_COMPILER_FLA
             ecos_CXXFLAGS="${ecos_CXXFLAGS} -MDd -Zi"
         fi
     else
-        dnl For now building with g++ implies -O0 rather than -O2. The
-        dnl compile-time performance of g++ at -O2 has been disappointing
-        dnl for quite some time, and the eCos host-side code is not
-        dnl sufficiently cpu-intensive to require -O2.
+    dnl With older versions of g++ building the host-side tools with
+    dnl -O2 took forever. These problems should now have gone away.
         if test "${GCC}" = "yes" ; then
-            ecos_CFLAGS="${ecos_CFLAGS} -O0"
-            ecos_CXXFLAGS="${ecos_CXXFLAGS} -O0"
+      ecos_CFLAGS="${ecos_CFLAGS} -O2"
+      ecos_CXXFLAGS="${ecos_CXXFLAGS} -O2"
         elif test "${MSVC}" = "yes" ; then
             ecos_CFLAGS="${ecos_CFLAGS} -MD -O2"
             ecos_CXXFLAGS="${ecos_CXXFLAGS} -MD -O2"
@@ -237,7 +235,7 @@ dnl   --disable-loopinvariants
 dnl   --disable-tracing
 dnl   --disable-fntracing
 
-AC_DEFUN(ECOS_ARG_INFRASTRUCTURE, [
+AC_DEFUN([ECOS_ARG_INFRASTRUCTURE], [
 
     AC_REQUIRE([ECOS_PROG_STANDARD_COMPILER_FLAGS])
 
@@ -266,7 +264,7 @@ AC_DEFUN(ECOS_ARG_INFRASTRUCTURE, [
             *)   AC_MSG_ERROR([bad value ${enableval} for disable-asserts option]) ;;
         esac])
     if test "${ecosinfra_asserts}" = "yes"; then
-        AC_DEFINE(CYGDBG_USE_ASSERTS)
+    AC_DEFINE(CYGDBG_USE_ASSERTS,[1],[assertions enabled])
     fi
 
     AC_ARG_ENABLE(preconditions, [ --disable-preconditions  disable a subset of the assertions],
@@ -276,7 +274,7 @@ AC_DEFUN(ECOS_ARG_INFRASTRUCTURE, [
             *)   AC_MSG_ERROR([bad value ${enableval} for disable-preconditions option]) ;;
         esac])
     if test "${ecosinfra_preconditions}" = "yes"; then
-        AC_DEFINE(CYGDBG_INFRA_DEBUG_PRECONDITIONS)
+    AC_DEFINE(CYGDBG_INFRA_DEBUG_PRECONDITIONS,[1],[precondition asserts enabled])
     fi
 
     AC_ARG_ENABLE(postconditions, [ --disable-postconditions disable a subset of the assertions],
@@ -286,7 +284,7 @@ AC_DEFUN(ECOS_ARG_INFRASTRUCTURE, [
             *)   AC_MSG_ERROR([bad value ${enableval} for disable-postconditions option]) ;;
         esac])
     if test "${ecosinfra_postconditions}" = "yes"; then
-        AC_DEFINE(CYGDBG_INFRA_DEBUG_POSTCONDITIONS)
+    AC_DEFINE(CYGDBG_INFRA_DEBUG_POSTCONDITIONS,[1], [postcondition asserts enabled])
     fi
 
     AC_ARG_ENABLE(invariants, [ --disable-invariants     disable a subset of the assertions],
@@ -296,7 +294,7 @@ AC_DEFUN(ECOS_ARG_INFRASTRUCTURE, [
             *)   AC_MSG_ERROR([bad value ${enableval} for disable-invariants option]) ;;
         esac])
     if test "${ecosinfra_invariants}" = "yes"; then
-        AC_DEFINE(CYGDBG_INFRA_DEBUG_INVARIANTS)
+    AC_DEFINE(CYGDBG_INFRA_DEBUG_INVARIANTS,[1],[invariant asserts enabled])
     fi
 
     AC_ARG_ENABLE(loopinvariants, [ --disable-loopinvariants disable a subset of the assertions],
@@ -306,7 +304,7 @@ AC_DEFUN(ECOS_ARG_INFRASTRUCTURE, [
             *)   AC_MSG_ERROR([bad value ${enableval} for disable-loopinvariants option]) ;;
         esac])
     if test "${ecosinfra_loopinvariants}" = "yes"; then
-        AC_DEFINE(CYGDBG_INFRA_DEBUG_LOOP_INVARIANTS)
+    AC_DEFINE(CYGDBG_INFRA_DEBUG_LOOP_INVARIANTS,[1],[loop invariant asserts enabled])
     fi
 
     AC_ARG_ENABLE(tracing,[ --disable-tracing        disable tracing],
@@ -316,7 +314,7 @@ AC_DEFUN(ECOS_ARG_INFRASTRUCTURE, [
             *)   AC_MSG_ERROR([bad value ${enableval} for disable-tracing option]) ;;
         esac])
     if test "${ecosinfra_tracing}" = "yes"; then
-        AC_DEFINE(CYGDBG_USE_TRACING)
+    AC_DEFINE(CYGDBG_USE_TRACING,[1],[tracing enabled])
     fi
 
     AC_ARG_ENABLE(fntracing,[ --disable-fntracing      disable function entry/exit tracing],
@@ -326,7 +324,7 @@ AC_DEFUN(ECOS_ARG_INFRASTRUCTURE, [
             *)   AC_MSG_ERROR([bad value ${enableval} for disable-fntracing option]) ;;
     esac])
     if test "${ecosinfra_fntracing}" = "yes"; then
-        AC_DEFINE(CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS)
+    AC_DEFINE(CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS,[1],[function entry/exit reporting enabled])
     fi
 ])
 
@@ -337,7 +335,7 @@ dnl AC_FIND_FILE(foo.h, $incdirs, incdir
 dnl the filename to look for, the list of paths to check and
 dnl the variable with the result.
 
-AC_DEFUN(AC_FIND_FILE,[
+AC_DEFUN([AC_FIND_FILE],[
     $3=""
     for i in $2; do
         if test -r "$i/$1"; then
@@ -354,7 +352,7 @@ dnl AC_FIND_DIR(infra, $incdirs, incdir)
 dnl the directory name to look for, the list of paths to check and
 dnl the variable with the result.
 
-AC_DEFUN(AC_FIND_DIR,[
+AC_DEFUN([AC_FIND_DIR],[
     $3=""
     for i in $2; do
         if test -d "$i/$1"; then
@@ -420,13 +418,9 @@ dnl ecos_LDADD, and ecos_LIBS. The latte
 dnl only needs Tcl. If Tk is needed as well then the variable
 dnl ecos_tklibs should be used in addition.
 
-AC_DEFUN(ECOS_PATH_TCL, [
+AC_DEFUN([ECOS_PATH_TCL], [
 
     AC_REQUIRE([ECOS_PROG_MSVC])
-    AC_REQUIRE([AC_CYGWIN])
-
-    ecos_tk_libs=""
-    ecos_tk_libdir=""
 
     dnl Where is the Tcl installation, and what version should be used?
     AC_MSG_CHECKING(for Tcl installation)
@@ -481,21 +475,26 @@ AC_DEFUN(ECOS_PATH_TCL, [
         ecos_tk_libs=""
 
     else
-	dnl Try to find tclConfig.sh
+    dnl ------------------------------------------------------------
+    dnl Not Visual C++ so try to do things properly by finding and
+    dnl using tclConfig.sh
 	possibles=""
 	if test "${with_tcl+set}" = set ; then
 	    possibles="${with_tcl}/lib"
             if test "${with_tcl_version+set}" = set ; then
 		possibles="${possibles} ${with_tcl}/lib/tcl${with_tcl_version}"
+        possibles="${possibles} ${with_tcl}/lib/tk${with_tcl_version}"
 	    fi
         fi
 	possibles="${possibles} ${prefix}/lib"
 	if test "${with_tcl_version+set}" = set ; then
 	    possibles="${possibles} ${prefix}/lib/tcl${with_tcl_version}"
+      possibles="${possibles} ${prefix}/lib/tk${with_tcl_version}"
 	fi
 	possibles="${possibles} /usr/lib"
 	if test "${with_tcl_version+set}" = set ; then
 	    possibles="${possibles} /usr/lib/tcl${with_tcl_version}"
+      possibles="${possibles} /usr/lib/tk${with_tcl_version}"
 	fi
 	AC_FIND_FILE("tclConfig.sh", ${possibles}, tclconfig)
 	if test \! -r "${tclconfig}/tclConfig.sh" ; then
@@ -504,86 +503,143 @@ AC_DEFUN(ECOS_PATH_TCL, [
 	    . ${tclconfig}/tclConfig.sh
 
 	    dnl Now we need to figure out where to find the Tcl header files.
-	    dnl tclConfig.sh may define a variable TCL_INC_DIR, otherwise
-	    dnl use TCL_PREFIX/include
-	    if test -z "${TCL_INC_DIR}" ; then
-		ecos_tcl_incdir="${TCL_PREFIX}/include"
-	    else
+      dnl tclConfig.sh may define a variable TCL_INCLUDE_SPEC or
+      dnl TCL_INCLUDE_DIR, otherwise use TCL_PREFIX/include
+      if test -n "${TCL_INCLUDE_SPEC}" ; then
+        ecos_tcl_incdir="${TCL_INCLUDE_SPEC}"
+      elif test -n "${TCL_INC_DIR}" ; then
 		ecos_tcl_incdir="${TCL_INC_DIR}"
+      else            
+        ecos_tcl_incdir="-I${TCL_PREFIX}/include"
 	    fi
-            if test \! -r "${ecos_tcl_incdir}/tcl.h" ; then
+      dnl But verify that the resulting incdir is valid.
+      ecos_tcl_tmpdir=`echo ${ecos_tcl_incdir} | sed -e "s:-I::g"`
+      if test \! -r "${ecos_tcl_tmpdir}/tcl.h" ; then
 	        AC_MSG_ERROR(unable to locate Tcl header file tcl.h)
 	    else
 		dnl On Unix systems -I/usr/include is unnecessary, and can
         	dnl cause problems on hosts where gcc is not the platform's
 		dnl default compiler because of the use of unfixed headers.
 		dnl Hence it is explicitly removed here.
-		if test "${ecos_tcl_incdir}" != "/usr/include" ; then
-		    ecos_INCLUDES="${ecos_INCLUDES} -I${ecos_tcl_incdir}"
+        if test "${ecos_tcl_incdir}" != "-I/usr/include" ; then
+          ecos_INCLUDES="${ecos_INCLUDES} ${ecos_tcl_incdir}"
 		fi
 	    fi
 
 	    dnl There should be a variable TCL_LIB_SPEC which defines
-	    dnl exactly how to link with Tcl. Unfortunately this is not
-	    dnl 100% guaranteed, so a backup solution is still needed.
-	    dnl NOTE: there is also TCL_LIBS defining additional libraries
-	    dnl such as -ldl. That may have to be added to ecos_LIBS.
-	    if test -z "${TCL_LIB_SPEC}" -a "${with_tcl_version+set}" = set ; then
+      dnl exactly how to link with Tcl. Without that, try to search
+      dnl for a libtcl.a
+      ecos_tcl_libs=""
+      if test -n "${TCL_LIB_SPEC}" ; then
+        ecos_tcl_libs="${ecos_LIBS} ${TCL_LIB_SPEC}"
+      else
+        if test "${with_tcl_version+set}" = set ; then
 		AC_FIND_FILE("libtcl${with_tcl_version}.a", ${possibles}, libtcl)
 		if test -r "${libtcl}/libtcl${with_tcl_version}.a" ; then
-		    TCL_LIB_SPEC="-L${libtcl} -ltcl${with_tcl_version}"
+              ecos_tcl_libs="-L${libtcl} -ltcl${with_tcl_version}"
 		fi
 	    fi
-	    if test -z "${TCL_LIB_SPEC}" ; then
+        if test -z "${ecos_tcl_libs}" ; then
 		AC_FIND_FILE("libtcl.a", ${possibles}, libtcl)
 		if test -r "${libtcl}/libtcl.a" ; then
-		    TCL_LIB_SPEC="-L${libtcl} -ltcl"
+              ecos_tcl_libs="-L${libtcl} -ltcl"
 		fi
 	    fi
-	    if test -z "${TCL_LIB_SPEC}" ; then
+      fi
+
+      dnl If at this stage we have not found a libtcl.a, complain.
+      if test -z "${ecos_tcl_libs}" ; then
 		AC_MSG_ERROR(${tclconfig}/tclConfig.sh does not define TCL_LIB_SPEC, and unable to find libtcl.a)
 	    fi
-	    ecos_LIBS="${ecos_LIBS} ${TCL_LIB_SPEC}"
 
-	    dnl Next, look for tkConfig.sh
+      dnl tclConfig.sh may specify additional flags and libraries.
+      if test -n "${TCL_LIBS}" ; then
+        ecos_tcl_libs="${ecos_tcl_libs} ${TCL_LIBS}"
+      fi
+      if test -n "${TCL_LD_FLAGS}" ; then
+        ecos_tcl_libs="${ecos_tcl_libs} ${TCL_LD_FLAGS}"
+      fi
+      ecos_LIBS="${ecos_LIBS} ${ecos_tcl_libs}"
+    fi
+
+        
+    dnl --------------------------------------------------------
+    dnl We now repeat the exercise for tk and tkConfig.sh, but
+    dnl we assume that the Tk installation is in a similar
+    dnl location to the Tcl one.
 	    possibles=`echo ${possibles} | sed -e 's,tcl,tk,g'`
 	    AC_FIND_FILE("tkConfig.sh", ${possibles}, tkconfig)
 	    if test \! -r "${tkconfig}/tkConfig.sh" ; then
 		AC_MSG_ERROR(unable to locate Tk config file tkConfig.sh)
 	    else
 		. ${tkconfig}/tkConfig.sh
-		if test -z "${TK_INC_DIR}" ; then
-		    if test "${TK_PREFIX}" = "/usr" ; then
-			ecos_tk_includes="${TK_XINCLUDES}"
+
+      if test -n "${TK_INCLUDE_SPEC}" ; then
+          ecos_tk_includes="${TK_INCLUDE_SPEC}"
+      elif test -n "${TK_INC_DIR}" ; then
+          ecos_tk_includes="${TK_INC_DIR}"
+      else
+          ecos_tk_includes="-I${TCL_PREFIX}/include"
+      fi
+      dnl But verify that the resulting incdir is valid.
+      ecos_tk_tmpdir=`echo ${ecos_tk_includes} | sed -e "s:-I::g"`
+      if test \! -r "${ecos_tk_tmpdir}/tk.h" ; then
+        AC_MSG_ERROR(unable to locate Tk header file tk.h)
 		    else
-			ecos_tk_includes="-I${TK_PREFIX}/include ${TK_XINCLUDES}"
+        dnl On Unix systems -I/usr/include is unnecessary, and can
+        dnl cause problems on hosts where gcc is not the platform's
+        dnl default compiler because of the use of unfixed headers.
+        dnl Hence it is explicitly removed here.
+        if test "${ecos_tk_includes}" = "/usr/include" ; then
+  	  ecos_tk_includes=""
 		    fi
-		else
-		    ecos_tk_includes="-I${TK_INC_DIR} ${TK_XINCLUDES}"
+      fi
+      dnl There may be additional include directories for X, although
+      dnl unlikely on a Unix system.
+      if test -n "${TK_XINCLUDES}" ; then
+        ecos_tk_includes="${ecos_tk_includes} ${TK_XINCLUDES}"
 		fi
 
-		dnl As with TCL_LIB_SPEC, TK_LIB_SPEC may be empty
-		if test -z "${TK_LIB_SPEC}" -a "${with_tcl_version+set}" = set ; then
+      ecos_tk_libs=""
+      if test -n "${TK_LIB_SPEC}" ; then
+        ecos_tk_libs="${TK_LIB_SPEC}"
+      else
+        if test "${with_tcl_version+set}" = set ; then
 		    AC_FIND_FILE("libtk${with_tcl_version}.a", ${possibles}, libtk)
 		    if test -r "${libtk}/libtk${with_tcl_version}.a" ; then
-			TK_LIB_SPEC="-L${libtk} -ltk${with_tcl_version}"
+           ecos_tk_libs="-L${libtk} -ltk${with_tcl_version}"
 		    fi
 		fi
-		if test -z "${TK_LIB_SPEC}" ; then
+        if test -z "${ecos_tk_libs}" ; then
 		    AC_FIND_FILE("libtk.a", ${possibles}, libtk)
 		    if test -r "${libtk}/libtk.a" ; then
-			TK_LIB_SPEC="-L${libtk} -ltk"
+            ecos_tk_libs="-L${libtk} -ltk"
 		    fi
 		fi
-		if test -z "${TK_LIB_SPEC}" ; then
+      fi
+      if test -z "${ecos_tk_libs}" ; then
 		    AC_MSG_ERROR(${tkconfig}/tkConfig.sh does not define TK_LIB_SPEC, and unable to find libtk.a)
 		fi
-		ecos_tk_libs="${TK_LIB_SPEC} ${TK_LIBS}"
+
+      dnl Tk may need additional libraries. Unfortunately some of these
+      dnl duplicate the Tcl ones, causing occasional linker upsets. It
+      dnl is assumed here that Tk will only be used in conjunction with
+      dnl tcl.
+      if test -n "${TK_LIBS}" ; then
+        if test -n "${TCL_LIBS}" ; then
+	  ecos_tk_tmp="${TK_LIBS}"
+	  for i in ${TCL_LIBS} ; do
+	    ecos_tk_tmp=`echo ${ecos_tk_tmp} | sed -e "s:${i}::g"`
+	  done
+	  ecos_tk_libs="${ecos_tk_libs} ${ecos_tk_tmp}"
+	else 
+          ecos_tk_libs="${ecos_tk_libs} ${TK_LIBS}"
+	fi
 	    fi
 	fi
     fi
 
-    AC_MSG_RESULT([-I${ecos_tcl_incdir} ${TCL_LIB_SPEC}])
+  AC_MSG_RESULT([${ecos_tcl_incdir} ${TCL_LIB_SPEC}])
     AC_SUBST(ecos_tk_includes)
     AC_SUBST(ecos_tk_libs)
 ])
@@ -599,7 +655,7 @@ dnl This macro should only be used in co
 dnl the infrastructure has been configured because it relies on the
 dnl infra directory already having been created in the build tree.
 
-AC_DEFUN(ECOS_PATH_INFRA, [
+AC_DEFUN([ECOS_PATH_INFRA], [
     AC_MSG_CHECKING([for eCos host-side infrastructure])
 
     dnl Where are we in the build tree? First assume that we are in the host
@@ -670,7 +726,7 @@ dnl ====================================
 dnl And a very similar macro for libcdl, but note that the headers
 dnl are in the source tree rather than the build tree.
 
-AC_DEFUN(ECOS_PATH_LIBCDL, [
+AC_DEFUN([ECOS_PATH_LIBCDL], [
     AC_MSG_CHECKING([for libcdl])
 
     dnl Where are we in the source tree?
@@ -763,7 +819,7 @@ dnl type. This is not guaranteed, but su
 dnl the requirements for the time being. The CHECK_SIZEOF() macro
 dnl might be another way to get the desired information.
 
-AC_DEFUN(ECOS_TYPE_64bit, [
+AC_DEFUN([ECOS_TYPE_64bit], [
     AC_REQUIRE([AC_PROG_CC])
     AC_REQUIRE([AC_PROG_CXX])
 
@@ -793,8 +849,8 @@ AC_DEFUN(ECOS_TYPE_64bit, [
         AC_MSG_ERROR(Unable to figure out how to do 64 bit arithmetic)
     else
         if test "${ecos_cv_type_64bit}" != "long long"; then
-            AC_DEFINE_UNQUOTED(cyg_halint64,${ecos_cv_type_64bit})
-            AC_DEFINE_UNQUOTED(cyg_halcount64,${ecos_cv_type_64bit})
+      AC_DEFINE_UNQUOTED(cyg_halint64,${ecos_cv_type_64bit},[size of 64-bit datatype])
+      AC_DEFINE_UNQUOTED(cyg_halcount64,${ecos_cv_type_64bit},[size of >= 64-bit datatype])
         fi
     fi
 ])
@@ -802,7 +858,7 @@ AC_DEFUN(ECOS_TYPE_64bit, [
 dnl ====================================================================
 dnl Check that both the C and C++ compilers support __PRETTY_FUNCTION__
 
-AC_DEFUN(ECOS_C_PRETTY_FUNCTION,[
+AC_DEFUN([ECOS_C_PRETTY_FUNCTION],[
     AC_REQUIRE([AC_PROG_CC])
     AC_REQUIRE([AC_PROG_CXX])
 
@@ -828,7 +884,7 @@ AC_DEFUN(ECOS_C_PRETTY_FUNCTION,[
         fi
     ])
     if test "${ecos_cv_c_pretty_function}" = "yes"; then
-        AC_DEFINE(CYGDBG_INFRA_DEBUG_FUNCTION_PSEUDOMACRO)
+    AC_DEFINE(CYGDBG_INFRA_DEBUG_FUNCTION_PSEUDOMACRO,[1],[compiler supports __PRETTY_FUNCTION__])
     fi
 ])
 
@@ -850,7 +906,7 @@ dnl These, together with the standard va
 dnl the host-side code to navigate around both source and install
 dnl trees.
 
-AC_DEFUN(ECOS_PACKAGE_DIRS,[
+AC_DEFUN([ECOS_PACKAGE_DIRS],[
 
     dnl srcdir will be something like <path>/packages/<package_path>/<version>/host
     package_dir=`cd ${srcdir} && /bin/pwd`
Index: host/Makefile.am
===================================================================
RCS file: /cvs/ecos/ecos/host/Makefile.am,v
retrieving revision 1.2
diff -u -p -w -r1.2 Makefile.am
--- host/Makefile.am	11 Aug 2002 21:41:38 -0000	1.2
+++ host/Makefile.am	18 Aug 2008 09:25:42 -0000
@@ -40,5 +40,5 @@
 ######DESCRIPTIONEND####
 ## =====================================================================
 
-AUTOMAKE_OPTIONS = 1.3 foreign
-SUBDIRS          = @SUBDIRS@
+AUTOMAKE_OPTIONS = 1.10 foreign
+SUBDIRS          = @subdirs@
Index: host/configure.in
===================================================================
RCS file: /cvs/ecos/ecos/host/configure.in,v
retrieving revision 1.6
diff -u -p -w -r1.6 configure.in
--- host/configure.in	11 Aug 2002 21:41:38 -0000	1.6
+++ host/configure.in	18 Aug 2008 09:25:48 -0000
@@ -54,8 +54,6 @@ dnl recurse into appropriate subdirector
 dnl tree is rather deep, so to avoid having to create lots of intermediate
 dnl configure scripts and associated files the required build tree
 dnl subdirectories are created here.
-SUBDIRS="infra libcdl tools/configtool/standalone/common"
-
 AC_OUTPUT_COMMANDS([
     test -d tools   			       || mkdir tools
     test -d tools/configtool                   || mkdir tools/configtool
@@ -63,6 +61,9 @@ AC_OUTPUT_COMMANDS([
     test -d tools/configtool/standalone/common || mkdir tools/configtool/standalone/common
 ])
 
-AC_SUBST(SUBDIRS)
-AC_CONFIG_SUBDIRS(${SUBDIRS})
+dnl AC_SUBST(SUBDIRS)
+dnl AC_CONFIG_SUBDIRS([${SUBDIRS}])
+AC_CONFIG_SUBDIRS([infra])
+AC_CONFIG_SUBDIRS([libcdl])
+AC_CONFIG_SUBDIRS([tools/configtool/standalone/common])
 AC_OUTPUT(Makefile)
Index: host/infra/Makefile.am
===================================================================
RCS file: /cvs/ecos/ecos/host/infra/Makefile.am,v
retrieving revision 1.3
diff -u -p -w -r1.3 Makefile.am
--- host/infra/Makefile.am	11 Aug 2002 21:42:03 -0000	1.3
+++ host/infra/Makefile.am	18 Aug 2008 09:25:49 -0000
@@ -40,7 +40,7 @@
 ######DESCRIPTIONEND####
 ## =====================================================================
 
-AUTOMAKE_OPTIONS = 1.3 foreign
+AUTOMAKE_OPTIONS = 1.10 foreign
 SUBDIRS          = testsuite
 
 ## The generated makefile is responsible for the following:
Index: host/infra/configure.in
===================================================================
RCS file: /cvs/ecos/ecos/host/infra/configure.in,v
retrieving revision 1.3
diff -u -p -w -r1.3 configure.in
--- host/infra/configure.in	11 Aug 2002 21:42:03 -0000	1.3
+++ host/infra/configure.in	18 Aug 2008 09:26:01 -0000
@@ -98,7 +98,7 @@ AC_ARG_ENABLE(tracebufsize,[  --enable-t
     if test "$enableval" = "no" -o "$enableval" = "yes"; then
         AC_MSG_ERROR("--enable-tracebufsize should be given a suitable value")
     else
-        AC_DEFINE_UNQUOTED(CYGNUM_INFRA_TRACE_VECTOR_SIZE,$enableval)
+        AC_DEFINE_UNQUOTED(CYGNUM_INFRA_TRACE_VECTOR_SIZE,$enableval,[size of trace vector])
     fi
 ])
 
Index: host/libcdl/Makefile.am
===================================================================
RCS file: /cvs/ecos/ecos/host/libcdl/Makefile.am,v
retrieving revision 1.3
diff -u -p -w -r1.3 Makefile.am
--- host/libcdl/Makefile.am	11 Aug 2002 21:44:17 -0000	1.3
+++ host/libcdl/Makefile.am	18 Aug 2008 09:26:02 -0000
@@ -40,7 +40,7 @@
 ######DESCRIPTIONEND####
 ## =====================================================================
 
-AUTOMAKE_OPTIONS 	= 1.3 foreign
+AUTOMAKE_OPTIONS 	= 1.10 foreign
 SUBDIRS          	= testsuite
 
 ## Pick up compiler flags etc. from configury
Index: host/tools/configtool/standalone/common/Makefile.am
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/configtool/standalone/common/Makefile.am,v
retrieving revision 1.4
diff -u -p -w -r1.4 Makefile.am
--- host/tools/configtool/standalone/common/Makefile.am	11 Aug 2002 21:46:16 -0000	1.4
+++ host/tools/configtool/standalone/common/Makefile.am	18 Aug 2008 09:26:23 -0000
@@ -40,7 +40,7 @@
 ######DESCRIPTIONEND####
 ## =====================================================================
 
-AUTOMAKE_OPTIONS = 1.3 cygnus
+AUTOMAKE_OPTIONS = 1.4 cygnus
 SUBDIRS          =
 
 ## Pick up compiler flags etc. from configury
Index: host/tools/ecostest/common/Makefile.am
===================================================================
RCS file: /cvs/ecos/ecos/host/tools/ecostest/common/Makefile.am,v
retrieving revision 1.1
diff -u -p -w -r1.1 Makefile.am
--- host/tools/ecostest/common/Makefile.am	28 Feb 2006 13:19:02 -0000	1.1
+++ host/tools/ecostest/common/Makefile.am	18 Aug 2008 09:26:33 -0000
@@ -39,18 +39,28 @@
 ######DESCRIPTIONEND####
 ## =====================================================================
 
-AUTOMAKE_OPTIONS = 1.3 cygnus
+AUTOMAKE_OPTIONS = 1.10 cygnus
 SUBDIRS          =
 
 ## Pick up an appropriate header file search path from configure
-INCLUDES = -I@cyg_ac_infra_incdir@ -I@cyg_ac_cdl_incdir@ -I@cyg_ac_utils_incdir@ -I@cyg_ac_tcl_incdir@
-
-LIBS     = -L@cyg_ac_infra_libdir@ -L@cyg_ac_cdl_libdir@ \
-           -L@cyg_ac_utils_libdir@ -L@cyg_ac_tcl_libdir@ \
-           $(foreach x,@cyg_ac_cdl_libraries@,-l$x) \
-           $(foreach x,@cyg_ac_infra_libraries@,-l$x) \
-           $(foreach x,@cyg_ac_utils_libraries@,-l$x) \
-           @cyg_ac_tcl_libs@
+##INCLUDES = -I@cyg_ac_infra_incdir@ -I@cyg_ac_cdl_incdir@ -I@cyg_ac_utils_incdir@ -I@cyg_ac_tcl_incdir@
+##
+##LIBS     = -L@cyg_ac_infra_libdir@ -L@cyg_ac_cdl_libdir@ \
+##           -L@cyg_ac_utils_libdir@ -L@cyg_ac_tcl_libdir@ \
+##           $(foreach x,@cyg_ac_cdl_libraries@,-l$x) \
+##           $(foreach x,@cyg_ac_infra_libraries@,-l$x) \
+##           $(foreach x,@cyg_ac_utils_libraries@,-l$x) \
+##           @cyg_ac_tcl_libs@
+
+## Pick up compiler flags etc. from configury
+AM_CFLAGS       = @ecos_CFLAGS@
+AM_CXXFLAGS     = @ecos_CXXFLAGS@
+if MSVC
+  INCLUDES      = @ecos_INCLUDES@ -I@MSVC_SRCDIR@/../../common/common
+else
+  INCLUDES      = @ecos_INCLUDES@ -I$(srcdir)/../../common/common
+endif
+LIBS            = @ecos_LIBS@ @ecos_LDADD@
 
 bin_PROGRAMS = ser_filter permtest
 
Index: packages/devs/eth/synth/ecosynth/current/host/Makefile.am
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/eth/synth/ecosynth/current/host/Makefile.am,v
retrieving revision 1.2
diff -u -p -w -r1.2 Makefile.am
--- packages/devs/eth/synth/ecosynth/current/host/Makefile.am	9 Jul 2003 15:27:44 -0000	1.2
+++ packages/devs/eth/synth/ecosynth/current/host/Makefile.am	18 Aug 2008 09:26:48 -0000
@@ -41,7 +41,7 @@
 ######DESCRIPTIONEND####
 ## =====================================================================
 
-AUTOMAKE_OPTIONS = 1.3 foreign
+AUTOMAKE_OPTIONS = 1.10 foreign
 
 ## Only some platforms are supported. Having the configure script throw
 ## an error when attempting to configure on an unsupported platform
@@ -49,18 +49,17 @@ AUTOMAKE_OPTIONS = 1.3 foreign
 ## the toplevel on unsupported platforms. Instead an automake conditional
 ## is used, leading to null makefiles on unsupported platforms.
 
-if SUPPORTED
-
 AM_CFLAGS       = @ecos_CFLAGS@ -DECOSYNTH_VERSION=\"@VERSION@\" \
  -DECOS_REPOSITORY=\"@ECOS_REPOSITORY@\" \
  -DLIBEXECDIR=\"$(libexecdir)\" \
- -DPACKAGE_DIR=\"@PACKAGE_DIR@\" \
- -DPACKAGE_VERSION=\"@PACKAGE_VERSION@\" \
- -DPACKAGE_INSTALL=\"@PACKAGE_INSTALL@\"
+ -DPKG_DIR=\"@PACKAGE_DIR@\" \
+ -DPKG_VERSION=\"@PACKAGE_VERSION@\" \
+ -DPKG_INSTALL=\"@PACKAGE_INSTALL@\"
 AM_CXXFLAGS     = @ecos_CXXFLAGS@
 INCLUDES        = @ecos_INCLUDES@
 LIBS            = @ecos_LIBS@ @ecos_LDADD@
 
+if SUPPORTED
 ## The synthetic target support consists of a single program rawether,
 ## a number of Tcl scripts, and some additional data files. These are
 ## all installed in a single directory $(libexec)/ecos/<package>_<version>/
Index: packages/devs/eth/synth/ecosynth/current/host/configure.in
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/eth/synth/ecosynth/current/host/configure.in,v
retrieving revision 1.3
diff -u -p -w -r1.3 configure.in
--- packages/devs/eth/synth/ecosynth/current/host/configure.in	25 Sep 2002 19:55:02 -0000	1.3
+++ packages/devs/eth/synth/ecosynth/current/host/configure.in	18 Aug 2008 09:26:59 -0000
@@ -51,6 +51,13 @@ ECOS_CHECK_BUILD_ne_SRC
 AC_CANONICAL_HOST
 AM_INIT_AUTOMAKE(eCos_synthetic_target_ethernet,0.1,0)
 AM_MAINTAINER_MODE
+AC_PROG_CC
+AC_PROG_CXX
+AC_OBJEXT
+AC_EXEEXT
+ECOS_PROG_MSVC
+ECOS_PROG_STANDARD_COMPILER_FLAGS
+ECOS_PACKAGE_DIRS
 
 dnl The current version of the synthetic target is implemented only for
 dnl x86 Linux platforms, so a test is appropriate here. However
@@ -67,14 +74,6 @@ if test "${SUPPORTED}" = "no" ; then
 fi   
 
 if test "${SUPPORTED}" = "yes" ; then
-    AC_PROG_CC
-    AC_PROG_CXX
-    AC_OBJEXT
-    AC_EXEEXT
-    ECOS_PROG_MSVC
-    ECOS_PROG_STANDARD_COMPILER_FLAGS
-    ECOS_PACKAGE_DIRS
-
     dnl Old kernels may not have tun/tap support. rawether can
     dnl still operate via a spare ethernet interface.
     AC_CHECK_HEADERS("linux/if_tun.h",TAP_SUPPORTED="yes",TAP_SUPPORTED="no")
Index: packages/devs/watchdog/synth/current/host/Makefile.am
===================================================================
RCS file: /cvs/ecos/ecos/packages/devs/watchdog/synth/current/host/Makefile.am,v
retrieving revision 1.1
diff -u -p -w -r1.1 Makefile.am
--- packages/devs/watchdog/synth/current/host/Makefile.am	15 Sep 2002 17:50:53 -0000	1.1
+++ packages/devs/watchdog/synth/current/host/Makefile.am	18 Aug 2008 09:27:05 -0000
@@ -41,7 +41,7 @@
 ######DESCRIPTIONEND####
 ## =====================================================================
 
-AUTOMAKE_OPTIONS = 1.3 foreign
+AUTOMAKE_OPTIONS = 1.10 foreign
 
 ## Only some platforms are supported. Having the configure script throw
 ## an error when attempting to configure on an unsupported platform
Index: packages/hal/synth/arch/current/host/Makefile.am
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/synth/arch/current/host/Makefile.am,v
retrieving revision 1.2
diff -u -p -w -r1.2 Makefile.am
--- packages/hal/synth/arch/current/host/Makefile.am	12 Feb 2003 17:23:09 -0000	1.2
+++ packages/hal/synth/arch/current/host/Makefile.am	18 Aug 2008 09:27:23 -0000
@@ -43,7 +43,7 @@
 ######DESCRIPTIONEND####
 ## =====================================================================
 
-AUTOMAKE_OPTIONS = 1.3 foreign
+AUTOMAKE_OPTIONS = 1.10 foreign
 
 ## Only some platforms are supported. Having the configure script throw
 ## an error when attempting to configure on an unsupported platform
@@ -51,18 +51,18 @@ AUTOMAKE_OPTIONS = 1.3 foreign
 ## the toplevel on unsupported platforms. Instead an automake conditional
 ## is used, leading to null makefiles on unsupported platforms.
 
-if SUPPORTED
 
 AM_CFLAGS       = @ecos_CFLAGS@ -DECOSYNTH_VERSION=\"@VERSION@\" \
  -DECOS_REPOSITORY=\"@ECOS_REPOSITORY@\" \
  -DLIBEXECDIR=\"$(libexecdir)\" \
- -DPACKAGE_DIR=\"@PACKAGE_DIR@\" \
- -DPACKAGE_VERSION=\"@PACKAGE_VERSION@\" \
- -DPACKAGE_INSTALL=\"@PACKAGE_INSTALL@\"
+ -DPKG_DIR=\"@PACKAGE_DIR@\" \
+ -DPKG_VERSION=\"@PACKAGE_VERSION@\" \
+ -DPKG_INSTALL=\"@PACKAGE_INSTALL@\"
 AM_CXXFLAGS     = @ecos_CXXFLAGS@
 INCLUDES        = @ecos_INCLUDES@ @ecos_tk_includes@
 LIBS            = @ecos_LIBS@ @ecos_LDADD@
 
+if SUPPORTED
 ## The synthetic target support consists of a single program ecosynth,
 ## a number of Tcl scripts, and some additional data files. These are
 ## all installed in a single directory $(libexec)/ecos/<package>_<version>/
Index: packages/hal/synth/arch/current/host/configure.in
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/synth/arch/current/host/configure.in,v
retrieving revision 1.2
diff -u -p -w -r1.2 configure.in
--- packages/hal/synth/arch/current/host/configure.in	22 Sep 2002 19:21:44 -0000	1.2
+++ packages/hal/synth/arch/current/host/configure.in	18 Aug 2008 09:27:32 -0000
@@ -52,6 +52,14 @@ ECOS_CHECK_BUILD_ne_SRC
 AC_CANONICAL_HOST
 AM_INIT_AUTOMAKE(eCos_synthetic_target_arch,0.1,0)
 AM_MAINTAINER_MODE
+AC_PROG_CC
+AC_PROG_CXX
+AC_OBJEXT
+AC_EXEEXT
+ECOS_PROG_MSVC
+ECOS_PROG_STANDARD_COMPILER_FLAGS
+
+ECOS_PATH_TCL
 
 dnl The current version of the synthetic target is implemented only for
 dnl x86 Linux platforms, so a test is appropriate here. However
@@ -64,15 +72,6 @@ case "${host}" in
     * ) SUPPORTED="no"
 esac
 
-if test "${SUPPORTED}" = "yes" ; then
-    AC_PROG_CC
-    AC_PROG_CXX
-    AC_OBJEXT
-    AC_EXEEXT
-    ECOS_PROG_MSVC
-    ECOS_PROG_STANDARD_COMPILER_FLAGS
-
-    ECOS_PATH_TCL
     dnl Check that the version of tk is sufficiently recent.
     dnl For example the text widget's tag -elide facility was
     dnl added between 8.2 and 8.3. Initial development of
@@ -85,7 +84,6 @@ if test "${SUPPORTED}" = "yes" ; then
         fi
     fi
     ECOS_PACKAGE_DIRS
-fi
 
 AM_CONDITIONAL(SUPPORTED, test "${SUPPORTED}" = "yes")
 
Index: packages/hal/synth/arch/current/host/ecosynth.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/synth/arch/current/host/ecosynth.c,v
retrieving revision 1.2
diff -u -p -w -r1.2 ecosynth.c
--- packages/hal/synth/arch/current/host/ecosynth.c	21 Sep 2002 22:06:27 -0000	1.2
+++ packages/hal/synth/arch/current/host/ecosynth.c	18 Aug 2008 09:27:33 -0000
@@ -135,10 +135,10 @@ main(int argc, char** argv)
     // directory as ecosynth. The Tcl script itself will check whether
     // there is a newer version of itself in the source tree and
     // switch to that instead.
-    assert((strlen(LIBEXECDIR) + strlen(PACKAGE_INSTALL) + 20) < _POSIX_PATH_MAX);
+    assert((strlen(LIBEXECDIR) + strlen(PKG_INSTALL) + 20) < _POSIX_PATH_MAX);
     strcpy(ecosynth_tcl_path, LIBEXECDIR);
     strcat(ecosynth_tcl_path, "/ecos/");
-    strcat(ecosynth_tcl_path, PACKAGE_INSTALL);
+    strcat(ecosynth_tcl_path, PKG_INSTALL);
     strcat(ecosynth_tcl_path, "/ecosynth.tcl");
 
     // Installation sanity checks.
@@ -358,9 +358,9 @@ ecosynth_appinit(Tcl_Interp* interp)
     // The various directories
     Tcl_SetVar(interp, "synth::_ecosynth_repository", ECOS_REPOSITORY, TCL_GLOBAL_ONLY);
     Tcl_SetVar(interp, "synth::_ecosynth_libexecdir", LIBEXECDIR, TCL_GLOBAL_ONLY);
-    Tcl_SetVar(interp, "synth::_ecosynth_package_dir", PACKAGE_DIR, TCL_GLOBAL_ONLY);
-    Tcl_SetVar(interp, "synth::_ecosynth_package_version", PACKAGE_VERSION, TCL_GLOBAL_ONLY);
-    Tcl_SetVar(interp, "synth::_ecosynth_package_install", PACKAGE_INSTALL, TCL_GLOBAL_ONLY);
+    Tcl_SetVar(interp, "synth::_ecosynth_package_dir", PKG_DIR, TCL_GLOBAL_ONLY);
+    Tcl_SetVar(interp, "synth::_ecosynth_package_version", PKG_VERSION, TCL_GLOBAL_ONLY);
+    Tcl_SetVar(interp, "synth::_ecosynth_package_install", PKG_INSTALL, TCL_GLOBAL_ONLY);
     
     return TCL_OK;
 }
Index: packages/io/usb/slave/current/host/Makefile.am
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/usb/slave/current/host/Makefile.am,v
retrieving revision 1.3
diff -u -p -w -r1.3 Makefile.am
--- packages/io/usb/slave/current/host/Makefile.am	27 Mar 2003 23:17:27 -0000	1.3
+++ packages/io/usb/slave/current/host/Makefile.am	18 Aug 2008 09:27:38 -0000
@@ -50,7 +50,7 @@
 ######DESCRIPTIONEND####
 ## =====================================================================
 
-AUTOMAKE_OPTIONS = 1.3 foreign
+AUTOMAKE_OPTIONS = 1.10 foreign
 
 ## Only some platforms are supported. Having the configure script throw
 ## an error when attempting to configure on an unsupported platform
@@ -58,13 +58,13 @@ AUTOMAKE_OPTIONS = 1.3 foreign
 ## the toplevel on unsupported platforms. Instead an automake conditional
 ## is used, leading to null makefiles on unsupported platforms.
 
-if SUPPORTED
-
 AM_CFLAGS       = @ecos_CFLAGS@ -DUSBHOST_VERSION=\"@VERSION@\" -DPKGVERSION=\"@PACKAGE_VERSION@\" -DUSBAUXDIR=\"$(libexecdir)/ecos/@PACKAGE_INSTALL@\"
 AM_CXXFLAGS     = @ecos_CXXFLAGS@
 INCLUDES        = @ecos_INCLUDES@
 LIBS            = @ecos_LIBS@ @ecos_LDADD@
 
+if SUPPORTED
+
 ## The USB testing support consists of two programs, usbhost and
 ## usbchmod, and a number of Tcl scripts. usbhost is executable by the
 ## user so it should get installed in bindir, appropriately prefixed
Index: packages/io/usb/slave/current/host/configure.in
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/usb/slave/current/host/configure.in,v
retrieving revision 1.4
diff -u -p -w -r1.4 configure.in
--- packages/io/usb/slave/current/host/configure.in	26 Jun 2005 21:21:37 -0000	1.4
+++ packages/io/usb/slave/current/host/configure.in	18 Aug 2008 09:27:50 -0000
@@ -60,6 +60,11 @@ ECOS_CHECK_BUILD_ne_SRC
 AC_CANONICAL_HOST
 AM_INIT_AUTOMAKE(usbhost,0.1,0)
 AM_MAINTAINER_MODE
+AC_PROG_CC
+AC_PROG_LN_S
+AC_OBJEXT
+AC_EXEEXT
+ECOS_PROG_STANDARD_COMPILER_FLAGS
 
 dnl The current version of the USB testing support depends on 
 dnl functionality provided only by Linux platforms, and has only been
@@ -76,13 +81,8 @@ esac
 if test "${SUPPORTED}" = "no" ; then
     AC_MSG_WARN([USB testing is only supported on Linux hosts])
 else   
-    AC_PROG_CC
-    AC_PROG_CXX
-    AC_PROG_LN_S
-    AC_OBJEXT
-    AC_EXEEXT
-    ECOS_PROG_MSVC
-    ECOS_PROG_STANDARD_COMPILER_FLAGS
+
+    
     ECOS_PACKAGE_DIRS
 
     ECOS_PATH_TCL
@@ -96,7 +96,7 @@ else   
         fi
     fi
     if test "${SUPPORTED}" = "yes" ; then
-        AC_CHECK_HEADERS("linux/usb.h" "linux/usbdevice_fs.h",,SUPPORTED="no")
+        AC_CHECK_HEADERS("linux/usb/ch9.h" "linux/usbdevice_fs.h",,SUPPORTED="no")
         if test "${SUPPORTED}" = "no" ; then
 	    AC_MSG_WARN([Required Linux kernel functionality does not appear to be available])
 	else
@@ -105,7 +105,7 @@ else   
               ], [
 	          static struct usbdevfs_ctrltransfer xx = { .bRequestType = 0 };
 	      ],
-	          AC_DEFINE(CYGBLD_USE_NEW_FIELD_NAMES)
+	          AC_DEFINE(CYGBLD_USE_NEW_FIELD_NAMES,[1],["use later version of Linux usb data structures])
 	      )
         fi
     fi
Index: packages/services/profile/gprof/current/host/Makefile.am
===================================================================
RCS file: /cvs/ecos/ecos/packages/services/profile/gprof/current/host/Makefile.am,v
retrieving revision 1.1
diff -u -p -w -r1.1 Makefile.am
--- packages/services/profile/gprof/current/host/Makefile.am	21 Mar 2005 13:56:14 -0000	1.1
+++ packages/services/profile/gprof/current/host/Makefile.am	18 Aug 2008 09:28:03 -0000
@@ -39,7 +39,7 @@
 ######DESCRIPTIONEND####
 ## =====================================================================
 
-AUTOMAKE_OPTIONS = 1.3 foreign
+AUTOMAKE_OPTIONS = 1.10 foreign
 
 ## There is just a set of gdb macros
 gdbdir			= @datadir@/ecos/gdbscripts





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]