From 585b9e01d231b74d198e1e6de5521c4615e79d40 Mon Sep 17 00:00:00 2001 From: Marc Cromme Date: Wed, 23 May 2007 06:42:25 +0000 Subject: [PATCH] protect from missing ICU development environment by #ifdef HAVE_ICU , such that build process can continue on platforms missing ICU --- src/icu_chain_test.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/icu_chain_test.c b/src/icu_chain_test.c index ddc926e..9d4fddd 100644 --- a/src/icu_chain_test.c +++ b/src/icu_chain_test.c @@ -12,6 +12,9 @@ //#include #include + +#ifdef HAVE_ICU + #include #include @@ -474,10 +477,14 @@ static void process_text_file(const struct config_t *p_config) free(line); }; +#endif // HAVE_ICU + int main(int argc, char **argv) { +#ifdef HAVE_ICU + read_params(argc, argv, &config); if (config.conffile && strlen(config.conffile)) @@ -485,8 +492,16 @@ int main(int argc, char **argv) if (config.print && strlen(config.print)) print_info(&config); - - + +#else // HAVE_ICU + + printf("ICU not available on your system.\n" + "Please install libicu36-dev and icu-doc or similar, " + "re-configure and re-compile\n"); + + +#endif // HAVE_ICU + return(0); }; -- 1.7.10.4