yaz-5.34.0/0000775000175000017500000000000014357765254007433 500000000000000yaz-5.34.0/m4/0000775000175000017500000000000014357765247007755 500000000000000yaz-5.34.0/m4/ltsugar.m40000644000175000017500000001044014217114300011562 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) yaz-5.34.0/m4/ltversion.m40000644000175000017500000000127314217114300012132 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file 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. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) yaz-5.34.0/m4/ltoptions.m40000644000175000017500000003426214217114300012144 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) yaz-5.34.0/m4/yaz_libxml2.m40000664000175000017500000001116014321541006012342 00000000000000AC_DEFUN([YAZ_LIBXML2],[ AC_PATH_PROG([pkgconfigpath], [pkg-config], [NONE]) pkgmodule="" xml2dir=default XML2_VER="" AC_ARG_WITH([xml2],[[ --with-xml2[=PREFIX] use libxml2 in PREFIX]],xml2dir=$withval) dnl -- if no PREFIX or not specified we just search in default locations dnl -- try pkg-config. If not found, use xml2-config if test "$xml2dir" = "yes" -o "$xml2dir" = "default"; then if test "$pkgconfigpath" != "NONE"; then if $pkgconfigpath --exists libxml-2.0; then pkgmodule="libxml-2.0" fi fi if test -z "$pkgmodule"; then for d in /usr /usr/local; do if test -x $d/bin/xml2-config; then xml2dir=$d fi done fi fi dnl --- do the real check (pkg-config, xml2-config, not-found) if test "$xml2dir" != "no"; then AC_MSG_CHECKING([for libXML2]) if test "$pkgmodule"; then XML2_LIBS=`$pkgconfigpath --libs $pkgmodule` XML2_CFLAGS=`$pkgconfigpath --cflags $pkgmodule` XML2_VER=`$pkgconfigpath --modversion $pkgmodule` AC_MSG_RESULT([$XML2_VER]) m4_default([$1],[AC_DEFINE([HAVE_XML2])]) elif test -x $xml2dir/bin/xml2-config; then XML2_LIBS=`$xml2dir/bin/xml2-config --libs` XML2_CFLAGS=`$xml2dir/bin/xml2-config --cflags` XML2_VER=`$xml2dir/bin/xml2-config --version` AC_MSG_RESULT([$XML2_VER]) m4_default([$1],[AC_DEFINE([HAVE_XML2])]) else AC_MSG_RESULT([Not found]) if test "$xml2dir" = "default"; then AC_MSG_WARN([libxml2 development libraries not found.]) AC_MSG_WARN([There will be no support for SRU.]) else AC_MSG_ERROR([libxml2 development libraries not found.]) fi fi XML2_LIBS=`echo $XML2_LIBS|sed 's@-./usr/lib @@g'` fi ]) AC_DEFUN([YAZ_LIBXSLT],[ pkgmodule="" xsltdir=default yaz_xslt_pkgconfig=no XSLT_VER="" AC_ARG_WITH([xslt],[[ --with-xslt[=PREFIX] use libXSLT in PREFIX]],xsltdir=$withval) dnl -- if no PREFIX or not specified we just search in default locations dnl -- try pkg-config. If not found, use xslt-config if test "$xsltdir" = "yes" -o "$xsltdir" = "default"; then if test "$pkgconfigpath" != "NONE"; then # pkg-config on woody reports bad CFLAGS which does # not include libxml2 CFLAGS, so avoid it.. if $pkgconfigpath --atleast-version 1.1.0 libxslt; then pkgmodule="libxslt" fi fi if test -z "$pkgmodule"; then for d in /usr /usr/local; do if test -x $d/bin/xslt-config; then xsltdir=$d fi done fi fi dnl --- do the real check (pkg-config, xslt-config, not-found) if test "$xsltdir" != "no"; then AC_MSG_CHECKING([for libXSLT]) if test "$pkgmodule"; then XML2_LIBS=`$pkgconfigpath --libs $pkgmodule` XML2_CFLAGS=`$pkgconfigpath --cflags $pkgmodule` XSLT_VER=`$pkgconfigpath --modversion $pkgmodule` AC_MSG_RESULT([$XSLT_VER]) m4_default([$1],[AC_DEFINE([HAVE_XSLT])]) yaz_xslt_pkgconfig=yes elif test -x $xsltdir/bin/xslt-config; then XML2_LIBS=`$xsltdir/bin/xslt-config --libs` XML2_CFLAGS=`$xsltdir/bin/xslt-config --cflags` XSLT_VER=`$xsltdir/bin/xslt-config --version` AC_MSG_RESULT([$XSLT_VER]) m4_default([$1],[AC_DEFINE([HAVE_XSLT])]) else AC_MSG_RESULT([Not found]) if test "$xsltdir" = "default"; then AC_MSG_WARN([libXSLT development libraries not found.]) else AC_MSG_ERROR([libXSLT development libraries not found.]) fi fi XML2_LIBS=`echo $XML2_LIBS|sed 's@-./usr/lib @@g'` fi ]) dnl -- get libEXSLT. xslt-config is no good. So use pkg-config only AC_DEFUN([YAZ_LIBEXSLT],[ exsltdir=default pkgmodule="" EXSLT_VER="" AC_ARG_WITH([exslt],[[ --with-exslt[=PREFIX] use libEXSLT in PREFIX]],exsltdir=$withval) if test "$exsltdir" = "yes" -o "$exsltdir" = "default"; then if test "$pkgconfigpath" != "NONE"; then if $pkgconfigpath --exists libexslt; then pkgmodule="libexslt" fi fi fi if test "$exsltdir" != "no"; then AC_MSG_CHECKING([for libEXSLT]) if test "$pkgmodule"; then if test "$yaz_xslt_pkgconfig" != "yes"; then AC_MSG_RESULT([Disabled. Libxslt is not pkg-config configured]) else XML2_LIBS=`$pkgconfigpath --libs $pkgmodule` XML2_CFLAGS=`$pkgconfigpath --cflags $pkgmodule` EXSLT_VER=`$pkgconfigpath --modversion $pkgmodule` AC_MSG_RESULT([$EXSLT_VER]) m4_default([$1],[AC_DEFINE([HAVE_EXSLT])]) fi else AC_MSG_RESULT([Not found]) if test "$pkgconfigpath" = "NONE"; then extra="libEXSLT not enabled. pkg-config not found." else extra="libEXSLT development libraries not found." fi if test "$exsltdir" = "default"; then AC_MSG_WARN([$extra]) else AC_MSG_ERROR([$extra]) fi fi fi OLIBS=$LIBS LIBS="$LIBS $XML2_LIBS" AC_CHECK_FUNCS([xsltSaveResultToString]) LIBS=$OLIBS ]) dnl Local Variables: dnl mode:shell-script dnl sh-indentation: 2 dnl sh-basic-offset: 4 dnl End: yaz-5.34.0/m4/id-config.sh0000775000175000017500000000354214321541006012047 00000000000000# To be included by ../buildconf.sh . automake=automake aclocal=aclocal autoconf=autoconf libtoolize=libtoolize autoheader=autoheader test -d autom4te.cache && rm -r autom4te.cache test -d config || mkdir config if [ "`uname -s`" = FreeBSD ]; then # FreeBSD intalls the various auto* tools with version numbers echo "Using special configuration for FreeBSD ..." automake=automake aclocal="aclocal -I /usr/local/share/aclocal" autoconf=autoconf libtoolize=libtoolize autoheader=autoheader fi if [ "`uname -s`" = Darwin ]; then echo "Using special configuration for Darwin/MacOS ..." libtoolize=glibtoolize fi if $automake --version|head -1 |grep ' 1\.[4-7]'; then echo "automake 1.4-1.7 is active. You should use automake 1.8 or later" if [ -f /etc/debian_version ]; then echo " sudo apt-get install automake1.9" echo " sudo update-alternatives --config automake" fi exit 1 fi set -x $aclocal -I m4 if grep AC_CONFIG_HEADERS configure.ac >/dev/null; then $autoheader fi if grep ^LT_INIT configure.ac >/dev/null; then has_libtool=true $libtoolize --automake --force else has_libtool=false fi $automake --add-missing $autoconf set - if [ -f config.cache ]; then rm config.cache fi enable_configure=false enable_help=true sh_flags="" conf_flags="" case $1 in -d) sh_cflags="-g -Wall -Wstrict-prototypes" sh_cxxflags="-g -Wall" enable_configure=true enable_help=false shift ;; -c) sh_cflags="" sh_cxxflags="" enable_configure=true enable_help=false shift ;; esac if $enable_configure; then if [ -n "$sh_cflags" ]; then if $has_libtool; then CFLAGS="$sh_cflags" CXXFLAGS="$sh_cxxflags" ./configure \ --disable-shared --enable-static --with-pic $* else CFLAGS="$sh_cflags" CXXFLAGS="$sh_cxxflags" ./configure $* fi else ./configure $* fi fi yaz-5.34.0/m4/acx_pthread.m40000664000175000017500000002556714245160117012415 00000000000000##### http://autoconf-archive.cryp.to/acx_pthread.html # # SYNOPSIS # # ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) # # DESCRIPTION # # This macro figures out how to build C programs using POSIX threads. # It sets the PTHREAD_LIBS output variable to the threads library and # linker flags, and the PTHREAD_CFLAGS output variable to any special # C compiler flags that are needed. (The user can also force certain # compiler flags/libs to be tested by setting these environment # variables.) # # Also sets PTHREAD_CC to any special C compiler that is needed for # multi-threaded programs (defaults to the value of CC otherwise). # (This is necessary on AIX to use the special cc_r compiler alias.) # # NOTE: You are assumed to not only compile your program with these # flags, but also link it with them as well. e.g. you should link # with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS # $LIBS # # If you are only building threads programs, you may wish to use # these variables in your default LIBS, CFLAGS, and CC: # # LIBS="$PTHREAD_LIBS $LIBS" # CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # CC="$PTHREAD_CC" # # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute # constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to # that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). # # ACTION-IF-FOUND is a list of shell commands to run if a threads # library is found, and ACTION-IF-NOT-FOUND is a list of commands to # run it if it is not found. If ACTION-IF-FOUND is not specified, the # default action will define HAVE_PTHREAD. # # Please let the authors know if this macro fails on any platform, or # if you have any other suggestions or comments. This macro was based # on work by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) # (with help from M. Frigo), as well as ac_pthread and hb_pthread # macros posted by Alejandro Forero Cuervo to the autoconf macro # repository. We are also grateful for the helpful feedback of # numerous users. # # MODIFIED 2022 by adam@indexdata.dk. # # LAST MODIFICATION # # 2006-05-29 # # COPYLEFT # # Copyright (c) 2006 Steven G. Johnson # # 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 of the # License, 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. # # As a special exception, the respective Autoconf Macro's copyright # owner gives unlimited permission to copy, distribute and modify the # configure scripts that are the output of Autoconf when processing # the Macro. You need not follow the terms of the GNU General Public # License when using or distributing such scripts, even though # portions of the text of the Macro appear in them. The GNU General # Public License (GPL) does govern all other use of the material that # constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the # Autoconf Macro released by the Autoconf Macro Archive. When you # make and distribute a modified version of the Autoconf Macro, you # may extend this special exception to the GPL to apply to your # modified version as well. AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_SAVE AC_LANG([C]) acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) AC_TRY_LINK_FUNC([pthread_join],[acx_pthread_ok=yes]) AC_MSG_RESULT([$acx_pthread_ok]) if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" ;; pthread-config) AC_CHECK_PROG([acx_pthread_config], [pthread-config], [yes], [no]) if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ]])], [acx_pthread_ok=yes]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" AC_MSG_RESULT([$acx_pthread_ok]) if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. AC_MSG_CHECKING([for joinable pthread attribute]) attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int attr=$attr; return attr;]])], [attr_name=$attr; break]) done AC_MSG_RESULT([$attr_name]) if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, [Define to necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with xlc_r or cc_r if test x"$GCC" != xyes; then AC_CHECK_PROGS([PTHREAD_CC], [xlc_r cc_r], [${CC}]) else PTHREAD_CC=$CC fi else PTHREAD_CC="$CC" fi AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CC) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then ifelse([$1],,AC_DEFINE([HAVE_PTHREAD], [1], [Define if you have POSIX threads libraries and header files.]),[$1]) : else acx_pthread_ok=no $2 fi AC_LANG_RESTORE ])dnl ACX_PTHREAD yaz-5.34.0/m4/ac_check_icu.m40000664000175000017500000000551214321541006012472 00000000000000# SYNOPSIS # # AC_CHECK_ICU(version, action-if, action-if-not) # # DESCRIPTION # # Defines ICU_LIBS, ICU_CFLAGS, ICU_CPPFLAGS # # COPYLEFT # # Copyright (c) 2005 Akos Maroy # # Copying and distribution of this file, with or without # modification, are permitted in any medium without royalty provided # the copyright notice and this notice are preserved. AC_DEFUN([AC_CHECK_ICU], [icudir=default AC_ARG_WITH(icu,[ --with-icu[=PREFIX] use ICU libs in PREFIX], icudir=$withval) if test "$icudir" != "no"; then if test "$icudir" = "yes" -o "$icudir" = "default"; then AC_PATH_PROG([pkgconfigpath], [pkg-config], [NONE]) if test -x $pkgconfigpath; then AC_MSG_CHECKING([for icu-i18n via pkg-config]) if $pkgconfigpath --exists icu-i18n; then AC_MSG_RESULT([found]) ICU_VERSION=`$pkgconfigpath --modversion icu-i18n` ICU_CPPFLAGS="" ICU_CFLAGS=`$pkgconfigpath --cflags icu-i18n` ICU_LIBS=`$pkgconfigpath --libs icu-i18n` else AC_MSG_RESULT([not found]) fi fi fi if test -z "$ICU_VERSION"; then if test "$icudir" = "yes" -o "$icudir" = "default"; then AC_PATH_PROG([ICU_CONFIG], [icu-config], [NONE]) else ICU_CONFIG=${icudir}/bin/icu-config fi AC_MSG_CHECKING([$ICU_CONFIG]) if test -x "$ICU_CONFIG"; then AC_MSG_RESULT([found]) ICU_VERSION=`$ICU_CONFIG --version` ICU_PREFIX=`$ICU_CONFIG --prefix` ICU_CPPFLAGS=`$ICU_CONFIG --cppflags-searchpath`"" if test "$ICU_PREFIX" = "/usr"; then ICU_CPPFLAGS=`echo $ICU_CPPFLAGS|sed 's@-I/usr/include@@'` fi ICU_CFLAGS=`$ICU_CONFIG --cflags` if test "$ICU_PREFIX" = "/usr"; then ICU_LIBS=`$ICU_CONFIG --ldflags-libsonly` else ICU_LIBS=`$ICU_CONFIG --ldflags` fi case $host_os in solaris*) AC_CHECK_LIB([Crun],[_fini],[ICU_LIBS="$ICU_LIBS -lCrun"]) ;; esac else AC_MSG_RESULT([not found]) fi fi if test -n "$ICU_VERSION"; then AC_MSG_CHECKING([for ICU >= $1]) VERSION_CHECK=`expr $ICU_VERSION \>\= $1` if test "$VERSION_CHECK" = "1" ; then AC_MSG_RESULT([$ICU_VERSION]) else AC_MSG_RESULT([can not find ICU >= $1]) ICU_CPPFLAGS="" ICU_CFLAGS="" ICU_LIBS="" ICU_VERSION="" fi AC_SUBST([ICU_CPPFLAGS]) AC_SUBST([ICU_CFLAGS]) AC_SUBST([ICU_LIBS]) fi if test -z "$ICU_VERSION"; then if test "$icudir" != "default"; then AC_MSG_ERROR([libicu development libraries not found.]) fi fi fi if test -n "$ICU_VERSION"; then ifelse([$2], , :, [$2]) else ifelse([$3], , :, [$3]) fi ]) dnl Local Variables: dnl mode:shell-script dnl sh-indentation:4 dnl sh-basic-offset: 4 dnl End: yaz-5.34.0/m4/lt~obsolete.m40000644000175000017500000001377414217114300012470 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file 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. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) yaz-5.34.0/m4/yaz.m40000664000175000017500000001150214321541006010711 00000000000000# Use this m4 function for autoconf if you use YAZ in your own # configure script. dnl ----- Setup Docbook documentation for YAZ AC_DEFUN([YAZ_DOC], [ dnl autoconf < 2.60 does not define docdir if test -n "$docdir"; then docdir="${datadir}/doc/${PACKAGE}" AC_SUBST([docdir]) fi AC_SUBST([XSLTPROC_COMPILE]) XSLTPROC_COMPILE='xsltproc --xinclude -path ".:$(srcdir)"' AC_SUBST([MAN_COMPILE]) MAN_COMPILE='$(XSLTPROC_COMPILE) $(srcdir)/common/id.man.xsl' AC_SUBST([HTML_COMPILE]) HTML_COMPILE='$(XSLTPROC_COMPILE) $(srcdir)/common/id.htmlhelp.xsl' AC_SUBST([TKL_COMPILE]) TKL_COMPILE='$(XSLTPROC_COMPILE) $(srcdir)/common/id.tkl.xsl' AC_SUBST([PDF_COMPILE]) PDF_COMPILE='dblatex -P latex.class.options=a4paper,12pt,twoside,openright' AC_SUBST([DTD_DIR]) AC_ARG_WITH([docbook-dtd],[[ --with-docbook-dtd=DIR use docbookx.dtd in DIR]], [ if test -f "$withval/docbookx.dtd"; then DTD_DIR=$withval fi ],[ AC_MSG_CHECKING([for docbookx.dtd]) DTD_DIR="" for d in /usr/lib/sgml/dtd/docbook-xml \ /usr/share/sgml/docbook/dtd/4.2 \ /usr/share/sgml/docbook/dtd/xml/4.* \ /usr/share/sgml/docbook/xml-dtd-4.* \ /usr/local/share/xml/docbook/4.* do if test -f $d/docbookx.dtd; then DTD_DIR=$d fi done if test -z "$DTD_DIR"; then AC_MSG_RESULT([Not found]) else AC_MSG_RESULT([$d]) fi ]) AC_SUBST([DSSSL_DIR]) AC_ARG_WITH([docbook-dsssl],[[ --with-docbook-dsssl=DIR use Docbook DSSSL in DIR/{html,print}/docbook.dsl]], [ if test -f "$withval/html/docbook.dsl"; then DSSSL_DIR=$withval fi ],[ AC_MSG_CHECKING([for docbook.dsl]) DSSSL_DIR="" for d in /usr/share/sgml/docbook/stylesheet/dsssl/modular \ /usr/share/sgml/docbook/dsssl-stylesheets-1.* \ /usr/lib/sgml/stylesheet/dsssl/docbook/nwalsh \ /usr/local/share/sgml/docbook/dsssl/modular do if test -f $d/html/docbook.dsl; then AC_MSG_RESULT([$d]) DSSSL_DIR=$d break fi done if test -z "$DSSSL_DIR"; then AC_MSG_RESULT([Not found]) fi ]) AC_SUBST([XSL_DIR]) AC_ARG_WITH([docbook-xsl],[[ --with-docbook-xsl=DIR use Docbook XSL in DIR/{htmlhelp,xhtml}]], [ if test -f "$withval/htmlhelp/htmlhelp.xsl"; then XSL_DIR=$withval fi ],[ AC_MSG_CHECKING([for htmlhelp.xsl]) for d in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh \ /usr/local/share/xsl/docbook \ /usr/share/sgml/docbook/xsl-stylesheets-1.* do if test -f $d/htmlhelp/htmlhelp.xsl; then AC_MSG_RESULT([$d]) XSL_DIR=$d break fi done if test -z "$XSL_DIR"; then AC_MSG_RESULT([Not found]) fi ]) ]) dnl helper get YAZ flasg/libs via yaz-config AC_DEFUN([YAZ_CONFIG], [ if test "x$yazpath" != "xNONE"; then yazconfig=$yazpath/yaz-config else if test "x$srcdir" = "x"; then yazsrcdir=. else yazsrcdir=$srcdir fi for i in ${yazsrcdir}/../../yaz ${yazsrcdir}/../yaz-* ${yazsrcdir}/../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 via yaz-config]) if $yazconfig --version >/dev/null 2>&1; then YAZLIB=`$yazconfig --libs $1` # if this is empty, it's a simple version YAZ 1.6 script # so we have to source it instead... if test "X$YAZLIB" = "X"; then . $yazconfig else YAZLALIB=`$yazconfig --lalibs $1` YAZINC=`$yazconfig --cflags $1` YAZVERSION=`$yazconfig --version` fi AC_MSG_RESULT([$yazconfig]) else AC_MSG_RESULT([Not found]) YAZVERSION=NONE fi if test "X$YAZVERSION" != "XNONE"; then AC_MSG_CHECKING([for YAZ version]) AC_MSG_RESULT([$YAZVERSION]) if test "$2"; then have_yaz_version=`echo "$YAZVERSION" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` req_yaz_version=`echo "$2" | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'` if test "$have_yaz_version" -lt "$req_yaz_version"; then AC_MSG_ERROR([$YAZVERSION. Requires YAZ $2 or later]) fi fi fi ]) dnl helper get YAZ flags/libs via yaz-config dnl argument 1 is components (server,icu,static) dnl argument 2 is version required (or later) AC_DEFUN([YAZ_INIT], [ AC_SUBST([YAZLIB]) AC_SUBST([YAZLALIB]) AC_SUBST([YAZINC]) AC_SUBST([YAZVERSION]) yazconfig=NONE yazpath=NONE AC_ARG_WITH([yaz], [ --with-yaz=DIR use yaz-config in DIR; DIR=pkg to use pkg-config], [yazpath=$withval]) if test "x$yazpath" = "xpkg"; then COMP=yaz for i in $1; do if test "$i" != "static"; then COMP="$COMP yaz-$i" fi done PKG_CHECK_MODULES([YAZ], [$COMP], [ YAZLIB=$YAZ_LIBS YAZLALIB=$YAZLIB YAZINC=$YAZ_CFLAGS AC_MSG_CHECKING([for YAZ version]) YAZVERSION=`$PKG_CONFIG --modversion yaz` AC_MSG_RESULT([$YAZVERSION]) if test "$2"; then if ! $PKG_CONFIG --atleast-version=$2 yaz; then AC_MSG_ERROR([$YAZVERSION. Requires YAZ $2 or later]) fi fi ]) else YAZ_CONFIG($1,$2) fi ]) yaz-5.34.0/m4/libtool.m40000644000175000017500000112677114217114300011565 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool 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 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*|11.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cr} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && 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 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # flang / f18. f95 an alias for gfortran or flang on Debian flang* | f18* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS yaz-5.34.0/m4/mk_version.tcl0000664000175000017500000000242314245157311012535 00000000000000#!/usr/bin/tclsh proc usage {} { puts {mk_version.tcl [-v] IDMETA infile ..} exit 1 } set verbose 0 set l [llength $argv] set i 0 while {$i < $l} { set arg [lindex $argv $i] switch -glob -- $arg { -v { incr verbose } default { if {![info exists conffile]} { set conffile $arg } else { lappend infiles $arg } } } incr i } if {![info exists infiles]} { puts "mk_version.tcl: missing input file(s)" usage } set f [open $conffile r] while {1} { set cnt [gets $f line] if {$cnt < 0} { break } regexp {VERSION=([0-9.]+)} $line s version } close $f set maps(VERSION) $version set c [split $version .] set versionl [expr ([lindex $c 0] * 256 + [lindex $c 1]) * 256 + [lindex $c 2]] set maps(VERSION_HEX) [format %x $versionl] if {[llength $c] == 3} { lappend c 1 } set maps(WIN_FILEVERSION) [join $c ,] set maps(VERSION_SHA1) {} foreach x [array names maps] { puts "$x=$maps($x)" } foreach ifile $infiles { set if [open "${ifile}.in" r] set of [open "${ifile}" w] while {1} { set cnt [gets $if line] if {$cnt < 0} { break } foreach x [array names maps] { regsub -all "@$x@" $line $maps($x) line } puts $of $line } close $if close $of } yaz-5.34.0/m4/common.nsi0000664000175000017500000000343514245157311011664 00000000000000; Common NSIS macro for YAZ, Zebra, etc ; Copyright (C) Index Data ; See the file LICENSE for details. !define VSVER "$%VisualStudioVersion%" !define VS_REDIST_EXE "vc_redist.${VSARCH}.exe" ; VS 2017 defines VCToolsRedistDir env (and hopefully later versions too) !if "${VSVER}" == "14.0" !define VS_REDIST_FULL "$%VSINSTALLDIR%\VC\redist\1033\${VS_REDIST_EXE}" !else !define VS_REDIST_FULL "$%VCToolsRedistDir%${VS_REDIST_EXE}" !endif ; For example can be found with regedit: ; Microsoft Visual C++ 2013 x86 Minimum Runtime !if "${VSARCH}" == "x64" ; 64-bit InstallDir "$PROGRAMFILES64\$(^Name)" !if "${VSVER}" == "14.0" ; Microsoft Visual C++ 2015 x64 Minimum Runtime - 14.0.23026 !define VS_REDIST_KEY "SOFTWARE\Classes\Installer\Products\51E9E3D0A7EDB003691F4BFA219B4688" !else if "${VSVER}" == "15.0" ; Microsoft Visual C++ 2017 x64 Minimum Runtime - 14.13.26020 !define VS_REDIST_KEY "SOFTWARE\Classes\Installer\Products\4BD6D1222E64C3330BB9F59453D19008" !else if "${VSVER}" == "16.0" ; Microsoft Visual C++ 2019 x64 Minimum Runtime - 14.28.29334 !define VS_REDIST_KEY "SOFTWARE\Classes\Installer\Products\B5D7F3A8D2249D94487FD81C7B879276" !else !error ${VSVER} !endif !else ; 32-bit InstallDir "$PROGRAMFILES\$(^Name)" !if "${VSVER}" == "14.0" ; Microsoft Visual C++ 2015 x86 Minimum Runtime - 14.0.23026 !define VS_REDIST_KEY "SOFTWARE\Classes\Installer\Products\55E3652ACEB38283D8765E8E9B8E6B57" !else if "${VSVER}" == "15.0" ; Microsoft Visual C++ 2017 x86 Minimum Runtime - 14.13.26020 !define VS_REDIST_KEY "SOFTWARE\Classes\Installer\Products\C6F172F8B7E6A0D359B1E6B796D487DB" !else if "${VSVER}" == "16.0" ; Microsoft Visual C++ 2019 x86 Minimum Runtime - 14.28.29334 !define VS_REDIST_KEY "SOFTWARE\Classes\Installer\Products\218A10D01A28F1845864E8829E678FFD" !else !error ${VSVER} !endif !endif yaz-5.34.0/test/0000775000175000017500000000000014357765251010407 500000000000000yaz-5.34.0/test/test_timing.c0000664000175000017500000000241314152153071013001 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include #ifdef WIN32 #include #endif static void tst(void) { yaz_timing_t t = yaz_timing_create(); double real, user, sys; int i = 0; double x = 0; YAZ_CHECK(t); if (!t) return; #ifdef WIN32 Sleep(10); #endif for (i = 0; i<5000000; i++) x += i; YAZ_CHECK_EQ(i, 5000000); yaz_log(YLOG_LOG, "i=%d x=%f", i, x); yaz_timing_stop(t); real = yaz_timing_get_real(t); YAZ_CHECK(real == -1.0 || real >= 0.0); user = yaz_timing_get_user(t); YAZ_CHECK(user == -1.0 || user >= 0.0); sys = yaz_timing_get_sys(t); YAZ_CHECK(sys == -1.0 || sys >= 0.0); yaz_log(YLOG_LOG, "real=%f user=%f sys=%f", real, user, sys); yaz_timing_destroy(&t); YAZ_CHECK(!t); } int main (int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_icu.2.xml0000664000175000017500000000025014357765251013025 00000000000000 $back = \` ; $back $back > “ ; # generate right d.q.m. (double quotation mark) $back > ‘ ; yaz-5.34.0/test/test_icu.0.input0000664000175000017500000000004414152153071013343 00000000000000Børn Le Carré Le Carre Le CarreÌ yaz-5.34.0/test/test_odrcodec.h0000664000175000017500000000121714346322114013303 00000000000000/** \file test_odrcodec.h \brief ASN.1 Module test_odrcodec Generated automatically by YAZ ASN.1 Compiler 0.4 */ #ifndef test_odrcodec_H #define test_odrcodec_H #include #ifdef __cplusplus extern "C" { #endif typedef struct Yc_MySequence Yc_MySequence; YAZ_EXPORT int yc_MySequence(ODR o, Yc_MySequence **p, int opt, const char *name); #ifdef __cplusplus } #endif #ifdef __cplusplus extern "C" { #endif struct Yc_MySequence { Odr_int *first; Odr_oct *second; Odr_bool *third; Odr_null *fourth; #define YC_MySequence_enum1 0 #define YC_MySequence_enum2 1 Odr_int *fifth; Odr_oid *myoid; }; #ifdef __cplusplus } #endif #endif yaz-5.34.0/test/test_icu.0.output0000664000175000017500000000035414152153071013550 000000000000001 1 'børn' 'Børn' 0+5 *Børn* 2 2 'le' 'Le' 0+3 *Le *Carré 3 2 'carré' 'Carré' 3+6 Le *Carré* 4 3 'le' 'Le' 0+3 *Le *Carre 5 3 'carre' 'Carre' 3+5 Le *Carre* 6 4 'le' 'Le' 0+3 *Le *CarreÌ 7 4 'carreÌ' 'CarreÌ' 3+7 Le *CarreÌ* yaz-5.34.0/test/test_marc_read_sax.c0000664000175000017500000000410714336662007014314 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include struct user_data { WRBUF wrbuf; }; static void handler(yaz_marc_t mt, void *cb) { struct user_data *ctx = cb; yaz_marc_write_marcxml(mt, ctx->wrbuf); } static void tst1(void) { #if YAZ_HAVE_XML2 char *marcxml = "\n" "\n" " 00062cgm a2200037Ia 4500\n" " \n" " DVD CHI 791.43\n" " Q&A\n" " \n" "\n" "\n"; struct user_data user_data; user_data.wrbuf = wrbuf_alloc(); yaz_marc_t mt = yaz_marc_create(); yaz_marc_sax_t yt = yaz_marc_sax_new(mt, handler, &user_data); xmlSAXHandlerPtr sax_ptr = yaz_marc_sax_get_handler(yt); xmlSAXUserParseMemory(sax_ptr, yt, marcxml, strlen(marcxml)); const char *expect = "\n" " 00062cgm a2200037Ia 4500\n" " \n" " DVD CHI 791.43\n" " Q&A\n" " \n" "\n"; YAZ_CHECK(strcmp(wrbuf_cstr(user_data.wrbuf), expect) == 0); yaz_marc_sax_destroy(yt); yaz_marc_destroy(mt); #endif } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); tst1(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_marccol.sh0000775000175000017500000000300414341700311013315 00000000000000#!/bin/sh # Tests reading of a bunch of non-roman UTF-8 ISO2709 and see if # we can encode it in MARC-8 # # Reads marccol?.u8.marc files , Generates marccol?.u8.{1,2}.lst srcdir=${srcdir:-.} ecode=0 test -d marc-files || mkdir marc-file for f in ${srcdir}/marc-files/marccol?.u8.marc; do fb=`basename ${f} .marc` DIFF=marc-files/${fb}.1.lst.diff NEW=marc-files/${fb}.1.lst.new OLD=${srcdir}/marc-files/${fb}.1.lst ../util/yaz-marcdump -f utf-8 -t utf-8 $f >$NEW if test $? != "0"; then echo "$f: yaz-marcdump returned error" ecode=1 break elif test -f $OLD; then if diff $OLD $NEW >$DIFF; then rm $DIFF rm $NEW else echo "$f: $NEW and $OLD differ" ecode=1 fi else echo "$f: Making test result $OLD for the first time" mv $NEW $OLD fi filem=`echo $fb | sed 's/u8/m8/'`.marc ../util/yaz-marcdump -l 9=32 -o marc -f utf8 -t marc8lossless $f >$filem DIFF=${fb}.2.lst.diff NEW=${fb}.2.lst.new OLD=${srcdir}/marc-files/${fb}.2.lst ../util/yaz-marcdump -l 9=97 -f marc8 -t utf-8 $filem >$NEW if test $? != "0"; then echo "$f: yaz-marcdump returned error" ecode=1 break elif test -f $OLD; then if diff $OLD $NEW >$DIFF; then rm $DIFF rm $NEW rm $filem else echo "$f: $NEW and $OLD differ" ecode=1 fi else echo "$f: Making test result $OLD for the first time" mv $NEW $OLD rm $filem fi done exit $ecode # Local Variables: # mode:shell-script # sh-indentation: 2 # sh-basic-offset: 4 # End: yaz-5.34.0/test/test_cql2xcql.sh0000775000175000017500000000202414152153071013434 00000000000000#!/bin/sh srcdir=${srcdir:-.} oIFS="$IFS" IFS=' ' secno=0 testno=0 comment=0 ecode=0 test -f ${srcdir}/cql2xcqlsample || exit 1 test -d cql || mkdir cql for f in `cat ${srcdir}/cql2xcqlsample`; do if echo $f | grep '^#' >/dev/null; then comment=1 else if test "$comment" = "1"; then secno=`expr $secno + 1` testno=0 fi comment=0 testno=`expr $testno + 1` OUT1=${srcdir}/cql/$secno.$testno.out ERR1=${srcdir}/cql/$secno.$testno.err OUT2=cql/$secno.$testno.out.tmp ERR2=cql/$secno.$testno.err.tmp DIFF=cql/$secno.$testno.diff ../util/cql2xcql "$f" >$OUT2 2>$ERR2 if test -f $OUT1 -a -f $ERR1; then if diff $OUT1 $OUT2 >$DIFF; then rm $DIFF rm $OUT2 else echo "diff out $secno $testno $f" cat $DIFF ecode=1 fi if diff $ERR1 $ERR2 >$DIFF; then rm $DIFF rm $ERR2 else echo "diff err $secno $testno $f" cat $DIFF ecode=1 fi else echo "making test $secno $testno $f" mv $OUT2 $OUT1 mv $ERR2 $ERR1 ecode=1 fi fi done IFS="$oIFS" exit $ecode yaz-5.34.0/test/test_icu.2.input0000664000175000017500000000001214152153071013340 00000000000000`a' ``a'' yaz-5.34.0/test/test_icu.0.xml0000664000175000017500000000031114357765251013021 00000000000000 yaz-5.34.0/test/test_odr.c0000664000175000017500000002261014152153071012277 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include "test_odrcodec.h" #include #define MYOID "1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19" void tst_MySequence1(ODR encode, ODR decode) { int ret; char *ber_buf; int ber_len; Yc_MySequence *s = (Yc_MySequence *) odr_malloc(encode, sizeof(*s)); Yc_MySequence *t; YAZ_CHECK(s); s->first = odr_intdup(encode, 12345); s->second = (Odr_oct *) odr_malloc(encode, sizeof(*s->second)); s->second->buf = (char *) "hello"; s->second->len = 5; s->third = odr_booldup(encode, 1); s->fourth = odr_nullval(); s->fifth = odr_intdup(encode, YC_MySequence_enum1); s->myoid = odr_getoidbystr(decode, MYOID); ret = yc_MySequence(encode, &s, 0, 0); YAZ_CHECK(ret); if (!ret) return; ber_buf = odr_getbuf(encode, &ber_len, 0); odr_setbuf(decode, ber_buf, ber_len, 0); ret = yc_MySequence(decode, &t, 0, 0); YAZ_CHECK(ret); if (!ret) return; YAZ_CHECK(t); YAZ_CHECK(t->first && *t->first == 12345); YAZ_CHECK(t->second && t->second->buf && t->second->len == 5); YAZ_CHECK(t->second && t->second->buf && t->second->len == 5 && memcmp(t->second->buf, "hello", t->second->len) == 0); YAZ_CHECK(t->third && *t->third == 1); YAZ_CHECK(t->fourth); YAZ_CHECK(t->fifth && *t->fifth == YC_MySequence_enum1); YAZ_CHECK(t->myoid); if (t->myoid) { Odr_oid *myoid = odr_getoidbystr(decode, MYOID); YAZ_CHECK(oid_oidcmp(myoid, t->myoid) == 0); } } void tst_MySequence2(ODR encode, ODR decode) { int ret; Yc_MySequence *s = (Yc_MySequence *) odr_malloc(encode, sizeof(*s)); YAZ_CHECK(s); s->first = 0; /* deliberately miss this .. */ s->second = (Odr_oct *) odr_malloc(encode, sizeof(*s->second)); s->second->buf = (char *) "hello"; s->second->len = 5; s->third = odr_booldup(encode, 1); s->fourth = odr_nullval(); s->fifth = odr_intdup(encode, YC_MySequence_enum1); s->myoid = odr_getoidbystr(encode, MYOID); ret = yc_MySequence(encode, &s, 0, 0); /* should fail */ YAZ_CHECK(!ret); YAZ_CHECK(odr_geterror(encode) == OREQUIRED); YAZ_CHECK(strcmp(odr_getelement(encode), "first") == 0); odr_reset(encode); YAZ_CHECK(odr_geterror(encode) == ONONE); YAZ_CHECK(strcmp(odr_getelement(encode), "") == 0); } void tst_MySequence3(ODR encode, ODR decode) { char buf[40]; int i; Yc_MySequence *t; srand(123); for (i = 0; i < 1000; i++) { int j; for (j = 0; j < (int) sizeof(buf); j++) buf[j] = rand(); for (j = 1; j < (int) sizeof(buf); j++) { odr_setbuf(decode, buf, j, 0); yc_MySequence(decode, &t, 0, 0); odr_reset(decode); } } } static void tst_berint32(ODR encode, ODR decode) { char *buf = 0; int len = 0; Odr_int val; Odr_int ret_val; int r; val = 0; odr_reset(encode); r = ber_integer(encode, &val); YAZ_CHECK_EQ(r, 1); buf = odr_getbuf(encode, &len, 0); YAZ_CHECK(buf); YAZ_CHECK_EQ(len, 2); YAZ_CHECK_EQ(buf[0], 1); YAZ_CHECK_EQ(buf[1], 0); odr_reset(decode); odr_setbuf(decode, buf, len, 0); ber_integer(decode, &ret_val); YAZ_CHECK_EQ(ret_val, 0); val = 1; odr_reset(encode); r = ber_integer(encode, &val); YAZ_CHECK_EQ(r, 1); buf = odr_getbuf(encode, &len, 0); YAZ_CHECK(buf); YAZ_CHECK_EQ(len, 2); YAZ_CHECK_EQ(buf[0], 1); YAZ_CHECK_EQ(buf[1], 1); odr_reset(decode); odr_setbuf(decode, buf, len, 0); ber_integer(decode, &ret_val); YAZ_CHECK_EQ(ret_val, 1); val = -1; odr_reset(encode); r = ber_integer(encode, &val); YAZ_CHECK_EQ(r, 1); buf = odr_getbuf(encode, &len, 0); YAZ_CHECK(buf); YAZ_CHECK_EQ(len, 2); YAZ_CHECK_EQ(buf[0], 1); YAZ_CHECK_EQ((unsigned char) buf[1], 255); odr_reset(decode); odr_setbuf(decode, buf, len, 0); ber_integer(decode, &ret_val); YAZ_CHECK_EQ(ret_val, -1); val = 127; odr_reset(encode); r = ber_integer(encode, &val); YAZ_CHECK_EQ(r, 1); buf = odr_getbuf(encode, &len, 0); YAZ_CHECK(buf); YAZ_CHECK_EQ(len, 2); YAZ_CHECK_EQ(buf[0], 1); YAZ_CHECK_EQ(buf[1], 127); odr_reset(decode); odr_setbuf(decode, buf, len, 0); ber_integer(decode, &ret_val); YAZ_CHECK_EQ(ret_val, 127); val = 128; odr_reset(encode); r = ber_integer(encode, &val); YAZ_CHECK_EQ(r, 1); buf = odr_getbuf(encode, &len, 0); YAZ_CHECK(buf); YAZ_CHECK_EQ(len, 3); YAZ_CHECK_EQ(buf[0], 2); YAZ_CHECK_EQ(buf[1], 0); YAZ_CHECK_EQ(((unsigned char *) buf)[2], 128); odr_reset(decode); odr_setbuf(decode, buf, len, 0); ber_integer(decode, &ret_val); YAZ_CHECK_EQ(ret_val, 128); val = 2147483647; /* 2^31-1 */ odr_reset(encode); r = ber_integer(encode, &val); YAZ_CHECK_EQ(r, 1); buf = odr_getbuf(encode, &len, 0); YAZ_CHECK(buf); YAZ_CHECK_EQ(len, 5); YAZ_CHECK_EQ(buf[0], 4); YAZ_CHECK_EQ(buf[1], 127); YAZ_CHECK_EQ((unsigned char) buf[2], 255); YAZ_CHECK_EQ((unsigned char) buf[3], 255); YAZ_CHECK_EQ((unsigned char) buf[4], 255); odr_reset(decode); odr_setbuf(decode, buf, len, 0); ber_integer(decode, &ret_val); YAZ_CHECK_EQ(ret_val, 2147483647); val = -2147483647L -1; /* -2^31 */ odr_reset(encode); r = ber_integer(encode, &val); YAZ_CHECK_EQ(r, 1); buf = odr_getbuf(encode, &len, 0); YAZ_CHECK(buf); YAZ_CHECK_EQ(len, 5); YAZ_CHECK_EQ(buf[0], 4); YAZ_CHECK_EQ((unsigned char) buf[1], 128); YAZ_CHECK_EQ(buf[2], 0); YAZ_CHECK_EQ(buf[3], 0); YAZ_CHECK_EQ(buf[4], 0); odr_reset(decode); odr_setbuf(decode, buf, len, 0); ber_integer(decode, &ret_val); YAZ_CHECK_EQ(ret_val, (Odr_int) -2147483647L -1); } static void tst_berint64(ODR encode, ODR decode) { #if NMEM_64 char *buf = 0; int len = 0; Odr_int val; Odr_int ret_val; int r; val = (Odr_int) 2 * 2147483648UL; /* 2^32 */ odr_reset(encode); r = ber_integer(encode, &val); YAZ_CHECK_EQ(r, 1); buf = odr_getbuf(encode, &len, 0); YAZ_CHECK(buf); YAZ_CHECK_EQ(len, 6); YAZ_CHECK_EQ(buf[0], 5); YAZ_CHECK_EQ(buf[1], 1); YAZ_CHECK_EQ(buf[2], 0); YAZ_CHECK_EQ(buf[3], 0); YAZ_CHECK_EQ(buf[4], 0); YAZ_CHECK_EQ(buf[5], 0); odr_reset(decode); odr_setbuf(decode, buf, len, 0); ber_integer(decode, &ret_val); YAZ_CHECK_EQ(ret_val, val); val = (Odr_int) -2 * 2147483648UL; /* -2^32 */ odr_reset(encode); r = ber_integer(encode, &val); YAZ_CHECK_EQ(r, 1); buf = odr_getbuf(encode, &len, 0); YAZ_CHECK(buf); YAZ_CHECK_EQ(len, 6); YAZ_CHECK_EQ(buf[0], 5); YAZ_CHECK_EQ((unsigned char) buf[1], 255); YAZ_CHECK_EQ(buf[2], 0); YAZ_CHECK_EQ(buf[3], 0); YAZ_CHECK_EQ(buf[4], 0); YAZ_CHECK_EQ(buf[5], 0); odr_reset(decode); odr_setbuf(decode, buf, len, 0); ber_integer(decode, &ret_val); YAZ_CHECK_EQ(ret_val, val); val = (Odr_int) 1000 * 1000000000L; /* 10^12 */ odr_reset(encode); r = ber_integer(encode, &val); YAZ_CHECK_EQ(r, 1); buf = odr_getbuf(encode, &len, 0); YAZ_CHECK(buf); YAZ_CHECK_EQ(len, 7); YAZ_CHECK_EQ(buf[0], 6); YAZ_CHECK_EQ(buf[1], 0); YAZ_CHECK_EQ((unsigned char) buf[2], 232); YAZ_CHECK_EQ((unsigned char) buf[3], 212); YAZ_CHECK_EQ((unsigned char) buf[4], 165); YAZ_CHECK_EQ(buf[5], 16); YAZ_CHECK_EQ(buf[6], 0); odr_reset(decode); odr_setbuf(decode, buf, len, 0); ber_integer(decode, &ret_val); YAZ_CHECK_EQ(ret_val, val); #endif } static void tst(void) { ODR odr_encode = odr_createmem(ODR_ENCODE); ODR odr_decode = odr_createmem(ODR_DECODE); YAZ_CHECK(odr_encode); YAZ_CHECK(odr_decode); tst_MySequence1(odr_encode, odr_decode); tst_MySequence2(odr_encode, odr_decode); tst_MySequence3(odr_encode, odr_decode); tst_berint32(odr_encode, odr_decode); tst_berint64(odr_encode, odr_decode); odr_destroy(odr_encode); odr_destroy(odr_decode); } /* example from documentation.. 'Using Odr' */ void do_nothing_useful(Odr_int value) { ODR encode, decode; Odr_int *valp, *resvalp; char *bufferp; int len; /* allocate streams */ if (!(encode = odr_createmem(ODR_ENCODE))) return; if (!(decode = odr_createmem(ODR_DECODE))) return; valp = &value; if (odr_integer(encode, &valp, 0, 0) == 0) { printf("encoding went bad\n"); return; } bufferp = odr_getbuf(encode, &len, 0); printf("length of encoded data is %d\n", len); /* now let's decode the thing again */ odr_setbuf(decode, bufferp, len, 0); if (odr_integer(decode, &resvalp, 0, 0) == 0) { printf("decoding went bad\n"); return; } /* ODR_INT_PRINTF format for printf (such as %d) */ printf("the value is " ODR_INT_PRINTF "\n", *resvalp); /* clean up */ odr_destroy(encode); odr_destroy(decode); } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); tst(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_matchstr.c0000664000175000017500000000427614152153071013350 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include int main (int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK(yaz_matchstr("x", "x") == 0); YAZ_CHECK(yaz_matchstr("x", "X") == 0); YAZ_CHECK(yaz_matchstr("a", "b") > 0); YAZ_CHECK(yaz_matchstr("b", "a") > 0); YAZ_CHECK(yaz_matchstr("aa","a") > 0); YAZ_CHECK(yaz_matchstr("a-", "a") > 0); YAZ_CHECK(yaz_matchstr("A-b", "ab") == 0); YAZ_CHECK(yaz_matchstr("A--b", "ab") > 0); YAZ_CHECK(yaz_matchstr("A--b", "a-b") > 0); YAZ_CHECK(yaz_matchstr("A--b", "a--b") == 0); YAZ_CHECK(yaz_matchstr("a123", "a?") == 0); YAZ_CHECK(yaz_matchstr("a123", "a1.3") == 0); YAZ_CHECK(yaz_matchstr("a123", "..?") == 0); YAZ_CHECK(yaz_matchstr("a123", "a1.") > 0); YAZ_CHECK(yaz_matchstr("a123", "a...") == 0); YAZ_CHECK_EQ(yaz_strncasecmp("a", "b", 0), 0); YAZ_CHECK_EQ(yaz_strncasecmp("a", "a", 1), 0); YAZ_CHECK_EQ(yaz_strncasecmp("a", "a", 2), 0); YAZ_CHECK_EQ(yaz_strncasecmp("a", "b", 1), -1); YAZ_CHECK_EQ(yaz_strncasecmp("a", "b", 2), -1); YAZ_CHECK_EQ(yaz_strncasecmp("b", "a", 1), 1); YAZ_CHECK_EQ(yaz_strncasecmp("b", "a", 2), 1); YAZ_CHECK_EQ(yaz_strncasecmp("bb", "ba", 1), 0); YAZ_CHECK_EQ(yaz_strncasecmp("bb", "ba", 2), 1); YAZ_CHECK_EQ(yaz_strncasecmp("ba", "bb", 2), -1); YAZ_CHECK_EQ(yaz_strncasecmp("ba", "b", 2), 'a'); YAZ_CHECK_EQ(yaz_strncasecmp("b", "ba", 2), -'a'); YAZ_CHECK_EQ(yaz_strcasecmp("", ""), 0); YAZ_CHECK_EQ(yaz_strcasecmp("a", "a"), 0); YAZ_CHECK_EQ(yaz_strcasecmp("a", "b"), -1); YAZ_CHECK_EQ(yaz_strcasecmp("b", "a"), 1); YAZ_CHECK_EQ(yaz_strcasecmp("bb", "ba"), 1); YAZ_CHECK_EQ(yaz_strcasecmp("ba", "bb"), -1); YAZ_CHECK_EQ(yaz_strcasecmp("ba", "b"), 'a'); YAZ_CHECK_EQ(yaz_strcasecmp("b", "ba"), -'a'); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/cql2pqf/0000775000175000017500000000000014357765251011757 500000000000000yaz-5.34.0/test/cql2pqf/6.1.out0000664000175000017500000000013614357765251012734 00000000000000Parsing CQL dc.title=/unmasked a*b @attr 6=1 @attr 2=3 @attr 4=1 @attr 1=4 @attr 5=100 "a*b" yaz-5.34.0/test/cql2pqf/7.1.err0000664000175000017500000000000014357765251012704 00000000000000yaz-5.34.0/test/cql2pqf/7.1.out0000664000175000017500000000030614357765251012734 00000000000000Parsing CQL a prox b @prox 0 1 0 2 k 2 @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "a" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "b" yaz-5.34.0/test/cql2pqf/6.6.err0000664000175000017500000000000014357765251012710 00000000000000yaz-5.34.0/test/cql2pqf/5.7.err0000664000175000017500000000000014357765251012710 00000000000000yaz-5.34.0/test/cql2pqf/5.6.out0000664000175000017500000000013714357765251012741 00000000000000Parsing CQL a^ @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=4 @attr 6=1 @attr 5=100 @attr 1=1016 "a" yaz-5.34.0/test/cql2pqf/6.5.err0000664000175000017500000000000014357765251012707 00000000000000yaz-5.34.0/test/cql2pqf/6.4.out0000664000175000017500000000022414357765251012735 00000000000000Parsing CQL dc.title=/dc.language=dk a @prox 0 0 0 0 k 8 @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=4 "a" @attr 1=54 dk yaz-5.34.0/test/cql2pqf/3.9.err0000664000175000017500000000000014357765251012710 00000000000000yaz-5.34.0/test/cql2pqf/4.7.err0000664000175000017500000000000014357765251012707 00000000000000yaz-5.34.0/test/cql2pqf/4.10.out0000664000175000017500000000013714357765251013013 00000000000000Parsing CQL *a# @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=2 @attr 1=1016 "a#" yaz-5.34.0/test/cql2pqf/1.1.err0000664000175000017500000000000014357765251012676 00000000000000yaz-5.34.0/test/cql2pqf/4.11.out0000664000175000017500000000014114357765251013007 00000000000000Parsing CQL a#a* @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=1 @attr 1=1016 "a#a" yaz-5.34.0/test/cql2pqf/7.3.err0000664000175000017500000000000014357765251012706 00000000000000yaz-5.34.0/test/cql2pqf/6.6.out0000664000175000017500000000023014357765251012734 00000000000000Parsing CQL dc.title=/language=dk/regexp a.*b @prox 0 0 0 0 k 8 @attr 6=1 @attr 2=3 @attr 4=1 @attr 1=4 @attr 5=102 "a.*b" Transform error 16 language yaz-5.34.0/test/cql2pqf/5.3.err0000664000175000017500000000000014357765251012704 00000000000000yaz-5.34.0/test/cql2pqf/4.3.err0000664000175000017500000000000014357765251012703 00000000000000yaz-5.34.0/test/cql2pqf/4.1.out0000664000175000017500000000013514357765251012731 00000000000000Parsing CQL *a @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=2 @attr 1=1016 "a" yaz-5.34.0/test/cql2pqf/4.7.out0000664000175000017500000000014214357765251012735 00000000000000Parsing CQL ?a? @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=104 @attr 1=1016 "#a#" yaz-5.34.0/test/cql2pqf/3.1.err0000664000175000017500000000000014357765251012700 00000000000000yaz-5.34.0/test/cql2pqf/5.9.out0000664000175000017500000000013714357765251012744 00000000000000Parsing CQL \^ @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "^" yaz-5.34.0/test/cql2pqf/5.4.out0000664000175000017500000000014014357765251012731 00000000000000Parsing CQL \" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "\"" yaz-5.34.0/test/cql2pqf/1.3.err0000664000175000017500000000000014357765251012700 00000000000000yaz-5.34.0/test/cql2pqf/2.2.out0000664000175000017500000000015414357765251012731 00000000000000Parsing CQL dc.title = fish @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=4 "fish" yaz-5.34.0/test/cql2pqf/6.3.err0000664000175000017500000000000014357765251012705 00000000000000yaz-5.34.0/test/cql2pqf/4.2.err0000664000175000017500000000000014357765251012702 00000000000000yaz-5.34.0/test/cql2pqf/4.2.out0000664000175000017500000000013514357765251012732 00000000000000Parsing CQL a* @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=1 @attr 1=1016 "a" yaz-5.34.0/test/cql2pqf/3.8.out0000664000175000017500000000030414357765251012735 00000000000000Parsing CQL ((fred or all)) @or @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "fred" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "all" yaz-5.34.0/test/cql2pqf/7.2.out0000664000175000017500000000032014357765251012731 00000000000000Parsing CQL a prox/unordered b @prox 0 1 0 2 k 2 @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "a" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "b" yaz-5.34.0/test/cql2pqf/5.1.err0000664000175000017500000000000014357765251012702 00000000000000yaz-5.34.0/test/cql2pqf/6.4.err0000664000175000017500000000000014357765251012706 00000000000000yaz-5.34.0/test/cql2pqf/4.1.err0000664000175000017500000000000014357765251012701 00000000000000yaz-5.34.0/test/cql2pqf/1.2.err0000664000175000017500000000000014357765251012677 00000000000000yaz-5.34.0/test/cql2pqf/5.4.err0000664000175000017500000000000014357765251012705 00000000000000yaz-5.34.0/test/cql2pqf/4.5.err0000664000175000017500000000000014357765251012705 00000000000000yaz-5.34.0/test/cql2pqf/6.5.out0000664000175000017500000000021514357765251012736 00000000000000Parsing CQL dc.title=/dc.language=dk/regexp a.*b @prox 0 0 0 0 k 8 @attr 6=1 @attr 2=3 @attr 4=1 @attr 1=4 @attr 5=102 "a.*b" @attr 1=54 dk yaz-5.34.0/test/cql2pqf/7.6.err0000664000175000017500000000000014357765251012711 00000000000000yaz-5.34.0/test/cql2pqf/4.12.err0000664000175000017500000000000014357765251012763 00000000000000yaz-5.34.0/test/cql2pqf/3.9.out0000664000175000017500000000055314357765251012744 00000000000000Parsing CQL a or b and c not d @not @and @or @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "a" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "b" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "c" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "d" yaz-5.34.0/test/cql2pqf/7.5.err0000664000175000017500000000000014357765251012710 00000000000000yaz-5.34.0/test/cql2pqf/2.1.err0000664000175000017500000000000014357765251012677 00000000000000yaz-5.34.0/test/cql2pqf/4.5.out0000664000175000017500000000014014357765251012731 00000000000000Parsing CQL ?a @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=104 @attr 1=1016 "#a" yaz-5.34.0/test/cql2pqf/4.11.err0000664000175000017500000000000014357765251012762 00000000000000yaz-5.34.0/test/cql2pqf/5.7.out0000664000175000017500000000013714357765251012742 00000000000000Parsing CQL ^a @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=1 @attr 6=1 @attr 5=100 @attr 1=1016 "a" yaz-5.34.0/test/cql2pqf/3.5.err0000664000175000017500000000000014357765251012704 00000000000000yaz-5.34.0/test/cql2pqf/2.2.err0000664000175000017500000000000014357765251012700 00000000000000yaz-5.34.0/test/cql2pqf/5.3.out0000664000175000017500000000015114357765251012732 00000000000000Parsing CQL \*a*b# @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=104 @attr 1=1016 "*a?b\\#" yaz-5.34.0/test/cql2pqf/6.1.err0000664000175000017500000000000014357765251012703 00000000000000yaz-5.34.0/test/cql2pqf/5.10.err0000664000175000017500000000000014357765251012762 00000000000000yaz-5.34.0/test/cql2pqf/7.2.err0000664000175000017500000000000014357765251012705 00000000000000yaz-5.34.0/test/cql2pqf/1.2.out0000664000175000017500000000022614357765251012730 00000000000000Parsing CQL a b @attr 6=1 @attr 2=3 @attr 4=1 @and @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "a" @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "b" yaz-5.34.0/test/cql2pqf/3.2.err0000664000175000017500000000000014357765251012701 00000000000000yaz-5.34.0/test/cql2pqf/4.12.out0000664000175000017500000000014414357765251013013 00000000000000Parsing CQL a*3 @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=104 @attr 1=1016 "a?\\3" yaz-5.34.0/test/cql2pqf/7.4.out0000664000175000017500000000032314357765251012736 00000000000000Parsing CQL a prox/distance < 3 b @prox 0 3 0 1 k 2 @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "a" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "b" yaz-5.34.0/test/cql2pqf/4.10.err0000664000175000017500000000000014357765251012761 00000000000000yaz-5.34.0/test/cql2pqf/1.3.out0000664000175000017500000000014414357765251012730 00000000000000Parsing CQL "a b" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "a b" yaz-5.34.0/test/cql2pqf/3.2.out0000664000175000017500000000030214357765251012725 00000000000000Parsing CQL cat and fish @and @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "cat" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "fish" yaz-5.34.0/test/cql2pqf/5.1.out0000664000175000017500000000014314357765251012731 00000000000000Parsing CQL a*\3 @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=104 @attr 1=1016 "a?3" yaz-5.34.0/test/cql2pqf/6.3.out0000664000175000017500000000013614357765251012736 00000000000000Parsing CQL dc.title=/regexp a.*b @attr 6=1 @attr 2=3 @attr 4=1 @attr 1=4 @attr 5=102 "a.*b" yaz-5.34.0/test/cql2pqf/4.4.err0000664000175000017500000000000014357765251012704 00000000000000yaz-5.34.0/test/cql2pqf/3.7.out0000664000175000017500000000030214357765251012732 00000000000000Parsing CQL fred and any @and @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "fred" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "any" yaz-5.34.0/test/cql2pqf/3.7.err0000664000175000017500000000000014357765251012706 00000000000000yaz-5.34.0/test/cql2pqf/2.1.out0000664000175000017500000000015114357765251012725 00000000000000Parsing CQL title = fish @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=4 "fish" yaz-5.34.0/test/cql2pqf/5.2.err0000664000175000017500000000000014357765251012703 00000000000000yaz-5.34.0/test/cql2pqf/4.9.err0000664000175000017500000000000014357765251012711 00000000000000yaz-5.34.0/test/cql2pqf/3.5.out0000664000175000017500000000032014357765251012730 00000000000000Parsing CQL "cat" not "fish food" @not @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "cat" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "fish food" yaz-5.34.0/test/cql2pqf/4.4.out0000664000175000017500000000014214357765251012732 00000000000000Parsing CQL a*a @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=104 @attr 1=1016 "a?a" yaz-5.34.0/test/cql2pqf/5.6.err0000664000175000017500000000000014357765251012707 00000000000000yaz-5.34.0/test/cql2pqf/5.8.out0000664000175000017500000000014014357765251012735 00000000000000Parsing CQL ^a^ @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=3 @attr 5=100 @attr 1=1016 "a" yaz-5.34.0/test/cql2pqf/4.8.out0000664000175000017500000000014214357765251012736 00000000000000Parsing CQL a?a @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=104 @attr 1=1016 "a#a" yaz-5.34.0/test/cql2pqf/3.3.out0000664000175000017500000000030214357765251012726 00000000000000Parsing CQL cat not frog @not @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "cat" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "frog" yaz-5.34.0/test/cql2pqf/6.2.out0000664000175000017500000000016014357765251012732 00000000000000Parsing CQL dc.title=/masked a*b @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=104 @attr 1=4 "a?b" yaz-5.34.0/test/cql2pqf/4.3.out0000664000175000017500000000013614357765251012734 00000000000000Parsing CQL *a* @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=3 @attr 1=1016 "a" yaz-5.34.0/test/cql2pqf/7.3.out0000664000175000017500000000031614357765251012737 00000000000000Parsing CQL a prox/ordered b @prox 0 1 1 2 k 2 @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "a" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "b" yaz-5.34.0/test/cql2pqf/3.3.err0000664000175000017500000000000014357765251012702 00000000000000yaz-5.34.0/test/cql2pqf/3.6.out0000664000175000017500000000031214357765251012732 00000000000000Parsing CQL xml and "prox///" @and @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "xml" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "prox///" yaz-5.34.0/test/cql2pqf/1.1.out0000664000175000017500000000013614357765251012727 00000000000000Parsing CQL a @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "a" yaz-5.34.0/test/cql2pqf/3.8.err0000664000175000017500000000000014357765251012707 00000000000000yaz-5.34.0/test/cql2pqf/5.2.out0000664000175000017500000000014314357765251012732 00000000000000Parsing CQL \*a# @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "*a#" yaz-5.34.0/test/cql2pqf/4.6.out0000664000175000017500000000014014357765251012732 00000000000000Parsing CQL a? @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=104 @attr 1=1016 "a#" yaz-5.34.0/test/cql2pqf/7.6.out0000664000175000017500000000032514357765251012742 00000000000000Parsing CQL a prox/unit=paragraph b @prox 0 0 0 2 k 4 @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "a" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "b" yaz-5.34.0/test/cql2pqf/5.9.err0000664000175000017500000000000014357765251012712 00000000000000yaz-5.34.0/test/cql2pqf/5.5.out0000664000175000017500000000014414357765251012736 00000000000000Parsing CQL @and @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "@and" yaz-5.34.0/test/cql2pqf/5.10.out0000664000175000017500000000014214357765251013010 00000000000000Parsing CQL ^a\^ @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=1 @attr 6=1 @attr 5=100 @attr 1=1016 "a^" yaz-5.34.0/test/cql2pqf/4.8.err0000664000175000017500000000000014357765251012710 00000000000000yaz-5.34.0/test/cql2pqf/5.8.err0000664000175000017500000000000014357765251012711 00000000000000yaz-5.34.0/test/cql2pqf/3.6.err0000664000175000017500000000000014357765251012705 00000000000000yaz-5.34.0/test/cql2pqf/4.6.err0000664000175000017500000000000014357765251012706 00000000000000yaz-5.34.0/test/cql2pqf/5.5.err0000664000175000017500000000000014357765251012706 00000000000000yaz-5.34.0/test/cql2pqf/4.9.out0000664000175000017500000000014614357765251012743 00000000000000Parsing CQL a#a? @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=104 @attr 1=1016 "a\\#a#" yaz-5.34.0/test/cql2pqf/3.4.out0000664000175000017500000000030414357765251012731 00000000000000Parsing CQL (cat not frog) @not @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "cat" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "frog" yaz-5.34.0/test/cql2pqf/7.4.err0000664000175000017500000000000014357765251012707 00000000000000yaz-5.34.0/test/cql2pqf/3.4.err0000664000175000017500000000000014357765251012703 00000000000000yaz-5.34.0/test/cql2pqf/7.5.out0000664000175000017500000000033114357765251012736 00000000000000Parsing CQL a prox/distance<3/ordered b @prox 0 3 1 1 k 2 @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "a" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "b" yaz-5.34.0/test/cql2pqf/3.1.out0000664000175000017500000000027614357765251012736 00000000000000Parsing CQL cat or dog @or @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "cat" @attr 6=1 @attr 2=3 @attr 4=1 @attr 3=3 @attr 6=1 @attr 5=100 @attr 1=1016 "dog" yaz-5.34.0/test/cql2pqf/6.2.err0000664000175000017500000000000014357765251012704 00000000000000yaz-5.34.0/test/Makefile.am0000664000175000017500000000654614341700311012351 00000000000000## This file is part of the YAZ toolkit. ## Copyright (C) Index Data check_PROGRAMS = test_ccl test_comstack test_cql2ccl \ test_embed_record test_filepath test_file_glob \ test_iconv test_icu test_json \ test_libstemmer test_log test_log_thread \ test_match_glob test_matchstr test_mutex \ test_nmem test_odr test_odrstack test_oid test_options \ test_pquery test_query_charset \ test_record_conv test_rpn2cql test_rpn2solr test_retrieval \ test_shared_ptr test_soap1 test_soap2 test_solr test_sortspec \ test_timing test_tpath test_wrbuf \ test_xmalloc test_xml_include test_xmlquery test_zgdu \ test_marc_read_sax check_SCRIPTS = test_marc.sh test_marccol.sh test_cql2xcql.sh \ test_cql2pqf.sh test_icu.sh TESTS = $(check_PROGRAMS) $(check_SCRIPTS) EXTRA_DIST = tstodr.asn test_odrcodec.c test_odrcodec.h cql2xcqlsample \ cql2pqf-order.txt cql2pqfsample \ $(check_SCRIPTS) \ test_icu.0.input test_icu.0.output \ test_icu.1.input test_icu.1.output \ test_icu.2.input test_icu.2.output \ test_icu.3.input test_icu.3.output \ test_icu.4.input test_icu.4.output \ test_record_conv.xsl YAZCOMP = ../src/yaz-asncomp YAZCOMPLINE = $(YAZCOMP) -d z.tcl -i yaz -I../src $(YCFLAGS) AM_CPPFLAGS=-I$(top_srcdir)/src $(XML2_CFLAGS) $(ICU_CPPFLAGS) dist-hook: mkdir -p $(distdir)/cql cp $(srcdir)/cql/*.err $(srcdir)/cql/*.out $(distdir)/cql mkdir -p $(distdir)/cql2pqf cp $(srcdir)/cql2pqf/*.err $(srcdir)/cql2pqf/*.out $(distdir)/cql2pqf cp $(srcdir)/*.xml $(distdir) mkdir -p $(distdir)/marc-files cp $(srcdir)/marc-files/* $(distdir)/marc-files # Rule for generating codecs for our small ASN.1 spec test_odrcodec.c test_odrcodec.h: tstodr.asn $(YAZCOMP) cd $(srcdir); $(YAZCOMP) tstodr.asn LDADD = ../src/libyaz.la test_icu_LDADD = ../src/libyaz_icu.la ../src/libyaz.la $(ICU_LIBS) test_libstemmer_LDADD = ../src/libyaz_icu.la ../src/libyaz.la $(ICU_LIBS) CONFIG_CLEAN_FILES=*.log test_cql2ccl_SOURCES = test_cql2ccl.c test_xmalloc_SOURCES = test_xmalloc.c test_iconv_SOURCES = test_iconv.c test_nmem_SOURCES = test_nmem.c test_matchstr_SOURCES = test_matchstr.c test_wrbuf_SOURCES = test_wrbuf.c test_odr_SOURCES = test_odrcodec.c test_odrcodec.h test_odr.c test_odrstack_SOURCES = test_odrstack.c test_ccl_SOURCES = test_ccl.c test_log_SOURCES = test_log.c test_mutex_SOURCES = test_mutex.c test_soap1_SOURCES = test_soap1.c test_soap2_SOURCES = test_soap2.c test_solr_SOURCES = test_solr.c test_sortspec_SOURCES = test_sortspec.c test_log_thread_SOURCES = test_log_thread.c test_xmlquery_SOURCES = test_xmlquery.c test_options_SOURCES = test_options.c test_pquery_SOURCES = test_pquery.c test_comstack_SOURCES = test_comstack.c test_filepath_SOURCES = test_filepath.c test_oid_SOURCES = test_oid.c test_record_conv_SOURCES = test_record_conv.c test_retrieval_SOURCES = test_retrieval.c test_tpath_SOURCES = test_tpath.c test_timing_SOURCES = test_timing.c test_query_charset_SOURCES = test_query_charset.c test_icu_SOURCES = test_icu.c test_match_glob_SOURCES = test_match_glob.c test_rpn2cql_SOURCES = test_rpn2cql.c test_rpn2solr_SOURCES = test_rpn2solr.c test_json_SOURCES = test_json.c test_xml_include_SOURCES = test_xml_include.c test_file_glob_SOURCES = test_file_glob.c test_shared_ptr_SOURCES = test_shared_ptr.c test_libstemmer_SOURCES = test_libstemmer.c test_embed_record_SOURCES = test_embed_record.c test_zgdu_SOURCES = test_zgdu.c test_marc_read_sax_SOURCES = test_marc_read_sax.c yaz-5.34.0/test/test_icu.4.xml0000664000175000017500000000013514357765251013031 00000000000000 [,. -]* } [$] > ; yaz-5.34.0/test/cql2xcqlsample0000664000175000017500000000420114152153071013162 00000000000000# CQL queries for testing. # from http://www.loc.gov/z3950/agency/zing/cql/sample-queries.html # Simple Term cat "cat" comp.os.linux ml:element "" "=" "prox/distance<3/unit=word" ("cat") ((dog)) all prox # Index Relation Term title = "fish" title == fish title any fish title all fish title > 9 title >= 23 dc.title any "fish chips" dc.title any/stem fish dc.fish all/stem/fuzzy "fish chips" (title any frog) ((dc.title any/stem "frog pond")) dc.title = "fish frog chicken" dc.title =/rel.algorithm=CORI squid creator any/f.foo/b.bar>1 "sanderson taylor" # Simple Boolean cat or dog cat and fish cat not frog (cat not frog) "cat" not "fish food" xml and "prox///" fred and any ((fred or all)) a or b and c not d # Index Relation Term plus Boolean bath.uniformTitle any fish and dc.title any "cat dog" (title any/stem "fish dog" or and) # Proximity and Boolean Modifiers cat prox hat cat prox/distance=3/unit=word/ordered hat cat prox/distance<3 hat "fish food" prox/unit=sentence and title all "chips frog" prox/distance<=5 exact (dc.author == "jones" prox/distance>5/unit=element title >= "smith") a and/rel.SumOfScores b a and/rel.algorithm=CORI b # Special Characters (cat^) "cat" "^cat says \"fish\"" "cat*fish" cat?dog (("^cat*fishdog\"horse?")) # Nesting Parentheses (((cat or dog) or horse) and frog) (cat and dog) or (horse and frog) (cat and (horse or frog)) and chips # Prefix Maps > foo="info:srw/cql-context-set/1/dc-v1.1" dc.title="fish" > "info:srw/cql-context-set/1/dc-v1.1" title="fish" > foo="info:srw/cql-context-set/1/dc-v1.1" > ccg = "http://srw.cheshire3.org/contextSets/ccg/1.1/" foo.title="fish" and ccg.force=3 # Lame Searches any or all:stem and all == any prox prox=fuzzy (((((((((any))))))))) "" > any > any = exact any > any # Invalid searches [should error] < === missingClause or missingTerm any () (missingParen missingParen any fish) (emptyParens or ()) title = ("illegal parentheses") > illegal="urn:missingQuery" # free-form term OK) a b a b c a.b c and b c all a a any b dc.title a b c and d # free-form term (Syntax error) a b.c a and # sortby a sortby title a or b sortby title/ascending author yaz-5.34.0/test/test_iconv.c0000664000175000017500000006275514152153071012647 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include #define ESC "\x1b" #define UTF8_ACUTE "\xCC\x81" #define UTF8_CIRCUMFLEX "\xCC\x82" #define UTF8_TILDE "\xCC\x83" #define UTF8_MACRON "\xCC\x84" #define UTF8_DIAERESIS "\xCC\x88" #define UTF8_RING_ABOVE "\xCC\x8A" #define UTF8_LOWLINE "\xCC\xB2" #define UTF8_ARING "\xC3\x85" #define UTF8_aRING "\xC3\xA5" #define UTF8_OSLASH "\xC3\x98" #define UTF8_CURRENCY_SIGN "\xC2\xA4" #define UTF8_LATIN_AA "\xEA\x9C\xB2" #define UTF8_LATIN_Aa "\xEA\x9C\xB3" #define UTF8_LOWERCASE_LAMBDA "\xCE\xBB" #define UTF8_eACUTE "\xC3\xA9" static int compare_buffers(char *msg, int no, int expect_len, const char *expect_buf, int got_len, const char *got_buf) { if (expect_len == got_len && !memcmp(expect_buf, got_buf, expect_len)) return 1; if (1) /* use 1 see how the buffers differ (for debug purposes) */ { int i; printf("tsticonv test=%s i=%d failed\n", msg, no); printf("off got exp\n"); for (i = 0; i 0 ? in_len : strlen(in_buf); char outbuf0[64]; char *outbuf = outbuf0; while (inbytesleft) { size_t outbytesleft = outbuf0 + sizeof(outbuf0) - outbuf; if (outbytesleft > 12) outbytesleft = 12; r = yaz_iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); if (r == (size_t) (-1)) { int e = yaz_iconv_error(cd); if (e != YAZ_ICONV_E2BIG) return 0; } else { yaz_iconv(cd, 0, 0, &outbuf, &outbytesleft); break; } } return compare_buffers("tsticonv 22", 0, expect_len, expect_buf, outbuf - outbuf0, outbuf0); } static int tst_convert_x(yaz_iconv_t cd, const char *buf, const char *cmpbuf, int expect_error) { int ret = 1; WRBUF b = wrbuf_alloc(); char outbuf[16]; size_t inbytesleft = strlen(buf); const char *inp = buf; int rounds = 0; for (rounds = 0; inbytesleft && rounds < (int) sizeof(outbuf); rounds++) { size_t outbytesleft = sizeof(outbuf); char *outp = outbuf; size_t r = yaz_iconv(cd, (char**) &inp, &inbytesleft, &outp, &outbytesleft); wrbuf_write(b, outbuf, outp - outbuf); if (r == (size_t) (-1)) { int e = yaz_iconv_error(cd); if (e != YAZ_ICONV_E2BIG) { if (expect_error != -1) if (e != expect_error) ret = 0; break; } } else { size_t outbytesleft = sizeof(outbuf); char *outp = outbuf; r = yaz_iconv(cd, 0, 0, &outp, &outbytesleft); wrbuf_write(b, outbuf, outp - outbuf); if (expect_error != -1) if (expect_error) ret = 0; break; } } if (wrbuf_len(b) == strlen(cmpbuf) && !memcmp(cmpbuf, wrbuf_buf(b), wrbuf_len(b))) ; else { WRBUF w = wrbuf_alloc(); ret = 0; wrbuf_rewind(w); wrbuf_puts_escaped(w, buf); yaz_log(YLOG_LOG, "input %s", wrbuf_cstr(w)); wrbuf_rewind(w); wrbuf_write_escaped(w, wrbuf_buf(b), wrbuf_len(b)); yaz_log(YLOG_LOG, "got %s", wrbuf_cstr(w)); wrbuf_rewind(w); wrbuf_puts_escaped(w, cmpbuf); yaz_log(YLOG_LOG, "exp %s", wrbuf_cstr(w)); wrbuf_destroy(w); } wrbuf_destroy(b); return ret; } static int tst_convert(yaz_iconv_t cd, const char *buf, const char *cmpbuf) { return tst_convert_x(cd, buf, cmpbuf, 0); } static void tst_marc8_to_ucs4b(void) { yaz_iconv_t cd = yaz_iconv_open("UCS4", "MARC8"); YAZ_CHECK(cd); if (!cd) return; YAZ_CHECK(tst_convert_l( cd, 0, "\033$1" "\x21\x2B\x3B" /* FF1F */ "\033(B" "o", 8, "\x00\x00\xFF\x1F" "\x00\x00\x00o")); YAZ_CHECK(tst_convert_l( cd, 0, "\033$1" "\x6F\x77\x29" /* AE0E */ "\x6F\x52\x7C" /* c0F4 */ "\033(B", 8, "\x00\x00\xAE\x0E" "\x00\x00\xC0\xF4")); YAZ_CHECK(tst_convert_l( cd, 0, "\033$1" "\x21\x50\x6E" /* UCS 7CFB */ "\x21\x51\x31" /* UCS 7D71 */ "\x21\x3A\x67" /* UCS 5B89 */ "\x21\x33\x22" /* UCS 5168 */ "\x21\x33\x53" /* UCS 5206 */ "\x21\x44\x2B" /* UCS 6790 */ "\033(B", 24, "\x00\x00\x7C\xFB" "\x00\x00\x7D\x71" "\x00\x00\x5B\x89" "\x00\x00\x51\x68" "\x00\x00\x52\x06" "\x00\x00\x67\x90")); YAZ_CHECK(tst_convert_l( cd, 0, "\xB0\xB2", /* AYN and oSLASH */ 8, "\x00\x00\x02\xBB" "\x00\x00\x00\xF8")); YAZ_CHECK(tst_convert_l( cd, 0, "\xF6\x61", /* a underscore */ 8, "\x00\x00\x00\x61" "\x00\x00\x03\x32")); YAZ_CHECK(tst_convert_l( cd, 0, "\x61\xC2", /* a, phonorecord mark */ 8, "\x00\x00\x00\x61" "\x00\x00\x21\x17")); /* bug #258 */ YAZ_CHECK(tst_convert_l( cd, 0, "el" "\xe8" "am\xe8" "an", /* elaman where a is a" */ 32, "\x00\x00\x00" "e" "\x00\x00\x00" "l" "\x00\x00\x00" "a" "\x00\x00\x03\x08" "\x00\x00\x00" "m" "\x00\x00\x00" "a" "\x00\x00\x03\x08" "\x00\x00\x00" "n")); /* bug #260 */ YAZ_CHECK(tst_convert_l( cd, 0, "\xe5\xe8\x41", 12, "\x00\x00\x00\x41" "\x00\x00\x03\x04" "\x00\x00\x03\x08")); /* bug #416 */ YAZ_CHECK(tst_convert_l( cd, 0, "\xEB\x74\xEC\x73", 12, "\x00\x00\x00\x74" "\x00\x00\x03\x61" "\x00\x00\x00\x73")); /* bug #416 */ YAZ_CHECK(tst_convert_l( cd, 0, "\xFA\x74\xFB\x73", 12, "\x00\x00\x00\x74" "\x00\x00\x03\x60" "\x00\x00\x00\x73")); yaz_iconv_close(cd); } static void tst_ucs4b_to_utf8(void) { yaz_iconv_t cd = yaz_iconv_open("UTF8", "UCS4"); YAZ_CHECK(cd); if (!cd) return; YAZ_CHECK(tst_convert_l( cd, 8, "\x00\x00\xFF\x1F\x00\x00\x00o", 4, "\xEF\xBC\x9F\x6F")); YAZ_CHECK(tst_convert_l( cd, 8, "\x00\x00\xAE\x0E\x00\x00\xC0\xF4", 6, "\xEA\xB8\x8E\xEC\x83\xB4")); yaz_iconv_close(cd); } static void dconvert(int mandatory, const char *tmpcode) { /* some test strings in ISO-8859-1 format */ static const char *iso_8859_1_a[] = { "ax" , "\xd8", "eneb\346r", "\xe5" "\xd8", "\xe5" "\xd8" "b", "\xe5" "\xe5", 0 }; int i; int ret; yaz_iconv_t cd; for (i = 0; iso_8859_1_a[i]; i++) { size_t r; char *inbuf = (char*) iso_8859_1_a[i]; size_t inbytesleft = strlen(inbuf); char outbuf0[24]; char outbuf1[10]; char *outbuf = outbuf0; size_t outbytesleft = sizeof(outbuf0); cd = yaz_iconv_open(tmpcode, "ISO-8859-1"); YAZ_CHECK(cd || !mandatory); if (!cd) return; r = yaz_iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); YAZ_CHECK(r != (size_t) (-1)); r = yaz_iconv(cd, 0, 0, &outbuf, &outbytesleft); YAZ_CHECK(r != (size_t) (-1)); yaz_iconv_close(cd); if (r == (size_t) (-1)) return; cd = yaz_iconv_open("ISO-8859-1", tmpcode); YAZ_CHECK(cd || !mandatory); if (!cd) return; inbuf = outbuf0; inbytesleft = sizeof(outbuf0) - outbytesleft; outbuf = outbuf1; outbytesleft = sizeof(outbuf1); r = yaz_iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); YAZ_CHECK(r != (size_t) (-1)); r = yaz_iconv(cd, 0, 0, &outbuf, &outbytesleft); if (r == (size_t)(-1)) { fprintf(stderr, "failed\n"); } YAZ_CHECK(r != (size_t) (-1)); if (r != (size_t)(-1)) { ret = compare_buffers("dconvert", i, strlen(iso_8859_1_a[i]), iso_8859_1_a[i], sizeof(outbuf1) - outbytesleft, outbuf1); YAZ_CHECK(ret); } yaz_iconv_close(cd); } } int utf8_check(unsigned c) { if (sizeof(c) >= 4) { size_t r; char src[4]; char dst[4]; char utf8buf[6]; char *inbuf = src; size_t inbytesleft = 4; char *outbuf = utf8buf; size_t outbytesleft = sizeof(utf8buf); int i; yaz_iconv_t cd = yaz_iconv_open("UTF-8", "UCS4LE"); if (!cd) return 0; for (i = 0; i<4; i++) src[i] = c >> (i*8); r = yaz_iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); yaz_iconv_close(cd); if (r == (size_t)(-1)) return 0; cd = yaz_iconv_open("UCS4LE", "UTF-8"); if (!cd) return 0; inbytesleft = sizeof(utf8buf) - outbytesleft; inbuf = utf8buf; outbuf = dst; outbytesleft = 4; r = yaz_iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); if (r == (size_t)(-1)) return 0; yaz_iconv_close(cd); if (memcmp(src, dst, 4)) return 0; } return 1; } static void tst_marc8_to_utf8(void) { yaz_iconv_t cd = yaz_iconv_open("UTF-8", "MARC8"); YAZ_CHECK(cd); if (!cd) return; YAZ_CHECK(tst_convert(cd, "Cours de math", "Cours de math")); /* COMBINING ACUTE ACCENT */ YAZ_CHECK(tst_convert(cd, "Cours de math\xe2" "e", "Cours de mathe\xcc\x81")); YAZ_CHECK(tst_convert(cd, "\xea" "a", "a" UTF8_RING_ABOVE)); YAZ_CHECK(tst_convert(cd, "a" "\xea" "\x1e", "a" "\x1e" UTF8_RING_ABOVE)); YAZ_CHECK(tst_convert(cd, "a" "\xea" "p", "ap" UTF8_RING_ABOVE)); YAZ_CHECK(tst_convert_x(cd, "a\xea", "a", YAZ_ICONV_EINVAL)); YAZ_CHECK(tst_convert(cd, "p", UTF8_RING_ABOVE)); /* note: missing p */ yaz_iconv(cd, 0, 0, 0, 0); /* incomplete. so we have to reset */ /* bug #2115 */ YAZ_CHECK(tst_convert(cd, ESC "(N" ESC ")Qp" ESC "(B", "\xd0\x9f")); YAZ_CHECK(tst_convert_x(cd, ESC , "", YAZ_ICONV_EINVAL)); YAZ_CHECK(tst_convert_x(cd, ESC "(", "", YAZ_ICONV_EINVAL)); YAZ_CHECK(tst_convert_x(cd, ESC "(B", "", 0)); YAZ_CHECK(tst_convert(cd, ESC "(B" "\x31", "1")); /* ASCII in G0 */ YAZ_CHECK(tst_convert(cd, ESC ")B" "\xB1", "1")); /* ASCII in G1 */ yaz_iconv_close(cd); } static void tst_marc8s_to_utf8(void) { yaz_iconv_t cd = yaz_iconv_open("UTF-8", "MARC8s"); YAZ_CHECK(cd); if (!cd) return; YAZ_CHECK(tst_convert(cd, "Cours de math", "Cours de math")); YAZ_CHECK(tst_convert(cd, "Cours de math\xe2" "e", "Cours de math" UTF8_eACUTE)); yaz_iconv_close(cd); } static void tst_marc8_to_latin1(void) { yaz_iconv_t cd = yaz_iconv_open("ISO-8859-1", "MARC8"); YAZ_CHECK(cd); if (!cd) return; YAZ_CHECK(tst_convert(cd, "ax", "ax")); /* latin capital letter o with stroke */ YAZ_CHECK(tst_convert(cd, "\xa2", "\xd8")); /* with latin small letter ae */ YAZ_CHECK(tst_convert(cd, "eneb\xb5r", "eneb\346r")); YAZ_CHECK(tst_convert(cd, "\xea" "a\xa2", "\xe5" "\xd8")); YAZ_CHECK(tst_convert(cd, "\xea" "a\xa2" "b", "\xe5" "\xd8" "b")); YAZ_CHECK(tst_convert(cd, "\xea" "a" "\xea" "a", "\xe5" "\xe5")); YAZ_CHECK(tst_convert(cd, "Cours de math", "Cours de math")); YAZ_CHECK(tst_convert(cd, "Cours de math\xe2" "e", "Cours de math\xe9")); YAZ_CHECK(tst_convert(cd, "12345678\xe2" "e", "12345678\xe9")); YAZ_CHECK(tst_convert(cd, "123456789\xe2" "e", "123456789\xe9")); YAZ_CHECK(tst_convert(cd, "1234567890\xe2" "e", "1234567890\xe9")); YAZ_CHECK(tst_convert(cd, "12345678901\xe2" "e", "12345678901\xe9")); YAZ_CHECK(tst_convert(cd, "Cours de math\xe2" "em", "Cours de math\xe9m")); YAZ_CHECK(tst_convert(cd, "Cours de math\xe2" "ematiques", "Cours de math\xe9matiques")); yaz_iconv_close(cd); } static void tst_utf8_to_marc8(const char *marc8_type) { yaz_iconv_t cd = yaz_iconv_open(marc8_type, "UTF-8"); YAZ_CHECK(cd); if (!cd) return; YAZ_CHECK(tst_convert(cd, "Cours ", "Cours ")); /** Pure ASCII. 11 characters (sizeof(outbuf)-1) */ YAZ_CHECK(tst_convert(cd, "Cours de mat", "Cours de mat")); /** Pure ASCII. 12 characters (sizeof(outbuf)) */ YAZ_CHECK(tst_convert(cd, "Cours de math", "Cours de math")); /** Pure ASCII. 13 characters (sizeof(outbuf)+1) */ YAZ_CHECK(tst_convert(cd, "Cours de math.", "Cours de math.")); /** UPPERCASE SCANDINAVIAN O */ YAZ_CHECK(tst_convert(cd, "S" UTF8_OSLASH, "S\xa2")); /** ARING (NFD) */ YAZ_CHECK(tst_convert(cd, "A" UTF8_RING_ABOVE, "\xEA" "A")); /** ARING (NFC) */ YAZ_CHECK(tst_convert(cd, UTF8_ARING, "\xEA" "A")); /** A MACRON + UMLAUT, DIAERESIS */ YAZ_CHECK(tst_convert(cd, "A" UTF8_MACRON UTF8_DIAERESIS, "\xE5\xE8\x41")); /* Ligature spanning two characters */ YAZ_CHECK(tst_convert(cd, "\x74" "\xCD\xA1" "\x73", /* UTF-8 */ "\xEB\x74\xEC\x73")); /* MARC-8 */ /* Double title spanning two characters */ YAZ_CHECK(tst_convert(cd, "\x74" "\xCD\xA0" "\x73", /* UTF-8 */ "\xFA\x74\xFB\x73")); /* MARC-8 */ /** Ideographic question mark (Unicode FF1F) */ YAZ_CHECK(tst_convert(cd, "\xEF\xBC\x9F" "o", /* UTF-8 */ "\033$1" "\x21\x2B\x3B" "\033(B" "o" )); /** Ideographic space per ANSI Z39.64 */ YAZ_CHECK(tst_convert(cd, "\xe3\x80\x80" "o", /* UTF-8 */ "\033$1" "\x21\x23\x21" "\033(B" "o" )); /** Superscript 0 . bug #642 */ YAZ_CHECK(tst_convert(cd, "(\xe2\x81\xb0)", /* UTF-8 */ "(\033p0\x1bs)")); /** bug #1778 */ YAZ_CHECK(tst_convert(cd, /* offset 0x530 in UTF-8 rec marccol4.u8.marc */ "\xE3\x83\xB3" "\xE3\x82\xBF" "\xCC\x84" "\xCC\x84" "\xE3\x83\xBC" /* UTF-8 */, "\x1B\x24\x31" "\x69\x25\x73" "\x1B\x28\x42" "\xE5\xE5" "\x1B\x24\x31" "\x69\x25\x3F" "\x69\x21\x3C" "\x1B\x28\x42")); /** bug #2120 */ YAZ_CHECK(tst_convert(cd, "\xCE\x94\xCE\xB5\xCF\x84" "\xCE\xBF\xCF\x81\xCE\xB1" "\xCE\xBA\xCE\xB7\xCF\x82\x2C", "\x1B\x28\x53\x45\x66\x78\x72\x75" "\x61\x6D\x6A\x77" "\x1B\x28\x42\x2C" )); { char *inbuf0 = "\xe2\x81\xb0"; char *inbuf = inbuf0; size_t inbytesleft = strlen(inbuf); char outbuf0[64]; char *outbuf = outbuf0; size_t outbytesleft = sizeof(outbuf0)-1; size_t r; #if 0 int i; #endif r = yaz_iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft); YAZ_CHECK(r != (size_t) (-1)); #if 0 *outbuf = '\0'; /* so we know when to stop printing */ for (i = 0; outbuf0[i]; i++) { int ch = outbuf0[i] & 0xff; yaz_log(YLOG_LOG, "ch%d %02X %c", i, ch, ch >= ' ' ? ch : '?'); } #endif r = yaz_iconv(cd, 0, 0, &outbuf, &outbytesleft); YAZ_CHECK(r != (size_t) (-1)); *outbuf = '\0'; /* for strcmp test below and printing */ #if 0 for (i = 0; outbuf0[i]; i++) { int ch = outbuf0[i] & 0xff; yaz_log(YLOG_LOG, "ch%d %02X %c", i, ch, ch >= ' ' ? ch : '?'); } #endif YAZ_CHECK(strcmp("\033p0\x1bs", outbuf0) == 0); } yaz_iconv(cd, 0, 0, 0, 0); yaz_iconv_close(cd); } static void tst_advance_to_utf8(void) { yaz_iconv_t cd = yaz_iconv_open("utf-8", "advancegreek"); YAZ_CHECK(cd); if (!cd) return; YAZ_CHECK(tst_convert(cd, "Cours ", "Cours ")); yaz_iconv_close(cd); } static void tst_utf8_to_advance(void) { yaz_iconv_t cd = yaz_iconv_open("advancegreek", "utf-8"); YAZ_CHECK(cd); if (!cd) return; YAZ_CHECK(tst_convert(cd, "Cours ", "Cours ")); yaz_iconv_close(cd); } static void tst_latin1_to_marc8(void) { yaz_iconv_t cd = yaz_iconv_open("MARC8", "ISO-8859-1"); YAZ_CHECK(cd); if (!cd) return; YAZ_CHECK(tst_convert(cd, "Cours ", "Cours ")); /** Pure ASCII. 11 characters (sizeof(outbuf)-1) */ YAZ_CHECK(tst_convert(cd, "Cours de mat", "Cours de mat")); /** Pure ASCII. 12 characters (sizeof(outbuf)) */ YAZ_CHECK(tst_convert(cd, "Cours de math", "Cours de math")); /** Pure ASCII. 13 characters (sizeof(outbuf)) */ YAZ_CHECK(tst_convert(cd, "Cours de math.", "Cours de math.")); /** D8: UPPERCASE SCANDINAVIAN O */ YAZ_CHECK(tst_convert(cd, "S\xd8", "S\xa2")); /** E9: LATIN SMALL LETTER E WITH ACUTE */ YAZ_CHECK(tst_convert(cd, "Cours de math\xe9", "Cours de math\xe2" "e")); YAZ_CHECK(tst_convert(cd, "Cours de math", "Cours de math" )); YAZ_CHECK(tst_convert(cd, "Cours de math\xe9", "Cours de math\xe2" "e" )); YAZ_CHECK(tst_convert(cd, "12345678\xe9","12345678\xe2" "e")); YAZ_CHECK(tst_convert(cd, "123456789\xe9", "123456789\xe2" "e")); YAZ_CHECK(tst_convert(cd, "1234567890\xe9","1234567890\xe2" "e")); YAZ_CHECK(tst_convert(cd, "12345678901\xe9", "12345678901\xe2" "e")); YAZ_CHECK(tst_convert(cd, "Cours de math\xe9m", "Cours de math\xe2" "em")); YAZ_CHECK(tst_convert(cd, "Cours de math\xe9matiques", "Cours de math\xe2" "ematiques")); yaz_iconv_close(cd); } static void tst_utf8_codes(void) { YAZ_CHECK(utf8_check(3)); YAZ_CHECK(utf8_check(127)); YAZ_CHECK(utf8_check(128)); YAZ_CHECK(utf8_check(255)); YAZ_CHECK(utf8_check(256)); YAZ_CHECK(utf8_check(900)); YAZ_CHECK(utf8_check(1000)); YAZ_CHECK(utf8_check(10000)); YAZ_CHECK(utf8_check(100000)); YAZ_CHECK(utf8_check(1000000)); YAZ_CHECK(utf8_check(10000000)); YAZ_CHECK(utf8_check(100000000)); } static void tst_danmarc_to_utf8(void) { yaz_iconv_t cd = yaz_iconv_open("utf-8", "danmarc"); YAZ_CHECK(cd); if (!cd) return; YAZ_CHECK(tst_convert(cd, "ax", "ax")); YAZ_CHECK(tst_convert(cd, "a@@b", "a@b")); YAZ_CHECK(tst_convert(cd, "a@@@@b", "a@@b")); YAZ_CHECK(tst_convert(cd, "@*", "*")); YAZ_CHECK(tst_convert(cd, "@@", "@")); YAZ_CHECK(tst_convert(cd, "@\xa4", UTF8_CURRENCY_SIGN)); YAZ_CHECK(tst_convert(cd, "\xa4", UTF8_CURRENCY_SIGN)); YAZ_CHECK(tst_convert(cd, "@\xe5", UTF8_LATIN_Aa)); YAZ_CHECK(tst_convert(cd, "@\xc5.", UTF8_LATIN_AA ".")); YAZ_CHECK(tst_convert(cd, "@a733", UTF8_LATIN_Aa)); YAZ_CHECK(tst_convert(cd, "@a732.", UTF8_LATIN_AA ".")); YAZ_CHECK(tst_convert(cd, "a@03BBb", "a" UTF8_LOWERCASE_LAMBDA "b")); YAZ_CHECK(tst_convert(cd, "@0302y", "y" UTF8_CIRCUMFLEX)); YAZ_CHECK(tst_convert(cd, "^y", "y" UTF8_CIRCUMFLEX)); YAZ_CHECK(tst_convert(cd, "@0332y", "y" UTF8_LOWLINE)); YAZ_CHECK(tst_convert(cd, "_y", "y" UTF8_LOWLINE)); YAZ_CHECK(tst_convert(cd, "@0301@0302a", "a" UTF8_CIRCUMFLEX UTF8_ACUTE)); YAZ_CHECK(tst_convert(cd, "@0302@0301a", "a" UTF8_ACUTE UTF8_CIRCUMFLEX)); YAZ_CHECK(tst_convert(cd, "0@0302@0301ab", "0a" UTF8_ACUTE UTF8_CIRCUMFLEX "b")); /** Incomplete Circumflex */ YAZ_CHECK(tst_convert_x(cd, "@0301", "", YAZ_ICONV_EINVAL)); yaz_iconv(cd, 0, 0, 0, 0); /* incomplete. so we have to reset */ /** p + Incomplete Circumflex */ YAZ_CHECK(tst_convert_x(cd, "p" "@0301", "p", YAZ_ICONV_EINVAL)); yaz_iconv(cd, 0, 0, 0, 0); /* incomplete. so we have to reset */ /** TILDE a */ YAZ_CHECK(tst_convert(cd, "@0303" "a", "a" UTF8_TILDE)); /** TILDE Y */ YAZ_CHECK(tst_convert(cd, "@0303" "Y", "Y" UTF8_TILDE)); /** ARING (NFC) */ YAZ_CHECK(tst_convert(cd, "\xC5", UTF8_ARING)); /** Trema */ YAZ_CHECK(tst_convert(cd, "@UFCe", "e\xCC\x88")); yaz_iconv_close(cd); } static void tst_utf8_to_danmarc_common(yaz_iconv_t cd) { YAZ_CHECK(tst_convert(cd, "ax", "ax")); YAZ_CHECK(tst_convert(cd, "a@b", "a@@b")); YAZ_CHECK(tst_convert(cd, "a@@b", "a@@@@b")); YAZ_CHECK(tst_convert(cd, "*", "@*")); YAZ_CHECK(tst_convert(cd, "@", "@@")); YAZ_CHECK(tst_convert(cd, UTF8_CURRENCY_SIGN, "\xa4")); YAZ_CHECK(tst_convert(cd, "a" UTF8_aRING "b", "a\xe5" "b")); /* aring */ YAZ_CHECK(tst_convert(cd, "a" UTF8_LOWERCASE_LAMBDA "b", "a@03BBb")); YAZ_CHECK(tst_convert(cd, UTF8_LATIN_AA ".", "@\xc5.")); YAZ_CHECK(tst_convert(cd, UTF8_LATIN_Aa, "@\xe5")); /** TILDE (none) */ YAZ_CHECK(tst_convert(cd, UTF8_TILDE, "@0303")); /** TILDE a - maps into Latin-1 range */ YAZ_CHECK(tst_convert(cd, "a" UTF8_TILDE, "\xE3")); /** TILDE Y */ YAZ_CHECK(tst_convert(cd, "Y" UTF8_TILDE, "@0303" "Y")); /** ARING (NFD) */ YAZ_CHECK(tst_convert(cd, "A" UTF8_RING_ABOVE, "\xC5")); /** ARING (NFC) */ YAZ_CHECK(tst_convert(cd, UTF8_ARING, "\xC5")); YAZ_CHECK(tst_convert(cd, "a" UTF8_CIRCUMFLEX, "\xE2")); } static void tst_utf8_to_danmarc(void) { yaz_iconv_t cd = yaz_iconv_open("danmarc", "utf-8"); YAZ_CHECK(cd); if (!cd) return; tst_utf8_to_danmarc_common(cd); YAZ_CHECK(tst_convert(cd, "y" UTF8_CIRCUMFLEX, "@0302y")); YAZ_CHECK(tst_convert(cd, "y" UTF8_LOWLINE, "@0332y")); /** combining chars.. that should be reversed */ YAZ_CHECK(tst_convert(cd, "a" UTF8_CIRCUMFLEX UTF8_ACUTE, "@0301@0302a")); YAZ_CHECK(tst_convert(cd, "a" UTF8_ACUTE UTF8_CIRCUMFLEX, "@0302@0301a")); YAZ_CHECK(tst_convert(cd, "0a" UTF8_ACUTE UTF8_CIRCUMFLEX "b", "0@0302@0301ab")); yaz_iconv_close(cd); } static void tst_utf8_to_danmarc2(void) { yaz_iconv_t cd = yaz_iconv_open("danmarc2", "utf-8"); YAZ_CHECK(cd); if (!cd) return; tst_utf8_to_danmarc_common(cd); YAZ_CHECK(tst_convert(cd, "y" UTF8_CIRCUMFLEX, "^y")); YAZ_CHECK(tst_convert(cd, "y" UTF8_LOWLINE, "_y")); /** combining chars.. that should be reversed */ YAZ_CHECK(tst_convert(cd, "a" UTF8_CIRCUMFLEX UTF8_ACUTE, "\xB4^a")); YAZ_CHECK(tst_convert(cd, "a" UTF8_ACUTE UTF8_CIRCUMFLEX, "^\xB4" "a")); YAZ_CHECK(tst_convert(cd, "0a" UTF8_ACUTE UTF8_CIRCUMFLEX "b" , "0^\xB4" "ab")); yaz_iconv_close(cd); } int main (int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); tst_utf8_codes(); tst_marc8_to_utf8(); tst_marc8s_to_utf8(); tst_marc8_to_latin1(); tst_advance_to_utf8(); tst_utf8_to_advance(); tst_utf8_to_marc8("marc8"); tst_utf8_to_marc8("marc8lossy"); tst_utf8_to_marc8("marc8lossless"); tst_danmarc_to_utf8(); tst_utf8_to_danmarc(); tst_utf8_to_danmarc2(); tst_latin1_to_marc8(); tst_marc8_to_ucs4b(); tst_ucs4b_to_utf8(); dconvert(1, "UTF-8"); dconvert(1, "ISO-8859-1"); dconvert(1, "UCS4"); dconvert(1, "UCS4LE"); dconvert(0, "CP865"); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_soap1.c0000664000175000017500000000220214152153071012531 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #if YAZ_HAVE_XML2 #include #endif #include void tst(void) { #if YAZ_HAVE_XML2 xmlChar *buf_out; int len_out; xmlDocPtr doc; xmlNodePtr top; #if 0 const char *val = "jordb" "\xe6" "r"; /* makes xmlDocDumpMemory hang .. */ #else const char *val = "jordbaer"; /* OK */ #endif doc = xmlNewDoc(BAD_CAST "1.0"); YAZ_CHECK(doc); top = xmlNewNode(0, BAD_CAST "top"); YAZ_CHECK(top); xmlNewTextChild(top, 0, BAD_CAST "sub", BAD_CAST val); xmlDocSetRootElement(doc, top); xmlDocDumpMemory(doc, &buf_out, &len_out); #if 0 printf("%*s", len_out, buf_out); #endif /* YAZ_HAVE_XML2 */ #endif } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); #if YAZ_HAVE_XML2 LIBXML_TEST_VERSION; #endif tst(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_query_charset.c0000664000175000017500000000407414152153071014375 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include enum query_charset_status { NO_ERROR, PQF_FAILED, MATCH, NO_MATCH, CONV_FAILED }; enum query_charset_status t(yaz_iconv_t cd, const char *pqf, const char *expect_pqf) { YAZ_PQF_Parser parser = yaz_pqf_create(); ODR odr = odr_createmem(ODR_ENCODE); Z_RPNQuery *rpn; enum query_charset_status status = NO_ERROR; YAZ_CHECK(parser); YAZ_CHECK(odr); rpn = yaz_pqf_parse(parser, odr, pqf); yaz_pqf_destroy(parser); if (!rpn) status = PQF_FAILED; else { WRBUF w = wrbuf_alloc(); Z_RPNQuery *r2 = yaz_copy_z_RPNQuery(rpn, odr); YAZ_CHECK(r2); YAZ_CHECK(r2 != rpn); yaz_query_charset_convert_rpnquery(rpn, odr, cd); yaz_rpnquery_to_wrbuf(w, rpn); if (!expect_pqf || strcmp(expect_pqf, wrbuf_cstr(w)) == 0) status = MATCH; else { status = NO_MATCH; printf("Result: %s\n", wrbuf_cstr(w)); } wrbuf_destroy(w); } odr_destroy(odr); return status; } static void tst(void) { yaz_iconv_t cd = yaz_iconv_open("iso-8859-1", "utf-8"); YAZ_CHECK(cd); if (!cd) return; YAZ_CHECK_EQ(t(cd, "@attr 1=4 bad query", 0), PQF_FAILED); YAZ_CHECK_EQ(t(cd, "@attr 1=4 ok", "@attrset Bib-1 @attr 1=4 ok"), MATCH); /* m followed by latin smaller letter ae */ YAZ_CHECK_EQ(t(cd, "@attr 1=4 m\xc3\xa6", "@attrset Bib-1 @attr 1=4 m\xe6"), MATCH); yaz_iconv_close(cd); } int main (int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); tst(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_embed_record.c0000664000175000017500000003316314152153071014132 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #if YAZ_HAVE_XML2 #include #include #endif void test1(void) { int buflen; for (buflen = 0; buflen < 256; buflen++) { char buf[256]; char buf_a[1024]; char buf_b[1024]; int i; for (i = 0; i < buflen; i++) buf[i] = 1 + i; buf[i] = 0; yaz_base64encode(buf, buf_a); YAZ_CHECK(yaz_base64decode(buf_a, buf_b) == 0); YAZ_CHECK(strcmp(buf, buf_b) == 0); } } void test2(void) { char base_enc[] = "MDA3NjZuYW0gIDIyMDAyNjU4YSA0NTAwMDAxMDAxMjAwMDAwMDAzMDAwNjAwMDEyMDA1MDAx" "NzAwMDE4MDA4MDA0MTAwMDM1MDEwMDAxNzAwMDc2MDIwMDAxNTAwMDkzMDM1MDAxODAwMTA4" "MDQwMDAxODAwMTI2MDQ5MDAwOTAwMTQ0MDUwMDAyNjAwMTUzMDgyMDAxNzAwMTc5MTAwMDAx" "ODAwMTk2MjQ1MDA2NzAwMjE0MjYwMDA1MjAwMjgxMjYzMDAwOTAwMzMzMzAwMDAyNzAwMzQy" "NTAwMDAyNzAwMzY5NTA0MDA1MTAwMzk2NjUwMDA0NDAwNDQ3OTk5MDAwOTAwNDkxHm9jbTI4" "MzM5ODYzHk9Db0xDHjE5OTQwMTA1MDc0NTIyLjAeOTMwNjA5czE5OTQgICAgY291ICAgICAg" "YiAgICAwMDEgMCBlbmcgIB4gIB9hICAgOTMwMDkwNDcgHiAgH2EwMTMwMzA1NTI5HiAgH2Eo" "b2NtKTI4MzM5ODYzHiAgH2FETEMfY0RMQx9kS0tVHiAgH2FLS1VKHjAwH2FRQTc2LjczLkMy" "OB9iRzczIDE5OTQeMDAfYTAwNS4xMy8zHzIyMB4xIB9hR3JhaGFtLCBQYXVsLh4xMB9hT24g" "TGlzcCA6H2JhZHZhbmNlZCB0ZWNobmlxdWVzIGZvciBjb21tb24gTGlzcCAvH2NQYXVsIEdy" "YWhhbS4eICAfYUVuZ2xld29vZCBDbGlmZnMsIE4uSi4gOh9iUHJlbnRpY2UgSGFsbCwfYzE5" "OTQuHiAgH2E5NDEwHiAgH2F4aWlpLCA0MTMgcC4gOx9jMjMgY20uHiAgH2EiQW4gQWxhbiBS" "LiBBcHQgYm9vay4iHiAgH2FJbmNsdWRlcyBiaWJsaW9ncmFwaGljYWwgcmVmZXJlbmNlcyBh" "bmQgaW5kZXguHiAwH2FDT01NT04gTElTUCAoQ29tcHV0ZXIgcHJvZ3JhbSBsYW5ndWFnZSke" "H2xVQUhJTEweHQ=="; char bin_marc[] = "00766nam 22002658a 4500001001200000003000600012005001700018008004100035010001700076020001500093035001800108040001800126049000900144050002600153082001700179100001800196245006700214260005200281263000900333300002700342500002700369504005100396650004400447999000900491\036ocm28339863\036OCoLC\03619940105074522.0\036930609s1994 cou b 001 0 eng \036 \037a 93009047 \036 \037a0130305529\036 \037a(ocm)28339863\036 \037aDLC\037cDLC\037dKKU\036 \037aKKUJ\03600\037aQA76.73.C28\037bG73 1994\03600\037a005.13/3\037220\0361 \037aGraham, Paul.\03610\037aOn Lisp :\037badvanced techniques for common Lisp /\037cPaul Graham.\036 \037aEnglewood Cliffs, N.J. :\037bPrentice Hall,\037c1994.\036 \037a9410\036 \037axiii, 413 p. ;\037c23 cm.\036 \037a\"An Alan R. Apt book.\"\036 \037aIncludes bibliographical references and index.\036 0\037aCOMMON LISP (Computer program language)\036\037lUAHILL\036\035"; int marc_size = strlen(bin_marc); char out_rec[1000]; yaz_marc_t marc = yaz_marc_create(); WRBUF buf = wrbuf_alloc(); yaz_base64decode(base_enc, out_rec); YAZ_CHECK(strcmp(out_rec, bin_marc) == 0); yaz_marc_read_iso2709(marc, out_rec, marc_size); yaz_marc_write_marcxml(marc, buf); yaz_marc_destroy(marc); wrbuf_destroy(buf); } static int test_render(const char *type_spec, int is_marc, const char *input, const char *expected_output) { ODR odr = odr_createmem(ODR_ENCODE); const char *actual_output; int actual_len; int res = 0; WRBUF wrbuf = wrbuf_alloc(); Z_NamePlusRecord *npr = odr_malloc(odr, sizeof(*npr)); npr->which = Z_NamePlusRecord_databaseRecord; if (is_marc) npr->u.databaseRecord = z_ext_record_usmarc(odr, input, strlen(input)); else npr->u.databaseRecord = z_ext_record_xml(odr, input, strlen(input)); actual_output = yaz_record_render(npr, 0, wrbuf, type_spec, &actual_len); if (actual_output && expected_output) { if (strlen(expected_output) == actual_len && !memcmp(expected_output, actual_output, actual_len)) res = 1; else { yaz_log(YLOG_LOG, "Got result"); yaz_log(YLOG_LOG, "%.*s", actual_len, actual_output); yaz_log(YLOG_LOG, "Expected result"); yaz_log(YLOG_LOG, "%s", expected_output); } } else if (!actual_output && !expected_output) res = 1; else if (!actual_output && expected_output) { yaz_log(YLOG_LOG, "Got null result, but expected"); yaz_log(YLOG_LOG, "%s", expected_output); } else { yaz_log(YLOG_LOG, "Got result, but expected no result"); yaz_log(YLOG_LOG, "%.*s", actual_len, actual_output); } wrbuf_destroy(wrbuf); odr_destroy(odr); return res; } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); test1(); test2(); #if YAZ_HAVE_XML2 YAZ_CHECK(test_render("xml", 0, "", "")); YAZ_CHECK(test_render( "xml", 1, "\x30\x30\x31\x33\x38\x6E\x61\x6D\x20\x20\x32\x32\x30\x30\x30\x37" "\x33\x38\x61\x20\x34\x35\x30\x30\x30\x30\x31\x30\x30\x31\x33\x30" "\x30\x30\x30\x30\x30\x30\x33\x30\x30\x30\x34\x30\x30\x30\x31\x33" "\x31\x30\x30\x30\x30\x31\x37\x30\x30\x30\x31\x37\x32\x34\x35\x30" "\x30\x33\x30\x30\x30\x30\x33\x34\x1E\x20\x20\x20\x31\x31\x32\x32" "\x34\x34\x36\x36\x20\x1E\x44\x4C\x43\x1E\x31\x30\x1F\x61\x4A\x61" "\x63\x6B\x20\x43\x6F\x6C\x6C\x69\x6E\x73\x1E\x31\x30\x1F\x61\x48" "\x6F\x77\x20\x74\x6F\x20\x70\x72\x6F\x67\x72\x61\x6D\x20\x61\x20" "\x63\x6F\x6D\x70\x75\x74\x65\x72\x1E\x1D", "\n" " 00138nam a22000738a 4500\n" " 11224466 \n" " DLC\n" " \n" " Jack Collins\n" " \n" " \n" " How to program a computer\n" " \n" "\n")); YAZ_CHECK(test_render("xml", 0, "", "")); YAZ_CHECK(test_render( "xml; base64=/my/text()", 0, "" "MDAxMzhuYW0gIDIyMDAwNzM4YSA0NTAwMDAxMDAxMzAwMDAwMDAzMDAwNDAwMDEzMTAwMDAxNzAw" "MDE3MjQ1MDAzMDAwMDM0HiAgIDExMjI0NDY2IB5ETEMeMTAfYUphY2sgQ29sbGlucx4xMB9hSG93" "IHRvIHByb2dyYW0gYSBjb21wdXRlch4d" "", "\n" "\n" " 00138nam a22000738a 4500\n" " 11224466 \n" " DLC\n" " \n" " Jack Collins\n" " \n" " \n" " How to program a computer\n" " \n" "\n")); YAZ_CHECK(test_render( "xml; charset=utf-8; base64=/my/text()", 0, "" "MDAxMzhuYW0gIDIyMDAwNzM4YSA0NTAwMDAxMDAxMzAwMDAwMDAzMDAwNDAwMDEzMTAwMDAxNzAw" "MDE3MjQ1MDAzMDAwMDM0HiAgIDExMjI0NDY2IB5ETEMeMTAfYUphY2sgQ29sbGlucx4xMB9hSG93" "IHRvIHByb2dyYW0gYSBjb21wdXRlch4d" "", "\n" "\n" " 00138nam a22000738a 4500\n" " 11224466 \n" " DLC\n" " \n" " Jack Collins\n" " \n" " \n" " How to program a computer\n" " \n" "\n")); YAZ_CHECK(test_render( "xml; base64=/my/text();charset=utf-8", 0, "" "MDAxMzhuYW0gIDIyMDAwNzM4YSA0NTAwMDAxMDAxMzAwMDAwMDAzMDAwNDAwMDEzMTAwMDAxNzAw" "MDE3MjQ1MDAzMDAwMDM0HiAgIDExMjI0NDY2IB5ETEMeMTAfYUphY2sgQ29sbGlucx4xMB9hSG93" "IHRvIHByb2dyYW0gYSBjb21wdXRlch4d" "", "\n" "\n" " 00138nam a22000738a 4500\n" " 11224466 \n" " DLC\n" " \n" " Jack Collins\n" " \n" " \n" " How to program a computer\n" " \n" "\n")); YAZ_CHECK(test_render( "txml;base64=/my/text();charset=utf-8", 0, "" "MDAxMzhuYW0gIDIyMDAwNzM4YSA0NTAwMDAxMDAxMzAwMDAwMDAzMDAwNDAwMDEzMTAwMDAxNzAw" "MDE3MjQ1MDAzMDAwMDM0HiAgIDExMjI0NDY2IB5ETEMeMTAfYUphY2sgQ29sbGlucx4xMB9hSG93" "IHRvIHByb2dyYW0gYSBjb21wdXRlch4d" "", "\n" "\n" " 00138nam a22000738a 4500\n" " 11224466 \n" " DLC\n" " \n" " Jack Collins\n" " \n" " \n" " How to program a computer\n" " \n" "\n")); YAZ_CHECK(test_render( "xml; charset=utf-8; base64=/my/text()", 0, "" "MDA0OTJuYW0gYTIyMDAxNDU1YSA0NTAwMDAxMDAxMDAwMDAwMDA1MDAxNzAwMDEwMDA4MDA0MTAw" "MDI3MTAwMDA1MjAwMDY4MjQ1MDEwNDAwMTIwMjUwMDAxNDAwMjI0MjYwMDAyMzAwMjM4MzAwMDAx" "NjAwMjYxNjUwMDA1MTAwMjc3NjUwMDAxODAwMzI4HjAwMDI3NzQ4NR4yMDA1MTAyNjExMTQzNi4w" "HjA1MDQxM3MxODk0ICAgIGdyICAgICAgICAgICAgMDAwIDAgZ3JlIGQeMSAfYc6czrHPgc6/z43O" "tM63z4IsIM6az4nOvc+Dz4TOsc69z4TOr869zr/PgiDOmc+JHjEwH2HOlc67zrvOt869zrnOus+M" "zr0gzrrPgc+Fz4DPhM6/zrPPgc6xz4bOuc66z4zOvSDOu861zr7Ouc66z4zOvSAvH2POms+Jzr3P" "g8+ELiDOmS4gzpzOsc+Bzr/Pjc60zrfPgi4eICAyzrcgzrXOus60Lh4gIB9hzpHOuM6uzr3OsSwf" "YzE4OTQuHiAgH2EyNDggz4POtc67Lh4gMB9hR3JlZWsgbGFuZ3VhZ2UsIE1vZGVybh94RGlhbGVj" "dHMfdkRpY3Rpb25hcmllcx4gMB9hQ3J5cHRvZ3JhcGh5Lh4d" "", "\n" "\n" " 00492nam a22001455a 4500\n" " 000277485\n" " 20051026111436.0\n" " 050413s1894 gr 000 0 gre d\n" " \n" " Μαρούδης, Κωνσταντίνος Ιω\n" " \n" " \n" " Ελληνικόν κρυπτογραφικόν λεξικόν /\n" " Κωνστ. Ι. Μαρούδης.\n" " \n" " \n" " εκδ.\n" " \n" " \n" " Αθήνα,\n" " 1894.\n" " \n" " \n" " 248 σελ.\n" " \n" " \n" " Greek language, Modern\n" " Dialects\n" " Dictionaries\n" " \n" " \n" " Cryptography.\n" " \n" "\n")); #endif YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/cql2pqfsample0000664000175000017500000000142414152153071013005 00000000000000# CQL queries for testing. # Read by test_cql2pqf.sh # No blank lines! # # Simple Term a a b "a b" # Index Relation Term title = fish dc.title = fish # Simple Boolean cat or dog cat and fish cat not frog (cat not frog) "cat" not "fish food" xml and "prox///" fred and any ((fred or all)) a or b and c not d # Masking/Truncation *a a* *a* a*a ?a a? ?a? a?a a#a? *a# a#a* a*3 # Escape sequences (sh reads one slash, though) a*\\3 \\*a# \\*a*b# \\" @and a^ ^a ^a^ \\^ ^a\\^ # relation modifiers dc.title=/unmasked a*b dc.title=/masked a*b dc.title=/regexp a.*b dc.title=/dc.language=dk a dc.title=/dc.language=dk/regexp a.*b dc.title=/language=dk/regexp a.*b # proximity a prox b a prox/unordered b a prox/ordered b a prox/distance < 3 b a prox/distance<3/ordered b a prox/unit=paragraph b yaz-5.34.0/test/test_retrieval.c0000664000175000017500000003505014152153071013512 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #if YAZ_HAVE_XSLT #include #include yaz_retrieval_t conv_configure(const char *xmlstring, WRBUF w) { xmlDocPtr doc = xmlParseMemory(xmlstring, strlen(xmlstring)); if (!doc) { wrbuf_printf(w, "xmlParseMemory"); return 0; } else { xmlNodePtr ptr = xmlDocGetRootElement(doc); yaz_retrieval_t p = yaz_retrieval_create(); if (p) { const char *srcdir = getenv("srcdir"); if (srcdir) yaz_retrieval_set_path(p, srcdir); } if (!ptr) { wrbuf_printf(w, "xmlDocGetRootElement"); yaz_retrieval_destroy(p); p = 0; } else if (!p) { wrbuf_printf(w, "yaz_retrieval_create"); } else { int r = yaz_retrieval_configure(p, ptr); if (r) { wrbuf_puts(w, yaz_retrieval_get_error(p)); yaz_retrieval_destroy(p); p = 0; } } xmlFreeDoc(doc); return p; } } int conv_configure_test(const char *xmlstring, const char *expect_error, yaz_retrieval_t *pt) { WRBUF w = wrbuf_alloc(); int ret; yaz_retrieval_t p = conv_configure(xmlstring, w); if (!p) { if (expect_error && !strcmp(wrbuf_cstr(w), expect_error)) ret = 1; else { ret = 0; printf("%s\n", wrbuf_cstr(w)); } } else { if (expect_error) { ret = 0; yaz_retrieval_destroy(p); } else { if (pt) *pt = p; else yaz_retrieval_destroy(p); ret = 1; } } wrbuf_destroy(w); return ret; } static void tst_configure(void) { YAZ_CHECK(conv_configure_test( "", "Expected element ", 0)); YAZ_CHECK(conv_configure_test( "", 0, 0)); YAZ_CHECK(conv_configure_test( "", "Element :" " expected element , got ", 0)); YAZ_CHECK(conv_configure_test("" "", "Missing 'syntax' attribute", 0)); YAZ_CHECK(conv_configure_test( "" "" "" "", "Element : expected attributes " "'syntax', identifier' or 'name', got " "'unknown'", 0)); YAZ_CHECK(conv_configure_test( "" "" "" "", "Element : unknown attribute " "value syntax='unknown_synt'", 0)); YAZ_CHECK(conv_configure_test( "" "" "", 0, 0)); YAZ_CHECK(conv_configure_test( "" "" "", 0, 0)); YAZ_CHECK(conv_configure_test( "" "" "", 0, 0)); YAZ_CHECK(conv_configure_test( "" "" "" "" "", "Element : expected zero or one element " ", got ", 0)); YAZ_CHECK(conv_configure_test( "" "" " " "" "", "Element : expected attributes 'syntax' or 'name," " got 'schema'", 0)); YAZ_CHECK(conv_configure_test( "" "" " " "" "", 0, 0)); YAZ_CHECK(conv_configure_test( "" "" " " "" "", "Element : " "attribute 'syntax' has invalid value " "'unknown'", 0)); YAZ_CHECK(conv_configure_test( "" "" " " "" "", "Element : expected attributes " "'syntax' or 'name, got 'unknown'", 0)); YAZ_CHECK(conv_configure_test( "" "" "" "" "" "" "" "", "Element : Unsupported character" " set mapping defined by attribute values", 0)); YAZ_CHECK(conv_configure_test( "" "" "" "" "" "" "" "", "Element : Unsupported" " input format defined by attribute value", 0)); YAZ_CHECK(conv_configure_test( "" "" "" "" "" "" "" "" "", "Element : " "only one allowed", 0)); YAZ_CHECK(conv_configure_test( "" "" "" "" "" "" "" "", 0, 0)); yaz_retrieval_t p = 0; YAZ_CHECK(conv_configure_test( "" "" "" "" "" " " " " " " "" "" " " " " " " "" "" " " " " " " " " "" "", 0, &p)); const char *match_schema = 0; Odr_oid *match_syntax = 0; const char *backend_schema = 0; Odr_oid *backend_syntax = 0; int r; r = yaz_retrieval_request(p, "e", yaz_oid_recsyn_usmarc, &match_schema, &match_syntax, 0, &backend_schema, &backend_syntax); YAZ_CHECK(r != 0); r = yaz_retrieval_request(p, "F", yaz_oid_recsyn_usmarc, &match_schema, &match_syntax, 0, &backend_schema, &backend_syntax); YAZ_CHECK(r == 0); YAZ_CHECK(backend_schema && !strcmp(backend_schema, "F")); YAZ_CHECK(!oid_oidcmp(backend_syntax, yaz_oid_recsyn_usmarc)); r = yaz_retrieval_request(p, "f", yaz_oid_recsyn_usmarc, &match_schema, &match_syntax, 0, &backend_schema, &backend_syntax); YAZ_CHECK(r == 0); YAZ_CHECK(backend_schema && !strcmp(backend_schema, "f")); YAZ_CHECK(!oid_oidcmp(backend_syntax, yaz_oid_recsyn_usmarc)); r = yaz_retrieval_request(p, 0, yaz_oid_recsyn_usmarc, &match_schema, &match_syntax, 0, &backend_schema, &backend_syntax); YAZ_CHECK(r == 0); YAZ_CHECK(backend_schema == 0); YAZ_CHECK(!oid_oidcmp(backend_syntax, yaz_oid_recsyn_usmarc)); r = yaz_retrieval_request(p, 0, yaz_oid_recsyn_usmarc, &match_schema, &match_syntax, 0, &backend_schema, &backend_syntax); YAZ_CHECK(r == 0); YAZ_CHECK(backend_schema == 0); YAZ_CHECK(!oid_oidcmp(backend_syntax, yaz_oid_recsyn_usmarc)); r = yaz_retrieval_request(p, 0, yaz_oid_recsyn_xml, &match_schema, &match_syntax, 0, &backend_schema, &backend_syntax); YAZ_CHECK(r == 0); YAZ_CHECK(backend_schema && !strcmp(backend_schema, "F")); YAZ_CHECK(!oid_oidcmp(backend_syntax, yaz_oid_recsyn_usmarc)); r = yaz_retrieval_request(p, "f1:9988", yaz_oid_recsyn_danmarc, &match_schema, &match_syntax, 0, &backend_schema, &backend_syntax); YAZ_CHECK(r == 0); YAZ_CHECK(backend_schema && !strcmp(backend_schema, "F:9988")); YAZ_CHECK(!oid_oidcmp(backend_syntax, yaz_oid_recsyn_usmarc)); r = yaz_retrieval_request(p, "F1:9988", yaz_oid_recsyn_danmarc, &match_schema, &match_syntax, 0, &backend_schema, &backend_syntax); YAZ_CHECK(r == 0); YAZ_CHECK(backend_schema && !strcmp(backend_schema, "F:9988")); YAZ_CHECK(!oid_oidcmp(backend_syntax, yaz_oid_recsyn_usmarc)); r = yaz_retrieval_request(p, 0, yaz_oid_recsyn_danmarc, &match_schema, &match_syntax, 0, &backend_schema, &backend_syntax); YAZ_CHECK(r == 0); YAZ_CHECK(backend_schema && !strcmp(backend_schema, "F")); YAZ_CHECK(!oid_oidcmp(backend_syntax, yaz_oid_recsyn_usmarc)); yaz_retrieval_destroy(p); } #endif int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); yaz_log_xml_errors(0, 0 /* disable it */); #if YAZ_HAVE_XSLT tst_configure(); #endif YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_match_glob.c0000664000175000017500000000362714152153071013621 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include void tst1(void) { YAZ_CHECK_EQ(yaz_match_glob("a", "a"), 1); YAZ_CHECK_EQ(yaz_match_glob("", ""), 1); YAZ_CHECK_EQ(yaz_match_glob("a", ""), 0); YAZ_CHECK_EQ(yaz_match_glob("", "a"), 0); YAZ_CHECK_EQ(yaz_match_glob("a", "b"), 0); YAZ_CHECK_EQ(yaz_match_glob("b", "a"), 0); YAZ_CHECK_EQ(yaz_match_glob("?", "a"), 1); YAZ_CHECK_EQ(yaz_match_glob("a", "?"), 0); YAZ_CHECK_EQ(yaz_match_glob("?", "aa"), 0); YAZ_CHECK_EQ(yaz_match_glob("?a", "aa"), 1); YAZ_CHECK_EQ(yaz_match_glob("a?", "aa"), 1); YAZ_CHECK_EQ(yaz_match_glob("??", "aa"), 1); YAZ_CHECK_EQ(yaz_match_glob("*", ""), 1); YAZ_CHECK_EQ(yaz_match_glob("*", "a"), 1); YAZ_CHECK_EQ(yaz_match_glob("**", "a"), 1); YAZ_CHECK_EQ(yaz_match_glob("*a", "a"), 1); YAZ_CHECK_EQ(yaz_match_glob("a*", "a"), 1); YAZ_CHECK_EQ(yaz_match_glob("b*", "a"), 0); YAZ_CHECK_EQ(yaz_match_glob("*b", "a"), 0); YAZ_CHECK_EQ(yaz_match_glob("**b", "a"), 0); YAZ_CHECK_EQ(yaz_match_glob("*b*", "a"), 0); YAZ_CHECK_EQ(yaz_match_glob("*:w", "title:w"), 1); YAZ_CHECK_EQ(yaz_match_glob("title:w", "title:w"), 1); YAZ_CHECK_EQ(yaz_match_glob("title:*", "title:w"), 1); YAZ_CHECK_EQ(yaz_match_glob2("*:W", "title:w", 0), 0); YAZ_CHECK_EQ(yaz_match_glob2("title:w", "title:W", 0), 0); YAZ_CHECK_EQ(yaz_match_glob2("*:W", "title:w", 1), 1); YAZ_CHECK_EQ(yaz_match_glob2("title:w", "title:W", 1), 1); } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); tst1(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_xml_include.c0000664000175000017500000000765314152153071014030 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include static void tst_xml_include1(void) { #if YAZ_HAVE_XML2 const char *srcdir = getenv("srcdir"); xmlDocPtr doc; xmlNodePtr node; const char *xml_in = ""; if (srcdir == 0) srcdir = "."; doc = xmlParseMemory(xml_in, strlen(xml_in)); YAZ_CHECK(doc); if (!doc) return; node = xmlDocGetRootElement(doc); YAZ_CHECK(node); if (node) { const char *expect = "\n" "" "some" "\n"; xmlChar *xml_out; int len_out; int ret = yaz_xml_include_simple(node, srcdir); YAZ_CHECK(ret == 0); xmlDocDumpMemory(doc, &xml_out, &len_out); YAZ_CHECK(xml_out && len_out > 0); if (xml_out && len_out > 0) { YAZ_CHECK(strlen(expect) == len_out); if (strlen(expect) == len_out) { YAZ_CHECK(memcmp(expect, xml_out, len_out) == 0); } else { fwrite(xml_out, 1, len_out, stdout); fflush(stdout); } xmlFree(xml_out); } } xmlFreeDoc(doc); #endif } static void tst_xml_include2(void) { #if YAZ_HAVE_XML2 const char *srcdir = getenv("srcdir"); xmlDocPtr doc; xmlNodePtr node; const char *xml_in = ""; if (srcdir == 0) srcdir = "."; doc = xmlParseMemory(xml_in, strlen(xml_in)); YAZ_CHECK(doc); if (!doc) return; node = xmlDocGetRootElement(doc); YAZ_CHECK(node); if (node) { int ret = yaz_xml_include_glob(node, srcdir, YAZ_FILE_GLOB_FAIL_NOTEXIST); YAZ_CHECK_EQ(ret, -1); } if (node) { int ret = yaz_xml_include_glob(node, srcdir, 0); YAZ_CHECK_EQ(ret, 0); } xmlFreeDoc(doc); #endif } static void tst_xml_include3(void) { #if YAZ_HAVE_XML2 const char *srcdir = getenv("srcdir"); xmlDocPtr doc; xmlNodePtr node; const char *xml_in = ""; if (srcdir == 0) srcdir = "."; doc = xmlParseMemory(xml_in, strlen(xml_in)); YAZ_CHECK(doc); if (!doc) return; node = xmlDocGetRootElement(doc); YAZ_CHECK(node); if (node) { const char *expect = "\n" "" "\n"; xmlChar *xml_out; int len_out; int ret = yaz_xml_include_simple(node, srcdir); YAZ_CHECK(ret == 0); xmlDocDumpMemory(doc, &xml_out, &len_out); YAZ_CHECK(xml_out && len_out > 0); if (xml_out && len_out > 0) { YAZ_CHECK(strlen(expect) == len_out); if (strlen(expect) == len_out) { YAZ_CHECK(memcmp(expect, xml_out, len_out) == 0); } else { fwrite(xml_out, 1, len_out, stdout); fflush(stdout); } xmlFree(xml_out); } } xmlFreeDoc(doc); #endif } int main (int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst_xml_include1(); tst_xml_include2(); tst_xml_include3(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/tstodr.asn0000664000175000017500000000064514152153071012336 00000000000000-- Small ASN.1 spec for tstodr test test_odrcodec {test_odrcodec} DEFINITIONS ::= BEGIN MySequence ::= SEQUENCE { first [1] IMPLICIT INTEGER, second [2] IMPLICIT OCTET STRING, third [3] IMPLICIT BOOLEAN, fourth [4] IMPLICIT NULL, fifth [5] IMPLICIT INTEGER { enum1(0), enum2(1) }, myoid [6] IMPLICIT OBJECT IDENTIFIER } END yaz-5.34.0/test/test_oid.c0000664000175000017500000000420114152153071012262 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include static void tst(void) { char oid_buf[OID_STR_MAX]; const char *n; yaz_oid_db_t db; const Odr_oid *c_oid; Odr_oid *oid; NMEM nmem = nmem_create(); ODR odr = odr_createmem(ODR_ENCODE); db = yaz_oid_std(); YAZ_CHECK(db); c_oid = yaz_string_to_oid(db, CLASS_ATTSET, "Bib-1"); YAZ_CHECK(c_oid && oid_oidcmp(c_oid, yaz_oid_attset_bib_1) == 0); c_oid = yaz_string_to_oid(db, CLASS_GENERAL, "Bib-1"); YAZ_CHECK(c_oid && oid_oidcmp(c_oid, yaz_oid_attset_bib_1) == 0); c_oid = yaz_string_to_oid(db, CLASS_ATTSET, "unknown"); YAZ_CHECK(c_oid == 0); oid = yaz_string_to_oid_nmem(db, CLASS_ATTSET, "1.2.840.10003.3.1", nmem); YAZ_CHECK(oid && !oid_oidcmp(oid, yaz_oid_attset_bib_1)); oid = yaz_string_to_oid_nmem(db, CLASS_ATTSET, "unknown", nmem); YAZ_CHECK(oid == 0); oid = yaz_string_to_oid_odr(db, CLASS_ATTSET, "1.2.840.10003.3.1", odr); YAZ_CHECK(oid && !oid_oidcmp(oid, yaz_oid_attset_bib_1)); oid = yaz_string_to_oid_odr(db, CLASS_ATTSET, "unknown", odr); YAZ_CHECK(oid == 0); n = yaz_oid_to_string(db, yaz_oid_attset_bib_1, 0); YAZ_CHECK(n && !strcmp(n, "Bib-1")); n = oid_name_to_dotstring(CLASS_ATTSET, "Bib-1", oid_buf); YAZ_CHECK(n && !strcmp(n, "1.2.840.10003.3.1")); n = oid_name_to_dotstring(CLASS_DIAGSET, "Bib-1", oid_buf); YAZ_CHECK(n && !strcmp(n, "1.2.840.10003.4.1")); n = oid_name_to_dotstring(CLASS_DIAGSET, "unknown", oid_buf); YAZ_CHECK(!n); n = oid_name_to_dotstring(CLASS_DIAGSET, "1.2.840.10003.3.1", oid_buf); YAZ_CHECK(!n); nmem_destroy(nmem); odr_destroy(odr); } int main (int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_icu.4.output0000664000175000017500000000005614152153071013553 000000000000001 1 'Andersen, H.C' '' 0+15 *Andersen, H.C.,* yaz-5.34.0/test/test_sortspec.c0000664000175000017500000001754714152153071013372 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include static int cql(const char *arg, const char *expected_result) { ODR odr = odr_createmem(ODR_ENCODE); Z_SortKeySpecList *sort_spec = yaz_sort_spec(odr, arg); int ret = 0; if (!sort_spec) { yaz_log(YLOG_WARN, "yaz_sort_spec : parse error: %s", arg); } else { WRBUF w = wrbuf_alloc(); int r = yaz_sort_spec_to_cql(sort_spec, w); if (!expected_result && r) ret = 1; else if (expected_result && r == 0) { if (strcmp(wrbuf_cstr(w), expected_result) == 0) ret = 1; else { yaz_log(YLOG_WARN, "sort: diff: %s", arg); yaz_log(YLOG_WARN, " expected %s", expected_result); yaz_log(YLOG_WARN, " got %s", wrbuf_cstr(w)); } } else if (r) { yaz_log(YLOG_WARN, "sort: diff %s", arg); yaz_log(YLOG_WARN, " expected %s", expected_result); yaz_log(YLOG_WARN, " got error %d", r); } else if (r == 0) { yaz_log(YLOG_WARN, "sort: diff %s", arg); yaz_log(YLOG_WARN, " expected error"); yaz_log(YLOG_WARN, " got %s", wrbuf_cstr(w)); } wrbuf_destroy(w); } odr_destroy(odr); return ret; } static int type7(const char *arg, const char *expected_result) { ODR odr = odr_createmem(ODR_ENCODE); Z_SortKeySpecList *sort_spec = yaz_sort_spec(odr, arg); int ret = 0; if (!sort_spec) { yaz_log(YLOG_WARN, "yaz_sort_spec : parse error: %s", arg); } else { WRBUF w = wrbuf_alloc(); int r; wrbuf_puts(w, "q"); r = yaz_sort_spec_to_type7(sort_spec, w); if (!expected_result && r) ret = 1; else if (expected_result && r == 0) { if (strcmp(wrbuf_cstr(w), expected_result) == 0) ret = 1; else { yaz_log(YLOG_WARN, "sort: diff: %s", arg); yaz_log(YLOG_WARN, " expected %s", expected_result); yaz_log(YLOG_WARN, " got %s", wrbuf_cstr(w)); } } else if (r) { yaz_log(YLOG_WARN, "sort: diff %s", arg); yaz_log(YLOG_WARN, " expected %s", expected_result); yaz_log(YLOG_WARN, " got error %d", r); } else if (r == 0) { yaz_log(YLOG_WARN, "sort: diff %s", arg); yaz_log(YLOG_WARN, " expected error"); yaz_log(YLOG_WARN, " got %s", wrbuf_cstr(w)); } wrbuf_destroy(w); } odr_destroy(odr); return ret; } static int strategy_sortkeys(const char *arg, const char *expected_result, int (*strategy) (Z_SortKeySpecList *, WRBUF)) { ODR odr = odr_createmem(ODR_ENCODE); Z_SortKeySpecList *sort_spec = yaz_sort_spec(odr, arg); int ret = 0; if (!sort_spec) { yaz_log(YLOG_WARN, "yaz_sort_spec : parse error: %s", arg); } else { WRBUF w = wrbuf_alloc(); int r = (strategy)(sort_spec, w); if (!expected_result && r) ret = 1; else if (expected_result && r == 0) { if (strcmp(wrbuf_cstr(w), expected_result) == 0) ret = 1; else { yaz_log(YLOG_WARN, "sort: diff: %s", arg); yaz_log(YLOG_WARN, " expected %s", expected_result); yaz_log(YLOG_WARN, " got %s", wrbuf_cstr(w)); } } else if (r) { yaz_log(YLOG_WARN, "sort: diff %s", arg); yaz_log(YLOG_WARN, " expected %s", expected_result); yaz_log(YLOG_WARN, " got error %d", r); } else if (r == 0) { yaz_log(YLOG_WARN, "sort: diff %s", arg); yaz_log(YLOG_WARN, " expected error"); yaz_log(YLOG_WARN, " got %s", wrbuf_cstr(w)); } wrbuf_destroy(w); } odr_destroy(odr); return ret; } static int srw_sortkeys(const char *arg, const char *expected_result) { return strategy_sortkeys(arg, expected_result, yaz_sort_spec_to_srw_sortkeys); } static int solr_sortkeys(const char *arg, const char *expected_result) { return strategy_sortkeys(arg, expected_result, yaz_sort_spec_to_solr_sortkeys); } static int check_sortkeys_to_sort_spec(const char *arg, const char *expected_result, int (*sort_strategy)(const char *, WRBUF)) { WRBUF w = wrbuf_alloc(); int ret = 0; int r = sort_strategy(arg, w); if (!expected_result && r) ret = 1; else if (expected_result && r == 0) { if (strcmp(wrbuf_cstr(w), expected_result) == 0) ret = 1; else { yaz_log(YLOG_WARN, "sort: diff: %s", arg); yaz_log(YLOG_WARN, " expected %s", expected_result); yaz_log(YLOG_WARN, " got %s", wrbuf_cstr(w)); } } else if (r) { yaz_log(YLOG_WARN, "sort: diff %s", arg); yaz_log(YLOG_WARN, " expected %s", expected_result); yaz_log(YLOG_WARN, " got error %d", r); } else if (r == 0) { yaz_log(YLOG_WARN, "sort: diff %s", arg); yaz_log(YLOG_WARN, " expected error"); yaz_log(YLOG_WARN, " got %s", wrbuf_cstr(w)); } wrbuf_destroy(w); return ret; } static int check_srw_sortkeys_to_sort_spec(const char *arg, const char *expected_result) { return check_sortkeys_to_sort_spec(arg, expected_result, yaz_srw_sortkeys_to_sort_spec); } static int check_solr_sortkeys_to_sort_spec(const char *arg, const char *expected_result) { return check_sortkeys_to_sort_spec(arg, expected_result, yaz_solr_sortkeys_to_sort_spec); } static void tst(void) { YAZ_CHECK(cql("title a", " SORTBY title/ascending/ignoreCase")); YAZ_CHECK(cql("title a date ds", " SORTBY title/ascending/ignoreCase" " date/descending/respectCase")); YAZ_CHECK(cql("1=4,2=3 a", 0)); YAZ_CHECK(cql("date a=1900", " SORTBY date/ascending/ignoreCase/missingValue=1900")); YAZ_CHECK(type7("title a", "@or q @attr 1=title @attr 7=1 0")); YAZ_CHECK(type7("title a date ds", "@or @or q @attr 1=title @attr 7=1 0" " @attr 1=date @attr 7=2 1")); YAZ_CHECK(type7("1=4,2=3 a", "@or q @attr 1=4 @attr 2=3 @attr 7=1 0")); YAZ_CHECK(type7("date a=1900", "@or q @attr 1=date @attr 7=1 0")); YAZ_CHECK(srw_sortkeys("title a", "title,,1,0,highValue")); YAZ_CHECK(srw_sortkeys("title a date ds", "title,,1,0,highValue " "date,,0,1,highValue")); YAZ_CHECK(srw_sortkeys("1=4,2=3 a", 0)); YAZ_CHECK(srw_sortkeys("date a=1900", "date,,1,0,1900")); YAZ_CHECK(check_srw_sortkeys_to_sort_spec( "date,,1,0,1900", "date ai=1900")); YAZ_CHECK(solr_sortkeys("title a", "title asc")); YAZ_CHECK(solr_sortkeys("title a date ds", "title asc" ",date desc")); YAZ_CHECK(solr_sortkeys("1=4,2=3 a", 0)); YAZ_CHECK(check_solr_sortkeys_to_sort_spec( "date asc", "date ai")); } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_icu.4.input0000664000175000017500000000001714152153071013347 00000000000000Andersen, H.C.,yaz-5.34.0/test/test_libstemmer.c0000664000175000017500000000360714336717440013675 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #if YAZ_HAVE_ICU #include int test_stemmer_stem(yaz_stemmer_p stemmer, const char* to_stem, const char *expected) { struct icu_buf_utf16 *src = icu_buf_utf16_create(0); struct icu_buf_utf16 *dst = icu_buf_utf16_create(0); struct icu_buf_utf8 *dst8 = icu_buf_utf8_create(0); int rc = 0; UErrorCode status; const char *result; icu_utf16_from_utf8_cstr(src, to_stem, &status); yaz_stemmer_stem(stemmer, dst, src, &status); if (status == U_ZERO_ERROR) { icu_utf16_to_utf8(dst8, dst, &status); result = icu_buf_utf8_to_cstr(dst8); rc = strcmp(result, expected) == 0; } icu_buf_utf8_destroy(dst8); icu_buf_utf16_destroy(src); icu_buf_utf16_destroy(dst); return rc; } static void tst(void) { UErrorCode status; yaz_stemmer_p stemmer = yaz_stemmer_create("en", "porter", &status); YAZ_CHECK(stemmer); /* fail */ YAZ_CHECK(test_stemmer_stem(stemmer, "beer", "water") == 0 ); /* Same */ YAZ_CHECK(test_stemmer_stem(stemmer, "adadwwr", "adadwwr")); /* Remove S */ YAZ_CHECK(test_stemmer_stem(stemmer, "beers", "beer")); YAZ_CHECK(test_stemmer_stem(stemmer, "persons", "person")); /* Remove s and ing */ YAZ_CHECK(test_stemmer_stem(stemmer, "runs", "run")); YAZ_CHECK(test_stemmer_stem(stemmer, "running", "run")); yaz_stemmer_destroy(stemmer); } #endif int main (int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); #if YAZ_HAVE_ICU tst(); #endif YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_zgdu.c0000664000175000017500000000355114152153071012467 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include static void tst_http_response(void) { /* response, content */ const char *http_buf = /*123456789012345678 */ "HTTP/1.1 200 OK\r\n" "Content-Length: 2\r\n" "\r\n" "12"; int r; Z_GDU *zgdu; ODR enc = odr_createmem(ODR_ENCODE); ODR dec = odr_createmem(ODR_DECODE); odr_setbuf(dec, (char *) http_buf, strlen(http_buf), 0); r = z_GDU(dec, &zgdu, 0, 0); YAZ_CHECK(r); if (r) { char *http_buf1; int http_len1; YAZ_CHECK_EQ(zgdu->which, Z_GDU_HTTP_Response); zgdu->u.HTTP_Response->content_len = 1; /* we now have Content-Length=2, but content_len=1 */ z_GDU(enc, &zgdu, 0, 0); http_buf1 = odr_getbuf(enc, &http_len1, 0); YAZ_CHECK(http_buf1); if (http_buf1) { const char *http_buf2 = /*123456789012345678 */ "HTTP/1.1 200 OK\r\n" "Content-Length: 1\r\n" /* content_len takes precedence */ "\r\n" "1"; YAZ_CHECK_EQ(http_len1, strlen(http_buf2)); YAZ_CHECK(http_len1 == strlen(http_buf2) && memcmp(http_buf1, http_buf2, http_len1) == 0); } } odr_destroy(enc); odr_destroy(dec); } int main (int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst_http_response(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_shared_ptr.c0000664000175000017500000000162114152153071013645 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ /** * \file test_shared_ptr.c * \brief test shared pointer */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include #include YAZ_SHPTR_TYPE(WRBUF) static void test(void) { WRBUF w = wrbuf_alloc(); WRBUF_shptr_t t = 0; YAZ_SHPTR_INIT(t, w); YAZ_CHECK(t); YAZ_SHPTR_INC(t); YAZ_CHECK(t); YAZ_SHPTR_DEC(t, wrbuf_destroy); YAZ_CHECK(t); YAZ_SHPTR_DEC(t, wrbuf_destroy); YAZ_CHECK(!t); } int main (int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); test(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_icu.1.output0000664000175000017500000000034614152153071013552 000000000000001 1 'børn' 'Børn' 0+5 *Børn* 2 2 'le' 'Le' 0+3 *Le *Carré 3 2 'carre' 'Carre' 3+6 Le *Carré* 4 3 'le' 'Le' 0+3 *Le *Carre 5 3 'carre' 'Carre' 3+5 Le *Carre* 6 4 'le' 'Le' 0+3 *Le *CarreÌ 7 4 'carre' 'Carre' 3+7 Le *CarreÌ* yaz-5.34.0/test/test_ccl.c0000664000175000017500000005323714152153071012265 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include static int tst_ccl_query(CCL_bibset bibset, const char *query, const char *result) { CCL_parser parser = ccl_parser_create(bibset); int ret = 0; if (parser && bibset) { struct ccl_rpn_node *rpn; rpn = ccl_parser_find_str(parser, query); if (rpn) { /* parse ok. check that result is there and match */ WRBUF wrbuf = wrbuf_alloc(); ccl_pquery(wrbuf, rpn); /* check expect a result and that it matches */ if (result && !strcmp(wrbuf_cstr(wrbuf), result)) ret = 1; else { yaz_log(YLOG_WARN, "%s: result does not match", query); yaz_log(YLOG_WARN, " expected %s", result); yaz_log(YLOG_WARN, " got %s", wrbuf_cstr(wrbuf)); ret = 0; } ccl_rpn_delete(rpn); wrbuf_destroy(wrbuf); } else { if (result) { yaz_log(YLOG_WARN, "%s: parse failed", query); ret = 0; } else ret = 1; } } ccl_parser_destroy (parser); return ret; } void tst1(int pass) { CCL_bibset bibset = ccl_qual_mk(); char tstline[128]; YAZ_CHECK(bibset); if (!bibset) return; if (pass == 1) { CCL_bibset nbibset = ccl_qual_dup(bibset); ccl_qual_rm(&bibset); bibset = nbibset; } switch(pass) { case 0: ccl_qual_fitem(bibset, "term dc.title", "comb"); ccl_qual_fitem(bibset, "u=4 s=pw t=l,r", "ti"); ccl_qual_fitem(bibset, "1=1016 s=al,pw t=r", "term"); ccl_qual_fitem(bibset, "t=x", "reg"); ccl_qual_fitem(bibset, "t=z", "z"); ccl_qual_fitem(bibset, "1=/my/title", "dc.title"); ccl_qual_fitem(bibset, "r=r,omiteq", "date"); ccl_qual_fitem(bibset, "r=o", "x"); ccl_qual_fitem(bibset, "dc.title", "title"); ccl_qual_fitem(bibset, "s=ag", "ag"); ccl_qual_fitem(bibset, "s=sl u=2", "splitlist"); ccl_qual_fitem(bibset, "s=sl u=2 u=3", "s2"); break; case 1: strcpy(tstline, "ti u=4 s=pw t=l,r"); ccl_qual_line(bibset, tstline); strcpy(tstline, "term 1=1016 s=al,pw t=r # default term"); ccl_qual_line(bibset, tstline); strcpy(tstline, "reg t=x"); ccl_qual_line(bibset, tstline); strcpy(tstline, "z t=z"); ccl_qual_line(bibset, tstline); strcpy(tstline, "dc.title 1=/my/title"); ccl_qual_line(bibset, tstline); strcpy(tstline, "date r=r,omiteq # ordered relation"); ccl_qual_line(bibset, tstline); strcpy(tstline, "x r=o # ordered relation"); ccl_qual_line(bibset, tstline); strcpy(tstline, "title dc.title # alias"); ccl_qual_line(bibset, tstline); strcpy(tstline, "comb term dc.title # combination"); ccl_qual_line(bibset, tstline); strcpy(tstline, "ag s=ag"); ccl_qual_line(bibset, tstline); strcpy(tstline, "splitlist s=sl u=2"); ccl_qual_line(bibset, tstline); strcpy(tstline, "s2 s=sl u=2 u=3"); ccl_qual_line(bibset, tstline); break; case 2: ccl_qual_buf(bibset, "ti u=4 s=pw t=l,r\n" "term 1=1016 s=al,pw t=r\r\n" "\n" "reg t=x\r\n" "z t=z\r\n" "dc.title 1=/my/title\n" "date r=r,omiteq\n" "x r=o\n" "title dc.title\n" "comb term dc.title\n" "ag s=ag\n" "splitlist s=sl u=2\n" "s2 s=sl u=2 u=3\n" ); break; case 3: #if YAZ_HAVE_XML2 if (1) { xmlDocPtr doc; int r; const char *addinfo = 0; const char *xml_str = "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n"; doc = xmlParseMemory(xml_str, strlen(xml_str)); YAZ_CHECK(doc); r = ccl_xml_config(bibset, xmlDocGetRootElement(doc), &addinfo); YAZ_CHECK_EQ(r, 0); xmlFreeDoc(doc); } break; #else return; #endif default: YAZ_CHECK(0); return; } YAZ_CHECK(tst_ccl_query(bibset, "x1", "@attr 4=2 @attr 1=1016 x1 ")); YAZ_CHECK(tst_ccl_query(bibset, "k\xc3\xb8" "benhavn", "@attr 4=2 @attr 1=1016 k\xc3\xb8" "benhavn ")); YAZ_CHECK(tst_ccl_query(bibset, "k\xf8" "benhavn", "@attr 4=2 @attr 1=1016 ""k\xf8" "benhavn ")); YAZ_CHECK(tst_ccl_query(bibset, "(((((x1)))))", "@attr 4=2 @attr 1=1016 x1 ")); YAZ_CHECK(tst_ccl_query(bibset, "x1 and x2", "@and " "@attr 4=2 @attr 1=1016 x1 " "@attr 4=2 @attr 1=1016 x2 ")); YAZ_CHECK(tst_ccl_query(bibset, "ti=x3", "@attr 4=2 @attr 1=4 x3 ")); YAZ_CHECK(tst_ccl_query(bibset, "dc.title=x4", "@attr 1=/my/title x4 ")); YAZ_CHECK(tst_ccl_query(bibset, "dc.title=(x4)", "@attr 1=/my/title x4 ")); YAZ_CHECK(tst_ccl_query(bibset, "x1 and", 0)); YAZ_CHECK(tst_ccl_query(bibset, "tix=x5", 0)); YAZ_CHECK(tst_ccl_query(bibset, "a%b", "@prox 0 1 0 2 k 2 " "@attr 4=2 @attr 1=1016 a " "@attr 4=2 @attr 1=1016 b ")); YAZ_CHECK(tst_ccl_query(bibset, "a%(b)", "@prox 0 1 0 2 k 2 " "@attr 4=2 @attr 1=1016 a " "@attr 4=2 @attr 1=1016 b ")); YAZ_CHECK(tst_ccl_query(bibset, "(a)%(b)", "@prox 0 1 0 2 k 2 " "@attr 4=2 @attr 1=1016 a " "@attr 4=2 @attr 1=1016 b ")); YAZ_CHECK(tst_ccl_query(bibset, "a%1b", "@prox 0 1 0 2 k 2 " "@attr 4=2 @attr 1=1016 a " "@attr 4=2 @attr 1=1016 b ")); YAZ_CHECK(tst_ccl_query(bibset, "a%2b", "@prox 0 2 0 2 k 2 " "@attr 4=2 @attr 1=1016 a " "@attr 4=2 @attr 1=1016 b ")); YAZ_CHECK(tst_ccl_query(bibset, "(a)%2(b)", "@prox 0 2 0 2 k 2 " "@attr 4=2 @attr 1=1016 a " "@attr 4=2 @attr 1=1016 b ")); YAZ_CHECK(tst_ccl_query(bibset, "a%19b", "@prox 0 19 0 2 k 2 " "@attr 4=2 @attr 1=1016 a " "@attr 4=2 @attr 1=1016 b ")); YAZ_CHECK(tst_ccl_query(bibset, "spid%\xe6serne", "@prox 0 1 0 2 k 2 " "@attr 4=2 @attr 1=1016 spid " "@attr 4=2 @attr 1=1016 \xe6serne ")); YAZ_CHECK(tst_ccl_query(bibset, "a!b", "@prox 0 1 1 2 k 2 " "@attr 4=2 @attr 1=1016 a " "@attr 4=2 @attr 1=1016 b ")); YAZ_CHECK(tst_ccl_query(bibset, "a!2b", "@prox 0 2 1 2 k 2 " "@attr 4=2 @attr 1=1016 a " "@attr 4=2 @attr 1=1016 b ")); YAZ_CHECK(tst_ccl_query(bibset, "a% (b or dc.title=c)", "@prox 0 1 0 2 k 2 " "@attr 4=2 @attr 1=1016 a " "@or @attr 4=2 @attr 1=1016 b " "@attr 4=2 @attr 1=/my/title c " )); YAZ_CHECK(tst_ccl_query(bibset, "(a b) % (c)", "@prox 0 1 0 2 k 2 @and " "@attr 4=2 @attr 1=1016 a @attr 4=2 @attr 1=1016 b " "@attr 4=2 @attr 1=1016 c " )); YAZ_CHECK(tst_ccl_query(bibset, "date=1980", "1980 ")); YAZ_CHECK(tst_ccl_query(bibset, "(date=1980)", "1980 ")); YAZ_CHECK(tst_ccl_query(bibset, "date>1980", "@attr 2=5 1980 ")); YAZ_CHECK(tst_ccl_query(bibset, "date>=1980", "@attr 2=4 1980 ")); YAZ_CHECK(tst_ccl_query(bibset, "date<1980", "@attr 2=1 1980 ")); YAZ_CHECK(tst_ccl_query(bibset, "date<=1980", "@attr 2=2 1980 ")); YAZ_CHECK(tst_ccl_query(bibset, "date=234-1990", "@and @attr 2=4 234 @attr 2=2 1990 ")); YAZ_CHECK(tst_ccl_query(bibset, "date=234- 1990", "@and @attr 2=4 234 @attr 2=2 1990 ")); YAZ_CHECK(tst_ccl_query(bibset, "date=234 -1990", "@and @attr 2=4 234 @attr 2=2 1990 ")); YAZ_CHECK(tst_ccl_query(bibset, "date=234 - 1990", "@and @attr 2=4 234 @attr 2=2 1990 ")); YAZ_CHECK(tst_ccl_query(bibset, "date=-1980", "@attr 2=2 1980 ")); YAZ_CHECK(tst_ccl_query(bibset, "date=- 1980", "@attr 2=2 1980 ")); YAZ_CHECK(tst_ccl_query(bibset, "x=-1980", "@attr 2=3 -1980 ")); YAZ_CHECK(tst_ccl_query(bibset, "x=- 1980", "@attr 2=2 1980 ")); YAZ_CHECK(tst_ccl_query(bibset, "x= -1980", "@attr 2=3 -1980 ")); YAZ_CHECK(tst_ccl_query(bibset, "x=234-1990", "@attr 2=3 234-1990 ")); YAZ_CHECK(tst_ccl_query(bibset, "x=234 - 1990", "@and @attr 2=4 234 @attr 2=2 1990 ")); YAZ_CHECK(tst_ccl_query(bibset, "ti=a,b", "@attr 4=1 @attr 1=4 a,b ")); YAZ_CHECK(tst_ccl_query(bibset, "ti=a, b", "@attr 4=1 @attr 1=4 \"a, b\" ")); YAZ_CHECK(tst_ccl_query(bibset, "ti=a-b", "@attr 4=2 @attr 1=4 a-b ")); YAZ_CHECK(tst_ccl_query(bibset, "ti=a - b", "@attr 4=1 @attr 1=4 \"a - b\" ")); YAZ_CHECK(tst_ccl_query(bibset, "a?", "@attr 5=1 @attr 4=2 @attr 1=1016 a ")); YAZ_CHECK(tst_ccl_query(bibset, "a b", "@and @attr 4=2 @attr 1=1016 a " "@attr 4=2 @attr 1=1016 b ")); YAZ_CHECK(tst_ccl_query(bibset, "a b?", "@and @attr 4=2 @attr 1=1016 a " "@attr 5=1 @attr 4=2 @attr 1=1016 b ")); YAZ_CHECK(tst_ccl_query(bibset, "title=a", "@attr 1=/my/title a ")); YAZ_CHECK(tst_ccl_query(bibset, "reg=a?b#\"c?\"", "@attr 5=102 a.*b.c\\\\? ")); YAZ_CHECK(tst_ccl_query(bibset, "z=a?b#\"c?\"", "@attr 5=104 a?b#c\\\\? ")); YAZ_CHECK(tst_ccl_query(bibset, "reg=\\(", "( ")); YAZ_CHECK(tst_ccl_query(bibset, "z=\\(", "( ")); YAZ_CHECK(tst_ccl_query(bibset, "z=a b#", "@attr 5=104 \"a b#\" ")); YAZ_CHECK(tst_ccl_query(bibset, "reg=\\\"", "\"\\\"\" ")); YAZ_CHECK(tst_ccl_query(bibset, "z=\\\"", "\"\\\"\" ")); YAZ_CHECK(tst_ccl_query(bibset, "reg=.", ". ")); YAZ_CHECK(tst_ccl_query(bibset, "z=.", ". ")); YAZ_CHECK(tst_ccl_query(bibset, "reg=\".\"", ". ")); YAZ_CHECK(tst_ccl_query(bibset, "z=\".\"", ". ")); YAZ_CHECK(tst_ccl_query(bibset, "reg=?\\?", "@attr 5=102 .*\\\\? ")); YAZ_CHECK(tst_ccl_query(bibset, "z=?\\?", "@attr 5=104 ?\\\\? ")); YAZ_CHECK(tst_ccl_query(bibset, "reg=\"?\\?\"", "?? ")); YAZ_CHECK(tst_ccl_query(bibset, "z=\"?\\?\"", "?? ")); YAZ_CHECK(tst_ccl_query(bibset, "reg=\\\\", "\\\\ ")); YAZ_CHECK(tst_ccl_query(bibset, "z=\\\\", "\\\\ ")); YAZ_CHECK(tst_ccl_query(bibset, "\\\\", "@attr 4=2 @attr 1=1016 \\\\ ")); YAZ_CHECK(tst_ccl_query(bibset, "comb=a", "@or @attr 4=2 @attr 1=1016 a " "@attr 1=/my/title a ")); YAZ_CHECK(tst_ccl_query(bibset, "a? b?", "@and @attr 5=1 @attr 4=2 @attr 1=1016 a " "@attr 5=1 @attr 4=2 @attr 1=1016 b ")); YAZ_CHECK(tst_ccl_query(bibset, "\"a\"? \"b?\"", "@and @attr 5=1 @attr 4=2 @attr 1=1016 a " "@attr 4=2 @attr 1=1016 b? ")); YAZ_CHECK(tst_ccl_query(bibset, "@and", "@attr 4=2 @attr 1=1016 \\@and ")); YAZ_CHECK(tst_ccl_query(bibset, "a@and", "@attr 4=2 @attr 1=1016 a@and ")); YAZ_CHECK(tst_ccl_query(bibset, "}", "@attr 4=2 @attr 1=1016 } ")); YAZ_CHECK(tst_ccl_query(bibset, "{", "@attr 4=2 @attr 1=1016 \"{\" ")); YAZ_CHECK(tst_ccl_query(bibset, "\"a b c\"", "@attr 4=1 @attr 1=1016 \"a b c\" ")); YAZ_CHECK(tst_ccl_query(bibset, "\"a b c \"", "@attr 4=1 @attr 1=1016 \"a b c \" ")); YAZ_CHECK(tst_ccl_query(bibset, "ag=a", "@attr 4=2 a ")); YAZ_CHECK(tst_ccl_query(bibset, "ag=a b", "@attr 4=2 \"a b\" ")); YAZ_CHECK(tst_ccl_query(bibset, "ag=a b \"c d\"", "@and @attr 4=2 \"a b\" @attr 4=1 \"c d\" ")); YAZ_CHECK(tst_ccl_query(bibset, "ag=a b \"c\"", "@attr 4=2 \"a b c\" ")); YAZ_CHECK(tst_ccl_query(bibset, "ag=a b \"\"", "@attr 4=2 \"a b \" ")); YAZ_CHECK(tst_ccl_query(bibset, "ag=a \"b c\" d", "@and @and " "@attr 4=2 a @attr 4=1 \"b c\" @attr 4=2 d ")); YAZ_CHECK(tst_ccl_query(bibset, "ag=\"a b c\"", "@attr 4=1 \"a b c\" ")); YAZ_CHECK(tst_ccl_query(bibset, "ag=\"a b c\" \"d e\"", "@and @attr 4=1 \"a b c\" @attr 4=1 \"d e\" ")); YAZ_CHECK(tst_ccl_query(bibset, "splitlist=a", "@attr 1=2 a ")); YAZ_CHECK(tst_ccl_query(bibset, "splitlist=a b", "@or " "@and @attr 1=2 a @attr 1=2 b @attr 1=2 \"a b\" ")); YAZ_CHECK(tst_ccl_query(bibset, "splitlist=a b c", "@or @or " "@and " "@attr 1=2 a " "@or @and @attr 1=2 b @attr 1=2 c " "@attr 1=2 \"b c\" " "@and @attr 1=2 \"a b\" @attr 1=2 c " "@attr 1=2 \"a b c\" ")); YAZ_CHECK(tst_ccl_query(bibset, "splitlist=a?", 0)); YAZ_CHECK(tst_ccl_query(bibset, "splitlist=a b?", 0)); YAZ_CHECK(tst_ccl_query(bibset, "splitlist=a b c?", 0)); YAZ_CHECK(tst_ccl_query(bibset, "splitlist=a b c d?", 0)); YAZ_CHECK(tst_ccl_query(bibset, "s2=a", "@or @attr 1=2 a @attr 1=3 a ")); YAZ_CHECK(tst_ccl_query(bibset, "s2=a b", "@or " "@and " "@or @attr 1=2 a @attr 1=3 a " "@or @attr 1=2 b @attr 1=3 b " "@or @attr 1=2 \"a b\" @attr 1=3 \"a b\" ")); YAZ_CHECK(tst_ccl_query(bibset, "s2=a? b", 0)); YAZ_CHECK(tst_ccl_query(bibset, "s2=a b?", 0)); YAZ_CHECK(tst_ccl_query(bibset, "s2=a b? c", 0)); YAZ_CHECK(tst_ccl_query(bibset, "z=(ti=b)", "@attr 4=2 @attr 1=4 b ")); YAZ_CHECK(tst_ccl_query(bibset, "z=(ti=b?)", "@attr 5=1 @attr 4=2 @attr 1=4 b ")); YAZ_CHECK(tst_ccl_query(bibset, "z=(a? and ti=b? and c?)", "@and @and " "@attr 5=104 a? " "@attr 5=1 @attr 4=2 @attr 1=4 b " "@attr 5=104 c? ")); ccl_qual_rm(&bibset); } void tst2(void) { CCL_bibset bibset = ccl_qual_mk(); YAZ_CHECK(bibset); if (!bibset) return; ccl_qual_fitem(bibset, "u=4 s=pw t=l,r", "ti"); ccl_qual_fitem(bibset, "1=1016 s=al,pw t=z", "term"); YAZ_CHECK(tst_ccl_query(bibset, "a?#", "@attr 5=104 @attr 4=2 @attr 1=1016 a?# ")); YAZ_CHECK(tst_ccl_query(bibset, "a b?#", "@and @attr 4=2 @attr 1=1016 a @attr 5=104 @attr 4=2 @attr 1=1016 b?# ")); YAZ_CHECK(tst_ccl_query(bibset, "a*", "@attr 4=2 @attr 1=1016 a* ")); YAZ_CHECK(tst_ccl_query(bibset, "a?", "@attr 5=104 @attr 4=2 @attr 1=1016 a? ")); ccl_qual_fitem(bibset, "*", "@truncation"); YAZ_CHECK(tst_ccl_query(bibset, "a*", "@attr 5=104 @attr 4=2 @attr 1=1016 a? ")); YAZ_CHECK(tst_ccl_query(bibset, "a?", "@attr 4=2 @attr 1=1016 a? ")); ccl_qual_fitem(bibset, "?", "@mask"); YAZ_CHECK(tst_ccl_query(bibset, "a?", "@attr 5=104 @attr 4=2 @attr 1=1016 a# ")); ccl_qual_fitem(bibset, "", "@mask"); ccl_qual_fitem(bibset, "", "@truncation"); YAZ_CHECK(tst_ccl_query(bibset, "a?#", "@attr 4=2 @attr 1=1016 a?# ")); ccl_qual_fitem(bibset, "og", "@and"); ccl_qual_fitem(bibset, "eller", "@or"); ccl_qual_fitem(bibset, "ikke", "@not"); YAZ_CHECK(tst_ccl_query(bibset, "a og b eller c ikke d", "@not @or @and @attr 4=2 @attr 1=1016 a " "@attr 4=2 @attr 1=1016 b " "@attr 4=2 @attr 1=1016 c " "@attr 4=2 @attr 1=1016 d ")); ccl_qual_rm(&bibset); } void tst3(void) { CCL_bibset b = ccl_qual_mk(); YAZ_CHECK(b); if (!b) return; ccl_qual_fitem(b, "2=102", "rk"); ccl_qual_fitem(b, "1=9903 r=r", "lex"); ccl_qual_fitem(b, "4=109 r=o", "st-numeric"); YAZ_CHECK(tst_ccl_query(b, "rk=(lex=9)", "@attr 2=3 @attr 1=9903 9 ")); YAZ_CHECK(tst_ccl_query(b, "rk=(lex>9)", "@attr 2=5 @attr 1=9903 9 ")); YAZ_CHECK(tst_ccl_query(b, "rk=(lex,st-numeric=300-600)", "@and " "@attr 2=4 @attr 4=109 @attr 1=9903 300 " "@attr 2=2 @attr 4=109 @attr 1=9903 600 ")); YAZ_CHECK(tst_ccl_query(b, "rk=(lex=9) and b", "@and @attr 2=3 @attr 1=9903 9 b ")); YAZ_CHECK(tst_ccl_query(b, "rk=(lex=9 and b)", "@and @attr 2=3 @attr 1=9903 9 @attr 2=102 b ")); ccl_qual_rm(&b); } void tst_addinfo(void) { const char *addinfo; int r; CCL_bibset bibset = ccl_qual_mk(); r = ccl_qual_fitem2(bibset, "u=4 s=pw t=l,r", "ti", &addinfo); YAZ_CHECK(r == 0 && addinfo == 0); r = ccl_qual_fitem2(bibset, "1=1016 s=al,pw t=z", "term", &addinfo); YAZ_CHECK(r == 0 && addinfo == 0); r = ccl_qual_fitem2(bibset, "x=", "term", &addinfo); YAZ_CHECK(r != 0 && addinfo != 0); r = ccl_qual_fitem2(bibset, "12=3", "term", &addinfo); YAZ_CHECK(r == 0 && addinfo == 0); r = ccl_qual_fitem2(bibset, "ab=3", "term", &addinfo); YAZ_CHECK(r != 0 && addinfo != 0); r = ccl_qual_fitem2(bibset, "x=ab", "term", &addinfo); YAZ_CHECK(r != 0 && addinfo != 0); r = ccl_qual_fitem2(bibset, "s=ab", "term", &addinfo); YAZ_CHECK(r == 0 && addinfo == 0); ccl_qual_rm(&bibset); } int main(int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst1(0); tst1(1); tst1(2); tst1(3); tst2(); tst3(); tst_addinfo(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_rpn2solr.c0000664000175000017500000001762014152153071013301 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include static int compare(solr_transform_t ct, const char *pqf, const char *solr) { int ret = 0; ODR odr = odr_createmem(ODR_ENCODE); WRBUF w = wrbuf_alloc(); Z_RPNQuery *q = p_query_rpn(odr, pqf); if (q) { int r = solr_transform_rpn2solr_wrbuf(ct, w, q); if (r != 0) { /* transform error */ yaz_log(YLOG_LOG, "%s -> Error %d", pqf, r); if (!solr) /* also expected error? */ ret = 1; } else if (r == 0) { yaz_log(YLOG_LOG, "%s -> %s", pqf, wrbuf_cstr(w)); if (solr && !strcmp(wrbuf_cstr(w), solr)) ret = 1; else { yaz_log(YLOG_WARN, " expected: %s", solr ? solr : "null"); yaz_log(YLOG_WARN, " got: %s", wrbuf_cstr(w)); } } } wrbuf_destroy(w); odr_destroy(odr); return ret; } static void tst1(void) { solr_transform_t ct = solr_transform_create(); YAZ_CHECK(compare(ct, "@or a @and b c", "a OR (b AND c)")); YAZ_CHECK(compare(ct, "abc", "abc")); YAZ_CHECK(compare(ct, "\"a b c\"", "\"a b c\"")); YAZ_CHECK(compare(ct, "\"\"", "\"\"")); YAZ_CHECK(compare(ct, "@not a b", "a AND NOT b")); YAZ_CHECK(compare(ct, "@and @or a b c", "(a OR b) AND c")); YAZ_CHECK(compare(ct, "@and a b", "a AND b")); YAZ_CHECK(compare(ct, "@or a b", "a OR b")); YAZ_CHECK(compare(ct, "@or a @and b c", "a OR (b AND c)")); YAZ_CHECK(compare(ct, "@or @and a b @and c d", "(a AND b) OR (c AND d)")); YAZ_CHECK(compare(ct, "@or @or a b @or c d", "(a OR b) OR (c OR d)")); YAZ_CHECK(compare(ct, "@or @or @or a b @or c d @or e f", "((a OR b) OR (c OR d)) OR (e OR f)")); YAZ_CHECK(compare(ct, "@and @and a b @and c d", "(a AND b) AND (c AND d)")); YAZ_CHECK(compare(ct, "@attr 1=field abc", "field:abc")); YAZ_CHECK(compare(ct, "@attr 1=field \"a b c\"", "field:\"a b c\"")); YAZ_CHECK(compare(ct, "@attr 1=4 abc", 0)); /* should fail */ solr_transform_define_pattern(ct, "index.title", "1=4"); YAZ_CHECK(compare(ct, "@attr 1=4 abc", "title:abc")); solr_transform_define_pattern(ct, "index.foo", "1=bar"); YAZ_CHECK(compare(ct, "@attr 1=bar abc", "foo:abc")); /* Truncation */ YAZ_CHECK(compare(ct, "@attr 5=1 water", "water*")); YAZ_CHECK(compare(ct, "@attr 5=2 water", "*water")); YAZ_CHECK(compare(ct, "@attr 5=3 water", "*water*")); YAZ_CHECK(compare(ct, "@attr 5=100 water", "water")); YAZ_CHECK(compare(ct, "@attr 5=101 water", 0)); YAZ_CHECK(compare(ct, "@attr 5=104 w#ter", "w?ter")); YAZ_CHECK(compare(ct, "@attr 5=104 w#t?r", "w?t*r")); YAZ_CHECK(compare(ct, "@attr 5=104 w#te?", "w?te*")); YAZ_CHECK(compare(ct, "@attr 5=104 w\\#te?", "w?te*")); /* PQF eats # */ YAZ_CHECK(compare(ct, "@attr 5=104 w\\\\#te?", "w#te*")); /* reserved characters */ YAZ_CHECK(compare(ct, "@attr 5=104 \\\"\\\\\\\\", "\\\"" "\\\\")); YAZ_CHECK(compare(ct, "@attr 5=104 \\\"\\\\\\\\\\\"", "\\\"" "\\\\" "\\\"")); YAZ_CHECK(compare(ct, "@attr 5=104 \\\"\\\\", "\\\"\\\\")); YAZ_CHECK(compare(ct, "@attr 5=104 \\{:\\}", "\\{\\:\\}")); YAZ_CHECK(compare(ct, "@attr 5=104 \\\"\\\\\\\\\\\"", "\\\"" "\\\\" "\\\"")); YAZ_CHECK(compare(ct, "@attr 1=date @attr 2=1 1980", "date:[* TO 1980}")); YAZ_CHECK(compare(ct, "@attr 1=date @attr 2=2 1980", "date:[* TO 1980]")); YAZ_CHECK(compare(ct, "@attr 1=date @attr 2=3 1980", "date:1980")); YAZ_CHECK(compare(ct, "@attr 1=date @attr 2=4 1980", "date:[1980 TO *]")); YAZ_CHECK(compare(ct, "@attr 1=date @attr 2=5 1980", "date:{1980 TO *]")); YAZ_CHECK(compare(ct, "@and @attr 1=date @attr 2=2 234 @attr 1=date @attr 2=4 1990", "date:[1990 TO 234]")); YAZ_CHECK(compare(ct, "@and @attr 1=date @attr 2=2 345 @attr 1=date @attr 2=4 234", "date:[234 TO 345]")); YAZ_CHECK(compare(ct, "@and @attr 1=date @attr 2=5 234 @attr 1=titl @attr 2=2 1990", "date:{234 TO *] AND titl:[* TO 1990]")); YAZ_CHECK(compare(ct, "@and @attr 1=date @attr 2=5 234 @attr 1=date @attr 2=2 1990", "date:{234 TO 1990]")); YAZ_CHECK(compare(ct, "@and @attr 1=date @attr 2=4 234 @attr 1=date @attr 2=2 1990", "date:[234 TO 1990]")); YAZ_CHECK(compare(ct, "@and @attr 1=date @attr 2=5 234 @attr 1=date @attr 2=1 1990", "date:{234 TO 1990}")); YAZ_CHECK(compare(ct, "@and @attr 1=date @attr 2=4 234 @attr 1=date @attr 2=2 1990", "date:[234 TO 1990]")); YAZ_CHECK(compare(ct, "@or @attr 1=date @attr 2=4 234 @attr 1=date @attr 2=2 1990", "date:[234 TO *] OR date:[* TO 1990]")); YAZ_CHECK(compare(ct, "@or @attr 1=date @attr 2=2 234 @attr 1=date @attr 2=4 1990", "date:[* TO 234] OR date:[1990 TO *]")); YAZ_CHECK(compare(ct, "@attr 1=date @attr 2=1 1980", "date:[* TO 1980}")); YAZ_CHECK(compare(ct, "@attr 1=date @attr 2=2 1980", "date:[* TO 1980]")); YAZ_CHECK(compare(ct, "@and @attr 1=date @attr 2=2 234 @attr 1=date @attr 2=4 1990", "date:[1990 TO 234]")); solr_transform_close(ct); } static void tst2(void) { WRBUF w = wrbuf_alloc(); solr_transform_t ct = 0; const char *srcdir = getenv("srcdir"); if (srcdir) { wrbuf_puts(w, srcdir); wrbuf_puts(w, "/"); } wrbuf_puts(w, "../etc/pqf.properties"); ct = solr_transform_open_fname(wrbuf_cstr(w)); YAZ_CHECK(compare(ct, "@attr 1=4 abc", "dc.title:abc")); #if 0 YAZ_CHECK(compare(ct, "@attr 1=4 @attr 4=108 abc", "dc.title:abc")); #endif YAZ_CHECK(compare(ct, "@attr 1=4 @attr 3=1 @attr 6=1 abc", "dc.title:abc")); YAZ_CHECK(compare(ct, "@attr 1=4 @attr 4=1 @attr 6=1 abc", "dc.title:abc")); YAZ_CHECK(compare(ct, "@attr 1=1016 abc", "abc")); /* Date check */ YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=1 1980", "dc.date:[* TO 1980}")); YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=2 1980", "dc.date:[* TO 1980]")); YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=3 1980", "dc.date:1980")); YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=4 1980", "dc.date:[1980 TO *]")); YAZ_CHECK(compare(ct, "@attr 1=30 @attr 2=5 1980", "dc.date:{1980 TO *]")); YAZ_CHECK(compare(ct, "@and @attr 1=30 @attr 2=2 234 @attr 1=30 @attr 2=4 1990", "dc.date:[1990 TO 234]")); YAZ_CHECK(compare(ct, "@and @attr 1=30 @attr 2=2 345 @attr 1=30 @attr 2=4 234", "dc.date:[234 TO 345]")); YAZ_CHECK(compare(ct, "@and @attr 1=30 @attr 2=5 234 @attr 1=4 @attr 2=2 1990", "dc.date:{234 TO *] AND dc.title:[* TO 1990]")); YAZ_CHECK(compare(ct, "@and @attr 1=30 @attr 2=5 234 @attr 1=30 @attr 2=2 1990", "dc.date:{234 TO 1990]")); YAZ_CHECK(compare(ct, "@and @attr 1=30 @attr 2=4 234 @attr 1=30 @attr 2=2 1990", "dc.date:[234 TO 1990]")); YAZ_CHECK(compare(ct, "@and @attr 1=30 @attr 2=5 234 @attr 1=30 @attr 2=1 1990", "dc.date:{234 TO 1990}")); YAZ_CHECK(compare(ct, "@and @attr 1=30 @attr 2=4 234 @attr 1=30 @attr 2=2 1990", "dc.date:[234 TO 1990]")); YAZ_CHECK(compare(ct, "@or @attr 1=30 @attr 2=4 234 @attr 1=30 @attr 2=2 1990", "dc.date:[234 TO *] OR dc.date:[* TO 1990]")); YAZ_CHECK(compare(ct, "@or @attr 1=30 @attr 2=2 234 @attr 1=30 @attr 2=4 1990", "dc.date:[* TO 234] OR dc.date:[1990 TO *]")); #if 0 YAZ_CHECK(compare(ct, "@attr 2=103 @attr 1=_ALLRECORDS 1", "solr.allRecords=1")); #endif YAZ_CHECK(compare(ct, "@attr 1=500 abc", 0)); solr_transform_close(ct); wrbuf_destroy(w); } int main (int argc, char **argv) { YAZ_CHECK_INIT(argc, argv); YAZ_CHECK_LOG(); tst1(); tst2(); YAZ_CHECK_TERM; } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */ yaz-5.34.0/test/test_log_thread.c0000664000175000017500000000304214152153071013621 00000000000000/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ #if HAVE_CONFIG_H #include #endif #include #include #include #include #if YAZ_POSIX_THREADS #include static void *t_loop2(void *vp) { int i, sz = 10; for (i = 0; i #endif #include #include #include #include #include #include #include #include #if YAZ_HAVE_XML2 #include #include #if YAZ_HAVE_XSLT #include #endif yaz_record_conv_t conv_configure(const char *xmlstring, WRBUF w) { xmlDocPtr doc = xmlParseMemory(xmlstring, strlen(xmlstring)); if (!doc) { wrbuf_printf(w, "xmlParseMemory"); return 0; } else { xmlNodePtr ptr = xmlDocGetRootElement(doc); yaz_record_conv_t p = yaz_record_conv_create(); if (p) { const char *srcdir = getenv("srcdir"); if (srcdir) yaz_record_conv_set_path(p, srcdir); } if (!ptr) { wrbuf_printf(w, "xmlDocGetRootElement"); yaz_record_conv_destroy(p); p = 0; } else if (!p) { wrbuf_printf(w, "yaz_record_conv_create"); } else { int r = yaz_record_conv_configure(p, ptr); if (r) { wrbuf_puts(w, yaz_record_conv_get_error(p)); yaz_record_conv_destroy(p); p = 0; } } xmlFreeDoc(doc); return p; } } int conv_configure_test(const char *xmlstring, const char *expect_error, yaz_record_conv_t *pt) { WRBUF w = wrbuf_alloc(); int ret; yaz_record_conv_t p = conv_configure(xmlstring, w); if (!p) { if (expect_error && !strcmp(wrbuf_cstr(w), expect_error)) ret = 1; else { ret = 0; printf("%s\n", wrbuf_cstr(w)); } } else { if (expect_error) ret = 0; else ret = 1; } if (pt) *pt = p; else if (p) yaz_record_conv_destroy(p); wrbuf_destroy(w); return ret; } static void tst_configure(void) { YAZ_CHECK(conv_configure_test("" "", "Element : " "unsupported element ", 0)); #if YAZ_HAVE_XSLT YAZ_CHECK(conv_configure_test("" "" "" "", "Element : attribute 'inputformat' " "required", 0)); YAZ_CHECK(conv_configure_test("" "" "", "Element : attribute 'stylesheet' " "expected", 0)); #endif YAZ_CHECK(conv_configure_test("" "" "" "", #if YAZ_HAVE_XSLT 0 #else "Element : unsupported element " #endif , 0)); } static int conv_convert_test(yaz_record_conv_t p, const char *input_record, const char *output_expect_record) { int ret = 0; if (!p) { YAZ_CHECK(ret); } else { WRBUF output_record = wrbuf_alloc(); int r = yaz_record_conv_record(p, input_record, strlen(input_record), output_record); if (r) { if (output_expect_record) { printf("yaz_record_conv error=%s\n", yaz_record_conv_get_error(p)); ret = 0; } else ret = 1; } else { if (!output_expect_record) { ret = 0; } else if (strcmp(output_expect_record, wrbuf_cstr(output_record))) { ret = 0; printf("got-output_record len=%ld: %s\n", (long) wrbuf_len(output_record), wrbuf_cstr(output_record)); printf("output_expect_record len=%ld %s\n", (long) strlen(output_expect_record), output_expect_record); } else { ret = 1; } } wrbuf_destroy(output_record); } return ret; } static int conv_convert_test_iter(yaz_record_conv_t p, const char *input_record, const char *output_expect_record, int num_iter) { int i; int ret; for (i = 0; i < num_iter; i++) { ret = conv_convert_test(p, input_record, output_expect_record); if (!ret) break; } return ret; } static void tst_convert1(void) { yaz_record_conv_t p = 0; const char *marcxml_rec = "\n" " 00080nam a22000498a 4500\n" " 11224466 \n" " \n" " 11224466 \n" " \n" "\n"; const char *tmarcxml_rec = "\n" " 00080nam a22000498a 4500\n" " 11224466 \n" " \n" " 11224466 \n" " \n" "\n"; const char *iso2709_rec = "\x30\x30\x30\x38\x30\x6E\x61\x6D\x20\x61\x32\x32\x30\x30\x30\x34" "\x39\x38\x61\x20\x34\x35\x30\x30\x30\x30\x31\x30\x30\x31\x33\x30" "\x30\x30\x30\x30\x30\x31\x30\x30\x30\x31\x37\x30\x30\x30\x31\x33" "\x1E\x20\x20\x20\x31\x31\x32\x32\x34\x34\x36\x36\x20\x1E\x20\x20" "\x1F\x61\x20\x20\x20\x31\x31\x32\x32\x34\x34\x36\x36\x20\x1E\x1D"; const char *solrmarc_rec = "\x30\x30\x30\x38\x30\x6E\x61\x6D\x20\x61\x32\x32\x30\x30\x30\x34" "\x39\x38\x61\x20\x34\x35\x30\x30\x30\x30\x31\x30\x30\x31\x33\x30" "\x30\x30\x30\x30\x30\x31\x30\x30\x30\x31\x37\x30\x30\x30\x31\x33" "#30;\x20\x20\x20\x31\x31\x32\x32\x34\x34\x36\x36\x20#30;\x20\x20" "#31;\x61\x20\x20\x20\x31\x31\x32\x32\x34\x34\x36\x36\x20#30;#29;"; const char *raw_rec = /* raw is xml-string of marcxml_rec */ "<record xmlns=\"http://www.loc.gov/MARC21/slim\">\n" " <leader>00080nam a22000498a 4500</leader>\n" " <controlfield tag=\"001\"> 11224466 </controlfield>\n" " <datafield tag=\"010\" ind1=\" \" ind2=\" \">\n" " <subfield code=\"a\"> 11224466 </subfield>\n" " </datafield>\n" "</record>\n\n"; YAZ_CHECK(conv_configure_test("" "" "", 0, &p)); YAZ_CHECK(conv_convert_test(p, marcxml_rec, iso2709_rec)); YAZ_CHECK(conv_convert_test(p, tmarcxml_rec, iso2709_rec)); yaz_record_conv_destroy(p); YAZ_CHECK(conv_configure_test("" "" "", 0, &p)); YAZ_CHECK(conv_convert_test(p, iso2709_rec, marcxml_rec)); yaz_record_conv_destroy(p); YAZ_CHECK(conv_configure_test("" "" "" "", 0, &p)); YAZ_CHECK(conv_convert_test(p, solrmarc_rec, marcxml_rec)); yaz_record_conv_destroy(p); YAZ_CHECK(conv_configure_test("" "" "" "" "" "", 0, &p)); YAZ_CHECK(conv_convert_test(p, marcxml_rec, marcxml_rec)); yaz_record_conv_destroy(p); YAZ_CHECK(conv_configure_test("" "" "" "" "" "", 0, &p)); YAZ_CHECK(conv_convert_test(p, marcxml_rec, marcxml_rec)); yaz_record_conv_destroy(p); YAZ_CHECK(conv_configure_test("" ") Document record render parameters for ZOOM - including base64 --- 5.7.3 2015/01/06 Fix application/x-www-form-urlencoded + empty YAZ-810 A SEGV occurred if Content-Type was "application/x-www-form-urlencoded" and empty content was supplied. Fix yaz-iconv man page for typos and incorrect example. YAZ-809 Fail hard if Bison is not found and is needed YAZ-808 --- 5.7.2 2014/12/16 Enable YAZ backtrace for programs YAZ-802 Update NMAKE makefile to use Visual Studio 2013 along with ICU 54.1, Libxml2 2.9.2, Libxslt 1.1.28. Fix daemon: parent process stops before child YAZ-806 Try to fix the situation where parent process stops before child has acknowledged it .. SIGUSR2 back! daemon: log message when keepalive stops. --- 5.7.1 2014/12/03 Fix yaz-marcdump segfault YAZ-801. Problem in YAZ 5.6.0/5.7.0 and would make yaz-marcdump crash when from-character set was issued. --- 5.7.0 2014/11/24 Dump backtrace in case of SIGABRT, SIGSEGV YAZ-787 New function yaz_enable_panic_backtrace which enables backtrace handler for current process. The handler will call backtrace always, then gdb to provide as much detail as possible. --- 5.6.0 2014/11/17 When marc-8 charset is specified when decoding MARC records, yaz-marcdump and ZOOM record render will inspect leader 9 and switch to UTF-8 (Unicode) if that holds 'a'. This changes behavior, but is considered safe because only MARC21 with leader 9='a' are Unicode. YAZ-800 Fix cs_put may reconnect if send fails. YAZ-798 --- 5.5.1 2014/11/03 Fix cannot build YAZ on jessie : libgnutls-dev is gone YAZ-797 --- 5.5.0 2014/10/27 Extended comstack with outgoing IP YAZ-795. For cs_create_host + cs_create_host_proxy the vhost may be followed by a outgoing host/IP. Separator is blank. --- 5.4.4 2014/10/20 Add YAZ_EXPORT to cql_transform_r fixes YAZ-793 . This issue fixes linker error with yazpp on Windows. --- 5.4.3 2014/10/08 Fix uri array may overflow in yaz_solr_encode_request YAZ-775 Fix PQF to Solr conversion may produce invalid Solr query YAZ-792 0 ptr reference in handling Solr response with error YAZ-791 Fix annoying warning about wrbuf_putc on newer GCC YAZ-789 Fix documentation about --installa option YAZ-788 --- 5.4.2 2014/08/26 daemon: properly report when receiving SIGUSR2 from child YAZ-785 --- 5.4.1 2014/08/21 xmalloc: throw assert for clearly invalid calls to malloc and improve diagnostics YAZ-783 YAZ-784 --- 5.4.0 2014/08/19 Stop building debs for Ubuntu raring, quantal, oneiric. CCL YAZ-781: for multiple use attributes in a specification the generated RPN will perform @or on each term. For spec: term u=31 u=1016 the CCL: t will generate: @or @attr 1=31 t @attr 1=1016 t log YAZ-780: avoid mixed log files by perform only one write(2) per log entry. CCL YAZ-779: combo qualifier should allow for forward references Fix buildconf.sh, automake too old on centos5 YAZ-778 Achieved by adding AM_PROG_CC_C_O and requiring AM 1.9 instead. The AM_PROG_CC_C_O is obsolete for newer AM, but 1.14 (Debian jessie) accepts it without a warning. --- 5.3.0 2014/07/11 GFS: client_query_charset conversion YAZ-777 This is a feature for Z39.50 clients that sends queries that are not UTF-8 encoded. WIth client_query_charset, GFS will convert from the encoding given to UTF-8. Echoed SRU arguments support YAZ-776 This is achieved with new function yaz_srw_get_pdu_e. ZOOM: expire times set for redis/memcached YAZ-772 For both redis and memcached option --expire=seconds sets expire time for a result-set/search. Default time is 600 seconds (10 minutes). --- 5.2.1 2014/06/26 No [rest of output is omitted] limit for yaz_log YAZ-774 Optimize icu_iter_get_org_info. Reduce calls to u_strToUTF8. For ICU testing, pass -o to yaz-icu. This will test the icu_iter_get_org_info function. Fix null ptr reference for freeReplyObject YAZ-773 --- 5.2.0 2014/06/12 Allow ZOOM caching using redis. New ZOOM option "redis" controls it. RPM: do not build with libmemcached support. The libmemcached library on CentOS 5/6 does not work reliably for us (redis to the rescue). configure: only allow libmemcached version 0.40 or later. That's the version on Debian squeeze. We recommend libmemcached version 1.0 or later. If that's not an option, consider redis. --- 5.1.3 2014/06/04 Fix dup ZOOM_EVENT_RECV_RECORD events for SRU/Solr YAZ-768 Fix zoom+memcached: present request out of range YAZ-767 --- 5.1.2 2014/05/30 CCL: add new qualifier r=omiteq which will omit relation=equals for ordered relations. This should be used in combination with either r=r or r=o. YAZ-766 GFS: prevent truncation/overflow in retrieval phase. YAZ-763 Solr: simplify yaz_solr_decode_response Solr: use different local var for string manipulation Solr: Get rid of hardcoded limit of extra_args Solr: encode lucene query type YAZ-736 Make sure the queries are treated as traditional "lucene", because that's what YAZ generates. Fix ZOOM HTTP redirect failing on Windows+Solaris YAZ-755 --- 5.1.1 2014/04/22 Build packages for Ubuntu Trusty Tahr 14.04 LTS wrbuf_cstr: fix off by one error. wrbuf_buf: make it always return non-NULL Also, wrbuf_buf will return same buffer as previous call to wrbuf_cstr. --- 5.1.0 2014/04/17 Doc: move main YAZ manual to book.xml; use nxml YAZ-758 zoomsh: offer option -a apdulog As we're used to from yaz-client and GFS based servers. ZOOM: new setting apdufile. Sets name of APDU file. If not given, existing setting apdulog takes effect. Add odr_setprint_noclose. It's like odr_setprint, but does not fclose at odr_destroy. Add wrbuf_cstr_null. Add re-entrant CQL/Solr/RPN query conversion functions. The re-entrant functions are: cql_transform_r, cql_transform_rpn2cql_stream_r, solr_transform_rpn2solr_stream_r. These have same functionality as cql_transform, cql_transform_rpn2cql_stream, solr_transform_rpn2solr_stream. They return the additional infomration as WRBUF to make them re-entrant. Remove CQL to Solr conversion and base solr_transform_t on cql_transform_t. The RPN to Solr is indeed in use. It uses exact same data structure as cql_transform_t. cql2pqf utility allows RPN to Solr conversion Fix assert in ZOOM when http connect fails YAZ-757 --- 5.0.22 2014/04/09 ZOOM: Call cs_rcvconnect during HTTP redirect YAZ-754 wrbuf_cstr: make it thread safe YAZ-753 yaz_log_init_file may take fd= to open log file at the FD given. --- 5.0.21 2014/03/21 Offer new utility function zget_AttributeList_use_string. New conversion step, solrmarc, for record conversion module. --- 5.0.20 2014/03/13 Fix gcrypt initialization for threaded mode. On systems were GnuTLS did not initialize gcrypt for threaded mode, wrbuf_sha1_write could throw an assert. --- 5.0.19 2014/03/10 Fix ZOOM_connection_Z3950_search: Assertion YAZ-750 The standalone ZOOM sort was completely broken since 5.0.13. ZOOM: generate event Connect rather than None for partial connect (in fact getaddrinfo resolving). ZOOM: only supply clientIP for InitRequest. Rather than for all APDU types. GFS: peer_name adds X-Forwarded/Client-IP to value YAZ-749 COMSTACK flag CS_FLAGS_DNS_NO_BLOCK. This will enable non-blocking getaddrinfo . This flag is passed to cs_create macro and cs_create_host, cs_create_host_proxy functions. ZOOM C uses this flag. YAZ-744 New "Facets" section in the documentation. --- 5.0.18 2014/02/27 Call exsltRegisterAll in yaz_init_globals, so that all applications using YAZ will have EXSLT things enabled. Use extraArgs in key for memcached ZOOM C caching YAZ-747. Update various URLs to the re-organized SRU pages at LoC. --- 5.0.17 2014/02/26 Fix ZOOM_connection_connect SEGVs if host==NULL YAZ-746. Problem introduced in 5.0.12. Fix: Setting env YAZ_LOG makes YAZ hang YAZ-745 yaz_init_gloabsl calls yaz_log_init_globals calls yaz_log_mask_str_x . Do not call yaz_init_globals from log_mask_str_x. Problem introduce in 5.0.15. --- 5.0.16 2014/02/25 tcpip/SSL COMSTACK: connect tries all getaddrinfo addresses YAZ-743 --- 5.0.15 2014/02/24 Fix gcrypt not properly initialized YAZ-740. --- 5.0.14 2014/02/19 Describe memcached option for ZOOM. ZOOM: throw present request out of range again YAZ-739 Was removed in YAZ 5.0.13. --- 5.0.13 2014/02/18 yaz_log MUTEX protected and pthread_atfork is used to avoid dead-lock with localtime_r when threads + fork is used (such as Metaproxy). yaz-config: quote some RHS values (that might include blanks) zoomsh: shows SearchResult-1 zoomsh: sortby command zoomsh: use proper list of connections and result sets YAZ-725 Avoid yaz_log in sigterm handler for GFS YAZ-737 Logging is still performed, but outside sig handler. New ZOOM C feature: result-set caching with memcached. Example: zoomsh "set memcached --server=memcachehost" "connect zurl" "search query" Remove SSL via OpenSSL support YAZ-732 Also deprecate two functions from comstack that aren't working with GnuTLS: cs_get_ssl, cs_set_ssl_ctx. Revert "Bison: use %name-prefix directive rather than -p option" --- 5.0.12 2014/01/22 Prefix URL with http:// if sru setting hints SRU/Solr mode YAZ-731 SRU GET/Solr base URLs may hold additional ?args YAZ-729 ZOOM option extraArgs already does this, though. It seems useful when dealing with Solr targets to limit by filter, eg. http://lui.indexdata.com:8080/solr4/select?fq=database:3902 Remove #fragment for HTTP request encoding YAZ-730 Doc: Update list of DLLs/LIBs Doc: update href link to Unix utils and Git. --- 5.0.11 2014/01/15 ZOOM: fix "lost connection" problem with servers that uses both squid and another proxy behind it that returns Location headers with relative URIs. YAZ-724 zoomsh: do not use readline for stdin (no tty) YAZ-724 Just use fgets in that case. If the user hits Ctrl-D a new-line is also printed. zoomsh: empty command ignored YAZ-723 rather than performing exit of zoomsh. yaz-url utility offers option -v to enable verbose mode. yaz_url uses yaz_check_location and offers verbose mode. Add new function yaz_check_location. This function gets an absolute URI from Location (HTTP redirect). cookie API: introduce yaz_cookies_reset Update cql.y for newer bison YAZ-720 The important part is that YYLEX_PARAM and YYPARSE_PARAM are no longer supported. Instead one must use %lex-param and %parse-param . --- 5.0.10 2014/01/09 ZOOM/yaz-client: Cookie handling; deal with relative URI in Location header. YAZ-719 rpn2solr: support truncation left(2), left&right(3) YAZ-718 Mention SRU version 2.0 in yaz-client man page. --- 5.0.9 2013/12/20 ZOOM/yaz-client: allow SRU searchRetrieveResponse with incorrect namespace. --- 5.0.8 2013/12/20 Make cs_parse_host public.A Fix double HTTP dump (-a log would show HTTP packages twice). Bug introduced in YAZ 5.0.6. --- 5.0.7 2013/12/17 Fix buffer corruption for yaz-ztest record fetch. --- 5.0.6 2013/12/17 Allow yaz-ztest to return user-defined records (one record per file). This is enabled by defining environment variable YAZ_ZTEST_XML_FETCH. Prevent early truncatin of HTTP log. (ODR_PRINT for HTTP streams). Use the stream write instead of odr_printf which has a 4K tmp buffer. Fix encoding of 0x00a4 (unicode to danmarc) YAZ-713 --- 5.0.5 2013/12/09 Add support for MARC-in-JSON. yaz-marcdump and the record conversion module can read and write this format. For record format JSON, yaz-ztest returns MARC-in-JSON records. iconv: fixes and more tests for danmarc character set encoding. 0xa733 is converted to @Ã¥ , 0xa732 is converted to @Ã… instead of @a733, @a732 . --- 5.0.4 2013/11/22 Improve error reporting for ICU chains YAZ-707 Report config element+rule when ICU status is "failure". ZOOM: stop fetching if present response has no records YAZ-710 Some targets return less records than their hit count would suggest. This prevents ZOOM from continuing to fetch records if any present response has 0 records in the response. Ensure that GFS calls exit if any listener fails YAZ-710 Before, if XML config was in use, it would start the default listener @:9999! --- 5.0.3 2013/11/19 yaz-ztest: -V shows version (like yaz-client -V) New iconv encoding: danmarc YAZ-692 yaz-client: lslb, ssub, mspn are Odr_ints now YAZ-705 daemon: only wait for immediate child rather than all children. YAZ-704 yaz-client: fix setting of SRU record schema. If scheme was unset, it could lead to invalid memory reference. --- 5.0.2 2013/10/16 yaz-ztest returns schema for MARCXML test records. SRU require that recordSchema for records. GFS: make surrogate diagnostic when yaz_record_conv_record fails - instead of non-surrogate diagnostic. This is a per-record failure. GFS: Allow multiple listenrefs YAZ-554. A server in yazgfs configuration may refer to multiple listeners now. Attribute listenref is a comma separated list of listen IDs. GFS: Use xmlconfig path as prefix for fnames YAZ-702. When -f option is given for GFS, the dirname of filename (for -f) is used as prefix for options such as cql2rpn, ccl2rpn, etc. Content-Type charset fixes YAZ-701 . Do not inspect charset in Content-Type header for SOAP when decoding SRU. The payload (XML) itself tells what encoding it is. In response, never supply encoding in Content-Type. The response payload (XML) tells what it is (with no encoding in XML it's UTF-8). HTTP decoding: allow blanks in URL paths YAZ-700 --- 5.0.1 2013/10/04 Various fixes for how SRU 2.0 is encoded. Fix NS for SRU 2.0 diagnostics and facets. Ensure recordData and recordSchema are always present in record element, because they are required. Remove deprecated functions yaz_uri_val .. and yaz_uri_val_int. Never used outside YAZ. Simplify in a lot of places using odr_strdupn. odr_create_Odr_oct: null terminate the buffer. Some applications rely on it. --- 5.0.0 2013/10/01 Increase various buffers in GFS's statserv_options_block Change many 'unsigned char *' to 'char *' for ODR-related utilties. This change makes many type-casts redundant, and, thus simplifies code. Remove last bits of WAIS support. Remove member 'size' from Odr_oct. Slim down the public part of 'struct odr'. Most elements are not part of struct Odr_private. Add support for SRU 2.0. Since SRU 2.0 is incompatible with earlier versions of SRU, yaz-client and zoom C are using SRU 1.2 by default. In particular facets are supported in both client - and server side. Facets are also supported for Z39.50 and is carried in additionalSearchInfo of searchRequest/searchResponse with OID 1.2.840.10003.10.1000.81.5 AKA "Facet-1" in oid.csv. The info is defined in facet.asn (which covers both request/response). This is what a search handler in the GFS will see (regardless of whether operating in SRU mode or Z39.50). Changes to the srw.h (SRU/Solr) definitions include: - New element in Z_SRW_searchRetrieveRequest, queryType (char*) and query (char*), which replace union query and query_type (int). This is because SRU 2.0 supports a queryType parameter. This also means that, to carry PQF, in SRU we can now use queryType=pqf and query=PQFstring , rather than x-pquery=PQFstring (extention parameter). The extension parameter is still supported. - New element, packing, that has information about SRU 2.0 recordPacking (not to be confused with SRU 2.0 recordXMLEscaping). New element in Z_SRW_searchRetrieveResponse, resultCountPrecision. New element, packing, in Z_SRW_explainRequest. New elements in Z_SRW_scanRequest, queryType and scanClause. These replace query_type and scanClase untion. This is similar to what happend to search. --- 4.2.69 2013/10/01 GFS: log when closing down - at least SIGTERM YAZ-684 Also change formatting WRT PID logging a bit. Improve display of MARC records with multi-byte subfield IDs YAZ-695 In some rare cases subfield identifiers are multi-byte characters. This will try to deterime length of those and split accordingly. This affects display in line mode as MARCXML/MarcXchange. The encoding of ISO2709 is the same. Change inp argument to const for yaz_read_UTF8_char. yaz-marcdump: fix leaks for MARCXML parsing. YAZ-694 MARCXML parsing: avoid skipping 1st field if no leader. YAZ-693 Better check of marc leader info YAZ-691 Problem is that some systems generate MARCXML/MarcXchange with funny headers. These will not work if encoded as ISO2709. Some tests produce new output, due to updated warning messages cql2pqf: allow PQF queries from stdin (because CQL is also allowed) yaz-client: display MAB records YAZ-689. Thanks for Heiko Jansen for this patch. New utility z_get_HTTP_Response_server which allows both HTTP server name and HTTP server URL to be given in response. Debian: do not depend on obs tcl8.3. Debian: do not depend on obs libicu36-dev. --- 4.2.68 2013/09/23 GFS: pass additionalSearchInfo to search memeber search_input if given. Otherwise pass otherInfo. Request for facets and other search related things will be passed there in future versions of YAZ. New ZOOM setting, authenticationMode, which allows authentication paramters to be encoded in the URL rather than via HTTP Basic auth. YAZ-686 rpn2solr: fix nested AND/OR handling. YAZ-685 Add comparison routines for some Z-types, such as NamePlusRecord, RPNQuery, Query, RecordComposition and OtherInformation. --- 4.2.67 2013/09/19 Don't decode MAB as MARC. Just like we don't attempt to decode HTML/XML as MARC. Fixes MAB display problem that was introduced in 4.2.64. CCL: allow quoted terms for date ranges. YAZ-681 Introduce ccl_parser_qual_search. This function makes old function ccl_qual_search, from YAZ 2, available again. Add yaz_facet_list_to_wrbuf. YAZ-683 --- 4.2.66 2013/09/11 ZOOM: fix record handling for Solr. ZOOM_record_get would return 0, if schema was given for search. YAZ-675 Add Solr date range searches. YAZ-621 --- 4.2.65 2013/08/22 ZOOM: another fix for record caching (introduced in YAZ 4.2.64). --- 4.2.64 2013/08/21 (Broken WRT ZOOM C, do not use) ISO2709/MARC parse most octet aligned records; not just those that are known to be ISO2709/MARC. This makes ZOOM and yaz-client MARC parse more records instead of just dumping as is. YAZ-670 ZOOM: proper caching for variations of record schema. YAZ-671 Solr: Check for enging / and perhaps commands (select/term) YAZ-651 --- 4.2.63 2013/07/17 Add yaz_strcmp_null --- 4.2.62 2013/07/11 New utility z_get_HTTP_Response_details - an extended version of z_get_HTTP_Response. New utility yaz_url_get_error which returns error message of last failed yaz_url_exec call. yaz-url and url functions: allow max HTTP redirects to be controlled. New functions yaz_file_glob2, yaz_xml_include_glob. These functions takes a flags parameter, which, for now only controls whether to fail inclusion of a non-existing file (without glob pattern) - flags YAZ_FILE_GLOB_FAIL_NOTEXIST. --- 4.2.61 2013/06/20 For MARC XML parsing, allow record without leader. A fake/default leader is inserted and a warning is tagged with the record. ICU: fix leak in in icu_iter_get_org_info. --- 4.2.60 2013/06/14 ICU: fix bug in icu_iter_get_org_info (un-init variable). --- 4.2.59 2013/06/11 Implement z_HTTP_header_remove. --- 4.2.58 2013/06/11 ICU: Disallow 0 ptrs for some ICU string utilities. ICU: new utilities icu_iter_get_org_info and icu_chain_get_org_info: returns original tokens (before normalization). CCL: avoid z39.58/regex truncation when not needed. Apply only the conversion of those masks, when absolutely necessary. CCL: configurable masking character - @mask. Default masking character is # for CCL. HTTP encoding: remove Transfer-Encoding header. YAZ uses content_len and full response anyway, so a Transfer-Encoding header will obstruct the response. --- 4.2.57 2013/05/15 COMSTACK: @ uses AF_UNSPEC . But we prefer AF_INET6 over others when picking a socket. Problem is that some systems has IPV6 support, but we can't create sockets for them, so we pick AF_UNSPEC first. HTTP encode. Proper Content-Length YAZ-660. For yaz_encode_http_response use content_len to determine resulting Content-Length in HTTP response and NOT Content-Length supplied in headers by user. z_HTTP_header_add_basic_auth uses z_HTTP_header_set rather than z_HTTP_header_add, to avoid having two Authorization headers by mistake. Fix problem with HTTP decoding. For HTTP 1XX, 204, 304 assume no content-length. Fix yaz_base64decode to use proper signed. Problem occurred on platforms with big endian and unsigned char (by default). --- 4.2.56 2013/04/26 Fix yaz-client connect (crash in 4.2.55). --- 4.2.55 2013/04/26 Fix proxy/host problem for ZOOM that could occur if unix sockets was in use. New Debian package libyaz4-dbg. Fix problem with cs_close hang/wait in SSL mode. Invoke gnutls_bye differently in tcpip_close. --- 4.2.54 2013/04/17 Windows installer of YAZ includes YAZ4J as a component. CQL: allow "extra terms" again, by default. Thus, the CQL parser accepts a superset the standard. This reverts to CQL as of YAZ 4.2.51 and earlier. CQL parser may operate in strict mode where queries not conforming to the standard BNF are rejected (syntax error). Whether the CQL parser operates in strict mode is controlled with cql_parser_strict . Strict mode enabled with option -S for utilities cql2pqf and cql2xcql . yaz-ztest: returns OPACXML records for syntax=XML and element set=OP. --- 4.2.53 2013/04/10 New charset, MARC-8c, which is like MARC-8 but allows control characters 0x01 through 0x1F, except ESC to be passed through verbatim. Fix a problem with duplicate sub field character in MARC output. Problem happened only when output was MARC-8 encoded. --- 4.2.52 2013/04/03 yaz-ztest: Use hash for fake hit count. Before, random number was used. This is problematic for unit tests using yaz-ztest. This patch also makes a hash for CQL queries. For RPN, any term with a leading digit will be treated as pseudu hit count (to force any particular hit count by a client). yaz-ztest: return unique MARC dummy records. Beyond record offset 24, the author surname is patched with offset to make all records unique. COMSTACK: make @ bind to IPV6+IPV4 consistenly and avoid depending on system wide default (/proc/sys/net/ipv6/bindv6only). @4 binds to IPV4 only. @6 binds to IPV6 only. Update CQL API documentation a bit CQL: don't accept extra terms for queries. Makes the CQL parser stricly conformant to the standard. --- 4.2.51 2013/02/12 GFS: scan handler gets extra_args from request and may return extra response data . That's for SRU only. Solr scan support for ZOOM and yaz-client. Patch from Simon Jacob. --- 4.2.50 2013/01/30 New function, yaz_xml_to_opac, to convert from OPACXML to Z39.50 OPAC. OPACXML: sync spelling of availabilityDate in XML to that of Schema opacxml.xsd. The schema had the correct spelling of this member always. The ASN.1 was mis-spelled and still is (API change) - we are not changing this. However, the OPAC to XML conversion had yet *another* typo. GFS: Allow conversion between Z39.50 OPAC and OPACXML via retrieval element. New function, z_ext_record_oid_nmem, which is similar to z_ext_record_oid but takes NMEM rather than ODR --- 4.2.49 2013/01/18 ICU: New conversion element 'join' which joins tokens into one with a custom character given by rule attribute. --- 4.2.48 2013/01/10 New GFS search member: present_number. This is a hint to the search handler how many records are going to be fetched immediately following search. There's no guarantee that it's going to be the case, since it depends on hit count (for Z39.50 piggyback) and whether errors turn up. Make a few functions static (private). The functions getbyte_stream, ungetbyte_stream and yaz_gets are now private. They were never declared in a header file. yaz-marcdump: exit(5) for serious decoding errors ISO2709 decoding: be more picky WRT header GFS: bail out of fetch if last_in_set is set. Until now, last_in_set, was only used as to indicate that next-result-set-position should be set to zero. http://www.loc.gov/z3950/agency/markup/04.html#Next-result-set-position Based on patch from Ashley Sanders. Make some functions static/private in PQF parsing. Those functions were never declared in a public header and so should not be in use by applications based on YAZ. --- 4.2.47 2012/11/23 ZOOM: special options to control APDU logging. Using ZOOM_connection_option_set(c, "saveAPDU", "1") will enable logging of APDUs until "saveAPDU" option is set again. If logging is already enabled the effect is that current APDU buffer is cleared. Using ZOOM_connection_option_set(c, "saveAPDU", "0") disables logging (default behavior on new connection). The APDUs sent/received can be obtained by using Using ZOOM_connection_option_get(c, "APDU") or ZOOM_connection_option_getl(c, "APDU", &l). GFS: relay implementation_version from backend From 3.0.40 and later, implementation_version from backend was not used in init response at all. --- 4.2.46 2012/11/15 Fix cs_rcvconnect for SSL comstack GNUTLS. Did not work in non-blocking mode at all. Probably never did. Make a new version of ztest.pem that, at least, is not expired. --- 4.2.45 2012/11/13 Fix description of CCL directive 'case'. More tight checking of form arguments (yaz_uri_to_array). Makes YAZ better at rejecting big and/or bad POSTs. SRU decoding does not report more than up to 10 invalid arguments. rpn2cql: less quotes in generated terms. Semantics unchanged, but it's prettier this way. --- 4.2.44 2012/10/25 New utility yaz_decode_init_diag. Defined in proto.h. Allow HTTP protocol on unix local socket. Also Z39.50 database may be given for unix local socket. The COMSTACK string for doing so is: unix:: Examples: unix:/myfile:tcp:localhost:9999/mybase unix:/myfile:localhost:9999/mybase unix:/myfile:http://fakehost/mybase debian: Use dpkg-buildflags in build process. --- 4.2.43 2012/10/19 ZOOM C: don't trust recordPosition always. Some servers, such as IGI global's SRU service uses a recordPosition scheme starting from zero. First record's position should be one according to the standard. --- 4.2.42 2012/10/18 Allow more namespaces for SRU. This is to allow, for example, an incorrect namespace returned from server http://services.igi-global.com/sru . Minor fixes for compilation on Windows. --- 4.2.41 2012/10/11 daemon: log total number of bad signals from child on stop so that it is more easy to spot problems with child worker processes. retrieval: empty backend name attribute omits element set from being used in retrieval. --- 4.2.40 2012/10/04 Implement Solr sort strategy "solr", similar to sru11 sorting. This will implement the correct parameters on Solr requst to do native sorting. --- 4.2.39 2012/09/28 Implement ccl_qual_fitem2. Like ccl_qual_fitem but with diagnostic string returned. MARC: Extra/missing indicator handled for MARCXML. The indicator length is given in header and is the same for the whole record. If attributes ind1, ind2 are missing, then content character defaults to blank. Extra indicator attributes (beyond) indicator length are treated as an error. Reformat: delete trailing whitespace --- 4.2.38 2012/09/17 MARC: fix non-ASCII characters for leader. This is to ensure we can generate XML in UTF-8. CCL: new special attribute s=ag . Almost s=pw,al but preserves words in one node with structure word. --- 4.2.37 2012/09/04 yaz-json-parse: JSON output may be pretty printed by using option -p twice. Increase default value of max message for Z39.50 Init for GFS, ZOOM and yaz-client. Old value was 1 MB. New value is 64 MB. --- 4.2.36 2012/08/22 yaz-client: don't display bogus records from SRU servers. Some SRU servers return more records than given by *maximumRecords*. Skipping those in display! record_render: simplify buffer return handling and fix at least one bad memory reference, that broke the test_embed_record sometimes. Allow http://user:pass@host notation for yaz_url_exec. zoomsh: allow shell command to be executed. Via the system(3) call. yaz_poll: Allow num_fds == 0 yaz-client: fix bad encoding of "itemorder item". The itemorder item - command forgot to use length of encoded Item Request package. Error present since YAZ 3. yaz-ztest: fix bad usage of session handle. Bug was introduced when result sets were saved (271a9c83). SRU recordPacking: guess record packing in response rather than looking at the recordPacking element which, OF COURSE, changed semantics in SRU 2.0. Decode SRU 2.0 responses. The official namespace for responses, according to http://docs.oasis-open.org/search-ws/searchRetrieve/v1.0/cs01/schemas/sruRes appears to be http://docs.oasis-open.org/ns/search-ws/sruResponse . nature.com's server, however, usee namespace http://docs.oasis-open.org/ns/search-ws/sru-2-0-response . For this reason we are now using a glob-expr to match up the namespace. ZOOM C and yaz-client updated. Perhaps SRU 1.2 uses same namespace, I don't know. I can not find a single real example showing the "real" namespace in the documentation from OASIS. The namespace for requests is different from responses, but this is not added to YAZ yet, when we don't encode them yet. --- 4.2.35 2012/06/26 zoom/record_render: add support for Base64 decoding fo MARC records within XML element. For example: "xml; charset=marc-8; base64=/my/text()" which will decode base64 + ISO2709 marc-8 encoded material from text node under /my . --- 4.2.34 2012/06/07 Add missing definitions ZOOM_resultset_get_facet_field_by_index and ZOOM_resultset_facets_names. zoom: fix bad free for ZOOM_connect - happened when ZOOM connection options was in use. Change APDU dump printing to avoid long leading blanks. For levels 16 or larger the level is shown and the indentation is truncated but recursed with modula 8. This makes it still reasonable easy to read - even for nested BER dumps. Fix bug completeBER_n WRT too nested BER. Function completeBER_n could return 0 (incomplete package) in case where the BER package was considered too nested (return value of -2). dumpber: lines of level 15 are not indented further. Two spaces per indentation; indentation 15 or more is indented to a fixed indentation and augmented with a level= indication. zoomsh: increase max size of command+args GFS: No limit in RPN buf size in CQL to RPN conversion. --- 4.2.33 2012/05/09 New function for daemon utility, yaz_daemon_stop . Makes yaz_srw_sortkeys_to_sort_spec public on Windows. --- 4.2.32 2012/04/25 Add some Bib-1/SRU diagnostics + mappings. Bib-1: 1073 and Bib-1 1074: Proxy failure. SRU: 1074: Proxy failure --- 4.2.31 2012/04/23 YAZ daemon utility relays SIGUSR1 to child process. ZOOM: handle trailing slash for Z39.50 urls. Previously localhost:9999/ would result in en empty database list - which in turn would result in encoding failure for search. Fix reading beyond string in yaz_sort_spec. --- 4.2.30 2012/04/11 Add two new SRU diagnostics: 236: Access to specified database denied 1015: Init/AC: Maximum number of simultaneous sessions for Userid Document the very useful ZOOM-C option "apdulog". CQL to RPN: term may be passed through verbatim. This is enabled with truncation.cql . The assumption being that the term is already CQL. --- 4.2.29 2012/03/20 record_conv: leader spec may be given for marc element. The leader spec is given as attribute leaderspec for element marc. For example to convert a MARC21 record from MARC-8 to UTF-8: record_conv: allow user-XSLT params. For example: record_conv: fix error handling for missing marc charsets. CQL: fix extra terms in wrong order. --- 4.2.28 2012/03/06 record_conv: modify new API for conversion types. The conversion types may be passed in new functions yaz_record_conv_configure_t and yaz_retrieval_configure_t. Removing yaz_record_conv_add_type . Avoid mixed statement/variable declare; fixes compilation with Visual Studio. --- 4.2.27 2012/02/28 Add non-standard SRU diagnostic: 235: "Database does not exist". Couldn't live without it. HTTP 404: "Not found" is just so anonymous. Update SRU to Bib-1 diagnostic maps accordingly. CCL: add two new diagnostics for unsupported masking. The new diagnostics are: "Embedded truncation not supported" and "Single charcacter mask not supported". --- 4.2.26 2012/02/23 CCL: fix use of "term" field in sub queries. Bug introduced in YAZ 4.2.25. --- 4.2.25 2012/01/11 Build YAZ for Ubuntu Oneiric. CCL: allow parantheses for proximity operands. For example CCL query (a) % (b) is now allowed. GFS: fix bend_assoc_is_alive. When cs_get returns 0 the association is marked dead, rather then being destroyed. If not, the session memory is being free'd before the search/scan handler is finished. Also destroy 'request' memory in request_release rather than in various places, which resulted in leaks from time to time. --- 4.2.24 2011/12/21 cql_sortby_to_sortkeys: honor sort prefix. RPN to CQL: always quote resulting terms. For bizarre reasons, JSTOR's SRU server returns 0 hits on ISSN searches unless a CQL term is quoted. The rpn2cql family of functions now always returns quoted CQL terms. Fix CQL to CCL conversion for multiple terms. Add two test cases as well. --- 4.2.23 2011/12/15 Allow =val to be omitted for yaz_uri_to_array. Also, multiple &'s in sequence is treated as one. For example, &&a=b&&&c& is identical to a=b&c= . --- 4.2.22 2011/12/05 Add ZOOM_connection_save_apdu_wrbuf. This function may be used to save APDUs for a connection to a WRBUF. --- 4.2.21 2011/11/23 Fix cql_sortby_to_sortkeys. Completely broken before. Make CCL's @truncation work again. --- 4.2.20 2011/11/09 New ZOOM connection setting: tproxy. It's like proxy, but does not set Z39.50 proxy OID or change HTTP for proxy behavior. Can be used to set resolved address + port for a connection outside ZOOM itself. Fix atoi_n_check digit test. Thanks to Giannis Kosmas for spotting it. --- 4.2.19 2011/11/07 Fix uninitialized variable in Solr spell support (could cause SEGV for SRU response decoding). Error handling for Z_APDU_close uses ZOOM_set_dset_error() to pass back-end's addinfo through into the ZOOM response addinfo. When ZOOM_set_dset_error() is passed an addinfo2 as well as addinfo, they are separated by a colon and a space rather than simply concatenated. --- 4.2.18 2011/10/28 Add support for Solr spell-checking/suggestions through ZOOM. If a Solr target has been configured correctly for spelling-checking and suggestions, these will now be returned on the ResultSet option "suggestions". zoomsh has been extended to show this with the cmd suggestions. --- 4.2.17 2011/09/28 Fix function nmem_strsplit_escape2 which extends nmem_strsplit_escape with a flag whether to substitute escape sequences or not. --- 4.2.16 2011/09/22 Fix nmem_strsplit_escape to substitute escape char properly. New option for zoomsh -e , which makes it abort on first error and return process exit code to indicate success/failure. YAZ options utility supports special option -- which makes all it treat all following arguments as non-options. --- 4.2.15 2011/09/16 Fix yaz_file_path_resolve/yaz_path_fopen/yaz_fopen so that path is not searched if absolute filename is given. Fix conv_xslt() error-reporting when stylesheet is not found. (The value of fullpath is meaningless in this situation.) --- 4.2.14 2011/09/07 Fix problem in CQL sort node creation: un-initialized memory. New ZOOM utility ZOOM_query_sortby2. That takes a strategy parameter: one of "z3950", "type7", "cql", "sru11" or "embed". The "embed" chooses type-7 or CQL sortby depending on whether Type-1 or CQL is actually sent to the target. New sortspec utilities: yaz_srw_sortkeys_to_sort_spec, yaz_sort_spec_to_srw_sortkeys, yaz_sort_spec_to_type and 7yaz_sort_spec_to_cql. rpn2solr supports Z39.58 truncation (104). Thus, CCL truncation mode t=z will make it possible to use both single-character mask (#) and wildcard (?) in CCL . Throw diagnostic for left truncation because that is not supported by Solr. --- 4.2.13 2011/09/01 Fixes for cql2rpn, cql2ccl and ccl2rpn; mostly in the area of special cases using escapes (\-sequences) and masking. PQF parse fix: A trailing backslash followed by end-of-string (\0) would result in a read one byte beyond string. rpn2ccl may use Z39.50 masking for terms (t=z). ICU check fix. Don't include library -lCrun on Solaris, unless present. ICU check fix: Use --cppflags-searchpath to determine ICU include files; not --cppflags (which seeems like an error in icu-config). --- 4.2.12 2011/08/27 RPM package only cql2ccl: fix conversion of terms: operator characters were not quoted/escaped. --- 4.2.11 2011/08/25 RPM package only ccl2rpn: Conversion to regexp-1 terms (trunc=102). For mode t=x, the CCL parser will map both # and ? to their regular expression quivalents (. and .*). rpn2cql: deal with truncation=102 (regexp-1). And ensure proper quoting of reserved CQL characters. cql2ccl: deal with both * and ? in conversion. Also leave escaped ones as is, so that they are passed through. --- 4.2.10 2011/08/24 ZOOM SRU mode: more aggressive re-connect. Private function prox_unit_name() renamed to yaz_prox_unit_name() and made available as a utility function, declared in rpn2cql_structure() supports proximity nodes (except that the Type-1 proximity node's "exclusion" binary is ignored, as there is no way to express that in CQL). Fixes bug #4564. --- 4.2.9 2011/08/18 Fix SEGV that could occur if set command of zoomsh was given without value (2nd argument). Fix SEGV that could occur if unsupported transport was given for COMSTACK - say https (when SSL was unavailable). Build yaz-url on Windows too. --- 4.2.8 2011/08/11 New utility to get web content. Header is url.h. A command line tool yaz-url is part of the distribution and packages. Fixes for SSL COMSTACK (when gnutls is in use). New functions yaz_base64{encode,decode}. Header is base64.h. --- 4.2.7 2011/08/03 ZOOM C includes HTTP response buffer as additional info if it fails to decode the SRU response. Make wrbuf_json_puts available. --- 4.2.6 2011/07/28 zoom: throw diagnostic for invalid value for option "sru". Before a bad SRU request was sent. Adding new utility wrbuf_vp_puts. Add cclxmlconfig.obj to win/makefile. It was missing completely. --- 4.2.5 2011/07/21 ZOOM HTTP: use absoluteURI's in proxy mode as required by RFC 2616 (HTTP). Fix a bug in handling of cookies. Fix a bug that would occur if proxy + redirect was used at the same time. MARC line mode decoding: be less picky about length given - first 5 digits of header that is. CQL to CCL conversion: deal with CQL proximity (cql_to_ccl function). Changes to decoding of SRU records: a record with recordPacking=xml is modified with a new root element if the recordData contains multiple children elements. This is to make the record XML parseable afterwards. RPN to Solr conversion: encode special characters. Generic Frontend Server: fix uinitialized member, stepSize. --- 4.2.4 2011/06/21 Fix a bug in SRU decoding of records.. The database records stored had un-initialized memory, but it would only be seen with yaz_record_render and type_spec="ext" . Fix a bug in ccl_qual_dup introduced in 4.2.3. --- 4.2.3 2011/06/17 Add new CCL utility, ccl_qual_dup, which makes a copy of a CCL bibset. --- 4.2.2 2011/06/10 Add new utilities to convert from CQL to CCL . These utilities have prefix cql_to_ccl defined in cql.h. Defensive coding for an off-by-one bug in ucol_getSortKey. This could lead to memory heap corruptions when ICU utilities were in use. --- 4.2.1 2011/06/07 Make compilation work without Libxml2. yaz-client: remove redundant blanks in display of searchResult-1 term hit counts. --- 4.2.0 2011/05/18 CQL: parse CQL sortby spec. The resulting sort spec is stored in the resulting CQL node (tree) in a new node CQL_NODE_SORT. CQL and GFS: add utility cql_sortby_to_sortkeys which converts CQL sortby 1.2 node tree to CQL 1.1 spec. This in turn allows the generic frontend server to only consider srw_sortkeys and support both SRU 1.1 and 1.2. Note that the CQL sortby spec is only converted when the GFS is already converting from CQL to RPN (cql2rpn element). New function nmem_strsplitx. This is like nmem_strsplit but allows us to specify whether to collapse delimitors or not. The existing nmem_strsplit do collapse (collapse parameter = 1). Windows installer: For NSIS, set InstallDir depending on x86/x64. Rename internal func yaz_use_attribute_create. While non-static, this function is not declared in a public header. --- 4.1.7 2011/03/15 Add -lCrun when linking with ICU on Solaris. More quicks character set conversions for OPAC records. --- 4.1.6 2011/03/10 fix problem with record_render: records were converted (character set wise) even if no charset was given. Problem introduced in YAZ 4.1.5. --- 4.1.5 2011/03/08 SRU: add methods for handling DADS SRU-proxy facets. Separate OPAC record character set for ZOOM_record. yaz_record_render allows a character set given as charset=from/opacfrom,to where 'from' is the character set of a bibliographic record, 'opacfrom' is character set of OPAC record and 'to' is the target character set. --- 4.1.4 2011/02/21 yaz-client: show may XML format records. Command show followed by 'format' will format XML records retrieved using Libxml2's xmlDocDumpFormatMemory function. src/stemmer.c: Avoid using unnamed union. It is not supported by some older C compilers. For PHPYAZ: set YAZVERSION, not YAZ_VERSION. --- 4.1.3 2011/01/27 Update yaz.spec to operate on both SLES11 / Centos 5.5. RPM: Release includes 'indexdata' name. Use indexdata in release name so this package can be distinguished from other vendors. yaz-config: Use exec_prefix, libdir, includedir . Use these variables as determined by configure yaz-config: set YAZ_VERSION env. php_yaz relies on it. GFS: Z_PresentStatus_partial_4 for missing record. If bend_fetch handler returns no error and no record, the present request is considered partial (only a subset of the records could be returned by backend), and so it is appropriate to set Present Status to partial-4. --- 4.1.2 2010/11/02 Move yaz-config man pages to section 1. More documentation about Solr. tcp comstack: change behavior for @-specs (anyaddr). @ listens on AF_INET (IPV4) peers, and @6 listens to AF_INET6 (ipv6) peers. Previously @ listened on AF_INET6 which accepted both IPV4 and IPV6 peers on some Linux systems. However, in general that does not work so YAZ can not rely on that to work. Debian changed behavior in this respect from Debian lenny to Debian squeeze (still testing as of Oct 2010). Refer to: http://www.mail-archive.com/debian-devel@lists.debian.org/msg277726.html zoomsh: remove "debugging" output. Was added by mistake in 4.1.0. --- 4.1.1 2010/10/05 Fix yaz-config output: echo_source not set correctly by configure. --- 4.1.0 2010/10/05 Solr Web Service support for yaz-client and ZOOM. Define record syntax JSON. OID: 1.2.840.10003.5.1000.81.3 . --- 4.0.12 2010/08/17 Z39.50 facet support. Facet specifications are passed for search in other-information with ASN.1 as defined in facet.asn and OID .10.1000.81.5 . Facets are expressed as an Attribute list as known from Type-1/RPN queries. Type 1 is field. Type 2 is sort order. Type 3 is limit (number of entries to get in response). yaz-ztest returns dummy facets if a client asks for them. --- 4.0.11 2010/07/09 CCL fixes: bug 2895 and bug 3539. GR1-display: add comma in display - was removed by mistake in version 4.0.0. Windows installer: bundle MSVCP90.dll - used by icuuc42.dll. SRU: Merge cookies on HTTP redirects (Giannis Kosmas ). --- 4.0.10 2010/06/18 ZOOM C: Add ZOOM_resultset_release. ZOOM_resultset_release releases a result set from a connection. The result set will be on its own thereafter; no operations on it will perform retrievals from a target. Only cached copies are returned. ZOOM C:fix case for HTTP servers responding with Connection:close. Ensure that if there is a current task it is resumed (like fetching more records in a result set) . Bug #3484. PQF parser: use odr_atoi for Odr_int (not atoi) Minor PQF encoding and decoding changes; reformat. PQF decoding: attribute values that contain any non-digits are treated as string attributes (previously decoding only checked for leading character ([0-9]). PQF encoding: attribute string values are not surrounded by double-quotes. --- 4.0.9 2010/05/21 New utility for managing threads - thread_create.h. Add socket pipe utility - spipe.h. The socket pipe has same purpose as Unix pipe . Unfortunately Windows pipes do not work on select/poll - but YAZ' implementation do. Fixes for yaz_cond-functions on Windows 7. DLL export more symbols. zoomsh: show record do NOT render opac. Remove *.la files from Debian and RPM packages. --- 4.0.8 2010/05/11 Debian package libyaz-dev depends on libgnutls-dev again (was removed in YAZ 4.0.6, but due to Libtool it is still needed even though yaz-config do not list libgnutls libs). ZOOM: Use only one WRBUF for returning string results for ZOOM_resultset. Reduces memory usage for ZOOM in general. ZOOM: ZOOM_connection do not use a shared pointer to ZOOM_resultset after ZOOM_resultset is destructed by user. Reverts to YAZ 4.0.4 behavior. --- 4.0.7 2010/05/04 record-conv: fix problem with at least one XSL conversion - due to probably incorrect usage of XML XSL documents. --- 4.0.6 2010/04/29 Fix yaz-config for static mode and the use of SSL (gnutls). --- 4.0.5 2010/04/29 Forward decl timeval struct in mutex.h and gettimeofday.h. yaz-config: fix 'static' mode linking. --- 4.0.4 2010/04/28 Add functions yaz_cond_{create,destroy,wait,signal,broadcast}. These are wrappers for pthreads or Windows. For Windows these are put in a separate DLL: yaz_cond4. libyaz.la (whole source) is compiled with thread. If thread support is enabled enabled, all source of YAZ is compiled with treading support. This allows core utilities such as yaz_log to use thread facilities. Previously (YAZ 3 and YAZ 4 releases), only libyaz_server.la was using thread utilities. This commit moves mutex utilities (mutex.c) from libyaz_server.la to libyaz.la. yaz-json-parse displays leading text until error. --- 4.0.3 2010/04/09 Handle HTTP redirect for SRU GET in yaz-client and ZOOM C. Based on patch from Giannis Kosmas. SRU: no longer URL encode SRU database. The URL for an SRU server is a URL and such is alreeady encoded - at least when given with leading http:// or https://. This reverts behavior to YAZ 3.0.50. Support for new MARC XML notation TurboMARC which like MARCXML is a complete representation of MARC/ISO2709.. This one, however, is more compact and allows for faster processing with XSLT. TurboMARC can be used in the marcdisp.h API, from the yaz-marcdump utility and from the API of ZOOM C. yaz-ztest can be configured - via the database - to perform certain delays when it performs operations search, present and single record fetch. This allows testers to make yaz-ztest act as a real or even slow Z39.50 server. Refer to the yaz-ztest man pages for details. --- 4.0.2 2010/03/09 wrbuf_destroy allows NULL WRBUF passed to it. Fix CCL qualifier aliases (did not work since YAZ 2.1.56). Add ZOOM_connection_close. No fixed size buffers for ZOOM shell - bug #3257. tstodr: make it work on s390 platform. New icu iterator-functions. The new icu_iter-functions makes it possible to use ICU chains from many threads. yaz-client: better syntax check for show command. --- 4.0.1 2010/01/26 New glob file pattern utility. Like POSIX glob. For Windows too. Refer to yaz/file_glob.h. New simple local-file XML include facility which allows file glob-patterns. Refer to yaz/xml_include.h. Utility yaz-json-parse which parses JSON and demonstrates the JSON parser API. ZOOM_record_get supports new parameter "format" which makes it format XML record content. Fix JSON parser WRT start symbol. The start grammar symbol (referred to as JSONText in ECMA-262) is JSONValue, not JSONObject. --- 4.0.0 2010/01/20 Windows binaries for YAZ now compiled with Visual Studio 2008 (VC9). Older versions of YAZ was compiled with Visual Studio 6.0 (1998). Update so/DLL to version 4. Windows version builds YAZ4.DLL. POSIX/Unix builds .so with major version 4. Remove old LOG_-defines from log.h. They have been obsolete and undefined by default for the last 5 years. Odr_int is now of type 'long long'. Used to be 'int' in YAZ 3 series. GFS: Remove socket (int *fd) from search_rr handler. The socket descriptor ptr is a facility that allowed a search handler to supply a socket which would serve as a callback - when search was complete. This facility has now been in use for years. COMSTACK API changes: cs_stackerr, cs_addrstr. COMSTACK method cs_stackerr removed. It is not implemented by tcpip or unix COMSTACK, perhaps for ISO SR which was removed 7 years ago. COMSTACK macro / method cs_addrstr now returns 'const char *' rather than 'char *. The returned string is read-only and should not be modified by applications. COMSTACK cs_close is now a void function - it no longer returns int. No applications check for the value and the implementations has always returned 0. ZOOM: use size_t for scan hit counts and str size. Functions ZOOM_scanset_term and ZOOM_scanset_display_term have changed, so that occ (hit count) and len (string length) are now of type size_t pointer rather than int pointer. This is to be able to represent large hit counts and to also just to use the proper type for string length (strlen result). New JSON parser. Refer to include/yaz/json.h . WRBUF API changes.. For size parameters for WRBUF size_t is now used .. Used to be int in some cases. Many wrbuf_-functions used to return an int indicating some length.. These return values were never used. And so they are now void. ODR: odr_malloc, odr_total now takes size_t for size. clone_z_type: fix leak; occurred for encoding failures. --- 3.0.52 2009/12/03 tcpip comstack: fix use of uinitialized variable in cs_straddr. This bug was introduced in 3.0.51. --- 3.0.51 2009/12/02 tcpip comstack: Remove TCP receiver buffer optimizations for Solaris. tcpip comstack: fix leak for getaddrinfo. Encoding of SRU database is performed by yaz_encode_sru_dbpath_odr or yaz_encode_sru_dbpath_buf. Now used by yaz-client and the ZOOM API. Decoding of SRU "path" database is performed by private function yaz_decode_sru_dbpath_odr . This in turn is used by yaz_srw_decode and yaz_sru_decode in server applications, GFS, yazproxy, metaproxy. yaz-client: honor base command for SRU. Change when database setting is applied for SRU and ensure it is kept when a connection is reset. Change also the way errors are displayed or SRU (decoding of packages). --- 3.0.50 2009/11/02 Add support for extra request / response data for SRU codecs and GFS. The Z_SRW_PDU structure has two new members extraResponseData_{buf,len} for extra data response buffer and length. For the GFS, both request and response data (XML) is carried in extra_args and extra_response_data for the search handler. Patch by Ko van der Sloot. ZOOM: For queries that cannot be converted to the specified rpnCharset, ZOOM now returns a diagnostic on the client-side ('invalid query' / 10010). This fixes bug #2113. yaz-client fix: If cmdfile is passed to yaz-client (option -f) and that cmdfile included a 'quit' command that would result in a memory violation. --- 3.0.49 2009/10/01 Make a number of functions defined in xmlquery.c static. These have never been declared in a public header file (yaz/xmlquery.h) and was made public by mistake. Improve speed of character conversions (iconv utilities). This makes conversions from MARC-8 faster. ZOOM_record_get returns 0 pointer if a MARC record can not be decoded - unless type desired is "raw". This will prevent type "xml" from returning ISO2709 .. Which obviously can not be XML parsed. Fix memory leak in ZOOM that would occur if option apdulog was used on a re-used connection. Frontend server logs HTTP requests. Frontend server now sends Z39.50 close when it times out (sesssion has been idle for too long). Versions 2.0.30 and earlier also sent close. But due to a mistake this was disabled in all versions after that, i.e. the server would just close the socket immediately. yaz-client emits a better message when receiving an unrecognised userInformationField. Skip zero-length subfields when decoding ISO2709. This rare case happens if a record has two FS characters in a sequence. Without this patch there would be a reference beyond char array in using_code_len fragments in marcdisp.c. Fix yaz-marcdump error that would occur if option -n was used (bug #3028). --- 3.0.48 2009/08/28 The show command offered by the zoomsh command now takes a 3d optional parameter type which is what is passed to ZOOM_record. If the type argument is omitted, "render" is used. RPN to CQL conv may use USE string attributes (bug #2978). MarcXchange NS is now info:lc/xmlns/marcxchange-v1 . --- 3.0.47 2009/07/08 Function yaz_xml2query allows a diagnostic element in the PQF XML representation .. diagnostic@code and diagnostic@addinfo is diagnostic code and additional info respectively. The BER BOOLEAN is now the integral type Odr_bool which still happens to be an 'int'. The BER INTEGER which used to be a plain 'int' is now typedef'd to Odr_int. This is still an integral 'int', but it may be changed to 64-bit via a one-liner in nmem.h (NMEM_64=1). The documentation, ASN-1 compiler as well as programs has been updated to use the new types. --- 3.0.46 2009/06/08 zoom: ZOOM_record_get now renders OPAC records when type=xml. Previously only the bibliographic record was rendered. For type=opac, an OPAC record is only returned if it is present. iconv: small fix for encoding of advancegreek. yaz-client: avoid double display of SRU/SRW records (bug #2798). yaz-client: option auto_reconnect=on really reconnects. yaz-client: fix bug #2770 - avoid length limit for auth parameters. server: avoid null ptr ref for for yaz_poll errors. build: fix RPM build for RHEL 5.3. comstack: prefer IPV6 addresses over IPV4 - should refix bug #2350 --- 3.0.45 2009/03/31 Fixed bug #2709: TCP connect returns Invalid argument. Fixed compilation for mingw. Honor charset for raw records (ZOOM_record_get). Fixed use of errno for threaded mode that was seen on Solaris 10. Fixed argument passing with blanks in value for Windows Service. Disable YAZ' own log rotate by default (no 1 GB limit). The variable l_max_size which specifies the log file limit is set to 0 (DISABLED): This is due to the fact that YAZ is most often deployed using logrotate. Also YAZ can not perform log rotate because of unsufficient permissions (setuid). --- 3.0.44 2009/02/17 List supported encodings in man page for yaz-iconv. Fixed missing SSL libs for --libs output Re-established OID record syntax application-xml. Nobody should use it but we don't want to change soname because of this symbol being absent. --- 3.0.42 2009/02/02 YAZ' RPM spec works for both SUSE Linux Enterprise and RedHat Fedora. Added member named_result_sets for init handler struct for the GFS. This allows a server to disable named result sets. Removed OID record syntax application-xml. Added support for rule-based transliterator for ICU wrapper of YAZ. Fixed bug #1902: yaz-icu XML output. Make YAZ checks Emacs friendly. BITSTRING value shows value. Bug #2346. ISO2709 decoding: skip control characters from indicator data. Omit sort key by default in yaz-icu's output. Allow combined single char options (again) for YAZ' options function. Utility yaz-marcdump got option to display YAZ version (-V). Allow YAZ to use ICU 3.4. Added new ICU test case which illustrates removal of diacritics. --- 3.0.41 2008/12/29 Fixed Fixed test that makes VERSION_SHA1 appear on dist versions too. --- 3.0.40 2008/12/29 For configure, using option --without-xml2 also disables Libxslt/Libexslt support. Fixed bug #2352: yaz-marcdump crashes for certain record. Added man page 'bib1-attr' which includes list of common Bib-1 attributes. Added support for Danmarc2 to UTF-8 conversion. Added support for ISO5426 to UTF-8 conversion. zget_InitRequest/zget_InitResponse returns GIT SHA1 hash as part of implementation version. Function yaz_version returns GIT SHA1 hash for parameter sha1_str. --- 3.0.38 2008/11/10 ZOOM C now only fires one ZOOM_EVENT_SEARCH per search-task. Previously, ZOOM_EVENT_SEARCH was fired for each searchRetrieve Response received. ZOOM C now interprets databaseName option for ZOOM connection as path (SRU "database"). Windows version bundled with Libxml2 2.7.1 / Libxslt 1.1.24 / ICU 4.0. Fixed CCL to RPN/PQF conversion which could result in invalid PQF. Dummy Libxml2 types no longer defined in headers of YAZ'. Fixed memory violation for ZOOM C - could occur when SRU diagnostics was received. --- 3.0.36 2008/09/26 Various ODR chapter fixes. Windows version uses libxml2 2.6.32+, libxslt 1.1.23+ and ICU 4.0. Added missing source for Windows compilation, mutex.c. Fixed compilation of YAZ for Visual Studio 2008. Bug #2256. For SRU connections in ZOOM all records up to "count" are now fetched. Fixed crash in generic frontend server (and yaz-ztest) which occurred in Windows due to bad error handling for Libxml2. Added facility for sending arbitrary records (ASN.1 any) using ZOOM C's Extended service update. Patch by Sam Reynolds. New options for ZOOM C's connection, logapdu which makes ZOOM log APDUs. --- 3.0.34 2008/06/18 YAZ uses GNU TLS without the OpenSSL compatibility wrapper. --- 3.0.32 2008/06/12 Fixed memory violation that could occur when decoding UTF-8. This bug was only present in 3.0.30 of YAZ. --- 3.0.30 2008/06/06 Implemented SSL sockets using GNU TLS. OpenSSL is still supported, but GNU TLS is used by default (if found). yaz-ztest returns OPAC records if a client asks for OPAC. Improved speed of MARC-8 encoding. Added support for lossy and loss-less MARC-8 encoding. Changed yaz_record_conv_record to be reentrant for XSLT conversions. Added new Windows Service wrapper (sc). yaz-client's itemorder command may now send a file. Fixed yaz-marcdump to allow the use of NS prefix for record element. Added new function yaz_log_xml_errors. Allow (but warn) unknown XML attributes in MARCXML parsing. Handle G1 sequneces in MARC-8 decoding. Bug #2115. The UTF-8 to MARC-8 conversion now uses a different set of characters for Greek symbols. Bug #2120. --- 3.0.26 2008/02/21 Added yaz_daemon (daemon.h). Fixed bug #2068: pkg-config trouble Fixed bug #395: ZOOM_record / OPAC record encoding problems. --- 3.0.24 2008/01/28 Document --with-xml2 option. Added OPAC XML XSD (etc/opacxml.xsd). Allow glob mask for name attribute in retrieval element for the generic frontend server's retrieval facility. Changed yaz_poll_poll to return yaz_poll_except for all returned events except POLLIN/POLLOUT. Fixed error handling in cs_listen. Bug #2037. --- 3.0.22 2008/01/20 Fixed version in yaz/yaz-version.h. Fixed bug #2027: Crash when closing connection. Changed configure so that ICU support is only enabled if only ICU and Libxml2 is available (because the ICU chain is XML based). --- 3.0.20 2008/01/15 YAZ now makes ICU utilities for Windows. A separate DLL, yaz_icu3.dll, is built. Only this DLL depends on the ICU runtime. yaz-ziffy is no longer part of YAZ. It is distributed separately by Index Data because ziffy's license is GPL2 rather then 'Revised BSD'. Changed license of CCL module to 'Revised BSD'. After consultation with remaining members of the original EUROPAGATE consortium, we are re-issuing the CCL module without a separate license. The software was developed by Index Data as part of a research project. The special license was included to help feed usage information back to the project consortium to support project evaluation. At this time, the project consortium has long-since disbanded, and the majority of the original principals have retired. At the same time, we have significantly modified the software during the following years, to the point where very practically no original code remains. To simplify re-use of the software, we have contacted those members of the consortium who could be reached, and agreed to re-issue the module as a proper part of the YAZ package. Tcl scripts uses /usr/bin/tclsh as preferred shell. CQL closer to being version 1.2 compliant. CQL also allows free-form terms, such as 'title=a b', and thus, make the CQL parser more CCL-like and user-frendly. Fixed bug in ZOOM_options_getl WRT setting of parameter lenp. This bug could make Extended services handling crash in the ZOOM layer. This bug was only present in YAZ 3.0.18. --- 3.0.18 2007/12/19 ziffy uses YAZ' options rather than getopt; getopt is unavailable on some systems. yaz-marcdump reads and writes collection wrapped records. Handle OPAC for record conversion module. Fixes for ICU wrapper. Allow ICU libs to be controlled with --with-icu . --- 3.0.16 2007/11/12 Added yaz_poll which is a wrapper for select/poll. When poll is available and non-buggy, it is used, by yaz_poll . This allows more than 1024 sockets to be in use. Added ICU wrapper library which exposes ICU http://www.icu-project.org/ functionality through an XML based configuration (ICU chain). This system is useful for search facilities such as Pazpar2 and Zebra that needs to perform tokenization of indexed material. The ICU code in a separate library libyaz3_icu.a. Added HTTP tunnel facility for COMSTACK, bug #1752. This is a facility that allows a Web proxy, such as squid, to tunnel Z39.50 traffic. This facility is "transparent" to must applications using YAZ. It's enabled by using pseudo transport connect: followed by the proxy address, followed by command, then follwed by he regular "virtual" addresss. For example, connect:webproxy.com:3128,tcp:z3950.loc.gov:7090/voyager . More MARC-8/UTF-8 conversion fixes. Bugs #1666, #1667, #1778. --- 3.0.14 2007/09/21 Fixed bad memory reference in ZOOM_record - cuased by member not being initialized. This was a problem only in YAZ 3.0.12. Fixed bug in conversion from MARC to XML: Non-XML characters in control fields were not removed. Changed the way C code is generated from codetables.xml. Made a MARC-8 conversion trie for each characterSet section rather than codeTable. This is ensure the code can deal with G0/G1 sequences. Use of a newer version of codetables.xml from Larry Dixson, LOC. Bug #1464. --- 3.0.12 2007/09/12 ZOOM C now handles SRU surrogate diagnostics (i.e. errors returned from ZOOM_record_error). ZOOM C function ZOOM_record_get returns record schema for type="schema". Implemented HTTP Basic authentication to SRU/GET, SRU/POST and SRW requests. Added new ZOOM C connection option 'sru_option' which specifies SRU version. Better SRW-to-Bib-1 diagnostic mapping. ZOOM C and yaz-client announces SRU version 1.2 by default. yaz-client 'sru' command may specifiy both SRU version and transport (SOAP, GET or POST). Fixed in yaz_sru_decode to allow other version than 1.1. --- 3.0.10 2007/08/22 Added support for SRU scan for ZOOM. Added support for the use of the older versions or Extended Service Update in ZOOM. To faciliate this, an option "updateVersion" may be set to the version , 1=first, 2=second, 3=third. The third version is what ZOOM C has used so far. And that, obviously, is the default. Added support for CCL queries in Z39.50 queries sent to the GFS (and therefore in Zebra and in SimpleServer-based applications). The new element in a GFS configuration file, if present, names a CCL qualifier file used to transform incoming CCL queries into Type-1 RPN, which is passed into the back-end search callback function. Added support for HTTP Basic authentication in clients: the SRU/W codec encodes the username/password elements of the PDU structure appropriately, and these may be set using the "user" and "password" options in ZOOM-C applications (the same options that are used for Z39.50 authentication). --- 3.0.8 2007/06/25 Fixed bug #1208: SSL appears to be broken in ZOOM. Fixed bug #1206: Libxml2 include path weirdness. Added oid_name_to_dotstring. Allow elementSetName to be specified for ZOOM C record update. Allow waitAction to be specified for ZOOM C based for Extended Services. Fixed NULL ptr reference bug in yaz-ztest - caused by omitted record syntax OID. Bug introduced in YAZ 3 series. Updated WIN32 build to include Libxml2 2.6.28 / Libxslt 1.1.19. --- 3.0.6 2007/06/06 Fixed bug #1157: yaz-client does not read .yazclientrc from current directory. yaz-client now reads commands from file given by option -f if specified; then tries to read .yazclientrc in current directory. Failing that, it reads .yazclientrc from user's home directory. Added support for correlationInfo Note and ID for Record Update via ZOOM C. Added yaz-client command querycharset which specifies character set for query terms for Z39.50 RPN queries and Z39.50 Scan Requests (termListAndStartPoint). Charset ISO5428:1984 is an alias for ISO5428-1984. Implemented a way to perform scan in a result set using Z39.50. This is achieved by attaching the result set name in the characterInfo (type InternationalString) of OtherInformation in the Scan Request PDU. The result set is identified in the otherinformation by the new OID: USERINFO, Z3950_PREFIX.10.1000.81.4, "Scan-Set This allows for scan in result set and faceted search . Zebra did some of this in the APT term using attribute type 8 and value being result set. Using the OtherInformation approach for this is cleaner and easier to work with in proxies and the like. This facility can be used in yaz-client using new command setscan which takes a result set as first argument, start position (APT) as second. Changed decoding of SRU XML packed records to deal with servers that have recordData with XML data with multiple root nodes. Also make comparison for recordPacking case insensitive. Again, one server returns "XML" where others return "xml". For SRU responses allow Content-Type application/xml as well as text/xml. --- 3.0.4 2007/05/21 Fixed bug in character set conversion of BER strings. Bug introduced in 3.0.0. --- 3.0.2 2007/05/08 For OIDs use Odr_oid type everywhere, i.e. do not assume Odr_oid=int. For OID class, use oid_class consistently. Fixed external handling for SUTRS and Explain records (bug appeared in 3.0 series). Added partial support for ISO5428-1984, which is the "Greek alphabet coded character set for bibliographic information interchange". By Giannis Kosmas. Added documentation on new OID API. --- 3.0.0 2007/05/02 Changes to generic frontend server interface: added new member 'query_charset' for bend_initrequest structure. A backend init handler should set this member to its native character set for query terms. When defined, the frontend server logic will announce this character set to a client if the negotiationModel bit is set by the client. All server implementors are encouraged to specify this. If a backend server does not specify this a warning is issued using yaz_log(YLOG_WARN,..). Added CCL utility to remove terms (stop words) from resulting RPN tree. This is handled by functions with prefix ccl_stop_words_ . New ZOOM C option, "rpnCharset", which allows client-side conversion of terms in RPN queries. Clean-up the CCL API. Moved some internal structures from ccl.h to private header cclp.h. Changed ccl_parser_create so that a Bibset must be supplied. Removed tokenize API from ccl.h - including ccl_parser_find. This is replaced by ccl_parser_find_str which takes a string instead. Split YAZ library into two libs : libyaz.la and libyaz_server.la. libyaz.la is the core of YAZ except the generic frontend server and does not depend on POSIX threads anymore. libyaz_server.la is the generic frontend server facilities and uses POSIX thread functionality if available. The libyaz.la no longer depends on POSIX threads because the number of global structures is limited. NMEM no longer re-uses blocks between threads ; it simply free's memory immediately but allocates in "large" chunks as usual. We don't expect any performance penalties because of this. The yaz_log system is still using a global log_level so caution must be taken when modifying it with yaz_log_init_.. + yaz_log_mask_str. This, however, should not cause any trouble because these functions are called during initialization of application code anyway. `yaz-config --libs server` returns libs for server applications; `yaz-config --libs` returns libs for non-server applications. New OID database - with public definitions in oid_db.h. Removed old OID database including the head oid.h and definitions such as enum oid_value and struct oident. The new OID database uses the same string names as before but the 'protocol' is gone. There are now only two representations raw OID (int *) and string. Functions with prefix yaz_string_to_oid converts from string to OID; functions with prefix yaz_oid_to_string converts the other way. Change to emit_term() in CQL-to-PQF query translation: when a term has the /regexp relation modifier, do not process it for leading and trailing "^" and "*", which have quite different meanings in regular expressions. Attempted fix of bug #976: Segfault in yaz_iconv. The yaz_iconv function write handlers no longer carries a 'last' parameter. This will make yaz_iconv flush "less" characters. A flush is performed by call to yaz_iconv(cd, 0, 0, &outbut, &outbytesleft) . Definition of wrbuf_diags moved to querytowrbuf.h. Function wrbuf_put_zquery removed, because function yaz_query_to_wrbuf does the same. API changes to WRBUF. wrbuf_free removed; replaced by wrbuf_destroy. And wrbuf_puts no longer appends '\0'. Use wrbuf_cstr to get C-string out. Deprecated MARC utility functions removed. Changed prototype of yaz_marc_decode_buf: const char for result and size_t for rsize. Branch split: YAZ_2_1_55_branch --- 2.1.54 2007/03/16 Fix to ZOOM-C so that transparent reconnection is properly handled on connections that are in asynchronous mode. Fixed compilation on OpenBSD 4.0. Large strings in GRS-1 records are now properly displayed in yaz-client. Added character conversion support for "advancegreek"; based on patch from Giannis Kosmas. Fixed yaz_iconv to return YAZ_ICONV_EINVAL if an incomplete MARC-8 combo sequence is met. Before the error was not set so it would be unknown. Adjust yaz-marcdump MARC reader so that it skips until record separator is read --- 2.1.52 2007/03/07 ZOOM-C: Removed hardcoded limit of 1024 sockets in ZOOM_event_sys_poll(). Note that ZOOM_event_sys_select() still has the limit due to the fixed-size fd_set structure used as a bitmask for the FDs to be selected on. Using ACX_PTHREAD macro to check for POSIX threads. Fixed have-vsnprintf check. --- 2.1.50 2007/02/23 Fixes for configure on BSD. Bug #900. Added snprintf/vsnprintf wrappers for systems that don't have limits (heavens forbid). Fixed bug in ZOOM-C's event and task handling. If a ZOOM task was created before all previous tasks were completed and removed from the task queue, the new task could be removed by a mistake. Fixed bug #615: Document retrievalInfo facilities for Frontend Server. Implemented pass-through CQL-to-PQF conversions. Bug #861. Fixed bug #832: Problem with MARC/charset in yaz-client. Fixed bug #668: save command line history for yaz-client. Fixed bug #830: pkg-config support. --- 2.1.48 2007/01/23 Extended ZOOM result set options with two options that may be read by a client: resultSetStatus and presentStatus with values as specified for the ASN.1. See: http://www.loc.gov/z3950/agency/markup/04.html#Search-status Fixed bug #827: Using SSL fails on Debian etch. Fixed bug #826: Weird looking chars for set of MARC records. Implemented alternative Item Order package for ZOOM. If option "doc" is set, that is treated as an ItemOrder with itemRequest being an XML document external. The value of "doc" is the content. Extended the GFS search facility. New member of bend_search_rr 'estimated_hit_count' signals that hits is known to be an estmate (higher or lower than real hit count). New member 'partial_resultset' signals that the search was partial (hit count is lower or equal than real hit count). For Z39.50, the information is stored in resultSetStatus member of SearchResponse APDU. For SRU, the information is signalled via SRU diagnostic 59: "Result set created with valid partial results available". Switched from jade/pdfjdaetex to dblatex for Docbook documentation in PDF. --- 2.1.46 2007/01/13 Implemented bug #806: Deal with HTTP clients sending LF in HTTP headers. Added ZOOM_connection_peek_event. Implemented Generic select hook for ZOOM (bug #803). This is achieved with the following new functions: ZOOM_event_nonblock, ZOOM_connection_process, ZOOM_connection_get_{socket,mask,timeout}, ZOOM_connection_fire_event_{timeout,socket}. The existing blocking event handler, ZOOM_event, is a wrapper for the + blocking ZOOM_event_sys_{poll,select}. Implemented function ccl_xml_config which parses XML version of CCL configuration (bug #798). Fixed bug #797: yaz_marc_write_xml does not honor character conversion. Added timings utility (yaz/timing.h) --- 2.1.44 2007/01/03 Added yaz_marc_write_xml which creates MARCXML/MarcXchange record as Libxml2 tree. Fixed bug #779: Rotation of apdu.log fails. Fixed for character set conversions: Unicode to MARC-8 conversion for certain less preferred UTF-8 sequences. Honor G1 set in MARC-8 decoding. --- 2.1.42 2006/12/17 Fixed bug #775: char conversion does not handle Alternative UTF-8 sequences. Implemented function yaz_marc_read_line which parses MARC line format records. There is a wealth of formats out there. So far, this function reads line records produced by yaz_marc_write_line. yaz-marcdump's options -x, -X, -I, -e have been replaced with the more generic and easier to remember(!) options: -i format and -o format which specifies input format and output format respectively - where format is one of "marc", "marcxml", "line", "marcxchange". Added 'check only' option for MARC utilities. Option -n for yaz-marcdump does not print anything except warnings for records. For yaz-marcdump, added support for MARC split into files (-s) with a given chunk size (-C). Changed the SRU update structures and codecs to reflect the SRU pre 1.0 spec, at http://www.loc.gov/standards/sru/record-update/ This has changed the binary layout of the following structs: Z_SRW_extra_record, Z_SRW_updateRequest, Z_SRW_updateResponse and bend_update_rr . Patch by Ko van der Sloot. Added GFS utility function bend_assoc_is_alive which returns 1 if association is still alive (client is connected); 0 otherwise (client closed connection). This allows busy servers to stop working for impatient clients. Added ziffy: the promiscuous Z39.50 APDU sniffer. until now, ziffy has been a separate piece of software. This version of ziffy has been modified to fit with YAZ. ziffy is copyright Rocco Carbone and covered by GPL v2. Fixed bug #740: Handle SRU records referring to xmlns's outside recordData. Fixed bug #722: Allow Z39.50 Init Options to be specified / retrieved. Client code may now interrogate options such as "init_opt_sort" to find out whether the server claims to support various options. --- 2.1.40 2006/11/27 Added utilities yaz_{set,get}_esn to set/get element set name from record composition. Removed the build of libyazthread.la. The libyaz.so is the threaded version of YAZ and has been so since YAZ 2.1.10. Implemented ZOOM_record_error which returns error information for record (surrogate diagnostic). --- 2.1.38 2006/10/31 Updates for SRU Update by Ko van der Sloot: 1. Changed name from "operation" to "action" 2. Fixed that that "recordIdentifier" was called "recordId". Kept the old versions in the code, marked as 'backward compatible'. 3. Added diagnostics for SRU Update. Fixed bug #709: Records are fetched in wrong format when tasks are queued. Fixed bug #707: CQL->RPN ignores lines with leading spaces. Fixed bug #706: XML hex encoding UTF-8 chars out of range 0-255. For GFS, fixed problem with SRU diagnostic 'First record position out of range' being issued for 0 hits. zoomtst10 part of Windows Build. --- 2.1.36 2006/10/13 Implemented yaz_filepath_comp which splits a path into file path components (required by Zebra 2.0.3+). Change wording of YAZ license to the 'Revised BSD License'. YAZ has used a BSD inspired license until now so this should not have any real impact on anybody. See http://www.opensource.org/licenses/bsd-license.php Fixed bug #687: Missing log lines. Fixed bug #678: CQL to PQF translation does not preserve double-quote escaping. Fixed bug #689: SRU diagnostics to be added. Implemented new ZOOM function, ZOOM_connection_is_idle, which checks whether a connection is idle (no more work do do). --- 2.1.34 2006/10/04 Change type of optval from long to int for invocation of setsockopt with the SO_REUSEADDR option. Thanks to Ateeq A. Altaf, Talis. Added support for specifying the max log file size for the Generic Frontend Server. The size is given with option -r. --- 2.1.32 2006/09/21 Fix problem introduced in YAZ 2.1.28 WRT unix sockets in the ZOOM code. --- 2.1.30 2006/09/17 Fixes for getaddrinfo use, Bugs #655 + #660. These bugs were introduced in YAZ 2.1.28. Fixed bug in Generic Frontend Server that could cause a server to stop accepting new connections. Bug only seen on dual CPU Windows 2003 server. For the generic frontend server, the maximum record size is used as maximum size of incoming packages (SRU + Z39.50). The value until was previously only used in Z39.50 Init negotiation and, later, in a session controlled sizes of records returned. This is controlled using -k option. It can be specified, per server, with element maximumrecordsize in YAZ' GFS XML config. --- 2.1.28 2006/09/04 TCP/IP comstack uses getaddrinfo now to resolve names. It should be IPV6 friendly now. Fixed bug #644: Using Non Reentrant gethostbyname causes SIGSEGV. New option for yaz-marcdump -lpos=value which allows setting a portion of MARC header to a certain value. Fixes for MARC generation when encoded as MARC-8 (bug 642, 643). ZOOM-C reads option extraArgs. If set the value of extraArgs is appended to SRU URI (POST/GET). Value must be URL encoded, such as x-id-a=v1&x-id-b=v2 . --- 2.1.26 2006/08/15 Fixed problem with SRU mode type (soap, get, post) for yaz-client and ZOOM-C. Fixed problem another problem with ZOOM_EVENT_RECV_RECORD . Bug #626. --- 2.1.24 2006/08/08 Fixed MARC ISO2709 encoding routines to deal with character set conversion. Minor changes to GFS logging. Database included in search request log line. Fixes for ZOOM-C: event ZOOM_EVENT_RECV_RECORD was not generated for cached/multiple records. Shared libraries are built by default on Unix+configure. Changed cql2pqf transformation to use a different evaluation order. The new order is: always, relation, structure, position, truncation, index and relationModifier. Old order was: always, relation, relationModifier, structure, index, position, truncation. Note that the the latter ones override former ones for identical attributes.. The new scheme means that it is possible to override any existing attribute with a relationModifier. And also that it is possible to override everything for the index rule (except the ones listed in relationModifier). No order is perfect but this one, we believe, covers more real cases.. The "always" should have been called "default", since the attributes there can be overridden with all the rest. For Libxml2 and friends, YAZ defines YAZ_HAVE_{XML2,XSLT,EXSLT) in the compilation phase, but also for yaz-config --cflags output. This allows us to have public headers with Libxml2 stuff in them . It should also, eventually, make Libxml2 checks redundant in packages using YAZ, such as yazproxy. --- 2.1.22 2006/06/15 Changed SRU update structure bend_update_rr so that SRU diagnostics are stored in uri, message and details.. Previously diagnostics were stored in errcode, errstring. Patch by Ko van der Sloot. Breaks binary compatibility.. but he's probably the only one affected, so. Added support for CCL, compiled on the client side, in ZOOM-C. This is invoked using ZOOM_query_ccl2rpn() with the CCL configuration as input; the resulting query objects can be used for for searching with ZOOM_connection_search() and scanning with ZOOM_connection_scan1(). YAZ' configure searches for OpenSSL by default. SSL comstack uses SL_CTX_use_certificate_chain_file rather than SL_CTX_use_certificate_file. See http://lists.indexdata.dk/pipermail/yazlist/2006-June/001615.html for more info. Thanks to Ko van der Sloot. --- 2.1.20 2006/06/02 Bug #600: SRU GET, POST support for yaz-client. Introduced command 'sru' which selects method SOAP/GET/POST. Allow missingValueAction to be specified for the sortspec string - function yaz_sort_spec. By default, the missing value action is null. Use ! to specify "abort". Use = followed by stringvalue to specify default value. Ensured that Present-handler (if defined) is called in GFS before any call to fetch-hhndler. This now includes piggy-backed presents as well as SRW/U searchRetrieve requests. Documentation for YAZ is now based on the Docbook XML/XSLT using xsltproc + N Walsh's stylesheets. It means that the CVS version of YAZ is no longer depending on jade/openjade or docbook-to-man scripts. PDF is no longer part of the distribution - but can optionally be made using DSSSL/jadetex or FOP. Added retrieval handling support in Generic Frontend Server to support conversion between MARC/XML as well as XSLTtransforms. See etc/yazgfs.xml for an example. Added Authentication support to Generic Frontend Server in SRU mode. Authentication using HTTP Basic is supported, as is the use of 'x-username' and 'x-password' parameters in the request itself. Added support for a new character set MARC8s identical to MARC8 except that it converts combined characters to single Unicode characters in the Latin-1 range (when possible). --- 2.1.18 2006/04/24 ASN.1 compiler 0.4: generates brief Doxygen file header for generated .h/.c files. Utility yaz_iconv now supports conversion to MARC-8. New facilities for the MARC module. The reading - and writing of content are separate methods for the yaz_marc_t handle. The following read functions are available: yaz_marc_read_iso2709 (Reads MARC in ISO2709 format), yaz_marc_read_xml (reads MARC in MARCXML/MarcXchange format). Write functions have prefix yaz_marc_write_.. The existing utilities yaz_marc_decode_wrbuf and yaz_marc_decode_buf are still available. Removed support for OAI-MARC and simplexml (not the simplexml from PHP5). Added a new ZOOM event type ZOOM_EVENT_END which signals no more events to be returned for this connection. --- 2.1.16 2006/03/31 Allow multiple languages and charsets to be specified with yaz-client. Each item must be separated by comma (NO BLANKS). E.g. negcharset iso-8859-1,utf-8 Translation of proximity nodes from CQL into PQF now works. Moved to automake 1.8, 1.9. Added function yaz_log_set_handler which allows a log handler to be installed. This handler will be called for all log messages. Output to file is also produced; but that can be disabled by passing NULL fname to yaz_log_init_file. Fixed another problem with MARC-8 -> ISO-8859-1 conversions. Bug #537. For SRW (including GFS), accept application/soap+xml as content-type for SOAP msg. For GFS in SRU mode, an empty stylesheet in SRU URL (&stylesheet=&) produces NO stylesheet reference even if a default stylesheet is specified in GFS XML config. --- 2.1.14 2006/03/14 Updated Windows package to include yazd.dll + yazd.lib for the Development component. If the environment variable YAZ_LOG is set, then it is used as a string indicating the default level of logging to use if not overridden by calls to yaz_log_init() or yaz_log_init_level(). If it's not defined, then the manifest constant YLOG_DEFAULT_LEVEL is used as before. So, for example, to omit warnings from YAZ logging, export YAZ_LOG=-warn cql_transform() now map structure and other attributes before indexes, so that index-specific structures and other attributes can override defaults. So now a combination of mapping specifications such as: structure.* = 4=1 index.dc.date = 1=date-modified 4=5 does the right thing. cql_transform() now also respects the "always" mapping specification, which establishes an initial set of attributes to be used for all terms except where overridden by more specific attributes associated with the index, relation or modifier. Added SRU-GET and SRU-POST support for ZOOM C. Option "sru" specifies which mode to use; one of "post", "get" or "soap" (SRW, default). Fixes for yaz_iconv routines: changed trie-based character set conversions to use only non-negative values for bit fields due to Sun's C compiler not supporting negative values. Fixed bug in character set conversion yaz_iconv. Some three byte UTF-8 sequences where not read correctly. Fix by Rustam Usmanov. Updated win/makefile to use options, settings which makes things compile with VS C 2005. --- 2.1.12 2006/02/01 Fixed bug in yaz_oi_update which used incorrect value for categoryValue. In ZOOM socket code, use select instead of poll on MacOSX. ZOOM-C now support client-side compilation of CQL into RPN that is sent to the server, enabling CQL to be used against all Z39.50 servers. Use ZOOM_query_cql2rpn() to set the compiled CQL into a ZOOM_query object, and submit it using ZOOM_connection_search(). The CQL-to-RPN translation uses a configuration file, the name of which must be specified in the Connection's "cqlfile" option. ZOOM-C also support CQL scanning, via the new ZOOM_connection_scan1() function, which takes as its start-term parameter a ZOOM_query object (which may have had either CQL or RPN set into it). --- 2.1.10 2005/11/29 Added ZiNG Update Support. New codecs are defined in srw.h. Extended the GFS to support this as well. Backend handler, bend_srw_update, does the update work. Code contributed by Ko van der Sloot. Allow retrieval of Search Result-1 information in ZOOM by the use of options that are attached to a result set. ZOOM documentation updated accordingly. Fixed bug #416: First/second comb characters not handled in the MARC-8 to UTF-8 conversion. Patch by Raj Patel. Added option -m to GFS to control formatting of timestamps in log file. Added 'exit' as synonym for 'quit' in yaz-client Added support for specifying SRW resultSetId + resultSetIdleTime in a Generic Frontend Server's search handler. Refer to include/yaz/backend.h for the new members. Patch by Ko van der Sloot. Added support for SRU POST. It is supported for content-type application/x-www-form-urlencoded only. Patch by Ko van der Sloot. Do not build the separate Multi-threaded (MT) library libyazthread.la. Instead make the library libyaz.la multi-threaded. Threading as a whole can still be disabled by configure option --disable-threads. Previosly, with older GLIBCs there were problems with MT libs under Apache. This has now been fixed a long time ago. Fixed bugs in yaz_log that occurred on Sparc Solaris in Multi-threaded applications. CQL module modified to be case insensitive for relations/indexes/operations. Fixed bug in CQL transform code: incorrect value relationModifieder was used. Added 'show all' command for yaz-client which retrieves all results for last search. Added new yaz-client, xmles, which takes a (private) OID and a document to be sent as an extended service request. Describe new yaz-client commands wait_response and set_auto_wait. Increase TCP/IP listener backlog from 3 (which I am guessing was copied from the SunOS manual entry way back when) so SOMAXCONN, so that the socket will queue as many incoming connections as it's able to handle ongoing connections. In other words, it will never now refuse a connection that it would be able to handle merely because it's not got around to accepting() enough of the pending connections yet. This is the behaviour anyway under Linux, where the listen() argument is ignored; but not under BSD and on systems such as MS-Windows that use BSD-derived TCP/IP stacks. The behaviour of YAZ-based servers should now be uniform across operating systems in this respect. yaz-marcdump uses 64-bit file access on some systems. This is enabled on Linux and other Unix variants where _FILE_OFSET_BITS=64 is supported. This allows yaz-marcdump to read large MARC batches (>2 GB). Modified all YAZ source files - except the source which is auto-generated by tools - to use spaces rather than TABS. Emacs/VIM trailer added to all source files. Add ZOOM_connection_option_getl() and ZOOM_options_getl(), corresponding to the existing *_setl() function. These allow option values containing arbitrary valuues. Add ZOOM_resultset_sort1(), which should ALWAYS be used in place of ZOOM_resultset_sort() in new applications. Its behaviour is identical except that it returns an indicator of whether or not the sort criterion was accepted (0 for OK, -1 for invalid). --- 2.1.8 2005/06/07 Fixed bug in yaz_marc_decode_buf. By mistake the routine appended MARC output rather than returning "new" buffer. yaz-client warns about unknown init options. Fixed bug #371: "options concurrentOperations ignores concurrentOperations" --- 2.1.6 2005/05/24 Added support for SRW sort in Generic Frontend Server. Patch by Ko van der Sloot. Member srw_sortKeys in bend_search_rr holds sortKeys - or NULL if none is provided. Fixed bug #307: It was impossible to specify indefinite/no timeout for ZOOM_event. Special timeout value -1 now means indefinite timeout (i.e. no timeout). Added support for multiple languages and charsets to be specified in ZOOM. Each charset/language is separated by a blank. If negotiation is in effect in init-response, Option "negotiation-charset-in-effect-for-records" set to 1(true) or 0(false). Code based on patch by Vasiliy Osadchuk. Fixed bug #306: infinite recursion that occurred when calling yaz_log_level_init as the first call (before other log level or nmem_init calls) Fixed bug in scan handling in front end server: if preferred-Position-In- Response was non-present, a NULL pointer referece was performed. --- 2.1.4 2005/04/26 Changed include/yaz/diagbib1.h and added include/yaz/diagsrw.h with diagnostic messages+codes for Bib-1 and SRW. Preprocessor defines are now defined for all those error codes. So instead of putting 109 in your program you'd use YAZ_BIB1_DATABASE_UNAVAILABLE. The messages are generated from a .csv - file. See src/bib1.csv and srw/srw.csv. Modified the yaz-marcdump utility to skip garbage bytes between MARC records in a file. Fixed bug - uninitialized memory - due to bad code for fix of bug #272. Program yaz-client now exits and produces an error message if multiple Z39.50 servers are specified on the command line (none or one allowed only). Program yaz-marcdump skips garbage bytes between ISO2709 records rather than abort. --- 2.1.2 2005/03/16 Fixed bug #273: Update for recent MARC-8 -> UNICODE changes. Fixed bug #272: Preserve spacing for CCL terms. --- 2.1.0 2005/03/14 Added support for virtual hosts and multiple backend servers for the YAZ frontend server. The configution is XML based and support specificition of CQL to RPN mappings and explain information. See section "Virtual Hosts" in the YAZ manual. Extended OPAC display utility. OPAC display utility renders bibliographic (MARC) record as well. Added yaz_opac_decode_wrbuf to supplement yaz_marc_decode_wrbuf. Fixed a bug in MARC decoder that could caused it to crash for some invalid MARC records. More diagnostics and warnings where added in XML output (warnings, etc are stored in comments). --- 2.0.34 2005/02/08 Fixes for UNIX domain sockets. Bug #261. Fixes for MARC-8 to UTF-8 conversion. Bugs #258 and #260. Fixed bug #263: YAZ MARCXML dump shows extra spaces after control fields. Added yaz_marc_subfield_str which defines subfield lead string which is used in YAZ_MARC_LINE format. Default string is blank+$. Added yaz_marc_endline_str which defines end of fields string used in YAZ_MARC_LINE format. Default string is newline. Experimental support for MarcXChange. This format can be produced by yaz-marcdump and is implemented in yaz_marc_decode - functions. http://www.bs.dk/standards/MarcXchange.xsd Added yaz-client commands scansize that sets maximum number of entries to be returned by scan. --- 2.0.32 2005/01/11 Added support for SRW scan in yaz-client and Generic Frontend Server. * Added whereInList member to SRW Scan Term. * Changed Z_SRW_scanRequest to be able to carry both CCL and PQF. Fixed NMEM system to return aligned blocks on the smallest boundaries that are suitably aligned for all possible types on the particular architecture YAZ is being built for. --- 2.0.30 2005/01/04 Fixed numerious warnings that was issued with newer versions of GCC. Fixed NMEM system to return aligned blocks on 8 byte boundaries rather than 4 bytes, since 4 may not be enough on some systems such as GCC 3.4.3 on Solaris. Make YAZ Generic Frontend Server slightly faster. Enhance (and reduce) logging for Generic Frontend Server. Revert YAZ log system so that it flushes every write operation by default. (YAZ 2.0.26 and earlier verisons did that). Bug #240. Modified the YAZ logging system. The LOG level defines use YLOG_ prefix instead of LOG_, due to name clash with syslog(3). LOG_ are still present. New applications should define YAZ_USE_NEW_LOG=1 - this will effectively disable old definitions. --- 2.0.28 2004/11/09 Added yaz_log_time_format which specifies log format using strftime(3). Added yaz_log_module_level which returns mask for a module. Value is non-zero mask a if module is enabled; zero if disabled. * Fixed bug #148: CQL parser may leak. A few prototypes were changed in include/yaz/cql.h. Fixed bug #176: Dont throw diagnostics on empty SRU args. Fixed bug #175: surrogate diagnostics in SRW lacking NS. Fixed bug #172: RPM builds does not enable SSL. Doxyfile.in part of dist. Doxyfile generated by configure. Configure aborts if any of --with-xml2, --with-openssl, --enable-tcpd are given and the corresponding component does not exist. Extend CCL documentation in YAZ reference. Describe r=r. --- 2.0.26 2004/10/01 Fixed MARC->MARCXML conversion to properly deal with fields, subfields, indicators having non-ASCII characters. Fixed MARC->MARCXML conversion so that ASCII control characters except TAB,CR,LF are removed from resulting XML (XML 1.0 does not support these). Added YAZ GFS support for conversion from Z39.50 surrogate diagnostics to SRW surrogate diagnostics. Bug fix: YAZ GFS did not return schema in explainResponse. --- 2.0.25 2004/09/30 The YAZ GFS when converting SRW/SRU requests to Z39.50 structures now converts recordSchema to elementSetName as well as schema URI. Fixed bug in COMSTACK that prevented HTTP request packages from being decoded properly. --- 2.0.24 2004/09/29 Added CCL facility r=r "range" which is similar to r=o "ordered" but does not require white-space before and after the dash in a range, e.g. x=-1990 is equivalent to x <= 1990 iff r=r, but equivalent to x= -1980 iff r=o. Fixed a few AC_TRY_LINK configure tests that did not operate properly due to new GCC removing "redundant" code. Added yaz-client commands scanpos and scanstep that sets preferred position and step-size for scan. Macro YAZ_INIT in yaz.m4: option --with-yazconfig renamed to --with-yaz. Added CCL utility ccl_qual_buf which parses one or more CCL spec lines in a buffer. Added CCL utility ccl_qual_line which adds CCL qualifier line consisting of name and value - ignoring empty lines and comments. On Windows, the debug DLL/import lib is now named yazd.{dll,lib}. Added odr_get_element_path which returns current element path for an ODR handle. This utility is useful in error handling or user-defined ODR_PRINT stream. Added ODR_PRINT utility odr_set_stream which is is a more generic alternative to odr_setprint. odr_set_stream takes a stream handle, pointer to a write function and pointer to close function. The close function - if non-NULL - will be called during odr_destroy. Fixed bug in CCL parser where truncation char was not removed from right side when truncation=both was in effect. Fixed CQL parser to use unsigned chars for isxxx from ctype.h due to VS.NET. --- 2.0.23 2004/08/11 Fix buffer overrun in CQL parser when dealing with proximity (%). Fixes for MARC-8 in yaz_iconv character set utilies. The MARC-8 to UTF-8/UCS conversion is now only based on codetables.xml. yaz_marc_decode_buf sets leader pos 9 to "a" for MARCXML output. --- 2.0.22 2004/08/06 Add support for more "commit changes" in ZOOM (uses Extended Services). For yaz-client, command set_marcdump / -m dumps SUTRS/XML/.. records as well. Yet another small fix for configure of SSL. --- 2.0.21 2004/05/14 Fix SSL libs for configure when --with-openssl=DIR is given. --- 2.0.20 2004/05/10 Add autoconf m4 macro YAZ_DOC for YAZ documentation setup (docbook). SSL comstack now uses yaz.pem certificate file on server side by default. Certificate filename can be configured by calling comstack function cs_set_ssl_certificate_file before cs_bind is used. Fix bug regarding multiple calls to ZOOM_connection_connect. Implement cs_set_ssl_ctx which sets SSL_CTX for SSL comstack. Do not create SSL_CTX in cs_create (ssl_type). Create in tcpip_bind, tcpip_rcvconnect instead. This allows user to set custom SSL_CTX. ZOOM now allows inspection of X509 peer certificate for verification. The X509 buffer is retrived by reading ZOOM option "sslPeerCert". Removed libyazssl.la. When SSL is enabled, libyaz.la has SSL support and all programs have too (yaz-ztest, yaz-client, zoom..). May not be as "modular" but it simplifies things. Added cs_get_peer_certificate to that returns peer X509 PEM. Added cs_get_ssl that returns SSL handle (SSL *) for SSL comstack; returns NULL if SSL is unavailable. Documentation about MARC decoding tools. Fix --disable-tcpd to really disable tcpd. Patch by Robin H. Johnson. --- 2.0.19 2004/03/30 Rename CHANGELOG to NEWS to follow GNU style packing. Fix bug with missing initialization of member in init_diagnostics. This bug affects threaded version of GFS server. --- 2.0.18 2004/03/20 Use wrbuf_xmlputs_n instead of wrbuf_write_cdata to avoid clash with Zebra symbol. Ensure zlib.dll is packed with Windows install. --- 2.0.17 2004/03/17 Fix encoding of xsd:string to use text instead of CDATA. Fix endless loop in CQL parser with unbalanced ". Use a more compact way to store MARC-8 conversion tables. --- 2.0.16 2004/03/16 Debian only Oleg Kolobov Fixed a bug in yaz_iconv regarding conversion to UCS4 / UCS4LE. Update CQL parser to use new CQL 1.1 modifiers for booleans and relations. Add CQL test cases. --- 2.0.15 2004/03/01 Another fix for decoding of XML packed records. --- 2.0.14 2004/02/25 Fixes for Chunked encoding. White space not ignored after length spec. Update NS and use default NS for SRW diagnostic elements. --- 2.0.13 2004/02/23 Implement ZOOM_resultset_cache_reset which resets record cache. Implement ZOOM_resultset_sort which sorts a result set. Implement chunked HTTP transfer. For SSL, use -lssl -lcrypto on systems that don't have pkg-config. --- 2.0.12 2004/02/16 Added member 'schema' to bend_explain_rr structure so that backend can specify explain record identifier. Defaults to Zeerex 2.0. Fix encoding of OID's of form 1.0.X. Bug introduced in 2.0.11. --- 2.0.11 2004/02/16 * SRW/SRU 1.1 updates: updated diagnostic in srw.h to use uri instead of code. Added init command for yaz-client which sends "extra" init request. Fixed two bugs in OID codec - ber_oidc. Throw error when encoding/decoding bad truncated OID. Fix decoding of OID X.Y... when X=2 and Y>39. Fixed a bug in ASN.1 compiler that caused Type-1 Operator codec to fail. Make ZOOM error code for "invalid query". Fixed compilation for SSL which wasn't properly enabled for all platforms. --- 2.0.10 2004/02/05 For yaz.m4, allow second argument for YAZ_INIT to hold minimal version of YAZ required. * SRW/SRU 1.1 updates. Diagnostic code now a URI. Added option -p to make Generic Frontend Server to write PID file. Added option -D to put Generic Frontend Server in background on its own. Make ZOOM C recognize option "password". If unset, "pass" is used (for backwards compatibility). Fixed a bug in Generic Frontend Server that could make it crash if a client sets characterSetNegotation bit, but didn't pass negotiation stuff in InitRequest. New YAZ client command, zversion, that sets Z39.50 version (1,2,3..). Must be issued before open, in order to be in effect. --- 2.0.9-6 2004/01/12 Debian/Windows Make the SRU server more picky WRT unknown params, etc. Bug fix: ZOOM scan response didn't return displayTerm - when present. New YAZ client command, options, that sets Z39.50 options. New utility functions yaz_init_opt_{encode,decode} to encode/decode Z39.50 options from a string of tokens (one token for each option bit). Update SRW diagnostic code messages. --- 2.0.9-5 2004/01/07 Debian/Windows Handle user defined stylesheet for SRW/SRU. --- 2.0.9-4 2004/01/06 Debian/Windows Fix bug in decoding of Content-Length. --- 2.0.9-3 2004/01/06 Debian/Windows Fix a bug with decoding of XML packed records. --- 2.0.9-2 2004/01/05 Debian only Allow empty ODR (NMEM=0) for odr_oiddup and odr_getoidbystr. Fix bug in SRW/SRU diagnostics decoding. --- 2.0.9 2004/01/05 Fixed bug in Generic Frontend Server which could drop records exceeding preferred message size. Reported and fixed by Irina Dijour. Fixed calculation of package size for structured records in Generic Frontend Server. Reported and fixed by Irina Dijour. Fixed namespace for SRW/SRU diagnostics. Fixed SEGV in yaz-client that occured for HTTP connection errors. --- 2.0.8 2003/12/22 * SRW/SRU 1.1. Since the Namespace has changed for SRW/SRU, it means that this version is incompatible with version 1.0 and older YAZ SRW/SRU implementations. CQL changes to reflect recent changes to the specification: * Documentation talks about context sets instead of index sets. * Documentation talks about indexes instead of qualifiers. * The CQL-to-PQF transformer's configuration file now uses "index.set.name = " instead of the old form "qualifier.set.name = ". (Both forms are still understood but the latter is deprecated.) * CQL terms with no explicit index specified are now interpreted as cql.serverChoice instead of srw.serverChoice (which of course behaves exactly the same.) --- 2.0.7 2003/12/16 MARC conversion can now generate ISO2709 output in another character set. yaz-marcdump uses this facility if you invoke it with option -O. Added missing C decl macros for include/yaz/{soap.h,srw.h,cql.h}, so that functions from there can be used from C++. --- 2.0.6 2003/12/04 Frontend server now transfers memory from decoded packages to stream ODR for search. NMEM now clears freed blocks with 'Y' (hex 59) to force bad memory references to show up. ZOOM-C now supports standard ZOOM option names as described in v1.4 of the ZOOM Abstract API. The older names for the same options are still also supported for the benefit of old applications. ZOOM-C supports "implementationId" and "implementationVersion" options to go along with "implementationName". These allow the user code to specify identification strings to be sent to servers. Add OID for the new ExtLite attribute set. Add OIDs for NACSIS-CATP, FINMARC2000 and MARC21-fin record-syntaxes, as requested/supplid by Ere Maijala For generic frontend server, reverse the order of "toolkit-supplied / application-supplied" strings sent as implementationId, Name and Version. Also, remove the spaces around the slash. This brings the GFS in line with the behaviour of ZOOM-C on the client side. Add function ZOOM_scanset_display_term. yaz-client shows scan displayTerm if present. Utility yaz-iconv is now installed by default along with the man page yaz-iconv.1. Extend configure check for OpenSSL to use pkg-config where available (such as RedHat 9). Incorporate patch by Morten Bogeskov which allows a Unix file socket server to specify uid/gid/mask for socket using the format unix:[user=uid,][group=gid,][umask=mask,]file=path If file= is omitted the existing format is assumed, e.g. unix:path in which case the mask is 0666 (rw for everybody). Major restructure of YAZ source. All source in libyaz is in src directory. Programs in client (yaz-client), ztest (yaz-ztest), zoom (zoom programs), util (utility programs such as ASN.1 compiler, yaz-marcdump). Added man page for utility yaz-marcdump (used to be called marcdump). yaz-marcdump is installed by 'make install'. Fixed a memory leak in Generic Frontend Server that occurred when decoding of incoming package failed. Fixed a potential DOS attack vulnerability in COMSTACK/ODR. Change prototype of odr_perror: add const to message string. New function yaz_log_reopen which reopens log file (for log rotate, etc.) * Blocking parameter for COMSTACK cs_create is now a bit mask rather than a blocking flag. Bit 0 is set for blocking, reset for non-blocking. Bit 1 is set if cs_addrstr should avoid DNS lookup; reset for full DNS lookup. There should not be any compatibility problems with this assuming that blocking=1 or 0 is used. Fix bad reference in UNIX comstack in function cs_addrstr. Fix for compilation on AIX. The generic front-end server (server/seshigh.c) now supports returning Init diagnostics to the client in User-information-field, in accordance with Z35.90 Implementor Agreement 5 (Returning diagnostics in an InitResponse) --- 2.0.4 2003/09/04 Allow any CQL relation (not just all,any,exact,scr). Fixes for OCLC UI ASN.1 to make it work with SilverPlatter targets that features the same UI. Implemented command update0 in YAZ client which is equivalent to update but uses old of Ext Update ASN.1. Use OID 1.2.840.10003.15.1000.81.1 for privately defined charsets in charset negotiation. Added VAL_ID_CHARSET in oid.h. Previously no OID was used for this info. ZOOM uses smallSetUpperBound=1 instead of 0 for piggyback searches. It apparantely upsets EBSCO Publishing IR Z39.50 Server which returns 'malformed search term' otherwise. SortResponse member resultCount now set to NULL in sort handler of frontend server. OPAC support ZOOM. ZOOM_record_get returns OPAC info (as XML) if type is "opac". Add three new utility functions for translating OIDs between various formats -- symbolic name such as "Usmarc", minus-1-terminated int arrays and dotted strings such as "1.2.840.10003.9.5.1": int *oid_name_to_oid(oid_class oclass, const char *name, int *oid); char *oid_to_dotstring(const int *oid, char *oidbuf); char *oid_name_to_dotstring(oid_class oclass, const char *name, char *oidbuf); Reverted modifications for ES Update definition for z_IU0Update (OID 1.2.840.10003.9.5.1 and 1.2.840.10003.9.5). The definition is back to YAZ 2.0.2. String value attributes for CCL parser. Support for OCLC's locally registered "OCLC-UserInformation" PDU, which their FirstSearch server returns in Init responses, sometimes carrying useful diagnostic information when Init fails. This has the OID 1.2.840.10003.10.1000.17.1 and is defined in the file "z39.50/oclcui.asn", where its definition is somewhat different from what OCLC document on their web-site, as required to interoperate with their servers. Support for anonymous authentication in yaz-client. Use the command "auth -". * Fix the OID of the Index Data-local "admin" Extended Service from 1.2.840.10003.9.81.1 to 1.2.840.10003.9.1000.81.1. The omission of the 1000, which indicates a locally-defined OID, was a mistake. --- 2.0.3 2003/06/20 Fix CCL directive @case handling so that it affects string match for both CCL keywords and qualifiers. * ESFormat-Update updates. Packages with OID 1.2.840.10003.9.5.1 and 1.2.840.10003.9.5 are now handled by the same decoder z_IU0Update . Decoder has been updated with ASN.1 changes as listed in http://lcweb.loc.gov/z3950/agency/defns/updateES.html Note that the "latest" DB Update, OID 1.2.840.10003.9.5.1.1 , handler z_IUUpdate, remains unchanged. ZOOM_record_get may now return a record in a specific character set. For type use "form; charset=from[,to]" where form (render, xml, ..) , "from" is the character set of record as returned by target. "to" is the character set to be returned. If omitted, "to" is UTF-8. YAZ ASN.1 compiler renamed from yaz-comp to yaz-asncomp New ODR utility, odr_getelement, which returns name of element for which encoding/decoding failed. Fixed ODR so that it returns error code OREQUIRED rather than ONONE in cases where a required element was omitted. Bug fix: some MARC8 sequences were not converted. New ZOOM option "step" which specifies number of records to be retrieved in one chunk. Used in conjunction with "start" and "count". SRW support for yaz-client. Use scheme http: to use it, e.g. http://host:port/db yaz-client no longer does (un)intelligent character set conversions by default. Can be enabled with charset and marc_charset commands. xmalloc trace fix for 64-bit systems such as DEC alpha. Solaris 2.6 compile fix. New function, cql_strerror() translates SRW error codes, as returned by cql_transform_error(), into human-readable English strings. Used in yaz-client diagnostics when appropriate. New CQL2RPN query-type for the command-line yaz-client, parses CQL and converts it into a type-1 query which is sent to the server. This makes CQL available for use with all Z-servers, as opposed to the tiny minority that can handle CQL queries themselves. --- 2.0.2 2003/04/28 New Debian package layout similar to the Redhat Package layout. New ZOOM events ZOOM_EVENT_RECV_{RECORD,SEARCH} for receiving a record and search result respectively. --- 2.0.1 2003/04/25 Redhat package is now several packages: libyaz (runtime libraries), libyaz-devel (development and documentation, and yaz (utility programs). Package spec file by Morten Bogeskov. New member 'schema' in struct bend_fetch_rr which the name of requested schema (SRW/SRU) for record (or NULL if none was given). The fetch handler MAY set this to reflect the schema of the returned record. New member 'display_term' in struct scan_entry. GFS now sets member entries and allocates scan entries to be filled by user scan handler. In previous version, entries member was allocated by the scan handler. That still works, but the GFS will ignore member display_term - assuming it was NOT set by the handler. The fact that the GFS now allocates the entries both allows for new members and makes a scan handler easier to write. Fix CQL lex buffer overflow. SRW/SRU recordPacking. For SRW default recordPacking is string. For SRU default recordPacking is string. SRU protocol support for frontend server. Fix compile bug for systems that have nl_langinfo but CODESET undefined. Added missing PQF transform rules for <= and >= . Thanks to Peter Popovics. Added scan for the ZOOM shell (zoomsh). --- 2.0 2003/02/23 * String Identifers for Schemas (Amendment 5). http://lcweb.loc.gov/z3950/agency/amend/am5.html Old definition for schema Odr_oid *schema; /* OPT */ New: int which; union { Odr_oid *oid; Z_InternationalString *uri; #define Z_Schema_oid 1 #define Z_Schema_uri 2 } schema; /* OPT */ * resultCount parameter to Sort Response (Amendment 1). http://lcweb.loc.gov/z3950/agency/amend/am1.html Support for SRW 1.0 over HTTP. This is an optional feature and requires libxml2 to operate. Enable SOAP by specifying --with-xml2 for configure. Generic frontend server supports HTTP/SOAP/SRW and Z39.50/BER on the same port. SRW SearchRetrieveRequests are mapped to bend_init,bend_search,bend_fetch,bend_close. Z39.50 Query Type-104 added - to facilitate CQL within Z39.50. CQL support. Source is directory 'cql'. CQL is supported in ZOOM (both SRW and Z39.50) and the YAZ client (Z39.50 only). ZOOM connections are SRW based if schem http is used for hostname in connect, e.g. z = ZOOM_connection_new("http://myserver"); ZOOM_query may be of type CQL, e.g. ZOOM_query_cql(q, "dc.title=x"); CCL proximity operators !n, %n converts to PQF @prox 0 n 1 2 k 2 and @prox 0 n 0 1 k 2 respectively, meaning: exlusion=false, distance=n, order=true/false, relation=le, prox unit=word. If n is omitted, distance 1 is used. Fixed problem with C compiler include path in wrong order. For TCP/IP COMSTACK, set recv buffer to an appropriate "large" value on Solaris. Patch from Ko van der Sloot. New MARC decode API. All new functions operate on a yaz_marc_t handle. The most important new functions are: yaz_marc_create, yaz_marc_decode_{buf,wrbuf}, yaz_marc_destroy, .. to create handler, decode and destroy respectively. Decoder can produce formats MARC line, simple XML, OAI MARC and MARC XML (LoC). See include/yaz/marcdisp.h. YAZ Iconv utility now supports MARC8 decoding (marc8.c). Converts to UTF-8, UCS-32, wchar_t or Latin-1. * Prototypes for yaz_iconv_-functions moved to separate header include/yaz/yaz-iconv.h. Make a few private functions 'static' in unix.c. This prevents duplicate unix_close in PHP with YAZ and imap. PHP Bug 20977. For ZOOM connection, the options targetImplementation{Id,Name,Version} are set when Init Response is received. New function ZOOM_connection_error_x similar to ZOOM_connection_error but returns diagnostic set as well. New function yaz_strerror which is a portable wrapper for strerror/strerror_r/GetLastMessage. * ZOOM_record_get supports type "xml" in which case MARC XML (from LOC) is returned for MARC. If type is "oai", then OAI MARC is returned. Fix creation of lib/yaz-config so it works if srcdir != objdir. Patch from Kang-Jin Lee. --- 1.9.2 2002/11/26 yaz_marc_decode uses OAI MARC as XML format for ISO2709 records. Fix bad race conditions on SIGTERM and terminate gracefully in frontend server. Move retrieval (data1) module to Zebra since nobody seems to be using it. Add GRS-1 render for ZOOM using same format as yaz-client. --- 1.9.1 2002/10/05 Added man pages: yaz-client(1), yaz-ztest(8), yaz(7), zoomsh(1). Fix broken ESpec handling in data1 module. SGML reader parses comments and makes them part of the data1 tree. Added several type casts so that YAZ compiles as C++ code. ZOOM didn't handle PDU encoding failures properly. Added more Bib-1 diagnostics (approved extensions). GNU configure: better check for iconv. More portable use of accept, getpeername. Check for socklen_t. Use int/size_t if socklen_t is not defined. --- 1.9 2002/09/06 PQF parser rejects bad queries - including those with extra characters in them. PQF parser used to silently ignore that. Cleaner API for PQF added, which allows you to get detailed error information for bad queries (see yaz/pquery.h). Fixed bug in ZOOM_record_get for type "database". Implemented mini iconv library supporting conversions between UTF-8, UCS4, UCS4LE and ISO-8859-1. Implemented in util/siconv.c. * Removed XML reader (d1_expat.c). It's part of Zebra instead. --- 1.8.9 2002/08/20 Fixed ZOOM C record cache so that preferredRecordSyntax and elementSetName is used to check for already fetched records. --- 1.8.8 2002/08/02 Added three members in bend_initrequest structure to facilitate character set negotiation. Fixed a bug in frontend server that could cause indefinite loops under rare conditions. Revised character set utilities (charneg.h) so that encoding UCS-4, UCSA-4, UTF-16 and UTF-8 are encoded non-privately. For PQF, directive @term sets term type for Scan/Search. Here is general, string, numeric, null. The term type is inherited - just like @attr. New call odr_set_charset that sets character set conversion for international-strings on a ODR stream. Prototype is: int odr_set_charset(ODR o, const char *to, const char *from); The InternationalString is still represented as C string in YAZ so native strings of type UTF-8, ASCII, etc. will work (UTF-16 won't). On the protocol level, you can use any encoding. Support for UNIX sockets in ZOOM. Solaris recv sometimes returns errno == ENOENT. It is treated as EINPROGRESS. COMSTACK patch by Ko van der Sloot. New COMSTACK of type UNIX Socket. Use "unix:/path" as address for both client and server. Code by Morten Bogeskov. --- 1.8.7 2002/05/22 On Windows ZOOM functions are of type __stdcall rather than __cdecl, so that they can be used directly from Visual Basic. You must recompile your windows APP if you're using ZOOM. Character Set and Language Negotiation(3) for ZOOM API and YAZ client. Commands "lang" and "charset" sets language and character set respectively. Options "lang" and "charset" is interpreted by the ZOOM API. Note, these are not part of the official ZOOM spec) All is due to Oleg Kolobov. Attributes from multiple CCL fields may be OR'ed rather than merged using directive "@field or". Fields are still merged by default - equivalent to "@field merge". Fixed bug in ZOOM connect that occurred on OpenBSD (maybe others). Patch by Oleg Kolobov. Fixed bug in zget for parameter ExtendedServicesResponse. Fix OID for ILL. --- 1.8.6 2002/03/25 Added PQF feature: '@attr type=value' may be written as '@type=value'. Client displays USR.1:SearchResult-1 (hits per term). Additional Search Info for search in Generic Frontend Server. Fixed CCL parsing of "field=s". WIN32 installer - using the excellent NSIS software from nullsoft. Fixed CCL parsing of "field = - ". Added function yaz_marc_decode that decodes MARC for line mode display or XML (similar to that used by JZKit). Fixed BER decoding of OPTIONAL CHOICE. The bug didn't affect the Z39.50. But ISO/ILL was, however. Added patch by Rustam T. Usmanov that implements Z39.50 duplicate detection service (Z39.50-1995 Amendment 2) and Language Negotiation (3). See: http://lcweb.loc.gov/z3950/agency/amend/am2.html http://lcweb.loc.gov/z3950/agency/defns/charneg-3.html --- 1.8.5 2002/02/03 New YAZ client features: Command completion and new commands: push_command, set_apdufile, set_marcdump, set_cclfields, register_oid. Code provided by Jacob Poulsen. New call oid_trav, that visits all registered OIDs via callback. Function ZOOM_record_get now returns const char pointer rather than void pointer. It saves a lot of type casts. For YAZ client, command "auth" now allows you to set authentication in IdPass style. It is enabled when three tokens are given - order is user, group and password. Fix memory leaks in MARC record handling for ZOOM. New option for YAZ client, -k that sets maximum record size. Similar to -k option for generic frontend server and yaz-ztest. More fixes for scan. Non-zero stepSize handled. OID's fixes. Prefix query parser reports "fail" when bad attribute set is given. Fix in MARC decoder. Proximity logging. Fix for attribute set in scan handler for server. Patches by Shigeru Ishida. SSL/COMSTACK updates. cs_rcvconnect completes SSL handshake. ZOOM works with SSL. Configure option --with-openssl= now works when a directory is specified. Patch provided by Morten Bogeskov. New option for YAZ client, -u , that sets authentication. ZOOM fix: error information was sometimes "missing", since error was cleared/reset too when it shouldn't. ZOOM_record_get returns ISO2709 buffer when "raw" is given. --- 1.8.4 2002/01/04 Scan for ZOOM API. New object ZOOM_scanset. New functions ZOOM_connection_scan, ZOOM_scanset_size, ZOOM_scanset_term and ZOOM_scanset_destroy. New ZOOM function, ZOOM_connection_last_event, that returns type of last event (such as "receive data", "send data", "apdu received", etc. New ZOOM option, schema, that specifies schema for retrieval. New CCL feature. Qualifiers can be aliases for one or more other qualifiers (if more than one is given, OR is used). ZOOM uses named result sets if target supports it. Two new YAZ client commands: . (dot, which sources a script of YAZ client commands), and ! (to execute shell command.). Implemented by Jacob Poulsen. Working on Debian packages. --- 1.8.3 2001/11/19 YAZ client enables named result sets only if target supports it. *** ZOOM. Prefix for ZOOM definitions changed from Z3950_ to ZOOM_. * ZOOM. Removed Z3950_connection_host. Use Z3950_connection_option_get with key="host" to get same result. * ZOOM. Added Z3950_record_clone and removed Z3950_resultset_get. Function Z3950_resultset_record(s) returns references to records "owned" by resultset. To become owner use Z3950_record_clone. Function z_ext_record handles Extended Services. Thanks to Irina Dijour. --- 1.8.2 2001/11/12 CCL Parser fix: ignore token comma when dealing with and-lists. Documentation updates for COMSTACK. * ZOOM changes. Query object renamed from Z3950_search to Z3950_query. Changed prototype Z3950_records. For some functions, int parameters were changed to size_t. TCP/IP COMSTACK no longer uses getprotobyname to avoid memory leak on some Unices. New MARC decode/display function, marc_display_exl, which properly rejects non-ISO2709 records. YAZ client uses it. --- 1.8.1 2001/10/29 Fix bug: local attribute set wasn't set correctly in PQF strings. --- 1.8 2001/10/25 * Old Z39.50 codecs no longer supported. Added ZOOM C binding. See http://zoom.z3950.org/ Renamed states for COMSTACKs to avoid confusion with events. Implemented cs_look and proper cs_rcvconnect. Fixed COMSTACK error that occurred on HPUX. Fix by Giannis Kosmas. Configure detects POSIX threads on OpenBSD. When sort flag 'i' was specified in yaz-client the caseSensitivy flag was set to a wrong value. Thanks to Robert Sanderson for reporting this. When error is returned from present handler, non-surrogate diagnostic is returned in present response (and fetch handler is no longer called). * Minor adjustments to pquery parser (PQF). Token characters may be escaped by using backslash (C-style). PQF parser allows string attribute values to be specified. For @attr, non-numeric characters after the equal-sign are treated as strings (e.g. @attr 9=title). CCL trunction character may be defined (@truncation in file) * function zget_ExtendedServicesRequest sets waitAction to waitIfPossible (was wait). Added cs_set_blocking to set change blocking mode of a COMSTACK. Thanks to Matthew Carey. CCL operator names may be set in field definition files (CCL_bibset). See ccl/bib1 for an example. Fixes in ASN.1 compiler for C++ compatibility. * Renamed members "and" and "or" in struct Z_Operator to "op_and" and "op_or" to avoid conflict with C++. Fixed problem with GNU readline detection on Redhat 7.0. Added step-size for Scan backend handler. Fixed bug that made the frontend server crash when no attribute set was specified for scan. Front-end server automatically switches to original working directory when installed as an NT service. Previously -w had to be specified to make it work. Added extended attributes for retrieval module (data1), so that data1 records carry d1_readXML/SGML attributes. d1_read also supports null-data rules ( ) On UNIX when POSIX threads are available, a separate library libyazthread is created. Programmers should link with that library and the yaz library when using threads. The reason for the split was that some applications on Linux, such as Apache, doesn't work well when using shared objects that relies on threads. Added SSL support for the COMSTACK. You start yaz-client and yaz-ztest (or any frontend server) in SSL mode by specifying ssl: followed by address. Only tested on UNIX. Added feature for CCL module. Virtual structure s=al or s=ol generates and-list and or-list respectively instead of phrase search. Added some OID's. * Added prefix "yaz_" for the functions log_init.., log_file.. and log_mask_str. This was done to avoid name conflicts with other libraries (such as other PHP extensions). Added raw OID member for preferred record syntax (request_format_raw) and returned record syntax (output_format_raw) for backend fetch method. Config file yaz-config now accepts options so that it returns specific compile settings, etc. Thanks to Morten Bogeskov Shared library support for UNIX using GNU libtool. * Modified backend interface. Request/Response struct's replaced by one read/write C struct. For example bend_fetchrequest and bend_fetchresult have been replaced by single bend_fetch_rr struct. Every handler - even search has to be registered in bend_init handler. This means that the YAZ library no longer refers to external functions and it makes it possible to make the whole thing a single DLL/SO. Added Segment handler for backend server. Added Zmbol/Zebra administrative functions to YAZ client. Threaded frontend server on UNIX (when POSIX Threads are available). Starting the server with option -T enables multi-threading. --- 1.6 2000/03/03 Added configure option --enable-comp/disable-comp to control use of YAZ ASN.1 compiler. Use --disable-comp to use the old *coders located in sub directory asn. YAZ ASN.1 compiler renamed to yaz-comp in sub directory. It's installed in ${exec_prefix}/bin along with the other programs yaz-client and yaz-ztest. GNU automake used to maintain makefiles. Added several OID's. Changed retrieval module so that we can load records with no abstract syntax defined. Tagpaths in these records are fully composed of string tags. Implemented ISO ILL protocol. Refer to stuff in sub directory ill. --- 1.5 1999/12/10 On UNIX, the generated makefile now supports a proper 'make install'. The prefix can be set via GNU configure to set the install location (default is /usr/local). * YAZ programs client and ztest were renamed to yaz-client and yaz-ztest to avoid conflicts when users install YAZ in "standard" locations, such as /usr/bin,/usr/local/bin,etc. * YAZ Header files were moved from include to include/yaz. YAZ Header files are referred to as include rather than . The YAZ include path (-I ..) is therefore the same as before. Programmers should update their #include statements or use -Ipath/include/yaz instead. The main motivation for doing this change is that YAZ header files can be installed in "standard" locations /usr/include,/usr/local/include without introducing conflicts, since ALL YAZ header files are stored in subdirectory yaz (under /usr/include for example). Compilation of YAZ for WIN32 is now handled by an nmake-style makefile rather than project/workspace files. We switched because project files are incompatible between Visual C++ 5 and 6. Refer to windows.txt for details. Changed name of logging function, logf, to yaz_log, to prevent name clash with some math-log functions. The YAZ header log.h defines logf to yaz_log (#define) so there should be no incompatibilities by this modification. Added bend_start/bend_stop handlers for server. These handler are called on start/stop of server. For windows they are called whenever a service is started/stopped. * YAZ now auto-generates decoders/encoders for the Z39.50 protocol using a fairly small ASN.1 compiler written in Tcl. The compiler is located in util/yc.tcl. The auto-generated C code structures are, in a few cases, incompatible with the old decoders. There are differences in the following C structures Z_DiagRec, Z_External, Z_SortRequest, Z_SortResponse, Z_AttributesPlusTerm, Z_ProximityOperator, Z_DefaultDiagFormat. The preprocessor variable ASN_COMPILED is defined when the compiled ASN.1 is being used. Encoder/decoder routines as well as the Z39.50 protocol ASN.1 is located sub directory z39.50. If you wish to use the old encoders/decoders you can specify --disable-yc for configure. Assigned OID for old DB Update (VAL_DBUPDATE0). Updated YAZ compiled version so that it supports both new - and old version of DB Update * Added 'name' parameter to ODR encoder/decoder routines to facilitate pretty ODR print. Updated whole Z39.50 encoder/decoder to reflect the change. The name parameter can be set to 0 in which no name is specified for the construction. The macros odr_implicit and odr_explicit sets name parameter to zero for the construction involved. New macros odr_implicit_tag and odr_explicit_tag are similar to the others, except that a name parameter is added. For programmers' that don't use ODR they probably only need to change the call to z_APDU and z_External. Added access control facility by interfacing the TCP wrapper library. YAZ automatically attempts to find the TCP wrapper Library (-lwrap) and tcpd.h on Unix systems. For the server, option -d specifies the name of the daemon and enables the access control as specified in hosts.allow/hosts.deny. Refer to man pages tcpd(8) and hosts_access(5). Fixed memory leak in ccl_find_str and ccl_qual_rm. Thanks to Hans van den Dool . Added reference ID parameter to most functions in server API - refer to backend.h. Thanks to Hans van den Dool . Changed name of ccl library to libccl.a (was ccl.a). Fixed bug in decoder for Explain (Category TargetInfo). Added support for GNU readline in client. Thanks to Jacob Poulsen . GNU configure attempts to detect if readline is available. * CHANGED DEFINITION OF ES: UPDATE (INCLUDING THE OID) to reflect the new definition from the ZIG. NOTE THIS IF YOU HAVE AN UPDATE IMPLEMENTATION! This change was made to the development version before the ZIG decided to retract the amendment. If any users MUST be compatible with the original Update definition, PLEASE CONTACT US, and we will include a separate definition corresponding to the old Update ES. Note that because of the change to the ASN.1 of the TaskPackageRecordStructure we cannot define a single structure that will support both versions. * Added const modifier to buffer parameter for some ODR/BER encoding routines: ber_dectag, ber_declen, odp_more_chunks, completeBER, completeWAIS, odr_dumpBER. Fixed bug in client.c which caused a crash when a scanResponse didn't contain positionOfTerm. * Fixed inconsistency in the ScanResponse/ListEntries protocol. This * will cause an error in a client if a non-YAZ target sends both a * list of Scan entries and non-surrogate diagnostics. Retrieval module enhancements. Tag sets may be typed in the reference to it. From the .abs-file the "tagset" directive takes a third optional integer type for the tag set referenced. From a .tag-file the "include" directive takes a third optional type as well. The old "type" directive in the tag set itself is still recognized but acts as the default type for the tag set. Backend interface change. Individual Scan terms returned from bend_scan may also be tagged as Surrogate Diagnostics. Refer to struct scan_entry in include/backend.h. Retrieval module enhancements. Multiple tag sets and attribute sets may be specified in abstract syntax specs. Revised the error/warning for logging messages reported by the retrieval module when reading the various spec files. Object Identifier system (oid_..) changed. The API is backwards compatible but the oid-routines now allocates new OID's when needed. Raw OID's may be specified in oid_getvalbyname. YAZ now uses GNU configure to generate Makefile(s). * Minor changes in some of the member names of DeleteResultSetRequest and DeleteResultSetResponse. See include/proto.h. * Changed some C definitions regarding EXPLAIN record syntax (prt-exp.h) and added member 'languages' in TargetInfo (which was missing). Changed the way attribute sets are handled in the retrieval module. These are now cached, just like the abstract syntaxes (schemas). Changed YAZ so that it links with compiled ASN.1. Added Explain-schema definitions and mapping routines. The following Explain categories have been implemented: AttributeDetails, AttributeSetInfo, DatabaseInfo, CategoryList and TargetInfo. Fixed minor bug in Windows version of Server Library. --- 1.4pl2+ 1998/4/17 (Released with Zebra) Added Extended Services to server (backend.h). Thanks to Charles Woodfield. Added EXTERNAL: UNIverse Resource Report (non-standard). Implemened odr_enum and odr_set_of functions to handle ASN.1 types ENUMERATED and SET OF. * Added 'const' to some of the char pointer arguments for the functions, data1_read_node, data1_getelementbytagname, data1_insert_taggeddata, data1_getesetbyname, data1_getelementbyname, data1_get_absyn. Fixed bug in data1_insert_taggeddata - the last_child member of parent wasn't initialised. * Changed data1_read_record and data1_read_node so that the supplied "SGML"-buffer is read-only. In particular the resulting data1 - tree doesn't refer to any parts of the "SGML"-buffer. Fixed bug in server library (Windows version of statserv_remove). * Changed code so that it compiles as C++. The type definition of Odr_fun which is a member of Odr_arm was changed. The result is, that an explicit typecast is needed for the fun pointer when using Odr_arm - as in: {1, -1, -1, Z_IdAuthentication_idPass, (Odr_fun)z_IdPass}, Updated TagSet-G and -M definitions (tagsetm.tag and tagsetg.tag). Implemented the new structured date and time definition as approved by the ZIG. Added schemaId element to the specificTag in Espec-1 (also approved at the last ZIG). Thanks to RVDM. Added some Object identifiers (RVDM). Changed the Update Extended Service (RVDM). Added command "refid" to client which specifies referenceId for the following requests. Implemented extended service handling for server. See ztest.c for an example as well as backend.h. New handlers are registerd in the Init handler. * Changed interface for sort in server. Added new members to statserv_options_block. It allows a server to read options from another source than just the command line. Thanks to Charles Woodfield. * Changed definition of Z_Triple in file prt-grs.h - member boolean renamed to zboolean. Some C++ compilers complained about the name. Minor changes to gils.abs. Added index 's' (sort) on title and date/time-last-modified. --- 1.4pl2 1998/1/30 Fixed bug in server library regarding inetd mode (-i). This bug was introduced by release 1.4. --- 1.4pl1 1998/1/29 Added sort facility in client and backend server interface. Fixed problem with dependencies in Makefile(s). Fixed bugs for encoders/decoders of extended services and SearchInfoReport. Implemented sub-tree feature for schemas. Sub-trees are referenced in *.abs-files. See explain.abs for an example of the use of this feature. Modified bib1.att; local attributes for ANY didn't include ANY itself (only affects use of the retrieval module). Fixed bug in plain SGML reader in function data1_read_node: tags with prefix "var" was incorrectly interpreted as variants. Added feature "sub-schemas" to enable references to - and definitions of - group of elements. * Removed member parent from type data1_element (in data1.h). Implemented function odr_nullval() that returns the value of ODR_NULLVAL. * Removed member num_children from data1_node (in data1.h). Made NT service interface part of the server library. The function statserv_main uses the NT service when required and calls the statserv_start / statserv_close routines. Routine zget_SearchRequest and zget_PresentRequest fills resultSetName/Id member with "default" instead of "Default". Fixed memory leak in server. Request queue member wasn't freed. Fixed nmem_exit so that memory is freed. --- 1.4 1997/10/2 Revised the CCL parser utility to be thread safe. Added function, oid_ent_to_oid, to replace the function oid_getoidbyent, which is not thread safe. * Added nmem_init and nmem_exit to initialize and release NMEM resources. Function nmem_init should be called once in the initial thread before NMEM/ODR is used. statserv.c and client.c have been changed accordingly. The change was necessary to make NMEM thread safe. The NMEM memory pool is shared amongst threads in a process. Unix-based applications will still work fine without calling this. Added NT Services interface for the the Z39.50 (statserv) Server. Refer to the ztest.c source on the usage. Windows 95/NT port using MSVC5.0. Project files are included in the distribution. * Defined new 'global' handle for the retrieval (data1) system. The new handled, data1_handle, describes the state of the data1 system. This handle is passed as first argument to virtually all data1 related routines. The functions data1_create and data1_destroy creates and destroys a data1 handle respectively. Added ODR encode stream member to all backend request structures init, search, scan etc. This stream should be used to allocate all memory used for the response when thread safe operation is needed. Changed the comstack utility, cs_addstr, to be thread safe. The returned hostname string returned by the function is now part the COMSTACK instance. Added comstack utility, cs_straddr, which replaces the tcpip_strtoaddr function. The cs_straddr takes a COMSTACK handle as argument, so this function must be used after cs_create and before bind/connect. This function is thread safe. Moved test server to 'ztest' directory - generic server code still in 'server' directory. Made prefix query (pquery.c) utility thread safe. Added new function modifier YAZ_EXPORT to 'export' public DLL functions when using windows (see include/yconfig.h). Added definitions to the OID database (util/oid.c) (RVDM). Added new BIB-1 diagnostic messages to the handler diagbib1_str. Added call to ccl_rpn_delete in client program. Added ODR argument to ccl_rpn_query and ccl_scan_query to provide release of RPN structure. Added support for C++, headers uses extern "C" for public definitions. With input from RVDM. In handling of SEQUENCE OF: Counter set to zero when SEQUENCE OF is absent. Thanks to Ronald van der Meer (RVDM). Added initializers (zget_ routines) for a number of PDUs. Thanks to RVDM. Added support for private extensions to the OID database (oid_setprivateoids()). Thanks to RVDM. Added optional, physical ANY (key replication) Fixed null-reference problem in GRS-1 output filter. Proximity operator added to Prefix Query Format (PQF). In test client command "base" accepts multiple databases. Fixed bug in cs_close stack that caused trouble with WINSOCK. --- 1.3 1996/10/11 Fixed tagging bug in ResourceReportResponse PDU encoder/decode. Smallish bug-fixes in the new encoders/decoders (explain). Bug fixed in DeleteRequest. Fixed tagging bug of type 101 query in SearchRequest-Query PDU encoder/decoder. Fixed tagging bug in ResourceReportResponse PDU encoder/decode. Added SOIF syntax (using private OID for now) to retrieval module and client. Added Update extended service. Added SearchResult-1 additional info structure. Added optional CCL (ISO8777) interpreter as separate module. Available in linemode client. --- 1.2 1996/6/10 (1st anniversary release) Added Summary record syntax. Lightly tested. Added OPAC record syntax. Untested. Added ResourceReport service encoders/decoders. Untested. Fixed bug in z_Unit - wrong tagging on unitSystem. Fixed bug in the DiagRecs decoder. Added options for max PDU size and session timeout to frontend-server. Added documentation of query-language parsers and other supporting utilities. [frontend-server] Added Attribute set to the bend_scanrequest API. [frontend-server] NextResultSetPosition was sometimes set incorrectly when surrogate diagnostics were generated. [retrieval] Allow multiple local values for attribute. [retrieval] Allow multiple attributes per element in .abs files. index type. [retrieval] Added Summary tagset, abstract syntax, and d1-node/ASN filter. --- 1.1pl2 1996/4/10 Minor changes, mostly specific to Zebra's requirements (retrieval) --- 1.1 1996/2/20 Repaired bug in frontend server when running multiple listening endpoints in dynamic mode. z_External() now won't break if a known, ASN.1 value comes encapsulated in an octet-string. The value will pass through unmodified in an Odr_oct. Added a bit of code to the demo client to decode & display ASN.1-structured records represented in the octet-aligned branch of the EXTERNAL CHOICE. Thanks to CAS for prodding us to finally do this. Added z_ext_getentbyref() to the ASN module. Doc updated. * Completed the SCAN definition in the ASN module. This may break SCAN code based on older YAZ-versions at compile-time. The fix is easy - look in proto.h. * Added 'displayTerm' and OtherInformation to the TermInfo structure under the SCAN definition. Remember to initialize this, server-people. Comstack should now support the WAIS protocol in TCP/IP mode. Note that this does not extend to ODR and ASN. Comstack allows insertion of established socket (primarily for inetd-operation of servers). Doc updated. Front-end server can now start from the inetd in TCP mode. Doc updated. --- 1.0pl4 1996/1/24 Added Sort PDU. Fixed small problem in SUTRS-filter. A newline was sometimes inserted before the rank and record number. Adjustments to the frontend server. Fixed diagnostic BER dumper. It ignored the file argument. --- 1.0pl3 1996/1/2 Various changes to retrieval module. Changed the union discriminators of the protocol files from enums to ints paired with #defines. *Changed oident.class to oident.oclass to avoid a reserved word in C++ compilers. *Changed operator in the RPN structure to 'roperator', again to avoid a conflict with C++. Fixed problems in Explain decoders/encoders. --- 1.0pl2 1995/12/6 Memory bug in log module fixed. --- 1.0pl1 1995/12/5 Occasional malloc() of 0 bytes fixed in d1_espec.c. Bug in Explain DatabaseInfo module fixed. Some '\r' snuck into one or two of the ret'l config tables. A curse on Windows. --- 1.0 1995/11/28 The shift to v1.0 signals that we now consider the *core* functionality of YAZ reasonably stable (the core being more or less equivalent to Z39.50-1992). Some of the really nifty v3 stuff is still not heavily tested (Explain not at all - though that will happen soonish). Minor changes to code to support Windows port. Various minor changes after we're getting to use GRS-1 & co. more. Added Espec-1 format. Added VisibleString field body type to GRS-1. It is illegal acc. to my copy of the protocol and it cannot be selected when encoding (maps into 'string' when decoding). Needed to talk to some servers. Demo client can request simple element set names. Added Diagnostic Format encoders/decoders. Added simple Close handling to frontend server (no hooks for resource reporting yet), and demonstration client. Added cs_addrstr() command to COMSTACK to retrieve peer hostname/address. --- 1.0b3 1995/08/24 Fixed bug in the frontend-server. The numberOfRecordsReturned field was handled incorrectly when records were requested in the searchResponse. This will only affect you if you use the frontend-server. Added GRS-1 encoders/decoders to the service-level API. Lightly tested. Test-client will ask for and print GRS1. Ztest will return dummy records on request. Added Explain encoders/decoders to the service-level API. Untested. Added Extended Services: Item Order encoders and decoders to the Service- level API. Untested. We could use a recent copy of the pertinent bits of the ILL protocol to add those bits. Added diagnostic format 1 encoders/decoders to the service-level API. Untested. Moved pretty-printing of structure-wrappers ({..}) from odr_seq.c to odr_cons.c, which causes a more correct output. Fixed handling of searchRequest in frontend server. NextResultSetPosition was always set to 0 when no records were requested in the searchRequest. * Added better external-handling. This shouldn't harm old code that *encodes* externals. It can break code that looks for a 'single-ASN1-type' representation, since those types that are known are now decoded immediately. Look at the SUTRS sample code in seshigh.c and client.c. Documentation updated. Handling of structured records in bend_fetchresponse. Length -1 marks structured record, type is deduced from format field. --- 1.0b2 1995/06/27 Fairly quick maintenance release to add SUTRS support. Fixed handling of SUTRS records in the demonstration client. * Added format field to the bend_fetchrequest and bend_fetchresponce structures of the backend API (frontend server). When the record is returned, the value of the format field is mapped to an OID. The value VAL_SUTRS will also cause a slightly different ASN.1 packaging of the record. The special value VAL_NONE in the bend_request means that no specific format was requested by the client. Documentation updated accordingly. Test server (ztest) will return a fixed dummy SUTRS record if your client requests SUTRS. Documentation updated accordingly. You can now set external libraries and RANLIB support in the top-level Makefile. --- 1.0b 1995/06/19 First public release. yaz-5.34.0/doc/tools.retrieval.html0000664000175000017500000005050514357765254014147 000000000000006. Retrieval Facility

6. Retrieval Facility

YAZ version 2.1.20 or later includes a Retrieval facility tool which allows a SRU/Z39.50 to describe itself and perform record conversions. The idea is the following:

  • An SRU/Z39.50 client sends a retrieval request which includes a combination of the following parameters: syntax (format), schema (or element set name).

  • The retrieval facility is invoked with parameters in a server/proxy. The retrieval facility matches the parameters a set of "supported" retrieval types. If there is no match, the retrieval signals an error (syntax and / or schema not supported).

  • For a successful match, the backend is invoked with the same or altered retrieval parameters (syntax, schema). If a record is received from the backend, it is converted to the frontend name / syntax.

  • The resulting record is sent back the client and tagged with the frontend syntax / schema.

The Retrieval facility is driven by an XML configuration. The configuration is neither Z39.50 ZeeRex or SRU ZeeRex. But it should be easy to generate both of them from the XML configuration. (Unfortunately the two versions of ZeeRex differ substantially in this regard.)

6.1. Retrieval XML format

All elements should be covered by namespace http://indexdata.com/yaz . The root element node must be retrievalinfo.

The retrievalinfo must include one or more retrieval elements. Each retrieval defines specific combination of syntax, name and identifier supported by this retrieval service.

The retrieval element may include any of the following attributes:

syntax (REQUIRED)

Defines the record syntax. Possible values is any of the names defined in YAZ' OID database or a raw OID in (n.n ... n).

name (OPTIONAL)

Defines the name of the retrieval format. This can be any string. For SRU, the value is equivalent to schema (short-hand); for Z39.50 it's equivalent to simple element set name. For YAZ 3.0.24 and later this name may be specified as a glob expression with operators * and ?.

identifier (OPTIONAL)

Defines the URI schema name of the retrieval format. This can be any string. For SRU, the value is equivalent to URI schema. For Z39.50, there is no equivalent.

The retrieval may include one backend element. If a backend element is given, it specifies how the records are retrieved by some backend and how the records are converted from the backend to the "frontend".

The attributes, name and syntax may be specified for the backend element. The semantics of these attributes is equivalent to those for the retrieval. However, these values are passed to the "backend".

The backend element may include one or more conversion instructions (as children elements). The supported conversions are:

marc

The marc element specifies a conversion to - and from ISO2709 encoded MARC and MARCXML/MarcXchange. The following attributes may be specified:

inputformat (REQUIRED)

Format of input. Supported values are marc (for ISO2709), xml (MARCXML/MarcXchange) and json (MARC-in-JSON).

outputformat (REQUIRED)

Format of output. Supported values are line (MARC line format); marcxml (for MARCXML), marc (ISO2709), turbomarc, marcxchange (for MarcXchange), or json (MARC-in-JSON ).

inputcharset (OPTIONAL)

Encoding of input. For XML input formats, this need not be given, but for ISO2709 based input formats, this should be set to the encoding used. For MARC21 records, a common inputcharset value would be marc-8.

Note

If inputformat is marc and inputcharset is marc-8, then effective inputcharset is UTF-8 if leader position has value 'a' (MARC21 rule).

outputcharset (OPTIONAL)

Encoding of output. If outputformat is XML based, it is strongly recommended to use utf-8.

leaderspec (OPTIONAL)

Specifies a modification to the leader for the resulting output record. The leaderspec is a comma separated list of pos=value pairs, where pos is an integer offset (0 - 23) for leader. Value is either a quoted string or an integer (character value in decimal). For example, to set leader at offset 9 to a, use 9='a'. This has same effect as -l for yaz-marcdump(1).

select

The select selects one or more text nodes and decodes them as XML. The following attributes may be specified:

path (REQUIRED)

X-Path expression for selecting text nodes.

This conversion is available in YAZ 5.8.0 and later.

solrmarc

The solrmarc decodes solrmarc records. It assumes that the input is pure solrmarc text (no escaping) and will convert all sequences of the form #XX; to a single character of the hexadecimal value as given by XX. The output, presumably, is a valid ISO2709 buffer.

This conversion is available in YAZ 5.0.21 and later.

xslt

The xslt element specifies a conversion via XSLT. The following attributes may be specified:

stylesheet (REQUIRED)

Stylesheet file.

In addition, the element can be configured as follows:

param (OPTIONAL)

A param tag configures a parameter to be passed to the XSLT stylesheet. Multiple param tags may be defined.

rdf-lookup

The rdf-lookup element looks up BIBFRAME elements in some suitable service, for example http://id.loc.gov/authorities/names and replaces the URIs for specified elements with URIs it finds at that service. Its configuration consists of

debug (OPTIONAL)

Attribute to the rdf-lookup tag to enable debug output. A value of "1" makes the filter to add a XML comment next to each key it tried to look up, showing the URL, the result, and timing. This is useful for debugging the configuration. The default is not to add any comments.

timeout (OPTIONAL)

Attribute of the rdf-lookup tag which defines timeout in seconds for the HTTP based rdf-lookup.

namespace (OPTIONAL)

A namespace tag declares a namespace to be used in the xpath below. The tag requires two attributes: prefix and href.

lookup (REQUIRED)

A section that defines one tag to be looked up, for example an author.The xpath attribute (REQUIRED) specifies the path to the element(s).

key (REQUIRED)

A tag withing the lookup tag specifies the value to be used in the lookup, for example a name or an ID. It is a relative Xpath starting from the tag specified in the lookup.

server (OPTIONAL)

Specifies the URL for server to use for the lookup. A %s is replaced by the key value to be looked up. If not specified, defaults to the same as the previous lookup section, or lacking one, to http://id.loc.gov/authorities/names/label/%s . The method attribute can be used to specify the HTTP method to be used in this lookup. The default is GET, and the useful alternative is HEAD.

See the example below.

This conversion is available in YAZ 5.19.0 and later.

6.2. Retrieval Facility Examples

Example 7.19. MARC21 backend

A typical way to use the retrieval facility is to enable XML for servers that only supports ISO2709 encoded MARC21 records.

     <retrievalinfo>
       <retrieval syntax="usmarc" name="F"/>
       <retrieval syntax="usmarc" name="B"/>
       <retrieval syntax="xml" name="marcxml"
		  identifier="info:srw/schema/1/marcxml-v1.1">
         <backend syntax="usmarc" name="F">
	   <marc inputformat="marc" outputformat="marcxml"
		 inputcharset="marc-8"/>
	 </backend>
       </retrieval>
       <retrieval syntax="xml" name="dc">
         <backend syntax="usmarc" name="F">
	   <marc inputformat="marc" outputformat="marcxml"
		 inputcharset="marc-8"/>
           <xslt stylesheet="MARC21slim2DC.xsl"/>
	 </backend>
       </retrieval>
     </retrievalinfo>

     

This means that our frontend supports:

  • MARC21 F(ull) records.

  • MARC21 B(rief) records.

  • MARCXML records.

  • Dublin core records.


Example 7.20. MARCXML backend

SRW/SRU and Solr backends return records in XML. If they return MARCXML or MarcXchange, the retrieval module can convert those into ISO2709 formats, most commonly USMARC (AKA MARC21). In this example, the backend returns MARCXML for schema="marcxml".

     <retrievalinfo>
       <retrieval syntax="usmarc">
         <backend syntax="xml" name="marcxml">
	   <marc inputformat="xml" outputformat="marc"
		 outputcharset="marc-8"/>
	 </backend>
       </retrieval>
       <retrieval syntax="xml" name="marcxml"
		  identifier="info:srw/schema/1/marcxml-v1.1"/>
       <retrieval syntax="xml" name="dc">
         <backend syntax="xml" name="marcxml">
           <xslt stylesheet="MARC21slim2DC.xsl"/>
	 </backend>
       </retrieval>
     </retrievalinfo>

     

This means that our frontend supports:

  • MARC21 records (any element set name) in MARC-8 encoding.

  • MARCXML records for element-set=marcxml

  • Dublin core records for element-set=dc.


Example 7.21. RDF-lookup backend

This is a minimal example of the backend configuration for the rdf-lookup. It could well be used with some heavy xslt transforms that make BIBFRAME records out of MarxXml.

        <backend syntax="xml" name="rdf-lookup">
          <rdf-lookup debug="1" timeout="10">
            <namespace prefix="bf" href="http://id.loc.gov/ontologies/bibframe/" />
            <namespace prefix="bflc" href="http://id.loc.gov/ontologies/bibframe/lc-extensions/"/>
            <lookup xpath="//bf:contribution/bf:Contribution/bf:agent/bf:Agent">
              <key field="bflc:name00MatchKey"/>
              <key field="bflc:name01MatchKey"/>
              <key field="bflc:name11MatchKey"/>
              <server url="http://id.loc.gov/authorities/names/label/%s" method="HEAD"/>
            </lookup>
          </rdf-lookup>
        </backend>

     

The debug=1 attribute tells the filter to add XML comments to the key nodes that indicate what lookup it tried to do, how it went, and how long it took.

The namespace prefix bf: is defined in the namespace tags. These namespaces are used in the xpath expressions in the lookup sections.

The lookup tag specifies one tag to be looked up. The xpath attribute defines which node to modify. It may make use of the namespace definitions above.

The server tag gives the URL to be used for the lookup. A %s in the string will get replaced by the key value. If there is no server tag, the one from the preceding lookup section is used, and if there is no previous section, the id.loc.gov address is used as a default. The default is to make a GET request, this example uses HEAD


6.3. API

It should be easy to use the retrieval systems from applications. Refer to the headers yaz/retrieval.h and yaz/record_conv.h.

yaz-5.34.0/doc/zoom.events.html0000664000175000017500000000777614357765254013316 0000000000000010. Events

10. Events

If you're developing non-blocking applications, you have to deal with events.

    int ZOOM_event(int no, ZOOM_connection *cs);
   

The ZOOM_event executes pending events for a number of connections. Supply the number of connections in no and an array of connections in cs (cs[0] ... cs[no-1]). A pending event could be sending a search, receiving a response, etc. When an event has occurred for one of the connections, this function returns a positive integer n denoting that an event occurred for connection cs[n-1]. When no events are pending for the connections, a value of zero is returned. To ensure that all outstanding requests are performed, call this function repeatedly until zero is returned.

If ZOOM_event returns, and returns non-zero, the last event that occurred can be expected.

    int ZOOM_connection_last_event(ZOOM_connection cs);
   

ZOOM_connection_last_event returns an event type (integer) for the last event.

Table 3.13. ZOOM Event IDs

EventDescription
ZOOM_EVENT_NONENo event has occurred
ZOOM_EVENT_CONNECTTCP/IP connect has initiated
ZOOM_EVENT_SEND_DATAData has been transmitted (sending)
ZOOM_EVENT_RECV_DATAData has been received
ZOOM_EVENT_TIMEOUTTimeout
ZOOM_EVENT_UNKNOWNUnknown event
ZOOM_EVENT_SEND_APDUAn APDU has been transmitted (sending)
ZOOM_EVENT_RECV_APDUAn APDU has been received
ZOOM_EVENT_RECV_RECORDA result-set record has been received
ZOOM_EVENT_RECV_SEARCHA search result has been received

yaz-5.34.0/doc/yaz-log.html0000664000175000017500000002634614357765254012403 00000000000000yaz-log

Name

yaz-log — Log handling in all yaz-based programs

Synopsis

yaz-XXXX [-v loglevel,...] [-l logfile]

DESCRIPTION

All YAZ-based programs use a common log subsystem, and should support common command line options for controlling it. This man page documents those.

OPTIONS

-l logfile

Specify the file where the log is to be written. If none is specified, stderr is used. The log is appended to this file. If the file grows overly large, it is silently rotated: It is renamed to logfile.1, logfile.2, .., 9 (old such file is deleted), and a new file is opened. The limit defaults to 1GB, but can be set by the program. The rotating limit can be specified with option -r for the YAZ frontend server (yaz-ztest).

Rotation can also be implicitly enabled by using a filename which gets changed for a given date, due to substitutions as given by the strftime(3) function.

-v loglevel

Specify the logging level. The argument is a set of log level names, separated by commas (no whitespace!), optionally preceded by a '-' to negate that level. Most programs have their own default, often containing fatal,warn,log, and some application-specific values. The default list can be cleared with the word none, or individual bits can be removed by prefixing them with a dash '-'.

LOG LEVELS TO CONTROL LOGGING

Some of the log levels control the way the log is written.

flush causes the log to be flushed after every write. This can have serious implications to performance, and should not be used in production. On the other hand, when debugging a program crash, this can be extremely useful. The option debug implies flush as well.

notime prevents the writing of time stamps. This is intended for automatic test scripts, which should produce predictable log files that are easy to compare.

GENERAL LOG LEVELS IN YAZ ITSELF

YAZ itself uses the following log levels:

fatal for fatal errors, that prevent further execution of the program.

warn for warnings about things that should be corrected.

debug for debugging. This flag may be used temporarily when developing or debugging yaz, or a program that uses yaz. It is practically deprecated, you should be defining and using your own log levels (see below).

all turns on almost all hard-coded log levels.

loglevel logs information about the log levels used by the program. Every time the log level is changed, lists all bits that are on. Every time a module asks for its log bits, this is logged. This can be used for getting an idea of what log levels are available in any program that uses yaz-log. Start the program with -v none,loglevel, and do some common operations with it. Another way is to grep for yaz_log_module_level in the source code, as in

      find . -name '*.[ch]' -print |
         xargs grep yaz_log_module_level |
         grep '"' |
         cut -d'"' -f2 |
         sort -u
   

eventl, malloc, nmem, odr are used internally for debugging yaz.

LOG LEVELS FOR CLIENTS

zoom logs the calls to the zoom API, which may be useful in debugging client applications.

LOG LEVELS FOR SERVERS

server logs the server functions on a high level, starting up, listening on a port, etc.

session logs individual sessions (connections).

request logs a one-liner for each request (init, search, etc.).

requestdetail logs the details of every request, before it is passed to the back-end, and the results received from it.

Each server program (zebra, etc.) is supposed to define its own log levels in addition to these. As they depend on the server in question, they can not be described here. See above how to find out about them.

LOGGING EXAMPLES

See what log levels yaz-ztest is using:

    yaz-ztest -1 -v none,loglevel
    14:43:29-23/11 [loglevel] Setting log level to 4096 = 0x00001000
    14:43:29-23/11 [loglevel] Static  log bit 00000001 'fatal' is off
    14:43:29-23/11 [loglevel] Static  log bit 00000002 'debug' is off
    14:43:29-23/11 [loglevel] Static  log bit 00000004 'warn' is off
    14:43:29-23/11 [loglevel] Static  log bit 00000008 'log' is off
    14:43:29-23/11 [loglevel] Static  log bit 00000080 'malloc' is off
    14:43:29-23/11 [loglevel] Static  log bit 00000800 'flush' is off
    14:43:29-23/11 [loglevel] Static  log bit 00001000 'loglevel' is ON
    14:43:29-23/11 [loglevel] Static  log bit 00002000 'server' is off
    14:43:29-23/11 [loglevel] Dynamic log bit 00004000 'session' is off
    14:43:29-23/11 [loglevel] Dynamic log bit 00008000 'request' is off
    14:44:13-23/11 yaz-ztest [loglevel] returning log bit 0x4000 for 'session'
    14:44:13-23/11 yaz-ztest [loglevel] returning log bit 0x2000 for 'server'
    14:44:13-23/11 yaz-ztest [loglevel] returning NO log bit for 'eventl'
    14:44:20-23/11 yaz-ztest [loglevel] returning log bit 0x4000 for 'session'
    14:44:20-23/11 yaz-ztest [loglevel] returning log bit 0x8000 for 'request'
    14:44:20-23/11 yaz-ztest [loglevel] returning NO log bit for 'requestdetail'
    14:44:20-23/11 yaz-ztest [loglevel] returning NO log bit for 'odr'
    14:44:20-23/11 yaz-ztest [loglevel] returning NO log bit for 'ztest'
   

See the details of the requests for yaz-ztest

   ./yaz-ztest -1 -v requestdetail
   14:45:35-23/11 yaz-ztest [server] Adding static Z3950 listener on tcp:@:9999
   14:45:35-23/11 yaz-ztest [server] Starting server ./yaz-ztest pid=32200
   14:45:38-23/11 yaz-ztest [session] Starting session from tcp:127.0.0.1 (pid=32200)
   14:45:38-23/11 yaz-ztest [requestdetail] Got initRequest
   14:45:38-23/11 yaz-ztest [requestdetail] Id:        81
   14:45:38-23/11 yaz-ztest [requestdetail] Name:      YAZ
   14:45:38-23/11 yaz-ztest [requestdetail] Version:   2.0.28
   14:45:38-23/11 yaz-ztest [requestdetail] Negotiated to v3: srch prst del extendedServices namedresults scan sort
   14:45:38-23/11 yaz-ztest [request] Init from 'YAZ' (81) (ver 2.0.28) OK
   14:45:39-23/11 yaz-ztest [requestdetail] Got SearchRequest.
   14:45:39-23/11 yaz-ztest [requestdetail] ResultSet '1'
   14:45:39-23/11 yaz-ztest [requestdetail] Database 'Default'
   14:45:39-23/11 yaz-ztest [requestdetail] RPN query. Type: Bib-1
   14:45:39-23/11 yaz-ztest [requestdetail]  term 'foo' (general)
   14:45:39-23/11 yaz-ztest [requestdetail] resultCount: 7
   14:45:39-23/11 yaz-ztest [request] Search Z: @attrset Bib-1 foo  OK:7 hits
   14:45:41-23/11 yaz-ztest [requestdetail] Got PresentRequest.
   14:45:41-23/11 yaz-ztest [requestdetail] Request to pack 1+1 1
   14:45:41-23/11 yaz-ztest [requestdetail] pms=1048576, mrs=1048576
   14:45:41-23/11 yaz-ztest [request] Present: [1] 1+1  OK 1 records returned
   

LOG FILENAME EXAMPLES

A file with format my_YYYYMMDD.log (where Y, M, D is year, month, and day digits) is given as follows: -l my_%Y%m%d.log . And since the filename is depending on day, rotation will occur on midnight.

A weekly log could be specified as -l my_%Y%U.log.

FILES

prefix/include/yaz/log.h prefix/src/log.c

SEE ALSO

yaz(7) yaz-ztest(8) yaz-client(1) strftime(3)

yaz-5.34.0/doc/soap.html0000664000175000017500000000517514357765254011760 00000000000000Chapter 6. SOAP and SRU

Chapter 6. SOAP and SRU

1. Introduction

YAZ uses a very simple implementation of SOAP that only (currently) supports what is sufficient to offer SRU SOAP functionality. The implementation uses the tree API of libxml2 to encode and decode SOAP packages.

Like the Z39.50 ASN.1 module, the YAZ SRU implementation uses simple C structs to represent SOAP packages as well as HTTP packages.

yaz-5.34.0/doc/bib1-diagnostics.html0000664000175000017500000003574014357765254014141 00000000000000Appendix B. Bib-1 diagnostics

Appendix B. Bib-1 diagnostics

List of Bib-1 diagnostics that are known to YAZ.

CodeText
1 Permanent system error
2 Temporary system error
3 Unsupported search
4 Terms only exclusion (stop) words
5 Too many argument words
6 Too many boolean operators
7 Too many truncated words
8 Too many incomplete subfields
9 Truncated words too short
10 Invalid format for record number (search term)
11 Too many characters in search statement
12 Too many records retrieved
13 Present request out of range
14 System error in presenting records
15 Record no authorized to be sent intersystem
16 Record exceeds Preferred-message-size
17 Record exceeds Maximum-record-size
18 Result set not supported as a search term
19 Only single result set as search term supported
20 Only ANDing of a single result set as search term supported
21 Result set exists and replace indicator off
22 Result set naming not supported
23 Combination of specified databases not supported
24 Element set names not supported
25 Specified element set name not valid for specified database
26 Only a single element set name supported
27 Result set no longer exists - unilaterally deleted by target
28 Result set is in use
29 One of the specified databases is locked
30 Specified result set does not exist
31 Resources exhausted - no results available
32 Resources exhausted - unpredictable partial results available
33 Resources exhausted - valid subset of results available
100 Unspecified error
101 Access-control failure
102 Security challenge required but could not be issued - request terminated
103 Security challenge required but could not be issued - record not included
104 Security challenge failed - record not included
105 Terminated by negative continue response
106 No abstract syntaxes agreed to for this record
107 Query type not supported
108 Malformed query
109 Database unavailable
110 Operator unsupported
111 Too many databases specified
112 Too many result sets created
113 Unsupported attribute type
114 Unsupported Use attribute
115 Unsupported value for Use attribute
116 Use attribute required but not supplied
117 Unsupported Relation attribute
118 Unsupported Structure attribute
119 Unsupported Position attribute
120 Unsupported Truncation attribute
121 Unsupported Attribute Set
122 Unsupported Completeness attribute
123 Unsupported attribute combination
124 Unsupported coded value for term
125 Malformed search term
126 Illegal term value for attribute
127 Unparsable format for un-normalized value
128 Illegal result set name
129 Proximity search of sets not supported
130 Illegal result set in proximity search
131 Unsupported proximity relation
132 Unsupported proximity unit code
201 Proximity not supported with this attribute combination
202 Unsupported distance for proximity
203 Ordered flag not supported for proximity
205 Only zero step size supported for Scan
206 Specified step size not supported for Scan
207 Cannot sort according to sequence
208 No result set name supplied on Sort
209 Generic sort not supported (database-specific sort only supported)
210 Database specific sort not supported
211 Too many sort keys
212 Duplicate sort keys
213 Unsupported missing data action
214 Illegal sort relation
215 Illegal case value
216 Illegal missing data action
217 Segmentation: Cannot guarantee records will fit in specified segments
218 ES: Package name already in use
219 ES: no such package, on modify/delete
220 ES: quota exceeded
221 ES: extended service type not supported
222 ES: permission denied on ES - id not authorized
223 ES: permission denied on ES - cannot modify or delete
224 ES: immediate execution failed
225 ES: immediate execution not supported for this service
226 ES: immediate execution not supported for these parameters
227 No data available in requested record syntax
228 Scan: malformed scan
229 Term type not supported
230 Sort: too many input results
231 Sort: incompatible record formats
232 Scan: term list not supported
233 Scan: unsupported value of position-in-response
234 Too many index terms processed
235 Database does not exist
236 Access to specified database denied
237 Sort: illegal sort
238 Record not available in requested syntax
239 Record syntax not supported
240 Scan: Resources exhausted looking for satisfying terms
241 Scan: Beginning or end of term list
242 Segmentation: max-segment-size too small to segment record
243 Present: additional-ranges parameter not supported
244 Present: comp-spec parameter not supported
245 Type-1 query: restriction ('resultAttr') operand not supported
246 Type-1 query: 'complex' attributeValue not supported
247 Type-1 query: 'attributeSet' as part of AttributeElement not supported
1001 Malformed APDU
1002 ES: EXTERNAL form of Item Order request not supported
1003 ES: Result set item form of Item Order request not supported
1004 ES: Extended services not supported unless access control is in effect
1005 Response records in Search response not supported
1006 Response records in Search response not possible for specified database (or database combination)
1007 No Explain server. Addinfo: pointers to servers that have a surrogate Explain database for this server
1008 ES: missing mandatory parameter for specified function. Addinfo: parameter
1009 ES: Item Order, unsupported OID in itemRequest. Addinfo: OID
1010 Init/AC: Bad Userid
1011 Init/AC: Bad Userid and/or Password
1012 Init/AC: No searches remaining (pre-purchased searches exhausted)
1013 Init/AC: Incorrect interface type (specified id valid only when used with a particular access method or client)
1014 Init/AC: Authentication System error
1015 Init/AC: Maximum number of simultaneous sessions for Userid
1016 Init/AC: Blocked network address
1017 Init/AC: No databases available for specified userId
1018 Init/AC: System temporarily out of resources
1019 Init/AC: System not available due to maintenance
1020 Init/AC: System temporarily unavailable (Addinfo: when it's expected back up)
1021 Init/AC: Account has expired
1022 Init/AC: Password has expired so a new one must be supplied
1023 Init/AC: Password has been changed by an administrator so a new one must be supplied
1024 Unsupported Attribute
1025 Service not supported for this database
1026 Record cannot be opened because it is locked
1027 SQL error
1028 Record deleted
1029 Scan: too many terms requested. Addinfo: max terms supported
1040 ES: Invalid function
1041 ES: Error in retention time
1042 ES: Permissions data not understood
1043 ES: Invalid OID for task specific parameters
1044 ES: Invalid action
1045 ES: Unknown schema
1046 ES: Too many records in package
1047 ES: Invalid wait action
1048 ES: Cannot create task package -- exceeds maximum permissible size
1049 ES: Cannot return task package -- exceeds maximum permissible size
1050 ES: Extended services request too large
1051 Scan: Attribute set id required -- not supplied
1052 ES: Cannot process task package record -- exceeds maximum permissible record size for ES
1053 ES: Cannot return task package record -- exceeds maximum permissible record size for ES response
1054 Init: Required negotiation record not included
1055 Init: negotiation option required
1056 Attribute not supported for database
1057 ES: Unsupported value of task package parameter
1058 Duplicate Detection: Cannot dedup on requested record portion
1059 Duplicate Detection: Requested detection criterion not supported
1060 Duplicate Detection: Requested level of match not supported
1061 Duplicate Detection: Requested regular expression not supported
1062 Duplicate Detection: Cannot do clustering
1063 Duplicate Detection: Retention criterion not supported
1064 Duplicate Detection: Requested number (or percentage) of entries
1065 Duplicate Detection: Requested sort criterion not supported
1066 CompSpec: Unknown schema, or schema not supported.
1067 Encapsulation: Encapsulated sequence of PDUs not supported
1068 Encapsulation: Base operation (and encapsulated PDUs) not executed based on pre-screening analysis
1069 No syntaxes available for this request
1070 user not authorized to receive record(s) in requested syntax
1071 preferredRecordSyntax not supplied
1072 Query term includes characters that do not translate into the target character set
1073 Database records do not contain data associated with access point
1074 Proxy failure
yaz-5.34.0/doc/yaz-illclient.10000664000175000017500000000426114357765252012763 00000000000000'\" t .\" Title: yaz-illclient .\" Author: Index Data .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/12/2023 .\" Manual: Commands .\" Source: YAZ 5.34.0 .\" Language: English .\" .TH "YAZ\-ILLCLIENT" "1" "01/12/2023" "YAZ 5.34.0" "Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" yaz-illclient \- ILL client .SH "SYNOPSIS" .HP \w'\fByaz\-illclient\fR\ 'u \fByaz\-illclient\fR [\fB\-f\ \fR\fB\fIfilename\fR\fR] [\fB\-v\ \fR\fB\fIloglevel\fR\fR] [\fB\-D\fR\ \fIname=value\fR...] [\fB\-o\fR] [\fB\-u\ \fR\fB\fIuser\fR\fR] [\fB\-p\ \fR\fB\fIpassword\fR\fR] [\fB\-V\fR] [server\-addr] .SH "DESCRIPTION" .PP \fByaz\-illclient\fR is a client which sends an ISO ILL request to a remote server and decodes the response from it\&. Exactly one server address ( \fIserver\-addr\fR ) must be specified\&. .SH "OPTIONS" .PP \-f \fIfilename\fR] .RS 4 Specify filename\&. .RE .PP \-v \fIloglevel\fR] .RS 4 Specify the log level\&. .RE .PP \-D \fIname=value\fR] .RS 4 Defines name & value pair\&. .RE .PP \-o .RS 4 Enable OCLC authentication\&. .RE .PP \-u \fIuser\fR] .RS 4 Specify user\&. .RE .PP \-p \fIpassword\fR] .RS 4 Specify password\&. .RE .PP \-V .RS 4 Show yaz\-illclient version\&. .RE .SH "EXAMPLES" .PP None yet\&. .SH "FILES" .PP None yet\&. .SH "SEE ALSO" .PP yaz(7) .SH "AUTHORS" .PP \fBIndex Data\fR yaz-5.34.0/doc/installation.win32.html0000664000175000017500000003305014357765254014451 000000000000003. Windows

3. Windows

The easiest way to install YAZ on Windows is by downloading an installer from Index Data's Windows support area . The installer comes with source too - in case you wish to compile YAZ with different compiler options, etc.

3.1. Compiling from Source on Windows

YAZ is shipped with "makefiles" for the NMAKE tool that comes with Microsoft Visual Studio. It has been tested with Microsoft Visual Studio 2017 and 2019.

Start a command prompt and switch the sub directory WIN where the file makefile is located. Customize the installation by editing the makefile file (for example by using notepad). The following summarizes the most important settings in that file:

DEBUG

If set to 1, the software is compiled with debugging libraries (code generation is multi-threaded debug DLL). If set to 0, the software is compiled with release libraries (code generation is multi-threaded DLL).

HAVE_TCL, TCL

If HAVE_TCL is set to 1, nmake will use the ASN.1 compiler (Tcl based). You must set TCL to the full path of the Tcl interpreter. A Windows version of Tcl is part of Git for Windows.

If you do not have Tcl installed, set HAVE_TCL to 0.

HAVE_BISON, BISON

If GNU Bison is present, you might set HAVE_BISON to 1 and specify the Bison executable in BISON. Bison is only required if you use the Git version of YAZ or if you modify the grammar for CQL (cql.y).

A Windows version of GNU Bison can be fetched from here: Index Data's Windows support area .

HAVE_ICONV, ICONV_DIR

If HAVE_ICONV is set to 1, YAZ is compiled with iconv support. In this configuration, set ICONV_DIR to the iconv source directory.

HAVE_LIBXML2, LIBXML2_DIR

If HAVE_LIBXML2 is set to 1, YAZ is compiled with SRU support. In this configuration, set LIBXML2_DIR to the libxml2 source directory.

You can get pre-compiled Libxml2+Libxslt DLLs and headers from here. Should you with to compile those libraries yourself, refer to to Section 3.3, “Compiling Libxml2 and Libxslt on windows”

HAVE_LIBXSLT, LIBXSLT_DIR

If HAVE_LIBXSLT is set to 1, YAZ is compiled with XSLT support. In this configuration, set LIBXSLT_DIR to the libxslt source directory.

Note

libxslt depends on libxml2.

HAVE_ICU, ICU_DIR

If HAVE_ICU is set to 1, YAZ is compiled with ICU support. In this configuration, set ICU_DIR to the ICU source directory.

Pre-compiled ICU libraries for various versions of Visual Studio can be found here or from Index Data's Windows support site.

When satisfied with the settings in the makefile, type

      nmake
     

Note

If the nmake command is not found on your system you probably haven't defined the environment variables required to use that tool. To fix that, find and run the batch file vcvarsall.bat. You need to run it from within the command prompt or set the environment variables "globally"; otherwise it doesn't work.

If you wish to recompile YAZ - for example if you modify settings in the makefile you can delete object files, etc by running.

      nmake clean
     

The following files are generated upon successful compilation:

bin/yaz5.dll / bin/yaz5d.dll

YAZ Release/Debug DLL.

lib/yaz5.lib / lib/yaz5d.lib

Import library for yaz5.dll / yaz5d.dll.

bin/yaz_cond5.dll / bin/yaz_cond5d.dll

Release/Debug DLL for condition variable utilities (condvar.c).

lib/yaz_cond5.lib / lib/yaz_cond5d.lib

Import library for yaz_cond5.dll / yaz_cond5d.dll.

bin/yaz_icu5.dll / bin/yaz_icu5d.dll

Release/Debug DLL for the ICU wrapper utility. Only build if HAVE_ICU is 1.

lib/yaz_icu5.lib / lib/yaz_icu5d.lib

Import library for yaz_icu5.dll / yaz_icu5d.dll.

bin/yaz-ztest.exe

Z39.50 multi-threaded test/example server. It's a WIN32 console application.

bin/yaz-client.exe

YAZ Z39.50 client application. It's a WIN32 console application. See chapter YAZ client for more information.

bin/yaz-icu.exe

This program exposes the ICU wrapper library if that is enabled for YAZ. Only if ICU is available this program is built.

bin/zoomsh.exe

Simple console application implemented on top of the ZOOM functions. The application is a command line shell that allows you to enter simple commands to perform ZOOM operations.

bin/zoomtst1.exe, bin/zoomtst2.exe, ..

Several small applications that demonstrate the ZOOM API.

3.2. How to make apps using YAZ on Windows

This section will go though the process of linking your Windows applications with YAZ.

Some people are confused by the fact that we use the nmake tool to build YAZ. They think they have to do that too - in order to make their Windows applications work with YAZ. The good news is that you don't have to. You can use the integrated environment of Visual Studio if desired for your own application.

When setting up a project or Makefile you have to set the following:

include path

Set it to the include directory of YAZ.

import library yaz5.lib

You must link with this library. It's located in the sub directory lib of YAZ. If you want to link with the debug version of YAZ, you must link against yaz5d.lib instead.

dynamic link library yaz5.dll

This DLL must be in your execution path when you invoke your application. Specifically, you should distribute this DLL with your application.

3.3. Compiling Libxml2 and Libxslt on windows

Download libxml2 and Libxslt source and unpack it. In the example below we install Libxml2 2.9.2 and Libxslt 1.1.28 for 32-bit, so we use the destination directories libxml2.2.9.2.win32 and libxslt-1.1.28.win32 to reflect both version and architecture.

      cd win32
      cscript configure.js prefix=c:\libxml2-2.9.2.win32 iconv=no
      nmake
      nmake install
     

Note

There's an error in configure.js for Libxml2 2.9.2. Line 17 should be assigned to configure.ac rather than configure.in.

For Libxslt it is similar. We must ensure that compilation of Libxslt links against the already installed libxml2.

      cd win32
      cscript configure.js prefix=c:\libxslt-1.1.28.win32 iconv=no \
          lib=c:\libxml2-2.9.2.win32\lib \
	  include=c:\libxml2-2.9.2.win32\include\libxml2
      nmake
      nmake install
     

yaz-5.34.0/doc/server.backendfunctions.html0000664000175000017500000005176114357765254015645 000000000000005. The Backend Functions

5. The Backend Functions

For each service of the protocol, the backend interface declares one or two functions. You are required to provide implementations of the functions representing the services that you wish to implement.

5.1. Init

bend_initresult (*bend_init)(bend_initrequest *r);
    

This handler is called once for each new connection request, after a new process/thread has been created, and an Initialize Request has been received from the client. The pointer to the bend_init handler is passed in the call to statserv_start.

This handler is also called when operating in SRU mode - when a connection has been made (even though SRU does not offer this service).

Unlike previous versions of YAZ, the bend_init also serves as a handler that defines the Z39.50 services that the backend intends to support. Pointers to all service handlers, including search - and fetch must be specified here in this handler.

The request - and result structures are defined as

typedef struct bend_initrequest
{
    /** \brief user/name/password to be read */
    Z_IdAuthentication *auth;
    /** \brief encoding stream (for results) */
    ODR stream;
    /** \brief printing stream */
    ODR print;
    /** \brief decoding stream (use stream for results) */
    ODR decode;
    /** \brief reference ID */
    Z_ReferenceId *referenceId;
    /** \brief peer address of client */
    char *peer_name;

    /** \brief character set and language negotiation

    see include/yaz/z-charneg.h
    */
    Z_CharSetandLanguageNegotiation *charneg_request;

    /** \brief character negotiation response */
    Z_External *charneg_response;

    /** \brief character set (encoding) for query terms

    This is NULL by default. It should be set to the native character
    set that the backend assumes for query terms */
    char *query_charset;

    /** \brief whether query_charset also applies to records

    Is 0 (No) by default. Set to 1 (yes) if records is in the same
    character set as queries. If in doubt, use 0 (No).
    */
    int records_in_same_charset;

    char *implementation_id;
    char *implementation_name;
    char *implementation_version;

    /** \brief Z39.50 sort handler */
    int (*bend_sort)(void *handle, bend_sort_rr *rr);
    /** \brief SRU/Z39.50 search handler */
    int (*bend_search)(void *handle, bend_search_rr *rr);
    /** \brief SRU/Z39.50 fetch handler */
    int (*bend_fetch)(void *handle, bend_fetch_rr *rr);
    /** \brief SRU/Z39.50 present handler */
    int (*bend_present)(void *handle, bend_present_rr *rr);
    /** \brief Z39.50 extended services handler */
    int (*bend_esrequest) (void *handle, bend_esrequest_rr *rr);
    /** \brief Z39.50 delete result set handler */
    int (*bend_delete)(void *handle, bend_delete_rr *rr);
    /** \brief Z39.50 scan handler */
    int (*bend_scan)(void *handle, bend_scan_rr *rr);
    /** \brief Z39.50 segment facility handler */
    int (*bend_segment)(void *handle, bend_segment_rr *rr);
    /** \brief SRU explain handler */
    int (*bend_explain)(void *handle, bend_explain_rr *rr);
    /** \brief SRU scan handler */
    int (*bend_srw_scan)(void *handle, bend_scan_rr *rr);
    /** \brief SRU record update handler */
    int (*bend_srw_update)(void *handle, bend_update_rr *rr);

    /** \brief whether named result sets are supported (0=disable, 1=enable) */
    int named_result_sets;
} bend_initrequest;

typedef struct bend_initresult
{
    int errcode;               /* 0==OK */
    char *errstring;           /* system error string or NULL */
    void *handle;              /* private handle to the backend module */
} bend_initresult;
    

In general, the server frontend expects that the bend_*result pointer that you return is valid at least until the next call to a bend_* function. This applies to all of the functions described herein. The parameter structure passed to you in the call belongs to the server frontend, and you should not make assumptions about its contents after the current function call has completed. In other words, if you want to retain any of the contents of a request structure, you should copy them.

The errcode should be zero if the initialization of the backend went well. Any other value will be interpreted as an error. The errstring isn't used in the current version, but one option would be to stick it in the initResponse as a VisibleString. The handle is the most important parameter. It should be set to some value that uniquely identifies the current session to the backend implementation. It is used by the frontend server in any future calls to a backend function. The typical use is to set it to point to a dynamically allocated state structure that is private to your backend module.

The auth member holds the authentication information part of the Z39.50 Initialize Request. Interpret this if your server requires authentication.

The members peer_name, implementation_id, implementation_name and implementation_version holds DNS of client, ID of implementor, name of client (Z39.50) implementation - and version.

The bend_ - members are set to NULL when bend_init is called. Modify the pointers by setting them to point to backend functions.

5.2. Search and Retrieve

We now describe the handlers that are required to support search - and retrieve. You must support two functions - one for search - and one for fetch (retrieval of one record). If desirable you can provide a third handler which is called when a present request is received which allows you to optimize retrieval of multiple-records.

int (*bend_search) (void *handle, bend_search_rr *rr);

typedef struct {
    char *setname;             /* name to give to this set */
    int replace_set;           /* replace set, if it already exists */
    int num_bases;             /* number of databases in list */
    char **basenames;          /* databases to search */
    Z_ReferenceId *referenceId;/* reference ID */
    Z_Query *query;            /* query structure */
    ODR stream;                /* encode stream */
    ODR decode;                /* decode stream */
    ODR print;                 /* print stream */

    bend_request request;
    bend_association association;
    int *fd;
    int hits;                  /* number of hits */
    int errcode;               /* 0==OK */
    char *errstring;           /* system error string or NULL */
    Z_OtherInformation *search_info; /* additional search info */
    char *srw_sortKeys;        /* holds SRU/SRW sortKeys info */
    char *srw_setname;         /* holds SRU/SRW generated resultsetID */
    int *srw_setnameIdleTime;  /* holds SRU/SRW life-time */
    int estimated_hit_count;   /* if hit count is estimated */
    int partial_resultset;     /* if result set is partial */
} bend_search_rr;
    

The bend_search handler is a fairly close approximation of a protocol Z39.50 Search Request - and Response PDUs. The setname is the resultSetName from the protocol. You are required to establish a mapping between the set name and whatever your backend database likes to use. Similarly, the replace_set is a boolean value corresponding to the resultSetIndicator field in the protocol. num_bases/basenames is a length of/array of character pointers to the database names provided by the client. The query is the full query structure as defined in the protocol ASN.1 specification. It can be either of the possible query types, and it's up to you to determine if you can handle the provided query type. Rather than reproduce the C interface here, we'll refer you to the structure definitions in the file include/yaz/z-core.h. If you want to look at the attributeSetId OID of the RPN query, you can either match it against your own internal tables, or you can use the OID tools.

The structure contains a number of hits, and an errcode/errstring pair. If an error occurs during the search, or if you're unhappy with the request, you should set the errcode to a value from the BIB-1 diagnostic set. The value will then be returned to the user in a nonsurrogate diagnostic record in the response. The errstring, if provided, will go in the addinfo field. Look at the protocol definition for the defined error codes, and the suggested uses of the addinfo field.

The bend_search handler is also called when the frontend server receives a SRU SearchRetrieveRequest. For SRU, a CQL query is usually provided by the client. The CQL query is available as part of Z_Query structure (note that CQL is now part of Z39.50 via an external). To support CQL in existing implementations that only do Type-1, we refer to the CQL-to-PQF tool described here.

To maintain backwards compatibility, the frontend server of yaz always assume that error codes are BIB-1 diagnostics. For SRU operation, a Bib-1 diagnostic code is mapped to SRU diagnostic.

int (*bend_fetch) (void *handle, bend_fetch_rr *rr);

typedef struct bend_fetch_rr {
    char *setname;             /* set name */
    int number;                /* record number */
    Z_ReferenceId *referenceId;/* reference ID */
    Odr_oid *request_format;   /* format, transfer syntax (OID) */
    Z_RecordComposition *comp; /* Formatting instructions */
    ODR stream;                /* encoding stream - memory source if req */
    ODR print;                 /* printing stream */

    char *basename;            /* name of database that provided record */
    int len;                   /* length of record or -1 if structured */
    char *record;              /* record */
    int last_in_set;           /* is it?  */
    Odr_oid *output_format;    /* response format/syntax (OID) */
    int errcode;               /* 0==success */
    char *errstring;           /* system error string or NULL */
    int surrogate_flag;        /* surrogate diagnostic */
    char *schema;              /* string record schema input/output */
} bend_fetch_rr;
    

The frontend server calls the bend_fetch handler when it needs database records to fulfill a Z39.50 Search Request, a Z39.50 Present Request or a SRU SearchRetrieveRequest. The setname is simply the name of the result set that holds the reference to the desired record. The number is the offset into the set (with 1 being the first record in the set). The format field is the record format requested by the client (See Section 2, “Object Identifiers”). A value of NULL for format indicates that the client did not request a specific format. The stream argument is an ODR stream which should be used for allocating space for structured data records. The stream will be reset when all records have been assembled, and the response package has been transmitted. For unstructured data, the backend is responsible for maintaining a static or dynamic buffer for the record between calls.

If a SRU SearchRetrieveRequest is received by the frontend server, the referenceId is NULL and the format (transfer syntax) is the OID for XML. The schema for SRU is stored in both the Z_RecordComposition structure and schema (simple string).

In the structure, the basename is the name of the database that holds the record. len is the length of the record returned, in bytes, and record is a pointer to the record. last_in_set should be nonzero only if the record returned is the last one in the given result set. errcode and errstring, if given, will be interpreted as a global error pertaining to the set, and will be returned in a non-surrogate-diagnostic. If you wish to return the error as a surrogate-diagnostic (local error) you can do this by setting surrogate_flag to 1 also.

If the len field has the value -1, then record is assumed to point to a constructed data type. The format field will be used to determine which encoder should be used to serialize the data.

Note

If your backend generates structured records, it should use odr_malloc() on the provided stream for allocating data: This allows the frontend server to keep track of the record sizes.

The format field is mapped to an object identifier in the direct reference of the resulting EXTERNAL representation of the record.

Note

The current version of YAZ only supports the direct reference mode.

int (*bend_present) (void *handle, bend_present_rr *rr);

typedef struct {
    char *setname;             /* set name */
    int start;
    int number;                /* record number */
    Odr_oid *format;           /* format, transfer syntax (OID) */
    Z_ReferenceId *referenceId;/* reference ID */
    Z_RecordComposition *comp; /* Formatting instructions */
    ODR stream;                /* encoding stream - memory source if required */
    ODR print;                 /* printing stream */
    bend_request request;
    bend_association association;

    int hits;                  /* number of hits */
    int errcode;               /* 0==OK */
    char *errstring;           /* system error string or NULL */
} bend_present_rr;
    

The bend_present handler is called when the server receives a Z39.50 Present Request. The setname, start and number is the name of the result set - start position - and number of records to be retrieved respectively. format and comp is the preferred transfer syntax and element specifications of the present request.

Note that this is handler serves as a supplement for bend_fetch and need not to be defined in order to support search - and retrieve.

5.3. Delete

For back-ends that supports delete of a result set, only one handler must be defined.

int (*bend_delete)(void *handle, bend_delete_rr *rr);

typedef struct bend_delete_rr {
    int function;
    int num_setnames;
    char **setnames;
    Z_ReferenceId *referenceId;
    int delete_status;      /* status for the whole operation */
    int *statuses;          /* status each set - indexed as setnames */
    ODR stream;
    ODR print;
} bend_delete_rr;
    

Note

The delete set function definition is rather primitive, mostly because we have had no practical need for it as of yet. If someone wants to provide a full delete service, we'd be happy to add the extra parameters that are required. Are there clients out there that will actually delete sets they no longer need?

5.4. Scan

For servers that wish to offer the scan service one handler must be defined.

int (*bend_scan)(void *handle, bend_scan_rr *rr);

typedef enum {
    BEND_SCAN_SUCCESS,  /* ok */
    BEND_SCAN_PARTIAL   /* not all entries could be found */
} bend_scan_status;

typedef struct bend_scan_rr {
    int num_bases;      /* number of elements in databaselist */
    char **basenames;   /* databases to search */
    Odr_oid *attributeset;
    Z_ReferenceId *referenceId; /* reference ID */
    Z_AttributesPlusTerm *term;
    ODR stream;         /* encoding stream - memory source if required */
    ODR print;          /* printing stream */

    int *step_size;     /* step size */
    int term_position;  /* desired index of term in result list/returned */
    int num_entries;    /* number of entries requested/returned */

    /* scan term entries. The called handler does not have
       to allocate this. Size of entries is num_entries (see above) */
    struct scan_entry *entries;
    bend_scan_status status;
    int errcode;
    char *errstring;
    char *scanClause;   /* CQL scan clause */
    char *setname;      /* Scan in result set (NULL if omitted) */
} bend_scan_rr;
    

This backend server handles both Z39.50 scan and SRU scan. In order for a handler to distinguish between SRU (CQL) scan Z39.50 Scan, it must check for a non-NULL value of scanClause.

Note

If designed today, it would be a choice using a union or similar, but that would break binary compatibility with existing servers.

yaz-5.34.0/doc/facets.html0000664000175000017500000000716014357765254012257 000000000000008. Facets

8. Facets

YAZ supports facets in the Solr, SRU 2.0 and Z39.50 protocols.

Like Type-1/RPN, YAZ supports a string notation for specifying facets. This notataion maps straight to facets.asn. The notation is parsed by function yaz_pqf_parse_facet_list defined in header yaz/pquery.h.

For ZOOM C the facets are specified by option "facets". For yaz-client, the 'facets' command is used.

The grammar of this specification is as follows:


   facet-spec ::= facet-list

   facet-list ::= facet-list ',' attr-spec | attr-spec

   attr-spec ::= attr-spec '@attr' string | '@attr' string

    

The notation is inspired by PQF. The string following '@attr' must not include blanks and is of the form type=value, where type is an integer and value is a string or an integer.

There is no formal facets attribute set (it is not given in the protocol by the facets, although it could). The following types apply:

Table 7.4. Facet attributes

TypeDescription
1 Field-name. This is often a string, e.g. "Author", "Year", etc.
2 Sort order. Value should be an integer. Value 0: count descending (frequency). Value 1: alpha ascending.
3 Number of terms requested.
4 Start offset (starting from 1)

yaz-5.34.0/doc/soap.xml.html0000664000175000017500000001270014357765254012547 000000000000003. SOAP Packages

3. SOAP Packages

Every SOAP package in YAZ is represented as follows:

#include <yaz/soap.h>

typedef struct {
    char *fault_code;
    char *fault_string;
    char *details;
} Z_SOAP_Fault;

typedef struct {
    int no;
    char *ns;
    void *p;
} Z_SOAP_Generic;

#define Z_SOAP_fault 1
#define Z_SOAP_generic 2
#define Z_SOAP_error 3
typedef struct {
    int which;
    union {
        Z_SOAP_Fault   *fault;
        Z_SOAP_Generic *generic;
        Z_SOAP_Fault   *soap_error;
    } u;
    const char *ns;
} Z_SOAP;
    

The fault and soap_error arms both represent a SOAP fault - struct Z_SOAP_Fault. Any other generic (valid) package is represented by Z_SOAP_Generic.

The ns as part of Z_SOAP is the namespace for SOAP itself and reflects the SOAP version. For version 1.1 it is http://schemas.xmlsoap.org/soap/envelope/, for version 1.2 it is http://www.w3.org/2001/06/soap-envelope.

int z_soap_codec(ODR o, Z_SOAP **pp,
                 char **content_buf, int *content_len,
                 Z_SOAP_Handler *handlers);
   

The content_buf and content_len is XML buffer and length of buffer respectively.

The handlers is a list of SOAP codec handlers - one handler for each service namespace. For SRU SOAP, the namespace would be http://www.loc.gov/zing/srw/v1.0/.

When decoding, the z_soap_codec inspects the XML content and tries to match one of the services namespaces of the supplied handlers. If there is a match. a handler function is invoked which decodes that particular SOAP package. If successful, the returned Z_SOAP package will be of type Z_SOAP_Generic. Member no is set the offset of the handler that matched; ns is set to namespace of the matching handler; the void pointer p is set to the C data structure associated with the handler.

When a NULL namespace is met (member ns below), that specifies end-of-list.

Each handler is defined as follows:

typedef struct {
    char *ns;
    void *client_data;
    Z_SOAP_fun f;
} Z_SOAP_Handler;
    

The ns is the namespace of the service associated with handler f. The client_data is user-defined data which is passed to the handler.

The prototype for a SOAP service handler is:

int handler(ODR o, void * ptr, void **handler_data,
            void *client_data, const char *ns);
    

The o specifies the mode (decode/encode) as usual. The second argument, ptr, is a libxml2 tree node pointer (xmlNodePtr) and is a pointer to the Body element of the SOAP package. The handler_data is an opaque pointer to C definitions associated with the SOAP service. The client_data is the pointer which was set as part of the Z_SOAP_handler. Finally, ns is the service namespace.

yaz-5.34.0/doc/sorting.html0000664000175000017500000001165714357765254012505 000000000000007. Sorting

7. Sorting

This chapter describes sorting and how it is supported in YAZ. Sorting applies to a result-set. The Z39.50 sorting facility takes one or more input result-sets and one result-set as output. The most simple case is that the input-set is the same as the output-set.

Z39.50 sorting has a separate APDU (service) that is, thus, performed following a search (two phases).

In SRU/Solr, however, the model is different. Here, sorting is specified during the search operation. Note, however, that SRU might perform sort as separate search, by referring to an existing result-set in the query (result-set reference).

7.1. Using the Z39.50 sort service

yaz-client and the ZOOM API support the Z39.50 sort facility. In any case the sort sequence or sort criteria is using a string notation. This notation is a one-line notation suitable for being manually entered or generated, and allows for easy logging (one liner). For the ZOOM API, the sort is specified in the call to ZOOM_query_sortby function. For yaz-client the sort is performed and specified using the sort and sort+ commands. For description of the sort criteria notation refer to the sort command in the yaz-client manual.

The ZOOM API might choose one of several sort strategies for sorting. Refer to Table 3.2, “ZOOM sort strategy”.

7.2. Type-7 sort

Type-7 sort is an extension to the Bib-1 based RPN query where the sort specification is embedded as an Attribute-Plus-Term.

The objectives for introducing Type-7 sorting is that it allows a client to perform sorting even if it does not implement/support Z39.50 sort. Virtually all Z39.50 client software supports RPN queries. It also may improve performance because the sort criteria is specified along with the search query.

The sort is triggered by the presence of type 7, and the value of type 7 specifies the sortRelation . The value for type 7 is 1 for ascending and 2 for descending. For the sortElement only the generic part is handled. If generic sortKey is of type sortField, then attribute type 1 is present and the value is sortField (InternationalString). If generic sortKey is of type sortAttributes, then the attributes in the list are used. Generic sortKey of type elementSpec is not supported.

The term in the sorting Attribute-Plus-Term combo should hold an integer. The value is 0 for primary sorting criteria, 1 for second criteria, etc.

yaz-5.34.0/doc/Makefile.in0000664000175000017500000007454314357765241012176 00000000000000# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 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. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_icu.m4 \ $(top_srcdir)/m4/acx_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/yaz.m4 $(top_srcdir)/m4/yaz_libxml2.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = local0.ent CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man7dir)" \ "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(docdir)" man7dir = $(mandir)/man7 man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man_MANS) DATA = $(doc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/local0.ent.in NEWS DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSSSL_DIR = @DSSSL_DIR@ DSYMUTIL = @DSYMUTIL@ DTD_DIR = @DTD_DIR@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HIREDIS_LIBS = @HIREDIS_LIBS@ HTML_COMPILE = @HTML_COMPILE@ ICU_CFLAGS = @ICU_CFLAGS@ ICU_CONFIG = @ICU_CONFIG@ ICU_CPPFLAGS = @ICU_CPPFLAGS@ ICU_LIBS = @ICU_LIBS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_COMPILE = @MAN_COMPILE@ MEMCACHED_LIBS = @MEMCACHED_LIBS@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PDF_COMPILE = @PDF_COMPILE@ PKG_CONFIG = @PKG_CONFIG@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LIBS = @SSL_LIBS@ STRIP = @STRIP@ TCLSH = @TCLSH@ TCPD_LIBS = @TCPD_LIBS@ TKL_COMPILE = @TKL_COMPILE@ VERSION = @VERSION@ VERSION_HEX = @VERSION_HEX@ VERSION_SHA1 = @VERSION_SHA1@ WIN_FILEVERSION = @WIN_FILEVERSION@ XML2_CFLAGS = @XML2_CFLAGS@ XSLTPROC_COMPILE = @XSLTPROC_COMPILE@ XSL_DIR = @XSL_DIR@ YACC = @YACC@ YAZ_CONFIG_CFLAGS = @YAZ_CONFIG_CFLAGS@ YAZ_CONF_CFLAGS = @YAZ_CONF_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigpath = @pkgconfigpath@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = common XMLFILES = book.xml \ gfs-options.xml gfs-virtual.xml gfs-synopsis.xml \ std-oid-table.xml bib1-diag-table.xml srw-diag-table.xml \ manref.xml local.ent HTMLFILES = index.html MANFILES = yaz-client.1 yaz-ztest.8 \ yaz-config.1 yaz.7 zoomsh.1 yaz-asncomp.1 \ yaz-marcdump.1 yaz-iconv.1 yaz-log.7 \ yaz-illclient.1 yaz-icu.1 yaz-url.1 bib1-attr.7 \ yaz-json-parse.1 yaz-record-conv.1 REFFILES = yaz-client-man.xml yaz-ztest-man.xml yaz-config-man.xml \ yaz-man.xml zoomsh-man.xml yaz-asncomp-man.xml \ yaz-marcdump-man.xml yaz-iconv-man.xml yaz-log-man.xml \ yaz-illclient-man.xml yaz-icu-man.xml yaz-url-man.xml \ bib1-attr-man.xml yaz-json-parse-man.xml yaz-record-conv-man.xml SUPPORTFILES = entities.ent apilayer.obj doc_DATA = $(HTMLFILES) apilayer.png man_MANS = $(MANFILES) EXTRA_DIST = $(XMLFILES) $(SUPPORTFILES) $(man_MANS) $(REFFILES) \ $(doc_DATA) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): local0.ent: $(top_builddir)/config.status $(srcdir)/local0.ent.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-man7: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man7dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man7dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man7dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.7[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^7][0-9a-z]*$$,7,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man7dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man7dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man7dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man7dir)" || exit $$?; }; \ done; } uninstall-man7: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man7dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.7[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^7][0-9a-z]*$$,7,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man7dir)'; $(am__uninstall_files_from_dir) install-man8: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man8dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.8[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ done; } uninstall-man8: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man8dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.8[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-recursive all-am: Makefile $(MANS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-docDATA install-man @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-man7 install-man8 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-docDATA uninstall-man @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-man: uninstall-man1 uninstall-man7 uninstall-man8 .MAKE: $(am__recursive_targets) install-am install-data-am \ install-strip uninstall-am .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am dist-hook distclean distclean-generic \ distclean-libtool distclean-local distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-data-hook install-docDATA \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-man1 install-man7 install-man8 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-docDATA \ uninstall-hook uninstall-man uninstall-man1 uninstall-man7 \ uninstall-man8 .PRECIOUS: Makefile std-oid-table.xml: $(srcdir)/../src/oid.csv $(TCLSH) $(top_srcdir)/src/oidtoc.tcl $(top_srcdir)/src/oid.csv std-oid-table.xml bib1-diag-table.xml: $(srcdir)/../src/bib1.csv $(TCLSH) $(srcdir)/../src/csvtodiag.tcl $(srcdir)/../src/bib1.csv bib1-diag-table.xml bib1-diag-table srw-diag-table.xml: $(srcdir)/../src/srw.csv $(TCLSH) $(srcdir)/../src/csvtodiag.tcl $(srcdir)/../src/srw.csv srw-diag-table.xml srw-diag-table yaz-client.1: $(srcdir)/yaz-client-man.xml $(MAN_COMPILE) $(srcdir)/yaz-client-man.xml yaz-ztest.8: yaz-ztest-man.xml gfs-options.xml gfs-synopsis.xml gfs-virtual.xml $(MAN_COMPILE) $(srcdir)/yaz-ztest-man.xml yaz-config.1: yaz-config-man.xml $(MAN_COMPILE) $(srcdir)/yaz-config-man.xml yaz.7: yaz-man.xml $(MAN_COMPILE) $(srcdir)/yaz-man.xml bib1-attr.7: bib1-attr-man.xml $(MAN_COMPILE) $(srcdir)/bib1-attr-man.xml zoomsh.1: zoomsh-man.xml $(MAN_COMPILE) $(srcdir)/zoomsh-man.xml yaz-asncomp.1: yaz-asncomp-man.xml $(MAN_COMPILE) $(srcdir)/yaz-asncomp-man.xml yaz-marcdump.1: yaz-marcdump-man.xml $(MAN_COMPILE) $(srcdir)/yaz-marcdump-man.xml yaz-iconv.1: yaz-iconv-man.xml $(MAN_COMPILE) $(srcdir)/yaz-iconv-man.xml yaz-illclient.1: yaz-illclient-man.xml $(MAN_COMPILE) $(srcdir)/yaz-illclient-man.xml yaz-log.7: yaz-log-man.xml $(MAN_COMPILE) $(srcdir)/yaz-log-man.xml yaz-icu.1: yaz-icu-man.xml $(MAN_COMPILE) $(srcdir)/yaz-icu-man.xml yaz-url.1: yaz-url-man.xml $(MAN_COMPILE) $(srcdir)/yaz-url-man.xml yaz-json-parse.1: yaz-json-parse-man.xml $(MAN_COMPILE) $(srcdir)/yaz-json-parse-man.xml yaz-record-conv.1: yaz-record-conv-man.xml $(MAN_COMPILE) $(srcdir)/yaz-record-conv-man.xml $(HTMLFILES): $(XMLFILES) rm -f *.html $(HTML_COMPILE) $(srcdir)/book.xml $(MANFILES): local.ent yaz.pdf: $(XMLFILES) $(PDF_COMPILE) $(srcdir)/book.xml && mv book.pdf yaz.pdf yazj.pdf: jade -E14 -D $(srcdir) -d common/print.dsl -t tex $(srcdir)/common/xml.dcl $(srcdir)/book.xml rm -f yazj.pdf cp book.tex yazj.tex pdfjadetex yazj.tex pdfjadetex yazj.tex >/dev/null pdfjadetex yazj.tex >/dev/null manref.xml: $(REFFILES) $(srcdir)/common/stripref.xsl local.ent rm -f manref.xml for i in $(REFFILES); do \ xsltproc $(srcdir)/common/stripref.xsl $(srcdir)/$$i | sed 1d >>manref.xml; \ done apilayer.png: tgif -print -xbm apilayer.obj xbmtopbm apilayer.png dist-hook: if test -f index.html; then d=.; else d="$(srcdir)"; fi; \ for p in $$d/*.html; do \ cp $$p $(distdir); \ done doc-clean: rm -f manref.xml *.html *.[0-9] *.pdf toc.hhc htmlhelp.hhp local.ent install-data-hook: if test -f index.html; then d=.; else d="$(srcdir)"; fi; \ for p in $$d/*.html; do \ $(INSTALL_DATA) $$p $(DESTDIR)$(docdir); \ done uninstall-hook: rm -r $(DESTDIR)$(docdir) distclean-local: doc-clean # 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: yaz-5.34.0/doc/manref.xml0000664000175000017500000041706414357765251012123 00000000000000 YAZ 5.34.0 Index Data yaz-client 1 Commands yaz-client Z39.50/SRU client for implementors yaz-client server-addr DESCRIPTION yaz-client is a Z39.50/SRU client (origin) with a simple command line interface that allows you to test behavior and performance of Z39.50 targets and SRU servers. From YAZ version 4.1.0 yaz-client may also operate as a Solr Web Service client. If the server-addr is specified, the client creates a connection to the Z39.50/SRU target at the address given. When yaz-client is started it tries to read commands from one of the following files: Command file if it is given by option -f. .yazclientrc in current working directory. .yazclientrc in the user's home directory. The value of the $HOME environment variable is used to determine the home directory. Normally, $HOME is only set on POSIX systems such as Linux, FreeBSD, Solaris. OPTIONS -a filename If specified, logging of protocol packages will be appended to the file given. If filename is specified as -, the output is written to stdout. -b filename If specified, YAZ will dump BER data in readable notation to the file specified. If filename is specified as - the output is written to stdout. -c filename If specified, CCL configuration will be read from the file given. -d dump If specified, YAZ will dump BER data for all PDUs sent and received to individual files, named dump.DDD.raw, where DDD is 001, 002, 003, ... -f cmdfile Reads commands from cmdfile. When this option is used, YAZ client does not read .yazclientrc from current directory or home directory. -k size Sets preferred messages and maximum record size for Initialize Request in kilobytes. Default value is 65536 (64 MB). -m filename If specified, retrieved records will be appended to the file given. -p proxy-addr If specified, the client will use the proxy at the address given. YAZ client will connect to a proxy on the address and port given. The actual target will be specified as part of the InitRequest to inform the proxy about the actual target. -q filename If specified, CQL configuration will be read from the file given. -t displaycharset If displaycharset is given, it specifies name of the character set of the output (on the terminal on which YAZ client is running). -u auth If specified, the auth string will be used for authentication. -v level Sets the LOG level to level. Level is a sequence of tokens separated by comma. Each token is a integer or a named LOG item - one of fatal, debug, warn, log, malloc, all, none. -V Prints YAZ version. -x Makes the YAZ client print hex dumps of packages sent and received on standard output. COMMANDS The YAZ client accepts the following commands. open zurl Opens a connection to a server. The syntax for zurl is the same as described above for connecting from the command line. Syntax: [(tcp|ssl|unix|http)':']host [:port][/base] quit Quits YAZ client find query Sends a Search Request using the query given. By default the query is assumed to be PQF. See command querytype for more information. delete setname Deletes result set with name setname on the server. base base1 base2 ... Sets the name(s) of the database(s) to search. One or more databases may be specified, separated by blanks. This command overrides the database given in zurl. show [start[+number [+resultset]]] Fetches records by sending a Present Request from the start position given by start and a number of records given by number, from the result set resultset. If start is not given, then the client will fetch from the position of the last retrieved record plus 1. If number is not given, then one record will be fetched at a time. If resultset is not given, the most recently retrieved result set is used. scan term Scans database index for a term. The syntax resembles the syntax for find. If you want to scan for the word water you could write scan water but if you want to scan only in, say the title field, you would write scan @attr 1=4 water setscan set term Scans database index for a term within a result set. This is similar to the scan command but has a result set as its first argument. scanpos pos Sets preferred position for scan. This value is used in the next scan. By default, position is 1. scansize size Sets number of entries to be returned by scan. Default number of entries is 20. scanstep step Set step-size for scan. This value is used in the next scan sent to the target. By default step-size is 0. sort sortspecs Sorts a result set. The sort command takes a sequence of space-separated sort specifications, with each sort specification consisting of two space-separated words (so that the whole specification list is made up of an even number of words). The first word of each specification holds a field (sort criterion) and the second holds flags. If the sort criterion includes = it is assumed that the SortKey is of type sortAttributes using Bib-1: in this case the integer before = is the attribute type and the integer following = is the attribute value. If no = character is in the criterion, it is treated as a sortfield of type InternationalString. The flags word of each sort specification must consist of s for case sensitive or i for case insensitive, and < for ascending order or > for descending order. Example using sort criterion with attributes use=local-number and structure=numeric and ascending flag: 1=12,4=109 < Another example with "Title" sort field and descending flag: Title > sort+ Same as sort but stores the sorted result set in a new result set. authentication openauth Sets up an authentication string if a server requires authentication (v2 OpenStyle). The authentication string is first sent to the server when the open command is issued and the Z39.50 Initialize Request is sent, so this command must be used before open in order to be effective. A common convention for the authopen string is that the username - and password is separated by a slash, e.g. myusername/mysecret. sru method version Selects Web Service method and version. Must be one of post, get, soap (default) or solr. Version should be either 1.1, 1.2 or 2.0 for SRU. Other versions are allowed - for testing purposes (version negotiation with SRU server). The version is currently not used for Solr Web Services list_all This command displays status and values for many settings. lslb n Sets the limit for when no records should be returned together with the search result. See the Z39.50 standard on set bounds for more details. ssub n Sets the limit for when all records should be returned with the search result. See the Z39.50 standard on set bounds for more details. mspn n Sets the number of records that should be returned if the number of records in the result set is between the values of lslb and ssub. See the Z39.50 standard on set bounds for more details. status Displays the values of lslb, ssub and mspn. setname Switches named result sets on and off. Default is on. cancel Sends a Trigger Resource Control Request to the target. facets spec Specifies requested facets to be used in search. The notation is specified in . format oid Sets the preferred transfer syntax for retrieved records. yaz-client supports all the record syntaxes that currently are registered. See Z39.50 Record Syntax Identifiers for more details. Commonly used records syntaxes include usmarc, sutrs and xml. elements e Sets the element set name for the records. Many targets support element sets B (for brief) and F (for full). close Sends a Z39.50 Close APDU and closes connection with the peer querytype type Sets the query type as used by command find. The following is supported: prefix for Prefix Query Notation (Type-1 Query); ccl for CCL search (Type-2 Query), cql for CQL (Type-104 search with CQL OID), ccl2rpn for CCL to RPN conversion (Type-1 Query), cql2rpn for CQL to RPN conversion (Type-1 Query). attributeset set Sets attribute set OID for prefix queries (RPN, Type-1). refid id Sets reference ID for Z39.50 Request(s). itemorder type no Sends an Item Order Request using the ILL External. type is either 1 or 2 which corresponds to ILL-Profile 1 and 2 respectively. The no is the Result Set position of the record to be ordered. update action recid doc Sends Item Update Request. The action argument must be the action type: one of insert, replace, delete and update. The second argument, recid, is the record identifier (any string). Third argument which is optional is the record document for the request. If doc is preceded with "<", then the following characters are treated as a filename with the records to be updated. Otherwise doc is treated as a document itself. The doc may also be quoted in double quotes. If doc is omitted, the last received record (as part of present response or piggybacked search response) is used for the update. source filename Executes list of commands from file filename, just like 'source' on most UNIX shells. A single dot (.) can be used as an alternative. ! args Executes command args in subshell using the system call. push_command command The push_command takes another command as its argument. That command is then added to the history information (so you can retrieve it later). The command itself is not executed. This command only works if you have GNU readline/history enabled. set_apdufile filename Sets that APDU should be logged to file filename. Another way to achieve APDU log is by using command-line option -a. set_auto_reconnect flag Specifies whether YAZ client automatically reconnects if the target closes connection (Z39.50 only). flag must be either on or off. set_auto_wait flag Specifies whether YAZ client should wait for response protocol packages after a request. By default YAZ client waits (on) for response packages immediately after a command (find, show) has been issued. If off is used, YAZ client does not attempt to receive packages automatically. These will have to be manually received when command wait_response is used. flag must be either on or off. set_marcdump filename Specifies that all retrieved records should be appended to file filename. This command does the same thing as option -m. schema schemaid Specifies schema for retrieval. Schema may be specified as an OID for Z39.50. For SRU, schema is a simple string URI. charset negotiationcharset [displaycharset] [[marccharset]] Specifies character set (encoding) for Z39.50 negotiation / SRU encoding and/or character set for output (terminal). negotiationcharset is the name of the character set to be negotiated by the server. The special name - for negotiationcharset specifies no character set to be negotiated. If displaycharset is given, it specifies name of the character set of the output (on the terminal on which YAZ client is running). To disable conversion of characters to the output encoding, the special name - (dash) can be used. If the special name auto is given, YAZ client will convert strings to the encoding of the terminal as returned by nl_langinfo call. If marccharset is given, it specifies name of the character set of retrieved MARC records from server. See also marccharset command. Since character set negotiation takes effect in the Z39.50 Initialize Request you should issue this command before command open is used. MARC records are not covered by Z39.50 character set negotiation, so that's why there is a separate character that must be known in order to do meaningful conversion(s). negcharset charset Specifies character set for negotiation (Z39.50). The argument is the same as second argument for command charset. displaycharset charset Specifies character set for output (display). The argument is the same as second argument for command charset. marccharset charset Specifies character set for retrieved MARC records so that YAZ client can display them in a character suitable for your display. See charset command. If auto is given, YAZ will assume that MARC21/USMARC is using MARC8/UTF8 and ISO-8859-1 for all other MARC variants. The charset argument is the same as third argument for command charset. querycharset charset Specifies character set for query terms for Z39.50 RPN queries and Z39.50 Scan Requests (termListAndStartPoint). This is a pure client-side conversion which converts from displayCharset to queryCharset. set_cclfile filename Specifies that CCL fields should be read from file file filename. This command does the same thing as option -c. set_cqlfile filename Specifies that CQL fields should be read from file file filename. This command does the same thing as option -q. register_oid name class OID This command allows you to register your own object identifier - so that instead of entering a long dot-notation you can use a short name instead. The name is your name for the OID, class is the class, and OID is the raw OID in dot notation. Class is one of: appctx, absyn, attet, transyn, diagset, recsyn, resform, accform, extserv, userinfo, elemspec, varset, schema, tagset, general. If you're in doubt use the general class. register_tab command string This command registers a TAB completion string for the command given. sleep seconds This command makes YAZ client sleep (be idle) for the number of seconds given. wait_response [ number] This command makes YAZ client wait for a number of response packages from target. If number is omitted, 1 is assumed. This command is rarely used and is only useful if command set_auto_wait is set to off. xmles OID doc Sends XML Extended Services request using the OID and doc given. zversion ver This command sets Z39.50 version for negotiation. Should be used before open. By default 3 (version 3) is used. options op1 op2.. This command sets Z39.50 options for negotiation. Should be used before open. The following options are supported: search, present, delSet, resourceReport, triggerResourceCtrl, resourceCtrl, accessCtrl, scan, sort, extendedServices, level_1Segmentation, level_2Segmentation, concurrentOperations, namedResultSets, encapsulation, resultCount, negotiationModel, duplicationDetection, queryType104, pQESCorrection, stringSchema. EXAMPLE The simplest example of a Prefix Query would be something like f knuth or f "donald knuth" In those queries, no attributes were specified. This leaves it up to the server what fields to search but most servers will search in all fields. Some servers do not support this feature though, and require that some attributes are defined. To add one attribute you could do: f @attr 1=4 computer where we search in the title field, since the use(1) is title(4). If we want to search in the author field and in the title field, and in the title field using right truncation it could look something like this: f @and @attr 1=1003 knuth @attr 1=4 @attr 5=1 computer Finally using a mix of Bib-1 and GILS attributes could look something like this: f @attrset Bib-1 @and @attr GILS 1=2008 Washington @attr 1=21 weather FILES yaz-<version>/client/client.c $HOME/.yazclientrc $HOME/.yazclient.history SEE ALSO yaz 7 bib1-attr 7 YAZ 5.34.0 Index Data yaz-ztest 8 System management commands yaz-ztest Z39.50/SRU Test Server application listener-spec DESCRIPTION yaz-ztest is a Z39.50/SRU test server that uses the YAZ generic front-end server (GFS) API. The server acts as a real Z39.50/SRU server but does not use a database. It returns a random hit count and returns a subset of a few built-in records. The listener-spec consists of a transport mode followed by a colon, followed by a listener address. The transport mode is either tcp, unix, or ssl. For TCP and SSL, an address has the form: hostname | IP-number [ : portnumber ] For UNIX local socket, the address is the filename of the local socket. OPTIONS -a file Specify a file for dumping PDUs (for diagnostic purposes). The special name - (dash) sends output to stderr. -S Don't fork or make threads on connection requests. This is good for debugging, but not recommended for real operation: Although the server is asynchronous and non-blocking, it can be nice to keep a software malfunction (okay then, a crash) from affecting all current users. -1 Like -S but after one session the server exits. This mode is for debugging only. -T Operate the server in threaded mode. The server creates a thread for each connection rather than fork a process. Only available on UNIX systems that offer POSIX threads. -s Use the SR protocol (obsolete). -z Use the Z39.50 protocol (default). This option and -s complement each other. You can use both multiple times on the same command line, between listener-specifications (see below). This way, you can set up the server to listen for connections in both protocols concurrently, on different local ports. -l file The logfile. -c config A user option that serves as a specifier for some sort of configuration, usually a filename. The argument to this option is transferred to member configname of the statserv_options_block. -f vconfig This specifies an XML file that describes one or more YAZ frontend virtual servers. -C fname Sets SSL certificate file name for server (PEM). -v level The log level. Use a comma-separated list of members of the set {fatal,debug,warn,log,malloc,all,none}. -u uid Set user ID. Sets the real UID of the server process to that of the given user. It's useful if you aren't comfortable with having the server run as root, but you need to start it as such to bind a privileged port. -w dir The server changes to this directory before listening to incoming connections. This option is useful when the server is operating from the inetd daemon (see -i). -p pidfile Specifies that the server should write its Process ID to the file given by pidfile. A typical location would be /var/run/yaz-ztest.pid. -i Use this to make the the server run from the inetd server (UNIX only). -D Use this to make the server put itself in the background and run as a daemon. If neither -i nor -D is given, the server starts in the foreground. -install Use this to install the server as an NT service (Windows NT/2000/XP only). Control the server by going to the Services in the Control Panel. -installa Use this to install the server as an NT service and mark it as "auto-start. Control the server by going to the Services in the Control Panel. -remove Use this to remove the server from the NT services (Windows NT/2000/XP only). -t minutes Idle session timeout, in minutes. -k size Maximum record size/message size, in kilobytes. -K Forces no-keepalive for HTTP sessions. By default GFS will keep sessions alive for HTTP 1.1 sessions (as defined by the standard). Using this option will force GFS to close the connection for each operation. -r size Maximum size of log file before rotation occurs, in kilobytes. Default size is 1048576 k (=1 GB). -d daemon Set name of daemon to be used in hosts access file. See hosts_access 5 and tcpd 8 . -m time-format Sets the format of time-stamps in the log-file. Specify a string in the input format to strftime(). -V Display YAZ version and exit. TESTING yaz-ztest normally returns a random hit count between 0 and 24. However, if a query term includes leading digits, then the integer value of that term is used as hit count. This allows testers to return any number of hits. yaz-ztest includes 24 MARC records for testing. Hit counts exceeding 24 will make yaz-ztest return the same record batch over and over. So record at position 1, 25, 49, etc. are equivalent. For XML, if no element set is given or element has value "marcxml", MARCXML is returned (each of the 24 dummy records converted from ISO2709 to XML). For element set OP, then OPAC XML is returned. yaz-ztest may also return predefined XML records (for testing). This is enabled if YAZ_ZTEST_XML_FETCH environment variable is defined. A record is fetched from a file (one record per file). The path for the filename is FE.d.xml where F is the YAZ_ZTEST_XML_FETCH value (possibly empty), E is element-set, d is record position (starting from 1). The following databases are honored by yaz-ztest: Default, slow and db.* (all databases with prefix "db"). Any other database will make yaz-ztest return diagnostic 109: "Database unavailable". Options for search may be included in the form or URL get arguments included as part of the Z39.50 database name. The following database options are present: search-delay, present-delay, fetch-delay and seed. The former, delay type options, specify a fake delay (sleep) that yaz-ztest will perform when searching, presenting, fetching records respectively. The value of the delay may either be a fixed floating point value which specifies the delay in seconds. Alternatively the value may be given as two floating point numbers separated by colon, which will make yaz-ztest perform a random sleep between the first and second number. The database parameter seed takes an integer as value. This will call srand with this integer to ensure that the random behavior can be re-played. Suppose we want searches to take between 0.1 and 0.5 seconds and a fetch to take 0.2 second. To access test database Default we'd use: Default?search-delay=0.1:0.5&fetch-delay=0.2. GFS CONFIGURATION AND VIRTUAL HOSTS The Virtual hosts mechanism allows a YAZ front-end server to support multiple back-ends. A back-end is selected on the basis of the TCP/IP binding (port+listening address) and/or the virtual host. A back-end can be configured to execute in a particular working directory. Or the YAZ front-end may perform CQL to RPN conversion, thus allowing traditional Z39.50 back-ends to be offered as a SRW/SRU service. SRW/SRU Explain information for a particular back-end may also be specified. For the HTTP protocol, the virtual host is specified in the Host header. For the Z39.50 protocol, the virtual host is specified as in the Initialize Request in the OtherInfo, OID 1.2.840.10003.10.1000.81.1. Not all Z39.50 clients allow the VHOST information to be set. For those, the selection of the back-end must rely on the TCP/IP information alone (port and address). The YAZ front-end server uses XML to describe the back-end configurations. Command-line option -f specifies filename of the XML configuration. The configuration uses the root element yazgfs. This element includes a list of listen elements, followed by one or more server elements. The listen describes listener (transport end point), such as TCP/IP, Unix file socket or SSL server. Content for a listener: CDATA (required) The CDATA for the listen element holds the listener string, such as tcp:@:210, tcp:server1:2100, etc. attribute id (optional) Identifier for this listener. This may be referred to from server sections. We expect more information to be added for the listen section in a future version, such as CERT file for SSL servers. The server describes a server and the parameters for this server type. Content for a server: attribute id (optional) Identifier for this server. Currently not used for anything, but it might be for logging purposes. attribute listenref (optional) Specifies one or more listeners for this server. Each server ID is separated by a comma. If this attribute is not given, the server is accessible from all listeners. In order for the server to be used for real, however, the virtual host must match if specified in the configuration. element config (optional) Specifies the server configuration. This is equivalent to the config specified using command line option -c. element directory (optional) Specifies a working directory for this backend server. If specified, the YAZ frontend changes current working directory to this directory whenever a backend of this type is started (backend handler bend_start), stopped (backend handler hand_stop) and initialized (bend_init). element host (optional) Specifies the virtual host for this server. If this is specified a client must specify this host string in order to use this backend. element cql2rpn (optional) Specifies a filename that includes CQL to RPN conversion for this backend server. See . If given, the backend server will only "see" a Type-1/RPN query. element ccl2rpn (optional) Specifies a filename that includes CCL to RPN conversion for this backend server. See . If given, the backend server will only "see" a Type-1/RPN query. element stylesheet (optional) Specifies the stylesheet reference to be part of SRU HTTP responses when the client does not specify one. If none is given, then if the client does not specify one, then no stylesheet reference is part of the SRU HTTP response. element client_query_charset (optional) If specified, a conversion from the character set given to UTF-8 is performed by the generic frontend server. It is only executed for Z39.50 search requests (SRU/Solr are assumed to be UTF-8 encoded already). element docpath (optional) Specifies a path for local file access using HTTP. All URLs with a leading prefix (/ excluded) that matches the value of docpath are used for file access. For example, if the server is to offer access in directory xsl, the docpath would be xsl and all URLs of the form http://host/xsl will result in a local file access. element explain (optional) Specifies SRW/SRU ZeeRex content for this server. Copied verbatim to the client. As things are now, some of the Explain content seem redundant because host information, etc. is also stored elsewhere. element maximumrecordsize (optional) Specifies maximum record size/message size, in bytes. This value also serves as the maximum size of incoming packages (for Record Updates etc). It's the same value as that given by the -k option. element retrievalinfo (optional) Enables the retrieval facility to support conversions and specifications of record formats/types. See for more information. The XML below configures a server that accepts connections from two ports, TCP/IP port 9900 and a local UNIX file socket. We name the TCP/IP server public and the other server internal. <yazgfs> <listen id="public">tcp:@:9900</listen> <listen id="internal">unix:/var/tmp/socket</listen> <server id="server1"> <host>server1.mydomain</host> <directory>/var/www/s1</directory> <config>config.cfg</config> </server> <server id="server2" listenref="public,internal"> <host>server2.mydomain</host> <directory>/var/www/s2</directory> <config>config.cfg</config> <cql2rpn>../etc/pqf.properties</cql2rpn> <explain xmlns="http://explain.z3950.org/dtd/2.0/"> <serverInfo> <host>server2.mydomain</host> <port>9900</port> <database>a</database> </serverInfo> </explain> </server> <server id="server3" listenref="internal"> <directory>/var/www/s3</directory> <config>config.cfg</config> </server> </yazgfs> There are three configured backend servers. The first two servers, "server1" and "server2", can be reached by both listener addresses. "server1" is reached by all (two) since no listenref attribute is specified. "server2" is reached by the two listeners specified. In order to distinguish between the two, a virtual host has been specified for each server in the host elements. For "server2" elements for CQL to RPN conversion is supported and explain information has been added (a short one here to keep the example small). The third server, "server3" can only be reached via listener "internal". FILES yaz-<version>/ztest/yaz-ztest.c yaz-<version>/include/yaz/backend.h SEE ALSO yaz 7 yaz-log 7 YAZ 5.34.0 Index Data yaz-config 1 Commands yaz-config Script to get information about YAZ. yaz-config libraries DESCRIPTION yaz-config is a script that returns information that your own software should use to build software that uses YAZ. The following libraries are supported: threads Use the threaded version of YAZ. OPTIONS --prefix[=DIR] Returns prefix of YAZ or assume a different one if DIR is specified. --version Returns version of YAZ. --libs Library specification be used when using YAZ. --lalibs Return library specification. --cflags Return C Compiler flags. --include Return C compiler includes for YAZ header files (-Ipath). --comp Returns full path to YAZ' ASN.1 compiler: yaz-asncomp. -V Returns YAZ SHA1 ID (from Git) and version. FILES /usr/bin/yaz-config /usr/lib/libyaz*.a /usr/include/yaz/*.h SEE ALSO yaz(7) Section "How to make apps using YAZ on UNIX" in the YAZ manual. YAZ 5.34.0 Index Data yaz 7 Conventions and miscellaneous yaz Z39.50 toolkit. DESCRIPTION YAZ is a C/C++ programmer's toolkit supporting the development of Z39.50v3 clients and servers. The YAZ toolkit offers several different levels of access to the ISO23950/Z39.50, SRU Solr (client only) and ILL protocols. The level that you need to use depends on your requirements, and the role (server or client) that you want to implement. COPYRIGHT Copyright © 1995-2023 Index Data. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of Index Data nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SEE ALSO yaz-client 1 , yaz-ztest 8 , yaz-config 8 , zoomsh 1 bib1-attr 7 YAZ manual ( /usr/share/doc/yaz) YAZ home page. Z39.50 Maintenance Agency Page. YAZ 5.34.0 Index Data zoomsh 1 Commands zoomsh ZOOM shell zoomsh commands DESCRIPTION zoomsh is a ZOOM client with a simple command line interface. The client demonstrates the ZOOM API and is useful for testing targets. You may pass one or more commands to zoomsh. These commands are invoked first. OPTIONS -a apdufile Logs protocol packages into apdufile (APDU log). -e Makes zoomsh stop processing commands as soon as an error occur. The exit code of zoomsh is 1 if error occurs; 0 otherwise. -v loglevel Sets YAZ log level to loglevel. EXAMPLES If you start the yaz-ztest in one console you can use the ZOOM shell as follows: $ zoomsh ZOOM>connect localhost:9999 ZOOM>search computer localhost:9999: 7 hits ZOOM>show 0 1 1 Default USmarc 001 11224466 003 DLC 005 00000000000000.0 008 910710c19910701nju 00010 eng 010 $a 11224466 040 $a DLC $c DLC 050 00 $a 123-xyz 100 10 $a Jack Collins 245 10 $a How to program a computer 260 1 $a Penguin 263 $a 8710 300 $a p. cm. ZOOM>quit You can also achieve the same result by passing the commands as arguments on a single command line: $ zoomsh "connect localhost:9999" "search computer" "show 0 1" quit COMMANDS connect zurl Connects to the target given by zurl. close [zurl] Closes connection to target given by zurl or all targets if zurl was omitted. show [start [count]] Displays count records starting at offset given by start. First records has offset 0 (unlike the Z39.50 protocol). quit Quits zoomsh. set name [value] Sets option name to value. get name Prints value of option name. help Prints list of available commands. SEE ALSO yaz 7 , yaz-ztest 8 , Section "Building clients with ZOOM" in the YAZ manual. ZOOM home page. YAZ 5.34.0 Index Data yaz-asncomp 1 Commands yaz-asncomp YAZ ASN.1 compiler yaz-asncomp filename DESCRIPTION yaz-asncomp is an ASN.1 compiler that reads an ASN.1 specification in filename and produces C/C++ definitions and BER encoders/decoders for it. The produced C/C++ code and header files uses the ODR module of YAZ which is a library that encodes/decodes/prints BER packages. yaz-asncomp allows you to specify name of resulting source via options. Alternatively, you can specify a DEFINITIONS file, which provides customized output to many output files - if the ASN.1 specification file consists of many modules. This utility is written in Tcl. Any version of Tcl should work. OPTIONS -v Makes the ASN.1 compiler print more verbose about the various stages of operations. -c cfile Specifies the name of the C/C++ file with encoders/decoders. -h hfile Specifies the name of header file with definitions. -p pfile Specifies the name of the a private header file with definitions. By default all definitions are put in header file (option -h). -d dfile Specifies the name of a definitions file. -I iout Specifies first part of directory in which header files are written. -i idir Specifies second part of directory in which header files are written. -m module Specifies that ASN.1 compiler should only process the module given. If this option is not specified, all modules in the ASN.1 file are processed. DEFINITIONS FILE The definitions file is really a Tcl script but follows traditional rules for Shell like configuration files. That is # denotes the beginning of a comment. Definitions are line oriented. The definitions files usually consist of a series of variable assignments of the form: set name value Available variables are: default-prefix Sets prefix for names in the produced output. The value consists of three tokens: C function prefix, C typedef prefix and preprocessor prefix respectively. prefix(module) This value sets prefix values for module module. The value has same form as default-prefix. filename(module) Specifies filename for C/header file for module module. init(module,h) Code fragment to be put in first part of public header for module module. body(module,h) Code fragment to be put in last part of public header for module module (trailer). init(module,c) Code fragment to be put in first part of C based encoder/decoder for module module. body(module,c) Code fragment to be put in last part of C based encoder/decoder for module module (trailer). map(module,name) Maps ASN.1 type in module module of name to value. membermap(module,name,member) Maps member member in SEQUENCE/CHOICE of name in module module to value. The value consists of one or two tokens. First token is name of C preprocessor part. Second token is resulting C member name. If second token is omitted the value (one token) is both preprocessor part and C struct,union. unionmap(module,name,member) Maps member member in CHOICE of name in module module to value. Value consists of two or three tokens. The first token is name of the integer in the union that is used as selector for the union itself. The second token is name of the union. The third token overrides the name of the CHOICE member; if omitted the member name is used. FILES /usr/share/yaz/z39.50/z.tcl /usr/share/yaz/z39.50/*.asn SEE ALSO yaz 7 Section "The ODR Module" in the YAZ manual. YAZ 5.34.0 Index Data yaz-marcdump 1 Commands yaz-marcdump MARC record dump utility yaz-marcdump file DESCRIPTION yaz-marcdump reads MARC records from one or more files. It parses each record and supports output in line-format, ISO2709, MARCXML, MARC-in-JSON, MarcXchange as well as Hex output. This utility parses records ISO2709(raw MARC), line format, MARC-in-JSON format as well as XML if that is structured as MARCXML/MarcXchange. MARC-in-JSON encoding/decoding is supported in YAZ 5.0.5 and later. As of YAZ 2.1.18, OAI-MARC is no longer supported. OAI-MARC is deprecated. Use MARCXML instead. By default, each record is written to standard output in a line format with newline for each field, $x for each sub-field x. The output format may be changed with option -o, yaz-marcdump can also be requested to perform character set conversion of each record. OPTIONS -i format Specifies input format. Must be one of marcxml, marc (ISO2709), marcxchange (ISO25577), line (line mode MARC), turbomarc (Turbo MARC), or json (MARC-in-JSON). -o format Specifies output format. Must be one of marcxml, marc (ISO2709), marcxchange (ISO25577), line (line mode MARC), turbomarc (Turbo MARC), or json (MARC-in-JSON). -f from Specify the character set of the input MARC record. Should be used in conjunction with option -t. Refer to the yaz-iconv man page for supported character sets. -t to Specify the character set of the output. Should be used in conjunction with option -f. Refer to the yaz-iconv man page for supported character sets. -l leaderspec Specify a simple modification string for MARC leader. The leaderspec is a list of pos=value pairs, where pos is an integer offset (0 - 23) for leader. Value is either a quoted string or an integer (character value in decimal). Pairs are comma separated. For example, to set leader at offset 9 to a, use 9='a'. -s prefix Writes a chunk of records to a separate file with prefix given, i.e. splits a record batch into files with only at most "chunk" ISO2709 records per file. By default chunk is 1 (one record per file). See option -C. -C chunksize Specifies chunk size; to be used conjunction with option -s. -O offset Integer offset for at what position records whould be written. 0=first record, 1=second, .. With -L option, this allows a specific range of records to be processed. -L limit Integer limit for how many records should at most be written. With -O option, this allows a specific range of records to be processed. -p Makes yaz-marcdump print record number and input file offset of each record read. -n MARC output is omitted so that MARC input is only checked. -r Writes to stderr a summary about number of records read by yaz-marcdump. -v Writes more information about the parsing process. Useful if you have ill-formatted ISO2709 records as input. -V Prints YAZ version. EXAMPLES The following command converts MARC21/USMARC in MARC-8 encoding to MARC21/USMARC in UTF-8 encoding. Leader offset 9 is set to 'a'. Both input and output records are ISO2709 encoded. yaz-marcdump -f MARC-8 -t UTF-8 -o marc -l 9=97 marc21.raw >marc21.utf8.raw The same records may be converted to MARCXML instead in UTF-8: yaz-marcdump -f MARC-8 -t UTF-8 -o marcxml marc21.raw >marcxml.xml Turbo MARC is a compact XML notation with same semantics as MARCXML, but which allows for faster processing via XSLT. In order to generate Turbo MARC records encoded in UTF-8 from MARC21 (ISO), one could use: yaz-marcdump -f MARC8 -t UTF8 -o turbomarc -i marc marc21.raw >out.xml FILES prefix/bin/yaz-marcdump prefix/include/yaz/marcdisp.h SEE ALSO yaz 7 yaz-iconv 1 YAZ 5.34.0 Index Data yaz-iconv 1 Commands yaz-iconv YAZ Character set conversion utility yaz-iconv file DESCRIPTION yaz-iconv converts data in the character set specified by from to output in the character set as specified by to. This yaz-iconv utility is similar to the iconv found on many POSIX systems (Glibc, Solaris, etc). If no file is specified, yaz-iconv reads from standard input. OPTIONS -ffrom] Specify the character set from of the input file. Should be used in conjunction with option -t. -tto] Specify the character set of of the output. Should be used in conjunction with option -f. -v Print more information about the conversion process. ENCODINGS The yaz-iconv command and the API as defined in yaz/yaz-iconv.h is a wrapper for the library system call iconv. But YAZ' iconv utility also implements conversions on its own. The table below lists characters sets (or encodings) that are supported by YAZ. Each character set is marked with either encode or decode. If an encoding is encode-enabled, YAZ may convert to the designated encoding. If an encoding is decode-enabled, YAZ may convert from the designated encoding. marc8 (encode, decode) The MARC8 encoding as defined by the Library of Congress. Most MARC21/USMARC records use this encoding. marc8s (encode, decode) Like MARC8 but conversion prefers non-combined characters in the Latin-1 plane over combined characters. marc8lossy (encode) Lossy encoding of MARC-8. marc8lossless (encode) Lossless encoding of MARC8. utf8 (encode, decode) The most commonly used UNICODE encoding on the Internet. iso8859-1 (encode, decode) ISO-8859-1, AKA Latin-1. iso5426 (decode) ISO 5426. Some MARC records (UNIMARC) use this encoding. iso5428:1984 (encode, decode) ISO 5428:1984. advancegreek (encode, decode) An encoding for Greek in use by some vendors (Advance). danmarc (decode) Danmarc (in danish) is an encoding based on UNICODE which is used for DanMARC2 records. EXAMPLES The following command converts from ISO-8859-1 (Latin-1) to UTF-8. yaz-iconv -f ISO-8859-1 -t UTF-8 <input.lst >output.lst FILES prefix/bin/yaz-iconv prefix/include/yaz/yaz-iconv.h SEE ALSO yaz(7) iconv(1) YAZ 5.34.0 Index Data yaz-log 7 Conventions and miscellaneous yaz-log Log handling in all yaz-based programs yaz-XXXX DESCRIPTION All YAZ-based programs use a common log subsystem, and should support common command line options for controlling it. This man page documents those. OPTIONS -l logfile Specify the file where the log is to be written. If none is specified, stderr is used. The log is appended to this file. If the file grows overly large, it is silently rotated: It is renamed to logfile.1, logfile.2, .., 9 (old such file is deleted), and a new file is opened. The limit defaults to 1GB, but can be set by the program. The rotating limit can be specified with option -r for the YAZ frontend server (yaz-ztest). Rotation can also be implicitly enabled by using a filename which gets changed for a given date, due to substitutions as given by the strftime(3) function. -v loglevel Specify the logging level. The argument is a set of log level names, separated by commas (no whitespace!), optionally preceded by a '-' to negate that level. Most programs have their own default, often containing fatal,warn,log, and some application-specific values. The default list can be cleared with the word none, or individual bits can be removed by prefixing them with a dash '-'. LOG LEVELS TO CONTROL LOGGING Some of the log levels control the way the log is written. flush causes the log to be flushed after every write. This can have serious implications to performance, and should not be used in production. On the other hand, when debugging a program crash, this can be extremely useful. The option debug implies flush as well. notime prevents the writing of time stamps. This is intended for automatic test scripts, which should produce predictable log files that are easy to compare. GENERAL LOG LEVELS IN YAZ ITSELF YAZ itself uses the following log levels: fatal for fatal errors, that prevent further execution of the program. warn for warnings about things that should be corrected. debug for debugging. This flag may be used temporarily when developing or debugging yaz, or a program that uses yaz. It is practically deprecated, you should be defining and using your own log levels (see below). all turns on almost all hard-coded log levels. loglevel logs information about the log levels used by the program. Every time the log level is changed, lists all bits that are on. Every time a module asks for its log bits, this is logged. This can be used for getting an idea of what log levels are available in any program that uses yaz-log. Start the program with -v none,loglevel, and do some common operations with it. Another way is to grep for yaz_log_module_level in the source code, as in find . -name '*.[ch]' -print | xargs grep yaz_log_module_level | grep '"' | cut -d'"' -f2 | sort -u eventl, malloc, nmem, odr are used internally for debugging yaz. LOG LEVELS FOR CLIENTS zoom logs the calls to the zoom API, which may be useful in debugging client applications. LOG LEVELS FOR SERVERS server logs the server functions on a high level, starting up, listening on a port, etc. session logs individual sessions (connections). request logs a one-liner for each request (init, search, etc.). requestdetail logs the details of every request, before it is passed to the back-end, and the results received from it. Each server program (zebra, etc.) is supposed to define its own log levels in addition to these. As they depend on the server in question, they can not be described here. See above how to find out about them. LOGGING EXAMPLES See what log levels yaz-ztest is using: yaz-ztest -1 -v none,loglevel 14:43:29-23/11 [loglevel] Setting log level to 4096 = 0x00001000 14:43:29-23/11 [loglevel] Static log bit 00000001 'fatal' is off 14:43:29-23/11 [loglevel] Static log bit 00000002 'debug' is off 14:43:29-23/11 [loglevel] Static log bit 00000004 'warn' is off 14:43:29-23/11 [loglevel] Static log bit 00000008 'log' is off 14:43:29-23/11 [loglevel] Static log bit 00000080 'malloc' is off 14:43:29-23/11 [loglevel] Static log bit 00000800 'flush' is off 14:43:29-23/11 [loglevel] Static log bit 00001000 'loglevel' is ON 14:43:29-23/11 [loglevel] Static log bit 00002000 'server' is off 14:43:29-23/11 [loglevel] Dynamic log bit 00004000 'session' is off 14:43:29-23/11 [loglevel] Dynamic log bit 00008000 'request' is off 14:44:13-23/11 yaz-ztest [loglevel] returning log bit 0x4000 for 'session' 14:44:13-23/11 yaz-ztest [loglevel] returning log bit 0x2000 for 'server' 14:44:13-23/11 yaz-ztest [loglevel] returning NO log bit for 'eventl' 14:44:20-23/11 yaz-ztest [loglevel] returning log bit 0x4000 for 'session' 14:44:20-23/11 yaz-ztest [loglevel] returning log bit 0x8000 for 'request' 14:44:20-23/11 yaz-ztest [loglevel] returning NO log bit for 'requestdetail' 14:44:20-23/11 yaz-ztest [loglevel] returning NO log bit for 'odr' 14:44:20-23/11 yaz-ztest [loglevel] returning NO log bit for 'ztest' See the details of the requests for yaz-ztest ./yaz-ztest -1 -v requestdetail 14:45:35-23/11 yaz-ztest [server] Adding static Z3950 listener on tcp:@:9999 14:45:35-23/11 yaz-ztest [server] Starting server ./yaz-ztest pid=32200 14:45:38-23/11 yaz-ztest [session] Starting session from tcp:127.0.0.1 (pid=32200) 14:45:38-23/11 yaz-ztest [requestdetail] Got initRequest 14:45:38-23/11 yaz-ztest [requestdetail] Id: 81 14:45:38-23/11 yaz-ztest [requestdetail] Name: YAZ 14:45:38-23/11 yaz-ztest [requestdetail] Version: 2.0.28 14:45:38-23/11 yaz-ztest [requestdetail] Negotiated to v3: srch prst del extendedServices namedresults scan sort 14:45:38-23/11 yaz-ztest [request] Init from 'YAZ' (81) (ver 2.0.28) OK 14:45:39-23/11 yaz-ztest [requestdetail] Got SearchRequest. 14:45:39-23/11 yaz-ztest [requestdetail] ResultSet '1' 14:45:39-23/11 yaz-ztest [requestdetail] Database 'Default' 14:45:39-23/11 yaz-ztest [requestdetail] RPN query. Type: Bib-1 14:45:39-23/11 yaz-ztest [requestdetail] term 'foo' (general) 14:45:39-23/11 yaz-ztest [requestdetail] resultCount: 7 14:45:39-23/11 yaz-ztest [request] Search Z: @attrset Bib-1 foo OK:7 hits 14:45:41-23/11 yaz-ztest [requestdetail] Got PresentRequest. 14:45:41-23/11 yaz-ztest [requestdetail] Request to pack 1+1 1 14:45:41-23/11 yaz-ztest [requestdetail] pms=1048576, mrs=1048576 14:45:41-23/11 yaz-ztest [request] Present: [1] 1+1 OK 1 records returned LOG FILENAME EXAMPLES A file with format my_YYYYMMDD.log (where Y, M, D is year, month, and day digits) is given as follows: -l my_%Y%m%d.log . And since the filename is depending on day, rotation will occur on midnight. A weekly log could be specified as -l my_%Y%U.log. FILES prefix/include/yaz/log.h prefix/src/log.c SEE ALSO yaz 7 yaz-ztest 8 yaz-client 1 strftime 3 YAZ 5.34.0 Index Data yaz-illclient 1 Commands yaz-illclient ILL client yaz-illclient name=value server-addr DESCRIPTION yaz-illclient is a client which sends an ISO ILL request to a remote server and decodes the response from it. Exactly one server address ( server-addr ) must be specified. OPTIONS -f filename] Specify filename. -v loglevel] Specify the log level. -D name=value] Defines name & value pair. -o Enable OCLC authentication. -u user] Specify user. -p password] Specify password. -V Show yaz-illclient version. EXAMPLES None yet. FILES None yet. SEE ALSO yaz(7) YAZ 5.34.0 Index Data yaz-icu 1 Commands yaz-icu YAZ ICU utility yaz-icu -c config -p opt -s -x infile DESCRIPTION yaz-icu is a utility which demonstrates the ICU chain module of yaz. (yaz/icu.h). The utility can be used in two ways. It may read some text using an XML configuration for configuring ICU and show text analysis. This mode is triggered by option -c which specifies the configuration to be used. The input file is read from standard input or from a file if infile is specified. The utility may also show ICU information. This is triggered by option -p. OPTIONS -c config Specifies the file containing ICU chain configuration which is XML based. -p type Specifies extra information to be printed about the ICU system. If type is c then ICU converters are printed. If type is l, then available locales are printed. If type is t, then available transliterators are printed. -s Specifies that output should include sort key as well. Note that sort key differs between ICU versions. -x Specifies that output should be XML based rather than "text" based. ICU chain configuration The ICU chain configuration specifies one or more rules to convert text data into tokens. The configuration format is XML based. The toplevel element must be named icu_chain. The icu_chain element has one required attribute locale which specifies the ICU locale to be used in the conversion steps. The icu_chain element must include elements where each element specifies a conversion step. The conversion is performed in the order in which the conversion steps are specified. Each conversion element takes one attribute: rule which serves as argument to the conversion step. The following conversion elements are available: casemap Converts case (and rule specifies how): l Lower case using ICU function u_strToLower. u Upper case using ICU function u_strToUpper. t To title using ICU function u_strToTitle. f Fold case using ICU function u_strFoldCase. display This is a meta step which specifies that a term/token is to be displayed. This term is retrieved in an application using function icu_chain_token_display (yaz/icu.h). transform Specifies an ICU transform rule using a transliterator Identifier. The rule attribute is the transliterator Identifier. See ICU Transforms for more information. transliterate Specifies a rule-based transliterator. The rule attribute is the custom transformation rule to be used. See ICU Transforms for more information. tokenize Breaks / tokenizes a string into components using ICU functions ubrk_open, ubrk_setText, .. . The rule is one of: l Line. ICU: UBRK_LINE. s Sentence. ICU: UBRK_SENTENCE. w Word. ICU: UBRK_WORD. c Character. ICU: UBRK_CHARACTER. t Title. ICU: UBRK_TITLE. join Joins tokens into one string. The rule attribute is the joining string, which may be empty. The join conversion element was added in YAZ 4.2.49. EXAMPLES The following command analyzes text in file text using ICU chain configuration chain.xml: cat text | yaz-icu -c chain.xml The chain.xml might look as follows: <icu_chain locale="en"> <transform rule="[:Control:] Any-Remove"/> <tokenize rule="w"/> <transform rule="[[:WhiteSpace:][:Punctuation:]] Remove"/> <transliterate rule="xy > z;"/> <display/> <casemap rule="l"/> </icu_chain> SEE ALSO yaz 7 ICU Home ICU Transforms YAZ 5.34.0 Index Data yaz-url 1 Commands yaz-url YAZ URL fetch utility yaz-url -H name:value -m method -O fname -p fname -R num -u user/password -v -x proxy url DESCRIPTION yaz-url is utility to get web content. It is very limited in functionality compared to programs such as curl, wget. The options must precede the URL given on the command line, to take effect. Fetched HTTP content is written to stdout, unless option -O is given. OPTIONS -H name:value Specifies HTTP header content with name and value. This option can be given multiple times (for different names, of course). -m method Specifies the HTTP method to be used for the next URL. Default is method "GET". However, option -p sets it to "POST". -O fname Sets output filename for HTTP content. -p fname Sets a file to be POSTed in the following URL. -R num Sets maximum number of HTTP redirects to be followed. A value of zero disables follow of HTTP redirects. -u user/password Specifies a user and a password to be used in HTTP basic authentication in the following URL fetch. The user and password must be separated by a slash (thus it is not possible to specify a user with a slash in it). -v Makes yaz-url dump each HTTP request/response to stdout. -x proxy Specifies a proxy to be used for URL fetch. SEE ALSO yaz 7 YAZ 5.34.0 Index Data Bib-1 Attribute Set 7 Conventions and miscellaneous bib1-attr Bib-1 Attribute Set DESCRIPTION This reference entry lists the Bib-1 attribute set types and values. TYPES The Bib-1 attribute set defines six attribute types: Use (1), Relation (2), Position (3), Structure (4), Truncation (5) and Completeness (6). USE (1) 1 Personal-name 2 Corporate-name 3 Conference-name 4 Title 5 Title-series 6 Title-uniform 7 ISBN 8 ISSN 9 LC-card-number 10 BNB-card-number 11 BGF-number 12 Local-number 13 Dewey-classification 14 UDC-classification 15 Bliss-classification 16 LC-call-number 17 NLM-call-number 18 NAL-call-number 19 MOS-call-number 20 Local-classification 21 Subject-heading 22 Subject-Rameau 23 BDI-index-subject 24 INSPEC-subject 25 MESH-subject 26 PA-subject 27 LC-subject-heading 28 RVM-subject-heading 29 Local-subject-index 30 Date 31 Date-of-publication 32 Date-of-acquisition 33 Title-key 34 Title-collective 35 Title-parallel 36 Title-cover 37 Title-added-title-page 38 Title-caption 39 Title-running 40 Title-spine 41 Title-other-variant 42 Title-former 43 Title-abbreviated 44 Title-expanded 45 Subject-precis 46 Subject-rswk 47 Subject-subdivision 48 Number-natl-biblio 49 Number-legal-deposit 50 Number-govt-pub 51 Number-music-publisher 52 Number-db 53 Number-local-call 54 Code-language 55 Code-geographic 56 Code-institution 57 Name-and-title 58 Name-geographic 59 Place-publication 60 CODEN 61 Microform-generation 62 Abstract 63 Note 1000 Author-title 1001 Record-type 1002 Name 1003 Author 1004 Author-name-personal 1005 Author-name-corporate 1006 Author-name-conference 1007 Identifier-standard 1008 Subject-LC-childrens 1009 Subject-name-personal 1010 Body-of-text 1011 Date/time-added-to-db 1012 Date/time-last-modified 1013 Authority/format-id 1014 Concept-text 1015 Concept-reference 1016 Any 1017 Server-choice 1018 Publisher 1019 Record-source 1020 Editor 1021 Bib-level 1022 Geographic-class 1023 Indexed-by 1024 Map-scale 1025 Music-key 1026 Related-periodical 1027 Report-number 1028 Stock-number 1030 Thematic-number 1031 Material-type 1032 Doc-id 1033 Host-item 1034 Content-type 1035 Anywhere 1036 Author-Title-Subject RELATION (2) 1 Less than 2 Less than or equal 3 Equal 4 Greater or equal 5 Greater than 6 Not equal 100 Phonetic 101 Stem 102 Relevance 103 AlwaysMatches POSITION (3) 1 First in field 2 First in subfield 3 Any position in field STRUCTURE (4) 1 Phrase 2 Word 3 Key 4 Year 5 Date (normalized) 6 Word list 100 Date (un-normalized) 101 Name (normalized) 102 Name (un-normalized) 103 Structure 104 Urx 105 Free-form-text 106 Document-text 107 Local-number 108 String 109 Numeric-string TRUNCATION (5) 1 Right truncation 2 Left truncation 3 Left and right truncation 100 Do not truncate 101 Process # in search term . regular #=.* 102 RegExpr-1 103 RegExpr-2 104 Process # ?n . regular: #=., ?n=.{0,n} or ?=.* Z39.58 The 105-106 truncation attributes below are only supported by Index Data's Zebra server. 105 Process * ! regular: *=.*, !=. and right truncate 106 Process * ! regular: *=.*, !=. COMPLETENESS (6) 1 Incomplete subfield 2 Complete subfield 3 Complete field SORTING (7) 1 ascending 2 descending Type 7 is an Index Data extension to RPN queries that allows embedding a sort critieria into a query. SEE ALSO Bib-1 Attribute Set Attribute Set Bib-1 Semantics. YAZ 5.34.0 Index Data yaz-json-parse 1 Commands yaz-json-parse YAZ JSON parser yaz-json-parse -p DESCRIPTION yaz-json-parse is a utility which demonstrates the JSON API of YAZ. (yaz/json.h). The program attempts to parse a JSON from standard input (stdin). It will return exit code 1 if parsing fails and the parsing error message will be printed to standard error (stderr). The program returns exit code 0 if parsing succeeds, and returns no output unless -p is given (see below). OPTIONS -p Makes the JSON parser echo the JSON result string to standard output, if parsing from stdin was successful. If -p is given twice, then the output is a multi-line output with indentation (pretty print). SEE ALSO yaz 7 YAZ 5.34.0 Index Data yaz-record-iconv 1 Commands yaz-record-conv YAZ Record Conversion Utility yaz-record-conv config fname DESCRIPTION yaz-record-conv is a program that exercises the record conversion sub system. Refer to record_conv.h header. OPTIONS -v level Sets the LOG level to level. Level is a sequence of tokens separated by comma. Each token is a integer or a named LOG item - one of fatal, debug, warn, log, malloc, all, none. EXAMPLES The following backend configuration converts MARC records (ISO2709) to Dublin-Core XML. <backend name="F" syntax="usmarc"> <marc inputcharset="marc-8" inputformat="marc" outputformat="marcxml"/> <xslt stylesheet="../etc/MARC21slim2DC.xsl"/> </backend> We can convert one of the sample records from YAZ' test directory with: $ ../util/yaz-record-conv record-conv-conf.xml marc6.marc <?xml version="1.0"?> <dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:title>How to program a computer</dc:title> <dc:creator> Jack Collins </dc:creator> <dc:type>text</dc:type> <dc:publisher>Penguin</dc:publisher> <dc:language>eng</dc:language> </dc:dc> FILES record_conv.h SEE ALSO yaz(7) yaz-5.34.0/doc/asn.pdu.html0000664000175000017500000004653214357765254012370 000000000000004. PDU Contents Table

4. PDU Contents Table

We include, for reference, a listing of the fields of each top-level PDU, as well as their default settings.

Table 5.1. Default settings for PDU Initialize Request

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
protocolVersionOdr_bitmaskEmpty bitmask
optionsOdr_bitmaskEmpty bitmask
preferredMessageSizeOdr_int30*1024
maximumRecordSizeOdr_int30*1024
idAuthenticationZ_IdAuthenticationNULL
implementationIdchar*"81"
implementationNamechar*"YAZ"
implementationVersionchar*YAZ_VERSION
userInformationFieldZ_UserInformationNULL
otherInfoZ_OtherInformationNULL

Table 5.2. Default settings for PDU Initialize Response

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
protocolVersionOdr_bitmaskEmpty bitmask
optionsOdr_bitmaskEmpty bitmask
preferredMessageSizeOdr_int30*1024
maximumRecordSizeOdr_int30*1024
resultOdr_boolTRUE
implementationIdchar*"id)"
implementationNamechar*"YAZ"
implementationVersionchar*YAZ_VERSION
userInformationFieldZ_UserInformationNULL
otherInfoZ_OtherInformationNULL

Table 5.3. Default settings for PDU Search Request

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
smallSetUpperBoundOdr_int0
largeSetLowerBoundOdr_int1
mediumSetPresentNumberOdr_int0
replaceIndicatorOdr_boolTRUE
resultSetNamechar *"default"
num_databaseNamesOdr_int0
databaseNameschar **NULL
smallSetElementSetNamesZ_ElementSetNames NULL
mediumSetElementSetNamesZ_ElementSetNames NULL
preferredRecordSyntaxOdr_oidNULL
queryZ_QueryNULL
additionalSearchInfoZ_OtherInformation NULL
otherInfoZ_OtherInformationNULL

Table 5.4. Default settings for PDU Search Response

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
resultCountOdr_int0
numberOfRecordsReturnedOdr_int0
nextResultSetPositionOdr_int0
searchStatusOdr_boolTRUE
resultSetStatusOdr_intNULL
presentStatusOdr_intNULL
recordsZ_RecordsNULL
additionalSearchInfoZ_OtherInformationNULL
otherInfoZ_OtherInformationNULL

Table 5.5. Default settings for PDU Present Request

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
resultSetIdchar*"default"
resultSetStartPointOdr_int1
numberOfRecordsRequestedOdr_int10
num_rangesOdr_int0
additionalRangesZ_RangeNULL
recordCompositionZ_RecordCompositionNULL
preferredRecordSyntaxOdr_oidNULL
maxSegmentCountOdr_intNULL
maxRecordSizeOdr_intNULL
maxSegmentSizeOdr_intNULL
otherInfoZ_OtherInformationNULL

Table 5.6. Default settings for PDU Present Response

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
numberOfRecordsReturnedOdr_int0
nextResultSetPositionOdr_int0
presentStatusOdr_intZ_PresentStatus_success
recordsZ_RecordsNULL
otherInfoZ_OtherInformationNULL

Table 5.7. Default settings for Delete Result Set Request

FieldTypeDefault Value
referenceId Z_ReferenceIdNULL
deleteFunctionOdr_intZ_DeleteResultSetRequest_list
num_idsOdr_int0
resultSetListchar**NULL
otherInfoZ_OtherInformationNULL

Table 5.8. Default settings for Delete Result Set Response

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
deleteOperationStatusOdr_intZ_DeleteStatus_success
num_statusesOdr_int0
deleteListStatusesZ_ListStatus**NULL
numberNotDeletedOdr_intNULL
num_bulkStatusesOdr_int0
bulkStatusesZ_ListStatusNULL
deleteMessagechar*NULL
otherInfoZ_OtherInformationNULL

Table 5.9. Default settings for Scan Request

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
num_databaseNamesOdr_int0
databaseNameschar**NULL
attributeSetOdr_oidNULL
termListAndStartPointZ_AttributesPlus... NULL
stepSizeOdr_intNULL
numberOfTermsRequestedOdr_int20
preferredPositionInResponseOdr_intNULL
otherInfoZ_OtherInformationNULL

Table 5.10. Default settings for Scan Response

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
stepSizeOdr_intNULL
scanStatusOdr_intZ_Scan_success
numberOfEntriesReturnedOdr_int0
positionOfTermOdr_intNULL
entriesZ_ListEntriesNULL
attributeSetOdr_oidNULL
otherInfoZ_OtherInformationNULL

Table 5.11. Default settings for Trigger Resource Control Request

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
requestedActionOdr_int Z_TriggerResourceCtrl_resou..
prefResourceReportFormatOdr_oidNULL
resultSetWantedOdr_boolNULL
otherInfoZ_OtherInformationNULL

Table 5.12. Default settings for Resource Control Request

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
suspendedFlagOdr_boolNULL
resourceReportZ_ExternalNULL
partialResultsAvailableOdr_intNULL
responseRequiredOdr_boolFALSE
triggeredRequestFlagOdr_boolNULL
otherInfoZ_OtherInformationNULL

Table 5.13. Default settings for Resource Control Response

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
continueFlagbool_tTRUE
resultSetWantedbool_tNULL
otherInfoZ_OtherInformationNULL

Table 5.14. Default settings for Access Control Request

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
whichenumZ_AccessRequest_simpleForm;
uunionNULL
otherInfoZ_OtherInformationNULL

Table 5.15. Default settings for Access Control Response

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
whichenumZ_AccessResponse_simpleForm
uunionNULL
diagnosticZ_DiagRecNULL
otherInfoZ_OtherInformationNULL

Table 5.16. Default settings for Segment

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
numberOfRecordsReturnedOdr_intvalue=0
num_segmentRecordsOdr_int0
segmentRecordsZ_NamePlusRecordNULL
otherInfoZ_OtherInformationNULL

Table 5.17. Default settings for Close

FieldTypeDefault Value
referenceIdZ_ReferenceIdNULL
closeReasonOdr_intZ_Close_finished
diagnosticInformationchar*NULL
resourceReportFormatOdr_oidNULL
resourceFormatZ_ExternalNULL
otherInfoZ_OtherInformationNULL

yaz-5.34.0/doc/local0.ent.in0000664000175000017500000000003614152153071012363 00000000000000 yaz-5.34.0/doc/server.main.html0000664000175000017500000002056214357765254013244 000000000000004. Your main() Routine

4. Your main() Routine

As mentioned, your main() routine can be quite brief. If you want to initialize global parameters, or read global configuration tables, this is the place to do it. At the end of the routine, you should call the function

int statserv_main(int argc, char **argv,
                  bend_initresult *(*bend_init)(bend_initrequest *r),
                  void (*bend_close)(void *handle));
   

The third and fourth arguments are pointers to handlers. Handler bend_init is called whenever the server receives an Initialize Request, so it serves as a Z39.50 session initializer. The bend_close handler is called when the session is closed.

statserv_main will establish listening sockets according to the parameters given. When connection requests are received, the event handler will typically fork() and create a sub-process to handle a new connection. Alternatively the server may be setup to create threads for each connection. If you do use global variables and forking, you should be aware, then, that these cannot be shared between associations, unless you explicitly disable forking by command line parameters.

The server provides a mechanism for controlling some of its behavior without using command-line options. The function

    statserv_options_block *statserv_getcontrol(void);
   

will return a pointer to a struct statserv_options_block describing the current default settings of the server. The structure contains these elements:

int dynamic

A boolean value, which determines whether the server will fork on each incoming request (TRUE), or not (FALSE). Default is TRUE. This flag is only read by UNIX-based servers (WIN32-based servers do not fork).

int threads

A boolean value, which determines whether the server will create a thread on each incoming request (TRUE), or not (FALSE). Default is FALSE. This flag is only read by UNIX-based servers that offer POSIX Threads support. WIN32-based servers always operate in threaded mode.

int inetd

A boolean value, which determines whether the server will operate under a UNIX INET daemon (inetd). Default is FALSE.

char logfile[ODR_MAXNAME+1]

File for diagnostic output ("": stderr).

char apdufile[ODR_MAXNAME+1]

Name of file for logging incoming and outgoing APDUs ("": don't log APDUs, "-": stderr).

char default_listen[1024]

Same form as the command-line specification of listener address. "": no default listener address. Default is to listen at "tcp:@:9999". You can only specify one default listener address in this fashion.

enum oid_proto default_proto;

Either PROTO_Z3950 or PROTO_SR. Default is PROTO_Z39_50.

int idle_timeout;

Maximum session idle-time, in minutes. Zero indicates no (infinite) timeout. Default is 15 minutes.

int maxrecordsize;

Maximum permissible record (message) size. Default is 64 MB. This amount of memory will only be allocated if a client requests a very large amount of records in one operation (or a big record). Set it to a lower number if you are worried about resource consumption on your host system.

char configname[ODR_MAXNAME+1]

Passed to the backend when a new connection is received.

char setuid[ODR_MAXNAME+1]

Set user id to the user specified, after binding the listener addresses.

void (*bend_start)(struct statserv_options_block *p)

Pointer to function which is called after the command line options have been parsed - but before the server starts listening. For forked UNIX servers, this handler is called in the mother process; for threaded servers, this handler is called in the main thread. The default value of this pointer is NULL in which case it isn't invoked by the frontend server. When the server operates as an NT service, this handler is called whenever the service is started.

void (*bend_stop)(struct statserv_options_block *p)

Pointer to function which is called whenever the server has stopped listening for incoming connections. This function pointer has a default value of NULL in which case it isn't called. When the server operates as an NT service, this handler is called whenever the service is stopped.

void *handle

User defined pointer (default value NULL). This is a per-server handle that can be used to specify "user-data". Do not confuse this with the session-handle as returned by bend_init.

The pointer returned by statserv_getcontrol points to a static area. You are allowed to change the contents of the structure, but the changes will not take effect until you call

void statserv_setcontrol(statserv_options_block *block);
   

Note

You should generally update this structure before calling statserv_main().

yaz-5.34.0/doc/yaz-iconv.10000664000175000017500000001021514357765252012116 00000000000000'\" t .\" Title: yaz-iconv .\" Author: Index Data .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/12/2023 .\" Manual: Commands .\" Source: YAZ 5.34.0 .\" Language: English .\" .TH "YAZ\-ICONV" "1" "01/12/2023" "YAZ 5.34.0" "Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" yaz-iconv \- YAZ Character set conversion utility .SH "SYNOPSIS" .HP \w'\fByaz\-iconv\fR\ 'u \fByaz\-iconv\fR [\fB\-f\ \fR\fB\fIfrom\fR\fR] [\fB\-t\ \fR\fB\fIto\fR\fR] [\fB\-v\fR] [file...] .SH "DESCRIPTION" .PP \fByaz\-iconv\fR converts data in the character set specified by \fIfrom\fR to output in the character set as specified by \fIto\fR\&. .PP This \fByaz\-iconv\fR utility is similar to the \fBiconv\fR found on many POSIX systems (Glibc, Solaris, etc)\&. .PP If no \fIfile\fR is specified, \fByaz\-iconv\fR reads from standard input\&. .SH "OPTIONS" .PP \-f\fIfrom\fR] .RS 4 Specify the character set \fIfrom\fR of the input file\&. Should be used in conjunction with option \-t\&. .RE .PP \-t\fIto\fR] .RS 4 Specify the character set \fIof\fR of the output\&. Should be used in conjunction with option \-f\&. .RE .PP \-v .RS 4 Print more information about the conversion process\&. .RE .SH "ENCODINGS" .PP The yaz\-iconv command and the API as defined in yaz/yaz\-iconv\&.h is a wrapper for the library system call iconv\&. But YAZ\*(Aq iconv utility also implements conversions on its own\&. The table below lists characters sets (or encodings) that are supported by YAZ\&. Each character set is marked with either \fIencode\fR or \fIdecode\fR\&. If an encoding is encode\-enabled, YAZ may convert \fIto\fR the designated encoding\&. If an encoding is decode\-enabled, YAZ may convert \fIfrom\fR the designated encoding\&. .PP marc8 (encode, decode) .RS 4 The \m[blue]\fBMARC8\fR\m[]\&\s-2\u[1]\d\s+2 encoding as defined by the Library of Congress\&. Most MARC21/USMARC records use this encoding\&. .RE .PP marc8s (encode, decode) .RS 4 Like MARC8 but conversion prefers non\-combined characters in the Latin\-1 plane over combined characters\&. .RE .PP marc8lossy (encode) .RS 4 Lossy encoding of MARC\-8\&. .RE .PP marc8lossless (encode) .RS 4 Lossless encoding of MARC8\&. .RE .PP utf8 (encode, decode) .RS 4 The most commonly used UNICODE encoding on the Internet\&. .RE .PP iso8859\-1 (encode, decode) .RS 4 ISO\-8859\-1, AKA Latin\-1\&. .RE .PP iso5426 (decode) .RS 4 ISO 5426\&. Some MARC records (UNIMARC) use this encoding\&. .RE .PP iso5428:1984 (encode, decode) .RS 4 ISO 5428:1984\&. .RE .PP advancegreek (encode, decode) .RS 4 An encoding for Greek in use by some vendors (Advance)\&. .RE .PP danmarc (decode) .RS 4 \m[blue]\fBDanmarc (in danish)\fR\m[]\&\s-2\u[2]\d\s+2 is an encoding based on UNICODE which is used for DanMARC2 records\&. .RE .SH "EXAMPLES" .PP The following command converts from ISO\-8859\-1 (Latin\-1) to UTF\-8\&. .sp .if n \{\ .RS 4 .\} .nf yaz\-iconv \-f ISO\-8859\-1 \-t UTF\-8 output\&.lst .fi .if n \{\ .RE .\} .sp .SH "FILES" .PP \fIprefix\fR/bin/yaz\-iconv .PP \fIprefix\fR/include/yaz/yaz\-iconv\&.h .SH "SEE ALSO" .PP yaz(7) iconv(1) .SH "AUTHORS" .PP \fBIndex Data\fR .SH "NOTES" .IP " 1." 4 MARC8 .RS 4 \%https://www.loc.gov/marc/specifications/speccharmarc8.html .RE .IP " 2." 4 Danmarc (in danish) .RS 4 \%http://www.kat-format.dk/danMARC2/Danmarc2.4.htm .RE yaz-5.34.0/win/0000775000175000017500000000000014357765255010231 500000000000000yaz-5.34.0/win/version.nsi.in0000664000175000017500000000003514357765255012754 00000000000000!define VERSION "@VERSION@" yaz-5.34.0/win/version.nsi0000664000175000017500000000003214357765255012344 00000000000000!define VERSION "5.34.0" yaz-5.34.0/win/yaz.nsi0000664000175000017500000001464314357765255011477 00000000000000; This file is part of the YAZ toolkit. ; Copyright (C) Index Data ; See the file LICENSE for details. ; Using https://nsis.sourceforge.io/EnVar_plug-in ; for path manipulation Unicode True !include version.nsi !include "MUI.nsh" Name "YAZ" !include "..\m4\common.nsi" RequestExecutionLevel admin SetCompressor bzip2 Caption "Index Data YAZ ${VERSION} Setup" OutFile "yaz_${VERSION}.exe" LicenseText "You must read the following license before installing:" LicenseData license.txt ComponentText "This will install the YAZ Toolkit on your computer:" InstType "Full (w/ Source)" InstType "Lite (w/o Source)" InstallDirRegKey HKLM "SOFTWARE\Index Data\YAZ" "" ;---------------------------- ; Pages !insertmacro MUI_PAGE_LICENSE "license.txt" !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_UNPAGE_CONFIRM !insertmacro MUI_UNPAGE_INSTFILES ; Page components ; Page directory ; Page instfiles ; UninstPage uninstConfirm ; UninstPage instfiles ;-------------------------------- ;Languages !insertmacro MUI_LANGUAGE "English" ;-------------------------------- Section "" ; (default section) SetOutPath "$INSTDIR" ; add files / whatever that need to be installed here. WriteRegStr HKLM "SOFTWARE\Index Data\YAZ" "" "$INSTDIR" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "DisplayName" "YAZ ${VERSION} (remove only)" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" "UninstallString" '"$INSTDIR\uninst.exe"' ; write out uninstaller WriteUninstaller "$INSTDIR\uninst.exe" SetOutPath $SMPROGRAMS\YAZ CreateShortCut "$SMPROGRAMS\YAZ\YAZ Program Directory.lnk" \ "$INSTDIR" WriteINIStr "$SMPROGRAMS\YAZ\YAZ Home page.url" \ "InternetShortcut" "URL" "http://www.indexdata.com/yaz/" CreateShortCut "$SMPROGRAMS\YAZ\Uninstall YAZ.lnk" \ "$INSTDIR\uninst.exe" SetOutPath $INSTDIR File LICENSE.txt File ..\README.md File ..\NEWS SetOutPath $INSTDIR SetOutPath $INSTDIR\ztest File ..\ztest\dummy-grs File ..\ztest\dummy-words SetOutPath $INSTDIR\etc File ..\etc\*.xml File ..\etc\*.xsl File ..\etc\pqf.properties SectionEnd ; end of default section Section "YAZ Runtime" YAZ_Runtime SectionIn 1 2 SetOutPath $INSTDIR\bin File "${VS_REDIST_FULL}" ReadRegDword $1 HKLM "${VS_REDIST_KEY}" "Version" ${If} $1 == "" ExecWait '"$INSTDIR\bin\${VS_REDIST_EXE}" /passive /nostart' ${endif} Delete "$INSTDIR\bin\${VS_REDIST_EXE}" IfFileExists "$INSTDIR\bin\yaz-ztest.exe" 0 Noservice ExecWait '"$INSTDIR\bin\yaz-ztest.exe" -remove' Noservice: File ..\bin\*.dll File ..\bin\*.exe SetOutPath $SMPROGRAMS\YAZ CreateShortCut "$SMPROGRAMS\YAZ\YAZ Client.lnk" \ "$INSTDIR\bin\yaz-client.exe" SetOutPath $SMPROGRAMS\YAZ\Server CreateShortCut "$SMPROGRAMS\YAZ\Server\Server on console on port 9999.lnk" \ "$INSTDIR\bin\yaz-ztest.exe" '-w"$INSTDIR\ztest"' CreateShortCut "$SMPROGRAMS\YAZ\Server\Install Z39.50 service on port 210.lnk" \ "$INSTDIR\bin\yaz-ztest.exe" '-installa tcp:@:210' CreateShortCut "$SMPROGRAMS\YAZ\Server\Remove Z39.50 service.lnk" \ "$INSTDIR\bin\yaz-ztest.exe" '-remove' SectionEnd Section "YAZ Development" YAZ_Development SectionIn 1 2 SetOutPath $INSTDIR\include\yaz File ..\src\yaz\*.h SetOutPath $INSTDIR\lib File ..\lib\yaz*.lib SectionEnd Section "YAZ Documentation" YAZ_Documentation SectionIn 1 2 SetOutPath $INSTDIR\doc File /nonfatal /r ..\doc\*.css File /nonfatal /r ..\doc\*.ent File /nonfatal /r ..\doc\*.html File /r ..\doc\*.xml File /r ..\doc\*.png File /nonfatal /r ..\doc\*.xsl SetOutPath $SMPROGRAMS\YAZ CreateShortCut "$SMPROGRAMS\YAZ\HTML Documentation.lnk" \ "$INSTDIR\doc\index.html" SectionEnd Section "YAZ Source" YAZ_Source SectionIn 1 SetOutPath $INSTDIR File ..\IDMETA File /r ..\*.c File /r /x yaz ..\*.h SetOutPath $INSTDIR\util File ..\src\yaz-asncomp SetOutPath $INSTDIR\src File ..\src\*.y File ..\src\*.tcl File ..\src\*.csv File ..\src\*.asn File ..\src\codetables*.xml SetOutPath $INSTDIR\test File ..\test\marc*.* File ..\test\*.sh File ..\test\*.xml File ..\test\*.asn SetOutPath $INSTDIR\win File makefile File *.nsi File *.rc SetOutPath $INSTDIR\m4 File ..\m4\*.m4 File ..\m4\*.tcl File ..\m4\*.nsi SectionEnd Section "YAZ4J" YAZ4J SectionIn 1 2 SetOutPath $INSTDIR\bin File /nonfatal ..\bin\yaz4j*.dll SetOutPath $INSTDIR\java File /nonfatal ..\java\yaz4j*.jar SectionEnd Section "YAZ Path" YAZ_PATH SectionIn 1 2 EnVar::SetHKLM EnVar::AddValue "PATH" "$INSTDIR\bin" Pop $0 SectionEnd ; begin uninstall settings/section UninstallText "This will uninstall YAZ ${VERSION} from your system" Section Uninstall ExecWait '"$INSTDIR\bin\yaz-ztest" -remove' RMDir /r $SMPROGRAMS\YAZ Delete "$INSTDIR\uninst.exe" DeleteRegKey HKLM "SOFTWARE\Index Data\YAZ" DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YAZ" RMDir /r $INSTDIR EnVar::SetHKLM EnVar::DeleteValue "PATH" "$INSTDIR\bin" Pop $0 IfFileExists $INSTDIR 0 Removed MessageBox MB_OK|MB_ICONEXCLAMATION \ "Note: $INSTDIR could not be removed." Removed: SectionEnd ;-------------------------------- ;Descriptions ;Language strings LangString DESC_YAZ_Runtime ${LANG_ENGLISH} "YAZ runtime files needed in order for YAZ to run, such as DLLs." LangString DESC_YAZ_Development ${LANG_ENGLISH} "Header files and import libraries required for developing software using YAZ." LangString DESC_YAZ_Documentation ${LANG_ENGLISH} "YAZ Users' guide and reference in HTML. Describes both YAZ applications and the API." LangString DESC_YAZ_Source ${LANG_ENGLISH} "Source code of YAZ. Required if you need to rebuild YAZ (for debugging purposes)." LangString DESC_YAZ4J ${LANG_ENGLISH} "Java wrapper for the ZOOM API of YAZ." LangString DESC_YAZ_PATH ${LANG_ENGLISH} "Update PATH to include binaries of YAZ." ;Assign language strings to sections !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Runtime} $(DESC_YAZ_Runtime) !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Development} $(DESC_YAZ_Development) !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Documentation} $(DESC_YAZ_Documentation) !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_Source} $(DESC_YAZ_Source) !insertmacro MUI_DESCRIPTION_TEXT ${YAZ4J} $(DESC_YAZ4J) !insertmacro MUI_DESCRIPTION_TEXT ${YAZ_PATH} $(DESC_YAZ_PATH) !insertmacro MUI_FUNCTION_DESCRIPTION_END ; eof yaz-5.34.0/win/yaz.rc0000664000175000017500000000213014357765255011276 00000000000000#include "winver.h" #include "yaz\yaz-version.h" VS_VERSION_INFO VERSIONINFO FILEVERSION YAZ_FILEVERSION PRODUCTVERSION YAZ_FILEVERSION FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS VOS_NT FILETYPE VFT_DLL FILESUBTYPE VFT2_UNKNOWN { BLOCK "StringFileInfo" { BLOCK "000004b0" BEGIN VALUE "Comments", "https://www.indexdata.com/yaz/\0" VALUE "CompanyName", "Index Data\0" #ifdef ICU VALUE "FileDescription", "YAZ ICU DLL\0" #else VALUE "FileDescription", "YAZ DLL\0" #endif VALUE "FileVersion", YAZ_VERSION "\0" VALUE "InternalName", "YAZ\0" VALUE "LegalCopyright", "Copyright © 1995-2023 Index Data\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "yaz.res\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "YAZ\0" VALUE "ProductVersion", YAZ_VERSION "\0" VALUE "SpecialBuild", "\0" END } BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0, 1200 END } yaz-5.34.0/win/makefile0000664000175000017500000006455114357765255011664 00000000000000# This file is part of the YAZ toolkit. # Copyright (C) Index Data # Parameters DEBUG=0 # 0 for release, 1 for debug BARCH = 32 # 32=win32/x86 or 64=x64 # TCL TCL=tclsh #TCL="C:\Tcl\bin\tclsh85.exe" HAVE_TCL=1 # iconv charcter conversion utility HAVE_ICONV=0 ICONV_DIR = c:\iconv-1.9.2.win$(BARCH) # icu charcter conversion utility # get icu libraries from http://www.icu-project.org HAVE_ICU=1 ICU_VER=68 ICU_BASE = c:\icu4c-$(ICU_VER)_2-Win$(BARCH)-MSVC2019 !if $(BARCH) == 32 ICU_LIB = $(ICU_BASE)\lib ICU_BIN = $(ICU_BASE)\bin !elseif $(BARCH) == 64 ICU_LIB = $(ICU_BASE)\lib64 ICU_BIN = $(ICU_BASE)\bin64 !else !error BARCH must be 32 or 64 !endif ICU_INCLUDE = $(ICU_BASE)\include # libxslt HAVE_LIBXSLT=1 LIBXSLT_DIR=c:\libxslt-1.1.28.win$(BARCH) # libxml2 HAVE_LIBXML2=1 LIBXML2_DIR=c:\libxml2-2.9.2.win$(BARCH) # get WIN32 binaries libxml2 & iconv & zlib from here: # http://www.zlatkovic.com/libxml.en.html # bison HAVE_BISON=1 BISON=bison default: all all: dirs generate dll client ztest yazicu zoomsh utilprog \ testprog iconv icu libxml2 libxslt yaz_url NSIS="c:\program files (x86)\nsis\makensis.exe" HHC="c:\program files (x86)\html help workshop\hhc.exe" YAZ4J_DIR="..\..\yaz4j" YAZPATH=$(MAKEDIR)\.. dist: yaz.nsi version.nsi distclean nmake DEBUG=0 all nmake nsis dist64: yaz.nsi version.nsi distclean nmake make64 yaz4j nmake nsis64 make64: nmake DEBUG=0 BARCH=64 all distclean: nmake DEBUG=1 clean nmake DEBUG=0 clean nsis: version.nsi $(NSIS) /DVSARCH=x86 yaz.nsi nsis64: version.nsi $(NSIS) /DVSARCH=x64 yaz.nsi nsishelp: $(NSIS) # Directories # The current directory is supposed to be something like # ..../yaz/win, everything is relative to that ROOTDIR=.. # The home of yaz LIBDIR=$(ROOTDIR)\lib # We produce .lib, .exp etc there BINDIR=$(ROOTDIR)\bin # We produce exes and dlls there WINDIR=$(ROOTDIR)\win # all these Win make things SRCDIR=$(ROOTDIR)\src # for the case we move them under src INCLDIR=$(SRCDIR) # our includes DOCDIR=$(ROOTDIR)\doc # where the doc is JAVADIR=$(ROOTDIR)\java M4DIR=$(ROOTDIR)\m4 # where we store intermediate files !if $(DEBUG) OBJDIR=$(WINDIR)\dobj !else OBJDIR=$(WINDIR)\obj !endif CLIENTDIR=$(ROOTDIR)\CLIENT ZTESTDIR=$(ROOTDIR)\ZTEST ZOOMDIR=$(ROOTDIR)\ZOOM UTILDIR=$(ROOTDIR)\UTIL TESTDIR=$(ROOTDIR)\TEST # TMPDIR=$(ROOTDIR)\win\tmp # TMP=$(TMPDIR) # Targets - what to make !if $(DEBUG) YAZ_DLL=$(BINDIR)\yaz5d.dll YAZ_IMPLIB=$(LIBDIR)\yaz5d.lib YAZ_ICU_DLL=$(BINDIR)\yaz_icu5d.dll YAZ_ICU_IMPLIB=$(LIBDIR)\yaz_icu5d.lib YAZ_COND_DLL=$(BINDIR)\yaz_cond5d.dll YAZ_COND_IMPLIB=$(LIBDIR)\yaz_cond5d.lib !else YAZ_DLL=$(BINDIR)\yaz5.dll YAZ_IMPLIB=$(LIBDIR)\yaz5.lib YAZ_ICU_DLL=$(BINDIR)\yaz_icu5.dll YAZ_ICU_IMPLIB=$(LIBDIR)\yaz_icu5.lib YAZ_COND_DLL=$(BINDIR)\yaz_cond5.dll YAZ_COND_IMPLIB=$(LIBDIR)\yaz_cond5.lib !endif CLIENT=$(BINDIR)\yaz-client.exe YAZ_ICU=$(BINDIR)\yaz-icu.exe YAZ_URL=$(BINDIR)\yaz-url.exe ZOOMSH=$(BINDIR)\zoomsh.exe ZTEST=$(BINDIR)\yaz-ztest.exe ZOOMTST1=$(BINDIR)\zoomtst1.exe ZOOMTST2=$(BINDIR)\zoomtst2.exe ZOOMTST3=$(BINDIR)\zoomtst3.exe ZOOMTST4=$(BINDIR)\zoomtst4.exe ZOOMTST5=$(BINDIR)\zoomtst5.exe ZOOMTST6=$(BINDIR)\zoomtst6.exe ZOOMTST7=$(BINDIR)\zoomtst7.exe ZOOMTST8=$(BINDIR)\zoomtst8.exe ZOOMTST9=$(BINDIR)\zoomtst9.exe ZOOMTST10=$(BINDIR)\zoomtst10.exe CQL2PQF=$(BINDIR)\cql2pqf.exe CQL2XCQL=$(BINDIR)\cql2xcql.exe YAZ_MARCDUMP=$(BINDIR)\yaz-marcdump.exe YAZ_ICONV=$(BINDIR)\yaz-iconv.exe YAZ_RECORD_CONV=$(BINDIR)\yaz-record-conv.exe YAZ_JSON_PARSE=$(BINDIR)\yaz-json-parse.exe TSTLOG=$(BINDIR)\test_log.exe TST_TIMING=$(BINDIR)\test_timing.exe TEST_MUTEX=$(BINDIR)\test_mutex.exe # shortcut names defined here dll: dirs generate $(YAZ_DLL) $(YAZ_COND_DLL) client: dirs generate $(CLIENT) ztest: dirs generate $(ZTEST) zoomsh: $(ZOOMSH) $(ZOOMTST1) $(ZOOMTST2) $(ZOOMTST3) \ $(ZOOMTST4) $(ZOOMTST5) $(ZOOMTST6) $(ZOOMTST7) $(ZOOMTST8) $(ZOOMTST9) \ $(ZOOMTST10) yaz_url: $(YAZ_URL) utilprog: $(CQL2PQF) $(CQL2XCQL) $(YAZ_MARCDUMP) $(YAZ_ICONV) $(YAZ_RECORD_CONV) $(YAZ_JSON_PARSE) testprog: $(TSTLOG) $(TST_TIMING) $(TEST_MUTEX) htmlhelp: $(DOCDIR)\htmlhelp.chm # Modules and conditional flags, etc !if $(HAVE_ICONV) ICONV_DEF= \ /D HAVE_ICONV_H=1 \ /I"$(ICONV_DIR)\include" ICONV_LIB= \ "$(ICONV_DIR)\lib\iconv.lib" iconv: $(BINDIR)\iconv.dll $(BINDIR)\iconv.dll: copy "$(ICONV_DIR)\bin\iconv.dll" $(BINDIR) !else ICONV_DEF= \ /D HAVE_ICONV_H=0 ICONV_LIB= iconv: !endif !if $(HAVE_ICU) ICU_DEF= \ /D YAZ_HAVE_ICU=1 /D HAVE_ICU_H=1 /I"$(ICU_INCLUDE)" ICU_LIBS= \ $(ICU_LIB)\icudt.lib $(ICU_LIB)\icuin.lib $(ICU_LIB)\icuuc.lib icu: $(BINDIR)\icudt$(ICU_VER).dll $(BINDIR)\icuin$(ICU_VER).dll $(BINDIR)\icuuc$(ICU_VER).dll yazicu: dirs generate $(YAZ_ICU) $(BINDIR)\icudt$(ICU_VER).dll: copy "$(ICU_BIN)\icudt$(ICU_VER).dll" $(BINDIR) $(BINDIR)\icuin$(ICU_VER).dll: copy "$(ICU_BIN)\icuin$(ICU_VER).dll" $(BINDIR) $(BINDIR)\icuuc$(ICU_VER).dll: copy "$(ICU_BIN)\icuuc$(ICU_VER).dll" $(BINDIR) !else ICU_DEF= /D YAZ_HAVE_ICU=0 ICU_LIBS= icu: yazicu: !endif ### !if $(HAVE_LIBXML2) LIBXML2_LIB="$(LIBXML2_DIR)\lib\libxml2.lib" LIBXML2_DEF=/D YAZ_HAVE_XML2=1 /I"$(LIBXML2_DIR)\include\libxml2" libxml2: $(BINDIR)\libxml2.dll $(BINDIR)\libxml2.dll: copy "$(LIBXML2_DIR)\bin\libxml2.dll" $(BINDIR) !else LIBXML2_LIB= LIBXML2_DEF=/D YAZ_HAVE_XML2=0 libxml2: !endif !if $(HAVE_LIBXSLT) LIBXSLT_LIB="$(LIBXSLT_DIR)\lib\libxslt.lib" LIBXSLT_DEF= \ /D HAVE_XSLTSAVERESULTTOSTRING=1 \ /D YAZ_HAVE_XSLT=1 \ /I"$(LIBXSLT_DIR)\include" libxslt: $(BINDIR)\libxslt.dll $(BINDIR)\libxslt.dll: copy "$(LIBXSLT_DIR)\lib\libxslt.dll" $(BINDIR) !else LIBXSLT_LIB= LIBXSLT_DEF=/D YAZ_HAVE_XSLT=0 libxslt: !endif ### C and CPP compiler (the same thing) # Note: $(CPP) has already been defined in the environment # (if you set things up right!) COMMON_C_OPTIONS= \ /nologo /W3 /EHsc /FD /c \ $(ICONV_DEF) \ $(ICU_DEF) \ $(LIBXML2_DEF) \ $(LIBXSLT_DEF) \ /D "_CRT_SECURE_NO_DEPRECATE" \ /D "_CRT_NONSTDC_NO_DEPRECATE" \ /D "_WINDOWS" \ /D "WIN32" \ /FR"$(OBJDIR)\\" \ /Fo"$(OBJDIR)\\" \ /Fd"$(OBJDIR)\\" COMMON_C_INCLUDES= \ /I"$(INCLDIR)" \ /I"$(SRCDIR)\libstemmer_c\include" DEBUG_C_OPTIONS= \ /D "_DEBUG" \ /MDd /Od /Zi /Gm RELEASE_C_OPTIONS= \ /D "NDEBUG" \ /MD /O2 MVN_ARGS=-Dyaz.path="$(YAZPATH)" -Dyaz.include="$(YAZPATH)\src" # without >log below, mvn install does NOT work yaz4j: $(JAVADIR) cd $(YAZ4J_DIR) cmd /C mvn $(MVN_ARGS) clean package copy /Y target\native\yaz4j*.dll "$(MAKEDIR)\..\bin" copy /Y target\yaz4j*.jar "$(MAKEDIR)\..\java" ### Linker options LINK=link.exe LINK_LIBS= kernel32.lib ws2_32.lib advapi32.lib \ $(ICONV_LIB) $(LIBXML2_LIB) $(LIBXSLT_LIB) COMMON_LNK_OPTIONS= /nologo /subsystem:windows /incremental:no DEBUG_LNK_OPTIONS= /debug RELEASE_LNK_OPTIONS= DLL_LINK_OPTIONS= /dll CLIENT_LINK_OPTIONS = /subsystem:console COMMON_TCL_OPTIONS= yaz-asncomp -I$(INCLDIR) -i yaz # Final opt variables !if $(DEBUG) COPT= $(COMMON_C_OPTIONS) $(DEBUG_C_OPTIONS) $(COMMON_C_INCLUDES) LNKOPT= $(COMMON_LNK_OPTIONS) $(DEBUG_LNK_OPTIONS) $(LNK_LIBS) TCLOPT= $(COMMON_TCL_OPTIONS) !else COPT= $(COMMON_C_OPTIONS) $(RELEASE_C_OPTIONS) $(COMMON_C_INCLUDES) LNKOPT= $(COMMON_LNK_OPTIONS) $(RELEASE_LNK_OPTIONS) $(LNK_LIBS) TCLOPT= $(COMMON_TCL_OPTIONS) !endif LINK_PROGRAM = $(LINK) $(LNKOPT) \ $(CLIENT_LINK_OPTIONS) $(LINK_LIBS) $(YAZ_IMPLIB) LINK_DLL = $(LINK) $(LNKOPT) \ $(LINK_LIBS) $(DLL_LINK_OPTIONS) # Source and object modules # Note: Ordinary source files are not specified here at # all, make finds them in suitable dirs. The object modules # need to be specified, though YAZ_CLIENT_OBJS= \ $(OBJDIR)\client.obj \ $(OBJDIR)\tabcomplete.obj \ $(OBJDIR)\admin.obj \ $(OBJDIR)\fhistory.obj YAZ_ICU_OBJS= $(OBJDIR)\yaz-icu.obj YAZ_URL_OBJS= $(OBJDIR)\yaz-url.obj COND_DLL_OBJS= $(OBJDIR)\condvar.obj ZTEST_OBJS= \ $(OBJDIR)\dummy-opac.obj \ $(OBJDIR)\read-marc.obj \ $(OBJDIR)\read-grs.obj \ $(OBJDIR)\ztest.obj YAZ_ZOOMSH_OBJS = \ $(OBJDIR)\zoomsh.obj YAZ_ZOOMTST1_OBJS = \ $(OBJDIR)\zoomtst1.obj YAZ_ZOOMTST2_OBJS = \ $(OBJDIR)\zoomtst2.obj YAZ_ZOOMTST3_OBJS = \ $(OBJDIR)\zoomtst3.obj YAZ_ZOOMTST4_OBJS = \ $(OBJDIR)\zoomtst4.obj YAZ_ZOOMTST5_OBJS = \ $(OBJDIR)\zoomtst5.obj YAZ_ZOOMTST6_OBJS = \ $(OBJDIR)\zoomtst6.obj YAZ_ZOOMTST7_OBJS = \ $(OBJDIR)\zoomtst7.obj YAZ_ZOOMTST8_OBJS = \ $(OBJDIR)\zoomtst8.obj YAZ_ZOOMTST9_OBJS = \ $(OBJDIR)\zoomtst9.obj YAZ_ZOOMTST10_OBJS = \ $(OBJDIR)\zoomtst10.obj YAZ_CQL2PQF_OBJS = \ $(OBJDIR)\cql2pqf.obj YAZ_CQL2XCQL_OBJS = \ $(OBJDIR)\cql2xcql.obj YAZ_MARCDUMP_OBJS = \ $(OBJDIR)\marcdump.obj YAZ_ICONV_OBJS = \ $(OBJDIR)\yaziconv.obj YAZ_RECORD_CONV_OBJS = \ $(OBJDIR)\yaz-record-conv.obj YAZ_JSON_PARSE_OBJS = \ $(OBJDIR)\json-parse.obj TSTLOG_OBJS = \ $(OBJDIR)\test_log.obj TST_TIMING_OBJS = \ $(OBJDIR)\test_timing.obj TEST_MUTEX_OBJS = \ $(OBJDIR)\test_mutex.obj MISC_OBJS= \ $(OBJDIR)\diag_map.obj \ $(OBJDIR)\base64.obj \ $(OBJDIR)\version.obj \ $(OBJDIR)\oid_std.obj \ $(OBJDIR)\eventl.obj \ $(OBJDIR)\requestq.obj \ $(OBJDIR)\seshigh.obj \ $(OBJDIR)\statserv.obj \ $(OBJDIR)\tcpdchk.obj \ $(OBJDIR)\cclerrms.obj \ $(OBJDIR)\cclfind.obj \ $(OBJDIR)\cclptree.obj \ $(OBJDIR)\cclqfile.obj \ $(OBJDIR)\cclqual.obj \ $(OBJDIR)\cclstr.obj \ $(OBJDIR)\ccltoken.obj \ $(OBJDIR)\cclxmlconfig.obj \ $(OBJDIR)\ccl_stop_words.obj \ $(OBJDIR)\comstack.obj \ $(OBJDIR)\tcpip.obj \ $(OBJDIR)\ber_any.obj \ $(OBJDIR)\ber_bit.obj \ $(OBJDIR)\ber_bool.obj \ $(OBJDIR)\ber_int.obj \ $(OBJDIR)\ber_len.obj \ $(OBJDIR)\ber_null.obj \ $(OBJDIR)\ber_oct.obj \ $(OBJDIR)\ber_oid.obj \ $(OBJDIR)\ber_tag.obj \ $(OBJDIR)\dumpber.obj \ $(OBJDIR)\errno.obj \ $(OBJDIR)\odr.obj \ $(OBJDIR)\odr_any.obj \ $(OBJDIR)\odr_bit.obj \ $(OBJDIR)\odr_bool.obj \ $(OBJDIR)\odr_choice.obj \ $(OBJDIR)\odr_cons.obj \ $(OBJDIR)\odr_enum.obj \ $(OBJDIR)\odr_int.obj \ $(OBJDIR)\odr_mem.obj \ $(OBJDIR)\odr_null.obj \ $(OBJDIR)\odr_oct.obj \ $(OBJDIR)\odr_oid.obj \ $(OBJDIR)\odr_seq.obj \ $(OBJDIR)\odr_tag.obj \ $(OBJDIR)\odr_use.obj \ $(OBJDIR)\odr_util.obj \ $(OBJDIR)\atoin.obj \ $(OBJDIR)\log.obj \ $(OBJDIR)\malloc_info.obj \ $(OBJDIR)\marcdisp.obj \ $(OBJDIR)\marc_read_sax.obj \ $(OBJDIR)\marc_read_json.obj \ $(OBJDIR)\marc_read_xml.obj \ $(OBJDIR)\marc_read_iso2709.obj \ $(OBJDIR)\marc_read_line.obj \ $(OBJDIR)\nmem.obj \ $(OBJDIR)\nmemsdup.obj \ $(OBJDIR)\oid_db.obj \ $(OBJDIR)\oid_util.obj \ $(OBJDIR)\options.obj \ $(OBJDIR)\readconf.obj \ $(OBJDIR)\tpath.obj \ $(OBJDIR)\wrbuf.obj \ $(OBJDIR)\wrbuf_sha1.obj \ $(OBJDIR)\xmalloc.obj \ $(OBJDIR)\matchstr.obj \ $(OBJDIR)\siconv.obj \ $(OBJDIR)\iso5428.obj \ $(OBJDIR)\utf8.obj \ $(OBJDIR)\ucs4.obj \ $(OBJDIR)\advancegreek.obj \ $(OBJDIR)\snprintf.obj \ $(OBJDIR)\marc8.obj \ $(OBJDIR)\marc8r.obj \ $(OBJDIR)\iso5426.obj \ $(OBJDIR)\record_conv.obj \ $(OBJDIR)\retrieval.obj \ $(OBJDIR)\test.obj \ $(OBJDIR)\diagbib1.obj \ $(OBJDIR)\diagsru_update.obj \ $(OBJDIR)\diagsrw.obj \ $(OBJDIR)\diag-entry.obj \ $(OBJDIR)\zget.obj \ $(OBJDIR)\logrpn.obj \ $(OBJDIR)\querytowrbuf.obj \ $(OBJDIR)\pquery.obj \ $(OBJDIR)\yaz-ccl.obj \ $(OBJDIR)\otherinfo.obj \ $(OBJDIR)\sortspec.obj \ $(OBJDIR)\charneg.obj \ $(OBJDIR)\grs1disp.obj \ $(OBJDIR)\opac_to_xml.obj \ $(OBJDIR)\xml_get.obj \ $(OBJDIR)\xml_add.obj \ $(OBJDIR)\xml_match.obj \ $(OBJDIR)\xml_to_opac.obj \ $(OBJDIR)\zgdu.obj \ $(OBJDIR)\soap.obj \ $(OBJDIR)\solr.obj \ $(OBJDIR)\solrtransform.obj \ $(OBJDIR)\sru_facet.obj \ $(OBJDIR)\srw.obj \ $(OBJDIR)\srwutil.obj \ $(OBJDIR)\zoom-c.obj \ $(OBJDIR)\zoom-event.obj \ $(OBJDIR)\zoom-memcached.obj \ $(OBJDIR)\zoom-record-cache.obj \ $(OBJDIR)\zoom-z3950.obj \ $(OBJDIR)\zoom-sru.obj \ $(OBJDIR)\zoom-query.obj \ $(OBJDIR)\record_render.obj \ $(OBJDIR)\facet.obj \ $(OBJDIR)\zoom-opt.obj \ $(OBJDIR)\zoom-socket.obj \ $(OBJDIR)\initopt.obj \ $(OBJDIR)\init_diag.obj \ $(OBJDIR)\init_globals.obj \ $(OBJDIR)\xmlquery.obj \ $(OBJDIR)\xmlerror.obj \ $(OBJDIR)\mime.obj \ $(OBJDIR)\cookie.obj \ $(OBJDIR)\cql.obj \ $(OBJDIR)\cql2ccl.obj \ $(OBJDIR)\cql_sortkeys.obj \ $(OBJDIR)\cqlstdio.obj \ $(OBJDIR)\cqlstring.obj \ $(OBJDIR)\cqltransform.obj \ $(OBJDIR)\cqlutil.obj \ $(OBJDIR)\cqlstrer.obj \ $(OBJDIR)\rpn2cql.obj \ $(OBJDIR)\rpn2solr.obj \ $(OBJDIR)\xcqlutil.obj \ $(OBJDIR)\elementset.obj \ $(OBJDIR)\timing.obj \ $(OBJDIR)\uri.obj \ $(OBJDIR)\query-charset.obj \ $(OBJDIR)\tokenizer.obj \ $(OBJDIR)\copy_types.obj \ $(OBJDIR)\http.obj \ $(OBJDIR)\match_glob.obj \ $(OBJDIR)\poll.obj \ $(OBJDIR)\daemon.obj \ $(OBJDIR)\iconv_encode_danmarc.obj \ $(OBJDIR)\iconv_encode_iso_8859_1.obj \ $(OBJDIR)\iconv_encode_marc8.obj \ $(OBJDIR)\iconv_decode_marc8.obj \ $(OBJDIR)\iconv_encode_wchar.obj \ $(OBJDIR)\iconv_decode_iso5426.obj \ $(OBJDIR)\iconv_decode_danmarc.obj \ $(OBJDIR)\mutex.obj \ $(OBJDIR)\thread_create.obj \ $(OBJDIR)\spipe.obj \ $(OBJDIR)\gettimeofday.obj \ $(OBJDIR)\json.obj \ $(OBJDIR)\sc.obj \ $(OBJDIR)\xml_include.obj \ $(OBJDIR)\file_glob.obj \ $(OBJDIR)\thread_id.obj \ $(OBJDIR)\dirent.obj \ $(OBJDIR)\url.obj \ $(OBJDIR)\proxunit.obj \ $(OBJDIR)\backtrace.obj Z3950_OBJS= \ $(OBJDIR)\z-date.obj\ $(OBJDIR)\z-univ.obj\ $(OBJDIR)\zes-update.obj\ $(OBJDIR)\zes-admin.obj \ $(OBJDIR)\z-accdes1.obj \ $(OBJDIR)\z-accform1.obj \ $(OBJDIR)\z-acckrb1.obj \ $(OBJDIR)\z-core.obj \ $(OBJDIR)\z-diag1.obj \ $(OBJDIR)\z-espec1.obj \ $(OBJDIR)\z-estask.obj \ $(OBJDIR)\z-exp.obj \ $(OBJDIR)\z-grs.obj \ $(OBJDIR)\z-opac.obj \ $(OBJDIR)\z-uifr1.obj \ $(OBJDIR)\z-rrf1.obj \ $(OBJDIR)\z-rrf2.obj \ $(OBJDIR)\z-sum.obj \ $(OBJDIR)\z-sutrs.obj \ $(OBJDIR)\zes-expi.obj \ $(OBJDIR)\zes-exps.obj \ $(OBJDIR)\zes-order.obj \ $(OBJDIR)\zes-pquery.obj \ $(OBJDIR)\zes-psched.obj \ $(OBJDIR)\zes-pset.obj \ $(OBJDIR)\zes-update0.obj \ $(OBJDIR)\prt-ext.obj \ $(OBJDIR)\z-charneg.obj \ $(OBJDIR)\z-mterm2.obj \ $(OBJDIR)\z-oclcui.obj \ $(OBJDIR)\z-facet-1.obj ILL_OBJS= \ $(OBJDIR)\ill-get.obj\ $(OBJDIR)\ill-core.obj\ $(OBJDIR)\item-req.obj STEMMER_OBJS = \ $(OBJDIR)\libstemmer.obj \ $(OBJDIR)\api.obj \ $(OBJDIR)\utilities.obj \ $(OBJDIR)\stem_UTF_8_porter.obj \ $(OBJDIR)\stem_UTF_8_english.obj DLL_OBJS =\ $(MISC_OBJS) \ $(Z3950_OBJS) \ $(ILL_OBJS) ICU_DLL_OBJS =\ $(OBJDIR)\icu_chain.obj \ $(OBJDIR)\icu_utf16.obj \ $(OBJDIR)\icu_utf8.obj \ $(OBJDIR)\icu_transform.obj \ $(OBJDIR)\icu_casemap.obj \ $(OBJDIR)\icu_tokenizer.obj \ $(OBJDIR)\icu_sortkey.obj \ $(OBJDIR)\stemmer.obj \ $(STEMMER_OBJS) # Generated C and H files Z3950_C_DIR=$(SRCDIR) ILL_C_DIR=$(SRCDIR) #!!! Should be moved to OBJ, but that requires too much trickery # Files generated from datetime.asn DATETIME_H_FILES = $(INCLDIR)\yaz\z-date.h DATETIME_C_FILES = $(Z3950_C_DIR)\z-date.c # Files generated from univres.asn UNIVRES_H_FILES = $(INCLDIR)\yaz\z-univ.h UNIVRES_C_FILES = $(Z3950_C_DIR)\z-univ.c # Files generated from esupdate.asn ESUPDATE_H_FILES = $(INCLDIR)\yaz\zes-update.h ESUPDATE_C_FILES = $(Z3950_C_DIR)\zes-update.c # Files generated from esadmin.asn ESADMIN_H_FILES = $(INCLDIR)\yaz\zes-admin.h ESADMIN_C_FILES = $(Z3950_C_DIR)\zes-admin.c # Files generated from esadmin.asn CHARNEG_H_FILES = $(INCLDIR)\yaz\z-charneg.h CHARNEG_C_FILES = $(Z3950_C_DIR)\z-charneg.c # Files generated from mterm2.asn MTERM2_H_FILES = $(INCLDIR)\yaz\z-mterm2.h MTERM2_C_FILES = $(Z3950_C_DIR)\z-mterm2.c # Files generated from mterm2.asn OCLCUI_H_FILES = $(INCLDIR)\yaz\z-oclcui.h OCLCUI_C_FILES = $(Z3950_C_DIR)\z-oclcui.c # Files generated from facet.asn FACET_H_FILES = $(INCLDIR)\yaz\z-facet-1.h FACET_C_FILES = $(Z3950_C_DIR)\z-facet-1.c # Files created from z3950v3.asn Z3950V3_H_FILES= \ $(INCLDIR)\yaz\z-accdes1.h \ $(INCLDIR)\yaz\z-core.h Z3950V3_C_FILES= \ $(Z3950_C_DIR)\z-accdes1.c \ $(Z3950_C_DIR)\z-accform1.c \ $(Z3950_C_DIR)\z-acckrb1.c \ $(Z3950_C_DIR)\z-core.c \ $(Z3950_C_DIR)\z-diag1.c \ $(Z3950_C_DIR)\z-espec1.c \ $(Z3950_C_DIR)\z-estask.c \ $(Z3950_C_DIR)\z-exp.c \ $(Z3950_C_DIR)\z-grs.c \ $(Z3950_C_DIR)\z-opac.c \ $(Z3950_C_DIR)\z-uifr1.c \ $(Z3950_C_DIR)\z-rrf1.c \ $(Z3950_C_DIR)\z-rrf2.c \ $(Z3950_C_DIR)\z-sum.c \ $(Z3950_C_DIR)\z-sutrs.c \ $(Z3950_C_DIR)\zes-expi.c \ $(Z3950_C_DIR)\zes-exps.c \ $(Z3950_C_DIR)\zes-order.c \ $(Z3950_C_DIR)\zes-pquery.c \ $(Z3950_C_DIR)\zes-psched.c \ $(Z3950_C_DIR)\zes-pset.c \ $(Z3950_C_DIR)\zes-update0.c # Files generated from ill9702.asn ILL_CORE_H_FILES= \ $(INCLDIR)\yaz\ill-core.h ILL_CORE_C_FILES= \ $(ILL_C_DIR)\ill-core.c # Files generated from itemreq.asn ITEM_REQ_H_FILES= \ $(INCLDIR)\yaz\item-req.h ITEM_REQ_C_FILES= \ $(ILL_C_DIR)\item-req.c # Combined.. DATETIME_FILES = $(DATETIME_H_FILES) $(DATETIME_C_FILES) UNIVRES_FILES = $(UNIVRES_H_FILES) $(UNIVRES_C_FILES) ESUPDATE_FILES = $(ESUPDATE_H_FILES) $(ESUPDATE_C_FILES) ESADMIN_FILES = $(ESADMIN_H_FILES) $(ESADMIN_C_FILES) Z3950V3_FILES= $(Z3950V3_C_FILES) $(Z3950V3_H_FILES) ILL_CORE_FILES= $(ILL_CORE_C_FILES) $(ILL_CORE_H_FILES) ITEM_REQ_FILES= $(ITEM_REQ_C_FILES) $(ITEM_REQ_H_FILES) CHARNEG_FILES = $(CHARNEG_C_FILES) $(CHARNEG_H_FILES) MTERM2_FILES = $(MTERM2_C_FILES) $(MTERM2_H_FILES) OCLCUI_FILES = $(OCLCUI_C_FILES) $(OCLCUI_H_FILES) FACET_FILES = $(FACET_C_FILES) $(FACET_H_FILES) GENERATED_C_FILES= \ $(Z3950V3_C_FILES) \ $(ESUPDATE_C_FILES) \ $(UNIVRES_C_FILES) \ $(DATETIME_C_FILES) \ $(ESADMIN_C_FILES) \ $(CHARNEG_C_FILES) \ $(MTERM2_C_FILES) \ $(OCLCUI_C_FILES) \ $(FACET_C_FILES) \ $(ILL_CORE_C_FILES) \ $(ITEM_REQ_C_FILES) GENERATED_H_FILES= \ $(Z3950V3_H_FILES) \ $(ESUPDATE_H_FILES) \ $(UNIVRES_H_FILES) \ $(DATETIME_H_FILES) \ $(ESADMIN_H_FILES) \ $(CHARNEG_H_FILES) \ $(MTERM2_H_FILES) \ $(OCLCUI_H_FILES) \ $(FACET_H_FILES) \ $(ILL_CORE_H_FILES) \ $(ITEM_REQ_H_FILES) generate: \ $(GENERATED_H_FILES) \ $(GENERATED_C_FILES) \ $(SRCDIR)\diagsrw.c \ $(SRCDIR)\diagbib1.c \ $(SRCDIR)\diagsru_update.c \ $(INCLDIR)\yaz\yaz-version.h # Compiling # Note: This defines where to look for the necessary # source files. Funny way of doing it, but it works. # yaz client {$(CLIENTDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< /D"_CONSOLE" # Ztest {$(ZTESTDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< /D"_CONSOLE" # Server {$(SERVERDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< # Various YAZ source directories {$(SRCDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) /D"YAZ_DLL" $< {$(ZOOMDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(UTILDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(TESTDIR)}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(SRCDIR)\libstemmer_c\libstemmer}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(SRCDIR)\libstemmer_c\runtime}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< {$(SRCDIR)\libstemmer_c\src_c}.c{$(OBJDIR)}.obj: $(CPP) $(COPT) $< # ASN-generated files !if $(HAVE_TCL) $(Z3950V3_FILES): $(SRCDIR)\z3950v3.asn @cd $(SRCDIR) $(TCL) $(TCLOPT) -d z.tcl z3950v3.asn @cd $(WINDIR) $(DATETIME_FILES): $(SRCDIR)\datetime.asn @cd $(SRCDIR) $(TCL) $(TCLOPT) -d z.tcl datetime.asn @cd $(WINDIR) $(UNIVRES_FILES): $(SRCDIR)\univres.asn @cd $(SRCDIR) $(TCL) $(TCLOPT) -d z.tcl univres.asn @cd $(WINDIR) $(ESUPDATE_FILES): $(SRCDIR)\esupdate.asn @cd $(SRCDIR) $(TCL) $(TCLOPT) -d z.tcl esupdate.asn @cd $(WINDIR) $(ESADMIN_FILES): $(SRCDIR)\esadmin.asn @cd $(SRCDIR) $(TCL) $(TCLOPT) -d z.tcl esadmin.asn @cd $(WINDIR) $(CHARNEG_FILES): $(SRCDIR)\charneg-3.asn @cd $(SRCDIR) $(TCL) $(TCLOPT) -d z.tcl charneg-3.asn @cd $(WINDIR) $(MTERM2_FILES): $(SRCDIR)\mterm2.asn @cd $(SRCDIR) $(TCL) $(TCLOPT) -d z.tcl mterm2.asn @cd $(WINDIR) $(OCLCUI_FILES): $(SRCDIR)\oclcui.asn @cd $(SRCDIR) $(TCL) $(TCLOPT) -d z.tcl oclcui.asn @cd $(WINDIR) $(FACET_FILES): $(SRCDIR)\facet.asn @cd $(SRCDIR) $(TCL) $(TCLOPT) -d z.tcl facet.asn @cd $(WINDIR) $(ILL_CORE_FILES): $(SRCDIR)\ill9702.asn @cd $(SRCDIR) $(TCL) $(TCLOPT) -d ill.tcl ill9702.asn @cd $(WINDIR) $(ITEM_REQ_FILES): $(SRCDIR)\item-req.asn @cd $(SRCDIR) $(TCL) $(TCLOPT) -d ill.tcl item-req.asn @cd $(WINDIR) $(SRCDIR)\marc8.c: $(SRCDIR)\codetables.xml $(SRCDIR)\charconv.tcl @cd $(SRCDIR) $(TCL) charconv.tcl -p marc8 codetables.xml -o marc8.c $(SRCDIR)\marc8r.c: $(SRCDIR)\codetables.xml $(SRCDIR)\charconv.tcl @cd $(SRCDIR) $(TCL) charconv.tcl -r -p marc8r codetables.xml -o marc8r.c $(SRCDIR)\iso5426.c: $(SRCDIR)\codetables-iso5426.xml $(SRCDIR)\charconv.tcl @cd $(SRCDIR) $(TCL) charconv.tcl -r -p iso5426 codetables-iso5426.xml -o iso5426.c $(SRCDIR)\oid_std.c: $(SRCDIR)\oid.csv $(TCL) $(SRCDIR)/oidtoc.tcl $(SRCDIR)\oid.csv $(SRCDIR)\oid_std.c $(INCLDIR)\yaz\oid_std.h $(SRCDIR)\diagbib1.c: $(SRCDIR)\bib1.csv @cd $(SRCDIR) $(TCL) csvtodiag.tcl bib1.csv diagbib1.c $(INCLDIR)\yaz\diagbib1.h bib1 diagbib1_str $(SRCDIR)\diagsrw.c: $(SRCDIR)\srw.csv @cd $(SRCDIR) $(TCL) csvtodiag.tcl srw.csv diagsrw.c $(INCLDIR)\yaz\diagsrw.h srw $(SRCDIR)\diagsru_update.c: $(SRCDIR)\sru_update.csv @cd $(SRCDIR) $(TCL) csvtodiag.tcl sru_update.csv diagsru_update.c $(INCLDIR)\yaz\diagsru_update.h sru_update $(INCLDIR)\yaz\yaz-version.h: $(ROOTDIR)/IDMETA @cd $(M4DIR) $(TCL) mk_version.tcl $(ROOTDIR)/IDMETA $(INCLDIR)\yaz\yaz-version.h version.nsi: $(ROOTDIR)/IDMETA $(TCL) $(M4DIR)/mk_version.tcl $(ROOTDIR)/IDMETA version.nsi !endif !if $(HAVE_BISON) $(SRCDIR)\cql.c: $(SRCDIR)\cql.y @cd $(SRCDIR) $(BISON) -y -p cql_ -o cql.c cql.y !endif # Resources # The RC compiler (resource files) RSC=rc.exe YAZ_RC=$(WINDIR)\yaz.rc YAZ_RES=$(OBJDIR)\yaz.res YAZ_ICU_RES=$(OBJDIR)\yaz_icu.res !if $(DEBUG) RSOPT=/d_DEBUG !else RSOPT=/d_NDEBUG !endif $(YAZ_RES): $(YAZ_RC) $(RSC) $(RSOPT) /I$(INCLDIR) /fo"$(YAZ_RES)" $(YAZ_RC) $(YAZ_ICU_RES): $(YAZ_RC) $(RSC) $(RSOPT) /I$(INCLDIR) /DICU=1 /fo"$(YAZ_ICU_RES)" $(YAZ_RC) # Linking $(YAZ_DLL) $(YAZ_IMPLIB): "$(BINDIR)" $(DLL_OBJS) $(YAZ_RES) $(LINK_DLL) \ $(DLL_OBJS) \ $(YAZ_RES) \ /out:$@ \ /implib:"$(YAZ_IMPLIB)" $(YAZ_ICU_DLL) $(YAZ_ICU_IMPLIB): "$(BINDIR)" $(ICU_DLL_OBJS) $(YAZ_ICU_RES) $(LINK_DLL) $(ICU_LIBS) $(YAZ_IMPLIB)\ $(ICU_DLL_OBJS) \ $(YAZ_ICU_RES) \ /out:$@ \ /implib:"$(YAZ_ICU_IMPLIB)" $(YAZ_COND_DLL) $(YAZ_COND_IMPLIB): "$(BINDIR)" $(COND_DLL_OBJS) $(YAZ_COND_RES) $(LINK_DLL) $(COND_LIB) $(YAZ_IMPLIB)\ $(COND_DLL_OBJS) \ $(YAZ_COND_RES) \ /out:$@ \ /implib:"$(YAZ_COND_IMPLIB)" $(CLIENT) : "$(BINDIR)" $(YAZ_CLIENT_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_CLIENT_OBJS) /out:$@ $(YAZ_ICU) : "$(BINDIR)" $(YAZ_ICU_OBJS) $(YAZ_ICU_DLL) $(LINK_PROGRAM) $(ICU_LIBS) $(YAZ_ICU_IMPLIB) $(YAZ_ICU_OBJS) /out:$@ $(YAZ_URL) : "$(BINDIR)" $(YAZ_URL_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_URL_OBJS) /out:$@ $(ZOOMSH) : "$(BINDIR)" $(YAZ_ZOOMSH_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_ZOOMSH_OBJS) /out:$@ $(ZOOMTST1) : "$(BINDIR)" $(YAZ_ZOOMTST1_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_ZOOMTST1_OBJS) /out:$@ $(ZOOMTST2) : "$(BINDIR)" $(YAZ_ZOOMTST2_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_ZOOMTST2_OBJS) /out:$@ $(ZOOMTST3) : "$(BINDIR)" $(YAZ_ZOOMTST3_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_ZOOMTST3_OBJS) /out:$@ $(ZOOMTST4) : "$(BINDIR)" $(YAZ_ZOOMTST4_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_ZOOMTST4_OBJS) /out:$@ $(ZOOMTST5) : "$(BINDIR)" $(YAZ_ZOOMTST5_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_ZOOMTST5_OBJS) /out:$@ $(ZOOMTST6) : "$(BINDIR)" $(YAZ_ZOOMTST6_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_ZOOMTST6_OBJS) /out:$@ $(ZOOMTST7) : "$(BINDIR)" $(YAZ_ZOOMTST7_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_ZOOMTST7_OBJS) /out:$@ $(ZOOMTST8) : "$(BINDIR)" $(YAZ_ZOOMTST8_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_ZOOMTST8_OBJS) /out:$@ $(ZOOMTST9) : "$(BINDIR)" $(YAZ_ZOOMTST9_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_ZOOMTST9_OBJS) /out:$@ $(ZOOMTST10) : "$(BINDIR)" $(YAZ_ZOOMTST10_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_ZOOMTST10_OBJS) /out:$@ $(CQL2PQF) : "$(BINDIR)" $(YAZ_CQL2PQF_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_CQL2PQF_OBJS) /out:$@ $(CQL2XCQL) : "$(BINDIR)" $(YAZ_CQL2XCQL_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_CQL2XCQL_OBJS) /out:$@ $(ZTEST) : "$(BINDIR)" $(ZTEST_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(ZTEST_OBJS) /out:$@ $(YAZ_MARCDUMP) : "$(BINDIR)" $(YAZ_MARCDUMP_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_MARCDUMP_OBJS) /out:$@ $(YAZ_ICONV) : "$(BINDIR)" $(YAZ_ICONV_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_ICONV_OBJS) /out:$@ $(YAZ_RECORD_CONV) : "$(BINDIR)" $(YAZ_RECORD_CONV_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_RECORD_CONV_OBJS) /out:$@ $(YAZ_JSON_PARSE) : "$(BINDIR)" $(YAZ_JSON_PARSE_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(YAZ_JSON_PARSE_OBJS) /out:$@ $(TSTLOG) : "$(BINDIR)" $(TSTLOG_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(TSTLOG_OBJS) /out:$@ $(TST_TIMING) : "$(BINDIR)" $(TST_TIMING_OBJS) $(YAZ_DLL) $(LINK_PROGRAM) $(TST_TIMING_OBJS) /out:$@ $(TEST_MUTEX) : "$(BINDIR)" $(TEST_MUTEX_OBJS) $(YAZ_COND_DLL) $(LINK_PROGRAM) $(YAZ_COND_IMPLIB) $(TEST_MUTEX_OBJS) /out:$@ # Other rules $(DOCDIR)\htmlhelp.chm: $(DOCDIR)\htmlhelp.hhp @cd $(DOCDIR) -$(HHC) htmlhelp.hhp @cd $(WINDIR) clean: -del $(BINDIR)\*.exe -del $(BINDIR)\*.dll -del $(BINDIR)\*.pdb -del $(TMPDIR)\*. -del $(LIBDIR)\*.LIB -del $(OBJDIR)\*.OBJ realclean: clean -del $(SRCDIR)\marc8.c -del $(SRCDIR)\cql.c -del $(SRCDIR)\z-*.c -del $(SRCDIR)\ill-core.c -del $(SRCDIR)\item-req.c -del $(INCLDIR)\yaz\ill-core.h -del $(INCLDIR)\yaz\item-req.h -del $(INCLDIR)\yaz\z-accdes1.h -del $(INCLDIR)\yaz\z-core.h -del $(DATETIME_H_FILES) -del $(UNIVRES_H_FILES) -del $(ESUPDATE_H_FILES) # Because DOS del will only accept one file name to delete, # the _H_ files work only on sets that have just one file. # Z3950_H_FILES had to be spelled out. One more point for MS! # check directories and create if needed dirs: $(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR) $(OBJDIR) $(WINDIR) $(LIBDIR) $(BINDIR) $(TMPDIR) $(JAVADIR): if not exist "$@/$(NUL)" mkdir "$@" # Explicit dependencies # force recompilation of everything, if makefile changed $(Z3950_OBJS): $(GENERATED_C_FILES) $(GENERATED_H_FILES) $(ILL_OBJS): $(ILL_CORE_FILES) $(ITEM_REQ_FILES) # makes sure we generate before compiling anything, as the # new proto.h refers to the generated files, and is included # in various places yaz-5.34.0/win/LICENSE.txt0000664000175000017500000000266614357765255012006 00000000000000Copyright (c) 1995-2023, Index Data. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Index Data nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. yaz-5.34.0/Doxyfile.in0000664000175000017500000031771114152153071011455 00000000000000# Doxyfile 1.8.11 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a double hash (##) is considered a comment and is placed in # front of the TAG it is preceding. # # All text after a single hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists, items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv # built into libc) for the transcoding. See http://www.gnu.org/software/libiconv # for the list of possible encodings. # The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded by # double-quotes, unless you are using Doxywizard) that should identify the # project for which the documentation is generated. This name is used in the # title of most generated pages and in a few other places. # The default value is: My Project. PROJECT_NAME = YAZ # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = @VERSION@ # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. OUTPUT_DIRECTORY = dox # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and # will distribute the generated files over these directories. Enabling this # option can be useful when feeding doxygen a huge amount of source files, where # putting all generated files in the same directory would otherwise causes # performance problems for the file system. # The default value is: NO. CREATE_SUBDIRS = NO # If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII # characters to appear in the names of generated files. If set to NO, non-ASCII # characters will be escaped, for example _xE3_x81_x84 will be used for Unicode # U+3044. # The default value is: NO. ALLOW_UNICODE_NAMES = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, # Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), # Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, # Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, # Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, # Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, # Ukrainian and Vietnamese. # The default value is: English. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member # descriptions after the members that are listed in the file and class # documentation (similar to Javadoc). Set to NO to disable this. # The default value is: YES. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief # description of a member or function before the detailed description # # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. # The default value is: YES. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator that is # used to form the text in various listings. Each string in this list, if found # as the leading text of the brief description, will be stripped from the text # and the result, after processing the whole list, is used as the annotated # text. Otherwise, the brief description is used as-is. If left blank, the # following values are used ($name is automatically replaced with the name of # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief # description. # The default value is: NO. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. # The default value is: NO. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path # before files name in the file list and in the header files. If set to NO the # shortest path that makes the file name unique will be used # The default value is: YES. FULL_PATH_NAMES = NO # The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. # Stripping is only done if one of the specified strings matches the left-hand # part of the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the path to # strip. # # Note that you can specify absolute paths here, but also relative paths, which # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which # header file to include in order to use a class. If left blank only the name of # the header file containing the class definition is used. Otherwise one should # specify the list of include paths that are normally passed to the compiler # using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't # support long names like on DOS, Mac, or CD-ROM. # The default value is: NO. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the # first line (until the first dot) of a Javadoc-style comment as the brief # description. If set to NO, the Javadoc-style will behave just like regular Qt- # style comments (thus requiring an explicit @brief command for a brief # description.) # The default value is: NO. JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first # line (until the first dot) of a Qt-style comment as the brief description. If # set to NO, the Qt-style will behave just like regular Qt-style comments (thus # requiring an explicit \brief command for a brief description.) # The default value is: NO. QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a # multi-line C++ special comment block (i.e. a block of //! or /// comments) as # a brief description. This used to be the default behavior. The new default is # to treat a multi-line C++ comment block as a detailed description. Set this # tag to YES if you prefer the old behavior instead. # # Note that setting this tag to YES also means that rational rose comments are # not recognized any more. # The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the # documentation from any documented member that it re-implements. # The default value is: YES. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new # page for each member. If set to NO, the documentation of a member will be part # of the file/class/namespace that contains it. # The default value is: NO. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen # uses this value to replace tabs by spaces in code fragments. # Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that act as commands in # the documentation. An alias has the form: # name=value # For example adding # "sideeffect=@par Side Effects:\n" # will allow you to put the command \sideeffect (or @sideeffect) in the # documentation, which will result in a user-defined paragraph with heading # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all # members will be omitted, etc. # The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or # Python sources only. Doxygen will then generate output that is more tailored # for that language. For instance, namespaces will be presented as packages, # qualified scopes will look different, etc. # The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources. Doxygen will then generate output that is tailored for Fortran. # The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for VHDL. # The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, and # language is one of the parsers supported by doxygen: IDL, Java, Javascript, # C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: # FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: # Fortran. In the later case the parser tries to guess whether the code is fixed # or free formatted code, this is the default for Fortran type files), VHDL. For # instance to make doxygen treat .inc files as Fortran files (default is PHP), # and .f files as C (default is Fortran), use: inc=Fortran f=C. # # Note: For files without extension you can use no_extension as a placeholder. # # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you can # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in # case of backward compatibilities issues. # The default value is: YES. MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented # classes, or namespaces to their corresponding documentation. Such a link can # be prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # The default value is: YES. AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should set this # tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); # versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. # The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. # The default value is: NO. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip (see: # http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen # will parse them like normal C++ but will assume all classes use public instead # of private inheritance when no explicit protection keyword is present. # The default value is: NO. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES will make # doxygen to replace the get and set methods by a property in the documentation. # This will only work if the methods are indeed getting or setting a simple # type. If this is not the case, or you want to show the methods anyway, you # should set this option to NO. # The default value is: YES. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. # The default value is: NO. DISTRIBUTE_GROUP_DOC = NO # If one adds a struct or class to a group and this option is enabled, then also # any nested class or struct is added to the same group. By default this option # is disabled and one has to add nested compounds explicitly via \ingroup. # The default value is: NO. GROUP_NESTED_COMPOUNDS = NO # Set the SUBGROUPING tag to YES to allow class member groups of the same type # (for instance a group of public functions) to be put as a subgroup of that # type (e.g. under the Public Functions section). Set it to NO to prevent # subgrouping. Alternatively, this can be done per class using the # \nosubgrouping command. # The default value is: YES. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions # are shown inside the group in which they are included (e.g. using \ingroup) # instead of on a separate page (for HTML and Man pages) or section (for LaTeX # and RTF). # # Note that this feature does not work in combination with # SEPARATE_MEMBER_PAGES. # The default value is: NO. INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions # with only public data fields or simple typedef fields will be shown inline in # the documentation of the scope in which they are defined (i.e. file, # namespace, or group documentation), provided this scope is documented. If set # to NO, structs, classes, and unions are shown on a separate page (for HTML and # Man pages) or section (for LaTeX and RTF). # The default value is: NO. INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or # enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically be # useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. # The default value is: NO. TYPEDEF_HIDES_STRUCT = NO # The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This # cache is used to resolve symbols given their name and scope. Since this can be # an expensive process and often the same symbol appears multiple times in the # code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small # doxygen will become slower. If the cache is too large, memory is wasted. The # cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range # is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 # symbols. At the end of a run doxygen will report the cache usage and suggest # the optimal cache size from a speed point of view. # Minimum value: 0, maximum value: 9, default value: 0. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in # documentation are documented, even if no documentation was available. Private # class members and static file members will be hidden unless the # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. # Note: This will also disable the warnings about undocumented members that are # normally produced when WARNINGS is set to YES. # The default value is: NO. EXTRACT_ALL = YES # If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will # be included in the documentation. # The default value is: NO. EXTRACT_PRIVATE = YES # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal # scope will be included in the documentation. # The default value is: NO. EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES, all static members of a file will be # included in the documentation. # The default value is: NO. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined # locally in source files will be included in the documentation. If set to NO, # only classes defined in header files are included. Does not have any effect # for Java sources. # The default value is: YES. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. If set to YES, local methods, # which are defined in the implementation section but not in the interface are # included in the documentation. If set to NO, only methods in the interface are # included. # The default value is: NO. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base name of # the file that contains the anonymous namespace. By default anonymous namespace # are hidden. # The default value is: NO. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all # undocumented members inside documented classes or files. If set to NO these # members will be included in the various overviews, but no documentation # section is generated. This option has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. If set # to NO, these classes will be included in the various overviews. This option # has no effect if EXTRACT_ALL is enabled. # The default value is: NO. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend # (class|struct|union) declarations. If set to NO, these declarations will be # included in the documentation. # The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any # documentation blocks found inside the body of a function. If set to NO, these # blocks will be appended to the function's detailed documentation block. # The default value is: NO. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation that is typed after a # \internal command is included. If the tag is set to NO then the documentation # will be excluded. Set it to YES to include the internal documentation. # The default value is: NO. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file # names in lower-case letters. If set to YES, upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. # The default value is: system dependent. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with # their full class and namespace scopes in the documentation. If set to YES, the # scope will be hidden. # The default value is: NO. HIDE_SCOPE_NAMES = NO # If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will # append additional text to a page's title, such as Class Reference. If set to # YES the compound reference will be hidden. # The default value is: NO. HIDE_COMPOUND_REFERENCE= NO # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of # the files that are included by a file in the documentation of that file. # The default value is: YES. SHOW_INCLUDE_FILES = YES # If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each # grouped member an include statement to the documentation, telling the reader # which file to include in order to use the member. # The default value is: NO. SHOW_GROUPED_MEMB_INC = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include # files with double quotes in the documentation rather than with sharp brackets. # The default value is: NO. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the # documentation for inline members. # The default value is: YES. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the # (detailed) documentation of file and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. # The default value is: YES. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief # descriptions of file, namespace and class members alphabetically by member # name. If set to NO, the members will appear in declaration order. Note that # this will also influence the order of the classes in the class list. # The default value is: NO. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and # destructors are listed first. If set to NO the constructors will appear in the # respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. # Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief # member documentation. # Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting # detailed member documentation. # The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will # be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the alphabetical # list. # The default value is: NO. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between # the prototype and the implementation of a member function even if there is # only one candidate or it is obvious which candidate to choose by doing a # simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still # accept a match between prototype and implementation in such cases. # The default value is: NO. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. # The default value is: YES. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug # list. This list is created by putting \bug commands in the documentation. # The default value is: YES. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) # the deprecated list. This list is created by putting \deprecated commands in # the documentation. # The default value is: YES. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional documentation # sections, marked by \if ... \endif and \cond # ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the # documentation. If the initializer consists of more lines than specified here # it will be hidden. Use a value of 0 to hide initializers completely. The # appearance of the value of individual variables and macros / defines can be # controlled using \showinitializer or \hideinitializer command in the # documentation regardless of this setting. # Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at # the bottom of the documentation of classes and structs. If set to YES, the # list will mention the files that were used to generate the documentation. # The default value is: YES. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. This # will remove the Files entry from the Quick Index and from the Folder Tree View # (if specified). # The default value is: YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces # page. This will remove the Namespaces entry from the Quick Index and from the # Folder Tree View (if specified). # The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command command input-file, where command is the value of the # FILE_VERSION_FILTER tag, and input-file is the name of an input file provided # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. You can # optionally specify a file name after the option, if omitted DoxygenLayout.xml # will be used as the name of the layout file. # # Note that if you run doxygen from a directory containing a file called # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib # extension is automatically appended if omitted. This requires the bibtex tool # to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. # For LaTeX the style of the bibliography can be controlled using # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated to # standard output by doxygen. If QUIET is set to YES this implies that the # messages are off. # The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated to standard error (stderr) by doxygen. If WARNINGS is set to YES # this implies that the warnings are on. # # Tip: Turn warnings on while writing the documentation. # The default value is: YES. WARNINGS = YES # If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag # will automatically be disabled. # The default value is: YES. WARN_IF_UNDOCUMENTED = YES # If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some parameters # in a documented function, or documenting parameters that don't exist or using # markup commands wrongly. # The default value is: YES. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that # are documented, but have no documentation for their parameters or return # value. If set to NO, doxygen will only warn about wrong or incomplete # parameter documentation, but not about the absence of documentation. # The default value is: NO. WARN_NO_PARAMDOC = NO # If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when # a warning is encountered. # The default value is: NO. WARN_AS_ERROR = NO # The WARN_FORMAT tag determines the format of the warning messages that doxygen # can produce. The string should contain the $file, $line, and $text tags, which # will be replaced by the file and line number from which the warning originated # and the warning text. Optionally the format may contain $version, which will # be replaced by the version of the file (if it could be obtained via # FILE_VERSION_FILTER) # The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text " # The WARN_LOGFILE tag can be used to specify a file to which warning and error # messages should be written. If left blank the output is written to standard # error (stderr). WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag is used to specify the files and/or directories that contain # documented source files. You may enter file names like myfile.cpp or # directories like /usr/src/myproject. Separate the files or directories with # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. INPUT = src \ ztest \ include # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv # documentation (see: http://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and # *.h) to filter out the source-files in the directories. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # read by doxygen. # # If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, # *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl, # *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js. FILE_PATTERNS = # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well. # The default value is: NO. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. # The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test # # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or directories # that contain example code fragments that are included (see the \include # command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and # *.h) to filter out the source-files in the directories. If left blank all # files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands # irrespective of the value of the RECURSIVE tag. # The default value is: NO. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or directories # that contain images that are to be included in the documentation (see the # \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command: # # # # where is the value of the INPUT_FILTER tag, and is the # name of an input file. Doxygen will then use the output that the filter # program writes to standard output. If FILTER_PATTERNS is specified, this tag # will be ignored. # # Note that the filter must not add or remove lines; it is applied before the # code is scanned, but not when the output code is generated. If lines are added # or removed, the anchors will not be placed correctly. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: pattern=filter # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how # filters are used. If the FILTER_PATTERNS tag is empty or if none of the # patterns match the file name, INPUT_FILTER is applied. # # Note that for custom extensions or not directly supported extensions you also # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). # The default value is: NO. FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) and # it is also possible to disable source filtering for a specific pattern using # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will be # generated. Documented entities will be cross-referenced with these sources. # # Note: To get rid of all source code in the generated output, make sure that # also VERBATIM_HEADERS is set to NO. # The default value is: NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body of functions, # classes and enums directly into the documentation. # The default value is: NO. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any # special comment blocks from generated source code fragments. Normal C, C++ and # Fortran comments will always remain visible. # The default value is: YES. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES then for each documented # function all documented functions referencing it will be listed. # The default value is: NO. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES then for each documented function # all documented entities called/used by that function will be listed. # The default value is: NO. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set # to YES then the hyperlinks from functions in REFERENCES_RELATION and # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will # link to the documentation. # The default value is: YES. REFERENCES_LINK_SOURCE = YES # If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the # source code will show a tooltip with additional information such as prototype, # brief description and links to the definition and documentation. Since this # will make the HTML file larger and loading of large files a bit slower, you # can opt to disable this feature. # The default value is: YES. # This tag requires that the tag SOURCE_BROWSER is set to YES. SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system # (see http://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: # - Install the latest version of global # - Enable SOURCE_BROWSER and USE_HTAGS in the config file # - Make sure the INPUT points to the root of the source tree # - Run doxygen as normal # # Doxygen will invoke htags (and that will in turn invoke gtags), so these # tools must be available from the command line (i.e. in the search path). # # The result: instead of the source browser generated by doxygen, the links to # source code will now point to the output of htags. # The default value is: NO. # This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a # verbatim copy of the header file for each class for which an include is # specified. Set to NO to disable this. # See also: Section \class. # The default value is: YES. VERBATIM_HEADERS = YES # If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the # cost of reduced performance. This can be particularly helpful with template # rich C++ code for which doxygen's built-in parser lacks the necessary type # information. # Note: The availability of this option depends on whether or not doxygen was # generated with the -Duse-libclang=ON option for CMake. # The default value is: NO. CLANG_ASSISTED_PARSING = NO # If clang assisted parsing is enabled you can provide the compiler with command # line options that you would normally use when invoking the compiler. Note that # the include paths will already be set by doxygen for the files and directories # specified with INPUT and INCLUDE_PATH. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. CLANG_OPTIONS = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all # compounds will be generated. Enable this if the project contains a lot of # classes, structs, unions or interfaces. # The default value is: YES. ALPHABETICAL_INDEX = NO # The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in # which the alphabetical index list will be split. # Minimum value: 1, maximum value: 20, default value: 5. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output # The default value is: YES. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of # it. # The default directory is: html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for each # generated HTML page (for example: .htm, .php, .asp). # The default value is: .html. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a user-defined HTML header file for # each generated HTML page. If the tag is left blank doxygen will generate a # standard header. # # To get valid HTML the header file that includes any scripts and style sheets # that doxygen needs, which is dependent on the configuration options used (e.g. # the setting GENERATE_TREEVIEW). It is highly recommended to start with a # default header using # doxygen -w html new_header.html new_footer.html new_stylesheet.css # YourConfigFile # and then modify the file new_header.html. See also section "Doxygen usage" # for information on how to generate the default header that doxygen normally # uses. # Note: The header is subject to change so you typically have to regenerate the # default header when upgrading to a newer version of doxygen. For a description # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard # footer. See HTML_HEADER for more information on how to generate a default # footer and what special commands can be used inside the footer. See also # section "Doxygen usage" for information on how to generate the default footer # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of # the HTML output. If left blank doxygen will generate a default style sheet. # See also section "Doxygen usage" for information on how to generate the style # sheet that doxygen normally uses. # Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as # it is more robust and this tag (HTML_STYLESHEET) will in the future become # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets # created by doxygen. Using this option one can overrule certain style aspects. # This is preferred over using HTML_STYLESHEET since it does not replace the # standard style sheet and is therefore more robust against future updates. # Doxygen will copy the style sheet files to the output directory. # Note: The order of the extra style sheet files is of importance (e.g. the last # style sheet in the list overrules the setting of the previous ones in the # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that the # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to # this color. Hue is specified as an angle on a colorwheel, see # http://en.wikipedia.org/wiki/Hue for more information. For instance the value # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 # purple, and 360 is red again. # Minimum value: 0, maximum value: 359, default value: 220. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors # in the HTML output. For a value of 0 the output will use grayscales only. A # value of 255 will produce the most vivid colors. # Minimum value: 0, maximum value: 255, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the # luminance component of the colors in the HTML output. Values below 100 # gradually make the output lighter, whereas values above 100 make the output # darker. The value divided by 100 is the actual gamma applied, so 80 represents # a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not # change the gamma. # Minimum value: 40, maximum value: 240, default value: 80. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting this # to YES can help to show when doxygen was last run and thus if the # documentation is up to date. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries # shown in the various tree structured indices initially; the user can expand # and collapse entries dynamically later on. Doxygen will expand the tree to # such a level that at most the specified number of entries are visible (unless # a fully collapsed tree already exceeds this amount). So setting the number of # entries 1 will produce a full collapsed tree by default. 0 is a special value # representing an infinite number of entries and will result in a full expanded # tree by default. # Minimum value: 0, maximum value: 9999, default value: 100. # This tag requires that the tag GENERATE_HTML is set to YES. HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files will be # generated that can be used as input for Apple's Xcode 3 integrated development # environment (see: http://developer.apple.com/tools/xcode/), introduced with # OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a # Makefile in the HTML output directory. Running make will produce the docset in # that directory and running make install will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at # startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_DOCSET = NO # This tag determines the name of the docset feed. A documentation feed provides # an umbrella under which multiple documentation sets from a single provider # (such as a company or product suite) can be grouped. # The default value is: Doxygen generated docs. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" # This tag specifies a string that should uniquely identify the documentation # set bundle. This should be a reverse domain-name style string, e.g. # com.mycompany.MyDocSet. Doxygen will append .docset to the name. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_BUNDLE_ID = org.doxygen.Project # The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. # The default value is: org.doxygen.Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. # The default value is: Publisher. # This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three # additional HTML index files: index.hhp, index.hhc, and index.hhk. The # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop # (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on # Windows. # # The HTML Help Workshop contains a compiler that can convert all HTML output # generated by doxygen into a single compiled HTML file (.chm). Compiled HTML # files are now used as the Windows 98 help format, and will replace the old # Windows help format (.hlp) on all Windows platforms in the future. Compressed # HTML files also contain an index, a table of contents, and you can search for # words in the documentation. The HTML workshop also contains a viewer for # compressed HTML files. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO # The CHM_FILE tag can be used to specify the file name of the resulting .chm # file. You can add a path in front of the file if the result should not be # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, # doxygen will try to run the HTML help compiler on the generated index.hhp. # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the master .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO # The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it # enables the Previous and Next buttons. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members to # the table of contents of the HTML help documentation and to the tree view. # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that # can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help # (.qch) of the generated HTML documentation. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify # the file name of the resulting .qch file. The path specified is relative to # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace # (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt # Help Project output. For more information please see Qt Help Project / Virtual # Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- # folders). # The default value is: doc. # This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom # filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom # Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- # filters). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To # install this plugin and make it available under the help contents menu in # Eclipse, the contents of the directory containing the HTML and XML files needs # to be copied into the plugins directory of eclipse. The name of the directory # within the plugins directory should be the same as the ECLIPSE_DOC_ID value. # After copying Eclipse needs to be restarted before the help appears. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO # A unique identifier for the Eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have this # name. Each documentation set should have its own identifier. # The default value is: org.doxygen.Project. # This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project # If you want full control over the layout of the generated HTML pages it might # be necessary to disable the index and replace it with your own. The # DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top # of each HTML page. A value of NO enables the index and the value YES disables # it. Since the tabs in the index contain the same information as the navigation # tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. If the tag # value is set to YES, a side panel will be generated containing a tree-like # index structure (just like the one that is generated for HTML Help). For this # to work a browser that supports JavaScript, DHTML, CSS and frames is required # (i.e. any modern browser). Windows users are probably better off using the # HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can # further fine-tune the look of the index. As an example, the default style # sheet generated by doxygen has an example that shows how to put an image at # the root of the tree instead of the PROJECT_NAME. Since the tree basically has # the same information as the tab index, you could consider setting # DISABLE_INDEX to YES when enabling this option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. # # Note that a value of 0 will completely suppress the enum values from appearing # in the overview section. # Minimum value: 0, maximum value: 20, default value: 4. # This tag requires that the tag GENERATE_HTML is set to YES. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used # to set the initial width (in pixels) of the frame in which the tree is shown. # Minimum value: 0, maximum value: 1500, default value: 250. # This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 # If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to # external symbols imported via tag files in a separate window. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of LaTeX formulas included as images in # the HTML documentation. When you change the font size after a successful # doxygen run you need to manually remove any form_*.png images from the HTML # output directory to force them to be regenerated. # Minimum value: 8, maximum value: 50, default value: 10. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are not # supported properly for IE 6.0, but are supported on all modern browsers. # # Note that when changing this option you need to delete any form_*.png files in # the HTML output directory before the changes have effect. # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see # http://www.mathjax.org) which uses client side Javascript for the rendering # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX # installed or if you want to formulas look prettier in the HTML output. When # enabled you may also need to install MathJax separately and configure the path # to it using the MATHJAX_RELPATH option. # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. See the MathJax site (see: # http://docs.mathjax.org/en/latest/output.html) for more details. # Possible values are: HTML-CSS (which is slower, but has the best # compatibility), NativeMML (i.e. MathML) and SVG. # The default value is: HTML-CSS. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the HTML # output directory using the MATHJAX_RELPATH option. The destination directory # should contain the MathJax.js script. For instance, if the mathjax directory # is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax # Content Delivery Network so you can quickly see the result without installing # MathJax. However, it is strongly recommended to install a local copy of # MathJax from http://www.mathjax.org before deployment. # The default value is: http://cdn.mathjax.org/mathjax/latest. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax # extension names that should be enabled during MathJax rendering. For example # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site # (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and # should work on any modern browser. Note that when using HTML help # (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) # there is already a search function so this one should typically be disabled. # For large projects the javascript based search engine can be slow, then # enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to # search using the keyboard; to jump to the search box use + S # (what the is depends on the OS and browser, but it is typically # , /