1 dnl aclocal.m4 generated automatically by aclocal 1.4
3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 dnl ---------------------------------------------------------------------------
15 dnl Macros for configure.in for wxWindows by Robert Roebling, Phil Blecker,
16 dnl Vadim Zeitlin and Ron Lee
18 dnl This script is under the wxWindows licence.
21 dnl ---------------------------------------------------------------------------
23 dnl ===========================================================================
24 dnl macros to find the a file in the list of include/lib paths
25 dnl ===========================================================================
27 dnl ---------------------------------------------------------------------------
28 dnl call WX_PATH_FIND_INCLUDES(search path, header name), sets ac_find_includes
29 dnl to the full name of the file that was found or leaves it empty if not found
30 dnl ---------------------------------------------------------------------------
31 AC_DEFUN([WX_PATH_FIND_INCLUDES],
36 if test -f "$ac_dir/$2"; then
37 ac_find_includes=$ac_dir
43 dnl ---------------------------------------------------------------------------
44 dnl call WX_PATH_FIND_LIBRARIES(search path, header name), sets ac_find_libraries
45 dnl to the full name of the file that was found or leaves it empty if not found
46 dnl ---------------------------------------------------------------------------
47 AC_DEFUN([WX_PATH_FIND_LIBRARIES],
52 for ac_extension in a so sl dylib; do
53 if test -f "$ac_dir/lib$2.$ac_extension"; then
54 ac_find_libraries=$ac_dir
61 dnl ---------------------------------------------------------------------------
62 dnl Path to include, already defined
63 dnl ---------------------------------------------------------------------------
64 AC_DEFUN([WX_INCLUDE_PATH_EXIST],
67 echo "$2" | grep "\-I$1" > /dev/null
69 if test $result = 0; then
72 ac_path_to_include=" -I$1"
76 dnl ---------------------------------------------------------------------------
77 dnl Path to link, already defined
78 dnl ---------------------------------------------------------------------------
79 AC_DEFUN([WX_LINK_PATH_EXIST],
81 echo "$2" | grep "\-L$1" > /dev/null
83 if test $result = 0; then
86 ac_path_to_link=" -L$1"
90 dnl ===========================================================================
92 dnl ===========================================================================
94 dnl ---------------------------------------------------------------------------
95 dnl WX_CPP_NEW_HEADERS checks whether the compiler has "new" <iostream> header
96 dnl or only the old <iostream.h> one - it may be generally assumed that if
97 dnl <iostream> exists, the other "new" headers (without .h) exist too.
99 dnl call WX_CPP_NEW_HEADERS(actiof-if-true, action-if-false-or-cross-compiling)
100 dnl ---------------------------------------------------------------------------
102 AC_DEFUN([WX_CPP_NEW_HEADERS],
104 if test "$cross_compiling" = "yes"; then
105 ifelse([$2], , :, [$2])
110 AC_CHECK_HEADERS(iostream)
112 if test "$ac_cv_header_iostream" = "yes" ; then
113 ifelse([$1], , :, [$1])
115 ifelse([$2], , :, [$2])
122 dnl ---------------------------------------------------------------------------
123 dnl WX_CPP_BOOL checks whether the C++ compiler has a built in bool type
125 dnl call WX_CPP_BOOL - will define HAVE_BOOL if the compiler supports bool
126 dnl ---------------------------------------------------------------------------
128 AC_DEFUN([WX_CPP_BOOL],
130 AC_CACHE_CHECK([if C++ compiler supports bool], wx_cv_cpp_bool,
154 if test "$wx_cv_cpp_bool" = "yes"; then
159 dnl ---------------------------------------------------------------------------
160 dnl a slightly better AC_C_BIGENDIAN macro which allows cross-compiling
161 dnl ---------------------------------------------------------------------------
163 AC_DEFUN([WX_C_BIGENDIAN],
164 [AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian,
165 [ac_cv_c_bigendian=unknown
166 # See if sys/param.h defines the BYTE_ORDER macro.
167 AC_TRY_COMPILE([#include <sys/types.h>
168 #include <sys/param.h>], [
169 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
171 #endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
172 AC_TRY_COMPILE([#include <sys/types.h>
173 #include <sys/param.h>], [
174 #if BYTE_ORDER != BIG_ENDIAN
176 #endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
177 if test $ac_cv_c_bigendian = unknown; then
178 AC_TRY_RUN([main () {
179 /* Are we little or big endian? From Harbison&Steele. */
183 char c[sizeof (long)];
186 exit (u.c[sizeof (long) - 1] == 1);
187 }], [ac_cv_c_bigendian=no], [ac_cv_c_bigendian=yes], [ac_cv_c_bigendian=unknown])
189 if test $ac_cv_c_bigendian = unknown; then
190 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])
192 if test $ac_cv_c_bigendian = yes; then
193 AC_DEFINE(WORDS_BIGENDIAN)
197 dnl ---------------------------------------------------------------------------
198 dnl override AC_ARG_ENABLE/WITH to cache the results in .cache file
199 dnl ---------------------------------------------------------------------------
201 AC_DEFUN([WX_ARG_CACHE_INIT],
203 wx_arg_cache_file="configarg.cache"
204 echo "loading argument cache $wx_arg_cache_file"
205 rm -f ${wx_arg_cache_file}.tmp
206 touch ${wx_arg_cache_file}.tmp
207 touch ${wx_arg_cache_file}
210 AC_DEFUN([WX_ARG_CACHE_FLUSH],
212 echo "saving argument cache $wx_arg_cache_file"
213 mv ${wx_arg_cache_file}.tmp ${wx_arg_cache_file}
216 dnl this macro checks for a three-valued command line --with argument:
217 dnl possible arguments are 'yes', 'no', 'sys', or 'builtin'
218 dnl usage: WX_ARG_SYS_WITH(option, helpmessage, variable-name)
219 AC_DEFUN([WX_ARG_SYS_WITH],
221 AC_MSG_CHECKING([for --with-$1])
223 AC_ARG_WITH($1, [$2],
225 if test "$withval" = yes; then
226 ac_cv_use_$1='$3=yes'
227 elif test "$withval" = no; then
229 elif test "$withval" = sys; then
230 ac_cv_use_$1='$3=sys'
231 elif test "$withval" = builtin; then
232 ac_cv_use_$1='$3=builtin'
234 AC_MSG_ERROR([Invalid value for --with-$1: should be yes, no, sys, or builtin])
238 LINE=`grep "$3" ${wx_arg_cache_file}`
239 if test "x$LINE" != x ; then
245 ac_cv_use_$1='$3='$DEFAULT_$3
249 if test "$no_cache" != 1; then
250 echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
253 if test "$$3" = yes; then
255 elif test "$$3" = no; then
257 elif test "$$3" = sys; then
258 AC_MSG_RESULT([system version])
259 elif test "$$3" = builtin; then
260 AC_MSG_RESULT([builtin version])
262 AC_MSG_ERROR([Invalid value for --with-$1: should be yes, no, sys, or builtin])
266 dnl this macro checks for a command line argument and caches the result
267 dnl usage: WX_ARG_WITH(option, helpmessage, variable-name)
268 AC_DEFUN([WX_ARG_WITH],
270 AC_MSG_CHECKING([for --with-$1])
272 AC_ARG_WITH($1, [$2],
274 if test "$withval" = yes; then
275 ac_cv_use_$1='$3=yes'
281 LINE=`grep "$3" ${wx_arg_cache_file}`
282 if test "x$LINE" != x ; then
288 ac_cv_use_$1='$3='$DEFAULT_$3
292 if test "$no_cache" != 1; then
293 echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
296 if test "$$3" = yes; then
303 dnl like WX_ARG_WITH but uses AC_ARG_ENABLE instead of AC_ARG_WITH
304 dnl usage: WX_ARG_ENABLE(option, helpmessage, variable-name)
305 AC_DEFUN([WX_ARG_ENABLE],
307 AC_MSG_CHECKING([for --enable-$1])
309 AC_ARG_ENABLE($1, [$2],
311 if test "$enableval" = yes; then
312 ac_cv_use_$1='$3=yes'
318 LINE=`grep "$3" ${wx_arg_cache_file}`
319 if test "x$LINE" != x ; then
325 ac_cv_use_$1='$3='$DEFAULT_$3
329 if test "$no_cache" != 1; then
330 echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
333 if test "$$3" = yes; then
342 dnl ===========================================================================
343 dnl "3rd party" macros included here because they are not widely available
344 dnl ===========================================================================
347 dnl ---------------------------------------------------------------------------
348 dnl test for availability of iconv()
349 dnl ---------------------------------------------------------------------------
351 dnl From Bruno Haible.
355 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
356 dnl those with the standalone portable GNU libiconv installed).
358 AC_ARG_WITH([libiconv-prefix],
359 [ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
360 for dir in `echo "$withval" | tr : ' '`; do
361 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
362 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
366 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
367 am_cv_func_iconv="no, consider installing GNU libiconv"
369 AC_TRY_LINK([#include <stdlib.h>
371 [iconv_t cd = iconv_open("","");
372 iconv(cd,NULL,NULL,NULL,NULL);
374 am_cv_func_iconv=yes)
375 if test "$am_cv_func_iconv" != yes; then
378 AC_TRY_LINK([#include <stdlib.h>
380 [iconv_t cd = iconv_open("","");
381 iconv(cd,NULL,NULL,NULL,NULL);
384 am_cv_func_iconv=yes)
388 if test "$am_cv_func_iconv" = yes; then
389 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
390 AC_CACHE_CHECK([if iconv needs const], wx_cv_func_iconv_const,
398 #if defined(__STDC__) || defined(__cplusplus)
399 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
405 wx_cv_func_iconv_const="no",
406 wx_cv_func_iconv_const="yes"
411 if test "x$wx_cv_func_iconv_const" = "xyes"; then
415 AC_DEFINE_UNQUOTED(ICONV_CONST, $iconv_const,
416 [Define as const if the declaration of iconv() needs const.])
419 if test "$am_cv_lib_iconv" = yes; then
426 dnl ---------------------------------------------------------------------------
427 dnl test for GTK+ 2.0
428 dnl ---------------------------------------------------------------------------
430 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
431 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
433 AC_DEFUN(AM_PATH_GTK_2_0,
435 dnl Get the cflags and libraries from the gtk-config-2.0 script
437 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
438 gtk_config_prefix="$withval", gtk_config_prefix="")
439 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
440 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
441 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
442 , enable_gtktest=yes)
448 gtk_config_args="$gtk_config_args gthread"
453 if test x$gtk_config_exec_prefix != x ; then
454 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
455 if test x${GTK_CONFIG_2_0+set} != xset ; then
456 GTK_CONFIG_2_0=$gtk_config_exec_prefix/bin/gtk-config-2.0
459 if test x$gtk_config_prefix != x ; then
460 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
461 if test x${GTK_CONFIG_2_0+set} != xset ; then
462 GTK_CONFIG_2_0=$gtk_config_prefix/bin/gtk-config-2.0
466 AC_PATH_PROG(GTK_CONFIG_2_0, gtk-config-2.0, no)
467 min_gtk_version=ifelse([$1], ,1.3.1,$1)
468 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
470 if test "$GTK_CONFIG_2_0" = "no" ; then
473 GTK_CFLAGS=`$GTK_CONFIG_2_0 $gtk_config_args --cflags`
474 GTK_LIBS=`$GTK_CONFIG_2_0 $gtk_config_args --libs`
475 gtk_config_major_version=`$GTK_CONFIG_2_0 $gtk_config_args --version | \
476 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
477 gtk_config_minor_version=`$GTK_CONFIG_2_0 $gtk_config_args --version | \
478 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
479 gtk_config_micro_version=`$GTK_CONFIG_2_0 $gtk_config_args --version | \
480 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
481 if test "x$enable_gtktest" = "xyes" ; then
482 ac_save_CFLAGS="$CFLAGS"
484 CFLAGS="$CFLAGS $GTK_CFLAGS"
485 LIBS="$GTK_LIBS $LIBS"
487 dnl Now check if the installed GTK is sufficiently new. (Also sanity
488 dnl checks the results of gtk-config-2.0 to some extent
499 int major, minor, micro;
502 system ("touch conf.gtktest");
504 /* HP/UX 9 (%@#!) writes to sscanf strings */
505 tmp_version = g_strdup("$min_gtk_version");
506 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
507 printf("%s, bad version string\n", "$min_gtk_version");
511 if ((gtk_major_version != $gtk_config_major_version) ||
512 (gtk_minor_version != $gtk_config_minor_version) ||
513 (gtk_micro_version != $gtk_config_micro_version))
515 printf("\n*** 'gtk-config-2.0 --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
516 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
517 gtk_major_version, gtk_minor_version, gtk_micro_version);
518 printf ("*** was found! If gtk-config-2.0 was correct, then it is best\n");
519 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
520 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
521 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
522 printf("*** required on your system.\n");
523 printf("*** If gtk-config-2.0 was wrong, set the environment variable GTK_CONFIG_2_0\n");
524 printf("*** to point to the correct copy of gtk-config-2.0, and remove the file config.cache\n");
525 printf("*** before re-running configure\n");
527 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
528 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
529 (gtk_minor_version != GTK_MINOR_VERSION) ||
530 (gtk_micro_version != GTK_MICRO_VERSION))
532 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
533 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
534 printf("*** library (version %d.%d.%d)\n",
535 gtk_major_version, gtk_minor_version, gtk_micro_version);
537 #endif /* defined (GTK_MAJOR_VERSION) ... */
540 if ((gtk_major_version > major) ||
541 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
542 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
548 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
549 gtk_major_version, gtk_minor_version, gtk_micro_version);
550 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
551 major, minor, micro);
552 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
554 printf("*** If you have already installed a sufficiently new version, this error\n");
555 printf("*** probably means that the wrong copy of the gtk-config-2.0 shell script is\n");
556 printf("*** being found. The easiest way to fix this is to remove the old version\n");
557 printf("*** of GTK+, but you can also set the GTK_CONFIG_2_0 environment to point to the\n");
558 printf("*** correct copy of gtk-config-2.0. (In this case, you will have to\n");
559 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
560 printf("*** so that the correct libraries are found at run-time))\n");
565 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
566 CFLAGS="$ac_save_CFLAGS"
570 if test "x$no_gtk" = x ; then
571 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
572 ifelse([$2], , :, [$2])
575 if test "$GTK_CONFIG_2_0" = "no" ; then
576 echo "*** The gtk-config-2.0 script installed by GTK could not be found"
577 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
578 echo "*** your path, or set the GTK_CONFIG_2_0 environment variable to the"
579 echo "*** full path to gtk-config-2.0."
581 if test -f conf.gtktest ; then
584 echo "*** Could not run GTK test program, checking why..."
585 CFLAGS="$CFLAGS $GTK_CFLAGS"
586 LIBS="$LIBS $GTK_LIBS"
590 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
591 [ echo "*** The test program compiled, but did not run. This usually means"
592 echo "*** that the run-time linker is not finding GTK or finding the wrong"
593 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
594 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
595 echo "*** to the installed location Also, make sure you have run ldconfig if that"
596 echo "*** is required on your system"
598 echo "*** If you have an old version installed, it is best to remove it, although"
599 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
601 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
602 echo "*** came with the system with the command"
604 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
605 [ echo "*** The test program failed to compile or link. See the file config.log for the"
606 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
607 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
608 echo "*** may want to edit the gtk-config-2.0 script: $GTK_CONFIG_2_0" ])
609 CFLAGS="$ac_save_CFLAGS"
615 ifelse([$3], , :, [$3])
622 # Configure paths for GTK+
623 # Owen Taylor 97-11-3
625 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
626 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
628 AC_DEFUN(AM_PATH_GTK,
630 dnl Get the cflags and libraries from the gtk-config script
632 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
633 gtk_config_prefix="$withval", gtk_config_prefix="")
634 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
635 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
636 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
637 , enable_gtktest=yes)
643 gtk_config_args="$gtk_config_args gthread"
648 if test x$gtk_config_exec_prefix != x ; then
649 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
650 if test x${GTK_CONFIG+set} != xset ; then
651 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
654 if test x$gtk_config_prefix != x ; then
655 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
656 if test x${GTK_CONFIG+set} != xset ; then
657 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
661 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
662 min_gtk_version=ifelse([$1], ,0.99.7,$1)
663 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
665 if test "$GTK_CONFIG" = "no" ; then
668 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
669 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
670 gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
671 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
672 gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
673 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
674 gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
675 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
676 if test "x$enable_gtktest" = "xyes" ; then
677 ac_save_CFLAGS="$CFLAGS"
679 CFLAGS="$CFLAGS $GTK_CFLAGS"
680 LIBS="$GTK_LIBS $LIBS"
682 dnl Now check if the installed GTK is sufficiently new. (Also sanity
683 dnl checks the results of gtk-config to some extent
694 int major, minor, micro;
697 system ("touch conf.gtktest");
699 /* HP/UX 9 (%@#!) writes to sscanf strings */
700 tmp_version = g_strdup("$min_gtk_version");
701 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
702 printf("%s, bad version string\n", "$min_gtk_version");
706 if ((gtk_major_version != $gtk_config_major_version) ||
707 (gtk_minor_version != $gtk_config_minor_version) ||
708 (gtk_micro_version != $gtk_config_micro_version))
710 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
711 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
712 gtk_major_version, gtk_minor_version, gtk_micro_version);
713 printf ("*** was found! If gtk-config was correct, then it is best\n");
714 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
715 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
716 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
717 printf("*** required on your system.\n");
718 printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
719 printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
720 printf("*** before re-running configure\n");
722 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
723 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
724 (gtk_minor_version != GTK_MINOR_VERSION) ||
725 (gtk_micro_version != GTK_MICRO_VERSION))
727 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
728 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
729 printf("*** library (version %d.%d.%d)\n",
730 gtk_major_version, gtk_minor_version, gtk_micro_version);
732 #endif /* defined (GTK_MAJOR_VERSION) ... */
735 if ((gtk_major_version > major) ||
736 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
737 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
743 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
744 gtk_major_version, gtk_minor_version, gtk_micro_version);
745 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
746 major, minor, micro);
747 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
749 printf("*** If you have already installed a sufficiently new version, this error\n");
750 printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
751 printf("*** being found. The easiest way to fix this is to remove the old version\n");
752 printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
753 printf("*** correct copy of gtk-config. (In this case, you will have to\n");
754 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
755 printf("*** so that the correct libraries are found at run-time))\n");
760 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
761 CFLAGS="$ac_save_CFLAGS"
765 if test "x$no_gtk" = x ; then
767 ifelse([$2], , :, [$2])
770 if test "$GTK_CONFIG" = "no" ; then
771 echo "*** The gtk-config script installed by GTK could not be found"
772 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
773 echo "*** your path, or set the GTK_CONFIG environment variable to the"
774 echo "*** full path to gtk-config."
776 if test -f conf.gtktest ; then
779 echo "*** Could not run GTK test program, checking why..."
780 CFLAGS="$CFLAGS $GTK_CFLAGS"
781 LIBS="$LIBS $GTK_LIBS"
785 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
786 [ echo "*** The test program compiled, but did not run. This usually means"
787 echo "*** that the run-time linker is not finding GTK or finding the wrong"
788 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
789 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
790 echo "*** to the installed location Also, make sure you have run ldconfig if that"
791 echo "*** is required on your system"
793 echo "*** If you have an old version installed, it is best to remove it, although"
794 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
796 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
797 echo "*** came with the system with the command"
799 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
800 [ echo "*** The test program failed to compile or link. See the file config.log for the"
801 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
802 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
803 echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
804 CFLAGS="$ac_save_CFLAGS"
810 ifelse([$3], , :, [$3])