root/juggler/tags/1.0.2/juggler-config.in

Revision 5820, 8.3 kB (checked in by anonymous, 7 years ago)

This commit was manufactured by cvs2svn to create tag
'RELENG_1_0_2_RELEASE'.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 #!/bin/sh
2
3 # ************** <auto-copyright.pl BEGIN do not edit this line> **************
4 #
5 # VR Juggler is (C) Copyright 1998, 1999, 2000 by Iowa State University
6 #
7 # Original Authors:
8 #   Allen Bierbaum, Christopher Just,
9 #   Patrick Hartling, Kevin Meinert,
10 #   Carolina Cruz-Neira, Albert Baker
11 #
12 # This library is free software; you can redistribute it and/or
13 # modify it under the terms of the GNU Library General Public
14 # License as published by the Free Software Foundation; either
15 # version 2 of the License, or (at your option) any later version.
16 #
17 # This library is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20 # Library General Public License for more details.
21 #
22 # You should have received a copy of the GNU Library General Public
23 # License along with this library; if not, write to the
24 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 # Boston, MA 02111-1307, USA.
26 #
27 # -----------------------------------------------------------------
28 # File:          $RCSfile$
29 # Date modified: $Date$
30 # Version:       $Revision$
31 # -----------------------------------------------------------------
32 #
33 # *************** <auto-copyright.pl END do not edit this line> ***************
34
35 %{
36 %}
37
38 subsystem_cxxflags="@subsystem_cxxflags@"
39 subsystem_libs="@subsystem_libs@"
40 Juggler_lib="@Juggler_lib@"
41 Juggler_utils_lib="@Juggler_utils_lib@"
42 Juggler_ogl_lib="@Juggler_ogl_lib@"
43 Juggler_pf_lib="@Juggler_pf_lib@"
44 Juggler_aw_lib="@Juggler_aw_lib@"
45 Juggler_sl_lib="@Juggler_sl_lib@"
46
47 vrj_default_abi="@ABI@"
48 vrj_default_isa="@ISA@"
49 vrj_n32_flags="@vrj_n32_flags@"
50 vrj_64_flags="@vrj_64_flags@"
51 LIBBITSUF='@LIBBITSUF@'
52 vrj_libbitsuf_n32="@vrj_libbitsuf_n32@"
53 vrj_libbitsuf_64="@vrj_libbitsuf_64@"
54
55 if [ "x$vrj_default_abi" = "xN32" ]; then
56     vrj_abi_flags="$vrj_n32_flags"
57 elif [ "x$vrj_default_abi" = "x64" ]; then
58     vrj_abi_flags="$vrj_64_flags"
59 else
60     vrj_abi_flags=''
61 fi
62
63 if [ "x$vrj_default_isa" = "xmips3" -o "x$vrj_default_isa" = "xmips4" ]; then
64     vrj_isa_flags="-$vrj_default_isa"
65 else
66     vrj_isa_flags=''
67 fi
68
69 prefix=@prefix@
70 exec_prefix=@exec_prefix@
71 exec_prefix_set=no
72
73 usage()
74 {
75     cat <<EOF
76 Usage: juggler-config [OPTIONS] [LIBRARIES]
77 Options:
78         [--basedir]             Use \$VJ_BASE_DIR when printing paths
79         [--prefix[=DIR]]        Print the installation prefix or set an
80                                 alternate prefix to use when printing paths
81         [--exec-prefix[=DIR]]   Print the executable prefix or set an alternate
82                                 executable prefix to use when printing paths
83         [--libs [N32|64]]       Print the basic VR Juggler libraries
84         [--extra-libs [N32|64]] Print the extra linker options needed for
85                                 making an executable
86         [--cxxflags [N32|64]]   Print the flags for the C++ compiler
87         [--subsystem]           Print the OS abstraction layer being used
88
89 Libraries (prints the linker options for one or more of these libraries):
90         vrj (all basic libraries)
91         Juggler
92         Juggler_utils
93         Juggler_ogl
94         Juggler_pf
95         Juggler_aw
96         Juggler_sl
97 EOF
98
99     exit $1
100 }
101
102 if test $# -eq 0; then
103     usage 1 1>&2
104 fi
105
106 lib_Juggler=no
107 lib_Juggler_ogl=no
108 lib_Juggler_pf=no
109 lib_Juggler_aw=no
110 lib_Juggler_sl=no
111 lib_Juggler_utils=no
112
113 while test $# -gt 0; do
114     case "$1" in
115         -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
116         *) optarg= ;;
117     esac
118
119     case $1 in
120         --basedir)
121             use_base_dir=yes
122             ;;
123         --prefix=*)
124             prefix=$optarg
125             if test $exec_prefix_set = no ; then
126                 exec_prefix=$optarg
127             fi
128             ;;
129         --prefix)
130             echo_prefix=yes
131             ;;
132         --exec-prefix=*)
133             exec_prefix=$optarg
134             exec_prefix_set=yes
135             ;;
136         --exec-prefix)
137             echo_exec_prefix=yes
138             ;;
139         --version)
140             echo @VRJ_MAJOR_VERSION@.@VRJ_MINOR_VERSION@.@VRJ_MICRO_VERSION@
141             ;;
142         --cxxflags)
143             echo_cxxflags=yes
144             case $2 in
145                 N32)
146                     vrj_extra_cxxflags="$vrj_extra_cxxflags $vrj_n32_flags $vrj_isa_flags"
147                     shift
148                     ;;
149                 64)
150                     vrj_extra_cxxflags="$vrj_extra_cxxflags $vrj_64_flags $vrj_isa_flags"
151                     shift
152                     ;;
153                 *)
154                     vrj_extra_cxxflags="$vrj_extra_cxxflags $vrj_abi_flags $vrj_isa_flags"
155                     ;;
156             esac
157             ;;
158         --subsystem)
159             echo @THREAD_SYS@
160             ;;
161         --libs)
162             echo_libs=yes
163             case $2 in
164                 N32)
165                     ldflags="$vrj_n32_flags $vrj_isa_flags"
166                     LIBBITSUF="$vrj_libbitsuf_n32"
167                     shift
168                     ;;
169                 64)
170                     ldflags="$vrj_64_flags $vrj_isa_flags"
171                     LIBBITSUF="$vrj_libbitsuf_64"
172                     shift
173                     ;;
174                 *)
175                     ldflags="$vrj_abi_flags $vrj_isa_flags"
176                     ;;
177             esac
178             ;;
179         --extra-libs)
180             echo_extra_libs=yes
181             case $2 in
182                 --*)
183                     # This is another option flag, so leave it alone.
184                     ;;
185                 N32)
186                     LIBBITSUF='32'
187                     shift
188                     ;;
189                 64)
190                     LIBBITSUF='64'
191                     shift
192                     ;;
193             esac
194             ;;
195         --static)
196             echo_static=yes
197             ;;
198         vrj)
199             lib_Juggler_all=yes
200             ;;
201         Juggler)
202             lib_Juggler=yes
203             lib_Juggler_all=no
204             ;;
205         Juggler_utils)
206             lib_Juggler_utils=yes
207             lib_Juggler_all=no
208             ;;
209         Juggler_ogl)
210             lib_Juggler_ogl=yes
211             lib_Juggler_all=no
212             ;;
213         Juggler_pf)
214             lib_Juggler_pf=yes
215             lib_Juggler_all=no
216             ;;
217         Juggler_aw)
218             lib_Juggler_aw=yes
219             lib_Juggler_all=no
220             ;;
221         Juggler_sl)
222             lib_Juggler_sl=yes
223             lib_Juggler_all=no
224             ;;
225         *)
226             usage 1 1>&2
227             ;;
228     esac
229     shift
230 done
231
232 if test "x$lib_Juggler_all" = "x" ; then
233     lib_Juggler_all=yes
234 fi
235
236 if test "$echo_prefix" = "yes"; then
237     if test "$use_base_dir" = "yes"; then
238         echo $VJ_BASE_DIR
239     else
240         echo $prefix
241     fi
242 fi
243
244 if test "$echo_exec_prefix" = "yes"; then
245     if test "$use_base_dir" = "yes"; then
246         echo $VJ_BASE_DIR
247     else
248         echo $exec_prefix
249     fi
250 fi
251
252 if test "$echo_cxxflags" = "yes"; then
253     if test "$use_base_dir" = "yes"; then
254         echo @CXXFLAGS@ $vrj_extra_cxxflags -I$VJ_BASE_DIR/include $subsystem_cxxflags
255     else
256         echo @CXXFLAGS@ $vrj_extra_cxxflags -I@includedir@ $subsystem_cxxflags
257     fi
258 fi
259
260 if test "$echo_static" = "yes" ; then
261     static_begin='@static_begin@'
262     static_end='@static_end@'
263 fi
264
265 if test "$echo_libs" = "yes"; then
266     if test "$use_base_dir" = "yes"; then
267         ldflags="-L$VJ_BASE_DIR/lib$LIBBITSUF"
268     else
269         ldflags="$ldflags @vrj_ldflags@"
270     fi
271
272     if test "x$lib_Juggler_all" = "xyes" ; then
273         vrj_libs="@vrj_libs@"
274     else
275         if test "x$lib_Juggler" = "xyes" ; then
276             vrj_libs="$Juggler_lib"
277         fi
278
279         if test "x$lib_Juggler_utils" = "xyes" ; then
280             vrj_libs="$vrj_libs $Juggler_utils_lib"
281         fi
282
283         if test "x$lib_Juggler_ogl" = "xyes" ; then
284             vrj_libs="$vrj_libs $Juggler_ogl_lib"
285         fi
286
287         if test "x$lib_Juggler_pf" = "xyes" ; then
288             vrj_libs="$vrj_libs $Juggler_pf_lib"
289         fi
290
291         if test "x$lib_Juggler_aw" = "xyes" ; then
292             vrj_libs="$vrj_libs $Juggler_aw_lib"
293         fi
294
295         if test "x$lib_Juggler_sl" = "xyes" ; then
296             vrj_libs="$vrj_libs $Juggler_sl_lib"
297         fi
298     fi
299
300     echo $ldflags $static_begin $vrj_libs $static_end
301 fi      
302
303 if test "x$echo_extra_libs" = "xyes"; then
304     vrj_extra_ldflags="@vrj_extra_ldflags@"
305     vrj_extra_libs="@vrj_extra_libs@"
306     echo $vrj_extra_ldflags $vrj_extra_libs
307 fi
Note: See TracBrowser for help on using the browser.