-
Notifications
You must be signed in to change notification settings - Fork 4
/
aff-config.in
65 lines (61 loc) · 1.08 KB
/
aff-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
#!/bin/sh -f
#
# 2007/09/11 avp -- funal cut for v 1.0.0
cc='@CC@'
cflags='@CFLAGS@ -I@prefix_include@'
libs='@LIBS@ -llhpc-aff'
ldflags='@LDFLAGS@ -L@prefix_lib@'
version='XXX LHPC AFF v.2.1.0x $Id$'
help() {
cat << EOF
Usage: aff-config [OPTION]
Options:
--help print this help
--cc print the C compiler required
--cflags print CC flags needed
--libs print provided libraries
--ldflags print linking flags
--version print AFF version
EOF
}
normalize() {
i=''
for input ; do
case $i in
*\ $input\ *) ;;
*) i="$i $input"
;;
esac
done
echo $i
}
if [ $# -eq 0 ] ; then
help 1>&2
exit 1
fi
for option ; do
case "$option" in
--help)
help
;;
--cc)
echo $cc
;;
--cflags)
normalize $cflags
;;
--libs)
normalize $libs
;;
--ldflags)
normalize $ldflags
;;
--version)
echo $version
;;
*)
echo "Unknown option $option"
exit 1
;;
esac
done