]> git.saurik.com Git - wxWidgets.git/blob - acinclude.m4
SWIGged updates for wxGTK
[wxWidgets.git] / acinclude.m4
1 dnl ---------------------------------------------------------------------------
2 dnl
3 dnl Macros for configure.in for wxWindows by Robert Roebling, Phil Blecker,
4 dnl Vadim Zeitlin and Ron Lee
5 dnl
6 dnl This script is under the wxWindows licence.
7 dnl
8 dnl Version: $Id$
9 dnl ---------------------------------------------------------------------------
10
11 dnl ===========================================================================
12 dnl macros to find the a file in the list of include/lib paths
13 dnl ===========================================================================
14
15 dnl ---------------------------------------------------------------------------
16 dnl call WX_PATH_FIND_INCLUDES(search path, header name), sets ac_find_includes
17 dnl to the full name of the file that was found or leaves it empty if not found
18 dnl ---------------------------------------------------------------------------
19 AC_DEFUN([WX_PATH_FIND_INCLUDES],
20 [
21 ac_find_includes=
22 for ac_dir in $1;
23 do
24 if test -f "$ac_dir/$2"; then
25 ac_find_includes=$ac_dir
26 break
27 fi
28 done
29 ])
30
31 dnl ---------------------------------------------------------------------------
32 dnl call WX_PATH_FIND_LIBRARIES(search path, header name), sets ac_find_libraries
33 dnl to the full name of the file that was found or leaves it empty if not found
34 dnl ---------------------------------------------------------------------------
35 AC_DEFUN([WX_PATH_FIND_LIBRARIES],
36 [
37 ac_find_libraries=
38 for ac_dir in $1;
39 do
40 for ac_extension in a so sl dylib; do
41 if test -f "$ac_dir/lib$2.$ac_extension"; then
42 ac_find_libraries=$ac_dir
43 break 2
44 fi
45 done
46 done
47 ])
48
49 dnl ---------------------------------------------------------------------------
50 dnl Path to include, already defined
51 dnl ---------------------------------------------------------------------------
52 AC_DEFUN([WX_INCLUDE_PATH_EXIST],
53 [
54 ac_path_to_include=$1
55 echo "$2" | grep "\-I$1" > /dev/null
56 result=$?
57 if test $result = 0; then
58 ac_path_to_include=""
59 else
60 ac_path_to_include=" -I$1"
61 fi
62 ])
63
64 dnl ---------------------------------------------------------------------------
65 dnl Path to link, already defined
66 dnl ---------------------------------------------------------------------------
67 AC_DEFUN([WX_LINK_PATH_EXIST],
68 [
69 echo "$2" | grep "\-L$1" > /dev/null
70 result=$?
71 if test $result = 0; then
72 ac_path_to_link=""
73 else
74 ac_path_to_link=" -L$1"
75 fi
76 ])
77
78 dnl ===========================================================================
79 dnl C++ features test
80 dnl ===========================================================================
81
82 dnl ---------------------------------------------------------------------------
83 dnl WX_CPP_NEW_HEADERS checks whether the compiler has "new" <iostream> header
84 dnl or only the old <iostream.h> one - it may be generally assumed that if
85 dnl <iostream> exists, the other "new" headers (without .h) exist too.
86 dnl
87 dnl call WX_CPP_NEW_HEADERS(actiof-if-true, action-if-false-or-cross-compiling)
88 dnl ---------------------------------------------------------------------------
89
90 AC_DEFUN([WX_CPP_NEW_HEADERS],
91 [
92 if test "$cross_compiling" = "yes"; then
93 ifelse([$2], , :, [$2])
94 else
95 AC_LANG_SAVE
96 AC_LANG_CPLUSPLUS
97
98 AC_CHECK_HEADERS(iostream)
99
100 if test "$ac_cv_header_iostream" = "yes" ; then
101 ifelse([$1], , :, [$1])
102 else
103 ifelse([$2], , :, [$2])
104 fi
105
106 AC_LANG_RESTORE
107 fi
108 ])
109
110 dnl ---------------------------------------------------------------------------
111 dnl WX_CPP_BOOL checks whether the C++ compiler has a built in bool type
112 dnl
113 dnl call WX_CPP_BOOL - will define HAVE_BOOL if the compiler supports bool
114 dnl ---------------------------------------------------------------------------
115
116 AC_DEFUN([WX_CPP_BOOL],
117 [
118 AC_CACHE_CHECK([if C++ compiler supports bool], wx_cv_cpp_bool,
119 [
120 AC_LANG_SAVE
121 AC_LANG_CPLUSPLUS
122
123 AC_TRY_COMPILE(
124 [
125 ],
126 [
127 bool b = true;
128
129 return 0;
130 ],
131 [
132 wx_cv_cpp_bool=yes
133 ],
134 [
135 wx_cv_cpp_bool=no
136 ]
137 )
138
139 AC_LANG_RESTORE
140 ])
141
142 if test "$wx_cv_cpp_bool" = "yes"; then
143 AC_DEFINE(HAVE_BOOL)
144 fi
145 ])
146
147 dnl ---------------------------------------------------------------------------
148 dnl a slightly better AC_C_BIGENDIAN macro which allows cross-compiling
149 dnl ---------------------------------------------------------------------------
150
151 AC_DEFUN([WX_C_BIGENDIAN],
152 [AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian,
153 [ac_cv_c_bigendian=unknown
154 # See if sys/param.h defines the BYTE_ORDER macro.
155 AC_TRY_COMPILE([#include <sys/types.h>
156 #include <sys/param.h>], [
157 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
158 bogus endian macros
159 #endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
160 AC_TRY_COMPILE([#include <sys/types.h>
161 #include <sys/param.h>], [
162 #if BYTE_ORDER != BIG_ENDIAN
163 not big endian
164 #endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
165 if test $ac_cv_c_bigendian = unknown; then
166 AC_TRY_RUN([main () {
167 /* Are we little or big endian? From Harbison&Steele. */
168 union
169 {
170 long l;
171 char c[sizeof (long)];
172 } u;
173 u.l = 1;
174 exit (u.c[sizeof (long) - 1] == 1);
175 }], [ac_cv_c_bigendian=no], [ac_cv_c_bigendian=yes], [ac_cv_c_bigendian=unknown])
176 fi])
177 if test $ac_cv_c_bigendian = unknown; then
178 AC_MSG_WARN([Assuming little-endian target machine - this may be overriden by adding the line "ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}" to config.cache file])
179 fi
180 if test $ac_cv_c_bigendian = yes; then
181 AC_DEFINE(WORDS_BIGENDIAN)
182 fi
183 ])
184
185 dnl ---------------------------------------------------------------------------
186 dnl override AC_ARG_ENABLE/WITH to cache the results in .cache file
187 dnl ---------------------------------------------------------------------------
188
189 AC_DEFUN([WX_ARG_CACHE_INIT],
190 [
191 wx_arg_cache_file="configarg.cache"
192 echo "loading argument cache $wx_arg_cache_file"
193 rm -f ${wx_arg_cache_file}.tmp
194 touch ${wx_arg_cache_file}.tmp
195 touch ${wx_arg_cache_file}
196 ])
197
198 AC_DEFUN([WX_ARG_CACHE_FLUSH],
199 [
200 echo "saving argument cache $wx_arg_cache_file"
201 mv ${wx_arg_cache_file}.tmp ${wx_arg_cache_file}
202 ])
203
204 dnl this macro checks for a three-valued command line --with argument:
205 dnl possible arguments are 'yes', 'no', 'sys', or 'builtin'
206 dnl usage: WX_ARG_SYS_WITH(option, helpmessage, variable-name)
207 AC_DEFUN([WX_ARG_SYS_WITH],
208 [
209 AC_MSG_CHECKING([for --with-$1])
210 no_cache=0
211 AC_ARG_WITH($1, [$2],
212 [
213 if test "$withval" = yes; then
214 ac_cv_use_$1='$3=yes'
215 elif test "$withval" = no; then
216 ac_cv_use_$1='$3=no'
217 elif test "$withval" = sys; then
218 ac_cv_use_$1='$3=sys'
219 elif test "$withval" = builtin; then
220 ac_cv_use_$1='$3=builtin'
221 else
222 AC_MSG_ERROR([Invalid value for --with-$1: should be yes, no, sys, or builtin])
223 fi
224 ],
225 [
226 LINE=`grep "$3" ${wx_arg_cache_file}`
227 if test "x$LINE" != x ; then
228 eval "DEFAULT_$LINE"
229 else
230 no_cache=1
231 fi
232
233 ac_cv_use_$1='$3='$DEFAULT_$3
234 ])
235
236 eval "$ac_cv_use_$1"
237 if test "$no_cache" != 1; then
238 echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
239 fi
240
241 if test "$$3" = yes; then
242 AC_MSG_RESULT(yes)
243 elif test "$$3" = no; then
244 AC_MSG_RESULT(no)
245 elif test "$$3" = sys; then
246 AC_MSG_RESULT([system version])
247 elif test "$$3" = builtin; then
248 AC_MSG_RESULT([builtin version])
249 else
250 AC_MSG_ERROR([Invalid value for --with-$1: should be yes, no, sys, or builtin])
251 fi
252 ])
253
254 dnl this macro checks for a command line argument and caches the result
255 dnl usage: WX_ARG_WITH(option, helpmessage, variable-name)
256 AC_DEFUN([WX_ARG_WITH],
257 [
258 AC_MSG_CHECKING([for --with-$1])
259 no_cache=0
260 AC_ARG_WITH($1, [$2],
261 [
262 if test "$withval" = yes; then
263 ac_cv_use_$1='$3=yes'
264 else
265 ac_cv_use_$1='$3=no'
266 fi
267 ],
268 [
269 LINE=`grep "$3" ${wx_arg_cache_file}`
270 if test "x$LINE" != x ; then
271 eval "DEFAULT_$LINE"
272 else
273 no_cache=1
274 fi
275
276 ac_cv_use_$1='$3='$DEFAULT_$3
277 ])
278
279 eval "$ac_cv_use_$1"
280 if test "$no_cache" != 1; then
281 echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
282 fi
283
284 if test "$$3" = yes; then
285 AC_MSG_RESULT(yes)
286 else
287 AC_MSG_RESULT(no)
288 fi
289 ])
290
291 dnl like WX_ARG_WITH but uses AC_ARG_ENABLE instead of AC_ARG_WITH
292 dnl usage: WX_ARG_ENABLE(option, helpmessage, variable-name)
293 AC_DEFUN([WX_ARG_ENABLE],
294 [
295 AC_MSG_CHECKING([for --enable-$1])
296 no_cache=0
297 AC_ARG_ENABLE($1, [$2],
298 [
299 if test "$enableval" = yes; then
300 ac_cv_use_$1='$3=yes'
301 else
302 ac_cv_use_$1='$3=no'
303 fi
304 ],
305 [
306 LINE=`grep "$3" ${wx_arg_cache_file}`
307 if test "x$LINE" != x ; then
308 eval "DEFAULT_$LINE"
309 else
310 no_cache=1
311 fi
312
313 ac_cv_use_$1='$3='$DEFAULT_$3
314 ])
315
316 eval "$ac_cv_use_$1"
317 if test "$no_cache" != 1; then
318 echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
319 fi
320
321 if test "$$3" = yes; then
322 AC_MSG_RESULT(yes)
323 else
324 AC_MSG_RESULT(no)
325 fi
326 ])
327
328
329
330 dnl ===========================================================================
331 dnl "3rd party" macros included here because they are not widely available
332 dnl ===========================================================================
333
334
335 dnl ---------------------------------------------------------------------------
336 dnl test for availability of iconv()
337 dnl ---------------------------------------------------------------------------
338
339 #serial AM2
340
341 dnl From Bruno Haible.
342
343 AC_DEFUN([AM_ICONV],
344 [
345 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
346 dnl those with the standalone portable GNU libiconv installed).
347
348 AC_ARG_WITH([libiconv-prefix],
349 [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
350 for dir in `echo "$withval" | tr : ' '`; do
351 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
352 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
353 done
354 ])
355
356 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
357 am_cv_func_iconv="no, consider installing GNU libiconv"
358 am_cv_lib_iconv=no
359 AC_TRY_LINK([#include <stdlib.h>
360 #include <iconv.h>],
361 [iconv_t cd = iconv_open("","");
362 iconv(cd,NULL,NULL,NULL,NULL);
363 iconv_close(cd);],
364 am_cv_func_iconv=yes)
365 if test "$am_cv_func_iconv" != yes; then
366 am_save_LIBS="$LIBS"
367 LIBS="$LIBS -liconv"
368 AC_TRY_LINK([#include <stdlib.h>
369 #include <iconv.h>],
370 [iconv_t cd = iconv_open("","");
371 iconv(cd,NULL,NULL,NULL,NULL);
372 iconv_close(cd);],
373 am_cv_lib_iconv=yes
374 am_cv_func_iconv=yes)
375 LIBS="$am_save_LIBS"
376 fi
377 ])
378 if test "$am_cv_func_iconv" = yes; then
379 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
380 AC_MSG_CHECKING([for iconv declaration])
381 AC_CACHE_VAL(am_cv_proto_iconv, [
382 AC_TRY_COMPILE([
383 #include <stdlib.h>
384 #include <iconv.h>
385 extern
386 #ifdef __cplusplus
387 "C"
388 #endif
389 #if defined(__STDC__) || defined(__cplusplus)
390 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
391 #else
392 size_t iconv();
393 #endif
394 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
395 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
396 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
397 AC_MSG_RESULT([$]{ac_t:-
398 }[$]am_cv_proto_iconv)
399 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
400 [Define as const if the declaration of iconv() needs const.])
401 fi
402 LIBICONV=
403 if test "$am_cv_lib_iconv" = yes; then
404 LIBICONV="-liconv"
405 fi
406 AC_SUBST(LIBICONV)
407 ])
408
409
410 dnl ---------------------------------------------------------------------------
411 dnl test for GTK+ 2.0
412 dnl ---------------------------------------------------------------------------
413
414 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
415 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
416 dnl
417 AC_DEFUN(AM_PATH_GTK_2_0,
418 [dnl
419 dnl Get the cflags and libraries from the gtk-config-2.0 script
420 dnl
421 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
422 gtk_config_prefix="$withval", gtk_config_prefix="")
423 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
424 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
425 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
426 , enable_gtktest=yes)
427
428 for module in . $4
429 do
430 case "$module" in
431 gthread)
432 gtk_config_args="$gtk_config_args gthread"
433 ;;
434 esac
435 done
436
437 if test x$gtk_config_exec_prefix != x ; then
438 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
439 if test x${GTK_CONFIG_2_0+set} != xset ; then
440 GTK_CONFIG_2_0=$gtk_config_exec_prefix/bin/gtk-config-2.0
441 fi
442 fi
443 if test x$gtk_config_prefix != x ; then
444 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
445 if test x${GTK_CONFIG_2_0+set} != xset ; then
446 GTK_CONFIG_2_0=$gtk_config_prefix/bin/gtk-config-2.0
447 fi
448 fi
449
450 AC_PATH_PROG(GTK_CONFIG_2_0, gtk-config-2.0, no)
451 min_gtk_version=ifelse([$1], ,1.3.1,$1)
452 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
453 no_gtk=""
454 if test "$GTK_CONFIG_2_0" = "no" ; then
455 no_gtk=yes
456 else
457 GTK_CFLAGS=`$GTK_CONFIG_2_0 $gtk_config_args --cflags`
458 GTK_LIBS=`$GTK_CONFIG_2_0 $gtk_config_args --libs`
459 gtk_config_major_version=`$GTK_CONFIG_2_0 $gtk_config_args --version | \
460 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
461 gtk_config_minor_version=`$GTK_CONFIG_2_0 $gtk_config_args --version | \
462 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
463 gtk_config_micro_version=`$GTK_CONFIG_2_0 $gtk_config_args --version | \
464 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
465 if test "x$enable_gtktest" = "xyes" ; then
466 ac_save_CFLAGS="$CFLAGS"
467 ac_save_LIBS="$LIBS"
468 CFLAGS="$CFLAGS $GTK_CFLAGS"
469 LIBS="$GTK_LIBS $LIBS"
470 dnl
471 dnl Now check if the installed GTK is sufficiently new. (Also sanity
472 dnl checks the results of gtk-config-2.0 to some extent
473 dnl
474 rm -f conf.gtktest
475 AC_TRY_RUN([
476 #include <gtk/gtk.h>
477 #include <stdio.h>
478 #include <stdlib.h>
479
480 int
481 main ()
482 {
483 int major, minor, micro;
484 char *tmp_version;
485
486 system ("touch conf.gtktest");
487
488 /* HP/UX 9 (%@#!) writes to sscanf strings */
489 tmp_version = g_strdup("$min_gtk_version");
490 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
491 printf("%s, bad version string\n", "$min_gtk_version");
492 exit(1);
493 }
494
495 if ((gtk_major_version != $gtk_config_major_version) ||
496 (gtk_minor_version != $gtk_config_minor_version) ||
497 (gtk_micro_version != $gtk_config_micro_version))
498 {
499 printf("\n*** 'gtk-config-2.0 --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
500 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
501 gtk_major_version, gtk_minor_version, gtk_micro_version);
502 printf ("*** was found! If gtk-config-2.0 was correct, then it is best\n");
503 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
504 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
505 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
506 printf("*** required on your system.\n");
507 printf("*** If gtk-config-2.0 was wrong, set the environment variable GTK_CONFIG_2_0\n");
508 printf("*** to point to the correct copy of gtk-config-2.0, and remove the file config.cache\n");
509 printf("*** before re-running configure\n");
510 }
511 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
512 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
513 (gtk_minor_version != GTK_MINOR_VERSION) ||
514 (gtk_micro_version != GTK_MICRO_VERSION))
515 {
516 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
517 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
518 printf("*** library (version %d.%d.%d)\n",
519 gtk_major_version, gtk_minor_version, gtk_micro_version);
520 }
521 #endif /* defined (GTK_MAJOR_VERSION) ... */
522 else
523 {
524 if ((gtk_major_version > major) ||
525 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
526 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
527 {
528 return 0;
529 }
530 else
531 {
532 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
533 gtk_major_version, gtk_minor_version, gtk_micro_version);
534 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
535 major, minor, micro);
536 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
537 printf("***\n");
538 printf("*** If you have already installed a sufficiently new version, this error\n");
539 printf("*** probably means that the wrong copy of the gtk-config-2.0 shell script is\n");
540 printf("*** being found. The easiest way to fix this is to remove the old version\n");
541 printf("*** of GTK+, but you can also set the GTK_CONFIG_2_0 environment to point to the\n");
542 printf("*** correct copy of gtk-config-2.0. (In this case, you will have to\n");
543 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
544 printf("*** so that the correct libraries are found at run-time))\n");
545 }
546 }
547 return 1;
548 }
549 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
550 CFLAGS="$ac_save_CFLAGS"
551 LIBS="$ac_save_LIBS"
552 fi
553 fi
554 if test "x$no_gtk" = x ; then
555 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
556 ifelse([$2], , :, [$2])
557 else
558 AC_MSG_RESULT(no)
559 if test "$GTK_CONFIG_2_0" = "no" ; then
560 echo "*** The gtk-config-2.0 script installed by GTK could not be found"
561 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
562 echo "*** your path, or set the GTK_CONFIG_2_0 environment variable to the"
563 echo "*** full path to gtk-config-2.0."
564 else
565 if test -f conf.gtktest ; then
566 :
567 else
568 echo "*** Could not run GTK test program, checking why..."
569 CFLAGS="$CFLAGS $GTK_CFLAGS"
570 LIBS="$LIBS $GTK_LIBS"
571 AC_TRY_LINK([
572 #include <gtk/gtk.h>
573 #include <stdio.h>
574 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
575 [ echo "*** The test program compiled, but did not run. This usually means"
576 echo "*** that the run-time linker is not finding GTK or finding the wrong"
577 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
578 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
579 echo "*** to the installed location Also, make sure you have run ldconfig if that"
580 echo "*** is required on your system"
581 echo "***"
582 echo "*** If you have an old version installed, it is best to remove it, although"
583 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
584 echo "***"
585 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
586 echo "*** came with the system with the command"
587 echo "***"
588 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
589 [ echo "*** The test program failed to compile or link. See the file config.log for the"
590 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
591 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
592 echo "*** may want to edit the gtk-config-2.0 script: $GTK_CONFIG_2_0" ])
593 CFLAGS="$ac_save_CFLAGS"
594 LIBS="$ac_save_LIBS"
595 fi
596 fi
597 GTK_CFLAGS=""
598 GTK_LIBS=""
599 ifelse([$3], , :, [$3])
600 fi
601 AC_SUBST(GTK_CFLAGS)
602 AC_SUBST(GTK_LIBS)
603 rm -f conf.gtktest
604 ])