-
Notifications
You must be signed in to change notification settings - Fork 32
/
c-icap-config.in
77 lines (68 loc) · 1.67 KB
/
c-icap-config.in
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
#!/bin/sh
prefix=@prefix@
PKGLIBDIR=@PKGLIBDIR@/
LIBDIR=@LIBDIR@/
CONFIGDIR=@SYSCONFDIR@/
DATADIR=@PKGDATADIR@/
#LOGDIR=
SOCKDIR=@SOCKDIR@
INCDIR=@INCLUDEDIR@
INCDIR2=@PKGINCLUDEDIR@
VERSION=@PACKAGE_VERSION@
CICAPCFLAGS="@CFLAGS@"
CICAPLDFLAGS=
CICAPLIBS=
CFLAGS="@MODULES_CFLAGS@ @CFLAGS@"
LIBS="@MODULES_LIBADD@"
LDFLAGS=""
usage()
{
cat <<EOTXT
Usage: c-icap-config [OPTIONS]
Where OPTION one of the following:
--prefix print c-icap instalation base directory
--cflags print preprocessor and compiler flags
--libs print linker flags
--datarootdir print the c-icap data directory
--configdir print the c-icap configuration directory
--modulesdir print the c-icap modules/plugins directory
--version print the c-icap server version
--config print the c-icap server compile configuration
EOTXT
}
case $1 in
'--prefix')
echo $prefix;
;;
'--cflags')
echo $CFLAGS" -I"$INCDIR" -I"$INCDIR2;
;;
'--libs')
test -n "$LIBS" && echo "-L"$LIBDIR $LIBS || echo ""
;;
'--datarootdir')
echo $DATADIR;
;;
'--configdir')
echo $CONFIGDIR;
;;
'--modulesdir')
echo $PKGLIBDIR;
;;
'--version')
echo $VERSION;
;;
'--config')
echo "c-icap configuration";
echo "c-icap version: "$VERSION;
echo "c-icap installation prefix: "$prefix
echo "c-icap configuration directory: "$CONFIGDIR;
echo "c-icap modules/plugins directory: "$PKGLIBDIR;
echo "c-icap shared data directory: "$DATADIR;
echo ;
echo "c-icap cflags for modules: "$CFLAGS;
echo "c-icap libs for modules: "$LIBS;
;;
*)
usage
esac;