From 349ccc7f5d161a4d10ac72cf16ea5073fe071b4e Mon Sep 17 00:00:00 2001 From: dron Date: Fri, 3 Jan 2003 16:27:03 +0000 Subject: [PATCH] The second attempt to automate building :-) A lot of work here should be done. --- ChangeLog | 5 + Makefile.am | 7 +- Makefile.in | 12 +- README | 5 + TODO | 3 + acsite.m4 | 602 ++++++++++++++++++ configure | 940 +++++++++++++++++++++++++++- configure.ac | 47 +- dll/Makefile.am | 6 +- dll/Makefile.in | 11 +- epu/Makefile | 262 ++++++-- epu/Makefile.in | 4 +- include/Makefile.in | 4 +- lib/Makefile | 64 -- lib/Makefile.am | 28 + tcl/Makefile.am | 26 + tcl/Makefile.in | 79 ++- tcl/hypermap | 22 +- tcl/mapview | 23 +- pkgIndex.tcl => tcl/pkgIndex.tcl.in | 2 +- 20 files changed, 1953 insertions(+), 199 deletions(-) create mode 100644 acsite.m4 delete mode 100644 lib/Makefile create mode 100644 lib/Makefile.am rename pkgIndex.tcl => tcl/pkgIndex.tcl.in (64%) diff --git a/ChangeLog b/ChangeLog index 584158b..de161c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-01-03 Andrey Kiselev + + * {a lot}:The second attempt to automate building :-) A lot of work + here should be done. + 2003-01-02 Andrey Kiselev * {a lot}:The first attempt to automate building process diff --git a/Makefile.am b/Makefile.am index ce10684..0ad4b48 100644 --- a/Makefile.am +++ b/Makefile.am @@ -20,10 +20,5 @@ ## Process this file with automake to produce Makefile.in. AUTOMAKE_OPTIONS = dist-bzip2 -SUBDIRS = include dll - -pkgIndex.tcl: - $(ECHO) "package ifneeded Fgis 1.0 \"package require Tk; [list load [file join @libdir@ fgis.so] Fgis]\"" > pkgIndex.tcl - -all: pkgIndex.tcl +SUBDIRS = include dll lib tcl diff --git a/Makefile.in b/Makefile.in index b32fe6f..cf1ac9f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -79,7 +79,9 @@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ -TCL_INCLUDE = @TCL_INCLUDE@ +TCL_INC_DIR = @TCL_INC_DIR@ +TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ +TK_INC_DIR = @TK_INC_DIR@ VERSION = @VERSION@ YACC = @YACC@ am__include = @am__include@ @@ -87,7 +89,7 @@ am__quote = @am__quote@ install_sh = @install_sh@ AUTOMAKE_OPTIONS = dist-bzip2 -SUBDIRS = include dll +SUBDIRS = include dll lib tcl subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -245,6 +247,7 @@ distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) + $(mkinstalldirs) $(distdir)/tcl @list='$(DISTFILES)'; for file in $$list; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ @@ -421,11 +424,6 @@ uninstall-info: uninstall-info-recursive tags tags-recursive uninstall uninstall-am uninstall-info-am \ uninstall-info-recursive uninstall-recursive - -pkgIndex.tcl: - $(ECHO) "package ifneeded Fgis 1.0 \"package require Tk; [list load [file join @libdir@ fgis.so] Fgis]\"" > pkgIndex.tcl - -all: pkgIndex.tcl # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/README b/README index 34d3f51..3887f42 100644 --- a/README +++ b/README @@ -1,5 +1,10 @@ f(GIS) PROJECT +The idea, design and implementation of this software belongs to +Victor Wagner . Unfortunately he had leave GIS area and this +project was dropped for several years. Now it is maintained by +Andrey Kiselev . + fGIS stands for "functional GIS". It means that fGIS uses functional data model rather than object-oriented. Spatial phenomena are interpreted as functions of spatial coordinates, defined on some subset of earth diff --git a/TODO b/TODO index a43c4e8..3e209cc 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,6 @@ +! Tcl/Tk searching code in acsite.m4 must be imroved ! + + Near future Fgis tcl extension: diff --git a/acsite.m4 b/acsite.m4 new file mode 100644 index 0000000..7bdfe02 --- /dev/null +++ b/acsite.m4 @@ -0,0 +1,602 @@ +dnl --------------------------------------------------------------------------- +dnl Guido Draheim , original by Alexandre Oliva +dnl +dnl Synopsis +dnl +dnl AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) +dnl +dnl Description +dnl +dnl This macro substitutes (with AC_SUBST) VARNAME with the expansion of +dnl itself or the DIR variable if specified, taking care of fixing up +dnl ${prefix} and such. +dnl +dnl Side effect: VARNAME is replaced with the expansion. +dnl +dnl AC_SUBST_DIR bases on Alexandre Oliva's AC_DEFINE_DIR macro. +dnl +dnl http://ac-archive.sourceforge.net/Miscellaneous/ac_define_dir.html +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_DEFINE_DIR], [ + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + ac_define_dir=`eval echo [$]$2` + ac_define_dir=`eval echo [$]ac_define_dir` + ifelse($3, , + AC_DEFINE_UNQUOTED($1, "$ac_define_dir"), + AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3)) +]) + +dnl --------------------------------------------------------------------------- +dnl Mathias Hasselmann with modifications +dnl by Andrey Kiselev +dnl +dnl Synopsis +dnl +dnl AC_SUBST_DIR(VARNAME, [DIR]) +dnl +dnl Description +dnl +dnl This macro substitutes (with AC_SUBST) VARNAME with the expansion of itself +dnl or the DIR variable if specified, taking care of fixing up ${prefix} +dnl and such. +dnl +dnl Side effect: VARNAME is replaced with the expansion. +dnl +dnl AC_SUBST_DIR bases on Alexandre Oliva's AC_DEFINE_DIR macro. +dnl +dnl http://ac-archive.sourceforge.net/Miscellaneous/ac_subst_dir.html +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AC_SUBST_DIR], [ + ifelse($2, , , $1=[$]$2) + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" + $1=`eval echo [$]$1` + $1=`eval echo [$]$1` + AC_SUBST($1) +]) + +dnl --------------------------------------------------------------------------- +dnl Following macros for Tcl and Tk searching copied from Expect package +dnl Several Debian-specific additions by +dnl Andrey Kiselev +dnl --------------------------------------------------------------------------- + +AC_DEFUN(CY_AC_PATH_TCLH, [ +# +# Ok, lets find the tcl source trees so we can use the headers +# Warning: transition of version 9 to 10 will break this algorithm +# because 10 sorts before 9. We also look for just tcl. We have to +# be careful that we don't match stuff like tclX by accident. +# the alternative search directory is involked by --with-tclinclude +# +no_tcl=true +AC_MSG_CHECKING(for Tcl private headers) +AC_ARG_WITH(tclinclude, [ --with-tclinclude=DIR directory where tcl private headers are], with_tclinclude=${withval}) +AC_CACHE_VAL(ac_cv_c_tclh,[ +# first check to see if --with-tclinclude was specified +if test x"${with_tclinclude}" != x ; then + if test -f ${with_tclinclude}/tclInt.h ; then + ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` + elif test -f ${with_tclinclude}/generic/tclInt.h ; then + ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` + else + AC_MSG_ERROR([${with_tclinclude} directory doesn't contain private headers]) + fi +fi + +# next check if it came with Tcl configuration file +if test x"${ac_cv_c_tclconfig}" != x ; then + if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then + ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/../generic; pwd)` + fi +fi + +# next check in private source directory +# +# since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_c_tclh}" = x ; then + for i in \ + ${srcdir}/../tcl \ + `ls -dr ${srcdir}/../tcl[[9]].[[0-9]].[[0-9]] ${srcdir}/../tcl[[9]].[[0-9]] 2>/dev/null` \ + `ls -dr ${srcdir}/../tcl[[8]].[[2-9]].[[0-9]] ${srcdir}/../tcl[[8]].[[2-9]] 2>/dev/null` \ + ${srcdir}/../../tcl \ + `ls -dr ${srcdir}/../../tcl[[9]].[[0-9]].[[0-9]] ${srcdir}/../../tcl[[9]].[[0-9]] 2>/dev/null` \ + `ls -dr ${srcdir}/../../tcl[[8]].[[2-9]].[[0-9]] ${srcdir}/../../tcl[[8]].[[2-9]] 2>/dev/null` \ + ${srcdir}/../../../tcl \ + `ls -dr ${srcdir}/../../../tcl[[9]].[[0-9]].[[0-9]] ${srcdir}/../../../tcl[[9]].[[0-9]] 2>/dev/null ` \ + `ls -dr ${srcdir}/../../../tcl[[8]].[[2-9]].[[0-9]] ${srcdir}/../../../tcl[[8]].[[2-9]] 2>/dev/null ` ; do + if test -f $i/generic/tclInt.h ; then + ac_cv_c_tclh=`(cd $i/generic; pwd)` + break + fi + done +fi + +# check Debian-specific locations +if test x"${ac_cv_c_tclh}" = x ; then + for i in \ + `ls -dr /usr/include/tcl[[9]].[[0-9]].[[0-9]]/tcl-private /usr/include/tcl[[9]].[[0-9]]/tcl-private 2>/dev/null` \ + `ls -dr /usr/include/tcl[[8]].[[2-9]].[[0-9]]/tcl-private /usr/include/tcl[[8]].[[2-9]]/tcl-private 2>/dev/null`; do + if test -f $i/generic/tclInt.h ; then + ac_cv_c_tclh=`(cd $i/generic; pwd)` + break + fi + done +fi + +# finally check in a few common install locations +# +# since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_c_tclh}" = x ; then + for i in \ + `ls -dr /usr/lib/tcl[[9]].[[0-9]].[[0-9]]/tcl-private /usr/lib/tcl[[9]].[[0-9]]/tcl-private 2>/dev/null` \ + `ls -dr /usr/lib/tcl[[8]].[[2-9]].[[0-9]]/tcl-private /usr/lib/tcl[[8]].[[2-9]]/tcl-private 2>/dev/null` \ + `ls -dr /usr/local/src/tcl[[9]].[[0-9]].[[0-9]] /usr/local/src/tcl[[9]].[[0-9]] 2>/dev/null` \ + `ls -dr /usr/local/src/tcl[[8]].[[2-9]].[[0-9]] /usr/local/src/tcl[[8]].[[2-9]] 2>/dev/null` \ + `ls -dr /usr/local/lib/tcl[[9]].[[0-9]].[[0-9]] /usr/local/lib/tcl[[9]].[[0-9]] 2>/dev/null` \ + `ls -dr /usr/local/lib/tcl[[8]].[[2-9]].[[0-9]] /usr/local/lib/tcl[[8]].[[2-9]] 2>/dev/null` \ + /usr/local/src/tcl \ + /usr/local/lib/tcl \ + ${prefix}/include ; do + if test -f $i/generic/tclInt.h ; then + ac_cv_c_tclh=`(cd $i/generic; pwd)` + break + fi + done +fi +# see if one is installed +if test x"${ac_cv_c_tclh}" = x ; then + AC_HEADER_CHECK(tclInt.h, ac_cv_c_tclh=installed, ac_cv_c_tclh="") +fi +]) +if test x"${ac_cv_c_tclh}" = x ; then + TCLHDIR="# no Tcl private headers found" + TCLHDIRDASHI="# no Tcl private headers found" + AC_MSG_ERROR([Can't find Tcl private headers]) +fi +if test x"${ac_cv_c_tclh}" != x ; then + no_tcl="" + if test x"${ac_cv_c_tclh}" = x"installed" ; then + AC_MSG_RESULT([is installed]) + TCLHDIR="" + TCLHDIRDASHI="" + TCL_LIBRARY="" + else + AC_MSG_RESULT([found in ${ac_cv_c_tclh}]) + # this hack is cause the TCLHDIR won't print if there is a "-I" in it. + TCLHDIR="${ac_cv_c_tclh}" + TCLHDIRDASHI="-I${ac_cv_c_tclh}" + TCL_LIBRARY=`echo $TCLHDIR | sed -e 's/generic//'`library + fi +fi + +AC_SUBST(TCLHDIR) +AC_SUBST(TCLHDIRDASHI) +AC_SUBST(TCL_LIBRARY) +]) + + +AC_DEFUN(CY_AC_PATH_TCLCONFIG, [ +# +# Ok, lets find the tcl configuration +# First, look for one uninstalled. +# the alternative search directory is invoked by --with-tcl +# + +if test x"${no_tcl}" = x ; then + # we reset no_tcl in case something fails here + no_tcl=true + AC_ARG_WITH(tcl, [ --with-tcl directory containing tcl configuration (tclConfig.sh)], + with_tclconfig=${withval}) + AC_MSG_CHECKING([for Tcl configuration]) + AC_CACHE_VAL(ac_cv_c_tclconfig,[ + + # First check to see if --with-tcl was specified. + if test x"${with_tclconfig}" != x ; then + if test -f "${with_tclconfig}/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` + else + AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) + fi + fi + + # then check for a private Tcl installation + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + ../tcl \ + `ls -dr ../tcl[[9]].[[0-9]].[[0-9]] ../tcl[[9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../tcl[[8]].[[2-9]].[[0-9]] ../tcl[[8]].[[2-9]] 2>/dev/null` \ + ../../tcl \ + `ls -dr ../../tcl[[9]].[[0-9]].[[0-9]] ../../tcl[[9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../../tcl[[8]].[[2-9]].[[0-9]] ../../tcl[[8]].[[2-9]] 2>/dev/null` \ + ../../../tcl \ + `ls -dr ../../../tcl[[9]].[[0-9]].[[0-9]] ../../../tcl[[9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../../../tcl[[8]].[[2-9]].[[0-9]] ../../../tcl[[8]].[[2-9]] 2>/dev/null` ; do + if test -f "$i/unix/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + # check in a few common install locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do + if test -f "$i/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i; pwd)` + break + fi + done + fi + + # check Debian-specific locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + `ls -dr /usr/lib/tcl[[9]].[[0-9]].[[0-9]] /usr/lib/tcl[[9]].[[0-9]] 2>/dev/null` \ + `ls -dr /usr/lib/tcl[[8]].[[2-9]].[[0-9]] /usr/lib/tcl[[8]].[[2-9]] 2>/dev/null` ; do + if test -f "$i/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i; pwd)` + break + fi + done + fi + + # check in a few other private locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + ${srcdir}/../tcl \ + `ls -dr ${srcdir}/../tcl[[9]].[[0-9]].[[0-9]] ${srcdir}/../tcl[[9]].[[0-9]] 2>/dev/null` \ + `ls -dr ${srcdir}/../tcl[[8]].[[2-9]].[[0-9]] ${srcdir}/../tcl[[8]].[[2-9]] 2>/dev/null` ; do + if test -f "$i/unix/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + ]) + if test x"${ac_cv_c_tclconfig}" = x ; then + TCLCONFIG="# no Tcl configs found" + AC_MSG_WARN(Can't find Tcl configuration definitions) + else + no_tcl= + TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh + AC_MSG_RESULT(found $TCLCONFIG) + fi +fi +]) + +# Defined as a separate macro so we don't have to cache the values +# from PATH_TCLCONFIG (because this can also be cached). +AC_DEFUN(CY_AC_LOAD_TCLCONFIG, [ + . $TCLCONFIG + +dnl AC_SUBST(TCL_VERSION) +dnl AC_SUBST(TCL_MAJOR_VERSION) +dnl AC_SUBST(TCL_MINOR_VERSION) +dnl AC_SUBST(TCL_CC) + AC_SUBST(TCL_DEFS) +dnl following is just to test if missing symbol can be handled by configure + AC_SUBST(TCL_DELETEME) + AC_SUBST(TCL_DBGX) + +dnl not used, don't export to save symbols +dnl AC_SUBST(TCL_LIB_FILE) + +dnl don't export, not used outside of configure +dnl AC_SUBST(TCL_LIBS) +dnl not used, don't export to save symbols +dnl AC_SUBST(TCL_PREFIX) + + AC_SUBST(TCL_EXEC_PREFIX) + +dnl not used, don't export to save symbols +dnl AC_SUBST(TCL_SHLIB_CFLAGS) + AC_SUBST(TCL_SHLIB_LD) +dnl don't export, not used outside of configure +dnl AC_SUBST(TCL_SHLIB_LD_LIBS) + +# Tcl defines TCL_SHLIB_SUFFIX but TCL_SHARED_LIB_SUFFIX then looks for it +# as just SHLIB_SUFFIX. How bizarre. + SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX + AC_SUBST(SHLIB_SUFFIX) + +dnl not used, don't export to save symbols +dnl AC_SUBST(TCL_DL_LIBS) + AC_SUBST(TCL_LD_FLAGS) +dnl don't export, not used outside of configure +dnl AC_SUBST(TCL_LD_SEARCH_FLAGS) +dnl AC_SUBST(TCL_COMPAT_OBJS) +dnl AC_SUBST(TCL_RANLIB) + +# if Tcl's build directory has been removed, TCL_LIB_SPEC should +# be used instead of TCL_BUILD_LIB_SPEC +SAVELIBS=$LIBS +# eval used to expand out TCL_DBGX +eval "LIBS=\"$TCL_BUILD_LIB_SPEC $TCL_LIBS\"" +AC_MSG_CHECKING([Tcl build library]) +AC_MSG_RESULT($LIBS) + +AC_CHECK_FUNC(Tcl_CreateCommand,[ + AC_MSG_CHECKING([if Tcl library build specification is valid]) + AC_MSG_RESULT(yes) +],[ + TCL_BUILD_LIB_SPEC=$TCL_LIB_SPEC + # Can't pull the following CHECKING call out since it will be + # broken up by the CHECK_FUNC just above. + AC_MSG_CHECKING([if Tcl library build specification is valid]) + AC_MSG_RESULT(no) +]) +LIBS=$SAVELIBS + + AC_SUBST(TCL_BUILD_LIB_SPEC) + AC_SUBST(TCL_LIB_SPEC) +dnl AC_SUBST(TCL_LIB_VERSIONS_OK) + + AC_SUBST(TCL_SHARED_LIB_SUFFIX) + +dnl not used, don't export to save symbols +dnl AC_SUBST(TCL_UNSHARED_LIB_SUFFIX) +]) + +# Warning: Tk definitions are very similar to Tcl definitions but +# are not precisely the same. There are a couple of differences, +# so don't do changes to Tcl thinking you can cut and paste it do +# the Tk differences and later simply substitute "Tk" for "Tcl". +# Known differences: +# - Acceptable Tcl major version #s is 8.2-9.* while Tk is 8.2-9.* +# - Searching for Tcl includes looking for tclInt.h, Tk looks for tk.h +# - Computing major/minor versions is different because Tk depends on +# headers to Tcl, Tk, and X. +# - Symbols in tkConfig.sh are different than tclConfig.sh +# - Acceptable for Tk to be missing but not Tcl. + +AC_DEFUN(CY_AC_PATH_TKH, [ +# +# Ok, lets find the tk source trees so we can use the headers +# If the directory (presumably symlink) named "tk" exists, use that one +# in preference to any others. Same logic is used when choosing library +# and again with Tcl. The search order is the best place to look first, then in +# decreasing significance. The loop breaks if the trigger file is found. +# Note the gross little conversion here of srcdir by cd'ing to the found +# directory. This converts the path from a relative to an absolute, so +# recursive cache variables for the path will work right. We check all +# the possible paths in one loop rather than many seperate loops to speed +# things up. +# the alternative search directory is involked by --with-tkinclude +# +#no_tk=true +AC_MSG_CHECKING(for Tk private headers) +AC_ARG_WITH(tkinclude, [ --with-tkinclude directory where tk private headers are], with_tkinclude=${withval}) +AC_CACHE_VAL(ac_cv_c_tkh,[ +# first check to see if --with-tkinclude was specified +if test x"${with_tkinclude}" != x ; then + if test -f ${with_tkinclude}/tk.h ; then + ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` + elif test -f ${with_tkinclude}/generic/tk.h ; then + ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` + else + AC_MSG_ERROR([${with_tkinclude} directory doesn't contain private headers]) + fi +fi + +# next check if it came with Tk configuration file +if test x"${ac_cv_c_tkconfig}" != x ; then + if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then + ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/../generic; pwd)` + fi +fi + +# next check in private source directory +# +# since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_c_tkh}" = x ; then + for i in \ + ${srcdir}/../tk \ + `ls -dr ${srcdir}/../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../tk[[4-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ${srcdir}/../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../tk[[4-9]].[[0-9]] 2>/dev/null` \ + ${srcdir}/../../tk \ + `ls -dr ${srcdir}/../../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../../tk[[4-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ${srcdir}/../../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../../tk[[4-9]].[[0-9]] 2>/dev/null` \ + ${srcdir}/../../../tk \ + `ls -dr ${srcdir}/../../../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../../../tk[[4-9]].[[0-9]] 2>/dev/null ` \ + `ls -dr ${srcdir}/../../../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../../../tk[[4-9]].[[0-9]] 2>/dev/null ` ; do + if test -f $i/generic/tk.h ; then + ac_cv_c_tkh=`(cd $i/generic; pwd)` + break + fi + done +fi + +# check Debian-specific locations +if test x"${ac_cv_c_tkh}" = x ; then + for i in \ + `ls -dr /usr/include/tcl[[9]].[[0-9]].[[0-9]]/tk-private /usr/include/tcl[[9]].[[0-9]]/tk-private 2>/dev/null` \ + `ls -dr /usr/include/tcl[[8]].[[2-9]].[[0-9]]/tk-private /usr/include/tcl[[8]].[[2-9]]/tk-private 2>/dev/null` ; do + if test -f $i/generic/tk.h ; then + ac_cv_c_tkh=`(cd $i/generic; pwd)` + break + fi + done +fi + +# finally check in a few common install locations +# +# since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_c_tkh}" = x ; then + for i in \ + `ls -dr /usr/local/src/tk[[4-9]].[[0-9]].[[0-9]] /usr/local/src/tk[[4-9]].[[0-9]] 2>/dev/null` \ + `ls -dr /usr/local/src/tk[[4-9]].[[0-9]].[[0-9]] /usr/local/src/tk[[4-9]].[[0-9]] 2>/dev/null` \ + `ls -dr /usr/local/lib/tk[[4-9]].[[0-9]].[[0-9]] /usr/local/lib/tk[[4-9]].[[0-9]] 2>/dev/null` \ + `ls -dr /usr/local/lib/tk[[4-9]].[[0-9]].[[0-9]] /usr/local/lib/tk[[4-9]].[[0-9]] 2>/dev/null` \ + /usr/local/src/tk \ + /usr/local/lib/tk \ + ${prefix}/include ; do + if test -f $i/generic/tk.h ; then + ac_cv_c_tkh=`(cd $i/generic; pwd)` + break + fi + done +fi +# see if one is installed +if test x"${ac_cv_c_tkh}" = x ; then + AC_HEADER_CHECK(tk.h, ac_cv_c_tkh=installed, ac_cv_c_tkh="") +fi +]) +if test x"${ac_cv_c_tkh}" != x ; then +# no_tk="" + if test x"${ac_cv_c_tkh}" = x"installed" ; then + AC_MSG_RESULT([is installed]) + TKHDIRDASHI="" + else + AC_MSG_RESULT([found in ${ac_cv_c_tkh}]) + # this hack is cause the TKHDIRDASHI won't print if there is a "-I" in it. + TKHDIRDASHI="-I${ac_cv_c_tkh}" + fi +else + TKHDIRDASHI="# no Tk directory found" + AC_MSG_WARN([Can't find Tk private headers]) + no_tk=true +fi + +AC_SUBST(TKHDIRDASHI) +]) + + +AC_DEFUN(CY_AC_PATH_TKCONFIG, [ +# +# Ok, lets find the tk configuration +# First, look for one uninstalled. +# the alternative search directory is invoked by --with-tk +# + +if test x"${no_tk}" = x ; then + # we reset no_tk in case something fails here + no_tk=true + AC_ARG_WITH(tk, [ --with-tk directory containing tk configuration (tkConfig.sh)], + with_tkconfig=${withval}) + AC_MSG_CHECKING([for Tk configuration]) + AC_CACHE_VAL(ac_cv_c_tkconfig,[ + + # First check to see if --with-tk was specified. + if test x"${with_tkconfig}" != x ; then + if test -f "${with_tkconfig}/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` + else + AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) + fi + fi + + # then check for a private Tk library + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in \ + ../tk \ + `ls -dr ../tk[[4-9]].[[0-9]].[[0-9]] ../tk[[4-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../tk[[4-9]].[[0-9]].[[0-9]] ../tk[[4-9]].[[0-9]] 2>/dev/null` \ + ../../tk \ + `ls -dr ../../tk[[4-9]].[[0-9]].[[0-9]] ../../tk[[4-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../../tk[[4-9]].[[0-9]].[[0-9]] ../../tk[[4-9]].[[0-9]] 2>/dev/null` \ + ../../../tk \ + `ls -dr ../../../tk[[4-9]].[[0-9]].[[0-9]] ../../../tk[[4-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ../../../tk[[4-9]].[[0-9]].[[0-9]] ../../../tk[[4-9]].[[0-9]] 2>/dev/null` ; do + if test -f "$i/unix/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + # check in a few common install locations + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do + if test -f "$i/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i; pwd)` + break + fi + done + fi + # check Debian-specific locations + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in \ + `ls -dr /usr/lib/tk[[4-9]].[[0-9]].[[0-9]] /usr/lib/tk[[4-9]].[[0-9]] 2>/dev/null` \ + `ls -dr /usr/lib/tk[[4-9]].[[0-9]].[[0-9]] /usr/lib/tk[[4-9]].[[0-9]] 2>/dev/null` ; do + if test -f "$i/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i; pwd)` + break + fi + done + fi + # check in a few other private locations + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in \ + ${srcdir}/../tk \ + `ls -dr ${srcdir}/../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../tk[[4-9]].[[0-9]] 2>/dev/null` \ + `ls -dr ${srcdir}/../tk[[4-9]].[[0-9]].[[0-9]] ${srcdir}/../tk[[4-9]].[[0-9]] 2>/dev/null` ; do + if test -f "$i/unix/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + ]) + if test x"${ac_cv_c_tkconfig}" = x ; then + TKCONFIG="# no Tk configs found" + AC_MSG_WARN(Can't find Tk configuration definitions) + else + no_tk= + TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh + AC_MSG_RESULT(found $TKCONFIG) + fi +fi + +]) + +# Defined as a separate macro so we don't have to cache the values +# from PATH_TKCONFIG (because this can also be cached). +AC_DEFUN(CY_AC_LOAD_TKCONFIG, [ + if test -f "$TKCONFIG" ; then + . $TKCONFIG + fi + + AC_SUBST(TK_VERSION) +dnl not actually used, don't export to save symbols +dnl AC_SUBST(TK_MAJOR_VERSION) +dnl AC_SUBST(TK_MINOR_VERSION) + AC_SUBST(TK_DEFS) + + AC_SUBST(TK_DBGX) +dnl not used, don't export to save symbols + dnl AC_SUBST(TK_LIB_FILE) + +dnl not used outside of configure +dnl AC_SUBST(TK_LIBS) +dnl not used, don't export to save symbols +dnl AC_SUBST(TK_PREFIX) + +dnl not used, don't export to save symbols +dnl AC_SUBST(TK_EXEC_PREFIX) + + AC_SUBST(TK_XINCLUDES) + AC_SUBST(TK_XLIBSW) + +# if Tk's build directory has been removed, TK_LIB_SPEC should +# be used instead of TK_BUILD_LIB_SPEC +SAVELIBS=$LIBS +# eval used to expand out TK_DBGX +eval "LIBS=\"$TK_BUILD_LIB_SPEC $TCL_BUILD_LIB_SPEC $TK_LIBS\"" +AC_CHECK_FUNC(Tk_Init,[ + AC_MSG_CHECKING([if Tk library build specification is valid]) + AC_MSG_RESULT(yes) +],[ + TK_BUILD_LIB_SPEC=$TK_LIB_SPEC + # Can't pull the following CHECKING call out since it will be + # broken up by the CHECK_FUNC just above. + AC_MSG_CHECKING([if Tk library build specification is valid]) + AC_MSG_RESULT(no) +]) +LIBS=$SAVELIBS + + AC_SUBST(TK_BUILD_LIB_SPEC) + AC_SUBST(TK_LIB_SPEC) +]) + diff --git a/configure b/configure index d2f035a..5019fd4 100755 --- a/configure +++ b/configure @@ -1010,7 +1010,10 @@ Optional Packages: --with-gnu-ld assume the C compiler uses GNU ld default=no --with-pic try to use only PIC/non-PIC objects default=use both --with-x use the X Window System - --with-tcl=ARG Include Tcl support (ARG=yes or path) + --with-tclinclude=DIR directory where tcl private headers are + --with-tcl directory containing tcl configuration (tclConfig.sh) + --with-tkinclude directory where tk private headers are + --with-tk directory containing tk configuration (tkConfig.sh) Some influential environment variables: CC C compiler command @@ -4173,7 +4176,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4176 "configure"' > conftest.$ac_ext + echo '#line 4179 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4709,7 +4712,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:4712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:4715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -6507,7 +6510,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <>confdefs.h <<_ACEOF -#define FGIS_CONFIG "$sysconfdir" +#define FGIS_CONFIG "$ac_define_dir" _ACEOF -# Check whether --with-tcl or --without-tcl was given. -if test "${with_tcl+set}" = set; then - withval="$with_tcl" + FGIS_LIBDIR=$"$libdir" + test "x$prefix" = xNONE && prefix="$ac_default_prefix" + test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" + FGIS_LIBDIR=`eval echo $FGIS_LIBDIR` + FGIS_LIBDIR=`eval echo $FGIS_LIBDIR` + + + + + +# +# Ok, lets find the tcl source trees so we can use the headers +# Warning: transition of version 9 to 10 will break this algorithm +# because 10 sorts before 9. We also look for just tcl. We have to +# be careful that we don't match stuff like tclX by accident. +# the alternative search directory is involked by --with-tclinclude +# +no_tcl=true +echo "$as_me:$LINENO: checking for Tcl private headers" >&5 +echo $ECHO_N "checking for Tcl private headers... $ECHO_C" >&6 + +# Check whether --with-tclinclude or --without-tclinclude was given. +if test "${with_tclinclude+set}" = set; then + withval="$with_tclinclude" + with_tclinclude=${withval} fi; -if test "$with_tcl" = "yes" -o "$with_tcl" = "" ; then +if test "${ac_cv_c_tclh+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# first check to see if --with-tclinclude was specified +if test x"${with_tclinclude}" != x ; then + if test -f ${with_tclinclude}/tclInt.h ; then + ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)` + elif test -f ${with_tclinclude}/generic/tclInt.h ; then + ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)` + else + { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory doesn't contain private headers" >&5 +echo "$as_me: error: ${with_tclinclude} directory doesn't contain private headers" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# next check if it came with Tcl configuration file +if test x"${ac_cv_c_tclconfig}" != x ; then + if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then + ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/../generic; pwd)` + fi +fi + +# next check in private source directory +# +# since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_c_tclh}" = x ; then + for i in \ + ${srcdir}/../tcl \ + `ls -dr ${srcdir}/../tcl[9].[0-9].[0-9] ${srcdir}/../tcl[9].[0-9] 2>/dev/null` \ + `ls -dr ${srcdir}/../tcl[8].[2-9].[0-9] ${srcdir}/../tcl[8].[2-9] 2>/dev/null` \ + ${srcdir}/../../tcl \ + `ls -dr ${srcdir}/../../tcl[9].[0-9].[0-9] ${srcdir}/../../tcl[9].[0-9] 2>/dev/null` \ + `ls -dr ${srcdir}/../../tcl[8].[2-9].[0-9] ${srcdir}/../../tcl[8].[2-9] 2>/dev/null` \ + ${srcdir}/../../../tcl \ + `ls -dr ${srcdir}/../../../tcl[9].[0-9].[0-9] ${srcdir}/../../../tcl[9].[0-9] 2>/dev/null ` \ + `ls -dr ${srcdir}/../../../tcl[8].[2-9].[0-9] ${srcdir}/../../../tcl[8].[2-9] 2>/dev/null ` ; do + if test -f $i/generic/tclInt.h ; then + ac_cv_c_tclh=`(cd $i/generic; pwd)` + break + fi + done +fi - echo "$as_me:$LINENO: checking for Tcl_CreateCommand in -ltcl8.3" >&5 -echo $ECHO_N "checking for Tcl_CreateCommand in -ltcl8.3... $ECHO_C" >&6 -if test "${ac_cv_lib_tcl8_3_Tcl_CreateCommand+set}" = set; then +# check Debian-specific locations +if test x"${ac_cv_c_tclh}" = x ; then + for i in \ + `ls -dr /usr/include/tcl[9].[0-9].[0-9]/tcl-private /usr/include/tcl[9].[0-9]/tcl-private 2>/dev/null` \ + `ls -dr /usr/include/tcl[8].[2-9].[0-9]/tcl-private /usr/include/tcl[8].[2-9]/tcl-private 2>/dev/null`; do + if test -f $i/generic/tclInt.h ; then + ac_cv_c_tclh=`(cd $i/generic; pwd)` + break + fi + done +fi + +# finally check in a few common install locations +# +# since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_c_tclh}" = x ; then + for i in \ + `ls -dr /usr/lib/tcl[9].[0-9].[0-9]/tcl-private /usr/lib/tcl[9].[0-9]/tcl-private 2>/dev/null` \ + `ls -dr /usr/lib/tcl[8].[2-9].[0-9]/tcl-private /usr/lib/tcl[8].[2-9]/tcl-private 2>/dev/null` \ + `ls -dr /usr/local/src/tcl[9].[0-9].[0-9] /usr/local/src/tcl[9].[0-9] 2>/dev/null` \ + `ls -dr /usr/local/src/tcl[8].[2-9].[0-9] /usr/local/src/tcl[8].[2-9] 2>/dev/null` \ + `ls -dr /usr/local/lib/tcl[9].[0-9].[0-9] /usr/local/lib/tcl[9].[0-9] 2>/dev/null` \ + `ls -dr /usr/local/lib/tcl[8].[2-9].[0-9] /usr/local/lib/tcl[8].[2-9] 2>/dev/null` \ + /usr/local/src/tcl \ + /usr/local/lib/tcl \ + ${prefix}/include ; do + if test -f $i/generic/tclInt.h ; then + ac_cv_c_tclh=`(cd $i/generic; pwd)` + break + fi + done +fi +# see if one is installed +if test x"${ac_cv_c_tclh}" = x ; then + if test "${ac_cv_header_tclInt_h+set}" = set; then + echo "$as_me:$LINENO: checking for tclInt.h" >&5 +echo $ECHO_N "checking for tclInt.h... $ECHO_C" >&6 +if test "${ac_cv_header_tclInt_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_tclInt_h" >&5 +echo "${ECHO_T}$ac_cv_header_tclInt_h" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ltcl8.3 $LIBS $LIBS" + # Is the header compilable? +echo "$as_me:$LINENO: checking tclInt.h usability" >&5 +echo $ECHO_N "checking tclInt.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking tclInt.h presence" >&5 +echo $ECHO_N "checking tclInt.h presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" #include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: tclInt.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: tclInt.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: tclInt.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: tclInt.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: tclInt.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: tclInt.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: tclInt.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: tclInt.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: tclInt.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: tclInt.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for tclInt.h" >&5 +echo $ECHO_N "checking for tclInt.h... $ECHO_C" >&6 +if test "${ac_cv_header_tclInt_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_tclInt_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_tclInt_h" >&5 +echo "${ECHO_T}$ac_cv_header_tclInt_h" >&6 + +fi +if test $ac_cv_header_tclInt_h = yes; then + ac_cv_c_tclh=installed +else + ac_cv_c_tclh="" +fi + + +fi +fi + +if test x"${ac_cv_c_tclh}" = x ; then + TCLHDIR="# no Tcl private headers found" + TCLHDIRDASHI="# no Tcl private headers found" + { { echo "$as_me:$LINENO: error: Can't find Tcl private headers" >&5 +echo "$as_me: error: Can't find Tcl private headers" >&2;} + { (exit 1); exit 1; }; } +fi +if test x"${ac_cv_c_tclh}" != x ; then + no_tcl="" + if test x"${ac_cv_c_tclh}" = x"installed" ; then + echo "$as_me:$LINENO: result: is installed" >&5 +echo "${ECHO_T}is installed" >&6 + TCLHDIR="" + TCLHDIRDASHI="" + TCL_LIBRARY="" + else + echo "$as_me:$LINENO: result: found in ${ac_cv_c_tclh}" >&5 +echo "${ECHO_T}found in ${ac_cv_c_tclh}" >&6 + # this hack is cause the TCLHDIR won't print if there is a "-I" in it. + TCLHDIR="${ac_cv_c_tclh}" + TCLHDIRDASHI="-I${ac_cv_c_tclh}" + TCL_LIBRARY=`echo $TCLHDIR | sed -e 's/generic//'`library + fi +fi + + + + + +if test x"$no_tcl" = x"true" ; then + echo " ERROR: Can't find Tcl headers or library." + echo " See README for information on how to obtain Tcl." + echo " If Tcl is installed, see INSTALL on how to tell" + echo " configure where Tcl is installed." + exit 1 +fi + +# +# Ok, lets find the tcl configuration +# First, look for one uninstalled. +# the alternative search directory is invoked by --with-tcl +# + +if test x"${no_tcl}" = x ; then + # we reset no_tcl in case something fails here + no_tcl=true + +# Check whether --with-tcl or --without-tcl was given. +if test "${with_tcl+set}" = set; then + withval="$with_tcl" + with_tclconfig=${withval} +fi; + echo "$as_me:$LINENO: checking for Tcl configuration" >&5 +echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6 + if test "${ac_cv_c_tclconfig+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + # First check to see if --with-tcl was specified. + if test x"${with_tclconfig}" != x ; then + if test -f "${with_tclconfig}/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` + else + { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5 +echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;} + { (exit 1); exit 1; }; } + fi + fi + + # then check for a private Tcl installation + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + ../tcl \ + `ls -dr ../tcl[9].[0-9].[0-9] ../tcl[9].[0-9] 2>/dev/null` \ + `ls -dr ../tcl[8].[2-9].[0-9] ../tcl[8].[2-9] 2>/dev/null` \ + ../../tcl \ + `ls -dr ../../tcl[9].[0-9].[0-9] ../../tcl[9].[0-9] 2>/dev/null` \ + `ls -dr ../../tcl[8].[2-9].[0-9] ../../tcl[8].[2-9] 2>/dev/null` \ + ../../../tcl \ + `ls -dr ../../../tcl[9].[0-9].[0-9] ../../../tcl[9].[0-9] 2>/dev/null` \ + `ls -dr ../../../tcl[8].[2-9].[0-9] ../../../tcl[8].[2-9] 2>/dev/null` ; do + if test -f "$i/unix/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + # check in a few common install locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do + if test -f "$i/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i; pwd)` + break + fi + done + fi + + # check Debian-specific locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + `ls -dr /usr/lib/tcl[9].[0-9].[0-9] /usr/lib/tcl[9].[0-9] 2>/dev/null` \ + `ls -dr /usr/lib/tcl[8].[2-9].[0-9] /usr/lib/tcl[8].[2-9] 2>/dev/null` ; do + if test -f "$i/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i; pwd)` + break + fi + done + fi + + # check in a few other private locations + if test x"${ac_cv_c_tclconfig}" = x ; then + for i in \ + ${srcdir}/../tcl \ + `ls -dr ${srcdir}/../tcl[9].[0-9].[0-9] ${srcdir}/../tcl[9].[0-9] 2>/dev/null` \ + `ls -dr ${srcdir}/../tcl[8].[2-9].[0-9] ${srcdir}/../tcl[8].[2-9] 2>/dev/null` ; do + if test -f "$i/unix/tclConfig.sh" ; then + ac_cv_c_tclconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + +fi + + if test x"${ac_cv_c_tclconfig}" = x ; then + TCLCONFIG="# no Tcl configs found" + { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5 +echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} + else + no_tcl= + TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh + echo "$as_me:$LINENO: result: found $TCLCONFIG" >&5 +echo "${ECHO_T}found $TCLCONFIG" >&6 + fi +fi + + + . $TCLCONFIG + + + + + + + + + + + +# Tcl defines TCL_SHLIB_SUFFIX but TCL_SHARED_LIB_SUFFIX then looks for it +# as just SHLIB_SUFFIX. How bizarre. + SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX + + + + +# if Tcl's build directory has been removed, TCL_LIB_SPEC should +# be used instead of TCL_BUILD_LIB_SPEC +SAVELIBS=$LIBS +# eval used to expand out TCL_DBGX +eval "LIBS=\"$TCL_BUILD_LIB_SPEC $TCL_LIBS\"" +echo "$as_me:$LINENO: checking Tcl build library" >&5 +echo $ECHO_N "checking Tcl build library... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $LIBS" >&5 +echo "${ECHO_T}$LIBS" >&6 + +echo "$as_me:$LINENO: checking for Tcl_CreateCommand" >&5 +echo $ECHO_N "checking for Tcl_CreateCommand... $ECHO_C" >&6 +if test "${ac_cv_func_Tcl_CreateCommand+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char Tcl_CreateCommand (); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" @@ -10409,6 +10794,8 @@ extern "C" /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char Tcl_CreateCommand (); +char (*f) (); + #ifdef F77_DUMMY_MAIN # ifdef __cplusplus extern "C" @@ -10418,7 +10805,15 @@ char Tcl_CreateCommand (); int main () { -Tcl_CreateCommand (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_Tcl_CreateCommand) || defined (__stub___Tcl_CreateCommand) +choke me +#else +f = Tcl_CreateCommand; +#endif + ; return 0; } @@ -10435,42 +10830,493 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_tcl8_3_Tcl_CreateCommand=yes + ac_cv_func_Tcl_CreateCommand=yes else echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 -ac_cv_lib_tcl8_3_Tcl_CreateCommand=no +ac_cv_func_Tcl_CreateCommand=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_tcl8_3_Tcl_CreateCommand" >&5 -echo "${ECHO_T}$ac_cv_lib_tcl8_3_Tcl_CreateCommand" >&6 -if test $ac_cv_lib_tcl8_3_Tcl_CreateCommand = yes; then - HAVE_TCL83=yes +echo "$as_me:$LINENO: result: $ac_cv_func_Tcl_CreateCommand" >&5 +echo "${ECHO_T}$ac_cv_func_Tcl_CreateCommand" >&6 +if test $ac_cv_func_Tcl_CreateCommand = yes; then + + echo "$as_me:$LINENO: checking if Tcl library build specification is valid" >&5 +echo $ECHO_N "checking if Tcl library build specification is valid... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else - HAVE_TCL83=no + + TCL_BUILD_LIB_SPEC=$TCL_LIB_SPEC + # Can't pull the following CHECKING call out since it will be + # broken up by the CHECK_FUNC just above. + echo "$as_me:$LINENO: checking if Tcl library build specification is valid" >&5 +echo $ECHO_N "checking if Tcl library build specification is valid... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +LIBS=$SAVELIBS + + - if test "HAVE_TCL83"="yes"; then - if test -r /usr/include/tcl8.3/tcl.h ; then - LIBS="-ltcl8.3 $LIBS" - TCL_INCLUDE="-I/usr/include/tcl8.3" - echo "using Tcl 8.3" + +TCL_INC_DIR=$TCL_INC_DIR + +TCL_PACKAGE_PATH=$TCL_PACKAGE_PATH + + + +# +# Ok, lets find the tk source trees so we can use the headers +# If the directory (presumably symlink) named "tk" exists, use that one +# in preference to any others. Same logic is used when choosing library +# and again with Tcl. The search order is the best place to look first, then in +# decreasing significance. The loop breaks if the trigger file is found. +# Note the gross little conversion here of srcdir by cd'ing to the found +# directory. This converts the path from a relative to an absolute, so +# recursive cache variables for the path will work right. We check all +# the possible paths in one loop rather than many seperate loops to speed +# things up. +# the alternative search directory is involked by --with-tkinclude +# +#no_tk=true +echo "$as_me:$LINENO: checking for Tk private headers" >&5 +echo $ECHO_N "checking for Tk private headers... $ECHO_C" >&6 + +# Check whether --with-tkinclude or --without-tkinclude was given. +if test "${with_tkinclude+set}" = set; then + withval="$with_tkinclude" + with_tkinclude=${withval} +fi; +if test "${ac_cv_c_tkh+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# first check to see if --with-tkinclude was specified +if test x"${with_tkinclude}" != x ; then + if test -f ${with_tkinclude}/tk.h ; then + ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)` + elif test -f ${with_tkinclude}/generic/tk.h ; then + ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)` + else + { { echo "$as_me:$LINENO: error: ${with_tkinclude} directory doesn't contain private headers" >&5 +echo "$as_me: error: ${with_tkinclude} directory doesn't contain private headers" >&2;} + { (exit 1); exit 1; }; } + fi +fi + +# next check if it came with Tk configuration file +if test x"${ac_cv_c_tkconfig}" != x ; then + if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then + ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/../generic; pwd)` + fi +fi + +# next check in private source directory +# +# since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_c_tkh}" = x ; then + for i in \ + ${srcdir}/../tk \ + `ls -dr ${srcdir}/../tk[4-9].[0-9].[0-9] ${srcdir}/../tk[4-9].[0-9] 2>/dev/null` \ + `ls -dr ${srcdir}/../tk[4-9].[0-9].[0-9] ${srcdir}/../tk[4-9].[0-9] 2>/dev/null` \ + ${srcdir}/../../tk \ + `ls -dr ${srcdir}/../../tk[4-9].[0-9].[0-9] ${srcdir}/../../tk[4-9].[0-9] 2>/dev/null` \ + `ls -dr ${srcdir}/../../tk[4-9].[0-9].[0-9] ${srcdir}/../../tk[4-9].[0-9] 2>/dev/null` \ + ${srcdir}/../../../tk \ + `ls -dr ${srcdir}/../../../tk[4-9].[0-9].[0-9] ${srcdir}/../../../tk[4-9].[0-9] 2>/dev/null ` \ + `ls -dr ${srcdir}/../../../tk[4-9].[0-9].[0-9] ${srcdir}/../../../tk[4-9].[0-9] 2>/dev/null ` ; do + if test -f $i/generic/tk.h ; then + ac_cv_c_tkh=`(cd $i/generic; pwd)` + break + fi + done +fi + +# check Debian-specific locations +if test x"${ac_cv_c_tkh}" = x ; then + for i in \ + `ls -dr /usr/include/tcl[9].[0-9].[0-9]/tk-private /usr/include/tcl[9].[0-9]/tk-private 2>/dev/null` \ + `ls -dr /usr/include/tcl[8].[2-9].[0-9]/tk-private /usr/include/tcl[8].[2-9]/tk-private 2>/dev/null` ; do + if test -f $i/generic/tk.h ; then + ac_cv_c_tkh=`(cd $i/generic; pwd)` + break + fi + done +fi + +# finally check in a few common install locations +# +# since ls returns lowest version numbers first, reverse its output +if test x"${ac_cv_c_tkh}" = x ; then + for i in \ + `ls -dr /usr/local/src/tk[4-9].[0-9].[0-9] /usr/local/src/tk[4-9].[0-9] 2>/dev/null` \ + `ls -dr /usr/local/src/tk[4-9].[0-9].[0-9] /usr/local/src/tk[4-9].[0-9] 2>/dev/null` \ + `ls -dr /usr/local/lib/tk[4-9].[0-9].[0-9] /usr/local/lib/tk[4-9].[0-9] 2>/dev/null` \ + `ls -dr /usr/local/lib/tk[4-9].[0-9].[0-9] /usr/local/lib/tk[4-9].[0-9] 2>/dev/null` \ + /usr/local/src/tk \ + /usr/local/lib/tk \ + ${prefix}/include ; do + if test -f $i/generic/tk.h ; then + ac_cv_c_tkh=`(cd $i/generic; pwd)` + break + fi + done +fi +# see if one is installed +if test x"${ac_cv_c_tkh}" = x ; then + if test "${ac_cv_header_tk_h+set}" = set; then + echo "$as_me:$LINENO: checking for tk.h" >&5 +echo $ECHO_N "checking for tk.h... $ECHO_C" >&6 +if test "${ac_cv_header_tk_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_tk_h" >&5 +echo "${ECHO_T}$ac_cv_header_tk_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking tk.h usability" >&5 +echo $ECHO_N "checking tk.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking tk.h presence" >&5 +echo $ECHO_N "checking tk.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: tk.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: tk.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: tk.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: tk.h: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: tk.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: tk.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: tk.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: tk.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: tk.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: tk.h: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for tk.h" >&5 +echo $ECHO_N "checking for tk.h... $ECHO_C" >&6 +if test "${ac_cv_header_tk_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_tk_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_tk_h" >&5 +echo "${ECHO_T}$ac_cv_header_tk_h" >&6 + +fi +if test $ac_cv_header_tk_h = yes; then + ac_cv_c_tkh=installed +else + ac_cv_c_tkh="" +fi + + +fi + +fi + +if test x"${ac_cv_c_tkh}" != x ; then +# no_tk="" + if test x"${ac_cv_c_tkh}" = x"installed" ; then + echo "$as_me:$LINENO: result: is installed" >&5 +echo "${ECHO_T}is installed" >&6 + TKHDIRDASHI="" + else + echo "$as_me:$LINENO: result: found in ${ac_cv_c_tkh}" >&5 +echo "${ECHO_T}found in ${ac_cv_c_tkh}" >&6 + # this hack is cause the TKHDIRDASHI won't print if there is a "-I" in it. + TKHDIRDASHI="-I${ac_cv_c_tkh}" + fi +else + TKHDIRDASHI="# no Tk directory found" + { echo "$as_me:$LINENO: WARNING: Can't find Tk private headers" >&5 +echo "$as_me: WARNING: Can't find Tk private headers" >&2;} + no_tk=true +fi + + + + +# +# Ok, lets find the tk configuration +# First, look for one uninstalled. +# the alternative search directory is invoked by --with-tk +# + +if test x"${no_tk}" = x ; then + # we reset no_tk in case something fails here + no_tk=true + +# Check whether --with-tk or --without-tk was given. +if test "${with_tk+set}" = set; then + withval="$with_tk" + with_tkconfig=${withval} +fi; + echo "$as_me:$LINENO: checking for Tk configuration" >&5 +echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6 + if test "${ac_cv_c_tkconfig+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + + # First check to see if --with-tk was specified. + if test x"${with_tkconfig}" != x ; then + if test -f "${with_tkconfig}/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` + else + { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5 +echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;} + { (exit 1); exit 1; }; } fi + fi + # then check for a private Tk library + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in \ + ../tk \ + `ls -dr ../tk[4-9].[0-9].[0-9] ../tk[4-9].[0-9] 2>/dev/null` \ + `ls -dr ../tk[4-9].[0-9].[0-9] ../tk[4-9].[0-9] 2>/dev/null` \ + ../../tk \ + `ls -dr ../../tk[4-9].[0-9].[0-9] ../../tk[4-9].[0-9] 2>/dev/null` \ + `ls -dr ../../tk[4-9].[0-9].[0-9] ../../tk[4-9].[0-9] 2>/dev/null` \ + ../../../tk \ + `ls -dr ../../../tk[4-9].[0-9].[0-9] ../../../tk[4-9].[0-9] 2>/dev/null` \ + `ls -dr ../../../tk[4-9].[0-9].[0-9] ../../../tk[4-9].[0-9] 2>/dev/null` ; do + if test -f "$i/unix/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + # check in a few common install locations + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do + if test -f "$i/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i; pwd)` + break + fi + done + fi + # check Debian-specific locations + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in \ + `ls -dr /usr/lib/tk[4-9].[0-9].[0-9] /usr/lib/tk[4-9].[0-9] 2>/dev/null` \ + `ls -dr /usr/lib/tk[4-9].[0-9].[0-9] /usr/lib/tk[4-9].[0-9] 2>/dev/null` ; do + if test -f "$i/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i; pwd)` + break + fi + done fi + # check in a few other private locations + if test x"${ac_cv_c_tkconfig}" = x ; then + for i in \ + ${srcdir}/../tk \ + `ls -dr ${srcdir}/../tk[4-9].[0-9].[0-9] ${srcdir}/../tk[4-9].[0-9] 2>/dev/null` \ + `ls -dr ${srcdir}/../tk[4-9].[0-9].[0-9] ${srcdir}/../tk[4-9].[0-9] 2>/dev/null` ; do + if test -f "$i/unix/tkConfig.sh" ; then + ac_cv_c_tkconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + +fi + if test x"${ac_cv_c_tkconfig}" = x ; then + TKCONFIG="# no Tk configs found" + { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5 +echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} + else + no_tk= + TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh + echo "$as_me:$LINENO: result: found $TKCONFIG" >&5 +echo "${ECHO_T}found $TKCONFIG" >&6 + fi fi -TCL_INCLUDE=$TCL_INCLUDE -ac_config_files="$ac_config_files Makefile dll/Makefile epu/Makefile include/Makefile tcl/Makefile" + if test -f "$TKCONFIG" ; then + . $TKCONFIG + fi + + + + + + + + + + + +# if Tk's build directory has been removed, TK_LIB_SPEC should +# be used instead of TK_BUILD_LIB_SPEC +SAVELIBS=$LIBS +# eval used to expand out TK_DBGX +eval "LIBS=\"$TK_BUILD_LIB_SPEC $TCL_BUILD_LIB_SPEC $TK_LIBS\"" +echo "$as_me:$LINENO: checking for Tk_Init" >&5 +echo $ECHO_N "checking for Tk_Init... $ECHO_C" >&6 +if test "${ac_cv_func_Tk_Init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char Tk_Init (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char Tk_Init (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_Tk_Init) || defined (__stub___Tk_Init) +choke me +#else +f = Tk_Init; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_Tk_Init=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_Tk_Init=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_Tk_Init" >&5 +echo "${ECHO_T}$ac_cv_func_Tk_Init" >&6 +if test $ac_cv_func_Tk_Init = yes; then + + echo "$as_me:$LINENO: checking if Tk library build specification is valid" >&5 +echo $ECHO_N "checking if Tk library build specification is valid... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +else + + TK_BUILD_LIB_SPEC=$TK_LIB_SPEC + # Can't pull the following CHECKING call out since it will be + # broken up by the CHECK_FUNC just above. + echo "$as_me:$LINENO: checking if Tk library build specification is valid" >&5 +echo $ECHO_N "checking if Tk library build specification is valid... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi + +LIBS=$SAVELIBS + + + + +TK_INC_DIR=$TK_INC_DIR + + +ac_config_files="$ac_config_files Makefile dll/Makefile epu/Makefile include/Makefile lib/Makefile tcl/Makefile tcl/pkgIndex.tcl" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -10964,7 +11810,9 @@ do "dll/Makefile" ) CONFIG_FILES="$CONFIG_FILES dll/Makefile" ;; "epu/Makefile" ) CONFIG_FILES="$CONFIG_FILES epu/Makefile" ;; "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "tcl/Makefile" ) CONFIG_FILES="$CONFIG_FILES tcl/Makefile" ;; + "tcl/pkgIndex.tcl" ) CONFIG_FILES="$CONFIG_FILES tcl/pkgIndex.tcl" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 @@ -11098,7 +11946,31 @@ s,@YACC@,$YACC,;t t s,@ALLOCA@,$ALLOCA,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@POW_LIB@,$POW_LIB,;t t -s,@TCL_INCLUDE@,$TCL_INCLUDE,;t t +s,@FGIS_LIBDIR@,$FGIS_LIBDIR,;t t +s,@TCLHDIR@,$TCLHDIR,;t t +s,@TCLHDIRDASHI@,$TCLHDIRDASHI,;t t +s,@TCL_LIBRARY@,$TCL_LIBRARY,;t t +s,@TCL_DEFS@,$TCL_DEFS,;t t +s,@TCL_DELETEME@,$TCL_DELETEME,;t t +s,@TCL_DBGX@,$TCL_DBGX,;t t +s,@TCL_EXEC_PREFIX@,$TCL_EXEC_PREFIX,;t t +s,@TCL_SHLIB_LD@,$TCL_SHLIB_LD,;t t +s,@SHLIB_SUFFIX@,$SHLIB_SUFFIX,;t t +s,@TCL_LD_FLAGS@,$TCL_LD_FLAGS,;t t +s,@TCL_BUILD_LIB_SPEC@,$TCL_BUILD_LIB_SPEC,;t t +s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t +s,@TCL_SHARED_LIB_SUFFIX@,$TCL_SHARED_LIB_SUFFIX,;t t +s,@TCL_INC_DIR@,$TCL_INC_DIR,;t t +s,@TCL_PACKAGE_PATH@,$TCL_PACKAGE_PATH,;t t +s,@TKHDIRDASHI@,$TKHDIRDASHI,;t t +s,@TK_VERSION@,$TK_VERSION,;t t +s,@TK_DEFS@,$TK_DEFS,;t t +s,@TK_DBGX@,$TK_DBGX,;t t +s,@TK_XINCLUDES@,$TK_XINCLUDES,;t t +s,@TK_XLIBSW@,$TK_XLIBSW,;t t +s,@TK_BUILD_LIB_SPEC@,$TK_BUILD_LIB_SPEC,;t t +s,@TK_LIB_SPEC@,$TK_LIB_SPEC,;t t +s,@TK_INC_DIR@,$TK_INC_DIR,;t t CEOF _ACEOF diff --git a/configure.ac b/configure.ac index 7144af3..964b8db 100644 --- a/configure.ac +++ b/configure.ac @@ -19,8 +19,6 @@ AC_PROG_MAKE_SET # AC_CHECK_LIB([dl], [main]) # FIXME: Replace `main' with a function in `-lefence': # AC_CHECK_LIB([efence], [main]) -# FIXME: Replace `main' with a function in `-lepp': -# AC_CHECK_LIB([epp], [main]) # FIXME: Replace `main' with a function in `-lm': # AC_CHECK_LIB([m], [main]) # FIXME: Replace `main' with a function in `-lproj': @@ -47,36 +45,45 @@ AC_FUNC_STRTOD AC_FUNC_VPRINTF AC_CHECK_FUNCS([bzero floor ftruncate memmove memset munmap re_comp regcomp sqrt strchr strdup strrchr strtol]) -AC_DEFINE_UNQUOTED(FGIS_CONFIG, "$sysconfdir", [Define this to the location of the global config file]) - dnl --------------------------------------------------------------------------- -dnl Check for Tcl/Tk installation +dnl Handle global configuration file placement dnl --------------------------------------------------------------------------- -AC_ARG_WITH(tcl,[ --with-tcl[=ARG] Include Tcl support (ARG=yes or path)],,) -if test "$with_tcl" = "yes" -o "$with_tcl" = "" ; then +AC_DEFINE_DIR(FGIS_CONFIG, "$sysconfdir", [Define this to the location of the global config file]) - AC_CHECK_LIB(tcl8.3,Tcl_CreateCommand,HAVE_TCL83=yes,HAVE_TCL83=no,$LIBS) - - if test "HAVE_TCL83"="yes"; then +dnl --------------------------------------------------------------------------- +dnl Handle placement of the engine module (fgis.so) +dnl --------------------------------------------------------------------------- - if test -r /usr/include/tcl8.3/tcl.h ; then - - LIBS="-ltcl8.3 $LIBS" - TCL_INCLUDE="-I/usr/include/tcl8.3" - echo "using Tcl 8.3" - - fi +AC_SUBST_DIR(FGIS_LIBDIR,"$libdir") - fi +dnl --------------------------------------------------------------------------- +dnl Check for Tcl/Tk installation +dnl --------------------------------------------------------------------------- +CY_AC_PATH_TCLH +if test x"$no_tcl" = x"true" ; then + echo " ERROR: Can't find Tcl headers or library." + echo " See README for information on how to obtain Tcl." + echo " If Tcl is installed, see INSTALL on how to tell" + echo " configure where Tcl is installed." + exit 1 fi +CY_AC_PATH_TCLCONFIG +CY_AC_LOAD_TCLCONFIG +AC_SUBST(TCL_INC_DIR,$TCL_INC_DIR) +AC_SUBST(TCL_PACKAGE_PATH,$TCL_PACKAGE_PATH) -AC_SUBST(TCL_INCLUDE,$TCL_INCLUDE) +CY_AC_PATH_TKH +CY_AC_PATH_TKCONFIG +CY_AC_LOAD_TKCONFIG +AC_SUBST(TK_INC_DIR,$TK_INC_DIR) AC_CONFIG_FILES([Makefile dll/Makefile epu/Makefile include/Makefile - tcl/Makefile]) + lib/Makefile + tcl/Makefile + tcl/pkgIndex.tcl]) AC_OUTPUT diff --git a/dll/Makefile.am b/dll/Makefile.am index 938639a..09988d4 100644 --- a/dll/Makefile.am +++ b/dll/Makefile.am @@ -23,7 +23,5 @@ fgis_la_LDFLAGS = -module -avoid-version lib_LTLIBRARIES = fgis.la fgis_la_SOURCES = fgisInit.c fgisMisc.c fgisPalette.c fgisRaster.c fgisPlanchet.c fgisEppCalc.c fgisEppDraw.c fgisVector.c fgisPatterns.c fgisProjection.c fgis.h fgisInt.h -FGIS_HOME = $(sysconfdir) -INCLUDES = $(TCL_INCLUDE) -I$(top_srcdir)/include -DEFS = @DEFS@ - +INCLUDES = -I$(TCL_INC_DIR) -I$(TK_INC_DIR) -I$(top_srcdir)/include +# DEFS = @DEFS@ diff --git a/dll/Makefile.in b/dll/Makefile.in index 92c9c16..194246e 100644 --- a/dll/Makefile.in +++ b/dll/Makefile.in @@ -79,7 +79,9 @@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ -TCL_INCLUDE = @TCL_INCLUDE@ +TCL_INC_DIR = @TCL_INC_DIR@ +TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ +TK_INC_DIR = @TK_INC_DIR@ VERSION = @VERSION@ YACC = @YACC@ am__include = @am__include@ @@ -90,9 +92,7 @@ fgis_la_LDFLAGS = -module -avoid-version lib_LTLIBRARIES = fgis.la fgis_la_SOURCES = fgisInit.c fgisMisc.c fgisPalette.c fgisRaster.c fgisPlanchet.c fgisEppCalc.c fgisEppDraw.c fgisVector.c fgisPatterns.c fgisProjection.c fgis.h fgisInt.h -FGIS_HOME = $(sysconfdir) -INCLUDES = $(TCL_INCLUDE) -I$(top_srcdir)/include -DEFS = @DEFS@ +INCLUDES = -I$(TCL_INC_DIR) -I$(TK_INC_DIR) -I$(top_srcdir)/include subdir = dll mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h @@ -104,6 +104,8 @@ am_fgis_la_OBJECTS = fgisInit.lo fgisMisc.lo fgisPalette.lo \ fgisRaster.lo fgisPlanchet.lo fgisEppCalc.lo fgisEppDraw.lo \ fgisVector.lo fgisPatterns.lo fgisProjection.lo fgis_la_OBJECTS = $(am_fgis_la_OBJECTS) + +DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ @@ -363,6 +365,7 @@ uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES mostlyclean-generic mostlyclean-libtool tags uninstall \ uninstall-am uninstall-info-am uninstall-libLTLIBRARIES +# DEFS = @DEFS@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/epu/Makefile b/epu/Makefile index d33ab0e..c9ef86c 100644 --- a/epu/Makefile +++ b/epu/Makefile @@ -1,42 +1,220 @@ -CC=gcc -CFLAGS=-g -Wall -pedantic -O2 -I../lib/gnu_lib -I../include -LDFLAGS=-L../lib -LOADLIBES=-lm -lepp -SRC=\ -RCS/border.c,v\ -RCS/cluster.c,v\ -RCS/dgt2gen.c,v\ -RCS/eheader.c,v\ -RCS/extents.c,v\ -RCS/fill.c,v\ -RCS/intable.c,v\ -RCS/mosaic.c,v\ -RCS/neighbours.c,v\ -RCS/outtab.c,v\ -RCS/reclass1.c,v\ -RCS/window.c,v -ALL=\ -border\ -cluster\ -dgt2gen\ -eheader\ -extents\ -fill\ -intable\ -mosaic\ -neighbours\ -outtable\ -reclass1\ -centers\ -project\ -window -RCS/%,v : % - ci $< -% : %.o - ${CC} $< -o $@ ${LDFLAGS} ${LOADLIBES} -all: ${ALL} -rcs: ${SRC} -project: project.o - ${CC} $< -o $@ ${CFLAGS} ${LDFLAGS} -lproj ${LOADLIBES} -outtable: outtable.o outtable_func.o - gcc outtable.o outtable_func.o ${LDFLAGS} ${LOADLIBES} -o outtable +# Makefile.in generated by automake 1.6.3 from Makefile.am. +# epu/Makefile. Generated from Makefile.in by configure. + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + +SHELL = /bin/sh + +srcdir = . +top_srcdir = .. + +prefix = /home/dron/fgis +exec_prefix = ${prefix} + +bindir = ${exec_prefix}/bin +sbindir = ${exec_prefix}/sbin +libexecdir = ${exec_prefix}/libexec +datadir = ${prefix}/share +sysconfdir = ${prefix}/etc +sharedstatedir = ${prefix}/com +localstatedir = ${prefix}/var +libdir = ${exec_prefix}/lib +infodir = ${prefix}/info +mandir = ${prefix}/man +includedir = ${prefix}/include +oldincludedir = /usr/include +pkgdatadir = $(datadir)/fgis +pkglibdir = $(libdir)/fgis +pkgincludedir = $(includedir)/fgis +top_builddir = .. + +ACLOCAL = ${SHELL} /home/dron/projects/fgis/fgis.work/missing --run aclocal-1.6 +AUTOCONF = ${SHELL} /home/dron/projects/fgis/fgis.work/missing --run autoconf +AUTOMAKE = ${SHELL} /home/dron/projects/fgis/fgis.work/missing --run automake-1.6 +AUTOHEADER = ${SHELL} /home/dron/projects/fgis/fgis.work/missing --run autoheader + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = /usr/bin/install -c +INSTALL_PROGRAM = ${INSTALL} +INSTALL_DATA = ${INSTALL} -m 644 +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_SCRIPT = ${INSTALL} +INSTALL_HEADER = $(INSTALL_DATA) +transform = s,x,x, +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = +host_triplet = i686-pc-linux-gnu + +EXEEXT = +OBJEXT = o +PATH_SEPARATOR = : +AMTAR = ${SHELL} /home/dron/projects/fgis/fgis.work/missing --run tar +AS = @AS@ +AWK = gawk +CC = gcc +DEPDIR = .deps +DLLTOOL = @DLLTOOL@ +ECHO = echo +INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LN_S = ln -s +OBJDUMP = @OBJDUMP@ +PACKAGE = fgis +RANLIB = ranlib +STRIP = strip +TCL_INC_DIR = /usr/include/tcl8.3/tcl-private/generic +TCL_PACKAGE_PATH = /usr/lib +TK_INC_DIR = /usr/include/tcl8.3/tk-private/generic +VERSION = 0.0.1 +YACC = bison -y +am__include = include +am__quote = +install_sh = /home/dron/projects/fgis/fgis.work/install-sh +subdir = epu +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/include/config.h +CONFIG_CLEAN_FILES = +DIST_SOURCES = +DIST_COMMON = Makefile.am Makefile.in +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign epu/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +tags: TAGS +TAGS: + +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @list='$(DISTFILES)'; for file in $$list; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile + +installdirs: + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +uninstall-am: uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool uninstall uninstall-am uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/epu/Makefile.in b/epu/Makefile.in index 4b2ac40..0ea0779 100644 --- a/epu/Makefile.in +++ b/epu/Makefile.in @@ -79,7 +79,9 @@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ -TCL_INCLUDE = @TCL_INCLUDE@ +TCL_INC_DIR = @TCL_INC_DIR@ +TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ +TK_INC_DIR = @TK_INC_DIR@ VERSION = @VERSION@ YACC = @YACC@ am__include = @am__include@ diff --git a/include/Makefile.in b/include/Makefile.in index af94895..18aabb9 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -79,7 +79,9 @@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ -TCL_INCLUDE = @TCL_INCLUDE@ +TCL_INC_DIR = @TCL_INC_DIR@ +TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ +TK_INC_DIR = @TK_INC_DIR@ VERSION = @VERSION@ YACC = @YACC@ am__include = @am__include@ diff --git a/lib/Makefile b/lib/Makefile deleted file mode 100644 index c4d0739..0000000 --- a/lib/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -CC=gcc -CFLAGS=-g -fPIC -O2 -Wall -ansi -pedantic -I ../include -LIB_OBJS=\ -byteorder.o\ -dgt_dist.o\ -dgt_input.o\ -dgt_iter.o\ -dgt_output.o\ -epp_cache.o\ -epp_input.o\ -epp_iter.o\ -epp_loaded.o\ -epp_output.o\ -file_utils.o\ -lookup.o\ -overlay.o\ -reclass.tab.o -RCS=\ -RCS/byteorder.c,v\ -RCS/clr.c,v\ -RCS/dgt_dist.c,v\ -RCS/dgt_input.c,v\ -RCS/dgt_iter.c,v\ -RCS/dgt_output.c,v\ -RCS/epp_cache.c,v\ -RCS/epp_input.c,v\ -RCS/epp_iter.c,v\ -RCS/epp_loaded.c,v\ -RCS/epp_output.c,v\ -RCS/file_utils.c,v\ -RCS/lookup.c,v\ -RCS/overlay.c,v\ -RCS/reclass.y,v -SRC=\ -byteorder.c\ -clr.c\ -dgt_dist.c\ -dgt_input.c\ -dgt_iter.c\ -dgt_output.c\ -epp_cache.c\ -epp_input.c\ -epp_iter.c\ -epp_loaded.c\ -epp_output.c\ -file_utils.c\ -lookup.c\ -overlay.c\ -reclass.y -RCS/%,v : % - ci $< -libepp.a:${LIB_OBJS} - ar r libepp.a ${LIB_OBJS} -libepp.so:${LIB_OBJS} - gcc -shared ${LIB_OBJS} -o libepp.so -lm -reclass.tab.c:reclass.y - bison reclass.y -clean: - rm *.o - rm reclass.tab.c -distclean: clean - rm libepp.a -rcs: ${RCS} - diff --git a/lib/Makefile.am b/lib/Makefile.am new file mode 100644 index 0000000..957d12c --- /dev/null +++ b/lib/Makefile.am @@ -0,0 +1,28 @@ +## $ID: $ +## +## Copyright (C) 2002, Andrey Kiselev +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +## USA. + +## Process this file with automake to produce Makefile.in. + +libepp_la_LDFLAGS = +lib_LTLIBRARIES = libepp.la +libepp_la_SOURCES = byteorder.c clr.c dgt_dist.c dgt_input.c dgt_iter.c dgt_output.c epp_cache.c epp_input.c epp_iter.c epp_loaded.c epp_output.c file_utils.c lookup.c overlay.c reclass.y epp_private.h + +INCLUDES = -I$(top_srcdir)/include +# DEFS = @DEFS@ + diff --git a/tcl/Makefile.am b/tcl/Makefile.am index 5800a0c..41a33d8 100644 --- a/tcl/Makefile.am +++ b/tcl/Makefile.am @@ -19,4 +19,30 @@ ## Process this file with automake to produce Makefile.in. +bin_SCRIPTS = hypermap mapview +SCRIPT_LIST = admin.layer balloonhelp.tcl calculator.tcl combobox.tcl console.tcl draw.tcl getopt.tcl help.tcl hierarchy.tcl html_library.tcl layer.tcl legend.tcl lesras.lay objects.tcl planchet.tcl progressbar.tcl tabnotebook.tcl tclIndex toolbar.tcl ventry.tcl viewer.tcl widget.tcl + +SCRIPTDIR=$(TCL_PACKAGE_PATH)/fgis + +install: all install-binaries install-libraries + +install-binaries: + $(mkinstalldirs) $(bindir) + -for i in $(bin_SCRIPTS) ; do \ + if [ -f $$i ] ; then \ + $(INSTALL_PROGRAM) $$i $(bindir)/$$i ; \ + else true; fi ; \ + done + +install-libraries: +# install standalone scripts + $(mkinstalldirs) $(SCRIPTDIR)/tcl + -for i in $(SCRIPT_LIST) ; do \ + if [ -f $$i ] ; then \ + $(INSTALL_PROGRAM) $$i $(SCRIPTDIR)/tcl/$$i ; \ + else true; fi ; \ + done + if [ -f pkgIndex.tcl ] ; then \ + $(INSTALL_PROGRAM) pkgIndex.tcl $(SCRIPTDIR)/pkgIndex.tcl ; \ + else true; fi diff --git a/tcl/Makefile.in b/tcl/Makefile.in index d037d74..f600dc5 100644 --- a/tcl/Makefile.in +++ b/tcl/Makefile.in @@ -79,18 +79,27 @@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ RANLIB = @RANLIB@ STRIP = @STRIP@ -TCL_INCLUDE = @TCL_INCLUDE@ +TCL_INC_DIR = @TCL_INC_DIR@ +TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ +TK_INC_DIR = @TK_INC_DIR@ VERSION = @VERSION@ YACC = @YACC@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ + +bin_SCRIPTS = hypermap mapview +SCRIPT_LIST = admin.layer balloonhelp.tcl calculator.tcl combobox.tcl console.tcl draw.tcl getopt.tcl help.tcl hierarchy.tcl html_library.tcl layer.tcl legend.tcl lesras.lay objects.tcl planchet.tcl progressbar.tcl tabnotebook.tcl tclIndex toolbar.tcl ventry.tcl viewer.tcl widget.tcl + +SCRIPTDIR = $(TCL_PACKAGE_PATH)/fgis subdir = tcl mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/include/config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = pkgIndex.tcl +SCRIPTS = $(bin_SCRIPTS) + DIST_SOURCES = -DIST_COMMON = Makefile.am Makefile.in +DIST_COMMON = Makefile.am Makefile.in pkgIndex.tcl.in all: all-am .SUFFIXES: @@ -99,6 +108,28 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) $(AUTOMAKE) --foreign tcl/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +pkgIndex.tcl: $(top_builddir)/config.status pkgIndex.tcl.in + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \ + $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \ + else :; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ + rm -f $(DESTDIR)$(bindir)/$$f; \ + done mostlyclean-libtool: -rm -f *.lo @@ -140,11 +171,10 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile +all-am: Makefile $(SCRIPTS) installdirs: - -install: install-am + $(mkinstalldirs) $(DESTDIR)$(bindir) install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -186,7 +216,7 @@ info-am: install-data-am: -install-exec-am: +install-exec-am: install-binSCRIPTS install-info: install-info-am @@ -202,17 +232,40 @@ mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool -uninstall-am: uninstall-info-am +uninstall-am: uninstall-binSCRIPTS uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am info info-am install install-am install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + dvi-am info info-am install install-am install-binSCRIPTS \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool uninstall uninstall-am uninstall-info-am + mostlyclean-libtool uninstall uninstall-am uninstall-binSCRIPTS \ + uninstall-info-am + + +install: all install-binaries install-libraries +install-binaries: + $(mkinstalldirs) $(bindir) + -for i in $(bin_SCRIPTS) ; do \ + if [ -f $$i ] ; then \ + $(INSTALL_PROGRAM) $$i $(bindir)/$$i ; \ + else true; fi ; \ + done + +install-libraries: +# install standalone scripts + $(mkinstalldirs) $(SCRIPTDIR)/tcl + -for i in $(SCRIPT_LIST) ; do \ + if [ -f $$i ] ; then \ + $(INSTALL_PROGRAM) $$i $(SCRIPTDIR)/tcl/$$i ; \ + else true; fi ; \ + done + if [ -f pkgIndex.tcl ] ; then \ + $(INSTALL_PROGRAM) pkgIndex.tcl $(SCRIPTDIR)/pkgIndex.tcl ; \ + else true; fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/tcl/hypermap b/tcl/hypermap index 27f0bb4..4440d72 100755 --- a/tcl/hypermap +++ b/tcl/hypermap @@ -1,4 +1,24 @@ -#!/usr/bin/wish8.0 +#!/usr/bin/wish +## +## $ID: $ +## +## Copyright (C) 1997, Victor Wagner +## Copyright (C) 2002, Andrey Kiselev +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +## USA. package require Fgis diff --git a/tcl/mapview b/tcl/mapview index 773297f..a4aa6eb 100755 --- a/tcl/mapview +++ b/tcl/mapview @@ -1,4 +1,25 @@ -#!/usr/bin/wish8.0 +#!/usr/bin/wish +## +## $ID: $ +## +## Copyright (C) 1997, Victor Wagner +## Copyright (C) 2002, Andrey Kiselev +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +## USA. + package require Fgis set planchet .map option add *font -cronyx-times-bold-r-normal--10-* diff --git a/pkgIndex.tcl b/tcl/pkgIndex.tcl.in similarity index 64% rename from pkgIndex.tcl rename to tcl/pkgIndex.tcl.in index 1a01f9c..4928c1a 100644 --- a/pkgIndex.tcl +++ b/tcl/pkgIndex.tcl.in @@ -1 +1 @@ -package ifneeded Fgis 1.0 "package require Tk; [list load [file join /usr/local/lib fgis.so] Fgis]" +package ifneeded Fgis 1.0 "package require Tk; [list load [file join @FGIS_LIBDIR@ fgis.so] Fgis]" -- 2.39.2