1#!/bin/sh
2#
3# Copyright (C) 2007-2013, David Beckett http://www.dajobe.org/
4#
5
6# Packaging
7PACKAGE="@PACKAGE@"
8VERSION="@VERSION@";
9VERSION_DECIMAL="@FLICKCURL_VERSION_DECIMAL@";
10
11program=`basename $0`
12
13# pkg-config like vars
14prefix=@prefix@
15exec_prefix=@exec_prefix@
16libdir=@libdir@
17includedir=@includedir@
18
19
20usage()
21{
22	cat<<EOF
23Usage: $program [OPTION]
24
25Known values for OPTION are:
26
27  --prefix              print installation prefix path
28  --libs                print library linking information
29  --private-libs        print library private/static linking information
30  --cflags		print pre-processor and compiler flags
31  --help                display this help and exit
32  --version             output version information
33  --version-decimal     output version as a decimal integer
34EOF
35  exit $1
36}
37
38
39if test $# -eq 0; then
40  usage 1 1>&2
41fi
42
43
44args=""
45while test $# -gt 0; do
46  case "$1" in
47    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
48    *) optarg= ;;
49  esac
50
51  case $1 in
52# GNU standards require this
53    --help|--usage)
54      usage 0
55      ;;
56    --prefix)
57      echo "${prefix}"
58      exit 0
59      ;;
60    --libs)
61      echo "-L${libdir} -lflickcurl"
62      exit 0
63      ;;
64    --cflags)
65      echo "-I${includedir}"
66      exit 0
67      ;;
68    --private-libs)
69      echo "@LIBS@"
70      exit 0
71      ;;
72    --version)
73      echo "${VERSION}"
74      exit 0
75      ;;
76    --version-decimal)
77      echo "${VERSION_DECIMAL}"
78      exit 0
79      ;;
80# Other options are ignored as illegal
81      *)
82      echo "$program: unrecognized argument \`$1'" 1>&2
83      break
84      ;;
85  esac
86
87  shift
88done
89
90echo "$program: Try $program --help" 1>&2
91exit 1
92