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