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