CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
gtklepin: cleaned up (added cross_compile patch)
[attic/ports/opt-cross.git] / gtklepin / gtklepin-0.3-cross_compile.patch
1 diff -purN gtklepin-0.3.orig/configure gtklepin-0.3/configure
2 --- gtklepin-0.3.orig/configure 2010-11-02 07:10:55.000000000 +0000
3 +++ gtklepin-0.3/configure 2010-11-02 07:20:06.000000000 +0000
4 @@ -4818,230 +4818,19 @@ fi
5 echo "$as_me:$LINENO: checking for GLIB - version >= $min_glib_version" >&5
6 echo $ECHO_N "checking for GLIB - version >= $min_glib_version... $ECHO_C" >&6
7
8 - if test x$PKG_CONFIG != xno ; then
9 - ## don't try to run the test against uninstalled libtool libs
10 - if $PKG_CONFIG --uninstalled $pkg_config_args; then
11 - echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
12 - enable_glibtest=no
13 - fi
14 -
15 - if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
16 - :
17 - else
18 - no_glib=yes
19 - fi
20 - fi
21 -
22 - if test x"$no_glib" = x ; then
23 - GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
24 - GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
25 - GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
26 -
27 - GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
28 - GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
29 - glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
30 - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
31 - glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
32 - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
33 - glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
34 - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
35 - if test "x$enable_glibtest" = "xyes" ; then
36 - ac_save_CFLAGS="$CFLAGS"
37 - ac_save_LIBS="$LIBS"
38 - CFLAGS="$CFLAGS $GLIB_CFLAGS"
39 - LIBS="$GLIB_LIBS $LIBS"
40 - rm -f conf.glibtest
41 - if test "$cross_compiling" = yes; then
42 - echo $ac_n "cross compiling; assumed OK... $ac_c"
43 -else
44 - cat >conftest.$ac_ext <<_ACEOF
45 -#line $LINENO "configure"
46 -#include "confdefs.h"
47 -
48 -#include <glib.h>
49 -#include <stdio.h>
50 -#include <stdlib.h>
51 -
52 -int
53 -main ()
54 -{
55 - int major, minor, micro;
56 - char *tmp_version;
57 -
58 - system ("touch conf.glibtest");
59 -
60 - /* HP/UX 9 (%@#!) writes to sscanf strings */
61 - tmp_version = g_strdup("$min_glib_version");
62 - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
63 - printf("%s, bad version string\n", "$min_glib_version");
64 - exit(1);
65 - }
66 -
67 - if ((glib_major_version != $glib_config_major_version) ||
68 - (glib_minor_version != $glib_config_minor_version) ||
69 - (glib_micro_version != $glib_config_micro_version))
70 - {
71 - printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
72 - $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
73 - glib_major_version, glib_minor_version, glib_micro_version);
74 - printf ("*** was found! If pkg-config was correct, then it is best\n");
75 - printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
76 - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
77 - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
78 - printf("*** required on your system.\n");
79 - printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
80 - printf("*** to point to the correct configuration files\n");
81 - }
82 - else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
83 - (glib_minor_version != GLIB_MINOR_VERSION) ||
84 - (glib_micro_version != GLIB_MICRO_VERSION))
85 - {
86 - printf("*** GLIB header files (version %d.%d.%d) do not match\n",
87 - GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
88 - printf("*** library (version %d.%d.%d)\n",
89 - glib_major_version, glib_minor_version, glib_micro_version);
90 - }
91 - else
92 - {
93 - if ((glib_major_version > major) ||
94 - ((glib_major_version == major) && (glib_minor_version > minor)) ||
95 - ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
96 - {
97 - return 0;
98 - }
99 - else
100 - {
101 - printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
102 - glib_major_version, glib_minor_version, glib_micro_version);
103 - printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
104 - major, minor, micro);
105 - printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
106 - printf("***\n");
107 - printf("*** If you have already installed a sufficiently new version, this error\n");
108 - printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
109 - printf("*** being found. The easiest way to fix this is to remove the old version\n");
110 - printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
111 - printf("*** correct copy of pkg-config. (In this case, you will have to\n");
112 - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
113 - printf("*** so that the correct libraries are found at run-time))\n");
114 - }
115 - }
116 - return 1;
117 -}
118 -
119 -_ACEOF
120 -rm -f conftest$ac_exeext
121 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
122 - (eval $ac_link) 2>&5
123 - ac_status=$?
124 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
125 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
126 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
127 - (eval $ac_try) 2>&5
128 - ac_status=$?
129 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
130 - (exit $ac_status); }; }; then
131 - :
132 -else
133 - echo "$as_me: program exited with status $ac_status" >&5
134 -echo "$as_me: failed program was:" >&5
135 -cat conftest.$ac_ext >&5
136 -( exit $ac_status )
137 -no_glib=yes
138 -fi
139 -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
140 +if test "$cross_compiling" = yes; then
141 + enable_glibtest=no
142 + no_glib=
143 + GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
144 + GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
145 + GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
146 + GLIB_CFLAGS="$GLIB_CFLAGS"
147 + GLIB_LIBS="$GLIB_LIBS"
148 + CFLAGS="$CFLAGS $GLIB_CFLAGS"
149 + LIBS="$GLIB_LIBS $LIBS"
150 + echo "$as_me:$LINENO: result: yes" >&5
151 + echo "${ECHO_T}yes" >&6
152 fi
153 - CFLAGS="$ac_save_CFLAGS"
154 - LIBS="$ac_save_LIBS"
155 - fi
156 - fi
157 - if test "x$no_glib" = x ; then
158 - echo "$as_me:$LINENO: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5
159 -echo "${ECHO_T}yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6
160 - :
161 - else
162 - echo "$as_me:$LINENO: result: no" >&5
163 -echo "${ECHO_T}no" >&6
164 - if test "$PKG_CONFIG" = "no" ; then
165 - echo "*** A new enough version of pkg-config was not found."
166 - echo "*** See http://www.freedesktop.org/software/pkgconfig/"
167 - else
168 - if test -f conf.glibtest ; then
169 - :
170 - else
171 - echo "*** Could not run GLIB test program, checking why..."
172 - ac_save_CFLAGS="$CFLAGS"
173 - ac_save_LIBS="$LIBS"
174 - CFLAGS="$CFLAGS $GLIB_CFLAGS"
175 - LIBS="$LIBS $GLIB_LIBS"
176 - cat >conftest.$ac_ext <<_ACEOF
177 -#line $LINENO "configure"
178 -#include "confdefs.h"
179 -
180 -#include <glib.h>
181 -#include <stdio.h>
182 -
183 -#ifdef F77_DUMMY_MAIN
184 -# ifdef __cplusplus
185 - extern "C"
186 -# endif
187 - int F77_DUMMY_MAIN() { return 1; }
188 -#endif
189 -int
190 -main ()
191 -{
192 - return ((glib_major_version) || (glib_minor_version) || (glib_micro_version));
193 - ;
194 - return 0;
195 -}
196 -_ACEOF
197 -rm -f conftest.$ac_objext conftest$ac_exeext
198 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
199 - (eval $ac_link) 2>&5
200 - ac_status=$?
201 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
202 - (exit $ac_status); } &&
203 - { ac_try='test -s conftest$ac_exeext'
204 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
205 - (eval $ac_try) 2>&5
206 - ac_status=$?
207 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
208 - (exit $ac_status); }; }; then
209 - echo "*** The test program compiled, but did not run. This usually means"
210 - echo "*** that the run-time linker is not finding GLIB or finding the wrong"
211 - echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
212 - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
213 - echo "*** to the installed location Also, make sure you have run ldconfig if that"
214 - echo "*** is required on your system"
215 - echo "***"
216 - echo "*** If you have an old version installed, it is best to remove it, although"
217 - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
218 -else
219 - echo "$as_me: failed program was:" >&5
220 -cat conftest.$ac_ext >&5
221 - echo "*** The test program failed to compile or link. See the file config.log for the"
222 - echo "*** exact error that occured. This usually means GLIB is incorrectly installed."
223 -fi
224 -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
225 - CFLAGS="$ac_save_CFLAGS"
226 - LIBS="$ac_save_LIBS"
227 - fi
228 - fi
229 - GLIB_CFLAGS=""
230 - GLIB_LIBS=""
231 - GLIB_GENMARSHAL=""
232 - GOBJECT_QUERY=""
233 - GLIB_MKENUMS=""
234 - { { echo "$as_me:$LINENO: error: *** GLIB >= 2.0.0 not installed - please install first ***" >&5
235 -echo "$as_me: error: *** GLIB >= 2.0.0 not installed - please install first ***" >&2;}
236 - { (exit 1); exit 1; }; }
237 - fi
238 -
239 -
240 -
241 -
242 -
243 - rm -f conf.glibtest
244
245 # Check whether --enable-gtktest or --disable-gtktest was given.
246 if test "${enable_gtktest+set}" = set; then
247 @@ -5120,221 +4909,16 @@ fi
248 echo "$as_me:$LINENO: checking for GTK+ - version >= $min_gtk_version" >&5
249 echo $ECHO_N "checking for GTK+ - version >= $min_gtk_version... $ECHO_C" >&6
250
251 - if test x$PKG_CONFIG != xno ; then
252 - ## don't try to run the test against uninstalled libtool libs
253 - if $PKG_CONFIG --uninstalled $pkg_config_args; then
254 - echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
255 - enable_gtktest=no
256 - fi
257 -
258 - if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
259 - :
260 - else
261 - no_gtk=yes
262 - fi
263 - fi
264 -
265 - if test x"$no_gtk" = x ; then
266 - GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
267 - GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
268 - gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
269 - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
270 - gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
271 - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
272 - gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
273 - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
274 - if test "x$enable_gtktest" = "xyes" ; then
275 - ac_save_CFLAGS="$CFLAGS"
276 - ac_save_LIBS="$LIBS"
277 - CFLAGS="$CFLAGS $GTK_CFLAGS"
278 - LIBS="$GTK_LIBS $LIBS"
279 - rm -f conf.gtktest
280 - if test "$cross_compiling" = yes; then
281 - echo $ac_n "cross compiling; assumed OK... $ac_c"
282 -else
283 - cat >conftest.$ac_ext <<_ACEOF
284 -#line $LINENO "configure"
285 -#include "confdefs.h"
286 -
287 -#include <gtk/gtk.h>
288 -#include <stdio.h>
289 -#include <stdlib.h>
290 -
291 -int
292 -main ()
293 -{
294 - int major, minor, micro;
295 - char *tmp_version;
296 -
297 - system ("touch conf.gtktest");
298 -
299 - /* HP/UX 9 (%@#!) writes to sscanf strings */
300 - tmp_version = g_strdup("$min_gtk_version");
301 - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
302 - printf("%s, bad version string\n", "$min_gtk_version");
303 - exit(1);
304 - }
305 -
306 - if ((gtk_major_version != $gtk_config_major_version) ||
307 - (gtk_minor_version != $gtk_config_minor_version) ||
308 - (gtk_micro_version != $gtk_config_micro_version))
309 - {
310 - printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
311 - $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
312 - gtk_major_version, gtk_minor_version, gtk_micro_version);
313 - printf ("*** was found! If pkg-config was correct, then it is best\n");
314 - printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
315 - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
316 - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
317 - printf("*** required on your system.\n");
318 - printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
319 - printf("*** to point to the correct configuration files\n");
320 - }
321 - else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
322 - (gtk_minor_version != GTK_MINOR_VERSION) ||
323 - (gtk_micro_version != GTK_MICRO_VERSION))
324 - {
325 - printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
326 - GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
327 - printf("*** library (version %d.%d.%d)\n",
328 - gtk_major_version, gtk_minor_version, gtk_micro_version);
329 - }
330 - else
331 - {
332 - if ((gtk_major_version > major) ||
333 - ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
334 - ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
335 - {
336 - return 0;
337 - }
338 - else
339 - {
340 - printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
341 - gtk_major_version, gtk_minor_version, gtk_micro_version);
342 - printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
343 - major, minor, micro);
344 - printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
345 - printf("***\n");
346 - printf("*** If you have already installed a sufficiently new version, this error\n");
347 - printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
348 - printf("*** being found. The easiest way to fix this is to remove the old version\n");
349 - printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
350 - printf("*** correct copy of pkg-config. (In this case, you will have to\n");
351 - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
352 - printf("*** so that the correct libraries are found at run-time))\n");
353 - }
354 - }
355 - return 1;
356 -}
357 -
358 -_ACEOF
359 -rm -f conftest$ac_exeext
360 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
361 - (eval $ac_link) 2>&5
362 - ac_status=$?
363 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
364 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
365 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
366 - (eval $ac_try) 2>&5
367 - ac_status=$?
368 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
369 - (exit $ac_status); }; }; then
370 - :
371 -else
372 - echo "$as_me: program exited with status $ac_status" >&5
373 -echo "$as_me: failed program was:" >&5
374 -cat conftest.$ac_ext >&5
375 -( exit $ac_status )
376 -no_gtk=yes
377 +if test "$cross_compiling" = yes; then
378 + enable_gtktest=no
379 + no_gtk=
380 + GTK_CFLAGS="$GTK_CFLAGS"
381 + GTK_LIBS="$GTK_LIBS"
382 + CFLAGS="$CFLAGS $GTK_CFLAGS"
383 + LIBS="$GTK_LIBS $LIBS"
384 + echo "$as_me:$LINENO: result: yes" >&5
385 + echo "${ECHO_T}yes" >&6
386 fi
387 -rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
388 -fi
389 - CFLAGS="$ac_save_CFLAGS"
390 - LIBS="$ac_save_LIBS"
391 - fi
392 - fi
393 - if test "x$no_gtk" = x ; then
394 - echo "$as_me:$LINENO: result: yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&5
395 -echo "${ECHO_T}yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version)" >&6
396 - :
397 - else
398 - echo "$as_me:$LINENO: result: no" >&5
399 -echo "${ECHO_T}no" >&6
400 - if test "$PKG_CONFIG" = "no" ; then
401 - echo "*** A new enough version of pkg-config was not found."
402 - echo "*** See http://pkgconfig.sourceforge.net"
403 - else
404 - if test -f conf.gtktest ; then
405 - :
406 - else
407 - echo "*** Could not run GTK+ test program, checking why..."
408 - ac_save_CFLAGS="$CFLAGS"
409 - ac_save_LIBS="$LIBS"
410 - CFLAGS="$CFLAGS $GTK_CFLAGS"
411 - LIBS="$LIBS $GTK_LIBS"
412 - cat >conftest.$ac_ext <<_ACEOF
413 -#line $LINENO "configure"
414 -#include "confdefs.h"
415 -
416 -#include <gtk/gtk.h>
417 -#include <stdio.h>
418 -
419 -#ifdef F77_DUMMY_MAIN
420 -# ifdef __cplusplus
421 - extern "C"
422 -# endif
423 - int F77_DUMMY_MAIN() { return 1; }
424 -#endif
425 -int
426 -main ()
427 -{
428 - return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version));
429 - ;
430 - return 0;
431 -}
432 -_ACEOF
433 -rm -f conftest.$ac_objext conftest$ac_exeext
434 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
435 - (eval $ac_link) 2>&5
436 - ac_status=$?
437 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
438 - (exit $ac_status); } &&
439 - { ac_try='test -s conftest$ac_exeext'
440 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
441 - (eval $ac_try) 2>&5
442 - ac_status=$?
443 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
444 - (exit $ac_status); }; }; then
445 - echo "*** The test program compiled, but did not run. This usually means"
446 - echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
447 - echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
448 - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
449 - echo "*** to the installed location Also, make sure you have run ldconfig if that"
450 - echo "*** is required on your system"
451 - echo "***"
452 - echo "*** If you have an old version installed, it is best to remove it, although"
453 - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
454 -else
455 - echo "$as_me: failed program was:" >&5
456 -cat conftest.$ac_ext >&5
457 - echo "*** The test program failed to compile or link. See the file config.log for the"
458 - echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."
459 -fi
460 -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
461 - CFLAGS="$ac_save_CFLAGS"
462 - LIBS="$ac_save_LIBS"
463 - fi
464 - fi
465 - GTK_CFLAGS=""
466 - GTK_LIBS=""
467 - { { echo "$as_me:$LINENO: error: *** GTK+ >= 2.0.0 not installed - please install first ***" >&5
468 -echo "$as_me: error: *** GTK+ >= 2.0.0 not installed - please install first ***" >&2;}
469 - { (exit 1); exit 1; }; }
470 - fi
471 -
472 -
473 - rm -f conf.gtktest
474 -
475
476 ALL_LINGUAS="fr"
477 # Make sure we can run config.sub.