]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libxo/libxo-config.in
Add two missing eventhandler.h headers
[FreeBSD/FreeBSD.git] / contrib / libxo / libxo-config.in
1 #! /bin/sh
2 #
3 # $Id$
4 #
5 # Copyright 2011-2014, Juniper Networks, Inc.
6 # All rights reserved.
7 # This SOFTWARE is licensed under the LICENSE provided in the
8 # ../Copyright file. By downloading, installing, copying, or otherwise
9 # using the SOFTWARE, you agree to be bound by the terms of that
10 # LICENSE.
11
12 prefix=@prefix@
13 exec_prefix=@exec_prefix@
14 includedir=@includedir@
15 libdir=@libdir@
16
17 usage()
18 {
19     cat <<EOF
20 Usage: libxo-config [OPTION]
21
22 Known values for OPTION are:
23
24   --prefix=DIR          change libxo prefix [default $prefix]
25   --exec-prefix=DIR     change libxo exec prefix [default $exec_prefix]
26   --libs                print library linking information
27   --bindir              print the bin directory
28   --cflags              print pre-processor and compiler flags
29   --share               print share directory
30   --help                display this help and exit
31   --version             output version information
32 EOF
33
34     exit $1
35 }
36
37 if test $# -eq 0; then
38     usage 1
39 fi
40
41 cflags=false
42 libs=false
43
44 while test $# -gt 0; do
45     case "$1" in
46     -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
47     *) optarg= ;;
48     esac
49
50     case "$1" in
51     --prefix=*)
52         prefix=$optarg
53         includedir=$prefix/include
54         libdir=$prefix/lib
55         ;;
56
57     --prefix)
58         echo $prefix
59         ;;
60
61     --exec-prefix=*)
62       exec_prefix=$optarg
63       libdir=$exec_prefix/lib
64       ;;
65
66     --exec-prefix)
67       echo $exec_prefix
68       ;;
69
70     --version)
71         echo @VERSION@
72         exit 0
73         ;;
74
75     --help)
76         usage 0
77         ;;
78
79     --cflags)
80         echo -I@XO_INCLUDEDIR@ @XO_CFLAGS@
81         ;;
82
83
84     --share)
85         echo @XO_SHAREDIR@
86         ;;
87
88     --bindir)
89         echo @XO_BINDIR@
90         ;;
91
92     --libdir)
93         echo @XO_LIBDIR@
94         ;;
95
96
97     --libs)
98         if [ "`uname`" = "Linux" ]
99         then
100             if [ "@XO_LIBDIR@" = "-L/usr/lib" -o "@XO_LIBDIR@" = "-L/usr/lib64" ]
101             then
102                 echo @XO_LIBS@ 
103             else
104                 echo -L@XO_LIBDIR@ @XO_LIBS@ 
105             fi
106         else
107             echo -L@XO_LIBDIR@ @XO_LIBS@
108         fi
109         ;;
110
111     *)
112         usage
113         exit 1
114         ;;
115     esac
116     shift
117 done
118
119 exit 0