1 # aclocal.m4 generated automatically by aclocal 1.6 -*- Autoconf -*-
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 dnl ---------------------------------------------------------------------------
16 dnl Macros for configure.in for wxWindows by Robert Roebling, Phil Blecker,
17 dnl Vadim Zeitlin and Ron Lee
19 dnl This script is under the wxWindows licence.
22 dnl ---------------------------------------------------------------------------
24 dnl ===========================================================================
25 dnl macros to find the a file in the list of include/lib paths
26 dnl ===========================================================================
28 dnl ---------------------------------------------------------------------------
29 dnl call WX_PATH_FIND_INCLUDES(search path, header name), sets ac_find_includes
30 dnl to the full name of the file that was found or leaves it empty if not found
31 dnl ---------------------------------------------------------------------------
32 AC_DEFUN([WX_PATH_FIND_INCLUDES],
37 if test -f "$ac_dir/$2"; then
38 ac_find_includes=$ac_dir
44 dnl ---------------------------------------------------------------------------
45 dnl call WX_PATH_FIND_LIBRARIES(search path, header name), sets ac_find_libraries
46 dnl to the full name of the file that was found or leaves it empty if not found
47 dnl ---------------------------------------------------------------------------
48 AC_DEFUN([WX_PATH_FIND_LIBRARIES],
53 for ac_extension in a so sl dylib; do
54 if test -f "$ac_dir/lib$2.$ac_extension"; then
55 ac_find_libraries=$ac_dir
62 dnl ---------------------------------------------------------------------------
63 dnl Path to include, already defined
64 dnl ---------------------------------------------------------------------------
65 AC_DEFUN([WX_INCLUDE_PATH_EXIST],
68 echo "$2" | grep "\-I$1" > /dev/null
70 if test $result = 0; then
73 ac_path_to_include=" -I$1"
77 dnl ---------------------------------------------------------------------------
78 dnl Path to link, already defined
79 dnl ---------------------------------------------------------------------------
80 AC_DEFUN([WX_LINK_PATH_EXIST],
82 echo "$2" | grep "\-L$1" > /dev/null
84 if test $result = 0; then
87 ac_path_to_link=" -L$1"
91 dnl ===========================================================================
93 dnl ===========================================================================
95 dnl ---------------------------------------------------------------------------
96 dnl WX_CPP_NEW_HEADERS checks whether the compiler has "new" <iostream> header
97 dnl or only the old <iostream.h> one - it may be generally assumed that if
98 dnl <iostream> exists, the other "new" headers (without .h) exist too.
100 dnl call WX_CPP_NEW_HEADERS(actiof-if-true, action-if-false-or-cross-compiling)
101 dnl ---------------------------------------------------------------------------
103 AC_DEFUN([WX_CPP_NEW_HEADERS],
105 if test "$cross_compiling" = "yes"; then
106 ifelse([$2], , :, [$2])
111 AC_CHECK_HEADERS(iostream)
113 if test "$ac_cv_header_iostream" = "yes" ; then
114 ifelse([$1], , :, [$1])
116 ifelse([$2], , :, [$2])
123 dnl ---------------------------------------------------------------------------
124 dnl WX_CPP_BOOL checks whether the C++ compiler has a built in bool type
126 dnl call WX_CPP_BOOL - will define HAVE_BOOL if the compiler supports bool
127 dnl ---------------------------------------------------------------------------
129 AC_DEFUN([WX_CPP_BOOL],
131 AC_CACHE_CHECK([if C++ compiler supports bool], wx_cv_cpp_bool,
155 if test "$wx_cv_cpp_bool" = "yes"; then
160 dnl ---------------------------------------------------------------------------
161 dnl a slightly better AC_C_BIGENDIAN macro which allows cross-compiling
162 dnl ---------------------------------------------------------------------------
164 AC_DEFUN([WX_C_BIGENDIAN],
165 [AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian,
166 [ac_cv_c_bigendian=unknown
167 # See if sys/param.h defines the BYTE_ORDER macro.
168 AC_TRY_COMPILE([#include <sys/types.h>
169 #include <sys/param.h>], [
170 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
172 #endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
173 AC_TRY_COMPILE([#include <sys/types.h>
174 #include <sys/param.h>], [
175 #if BYTE_ORDER != BIG_ENDIAN
177 #endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
178 if test $ac_cv_c_bigendian = unknown; then
179 AC_TRY_RUN([main () {
180 /* Are we little or big endian? From Harbison&Steele. */
184 char c[sizeof (long)];
187 exit (u.c[sizeof (long) - 1] == 1);
188 }], [ac_cv_c_bigendian=no], [ac_cv_c_bigendian=yes], [ac_cv_c_bigendian=unknown])
190 if test $ac_cv_c_bigendian = unknown; then
191 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])
193 if test $ac_cv_c_bigendian = yes; then
194 AC_DEFINE(WORDS_BIGENDIAN)
198 dnl ---------------------------------------------------------------------------
199 dnl override AC_ARG_ENABLE/WITH to cache the results in .cache file
200 dnl ---------------------------------------------------------------------------
202 AC_DEFUN([WX_ARG_CACHE_INIT],
204 wx_arg_cache_file="configarg.cache"
205 echo "loading argument cache $wx_arg_cache_file"
206 rm -f ${wx_arg_cache_file}.tmp
207 touch ${wx_arg_cache_file}.tmp
208 touch ${wx_arg_cache_file}
211 AC_DEFUN([WX_ARG_CACHE_FLUSH],
213 echo "saving argument cache $wx_arg_cache_file"
214 mv ${wx_arg_cache_file}.tmp ${wx_arg_cache_file}
217 dnl this macro checks for a three-valued command line --with argument:
218 dnl possible arguments are 'yes', 'no', 'sys', or 'builtin'
219 dnl usage: WX_ARG_SYS_WITH(option, helpmessage, variable-name)
220 AC_DEFUN([WX_ARG_SYS_WITH],
222 AC_MSG_CHECKING([for --with-$1])
224 AC_ARG_WITH($1, [$2],
226 if test "$withval" = yes; then
227 ac_cv_use_$1='$3=yes'
228 elif test "$withval" = no; then
230 elif test "$withval" = sys; then
231 ac_cv_use_$1='$3=sys'
232 elif test "$withval" = builtin; then
233 ac_cv_use_$1='$3=builtin'
235 AC_MSG_ERROR([Invalid value for --with-$1: should be yes, no, sys, or builtin])
239 LINE=`grep "$3" ${wx_arg_cache_file}`
240 if test "x$LINE" != x ; then
246 ac_cv_use_$1='$3='$DEFAULT_$3
250 if test "$no_cache" != 1; then
251 echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
254 if test "$$3" = yes; then
256 elif test "$$3" = no; then
258 elif test "$$3" = sys; then
259 AC_MSG_RESULT([system version])
260 elif test "$$3" = builtin; then
261 AC_MSG_RESULT([builtin version])
263 AC_MSG_ERROR([Invalid value for --with-$1: should be yes, no, sys, or builtin])
267 dnl this macro checks for a command line argument and caches the result
268 dnl usage: WX_ARG_WITH(option, helpmessage, variable-name)
269 AC_DEFUN([WX_ARG_WITH],
271 AC_MSG_CHECKING([for --with-$1])
273 AC_ARG_WITH($1, [$2],
275 if test "$withval" = yes; then
276 ac_cv_use_$1='$3=yes'
282 LINE=`grep "$3" ${wx_arg_cache_file}`
283 if test "x$LINE" != x ; then
289 ac_cv_use_$1='$3='$DEFAULT_$3
293 if test "$no_cache" != 1; then
294 echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
297 if test "$$3" = yes; then
304 dnl like WX_ARG_WITH but uses AC_ARG_ENABLE instead of AC_ARG_WITH
305 dnl usage: WX_ARG_ENABLE(option, helpmessage, variable-name)
306 AC_DEFUN([WX_ARG_ENABLE],
308 AC_MSG_CHECKING([for --enable-$1])
310 AC_ARG_ENABLE($1, [$2],
312 if test "$enableval" = yes; then
313 ac_cv_use_$1='$3=yes'
319 LINE=`grep "$3" ${wx_arg_cache_file}`
320 if test "x$LINE" != x ; then
326 ac_cv_use_$1='$3='$DEFAULT_$3
330 if test "$no_cache" != 1; then
331 echo $ac_cv_use_$1 >> ${wx_arg_cache_file}.tmp
334 if test "$$3" = yes; then
343 dnl ===========================================================================
344 dnl "3rd party" macros included here because they are not widely available
345 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 # Configure paths for GTK+
427 # Owen Taylor 1997-2001
429 dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
430 dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
431 dnl pass to pkg-config
433 AC_DEFUN(AM_PATH_GTK_2_0,
435 dnl Get the cflags and libraries from pkg-config
437 AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
438 , enable_gtktest=yes)
440 pkg_config_args=gtk+-2.0
445 pkg_config_args="$pkg_config_args gthread-2.0"
452 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
454 if test x$PKG_CONFIG != xno ; then
455 if pkg-config --atleast-pkgconfig-version 0.7 ; then
458 echo *** pkg-config too old; version 0.7 or better required.
466 min_gtk_version=ifelse([$1], ,2.0.0,$1)
467 AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
469 if test x$PKG_CONFIG != xno ; then
470 ## don't try to run the test against uninstalled libtool libs
471 if $PKG_CONFIG --uninstalled $pkg_config_args; then
472 echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
476 if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
483 if test x"$no_gtk" = x ; then
484 GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
485 GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
486 gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
487 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
488 gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
489 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
490 gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
491 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
492 if test "x$enable_gtktest" = "xyes" ; then
493 ac_save_CFLAGS="$CFLAGS"
495 CFLAGS="$CFLAGS $GTK_CFLAGS"
496 LIBS="$GTK_LIBS $LIBS"
498 dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
499 dnl checks the results of pkg-config to some extent)
510 int major, minor, micro;
513 system ("touch conf.gtktest");
515 /* HP/UX 9 (%@#!) writes to sscanf strings */
516 tmp_version = g_strdup("$min_gtk_version");
517 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
518 printf("%s, bad version string\n", "$min_gtk_version");
522 if ((gtk_major_version != $gtk_config_major_version) ||
523 (gtk_minor_version != $gtk_config_minor_version) ||
524 (gtk_micro_version != $gtk_config_micro_version))
526 printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
527 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
528 gtk_major_version, gtk_minor_version, gtk_micro_version);
529 printf ("*** was found! If pkg-config was correct, then it is best\n");
530 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
531 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
532 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
533 printf("*** required on your system.\n");
534 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
535 printf("*** to point to the correct configuration files\n");
537 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
538 (gtk_minor_version != GTK_MINOR_VERSION) ||
539 (gtk_micro_version != GTK_MICRO_VERSION))
541 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
542 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
543 printf("*** library (version %d.%d.%d)\n",
544 gtk_major_version, gtk_minor_version, gtk_micro_version);
548 if ((gtk_major_version > major) ||
549 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
550 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
556 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
557 gtk_major_version, gtk_minor_version, gtk_micro_version);
558 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
559 major, minor, micro);
560 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
562 printf("*** If you have already installed a sufficiently new version, this error\n");
563 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
564 printf("*** being found. The easiest way to fix this is to remove the old version\n");
565 printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
566 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
567 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
568 printf("*** so that the correct libraries are found at run-time))\n");
573 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
574 CFLAGS="$ac_save_CFLAGS"
578 if test "x$no_gtk" = x ; then
579 AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
580 ifelse([$2], , :, [$2])
583 if test "$PKG_CONFIG" = "no" ; then
584 echo "*** A new enough version of pkg-config was not found."
585 echo "*** See http://pkgconfig.sourceforge.net"
587 if test -f conf.gtktest ; then
590 echo "*** Could not run GTK+ test program, checking why..."
591 CFLAGS="$CFLAGS $GTK_CFLAGS"
592 LIBS="$LIBS $GTK_LIBS"
596 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
597 [ echo "*** The test program compiled, but did not run. This usually means"
598 echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
599 echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
600 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
601 echo "*** to the installed location Also, make sure you have run ldconfig if that"
602 echo "*** is required on your system"
604 echo "*** If you have an old version installed, it is best to remove it, although"
605 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
606 [ echo "*** The test program failed to compile or link. See the file config.log for the"
607 echo "*** exact error that occured. This usually means GTK+ was incorrectly installed"
608 echo "*** or that you have moved GTK+ since it was installed. In the latter case, you"
609 echo "*** may want to edit the pkg-config script: $PKG_CONFIG" ])
610 CFLAGS="$ac_save_CFLAGS"
616 ifelse([$3], , :, [$3])
623 # Configure paths for GTK+
624 # Owen Taylor 97-11-3
626 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
627 dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
629 AC_DEFUN(AM_PATH_GTK,
631 dnl Get the cflags and libraries from the gtk-config script
633 AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
634 gtk_config_prefix="$withval", gtk_config_prefix="")
635 AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
636 gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
637 AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
638 , enable_gtktest=yes)
644 gtk_config_args="$gtk_config_args gthread"
649 if test x$gtk_config_exec_prefix != x ; then
650 gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
651 if test x${GTK_CONFIG+set} != xset ; then
652 GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
655 if test x$gtk_config_prefix != x ; then
656 gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
657 if test x${GTK_CONFIG+set} != xset ; then
658 GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
662 AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
663 min_gtk_version=ifelse([$1], ,0.99.7,$1)
664 AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
666 if test "$GTK_CONFIG" = "no" ; then
669 GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
670 GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
671 gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
672 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
673 gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
674 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
675 gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
676 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
677 if test "x$enable_gtktest" = "xyes" ; then
678 ac_save_CFLAGS="$CFLAGS"
680 CFLAGS="$CFLAGS $GTK_CFLAGS"
681 LIBS="$GTK_LIBS $LIBS"
683 dnl Now check if the installed GTK is sufficiently new. (Also sanity
684 dnl checks the results of gtk-config to some extent
695 int major, minor, micro;
698 system ("touch conf.gtktest");
700 /* HP/UX 9 (%@#!) writes to sscanf strings */
701 tmp_version = g_strdup("$min_gtk_version");
702 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
703 printf("%s, bad version string\n", "$min_gtk_version");
707 if ((gtk_major_version != $gtk_config_major_version) ||
708 (gtk_minor_version != $gtk_config_minor_version) ||
709 (gtk_micro_version != $gtk_config_micro_version))
711 printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
712 $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
713 gtk_major_version, gtk_minor_version, gtk_micro_version);
714 printf ("*** was found! If gtk-config was correct, then it is best\n");
715 printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
716 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
717 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
718 printf("*** required on your system.\n");
719 printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
720 printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
721 printf("*** before re-running configure\n");
723 #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
724 else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
725 (gtk_minor_version != GTK_MINOR_VERSION) ||
726 (gtk_micro_version != GTK_MICRO_VERSION))
728 printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
729 GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
730 printf("*** library (version %d.%d.%d)\n",
731 gtk_major_version, gtk_minor_version, gtk_micro_version);
733 #endif /* defined (GTK_MAJOR_VERSION) ... */
736 if ((gtk_major_version > major) ||
737 ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
738 ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
744 printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
745 gtk_major_version, gtk_minor_version, gtk_micro_version);
746 printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
747 major, minor, micro);
748 printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
750 printf("*** If you have already installed a sufficiently new version, this error\n");
751 printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
752 printf("*** being found. The easiest way to fix this is to remove the old version\n");
753 printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
754 printf("*** correct copy of gtk-config. (In this case, you will have to\n");
755 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
756 printf("*** so that the correct libraries are found at run-time))\n");
761 ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
762 CFLAGS="$ac_save_CFLAGS"
766 if test "x$no_gtk" = x ; then
768 ifelse([$2], , :, [$2])
771 if test "$GTK_CONFIG" = "no" ; then
772 echo "*** The gtk-config script installed by GTK could not be found"
773 echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
774 echo "*** your path, or set the GTK_CONFIG environment variable to the"
775 echo "*** full path to gtk-config."
777 if test -f conf.gtktest ; then
780 echo "*** Could not run GTK test program, checking why..."
781 CFLAGS="$CFLAGS $GTK_CFLAGS"
782 LIBS="$LIBS $GTK_LIBS"
786 ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
787 [ echo "*** The test program compiled, but did not run. This usually means"
788 echo "*** that the run-time linker is not finding GTK or finding the wrong"
789 echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
790 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
791 echo "*** to the installed location Also, make sure you have run ldconfig if that"
792 echo "*** is required on your system"
794 echo "*** If you have an old version installed, it is best to remove it, although"
795 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
797 echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
798 echo "*** came with the system with the command"
800 echo "*** rpm --erase --nodeps gtk gtk-devel" ],
801 [ echo "*** The test program failed to compile or link. See the file config.log for the"
802 echo "*** exact error that occured. This usually means GTK was incorrectly installed"
803 echo "*** or that you have moved GTK since it was installed. In the latter case, you"
804 echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
805 CFLAGS="$ac_save_CFLAGS"
811 ifelse([$3], , :, [$3])