File: uuid-config.in

package info (click to toggle)
ossp-uuid 1.6.2-1.5
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 2,376 kB
  • ctags: 770
  • sloc: sh: 12,148; ansic: 4,778; makefile: 377; perl: 357; cpp: 256; php: 95; xml: 35
file content (150 lines) | stat: -rw-r--r-- 4,422 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#!/bin/sh
##
##  OSSP uuid - Universally Unique Identifier
##  Copyright (c) 2004-2008 Ralf S. Engelschall <rse@engelschall.com>
##  Copyright (c) 2004-2008 The OSSP Project <http://www.ossp.org/>
##
##  This file is part of OSSP uuid, a library for the generation
##  of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
##
##  Permission to use, copy, modify, and distribute this software for
##  any purpose with or without fee is hereby granted, provided that
##  the above copyright notice and this permission notice appear in all
##  copies.
##
##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
##  SUCH DAMAGE.
##
##  uuid-config.in: library build utility
##

DIFS=' 
'

prefix="@prefix@"
exec_prefix="@exec_prefix@"
datarootdir="@datarootdir@"

uuid_prefix="$prefix"
uuid_exec_prefix="$exec_prefix"
uuid_bindir="@bindir@"
uuid_libdir="/usr/lib"
if [ -n "$DEB_HOST_MULTIARCH" ]; then
  uuid_libdir="/usr/lib/$DEB_HOST_MULTIARCH"
elif [ -n "$DEB_HOST_ARCH" ] && which dpkg-architecture >/dev/null 2>&1; then
  uuid_libdir="/usr/lib/$(dpkg-architecture -a$DEB_HOST_ARCH -qDEB_HOST_MULTIARCH)"
fi
uuid_includedir="@includedir@"
uuid_mandir="@mandir@"
uuid_datadir="@datadir@"
uuid_acdir="@datadir@/aclocal"
uuid_cflags="@CFLAGS@"
uuid_ldflags="@LDFLAGS@"
uuid_libs="@LIBS@"
uuid_version="@UUID_VERSION_STR@"

help=no
version=no

usage="uuid-config"
usage="$usage [--help] [--version] [--all]"
usage="$usage [--prefix] [--exec-prefix] [--bindir] [--libdir] [--includedir] [--mandir] [--datadir] [--acdir]"
usage="$usage [--cflags] [--ldflags] [--libs]"
if [ $# -eq 0 ]; then
    echo "uuid-config:Error: Invalid option" 1>&2
    echo "uuid-config:Usage: $usage" 1>&2
    exit 1
fi
output=''
output_extra=''
all=no
prev=''
OIFS="$IFS" IFS="$DIFS"
for option
do
    if [ ".$prev" != . ]; then
        eval "$prev=\$option"
        prev=''
        continue
    fi
    case "$option" in
        -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
           *) optarg='' ;;
    esac
    case "$option" in
        --help|-h)
            echo "Usage: $usage"
            exit 0
            ;;
        --version|-v)
            echo "OSSP uuid $uuid_version"
            exit 0
            ;;
        --all)
            all=yes
            ;;
        --prefix)
            output="$output $uuid_prefix"
            ;;
        --exec-prefix)
            output="$output $uuid_exec_prefix"
            ;;
        --bindir)
            output="$output $uuid_bindir"
            ;;
        --libdir)
            output="$output $uuid_libdir"
            ;;
        --includedir)
            output="$output $uuid_includedir"
            ;;
        --mandir)
            output="$output $uuid_mandir"
            ;;
        --datadir)
            output="$output $uuid_datadir"
            ;;
        --acdir)
            output="$output $uuid_acdir"
            ;;
        --cflags)
            output="$output -I$uuid_includedir"
            output_extra="$output_extra $uuid_cflags"
            ;;
        --ldflags)
            output="$output -L$uuid_libdir"
            output_extra="$output_extra $uuid_ldflags"
            ;;
        --libs)
            output="$output -lossp-uuid"
            output_extra="$output_extra $uuid_libs"
            ;;
        * )
            echo "uuid-config:Error: Invalid option" 1>&2
            echo "uuid-config:Usage: $usage" 1>&2
            exit 1;
            ;;
    esac
done
IFS="$OIFS"
if [ ".$prev" != . ]; then
    echo "uuid-config:Error: missing argument to --`echo $prev | sed 's/_/-/g'`" 1>&2
    exit 1
fi
if [ ".$output" != . ]; then
    if [ ".$all" = .yes ]; then
        output="$output $output_extra"
    fi
    echo $output
fi