[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Simulavr-devel] Check tcl/python patch
From: |
Oleg Batrashev |
Subject: |
[Simulavr-devel] Check tcl/python patch |
Date: |
Fri, 01 Jul 2005 04:38:33 +0300 |
User-agent: |
Debian Thunderbird 1.0.2 (X11/20050602) |
Hi,
I tried to do as few changes as possible. Patch is made with "cvs diff
-u -N" from root directory.
If there are no tcl or python prerequisites then disabled. User can
provide --disable-examples to disable tcl and python builds. Changed
report when configure finishes. Added libiberty search path as
${with_bfd_path}/lib, because that where binutils install it.
And some simple_ex1 is removed from configure and Makefile.am, because
it fails in configure (probably some files are missing), sorry. Fix it
in patch or after.
And I also have idea to check for binutils version, becuase I had
trouble with it :)
Oleg
Index: Makefile.am
===================================================================
RCS file: /cvsroot/simulavr/simulavrxx/Makefile.am,v
retrieving revision 1.9
diff -u -r1.9 Makefile.am
--- Makefile.am 9 Feb 2005 04:25:33 -0000 1.9
+++ Makefile.am 1 Jul 2005 01:26:17 -0000
@@ -11,7 +11,7 @@
bootstrap
# WAR: Should condition examples directories based on availability of TCL/Itcl
-SUBDIRS = src @ac_regression_subdir@ examples doc
+SUBDIRS = src @ac_regression_subdir@ @examples_subdir@ doc
DIST_SUBDIRS = src regress examples doc
MAINTAINERCLEANFILES = Makefile.in
Index: configure.ac
===================================================================
RCS file: /cvsroot/simulavr/simulavrxx/configure.ac,v
retrieving revision 1.21
diff -u -r1.21 configure.ac
--- configure.ac 29 Jun 2005 03:15:15 -0000 1.21
+++ configure.ac 1 Jul 2005 01:26:17 -0000
@@ -9,6 +9,10 @@
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
+# what to build, set to no if unsatisfied dependencies
+build_tcl_examples=yes
+build_python_examples=yes
+
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
@@ -53,6 +57,7 @@
AC_MSG_NOTICE([got swig])
else
swig_path=""
+ build_tcl_examples=no
fi
if (echo $CXX | grep ccache); then
@@ -65,6 +70,7 @@
AC_SUBST([CXX])
AM_CONDITIONAL(HAVE_WISH, test x$TCL_WISH != x)
+if test x${TCL_WISH} = x; then build_tcl_examples=no; fi
AC_PATH_PROGS(TCL_CONFIG, [tclConfig.sh], [""], [/usr/lib/tcl /usr/lib/tcl8.4
/usr/lib/tcl8.3 /usr/lib/tcl8.2 /usr/lib])
@@ -79,6 +85,7 @@
echo "MYTCL_LIB_SPEC=$MYTCL_LIB_SPEC"
else
AC_MSG_WARN([Failed to find tclConfig.sh... tcl dependent code may fail to
build...ask package maintainer to update configure process])
+ build_tcl_examples=no
fi
@@ -182,7 +189,18 @@
AVR_LIBIBERTY([${libbfd_root_location}/libiberty])
avr_readelf=$(dirname $(dirname [$(which avr-readelf])))
AVR_LIBIBERTY([${avr_readelf}/lib])
+if test x${with_bfd_path} != x; then
+AVR_LIBIBERTY([${with_bfd_path}/lib])
+fi
+
+if test x"${libiberty_location}" == x; then
+AC_MSG_ERROR([
+*** ERROR ***
+
+libiberty.a from binutils is not found
+])
+fi
AC_SUBST([ac_aux_dir])
my_top_builddir=`pwd`/
@@ -205,6 +223,23 @@
AC_SUBST([NonPortableDarwin_GXX_Flags])
AC_SUBST([NonPortableDarwin_LIBADD_Hack])
+AC_ARG_ENABLE([examples], [AC_HELP_STRING([--enable-examples], [build tcl and
python examples (default yes)])])
+
+# what to build
+if test x${enable_examples} = xno; then
+ build_tcl_examples=no
+fi
+
+if test x${build_tcl_examples} = xno -o x${enable_examples} = xno; then
+ build_python_examples=no
+fi
+
+if test x${enable_examples} != xno -o x${build_tcl_examples} = xyes -o
x${build_python_examples} = xyes; then
+ examples_subdir=examples
+ AC_SUBST([examples_subdir])
+fi
+AM_CONDITIONAL(BUILD_TCL_EXAMPLES, [test x${build_tcl_examples} = xyes])
+AM_CONDITIONAL(BUILD_PYTHON_EXAMPLES, [test x${build_python_examples} = xyes])
AC_CONFIG_FILES([Makefile
doc/Makefile
@@ -214,29 +249,29 @@
regress/regress.py
regress/modules/Makefile
regress/test_opcodes/Makefile
- examples/Makefile examples/anacomp/Makefile
examples/simple_ex1/Makefile
+ examples/Makefile examples/anacomp/Makefile
examples/gui.tcl examples/anacomp/check.tcl
examples/anacomp/checkdebug.tcl
examples/anacomp/checkdebug.gdb
])
AC_OUTPUT
-if test "x${swig_path}" == "x"; then
-AC_MSG_WARN([
-*** WARNING ***
-swig not found, so it is not possible to build simulavr.so and tcl examples
will not run. Though simulavrxx itself may be built without it.
-])
-fi
-
-
-echo "swig_path = " ${swig_path}
+echo --- libsimulavrxx prerequisites
echo "libbfd.a location = " ${bfd_a_location}
echo "bfd.h location = " ${bfd_h_location}
-echo "libiberty location = " ${libiberty_location}
+echo "libiberty location = " ${libiberty_location}
+
+echo --- tcl examples prerequisites satisfied - ${build_tcl_examples}
+echo "enable examples = " ${enable_examples} "(default yes)"
+echo "tcl wish = " ${TCL_WISH}
+echo "swig_path = " ${swig_path}
echo "tcl include = " ${TCL_INCLUDE_SPEC}
echo "tcl version = " ${TCL_VERSION}
echo "tcl lib spec = " ${TCL_LIB_SPEC}
echo "my tcl lib spec = " ${MYTCL_LIB_SPEC}
-
+echo --- Python examples prerequisites satisfied - $build_python_examples
+echo "enable examples = " ${enable_examples} "(default yes)"
+echo "tcl examples = " ${build_tcl_examples}
+echo "python = " ${_cv_python_211}
Index: examples/Makefile.am
===================================================================
RCS file: /cvsroot/simulavr/simulavrxx/examples/Makefile.am,v
retrieving revision 1.2
diff -u -r1.2 Makefile.am
--- examples/Makefile.am 27 Jun 2005 02:38:55 -0000 1.2
+++ examples/Makefile.am 1 Jul 2005 01:26:17 -0000
@@ -11,4 +11,4 @@
EXTRA_DIST =
-SUBDIRS = anacomp simple_ex1
\ No newline at end of file
+SUBDIRS = anacomp
\ No newline at end of file
Index: src/Makefile.am
===================================================================
RCS file: /cvsroot/simulavr/simulavrxx/src/Makefile.am,v
retrieving revision 1.19
diff -u -r1.19 Makefile.am
--- src/Makefile.am 4 Jun 2005 03:32:51 -0000 1.19
+++ src/Makefile.am 1 Jul 2005 01:26:17 -0000
@@ -161,7 +161,13 @@
# WAR:: should not build if no swig is detected...
# This is a cheat! Hopefully it works ok...
-all-am: simulavr.so python/_simulavr.so
+if BUILD_TCL_EXAMPLES
+tcl_simulavr = simulavr.so
+endif
+if BUILD_PYTHON_EXAMPLES
+python_simulavr = python/_simulavr.so
+endif
+all-am: ${tcl_simulavr} ${python_simulavr}
# TCL bindings
simulavr_wrap.cpp: $(srcdir)/simulavr.i
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Simulavr-devel] Check tcl/python patch,
Oleg Batrashev <=