annotate mcabber/macros/missing/glib-2.0.m4 @ 1265:18ef697e706d

Update macros/missing/glib-2.0.m4 Sync with Debian libglib2.0-dev (2.12.12-1) file.
author Mikael Berthe <mikael@lilotux.net>
date Wed, 04 Jul 2007 18:08:35 +0200
parents 7461bc74a201
children
rev   line source
59
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
1 # Configure paths for GLIB
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
2 # Owen Taylor 1997-2001
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
3
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
4 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
5 dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
6 dnl gthread is specified in MODULES, pass to pkg-config
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
7 dnl
73
1fc66b6c08ef [/trunk] Changeset 87 by mikael
mikael
parents: 59
diff changeset
8 AC_DEFUN([AM_PATH_GLIB_2_0],
59
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
9 [dnl
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
10 dnl Get the cflags and libraries from pkg-config
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
11 dnl
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
12 AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
13 , enable_glibtest=yes)
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
14
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
15 pkg_config_args=glib-2.0
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
16 for module in . $4
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
17 do
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
18 case "$module" in
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
19 gmodule)
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
20 pkg_config_args="$pkg_config_args gmodule-2.0"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
21 ;;
1084
7461bc74a201 Move glib-2.0.m4 to macros/missing
Mikael Berthe <mikael@lilotux.net>
parents: 73
diff changeset
22 gmodule-no-export)
7461bc74a201 Move glib-2.0.m4 to macros/missing
Mikael Berthe <mikael@lilotux.net>
parents: 73
diff changeset
23 pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
7461bc74a201 Move glib-2.0.m4 to macros/missing
Mikael Berthe <mikael@lilotux.net>
parents: 73
diff changeset
24 ;;
59
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
25 gobject)
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
26 pkg_config_args="$pkg_config_args gobject-2.0"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
27 ;;
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
28 gthread)
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
29 pkg_config_args="$pkg_config_args gthread-2.0"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
30 ;;
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
31 esac
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
32 done
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
33
1265
18ef697e706d Update macros/missing/glib-2.0.m4
Mikael Berthe <mikael@lilotux.net>
parents: 1084
diff changeset
34 PKG_PROG_PKG_CONFIG([0.7])
59
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
35
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
36 no_glib=""
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
37
1265
18ef697e706d Update macros/missing/glib-2.0.m4
Mikael Berthe <mikael@lilotux.net>
parents: 1084
diff changeset
38 if test "x$PKG_CONFIG" = x ; then
59
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
39 no_glib=yes
1265
18ef697e706d Update macros/missing/glib-2.0.m4
Mikael Berthe <mikael@lilotux.net>
parents: 1084
diff changeset
40 PKG_CONFIG=no
59
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
41 fi
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
42
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
43 min_glib_version=ifelse([$1], ,2.0.0,$1)
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
44 AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
45
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
46 if test x$PKG_CONFIG != xno ; then
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
47 ## don't try to run the test against uninstalled libtool libs
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
48 if $PKG_CONFIG --uninstalled $pkg_config_args; then
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
49 echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
50 enable_glibtest=no
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
51 fi
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
52
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
53 if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
54 :
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
55 else
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
56 no_glib=yes
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
57 fi
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
58 fi
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
59
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
60 if test x"$no_glib" = x ; then
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
61 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
62 GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
63 GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
64
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
65 GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
66 GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
67 glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
68 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
69 glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
70 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
71 glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
72 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
73 if test "x$enable_glibtest" = "xyes" ; then
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
74 ac_save_CFLAGS="$CFLAGS"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
75 ac_save_LIBS="$LIBS"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
76 CFLAGS="$CFLAGS $GLIB_CFLAGS"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
77 LIBS="$GLIB_LIBS $LIBS"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
78 dnl
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
79 dnl Now check if the installed GLIB is sufficiently new. (Also sanity
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
80 dnl checks the results of pkg-config to some extent)
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
81 dnl
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
82 rm -f conf.glibtest
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
83 AC_TRY_RUN([
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
84 #include <glib.h>
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
85 #include <stdio.h>
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
86 #include <stdlib.h>
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
87
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
88 int
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
89 main ()
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
90 {
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
91 int major, minor, micro;
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
92 char *tmp_version;
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
93
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
94 system ("touch conf.glibtest");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
95
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
96 /* HP/UX 9 (%@#!) writes to sscanf strings */
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
97 tmp_version = g_strdup("$min_glib_version");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
98 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
99 printf("%s, bad version string\n", "$min_glib_version");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
100 exit(1);
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
101 }
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
102
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
103 if ((glib_major_version != $glib_config_major_version) ||
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
104 (glib_minor_version != $glib_config_minor_version) ||
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
105 (glib_micro_version != $glib_config_micro_version))
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
106 {
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
107 printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
108 $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
109 glib_major_version, glib_minor_version, glib_micro_version);
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
110 printf ("*** was found! If pkg-config was correct, then it is best\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
111 printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
112 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
113 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
114 printf("*** required on your system.\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
115 printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
116 printf("*** to point to the correct configuration files\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
117 }
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
118 else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
119 (glib_minor_version != GLIB_MINOR_VERSION) ||
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
120 (glib_micro_version != GLIB_MICRO_VERSION))
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
121 {
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
122 printf("*** GLIB header files (version %d.%d.%d) do not match\n",
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
123 GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
124 printf("*** library (version %d.%d.%d)\n",
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
125 glib_major_version, glib_minor_version, glib_micro_version);
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
126 }
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
127 else
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
128 {
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
129 if ((glib_major_version > major) ||
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
130 ((glib_major_version == major) && (glib_minor_version > minor)) ||
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
131 ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
132 {
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
133 return 0;
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
134 }
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
135 else
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
136 {
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
137 printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
138 glib_major_version, glib_minor_version, glib_micro_version);
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
139 printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
140 major, minor, micro);
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
141 printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
142 printf("***\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
143 printf("*** If you have already installed a sufficiently new version, this error\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
144 printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
145 printf("*** being found. The easiest way to fix this is to remove the old version\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
146 printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
147 printf("*** correct copy of pkg-config. (In this case, you will have to\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
148 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
149 printf("*** so that the correct libraries are found at run-time))\n");
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
150 }
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
151 }
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
152 return 1;
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
153 }
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
154 ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
155 CFLAGS="$ac_save_CFLAGS"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
156 LIBS="$ac_save_LIBS"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
157 fi
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
158 fi
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
159 if test "x$no_glib" = x ; then
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
160 AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
161 ifelse([$2], , :, [$2])
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
162 else
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
163 AC_MSG_RESULT(no)
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
164 if test "$PKG_CONFIG" = "no" ; then
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
165 echo "*** A new enough version of pkg-config was not found."
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
166 echo "*** See http://www.freedesktop.org/software/pkgconfig/"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
167 else
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
168 if test -f conf.glibtest ; then
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
169 :
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
170 else
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
171 echo "*** Could not run GLIB test program, checking why..."
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
172 ac_save_CFLAGS="$CFLAGS"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
173 ac_save_LIBS="$LIBS"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
174 CFLAGS="$CFLAGS $GLIB_CFLAGS"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
175 LIBS="$LIBS $GLIB_LIBS"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
176 AC_TRY_LINK([
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
177 #include <glib.h>
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
178 #include <stdio.h>
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
179 ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
180 [ echo "*** The test program compiled, but did not run. This usually means"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
181 echo "*** that the run-time linker is not finding GLIB or finding the wrong"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
182 echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
183 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
184 echo "*** to the installed location Also, make sure you have run ldconfig if that"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
185 echo "*** is required on your system"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
186 echo "***"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
187 echo "*** If you have an old version installed, it is best to remove it, although"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
188 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
189 [ echo "*** The test program failed to compile or link. See the file config.log for the"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
190 echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
191 CFLAGS="$ac_save_CFLAGS"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
192 LIBS="$ac_save_LIBS"
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
193 fi
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
194 fi
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
195 GLIB_CFLAGS=""
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
196 GLIB_LIBS=""
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
197 GLIB_GENMARSHAL=""
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
198 GOBJECT_QUERY=""
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
199 GLIB_MKENUMS=""
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
200 ifelse([$3], , :, [$3])
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
201 fi
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
202 AC_SUBST(GLIB_CFLAGS)
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
203 AC_SUBST(GLIB_LIBS)
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
204 AC_SUBST(GLIB_GENMARSHAL)
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
205 AC_SUBST(GOBJECT_QUERY)
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
206 AC_SUBST(GLIB_MKENUMS)
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
207 rm -f conf.glibtest
35a0a8b8b875 [/trunk] Changeset 74 by mikael
mikael
parents:
diff changeset
208 ])