Mercurial > SDL_sound_CoreAudio
comparison acinclude.m4 @ 497:0b244f36049e
Trimmed a bunch of junk out of the build system, and now it works on Mac
OS X again.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 06 Dec 2005 11:44:29 +0000 |
parents | 75819e5c59d4 |
children |
comparison
equal
deleted
inserted
replaced
496:67d785044411 | 497:0b244f36049e |
---|---|
1 # Configure paths for SDL | |
2 # Sam Lantinga 9/21/99 | |
3 # stolen from Manish Singh | |
4 # stolen back from Frank Belew | |
5 # stolen from Manish Singh | |
6 # Shamelessly stolen from Owen Taylor | |
7 | |
8 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) | 1 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) |
9 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS | 2 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS |
10 dnl | 3 dnl |
11 AC_DEFUN(AM_PATH_SDL, | 4 AC_DEFUN([AM_PATH_SDL], |
12 [dnl | 5 [dnl |
13 dnl Get the cflags and libraries from the sdl-config script | 6 dnl Get the cflags and libraries from the sdl-config script |
14 dnl | 7 dnl |
15 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], | 8 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)], |
16 sdl_prefix="$withval", sdl_prefix="") | 9 sdl_prefix="$withval", sdl_prefix="") |
30 if test x${SDL_CONFIG+set} != xset ; then | 23 if test x${SDL_CONFIG+set} != xset ; then |
31 SDL_CONFIG=$sdl_prefix/bin/sdl-config | 24 SDL_CONFIG=$sdl_prefix/bin/sdl-config |
32 fi | 25 fi |
33 fi | 26 fi |
34 | 27 |
35 AC_PATH_PROG(SDL_CONFIG, sdl-config, no) | 28 AC_REQUIRE([AC_CANONICAL_TARGET]) |
29 PATH="$prefix/bin:$prefix/usr/bin:$PATH" | |
30 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH]) | |
36 min_sdl_version=ifelse([$1], ,0.11.0,$1) | 31 min_sdl_version=ifelse([$1], ,0.11.0,$1) |
37 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) | 32 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version) |
38 no_sdl="" | 33 no_sdl="" |
39 if test "$SDL_CONFIG" = "no" ; then | 34 if test "$SDL_CONFIG" = "no" ; then |
40 no_sdl=yes | 35 no_sdl=yes |
48 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | 43 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
49 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ | 44 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \ |
50 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | 45 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
51 if test "x$enable_sdltest" = "xyes" ; then | 46 if test "x$enable_sdltest" = "xyes" ; then |
52 ac_save_CFLAGS="$CFLAGS" | 47 ac_save_CFLAGS="$CFLAGS" |
48 ac_save_CXXFLAGS="$CXXFLAGS" | |
53 ac_save_LIBS="$LIBS" | 49 ac_save_LIBS="$LIBS" |
54 CFLAGS="$CFLAGS $SDL_CFLAGS" | 50 CFLAGS="$CFLAGS $SDL_CFLAGS" |
51 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" | |
55 LIBS="$LIBS $SDL_LIBS" | 52 LIBS="$LIBS $SDL_LIBS" |
56 dnl | 53 dnl |
57 dnl Now check if the installed SDL is sufficiently new. (Also sanity | 54 dnl Now check if the installed SDL is sufficiently new. (Also sanity |
58 dnl checks the results of sdl-config to some extent | 55 dnl checks the results of sdl-config to some extent |
59 dnl | 56 dnl |
134 if test -f conf.sdltest ; then | 131 if test -f conf.sdltest ; then |
135 : | 132 : |
136 else | 133 else |
137 echo "*** Could not run SDL test program, checking why..." | 134 echo "*** Could not run SDL test program, checking why..." |
138 CFLAGS="$CFLAGS $SDL_CFLAGS" | 135 CFLAGS="$CFLAGS $SDL_CFLAGS" |
136 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" | |
139 LIBS="$LIBS $SDL_LIBS" | 137 LIBS="$LIBS $SDL_LIBS" |
140 AC_TRY_LINK([ | 138 AC_TRY_LINK([ |
141 #include <stdio.h> | 139 #include <stdio.h> |
142 #include "SDL.h" | 140 #include "SDL.h" |
143 | 141 |
158 [ echo "*** The test program failed to compile or link. See the file config.log for the" | 156 [ echo "*** The test program failed to compile or link. See the file config.log for the" |
159 echo "*** exact error that occured. This usually means SDL was incorrectly installed" | 157 echo "*** exact error that occured. This usually means SDL was incorrectly installed" |
160 echo "*** or that you have moved SDL since it was installed. In the latter case, you" | 158 echo "*** or that you have moved SDL since it was installed. In the latter case, you" |
161 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) | 159 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ]) |
162 CFLAGS="$ac_save_CFLAGS" | 160 CFLAGS="$ac_save_CFLAGS" |
161 CXXFLAGS="$ac_save_CXXFLAGS" | |
163 LIBS="$ac_save_LIBS" | 162 LIBS="$ac_save_LIBS" |
164 fi | 163 fi |
165 fi | 164 fi |
166 SDL_CFLAGS="" | 165 SDL_CFLAGS="" |
166 SDL_CXXFLAGS="" | |
167 SDL_LIBS="" | 167 SDL_LIBS="" |
168 ifelse([$3], , :, [$3]) | 168 ifelse([$3], , :, [$3]) |
169 fi | 169 fi |
170 AC_SUBST(SDL_CFLAGS) | 170 AC_SUBST(SDL_CFLAGS) |
171 AC_SUBST(SDL_LIBS) | 171 AC_SUBST(SDL_LIBS) |
172 rm -f conf.sdltest | 172 rm -f conf.sdltest |
173 ]) | 173 ]) |
174 # Configure paths for libmikmod | |
175 # | |
176 # Derived from glib.m4 (Owen Taylor 97-11-3) | |
177 # Improved by Chris Butler | |
178 # | |
179 | |
180 dnl AM_PATH_LIBMIKMOD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) | |
181 dnl Test for libmikmod, and define LIBMIKMOD_CFLAGS, LIBMIKMOD_LIBS and | |
182 dnl LIBMIKMOD_LDADD | |
183 dnl | |
184 AC_DEFUN(AM_PATH_LIBMIKMOD, | |
185 [dnl | |
186 dnl Get the cflags and libraries from the libmikmod-config script | |
187 dnl | |
188 AC_ARG_WITH(libmikmod-prefix,[ --with-libmikmod-prefix=PFX Prefix where libmikmod is installed (optional)], | |
189 libmikmod_config_prefix="$withval", libmikmod_config_prefix="") | |
190 AC_ARG_WITH(libmikmod-exec-prefix,[ --with-libmikmod-exec-prefix=PFX Exec prefix where libmikmod is installed (optional)], | |
191 libmikmod_config_exec_prefix="$withval", libmikmod_config_exec_prefix="") | |
192 AC_ARG_ENABLE(libmikmodtest, [ --disable-libmikmodtest Do not try to compile and run a test libmikmod program], | |
193 , enable_libmikmodtest=yes) | |
194 | |
195 if test x$libmikmod_config_exec_prefix != x ; then | |
196 libmikmod_config_args="$libmikmod_config_args --exec-prefix=$libmikmod_config_exec_prefix" | |
197 if test x${LIBMIKMOD_CONFIG+set} != xset ; then | |
198 LIBMIKMOD_CONFIG=$libmikmod_config_exec_prefix/bin/libmikmod-config | |
199 fi | |
200 fi | |
201 if test x$libmikmod_config_prefix != x ; then | |
202 libmikmod_config_args="$libmikmod_config_args --prefix=$libmikmod_config_prefix" | |
203 if test x${LIBMIKMOD_CONFIG+set} != xset ; then | |
204 LIBMIKMOD_CONFIG=$libmikmod_config_prefix/bin/libmikmod-config | |
205 fi | |
206 fi | |
207 | |
208 AC_PATH_PROG(LIBMIKMOD_CONFIG, libmikmod-config, no) | |
209 min_libmikmod_version=ifelse([$1], ,3.1.5,$1) | |
210 AC_MSG_CHECKING(for libmikmod - version >= $min_libmikmod_version) | |
211 no_libmikmod="" | |
212 if test "$LIBMIKMOD_CONFIG" = "no" ; then | |
213 no_libmikmod=yes | |
214 else | |
215 LIBMIKMOD_CFLAGS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --cflags` | |
216 LIBMIKMOD_LIBS=`$LIBMIKMOD_CONFIG $libmikmod_config_args --libs` | |
217 LIBMIKMOD_LDADD=`$LIBMIKMOD_CONFIG $libmikmod_config_args --ldadd` | |
218 libmikmod_config_major_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \ | |
219 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'` | |
220 libmikmod_config_minor_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \ | |
221 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'` | |
222 libmikmod_config_micro_version=`$LIBMIKMOD_CONFIG $libmikmod_config_args --version | \ | |
223 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'` | |
224 if test "x$enable_libmikmodtest" = "xyes" ; then | |
225 ac_save_CFLAGS="$CFLAGS" | |
226 ac_save_LIBS="$LIBS" | |
227 AC_LANG_SAVE | |
228 AC_LANG_C | |
229 CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS $LIBMIKMOD_LDADD" | |
230 LIBS="$LIBMIKMOD_LIBS $LIBS" | |
231 dnl | |
232 dnl Now check if the installed libmikmod is sufficiently new. (Also sanity | |
233 dnl checks the results of libmikmod-config to some extent | |
234 dnl | |
235 rm -f conf.mikmodtest | |
236 AC_TRY_RUN([ | |
237 #include <mikmod.h> | |
238 #include <stdio.h> | |
239 #include <stdlib.h> | |
240 | |
241 char* my_strdup (char *str) | |
242 { | |
243 char *new_str; | |
244 | |
245 if (str) { | |
246 new_str = malloc ((strlen (str) + 1) * sizeof(char)); | |
247 strcpy (new_str, str); | |
248 } else | |
249 new_str = NULL; | |
250 | |
251 return new_str; | |
252 } | |
253 | |
254 int main() | |
255 { | |
256 int major,minor,micro; | |
257 int libmikmod_major_version,libmikmod_minor_version,libmikmod_micro_version; | |
258 char *tmp_version; | |
259 | |
260 system("touch conf.mikmodtest"); | |
261 | |
262 /* HP/UX 9 (%@#!) writes to sscanf strings */ | |
263 tmp_version = my_strdup("$min_libmikmod_version"); | |
264 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | |
265 printf("%s, bad version string\n", "$min_libmikmod_version"); | |
266 exit(1); | |
267 } | |
268 | |
269 libmikmod_major_version=(MikMod_GetVersion() >> 16) & 255; | |
270 libmikmod_minor_version=(MikMod_GetVersion() >> 8) & 255; | |
271 libmikmod_micro_version=(MikMod_GetVersion() ) & 255; | |
272 | |
273 if ((libmikmod_major_version != $libmikmod_config_major_version) || | |
274 (libmikmod_minor_version != $libmikmod_config_minor_version) || | |
275 (libmikmod_micro_version != $libmikmod_config_micro_version)) | |
276 { | |
277 printf("\n*** 'libmikmod-config --version' returned %d.%d.%d, but libmikmod (%d.%d.%d)\n", | |
278 $libmikmod_config_major_version, $libmikmod_config_minor_version, $libmikmod_config_micro_version, | |
279 libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version); | |
280 printf ("*** was found! If libmikmod-config was correct, then it is best\n"); | |
281 printf ("*** to remove the old version of libmikmod. You may also be able to fix the error\n"); | |
282 printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); | |
283 printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); | |
284 printf("*** required on your system.\n"); | |
285 printf("*** If libmikmod-config was wrong, set the environment variable LIBMIKMOD_CONFIG\n"); | |
286 printf("*** to point to the correct copy of libmikmod-config, and remove the file config.cache\n"); | |
287 printf("*** before re-running configure\n"); | |
288 } | |
289 else if ((libmikmod_major_version != LIBMIKMOD_VERSION_MAJOR) || | |
290 (libmikmod_minor_version != LIBMIKMOD_VERSION_MINOR) || | |
291 (libmikmod_micro_version != LIBMIKMOD_REVISION)) | |
292 { | |
293 printf("*** libmikmod header files (version %d.%d.%d) do not match\n", | |
294 LIBMIKMOD_VERSION_MAJOR, LIBMIKMOD_VERSION_MINOR, LIBMIKMOD_REVISION); | |
295 printf("*** library (version %d.%d.%d)\n", | |
296 libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version); | |
297 } | |
298 else | |
299 { | |
300 if ((libmikmod_major_version > major) || | |
301 ((libmikmod_major_version == major) && (libmikmod_minor_version > minor)) || | |
302 ((libmikmod_major_version == major) && (libmikmod_minor_version == minor) && (libmikmod_micro_version >= micro))) | |
303 { | |
304 return 0; | |
305 } | |
306 else | |
307 { | |
308 printf("\n*** An old version of libmikmod (%d.%d.%d) was found.\n", | |
309 libmikmod_major_version, libmikmod_minor_version, libmikmod_micro_version); | |
310 printf("*** You need a version of libmikmod newer than %d.%d.%d.\n", | |
311 major, minor, micro); | |
312 printf("***\n"); | |
313 printf("*** If you have already installed a sufficiently new version, this error\n"); | |
314 printf("*** probably means that the wrong copy of the libmikmod-config shell script is\n"); | |
315 printf("*** being found. The easiest way to fix this is to remove the old version\n"); | |
316 printf("*** of libmikmod, but you can also set the LIBMIKMOD_CONFIG environment to point to the\n"); | |
317 printf("*** correct copy of libmikmod-config. (In this case, you will have to\n"); | |
318 printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); | |
319 printf("*** so that the correct libraries are found at run-time))\n"); | |
320 } | |
321 } | |
322 return 1; | |
323 } | |
324 ],, no_libmikmod=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | |
325 CFLAGS="$ac_save_CFLAGS" | |
326 LIBS="$ac_save_LIBS" | |
327 AC_LANG_RESTORE | |
328 fi | |
329 fi | |
330 if test "x$no_libmikmod" = x ; then | |
331 AC_MSG_RESULT([yes, `$LIBMIKMOD_CONFIG --version`]) | |
332 ifelse([$2], , :, [$2]) | |
333 else | |
334 AC_MSG_RESULT(no) | |
335 if test "$LIBMIKMOD_CONFIG" = "no" ; then | |
336 echo "*** The libmikmod-config script installed by libmikmod could not be found" | |
337 echo "*** If libmikmod was installed in PREFIX, make sure PREFIX/bin is in" | |
338 echo "*** your path, or set the LIBMIKMOD_CONFIG environment variable to the" | |
339 echo "*** full path to libmikmod-config." | |
340 else | |
341 if test -f conf.mikmodtest ; then | |
342 : | |
343 else | |
344 echo "*** Could not run libmikmod test program, checking why..." | |
345 CFLAGS="$CFLAGS $LIBMIKMOD_CFLAGS" | |
346 LIBS="$LIBS $LIBMIKMOD_LIBS" | |
347 AC_LANG_SAVE | |
348 AC_LANG_C | |
349 AC_TRY_LINK([ | |
350 #include <mikmod.h> | |
351 #include <stdio.h> | |
352 ], [ return (MikMod_GetVersion()!=0); ], | |
353 [ echo "*** The test program compiled, but did not run. This usually means" | |
354 echo "*** that the run-time linker is not finding libmikmod or finding the wrong" | |
355 echo "*** version of libmikmod. If it is not finding libmikmod, you'll need to set your" | |
356 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | |
357 echo "*** to the installed location. Also, make sure you have run ldconfig if that" | |
358 echo "*** is required on your system." | |
359 echo "***" | |
360 echo "*** If you have an old version installed, it is best to remove it, although" | |
361 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], | |
362 [ echo "*** The test program failed to compile or link. See the file config.log for the" | |
363 echo "*** exact error that occured. This usually means libmikmod was incorrectly installed" | |
364 echo "*** or that you have moved libmikmod since it was installed. In the latter case, you" | |
365 echo "*** may want to edit the libmikmod-config script: $LIBMIKMOD_CONFIG" ]) | |
366 CFLAGS="$ac_save_CFLAGS" | |
367 LIBS="$ac_save_LIBS" | |
368 AC_LANG_RESTORE | |
369 fi | |
370 fi | |
371 LIBMIKMOD_CFLAGS="" | |
372 LIBMIKMOD_LIBS="" | |
373 LIBMIKMOD_LDADD="" | |
374 ifelse([$3], , :, [$3]) | |
375 fi | |
376 AC_SUBST(LIBMIKMOD_CFLAGS) | |
377 AC_SUBST(LIBMIKMOD_LIBS) | |
378 AC_SUBST(LIBMIKMOD_LDADD) | |
379 rm -f conf.mikmodtest | |
380 ]) | |
381 # Configure paths for libvorbis | |
382 # Jack Moffitt <jack@icecast.org> 10-21-2000 | |
383 # Shamelessly stolen from Owen Taylor and Manish Singh | |
384 | |
385 dnl AM_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) | |
386 dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS | |
387 dnl | |
388 AC_DEFUN(AM_PATH_VORBIS, | |
389 [dnl | |
390 dnl Get the cflags and libraries | |
391 dnl | |
392 AC_ARG_WITH(vorbis-prefix,[ --with-vorbis-prefix=PFX Prefix where libvorbis is installed (optional)], vorbis_prefix="$withval", vorbis_prefix="") | |
393 AC_ARG_ENABLE(vorbistest, [ --disable-vorbistest Do not try to compile and run a test Vorbis program],, enable_vorbistest=yes) | |
394 | |
395 if test x$vorbis_prefix != x ; then | |
396 vorbis_args="$vorbis_args --prefix=$vorbis_prefix" | |
397 VORBIS_CFLAGS="-I$vorbis_prefix/include" | |
398 VORBIS_LIBDIR="-L$vorbis_prefix/lib" | |
399 fi | |
400 | |
401 VORBIS_LIBS="$VORBIS_LIBDIR -lvorbis -lm" | |
402 VORBISFILE_LIBS="-lvorbisfile" | |
403 VORBISENC_LIBS="-lvorbisenc" | |
404 | |
405 AC_MSG_CHECKING(for Vorbis) | |
406 no_vorbis="" | |
407 | |
408 | |
409 if test "x$enable_vorbistest" = "xyes" ; then | |
410 ac_save_CFLAGS="$CFLAGS" | |
411 ac_save_LIBS="$LIBS" | |
412 CFLAGS="$CFLAGS $VORBIS_CFLAGS" | |
413 LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS" | |
414 dnl | |
415 dnl Now check if the installed Vorbis is sufficiently new. | |
416 dnl | |
417 rm -f conf.vorbistest | |
418 AC_TRY_RUN([ | |
419 #include <stdio.h> | |
420 #include <stdlib.h> | |
421 #include <string.h> | |
422 #include <vorbis/codec.h> | |
423 | |
424 int main () | |
425 { | |
426 system("touch conf.vorbistest"); | |
427 return 0; | |
428 } | |
429 | |
430 ],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | |
431 CFLAGS="$ac_save_CFLAGS" | |
432 LIBS="$ac_save_LIBS" | |
433 fi | |
434 | |
435 if test "x$no_vorbis" = x ; then | |
436 AC_MSG_RESULT(yes) | |
437 ifelse([$1], , :, [$1]) | |
438 else | |
439 AC_MSG_RESULT(no) | |
440 if test -f conf.vorbistest ; then | |
441 : | |
442 else | |
443 echo "*** Could not run Vorbis test program, checking why..." | |
444 CFLAGS="$CFLAGS $VORBIS_CFLAGS" | |
445 LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS" | |
446 AC_TRY_LINK([ | |
447 #include <stdio.h> | |
448 #include <vorbis/codec.h> | |
449 ], [ return 0; ], | |
450 [ echo "*** The test program compiled, but did not run. This usually means" | |
451 echo "*** that the run-time linker is not finding Vorbis or finding the wrong" | |
452 echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your" | |
453 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | |
454 echo "*** to the installed location Also, make sure you have run ldconfig if that" | |
455 echo "*** is required on your system" | |
456 echo "***" | |
457 echo "*** If you have an old version installed, it is best to remove it, although" | |
458 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], | |
459 [ echo "*** The test program failed to compile or link. See the file config.log for the" | |
460 echo "*** exact error that occured. This usually means Vorbis was incorrectly installed" | |
461 echo "*** or that you have moved Vorbis since it was installed." ]) | |
462 CFLAGS="$ac_save_CFLAGS" | |
463 LIBS="$ac_save_LIBS" | |
464 fi | |
465 VORBIS_CFLAGS="" | |
466 VORBIS_LIBS="" | |
467 VORBISFILE_LIBS="" | |
468 VORBISENC_LIBS="" | |
469 ifelse([$2], , :, [$2]) | |
470 fi | |
471 AC_SUBST(VORBIS_CFLAGS) | |
472 AC_SUBST(VORBIS_LIBS) | |
473 AC_SUBST(VORBISFILE_LIBS) | |
474 AC_SUBST(VORBISENC_LIBS) | |
475 rm -f conf.vorbistest | |
476 ]) | |
477 # Configure paths for SMPEG | |
478 # Nicolas Vignal 11/19/2000 | |
479 # stolen from Sam Lantinga | |
480 # stolen from Manish Singh | |
481 # stolen back from Frank Belew | |
482 # stolen from Manish Singh | |
483 # Shamelessly stolen from Owen Taylor | |
484 | |
485 dnl AM_PATH_SMPEG([MINIMUM-VERSION, [ACTION-IF-FOUND [, | |
486 ACTION-IF-NOT-FOUND]]]) | |
487 dnl Test for SMPEG, and define SMPEG_CFLAGS and SMPEG_LIBS | |
488 dnl | |
489 AC_DEFUN(AM_PATH_SMPEG, | |
490 [dnl | |
491 dnl Get the cflags and libraries from the smpeg-config script | |
492 dnl | |
493 AC_ARG_WITH(smpeg-prefix,[ --with-smpeg-prefix=PFX Prefix where SMPEG is | |
494 installed (optional)], | |
495 smpeg_prefix="$withval", smpeg_prefix="") | |
496 AC_ARG_WITH(smpeg-exec-prefix,[ --with-smpeg-exec-prefix=PFX Exec prefix | |
497 where SMPEG is installed (optional)], | |
498 smpeg_exec_prefix="$withval", smpeg_exec_prefix="") | |
499 AC_ARG_ENABLE(smpegtest, [ --disable-smpegtest Do not try to compile | |
500 and run a test SMPEG program], | |
501 , enable_smpegtest=yes) | |
502 | |
503 if test x$smpeg_exec_prefix != x ; then | |
504 smpeg_args="$smpeg_args --exec-prefix=$smpeg_exec_prefix" | |
505 if test x${SMPEG_CONFIG+set} != xset ; then | |
506 SMPEG_CONFIG=$smpeg_exec_prefix/bin/smpeg-config | |
507 fi | |
508 fi | |
509 if test x$smpeg_prefix != x ; then | |
510 smpeg_args="$smpeg_args --prefix=$smpeg_prefix" | |
511 if test x${SMPEG_CONFIG+set} != xset ; then | |
512 SMPEG_CONFIG=$smpeg_prefix/bin/smpeg-config | |
513 fi | |
514 fi | |
515 | |
516 AC_PATH_PROG(SMPEG_CONFIG, smpeg-config, no) | |
517 min_smpeg_version=ifelse([$1], ,0.2.7,$1) | |
518 AC_MSG_CHECKING(for SMPEG - version >= $min_smpeg_version) | |
519 no_smpeg="" | |
520 if test "$SMPEG_CONFIG" = "no" ; then | |
521 no_smpeg=yes | |
522 else | |
523 SMPEG_CFLAGS=`$SMPEG_CONFIG $smpegconf_args --cflags` | |
524 SMPEG_LIBS=`$SMPEG_CONFIG $smpegconf_args --libs` | |
525 | |
526 smpeg_major_version=`$SMPEG_CONFIG $smpeg_args --version | \ | |
527 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | |
528 smpeg_minor_version=`$SMPEG_CONFIG $smpeg_args --version | \ | |
529 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | |
530 smpeg_micro_version=`$SMPEG_CONFIG $smpeg_config_args --version | \ | |
531 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | |
532 if test "x$enable_smpegtest" = "xyes" ; then | |
533 ac_save_CFLAGS="$CFLAGS" | |
534 ac_save_LIBS="$LIBS" | |
535 CFLAGS="$CFLAGS $SMPEG_CFLAGS $SDL_CFLAGS" | |
536 LIBS="$LIBS $SMPEG_LIBS $SDL_LIBS" | |
537 dnl | |
538 dnl Now check if the installed SMPEG is sufficiently new. (Also sanity | |
539 dnl checks the results of smpeg-config to some extent | |
540 dnl | |
541 rm -f conf.smpegtest | |
542 AC_TRY_RUN([ | |
543 #include <stdio.h> | |
544 #include <stdlib.h> | |
545 #include <string.h> | |
546 #include "smpeg.h" | |
547 | |
548 char* | |
549 my_strdup (char *str) | |
550 { | |
551 char *new_str; | |
552 | |
553 if (str) | |
554 { | |
555 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char)); | |
556 strcpy (new_str, str); | |
557 } | |
558 else | |
559 new_str = NULL; | |
560 | |
561 return new_str; | |
562 } | |
563 | |
564 int main (int argc, char *argv[]) | |
565 { | |
566 int major, minor, micro; | |
567 char *tmp_version; | |
568 | |
569 /* This hangs on some systems (?) | |
570 system ("touch conf.smpegtest"); | |
571 */ | |
572 { FILE *fp = fopen("conf.smpegtest", "a"); if ( fp ) fclose(fp); } | |
573 | |
574 /* HP/UX 9 (%@#!) writes to sscanf strings */ | |
575 tmp_version = my_strdup("$min_smpeg_version"); | |
576 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | |
577 printf("%s, bad version string\n", "$min_smpeg_version"); | |
578 exit(1); | |
579 } | |
580 | |
581 if (($smpeg_major_version > major) || | |
582 (($smpeg_major_version == major) && ($smpeg_minor_version > minor)) || | |
583 (($smpeg_major_version == major) && ($smpeg_minor_version == minor) && | |
584 ($smpeg_micro_version >= micro))) | |
585 { | |
586 return 0; | |
587 } | |
588 else | |
589 { | |
590 printf("\n*** 'smpeg-config --version' returned %d.%d.%d, but the minimum version\n", $smpeg_major_version, $smpeg_minor_version, $smpeg_micro_version); | |
591 printf("*** of SMPEG required is %d.%d.%d. If smpeg-config is correct, then it is\n", major, minor, micro); | |
592 printf("*** best to upgrade to the required version.\n"); | |
593 printf("*** If smpeg-config was wrong, set the environment variable SMPEG_CONFIG\n"); | |
594 printf("*** to point to the correct copy of smpeg-config, and remove the file\n"); | |
595 printf("*** config.cache before re-running configure\n"); | |
596 return 1; | |
597 } | |
598 } | |
599 | |
600 ],, no_smpeg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | |
601 CFLAGS="$ac_save_CFLAGS" | |
602 LIBS="$ac_save_LIBS" | |
603 fi | |
604 fi | |
605 if test "x$no_smpeg" = x ; then | |
606 AC_MSG_RESULT(yes) | |
607 ifelse([$2], , :, [$2]) | |
608 else | |
609 AC_MSG_RESULT(no) | |
610 if test "$SMPEG_CONFIG" = "no" ; then | |
611 echo "*** The smpeg-config script installed by SMPEG could not be found" | |
612 echo "*** If SMPEG was installed in PREFIX, make sure PREFIX/bin is in" | |
613 echo "*** your path, or set the SMPEG_CONFIG environment variable to the" | |
614 echo "*** full path to smpeg-config." | |
615 else | |
616 if test -f conf.smpegtest ; then | |
617 : | |
618 else | |
619 echo "*** Could not run SMPEG test program, checking why..." | |
620 CFLAGS="$CFLAGS $SMPEG_CFLAGS $SDL_CFLAGS" | |
621 LIBS="$LIBS $SMPEG_LIBS $SDL_LIBS" | |
622 AC_TRY_LINK([ | |
623 #include <stdio.h> | |
624 #include "smpeg.h" | |
625 ], [ return 0; ], | |
626 [ echo "*** The test program compiled, but did not run. This usually means" | |
627 echo "*** that the run-time linker is not finding SMPEG or finding the wrong" | |
628 echo "*** version of SMPEG. If it is not finding SMPEG, you'll need to set your" | |
629 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | |
630 echo "*** to the installed location Also, make sure you have run ldconfig if that" | |
631 echo "*** is required on your system" | |
632 echo "***" | |
633 echo "*** If you have an old version installed, it is best to remove it, although" | |
634 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], | |
635 [ echo "*** The test program failed to compile or link. See the file config.log for the" | |
636 echo "*** exact error that occured. This usually means SMPEG was incorrectly installed" | |
637 echo "*** or that you have moved SMPEG since it was installed. In the latter case, you" | |
638 echo "*** may want to edit the smpeg-config script: $SMPEG_CONFIG" ]) | |
639 CFLAGS="$ac_save_CFLAGS" | |
640 LIBS="$ac_save_LIBS" | |
641 fi | |
642 fi | |
643 SMPEG_CFLAGS="" | |
644 SMPEG_LIBS="" | |
645 ifelse([$3], , :, [$3]) | |
646 fi | |
647 AC_SUBST(SMPEG_CFLAGS) | |
648 AC_SUBST(SMPEG_LIBS) | |
649 rm -f conf.smpegtest | |
650 ]) | |
651 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- | |
652 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001 | |
653 ## Free Software Foundation, Inc. | |
654 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | |
655 ## | |
656 ## This program is free software; you can redistribute it and/or modify | |
657 ## it under the terms of the GNU General Public License as published by | |
658 ## the Free Software Foundation; either version 2 of the License, or | |
659 ## (at your option) any later version. | |
660 ## | |
661 ## This program is distributed in the hope that it will be useful, but | |
662 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
663 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
664 ## General Public License for more details. | |
665 ## | |
666 ## You should have received a copy of the GNU General Public License | |
667 ## along with this program; if not, write to the Free Software | |
668 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
669 ## | |
670 ## As a special exception to the GNU General Public License, if you | |
671 ## distribute this file as part of a program that contains a | |
672 ## configuration script generated by Autoconf, you may include it under | |
673 ## the same distribution terms that you use for the rest of that program. | |
674 | |
675 # serial 46 AC_PROG_LIBTOOL | |
676 | |
677 AC_DEFUN([AC_PROG_LIBTOOL], | |
678 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl | |
679 | |
680 # This can be used to rebuild libtool when needed | |
681 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" | |
682 | |
683 # Always use our own libtool. | |
684 LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
685 AC_SUBST(LIBTOOL)dnl | |
686 | |
687 # Prevent multiple expansion | |
688 define([AC_PROG_LIBTOOL], []) | |
689 ]) | |
690 | |
691 AC_DEFUN([AC_LIBTOOL_SETUP], | |
692 [AC_PREREQ(2.13)dnl | |
693 AC_REQUIRE([AC_ENABLE_SHARED])dnl | |
694 AC_REQUIRE([AC_ENABLE_STATIC])dnl | |
695 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl | |
696 AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
697 AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
698 AC_REQUIRE([AC_PROG_CC])dnl | |
699 AC_REQUIRE([AC_PROG_LD])dnl | |
700 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl | |
701 AC_REQUIRE([AC_PROG_NM])dnl | |
702 AC_REQUIRE([AC_PROG_LN_S])dnl | |
703 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl | |
704 AC_REQUIRE([AC_OBJEXT])dnl | |
705 AC_REQUIRE([AC_EXEEXT])dnl | |
706 dnl | |
707 | |
708 _LT_AC_PROG_ECHO_BACKSLASH | |
709 # Only perform the check for file, if the check method requires it | |
710 case $deplibs_check_method in | |
711 file_magic*) | |
712 if test "$file_magic_cmd" = '$MAGIC_CMD'; then | |
713 AC_PATH_MAGIC | |
714 fi | |
715 ;; | |
716 esac | |
717 | |
718 AC_CHECK_TOOL(RANLIB, ranlib, :) | |
719 AC_CHECK_TOOL(STRIP, strip, :) | |
720 | |
721 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) | |
722 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], | |
723 enable_win32_dll=yes, enable_win32_dll=no) | |
724 | |
725 AC_ARG_ENABLE(libtool-lock, | |
726 [ --disable-libtool-lock avoid locking (might break parallel builds)]) | |
727 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes | |
728 | |
729 # Some flags need to be propagated to the compiler or linker for good | |
730 # libtool support. | |
731 case $host in | |
732 *-*-irix6*) | |
733 # Find out which ABI we are using. | |
734 echo '[#]line __oline__ "configure"' > conftest.$ac_ext | |
735 if AC_TRY_EVAL(ac_compile); then | |
736 case `/usr/bin/file conftest.$ac_objext` in | |
737 *32-bit*) | |
738 LD="${LD-ld} -32" | |
739 ;; | |
740 *N32*) | |
741 LD="${LD-ld} -n32" | |
742 ;; | |
743 *64-bit*) | |
744 LD="${LD-ld} -64" | |
745 ;; | |
746 esac | |
747 fi | |
748 rm -rf conftest* | |
749 ;; | |
750 | |
751 *-*-sco3.2v5*) | |
752 # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
753 SAVE_CFLAGS="$CFLAGS" | |
754 CFLAGS="$CFLAGS -belf" | |
755 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, | |
756 [AC_LANG_SAVE | |
757 AC_LANG_C | |
758 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) | |
759 AC_LANG_RESTORE]) | |
760 if test x"$lt_cv_cc_needs_belf" != x"yes"; then | |
761 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
762 CFLAGS="$SAVE_CFLAGS" | |
763 fi | |
764 ;; | |
765 | |
766 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], | |
767 [*-*-cygwin* | *-*-mingw* | *-*-pw32*) | |
768 AC_CHECK_TOOL(DLLTOOL, dlltool, false) | |
769 AC_CHECK_TOOL(AS, as, false) | |
770 AC_CHECK_TOOL(OBJDUMP, objdump, false) | |
771 | |
772 # recent cygwin and mingw systems supply a stub DllMain which the user | |
773 # can override, but on older systems we have to supply one | |
774 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, | |
775 [AC_TRY_LINK([], | |
776 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); | |
777 DllMain (0, 0, 0);], | |
778 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) | |
779 | |
780 case $host/$CC in | |
781 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*) | |
782 # old mingw systems require "-dll" to link a DLL, while more recent ones | |
783 # require "-mdll" | |
784 SAVE_CFLAGS="$CFLAGS" | |
785 CFLAGS="$CFLAGS -mdll" | |
786 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch, | |
787 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])]) | |
788 CFLAGS="$SAVE_CFLAGS" ;; | |
789 *-*-cygwin* | *-*-pw32*) | |
790 # cygwin systems need to pass --dll to the linker, and not link | |
791 # crt.o which will require a WinMain@16 definition. | |
792 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;; | |
793 esac | |
794 ;; | |
795 ]) | |
796 esac | |
797 | |
798 _LT_AC_LTCONFIG_HACK | |
799 | |
800 ]) | |
801 | |
802 # AC_LIBTOOL_HEADER_ASSERT | |
803 # ------------------------ | |
804 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT], | |
805 [AC_CACHE_CHECK([whether $CC supports assert without backlinking], | |
806 [lt_cv_func_assert_works], | |
807 [case $host in | |
808 *-*-solaris*) | |
809 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then | |
810 case `$CC --version 2>/dev/null` in | |
811 [[12]].*) lt_cv_func_assert_works=no ;; | |
812 *) lt_cv_func_assert_works=yes ;; | |
813 esac | |
814 fi | |
815 ;; | |
816 esac]) | |
817 | |
818 if test "x$lt_cv_func_assert_works" = xyes; then | |
819 AC_CHECK_HEADERS(assert.h) | |
820 fi | |
821 ])# AC_LIBTOOL_HEADER_ASSERT | |
822 | |
823 # _LT_AC_CHECK_DLFCN | |
824 # -------------------- | |
825 AC_DEFUN([_LT_AC_CHECK_DLFCN], | |
826 [AC_CHECK_HEADERS(dlfcn.h) | |
827 ])# _LT_AC_CHECK_DLFCN | |
828 | |
829 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE | |
830 # --------------------------------- | |
831 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], | |
832 [AC_REQUIRE([AC_CANONICAL_HOST]) | |
833 AC_REQUIRE([AC_PROG_NM]) | |
834 AC_REQUIRE([AC_OBJEXT]) | |
835 # Check for command to grab the raw symbol name followed by C symbol from nm. | |
836 AC_MSG_CHECKING([command to parse $NM output]) | |
837 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl | |
838 | |
839 # These are sane defaults that work on at least a few old systems. | |
840 # [They come from Ultrix. What could be older than Ultrix?!! ;)] | |
841 | |
842 # Character class describing NM global symbol codes. | |
843 symcode='[[BCDEGRST]]' | |
844 | |
845 # Regexp to match symbols that can be accessed directly from C. | |
846 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' | |
847 | |
848 # Transform the above into a raw symbol and a C symbol. | |
849 symxfrm='\1 \2\3 \3' | |
850 | |
851 # Transform an extracted symbol line into a proper C declaration | |
852 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" | |
853 | |
854 # Transform an extracted symbol line into symbol name and symbol address | |
855 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" | |
856 | |
857 # Define system-specific variables. | |
858 case $host_os in | |
859 aix*) | |
860 symcode='[[BCDT]]' | |
861 ;; | |
862 cygwin* | mingw* | pw32*) | |
863 symcode='[[ABCDGISTW]]' | |
864 ;; | |
865 hpux*) # Its linker distinguishes data from code symbols | |
866 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" | |
867 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" | |
868 ;; | |
869 irix*) | |
870 symcode='[[BCDEGRST]]' | |
871 ;; | |
872 solaris* | sysv5*) | |
873 symcode='[[BDT]]' | |
874 ;; | |
875 sysv4) | |
876 symcode='[[DFNSTU]]' | |
877 ;; | |
878 esac | |
879 | |
880 # Handle CRLF in mingw tool chain | |
881 opt_cr= | |
882 case $host_os in | |
883 mingw*) | |
884 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp | |
885 ;; | |
886 esac | |
887 | |
888 # If we're using GNU nm, then use its standard symbol codes. | |
889 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then | |
890 symcode='[[ABCDGISTW]]' | |
891 fi | |
892 | |
893 # Try without a prefix undercore, then with it. | |
894 for ac_symprfx in "" "_"; do | |
895 | |
896 # Write the raw and C identifiers. | |
897 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" | |
898 | |
899 # Check to see that the pipe works correctly. | |
900 pipe_works=no | |
901 rm -f conftest* | |
902 cat > conftest.$ac_ext <<EOF | |
903 #ifdef __cplusplus | |
904 extern "C" { | |
905 #endif | |
906 char nm_test_var; | |
907 void nm_test_func(){} | |
908 #ifdef __cplusplus | |
909 } | |
910 #endif | |
911 int main(){nm_test_var='a';nm_test_func();return(0);} | |
912 EOF | |
913 | |
914 if AC_TRY_EVAL(ac_compile); then | |
915 # Now try to grab the symbols. | |
916 nlist=conftest.nm | |
917 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then | |
918 # Try sorting and uniquifying the output. | |
919 if sort "$nlist" | uniq > "$nlist"T; then | |
920 mv -f "$nlist"T "$nlist" | |
921 else | |
922 rm -f "$nlist"T | |
923 fi | |
924 | |
925 # Make sure that we snagged all the symbols we need. | |
926 if egrep ' nm_test_var$' "$nlist" >/dev/null; then | |
927 if egrep ' nm_test_func$' "$nlist" >/dev/null; then | |
928 cat <<EOF > conftest.$ac_ext | |
929 #ifdef __cplusplus | |
930 extern "C" { | |
931 #endif | |
932 | |
933 EOF | |
934 # Now generate the symbol file. | |
935 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' | |
936 | |
937 cat <<EOF >> conftest.$ac_ext | |
938 #if defined (__STDC__) && __STDC__ | |
939 # define lt_ptr void * | |
940 #else | |
941 # define lt_ptr char * | |
942 # define const | |
943 #endif | |
944 | |
945 /* The mapping between symbol names and symbols. */ | |
946 const struct { | |
947 const char *name; | |
948 lt_ptr address; | |
949 } | |
950 lt_preloaded_symbols[[]] = | |
951 { | |
952 EOF | |
953 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext | |
954 cat <<\EOF >> conftest.$ac_ext | |
955 {0, (lt_ptr) 0} | |
956 }; | |
957 | |
958 #ifdef __cplusplus | |
959 } | |
960 #endif | |
961 EOF | |
962 # Now try linking the two files. | |
963 mv conftest.$ac_objext conftstm.$ac_objext | |
964 save_LIBS="$LIBS" | |
965 save_CFLAGS="$CFLAGS" | |
966 LIBS="conftstm.$ac_objext" | |
967 CFLAGS="$CFLAGS$no_builtin_flag" | |
968 if AC_TRY_EVAL(ac_link) && test -s conftest; then | |
969 pipe_works=yes | |
970 fi | |
971 LIBS="$save_LIBS" | |
972 CFLAGS="$save_CFLAGS" | |
973 else | |
974 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC | |
975 fi | |
976 else | |
977 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC | |
978 fi | |
979 else | |
980 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC | |
981 fi | |
982 else | |
983 echo "$progname: failed program was:" >&AC_FD_CC | |
984 cat conftest.$ac_ext >&5 | |
985 fi | |
986 rm -f conftest* conftst* | |
987 | |
988 # Do not use the global_symbol_pipe unless it works. | |
989 if test "$pipe_works" = yes; then | |
990 break | |
991 else | |
992 lt_cv_sys_global_symbol_pipe= | |
993 fi | |
994 done | |
995 ]) | |
996 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" | |
997 if test -z "$lt_cv_sys_global_symbol_pipe"; then | |
998 global_symbol_to_cdecl= | |
999 global_symbol_to_c_name_address= | |
1000 else | |
1001 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl" | |
1002 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address" | |
1003 fi | |
1004 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address"; | |
1005 then | |
1006 AC_MSG_RESULT(failed) | |
1007 else | |
1008 AC_MSG_RESULT(ok) | |
1009 fi | |
1010 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE | |
1011 | |
1012 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR | |
1013 # --------------------------------- | |
1014 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], | |
1015 [# Find the correct PATH separator. Usually this is `:', but | |
1016 # DJGPP uses `;' like DOS. | |
1017 if test "X${PATH_SEPARATOR+set}" != Xset; then | |
1018 UNAME=${UNAME-`uname 2>/dev/null`} | |
1019 case X$UNAME in | |
1020 *-DOS) lt_cv_sys_path_separator=';' ;; | |
1021 *) lt_cv_sys_path_separator=':' ;; | |
1022 esac | |
1023 PATH_SEPARATOR=$lt_cv_sys_path_separator | |
1024 fi | |
1025 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR | |
1026 | |
1027 # _LT_AC_PROG_ECHO_BACKSLASH | |
1028 # -------------------------- | |
1029 # Add some code to the start of the generated configure script which | |
1030 # will find an echo command which doesn't interpret backslashes. | |
1031 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], | |
1032 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], | |
1033 [AC_DIVERT_PUSH(NOTICE)]) | |
1034 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR | |
1035 | |
1036 # Check that we are running under the correct shell. | |
1037 SHELL=${CONFIG_SHELL-/bin/sh} | |
1038 | |
1039 case X$ECHO in | |
1040 X*--fallback-echo) | |
1041 # Remove one level of quotation (which was required for Make). | |
1042 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` | |
1043 ;; | |
1044 esac | |
1045 | |
1046 echo=${ECHO-echo} | |
1047 if test "X[$]1" = X--no-reexec; then | |
1048 # Discard the --no-reexec flag, and continue. | |
1049 shift | |
1050 elif test "X[$]1" = X--fallback-echo; then | |
1051 # Avoid inline document here, it may be left over | |
1052 : | |
1053 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then | |
1054 # Yippee, $echo works! | |
1055 : | |
1056 else | |
1057 # Restart under the correct shell. | |
1058 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} | |
1059 fi | |
1060 | |
1061 if test "X[$]1" = X--fallback-echo; then | |
1062 # used as fallback echo | |
1063 shift | |
1064 cat <<EOF | |
1065 $* | |
1066 EOF | |
1067 exit 0 | |
1068 fi | |
1069 | |
1070 # The HP-UX ksh and POSIX shell print the target directory to stdout | |
1071 # if CDPATH is set. | |
1072 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi | |
1073 | |
1074 if test -z "$ECHO"; then | |
1075 if test "X${echo_test_string+set}" != Xset; then | |
1076 # find a string as large as possible, as long as the shell can cope with it | |
1077 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do | |
1078 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... | |
1079 if (echo_test_string="`eval $cmd`") 2>/dev/null && | |
1080 echo_test_string="`eval $cmd`" && | |
1081 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null | |
1082 then | |
1083 break | |
1084 fi | |
1085 done | |
1086 fi | |
1087 | |
1088 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | |
1089 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | |
1090 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1091 : | |
1092 else | |
1093 # The Solaris, AIX, and Digital Unix default echo programs unquote | |
1094 # backslashes. This makes it impossible to quote backslashes using | |
1095 # echo "$something" | sed 's/\\/\\\\/g' | |
1096 # | |
1097 # So, first we look for a working echo in the user's PATH. | |
1098 | |
1099 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
1100 for dir in $PATH /usr/ucb; do | |
1101 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && | |
1102 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && | |
1103 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && | |
1104 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1105 echo="$dir/echo" | |
1106 break | |
1107 fi | |
1108 done | |
1109 IFS="$save_ifs" | |
1110 | |
1111 if test "X$echo" = Xecho; then | |
1112 # We didn't find a better echo, so look for alternatives. | |
1113 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && | |
1114 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && | |
1115 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1116 # This shell has a builtin print -r that does the trick. | |
1117 echo='print -r' | |
1118 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && | |
1119 test "X$CONFIG_SHELL" != X/bin/ksh; then | |
1120 # If we have ksh, try running configure again with it. | |
1121 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | |
1122 export ORIGINAL_CONFIG_SHELL | |
1123 CONFIG_SHELL=/bin/ksh | |
1124 export CONFIG_SHELL | |
1125 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} | |
1126 else | |
1127 # Try using printf. | |
1128 echo='printf %s\n' | |
1129 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && | |
1130 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && | |
1131 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1132 # Cool, printf works | |
1133 : | |
1134 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && | |
1135 test "X$echo_testing_string" = 'X\t' && | |
1136 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && | |
1137 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1138 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL | |
1139 export CONFIG_SHELL | |
1140 SHELL="$CONFIG_SHELL" | |
1141 export SHELL | |
1142 echo="$CONFIG_SHELL [$]0 --fallback-echo" | |
1143 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && | |
1144 test "X$echo_testing_string" = 'X\t' && | |
1145 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && | |
1146 test "X$echo_testing_string" = "X$echo_test_string"; then | |
1147 echo="$CONFIG_SHELL [$]0 --fallback-echo" | |
1148 else | |
1149 # maybe with a smaller string... | |
1150 prev=: | |
1151 | |
1152 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do | |
1153 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null | |
1154 then | |
1155 break | |
1156 fi | |
1157 prev="$cmd" | |
1158 done | |
1159 | |
1160 if test "$prev" != 'sed 50q "[$]0"'; then | |
1161 echo_test_string=`eval $prev` | |
1162 export echo_test_string | |
1163 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} | |
1164 else | |
1165 # Oops. We lost completely, so just stick with echo. | |
1166 echo=echo | |
1167 fi | |
1168 fi | |
1169 fi | |
1170 fi | |
1171 fi | |
1172 fi | |
1173 | |
1174 # Copy echo and quote the copy suitably for passing to libtool from | |
1175 # the Makefile, instead of quoting the original, which is used later. | |
1176 ECHO=$echo | |
1177 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then | |
1178 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" | |
1179 fi | |
1180 | |
1181 AC_SUBST(ECHO) | |
1182 AC_DIVERT_POP | |
1183 ])# _LT_AC_PROG_ECHO_BACKSLASH | |
1184 | |
1185 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, | |
1186 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) | |
1187 # ------------------------------------------------------------------ | |
1188 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], | |
1189 [if test "$cross_compiling" = yes; then : | |
1190 [$4] | |
1191 else | |
1192 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl | |
1193 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | |
1194 lt_status=$lt_dlunknown | |
1195 cat > conftest.$ac_ext <<EOF | |
1196 [#line __oline__ "configure" | |
1197 #include "confdefs.h" | |
1198 | |
1199 #if HAVE_DLFCN_H | |
1200 #include <dlfcn.h> | |
1201 #endif | |
1202 | |
1203 #include <stdio.h> | |
1204 | |
1205 #ifdef RTLD_GLOBAL | |
1206 # define LT_DLGLOBAL RTLD_GLOBAL | |
1207 #else | |
1208 # ifdef DL_GLOBAL | |
1209 # define LT_DLGLOBAL DL_GLOBAL | |
1210 # else | |
1211 # define LT_DLGLOBAL 0 | |
1212 # endif | |
1213 #endif | |
1214 | |
1215 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we | |
1216 find out it does not work in some platform. */ | |
1217 #ifndef LT_DLLAZY_OR_NOW | |
1218 # ifdef RTLD_LAZY | |
1219 # define LT_DLLAZY_OR_NOW RTLD_LAZY | |
1220 # else | |
1221 # ifdef DL_LAZY | |
1222 # define LT_DLLAZY_OR_NOW DL_LAZY | |
1223 # else | |
1224 # ifdef RTLD_NOW | |
1225 # define LT_DLLAZY_OR_NOW RTLD_NOW | |
1226 # else | |
1227 # ifdef DL_NOW | |
1228 # define LT_DLLAZY_OR_NOW DL_NOW | |
1229 # else | |
1230 # define LT_DLLAZY_OR_NOW 0 | |
1231 # endif | |
1232 # endif | |
1233 # endif | |
1234 # endif | |
1235 #endif | |
1236 | |
1237 #ifdef __cplusplus | |
1238 extern "C" void exit (int); | |
1239 #endif | |
1240 | |
1241 void fnord() { int i=42;} | |
1242 int main () | |
1243 { | |
1244 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); | |
1245 int status = $lt_dlunknown; | |
1246 | |
1247 if (self) | |
1248 { | |
1249 if (dlsym (self,"fnord")) status = $lt_dlno_uscore; | |
1250 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; | |
1251 /* dlclose (self); */ | |
1252 } | |
1253 | |
1254 exit (status); | |
1255 }] | |
1256 EOF | |
1257 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then | |
1258 (./conftest; exit; ) 2>/dev/null | |
1259 lt_status=$? | |
1260 case x$lt_status in | |
1261 x$lt_dlno_uscore) $1 ;; | |
1262 x$lt_dlneed_uscore) $2 ;; | |
1263 x$lt_unknown|x*) $3 ;; | |
1264 esac | |
1265 else : | |
1266 # compilation failed | |
1267 $3 | |
1268 fi | |
1269 fi | |
1270 rm -fr conftest* | |
1271 ])# _LT_AC_TRY_DLOPEN_SELF | |
1272 | |
1273 # AC_LIBTOOL_DLOPEN_SELF | |
1274 # ------------------- | |
1275 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], | |
1276 [if test "x$enable_dlopen" != xyes; then | |
1277 enable_dlopen=unknown | |
1278 enable_dlopen_self=unknown | |
1279 enable_dlopen_self_static=unknown | |
1280 else | |
1281 lt_cv_dlopen=no | |
1282 lt_cv_dlopen_libs= | |
1283 | |
1284 case $host_os in | |
1285 beos*) | |
1286 lt_cv_dlopen="load_add_on" | |
1287 lt_cv_dlopen_libs= | |
1288 lt_cv_dlopen_self=yes | |
1289 ;; | |
1290 | |
1291 cygwin* | mingw* | pw32*) | |
1292 lt_cv_dlopen="LoadLibrary" | |
1293 lt_cv_dlopen_libs= | |
1294 ;; | |
1295 | |
1296 *) | |
1297 AC_CHECK_FUNC([shl_load], | |
1298 [lt_cv_dlopen="shl_load"], | |
1299 [AC_CHECK_LIB([dld], [shl_load], | |
1300 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], | |
1301 [AC_CHECK_FUNC([dlopen], | |
1302 [lt_cv_dlopen="dlopen"], | |
1303 [AC_CHECK_LIB([dl], [dlopen], | |
1304 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], | |
1305 [AC_CHECK_LIB([svld], [dlopen], | |
1306 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], | |
1307 [AC_CHECK_LIB([dld], [dld_link], | |
1308 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) | |
1309 ]) | |
1310 ]) | |
1311 ]) | |
1312 ]) | |
1313 ]) | |
1314 ;; | |
1315 esac | |
1316 | |
1317 if test "x$lt_cv_dlopen" != xno; then | |
1318 enable_dlopen=yes | |
1319 else | |
1320 enable_dlopen=no | |
1321 fi | |
1322 | |
1323 case $lt_cv_dlopen in | |
1324 dlopen) | |
1325 save_CPPFLAGS="$CPPFLAGS" | |
1326 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl | |
1327 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" | |
1328 | |
1329 save_LDFLAGS="$LDFLAGS" | |
1330 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" | |
1331 | |
1332 save_LIBS="$LIBS" | |
1333 LIBS="$lt_cv_dlopen_libs $LIBS" | |
1334 | |
1335 AC_CACHE_CHECK([whether a program can dlopen itself], | |
1336 lt_cv_dlopen_self, [dnl | |
1337 _LT_AC_TRY_DLOPEN_SELF( | |
1338 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, | |
1339 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) | |
1340 ]) | |
1341 | |
1342 if test "x$lt_cv_dlopen_self" = xyes; then | |
1343 LDFLAGS="$LDFLAGS $link_static_flag" | |
1344 AC_CACHE_CHECK([whether a statically linked program can dlopen itself], | |
1345 lt_cv_dlopen_self_static, [dnl | |
1346 _LT_AC_TRY_DLOPEN_SELF( | |
1347 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, | |
1348 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) | |
1349 ]) | |
1350 fi | |
1351 | |
1352 CPPFLAGS="$save_CPPFLAGS" | |
1353 LDFLAGS="$save_LDFLAGS" | |
1354 LIBS="$save_LIBS" | |
1355 ;; | |
1356 esac | |
1357 | |
1358 case $lt_cv_dlopen_self in | |
1359 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; | |
1360 *) enable_dlopen_self=unknown ;; | |
1361 esac | |
1362 | |
1363 case $lt_cv_dlopen_self_static in | |
1364 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; | |
1365 *) enable_dlopen_self_static=unknown ;; | |
1366 esac | |
1367 fi | |
1368 ])# AC_LIBTOOL_DLOPEN_SELF | |
1369 | |
1370 AC_DEFUN([_LT_AC_LTCONFIG_HACK], | |
1371 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl | |
1372 # Sed substitution that helps us do robust quoting. It backslashifies | |
1373 # metacharacters that are still active within double-quoted strings. | |
1374 Xsed='sed -e s/^X//' | |
1375 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g' | |
1376 | |
1377 # Same as above, but do not quote variable references. | |
1378 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g' | |
1379 | |
1380 # Sed substitution to delay expansion of an escaped shell variable in a | |
1381 # double_quote_subst'ed string. | |
1382 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' | |
1383 | |
1384 # Constants: | |
1385 rm="rm -f" | |
1386 | |
1387 # Global variables: | |
1388 default_ofile=libtool | |
1389 can_build_shared=yes | |
1390 | |
1391 # All known linkers require a `.a' archive for static linking (except M$VC, | |
1392 # which needs '.lib'). | |
1393 libext=a | |
1394 ltmain="$ac_aux_dir/ltmain.sh" | |
1395 ofile="$default_ofile" | |
1396 with_gnu_ld="$lt_cv_prog_gnu_ld" | |
1397 need_locks="$enable_libtool_lock" | |
1398 | |
1399 old_CC="$CC" | |
1400 old_CFLAGS="$CFLAGS" | |
1401 | |
1402 # Set sane defaults for various variables | |
1403 test -z "$AR" && AR=ar | |
1404 test -z "$AR_FLAGS" && AR_FLAGS=cru | |
1405 test -z "$AS" && AS=as | |
1406 test -z "$CC" && CC=cc | |
1407 test -z "$DLLTOOL" && DLLTOOL=dlltool | |
1408 test -z "$LD" && LD=ld | |
1409 test -z "$LN_S" && LN_S="ln -s" | |
1410 test -z "$MAGIC_CMD" && MAGIC_CMD=file | |
1411 test -z "$NM" && NM=nm | |
1412 test -z "$OBJDUMP" && OBJDUMP=objdump | |
1413 test -z "$RANLIB" && RANLIB=: | |
1414 test -z "$STRIP" && STRIP=: | |
1415 test -z "$ac_objext" && ac_objext=o | |
1416 | |
1417 if test x"$host" != x"$build"; then | |
1418 ac_tool_prefix=${host_alias}- | |
1419 else | |
1420 ac_tool_prefix= | |
1421 fi | |
1422 | |
1423 # Transform linux* to *-*-linux-gnu*, to support old configure scripts. | |
1424 case $host_os in | |
1425 linux-gnu*) ;; | |
1426 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` | |
1427 esac | |
1428 | |
1429 case $host_os in | |
1430 aix3*) | |
1431 # AIX sometimes has problems with the GCC collect2 program. For some | |
1432 # reason, if we set the COLLECT_NAMES environment variable, the problems | |
1433 # vanish in a puff of smoke. | |
1434 if test "X${COLLECT_NAMES+set}" != Xset; then | |
1435 COLLECT_NAMES= | |
1436 export COLLECT_NAMES | |
1437 fi | |
1438 ;; | |
1439 esac | |
1440 | |
1441 # Determine commands to create old-style static archives. | |
1442 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' | |
1443 old_postinstall_cmds='chmod 644 $oldlib' | |
1444 old_postuninstall_cmds= | |
1445 | |
1446 if test -n "$RANLIB"; then | |
1447 case $host_os in | |
1448 openbsd*) | |
1449 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" | |
1450 ;; | |
1451 *) | |
1452 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" | |
1453 ;; | |
1454 esac | |
1455 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" | |
1456 fi | |
1457 | |
1458 # Allow CC to be a program name with arguments. | |
1459 set dummy $CC | |
1460 compiler="[$]2" | |
1461 | |
1462 ## FIXME: this should be a separate macro | |
1463 ## | |
1464 AC_MSG_CHECKING([for objdir]) | |
1465 rm -f .libs 2>/dev/null | |
1466 mkdir .libs 2>/dev/null | |
1467 if test -d .libs; then | |
1468 objdir=.libs | |
1469 else | |
1470 # MS-DOS does not allow filenames that begin with a dot. | |
1471 objdir=_libs | |
1472 fi | |
1473 rmdir .libs 2>/dev/null | |
1474 AC_MSG_RESULT($objdir) | |
1475 ## | |
1476 ## END FIXME | |
1477 | |
1478 | |
1479 ## FIXME: this should be a separate macro | |
1480 ## | |
1481 AC_ARG_WITH(pic, | |
1482 [ --with-pic try to use only PIC/non-PIC objects [default=use both]], | |
1483 pic_mode="$withval", pic_mode=default) | |
1484 test -z "$pic_mode" && pic_mode=default | |
1485 | |
1486 # We assume here that the value for lt_cv_prog_cc_pic will not be cached | |
1487 # in isolation, and that seeing it set (from the cache) indicates that | |
1488 # the associated values are set (in the cache) correctly too. | |
1489 AC_MSG_CHECKING([for $compiler option to produce PIC]) | |
1490 AC_CACHE_VAL(lt_cv_prog_cc_pic, | |
1491 [ lt_cv_prog_cc_pic= | |
1492 lt_cv_prog_cc_shlib= | |
1493 lt_cv_prog_cc_wl= | |
1494 lt_cv_prog_cc_static= | |
1495 lt_cv_prog_cc_no_builtin= | |
1496 lt_cv_prog_cc_can_build_shared=$can_build_shared | |
1497 | |
1498 if test "$GCC" = yes; then | |
1499 lt_cv_prog_cc_wl='-Wl,' | |
1500 lt_cv_prog_cc_static='-static' | |
1501 | |
1502 case $host_os in | |
1503 aix*) | |
1504 # Below there is a dirty hack to force normal static linking with -ldl | |
1505 # The problem is because libdl dynamically linked with both libc and | |
1506 # libC (AIX C++ library), which obviously doesn't included in libraries | |
1507 # list by gcc. This cause undefined symbols with -static flags. | |
1508 # This hack allows C programs to be linked with "-static -ldl", but | |
1509 # not sure about C++ programs. | |
1510 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC" | |
1511 ;; | |
1512 amigaos*) | |
1513 # FIXME: we need at least 68020 code to build shared libraries, but | |
1514 # adding the `-m68020' flag to GCC prevents building anything better, | |
1515 # like `-m68040'. | |
1516 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4' | |
1517 ;; | |
1518 beos* | irix5* | irix6* | osf3* | osf4* | osf5*) | |
1519 # PIC is the default for these OSes. | |
1520 ;; | |
1521 darwin* | rhapsody*) | |
1522 # PIC is the default on this platform | |
1523 # Common symbols not allowed in MH_DYLIB files | |
1524 lt_cv_prog_cc_pic='-fno-common' | |
1525 ;; | |
1526 cygwin* | mingw* | pw32* | os2*) | |
1527 # This hack is so that the source file can tell whether it is being | |
1528 # built for inclusion in a dll (and should export symbols for example). | |
1529 lt_cv_prog_cc_pic='-DDLL_EXPORT' | |
1530 ;; | |
1531 sysv4*MP*) | |
1532 if test -d /usr/nec; then | |
1533 lt_cv_prog_cc_pic=-Kconform_pic | |
1534 fi | |
1535 ;; | |
1536 *) | |
1537 lt_cv_prog_cc_pic='-fPIC' | |
1538 ;; | |
1539 esac | |
1540 else | |
1541 # PORTME Check for PIC flags for the system compiler. | |
1542 case $host_os in | |
1543 aix3* | aix4* | aix5*) | |
1544 lt_cv_prog_cc_wl='-Wl,' | |
1545 # All AIX code is PIC. | |
1546 if test "$host_cpu" = ia64; then | |
1547 # AIX 5 now supports IA64 processor | |
1548 lt_cv_prog_cc_static='-Bstatic' | |
1549 else | |
1550 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp' | |
1551 fi | |
1552 ;; | |
1553 | |
1554 hpux9* | hpux10* | hpux11*) | |
1555 # Is there a better lt_cv_prog_cc_static that works with the bundled CC? | |
1556 lt_cv_prog_cc_wl='-Wl,' | |
1557 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive" | |
1558 lt_cv_prog_cc_pic='+Z' | |
1559 ;; | |
1560 | |
1561 irix5* | irix6*) | |
1562 lt_cv_prog_cc_wl='-Wl,' | |
1563 lt_cv_prog_cc_static='-non_shared' | |
1564 # PIC (with -KPIC) is the default. | |
1565 ;; | |
1566 | |
1567 cygwin* | mingw* | pw32* | os2*) | |
1568 # This hack is so that the source file can tell whether it is being | |
1569 # built for inclusion in a dll (and should export symbols for example). | |
1570 lt_cv_prog_cc_pic='-DDLL_EXPORT' | |
1571 ;; | |
1572 | |
1573 newsos6) | |
1574 lt_cv_prog_cc_pic='-KPIC' | |
1575 lt_cv_prog_cc_static='-Bstatic' | |
1576 ;; | |
1577 | |
1578 osf3* | osf4* | osf5*) | |
1579 # All OSF/1 code is PIC. | |
1580 lt_cv_prog_cc_wl='-Wl,' | |
1581 lt_cv_prog_cc_static='-non_shared' | |
1582 ;; | |
1583 | |
1584 sco3.2v5*) | |
1585 lt_cv_prog_cc_pic='-Kpic' | |
1586 lt_cv_prog_cc_static='-dn' | |
1587 lt_cv_prog_cc_shlib='-belf' | |
1588 ;; | |
1589 | |
1590 solaris*) | |
1591 lt_cv_prog_cc_pic='-KPIC' | |
1592 lt_cv_prog_cc_static='-Bstatic' | |
1593 lt_cv_prog_cc_wl='-Wl,' | |
1594 ;; | |
1595 | |
1596 sunos4*) | |
1597 lt_cv_prog_cc_pic='-PIC' | |
1598 lt_cv_prog_cc_static='-Bstatic' | |
1599 lt_cv_prog_cc_wl='-Qoption ld ' | |
1600 ;; | |
1601 | |
1602 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
1603 lt_cv_prog_cc_pic='-KPIC' | |
1604 lt_cv_prog_cc_static='-Bstatic' | |
1605 if test "x$host_vendor" = xsni; then | |
1606 lt_cv_prog_cc_wl='-LD' | |
1607 else | |
1608 lt_cv_prog_cc_wl='-Wl,' | |
1609 fi | |
1610 ;; | |
1611 | |
1612 uts4*) | |
1613 lt_cv_prog_cc_pic='-pic' | |
1614 lt_cv_prog_cc_static='-Bstatic' | |
1615 ;; | |
1616 | |
1617 sysv4*MP*) | |
1618 if test -d /usr/nec ;then | |
1619 lt_cv_prog_cc_pic='-Kconform_pic' | |
1620 lt_cv_prog_cc_static='-Bstatic' | |
1621 fi | |
1622 ;; | |
1623 | |
1624 *) | |
1625 lt_cv_prog_cc_can_build_shared=no | |
1626 ;; | |
1627 esac | |
1628 fi | |
1629 ]) | |
1630 if test -z "$lt_cv_prog_cc_pic"; then | |
1631 AC_MSG_RESULT([none]) | |
1632 else | |
1633 AC_MSG_RESULT([$lt_cv_prog_cc_pic]) | |
1634 | |
1635 # Check to make sure the pic_flag actually works. | |
1636 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works]) | |
1637 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl | |
1638 save_CFLAGS="$CFLAGS" | |
1639 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC" | |
1640 AC_TRY_COMPILE([], [], [dnl | |
1641 case $host_os in | |
1642 hpux9* | hpux10* | hpux11*) | |
1643 # On HP-UX, both CC and GCC only warn that PIC is supported... then | |
1644 # they create non-PIC objects. So, if there were any warnings, we | |
1645 # assume that PIC is not supported. | |
1646 if test -s conftest.err; then | |
1647 lt_cv_prog_cc_pic_works=no | |
1648 else | |
1649 lt_cv_prog_cc_pic_works=yes | |
1650 fi | |
1651 ;; | |
1652 *) | |
1653 lt_cv_prog_cc_pic_works=yes | |
1654 ;; | |
1655 esac | |
1656 ], [dnl | |
1657 lt_cv_prog_cc_pic_works=no | |
1658 ]) | |
1659 CFLAGS="$save_CFLAGS" | |
1660 ]) | |
1661 | |
1662 if test "X$lt_cv_prog_cc_pic_works" = Xno; then | |
1663 lt_cv_prog_cc_pic= | |
1664 lt_cv_prog_cc_can_build_shared=no | |
1665 else | |
1666 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic" | |
1667 fi | |
1668 | |
1669 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works]) | |
1670 fi | |
1671 ## | |
1672 ## END FIXME | |
1673 | |
1674 # Check for any special shared library compilation flags. | |
1675 if test -n "$lt_cv_prog_cc_shlib"; then | |
1676 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries]) | |
1677 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then : | |
1678 else | |
1679 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure]) | |
1680 lt_cv_prog_cc_can_build_shared=no | |
1681 fi | |
1682 fi | |
1683 | |
1684 ## FIXME: this should be a separate macro | |
1685 ## | |
1686 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works]) | |
1687 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl | |
1688 lt_cv_prog_cc_static_works=no | |
1689 save_LDFLAGS="$LDFLAGS" | |
1690 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static" | |
1691 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes]) | |
1692 LDFLAGS="$save_LDFLAGS" | |
1693 ]) | |
1694 | |
1695 # Belt *and* braces to stop my trousers falling down: | |
1696 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static= | |
1697 AC_MSG_RESULT([$lt_cv_prog_cc_static_works]) | |
1698 | |
1699 pic_flag="$lt_cv_prog_cc_pic" | |
1700 special_shlib_compile_flags="$lt_cv_prog_cc_shlib" | |
1701 wl="$lt_cv_prog_cc_wl" | |
1702 link_static_flag="$lt_cv_prog_cc_static" | |
1703 no_builtin_flag="$lt_cv_prog_cc_no_builtin" | |
1704 can_build_shared="$lt_cv_prog_cc_can_build_shared" | |
1705 ## | |
1706 ## END FIXME | |
1707 | |
1708 | |
1709 ## FIXME: this should be a separate macro | |
1710 ## | |
1711 # Check to see if options -o and -c are simultaneously supported by compiler | |
1712 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext]) | |
1713 AC_CACHE_VAL([lt_cv_compiler_c_o], [ | |
1714 $rm -r conftest 2>/dev/null | |
1715 mkdir conftest | |
1716 cd conftest | |
1717 echo "int some_variable = 0;" > conftest.$ac_ext | |
1718 mkdir out | |
1719 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers | |
1720 # that will create temporary files in the current directory regardless of | |
1721 # the output directory. Thus, making CWD read-only will cause this test | |
1722 # to fail, enabling locking or at least warning the user not to do parallel | |
1723 # builds. | |
1724 chmod -w . | |
1725 save_CFLAGS="$CFLAGS" | |
1726 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" | |
1727 compiler_c_o=no | |
1728 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then | |
1729 # The compiler can only warn and ignore the option if not recognized | |
1730 # So say no if there are warnings | |
1731 if test -s out/conftest.err; then | |
1732 lt_cv_compiler_c_o=no | |
1733 else | |
1734 lt_cv_compiler_c_o=yes | |
1735 fi | |
1736 else | |
1737 # Append any errors to the config.log. | |
1738 cat out/conftest.err 1>&AC_FD_CC | |
1739 lt_cv_compiler_c_o=no | |
1740 fi | |
1741 CFLAGS="$save_CFLAGS" | |
1742 chmod u+w . | |
1743 $rm conftest* out/* | |
1744 rmdir out | |
1745 cd .. | |
1746 rmdir conftest | |
1747 $rm -r conftest 2>/dev/null | |
1748 ]) | |
1749 compiler_c_o=$lt_cv_compiler_c_o | |
1750 AC_MSG_RESULT([$compiler_c_o]) | |
1751 | |
1752 if test x"$compiler_c_o" = x"yes"; then | |
1753 # Check to see if we can write to a .lo | |
1754 AC_MSG_CHECKING([if $compiler supports -c -o file.lo]) | |
1755 AC_CACHE_VAL([lt_cv_compiler_o_lo], [ | |
1756 lt_cv_compiler_o_lo=no | |
1757 save_CFLAGS="$CFLAGS" | |
1758 CFLAGS="$CFLAGS -c -o conftest.lo" | |
1759 save_objext="$ac_objext" | |
1760 ac_objext=lo | |
1761 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl | |
1762 # The compiler can only warn and ignore the option if not recognized | |
1763 # So say no if there are warnings | |
1764 if test -s conftest.err; then | |
1765 lt_cv_compiler_o_lo=no | |
1766 else | |
1767 lt_cv_compiler_o_lo=yes | |
1768 fi | |
1769 ]) | |
1770 ac_objext="$save_objext" | |
1771 CFLAGS="$save_CFLAGS" | |
1772 ]) | |
1773 compiler_o_lo=$lt_cv_compiler_o_lo | |
1774 AC_MSG_RESULT([$compiler_o_lo]) | |
1775 else | |
1776 compiler_o_lo=no | |
1777 fi | |
1778 ## | |
1779 ## END FIXME | |
1780 | |
1781 ## FIXME: this should be a separate macro | |
1782 ## | |
1783 # Check to see if we can do hard links to lock some files if needed | |
1784 hard_links="nottested" | |
1785 if test "$compiler_c_o" = no && test "$need_locks" != no; then | |
1786 # do not overwrite the value of need_locks provided by the user | |
1787 AC_MSG_CHECKING([if we can lock with hard links]) | |
1788 hard_links=yes | |
1789 $rm conftest* | |
1790 ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
1791 touch conftest.a | |
1792 ln conftest.a conftest.b 2>&5 || hard_links=no | |
1793 ln conftest.a conftest.b 2>/dev/null && hard_links=no | |
1794 AC_MSG_RESULT([$hard_links]) | |
1795 if test "$hard_links" = no; then | |
1796 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe]) | |
1797 need_locks=warn | |
1798 fi | |
1799 else | |
1800 need_locks=no | |
1801 fi | |
1802 ## | |
1803 ## END FIXME | |
1804 | |
1805 ## FIXME: this should be a separate macro | |
1806 ## | |
1807 if test "$GCC" = yes; then | |
1808 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler | |
1809 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions]) | |
1810 echo "int some_variable = 0;" > conftest.$ac_ext | |
1811 save_CFLAGS="$CFLAGS" | |
1812 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext" | |
1813 compiler_rtti_exceptions=no | |
1814 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl | |
1815 # The compiler can only warn and ignore the option if not recognized | |
1816 # So say no if there are warnings | |
1817 if test -s conftest.err; then | |
1818 compiler_rtti_exceptions=no | |
1819 else | |
1820 compiler_rtti_exceptions=yes | |
1821 fi | |
1822 ]) | |
1823 CFLAGS="$save_CFLAGS" | |
1824 AC_MSG_RESULT([$compiler_rtti_exceptions]) | |
1825 | |
1826 if test "$compiler_rtti_exceptions" = "yes"; then | |
1827 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' | |
1828 else | |
1829 no_builtin_flag=' -fno-builtin' | |
1830 fi | |
1831 fi | |
1832 ## | |
1833 ## END FIXME | |
1834 | |
1835 ## FIXME: this should be a separate macro | |
1836 ## | |
1837 # See if the linker supports building shared libraries. | |
1838 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries]) | |
1839 | |
1840 allow_undefined_flag= | |
1841 no_undefined_flag= | |
1842 need_lib_prefix=unknown | |
1843 need_version=unknown | |
1844 # when you set need_version to no, make sure it does not cause -set_version | |
1845 # flags to be left without arguments | |
1846 archive_cmds= | |
1847 archive_expsym_cmds= | |
1848 old_archive_from_new_cmds= | |
1849 old_archive_from_expsyms_cmds= | |
1850 export_dynamic_flag_spec= | |
1851 whole_archive_flag_spec= | |
1852 thread_safe_flag_spec= | |
1853 hardcode_into_libs=no | |
1854 hardcode_libdir_flag_spec= | |
1855 hardcode_libdir_separator= | |
1856 hardcode_direct=no | |
1857 hardcode_minus_L=no | |
1858 hardcode_shlibpath_var=unsupported | |
1859 runpath_var= | |
1860 link_all_deplibs=unknown | |
1861 always_export_symbols=no | |
1862 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' | |
1863 # include_expsyms should be a list of space-separated symbols to be *always* | |
1864 # included in the symbol list | |
1865 include_expsyms= | |
1866 # exclude_expsyms can be an egrep regular expression of symbols to exclude | |
1867 # it will be wrapped by ` (' and `)$', so one must not match beginning or | |
1868 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', | |
1869 # as well as any symbol that contains `d'. | |
1870 exclude_expsyms="_GLOBAL_OFFSET_TABLE_" | |
1871 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out | |
1872 # platforms (ab)use it in PIC code, but their linkers get confused if | |
1873 # the symbol is explicitly referenced. Since portable code cannot | |
1874 # rely on this symbol name, it's probably fine to never include it in | |
1875 # preloaded symbol tables. | |
1876 extract_expsyms_cmds= | |
1877 | |
1878 case $host_os in | |
1879 cygwin* | mingw* | pw32*) | |
1880 # FIXME: the MSVC++ port hasn't been tested in a loooong time | |
1881 # When not using gcc, we currently assume that we are using | |
1882 # Microsoft Visual C++. | |
1883 if test "$GCC" != yes; then | |
1884 with_gnu_ld=no | |
1885 fi | |
1886 ;; | |
1887 openbsd*) | |
1888 with_gnu_ld=no | |
1889 ;; | |
1890 esac | |
1891 | |
1892 ld_shlibs=yes | |
1893 if test "$with_gnu_ld" = yes; then | |
1894 # If archive_cmds runs LD, not CC, wlarc should be empty | |
1895 wlarc='${wl}' | |
1896 | |
1897 # See if GNU ld supports shared libraries. | |
1898 case $host_os in | |
1899 aix3* | aix4* | aix5*) | |
1900 # On AIX, the GNU linker is very broken | |
1901 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available. | |
1902 ld_shlibs=no | |
1903 cat <<EOF 1>&2 | |
1904 | |
1905 *** Warning: the GNU linker, at least up to release 2.9.1, is reported | |
1906 *** to be unable to reliably create shared libraries on AIX. | |
1907 *** Therefore, libtool is disabling shared libraries support. If you | |
1908 *** really care for shared libraries, you may want to modify your PATH | |
1909 *** so that a non-GNU linker is found, and then restart. | |
1910 | |
1911 EOF | |
1912 ;; | |
1913 | |
1914 amigaos*) | |
1915 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | |
1916 hardcode_libdir_flag_spec='-L$libdir' | |
1917 hardcode_minus_L=yes | |
1918 | |
1919 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports | |
1920 # that the semantics of dynamic libraries on AmigaOS, at least up | |
1921 # to version 4, is to share data among multiple programs linked | |
1922 # with the same dynamic library. Since this doesn't match the | |
1923 # behavior of shared libraries on other platforms, we can use | |
1924 # them. | |
1925 ld_shlibs=no | |
1926 ;; | |
1927 | |
1928 beos*) | |
1929 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | |
1930 allow_undefined_flag=unsupported | |
1931 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc | |
1932 # support --undefined. This deserves some investigation. FIXME | |
1933 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
1934 else | |
1935 ld_shlibs=no | |
1936 fi | |
1937 ;; | |
1938 | |
1939 cygwin* | mingw* | pw32*) | |
1940 # hardcode_libdir_flag_spec is actually meaningless, as there is | |
1941 # no search path for DLLs. | |
1942 hardcode_libdir_flag_spec='-L$libdir' | |
1943 allow_undefined_flag=unsupported | |
1944 always_export_symbols=yes | |
1945 | |
1946 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \ | |
1947 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~ | |
1948 test -f $output_objdir/impgen.exe || (cd $output_objdir && \ | |
1949 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \ | |
1950 else $CC -o impgen impgen.c ; fi)~ | |
1951 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def' | |
1952 | |
1953 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib' | |
1954 | |
1955 # cygwin and mingw dlls have different entry points and sets of symbols | |
1956 # to exclude. | |
1957 # FIXME: what about values for MSVC? | |
1958 dll_entry=__cygwin_dll_entry@12 | |
1959 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~ | |
1960 case $host_os in | |
1961 mingw*) | |
1962 # mingw values | |
1963 dll_entry=_DllMainCRTStartup@12 | |
1964 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~ | |
1965 ;; | |
1966 esac | |
1967 | |
1968 # mingw and cygwin differ, and it's simplest to just exclude the union | |
1969 # of the two symbol sets. | |
1970 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12 | |
1971 | |
1972 # recent cygwin and mingw systems supply a stub DllMain which the user | |
1973 # can override, but on older systems we have to supply one (in ltdll.c) | |
1974 if test "x$lt_cv_need_dllmain" = "xyes"; then | |
1975 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext " | |
1976 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~ | |
1977 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~' | |
1978 else | |
1979 ltdll_obj= | |
1980 ltdll_cmds= | |
1981 fi | |
1982 | |
1983 # Extract the symbol export list from an `--export-all' def file, | |
1984 # then regenerate the def file from the symbol export list, so that | |
1985 # the compiled dll only exports the symbol export list. | |
1986 # Be careful not to strip the DATA tag left be newer dlltools. | |
1987 export_symbols_cmds="$ltdll_cmds"' | |
1988 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~ | |
1989 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols' | |
1990 | |
1991 # If the export-symbols file already is a .def file (1st line | |
1992 # is EXPORTS), use it as is. | |
1993 # If DATA tags from a recent dlltool are present, honour them! | |
1994 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then | |
1995 cp $export_symbols $output_objdir/$soname-def; | |
1996 else | |
1997 echo EXPORTS > $output_objdir/$soname-def; | |
1998 _lt_hint=1; | |
1999 cat $export_symbols | while read symbol; do | |
2000 set dummy \$symbol; | |
2001 case \[$]# in | |
2002 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;; | |
2003 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;; | |
2004 esac; | |
2005 _lt_hint=`expr 1 + \$_lt_hint`; | |
2006 done; | |
2007 fi~ | |
2008 '"$ltdll_cmds"' | |
2009 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ | |
2010 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~ | |
2011 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~ | |
2012 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~ | |
2013 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags' | |
2014 ;; | |
2015 | |
2016 netbsd*) | |
2017 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
2018 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' | |
2019 wlarc= | |
2020 else | |
2021 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
2022 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
2023 fi | |
2024 ;; | |
2025 | |
2026 solaris* | sysv5*) | |
2027 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then | |
2028 ld_shlibs=no | |
2029 cat <<EOF 1>&2 | |
2030 | |
2031 *** Warning: The releases 2.8.* of the GNU linker cannot reliably | |
2032 *** create shared libraries on Solaris systems. Therefore, libtool | |
2033 *** is disabling shared libraries support. We urge you to upgrade GNU | |
2034 *** binutils to release 2.9.1 or newer. Another option is to modify | |
2035 *** your PATH or compiler configuration so that the native linker is | |
2036 *** used, and then restart. | |
2037 | |
2038 EOF | |
2039 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | |
2040 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
2041 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
2042 else | |
2043 ld_shlibs=no | |
2044 fi | |
2045 ;; | |
2046 | |
2047 sunos4*) | |
2048 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
2049 wlarc= | |
2050 hardcode_direct=yes | |
2051 hardcode_shlibpath_var=no | |
2052 ;; | |
2053 | |
2054 *) | |
2055 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then | |
2056 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' | |
2057 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' | |
2058 else | |
2059 ld_shlibs=no | |
2060 fi | |
2061 ;; | |
2062 esac | |
2063 | |
2064 if test "$ld_shlibs" = yes; then | |
2065 runpath_var=LD_RUN_PATH | |
2066 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' | |
2067 export_dynamic_flag_spec='${wl}--export-dynamic' | |
2068 case $host_os in | |
2069 cygwin* | mingw* | pw32*) | |
2070 # dlltool doesn't understand --whole-archive et. al. | |
2071 whole_archive_flag_spec= | |
2072 ;; | |
2073 *) | |
2074 # ancient GNU ld didn't support --whole-archive et. al. | |
2075 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then | |
2076 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' | |
2077 else | |
2078 whole_archive_flag_spec= | |
2079 fi | |
2080 ;; | |
2081 esac | |
2082 fi | |
2083 else | |
2084 # PORTME fill in a description of your system's linker (not GNU ld) | |
2085 case $host_os in | |
2086 aix3*) | |
2087 allow_undefined_flag=unsupported | |
2088 always_export_symbols=yes | |
2089 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' | |
2090 # Note: this linker hardcodes the directories in LIBPATH if there | |
2091 # are no directories specified by -L. | |
2092 hardcode_minus_L=yes | |
2093 if test "$GCC" = yes && test -z "$link_static_flag"; then | |
2094 # Neither direct hardcoding nor static linking is supported with a | |
2095 # broken collect2. | |
2096 hardcode_direct=unsupported | |
2097 fi | |
2098 ;; | |
2099 | |
2100 aix4* | aix5*) | |
2101 if test "$host_cpu" = ia64; then | |
2102 # On IA64, the linker does run time linking by default, so we don't | |
2103 # have to do anything special. | |
2104 aix_use_runtimelinking=no | |
2105 exp_sym_flag='-Bexport' | |
2106 no_entry_flag="" | |
2107 else | |
2108 aix_use_runtimelinking=no | |
2109 | |
2110 # Test if we are trying to use run time linking or normal | |
2111 # AIX style linking. If -brtl is somewhere in LDFLAGS, we | |
2112 # need to do runtime linking. | |
2113 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) | |
2114 for ld_flag in $LDFLAGS; do | |
2115 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then | |
2116 aix_use_runtimelinking=yes | |
2117 break | |
2118 fi | |
2119 done | |
2120 esac | |
2121 | |
2122 exp_sym_flag='-bexport' | |
2123 no_entry_flag='-bnoentry' | |
2124 fi | |
2125 | |
2126 # When large executables or shared objects are built, AIX ld can | |
2127 # have problems creating the table of contents. If linking a library | |
2128 # or program results in "error TOC overflow" add -mminimal-toc to | |
2129 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not | |
2130 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. | |
2131 | |
2132 hardcode_direct=yes | |
2133 archive_cmds='' | |
2134 hardcode_libdir_separator=':' | |
2135 if test "$GCC" = yes; then | |
2136 case $host_os in aix4.[[012]]|aix4.[[012]].*) | |
2137 collect2name=`${CC} -print-prog-name=collect2` | |
2138 if test -f "$collect2name" && \ | |
2139 strings "$collect2name" | grep resolve_lib_name >/dev/null | |
2140 then | |
2141 # We have reworked collect2 | |
2142 hardcode_direct=yes | |
2143 else | |
2144 # We have old collect2 | |
2145 hardcode_direct=unsupported | |
2146 # It fails to find uninstalled libraries when the uninstalled | |
2147 # path is not listed in the libpath. Setting hardcode_minus_L | |
2148 # to unsupported forces relinking | |
2149 hardcode_minus_L=yes | |
2150 hardcode_libdir_flag_spec='-L$libdir' | |
2151 hardcode_libdir_separator= | |
2152 fi | |
2153 esac | |
2154 | |
2155 shared_flag='-shared' | |
2156 else | |
2157 # not using gcc | |
2158 if test "$host_cpu" = ia64; then | |
2159 shared_flag='${wl}-G' | |
2160 else | |
2161 if test "$aix_use_runtimelinking" = yes; then | |
2162 shared_flag='${wl}-G' | |
2163 else | |
2164 shared_flag='${wl}-bM:SRE' | |
2165 fi | |
2166 fi | |
2167 fi | |
2168 | |
2169 # It seems that -bexpall can do strange things, so it is better to | |
2170 # generate a list of symbols to export. | |
2171 always_export_symbols=yes | |
2172 if test "$aix_use_runtimelinking" = yes; then | |
2173 # Warning - without using the other runtime loading flags (-brtl), | |
2174 # -berok will link without error, but may produce a broken library. | |
2175 allow_undefined_flag='-berok' | |
2176 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' | |
2177 archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" | |
2178 else | |
2179 if test "$host_cpu" = ia64; then | |
2180 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' | |
2181 allow_undefined_flag="-z nodefs" | |
2182 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" | |
2183 else | |
2184 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' | |
2185 # Warning - without using the other run time loading flags, | |
2186 # -berok will link without error, but may produce a broken library. | |
2187 allow_undefined_flag='${wl}-berok' | |
2188 # This is a bit strange, but is similar to how AIX traditionally builds | |
2189 # it's shared libraries. | |
2190 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname' | |
2191 fi | |
2192 fi | |
2193 ;; | |
2194 | |
2195 amigaos*) | |
2196 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' | |
2197 hardcode_libdir_flag_spec='-L$libdir' | |
2198 hardcode_minus_L=yes | |
2199 # see comment about different semantics on the GNU ld section | |
2200 ld_shlibs=no | |
2201 ;; | |
2202 | |
2203 cygwin* | mingw* | pw32*) | |
2204 # When not using gcc, we currently assume that we are using | |
2205 # Microsoft Visual C++. | |
2206 # hardcode_libdir_flag_spec is actually meaningless, as there is | |
2207 # no search path for DLLs. | |
2208 hardcode_libdir_flag_spec=' ' | |
2209 allow_undefined_flag=unsupported | |
2210 # Tell ltmain to make .lib files, not .a files. | |
2211 libext=lib | |
2212 # FIXME: Setting linknames here is a bad hack. | |
2213 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' | |
2214 # The linker will automatically build a .lib file if we build a DLL. | |
2215 old_archive_from_new_cmds='true' | |
2216 # FIXME: Should let the user specify the lib program. | |
2217 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' | |
2218 fix_srcfile_path='`cygpath -w "$srcfile"`' | |
2219 ;; | |
2220 | |
2221 darwin* | rhapsody*) | |
2222 case "$host_os" in | |
2223 rhapsody* | darwin1.[[012]]) | |
2224 allow_undefined_flag='-undefined suppress' | |
2225 ;; | |
2226 *) # Darwin 1.3 on | |
2227 allow_undefined_flag='-flat_namespace -undefined suppress' | |
2228 ;; | |
2229 esac | |
2230 # FIXME: Relying on posixy $() will cause problems for | |
2231 # cross-compilation, but unfortunately the echo tests do not | |
2232 # yet detect zsh echo's removal of \ escapes. | |
2233 archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring' | |
2234 # We need to add '_' to the symbols in $export_symbols first | |
2235 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols' | |
2236 hardcode_direct=yes | |
2237 hardcode_shlibpath_var=no | |
2238 whole_archive_flag_spec='-all_load $convenience' | |
2239 ;; | |
2240 | |
2241 freebsd1*) | |
2242 ld_shlibs=no | |
2243 ;; | |
2244 | |
2245 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor | |
2246 # support. Future versions do this automatically, but an explicit c++rt0.o | |
2247 # does not break anything, and helps significantly (at the cost of a little | |
2248 # extra space). | |
2249 freebsd2.2*) | |
2250 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' | |
2251 hardcode_libdir_flag_spec='-R$libdir' | |
2252 hardcode_direct=yes | |
2253 hardcode_shlibpath_var=no | |
2254 ;; | |
2255 | |
2256 # Unfortunately, older versions of FreeBSD 2 do not have this feature. | |
2257 freebsd2*) | |
2258 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
2259 hardcode_direct=yes | |
2260 hardcode_minus_L=yes | |
2261 hardcode_shlibpath_var=no | |
2262 ;; | |
2263 | |
2264 # FreeBSD 3 and greater uses gcc -shared to do shared libraries. | |
2265 freebsd*) | |
2266 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' | |
2267 hardcode_libdir_flag_spec='-R$libdir' | |
2268 hardcode_direct=yes | |
2269 hardcode_shlibpath_var=no | |
2270 ;; | |
2271 | |
2272 hpux9* | hpux10* | hpux11*) | |
2273 case $host_os in | |
2274 hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; | |
2275 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; | |
2276 esac | |
2277 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' | |
2278 hardcode_libdir_separator=: | |
2279 hardcode_direct=yes | |
2280 hardcode_minus_L=yes # Not in the search PATH, but as the default | |
2281 # location of the library. | |
2282 export_dynamic_flag_spec='${wl}-E' | |
2283 ;; | |
2284 | |
2285 irix5* | irix6*) | |
2286 if test "$GCC" = yes; then | |
2287 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
2288 else | |
2289 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | |
2290 fi | |
2291 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
2292 hardcode_libdir_separator=: | |
2293 link_all_deplibs=yes | |
2294 ;; | |
2295 | |
2296 netbsd*) | |
2297 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
2298 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out | |
2299 else | |
2300 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF | |
2301 fi | |
2302 hardcode_libdir_flag_spec='-R$libdir' | |
2303 hardcode_direct=yes | |
2304 hardcode_shlibpath_var=no | |
2305 ;; | |
2306 | |
2307 newsos6) | |
2308 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2309 hardcode_direct=yes | |
2310 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
2311 hardcode_libdir_separator=: | |
2312 hardcode_shlibpath_var=no | |
2313 ;; | |
2314 | |
2315 openbsd*) | |
2316 hardcode_direct=yes | |
2317 hardcode_shlibpath_var=no | |
2318 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
2319 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' | |
2320 hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | |
2321 export_dynamic_flag_spec='${wl}-E' | |
2322 else | |
2323 case "$host_os" in | |
2324 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) | |
2325 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' | |
2326 hardcode_libdir_flag_spec='-R$libdir' | |
2327 ;; | |
2328 *) | |
2329 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags' | |
2330 hardcode_libdir_flag_spec='${wl}-rpath,$libdir' | |
2331 ;; | |
2332 esac | |
2333 fi | |
2334 ;; | |
2335 | |
2336 os2*) | |
2337 hardcode_libdir_flag_spec='-L$libdir' | |
2338 hardcode_minus_L=yes | |
2339 allow_undefined_flag=unsupported | |
2340 archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' | |
2341 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' | |
2342 ;; | |
2343 | |
2344 osf3*) | |
2345 if test "$GCC" = yes; then | |
2346 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | |
2347 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
2348 else | |
2349 allow_undefined_flag=' -expect_unresolved \*' | |
2350 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | |
2351 fi | |
2352 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
2353 hardcode_libdir_separator=: | |
2354 ;; | |
2355 | |
2356 osf4* | osf5*) # as osf3* with the addition of -msym flag | |
2357 if test "$GCC" = yes; then | |
2358 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' | |
2359 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' | |
2360 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' | |
2361 else | |
2362 allow_undefined_flag=' -expect_unresolved \*' | |
2363 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' | |
2364 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ | |
2365 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' | |
2366 | |
2367 #Both c and cxx compiler support -rpath directly | |
2368 hardcode_libdir_flag_spec='-rpath $libdir' | |
2369 fi | |
2370 hardcode_libdir_separator=: | |
2371 ;; | |
2372 | |
2373 sco3.2v5*) | |
2374 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2375 hardcode_shlibpath_var=no | |
2376 runpath_var=LD_RUN_PATH | |
2377 hardcode_runpath_var=yes | |
2378 export_dynamic_flag_spec='${wl}-Bexport' | |
2379 ;; | |
2380 | |
2381 solaris*) | |
2382 # gcc --version < 3.0 without binutils cannot create self contained | |
2383 # shared libraries reliably, requiring libgcc.a to resolve some of | |
2384 # the object symbols generated in some cases. Libraries that use | |
2385 # assert need libgcc.a to resolve __eprintf, for example. Linking | |
2386 # a copy of libgcc.a into every shared library to guarantee resolving | |
2387 # such symbols causes other problems: According to Tim Van Holder | |
2388 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate | |
2389 # (to the application) exception stack for one thing. | |
2390 no_undefined_flag=' -z defs' | |
2391 if test "$GCC" = yes; then | |
2392 case `$CC --version 2>/dev/null` in | |
2393 [[12]].*) | |
2394 cat <<EOF 1>&2 | |
2395 | |
2396 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably | |
2397 *** create self contained shared libraries on Solaris systems, without | |
2398 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling | |
2399 *** -no-undefined support, which will at least allow you to build shared | |
2400 *** libraries. However, you may find that when you link such libraries | |
2401 *** into an application without using GCC, you have to manually add | |
2402 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to | |
2403 *** upgrade to a newer version of GCC. Another option is to rebuild your | |
2404 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer. | |
2405 | |
2406 EOF | |
2407 no_undefined_flag= | |
2408 ;; | |
2409 esac | |
2410 fi | |
2411 # $CC -shared without GNU ld will not create a library from C++ | |
2412 # object files and a static libstdc++, better avoid it by now | |
2413 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2414 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
2415 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | |
2416 hardcode_libdir_flag_spec='-R$libdir' | |
2417 hardcode_shlibpath_var=no | |
2418 case $host_os in | |
2419 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; | |
2420 *) # Supported since Solaris 2.6 (maybe 2.5.1?) | |
2421 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; | |
2422 esac | |
2423 link_all_deplibs=yes | |
2424 ;; | |
2425 | |
2426 sunos4*) | |
2427 if test "x$host_vendor" = xsequent; then | |
2428 # Use $CC to link under sequent, because it throws in some extra .o | |
2429 # files that make .init and .fini sections work. | |
2430 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' | |
2431 else | |
2432 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' | |
2433 fi | |
2434 hardcode_libdir_flag_spec='-L$libdir' | |
2435 hardcode_direct=yes | |
2436 hardcode_minus_L=yes | |
2437 hardcode_shlibpath_var=no | |
2438 ;; | |
2439 | |
2440 sysv4) | |
2441 if test "x$host_vendor" = xsno; then | |
2442 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2443 hardcode_direct=yes # is this really true??? | |
2444 else | |
2445 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2446 hardcode_direct=no #Motorola manual says yes, but my tests say they lie | |
2447 fi | |
2448 runpath_var='LD_RUN_PATH' | |
2449 hardcode_shlibpath_var=no | |
2450 ;; | |
2451 | |
2452 sysv4.3*) | |
2453 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2454 hardcode_shlibpath_var=no | |
2455 export_dynamic_flag_spec='-Bexport' | |
2456 ;; | |
2457 | |
2458 sysv5*) | |
2459 no_undefined_flag=' -z text' | |
2460 # $CC -shared without GNU ld will not create a library from C++ | |
2461 # object files and a static libstdc++, better avoid it by now | |
2462 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2463 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ | |
2464 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' | |
2465 hardcode_libdir_flag_spec= | |
2466 hardcode_shlibpath_var=no | |
2467 runpath_var='LD_RUN_PATH' | |
2468 ;; | |
2469 | |
2470 uts4*) | |
2471 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2472 hardcode_libdir_flag_spec='-L$libdir' | |
2473 hardcode_shlibpath_var=no | |
2474 ;; | |
2475 | |
2476 dgux*) | |
2477 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2478 hardcode_libdir_flag_spec='-L$libdir' | |
2479 hardcode_shlibpath_var=no | |
2480 ;; | |
2481 | |
2482 sysv4*MP*) | |
2483 if test -d /usr/nec; then | |
2484 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' | |
2485 hardcode_shlibpath_var=no | |
2486 runpath_var=LD_RUN_PATH | |
2487 hardcode_runpath_var=yes | |
2488 ld_shlibs=yes | |
2489 fi | |
2490 ;; | |
2491 | |
2492 sysv4.2uw2*) | |
2493 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' | |
2494 hardcode_direct=yes | |
2495 hardcode_minus_L=no | |
2496 hardcode_shlibpath_var=no | |
2497 hardcode_runpath_var=yes | |
2498 runpath_var=LD_RUN_PATH | |
2499 ;; | |
2500 | |
2501 sysv5uw7* | unixware7*) | |
2502 no_undefined_flag='${wl}-z ${wl}text' | |
2503 if test "$GCC" = yes; then | |
2504 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
2505 else | |
2506 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' | |
2507 fi | |
2508 runpath_var='LD_RUN_PATH' | |
2509 hardcode_shlibpath_var=no | |
2510 ;; | |
2511 | |
2512 *) | |
2513 ld_shlibs=no | |
2514 ;; | |
2515 esac | |
2516 fi | |
2517 AC_MSG_RESULT([$ld_shlibs]) | |
2518 test "$ld_shlibs" = no && can_build_shared=no | |
2519 ## | |
2520 ## END FIXME | |
2521 | |
2522 ## FIXME: this should be a separate macro | |
2523 ## | |
2524 # Check hardcoding attributes. | |
2525 AC_MSG_CHECKING([how to hardcode library paths into programs]) | |
2526 hardcode_action= | |
2527 if test -n "$hardcode_libdir_flag_spec" || \ | |
2528 test -n "$runpath_var"; then | |
2529 | |
2530 # We can hardcode non-existant directories. | |
2531 if test "$hardcode_direct" != no && | |
2532 # If the only mechanism to avoid hardcoding is shlibpath_var, we | |
2533 # have to relink, otherwise we might link with an installed library | |
2534 # when we should be linking with a yet-to-be-installed one | |
2535 ## test "$hardcode_shlibpath_var" != no && | |
2536 test "$hardcode_minus_L" != no; then | |
2537 # Linking always hardcodes the temporary library directory. | |
2538 hardcode_action=relink | |
2539 else | |
2540 # We can link without hardcoding, and we can hardcode nonexisting dirs. | |
2541 hardcode_action=immediate | |
2542 fi | |
2543 else | |
2544 # We cannot hardcode anything, or else we can only hardcode existing | |
2545 # directories. | |
2546 hardcode_action=unsupported | |
2547 fi | |
2548 AC_MSG_RESULT([$hardcode_action]) | |
2549 ## | |
2550 ## END FIXME | |
2551 | |
2552 ## FIXME: this should be a separate macro | |
2553 ## | |
2554 striplib= | |
2555 old_striplib= | |
2556 AC_MSG_CHECKING([whether stripping libraries is possible]) | |
2557 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then | |
2558 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" | |
2559 test -z "$striplib" && striplib="$STRIP --strip-unneeded" | |
2560 AC_MSG_RESULT([yes]) | |
2561 else | |
2562 AC_MSG_RESULT([no]) | |
2563 fi | |
2564 ## | |
2565 ## END FIXME | |
2566 | |
2567 reload_cmds='$LD$reload_flag -o $output$reload_objs' | |
2568 test -z "$deplibs_check_method" && deplibs_check_method=unknown | |
2569 | |
2570 ## FIXME: this should be a separate macro | |
2571 ## | |
2572 # PORTME Fill in your ld.so characteristics | |
2573 AC_MSG_CHECKING([dynamic linker characteristics]) | |
2574 library_names_spec= | |
2575 libname_spec='lib$name' | |
2576 soname_spec= | |
2577 postinstall_cmds= | |
2578 postuninstall_cmds= | |
2579 finish_cmds= | |
2580 finish_eval= | |
2581 shlibpath_var= | |
2582 shlibpath_overrides_runpath=unknown | |
2583 version_type=none | |
2584 dynamic_linker="$host_os ld.so" | |
2585 sys_lib_dlsearch_path_spec="/lib /usr/lib" | |
2586 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" | |
2587 | |
2588 case $host_os in | |
2589 aix3*) | |
2590 version_type=linux | |
2591 library_names_spec='${libname}${release}.so$versuffix $libname.a' | |
2592 shlibpath_var=LIBPATH | |
2593 | |
2594 # AIX has no versioning support, so we append a major version to the name. | |
2595 soname_spec='${libname}${release}.so$major' | |
2596 ;; | |
2597 | |
2598 aix4* | aix5*) | |
2599 version_type=linux | |
2600 if test "$host_cpu" = ia64; then | |
2601 # AIX 5 supports IA64 | |
2602 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so' | |
2603 shlibpath_var=LD_LIBRARY_PATH | |
2604 else | |
2605 # With GCC up to 2.95.x, collect2 would create an import file | |
2606 # for dependence libraries. The import file would start with | |
2607 # the line `#! .'. This would cause the generated library to | |
2608 # depend on `.', always an invalid library. This was fixed in | |
2609 # development snapshots of GCC prior to 3.0. | |
2610 case $host_os in | |
2611 aix4 | aix4.[[01]] | aix4.[[01]].*) | |
2612 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' | |
2613 echo ' yes ' | |
2614 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then | |
2615 : | |
2616 else | |
2617 can_build_shared=no | |
2618 fi | |
2619 ;; | |
2620 esac | |
2621 # AIX (on Power*) has no versioning support, so currently we can | |
2622 # not hardcode correct soname into executable. Probably we can | |
2623 # add versioning support to collect2, so additional links can | |
2624 # be useful in future. | |
2625 if test "$aix_use_runtimelinking" = yes; then | |
2626 # If using run time linking (on AIX 4.2 or later) use lib<name>.so | |
2627 # instead of lib<name>.a to let people know that these are not | |
2628 # typical AIX shared libraries. | |
2629 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2630 else | |
2631 # We preserve .a as extension for shared libraries through AIX4.2 | |
2632 # and later when we are not doing run time linking. | |
2633 library_names_spec='${libname}${release}.a $libname.a' | |
2634 soname_spec='${libname}${release}.so$major' | |
2635 fi | |
2636 shlibpath_var=LIBPATH | |
2637 fi | |
2638 ;; | |
2639 | |
2640 amigaos*) | |
2641 library_names_spec='$libname.ixlibrary $libname.a' | |
2642 # Create ${libname}_ixlibrary.a entries in /sys/libs. | |
2643 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' | |
2644 ;; | |
2645 | |
2646 beos*) | |
2647 library_names_spec='${libname}.so' | |
2648 dynamic_linker="$host_os ld.so" | |
2649 shlibpath_var=LIBRARY_PATH | |
2650 ;; | |
2651 | |
2652 bsdi4*) | |
2653 version_type=linux | |
2654 need_version=no | |
2655 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2656 soname_spec='${libname}${release}.so$major' | |
2657 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' | |
2658 shlibpath_var=LD_LIBRARY_PATH | |
2659 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" | |
2660 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" | |
2661 export_dynamic_flag_spec=-rdynamic | |
2662 # the default ld.so.conf also contains /usr/contrib/lib and | |
2663 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow | |
2664 # libtool to hard-code these into programs | |
2665 ;; | |
2666 | |
2667 cygwin* | mingw* | pw32*) | |
2668 version_type=windows | |
2669 need_version=no | |
2670 need_lib_prefix=no | |
2671 case $GCC,$host_os in | |
2672 yes,cygwin*) | |
2673 library_names_spec='$libname.dll.a' | |
2674 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' | |
2675 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~ | |
2676 dldir=$destdir/`dirname \$dlpath`~ | |
2677 test -d \$dldir || mkdir -p \$dldir~ | |
2678 $install_prog .libs/$dlname \$dldir/$dlname' | |
2679 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~ | |
2680 dlpath=$dir/\$dldll~ | |
2681 $rm \$dlpath' | |
2682 ;; | |
2683 yes,mingw*) | |
2684 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll' | |
2685 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` | |
2686 ;; | |
2687 yes,pw32*) | |
2688 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll' | |
2689 ;; | |
2690 *) | |
2691 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib' | |
2692 ;; | |
2693 esac | |
2694 dynamic_linker='Win32 ld.exe' | |
2695 # FIXME: first we should search . and the directory the executable is in | |
2696 shlibpath_var=PATH | |
2697 ;; | |
2698 | |
2699 darwin* | rhapsody*) | |
2700 dynamic_linker="$host_os dyld" | |
2701 version_type=darwin | |
2702 need_lib_prefix=no | |
2703 need_version=no | |
2704 # FIXME: Relying on posixy $() will cause problems for | |
2705 # cross-compilation, but unfortunately the echo tests do not | |
2706 # yet detect zsh echo's removal of \ escapes. | |
2707 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' | |
2708 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)' | |
2709 shlibpath_overrides_runpath=yes | |
2710 shlibpath_var=DYLD_LIBRARY_PATH | |
2711 ;; | |
2712 | |
2713 freebsd1*) | |
2714 dynamic_linker=no | |
2715 ;; | |
2716 | |
2717 freebsd*) | |
2718 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` | |
2719 version_type=freebsd-$objformat | |
2720 case $version_type in | |
2721 freebsd-elf*) | |
2722 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' | |
2723 need_version=no | |
2724 need_lib_prefix=no | |
2725 ;; | |
2726 freebsd-*) | |
2727 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' | |
2728 need_version=yes | |
2729 ;; | |
2730 esac | |
2731 shlibpath_var=LD_LIBRARY_PATH | |
2732 case $host_os in | |
2733 freebsd2*) | |
2734 shlibpath_overrides_runpath=yes | |
2735 ;; | |
2736 *) | |
2737 shlibpath_overrides_runpath=no | |
2738 hardcode_into_libs=yes | |
2739 ;; | |
2740 esac | |
2741 ;; | |
2742 | |
2743 gnu*) | |
2744 version_type=linux | |
2745 need_lib_prefix=no | |
2746 need_version=no | |
2747 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so' | |
2748 soname_spec='${libname}${release}.so$major' | |
2749 shlibpath_var=LD_LIBRARY_PATH | |
2750 hardcode_into_libs=yes | |
2751 ;; | |
2752 | |
2753 hpux9* | hpux10* | hpux11*) | |
2754 # Give a soname corresponding to the major version so that dld.sl refuses to | |
2755 # link against other versions. | |
2756 dynamic_linker="$host_os dld.sl" | |
2757 version_type=sunos | |
2758 need_lib_prefix=no | |
2759 need_version=no | |
2760 shlibpath_var=SHLIB_PATH | |
2761 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH | |
2762 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' | |
2763 soname_spec='${libname}${release}.sl$major' | |
2764 # HP-UX runs *really* slowly unless shared libraries are mode 555. | |
2765 postinstall_cmds='chmod 555 $lib' | |
2766 ;; | |
2767 | |
2768 irix5* | irix6*) | |
2769 version_type=irix | |
2770 need_lib_prefix=no | |
2771 need_version=no | |
2772 soname_spec='${libname}${release}.so$major' | |
2773 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so' | |
2774 case $host_os in | |
2775 irix5*) | |
2776 libsuff= shlibsuff= | |
2777 ;; | |
2778 *) | |
2779 case $LD in # libtool.m4 will add one of these switches to LD | |
2780 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; | |
2781 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; | |
2782 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; | |
2783 *) libsuff= shlibsuff= libmagic=never-match;; | |
2784 esac | |
2785 ;; | |
2786 esac | |
2787 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH | |
2788 shlibpath_overrides_runpath=no | |
2789 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" | |
2790 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" | |
2791 ;; | |
2792 | |
2793 # No shared lib support for Linux oldld, aout, or coff. | |
2794 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) | |
2795 dynamic_linker=no | |
2796 ;; | |
2797 | |
2798 # This must be Linux ELF. | |
2799 linux-gnu*) | |
2800 version_type=linux | |
2801 need_lib_prefix=no | |
2802 need_version=no | |
2803 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2804 soname_spec='${libname}${release}.so$major' | |
2805 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' | |
2806 shlibpath_var=LD_LIBRARY_PATH | |
2807 shlibpath_overrides_runpath=no | |
2808 # This implies no fast_install, which is unacceptable. | |
2809 # Some rework will be needed to allow for fast_install | |
2810 # before this can be enabled. | |
2811 hardcode_into_libs=yes | |
2812 | |
2813 # We used to test for /lib/ld.so.1 and disable shared libraries on | |
2814 # powerpc, because MkLinux only supported shared libraries with the | |
2815 # GNU dynamic linker. Since this was broken with cross compilers, | |
2816 # most powerpc-linux boxes support dynamic linking these days and | |
2817 # people can always --disable-shared, the test was removed, and we | |
2818 # assume the GNU/Linux dynamic linker is in use. | |
2819 dynamic_linker='GNU/Linux ld.so' | |
2820 ;; | |
2821 | |
2822 netbsd*) | |
2823 version_type=sunos | |
2824 need_lib_prefix=no | |
2825 need_version=no | |
2826 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then | |
2827 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' | |
2828 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
2829 dynamic_linker='NetBSD (a.out) ld.so' | |
2830 else | |
2831 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' | |
2832 soname_spec='${libname}${release}.so$major' | |
2833 dynamic_linker='NetBSD ld.elf_so' | |
2834 fi | |
2835 shlibpath_var=LD_LIBRARY_PATH | |
2836 shlibpath_overrides_runpath=yes | |
2837 hardcode_into_libs=yes | |
2838 ;; | |
2839 | |
2840 newsos6) | |
2841 version_type=linux | |
2842 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2843 shlibpath_var=LD_LIBRARY_PATH | |
2844 shlibpath_overrides_runpath=yes | |
2845 ;; | |
2846 | |
2847 openbsd*) | |
2848 version_type=sunos | |
2849 need_lib_prefix=no | |
2850 need_version=no | |
2851 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
2852 case "$host_os" in | |
2853 openbsd2.[[89]] | openbsd2.[[89]].*) | |
2854 shlibpath_overrides_runpath=no | |
2855 ;; | |
2856 *) | |
2857 shlibpath_overrides_runpath=yes | |
2858 ;; | |
2859 esac | |
2860 else | |
2861 shlibpath_overrides_runpath=yes | |
2862 fi | |
2863 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' | |
2864 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' | |
2865 shlibpath_var=LD_LIBRARY_PATH | |
2866 ;; | |
2867 | |
2868 os2*) | |
2869 libname_spec='$name' | |
2870 need_lib_prefix=no | |
2871 library_names_spec='$libname.dll $libname.a' | |
2872 dynamic_linker='OS/2 ld.exe' | |
2873 shlibpath_var=LIBPATH | |
2874 ;; | |
2875 | |
2876 osf3* | osf4* | osf5*) | |
2877 version_type=osf | |
2878 need_version=no | |
2879 soname_spec='${libname}${release}.so' | |
2880 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' | |
2881 shlibpath_var=LD_LIBRARY_PATH | |
2882 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" | |
2883 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" | |
2884 ;; | |
2885 | |
2886 sco3.2v5*) | |
2887 version_type=osf | |
2888 soname_spec='${libname}${release}.so$major' | |
2889 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2890 shlibpath_var=LD_LIBRARY_PATH | |
2891 ;; | |
2892 | |
2893 solaris*) | |
2894 version_type=linux | |
2895 need_lib_prefix=no | |
2896 need_version=no | |
2897 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2898 soname_spec='${libname}${release}.so$major' | |
2899 shlibpath_var=LD_LIBRARY_PATH | |
2900 shlibpath_overrides_runpath=yes | |
2901 hardcode_into_libs=yes | |
2902 # ldd complains unless libraries are executable | |
2903 postinstall_cmds='chmod +x $lib' | |
2904 ;; | |
2905 | |
2906 sunos4*) | |
2907 version_type=sunos | |
2908 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' | |
2909 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' | |
2910 shlibpath_var=LD_LIBRARY_PATH | |
2911 shlibpath_overrides_runpath=yes | |
2912 if test "$with_gnu_ld" = yes; then | |
2913 need_lib_prefix=no | |
2914 fi | |
2915 need_version=yes | |
2916 ;; | |
2917 | |
2918 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
2919 version_type=linux | |
2920 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2921 soname_spec='${libname}${release}.so$major' | |
2922 shlibpath_var=LD_LIBRARY_PATH | |
2923 case $host_vendor in | |
2924 sni) | |
2925 shlibpath_overrides_runpath=no | |
2926 ;; | |
2927 motorola) | |
2928 need_lib_prefix=no | |
2929 need_version=no | |
2930 shlibpath_overrides_runpath=no | |
2931 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' | |
2932 ;; | |
2933 esac | |
2934 ;; | |
2935 | |
2936 uts4*) | |
2937 version_type=linux | |
2938 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2939 soname_spec='${libname}${release}.so$major' | |
2940 shlibpath_var=LD_LIBRARY_PATH | |
2941 ;; | |
2942 | |
2943 dgux*) | |
2944 version_type=linux | |
2945 need_lib_prefix=no | |
2946 need_version=no | |
2947 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' | |
2948 soname_spec='${libname}${release}.so$major' | |
2949 shlibpath_var=LD_LIBRARY_PATH | |
2950 ;; | |
2951 | |
2952 sysv4*MP*) | |
2953 if test -d /usr/nec ;then | |
2954 version_type=linux | |
2955 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' | |
2956 soname_spec='$libname.so.$major' | |
2957 shlibpath_var=LD_LIBRARY_PATH | |
2958 fi | |
2959 ;; | |
2960 | |
2961 *) | |
2962 dynamic_linker=no | |
2963 ;; | |
2964 esac | |
2965 AC_MSG_RESULT([$dynamic_linker]) | |
2966 test "$dynamic_linker" = no && can_build_shared=no | |
2967 ## | |
2968 ## END FIXME | |
2969 | |
2970 ## FIXME: this should be a separate macro | |
2971 ## | |
2972 # Report the final consequences. | |
2973 AC_MSG_CHECKING([if libtool supports shared libraries]) | |
2974 AC_MSG_RESULT([$can_build_shared]) | |
2975 ## | |
2976 ## END FIXME | |
2977 | |
2978 ## FIXME: this should be a separate macro | |
2979 ## | |
2980 AC_MSG_CHECKING([whether to build shared libraries]) | |
2981 test "$can_build_shared" = "no" && enable_shared=no | |
2982 | |
2983 # On AIX, shared libraries and static libraries use the same namespace, and | |
2984 # are all built from PIC. | |
2985 case "$host_os" in | |
2986 aix3*) | |
2987 test "$enable_shared" = yes && enable_static=no | |
2988 if test -n "$RANLIB"; then | |
2989 archive_cmds="$archive_cmds~\$RANLIB \$lib" | |
2990 postinstall_cmds='$RANLIB $lib' | |
2991 fi | |
2992 ;; | |
2993 | |
2994 aix4*) | |
2995 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then | |
2996 test "$enable_shared" = yes && enable_static=no | |
2997 fi | |
2998 ;; | |
2999 esac | |
3000 AC_MSG_RESULT([$enable_shared]) | |
3001 ## | |
3002 ## END FIXME | |
3003 | |
3004 ## FIXME: this should be a separate macro | |
3005 ## | |
3006 AC_MSG_CHECKING([whether to build static libraries]) | |
3007 # Make sure either enable_shared or enable_static is yes. | |
3008 test "$enable_shared" = yes || enable_static=yes | |
3009 AC_MSG_RESULT([$enable_static]) | |
3010 ## | |
3011 ## END FIXME | |
3012 | |
3013 if test "$hardcode_action" = relink; then | |
3014 # Fast installation is not supported | |
3015 enable_fast_install=no | |
3016 elif test "$shlibpath_overrides_runpath" = yes || | |
3017 test "$enable_shared" = no; then | |
3018 # Fast installation is not necessary | |
3019 enable_fast_install=needless | |
3020 fi | |
3021 | |
3022 variables_saved_for_relink="PATH $shlibpath_var $runpath_var" | |
3023 if test "$GCC" = yes; then | |
3024 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" | |
3025 fi | |
3026 | |
3027 AC_LIBTOOL_DLOPEN_SELF | |
3028 | |
3029 ## FIXME: this should be a separate macro | |
3030 ## | |
3031 if test "$enable_shared" = yes && test "$GCC" = yes; then | |
3032 case $archive_cmds in | |
3033 *'~'*) | |
3034 # FIXME: we may have to deal with multi-command sequences. | |
3035 ;; | |
3036 '$CC '*) | |
3037 # Test whether the compiler implicitly links with -lc since on some | |
3038 # systems, -lgcc has to come before -lc. If gcc already passes -lc | |
3039 # to ld, don't add -lc before -lgcc. | |
3040 AC_MSG_CHECKING([whether -lc should be explicitly linked in]) | |
3041 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc], | |
3042 [$rm conftest* | |
3043 echo 'static int dummy;' > conftest.$ac_ext | |
3044 | |
3045 if AC_TRY_EVAL(ac_compile); then | |
3046 soname=conftest | |
3047 lib=conftest | |
3048 libobjs=conftest.$ac_objext | |
3049 deplibs= | |
3050 wl=$lt_cv_prog_cc_wl | |
3051 compiler_flags=-v | |
3052 linker_flags=-v | |
3053 verstring= | |
3054 output_objdir=. | |
3055 libname=conftest | |
3056 save_allow_undefined_flag=$allow_undefined_flag | |
3057 allow_undefined_flag= | |
3058 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) | |
3059 then | |
3060 lt_cv_archive_cmds_need_lc=no | |
3061 else | |
3062 lt_cv_archive_cmds_need_lc=yes | |
3063 fi | |
3064 allow_undefined_flag=$save_allow_undefined_flag | |
3065 else | |
3066 cat conftest.err 1>&5 | |
3067 fi]) | |
3068 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc]) | |
3069 ;; | |
3070 esac | |
3071 fi | |
3072 need_lc=${lt_cv_archive_cmds_need_lc-yes} | |
3073 ## | |
3074 ## END FIXME | |
3075 | |
3076 ## FIXME: this should be a separate macro | |
3077 ## | |
3078 # The second clause should only fire when bootstrapping the | |
3079 # libtool distribution, otherwise you forgot to ship ltmain.sh | |
3080 # with your package, and you will get complaints that there are | |
3081 # no rules to generate ltmain.sh. | |
3082 if test -f "$ltmain"; then | |
3083 : | |
3084 else | |
3085 # If there is no Makefile yet, we rely on a make rule to execute | |
3086 # `config.status --recheck' to rerun these tests and create the | |
3087 # libtool script then. | |
3088 test -f Makefile && make "$ltmain" | |
3089 fi | |
3090 | |
3091 if test -f "$ltmain"; then | |
3092 trap "$rm \"${ofile}T\"; exit 1" 1 2 15 | |
3093 $rm -f "${ofile}T" | |
3094 | |
3095 echo creating $ofile | |
3096 | |
3097 # Now quote all the things that may contain metacharacters while being | |
3098 # careful not to overquote the AC_SUBSTed values. We take copies of the | |
3099 # variables and quote the copies for generation of the libtool script. | |
3100 for var in echo old_CC old_CFLAGS \ | |
3101 AR AR_FLAGS CC LD LN_S NM SHELL \ | |
3102 reload_flag reload_cmds wl \ | |
3103 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ | |
3104 thread_safe_flag_spec whole_archive_flag_spec libname_spec \ | |
3105 library_names_spec soname_spec \ | |
3106 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ | |
3107 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \ | |
3108 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \ | |
3109 old_striplib striplib file_magic_cmd export_symbols_cmds \ | |
3110 deplibs_check_method allow_undefined_flag no_undefined_flag \ | |
3111 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ | |
3112 global_symbol_to_c_name_address \ | |
3113 hardcode_libdir_flag_spec hardcode_libdir_separator \ | |
3114 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ | |
3115 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do | |
3116 | |
3117 case $var in | |
3118 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ | |
3119 old_postinstall_cmds | old_postuninstall_cmds | \ | |
3120 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ | |
3121 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \ | |
3122 postinstall_cmds | postuninstall_cmds | \ | |
3123 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) | |
3124 # Double-quote double-evaled strings. | |
3125 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" | |
3126 ;; | |
3127 *) | |
3128 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" | |
3129 ;; | |
3130 esac | |
3131 done | |
3132 | |
3133 cat <<__EOF__ > "${ofile}T" | |
3134 #! $SHELL | |
3135 | |
3136 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. | |
3137 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) | |
3138 # NOTE: Changes made to this file will be lost: look at ltmain.sh. | |
3139 # | |
3140 # Copyright (C) 1996-2000 Free Software Foundation, Inc. | |
3141 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 | |
3142 # | |
3143 # This program is free software; you can redistribute it and/or modify | |
3144 # it under the terms of the GNU General Public License as published by | |
3145 # the Free Software Foundation; either version 2 of the License, or | |
3146 # (at your option) any later version. | |
3147 # | |
3148 # This program is distributed in the hope that it will be useful, but | |
3149 # WITHOUT ANY WARRANTY; without even the implied warranty of | |
3150 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
3151 # General Public License for more details. | |
3152 # | |
3153 # You should have received a copy of the GNU General Public License | |
3154 # along with this program; if not, write to the Free Software | |
3155 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
3156 # | |
3157 # As a special exception to the GNU General Public License, if you | |
3158 # distribute this file as part of a program that contains a | |
3159 # configuration script generated by Autoconf, you may include it under | |
3160 # the same distribution terms that you use for the rest of that program. | |
3161 | |
3162 # Sed that helps us avoid accidentally triggering echo(1) options like -n. | |
3163 Xsed="sed -e s/^X//" | |
3164 | |
3165 # The HP-UX ksh and POSIX shell print the target directory to stdout | |
3166 # if CDPATH is set. | |
3167 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi | |
3168 | |
3169 # ### BEGIN LIBTOOL CONFIG | |
3170 | |
3171 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
3172 | |
3173 # Shell to use when invoking shell scripts. | |
3174 SHELL=$lt_SHELL | |
3175 | |
3176 # Whether or not to build shared libraries. | |
3177 build_libtool_libs=$enable_shared | |
3178 | |
3179 # Whether or not to build static libraries. | |
3180 build_old_libs=$enable_static | |
3181 | |
3182 # Whether or not to add -lc for building shared libraries. | |
3183 build_libtool_need_lc=$need_lc | |
3184 | |
3185 # Whether or not to optimize for fast installation. | |
3186 fast_install=$enable_fast_install | |
3187 | |
3188 # The host system. | |
3189 host_alias=$host_alias | |
3190 host=$host | |
3191 | |
3192 # An echo program that does not interpret backslashes. | |
3193 echo=$lt_echo | |
3194 | |
3195 # The archiver. | |
3196 AR=$lt_AR | |
3197 AR_FLAGS=$lt_AR_FLAGS | |
3198 | |
3199 # The default C compiler. | |
3200 CC=$lt_CC | |
3201 | |
3202 # Is the compiler the GNU C compiler? | |
3203 with_gcc=$GCC | |
3204 | |
3205 # The linker used to build libraries. | |
3206 LD=$lt_LD | |
3207 | |
3208 # Whether we need hard or soft links. | |
3209 LN_S=$lt_LN_S | |
3210 | |
3211 # A BSD-compatible nm program. | |
3212 NM=$lt_NM | |
3213 | |
3214 # A symbol stripping program | |
3215 STRIP=$STRIP | |
3216 | |
3217 # Used to examine libraries when file_magic_cmd begins "file" | |
3218 MAGIC_CMD=$MAGIC_CMD | |
3219 | |
3220 # Used on cygwin: DLL creation program. | |
3221 DLLTOOL="$DLLTOOL" | |
3222 | |
3223 # Used on cygwin: object dumper. | |
3224 OBJDUMP="$OBJDUMP" | |
3225 | |
3226 # Used on cygwin: assembler. | |
3227 AS="$AS" | |
3228 | |
3229 # The name of the directory that contains temporary libtool files. | |
3230 objdir=$objdir | |
3231 | |
3232 # How to create reloadable object files. | |
3233 reload_flag=$lt_reload_flag | |
3234 reload_cmds=$lt_reload_cmds | |
3235 | |
3236 # How to pass a linker flag through the compiler. | |
3237 wl=$lt_wl | |
3238 | |
3239 # Object file suffix (normally "o"). | |
3240 objext="$ac_objext" | |
3241 | |
3242 # Old archive suffix (normally "a"). | |
3243 libext="$libext" | |
3244 | |
3245 # Executable file suffix (normally ""). | |
3246 exeext="$exeext" | |
3247 | |
3248 # Additional compiler flags for building library objects. | |
3249 pic_flag=$lt_pic_flag | |
3250 pic_mode=$pic_mode | |
3251 | |
3252 # Does compiler simultaneously support -c and -o options? | |
3253 compiler_c_o=$lt_compiler_c_o | |
3254 | |
3255 # Can we write directly to a .lo ? | |
3256 compiler_o_lo=$lt_compiler_o_lo | |
3257 | |
3258 # Must we lock files when doing compilation ? | |
3259 need_locks=$lt_need_locks | |
3260 | |
3261 # Do we need the lib prefix for modules? | |
3262 need_lib_prefix=$need_lib_prefix | |
3263 | |
3264 # Do we need a version for libraries? | |
3265 need_version=$need_version | |
3266 | |
3267 # Whether dlopen is supported. | |
3268 dlopen_support=$enable_dlopen | |
3269 | |
3270 # Whether dlopen of programs is supported. | |
3271 dlopen_self=$enable_dlopen_self | |
3272 | |
3273 # Whether dlopen of statically linked programs is supported. | |
3274 dlopen_self_static=$enable_dlopen_self_static | |
3275 | |
3276 # Compiler flag to prevent dynamic linking. | |
3277 link_static_flag=$lt_link_static_flag | |
3278 | |
3279 # Compiler flag to turn off builtin functions. | |
3280 no_builtin_flag=$lt_no_builtin_flag | |
3281 | |
3282 # Compiler flag to allow reflexive dlopens. | |
3283 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec | |
3284 | |
3285 # Compiler flag to generate shared objects directly from archives. | |
3286 whole_archive_flag_spec=$lt_whole_archive_flag_spec | |
3287 | |
3288 # Compiler flag to generate thread-safe objects. | |
3289 thread_safe_flag_spec=$lt_thread_safe_flag_spec | |
3290 | |
3291 # Library versioning type. | |
3292 version_type=$version_type | |
3293 | |
3294 # Format of library name prefix. | |
3295 libname_spec=$lt_libname_spec | |
3296 | |
3297 # List of archive names. First name is the real one, the rest are links. | |
3298 # The last name is the one that the linker finds with -lNAME. | |
3299 library_names_spec=$lt_library_names_spec | |
3300 | |
3301 # The coded name of the library, if different from the real name. | |
3302 soname_spec=$lt_soname_spec | |
3303 | |
3304 # Commands used to build and install an old-style archive. | |
3305 RANLIB=$lt_RANLIB | |
3306 old_archive_cmds=$lt_old_archive_cmds | |
3307 old_postinstall_cmds=$lt_old_postinstall_cmds | |
3308 old_postuninstall_cmds=$lt_old_postuninstall_cmds | |
3309 | |
3310 # Create an old-style archive from a shared archive. | |
3311 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds | |
3312 | |
3313 # Create a temporary old-style archive to link instead of a shared archive. | |
3314 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds | |
3315 | |
3316 # Commands used to build and install a shared archive. | |
3317 archive_cmds=$lt_archive_cmds | |
3318 archive_expsym_cmds=$lt_archive_expsym_cmds | |
3319 postinstall_cmds=$lt_postinstall_cmds | |
3320 postuninstall_cmds=$lt_postuninstall_cmds | |
3321 | |
3322 # Commands to strip libraries. | |
3323 old_striplib=$lt_old_striplib | |
3324 striplib=$lt_striplib | |
3325 | |
3326 # Method to check whether dependent libraries are shared objects. | |
3327 deplibs_check_method=$lt_deplibs_check_method | |
3328 | |
3329 # Command to use when deplibs_check_method == file_magic. | |
3330 file_magic_cmd=$lt_file_magic_cmd | |
3331 | |
3332 # Flag that allows shared libraries with undefined symbols to be built. | |
3333 allow_undefined_flag=$lt_allow_undefined_flag | |
3334 | |
3335 # Flag that forces no undefined symbols. | |
3336 no_undefined_flag=$lt_no_undefined_flag | |
3337 | |
3338 # Commands used to finish a libtool library installation in a directory. | |
3339 finish_cmds=$lt_finish_cmds | |
3340 | |
3341 # Same as above, but a single script fragment to be evaled but not shown. | |
3342 finish_eval=$lt_finish_eval | |
3343 | |
3344 # Take the output of nm and produce a listing of raw symbols and C names. | |
3345 global_symbol_pipe=$lt_global_symbol_pipe | |
3346 | |
3347 # Transform the output of nm in a proper C declaration | |
3348 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl | |
3349 | |
3350 # Transform the output of nm in a C name address pair | |
3351 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address | |
3352 | |
3353 # This is the shared library runtime path variable. | |
3354 runpath_var=$runpath_var | |
3355 | |
3356 # This is the shared library path variable. | |
3357 shlibpath_var=$shlibpath_var | |
3358 | |
3359 # Is shlibpath searched before the hard-coded library search path? | |
3360 shlibpath_overrides_runpath=$shlibpath_overrides_runpath | |
3361 | |
3362 # How to hardcode a shared library path into an executable. | |
3363 hardcode_action=$hardcode_action | |
3364 | |
3365 # Whether we should hardcode library paths into libraries. | |
3366 hardcode_into_libs=$hardcode_into_libs | |
3367 | |
3368 # Flag to hardcode \$libdir into a binary during linking. | |
3369 # This must work even if \$libdir does not exist. | |
3370 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec | |
3371 | |
3372 # Whether we need a single -rpath flag with a separated argument. | |
3373 hardcode_libdir_separator=$lt_hardcode_libdir_separator | |
3374 | |
3375 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the | |
3376 # resulting binary. | |
3377 hardcode_direct=$hardcode_direct | |
3378 | |
3379 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the | |
3380 # resulting binary. | |
3381 hardcode_minus_L=$hardcode_minus_L | |
3382 | |
3383 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into | |
3384 # the resulting binary. | |
3385 hardcode_shlibpath_var=$hardcode_shlibpath_var | |
3386 | |
3387 # Variables whose values should be saved in libtool wrapper scripts and | |
3388 # restored at relink time. | |
3389 variables_saved_for_relink="$variables_saved_for_relink" | |
3390 | |
3391 # Whether libtool must link a program against all its dependency libraries. | |
3392 link_all_deplibs=$link_all_deplibs | |
3393 | |
3394 # Compile-time system search path for libraries | |
3395 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec | |
3396 | |
3397 # Run-time system search path for libraries | |
3398 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec | |
3399 | |
3400 # Fix the shell variable \$srcfile for the compiler. | |
3401 fix_srcfile_path="$fix_srcfile_path" | |
3402 | |
3403 # Set to yes if exported symbols are required. | |
3404 always_export_symbols=$always_export_symbols | |
3405 | |
3406 # The commands to list exported symbols. | |
3407 export_symbols_cmds=$lt_export_symbols_cmds | |
3408 | |
3409 # The commands to extract the exported symbol list from a shared archive. | |
3410 extract_expsyms_cmds=$lt_extract_expsyms_cmds | |
3411 | |
3412 # Symbols that should not be listed in the preloaded symbols. | |
3413 exclude_expsyms=$lt_exclude_expsyms | |
3414 | |
3415 # Symbols that must always be exported. | |
3416 include_expsyms=$lt_include_expsyms | |
3417 | |
3418 # ### END LIBTOOL CONFIG | |
3419 | |
3420 __EOF__ | |
3421 | |
3422 case $host_os in | |
3423 aix3*) | |
3424 cat <<\EOF >> "${ofile}T" | |
3425 | |
3426 # AIX sometimes has problems with the GCC collect2 program. For some | |
3427 # reason, if we set the COLLECT_NAMES environment variable, the problems | |
3428 # vanish in a puff of smoke. | |
3429 if test "X${COLLECT_NAMES+set}" != Xset; then | |
3430 COLLECT_NAMES= | |
3431 export COLLECT_NAMES | |
3432 fi | |
3433 EOF | |
3434 ;; | |
3435 esac | |
3436 | |
3437 case $host_os in | |
3438 cygwin* | mingw* | pw32* | os2*) | |
3439 cat <<'EOF' >> "${ofile}T" | |
3440 # This is a source program that is used to create dlls on Windows | |
3441 # Don't remove nor modify the starting and closing comments | |
3442 # /* ltdll.c starts here */ | |
3443 # #define WIN32_LEAN_AND_MEAN | |
3444 # #include <windows.h> | |
3445 # #undef WIN32_LEAN_AND_MEAN | |
3446 # #include <stdio.h> | |
3447 # | |
3448 # #ifndef __CYGWIN__ | |
3449 # # ifdef __CYGWIN32__ | |
3450 # # define __CYGWIN__ __CYGWIN32__ | |
3451 # # endif | |
3452 # #endif | |
3453 # | |
3454 # #ifdef __cplusplus | |
3455 # extern "C" { | |
3456 # #endif | |
3457 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); | |
3458 # #ifdef __cplusplus | |
3459 # } | |
3460 # #endif | |
3461 # | |
3462 # #ifdef __CYGWIN__ | |
3463 # #include <cygwin/cygwin_dll.h> | |
3464 # DECLARE_CYGWIN_DLL( DllMain ); | |
3465 # #endif | |
3466 # HINSTANCE __hDllInstance_base; | |
3467 # | |
3468 # BOOL APIENTRY | |
3469 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) | |
3470 # { | |
3471 # __hDllInstance_base = hInst; | |
3472 # return TRUE; | |
3473 # } | |
3474 # /* ltdll.c ends here */ | |
3475 # This is a source program that is used to create import libraries | |
3476 # on Windows for dlls which lack them. Don't remove nor modify the | |
3477 # starting and closing comments | |
3478 # /* impgen.c starts here */ | |
3479 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc. | |
3480 # | |
3481 # This file is part of GNU libtool. | |
3482 # | |
3483 # This program is free software; you can redistribute it and/or modify | |
3484 # it under the terms of the GNU General Public License as published by | |
3485 # the Free Software Foundation; either version 2 of the License, or | |
3486 # (at your option) any later version. | |
3487 # | |
3488 # This program is distributed in the hope that it will be useful, | |
3489 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
3490 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
3491 # GNU General Public License for more details. | |
3492 # | |
3493 # You should have received a copy of the GNU General Public License | |
3494 # along with this program; if not, write to the Free Software | |
3495 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
3496 # */ | |
3497 # | |
3498 # #include <stdio.h> /* for printf() */ | |
3499 # #include <unistd.h> /* for open(), lseek(), read() */ | |
3500 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */ | |
3501 # #include <string.h> /* for strdup() */ | |
3502 # | |
3503 # /* O_BINARY isn't required (or even defined sometimes) under Unix */ | |
3504 # #ifndef O_BINARY | |
3505 # #define O_BINARY 0 | |
3506 # #endif | |
3507 # | |
3508 # static unsigned int | |
3509 # pe_get16 (fd, offset) | |
3510 # int fd; | |
3511 # int offset; | |
3512 # { | |
3513 # unsigned char b[2]; | |
3514 # lseek (fd, offset, SEEK_SET); | |
3515 # read (fd, b, 2); | |
3516 # return b[0] + (b[1]<<8); | |
3517 # } | |
3518 # | |
3519 # static unsigned int | |
3520 # pe_get32 (fd, offset) | |
3521 # int fd; | |
3522 # int offset; | |
3523 # { | |
3524 # unsigned char b[4]; | |
3525 # lseek (fd, offset, SEEK_SET); | |
3526 # read (fd, b, 4); | |
3527 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); | |
3528 # } | |
3529 # | |
3530 # static unsigned int | |
3531 # pe_as32 (ptr) | |
3532 # void *ptr; | |
3533 # { | |
3534 # unsigned char *b = ptr; | |
3535 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24); | |
3536 # } | |
3537 # | |
3538 # int | |
3539 # main (argc, argv) | |
3540 # int argc; | |
3541 # char *argv[]; | |
3542 # { | |
3543 # int dll; | |
3544 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i; | |
3545 # unsigned long export_rva, export_size, nsections, secptr, expptr; | |
3546 # unsigned long name_rvas, nexp; | |
3547 # unsigned char *expdata, *erva; | |
3548 # char *filename, *dll_name; | |
3549 # | |
3550 # filename = argv[1]; | |
3551 # | |
3552 # dll = open(filename, O_RDONLY|O_BINARY); | |
3553 # if (dll < 1) | |
3554 # return 1; | |
3555 # | |
3556 # dll_name = filename; | |
3557 # | |
3558 # for (i=0; filename[i]; i++) | |
3559 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') | |
3560 # dll_name = filename + i +1; | |
3561 # | |
3562 # pe_header_offset = pe_get32 (dll, 0x3c); | |
3563 # opthdr_ofs = pe_header_offset + 4 + 20; | |
3564 # num_entries = pe_get32 (dll, opthdr_ofs + 92); | |
3565 # | |
3566 # if (num_entries < 1) /* no exports */ | |
3567 # return 1; | |
3568 # | |
3569 # export_rva = pe_get32 (dll, opthdr_ofs + 96); | |
3570 # export_size = pe_get32 (dll, opthdr_ofs + 100); | |
3571 # nsections = pe_get16 (dll, pe_header_offset + 4 +2); | |
3572 # secptr = (pe_header_offset + 4 + 20 + | |
3573 # pe_get16 (dll, pe_header_offset + 4 + 16)); | |
3574 # | |
3575 # expptr = 0; | |
3576 # for (i = 0; i < nsections; i++) | |
3577 # { | |
3578 # char sname[8]; | |
3579 # unsigned long secptr1 = secptr + 40 * i; | |
3580 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12); | |
3581 # unsigned long vsize = pe_get32 (dll, secptr1 + 16); | |
3582 # unsigned long fptr = pe_get32 (dll, secptr1 + 20); | |
3583 # lseek(dll, secptr1, SEEK_SET); | |
3584 # read(dll, sname, 8); | |
3585 # if (vaddr <= export_rva && vaddr+vsize > export_rva) | |
3586 # { | |
3587 # expptr = fptr + (export_rva - vaddr); | |
3588 # if (export_rva + export_size > vaddr + vsize) | |
3589 # export_size = vsize - (export_rva - vaddr); | |
3590 # break; | |
3591 # } | |
3592 # } | |
3593 # | |
3594 # expdata = (unsigned char*)malloc(export_size); | |
3595 # lseek (dll, expptr, SEEK_SET); | |
3596 # read (dll, expdata, export_size); | |
3597 # erva = expdata - export_rva; | |
3598 # | |
3599 # nexp = pe_as32 (expdata+24); | |
3600 # name_rvas = pe_as32 (expdata+32); | |
3601 # | |
3602 # printf ("EXPORTS\n"); | |
3603 # for (i = 0; i<nexp; i++) | |
3604 # { | |
3605 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4); | |
3606 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i); | |
3607 # } | |
3608 # | |
3609 # return 0; | |
3610 # } | |
3611 # /* impgen.c ends here */ | |
3612 | |
3613 EOF | |
3614 ;; | |
3615 esac | |
3616 | |
3617 # We use sed instead of cat because bash on DJGPP gets confused if | |
3618 # if finds mixed CR/LF and LF-only lines. Since sed operates in | |
3619 # text mode, it properly converts lines to CR/LF. This bash problem | |
3620 # is reportedly fixed, but why not run on old versions too? | |
3621 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1) | |
3622 | |
3623 mv -f "${ofile}T" "$ofile" || \ | |
3624 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T") | |
3625 chmod +x "$ofile" | |
3626 fi | |
3627 ## | |
3628 ## END FIXME | |
3629 | |
3630 ])# _LT_AC_LTCONFIG_HACK | |
3631 | |
3632 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support | |
3633 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) | |
3634 | |
3635 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's | |
3636 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) | |
3637 | |
3638 # AC_ENABLE_SHARED - implement the --enable-shared flag | |
3639 # Usage: AC_ENABLE_SHARED[(DEFAULT)] | |
3640 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | |
3641 # `yes'. | |
3642 AC_DEFUN([AC_ENABLE_SHARED], | |
3643 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl | |
3644 AC_ARG_ENABLE(shared, | |
3645 changequote(<<, >>)dnl | |
3646 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], | |
3647 changequote([, ])dnl | |
3648 [p=${PACKAGE-default} | |
3649 case $enableval in | |
3650 yes) enable_shared=yes ;; | |
3651 no) enable_shared=no ;; | |
3652 *) | |
3653 enable_shared=no | |
3654 # Look at the argument we got. We use all the common list separators. | |
3655 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
3656 for pkg in $enableval; do | |
3657 if test "X$pkg" = "X$p"; then | |
3658 enable_shared=yes | |
3659 fi | |
3660 done | |
3661 IFS="$ac_save_ifs" | |
3662 ;; | |
3663 esac], | |
3664 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl | |
3665 ]) | |
3666 | |
3667 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared | |
3668 AC_DEFUN([AC_DISABLE_SHARED], | |
3669 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
3670 AC_ENABLE_SHARED(no)]) | |
3671 | |
3672 # AC_ENABLE_STATIC - implement the --enable-static flag | |
3673 # Usage: AC_ENABLE_STATIC[(DEFAULT)] | |
3674 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | |
3675 # `yes'. | |
3676 AC_DEFUN([AC_ENABLE_STATIC], | |
3677 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl | |
3678 AC_ARG_ENABLE(static, | |
3679 changequote(<<, >>)dnl | |
3680 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], | |
3681 changequote([, ])dnl | |
3682 [p=${PACKAGE-default} | |
3683 case $enableval in | |
3684 yes) enable_static=yes ;; | |
3685 no) enable_static=no ;; | |
3686 *) | |
3687 enable_static=no | |
3688 # Look at the argument we got. We use all the common list separators. | |
3689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
3690 for pkg in $enableval; do | |
3691 if test "X$pkg" = "X$p"; then | |
3692 enable_static=yes | |
3693 fi | |
3694 done | |
3695 IFS="$ac_save_ifs" | |
3696 ;; | |
3697 esac], | |
3698 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl | |
3699 ]) | |
3700 | |
3701 # AC_DISABLE_STATIC - set the default static flag to --disable-static | |
3702 AC_DEFUN([AC_DISABLE_STATIC], | |
3703 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
3704 AC_ENABLE_STATIC(no)]) | |
3705 | |
3706 | |
3707 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag | |
3708 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] | |
3709 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to | |
3710 # `yes'. | |
3711 AC_DEFUN([AC_ENABLE_FAST_INSTALL], | |
3712 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl | |
3713 AC_ARG_ENABLE(fast-install, | |
3714 changequote(<<, >>)dnl | |
3715 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], | |
3716 changequote([, ])dnl | |
3717 [p=${PACKAGE-default} | |
3718 case $enableval in | |
3719 yes) enable_fast_install=yes ;; | |
3720 no) enable_fast_install=no ;; | |
3721 *) | |
3722 enable_fast_install=no | |
3723 # Look at the argument we got. We use all the common list separators. | |
3724 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
3725 for pkg in $enableval; do | |
3726 if test "X$pkg" = "X$p"; then | |
3727 enable_fast_install=yes | |
3728 fi | |
3729 done | |
3730 IFS="$ac_save_ifs" | |
3731 ;; | |
3732 esac], | |
3733 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl | |
3734 ]) | |
3735 | |
3736 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install | |
3737 AC_DEFUN([AC_DISABLE_FAST_INSTALL], | |
3738 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
3739 AC_ENABLE_FAST_INSTALL(no)]) | |
3740 | |
3741 # AC_LIBTOOL_PICMODE - implement the --with-pic flag | |
3742 # Usage: AC_LIBTOOL_PICMODE[(MODE)] | |
3743 # Where MODE is either `yes' or `no'. If omitted, it defaults to | |
3744 # `both'. | |
3745 AC_DEFUN([AC_LIBTOOL_PICMODE], | |
3746 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
3747 pic_mode=ifelse($#,1,$1,default)]) | |
3748 | |
3749 | |
3750 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library | |
3751 AC_DEFUN([AC_PATH_TOOL_PREFIX], | |
3752 [AC_MSG_CHECKING([for $1]) | |
3753 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, | |
3754 [case $MAGIC_CMD in | |
3755 /*) | |
3756 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. | |
3757 ;; | |
3758 ?:/*) | |
3759 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. | |
3760 ;; | |
3761 *) | |
3762 ac_save_MAGIC_CMD="$MAGIC_CMD" | |
3763 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
3764 dnl $ac_dummy forces splitting on constant user-supplied paths. | |
3765 dnl POSIX.2 word splitting is done only on the output of word expansions, | |
3766 dnl not every word. This closes a longstanding sh security hole. | |
3767 ac_dummy="ifelse([$2], , $PATH, [$2])" | |
3768 for ac_dir in $ac_dummy; do | |
3769 test -z "$ac_dir" && ac_dir=. | |
3770 if test -f $ac_dir/$1; then | |
3771 lt_cv_path_MAGIC_CMD="$ac_dir/$1" | |
3772 if test -n "$file_magic_test_file"; then | |
3773 case $deplibs_check_method in | |
3774 "file_magic "*) | |
3775 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" | |
3776 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
3777 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | | |
3778 egrep "$file_magic_regex" > /dev/null; then | |
3779 : | |
3780 else | |
3781 cat <<EOF 1>&2 | |
3782 | |
3783 *** Warning: the command libtool uses to detect shared libraries, | |
3784 *** $file_magic_cmd, produces output that libtool cannot recognize. | |
3785 *** The result is that libtool may fail to recognize shared libraries | |
3786 *** as such. This will affect the creation of libtool libraries that | |
3787 *** depend on shared libraries, but programs linked with such libtool | |
3788 *** libraries will work regardless of this problem. Nevertheless, you | |
3789 *** may want to report the problem to your system manager and/or to | |
3790 *** bug-libtool@gnu.org | |
3791 | |
3792 EOF | |
3793 fi ;; | |
3794 esac | |
3795 fi | |
3796 break | |
3797 fi | |
3798 done | |
3799 IFS="$ac_save_ifs" | |
3800 MAGIC_CMD="$ac_save_MAGIC_CMD" | |
3801 ;; | |
3802 esac]) | |
3803 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" | |
3804 if test -n "$MAGIC_CMD"; then | |
3805 AC_MSG_RESULT($MAGIC_CMD) | |
3806 else | |
3807 AC_MSG_RESULT(no) | |
3808 fi | |
3809 ]) | |
3810 | |
3811 | |
3812 # AC_PATH_MAGIC - find a file program which can recognise a shared library | |
3813 AC_DEFUN([AC_PATH_MAGIC], | |
3814 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl | |
3815 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) | |
3816 if test -z "$lt_cv_path_MAGIC_CMD"; then | |
3817 if test -n "$ac_tool_prefix"; then | |
3818 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) | |
3819 else | |
3820 MAGIC_CMD=: | |
3821 fi | |
3822 fi | |
3823 ]) | |
3824 | |
3825 | |
3826 # AC_PROG_LD - find the path to the GNU or non-GNU linker | |
3827 AC_DEFUN([AC_PROG_LD], | |
3828 [AC_ARG_WITH(gnu-ld, | |
3829 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], | |
3830 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) | |
3831 AC_REQUIRE([AC_PROG_CC])dnl | |
3832 AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
3833 AC_REQUIRE([AC_CANONICAL_BUILD])dnl | |
3834 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl | |
3835 ac_prog=ld | |
3836 if test "$GCC" = yes; then | |
3837 # Check if gcc -print-prog-name=ld gives a path. | |
3838 AC_MSG_CHECKING([for ld used by GCC]) | |
3839 case $host in | |
3840 *-*-mingw*) | |
3841 # gcc leaves a trailing carriage return which upsets mingw | |
3842 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
3843 *) | |
3844 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | |
3845 esac | |
3846 case $ac_prog in | |
3847 # Accept absolute paths. | |
3848 [[\\/]]* | [[A-Za-z]]:[[\\/]]*) | |
3849 re_direlt='/[[^/]][[^/]]*/\.\./' | |
3850 # Canonicalize the path of ld | |
3851 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
3852 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
3853 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
3854 done | |
3855 test -z "$LD" && LD="$ac_prog" | |
3856 ;; | |
3857 "") | |
3858 # If it fails, then pretend we aren't using GCC. | |
3859 ac_prog=ld | |
3860 ;; | |
3861 *) | |
3862 # If it is relative, then search for the first ld in PATH. | |
3863 with_gnu_ld=unknown | |
3864 ;; | |
3865 esac | |
3866 elif test "$with_gnu_ld" = yes; then | |
3867 AC_MSG_CHECKING([for GNU ld]) | |
3868 else | |
3869 AC_MSG_CHECKING([for non-GNU ld]) | |
3870 fi | |
3871 AC_CACHE_VAL(lt_cv_path_LD, | |
3872 [if test -z "$LD"; then | |
3873 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
3874 for ac_dir in $PATH; do | |
3875 test -z "$ac_dir" && ac_dir=. | |
3876 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
3877 lt_cv_path_LD="$ac_dir/$ac_prog" | |
3878 # Check to see if the program is GNU ld. I'd rather use --version, | |
3879 # but apparently some GNU ld's only accept -v. | |
3880 # Break only if it was the GNU/non-GNU ld that we prefer. | |
3881 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
3882 test "$with_gnu_ld" != no && break | |
3883 else | |
3884 test "$with_gnu_ld" != yes && break | |
3885 fi | |
3886 fi | |
3887 done | |
3888 IFS="$ac_save_ifs" | |
3889 else | |
3890 lt_cv_path_LD="$LD" # Let the user override the test with a path. | |
3891 fi]) | |
3892 LD="$lt_cv_path_LD" | |
3893 if test -n "$LD"; then | |
3894 AC_MSG_RESULT($LD) | |
3895 else | |
3896 AC_MSG_RESULT(no) | |
3897 fi | |
3898 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | |
3899 AC_PROG_LD_GNU | |
3900 ]) | |
3901 | |
3902 # AC_PROG_LD_GNU - | |
3903 AC_DEFUN([AC_PROG_LD_GNU], | |
3904 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, | |
3905 [# I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
3906 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
3907 lt_cv_prog_gnu_ld=yes | |
3908 else | |
3909 lt_cv_prog_gnu_ld=no | |
3910 fi]) | |
3911 with_gnu_ld=$lt_cv_prog_gnu_ld | |
3912 ]) | |
3913 | |
3914 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker | |
3915 # -- PORTME Some linkers may need a different reload flag. | |
3916 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], | |
3917 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, | |
3918 [lt_cv_ld_reload_flag='-r']) | |
3919 reload_flag=$lt_cv_ld_reload_flag | |
3920 test -n "$reload_flag" && reload_flag=" $reload_flag" | |
3921 ]) | |
3922 | |
3923 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies | |
3924 # -- PORTME fill in with the dynamic library characteristics | |
3925 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], | |
3926 [AC_CACHE_CHECK([how to recognise dependant libraries], | |
3927 lt_cv_deplibs_check_method, | |
3928 [lt_cv_file_magic_cmd='$MAGIC_CMD' | |
3929 lt_cv_file_magic_test_file= | |
3930 lt_cv_deplibs_check_method='unknown' | |
3931 # Need to set the preceding variable on all platforms that support | |
3932 # interlibrary dependencies. | |
3933 # 'none' -- dependencies not supported. | |
3934 # `unknown' -- same as none, but documents that we really don't know. | |
3935 # 'pass_all' -- all dependencies passed with no checks. | |
3936 # 'test_compile' -- check by making test program. | |
3937 # 'file_magic [[regex]]' -- check by looking for files in library path | |
3938 # which responds to the $file_magic_cmd with a given egrep regex. | |
3939 # If you have `file' or equivalent on your system and you're not sure | |
3940 # whether `pass_all' will *always* work, you probably want this one. | |
3941 | |
3942 case $host_os in | |
3943 aix4* | aix5*) | |
3944 lt_cv_deplibs_check_method=pass_all | |
3945 ;; | |
3946 | |
3947 beos*) | |
3948 lt_cv_deplibs_check_method=pass_all | |
3949 ;; | |
3950 | |
3951 bsdi4*) | |
3952 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' | |
3953 lt_cv_file_magic_cmd='/usr/bin/file -L' | |
3954 lt_cv_file_magic_test_file=/shlib/libc.so | |
3955 ;; | |
3956 | |
3957 cygwin* | mingw* | pw32*) | |
3958 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' | |
3959 lt_cv_file_magic_cmd='$OBJDUMP -f' | |
3960 ;; | |
3961 | |
3962 darwin* | rhapsody*) | |
3963 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library' | |
3964 lt_cv_file_magic_cmd='/usr/bin/file -L' | |
3965 case "$host_os" in | |
3966 rhapsody* | darwin1.[[012]]) | |
3967 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1` | |
3968 ;; | |
3969 *) # Darwin 1.3 on | |
3970 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib' | |
3971 ;; | |
3972 esac | |
3973 ;; | |
3974 | |
3975 freebsd*) | |
3976 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | |
3977 case $host_cpu in | |
3978 i*86 ) | |
3979 # Not sure whether the presence of OpenBSD here was a mistake. | |
3980 # Let's accept both of them until this is cleared up. | |
3981 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' | |
3982 lt_cv_file_magic_cmd=/usr/bin/file | |
3983 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | |
3984 ;; | |
3985 esac | |
3986 else | |
3987 lt_cv_deplibs_check_method=pass_all | |
3988 fi | |
3989 ;; | |
3990 | |
3991 gnu*) | |
3992 lt_cv_deplibs_check_method=pass_all | |
3993 ;; | |
3994 | |
3995 hpux10.20*|hpux11*) | |
3996 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' | |
3997 lt_cv_file_magic_cmd=/usr/bin/file | |
3998 lt_cv_file_magic_test_file=/usr/lib/libc.sl | |
3999 ;; | |
4000 | |
4001 irix5* | irix6*) | |
4002 case $host_os in | |
4003 irix5*) | |
4004 # this will be overridden with pass_all, but let us keep it just in case | |
4005 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" | |
4006 ;; | |
4007 *) | |
4008 case $LD in | |
4009 *-32|*"-32 ") libmagic=32-bit;; | |
4010 *-n32|*"-n32 ") libmagic=N32;; | |
4011 *-64|*"-64 ") libmagic=64-bit;; | |
4012 *) libmagic=never-match;; | |
4013 esac | |
4014 # this will be overridden with pass_all, but let us keep it just in case | |
4015 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" | |
4016 ;; | |
4017 esac | |
4018 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` | |
4019 lt_cv_deplibs_check_method=pass_all | |
4020 ;; | |
4021 | |
4022 # This must be Linux ELF. | |
4023 linux-gnu*) | |
4024 case $host_cpu in | |
4025 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* ) | |
4026 lt_cv_deplibs_check_method=pass_all ;; | |
4027 *) | |
4028 # glibc up to 2.1.1 does not perform some relocations on ARM | |
4029 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; | |
4030 esac | |
4031 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` | |
4032 ;; | |
4033 | |
4034 netbsd*) | |
4035 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | |
4036 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$' | |
4037 else | |
4038 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$' | |
4039 fi | |
4040 ;; | |
4041 | |
4042 newos6*) | |
4043 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' | |
4044 lt_cv_file_magic_cmd=/usr/bin/file | |
4045 lt_cv_file_magic_test_file=/usr/lib/libnls.so | |
4046 ;; | |
4047 | |
4048 openbsd*) | |
4049 lt_cv_file_magic_cmd=/usr/bin/file | |
4050 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` | |
4051 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then | |
4052 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' | |
4053 else | |
4054 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' | |
4055 fi | |
4056 ;; | |
4057 | |
4058 osf3* | osf4* | osf5*) | |
4059 # this will be overridden with pass_all, but let us keep it just in case | |
4060 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' | |
4061 lt_cv_file_magic_test_file=/shlib/libc.so | |
4062 lt_cv_deplibs_check_method=pass_all | |
4063 ;; | |
4064 | |
4065 sco3.2v5*) | |
4066 lt_cv_deplibs_check_method=pass_all | |
4067 ;; | |
4068 | |
4069 solaris*) | |
4070 lt_cv_deplibs_check_method=pass_all | |
4071 lt_cv_file_magic_test_file=/lib/libc.so | |
4072 ;; | |
4073 | |
4074 sysv5uw[[78]]* | sysv4*uw2*) | |
4075 lt_cv_deplibs_check_method=pass_all | |
4076 ;; | |
4077 | |
4078 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) | |
4079 case $host_vendor in | |
4080 motorola) | |
4081 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' | |
4082 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` | |
4083 ;; | |
4084 ncr) | |
4085 lt_cv_deplibs_check_method=pass_all | |
4086 ;; | |
4087 sequent) | |
4088 lt_cv_file_magic_cmd='/bin/file' | |
4089 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' | |
4090 ;; | |
4091 sni) | |
4092 lt_cv_file_magic_cmd='/bin/file' | |
4093 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" | |
4094 lt_cv_file_magic_test_file=/lib/libc.so | |
4095 ;; | |
4096 esac | |
4097 ;; | |
4098 esac | |
4099 ]) | |
4100 file_magic_cmd=$lt_cv_file_magic_cmd | |
4101 deplibs_check_method=$lt_cv_deplibs_check_method | |
4102 ]) | |
4103 | |
4104 | |
4105 # AC_PROG_NM - find the path to a BSD-compatible name lister | |
4106 AC_DEFUN([AC_PROG_NM], | |
4107 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl | |
4108 AC_MSG_CHECKING([for BSD-compatible nm]) | |
4109 AC_CACHE_VAL(lt_cv_path_NM, | |
4110 [if test -n "$NM"; then | |
4111 # Let the user override the test. | |
4112 lt_cv_path_NM="$NM" | |
4113 else | |
4114 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
4115 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do | |
4116 test -z "$ac_dir" && ac_dir=. | |
4117 tmp_nm=$ac_dir/${ac_tool_prefix}nm | |
4118 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then | |
4119 # Check to see if the nm accepts a BSD-compat flag. | |
4120 # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
4121 # nm: unknown option "B" ignored | |
4122 # Tru64's nm complains that /dev/null is an invalid object file | |
4123 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then | |
4124 lt_cv_path_NM="$tmp_nm -B" | |
4125 break | |
4126 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then | |
4127 lt_cv_path_NM="$tmp_nm -p" | |
4128 break | |
4129 else | |
4130 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but | |
4131 continue # so that we can try to find one that supports BSD flags | |
4132 fi | |
4133 fi | |
4134 done | |
4135 IFS="$ac_save_ifs" | |
4136 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm | |
4137 fi]) | |
4138 NM="$lt_cv_path_NM" | |
4139 AC_MSG_RESULT([$NM]) | |
4140 ]) | |
4141 | |
4142 # AC_CHECK_LIBM - check for math library | |
4143 AC_DEFUN([AC_CHECK_LIBM], | |
4144 [AC_REQUIRE([AC_CANONICAL_HOST])dnl | |
4145 LIBM= | |
4146 case $host in | |
4147 *-*-beos* | *-*-cygwin* | *-*-pw32*) | |
4148 # These system don't have libm | |
4149 ;; | |
4150 *-ncr-sysv4.3*) | |
4151 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") | |
4152 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") | |
4153 ;; | |
4154 *) | |
4155 AC_CHECK_LIB(m, main, LIBM="-lm") | |
4156 ;; | |
4157 esac | |
4158 ]) | |
4159 | |
4160 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for | |
4161 # the libltdl convenience library and INCLTDL to the include flags for | |
4162 # the libltdl header and adds --enable-ltdl-convenience to the | |
4163 # configure arguments. Note that LIBLTDL and INCLTDL are not | |
4164 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not | |
4165 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed | |
4166 # with '${top_builddir}/' and INCLTDL will be prefixed with | |
4167 # '${top_srcdir}/' (note the single quotes!). If your package is not | |
4168 # flat and you're not using automake, define top_builddir and | |
4169 # top_srcdir appropriately in the Makefiles. | |
4170 AC_DEFUN([AC_LIBLTDL_CONVENIENCE], | |
4171 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
4172 case $enable_ltdl_convenience in | |
4173 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; | |
4174 "") enable_ltdl_convenience=yes | |
4175 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; | |
4176 esac | |
4177 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la | |
4178 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) | |
4179 ]) | |
4180 | |
4181 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for | |
4182 # the libltdl installable library and INCLTDL to the include flags for | |
4183 # the libltdl header and adds --enable-ltdl-install to the configure | |
4184 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is | |
4185 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed | |
4186 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will | |
4187 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed | |
4188 # with '${top_srcdir}/' (note the single quotes!). If your package is | |
4189 # not flat and you're not using automake, define top_builddir and | |
4190 # top_srcdir appropriately in the Makefiles. | |
4191 # In the future, this macro may have to be called after AC_PROG_LIBTOOL. | |
4192 AC_DEFUN([AC_LIBLTDL_INSTALLABLE], | |
4193 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl | |
4194 AC_CHECK_LIB(ltdl, main, | |
4195 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], | |
4196 [if test x"$enable_ltdl_install" = xno; then | |
4197 AC_MSG_WARN([libltdl not installed, but installation disabled]) | |
4198 else | |
4199 enable_ltdl_install=yes | |
4200 fi | |
4201 ]) | |
4202 if test x"$enable_ltdl_install" = x"yes"; then | |
4203 ac_configure_args="$ac_configure_args --enable-ltdl-install" | |
4204 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la | |
4205 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) | |
4206 else | |
4207 ac_configure_args="$ac_configure_args --enable-ltdl-install=no" | |
4208 LIBLTDL="-lltdl" | |
4209 INCLTDL= | |
4210 fi | |
4211 ]) | |
4212 | |
4213 # old names | |
4214 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) | |
4215 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) | |
4216 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) | |
4217 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) | |
4218 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) | |
4219 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) | |
4220 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) | |
4221 | |
4222 # This is just to silence aclocal about the macro not being used | |
4223 ifelse([AC_DISABLE_FAST_INSTALL]) |