Mercurial > hg
comparison mcabber/connwrap/aclocal.m4 @ 25:bf3d6e241714
[/trunk] Changeset 41 by mikael
* Add libjabber to trunk. Let the game begin! :-)
author | mikael |
---|---|
date | Sun, 27 Mar 2005 20:18:21 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
24:e88b15cbf2de | 25:bf3d6e241714 |
---|---|
1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6 | |
2 | |
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 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. | |
7 | |
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. | |
12 | |
13 # Do all the work for Automake. This macro actually does too much -- | |
14 # some checks are only needed if your package does certain things. | |
15 # But this isn't really a big deal. | |
16 | |
17 # serial 1 | |
18 | |
19 dnl Usage: | |
20 dnl AM_INIT_AUTOMAKE(package,version, [no-define]) | |
21 | |
22 AC_DEFUN([AM_INIT_AUTOMAKE], | |
23 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl | |
24 AC_REQUIRE([AC_PROG_INSTALL]) | |
25 PACKAGE=[$1] | |
26 AC_SUBST(PACKAGE) | |
27 VERSION=[$2] | |
28 AC_SUBST(VERSION) | |
29 dnl test to see if srcdir already configured | |
30 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then | |
31 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | |
32 fi | |
33 ifelse([$3],, | |
34 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) | |
35 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) | |
36 AC_REQUIRE([AM_SANITY_CHECK]) | |
37 AC_REQUIRE([AC_ARG_PROGRAM]) | |
38 dnl FIXME This is truly gross. | |
39 missing_dir=`cd $ac_aux_dir && pwd` | |
40 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) | |
41 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) | |
42 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) | |
43 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) | |
44 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) | |
45 AC_REQUIRE([AC_PROG_MAKE_SET])]) | |
46 | |
47 # Copyright 2002 Free Software Foundation, Inc. | |
48 | |
49 # This program is free software; you can redistribute it and/or modify | |
50 # it under the terms of the GNU General Public License as published by | |
51 # the Free Software Foundation; either version 2, or (at your option) | |
52 # any later version. | |
53 | |
54 # This program is distributed in the hope that it will be useful, | |
55 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
56 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
57 # GNU General Public License for more details. | |
58 | |
59 # You should have received a copy of the GNU General Public License | |
60 # along with this program; if not, write to the Free Software | |
61 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
62 | |
63 # AM_AUTOMAKE_VERSION(VERSION) | |
64 # ---------------------------- | |
65 # Automake X.Y traces this macro to ensure aclocal.m4 has been | |
66 # generated from the m4 files accompanying Automake X.Y. | |
67 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) | |
68 | |
69 # AM_SET_CURRENT_AUTOMAKE_VERSION | |
70 # ------------------------------- | |
71 # Call AM_AUTOMAKE_VERSION so it can be traced. | |
72 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. | |
73 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], | |
74 [AM_AUTOMAKE_VERSION([1.4-p6])]) | |
75 | |
76 # | |
77 # Check to make sure that the build environment is sane. | |
78 # | |
79 | |
80 AC_DEFUN([AM_SANITY_CHECK], | |
81 [AC_MSG_CHECKING([whether build environment is sane]) | |
82 # Just in case | |
83 sleep 1 | |
84 echo timestamp > conftestfile | |
85 # Do `set' in a subshell so we don't clobber the current shell's | |
86 # arguments. Must try -L first in case configure is actually a | |
87 # symlink; some systems play weird games with the mod time of symlinks | |
88 # (eg FreeBSD returns the mod time of the symlink's containing | |
89 # directory). | |
90 if ( | |
91 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` | |
92 if test "[$]*" = "X"; then | |
93 # -L didn't work. | |
94 set X `ls -t $srcdir/configure conftestfile` | |
95 fi | |
96 if test "[$]*" != "X $srcdir/configure conftestfile" \ | |
97 && test "[$]*" != "X conftestfile $srcdir/configure"; then | |
98 | |
99 # If neither matched, then we have a broken ls. This can happen | |
100 # if, for instance, CONFIG_SHELL is bash and it inherits a | |
101 # broken ls alias from the environment. This has actually | |
102 # happened. Such a system could not be considered "sane". | |
103 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken | |
104 alias in your environment]) | |
105 fi | |
106 | |
107 test "[$]2" = conftestfile | |
108 ) | |
109 then | |
110 # Ok. | |
111 : | |
112 else | |
113 AC_MSG_ERROR([newly created file is older than distributed files! | |
114 Check your system clock]) | |
115 fi | |
116 rm -f conftest* | |
117 AC_MSG_RESULT(yes)]) | |
118 | |
119 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) | |
120 dnl The program must properly implement --version. | |
121 AC_DEFUN([AM_MISSING_PROG], | |
122 [AC_MSG_CHECKING(for working $2) | |
123 # Run test in a subshell; some versions of sh will print an error if | |
124 # an executable is not found, even if stderr is redirected. | |
125 # Redirect stdin to placate older versions of autoconf. Sigh. | |
126 if ($2 --version) < /dev/null > /dev/null 2>&1; then | |
127 $1=$2 | |
128 AC_MSG_RESULT(found) | |
129 else | |
130 $1="$3/missing $2" | |
131 AC_MSG_RESULT(missing) | |
132 fi | |
133 AC_SUBST($1)]) | |
134 | |
135 dnl Autoconf macros for libgnutls-extra | |
136 dnl $id$ | |
137 | |
138 # Modified for LIBGNUTLS_EXTRA -- nmav | |
139 # Configure paths for LIBGCRYPT | |
140 # Shamelessly stolen from the one of XDELTA by Owen Taylor | |
141 # Werner Koch 99-12-09 | |
142 | |
143 dnl AM_PATH_LIBGNUTLS_EXTRA([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) | |
144 dnl Test for libgnutls-extra, and define LIBGNUTLS_EXTRA_CFLAGS and LIBGNUTLS_EXTRA_LIBS | |
145 dnl | |
146 AC_DEFUN(AM_PATH_LIBGNUTLS_EXTRA, | |
147 [dnl | |
148 dnl Get the cflags and libraries from the libgnutls-extra-config script | |
149 dnl | |
150 AC_ARG_WITH(libgnutls-extra-prefix, | |
151 [ --with-libgnutls-extra-prefix=PFX Prefix where libgnutls-extra is installed (optional)], | |
152 libgnutls_extra_config_prefix="$withval", libgnutls_extra_config_prefix="") | |
153 | |
154 if test x$libgnutls_extra_config_prefix != x ; then | |
155 libgnutls_extra_config_args="$libgnutls_extra_config_args --prefix=$libgnutls_extra_config_prefix" | |
156 if test x${LIBGNUTLS_EXTRA_CONFIG+set} != xset ; then | |
157 LIBGNUTLS_EXTRA_CONFIG=$libgnutls_extra_config_prefix/bin/libgnutls-extra-config | |
158 fi | |
159 fi | |
160 | |
161 AC_PATH_PROG(LIBGNUTLS_EXTRA_CONFIG, libgnutls-extra-config, no) | |
162 min_libgnutls_version=ifelse([$1], ,0.1.0,$1) | |
163 AC_MSG_CHECKING(for libgnutls - version >= $min_libgnutls_version) | |
164 no_libgnutls="" | |
165 if test "$LIBGNUTLS_EXTRA_CONFIG" = "no" ; then | |
166 no_libgnutls=yes | |
167 else | |
168 LIBGNUTLS_EXTRA_CFLAGS=`$LIBGNUTLS_EXTRA_CONFIG $libgnutls_extra_config_args --cflags` | |
169 LIBGNUTLS_EXTRA_LIBS=`$LIBGNUTLS_EXTRA_CONFIG $libgnutls_extra_config_args --libs` | |
170 libgnutls_extra_config_version=`$LIBGNUTLS_EXTRA_CONFIG $libgnutls_extra_config_args --version` | |
171 | |
172 | |
173 ac_save_CFLAGS="$CFLAGS" | |
174 ac_save_LIBS="$LIBS" | |
175 CFLAGS="$CFLAGS $LIBGNUTLS_EXTRA_CFLAGS" | |
176 LIBS="$LIBS $LIBGNUTLS_EXTRA_LIBS" | |
177 dnl | |
178 dnl Now check if the installed libgnutls is sufficiently new. Also sanity | |
179 dnl checks the results of libgnutls-extra-config to some extent | |
180 dnl | |
181 rm -f conf.libgnutlstest | |
182 AC_TRY_RUN([ | |
183 #include <stdio.h> | |
184 #include <stdlib.h> | |
185 #include <string.h> | |
186 #include <gnutls/extra.h> | |
187 | |
188 int | |
189 main () | |
190 { | |
191 system ("touch conf.libgnutlstest"); | |
192 | |
193 if( strcmp( gnutls_extra_check_version(NULL), "$libgnutls_extra_config_version" ) ) | |
194 { | |
195 printf("\n*** 'libgnutls-extra-config --version' returned %s, but LIBGNUTLS_EXTRA (%s)\n", | |
196 "$libgnutls_extra_config_version", gnutls_extra_check_version(NULL) ); | |
197 printf("*** was found! If libgnutls-extra-config was correct, then it is best\n"); | |
198 printf("*** to remove the old version of LIBGNUTLS_EXTRA. You may also be able to fix the error\n"); | |
199 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); | |
200 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); | |
201 printf("*** required on your system.\n"); | |
202 printf("*** If libgnutls-extra-config was wrong, set the environment variable LIBGNUTLS_EXTRA_CONFIG\n"); | |
203 printf("*** to point to the correct copy of libgnutls-extra-config, and remove the file config.cache\n"); | |
204 printf("*** before re-running configure\n"); | |
205 } | |
206 else if ( strcmp(gnutls_extra_check_version(NULL), LIBGNUTLS_EXTRA_VERSION ) ) | |
207 { | |
208 printf("\n*** LIBGNUTLS_EXTRA header file (version %s) does not match\n", LIBGNUTLS_EXTRA_VERSION); | |
209 printf("*** library (version %s). This is may be due to a different version of gnutls\n", gnutls_extra_check_version(NULL) ); | |
210 printf("*** and gnutls-extra.\n"); | |
211 } | |
212 else | |
213 { | |
214 if ( gnutls_extra_check_version( "$min_libgnutls_version" ) ) | |
215 { | |
216 return 0; | |
217 } | |
218 else | |
219 { | |
220 printf("no\n*** An old version of LIBGNUTLS_EXTRA (%s) was found.\n", | |
221 gnutls_extra_check_version(NULL) ); | |
222 printf("*** You need a version of LIBGNUTLS_EXTRA newer than %s. The latest version of\n", | |
223 "$min_libgnutls_version" ); | |
224 printf("*** LIBGNUTLS_EXTRA is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n"); | |
225 printf("*** \n"); | |
226 printf("*** If you have already installed a sufficiently new version, this error\n"); | |
227 printf("*** probably means that the wrong copy of the libgnutls-extra-config shell script is\n"); | |
228 printf("*** being found. The easiest way to fix this is to remove the old version\n"); | |
229 printf("*** of LIBGNUTLS_EXTRA, but you can also set the LIBGNUTLS_EXTRA_CONFIG environment to point to the\n"); | |
230 printf("*** correct copy of libgnutls-extra-config. (In this case, you will have to\n"); | |
231 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); | |
232 printf("*** so that the correct libraries are found at run-time))\n"); | |
233 } | |
234 } | |
235 return 1; | |
236 } | |
237 ],, no_libgnutls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | |
238 CFLAGS="$ac_save_CFLAGS" | |
239 LIBS="$ac_save_LIBS" | |
240 fi | |
241 | |
242 if test "x$no_libgnutls" = x ; then | |
243 AC_MSG_RESULT(yes) | |
244 ifelse([$2], , :, [$2]) | |
245 else | |
246 if test -f conf.libgnutlstest ; then | |
247 : | |
248 else | |
249 AC_MSG_RESULT(no) | |
250 fi | |
251 if test "$LIBGNUTLS_EXTRA_CONFIG" = "no" ; then | |
252 echo "*** The libgnutls-extra-config script installed by LIBGNUTLS_EXTRA could not be found" | |
253 echo "*** If LIBGNUTLS_EXTRA was installed in PREFIX, make sure PREFIX/bin is in" | |
254 echo "*** your path, or set the LIBGNUTLS_EXTRA_CONFIG environment variable to the" | |
255 echo "*** full path to libgnutls-extra-config." | |
256 else | |
257 if test -f conf.libgnutlstest ; then | |
258 : | |
259 else | |
260 echo "*** Could not run libgnutls test program, checking why..." | |
261 CFLAGS="$CFLAGS $LIBGNUTLS_EXTRA_CFLAGS" | |
262 LIBS="$LIBS $LIBGNUTLS_EXTRA_LIBS" | |
263 AC_TRY_LINK([ | |
264 #include <stdio.h> | |
265 #include <stdlib.h> | |
266 #include <string.h> | |
267 #include <gnutls/extra.h> | |
268 ], [ return !!gnutls_extra_check_version(NULL); ], | |
269 [ echo "*** The test program compiled, but did not run. This usually means" | |
270 echo "*** that the run-time linker is not finding LIBGNUTLS_EXTRA or finding the wrong" | |
271 echo "*** version of LIBGNUTLS_EXTRA. If it is not finding LIBGNUTLS_EXTRA, you'll need to set your" | |
272 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | |
273 echo "*** to the installed location Also, make sure you have run ldconfig if that" | |
274 echo "*** is required on your system" | |
275 echo "***" | |
276 echo "*** If you have an old version installed, it is best to remove it, although" | |
277 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" | |
278 echo "***" ], | |
279 [ echo "*** The test program failed to compile or link. See the file config.log for the" | |
280 echo "*** exact error that occured. This usually means LIBGNUTLS_EXTRA was incorrectly installed" | |
281 echo "*** or that you have moved LIBGNUTLS_EXTRA since it was installed. In the latter case, you" | |
282 echo "*** may want to edit the libgnutls-extra-config script: $LIBGNUTLS_EXTRA_CONFIG" ]) | |
283 CFLAGS="$ac_save_CFLAGS" | |
284 LIBS="$ac_save_LIBS" | |
285 fi | |
286 fi | |
287 LIBGNUTLS_EXTRA_CFLAGS="" | |
288 LIBGNUTLS_EXTRA_LIBS="" | |
289 ifelse([$3], , :, [$3]) | |
290 fi | |
291 rm -f conf.libgnutlstest | |
292 AC_SUBST(LIBGNUTLS_EXTRA_CFLAGS) | |
293 AC_SUBST(LIBGNUTLS_EXTRA_LIBS) | |
294 ]) | |
295 | |
296 dnl *-*wedit:notab*-* Please keep this as the last line. | |
297 |