From f69d4aa4609ff3daa71733da1ea0fcd8322ab954 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 28 Oct 1998 15:09:59 +0000 Subject: [PATCH] Added --with-yc option to configure. For the data1_node in data1.h: decreased size of localdata and removed member "line" which wasn't useful. --- Makefile.in | 23 ++-- asn/Makefile.in | 4 +- ccl/Makefile.in | 10 +- client/Makefile.in | 6 +- comstack/Makefile.in | 6 +- configure | 338 +++++++++++++++++++++++++------------------------ configure.in | 47 ++++--- include/data1.h | 9 +- odr/Makefile.in | 6 +- retrieval/Makefile.in | 6 +- retrieval/d1_read.c | 7 +- rfc1006/Makefile.in | 4 +- server/Makefile.in | 10 +- util/Makefile.in | 6 +- ztest/Makefile.in | 6 +- 15 files changed, 257 insertions(+), 231 deletions(-) diff --git a/Makefile.in b/Makefile.in index 77fe227..70334f3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,29 +1,22 @@ # Copyright (C) 1995-1998, Index Data # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile.in,v 1.4 1998-09-28 12:44:47 adam Exp $ +# $Id: Makefile.in,v 1.5 1998-10-28 15:09:59 adam Exp $ # Uncomment the lines below to enable mOSI communcation. -#ODEFS=-DUSE_XTIMOSI +#CDEFS=-DUSE_XTIMOSI #RFC1006=rfc1006 #LIBMOSI=../../xtimosi/src/libmosi.a ../lib/librfc.a #XMOSI=xmosi.o -CDEFS=@DEFS@ @ODEFS@ +CDEFS=@DEFS@ # Standard include path and original protocol encoders. -INCLUDE=-I. -I../include -MOD=asn - -# Uncomment the two lines below if you want to try the ASN.1 compiler -# (yc) for YAZ. Download yc separately and untar it along with YAZ: -# gunzip -c yaz.tar.gz | tar xvf - -# gunzip -c yc.tar.gz | tar xvf - -# cd yaz -# ln -s ../yc/z39.50 -# You must run 'make depend' before 'make'. -#INCLUDE=-I../z39.50 -I. -I../include -#MOD=z39.50 +INCLUDE=-I. -I../z39.50 -I../include + +# The Module below is either asn (the original de/en-coders) +# or z39.50 (the compiled de/en-coders). +MOD=@ASNMODULE@ CC=@CC@ CPP=@CPP@ diff --git a/asn/Makefile.in b/asn/Makefile.in index 743530a..ca9e822 100644 --- a/asn/Makefile.in +++ b/asn/Makefile.in @@ -1,14 +1,14 @@ # Copyright (C) 1995-1998, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile.in,v 1.2 1998-08-25 16:19:38 adam Exp $ +# $Id: Makefile.in,v 1.3 1998-10-28 15:10:02 adam Exp $ SHELL=/bin/sh CC=@CC@ CPP=@CPP@ RANLIB=@RANLIB@ -CDEFS=@DEFS@ @ODEFS@ +CDEFS=@DEFS@ LIBS=@LIBS@ INCLUDE=-I../include -I. diff --git a/ccl/Makefile.in b/ccl/Makefile.in index 889b5ab..6b8f131 100644 --- a/ccl/Makefile.in +++ b/ccl/Makefile.in @@ -2,7 +2,11 @@ # Europagate, 1995 # # $Log: Makefile.in,v $ -# Revision 1.2 1998-08-25 16:19:39 adam +# Revision 1.3 1998-10-28 15:10:03 adam +# Added --with-yc option to configure. For the data1_node in data1.h: +# decreased size of localdata and removed member "line" which wasn't useful. +# +# Revision 1.2 1998/08/25 16:19:39 adam # Minor changes to Makefile(s). # # Revision 1.1 1998/08/21 14:13:26 adam @@ -57,10 +61,10 @@ SHELL=/bin/sh CC=@CC@ CPP=@CPP@ RANLIB=@RANLIB@ -CDEFS=@DEFS@ @ODEFS@ +CDEFS=@DEFS@ LIBS=@LIBS@ -INCLUDE=-I../include +INCLUDE=-I../z39.50 -I../include PROG=cclsh LIB=../lib/ccl.a PO=cclfind.o ccltoken.o cclerrms.o cclqual.o cclptree.o cclqfile.o cclstr.o diff --git a/client/Makefile.in b/client/Makefile.in index 670a942..0729a66 100644 --- a/client/Makefile.in +++ b/client/Makefile.in @@ -1,21 +1,21 @@ # Copyright (C) 1995-1998, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile.in,v 1.3 1998-09-30 15:06:03 adam Exp $ +# $Id: Makefile.in,v 1.4 1998-10-28 15:10:04 adam Exp $ SHELL=/bin/sh CC=@CC@ CPP=@CPP@ RANLIB=@RANLIB@ -CDEFS=@DEFS@ @ODEFS@ +CDEFS=@DEFS@ LIBS=@LIBS@ LIBDIR=../lib #LIBMOSI=../../xtimosi/src/libmosi.a $(LIBDIR)/librfc.a -INCLUDE=-I../include -I. -I../../xtimosi/src +INCLUDE=-I../z39.50 -I../include -I. -I../../xtimosi/src DEFS=$(INCLUDE) $(CDEFS) -DCCL2RPN=1 YAZLIBS=$(LIBDIR)/libasn.a $(LIBDIR)/libutil.a \ $(LIBDIR)/libcomstack.a ../lib/ccl.a $(LIBMOSI) $(LIBDIR)/libodr.a diff --git a/comstack/Makefile.in b/comstack/Makefile.in index 78e8111..b93bfe1 100644 --- a/comstack/Makefile.in +++ b/comstack/Makefile.in @@ -1,13 +1,13 @@ -# Copyright (C) 1994, Index Data I/S +# Copyright (C) 1994-1998, Index Data # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile.in,v 1.2 1998-08-25 16:19:41 adam Exp $ +# $Id: Makefile.in,v 1.3 1998-10-28 15:10:05 adam Exp $ SHELL=/bin/sh CC=@CC@ CPP=@CPP@ RANLIB=@RANLIB@ -CDEFS=@DEFS@ @ODEFS@ +CDEFS=@DEFS@ LIBS=@LIBS@ LIBDIR=../lib diff --git a/configure b/configure index a05f6d7..c19d139 100755 --- a/configure +++ b/configure @@ -12,7 +12,7 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help - --enable-gcc allow use of gcc if available" + --with-yc compile using YC: The Yaz Compiler" ac_help="$ac_help --enable-threads enable threads if available" @@ -522,20 +522,10 @@ else fi - -# Check whether --enable-gcc or --disable-gcc was given. -if test "${enable_gcc+set}" = set; then - enableval="$enable_gcc" - gcc_ok=$enableval -else - gcc_ok=no -fi - -if test "$gcc_ok" = "yes"; then - # Extract the first word of "gcc", so it can be a program name with args. +# 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:539: checking for $ac_word" >&5 +echo "configure:529: 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 @@ -564,7 +554,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:568: checking for $ac_word" >&5 +echo "configure:558: 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 @@ -612,7 +602,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:616: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:606: 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. @@ -622,11 +612,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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 @@ -646,12 +636,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:650: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:640: 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:655: checking whether we are using GNU C" >&5 +echo "configure:645: 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 @@ -660,7 +650,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:664: \"$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:654: \"$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 @@ -675,7 +665,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:679: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:669: 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 @@ -702,12 +692,8 @@ else test "${CFLAGS+set}" = set || CFLAGS="-g" fi -else - CC=${CC-cc} - -fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:711: checking how to run the C preprocessor" >&5 +echo "configure:697: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -722,13 +708,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -739,13 +725,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -797,7 +783,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:801: checking for a BSD compatible install" >&5 +echo "configure:787: 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 @@ -849,7 +835,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # 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:853: checking for $ac_word" >&5 +echo "configure:839: 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 @@ -875,14 +861,37 @@ else echo "$ac_t""no" 1>&6 fi + +# Check whether --with-yc or --without-yc was given. +if test "${with_yc+set}" = set; then + withval="$with_yc" + YCDIR=$withval +fi + + +if test "$YCDIR" = "yes"; then + YCDIR="../yc" +fi +if test -L z39.50; then + rm z39.50 +fi +if test ! -d $YCDIR; then + echo "configure: warning: YC directory ${YCDIR} doesn't exist" 1>&2 +fi +if test "$YCDIR" = ""; then + ASNMODULE=asn +else + ln -s ${YCDIR}/z39.50 z39.50 + ASNMODULE=z39.50 +fi checkBoth=0 echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:881: checking for connect" >&5 +echo "configure:890: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -926,7 +935,7 @@ fi if test "$ac_cv_func_connect" = "no"; then echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:930: checking for main in -lsocket" >&5 +echo "configure:939: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -934,14 +943,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -967,12 +976,12 @@ if test "$checkBoth" = "1"; then oldLibs=$LIBS LIBS="$LIBS -lsocket -lnsl" echo $ac_n "checking for accept""... $ac_c" 1>&6 -echo "configure:971: checking for accept" >&5 +echo "configure:980: checking for accept" >&5 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_accept=yes" else @@ -1017,12 +1026,12 @@ fi fi echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:1021: checking for gethostbyname" >&5 +echo "configure:1030: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -1063,7 +1072,7 @@ if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:1067: checking for main in -lnsl" >&5 +echo "configure:1076: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1071,14 +1080,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1100,6 +1109,113 @@ fi fi +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1114: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +#include +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + ac_cv_header_stdc=yes +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "memchr" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "free" >/dev/null 2>&1; then + : +else + rm -rf conftest* + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +if test "$cross_compiling" = yes; then + : +else + cat > conftest.$ac_ext < +#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int main () { int i; for (i = 0; i < 256; i++) +if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); +exit (0); } + +EOF +if { (eval echo configure:1194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + : +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_header_stdc=no +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_header_stdc" 1>&6 +if test $ac_cv_header_stdc = yes; then + cat >> confdefs.h <<\EOF +#define STDC_HEADERS 1 +EOF + +fi + +if test "$ac_cv_header_stdc" = "no"; then + echo "configure: warning: Your system doesn't seem to support ANSI C" 1>&2 +fi # Check whether --enable-threads or --disable-threads was given. if test "${enable_threads+set}" = set; then enableval="$enable_threads" @@ -1113,17 +1229,17 @@ if test "$threads_ok" = "yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1117: checking for $ac_hdr" >&5 +echo "configure:1233: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1150,12 +1266,12 @@ fi done echo $ac_n "checking for pthread_mutex_lock""... $ac_c" 1>&6 -echo "configure:1154: checking for pthread_mutex_lock" >&5 +echo "configure:1270: checking for pthread_mutex_lock" >&5 if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_lock'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_pthread_mutex_lock=yes" else @@ -1199,7 +1315,7 @@ fi if test "$ac_cv_func_pthread_mutex_lock" = "no"; then echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6 -echo "configure:1203: checking for main in -lpthread" >&5 +echo "configure:1319: checking for main in -lpthread" >&5 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1207,14 +1323,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1242,115 +1358,11 @@ else fi fi - ODEFS="$ODEFS -D_REENTRANT" -fi -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1249: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -#include -#include -#include -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - rm -rf conftest* - ac_cv_header_stdc=yes -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "memchr" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "free" >/dev/null 2>&1; then - : -else - rm -rf conftest* - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. -if test "$cross_compiling" = yes; then - : -else - cat > conftest.$ac_ext < -#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int main () { int i; for (i = 0; i < 256; i++) -if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); -exit (0); } - + cat >> confdefs.h <<\EOF +#define _REENTRANT 1 EOF -if { (eval echo configure:1329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - ac_cv_header_stdc=no -fi -rm -fr conftest* -fi fi -fi - -echo "$ac_t""$ac_cv_header_stdc" 1>&6 -if test $ac_cv_header_stdc = yes; then - cat >> confdefs.h <<\EOF -#define STDC_HEADERS 1 -EOF - -fi - -if test "$ac_cv_header_stdc" = "no"; then - echo "configure: warning: Your system doesn't seem to support ANSI C" 1>&2 -fi trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -1494,12 +1506,12 @@ s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g -s%@ODEFS@%$ODEFS%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@RANLIB@%$RANLIB%g +s%@ASNMODULE@%$ASNMODULE%g CEOF EOF diff --git a/configure.in b/configure.in index a4447da..6ff78f4 100644 --- a/configure.in +++ b/configure.in @@ -1,24 +1,35 @@ dnl YAZ Toolkit dnl (c) Index Data 1994-1998 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.2 1998-09-02 12:41:50 adam Exp $ +dnl $Id: configure.in,v 1.3 1998-10-28 15:10:01 adam Exp $ AC_INIT(include/yaz-version.h) -dnl ------ Substitutions -AC_SUBST(ODEFS) dnl dnl ------ Checking programs -AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available], - [gcc_ok=$enableval], [gcc_ok=no]) -if test "$gcc_ok" = "yes"; then - AC_PROG_CC -else - CC=${CC-cc} -AC_SUBST(CC) -fi +AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_RANLIB dnl +dnl ----- YC: The Yaz Compiler +AC_SUBST(ASNMODULE) +AC_ARG_WITH(yc,[ --with-yc compile using YC: The Yaz Compiler], [YCDIR=$withval]) + +if test "$YCDIR" = "yes"; then + YCDIR="../yc" +fi +if test -L z39.50; then + rm z39.50 +fi +if test ! -d $YCDIR; then + AC_MSG_WARN(YC directory ${YCDIR} doesn't exist) +fi +if test "$YCDIR" = ""; then + ASNMODULE=asn +else + ln -s ${YCDIR}/z39.50 z39.50 + ASNMODULE=z39.50 +fi +dnl dnl ----- Sockets checkBoth=0 AC_CHECK_FUNC(connect) @@ -32,6 +43,12 @@ if test "$checkBoth" = "1"; then fi AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"])) dnl +dnl ------ Headers +AC_STDC_HEADERS +if test "$ac_cv_header_stdc" = "no"; then + AC_MSG_WARN(Your system doesn't seem to support ANSI C) +fi +dnl dnl ------ Threads AC_ARG_ENABLE(threads, [ --enable-threads enable threads if available], [threads_ok=$enableval], [threads_ok=no]) @@ -41,13 +58,7 @@ if test "$threads_ok" = "yes"; then if test "$ac_cv_func_pthread_mutex_lock" = "no"; then AC_CHECK_LIB(pthread, main) fi - ODEFS="$ODEFS -D_REENTRANT" -fi -dnl -dnl ------ Headers -AC_STDC_HEADERS -if test "$ac_cv_header_stdc" = "no"; then - AC_MSG_WARN(Your system doesn't seem to support ANSI C) + AC_DEFINE(_REENTRANT) fi dnl dnl ------ Makefiles diff --git a/include/data1.h b/include/data1.h index e7982d4..dce4698 100644 --- a/include/data1.h +++ b/include/data1.h @@ -24,7 +24,11 @@ * OF THIS SOFTWARE. * * $Log: data1.h,v $ - * Revision 1.38 1998-10-15 08:29:15 adam + * Revision 1.39 1998-10-28 15:10:06 adam + * Added --with-yc option to configure. For the data1_node in data1.h: + * decreased size of localdata and removed member "line" which wasn't useful. + * + * Revision 1.38 1998/10/15 08:29:15 adam * Tag set type may be specified in reference to it using "tagset" * directive in .abs-files and "include" directive in .tag-files. * @@ -438,9 +442,8 @@ typedef struct data1_node } u; void (*destroy)(struct data1_node *n); -#define DATA1_LOCALDATA 40 +#define DATA1_LOCALDATA 20 char lbuf[DATA1_LOCALDATA]; /* small buffer for local data */ - int line; struct data1_node *next; struct data1_node *child; struct data1_node *last_child; diff --git a/odr/Makefile.in b/odr/Makefile.in index 8381700..f186cbb 100644 --- a/odr/Makefile.in +++ b/odr/Makefile.in @@ -1,17 +1,17 @@ # Copyright (C) 1995-1998, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile.in,v 1.2 1998-08-25 16:19:43 adam Exp $ +# $Id: Makefile.in,v 1.3 1998-10-28 15:10:07 adam Exp $ SHELL=/bin/sh CC=@CC@ CPP=@CPP@ RANLIB=@RANLIB@ -CDEFS=@DEFS@ @ODEFS@ +CDEFS=@DEFS@ LIBS=@LIBS@ -INCLUDE=-I../include -I. +INCLUDE=-I../z39.50 -I../include -I. LIBDIR=../lib DEFS=$(INCLUDE) $(CDEFS) # -DODR_DEBUG diff --git a/retrieval/Makefile.in b/retrieval/Makefile.in index a81a92d..00a53cc 100644 --- a/retrieval/Makefile.in +++ b/retrieval/Makefile.in @@ -1,14 +1,14 @@ -# $Id: Makefile.in,v 1.1 1998-08-21 14:13:31 adam Exp $ +# $Id: Makefile.in,v 1.2 1998-10-28 15:10:08 adam Exp $ SHELL=/bin/sh CC=@CC@ CPP=@CPP@ RANLIB=@RANLIB@ -CDEFS=@DEFS@ @ODEFS@ +CDEFS=@DEFS@ ELIBS=@LIBS@ -INCLUDE=-I../include -I. +INCLUDE=-I../z39.50 -I../include -I. DEFS=$(INCLUDE) $(CDEFS) LIB=../lib/libret.a PO = d1_handle.o d1_read.o d1_attset.o d1_tagset.o d1_absyn.o d1_grs.o \ diff --git a/retrieval/d1_read.c b/retrieval/d1_read.c index bb9e879..0e615e7 100644 --- a/retrieval/d1_read.c +++ b/retrieval/d1_read.c @@ -4,7 +4,11 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: d1_read.c,v $ - * Revision 1.23 1998-03-12 11:28:45 adam + * Revision 1.24 1998-10-28 15:10:09 adam + * Added --with-yc option to configure. For the data1_node in data1.h: + * decreased size of localdata and removed member "line" which wasn't useful. + * + * Revision 1.23 1998/03/12 11:28:45 adam * Fix: didn't set root member of tagged node in function. * data1_add_insert_taggeddata. * @@ -201,7 +205,6 @@ data1_node *data1_add_insert_taggeddata(data1_handle dh, data1_node *root, data1_node *datn; tagn->which = DATA1N_tag; - tagn->line = -1; tagn->u.tag.tag = data1_insert_string (dh, tagn, m, tagname); tagn->u.tag.node_selected = 0; tagn->u.tag.make_variantlist = 0; diff --git a/rfc1006/Makefile.in b/rfc1006/Makefile.in index f43d60b..c8b4a04 100644 --- a/rfc1006/Makefile.in +++ b/rfc1006/Makefile.in @@ -1,14 +1,14 @@ # Copyright (C) 1994-1998, Index Data # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile.in,v 1.1 1998-08-21 14:13:33 adam Exp $ +# $Id: Makefile.in,v 1.2 1998-10-28 15:10:10 adam Exp $ SHELL=/bin/sh CC=@CC@ CPP=@CPP@ RANLIB=@RANLIB@ -CDEFS=@ODEFS@ @ODEFS@ +CDEFS=@DEFS@ INCLUDE=-I../include -I. -I../../xtimosi/src LIBDIR=../lib diff --git a/server/Makefile.in b/server/Makefile.in index b37cde9..fac9db8 100644 --- a/server/Makefile.in +++ b/server/Makefile.in @@ -1,25 +1,25 @@ -# Copyright (C) 1995-1998, Index Data I/S +# Copyright (C) 1995-1998, Index Data # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile.in,v 1.2 1998-08-25 16:19:44 adam Exp $ +# $Id: Makefile.in,v 1.3 1998-10-28 15:10:11 adam Exp $ SHELL=/bin/sh CC=@CC@ CPP=@CPP@ RANLIB=@RANLIB@ +CDEFS=@DEFS@ +LIBS=@LIBS@ LIBDIR=../lib #LIBMOSI=../../xtimosi/src/libmosi.a $(LIBDIR)/librfc.a -INCLUDE=-I../include -I. -I../../xtimosi/src +INCLUDE=-I../z39.50 -I../include -I. -I../../xtimosi/src LIBINCLUDE=-L$(LIBDIR) -CDEFS=@DEFS@ @ODEFS@ DEFS=$(INCLUDE) $(CDEFS) LIB=$(LIBDIR)/libserver.a PO = eventl.o seshigh.o statserv.o requestq.o -LIBS=@LIBS@ all: $(LIB) diff --git a/util/Makefile.in b/util/Makefile.in index d11a8cd..223a6cb 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -1,17 +1,17 @@ # Copyright (C) 1994-1997, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile.in,v 1.2 1998-08-25 16:19:45 adam Exp $ +# $Id: Makefile.in,v 1.3 1998-10-28 15:10:12 adam Exp $ SHELL=/bin/sh CC=@CC@ CPP=@CPP@ RANLIB=@RANLIB@ -CDEFS=@DEFS@ @ODEFS@ +CDEFS=@DEFS@ LIBS=@LIBS@ -INCLUDE=-I../include -I. +INCLUDE=-I../z39.50 -I../include -I. LIBDIR=../lib DEFS=$(INCLUDE) $(CDEFS) diff --git a/ztest/Makefile.in b/ztest/Makefile.in index fb82295..98a5b0a 100644 --- a/ztest/Makefile.in +++ b/ztest/Makefile.in @@ -1,14 +1,14 @@ # Copyright (C) 1995-1998, Index Data I/S # All rights reserved. # Sebastian Hammer, Adam Dickmeiss -# $Id: Makefile.in,v 1.3 1998-09-30 15:06:04 adam Exp $ +# $Id: Makefile.in,v 1.4 1998-10-28 15:10:14 adam Exp $ SHELL=/bin/sh CC=@CC@ CPP=@CPP@ RANLIB=@RANLIB@ -CDEFS=@DEFS@ @ODEFS@ +CDEFS=@DEFS@ LIBS=@LIBS@ LIBDIR=../lib @@ -16,7 +16,7 @@ LIBDIR=../lib #LIBMOSI=../../xtimosi/src/libmosi.a $(LIBDIR)/librfc.a SHELL=/bin/sh -INCLUDE=-I../include -I. -I../../xtimosi/src +INCLUDE=-I../z39.50 -I../include -I. -I../../xtimosi/src DEFS=$(INCLUDE) $(CDEFS) LIB=$(LIBDIR)/libserver.a YAZLIBS=$(LIBDIR)/libserver.a $(LIBDIR)/libasn.a $(LIBDIR)/libodr.a \ -- 1.7.10.4