From 5467e3fdc675f190e2616c2f24921bd22de5eab4 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 23 Jan 2001 12:05:06 +0000 Subject: [PATCH] Removed YAZ dependency. --- Makefile.in | 9 +--- configure | 169 ++++++++++++++++++++++------------------------------------ configure.in | 41 +------------- 3 files changed, 69 insertions(+), 150 deletions(-) diff --git a/Makefile.in b/Makefile.in index a764669..f44693f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,5 @@ # Makefile for Tcl Web Robot -# $Id: Makefile.in,v 1.4 1999/12/27 11:49:30 adam Exp $ +# $Id: Makefile.in,v 1.5 2001/01/23 12:05:06 adam Exp $ SHELL=/bin/sh # Version @@ -39,13 +39,8 @@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ INSTALL_DATA=@INSTALL_DATA@ RANLIB=@RANLIB@ -# Where are Yaz libraries located? -YAZLIB=@YAZLIB@ -# Where are Yaz header files located? -YAZINC=@YAZINC@ - # Total include -INCLUDE=-I. $(YAZINC) $(TCLINC) +INCLUDE=-I. $(TCLINC) # All CC options, except CFLAGS DEFS=@DEFS@ $(INCLUDE) diff --git a/configure b/configure index ecbc3a3..6d5b3e8 100755 --- a/configure +++ b/configure @@ -12,11 +12,7 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help - --with-buildroot RPM Build root" -ac_help="$ac_help --with-tclconfig Path for tclConfig.sh/tkConfig.sh" -ac_help="$ac_help - --with-yazconfig Path for yaz-config" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -534,17 +530,6 @@ fi - - - -# Check whether --with-build-root or --without-build-root was given. -if test "${with_build_root+set}" = set; then - withval="$with_build_root" - build_root=$withval -else - build_root="" -fi - ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -576,7 +561,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:580: checking for a BSD compatible install" >&5 +echo "configure:565: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -643,7 +628,7 @@ echo $ac_n "checking for prefix by $ac_c" 1>&6 # Extract the first word of "tclsh", so it can be a program name with args. set dummy tclsh; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:647: checking for $ac_word" >&5 +echo "configure:632: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -683,10 +668,54 @@ fi if test "x$prefix" = xNONE; then if test "x$prefix" = xNONE; then echo $ac_n "checking for prefix by $ac_c" 1>&6 +# Extract the first word of "tclsh8.3", so it can be a program name with args. +set dummy tclsh8.3; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:675: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_TCLSH8.3'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$TCLSH8.3" in + /*) + ac_cv_path_TCLSH8.3="$TCLSH8.3" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_TCLSH8.3="$TCLSH8.3" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_TCLSH8.3="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +TCLSH8.3="$ac_cv_path_TCLSH8.3" +if test -n "$TCLSH8.3"; then + echo "$ac_t""$TCLSH8.3" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -n "$ac_cv_path_TCLSH8.3"; then + prefix=`echo $ac_cv_path_TCLSH8.3|sed 's%/[^/][^/]*//*[^/][^/]*$%%'` + fi +fi + + fi + if test "x$prefix" = xNONE; then + if test "x$prefix" = xNONE; then +echo $ac_n "checking for prefix by $ac_c" 1>&6 # Extract the first word of "tclsh8.2", so it can be a program name with args. set dummy tclsh8.2; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:690: checking for $ac_word" >&5 +echo "configure:719: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TCLSH8.2'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -730,7 +759,7 @@ echo $ac_n "checking for prefix by $ac_c" 1>&6 # Extract the first word of "tclsh8.1", so it can be a program name with args. set dummy tclsh8.1; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:734: checking for $ac_word" >&5 +echo "configure:763: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TCLSH8.1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -774,7 +803,7 @@ echo $ac_n "checking for prefix by $ac_c" 1>&6 # Extract the first word of "tclsh8.0", so it can be a program name with args. set dummy tclsh8.0; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:778: checking for $ac_word" >&5 +echo "configure:807: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TCLSH8.0'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -818,7 +847,7 @@ echo $ac_n "checking for prefix by $ac_c" 1>&6 # Extract the first word of "tclsh7.6", so it can be a program name with args. set dummy tclsh7.6; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:822: checking for $ac_word" >&5 +echo "configure:851: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TCLSH7.6'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -862,7 +891,7 @@ echo $ac_n "checking for prefix by $ac_c" 1>&6 # Extract the first word of "tclsh7.5", so it can be a program name with args. set dummy tclsh7.5; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:866: checking for $ac_word" >&5 +echo "configure:895: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TCLSH7.5'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -909,7 +938,7 @@ fi fi if test -r ${tclconfig}/tclConfig.sh; then echo $ac_n "checking for Tcl""... $ac_c" 1>&6 -echo "configure:913: checking for Tcl" >&5 +echo "configure:942: checking for Tcl" >&5 . ${tclconfig}/tclConfig.sh TCLLIB="${TCL_LIB_SPEC} ${TCL_LIBS}" TCLINC=-I${TCL_PREFIX}/include @@ -924,7 +953,7 @@ else # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:928: checking for $ac_word" >&5 +echo "configure:957: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -954,7 +983,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:958: checking for $ac_word" >&5 +echo "configure:987: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1005,7 +1034,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1009: checking for $ac_word" >&5 +echo "configure:1038: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1037,7 +1066,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1041: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1070: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1048,12 +1077,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1052 "configure" +#line 1081 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1079,12 +1108,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1083: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1112: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1088: checking whether we are using GNU C" >&5 +echo "configure:1117: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1093,7 +1122,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1112,7 +1141,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1116: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1145: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1150,7 +1179,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1154: checking for $ac_word" >&5 +echo "configure:1183: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1178,7 +1207,7 @@ else fi echo $ac_n "checking for Tcl""... $ac_c" 1>&6 -echo "configure:1182: checking for Tcl" >&5 +echo "configure:1211: checking for Tcl" >&5 TCL_VERSION=nope for i in "" 7.4 7.5 7.6 8.0; do if test -r ${tryprefix}/lib/libtcl${i}.a; then @@ -1200,71 +1229,6 @@ echo "configure:1182: checking for Tcl" >&5 fi TCLLIB="${TCL_LIB_SPEC} ${LIBS} -lm" fi -yazconfig=NONE -yazpath=NONE -# Check whether --with-yazconfig or --without-yazconfig was given. -if test "${with_yazconfig+set}" = set; then - withval="$with_yazconfig" - yazpath=$withval -fi - -if test "x$yazpath" != "xNONE"; then - yazconfig=$yazpath/yaz-config -else - for i in ../yaz* ../yaz; do - if test -d $i; then - if test -r $i/yaz-config; then - yazconfig=$i/yaz-config - fi - fi - done - if test "x$yazconfig" = "xNONE"; then - # Extract the first word of "yaz-config", so it can be a program name with args. -set dummy yaz-config; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1226: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_yazconfig'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$yazconfig" in - /*) - ac_cv_path_yazconfig="$yazconfig" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_yazconfig="$yazconfig" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_yazconfig="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_yazconfig" && ac_cv_path_yazconfig="NONE" - ;; -esac -fi -yazconfig="$ac_cv_path_yazconfig" -if test -n "$yazconfig"; then - echo "$ac_t""$yazconfig" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - fi -fi -echo $ac_n "checking for YAZ""... $ac_c" 1>&6 -echo "configure:1262: checking for YAZ" >&5 -if test -r $yazconfig; then - . $yazconfig - echo "$ac_t""$yazconfig" 1>&6 -else - echo "$ac_t""Not found" 1>&6 -fi trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -1417,20 +1381,17 @@ s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g s%@SHLIB_LD@%$SHLIB_LD%g s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g s%@SHLIB_VERSION@%$SHLIB_VERSION%g -s%@YAZLIB@%$YAZLIB%g -s%@YAZINC@%$YAZINC%g -s%@build_root@%$build_root%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@TCLSH@%$TCLSH%g +s%@TCLSH8.3@%$TCLSH8.3%g s%@TCLSH8.2@%$TCLSH8.2%g s%@TCLSH8.1@%$TCLSH8.1%g s%@TCLSH8.0@%$TCLSH8.0%g s%@TCLSH7.6@%$TCLSH7.6%g s%@TCLSH7.5@%$TCLSH7.5%g s%@RANLIB@%$RANLIB%g -s%@yazconfig@%$yazconfig%g CEOF EOF diff --git a/configure.in b/configure.in index aacc46b..ccba64e 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl (c) Index Data 1996-2000 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.5 2000/12/07 20:16:11 adam Exp $ +dnl $Id: configure.in,v 1.6 2001/01/23 12:05:07 adam Exp $ AC_INIT(hswitch.c) dnl ------ Substitutions AC_SUBST(CC) @@ -10,15 +10,8 @@ AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_SUFFIX) AC_SUBST(SHLIB_VERSION) -AC_SUBST(YAZLIB) -AC_SUBST(YAZINC) -dnl -dnl ------ Build root -AC_SUBST(build_root) -AC_ARG_WITH(build-root, [ --with-buildroot RPM Build root],[build_root=$withval],[build_root=""]) -dnl -dnl ------ Preliminary settings AC_PROG_INSTALL +dnl dnl ------ look for Tcl tclconfig=NONE tryprefix=NONE @@ -92,34 +85,4 @@ else fi TCLLIB="${TCL_LIB_SPEC} ${LIBS} -lm" fi -dnl -dnl ------ Look for Yaz -dnl See if user specified location of yaz-config; otherwise -dnl use ../yaz if is a directory (internal development); otherwise -dnl use yaz-config found in PATH. -yazconfig=NONE -yazpath=NONE -AC_ARG_WITH(yazconfig, [ --with-yazconfig Path for yaz-config], [yazpath=$withval]) -if test "x$yazpath" != "xNONE"; then - yazconfig=$yazpath/yaz-config -else - for i in ../yaz* ../yaz; do - if test -d $i; then - if test -r $i/yaz-config; then - yazconfig=$i/yaz-config - fi - fi - done - if test "x$yazconfig" = "xNONE"; then - AC_PATH_PROG(yazconfig, yaz-config, NONE) - fi -fi -AC_MSG_CHECKING(for YAZ) -if test -r $yazconfig; then - . $yazconfig - AC_MSG_RESULT($yazconfig) -else - AC_MSG_RESULT(Not found) -fi -dnl AC_OUTPUT(Makefile) -- 1.7.10.4