gcc -I/usr/include/libxml2 -lxml2 -o icu-xml-convert icu-xml-convert.c
*/
-#include <stdio.h>
-#include <string.h>
+#if HAVE_CONFIG_H
+#include "cconfig.h"
+#endif
#define _GNU_SOURCE
+#include <string.h>
+
#include <stdio.h>
#include <stdlib.h>
//#include <yaz/xmalloc.h>
#include <yaz/options.h>
+
+#ifdef HAVE_ICU
+
#include <unicode/ucnv.h>
#include <unicode/ustring.h>
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))
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);
};