From: Marc Cromme Date: Fri, 27 Apr 2007 14:31:14 +0000 (+0000) Subject: added autoconf checks on ICU internationalization libs and established first test... X-Git-Tag: PAZPAR2.1.0.0~195 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=aa2759da3fb99484cca8893cff814773d36cd5d2;p=pazpar2-moved-to-github.git added autoconf checks on ICU internationalization libs and established first test framework on ICU. Tests are still empty, to be added later. --- diff --git a/configure.ac b/configure.ac index 4bd6e17..2ba5b4a 100644 --- a/configure.ac +++ b/configure.ac @@ -24,6 +24,9 @@ if test -z "$YAZLIB"; then fi YAZ_DOC +AC_CHECK_ICU(3.6, [], + AC_MSG_WARN([For ICU internationalizing support please install libicu36-dev or similar])) + AC_CONFIG_FILES([ Doxyfile Makefile @@ -59,6 +62,9 @@ echo \ YAZ Include: ${YAZINC} YAZ La Lib: ${YAZLALIB} YAZ Lib: ${YAZLIB} + ICU Version: ${ICU_VERSION} + ICU Include: ${ICU_CPPFLAGS} + ICU Lib: ${ICU_LIBS} Bugreport: ${PACKAGE_BUGREPORT} ------------------------------------------------------------------------" diff --git a/src/Makefile.am b/src/Makefile.am index 53f51bb..5a5c646 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,8 @@ -# $Id: Makefile.am,v 1.17 2007-04-26 21:33:32 marc Exp $ +# $Id: Makefile.am,v 1.18 2007-04-27 14:31:15 marc Exp $ bin_PROGRAMS = pazpar2 check_PROGRAMS = test_config \ + test_icu_I18N \ test_record \ test_reclists \ test_relevance \ @@ -16,7 +17,7 @@ MAINTAINERCLEANFILES = Makefile.in cconfig.h CONFIG_CLEAN_FILES=*.log -AM_CFLAGS = $(YAZINC) +AM_CFLAGS = $(YAZINC) $(ICU_CPPFLAGS) libpazpar2_a_SOURCES = config.c config.h eventl.c eventl.h \ http.c http_command.c http_command.h http.h \ @@ -29,7 +30,7 @@ libpazpar2_a_SOURCES = config.c config.h eventl.c eventl.h \ client.c client.h connection.c connection.h host.h parameters.h pazpar2_SOURCES = pazpar2.c -pazpar2_LDADD = libpazpar2.a $(YAZLIB) +pazpar2_LDADD = libpazpar2.a $(YAZLIB) $(ICU_LIBS) test_config_SOURCES = test_config.c test_config_LDADD = libpazpar2.a $(YAZLIB) @@ -46,3 +47,6 @@ test_relevance_LDADD = libpazpar2.a $(YAZLIB) test_sel_thread_SOURCES = test_sel_thread.c test_sel_thread_LDADD = libpazpar2.a $(YAZLIB) +test_icu_I18N_SOURCES = test_icu_I18N.c +test_icu_I18N_LDADD = libpazpar2.a $(YAZLIB) $(ICU_LIBS) + diff --git a/src/test_icu_I18N.c b/src/test_icu_I18N.c new file mode 100644 index 0000000..31c9e03 --- /dev/null +++ b/src/test_icu_I18N.c @@ -0,0 +1,76 @@ +/* $Id: test_icu_I18N.c,v 1.1 2007-04-27 14:31:15 marc Exp $ + Copyright (c) 2006-2007, Index Data. + +This file is part of Pazpar2. + +Pazpar2 is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +Pazpar2 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 Pazpar2; see the file LICENSE. If not, write to the +Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. + */ + +#if HAVE_CONFIG_H +#include "cconfig.h" +#endif + +#define USE_TIMING 0 +#if USE_TIMING +#include +#endif + +#include + + + +#ifdef HAVE_ICU + + + +void test_icu_I18N(int argc, char **argv) +{ + + YAZ_CHECK(0 == 0); + //YAZ_CHECK_EQ(0, 1); +} + +#endif + +int main(int argc, char **argv) +{ + + YAZ_CHECK_INIT(argc, argv); + YAZ_CHECK_LOG(); + +#ifdef HAVE_ICU + + test_icu_I18N(argc, argv); + +#else + + YAZ_CHECK(0 == 0); + +#endif + + YAZ_CHECK_TERM; +} + + + + +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */