Windows: use Boost 1.59, msvc 14.0
[metaproxy-moved-to-github.git] / metaproxy-config.in
1 #!/bin/sh
2 prefix="@prefix@"
3 exec_prefix="@exec_prefix@"
4 libdir="@libdir@"
5 includedir="@includedir@"
6 echo_cflags=no
7 echo_libs=no
8 echo_help=no
9 echo_tabs=no
10 echo_source=yes
11 echo_lalibs=no
12 src_root="@abs_top_srcdir@"
13 build_root="@abs_top_builddir@"
14
15 libs="@BOOST_LIB@ @BOOST_SYSTEM_LIB@ @BOOST_REGEX_LIB@ @BOOST_THREAD_LIB@ @YAZPPLIB@ @LIBS@"
16 lalibs="@YAZPPLALIB@ @LIBS@"
17 VERSION=@VERSION@
18
19 usage()
20 {
21         cat <<EOF
22 Usage: metaproxy-config [OPTIONS] [LIBRARIES]
23 Options:
24         [--prefix[=DIR]]
25         [--version]
26         [--libs]
27         [--lalibs]
28         [--cflags]
29 EOF
30         exit $1
31 }
32
33 if test $# -eq 0; then
34         echo_help=yes
35 fi
36
37 while test $# -gt 0; do
38   case "$1" in
39   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
40   *) optarg= ;;
41   esac
42
43   case $1 in
44     --prefix=*)
45       prefix=$optarg
46       ;;
47     --prefix)
48       echo $prefix
49       exit 0
50       ;;
51     --version)
52       echo $VERSION
53       exit 0
54       ;;
55     --cflags)
56       echo_cflags=yes
57       ;;
58     --libs)
59       echo_libs=yes
60       ;;
61     --tabs)
62       echo_tabs=yes
63       ;;
64     --lalibs)
65       echo_lalibs=yes
66       ;;
67     -*)
68       echo_help=yes
69       ;;
70   esac
71   shift
72 done
73
74 INC="@YAZPPINC@ @BOOST_CPPFLAGS@"
75
76 if test "$echo_source" = "yes"; then
77     LIB="-L${build_root}/src/.libs -lmetaproxy $libs"
78     LALIB="${build_root}/src/libmetaproxy.la $lalibs"
79     INC="-I${src_root}/include $INC"
80 else
81     LIB="-lmetaproxy $libs"
82     if test "$prefix" != "/usr"; then
83         LIB="-L${libdir} $LIB"
84     fi
85     LALIB="$LIB"
86     if test "$prefix" != "/usr"; then
87         INC="-I${includedir} $INC"
88     fi
89 fi
90
91 if test "$echo_help" = "yes"; then
92         usage 1 1>&2
93 fi
94 if test "$echo_cflags" = "yes"; then
95     echo $INC
96 fi
97 if test "$echo_libs" = "yes"; then
98     echo $LIB
99 fi
100 if test "$echo_lalibs" = "yes"; then
101     echo $LALIB
102 fi