root / trunk / install / launcher / izpack-launcher-1.3_linux / src / wx / wxgtk-2.4-config @ 11445
History | View | Annotate | Download (5.09 KB)
1 | 6834 | jmvivo | #!/bin/sh |
---|---|---|---|
2 | |||
3 | prefix=/usr |
||
4 | exec_prefix=${prefix} |
||
5 | exec_prefix_set=no |
||
6 | CC="gcc" |
||
7 | GCC="yes" |
||
8 | CXX="c++" |
||
9 | LD="" |
||
10 | cross_compiling=no |
||
11 | target=i686-pc-linux-gnu |
||
12 | static_flag=yes |
||
13 | inplace_flag=no |
||
14 | |||
15 | usage() |
||
16 | { |
||
17 | cat <<EOF |
||
18 | Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--release] |
||
19 | [--basename] [--static] [--libs] [--gl-libs] |
||
20 | [--cppflags] [--cflags] [--cxxflags] [--ldflags] [--rezflags] |
||
21 | [--cc] [--cxx] [--ld] |
||
22 | [--inplace] |
||
23 | |||
24 | wx-config returns configuration information about the installed |
||
25 | version of wxWindows. It may be used to query its version and |
||
26 | installation directories and also retrieve the C and C++ compilers |
||
27 | and linker which were used for its building and the corresponding |
||
28 | flags. |
||
29 | |||
30 | The --inplace flag allows wx-config to be used from the wxWindows |
||
31 | build directory and output flags to use the uninstalled version of |
||
32 | the headers and libs in the build directory. (Currently configure |
||
33 | must be invoked via a full path name for this to work correctly.) |
||
34 | EOF |
||
35 | |||
36 | exit $1 |
||
37 | } |
||
38 | |||
39 | cppflags() |
||
40 | { |
||
41 | # we should never specify -I/usr/include on the compiler command line: this |
||
42 | # is at best useless and at worst breaks compilation on the systems where |
||
43 | # the system headers are non-ANSI because gcc works around this by storing |
||
44 | # the ANSI-fied versions of them in its private directory which is searched |
||
45 | # after all the directories on the cmd line. |
||
46 | # |
||
47 | # the situation is a bit more complicated with -I/usr/local/include: again, |
||
48 | # it shouldn't be specified with gcc which looks there by default anyhow |
||
49 | # and gives warnings (at least 3.1 does) if it is specified explicitly -- |
||
50 | # but this -I switch *is* needed for the other compilers |
||
51 | # |
||
52 | # note that we assume that if we use GNU cc we also use GNU c++ and vice |
||
53 | # versa, i.e. this won't work (either for --cflags or --cxxflags) if GNU C |
||
54 | # compiler and non-GNU C++ compiler are used or vice versa -- we'll fix |
||
55 | # this when/if anybody complains about it |
||
56 | if test "${prefix}/include" != "/usr/include" \ |
||
57 | -a "${prefix}/include" != "/usr/include/c++" \ |
||
58 | -a \( "${GCC}" != "yes" \ |
||
59 | -o "${prefix}/include" != "/usr/local/include" \) \ |
||
60 | -a \( "${cross_compiling}" != "yes" \ |
||
61 | -o "${prefix}/include" != "/usr/${target}/include" \) ; |
||
62 | then |
||
63 | includes=" -I${prefix}/include" |
||
64 | fi |
||
65 | |||
66 | if test $inplace_flag = yes ; then |
||
67 | includes="-I$inplace_builddir/lib/wx/include/gtk-2.4 -I$inplace_include" |
||
68 | else |
||
69 | includes="-I${exec_prefix}/lib/wx/include/gtk-2.4$includes" |
||
70 | fi |
||
71 | |||
72 | if test $static_flag = yes ; then |
||
73 | echo $includes -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES |
||
74 | else |
||
75 | echo $includes -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES |
||
76 | fi |
||
77 | } |
||
78 | |||
79 | if test $# -eq 0; then |
||
80 | usage 1 1>&2 |
||
81 | fi |
||
82 | |||
83 | while test $# -gt 0; do |
||
84 | case "$1" in |
||
85 | -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
||
86 | *) optarg= ;; |
||
87 | esac |
||
88 | |||
89 | case $1 in |
||
90 | --prefix=*) |
||
91 | prefix=$optarg |
||
92 | if test $exec_prefix_set = no ; then |
||
93 | exec_prefix=$optarg |
||
94 | fi |
||
95 | ;; |
||
96 | --prefix) |
||
97 | echo $prefix |
||
98 | ;; |
||
99 | --exec-prefix=*) |
||
100 | exec_prefix=$optarg |
||
101 | exec_prefix_set=yes |
||
102 | ;; |
||
103 | --exec-prefix) |
||
104 | echo $exec_prefix |
||
105 | ;; |
||
106 | --version) |
||
107 | echo 2.4.4 |
||
108 | ;; |
||
109 | --release) |
||
110 | # Should echo @WX_RELEASE@ instead, but that doesn't seem to be replaced after |
||
111 | # configure has run on this file. |
||
112 | echo 2.4 |
||
113 | ;; |
||
114 | --basename) |
||
115 | echo wx_gtk |
||
116 | ;; |
||
117 | --static) |
||
118 | static_flag=yes |
||
119 | ;; |
||
120 | --cppflags) |
||
121 | cppflags |
||
122 | ;; |
||
123 | --cflags) |
||
124 | echo `cppflags` |
||
125 | ;; |
||
126 | --cxxflags) |
||
127 | echo `cppflags` |
||
128 | ;; |
||
129 | --ldflags) |
||
130 | echo |
||
131 | ;; |
||
132 | --rezflags) |
||
133 | echo |
||
134 | ;; |
||
135 | --libs) |
||
136 | if test "${exec_prefix}/lib" != "/usr/lib" \ |
||
137 | -a \( "${cross_compiling}" != "yes" \ |
||
138 | -o "${exec_prefix}/lib" != "/usr/${target}/lib" \) ; |
||
139 | then |
||
140 | libs="-L${exec_prefix}/lib" |
||
141 | fi |
||
142 | |||
143 | if test $inplace_flag = yes ; then |
||
144 | libs="-L$inplace_builddir/lib" |
||
145 | fi |
||
146 | |||
147 | if test $static_flag = yes ; then |
||
148 | #echo "$libs -pthread ${exec_prefix}/lib/libwx_gtk-2.4.a -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lgthread -lglib -lpthread -ldl -lXi -lXext -lX11 -lm -lpng -lz -ldl -lm " |
||
149 | 7073 | cesar | echo "$libs -pthread -lwx_gtk-2.4 -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -lgmodule -lgthread -lglib -rdynamic -lpthread -ldl -lXi -lXext -lX11 -lm -lpng -lz -ldl -lm " |
150 | 6834 | jmvivo | else |
151 | echo $libs -pthread -lwx_gtk-2.4 |
||
152 | fi |
||
153 | |||
154 | ;; |
||
155 | --gl-libs) |
||
156 | if test $static_flag = yes -a "x" != "x" ; then |
||
157 | gllibs="${exec_prefix}/lib/" |
||
158 | else |
||
159 | gllibs="" |
||
160 | fi |
||
161 | if test $inplace_flag = yes ; then |
||
162 | libdir="-L$inplace_builddir/lib" |
||
163 | fi |
||
164 | echo $libdir $gllibs |
||
165 | ;; |
||
166 | --cc) |
||
167 | echo $CC |
||
168 | ;; |
||
169 | --cxx) |
||
170 | echo $CXX |
||
171 | ;; |
||
172 | --ld) |
||
173 | echo $LD |
||
174 | ;; |
||
175 | --inplace) |
||
176 | inplace_flag=yes |
||
177 | inplace_builddir=`dirname $0` |
||
178 | inplace_include=./include |
||
179 | ;; |
||
180 | *) |
||
181 | usage 1 1>&2 |
||
182 | ;; |
||
183 | esac |
||
184 | shift |
||
185 | done |