Merge branch 'main/rendor-staging' into main/atys-live
[ryzomcore.git] / nel / nel-config.in
blob39e6afe9c6b93c7d45533ca14b500b3f063e6336
1 #!/bin/sh
5 # nel-config
7 # Script printing NeL's install library/include paths and some other
8 # information like NeL's version
11 prefix=@prefix@
12 exec_prefix=@exec_prefix@
14 lib_dir="@libdir@"
15 include_dir="@includedir@"
17 enable_ligo=@enable_ligo@
18 enable_georges=@enable_georges@
19 enable_net=@enable_net@
20 enable_3d=@enable_3d@
21 enable_pacs=@enable_pacs@
22 enable_sound=@enable_sound@
23 enable_logic=@enable_logic@
25 usage()
27 cat <<EOF
28 Usage: nel-config [OPTIONS] [LIBRARIES]
29 Options:
30 [--prefix[=DIR]]
31 [--exec-prefix[=DIR]]
32 [--version]
33 [--libs]
34 [--libtool]
35 [--ldflags]
36 [--cflags]
37 [--without-ligo]
38 [--without-georges]
39 [--without-network]
40 [--without-3d]
41 [--without-pacs]
42 [--without-sound]
43 [--without-logic]
44 EOF
45 exit $1
48 if test $# -eq 0
49 then
50 usage 1 1>&2
53 while test $# -gt 0
55 case "$1" in
56 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
57 *) optarg= ;;
58 esac
60 case $1 in
61 --prefix=*)
62 prefix=$optarg
63 local_prefix=yes
65 --prefix)
66 echo_prefix=yes
68 --exec-prefix=*)
69 exec_prefix=$optarg
70 exec_prefix_set=yes
71 local_prefix=yes
73 --exec-prefix)
74 echo_exec_prefix=yes
76 --version)
77 echo @VERSION@
78 exit 0
80 --cflags)
81 echo_cflags=yes
83 --ldflags)
84 echo_ldflags=yes
86 --libs)
87 echo_libs=yes
89 --libtool)
90 echo_libtool=yes
92 --without-ligo)
93 without_ligo=yes
95 --without-logic)
96 without_logic=yes
98 --without-georges)
99 without_georges=yes
101 --without-net|--without-network)
102 without_net=yes
104 --without-3d)
105 without_3d=yes
107 --without-pacs)
108 without_pacs=yes
110 --without-snd|--without-sound)
111 without_sound=yes
114 usage 1 1>&2
116 esac
117 shift
118 done
120 if test "$local_prefix" = "yes"
121 then
122 if test "$exec_prefix_set" != "yes"
123 then
124 exec_prefix=$prefix
128 if test "$echo_prefix" = "yes"
129 then
130 echo $prefix
133 if test "$echo_exec_prefix" = "yes"
134 then
135 echo $exec_prefix
138 if test "$echo_cflags" = "yes"
139 then
140 cflags="-I$include_dir"
141 echo $cflags
144 if test "$echo_ldflags" = "yes"
145 then
146 ldflags="-L$lib_dir"
147 echo $ldflags
150 if test "$echo_libs" = "yes"
151 then
152 lib_misc="-lnelmisc"
153 lib_ligo="-lnelligo"
154 lib_logic="-lnellogic"
155 lib_georges="-lnelgeorges"
156 lib_net="-lnelnet"
157 lib_3d="-lnel3d"
158 lib_pacs="-lnelpacs"
159 lib_sound="-lnelsound -lnelsnd_lowlevel"
160 lib_ai="-lnelai"
162 libs="$lib_misc"
164 if test "$without_ligo" != "yes" -a '(' "$enable_ligo" = "yes" -o "$enable_ligo" = "ON" ')'
165 then
166 libs="$libs $lib_ligo"
169 if test "$without_logic" != "yes" -a '(' "$enable_logic" = "yes" -o "$enable_logic" = "ON" ')'
170 then
171 libs="$libs $lib_logic"
174 if test "$without_georges" != "yes" -a '(' "$enable_georges" = "yes" -o "$enable_georges" = "ON" ')'
175 then
176 libs="$libs $lib_georges"
179 if test "$without_net" != "yes" -a '(' "$enable_net" = "yes" -o "$enable_net" = "ON" ')'
180 then
181 libs="$libs $lib_net"
184 if test "$without_3d" != "yes" -a '(' "$enable_3d" = "yes" -o "$enable_3d" = "ON" ')'
185 then
186 libs="$libs $lib_3d"
189 if test "$without_pacs" != "yes" -a '(' "$enable_pacs" = "yes" -o "$enable_pacs" = "ON" ')'
190 then
191 libs="$libs $lib_pacs"
194 if test "$without_sound" != "yes" -a '(' "$enable_sound" = "yes" -o "$enable_sound" = "ON" ')'
195 then
196 libs="$libs $lib_sound"
199 echo -L@libdir@ $libs
202 if test "$echo_libtool" = "yes"
203 then
204 libtool_misc="$lib_dir/libnelmisc.la"
205 libtool_ligo="$lib_dir/libnelligo.la"
206 libtool_logic="$lib_dir/libnellogic.la"
207 libtool_georges="$lib_dir/libnelgeorges.la"
208 libtool_net="$lib_dir/libnelnet.la"
209 libtool_3d="$lib_dir/libnel3d.la"
210 libtool_pacs="$lib_dir/libnelpacs.la"
211 libtool_sound="$lib_dir/libnelsnd.la"
213 libtool="$libtool_misc"
215 if test "$without_ligo" != "yes"
216 then
217 libtool="$libtool $libtool_ligo"
220 if test "$without_logic" != "yes"
221 then
222 libtool="$libtool $libtool_logic"
225 if test "$without_georges" != "yes"
226 then
227 libtool="$libtool $libtool_georges"
230 if test "$without_net" != "yes"
231 then
232 libtool="$libtool $libtool_net"
235 if test "$without_3d" != "yes"
236 then
237 libtool="$libtool $libtool_3d"
240 if test "$without_pacs" != "yes"
241 then
242 libtool="$libtool $libtool_pacs"
245 if test "$without_sound" != "yes"
246 then
247 libtool="$libtool $libtool_sound"
250 echo $libtool
253 # EOF