From: Marc Cromme Date: Wed, 23 May 2007 06:42:25 +0000 (+0000) Subject: protect from missing ICU development environment by #ifdef HAVE_ICU , such that build... X-Git-Tag: PAZPAR2.1.0.0~112 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=585b9e01d231b74d198e1e6de5521c4615e79d40;p=pazpar2-moved-to-github.git protect from missing ICU development environment by #ifdef HAVE_ICU , such that build process can continue on platforms missing ICU --- 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); };