Bug 454376 add -lCrun -lCstd for Solaris OS_LIBS, r=bsmedberg
[wine-gecko.git] / build / unix / mozilla-config.in
blob4c02f39025286f67b9bb0b678c6c0c1d686d2a41
1 #!/bin/sh
3 prefix=%prefix%
4 exec_prefix=%exec_prefix%
5 exec_prefix_set=no
7 usage()
9 cat <<EOF
10 Usage: $0 [OPTIONS] [LIBRARIES]
11 Options:
12 [--prefix[=DIR]]
13 [--exec-prefix[=DIR]]
14 [--version]
15 [--defines]
16 [--libs] [libraries]
17 [--cflags] [components]
18 [--idlflags]
19 Components:
21 Libraries:
22 xpcom
23 nspr
25 jsj
26 gfx
27 EOF
28 exit $1
31 if test $# -eq 0; then
32 usage 1 1>&2
35 while test $# -gt 0; do
36 case "$1" in
37 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
38 *) optarg= ;;
39 esac
41 case $1 in
42 --prefix=*)
43 prefix=$optarg
44 if test $exec_prefix_set = no ; then
45 exec_prefix=$optarg
48 --prefix)
49 echo_prefix=yes
51 --exec-prefix=*)
52 exec_prefix=$optarg
53 exec_prefix_set=yes
55 --exec-prefix)
56 echo_exec_prefix=yes
58 --version)
59 echo %MOZILLA_VERSION%
60 exit 0
62 --cflags)
63 if test "%includedir%" != /usr/include ; then
64 includes="-I%includedir%"
66 echo_cflags=yes
68 --defines)
69 echo_defines=yes
71 --libs)
72 echo_libs=yes
74 --idlflags)
75 echo_idlflags=yes
77 xpcom|js|nspr|gfx|jsj)
78 echo_components="$echo_components $1"
79 echo_libraries="$echo_libraries $1"
81 xpconnect)
82 echo_components="$echo_components $1"
84 "")
85 usage 1 1>&2
88 echo_components="$echo_components $1"
90 esac
91 shift
92 done
94 if test "$echo_prefix" = "yes"; then
95 echo $prefix
97 if test "$echo_exec_prefix" = "yes"; then
98 echo $exec_prefix
101 if test "$echo_defines" = "yes"; then
102 echo %DEFS%
105 if test "$echo_cflags" = "yes"; then
106 nspr_cflags="%FULL_NSPR_CFLAGS%"
107 for n in $echo_components; do
108 component_includes="$component_includes -I%includedir%/$n"
109 done
110 echo $component_includes $includes $nspr_cflags
113 if test "$echo_idlflags" = "yes"; then
114 echo "-I%idldir%"
117 _nspr_libs="%FULL_NSPR_LIBS%"
118 _xpcom_libs="-lxpcom $_nspr_libs"
119 _js_libs="-ljs"
121 if test "$echo_libs" = "yes"; then
122 for l in $echo_libraries; do
123 case "$l" in
124 gfx)
125 libs="$libs -lgkgfx $_xpcom_libs"
127 xpcom)
128 libs="$libs $_xpcom_libs"
130 nspr)
131 libs="$libs $_nspr_libs"
134 libs="$libs $_js_libs"
136 jsj)
137 libs="$libs -ljsj $_js_libs $_xpcom_libs"
139 esac
140 done
141 echo -L%libdir% $libs