diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2020-03-20 20:07:54 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2020-03-20 20:07:54 (GMT) |
commit | 85e9653bb776d3f87e8975842dd0fb74fe441125 (patch) | |
tree | 14217550248222457ddfeab07b70051c375f4165 | |
parent | a1dcc644db7851fd4f9effb2cfc03a9fb3d5a2b4 (diff) | |
download | blt-85e9653bb776d3f87e8975842dd0fb74fe441125.zip blt-85e9653bb776d3f87e8975842dd0fb74fe441125.tar.gz blt-85e9653bb776d3f87e8975842dd0fb74fe441125.tar.bz2 |
TEA vector
-rw-r--r-- | ds9/unix/Makefile.in | 4 | ||||
-rwxr-xr-x | ds9/unix/configure | 259 | ||||
-rw-r--r-- | ds9/unix/configure.ac | 3 | ||||
-rw-r--r-- | make.include | 14 | ||||
-rw-r--r-- | vector/Makefile.old | 22 |
5 files changed, 277 insertions, 25 deletions
diff --git a/ds9/unix/Makefile.in b/ds9/unix/Makefile.in index d4dade8..43a433e 100644 --- a/ds9/unix/Makefile.in +++ b/ds9/unix/Makefile.in @@ -18,6 +18,8 @@ TK_LIBS = @TK_LIBS@ TK_LIB_SPEC = @TK_LIB_SPEC@ TK_STUB_LIB_SPEC= @TK_STUB_LIB_SPEC@ +vector_LIB_SPEC= @vector_LIB_SPEC@ + tifftcl_LIB_SPEC= @tifftcl_LIB_SPEC@ jpegtcl_LIB_SPEC= @jpegtcl_LIB_SPEC@ zlibtcl_LIB_SPEC= @zlibtcl_LIB_SPEC@ @@ -83,6 +85,7 @@ empty:= space:=$(empty) $(empty) SPECS = \ + $(vector_LIB_SPEC) \ $(jpegtcl_LIB_SPEC) \ $(tifftcl_LIB_SPEC) \ $(zlibtcl_LIB_SPEC) \ @@ -109,7 +112,6 @@ SPECS = \ LLIBS = \ $(subst /$(space),/,$(patsubst -L%,%/,$(patsubst -l%,lib%.a,$(tksao_LIB_SPEC)))) \ - $(libdir)/libvector.a \ $(libdir)/libast.a \ $(libdir)/libast_err.a \ $(libdir)/libast_pal.a \ diff --git a/ds9/unix/configure b/ds9/unix/configure index 84aaff5..a1f94fd 100755 --- a/ds9/unix/configure +++ b/ds9/unix/configure @@ -809,6 +809,14 @@ tifftcl_LIB_FILE tifftcl_SRC_DIR tifftcl_BIN_DIR tifftcl_VERSION +vector_STUB_LIB_PATH +vector_STUB_LIB_SPEC +vector_STUB_LIB_FILE +vector_LIB_SPEC +vector_LIB_FILE +vector_SRC_DIR +vector_BIN_DIR +vector_VERSION TK_XINCLUDES TK_LIBS TK_STUB_LIB_SPEC @@ -902,6 +910,7 @@ ac_user_opts=' enable_option_checking with_tcl with_tk +with_vector with_tifftcl with_jpegtcl with_zlibtcl @@ -1576,6 +1585,7 @@ Optional Packages: --with-tcl directory containing tcl configuration (tclConfig.sh) --with-tk directory containing tk configuration (tkConfig.sh) + --with-vector directory containing vector configuration (vectorConfig.sh) --with-tifftcl directory containing tifftcl configuration (tifftclConfig.sh) --with-jpegtcl directory containing jpegtcl configuration (jpegtclConfig.sh) --with-zlibtcl directory containing zlibtcl configuration (zlibtclConfig.sh) @@ -3906,6 +3916,255 @@ $as_echo "#define MAC_OSX_TK 1" >>confdefs.h # + # Ok, lets find the vector configuration + # First, look for one uninstalled. + # the alternative search directory is invoked by --with-vector + # + + if test x"${no_vector}" = x ; then + # we reset no_vector in case something fails here + no_vector=true + +# Check whether --with-vector was given. +if test "${with_vector+set}" = set; then : + withval=$with_vector; with_vectorconfig=${withval} +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vector configuration" >&5 +$as_echo_n "checking for vector configuration... " >&6; } + if ${ac_cv_c_vectorconfig+:} false; then : + $as_echo_n "(cached) " >&6 +else + + + # First check to see if --with-vector was specified. + if test x"${with_vectorconfig}" != x ; then + case ${with_vectorconfig} in + */vectorConfig.sh ) + if test -f ${with_vectorconfig}; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-vector argument should refer to directory containing vectorConfig.sh, not to vectorConfig.sh itself" >&5 +$as_echo "$as_me: WARNING: --with-vector argument should refer to directory containing vectorConfig.sh, not to vectorConfig.sh itself" >&2;} + with_vectorconfig=`echo ${with_vectorconfig} | sed 's!/vectorConfig\.sh$!!'` + fi;; + esac + if test -f "${with_vectorconfig}/vectorConfig.sh" ; then + ac_cv_c_vectorconfig=`(cd ${with_vectorconfig}; pwd)` + else + as_fn_error $? "${with_vectorconfig} directory doesn't contain vectorConfig.sh" "$LINENO" 5 + fi + fi + + # then check for a private vector installation + if test x"${ac_cv_c_vectorconfig}" = x ; then + for i in \ + ../vector \ + `ls -dr ../vector*[0-9].[0-9]*.[0-9]* 2>/dev/null` \ + `ls -dr ../vector*[0-9].[0-9][0-9] 2>/dev/null` \ + `ls -dr ../vector*[0-9].[0-9] 2>/dev/null` \ + `ls -dr ../vector*[0-9].[0-9]* 2>/dev/null` \ + ../../vector \ + `ls -dr ../../vector*[0-9].[0-9]*.[0-9]* 2>/dev/null` \ + `ls -dr ../../vector*[0-9].[0-9][0-9] 2>/dev/null` \ + `ls -dr ../../vector*[0-9].[0-9] 2>/dev/null` \ + `ls -dr ../../vector*[0-9].[0-9]* 2>/dev/null` \ + ../../../vector \ + `ls -dr ../../../vector*[0-9].[0-9]*.[0-9]* 2>/dev/null` \ + `ls -dr ../../../vector*[0-9].[0-9][0-9] 2>/dev/null` \ + `ls -dr ../../../vector*[0-9].[0-9] 2>/dev/null` \ + `ls -dr ../../../vector*[0-9].[0-9]* 2>/dev/null` \ + ${srcdir}/../vector \ + `ls -dr ${srcdir}/../vector*[0-9].[0-9]*.[0-9]* 2>/dev/null` \ + `ls -dr ${srcdir}/../vector*[0-9].[0-9][0-9] 2>/dev/null` \ + `ls -dr ${srcdir}/../vector*[0-9].[0-9] 2>/dev/null` \ + `ls -dr ${srcdir}/../vector*[0-9].[0-9]* 2>/dev/null` \ + ; do + if test -f "$i/vectorConfig.sh" ; then + ac_cv_c_vectorconfig=`(cd $i; pwd)` + break + fi + if test -f "$i/unix/vectorConfig.sh" ; then + ac_cv_c_vectorconfig=`(cd $i/unix; pwd)` + break + fi + done + fi + + # check in a few common install locations + if test x"${ac_cv_c_vectorconfig}" = x ; then + for i in `ls -d ${libdir} 2>/dev/null` \ + `ls -d ${exec_prefix}/lib 2>/dev/null` \ + `ls -d ${prefix}/lib 2>/dev/null` \ + `ls -d /usr/local/lib 2>/dev/null` \ + `ls -d /usr/contrib/lib 2>/dev/null` \ + `ls -d /usr/pkg/lib 2>/dev/null` \ + `ls -d /usr/lib 2>/dev/null` \ + `ls -d /usr/lib64 2>/dev/null` \ + ; do + if test -f "$i/vectorConfig.sh" ; then + ac_cv_c_vectorconfig=`(cd $i; pwd)` + break + fi + done + fi + +fi + + + if test x"${ac_cv_c_vectorconfig}" = x ; then + vector_BIN_DIR="# no vector configs found" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find vector configuration definitions" >&5 +$as_echo "$as_me: WARNING: Cannot find vector configuration definitions" >&2;} + exit 0 + else + no_vector= + vector_BIN_DIR=${ac_cv_c_vectorconfig} + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found $vector_BIN_DIR/vectorConfig.sh" >&5 +$as_echo "found $vector_BIN_DIR/vectorConfig.sh" >&6; } + fi + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${vector_BIN_DIR}/vectorConfig.sh" >&5 +$as_echo_n "checking for existence of ${vector_BIN_DIR}/vectorConfig.sh... " >&6; } + + if test -f "${vector_BIN_DIR}/vectorConfig.sh" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 +$as_echo "loading" >&6; } + . "${vector_BIN_DIR}/vectorConfig.sh" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5 +$as_echo "file not found" >&6; } + fi + + # + # If the vector_BIN_DIR is the build directory (not the install directory), + # then set the common variable name to the value of the build variables. + # For example, the variable vector_LIB_SPEC will be set to the value + # of vector_BUILD_LIB_SPEC. An extension should make use of vector_LIB_SPEC + # instead of vector_BUILD_LIB_SPEC since it will work with both an + # installed and uninstalled version of Tcl. + # + + if test -f "${vector_BIN_DIR}/Makefile" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found Makefile - using build library specs for vector" >&5 +$as_echo "$as_me: WARNING: Found Makefile - using build library specs for vector" >&2;} + vector_LIB_SPEC=${vector_BUILD_LIB_SPEC} + vector_STUB_LIB_SPEC=${vector_BUILD_STUB_LIB_SPEC} + vector_STUB_LIB_PATH=${vector_BUILD_STUB_LIB_PATH} + vector_INCLUDE_SPEC=${vector_BUILD_INCLUDE_SPEC} + vector_LIBRARY_PATH=${vector_LIBRARY_PATH} + fi + + + + + + + + + + + + + # Allow the caller to prevent this auto-check by specifying any 2nd arg + if test "x" = x; then : + + # Check both upper and lower-case variants + # If a dev wanted non-stubs libs, this function could take an option + # to not use _STUB in the paths below + if test "x${vector_STUB_LIB_SPEC}" = x; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking For VECTOR_STUB library for LIBS" >&5 +$as_echo_n "checking For VECTOR_STUB library for LIBS... " >&6; } + # This simplifies the use of stub libraries by automatically adding + # the stub lib to your path. Normally this would add to SHLIB_LD_LIBS, + # but this is called before CONFIG_CFLAGS. More importantly, this adds + # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD. + if test "x${VECTOR_STUB_LIB_SPEC}" != "x" ; then + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then + + vars="\"`${CYGPATH} ${VECTOR_STUB_LIB_PATH}`\"" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + # Convert foo.lib to -lfoo for GCC. No-op if not *.lib + i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + fi + PKG_LIBS="$PKG_LIBS $i" + done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using VECTOR_STUB_LIB_PATH ${VECTOR_STUB_LIB_PATH}" >&5 +$as_echo "using VECTOR_STUB_LIB_PATH ${VECTOR_STUB_LIB_PATH}" >&6; } + else + + vars="${VECTOR_STUB_LIB_SPEC}" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + # Convert foo.lib to -lfoo for GCC. No-op if not *.lib + i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + fi + PKG_LIBS="$PKG_LIBS $i" + done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using VECTOR_STUB_LIB_SPEC ${VECTOR_STUB_LIB_SPEC}" >&5 +$as_echo "using VECTOR_STUB_LIB_SPEC ${VECTOR_STUB_LIB_SPEC}" >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5 +$as_echo "file not found" >&6; } + fi + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking For vector_STUB library for LIBS" >&5 +$as_echo_n "checking For vector_STUB library for LIBS... " >&6; } + # This simplifies the use of stub libraries by automatically adding + # the stub lib to your path. Normally this would add to SHLIB_LD_LIBS, + # but this is called before CONFIG_CFLAGS. More importantly, this adds + # to PKG_LIBS, which becomes LIBS, and that is only used by SHLIB_LD. + if test "x${vector_STUB_LIB_SPEC}" != "x" ; then + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then + + vars="\"`${CYGPATH} ${vector_STUB_LIB_PATH}`\"" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + # Convert foo.lib to -lfoo for GCC. No-op if not *.lib + i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + fi + PKG_LIBS="$PKG_LIBS $i" + done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using vector_STUB_LIB_PATH ${vector_STUB_LIB_PATH}" >&5 +$as_echo "using vector_STUB_LIB_PATH ${vector_STUB_LIB_PATH}" >&6; } + else + + vars="${vector_STUB_LIB_SPEC}" + for i in $vars; do + if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then + # Convert foo.lib to -lfoo for GCC. No-op if not *.lib + i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'` + fi + PKG_LIBS="$PKG_LIBS $i" + done + + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: using vector_STUB_LIB_SPEC ${vector_STUB_LIB_SPEC}" >&5 +$as_echo "using vector_STUB_LIB_SPEC ${vector_STUB_LIB_SPEC}" >&6; } + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: file not found" >&5 +$as_echo "file not found" >&6; } + fi + +fi + +fi + + + + # # Ok, lets find the tifftcl configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tifftcl diff --git a/ds9/unix/configure.ac b/ds9/unix/configure.ac index bcd8e99..e521034 100644 --- a/ds9/unix/configure.ac +++ b/ds9/unix/configure.ac @@ -49,6 +49,9 @@ TEA_LOAD_TKCONFIG # Load the *.sh file if necessary #-------------------------------------------------------------------- +TEA_PATH_CONFIG(vector) +TEA_LOAD_CONFIG(vector) + TEA_PATH_CONFIG(tifftcl) TEA_LOAD_CONFIG(tifftcl) diff --git a/make.include b/make.include index ecd2d54..0a2e9e2 100644 --- a/make.include +++ b/make.include @@ -334,10 +334,20 @@ tksao/Makefile : #-------------------------- vector -vector : +vector : vector/Makefile @echo "" @echo "*** $@ ***" - $ CXX=$(CXX) AR=$(AR) $(MAKE) -C vector -j $(JOBS) install libdir=$(libdir) includedir=$(includedir) + $(MAKE) -C vector -j $(JOBS) install + +vector/Makefile : + @echo "" + @echo "*** $@ ***" + cd vector; \ + ./configure \ + $(WITHTCL) \ + $(PREFIX) \ + $(STD) \ + $(CACHE) #-------------------------- ast diff --git a/vector/Makefile.old b/vector/Makefile.old deleted file mode 100644 index 4d7b3a6..0000000 --- a/vector/Makefile.old +++ /dev/null @@ -1,22 +0,0 @@ -SRC = vector.C vector3d.C vectorstr.C - -INCLS = $(wildcard *.h) -OBJS = $(SRC:%.C=%.o) - -LIB = libvector.a - -all : $(LIB) - -install : all - cp -f $(LIB) $(libdir) - cp -f $(INCLS) $(includedir) - -$(LIB) : $(OBJS) - $(RM) $@ - $(AR) -cr $@ $(OBJS) - -clean : - rm -f *.o *.a core *~ *# - -distclean : clean - |