root/branches/Dirk_CPtr/CommonConf/osg-config.in

Revision 15, 12.4 kB (checked in by vossg, 2 years ago)

changed : clean configure/compile options
added : tests
added : statistic testcase
fixed : stage tests (drawbuffer missing)

common.libs.in typo

fixed : removed ms depreciated options

windows cl compile problems

added initial testcases

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1 #!/bin/sh
2
3 prefix=@am_gdz_install_dir@
4
5 system_win=@ac_gdz_system_win_e15@
6 system_unix=@ac_gdz_system_unix_e15@
7
8 have_glut=@ac_gdz_have_glut_e15@
9 have_qt=@ac_gdz_have_qt_e15@
10 have_qt4=@ac_gdz_have_qt4_e15@
11 have_tif=@ac_gdz_have_tif_e15@
12 have_jpg=@ac_gdz_have_jpg_e15@
13 have_png=@ac_gdz_have_png_e15@
14 have_mng=@ac_gdz_have_mng_e15@
15 have_gif=@ac_gdz_have_gif_e15@ 
16
17 if test "$system_win" = "yes"; then
18         prefix=`cygpath -w $prefix`
19 fi
20
21 exec_prefix=${prefix}
22 exec_prefix_set=no
23
24 if test "$system_win" = "yes"; then
25     linkdir_pre="-LIBPATH:\""
26     linkdir_suf="\""
27
28     incdir_pre="-I\""
29     incdir_suf="\""
30
31     link_pre=
32     link_suf=.lib
33 else
34     linkdir_pre=-L
35     linkdir_suf=
36
37     incdir_pre=-I
38     incdir_suf=
39
40     link_pre=-l
41     link_suf=
42 fi
43
44 link_flags=@am_gdz_link_flags@
45 link_flags_opt=@am_gdz_link_flags_opt@
46 link_flags_dbg=@am_gdz_link_flags_dbg@
47
48 inc_add_path=@am_gdz_add_inc@
49 lib_add_path=@am_gdz_add_link@
50
51 win_sys_libs="opengl32.lib glu32.lib gdi32.lib"
52 unix_sys_libs="-lGLU -lGL -lXmu -lXi -lXt -lX11"
53
54 glut_libs=@ac_gdz_glut_lib_e15@
55 lib_glut_path=@ac_gdz_glut_libdir_e15@
56 inc_glut_path=@ac_gdz_glut_incdir_e15@
57
58 qt_libs="@ac_gdz_qt_lib_e15@"
59 lib_qt_path=@ac_gdz_qt_libdir_e15@
60 inc_qt_path=@ac_gdz_qt_incdir_e15@
61 cflags_qt=@am_gdz_qt_cflags@
62
63 qt4_libs="@ac_gdz_qt4_lib_e15@"
64 lib_qt4_path=@ac_gdz_qt4_libdir_e15@
65 inc_qt4_path=@ac_gdz_qt4_incdir_e15@
66 cflags_qt4=@am_gdz_qt4_cflags@
67
68 tif_libs=@ac_gdz_tif_lib_e15@
69 lib_tif_path=@ac_gdz_tif_libdir_e15@
70 inc_tif_path=@ac_gdz_tif_incdir_e15@
71
72 jpg_libs=@ac_gdz_jpg_lib_e15@
73 lib_jpg_path=@ac_gdz_jpg_libdir_e15@
74 inc_jpg_path=@ac_gdz_jpg_incdir_e15@
75
76 png_libs=@ac_gdz_png_lib_e15@
77 lib_png_path=@ac_gdz_png_libdir_e15@
78 inc_png_path=@ac_gdz_png_incdir_e15@
79
80 mng_libs=@ac_gdz_mng_lib_e15@
81 lib_mng_path=@ac_gdz_mng_libdir_e15@
82 inc_mng_path=@ac_gdz_mng_incdir_e15@
83
84 gif_libs=@ac_gdz_gif_lib_e15@
85 lib_gif_path=@ac_gdz_gif_libdir_e15@
86 inc_gif_path=@ac_gdz_gif_incdir_e15@
87
88 stlport_libs=@ac_gdz_stlport_lib_e15@
89 lib_stlport_path=@ac_gdz_stlport_libdir_e15@
90 inc_stlport_path=@ac_gdz_stlport_incdir_e15@
91
92 image_libs=
93 image_libs_path=
94 image_incs_path=
95 image_defs=
96
97 if test "$system_win" = "yes"; then
98     compiler_libs_in=@ac_gdz_compiler_lib_e15@
99     sys_libs_in="@ac_gdz_system_lib_dir_e15@"
100
101     sys_libs=" $win_sys_libs"
102
103     if test "$compiler_libs_in"X != X; then
104         sys_libs=-LIBPATH:'"'$compiler_libs_in'" '$sys_libs
105     fi
106
107     if test "$sys_libs_in"X != X; then
108         sys_libs=-LIBPATH:'"'$sys_libs_in'" '$sys_libs
109     fi
110 else
111     sys_libs=$unix_sys_libs
112 fi;
113
114 if test "$stlport_libs"X != X; then
115     stl_libs=$stlport_libs
116
117     if test "yes$lib_stlport_path" != "yes"; then
118         lib_stl_path="$linkdir_pre$lib_stlport_path$linkdir_suf"
119     fi
120     if test "yes$inc_stlport_path" != "yes"; then
121         inc_stl_path="$incdir_pre$inc_stlport_path$incdir_suf"
122     fi
123 fi
124
125 if test "$have_tif" = "yes"; then
126     image_libs="$image_libs $tif_libs"
127
128     if test "yes$lib_tif_path" != "yes"; then
129         image_libs_path="$image_libs_path $linkdir_pre$lib_tif_path$linkdir_suf"
130     fi
131     if test "yes$inc_tif_path" != "yes"; then
132         image_incs_path="$image_incs_path $incdir_pre$inc_tif_path$incdir_suf"
133     fi
134     image_defs="$image_defs -DOSG_WITH_TIF"
135 fi
136 if test "$have_jpg" = "yes"; then
137     image_libs="$image_libs $jpg_libs"
138     if test "yes$lib_jpg_path" != "yes"; then
139         image_libs_path="$image_libs_path $linkdir_pre$lib_jpg_path$linkdir_suf"
140     fi
141     if test "yes$inc_jpg_path" != "yes"; then
142         image_incs_path="$image_incs_path $incdir_pre$inc_jpg_path$incdir_suf"
143     fi
144     image_defs="$image_defs -DOSG_WITH_JPG"
145 fi
146 if test "$have_png" = "yes"; then
147     image_libs="$image_libs $png_libs"
148     if test "yes$lib_png_path" != "yes"; then
149         image_libs_path="$image_libs_path $linkdir_pre$lib_png_path$linkdir_suf"
150     fi
151     if test "yes$inc_png_path" != "yes"; then
152         image_incs_path="$image_incs_path $incdir_pre$inc_png_path$incdir_suf"
153     fi
154     image_defs="$image_defs -DOSG_WITH_PNG"
155 fi
156 if test "$have_mng" = "yes"; then
157     image_libs="$image_libs $mng_libs"
158     if test "yes$lib_mng_path" != "yes"; then
159         image_libs_path="$image_libs_path $linkdir_pre$lib_mng_path$linkdir_suf"
160     fi
161     if test "yes$inc_mng_path" != "yes"; then
162         image_incs_path="$image_incs_path $incdir_pre$inc_mng_path$incdir_suf"
163     fi
164     image_defs="$image_defs -DOSG_WITH_MNG"
165 fi
166 if test "$have_gif" = "yes"; then
167     image_libs="$image_libs $gif_libs"
168     if test "yes$lib_gif_path" != "yes"; then
169         image_libs_path="$image_libs_path $linkdir_pre$lib_gif_path$linkdir_suf"
170     fi
171     if test "yes$inc_gif_path" != "yes"; then
172         image_incs_path="$image_incs_path $incdir_pre$inc_gif_path$incdir_suf"
173     fi
174     image_defs="$image_defs -DOSG_WITH_GIF"
175 fi
176
177 usage()
178 {
179     cat <<EOF
180 Usage: osg-config OPTIONS [LIBRARIES]
181 Options:
182     [--prefix[=DIR]]
183     [--exec-prefix[=DIR]]
184     [--version]
185     [--compiler]
186     [--compiler-id]
187     [--moc]
188     [--uic]
189     [--moc4]
190     [--uic4]
191     [--exe-linker]
192     [--libs]
193     [--cflags]
194     [--lflags]
195     [--llibs]
196     [--opt]
197     [--dbg]
198 Libraries:
199     Base
200     System
201     Win32
202     X
203     GLUT
204     QT
205 EOF
206     exit $1
207 }
208
209 if test $# -eq 0; then
210     usage 1 1>&2
211 fi
212
213 lib_base=yes
214
215 valid_print=no
216 lib_suf=dbg
217
218 if test "$system_win" = "yes"; then
219     dbg_char=D
220 else
221     dbg_char=
222 fi
223
224 while test $# -gt 0; do
225   case "$1" in
226   -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
227   *) optarg= ;;
228   esac
229
230   case $1 in
231     --prefix=*)
232       prefix=$optarg
233       if test $exec_prefix_set = no ; then
234         exec_prefix=$optarg
235       fi
236       ;;
237     --prefix)
238       echo_prefix=yes
239       valid_print=yes
240       ;;
241     --exec-prefix=*)
242       exec_prefix=$optarg
243       exec_prefix_set=yes
244       ;;
245     --exec-prefix)
246       echo_exec_prefix=yes
247       valid_print=yes
248       ;;
249     --version)
250       echo @am_gdz_version@
251       valid_print=yes
252       ;;
253     --compiler)
254       echo @am_gdz_compiler@
255       exit 0
256       ;;
257     --compiler-id)
258           echo @am_gdz_compiler_id@
259           exit 0
260          ;;
261         --moc)
262       echo "@ac_gdz_qt_moc_e15@"
263           exit 0
264           ;;
265         --uic)
266       echo "@ac_gdz_qt_uic_e15@"
267           exit 0
268           ;;
269         --exe-linker)
270       echo @am_gdz_exe_linker@
271           exit 0
272           ;;
273     --cflags)
274       echo_cflags=yes
275       valid_print=yes
276       ;;
277     --lflags)
278       echo_lflags=yes
279       valid_print=yes
280       ;;
281     --llibs)
282       echo_llibs=yes
283       valid_print=yes
284       ;;
285     --libs)
286       echo_libs=yes
287       valid_print=yes
288       ;;
289     --opt)
290       lib_suf=opt
291       dbg_char=
292       ;;
293     --dbg)
294       lib_suf=dbg
295       if test "$system_win" = "yes"; then
296         dbg_char=D
297       fi
298       ;;
299     Base)
300       lib_Base=yes
301       ;;
302     System)
303       lib_Base=yes
304       lib_System=yes
305       ;;
306     Win32)
307       lib_Base=yes
308       lib_System=yes
309       lib_Win32=yes
310       ;;
311     X)
312       lib_Base=yes
313       lib_System=yes
314       lib_X=yes
315       ;;
316     GLUT)
317       lib_Base=yes
318       lib_System=yes
319       lib_GLUT=yes
320       ;;
321     QT)
322       lib_Base=yes
323       lib_System=yes
324       if test "$system_win" = "yes"; then
325         lib_Win32=yes
326       else
327         lib_X=yes
328       fi;
329       lib_QT=yes
330       ;;
331     Contrib)
332       lib_Base=yes
333       lib_System=yes
334       lib_Contrib=yes
335       ;;
336     *)
337       usage 1 1>&2
338       ;;
339   esac
340   shift
341 done
342
343 if test "$valid_print" = "no"; then
344     usage 1 1>&2
345     exit
346 fi;
347
348 if test "$echo_prefix" = "yes"; then
349     echo $prefix
350 fi
351
352 if test "$echo_exec_prefix" = "yes"; then
353     echo $exec_prefix
354 fi
355
356 opensg_libs=
357 system_libs=
358
359 base_libs=@am_gdz_base_libs@
360 #@ac_gdz_base_system_libs_e15@
361
362 system_libs_path=
363 system_incs_path=
364 system_defs=
365
366 sys_incl_dir_in="@ac_gdz_system_incl_dir_e15@"
367 if test "yes$sys_incl_dir_in" != "yes"; then
368         system_incs_path="$system_incs_path $incdir_pre$sys_incl_dir_in$incdir_suf"
369 fi
370
371 if test "$lib_suf" = "dbg"; then
372     link_flags="$link_flags $link_flags_dbg"
373 else
374     link_flags="$link_flags $link_flags_opt"
375 fi
376
377 sys_cflags=@am_gdz_system_flags@
378 sys_cflags_dbg=@am_gdz_system_flags_dbg@
379 sys_cflags_opt=@am_gdz_system_flags_opt@
380
381 if test "$lib_suf" = "dbg"; then
382     sys_cflags="$sys_cflags $sys_cflags_dbg"
383 else
384     sys_cflags="$sys_cflags $sys_cflags_opt"
385 fi
386
387 if test "$lib_QT" = "yes"; then
388     if test "$have_qt" = "yes"; then
389         opensg_libs="$opensg_libs ${link_pre}OSGWindowQT${dbg_char}${link_suf}"
390         system_libs="$system_libs $qt_libs"
391         if test "yes$lib_qt_path" != "yes"; then
392             system_libs_path="$system_libs_path $linkdir_pre$lib_qt_path$linkdir_suf"
393         fi
394         if test "yes$inc_qt_path" != "yes"; then
395             system_incs_path="$system_incs_path $incdir_pre$inc_qt_path$incdir_suf"
396         fi
397         system_defs="$system_defs -DOSG_WITH_QT $cflags_qt"
398     else
399         echo "Warning QT not configured, ignoring request"
400     fi;
401 fi;
402
403 if test "$lib_QT4" = "yes"; then
404     if test "$have_qt4" = "yes"; then
405         opensg_libs="$opensg_libs ${link_pre}OSGWindowQT4${dbg_char}${link_suf}"
406         system_libs="$system_libs $qt4_libs"
407         if test "yes$lib_qt4_path" != "yes"; then
408             system_libs_path="$system_libs_path $linkdir_pre$lib_qt4_path$linkdir_suf"
409         fi
410         if test "yes$inc_qt4_path" != "yes"; then
411             system_incs_path="$system_incs_path $incdir_pre$inc_qt4_path$incdir_suf"
412             system_incs_path="$system_incs_path $incdir_pre$inc_qt4_path/Qt3Support$incdir_suf"
413             system_incs_path="$system_incs_path $incdir_pre$inc_qt4_path/Qt$incdir_suf"
414             system_incs_path="$system_incs_path $incdir_pre$inc_qt4_path/QtCore$incdir_suf"
415             system_incs_path="$system_incs_path $incdir_pre$inc_qt4_path/QtGui$incdir_suf"
416             system_incs_path="$system_incs_path $incdir_pre$inc_qt4_path/QtOpenGL$incdir_suf"
417             system_incs_path="$system_incs_path $incdir_pre$inc_qt4_path/QtXml$incdir_suf"
418         fi
419         system_defs="$system_defs -DOSG_WITH_QT -DQT3_SUPPORT -DQT_THREAD_SUPPORT $cflags_qt4"
420     else
421         echo "Warning QT4 not configured, ignoring request"
422     fi;
423 fi;
424
425 if test "$lib_GLUT" = "yes"; then
426     if test "$have_glut" = "yes"; then
427         opensg_libs="$opensg_libs ${link_pre}OSGWindowGLUT${dbg_char}${link_suf}"
428         system_libs="$system_libs $glut_libs"
429         if test "yes$lib_glut_path" != "yes"; then
430             system_libs_path="$system_libs_path $linkdir_pre$lib_glut_path$linkdir_suf"
431         fi
432         if test "yes$inc_glut_path" != "yes"; then
433             system_incs_path="$system_incs_path $incdir_pre$inc_glut_path$incdir_suf"
434         fi
435         system_defs="$system_defs -DOSG_WITH_GLUT"
436     else
437         echo "Warning GLUT not configured, ignoring request"
438     fi;
439 fi;
440
441 if test "$lib_X" = "yes"; then
442     if test "$system_unix" = "yes"; then
443         opensg_libs="$opensg_libs ${link_pre}OSGWindowX${dbg_char}${link_suf}"
444     else
445         echo "Warning X not available on win32 plattforms, ignoring request"
446     fi;
447 fi;
448
449 if test "$lib_Win32" = "yes"; then
450     if test "$system_win" = "yes"; then
451         opensg_libs="$opensg_libs ${link_pre}OSGWindowWin32${dbg_char}${link_suf}"
452     else
453         echo "Warning Win32 not available on unix plattforms, ignoring request"
454     fi;
455 fi;
456
457 img_libs_path=
458 img_incs_path=
459 img_libs=
460 img_defs=
461 sys_defs=
462
463 if test "$lib_Contrib" = "yes"; then
464     opensg_libs="$opensg_libs ${link_pre}OSGContrib${dbg_char}${link_suf}"
465     system_libs="$system_libs $base_libs"
466 fi;
467
468 if test "$lib_System" = "yes"; then
469     opensg_libs="$opensg_libs ${link_pre}OSGSystem${dbg_char}${link_suf}"
470     system_libs="$system_libs $sys_libs"
471     img_libs_path=$image_libs_path
472     img_incs_path=$image_incs_path
473     img_libs=$image_libs
474     img_defs=$image_defs
475     sys_defs=$system_defs
476 fi;
477
478 if test "$lib_Base" = "yes"; then
479     opensg_libs="$opensg_libs ${link_pre}OSGBase${dbg_char}${link_suf}"
480     system_libs="$system_libs $base_libs"
481 fi;
482
483 if test "$echo_lflags" = "yes"; then
484
485     opensg_lib_path=${linkdir_pre}${exec_prefix}/lib/${lib_suf}${linkdir_suf}
486
487     echo $link_flags $img_libs_path $system_libs_path $lib_stl_path $opensg_lib_path $lib_add_path
488
489 fi      
490
491 if test "$echo_llibs" = "yes"; then
492
493     opensg_lib_path=${linkdir_pre}${exec_prefix}/lib/${lib_suf}${linkdir_suf}
494
495     echo $opensg_libs $img_libs $system_libs $stl_libs
496
497 fi      
498
499 if test "$echo_libs" = "yes"; then
500
501     opensg_lib_path=${linkdir_pre}${exec_prefix}/lib/${lib_suf}${linkdir_suf}
502
503     echo $link_flags $img_libs_path $system_libs_path $lib_stl_path $opensg_lib_path $lib_add_path $opensg_libs $img_libs $system_libs $stl_libs
504
505 fi      
506
507 if test "$echo_cflags" = "yes"; then
508
509     opensg_inc_path=${incdir_pre}${prefix}/include${incdir_suf}
510
511     echo $sys_cflags $sys_defs $inc_stl_path $img_defs $img_incs_path $system_incs_path $opensg_inc_path $inc_add_path
512
513 fi
514
515
516
517
Note: See TracBrowser for help on using the browser.