Remove generated files
[framework/connectivity/libgphoto2.git] / gphoto2-config.in
1 #! /bin/sh
2
3 # leave these definitions here
4 # they are required for correct interpolation of
5 # @libdir@ and @includedir@ later on
6 prefix="@prefix@"
7 exec_prefix="@exec_prefix@"
8
9 usage()
10 {
11     cat <<EOF
12 Usage: gphoto2-config [OPTION]
13
14 Known values for OPTION are:
15
16   --prefix=DIR          change libgphoto2 prefix [default ${prefix}]
17   --libs                print library linking information
18   --cflags              print pre-processor and compiler flags
19   --help                display this help and exit
20   --version             output version information
21 EOF
22
23     exit $1
24 }
25
26 if test $# -eq 0; then
27     usage 1
28 fi
29
30 cflags=false
31 libs=false
32
33 while test $# -gt 0; do
34     case "$1" in
35     -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
36     *) optarg= ;;
37     esac
38
39     case "$1" in
40     --prefix=*)
41         prefix="$optarg"
42         ;;
43
44     --prefix)
45         echo "@prefix@"
46         ;;
47
48     --version)
49         echo "@PACKAGE@" "@VERSION@"
50         exit 0
51         ;;
52
53     --help)
54         usage 0
55         ;;
56
57     --cflags)
58         echo "-I@includedir@/gphoto2"
59         ;;
60
61     --libs)
62         echo "-L@libdir@" -lgphoto2 -lgphoto2_port -lm
63         ;;
64
65     *)
66         usage
67         exit 1
68         ;;
69     esac
70     shift
71 done
72
73 exit 0