Doxygen looks in more directories for source
[idzebra-moved-to-github.git] / idzebra-config.in
1 #!/bin/sh
2 # $Id: idzebra-config.in,v 1.12 2006-07-03 20:41:38 adam Exp $
3 version=@VERSION@
4 prefix=@prefix@
5 exec_prefix=@exec_prefix@
6 libdir=@libdir@
7 echo_cflags=no
8 echo_libs=no
9 echo_help=no
10 echo_tab=no
11 echo_source=yes
12 echo_lalibs=no
13 idzebra_src_root=@IDZEBRA_SRC_ROOT@
14 idzebra_build_root=@IDZEBRA_BUILD_ROOT@
15 package_suffix=@PACKAGE_SUFFIX@
16
17 extralibs="@YAZLIB@ @TCL_LIB@ @EXPAT_LIBS@ @XSLT_LIBS@ @LIBS@ "
18 extralalibs="@YAZLALIB@ @TCL_LIB@ @EXPAT_LIBS@ @XSLT_LIBS@ @LIBS@"
19
20 usage()
21 {
22     cat <<EOF
23 Usage: idzebra-config [OPTIONS] [LIBRARIES]
24 Options:
25         [--prefix[=DIR]]
26         [--version]
27         [--libs]
28         [--lalibs]
29         [--cflags]
30         [--tab]
31         [--modules]
32 EOF
33     exit $1
34 }
35
36 if test $# -eq 0; then
37     echo_help=yes
38 fi
39
40 while test $# -gt 0; do
41     case "$1" in
42         -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
43         *) optarg= ;;
44     esac
45     
46     case $1 in
47         --prefix=*)
48             prefix=$optarg
49             exec_prefix=$prefix
50             libdir=${exec_prefix}/lib
51             ;;
52         --prefix)
53             echo $prefix
54             exit 0
55             ;;
56         --version)
57             echo $version
58             exit 0
59             ;;
60         --cflags)
61             echo_cflags=yes
62             ;;
63         --libs)
64             echo_libs=yes
65             ;;
66         --tab)
67             echo_tab=yes
68             ;;
69         --lalibs)
70             echo_lalibs=yes
71             ;;
72         -*)
73             echo_help=yes
74             ;;
75         *)
76             echo "$0: unsupported argument"
77             exit 1
78             ;;
79
80     esac
81     shift
82 done
83
84 IDZEBRAINC="@YAZINC@"
85
86 if test "$echo_source" = "yes"; then
87     IDZEBRALIB="-L${idzebra_build_root}/index/.libs -lidzebra${package_suffix}"
88     IDZEBRALALIB="${idzebra_build_root}/index/libidzebra${package_suffix}.la"
89     IDZEBRALIB="$IDZEBRALIB $extralibs"
90     IDZEBRALALIB="$IDZEBRALALIB $extralalibs"
91     IDZEBRAINC="$IDZEBRAINC -I${idzebra_src_root}/include"
92     IDZEBRATAB="${idzebra_src_root}/tab"
93     IDZEBRAMOD="${idzebra_src_root}/recctrl"
94 else
95     IDZEBRALIB="-lidzebra${package_suffix}"
96     if test "$libdir" != "/usr/lib"; then
97         IDZEBRALIB="-L${libdir} $IDZEBRALIB"
98     fi
99     IDZEBRALIB="$IDZEBRALIB $extralibs"
100     IDZEBRALALIB="$IDZEBRALIB"
101     IDZEBRAINC="$IDZEBRAINC -I${prefix}/include/idzebra${package_suffix}"
102     IDZEBRATAB="@datarootdir@/idzebra${package_suffix}/tab"
103     IDZEBRAMOD="${libdir}/idzebra${package_suffix}/modules"
104 fi
105
106 if test "$echo_help" = "yes"; then
107     usage 1 1>&2
108 fi
109 if test "$echo_cflags" = "yes"; then
110     echo $IDZEBRAINC
111 fi
112 if test "$echo_libs" = "yes"; then
113     echo $IDZEBRALIB
114 fi
115 if test "$echo_lalibs" = "yes"; then
116     echo $IDZEBRALALIB
117 fi
118 if test "$echo_tab" = "yes"; then
119     echo $IDZEBRATAB
120 fi
121 if test "$echo_modules" = "yes"; then
122     echo $IDZEBRAMOD
123 fi
124 # Local Variables:
125 # mode:shell-script
126 # sh-indentation: 2
127 # sh-basic-offset: 4
128 # End: