This repository has been archived by the owner on Jan 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathntop-config.in
146 lines (138 loc) · 3.52 KB
/
ntop-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
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
#!/bin/sh
#
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# ntop library build utility
#
# ntop-config is a script that is used to display what compiler
# flags and libraries were used when ntop were built.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#
# Copyright (c) 1998, 2000 Luca Deri <[email protected]>
# Updated 1Q 2000 Rocco Carbone <[email protected]>
#
# Shamelessly ripped from imlib-config.in
#
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
prefix=@prefix@
exec_prefix=@exec_prefix@
exec_prefix_set=no
ntop_prefix="$prefix"
ntop_exec_prefix="$exec_prefix"
ntop_bindir="@bindir@"
ntop_libdir="@libdir@"
ntop_includedir="@includedir@"
ntop_mandir="@mandir@"
ntop_datadir="@datadir@"
ntop_acdir="@datadir@/aclocal"
ntop_cflags="@CFLAGS@"
ntop_ldflags="@LDFLAGS@"
ntop_libs="@LIBS@"
ntop_version="@VERSION@"
# The name of this program.
progname=`echo "$0" | sed 's%^.*/%%'`
usage="$progname"
usage="$usage [--help] [--version]"
usage="$usage [--prefix] [--exec-prefix]"
usage="$usage [--bindir] [--libdir] [--includedir]"
usage="$usage [--mandir] [--datadir] [--acdir]"
usage="$usage [--cflags] [--ldflags] [--libs]"
if [ $# -eq 0 ]; then
echo "$progname:Error: Invalid option" 1>&2
echo "$progname:Usage: $usage" 1>&2
exit 1
fi
if test $# -eq 0; then
echo "${usage}" 1>&2
exit 1
fi
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
exec_prefix=$optarg
fi
;;
--prefix)
echo $prefix
;;
--exec-prefix=*)
exec_prefix=$optarg
exec_prefix_set=yes
;;
--exec-prefix)
echo $exec_prefix
;;
--version)
echo @VERSION@
;;
--bindir)
echo $ntop_bindir
;;
--libdir)
echo $ntop_libdir
;;
--includedir)
echo $ntop_includedir
;;
--mandir)
echo $ntop_mandir
;;
--datadir)
echo $ntop_datadir
;;
--acdir)
echo $ntop_acdir
;;
--cflags)
if test @includedir@ != /usr/include ; then
includes=-I@includedir@
for i in $ntop_cflags ; do
if test $i = -I@includedir@ ; then
includes=""
fi
done
fi
echo $includes $ntop_cflags
;;
--libs)
my_ntop_libs=
libdirs=-L@libdir@
for i in $ntop_libs ; do
if test $i != -L@libdir@ ; then
if test -z "$my_ntop_libs" ; then
my_ntop_libs="$i"
else
my_ntop_libs="$my_ntop_libs $i"
fi
fi
done
echo $libdirs -lntop $my_ntop_libs
;;
*)
echo "${usage}" 1>&2
exit 1
;;
esac
shift
done
exit 0