-
Notifications
You must be signed in to change notification settings - Fork 0
/
xmada-config.in
78 lines (70 loc) · 1.46 KB
/
xmada-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
#!/bin/sh
# @configure_input@
prefix="@prefix@"
exec_prefix="@exec_prefix@"
includedir="@includedir@"
libdir="@libdir@"
xmada_dir="-I${includedir}/xmada"
xmada_lib="-L${libdir} @XMADACONFIGLIBPATHS@ -lxmadaxm -lxmadaxt -lxmadaxlib -lXm -lXt"
MAJOR=@XMADA_MAJOR_VERSION@
MINOR=@XMADA_MINOR_VERSION@
usage()
{
cat <<EOF
Usage: xmada-config [OPTIONS]
Options:
No option:
Output all the flags (compiler and linker) required
to compiler your program
[--prefix]
Output the directory in which XmAda is installed.
[--version|-v]
Output the version of XmAda
[--config]
Output XmAda's configuration parameters.
[--libs]
Output the linker flags to use for XmAda.
[--cflags]
Output the compiler flags to use for XmAda.
[--help]
Output this message
EOF
}
output_type=full
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
case $1 in
--help|-h)
usage 1>&2
exit 1
;;
--prefix)
echo $prefix
exit 0
;;
--version|-v)
echo XmAda ${MAJOR}.${MINOR}
exit 0
;;
--config)
exit 0
;;
--libs)
echo $xmada_lib
exit 0
;;
--cflags)
echo $xmada_dir
exit 0
;;
*)
usage 1>&2
exit 1
;;
esac
shift
done
echo $xmada_dir -largs $xmada_lib