From 82d6ad71e6c34a0af904f5e2bb10caad8973fe4c Mon Sep 17 00:00:00 2001 From: ellson Date: Thu, 3 Jan 2008 01:28:40 +0000 Subject: [PATCH] installing tcl extensions in language preferred subdir, e.g. /usr/lib64/tcl8.5/ --- configure.ac | 6 ++++++ graphviz.spec.in | 4 +--- tclpkg/Makefile.am | 2 +- tclpkg/gdtclft/Makefile.am | 2 +- tclpkg/gv/Makefile.am | 2 +- tclpkg/tcldot/Makefile.am | 2 +- tclpkg/tclpathplan/Makefile.am | 2 +- tclpkg/tkspline/Makefile.am | 2 +- 8 files changed, 13 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 3b571af0a..59fb070a4 100644 --- a/configure.ac +++ b/configure.ac @@ -1160,6 +1160,11 @@ if test "$HAVE_TCL" = "1"; then fi fi fi + if test -d ${TCLSH_EXEC_PREFIX}/lib${LIBPOSTFIX}/tcl${TCL_VERSION_FOUND}/; then + TCL_INSTALL_DIR=${TCLSH_EXEC_PREFIX}/lib${LIBPOSTFIX}/tcl${TCL_VERSION_FOUND}/AC_PACKAGE_NAME-AC_PACKAGE_VERSION + else + TCL_INSTALL_DIR=${TCLSH_EXEC_PREFIX}/lib${LIBPOSTFIX}/AC_PACKAGE_NAME/tcl + fi if test "x$TCLCONFIG" != "x"; then AC_MSG_RESULT([using $TCLCONFIG]) file=${TCLCONFIG} @@ -1179,6 +1184,7 @@ if test "$HAVE_TCL" = "1"; then fi AC_SUBST(HAVE_TCL) +AC_SUBST(TCL_INSTALL_DIR) AM_CONDITIONAL(WITH_TCL, [test "x${HAVE_TCL}" = "x1"]) diff --git a/graphviz.spec.in b/graphviz.spec.in index 260134618..c464716d2 100644 --- a/graphviz.spec.in +++ b/graphviz.spec.in @@ -468,9 +468,7 @@ Various tcl packages (extensions) for the graphviz tools. %files tcl %defattr(-,root,root,-) -%dir %{_libdir}/graphviz/tcl -%{_libdir}/graphviz/tcl/* -%{_libdir}/graphviz/pkgIndex.tcl +%{_libdir}/tcl* %{_datadir}/graphviz/demo # hack to include gv_tcl.n only if available # always includes tcldot.n, gdtclft.n diff --git a/tclpkg/Makefile.am b/tclpkg/Makefile.am index f5562b7f6..3370314de 100644 --- a/tclpkg/Makefile.am +++ b/tclpkg/Makefile.am @@ -1,7 +1,7 @@ # $Id$ $Revision$ ## Process this file with automake to produce Makefile.in -pkgindexdir = $(libdir)/@PACKAGE@ +pkgindexdir = @TCL_INSTALL_DIR@ pkgindex_DATA = pkgIndex.tcl SUBDIRS = tclstubs tkstubs tclhandle gdtclft tcldot tclpathplan tkspline gv diff --git a/tclpkg/gdtclft/Makefile.am b/tclpkg/gdtclft/Makefile.am index 323d6d89b..27efeb449 100644 --- a/tclpkg/gdtclft/Makefile.am +++ b/tclpkg/gdtclft/Makefile.am @@ -4,7 +4,7 @@ SUBDIRS = demo pdfdir = $(pkgdatadir)/doc/pdf -pkgtcldir = $(pkglibdir)/tcl +pkgtcldir = @TCL_INSTALL_DIR@ AM_CPPFLAGS = \ -I$(top_srcdir) \ diff --git a/tclpkg/gv/Makefile.am b/tclpkg/gv/Makefile.am index f899da8e2..bcbfa5a92 100644 --- a/tclpkg/gv/Makefile.am +++ b/tclpkg/gv/Makefile.am @@ -167,7 +167,7 @@ $(RUBY_data): gv_ruby.cpp gv_ruby.cpp: gv.i $(SWIG) -c++ -ruby -o gv_ruby.cpp $(srcdir)/gv.i -pkgtcldir = $(pkglibdir)/tcl +pkgtcldir = @TCL_INSTALL_DIR@ TCL_data = nodist_libgv_tcl_la_SOURCES = gv_tcl.cpp $(TCL_data) libgv_tcl_la_SOURCES = $(BASESOURCES) gv_dummy_init.cpp diff --git a/tclpkg/tcldot/Makefile.am b/tclpkg/tcldot/Makefile.am index 6f700481a..2818f4af6 100644 --- a/tclpkg/tcldot/Makefile.am +++ b/tclpkg/tcldot/Makefile.am @@ -6,7 +6,7 @@ SUBDIRS = demo pdfdir = $(pkgdatadir)/doc/pdf htmldir = $(pkgdatadir)/doc/html -pkgtcldir = $(pkglibdir)/tcl +pkgtcldir = @TCL_INSTALL_DIR@ AM_CPPFLAGS = \ -I$(top_srcdir) \ diff --git a/tclpkg/tclpathplan/Makefile.am b/tclpkg/tclpathplan/Makefile.am index 589c74607..493b62d91 100644 --- a/tclpkg/tclpathplan/Makefile.am +++ b/tclpkg/tclpathplan/Makefile.am @@ -3,7 +3,7 @@ SUBDIRS = demo -pkgtcldir = $(pkglibdir)/tcl +pkgtcldir = @TCL_INSTALL_DIR@ AM_CPPFLAGS = \ -I$(top_srcdir) \ diff --git a/tclpkg/tkspline/Makefile.am b/tclpkg/tkspline/Makefile.am index d1be99ce2..4ed8609c8 100644 --- a/tclpkg/tkspline/Makefile.am +++ b/tclpkg/tkspline/Makefile.am @@ -3,7 +3,7 @@ SUBDIRS = demo -pkgtcldir = $(pkglibdir)/tcl +pkgtcldir = @TCL_INSTALL_DIR@ pdfdir = $(pkgdatadir)/doc/pdf man = tkspline.n -- 2.40.0