Update headers and omit CVS Ids.
[yaz-moved-to-github.git] / yaz-config.in
index 5eba756..9931978 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/sh
-# $Id: yaz-config.in,v 1.30 2007-04-18 18:46:37 adam Exp $
+# This file is part of the YAZ toolkit.
+# Copyright (C) 1995-2008 Index Data
+
 yazprefix=@prefix@
 yaz_echo_cflags=no
 yaz_echo_libs=no
@@ -11,6 +13,8 @@ yaz_src_root=@YAZ_SRC_ROOT@
 yaz_build_root=@YAZ_BUILD_ROOT@
 PTHREAD_LIBS="@PTHREAD_LIBS@"
 PTHREAD_CFLAGS="@PTHREAD_CFLAGS@"
+ICU_LIBS="@ICU_LIBS@"
+ICU_CPPFLAGS="@ICU_CPPFLAGS@"
 
 yazextralibs="@LIBS@"
 YAZVERSION=@VERSION@
@@ -65,6 +69,11 @@ while test $# -gt 0; do
        threads)
            lib_thread=yes
            ;;
+       icu)
+           if test "$ICU_CPPFLAGS"; then
+               lib_icu=yes
+           fi
+           ;;
        server)
            lib_thread=yes
            lib_server=yes
@@ -84,6 +93,10 @@ if test "$lib_server" = "yes"; then
     lyaz="-lyaz_server $lyaz"
 fi
 
+if test "$lib_icu" = "yes"; then
+    lyaz="-lyaz_icu $lyaz"
+fi
+
 YAZINC="@YAZ_CONFIG_CFLAGS@"
 
 if test "$yaz_echo_source" = "yes"; then
@@ -103,6 +116,9 @@ if test "$yaz_echo_source" = "yes"; then
     if test "$lib_server" = "yes"; then
        YAZLALIB="${yaz_build_root}/src/libyaz_server.la $YAZLALIB"
     fi
+    if test "$lib_icu" = "yes"; then
+       YAZLALIB="${yaz_build_root}/src/libyaz_icu.la $YAZLALIB"
+    fi
     YAZLALIB="$YAZLALIB $yazextralibs"
 
     YAZINC="-I${yaz_src_root}/include $YAZINC"
@@ -127,6 +143,12 @@ if test "$lib_thread" = "yes"; then
     YAZLALIB="$YAZLALIB $PTHREAD_LIBS"
 fi
 
+if test "$lib_icu" = "yes"; then
+    YAZINC="$YAZINC $ICU_CPPFLAGS"
+    YAZLIB="$YAZLIB $ICU_LIBS"
+    YAZLALIB="$YAZLALIB $ICU_LIBS"
+fi
+
 if test "$yaz_echo_help" = "yes"; then
     usage 1 1>&2
 fi